Refactored the repository and gruntified all the things

This commit is contained in:
2014-05-17 23:16:16 +01:00
parent 0fa7bd127f
commit eb889620cc
94 changed files with 314 additions and 7905 deletions

View File

@@ -0,0 +1,37 @@
;(function ($, window, document, undefined) {
'use strict';
Foundation.libs.alert = {
name : 'alert',
version : '5.2.1',
settings : {
animation: 'fadeOut',
speed: 300, // fade out speed
callback: function (){}
},
init : function (scope, method, options) {
this.bindings(method, options);
},
events : function () {
var self = this,
S = this.S;
$(this.scope).off('.alert').on('click.fndtn.alert', '[' + this.attr_name() + '] a.close', function (e) {
var alertBox = S(this).closest('[' + self.attr_name() + ']'),
settings = alertBox.data(self.attr_name(true) + '-init') || self.settings;
e.preventDefault();
alertBox[settings.animation](settings.speed, function () {
S(this).trigger('close').remove();
settings.callback();
});
});
},
reflow : function () {}
};
}(jQuery, this, this.document));