Removed production files

This commit is contained in:
Alicia Sykes
2017-03-05 12:45:07 +00:00
parent fa8951171d
commit 29e285a027
5 changed files with 3 additions and 216 deletions

3
.gitignore vendored
View File

@@ -1,2 +1,3 @@
node_modules
.idea
.idea
production

View File

@@ -15,6 +15,7 @@
"coffeelint-stylish": "^0.1.2",
"del": "^2.2.0",
"gulp": "^3.9.1",
"gulp-bower": "0.0.13",
"gulp-clean-css": "^2.0.7",
"gulp-coffee": "^2.3.2",
"gulp-concat": "^2.6.0",

View File

@@ -1,192 +0,0 @@
(function($) {
var _stack = 0,
_lastID = 0,
_generateID = function() {
_lastID++;
return 'materialize-lean-overlay-' + _lastID;
};
$.fn.extend({
openModal: function(options) {
var $body = $('body');
var oldWidth = $body.innerWidth();
$body.css('overflow', 'hidden');
$body.width(oldWidth);
var defaults = {
opacity: 0.5,
in_duration: 350,
out_duration: 250,
ready: undefined,
complete: undefined,
dismissible: true,
starting_top: '4%',
ending_top: '10%'
};
var $modal = $(this);
if ($modal.hasClass('open')) {
return;
}
var overlayID = _generateID();
var $overlay = $('<div class="lean-overlay"></div>');
lStack = (++_stack);
// Store a reference of the overlay
$overlay.attr('id', overlayID).css('z-index', 1000 + lStack * 2);
$modal.data('overlay-id', overlayID).css('z-index', 1000 + lStack * 2 + 1);
$modal.addClass('open');
$("body").append($overlay);
// Override defaults
options = $.extend(defaults, options);
if (options.dismissible) {
$overlay.click(function() {
$modal.closeModal(options);
});
// Return on ESC
$(document).on('keyup.leanModal' + overlayID, function(e) {
if (e.keyCode === 27) { // ESC key
$modal.closeModal(options);
}
});
}
$modal.find(".modal-close").on('click.close', function(e) {
$modal.closeModal(options);
});
$overlay.css({ display : "block", opacity : 0 });
$modal.css({
display : "block",
opacity: 0
});
$overlay.velocity({opacity: options.opacity}, {duration: options.in_duration, queue: false, ease: "easeOutCubic"});
$modal.data('associated-overlay', $overlay[0]);
// Define Bottom Sheet animation
if ($modal.hasClass('bottom-sheet')) {
$modal.velocity({bottom: "0", opacity: 1}, {
duration: options.in_duration,
queue: false,
ease: "easeOutCubic",
// Handle modal ready callback
complete: function() {
if (typeof(options.ready) === "function") {
options.ready();
}
}
});
}
else {
$.Velocity.hook($modal, "scaleX", 0.7);
$modal.css({ top: options.starting_top });
$modal.velocity({top: options.ending_top, opacity: 1, scaleX: '1'}, {
duration: options.in_duration,
queue: false,
ease: "easeOutCubic",
// Handle modal ready callback
complete: function() {
if (typeof(options.ready) === "function") {
options.ready();
}
}
});
}
}
});
$.fn.extend({
closeModal: function(options) {
var defaults = {
out_duration: 250,
complete: undefined
};
var $modal = $(this);
var overlayID = $modal.data('overlay-id');
var $overlay = $('#' + overlayID);
$modal.removeClass('open');
options = $.extend(defaults, options);
// Enable scrolling
$('body').css({
overflow: '',
width: ''
});
$modal.find('.modal-close').off('click.close');
$(document).off('keyup.leanModal' + overlayID);
$overlay.velocity( { opacity: 0}, {duration: options.out_duration, queue: false, ease: "easeOutQuart"});
// Define Bottom Sheet animation
if ($modal.hasClass('bottom-sheet')) {
$modal.velocity({bottom: "-100%", opacity: 0}, {
duration: options.out_duration,
queue: false,
ease: "easeOutCubic",
// Handle modal ready callback
complete: function() {
$overlay.css({display:"none"});
// Call complete callback
if (typeof(options.complete) === "function") {
options.complete();
}
$overlay.remove();
_stack--;
}
});
}
else {
$modal.velocity(
{ top: options.starting_top, opacity: 0, scaleX: 0.7}, {
duration: options.out_duration,
complete:
function() {
$(this).css('display', 'none');
// Call complete callback
if (typeof(options.complete) === "function") {
options.complete();
}
$overlay.remove();
_stack--;
}
}
);
}
}
});
$.fn.extend({
leanModal: function(option) {
return this.each(function() {
var defaults = {
starting_top: '4%'
},
// Override defaults
options = $.extend(defaults, option);
// Close Handlers
$(this).click(function(e) {
options.starting_top = ($(this).offset().top - $(window).scrollTop()) /1.15;
var modal_id = $(this).attr("href") || '#' + $(this).data('target');
$(modal_id).openModal(options);
e.preventDefault();
}); // done set on click
}); // done return
}
});
})(jQuery);

View File

@@ -1,18 +0,0 @@
{
// Support: IE <=9 only, Android <=4.0 only
// The above browsers are failing a lot of tests in the ES5
// test suite at http://test262.ecmascript.org.
"parserOptions": {
"ecmaVersion": 3
},
"globals": {
"window": true,
"jQuery": true,
"define": true,
"module": true,
"noGlobal": true
},
"rules": {
"strict": ["error", "function"]
}
}

View File

@@ -1,5 +0,0 @@
define( function() {
"use strict";
return ( /\S+/g );
} );