mirror of
https://github.com/ExactTarget/fuelux.git
synced 2026-01-10 06:57:56 -05:00
(GH1972) makes UMD wrapper consistent across Fuel UX
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
/* global jQuery:true */
|
||||
|
||||
/*
|
||||
* Fuel UX Checkbox
|
||||
* https://github.com/ExactTarget/fuelux
|
||||
@@ -11,7 +13,7 @@
|
||||
// For more information on UMD visit:
|
||||
// https://github.com/umdjs/umd/blob/master/jqueryPlugin.js
|
||||
|
||||
(function (factory) {
|
||||
(function umdFactory (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// if AMD loader is available, register as an anonymous module.
|
||||
define(['jquery'], factory);
|
||||
@@ -22,7 +24,7 @@
|
||||
// OR use browser globals if AMD is not present
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
}(function CheckboxWrapper ($) {
|
||||
// -- END UMD WRAPPER PREFACE --
|
||||
|
||||
// -- BEGIN MODULE CODE HERE --
|
||||
@@ -31,7 +33,7 @@
|
||||
|
||||
// CHECKBOX CONSTRUCTOR AND PROTOTYPE
|
||||
|
||||
var Checkbox = function (element, options) {
|
||||
var Checkbox = function Checkbox (element, options) {
|
||||
this.options = $.extend({}, $.fn.checkbox.defaults, options);
|
||||
var $element = $(element);
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* global jQuery:true */
|
||||
|
||||
/*
|
||||
* Fuel UX Combobox
|
||||
* https://github.com/ExactTarget/fuelux
|
||||
@@ -11,7 +13,7 @@
|
||||
// For more information on UMD visit:
|
||||
// https://github.com/umdjs/umd/blob/master/jqueryPlugin.js
|
||||
|
||||
(function (factory) {
|
||||
(function umdFactory (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// if AMD loader is available, register as an anonymous module.
|
||||
define(['jquery'], factory);
|
||||
@@ -22,7 +24,7 @@
|
||||
// OR use browser globals if AMD is not present
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
}(function ComboboxWrapper ($) {
|
||||
// -- END UMD WRAPPER PREFACE --
|
||||
|
||||
// -- BEGIN MODULE CODE HERE --
|
||||
@@ -83,9 +85,9 @@
|
||||
},
|
||||
|
||||
doSelect: function ($item) {
|
||||
|
||||
|
||||
if (typeof $item[0] !== 'undefined') {
|
||||
// remove selection from old item, may result in remove and
|
||||
// remove selection from old item, may result in remove and
|
||||
// re-addition of class if item is the same
|
||||
this.$element.find('li.selected:first').removeClass('selected');
|
||||
|
||||
@@ -285,7 +287,7 @@
|
||||
if (extra && extra.synthetic) {
|
||||
this.selectByText(val);
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.selectByText(val);
|
||||
|
||||
// find match based on input
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* global jQuery:true */
|
||||
|
||||
/*
|
||||
* Fuel UX Datepicker
|
||||
* https://github.com/ExactTarget/fuelux
|
||||
@@ -11,7 +13,7 @@
|
||||
// For more information on UMD visit:
|
||||
// https://github.com/umdjs/umd/blob/master/jqueryPlugin.js
|
||||
|
||||
(function (factory) {
|
||||
(function umdFactory (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// if AMD loader is available, register as an anonymous module.
|
||||
define(['jquery'], factory);
|
||||
@@ -22,7 +24,7 @@
|
||||
// OR use browser globals if AMD is not present
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
}(function DatepickerWrapper ($) {
|
||||
// -- END UMD WRAPPER PREFACE --
|
||||
|
||||
// -- BEGIN MODULE CODE HERE --
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* global jQuery:true */
|
||||
|
||||
/*
|
||||
* Fuel UX Dropdown Auto Flip
|
||||
* https://github.com/ExactTarget/fuelux
|
||||
@@ -11,7 +13,7 @@
|
||||
// For more information on UMD visit:
|
||||
// https://github.com/umdjs/umd/blob/master/jqueryPlugin.js
|
||||
|
||||
(function (factory) {
|
||||
(function umdFactory (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// if AMD loader is available, register as an anonymous module.
|
||||
define(['jquery'], factory);
|
||||
@@ -22,7 +24,7 @@
|
||||
// OR use browser globals if AMD is not present
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
}(function dropdownautoflipWrapper ($) {
|
||||
// -- END UMD WRAPPER PREFACE --
|
||||
|
||||
// -- BEGIN MODULE CODE HERE --
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* global jQuery:true */
|
||||
|
||||
/*
|
||||
* Fuel UX Infinite Scroll
|
||||
* https://github.com/ExactTarget/fuelux
|
||||
@@ -11,7 +13,7 @@
|
||||
// For more information on UMD visit:
|
||||
// https://github.com/umdjs/umd/blob/master/jqueryPlugin.js
|
||||
|
||||
(function (factory) {
|
||||
(function umdFactory (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// if AMD loader is available, register as an anonymous module.
|
||||
define(['jquery', 'fuelux/loader'], factory);
|
||||
@@ -22,7 +24,7 @@
|
||||
// OR use browser globals if AMD is not present
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
}(function InfiniteScrollWrapper ($) {
|
||||
// -- END UMD WRAPPER PREFACE --
|
||||
|
||||
// -- BEGIN MODULE CODE HERE --
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* global jQuery:true */
|
||||
|
||||
/*
|
||||
* Fuel UX Loader
|
||||
* https://github.com/ExactTarget/fuelux
|
||||
@@ -11,7 +13,7 @@
|
||||
// For more information on UMD visit:
|
||||
// https://github.com/umdjs/umd/blob/master/jqueryPlugin.js
|
||||
|
||||
(function (factory) {
|
||||
(function umdFactory (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// if AMD loader is available, register as an anonymous module.
|
||||
define(['jquery'], factory);
|
||||
@@ -22,7 +24,7 @@
|
||||
// OR use browser globals if AMD is not present
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
}(function LoaderWrapper ($) {
|
||||
// -- END UMD WRAPPER PREFACE --
|
||||
|
||||
// -- BEGIN MODULE CODE HERE --
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* global jQuery:true */
|
||||
|
||||
/*
|
||||
* Fuel UX Picker
|
||||
* https://github.com/ExactTarget/fuelux
|
||||
@@ -11,7 +13,7 @@
|
||||
// For more information on UMD visit:
|
||||
// https://github.com/umdjs/umd/blob/master/jqueryPlugin.js
|
||||
|
||||
(function (factory) {
|
||||
(function umdFactory (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// if AMD loader is available, register as an anonymous module.
|
||||
define(['jquery'], factory);
|
||||
@@ -22,7 +24,7 @@
|
||||
// OR use browser globals if AMD is not present
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
}(function PickerWrapper ($) {
|
||||
// -- END UMD WRAPPER PREFACE --
|
||||
|
||||
// -- BEGIN MODULE CODE HERE --
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
// For more information on UMD visit:
|
||||
// https://github.com/umdjs/umd/blob/master/jqueryPlugin.js
|
||||
(function umdWrapper (factory) {
|
||||
(function umdFactory (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// if AMD loader is available, register as an anonymous module.
|
||||
define(['jquery', 'fuelux/utilities', 'fuelux/dropdown-autoflip'], factory);
|
||||
@@ -25,7 +25,10 @@
|
||||
// OR use browser globals if AMD is not present
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function pillboxWrapper ($) {
|
||||
}(function PillboxWrapper ($) {
|
||||
// -- END UMD WRAPPER PREFACE --
|
||||
|
||||
// -- BEGIN MODULE CODE HERE --
|
||||
if (!$.fn.dropdownautoflip) {
|
||||
throw new Error('Fuel UX pillbox control requires dropdown-autoflip.');
|
||||
}
|
||||
@@ -33,9 +36,7 @@
|
||||
if (!$.fn.utilities) {
|
||||
throw new Error('Fuel UX pillbox control requires FuelUX utilities.');
|
||||
}
|
||||
// -- END UMD WRAPPER PREFACE --
|
||||
|
||||
// -- BEGIN MODULE CODE HERE --
|
||||
var old = $.fn.pillbox;
|
||||
|
||||
var utilities = $.fn.utilities;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* global jQuery:true */
|
||||
|
||||
/*
|
||||
* Fuel UX Placard
|
||||
* https://github.com/ExactTarget/fuelux
|
||||
@@ -11,7 +13,7 @@
|
||||
// For more information on UMD visit:
|
||||
// https://github.com/umdjs/umd/blob/master/jqueryPlugin.js
|
||||
|
||||
(function (factory) {
|
||||
(function umdFactory (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// if AMD loader is available, register as an anonymous module.
|
||||
define(['jquery'], factory);
|
||||
@@ -22,7 +24,7 @@
|
||||
// OR use browser globals if AMD is not present
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
}(function PlacardWrapper ($) {
|
||||
// -- END UMD WRAPPER PREFACE --
|
||||
|
||||
// -- BEGIN MODULE CODE HERE --
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* global jQuery:true */
|
||||
|
||||
/*
|
||||
* Fuel UX Radio
|
||||
* https://github.com/ExactTarget/fuelux
|
||||
@@ -11,7 +13,7 @@
|
||||
// For more information on UMD visit:
|
||||
// https://github.com/umdjs/umd/blob/master/jqueryPlugin.js
|
||||
|
||||
(function (factory) {
|
||||
(function umdFactory (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// if AMD loader is available, register as an anonymous module.
|
||||
define(['jquery'], factory);
|
||||
@@ -22,7 +24,7 @@
|
||||
// OR use browser globals if AMD is not present
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
}(function RadioWrapper ($) {
|
||||
// -- END UMD WRAPPER PREFACE --
|
||||
|
||||
// -- BEGIN MODULE CODE HERE --
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
// For more information on UMD visit:
|
||||
// https://github.com/umdjs/umd/blob/master/jqueryPlugin.js
|
||||
|
||||
(function UMDFactory (factory) {
|
||||
(function umdFactory (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// if AMD loader is available, register as an anonymous module.
|
||||
define(['jquery', 'fuelux/repeater', 'fuelux/checkbox'], factory);
|
||||
@@ -24,7 +24,7 @@
|
||||
// OR use browser globals if AMD is not present
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function repeaterList ($) {
|
||||
}(function repeaterListWrapper ($) {
|
||||
// -- END UMD WRAPPER PREFACE --
|
||||
|
||||
// -- BEGIN MODULE CODE HERE --
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* global jQuery:true */
|
||||
|
||||
/*
|
||||
* Fuel UX Repeater - Thumbnail View Plugin
|
||||
* https://github.com/ExactTarget/fuelux
|
||||
@@ -11,7 +13,7 @@
|
||||
// For more information on UMD visit:
|
||||
// https://github.com/umdjs/umd/blob/master/jqueryPlugin.js
|
||||
|
||||
(function (factory) {
|
||||
(function umdFactory (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// if AMD loader is available, register as an anonymous module.
|
||||
define(['jquery', 'fuelux/repeater'], factory);
|
||||
@@ -22,7 +24,7 @@
|
||||
// OR use browser globals if AMD is not present
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
}(function repeaterThumbnailWrapper ($) {
|
||||
// -- END UMD WRAPPER PREFACE --
|
||||
|
||||
// -- BEGIN MODULE CODE HERE --
|
||||
@@ -166,7 +168,7 @@
|
||||
var selected = 'selected';
|
||||
var self = this;
|
||||
var $thumbnail = $(fillTemplate(helpers.subset[helpers.index], this.viewOptions.thumbnail_template));
|
||||
|
||||
|
||||
$thumbnail.data('item_data', helpers.data.items[helpers.index]);
|
||||
|
||||
if (selectable) {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
// For more information on UMD visit:
|
||||
// https://github.com/umdjs/umd/blob/master/jqueryPlugin.js
|
||||
|
||||
(function UMDFactory (factory) {
|
||||
(function umdFactory (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// if AMD loader is available, register as an anonymous module.
|
||||
define(['jquery', 'fuelux/combobox', 'fuelux/infinite-scroll', 'fuelux/search', 'fuelux/selectlist'], factory);
|
||||
@@ -25,7 +25,7 @@
|
||||
// OR use browser globals if AMD is not present
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function repeater ($) {
|
||||
}(function RepeaterWrapper ($) {
|
||||
// -- END UMD WRAPPER PREFACE --
|
||||
|
||||
// -- BEGIN MODULE CODE HERE --
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* global jQuery:true */
|
||||
|
||||
/*
|
||||
* Fuel UX Scheduler
|
||||
* https://github.com/ExactTarget/fuelux
|
||||
@@ -11,7 +13,7 @@
|
||||
// For more information on UMD visit:
|
||||
// https://github.com/umdjs/umd/blob/master/jqueryPlugin.js
|
||||
|
||||
(function (factory) {
|
||||
(function umdFactory (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// if AMD loader is available, register as an anonymous module.
|
||||
define(['jquery', 'fuelux/combobox', 'fuelux/datepicker', 'fuelux/radio', 'fuelux/selectlist', 'fuelux/spinbox'], factory);
|
||||
@@ -23,14 +25,13 @@
|
||||
// OR use browser globals if AMD is not present
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
if (!$.fn.combobox || !$.fn.datepicker || !$.fn.radio || !$.fn.selectlist || !$.fn.spinbox) {
|
||||
throw new Error('Fuel UX scheduler control requires combobox, datepicker, radio, selectlist, and spinbox.');
|
||||
}
|
||||
|
||||
}(function SchedulerWrapper ($) {
|
||||
// -- END UMD WRAPPER PREFACE --
|
||||
|
||||
// -- BEGIN MODULE CODE HERE --
|
||||
if (!$.fn.combobox || !$.fn.datepicker || !$.fn.radio || !$.fn.selectlist || !$.fn.spinbox) {
|
||||
throw new Error('Fuel UX scheduler control requires combobox, datepicker, radio, selectlist, and spinbox.');
|
||||
}
|
||||
|
||||
var old = $.fn.scheduler;
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* global jQuery:true */
|
||||
|
||||
/*
|
||||
* Fuel UX Search
|
||||
* https://github.com/ExactTarget/fuelux
|
||||
@@ -11,7 +13,7 @@
|
||||
// For more information on UMD visit:
|
||||
// https://github.com/umdjs/umd/blob/master/jqueryPlugin.js
|
||||
|
||||
(function (factory) {
|
||||
(function umdFactory (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// if AMD loader is available, register as an anonymous module.
|
||||
define(['jquery'], factory);
|
||||
@@ -22,7 +24,7 @@
|
||||
// OR use browser globals if AMD is not present
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
}(function SearchWrapper ($) {
|
||||
// -- END UMD WRAPPER PREFACE --
|
||||
|
||||
// -- BEGIN MODULE CODE HERE --
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* global jQuery:true */
|
||||
|
||||
/*
|
||||
* Fuel UX Selectlist
|
||||
* https://github.com/ExactTarget/fuelux
|
||||
@@ -11,7 +13,7 @@
|
||||
// For more information on UMD visit:
|
||||
// https://github.com/umdjs/umd/blob/master/jqueryPlugin.js
|
||||
|
||||
(function (factory) {
|
||||
(function umdFactory (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// if AMD loader is available, register as an anonymous module.
|
||||
define(['jquery'], factory);
|
||||
@@ -22,7 +24,7 @@
|
||||
// OR use browser globals if AMD is not present
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
}(function SelectlistWrapper ($) {
|
||||
// -- END UMD WRAPPER PREFACE --
|
||||
|
||||
// -- BEGIN MODULE CODE HERE --
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* global jQuery:true */
|
||||
|
||||
/*
|
||||
* Fuel UX Spinbox
|
||||
* https://github.com/ExactTarget/fuelux
|
||||
@@ -11,7 +13,7 @@
|
||||
// For more information on UMD visit:
|
||||
// https://github.com/umdjs/umd/blob/master/jqueryPlugin.js
|
||||
|
||||
(function (factory) {
|
||||
(function umdFactory (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// if AMD loader is available, register as an anonymous module.
|
||||
define(['jquery'], factory);
|
||||
@@ -22,7 +24,7 @@
|
||||
// OR use browser globals if AMD is not present
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
}(function SpinboxWrapper ($) {
|
||||
// -- END UMD WRAPPER PREFACE --
|
||||
|
||||
// -- BEGIN MODULE CODE HERE --
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// OR use browser globals if AMD is not present
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function tree ($) {
|
||||
}(function TreeWrapper ($) {
|
||||
// -- END UMD WRAPPER PREFACE --
|
||||
|
||||
// -- BEGIN MODULE CODE HERE --
|
||||
|
||||
@@ -26,8 +26,9 @@
|
||||
// OR use browser globals if AMD is not present
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function utilities ($) {
|
||||
}(function utilitiesWrapper ($) {
|
||||
// -- END UMD WRAPPER PREFACE --
|
||||
|
||||
// -- BEGIN MODULE CODE HERE --
|
||||
var CONST = {
|
||||
BACKSPACE_KEYCODE: 8,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
/* global jQuery:true */
|
||||
|
||||
/*
|
||||
* Fuel UX Wizard
|
||||
* https://github.com/ExactTarget/fuelux
|
||||
@@ -11,7 +13,7 @@
|
||||
// For more information on UMD visit:
|
||||
// https://github.com/umdjs/umd/blob/master/jqueryPlugin.js
|
||||
|
||||
(function (factory) {
|
||||
(function umdFactory (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// if AMD loader is available, register as an anonymous module.
|
||||
define(['jquery'], factory);
|
||||
@@ -22,7 +24,7 @@
|
||||
// OR use browser globals if AMD is not present
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
}(function WizardWrapper ($) {
|
||||
// -- END UMD WRAPPER PREFACE --
|
||||
|
||||
// -- BEGIN MODULE CODE HERE --
|
||||
|
||||
Reference in New Issue
Block a user