mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-24 16:43:48 +00:00
include assetic files in local fixture
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
/*!
|
||||
* Pikaday jQuery plugin.
|
||||
*
|
||||
* Copyright © 2013 David Bushell | BSD & MIT license | https://github.com/dbushell/Pikaday
|
||||
*/
|
||||
|
||||
(function (root, factory)
|
||||
{
|
||||
'use strict';
|
||||
|
||||
if (typeof exports === 'object') {
|
||||
// CommonJS module
|
||||
factory(require('jquery'), require('../pikaday'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['jquery', 'pikaday'], factory);
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(root.jQuery, root.Pikaday);
|
||||
}
|
||||
}(this, function ($, Pikaday)
|
||||
{
|
||||
'use strict';
|
||||
|
||||
$.fn.pikaday = function()
|
||||
{
|
||||
var args = arguments;
|
||||
|
||||
if (!args || !args.length) {
|
||||
args = [{ }];
|
||||
}
|
||||
|
||||
return this.each(function()
|
||||
{
|
||||
var self = $(this),
|
||||
plugin = self.data('pikaday');
|
||||
|
||||
if (!(plugin instanceof Pikaday)) {
|
||||
if (typeof args[0] === 'object') {
|
||||
var options = $.extend({}, args[0]);
|
||||
options.field = self[0];
|
||||
self.data('pikaday', new Pikaday(options));
|
||||
}
|
||||
} else {
|
||||
if (typeof args[0] === 'string' && typeof plugin[args[0]] === 'function') {
|
||||
plugin[args[0]].apply(plugin, Array.prototype.slice.call(args,1));
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
}));
|
Reference in New Issue
Block a user