fuelux-rails 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +3 -0
  3. data/Rakefile +38 -0
  4. data/lib/fuelux-rails.rb +6 -0
  5. data/lib/fuelux-rails/engine.rb +11 -0
  6. data/lib/fuelux-rails/fuelux.rb +3 -0
  7. data/lib/fuelux-rails/version.rb +3 -0
  8. data/lib/tasks/fuelux-rails_tasks.rake +4 -0
  9. data/test/dummy/README.rdoc +261 -0
  10. data/test/dummy/Rakefile +7 -0
  11. data/test/dummy/app/assets/javascripts/application.js +15 -0
  12. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  13. data/test/dummy/app/controllers/application_controller.rb +3 -0
  14. data/test/dummy/app/helpers/application_helper.rb +2 -0
  15. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  16. data/test/dummy/config.ru +4 -0
  17. data/test/dummy/config/application.rb +59 -0
  18. data/test/dummy/config/boot.rb +10 -0
  19. data/test/dummy/config/database.yml +25 -0
  20. data/test/dummy/config/environment.rb +5 -0
  21. data/test/dummy/config/environments/development.rb +37 -0
  22. data/test/dummy/config/environments/production.rb +67 -0
  23. data/test/dummy/config/environments/test.rb +37 -0
  24. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  25. data/test/dummy/config/initializers/inflections.rb +15 -0
  26. data/test/dummy/config/initializers/mime_types.rb +5 -0
  27. data/test/dummy/config/initializers/secret_token.rb +7 -0
  28. data/test/dummy/config/initializers/session_store.rb +8 -0
  29. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  30. data/test/dummy/config/locales/en.yml +5 -0
  31. data/test/dummy/config/routes.rb +58 -0
  32. data/test/dummy/public/404.html +26 -0
  33. data/test/dummy/public/422.html +26 -0
  34. data/test/dummy/public/500.html +25 -0
  35. data/test/dummy/public/favicon.ico +0 -0
  36. data/test/dummy/script/rails +6 -0
  37. data/test/fuelux-rails_test.rb +7 -0
  38. data/test/test_helper.rb +15 -0
  39. data/vendor/assets/javascripts/fuelux.js +5 -0
  40. data/vendor/assets/javascripts/fuelux/datagrid.js +214 -0
  41. data/vendor/assets/javascripts/fuelux/loader.js +3190 -0
  42. data/vendor/assets/javascripts/fuelux/pillbox.js +69 -0
  43. data/vendor/assets/javascripts/fuelux/search.js +100 -0
  44. data/vendor/assets/javascripts/fuelux/spinner.js +183 -0
  45. data/vendor/toolkit/fuelux.less +5 -0
  46. data/vendor/toolkit/fuelux/combobox.less +5 -0
  47. data/vendor/toolkit/fuelux/datagrid.less +98 -0
  48. data/vendor/toolkit/fuelux/pillbox.less +74 -0
  49. data/vendor/toolkit/fuelux/spinner.less +47 -0
  50. metadata +173 -0
@@ -0,0 +1,214 @@
1
+ /*
2
+ * Fuel UX Datagrid
3
+ * https://github.com/ExactTarget/fuelux
4
+ *
5
+ * Copyright (c) 2012 ExactTarget
6
+ * Licensed under the MIT license.
7
+ */
8
+ !function ($) {
9
+
10
+ // DATAGRID CONSTRUCTOR AND PROTOTYPE
11
+
12
+ var Datagrid = function (element, options) {
13
+ this.$element = $(element);
14
+ this.$thead = this.$element.find('thead');
15
+ this.$footer = this.$element.find('tfoot th');
16
+ this.$footerchildren = this.$footer.children();
17
+ this.$topheader = this.$element.find('thead th');
18
+ this.$searchcontrol = this.$element.find('.search');
19
+ this.$pagesize = this.$element.find('.grid-pagesize');
20
+ this.$pageinput = this.$element.find('.grid-pager input');
21
+ this.$pagedropdown = this.$element.find('.grid-pager .dropdown-menu');
22
+ this.$prevpagebtn = this.$element.find('.grid-prevpage');
23
+ this.$nextpagebtn = this.$element.find('.grid-nextpage');
24
+ this.$pageslabel = this.$element.find('.grid-pages');
25
+ this.$countlabel = this.$element.find('.grid-count');
26
+ this.$startlabel = this.$element.find('.grid-start');
27
+ this.$endlabel = this.$element.find('.grid-end');
28
+
29
+ this.$tbody = $('<tbody>').insertAfter(this.$thead);
30
+ this.$colheader = $('<tr>').appendTo(this.$thead);
31
+
32
+ this.options = $.extend({}, $.fn.datagrid.defaults, options);
33
+ this.options.dataOptions.pageSize = parseInt(this.$pagesize.val(), 10);
34
+ this.columns = this.options.dataSource.columns();
35
+
36
+ this.$nextpagebtn.on('click', $.proxy(this.next, this));
37
+ this.$prevpagebtn.on('click', $.proxy(this.previous, this));
38
+ this.$searchcontrol.on('searched cleared', $.proxy(this.searchChanged, this));
39
+ this.$colheader.on('click', 'th', $.proxy(this.headerClicked, this));
40
+ this.$pagesize.on('change', $.proxy(this.pagesizeChanged, this));
41
+ this.$pageinput.on('change', $.proxy(this.pageChanged, this));
42
+
43
+ this.renderColumns();
44
+ this.renderData();
45
+ };
46
+
47
+ Datagrid.prototype = {
48
+
49
+ constructor: Datagrid,
50
+
51
+ renderColumns: function () {
52
+ var self = this;
53
+
54
+ this.$footer.attr('colspan', this.columns.length);
55
+ this.$topheader.attr('colspan', this.columns.length);
56
+
57
+ var colHTML = '';
58
+
59
+ $.each(this.columns, function (index, column) {
60
+ colHTML += '<th data-property="' + column.property + '"';
61
+ if (column.sortable) colHTML += ' class="sortable"';
62
+ colHTML += '>' + column.label + '</th>';
63
+ });
64
+
65
+ self.$colheader.append(colHTML);
66
+ },
67
+
68
+ updateColumns: function ($target, direction) {
69
+ var className = (direction === 'asc') ? 'icon-chevron-up' : 'icon-chevron-down';
70
+ this.$colheader.find('i').remove();
71
+ this.$colheader.find('th').removeClass('sorted');
72
+ $('<i>').addClass(className).appendTo($target);
73
+ $target.addClass('sorted');
74
+ },
75
+
76
+ updatePageDropdown: function (data) {
77
+ var pageHTML = '';
78
+
79
+ for (var i = 1; i <= data.pages; i++) {
80
+ pageHTML += '<li><a>' + i + '</a></li>';
81
+ }
82
+
83
+ this.$pagedropdown.html(pageHTML);
84
+ },
85
+
86
+ updatePageButtons: function (data) {
87
+ if (data.page === 1) {
88
+ this.$prevpagebtn.attr('disabled', 'disabled');
89
+ } else {
90
+ this.$prevpagebtn.removeAttr('disabled');
91
+ }
92
+
93
+ if (data.page === data.pages) {
94
+ this.$nextpagebtn.attr('disabled', 'disabled');
95
+ } else {
96
+ this.$nextpagebtn.removeAttr('disabled');
97
+ }
98
+ },
99
+
100
+ renderData: function () {
101
+ var self = this;
102
+
103
+ this.$tbody.html(this.placeholderRowHTML(this.options.loadingHTML));
104
+ this.$footerchildren.hide();
105
+
106
+ this.options.dataSource.data(this.options.dataOptions, function (data) {
107
+ var itemdesc = (data.count === 1) ? self.options.itemText : self.options.itemsText;
108
+ var rowHTML = '';
109
+
110
+ self.$footerchildren.toggle(data.count > 0);
111
+
112
+ self.$pageinput.val(data.page);
113
+ self.$pageslabel.text(data.pages);
114
+ self.$countlabel.text(data.count + ' ' + itemdesc);
115
+ self.$startlabel.text(data.start);
116
+ self.$endlabel.text(data.end);
117
+
118
+ self.updatePageDropdown(data);
119
+ self.updatePageButtons(data);
120
+
121
+ $.each(data.data, function (index, row) {
122
+ rowHTML += '<tr>';
123
+ $.each(self.columns, function (index, column) {
124
+ rowHTML += '<td>' + row[column.property] + '</td>';
125
+ });
126
+ rowHTML += '</tr>';
127
+ });
128
+
129
+ if (!rowHTML) rowHTML = self.placeholderRowHTML('0 ' + self.options.itemsText);
130
+
131
+ self.$tbody.html(rowHTML);
132
+ self.$element.trigger('loaded');
133
+ });
134
+
135
+ },
136
+
137
+ placeholderRowHTML: function (content) {
138
+ return '<tr><td style="text-align:center;padding:20px;" colspan="' +
139
+ this.columns.length + '">' + content + '</td></tr>';
140
+ },
141
+
142
+ headerClicked: function (e) {
143
+ var $target = $(e.target);
144
+ if (!$target.hasClass('sortable')) return;
145
+
146
+ var direction = this.options.dataOptions.sortDirection;
147
+ var sort = this.options.dataOptions.sortProperty;
148
+ var property = $target.data('property');
149
+
150
+ if (sort === property) {
151
+ this.options.dataOptions.sortDirection = (direction === 'asc') ? 'desc' : 'asc';
152
+ } else {
153
+ this.options.dataOptions.sortDirection = 'asc';
154
+ this.options.dataOptions.sortProperty = property;
155
+ }
156
+
157
+ this.options.dataOptions.pageIndex = 0;
158
+ this.updateColumns($target, this.options.dataOptions.sortDirection);
159
+ this.renderData();
160
+ },
161
+
162
+ pagesizeChanged: function (e) {
163
+ this.options.dataOptions.pageSize = parseInt($(e.target).val(), 10);
164
+ this.options.dataOptions.pageIndex = 0;
165
+ this.renderData();
166
+ },
167
+
168
+ pageChanged: function (e) {
169
+ this.options.dataOptions.pageIndex = parseInt($(e.target).val(), 10) - 1;
170
+ this.renderData();
171
+ },
172
+
173
+ searchChanged: function (e, search) {
174
+ this.options.dataOptions.search = search;
175
+ this.options.dataOptions.pageIndex = 0;
176
+ this.renderData();
177
+ },
178
+
179
+ previous: function () {
180
+ this.options.dataOptions.pageIndex--;
181
+ this.renderData();
182
+ },
183
+
184
+ next: function () {
185
+ this.options.dataOptions.pageIndex++;
186
+ this.renderData();
187
+ }
188
+
189
+ };
190
+
191
+
192
+ // DATAGRID PLUGIN DEFINITION
193
+
194
+ $.fn.datagrid = function (option) {
195
+ return this.each(function () {
196
+ var $this = $(this);
197
+ var data = $this.data('datagrid');
198
+ var options = typeof option === 'object' && option;
199
+
200
+ if (!data) $this.data('datagrid', (data = new Datagrid(this, options)));
201
+ if (typeof option === 'string') data[option]();
202
+ });
203
+ };
204
+
205
+ $.fn.datagrid.defaults = {
206
+ dataOptions: { pageIndex: 0, pageSize: 10 },
207
+ loadingHTML: '<div class="progress progress-striped active" style="width:50%;margin:auto;"><div class="bar" style="width:100%;"></div></div>',
208
+ itemsText: 'items',
209
+ itemText: 'item'
210
+ };
211
+
212
+ $.fn.datagrid.Constructor = Datagrid;
213
+
214
+ }(window.jQuery);
@@ -0,0 +1,3190 @@
1
+
2
+ /**
3
+ * almond 0.1.4 Copyright (c) 2011, The Dojo Foundation All Rights Reserved.
4
+ * Available via the MIT or new BSD license.
5
+ * see: http://github.com/jrburke/almond for details
6
+ */
7
+ //Going sloppy to avoid 'use strict' string cost, but strict practices should
8
+ //be followed.
9
+ /*jslint sloppy: true */
10
+ /*global setTimeout: false */
11
+
12
+ var requirejs, require, define;
13
+ (function (undef) {
14
+ var main, req,
15
+ defined = {},
16
+ waiting = {},
17
+ config = {},
18
+ defining = {},
19
+ aps = [].slice;
20
+
21
+ /**
22
+ * Given a relative module name, like ./something, normalize it to
23
+ * a real name that can be mapped to a path.
24
+ * @param {String} name the relative name
25
+ * @param {String} baseName a real name that the name arg is relative
26
+ * to.
27
+ * @returns {String} normalized name
28
+ */
29
+ function normalize(name, baseName) {
30
+ var nameParts, nameSegment, mapValue, foundMap,
31
+ foundI, foundStarMap, starI, i, j, part,
32
+ baseParts = baseName && baseName.split("/"),
33
+ map = config.map,
34
+ starMap = (map && map['*']) || {};
35
+
36
+ //Adjust any relative paths.
37
+ if (name && name.charAt(0) === ".") {
38
+ //If have a base name, try to normalize against it,
39
+ //otherwise, assume it is a top-level require that will
40
+ //be relative to baseUrl in the end.
41
+ if (baseName) {
42
+ //Convert baseName to array, and lop off the last part,
43
+ //so that . matches that "directory" and not name of the baseName's
44
+ //module. For instance, baseName of "one/two/three", maps to
45
+ //"one/two/three.js", but we want the directory, "one/two" for
46
+ //this normalization.
47
+ baseParts = baseParts.slice(0, baseParts.length - 1);
48
+
49
+ name = baseParts.concat(name.split("/"));
50
+
51
+ //start trimDots
52
+ for (i = 0; i < name.length; i += 1) {
53
+ part = name[i];
54
+ if (part === ".") {
55
+ name.splice(i, 1);
56
+ i -= 1;
57
+ } else if (part === "..") {
58
+ if (i === 1 && (name[2] === '..' || name[0] === '..')) {
59
+ //End of the line. Keep at least one non-dot
60
+ //path segment at the front so it can be mapped
61
+ //correctly to disk. Otherwise, there is likely
62
+ //no path mapping for a path starting with '..'.
63
+ //This can still fail, but catches the most reasonable
64
+ //uses of ..
65
+ break;
66
+ } else if (i > 0) {
67
+ name.splice(i - 1, 2);
68
+ i -= 2;
69
+ }
70
+ }
71
+ }
72
+ //end trimDots
73
+
74
+ name = name.join("/");
75
+ }
76
+ }
77
+
78
+ //Apply map config if available.
79
+ if ((baseParts || starMap) && map) {
80
+ nameParts = name.split('/');
81
+
82
+ for (i = nameParts.length; i > 0; i -= 1) {
83
+ nameSegment = nameParts.slice(0, i).join("/");
84
+
85
+ if (baseParts) {
86
+ //Find the longest baseName segment match in the config.
87
+ //So, do joins on the biggest to smallest lengths of baseParts.
88
+ for (j = baseParts.length; j > 0; j -= 1) {
89
+ mapValue = map[baseParts.slice(0, j).join('/')];
90
+
91
+ //baseName segment has config, find if it has one for
92
+ //this name.
93
+ if (mapValue) {
94
+ mapValue = mapValue[nameSegment];
95
+ if (mapValue) {
96
+ //Match, update name to the new value.
97
+ foundMap = mapValue;
98
+ foundI = i;
99
+ break;
100
+ }
101
+ }
102
+ }
103
+ }
104
+
105
+ if (foundMap) {
106
+ break;
107
+ }
108
+
109
+ //Check for a star map match, but just hold on to it,
110
+ //if there is a shorter segment match later in a matching
111
+ //config, then favor over this star map.
112
+ if (!foundStarMap && starMap && starMap[nameSegment]) {
113
+ foundStarMap = starMap[nameSegment];
114
+ starI = i;
115
+ }
116
+ }
117
+
118
+ if (!foundMap && foundStarMap) {
119
+ foundMap = foundStarMap;
120
+ foundI = starI;
121
+ }
122
+
123
+ if (foundMap) {
124
+ nameParts.splice(0, foundI, foundMap);
125
+ name = nameParts.join('/');
126
+ }
127
+ }
128
+
129
+ return name;
130
+ }
131
+
132
+ function makeRequire(relName, forceSync) {
133
+ return function () {
134
+ //A version of a require function that passes a moduleName
135
+ //value for items that may need to
136
+ //look up paths relative to the moduleName
137
+ return req.apply(undef, aps.call(arguments, 0).concat([relName, forceSync]));
138
+ };
139
+ }
140
+
141
+ function makeNormalize(relName) {
142
+ return function (name) {
143
+ return normalize(name, relName);
144
+ };
145
+ }
146
+
147
+ function makeLoad(depName) {
148
+ return function (value) {
149
+ defined[depName] = value;
150
+ };
151
+ }
152
+
153
+ function callDep(name) {
154
+ if (waiting.hasOwnProperty(name)) {
155
+ var args = waiting[name];
156
+ delete waiting[name];
157
+ defining[name] = true;
158
+ main.apply(undef, args);
159
+ }
160
+
161
+ if (!defined.hasOwnProperty(name)) {
162
+ throw new Error('No ' + name);
163
+ }
164
+ return defined[name];
165
+ }
166
+
167
+ /**
168
+ * Makes a name map, normalizing the name, and using a plugin
169
+ * for normalization if necessary. Grabs a ref to plugin
170
+ * too, as an optimization.
171
+ */
172
+ function makeMap(name, relName) {
173
+ var prefix, plugin,
174
+ index = name.indexOf('!');
175
+
176
+ if (index !== -1) {
177
+ prefix = normalize(name.slice(0, index), relName);
178
+ name = name.slice(index + 1);
179
+ plugin = callDep(prefix);
180
+
181
+ //Normalize according
182
+ if (plugin && plugin.normalize) {
183
+ name = plugin.normalize(name, makeNormalize(relName));
184
+ } else {
185
+ name = normalize(name, relName);
186
+ }
187
+ } else {
188
+ name = normalize(name, relName);
189
+ }
190
+
191
+ //Using ridiculous property names for space reasons
192
+ return {
193
+ f: prefix ? prefix + '!' + name : name, //fullName
194
+ n: name,
195
+ p: plugin
196
+ };
197
+ }
198
+
199
+ function makeConfig(name) {
200
+ return function () {
201
+ return (config && config.config && config.config[name]) || {};
202
+ };
203
+ }
204
+
205
+ main = function (name, deps, callback, relName) {
206
+ var cjsModule, depName, ret, map, i,
207
+ args = [],
208
+ usingExports;
209
+
210
+ //Use name if no relName
211
+ relName = relName || name;
212
+
213
+ //Call the callback to define the module, if necessary.
214
+ if (typeof callback === 'function') {
215
+
216
+ //Pull out the defined dependencies and pass the ordered
217
+ //values to the callback.
218
+ //Default to [require, exports, module] if no deps
219
+ deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;
220
+ for (i = 0; i < deps.length; i += 1) {
221
+ map = makeMap(deps[i], relName);
222
+ depName = map.f;
223
+
224
+ //Fast path CommonJS standard dependencies.
225
+ if (depName === "require") {
226
+ args[i] = makeRequire(name);
227
+ } else if (depName === "exports") {
228
+ //CommonJS module spec 1.1
229
+ args[i] = defined[name] = {};
230
+ usingExports = true;
231
+ } else if (depName === "module") {
232
+ //CommonJS module spec 1.1
233
+ cjsModule = args[i] = {
234
+ id: name,
235
+ uri: '',
236
+ exports: defined[name],
237
+ config: makeConfig(name)
238
+ };
239
+ } else if (defined.hasOwnProperty(depName) || waiting.hasOwnProperty(depName)) {
240
+ args[i] = callDep(depName);
241
+ } else if (map.p) {
242
+ map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
243
+ args[i] = defined[depName];
244
+ } else if (!defining[depName]) {
245
+ throw new Error(name + ' missing ' + depName);
246
+ }
247
+ }
248
+
249
+ ret = callback.apply(defined[name], args);
250
+
251
+ if (name) {
252
+ //If setting exports via "module" is in play,
253
+ //favor that over return value and exports. After that,
254
+ //favor a non-undefined return value over exports use.
255
+ if (cjsModule && cjsModule.exports !== undef &&
256
+ cjsModule.exports !== defined[name]) {
257
+ defined[name] = cjsModule.exports;
258
+ } else if (ret !== undef || !usingExports) {
259
+ //Use the return value from the function.
260
+ defined[name] = ret;
261
+ }
262
+ }
263
+ } else if (name) {
264
+ //May just be an object definition for the module. Only
265
+ //worry about defining if have a module name.
266
+ defined[name] = callback;
267
+ }
268
+ };
269
+
270
+ requirejs = require = req = function (deps, callback, relName, forceSync, alt) {
271
+ if (typeof deps === "string") {
272
+ //Just return the module wanted. In this scenario, the
273
+ //deps arg is the module name, and second arg (if passed)
274
+ //is just the relName.
275
+ //Normalize module name, if it contains . or ..
276
+ return callDep(makeMap(deps, callback).f);
277
+ } else if (!deps.splice) {
278
+ //deps is a config object, not an array.
279
+ config = deps;
280
+ if (callback.splice) {
281
+ //callback is an array, which means it is a dependency list.
282
+ //Adjust args if there are dependencies
283
+ deps = callback;
284
+ callback = relName;
285
+ relName = null;
286
+ } else {
287
+ deps = undef;
288
+ }
289
+ }
290
+
291
+ //Support require(['a'])
292
+ callback = callback || function () {};
293
+
294
+ //If relName is a function, it is an errback handler,
295
+ //so remove it.
296
+ if (typeof relName === 'function') {
297
+ relName = forceSync;
298
+ forceSync = alt;
299
+ }
300
+
301
+ //Simulate async callback;
302
+ if (forceSync) {
303
+ main(undef, deps, callback, relName);
304
+ } else {
305
+ setTimeout(function () {
306
+ main(undef, deps, callback, relName);
307
+ }, 15);
308
+ }
309
+
310
+ return req;
311
+ };
312
+
313
+ /**
314
+ * Just drops the config on the floor, but returns req in case
315
+ * the config return value is used.
316
+ */
317
+ req.config = function (cfg) {
318
+ config = cfg;
319
+ return req;
320
+ };
321
+
322
+ define = function (name, deps, callback) {
323
+
324
+ //This module may not have dependencies
325
+ if (!deps.splice) {
326
+ //deps is not an array, so probably means
327
+ //an object literal or factory function for
328
+ //the value. Adjust args.
329
+ callback = deps;
330
+ deps = [];
331
+ }
332
+
333
+ waiting[name] = [name, deps, callback];
334
+ };
335
+
336
+ define.amd = {
337
+ jQuery: true
338
+ };
339
+ }());
340
+
341
+ define("almond", function(){});
342
+
343
+ //Wrapped in an outer function to preserve global this
344
+ (function (root) { var amdExports; define('bootstrap/bootstrap-transition',['jquery'], function () { (function () {
345
+
346
+ /* ===================================================
347
+ * bootstrap-transition.js v2.1.1
348
+ * http://twitter.github.com/bootstrap/javascript.html#transitions
349
+ * ===================================================
350
+ * Copyright 2012 Twitter, Inc.
351
+ *
352
+ * Licensed under the Apache License, Version 2.0 (the "License");
353
+ * you may not use this file except in compliance with the License.
354
+ * You may obtain a copy of the License at
355
+ *
356
+ * http://www.apache.org/licenses/LICENSE-2.0
357
+ *
358
+ * Unless required by applicable law or agreed to in writing, software
359
+ * distributed under the License is distributed on an "AS IS" BASIS,
360
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
361
+ * See the License for the specific language governing permissions and
362
+ * limitations under the License.
363
+ * ========================================================== */
364
+
365
+
366
+ !function ($) {
367
+
368
+ $(function () {
369
+
370
+ // jshint ;_;
371
+
372
+
373
+ /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
374
+ * ======================================================= */
375
+
376
+ $.support.transition = (function () {
377
+
378
+ var transitionEnd = (function () {
379
+
380
+ var el = document.createElement('bootstrap')
381
+ , transEndEventNames = {
382
+ 'WebkitTransition' : 'webkitTransitionEnd'
383
+ , 'MozTransition' : 'transitionend'
384
+ , 'OTransition' : 'oTransitionEnd otransitionend'
385
+ , 'transition' : 'transitionend'
386
+ }
387
+ , name
388
+
389
+ for (name in transEndEventNames){
390
+ if (el.style[name] !== undefined) {
391
+ return transEndEventNames[name]
392
+ }
393
+ }
394
+
395
+ }())
396
+
397
+ return transitionEnd && {
398
+ end: transitionEnd
399
+ }
400
+
401
+ })()
402
+
403
+ })
404
+
405
+ }(window.jQuery);
406
+
407
+
408
+ }.call(root));
409
+ return amdExports;
410
+ }); }(this));
411
+
412
+ //Wrapped in an outer function to preserve global this
413
+ (function (root) { var amdExports; define('bootstrap/bootstrap-affix',['bootstrap/bootstrap-transition'], function () { (function () {
414
+
415
+ /* ==========================================================
416
+ * bootstrap-affix.js v2.1.1
417
+ * http://twitter.github.com/bootstrap/javascript.html#affix
418
+ * ==========================================================
419
+ * Copyright 2012 Twitter, Inc.
420
+ *
421
+ * Licensed under the Apache License, Version 2.0 (the "License");
422
+ * you may not use this file except in compliance with the License.
423
+ * You may obtain a copy of the License at
424
+ *
425
+ * http://www.apache.org/licenses/LICENSE-2.0
426
+ *
427
+ * Unless required by applicable law or agreed to in writing, software
428
+ * distributed under the License is distributed on an "AS IS" BASIS,
429
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
430
+ * See the License for the specific language governing permissions and
431
+ * limitations under the License.
432
+ * ========================================================== */
433
+
434
+
435
+ !function ($) {
436
+
437
+ // jshint ;_;
438
+
439
+
440
+ /* AFFIX CLASS DEFINITION
441
+ * ====================== */
442
+
443
+ var Affix = function (element, options) {
444
+ this.options = $.extend({}, $.fn.affix.defaults, options)
445
+ this.$window = $(window).on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
446
+ this.$element = $(element)
447
+ this.checkPosition()
448
+ }
449
+
450
+ Affix.prototype.checkPosition = function () {
451
+ if (!this.$element.is(':visible')) return
452
+
453
+ var scrollHeight = $(document).height()
454
+ , scrollTop = this.$window.scrollTop()
455
+ , position = this.$element.offset()
456
+ , offset = this.options.offset
457
+ , offsetBottom = offset.bottom
458
+ , offsetTop = offset.top
459
+ , reset = 'affix affix-top affix-bottom'
460
+ , affix
461
+
462
+ if (typeof offset != 'object') offsetBottom = offsetTop = offset
463
+ if (typeof offsetTop == 'function') offsetTop = offset.top()
464
+ if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
465
+
466
+ affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?
467
+ false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
468
+ 'bottom' : offsetTop != null && scrollTop <= offsetTop ?
469
+ 'top' : false
470
+
471
+ if (this.affixed === affix) return
472
+
473
+ this.affixed = affix
474
+ this.unpin = affix == 'bottom' ? position.top - scrollTop : null
475
+
476
+ this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : ''))
477
+ }
478
+
479
+
480
+ /* AFFIX PLUGIN DEFINITION
481
+ * ======================= */
482
+
483
+ $.fn.affix = function (option) {
484
+ return this.each(function () {
485
+ var $this = $(this)
486
+ , data = $this.data('affix')
487
+ , options = typeof option == 'object' && option
488
+ if (!data) $this.data('affix', (data = new Affix(this, options)))
489
+ if (typeof option == 'string') data[option]()
490
+ })
491
+ }
492
+
493
+ $.fn.affix.Constructor = Affix
494
+
495
+ $.fn.affix.defaults = {
496
+ offset: 0
497
+ }
498
+
499
+
500
+ /* AFFIX DATA-API
501
+ * ============== */
502
+
503
+ $(window).on('load', function () {
504
+ $('[data-spy="affix"]').each(function () {
505
+ var $spy = $(this)
506
+ , data = $spy.data()
507
+
508
+ data.offset = data.offset || {}
509
+
510
+ data.offsetBottom && (data.offset.bottom = data.offsetBottom)
511
+ data.offsetTop && (data.offset.top = data.offsetTop)
512
+
513
+ $spy.affix(data)
514
+ })
515
+ })
516
+
517
+
518
+ }(window.jQuery);
519
+
520
+
521
+ }.call(root));
522
+ return amdExports;
523
+ }); }(this));
524
+
525
+ //Wrapped in an outer function to preserve global this
526
+ (function (root) { var amdExports; define('bootstrap/bootstrap-alert',['bootstrap/bootstrap-transition'], function () { (function () {
527
+
528
+ /* ==========================================================
529
+ * bootstrap-alert.js v2.1.1
530
+ * http://twitter.github.com/bootstrap/javascript.html#alerts
531
+ * ==========================================================
532
+ * Copyright 2012 Twitter, Inc.
533
+ *
534
+ * Licensed under the Apache License, Version 2.0 (the "License");
535
+ * you may not use this file except in compliance with the License.
536
+ * You may obtain a copy of the License at
537
+ *
538
+ * http://www.apache.org/licenses/LICENSE-2.0
539
+ *
540
+ * Unless required by applicable law or agreed to in writing, software
541
+ * distributed under the License is distributed on an "AS IS" BASIS,
542
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
543
+ * See the License for the specific language governing permissions and
544
+ * limitations under the License.
545
+ * ========================================================== */
546
+
547
+
548
+ !function ($) {
549
+
550
+ // jshint ;_;
551
+
552
+
553
+ /* ALERT CLASS DEFINITION
554
+ * ====================== */
555
+
556
+ var dismiss = '[data-dismiss="alert"]'
557
+ , Alert = function (el) {
558
+ $(el).on('click', dismiss, this.close)
559
+ }
560
+
561
+ Alert.prototype.close = function (e) {
562
+ var $this = $(this)
563
+ , selector = $this.attr('data-target')
564
+ , $parent
565
+
566
+ if (!selector) {
567
+ selector = $this.attr('href')
568
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
569
+ }
570
+
571
+ $parent = $(selector)
572
+
573
+ e && e.preventDefault()
574
+
575
+ $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
576
+
577
+ $parent.trigger(e = $.Event('close'))
578
+
579
+ if (e.isDefaultPrevented()) return
580
+
581
+ $parent.removeClass('in')
582
+
583
+ function removeElement() {
584
+ $parent
585
+ .trigger('closed')
586
+ .remove()
587
+ }
588
+
589
+ $.support.transition && $parent.hasClass('fade') ?
590
+ $parent.on($.support.transition.end, removeElement) :
591
+ removeElement()
592
+ }
593
+
594
+
595
+ /* ALERT PLUGIN DEFINITION
596
+ * ======================= */
597
+
598
+ $.fn.alert = function (option) {
599
+ return this.each(function () {
600
+ var $this = $(this)
601
+ , data = $this.data('alert')
602
+ if (!data) $this.data('alert', (data = new Alert(this)))
603
+ if (typeof option == 'string') data[option].call($this)
604
+ })
605
+ }
606
+
607
+ $.fn.alert.Constructor = Alert
608
+
609
+
610
+ /* ALERT DATA-API
611
+ * ============== */
612
+
613
+ $(function () {
614
+ $('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
615
+ })
616
+
617
+ }(window.jQuery);
618
+
619
+
620
+ }.call(root));
621
+ return amdExports;
622
+ }); }(this));
623
+
624
+ //Wrapped in an outer function to preserve global this
625
+ (function (root) { var amdExports; define('bootstrap/bootstrap-button',['bootstrap/bootstrap-transition'], function () { (function () {
626
+
627
+ /* ============================================================
628
+ * bootstrap-button.js v2.1.1
629
+ * http://twitter.github.com/bootstrap/javascript.html#buttons
630
+ * ============================================================
631
+ * Copyright 2012 Twitter, Inc.
632
+ *
633
+ * Licensed under the Apache License, Version 2.0 (the "License");
634
+ * you may not use this file except in compliance with the License.
635
+ * You may obtain a copy of the License at
636
+ *
637
+ * http://www.apache.org/licenses/LICENSE-2.0
638
+ *
639
+ * Unless required by applicable law or agreed to in writing, software
640
+ * distributed under the License is distributed on an "AS IS" BASIS,
641
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
642
+ * See the License for the specific language governing permissions and
643
+ * limitations under the License.
644
+ * ============================================================ */
645
+
646
+
647
+ !function ($) {
648
+
649
+ // jshint ;_;
650
+
651
+
652
+ /* BUTTON PUBLIC CLASS DEFINITION
653
+ * ============================== */
654
+
655
+ var Button = function (element, options) {
656
+ this.$element = $(element)
657
+ this.options = $.extend({}, $.fn.button.defaults, options)
658
+ }
659
+
660
+ Button.prototype.setState = function (state) {
661
+ var d = 'disabled'
662
+ , $el = this.$element
663
+ , data = $el.data()
664
+ , val = $el.is('input') ? 'val' : 'html'
665
+
666
+ state = state + 'Text'
667
+ data.resetText || $el.data('resetText', $el[val]())
668
+
669
+ $el[val](data[state] || this.options[state])
670
+
671
+ // push to event loop to allow forms to submit
672
+ setTimeout(function () {
673
+ state == 'loadingText' ?
674
+ $el.addClass(d).attr(d, d) :
675
+ $el.removeClass(d).removeAttr(d)
676
+ }, 0)
677
+ }
678
+
679
+ Button.prototype.toggle = function () {
680
+ var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
681
+
682
+ $parent && $parent
683
+ .find('.active')
684
+ .removeClass('active')
685
+
686
+ this.$element.toggleClass('active')
687
+ }
688
+
689
+
690
+ /* BUTTON PLUGIN DEFINITION
691
+ * ======================== */
692
+
693
+ $.fn.button = function (option) {
694
+ return this.each(function () {
695
+ var $this = $(this)
696
+ , data = $this.data('button')
697
+ , options = typeof option == 'object' && option
698
+ if (!data) $this.data('button', (data = new Button(this, options)))
699
+ if (option == 'toggle') data.toggle()
700
+ else if (option) data.setState(option)
701
+ })
702
+ }
703
+
704
+ $.fn.button.defaults = {
705
+ loadingText: 'loading...'
706
+ }
707
+
708
+ $.fn.button.Constructor = Button
709
+
710
+
711
+ /* BUTTON DATA-API
712
+ * =============== */
713
+
714
+ $(function () {
715
+ $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
716
+ var $btn = $(e.target)
717
+ if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
718
+ $btn.button('toggle')
719
+ })
720
+ })
721
+
722
+ }(window.jQuery);
723
+
724
+
725
+ }.call(root));
726
+ return amdExports;
727
+ }); }(this));
728
+
729
+ //Wrapped in an outer function to preserve global this
730
+ (function (root) { var amdExports; define('bootstrap/bootstrap-carousel',['bootstrap/bootstrap-transition'], function () { (function () {
731
+
732
+ /* ==========================================================
733
+ * bootstrap-carousel.js v2.1.1
734
+ * http://twitter.github.com/bootstrap/javascript.html#carousel
735
+ * ==========================================================
736
+ * Copyright 2012 Twitter, Inc.
737
+ *
738
+ * Licensed under the Apache License, Version 2.0 (the "License");
739
+ * you may not use this file except in compliance with the License.
740
+ * You may obtain a copy of the License at
741
+ *
742
+ * http://www.apache.org/licenses/LICENSE-2.0
743
+ *
744
+ * Unless required by applicable law or agreed to in writing, software
745
+ * distributed under the License is distributed on an "AS IS" BASIS,
746
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
747
+ * See the License for the specific language governing permissions and
748
+ * limitations under the License.
749
+ * ========================================================== */
750
+
751
+
752
+ !function ($) {
753
+
754
+ // jshint ;_;
755
+
756
+
757
+ /* CAROUSEL CLASS DEFINITION
758
+ * ========================= */
759
+
760
+ var Carousel = function (element, options) {
761
+ this.$element = $(element)
762
+ this.options = options
763
+ this.options.slide && this.slide(this.options.slide)
764
+ this.options.pause == 'hover' && this.$element
765
+ .on('mouseenter', $.proxy(this.pause, this))
766
+ .on('mouseleave', $.proxy(this.cycle, this))
767
+ }
768
+
769
+ Carousel.prototype = {
770
+
771
+ cycle: function (e) {
772
+ if (!e) this.paused = false
773
+ this.options.interval
774
+ && !this.paused
775
+ && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
776
+ return this
777
+ }
778
+
779
+ , to: function (pos) {
780
+ var $active = this.$element.find('.item.active')
781
+ , children = $active.parent().children()
782
+ , activePos = children.index($active)
783
+ , that = this
784
+
785
+ if (pos > (children.length - 1) || pos < 0) return
786
+
787
+ if (this.sliding) {
788
+ return this.$element.one('slid', function () {
789
+ that.to(pos)
790
+ })
791
+ }
792
+
793
+ if (activePos == pos) {
794
+ return this.pause().cycle()
795
+ }
796
+
797
+ return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
798
+ }
799
+
800
+ , pause: function (e) {
801
+ if (!e) this.paused = true
802
+ if (this.$element.find('.next, .prev').length && $.support.transition.end) {
803
+ this.$element.trigger($.support.transition.end)
804
+ this.cycle()
805
+ }
806
+ clearInterval(this.interval)
807
+ this.interval = null
808
+ return this
809
+ }
810
+
811
+ , next: function () {
812
+ if (this.sliding) return
813
+ return this.slide('next')
814
+ }
815
+
816
+ , prev: function () {
817
+ if (this.sliding) return
818
+ return this.slide('prev')
819
+ }
820
+
821
+ , slide: function (type, next) {
822
+ var $active = this.$element.find('.item.active')
823
+ , $next = next || $active[type]()
824
+ , isCycling = this.interval
825
+ , direction = type == 'next' ? 'left' : 'right'
826
+ , fallback = type == 'next' ? 'first' : 'last'
827
+ , that = this
828
+ , e = $.Event('slide', {
829
+ relatedTarget: $next[0]
830
+ })
831
+
832
+ this.sliding = true
833
+
834
+ isCycling && this.pause()
835
+
836
+ $next = $next.length ? $next : this.$element.find('.item')[fallback]()
837
+
838
+ if ($next.hasClass('active')) return
839
+
840
+ if ($.support.transition && this.$element.hasClass('slide')) {
841
+ this.$element.trigger(e)
842
+ if (e.isDefaultPrevented()) return
843
+ $next.addClass(type)
844
+ $next[0].offsetWidth // force reflow
845
+ $active.addClass(direction)
846
+ $next.addClass(direction)
847
+ this.$element.one($.support.transition.end, function () {
848
+ $next.removeClass([type, direction].join(' ')).addClass('active')
849
+ $active.removeClass(['active', direction].join(' '))
850
+ that.sliding = false
851
+ setTimeout(function () { that.$element.trigger('slid') }, 0)
852
+ })
853
+ } else {
854
+ this.$element.trigger(e)
855
+ if (e.isDefaultPrevented()) return
856
+ $active.removeClass('active')
857
+ $next.addClass('active')
858
+ this.sliding = false
859
+ this.$element.trigger('slid')
860
+ }
861
+
862
+ isCycling && this.cycle()
863
+
864
+ return this
865
+ }
866
+
867
+ }
868
+
869
+
870
+ /* CAROUSEL PLUGIN DEFINITION
871
+ * ========================== */
872
+
873
+ $.fn.carousel = function (option) {
874
+ return this.each(function () {
875
+ var $this = $(this)
876
+ , data = $this.data('carousel')
877
+ , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
878
+ , action = typeof option == 'string' ? option : options.slide
879
+ if (!data) $this.data('carousel', (data = new Carousel(this, options)))
880
+ if (typeof option == 'number') data.to(option)
881
+ else if (action) data[action]()
882
+ else if (options.interval) data.cycle()
883
+ })
884
+ }
885
+
886
+ $.fn.carousel.defaults = {
887
+ interval: 5000
888
+ , pause: 'hover'
889
+ }
890
+
891
+ $.fn.carousel.Constructor = Carousel
892
+
893
+
894
+ /* CAROUSEL DATA-API
895
+ * ================= */
896
+
897
+ $(function () {
898
+ $('body').on('click.carousel.data-api', '[data-slide]', function ( e ) {
899
+ var $this = $(this), href
900
+ , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
901
+ , options = !$target.data('modal') && $.extend({}, $target.data(), $this.data())
902
+ $target.carousel(options)
903
+ e.preventDefault()
904
+ })
905
+ })
906
+
907
+ }(window.jQuery);
908
+
909
+
910
+ }.call(root));
911
+ return amdExports;
912
+ }); }(this));
913
+
914
+ //Wrapped in an outer function to preserve global this
915
+ (function (root) { var amdExports; define('bootstrap/bootstrap-collapse',['bootstrap/bootstrap-transition'], function () { (function () {
916
+
917
+ /* =============================================================
918
+ * bootstrap-collapse.js v2.1.1
919
+ * http://twitter.github.com/bootstrap/javascript.html#collapse
920
+ * =============================================================
921
+ * Copyright 2012 Twitter, Inc.
922
+ *
923
+ * Licensed under the Apache License, Version 2.0 (the "License");
924
+ * you may not use this file except in compliance with the License.
925
+ * You may obtain a copy of the License at
926
+ *
927
+ * http://www.apache.org/licenses/LICENSE-2.0
928
+ *
929
+ * Unless required by applicable law or agreed to in writing, software
930
+ * distributed under the License is distributed on an "AS IS" BASIS,
931
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
932
+ * See the License for the specific language governing permissions and
933
+ * limitations under the License.
934
+ * ============================================================ */
935
+
936
+
937
+ !function ($) {
938
+
939
+ // jshint ;_;
940
+
941
+
942
+ /* COLLAPSE PUBLIC CLASS DEFINITION
943
+ * ================================ */
944
+
945
+ var Collapse = function (element, options) {
946
+ this.$element = $(element)
947
+ this.options = $.extend({}, $.fn.collapse.defaults, options)
948
+
949
+ if (this.options.parent) {
950
+ this.$parent = $(this.options.parent)
951
+ }
952
+
953
+ this.options.toggle && this.toggle()
954
+ }
955
+
956
+ Collapse.prototype = {
957
+
958
+ constructor: Collapse
959
+
960
+ , dimension: function () {
961
+ var hasWidth = this.$element.hasClass('width')
962
+ return hasWidth ? 'width' : 'height'
963
+ }
964
+
965
+ , show: function () {
966
+ var dimension
967
+ , scroll
968
+ , actives
969
+ , hasData
970
+
971
+ if (this.transitioning) return
972
+
973
+ dimension = this.dimension()
974
+ scroll = $.camelCase(['scroll', dimension].join('-'))
975
+ actives = this.$parent && this.$parent.find('> .accordion-group > .in')
976
+
977
+ if (actives && actives.length) {
978
+ hasData = actives.data('collapse')
979
+ if (hasData && hasData.transitioning) return
980
+ actives.collapse('hide')
981
+ hasData || actives.data('collapse', null)
982
+ }
983
+
984
+ this.$element[dimension](0)
985
+ this.transition('addClass', $.Event('show'), 'shown')
986
+ $.support.transition && this.$element[dimension](this.$element[0][scroll])
987
+ }
988
+
989
+ , hide: function () {
990
+ var dimension
991
+ if (this.transitioning) return
992
+ dimension = this.dimension()
993
+ this.reset(this.$element[dimension]())
994
+ this.transition('removeClass', $.Event('hide'), 'hidden')
995
+ this.$element[dimension](0)
996
+ }
997
+
998
+ , reset: function (size) {
999
+ var dimension = this.dimension()
1000
+
1001
+ this.$element
1002
+ .removeClass('collapse')
1003
+ [dimension](size || 'auto')
1004
+ [0].offsetWidth
1005
+
1006
+ this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
1007
+
1008
+ return this
1009
+ }
1010
+
1011
+ , transition: function (method, startEvent, completeEvent) {
1012
+ var that = this
1013
+ , complete = function () {
1014
+ if (startEvent.type == 'show') that.reset()
1015
+ that.transitioning = 0
1016
+ that.$element.trigger(completeEvent)
1017
+ }
1018
+
1019
+ this.$element.trigger(startEvent)
1020
+
1021
+ if (startEvent.isDefaultPrevented()) return
1022
+
1023
+ this.transitioning = 1
1024
+
1025
+ this.$element[method]('in')
1026
+
1027
+ $.support.transition && this.$element.hasClass('collapse') ?
1028
+ this.$element.one($.support.transition.end, complete) :
1029
+ complete()
1030
+ }
1031
+
1032
+ , toggle: function () {
1033
+ this[this.$element.hasClass('in') ? 'hide' : 'show']()
1034
+ }
1035
+
1036
+ }
1037
+
1038
+
1039
+ /* COLLAPSIBLE PLUGIN DEFINITION
1040
+ * ============================== */
1041
+
1042
+ $.fn.collapse = function (option) {
1043
+ return this.each(function () {
1044
+ var $this = $(this)
1045
+ , data = $this.data('collapse')
1046
+ , options = typeof option == 'object' && option
1047
+ if (!data) $this.data('collapse', (data = new Collapse(this, options)))
1048
+ if (typeof option == 'string') data[option]()
1049
+ })
1050
+ }
1051
+
1052
+ $.fn.collapse.defaults = {
1053
+ toggle: true
1054
+ }
1055
+
1056
+ $.fn.collapse.Constructor = Collapse
1057
+
1058
+
1059
+ /* COLLAPSIBLE DATA-API
1060
+ * ==================== */
1061
+
1062
+ $(function () {
1063
+ $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
1064
+ var $this = $(this), href
1065
+ , target = $this.attr('data-target')
1066
+ || e.preventDefault()
1067
+ || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
1068
+ , option = $(target).data('collapse') ? 'toggle' : $this.data()
1069
+ $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
1070
+ $(target).collapse(option)
1071
+ })
1072
+ })
1073
+
1074
+ }(window.jQuery);
1075
+
1076
+
1077
+ }.call(root));
1078
+ return amdExports;
1079
+ }); }(this));
1080
+
1081
+ //Wrapped in an outer function to preserve global this
1082
+ (function (root) { var amdExports; define('bootstrap/bootstrap-dropdown',['bootstrap/bootstrap-transition'], function () { (function () {
1083
+
1084
+ /* ============================================================
1085
+ * bootstrap-dropdown.js v2.1.1
1086
+ * http://twitter.github.com/bootstrap/javascript.html#dropdowns
1087
+ * ============================================================
1088
+ * Copyright 2012 Twitter, Inc.
1089
+ *
1090
+ * Licensed under the Apache License, Version 2.0 (the "License");
1091
+ * you may not use this file except in compliance with the License.
1092
+ * You may obtain a copy of the License at
1093
+ *
1094
+ * http://www.apache.org/licenses/LICENSE-2.0
1095
+ *
1096
+ * Unless required by applicable law or agreed to in writing, software
1097
+ * distributed under the License is distributed on an "AS IS" BASIS,
1098
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1099
+ * See the License for the specific language governing permissions and
1100
+ * limitations under the License.
1101
+ * ============================================================ */
1102
+
1103
+
1104
+ !function ($) {
1105
+
1106
+ // jshint ;_;
1107
+
1108
+
1109
+ /* DROPDOWN CLASS DEFINITION
1110
+ * ========================= */
1111
+
1112
+ var toggle = '[data-toggle=dropdown]'
1113
+ , Dropdown = function (element) {
1114
+ var $el = $(element).on('click.dropdown.data-api', this.toggle)
1115
+ $('html').on('click.dropdown.data-api', function () {
1116
+ $el.parent().removeClass('open')
1117
+ })
1118
+ }
1119
+
1120
+ Dropdown.prototype = {
1121
+
1122
+ constructor: Dropdown
1123
+
1124
+ , toggle: function (e) {
1125
+ var $this = $(this)
1126
+ , $parent
1127
+ , isActive
1128
+
1129
+ if ($this.is('.disabled, :disabled')) return
1130
+
1131
+ $parent = getParent($this)
1132
+
1133
+ isActive = $parent.hasClass('open')
1134
+
1135
+ clearMenus()
1136
+
1137
+ if (!isActive) {
1138
+ $parent.toggleClass('open')
1139
+ $this.focus()
1140
+ }
1141
+
1142
+ return false
1143
+ }
1144
+
1145
+ , keydown: function (e) {
1146
+ var $this
1147
+ , $items
1148
+ , $active
1149
+ , $parent
1150
+ , isActive
1151
+ , index
1152
+
1153
+ if (!/(38|40|27)/.test(e.keyCode)) return
1154
+
1155
+ $this = $(this)
1156
+
1157
+ e.preventDefault()
1158
+ e.stopPropagation()
1159
+
1160
+ if ($this.is('.disabled, :disabled')) return
1161
+
1162
+ $parent = getParent($this)
1163
+
1164
+ isActive = $parent.hasClass('open')
1165
+
1166
+ if (!isActive || (isActive && e.keyCode == 27)) return $this.click()
1167
+
1168
+ $items = $('[role=menu] li:not(.divider) a', $parent)
1169
+
1170
+ if (!$items.length) return
1171
+
1172
+ index = $items.index($items.filter(':focus'))
1173
+
1174
+ if (e.keyCode == 38 && index > 0) index-- // up
1175
+ if (e.keyCode == 40 && index < $items.length - 1) index++ // down
1176
+ if (!~index) index = 0
1177
+
1178
+ $items
1179
+ .eq(index)
1180
+ .focus()
1181
+ }
1182
+
1183
+ }
1184
+
1185
+ function clearMenus() {
1186
+ getParent($(toggle))
1187
+ .removeClass('open')
1188
+ }
1189
+
1190
+ function getParent($this) {
1191
+ var selector = $this.attr('data-target')
1192
+ , $parent
1193
+
1194
+ if (!selector) {
1195
+ selector = $this.attr('href')
1196
+ selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
1197
+ }
1198
+
1199
+ $parent = $(selector)
1200
+ $parent.length || ($parent = $this.parent())
1201
+
1202
+ return $parent
1203
+ }
1204
+
1205
+
1206
+ /* DROPDOWN PLUGIN DEFINITION
1207
+ * ========================== */
1208
+
1209
+ $.fn.dropdown = function (option) {
1210
+ return this.each(function () {
1211
+ var $this = $(this)
1212
+ , data = $this.data('dropdown')
1213
+ if (!data) $this.data('dropdown', (data = new Dropdown(this)))
1214
+ if (typeof option == 'string') data[option].call($this)
1215
+ })
1216
+ }
1217
+
1218
+ $.fn.dropdown.Constructor = Dropdown
1219
+
1220
+
1221
+ /* APPLY TO STANDARD DROPDOWN ELEMENTS
1222
+ * =================================== */
1223
+
1224
+ $(function () {
1225
+ $('html')
1226
+ .on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
1227
+ $('body')
1228
+ .on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
1229
+ .on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
1230
+ .on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
1231
+ })
1232
+
1233
+ }(window.jQuery);
1234
+
1235
+
1236
+ }.call(root));
1237
+ return amdExports;
1238
+ }); }(this));
1239
+
1240
+ //Wrapped in an outer function to preserve global this
1241
+ (function (root) { var amdExports; define('bootstrap/bootstrap-modal',['bootstrap/bootstrap-transition'], function () { (function () {
1242
+
1243
+ /* =========================================================
1244
+ * bootstrap-modal.js v2.1.1
1245
+ * http://twitter.github.com/bootstrap/javascript.html#modals
1246
+ * =========================================================
1247
+ * Copyright 2012 Twitter, Inc.
1248
+ *
1249
+ * Licensed under the Apache License, Version 2.0 (the "License");
1250
+ * you may not use this file except in compliance with the License.
1251
+ * You may obtain a copy of the License at
1252
+ *
1253
+ * http://www.apache.org/licenses/LICENSE-2.0
1254
+ *
1255
+ * Unless required by applicable law or agreed to in writing, software
1256
+ * distributed under the License is distributed on an "AS IS" BASIS,
1257
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1258
+ * See the License for the specific language governing permissions and
1259
+ * limitations under the License.
1260
+ * ========================================================= */
1261
+
1262
+
1263
+ !function ($) {
1264
+
1265
+ // jshint ;_;
1266
+
1267
+
1268
+ /* MODAL CLASS DEFINITION
1269
+ * ====================== */
1270
+
1271
+ var Modal = function (element, options) {
1272
+ this.options = options
1273
+ this.$element = $(element)
1274
+ .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
1275
+ this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
1276
+ }
1277
+
1278
+ Modal.prototype = {
1279
+
1280
+ constructor: Modal
1281
+
1282
+ , toggle: function () {
1283
+ return this[!this.isShown ? 'show' : 'hide']()
1284
+ }
1285
+
1286
+ , show: function () {
1287
+ var that = this
1288
+ , e = $.Event('show')
1289
+
1290
+ this.$element.trigger(e)
1291
+
1292
+ if (this.isShown || e.isDefaultPrevented()) return
1293
+
1294
+ $('body').addClass('modal-open')
1295
+
1296
+ this.isShown = true
1297
+
1298
+ this.escape()
1299
+
1300
+ this.backdrop(function () {
1301
+ var transition = $.support.transition && that.$element.hasClass('fade')
1302
+
1303
+ if (!that.$element.parent().length) {
1304
+ that.$element.appendTo(document.body) //don't move modals dom position
1305
+ }
1306
+
1307
+ that.$element
1308
+ .show()
1309
+
1310
+ if (transition) {
1311
+ that.$element[0].offsetWidth // force reflow
1312
+ }
1313
+
1314
+ that.$element
1315
+ .addClass('in')
1316
+ .attr('aria-hidden', false)
1317
+ .focus()
1318
+
1319
+ that.enforceFocus()
1320
+
1321
+ transition ?
1322
+ that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
1323
+ that.$element.trigger('shown')
1324
+
1325
+ })
1326
+ }
1327
+
1328
+ , hide: function (e) {
1329
+ e && e.preventDefault()
1330
+
1331
+ var that = this
1332
+
1333
+ e = $.Event('hide')
1334
+
1335
+ this.$element.trigger(e)
1336
+
1337
+ if (!this.isShown || e.isDefaultPrevented()) return
1338
+
1339
+ this.isShown = false
1340
+
1341
+ $('body').removeClass('modal-open')
1342
+
1343
+ this.escape()
1344
+
1345
+ $(document).off('focusin.modal')
1346
+
1347
+ this.$element
1348
+ .removeClass('in')
1349
+ .attr('aria-hidden', true)
1350
+
1351
+ $.support.transition && this.$element.hasClass('fade') ?
1352
+ this.hideWithTransition() :
1353
+ this.hideModal()
1354
+ }
1355
+
1356
+ , enforceFocus: function () {
1357
+ var that = this
1358
+ $(document).on('focusin.modal', function (e) {
1359
+ if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
1360
+ that.$element.focus()
1361
+ }
1362
+ })
1363
+ }
1364
+
1365
+ , escape: function () {
1366
+ var that = this
1367
+ if (this.isShown && this.options.keyboard) {
1368
+ this.$element.on('keyup.dismiss.modal', function ( e ) {
1369
+ e.which == 27 && that.hide()
1370
+ })
1371
+ } else if (!this.isShown) {
1372
+ this.$element.off('keyup.dismiss.modal')
1373
+ }
1374
+ }
1375
+
1376
+ , hideWithTransition: function () {
1377
+ var that = this
1378
+ , timeout = setTimeout(function () {
1379
+ that.$element.off($.support.transition.end)
1380
+ that.hideModal()
1381
+ }, 500)
1382
+
1383
+ this.$element.one($.support.transition.end, function () {
1384
+ clearTimeout(timeout)
1385
+ that.hideModal()
1386
+ })
1387
+ }
1388
+
1389
+ , hideModal: function (that) {
1390
+ this.$element
1391
+ .hide()
1392
+ .trigger('hidden')
1393
+
1394
+ this.backdrop()
1395
+ }
1396
+
1397
+ , removeBackdrop: function () {
1398
+ this.$backdrop.remove()
1399
+ this.$backdrop = null
1400
+ }
1401
+
1402
+ , backdrop: function (callback) {
1403
+ var that = this
1404
+ , animate = this.$element.hasClass('fade') ? 'fade' : ''
1405
+
1406
+ if (this.isShown && this.options.backdrop) {
1407
+ var doAnimate = $.support.transition && animate
1408
+
1409
+ this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
1410
+ .appendTo(document.body)
1411
+
1412
+ if (this.options.backdrop != 'static') {
1413
+ this.$backdrop.click($.proxy(this.hide, this))
1414
+ }
1415
+
1416
+ if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
1417
+
1418
+ this.$backdrop.addClass('in')
1419
+
1420
+ doAnimate ?
1421
+ this.$backdrop.one($.support.transition.end, callback) :
1422
+ callback()
1423
+
1424
+ } else if (!this.isShown && this.$backdrop) {
1425
+ this.$backdrop.removeClass('in')
1426
+
1427
+ $.support.transition && this.$element.hasClass('fade')?
1428
+ this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) :
1429
+ this.removeBackdrop()
1430
+
1431
+ } else if (callback) {
1432
+ callback()
1433
+ }
1434
+ }
1435
+ }
1436
+
1437
+
1438
+ /* MODAL PLUGIN DEFINITION
1439
+ * ======================= */
1440
+
1441
+ $.fn.modal = function (option) {
1442
+ return this.each(function () {
1443
+ var $this = $(this)
1444
+ , data = $this.data('modal')
1445
+ , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
1446
+ if (!data) $this.data('modal', (data = new Modal(this, options)))
1447
+ if (typeof option == 'string') data[option]()
1448
+ else if (options.show) data.show()
1449
+ })
1450
+ }
1451
+
1452
+ $.fn.modal.defaults = {
1453
+ backdrop: true
1454
+ , keyboard: true
1455
+ , show: true
1456
+ }
1457
+
1458
+ $.fn.modal.Constructor = Modal
1459
+
1460
+
1461
+ /* MODAL DATA-API
1462
+ * ============== */
1463
+
1464
+ $(function () {
1465
+ $('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
1466
+ var $this = $(this)
1467
+ , href = $this.attr('href')
1468
+ , $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
1469
+ , option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
1470
+
1471
+ e.preventDefault()
1472
+
1473
+ $target
1474
+ .modal(option)
1475
+ .one('hide', function () {
1476
+ $this.focus()
1477
+ })
1478
+ })
1479
+ })
1480
+
1481
+ }(window.jQuery);
1482
+
1483
+
1484
+ }.call(root));
1485
+ return amdExports;
1486
+ }); }(this));
1487
+
1488
+ //Wrapped in an outer function to preserve global this
1489
+ (function (root) { var amdExports; define('bootstrap/bootstrap-tooltip',['bootstrap/bootstrap-transition'], function () { (function () {
1490
+
1491
+ /* ===========================================================
1492
+ * bootstrap-tooltip.js v2.1.1
1493
+ * http://twitter.github.com/bootstrap/javascript.html#tooltips
1494
+ * Inspired by the original jQuery.tipsy by Jason Frame
1495
+ * ===========================================================
1496
+ * Copyright 2012 Twitter, Inc.
1497
+ *
1498
+ * Licensed under the Apache License, Version 2.0 (the "License");
1499
+ * you may not use this file except in compliance with the License.
1500
+ * You may obtain a copy of the License at
1501
+ *
1502
+ * http://www.apache.org/licenses/LICENSE-2.0
1503
+ *
1504
+ * Unless required by applicable law or agreed to in writing, software
1505
+ * distributed under the License is distributed on an "AS IS" BASIS,
1506
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1507
+ * See the License for the specific language governing permissions and
1508
+ * limitations under the License.
1509
+ * ========================================================== */
1510
+
1511
+
1512
+ !function ($) {
1513
+
1514
+ // jshint ;_;
1515
+
1516
+
1517
+ /* TOOLTIP PUBLIC CLASS DEFINITION
1518
+ * =============================== */
1519
+
1520
+ var Tooltip = function (element, options) {
1521
+ this.init('tooltip', element, options)
1522
+ }
1523
+
1524
+ Tooltip.prototype = {
1525
+
1526
+ constructor: Tooltip
1527
+
1528
+ , init: function (type, element, options) {
1529
+ var eventIn
1530
+ , eventOut
1531
+
1532
+ this.type = type
1533
+ this.$element = $(element)
1534
+ this.options = this.getOptions(options)
1535
+ this.enabled = true
1536
+
1537
+ if (this.options.trigger == 'click') {
1538
+ this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
1539
+ } else if (this.options.trigger != 'manual') {
1540
+ eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus'
1541
+ eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur'
1542
+ this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
1543
+ this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
1544
+ }
1545
+
1546
+ this.options.selector ?
1547
+ (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
1548
+ this.fixTitle()
1549
+ }
1550
+
1551
+ , getOptions: function (options) {
1552
+ options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data())
1553
+
1554
+ if (options.delay && typeof options.delay == 'number') {
1555
+ options.delay = {
1556
+ show: options.delay
1557
+ , hide: options.delay
1558
+ }
1559
+ }
1560
+
1561
+ return options
1562
+ }
1563
+
1564
+ , enter: function (e) {
1565
+ var self = $(e.currentTarget)[this.type](this._options).data(this.type)
1566
+
1567
+ if (!self.options.delay || !self.options.delay.show) return self.show()
1568
+
1569
+ clearTimeout(this.timeout)
1570
+ self.hoverState = 'in'
1571
+ this.timeout = setTimeout(function() {
1572
+ if (self.hoverState == 'in') self.show()
1573
+ }, self.options.delay.show)
1574
+ }
1575
+
1576
+ , leave: function (e) {
1577
+ var self = $(e.currentTarget)[this.type](this._options).data(this.type)
1578
+
1579
+ if (this.timeout) clearTimeout(this.timeout)
1580
+ if (!self.options.delay || !self.options.delay.hide) return self.hide()
1581
+
1582
+ self.hoverState = 'out'
1583
+ this.timeout = setTimeout(function() {
1584
+ if (self.hoverState == 'out') self.hide()
1585
+ }, self.options.delay.hide)
1586
+ }
1587
+
1588
+ , show: function () {
1589
+ var $tip
1590
+ , inside
1591
+ , pos
1592
+ , actualWidth
1593
+ , actualHeight
1594
+ , placement
1595
+ , tp
1596
+
1597
+ if (this.hasContent() && this.enabled) {
1598
+ $tip = this.tip()
1599
+ this.setContent()
1600
+
1601
+ if (this.options.animation) {
1602
+ $tip.addClass('fade')
1603
+ }
1604
+
1605
+ placement = typeof this.options.placement == 'function' ?
1606
+ this.options.placement.call(this, $tip[0], this.$element[0]) :
1607
+ this.options.placement
1608
+
1609
+ inside = /in/.test(placement)
1610
+
1611
+ $tip
1612
+ .remove()
1613
+ .css({ top: 0, left: 0, display: 'block' })
1614
+ .appendTo(inside ? this.$element : document.body)
1615
+
1616
+ pos = this.getPosition(inside)
1617
+
1618
+ actualWidth = $tip[0].offsetWidth
1619
+ actualHeight = $tip[0].offsetHeight
1620
+
1621
+ switch (inside ? placement.split(' ')[1] : placement) {
1622
+ case 'bottom':
1623
+ tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
1624
+ break
1625
+ case 'top':
1626
+ tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
1627
+ break
1628
+ case 'left':
1629
+ tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
1630
+ break
1631
+ case 'right':
1632
+ tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
1633
+ break
1634
+ }
1635
+
1636
+ $tip
1637
+ .css(tp)
1638
+ .addClass(placement)
1639
+ .addClass('in')
1640
+ }
1641
+ }
1642
+
1643
+ , setContent: function () {
1644
+ var $tip = this.tip()
1645
+ , title = this.getTitle()
1646
+
1647
+ $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
1648
+ $tip.removeClass('fade in top bottom left right')
1649
+ }
1650
+
1651
+ , hide: function () {
1652
+ var that = this
1653
+ , $tip = this.tip()
1654
+
1655
+ $tip.removeClass('in')
1656
+
1657
+ function removeWithAnimation() {
1658
+ var timeout = setTimeout(function () {
1659
+ $tip.off($.support.transition.end).remove()
1660
+ }, 500)
1661
+
1662
+ $tip.one($.support.transition.end, function () {
1663
+ clearTimeout(timeout)
1664
+ $tip.remove()
1665
+ })
1666
+ }
1667
+
1668
+ $.support.transition && this.$tip.hasClass('fade') ?
1669
+ removeWithAnimation() :
1670
+ $tip.remove()
1671
+
1672
+ return this
1673
+ }
1674
+
1675
+ , fixTitle: function () {
1676
+ var $e = this.$element
1677
+ if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
1678
+ $e.attr('data-original-title', $e.attr('title') || '').removeAttr('title')
1679
+ }
1680
+ }
1681
+
1682
+ , hasContent: function () {
1683
+ return this.getTitle()
1684
+ }
1685
+
1686
+ , getPosition: function (inside) {
1687
+ return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), {
1688
+ width: this.$element[0].offsetWidth
1689
+ , height: this.$element[0].offsetHeight
1690
+ })
1691
+ }
1692
+
1693
+ , getTitle: function () {
1694
+ var title
1695
+ , $e = this.$element
1696
+ , o = this.options
1697
+
1698
+ title = $e.attr('data-original-title')
1699
+ || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
1700
+
1701
+ return title
1702
+ }
1703
+
1704
+ , tip: function () {
1705
+ return this.$tip = this.$tip || $(this.options.template)
1706
+ }
1707
+
1708
+ , validate: function () {
1709
+ if (!this.$element[0].parentNode) {
1710
+ this.hide()
1711
+ this.$element = null
1712
+ this.options = null
1713
+ }
1714
+ }
1715
+
1716
+ , enable: function () {
1717
+ this.enabled = true
1718
+ }
1719
+
1720
+ , disable: function () {
1721
+ this.enabled = false
1722
+ }
1723
+
1724
+ , toggleEnabled: function () {
1725
+ this.enabled = !this.enabled
1726
+ }
1727
+
1728
+ , toggle: function () {
1729
+ this[this.tip().hasClass('in') ? 'hide' : 'show']()
1730
+ }
1731
+
1732
+ , destroy: function () {
1733
+ this.hide().$element.off('.' + this.type).removeData(this.type)
1734
+ }
1735
+
1736
+ }
1737
+
1738
+
1739
+ /* TOOLTIP PLUGIN DEFINITION
1740
+ * ========================= */
1741
+
1742
+ $.fn.tooltip = function ( option ) {
1743
+ return this.each(function () {
1744
+ var $this = $(this)
1745
+ , data = $this.data('tooltip')
1746
+ , options = typeof option == 'object' && option
1747
+ if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
1748
+ if (typeof option == 'string') data[option]()
1749
+ })
1750
+ }
1751
+
1752
+ $.fn.tooltip.Constructor = Tooltip
1753
+
1754
+ $.fn.tooltip.defaults = {
1755
+ animation: true
1756
+ , placement: 'top'
1757
+ , selector: false
1758
+ , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
1759
+ , trigger: 'hover'
1760
+ , title: ''
1761
+ , delay: 0
1762
+ , html: true
1763
+ }
1764
+
1765
+ }(window.jQuery);
1766
+
1767
+
1768
+
1769
+ }.call(root));
1770
+ return amdExports;
1771
+ }); }(this));
1772
+
1773
+ //Wrapped in an outer function to preserve global this
1774
+ (function (root) { var amdExports; define('bootstrap/bootstrap-popover',['bootstrap/bootstrap-transition','bootstrap/bootstrap-tooltip'], function () { (function () {
1775
+
1776
+ /* ===========================================================
1777
+ * bootstrap-popover.js v2.1.1
1778
+ * http://twitter.github.com/bootstrap/javascript.html#popovers
1779
+ * ===========================================================
1780
+ * Copyright 2012 Twitter, Inc.
1781
+ *
1782
+ * Licensed under the Apache License, Version 2.0 (the "License");
1783
+ * you may not use this file except in compliance with the License.
1784
+ * You may obtain a copy of the License at
1785
+ *
1786
+ * http://www.apache.org/licenses/LICENSE-2.0
1787
+ *
1788
+ * Unless required by applicable law or agreed to in writing, software
1789
+ * distributed under the License is distributed on an "AS IS" BASIS,
1790
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1791
+ * See the License for the specific language governing permissions and
1792
+ * limitations under the License.
1793
+ * =========================================================== */
1794
+
1795
+
1796
+ !function ($) {
1797
+
1798
+ // jshint ;_;
1799
+
1800
+
1801
+ /* POPOVER PUBLIC CLASS DEFINITION
1802
+ * =============================== */
1803
+
1804
+ var Popover = function (element, options) {
1805
+ this.init('popover', element, options)
1806
+ }
1807
+
1808
+
1809
+ /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
1810
+ ========================================== */
1811
+
1812
+ Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
1813
+
1814
+ constructor: Popover
1815
+
1816
+ , setContent: function () {
1817
+ var $tip = this.tip()
1818
+ , title = this.getTitle()
1819
+ , content = this.getContent()
1820
+
1821
+ $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
1822
+ $tip.find('.popover-content > *')[this.options.html ? 'html' : 'text'](content)
1823
+
1824
+ $tip.removeClass('fade top bottom left right in')
1825
+ }
1826
+
1827
+ , hasContent: function () {
1828
+ return this.getTitle() || this.getContent()
1829
+ }
1830
+
1831
+ , getContent: function () {
1832
+ var content
1833
+ , $e = this.$element
1834
+ , o = this.options
1835
+
1836
+ content = $e.attr('data-content')
1837
+ || (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
1838
+
1839
+ return content
1840
+ }
1841
+
1842
+ , tip: function () {
1843
+ if (!this.$tip) {
1844
+ this.$tip = $(this.options.template)
1845
+ }
1846
+ return this.$tip
1847
+ }
1848
+
1849
+ , destroy: function () {
1850
+ this.hide().$element.off('.' + this.type).removeData(this.type)
1851
+ }
1852
+
1853
+ })
1854
+
1855
+
1856
+ /* POPOVER PLUGIN DEFINITION
1857
+ * ======================= */
1858
+
1859
+ $.fn.popover = function (option) {
1860
+ return this.each(function () {
1861
+ var $this = $(this)
1862
+ , data = $this.data('popover')
1863
+ , options = typeof option == 'object' && option
1864
+ if (!data) $this.data('popover', (data = new Popover(this, options)))
1865
+ if (typeof option == 'string') data[option]()
1866
+ })
1867
+ }
1868
+
1869
+ $.fn.popover.Constructor = Popover
1870
+
1871
+ $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
1872
+ placement: 'right'
1873
+ , trigger: 'click'
1874
+ , content: ''
1875
+ , template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'
1876
+ })
1877
+
1878
+ }(window.jQuery);
1879
+
1880
+
1881
+ }.call(root));
1882
+ return amdExports;
1883
+ }); }(this));
1884
+
1885
+ //Wrapped in an outer function to preserve global this
1886
+ (function (root) { var amdExports; define('bootstrap/bootstrap-scrollspy',['bootstrap/bootstrap-transition'], function () { (function () {
1887
+
1888
+ /* =============================================================
1889
+ * bootstrap-scrollspy.js v2.1.1
1890
+ * http://twitter.github.com/bootstrap/javascript.html#scrollspy
1891
+ * =============================================================
1892
+ * Copyright 2012 Twitter, Inc.
1893
+ *
1894
+ * Licensed under the Apache License, Version 2.0 (the "License");
1895
+ * you may not use this file except in compliance with the License.
1896
+ * You may obtain a copy of the License at
1897
+ *
1898
+ * http://www.apache.org/licenses/LICENSE-2.0
1899
+ *
1900
+ * Unless required by applicable law or agreed to in writing, software
1901
+ * distributed under the License is distributed on an "AS IS" BASIS,
1902
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1903
+ * See the License for the specific language governing permissions and
1904
+ * limitations under the License.
1905
+ * ============================================================== */
1906
+
1907
+
1908
+ !function ($) {
1909
+
1910
+ // jshint ;_;
1911
+
1912
+
1913
+ /* SCROLLSPY CLASS DEFINITION
1914
+ * ========================== */
1915
+
1916
+ function ScrollSpy(element, options) {
1917
+ var process = $.proxy(this.process, this)
1918
+ , $element = $(element).is('body') ? $(window) : $(element)
1919
+ , href
1920
+ this.options = $.extend({}, $.fn.scrollspy.defaults, options)
1921
+ this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
1922
+ this.selector = (this.options.target
1923
+ || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
1924
+ || '') + ' .nav li > a'
1925
+ this.$body = $('body')
1926
+ this.refresh()
1927
+ this.process()
1928
+ }
1929
+
1930
+ ScrollSpy.prototype = {
1931
+
1932
+ constructor: ScrollSpy
1933
+
1934
+ , refresh: function () {
1935
+ var self = this
1936
+ , $targets
1937
+
1938
+ this.offsets = $([])
1939
+ this.targets = $([])
1940
+
1941
+ $targets = this.$body
1942
+ .find(this.selector)
1943
+ .map(function () {
1944
+ var $el = $(this)
1945
+ , href = $el.data('target') || $el.attr('href')
1946
+ , $href = /^#\w/.test(href) && $(href)
1947
+ return ( $href
1948
+ && $href.length
1949
+ && [[ $href.position().top, href ]] ) || null
1950
+ })
1951
+ .sort(function (a, b) { return a[0] - b[0] })
1952
+ .each(function () {
1953
+ self.offsets.push(this[0])
1954
+ self.targets.push(this[1])
1955
+ })
1956
+ }
1957
+
1958
+ , process: function () {
1959
+ var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
1960
+ , scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
1961
+ , maxScroll = scrollHeight - this.$scrollElement.height()
1962
+ , offsets = this.offsets
1963
+ , targets = this.targets
1964
+ , activeTarget = this.activeTarget
1965
+ , i
1966
+
1967
+ if (scrollTop >= maxScroll) {
1968
+ return activeTarget != (i = targets.last()[0])
1969
+ && this.activate ( i )
1970
+ }
1971
+
1972
+ for (i = offsets.length; i--;) {
1973
+ activeTarget != targets[i]
1974
+ && scrollTop >= offsets[i]
1975
+ && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
1976
+ && this.activate( targets[i] )
1977
+ }
1978
+ }
1979
+
1980
+ , activate: function (target) {
1981
+ var active
1982
+ , selector
1983
+
1984
+ this.activeTarget = target
1985
+
1986
+ $(this.selector)
1987
+ .parent('.active')
1988
+ .removeClass('active')
1989
+
1990
+ selector = this.selector
1991
+ + '[data-target="' + target + '"],'
1992
+ + this.selector + '[href="' + target + '"]'
1993
+
1994
+ active = $(selector)
1995
+ .parent('li')
1996
+ .addClass('active')
1997
+
1998
+ if (active.parent('.dropdown-menu').length) {
1999
+ active = active.closest('li.dropdown').addClass('active')
2000
+ }
2001
+
2002
+ active.trigger('activate')
2003
+ }
2004
+
2005
+ }
2006
+
2007
+
2008
+ /* SCROLLSPY PLUGIN DEFINITION
2009
+ * =========================== */
2010
+
2011
+ $.fn.scrollspy = function (option) {
2012
+ return this.each(function () {
2013
+ var $this = $(this)
2014
+ , data = $this.data('scrollspy')
2015
+ , options = typeof option == 'object' && option
2016
+ if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
2017
+ if (typeof option == 'string') data[option]()
2018
+ })
2019
+ }
2020
+
2021
+ $.fn.scrollspy.Constructor = ScrollSpy
2022
+
2023
+ $.fn.scrollspy.defaults = {
2024
+ offset: 10
2025
+ }
2026
+
2027
+
2028
+ /* SCROLLSPY DATA-API
2029
+ * ================== */
2030
+
2031
+ $(window).on('load', function () {
2032
+ $('[data-spy="scroll"]').each(function () {
2033
+ var $spy = $(this)
2034
+ $spy.scrollspy($spy.data())
2035
+ })
2036
+ })
2037
+
2038
+ }(window.jQuery);
2039
+
2040
+
2041
+ }.call(root));
2042
+ return amdExports;
2043
+ }); }(this));
2044
+
2045
+ //Wrapped in an outer function to preserve global this
2046
+ (function (root) { var amdExports; define('bootstrap/bootstrap-tab',['bootstrap/bootstrap-transition'], function () { (function () {
2047
+
2048
+ /* ========================================================
2049
+ * bootstrap-tab.js v2.1.1
2050
+ * http://twitter.github.com/bootstrap/javascript.html#tabs
2051
+ * ========================================================
2052
+ * Copyright 2012 Twitter, Inc.
2053
+ *
2054
+ * Licensed under the Apache License, Version 2.0 (the "License");
2055
+ * you may not use this file except in compliance with the License.
2056
+ * You may obtain a copy of the License at
2057
+ *
2058
+ * http://www.apache.org/licenses/LICENSE-2.0
2059
+ *
2060
+ * Unless required by applicable law or agreed to in writing, software
2061
+ * distributed under the License is distributed on an "AS IS" BASIS,
2062
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2063
+ * See the License for the specific language governing permissions and
2064
+ * limitations under the License.
2065
+ * ======================================================== */
2066
+
2067
+
2068
+ !function ($) {
2069
+
2070
+ // jshint ;_;
2071
+
2072
+
2073
+ /* TAB CLASS DEFINITION
2074
+ * ==================== */
2075
+
2076
+ var Tab = function (element) {
2077
+ this.element = $(element)
2078
+ }
2079
+
2080
+ Tab.prototype = {
2081
+
2082
+ constructor: Tab
2083
+
2084
+ , show: function () {
2085
+ var $this = this.element
2086
+ , $ul = $this.closest('ul:not(.dropdown-menu)')
2087
+ , selector = $this.attr('data-target')
2088
+ , previous
2089
+ , $target
2090
+ , e
2091
+
2092
+ if (!selector) {
2093
+ selector = $this.attr('href')
2094
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
2095
+ }
2096
+
2097
+ if ( $this.parent('li').hasClass('active') ) return
2098
+
2099
+ previous = $ul.find('.active a').last()[0]
2100
+
2101
+ e = $.Event('show', {
2102
+ relatedTarget: previous
2103
+ })
2104
+
2105
+ $this.trigger(e)
2106
+
2107
+ if (e.isDefaultPrevented()) return
2108
+
2109
+ $target = $(selector)
2110
+
2111
+ this.activate($this.parent('li'), $ul)
2112
+ this.activate($target, $target.parent(), function () {
2113
+ $this.trigger({
2114
+ type: 'shown'
2115
+ , relatedTarget: previous
2116
+ })
2117
+ })
2118
+ }
2119
+
2120
+ , activate: function ( element, container, callback) {
2121
+ var $active = container.find('> .active')
2122
+ , transition = callback
2123
+ && $.support.transition
2124
+ && $active.hasClass('fade')
2125
+
2126
+ function next() {
2127
+ $active
2128
+ .removeClass('active')
2129
+ .find('> .dropdown-menu > .active')
2130
+ .removeClass('active')
2131
+
2132
+ element.addClass('active')
2133
+
2134
+ if (transition) {
2135
+ element[0].offsetWidth // reflow for transition
2136
+ element.addClass('in')
2137
+ } else {
2138
+ element.removeClass('fade')
2139
+ }
2140
+
2141
+ if ( element.parent('.dropdown-menu') ) {
2142
+ element.closest('li.dropdown').addClass('active')
2143
+ }
2144
+
2145
+ callback && callback()
2146
+ }
2147
+
2148
+ transition ?
2149
+ $active.one($.support.transition.end, next) :
2150
+ next()
2151
+
2152
+ $active.removeClass('in')
2153
+ }
2154
+ }
2155
+
2156
+
2157
+ /* TAB PLUGIN DEFINITION
2158
+ * ===================== */
2159
+
2160
+ $.fn.tab = function ( option ) {
2161
+ return this.each(function () {
2162
+ var $this = $(this)
2163
+ , data = $this.data('tab')
2164
+ if (!data) $this.data('tab', (data = new Tab(this)))
2165
+ if (typeof option == 'string') data[option]()
2166
+ })
2167
+ }
2168
+
2169
+ $.fn.tab.Constructor = Tab
2170
+
2171
+
2172
+ /* TAB DATA-API
2173
+ * ============ */
2174
+
2175
+ $(function () {
2176
+ $('body').on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
2177
+ e.preventDefault()
2178
+ $(this).tab('show')
2179
+ })
2180
+ })
2181
+
2182
+ }(window.jQuery);
2183
+
2184
+
2185
+ }.call(root));
2186
+ return amdExports;
2187
+ }); }(this));
2188
+
2189
+ //Wrapped in an outer function to preserve global this
2190
+ (function (root) { var amdExports; define('bootstrap/bootstrap-typeahead',['bootstrap/bootstrap-transition'], function () { (function () {
2191
+
2192
+ /* =============================================================
2193
+ * bootstrap-typeahead.js v2.1.1
2194
+ * http://twitter.github.com/bootstrap/javascript.html#typeahead
2195
+ * =============================================================
2196
+ * Copyright 2012 Twitter, Inc.
2197
+ *
2198
+ * Licensed under the Apache License, Version 2.0 (the "License");
2199
+ * you may not use this file except in compliance with the License.
2200
+ * You may obtain a copy of the License at
2201
+ *
2202
+ * http://www.apache.org/licenses/LICENSE-2.0
2203
+ *
2204
+ * Unless required by applicable law or agreed to in writing, software
2205
+ * distributed under the License is distributed on an "AS IS" BASIS,
2206
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2207
+ * See the License for the specific language governing permissions and
2208
+ * limitations under the License.
2209
+ * ============================================================ */
2210
+
2211
+
2212
+ !function($){
2213
+
2214
+ // jshint ;_;
2215
+
2216
+
2217
+ /* TYPEAHEAD PUBLIC CLASS DEFINITION
2218
+ * ================================= */
2219
+
2220
+ var Typeahead = function (element, options) {
2221
+ this.$element = $(element)
2222
+ this.options = $.extend({}, $.fn.typeahead.defaults, options)
2223
+ this.matcher = this.options.matcher || this.matcher
2224
+ this.sorter = this.options.sorter || this.sorter
2225
+ this.highlighter = this.options.highlighter || this.highlighter
2226
+ this.updater = this.options.updater || this.updater
2227
+ this.$menu = $(this.options.menu).appendTo('body')
2228
+ this.source = this.options.source
2229
+ this.shown = false
2230
+ this.listen()
2231
+ }
2232
+
2233
+ Typeahead.prototype = {
2234
+
2235
+ constructor: Typeahead
2236
+
2237
+ , select: function () {
2238
+ var val = this.$menu.find('.active').attr('data-value')
2239
+ this.$element
2240
+ .val(this.updater(val))
2241
+ .change()
2242
+ return this.hide()
2243
+ }
2244
+
2245
+ , updater: function (item) {
2246
+ return item
2247
+ }
2248
+
2249
+ , show: function () {
2250
+ var pos = $.extend({}, this.$element.offset(), {
2251
+ height: this.$element[0].offsetHeight
2252
+ })
2253
+
2254
+ this.$menu.css({
2255
+ top: pos.top + pos.height
2256
+ , left: pos.left
2257
+ })
2258
+
2259
+ this.$menu.show()
2260
+ this.shown = true
2261
+ return this
2262
+ }
2263
+
2264
+ , hide: function () {
2265
+ this.$menu.hide()
2266
+ this.shown = false
2267
+ return this
2268
+ }
2269
+
2270
+ , lookup: function (event) {
2271
+ var items
2272
+
2273
+ this.query = this.$element.val()
2274
+
2275
+ if (!this.query || this.query.length < this.options.minLength) {
2276
+ return this.shown ? this.hide() : this
2277
+ }
2278
+
2279
+ items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source
2280
+
2281
+ return items ? this.process(items) : this
2282
+ }
2283
+
2284
+ , process: function (items) {
2285
+ var that = this
2286
+
2287
+ items = $.grep(items, function (item) {
2288
+ return that.matcher(item)
2289
+ })
2290
+
2291
+ items = this.sorter(items)
2292
+
2293
+ if (!items.length) {
2294
+ return this.shown ? this.hide() : this
2295
+ }
2296
+
2297
+ return this.render(items.slice(0, this.options.items)).show()
2298
+ }
2299
+
2300
+ , matcher: function (item) {
2301
+ return ~item.toLowerCase().indexOf(this.query.toLowerCase())
2302
+ }
2303
+
2304
+ , sorter: function (items) {
2305
+ var beginswith = []
2306
+ , caseSensitive = []
2307
+ , caseInsensitive = []
2308
+ , item
2309
+
2310
+ while (item = items.shift()) {
2311
+ if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
2312
+ else if (~item.indexOf(this.query)) caseSensitive.push(item)
2313
+ else caseInsensitive.push(item)
2314
+ }
2315
+
2316
+ return beginswith.concat(caseSensitive, caseInsensitive)
2317
+ }
2318
+
2319
+ , highlighter: function (item) {
2320
+ var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
2321
+ return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
2322
+ return '<strong>' + match + '</strong>'
2323
+ })
2324
+ }
2325
+
2326
+ , render: function (items) {
2327
+ var that = this
2328
+
2329
+ items = $(items).map(function (i, item) {
2330
+ i = $(that.options.item).attr('data-value', item)
2331
+ i.find('a').html(that.highlighter(item))
2332
+ return i[0]
2333
+ })
2334
+
2335
+ items.first().addClass('active')
2336
+ this.$menu.html(items)
2337
+ return this
2338
+ }
2339
+
2340
+ , next: function (event) {
2341
+ var active = this.$menu.find('.active').removeClass('active')
2342
+ , next = active.next()
2343
+
2344
+ if (!next.length) {
2345
+ next = $(this.$menu.find('li')[0])
2346
+ }
2347
+
2348
+ next.addClass('active')
2349
+ }
2350
+
2351
+ , prev: function (event) {
2352
+ var active = this.$menu.find('.active').removeClass('active')
2353
+ , prev = active.prev()
2354
+
2355
+ if (!prev.length) {
2356
+ prev = this.$menu.find('li').last()
2357
+ }
2358
+
2359
+ prev.addClass('active')
2360
+ }
2361
+
2362
+ , listen: function () {
2363
+ this.$element
2364
+ .on('blur', $.proxy(this.blur, this))
2365
+ .on('keypress', $.proxy(this.keypress, this))
2366
+ .on('keyup', $.proxy(this.keyup, this))
2367
+
2368
+ if ($.browser.chrome || $.browser.webkit || $.browser.msie) {
2369
+ this.$element.on('keydown', $.proxy(this.keydown, this))
2370
+ }
2371
+
2372
+ this.$menu
2373
+ .on('click', $.proxy(this.click, this))
2374
+ .on('mouseenter', 'li', $.proxy(this.mouseenter, this))
2375
+ }
2376
+
2377
+ , move: function (e) {
2378
+ if (!this.shown) return
2379
+
2380
+ switch(e.keyCode) {
2381
+ case 9: // tab
2382
+ case 13: // enter
2383
+ case 27: // escape
2384
+ e.preventDefault()
2385
+ break
2386
+
2387
+ case 38: // up arrow
2388
+ e.preventDefault()
2389
+ this.prev()
2390
+ break
2391
+
2392
+ case 40: // down arrow
2393
+ e.preventDefault()
2394
+ this.next()
2395
+ break
2396
+ }
2397
+
2398
+ e.stopPropagation()
2399
+ }
2400
+
2401
+ , keydown: function (e) {
2402
+ this.suppressKeyPressRepeat = !~$.inArray(e.keyCode, [40,38,9,13,27])
2403
+ this.move(e)
2404
+ }
2405
+
2406
+ , keypress: function (e) {
2407
+ if (this.suppressKeyPressRepeat) return
2408
+ this.move(e)
2409
+ }
2410
+
2411
+ , keyup: function (e) {
2412
+ switch(e.keyCode) {
2413
+ case 40: // down arrow
2414
+ case 38: // up arrow
2415
+ break
2416
+
2417
+ case 9: // tab
2418
+ case 13: // enter
2419
+ if (!this.shown) return
2420
+ this.select()
2421
+ break
2422
+
2423
+ case 27: // escape
2424
+ if (!this.shown) return
2425
+ this.hide()
2426
+ break
2427
+
2428
+ default:
2429
+ this.lookup()
2430
+ }
2431
+
2432
+ e.stopPropagation()
2433
+ e.preventDefault()
2434
+ }
2435
+
2436
+ , blur: function (e) {
2437
+ var that = this
2438
+ setTimeout(function () { that.hide() }, 150)
2439
+ }
2440
+
2441
+ , click: function (e) {
2442
+ e.stopPropagation()
2443
+ e.preventDefault()
2444
+ this.select()
2445
+ }
2446
+
2447
+ , mouseenter: function (e) {
2448
+ this.$menu.find('.active').removeClass('active')
2449
+ $(e.currentTarget).addClass('active')
2450
+ }
2451
+
2452
+ }
2453
+
2454
+
2455
+ /* TYPEAHEAD PLUGIN DEFINITION
2456
+ * =========================== */
2457
+
2458
+ $.fn.typeahead = function (option) {
2459
+ return this.each(function () {
2460
+ var $this = $(this)
2461
+ , data = $this.data('typeahead')
2462
+ , options = typeof option == 'object' && option
2463
+ if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
2464
+ if (typeof option == 'string') data[option]()
2465
+ })
2466
+ }
2467
+
2468
+ $.fn.typeahead.defaults = {
2469
+ source: []
2470
+ , items: 8
2471
+ , menu: '<ul class="typeahead dropdown-menu"></ul>'
2472
+ , item: '<li><a href="#"></a></li>'
2473
+ , minLength: 1
2474
+ }
2475
+
2476
+ $.fn.typeahead.Constructor = Typeahead
2477
+
2478
+
2479
+ /* TYPEAHEAD DATA-API
2480
+ * ================== */
2481
+
2482
+ $(function () {
2483
+ $('body').on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
2484
+ var $this = $(this)
2485
+ if ($this.data('typeahead')) return
2486
+ e.preventDefault()
2487
+ $this.typeahead($this.data())
2488
+ })
2489
+ })
2490
+
2491
+ }(window.jQuery);
2492
+
2493
+
2494
+
2495
+ }.call(root));
2496
+ return amdExports;
2497
+ }); }(this));
2498
+
2499
+ /*
2500
+ * Fuel UX Combobox
2501
+ * https://github.com/ExactTarget/fuelux
2502
+ *
2503
+ * Copyright (c) 2012 ExactTarget
2504
+ * Licensed under the MIT license.
2505
+ */
2506
+
2507
+ define('fuelux/combobox',['require','jquery'],function(require) {
2508
+
2509
+ var $ = require('jquery');
2510
+
2511
+
2512
+ // COMBOBOX CONSTRUCTOR AND PROTOTYPE
2513
+
2514
+ var Combobox = function (element, options) {
2515
+ this.$element = $(element);
2516
+ this.options = $.extend({}, $.fn.combobox.defaults, options);
2517
+ this.$element.on('click', 'a', $.proxy(this.itemclicked, this));
2518
+ this.$input = this.$element.find('input');
2519
+ };
2520
+
2521
+ Combobox.prototype = {
2522
+
2523
+ constructor: Combobox,
2524
+
2525
+ select: function (val) {
2526
+ this.$input.val(val).change();
2527
+ return this;
2528
+ },
2529
+
2530
+ itemclicked: function (e) {
2531
+ this.select($(e.target).text());
2532
+ $('body').click();
2533
+ e.preventDefault();
2534
+ }
2535
+
2536
+ };
2537
+
2538
+
2539
+ // COMBOBOX PLUGIN DEFINITION
2540
+
2541
+ $.fn.combobox = function (option) {
2542
+ return this.each(function () {
2543
+ var $this = $(this);
2544
+ var data = $this.data('combobox');
2545
+ var options = typeof option === 'object' && option;
2546
+
2547
+ if (!data) $this.data('combobox', (data = new Combobox(this, options)));
2548
+ if (typeof option === 'string') data[option]();
2549
+ });
2550
+ };
2551
+
2552
+ $.fn.combobox.defaults = {};
2553
+
2554
+ $.fn.combobox.Constructor = Combobox;
2555
+
2556
+
2557
+ // COMBOBOX DATA-API
2558
+
2559
+ $(function () {
2560
+ $('body').on('mousedown.combobox.data-api', '.combobox', function (e) {
2561
+ var $this = $(this);
2562
+ if ($this.data('combobox')) return;
2563
+ $this.combobox($this.data());
2564
+ });
2565
+ });
2566
+
2567
+ });
2568
+
2569
+ /*
2570
+ * Fuel UX Datagrid
2571
+ * https://github.com/ExactTarget/fuelux
2572
+ *
2573
+ * Copyright (c) 2012 ExactTarget
2574
+ * Licensed under the MIT license.
2575
+ */
2576
+
2577
+ define('fuelux/datagrid',['require','jquery'],function(require) {
2578
+
2579
+ var $ = require('jquery');
2580
+
2581
+
2582
+ // DATAGRID CONSTRUCTOR AND PROTOTYPE
2583
+
2584
+ var Datagrid = function (element, options) {
2585
+ this.$element = $(element);
2586
+ this.$thead = this.$element.find('thead');
2587
+ this.$footer = this.$element.find('tfoot th');
2588
+ this.$footerchildren = this.$footer.children();
2589
+ this.$topheader = this.$element.find('thead th');
2590
+ this.$searchcontrol = this.$element.find('.search');
2591
+ this.$pagesize = this.$element.find('.grid-pagesize');
2592
+ this.$pageinput = this.$element.find('.grid-pager input');
2593
+ this.$pagedropdown = this.$element.find('.grid-pager .dropdown-menu');
2594
+ this.$prevpagebtn = this.$element.find('.grid-prevpage');
2595
+ this.$nextpagebtn = this.$element.find('.grid-nextpage');
2596
+ this.$pageslabel = this.$element.find('.grid-pages');
2597
+ this.$countlabel = this.$element.find('.grid-count');
2598
+ this.$startlabel = this.$element.find('.grid-start');
2599
+ this.$endlabel = this.$element.find('.grid-end');
2600
+
2601
+ this.$tbody = $('<tbody>').insertAfter(this.$thead);
2602
+ this.$colheader = $('<tr>').appendTo(this.$thead);
2603
+
2604
+ this.options = $.extend({}, $.fn.datagrid.defaults, options);
2605
+ this.options.dataOptions.pageSize = parseInt(this.$pagesize.val(), 10);
2606
+ this.columns = this.options.dataSource.columns();
2607
+
2608
+ this.$nextpagebtn.on('click', $.proxy(this.next, this));
2609
+ this.$prevpagebtn.on('click', $.proxy(this.previous, this));
2610
+ this.$searchcontrol.on('searched cleared', $.proxy(this.searchChanged, this));
2611
+ this.$colheader.on('click', 'th', $.proxy(this.headerClicked, this));
2612
+ this.$pagesize.on('change', $.proxy(this.pagesizeChanged, this));
2613
+ this.$pageinput.on('change', $.proxy(this.pageChanged, this));
2614
+
2615
+ this.renderColumns();
2616
+ this.renderData();
2617
+ };
2618
+
2619
+ Datagrid.prototype = {
2620
+
2621
+ constructor: Datagrid,
2622
+
2623
+ renderColumns: function () {
2624
+ var self = this;
2625
+
2626
+ this.$footer.attr('colspan', this.columns.length);
2627
+ this.$topheader.attr('colspan', this.columns.length);
2628
+
2629
+ var colHTML = '';
2630
+
2631
+ $.each(this.columns, function (index, column) {
2632
+ colHTML += '<th data-property="' + column.property + '"';
2633
+ if (column.sortable) colHTML += ' class="sortable"';
2634
+ colHTML += '>' + column.label + '</th>';
2635
+ });
2636
+
2637
+ self.$colheader.append(colHTML);
2638
+ },
2639
+
2640
+ updateColumns: function ($target, direction) {
2641
+ var className = (direction === 'asc') ? 'icon-chevron-up' : 'icon-chevron-down';
2642
+ this.$colheader.find('i').remove();
2643
+ this.$colheader.find('th').removeClass('sorted');
2644
+ $('<i>').addClass(className).appendTo($target);
2645
+ $target.addClass('sorted');
2646
+ },
2647
+
2648
+ updatePageDropdown: function (data) {
2649
+ var pageHTML = '';
2650
+
2651
+ for (var i = 1; i <= data.pages; i++) {
2652
+ pageHTML += '<li><a>' + i + '</a></li>';
2653
+ }
2654
+
2655
+ this.$pagedropdown.html(pageHTML);
2656
+ },
2657
+
2658
+ updatePageButtons: function (data) {
2659
+ if (data.page === 1) {
2660
+ this.$prevpagebtn.attr('disabled', 'disabled');
2661
+ } else {
2662
+ this.$prevpagebtn.removeAttr('disabled');
2663
+ }
2664
+
2665
+ if (data.page === data.pages) {
2666
+ this.$nextpagebtn.attr('disabled', 'disabled');
2667
+ } else {
2668
+ this.$nextpagebtn.removeAttr('disabled');
2669
+ }
2670
+ },
2671
+
2672
+ renderData: function () {
2673
+ var self = this;
2674
+
2675
+ this.$tbody.html(this.placeholderRowHTML(this.options.loadingHTML));
2676
+ this.$footerchildren.hide();
2677
+
2678
+ this.options.dataSource.data(this.options.dataOptions, function (data) {
2679
+ var itemdesc = (data.count === 1) ? self.options.itemText : self.options.itemsText;
2680
+ var rowHTML = '';
2681
+
2682
+ self.$footerchildren.toggle(data.count > 0);
2683
+
2684
+ self.$pageinput.val(data.page);
2685
+ self.$pageslabel.text(data.pages);
2686
+ self.$countlabel.text(data.count + ' ' + itemdesc);
2687
+ self.$startlabel.text(data.start);
2688
+ self.$endlabel.text(data.end);
2689
+
2690
+ self.updatePageDropdown(data);
2691
+ self.updatePageButtons(data);
2692
+
2693
+ $.each(data.data, function (index, row) {
2694
+ rowHTML += '<tr>';
2695
+ $.each(self.columns, function (index, column) {
2696
+ rowHTML += '<td>' + row[column.property] + '</td>';
2697
+ });
2698
+ rowHTML += '</tr>';
2699
+ });
2700
+
2701
+ if (!rowHTML) rowHTML = self.placeholderRowHTML('0 ' + self.options.itemsText);
2702
+
2703
+ self.$tbody.html(rowHTML);
2704
+ self.$element.trigger('loaded');
2705
+ });
2706
+
2707
+ },
2708
+
2709
+ placeholderRowHTML: function (content) {
2710
+ return '<tr><td style="text-align:center;padding:20px;" colspan="' +
2711
+ this.columns.length + '">' + content + '</td></tr>';
2712
+ },
2713
+
2714
+ headerClicked: function (e) {
2715
+ var $target = $(e.target);
2716
+ if (!$target.hasClass('sortable')) return;
2717
+
2718
+ var direction = this.options.dataOptions.sortDirection;
2719
+ var sort = this.options.dataOptions.sortProperty;
2720
+ var property = $target.data('property');
2721
+
2722
+ if (sort === property) {
2723
+ this.options.dataOptions.sortDirection = (direction === 'asc') ? 'desc' : 'asc';
2724
+ } else {
2725
+ this.options.dataOptions.sortDirection = 'asc';
2726
+ this.options.dataOptions.sortProperty = property;
2727
+ }
2728
+
2729
+ this.options.dataOptions.pageIndex = 0;
2730
+ this.updateColumns($target, this.options.dataOptions.sortDirection);
2731
+ this.renderData();
2732
+ },
2733
+
2734
+ pagesizeChanged: function (e) {
2735
+ this.options.dataOptions.pageSize = parseInt($(e.target).val(), 10);
2736
+ this.options.dataOptions.pageIndex = 0;
2737
+ this.renderData();
2738
+ },
2739
+
2740
+ pageChanged: function (e) {
2741
+ this.options.dataOptions.pageIndex = parseInt($(e.target).val(), 10) - 1;
2742
+ this.renderData();
2743
+ },
2744
+
2745
+ searchChanged: function (e, search) {
2746
+ this.options.dataOptions.search = search;
2747
+ this.options.dataOptions.pageIndex = 0;
2748
+ this.renderData();
2749
+ },
2750
+
2751
+ previous: function () {
2752
+ this.options.dataOptions.pageIndex--;
2753
+ this.renderData();
2754
+ },
2755
+
2756
+ next: function () {
2757
+ this.options.dataOptions.pageIndex++;
2758
+ this.renderData();
2759
+ }
2760
+
2761
+ };
2762
+
2763
+
2764
+ // DATAGRID PLUGIN DEFINITION
2765
+
2766
+ $.fn.datagrid = function (option) {
2767
+ return this.each(function () {
2768
+ var $this = $(this);
2769
+ var data = $this.data('datagrid');
2770
+ var options = typeof option === 'object' && option;
2771
+
2772
+ if (!data) $this.data('datagrid', (data = new Datagrid(this, options)));
2773
+ if (typeof option === 'string') data[option]();
2774
+ });
2775
+ };
2776
+
2777
+ $.fn.datagrid.defaults = {
2778
+ dataOptions: { pageIndex: 0, pageSize: 10 },
2779
+ loadingHTML: '<div class="progress progress-striped active" style="width:50%;margin:auto;"><div class="bar" style="width:100%;"></div></div>',
2780
+ itemsText: 'items',
2781
+ itemText: 'item'
2782
+ };
2783
+
2784
+ $.fn.datagrid.Constructor = Datagrid;
2785
+
2786
+ });
2787
+ /*
2788
+ * Fuel UX Pillbox
2789
+ * https://github.com/ExactTarget/fuelux
2790
+ *
2791
+ * Copyright (c) 2012 ExactTarget
2792
+ * Licensed under the MIT license.
2793
+ */
2794
+
2795
+ define('fuelux/pillbox',['require','jquery'],function(require) {
2796
+
2797
+ var $ = require('jquery');
2798
+
2799
+
2800
+ // PILLBOX CONSTRUCTOR AND PROTOTYPE
2801
+
2802
+ var Pillbox = function (element, options) {
2803
+ this.$element = $(element);
2804
+ this.options = $.extend({}, $.fn.pillbox.defaults, options);
2805
+ this.$element.on('click', 'li', $.proxy(this.itemclicked, this));
2806
+ };
2807
+
2808
+ Pillbox.prototype = {
2809
+ constructor: Pillbox,
2810
+
2811
+ items: function() {
2812
+ return this.$element.find('li').map(function() {
2813
+ var $this = $(this);
2814
+ return $.extend({ text: $this.text() }, $this.data());
2815
+ }).get();
2816
+ },
2817
+
2818
+ itemclicked: function (e) {
2819
+ $(e.currentTarget).remove();
2820
+ e.preventDefault();
2821
+ }
2822
+ };
2823
+
2824
+
2825
+ // PILLBOX PLUGIN DEFINITION
2826
+
2827
+ $.fn.pillbox = function (option) {
2828
+ var methodReturn;
2829
+
2830
+ var $set = this.each(function () {
2831
+ var $this = $(this);
2832
+ var data = $this.data('pillbox');
2833
+ var options = typeof option === 'object' && option;
2834
+
2835
+ if (!data) $this.data('pillbox', (data = new Pillbox(this, options)));
2836
+ if (typeof option === 'string') methodReturn = data[option]();
2837
+ });
2838
+
2839
+ return (methodReturn === undefined) ? $set : methodReturn;
2840
+ };
2841
+
2842
+ $.fn.pillbox.defaults = {};
2843
+
2844
+ $.fn.pillbox.Constructor = Pillbox;
2845
+
2846
+
2847
+ // PILLBOX DATA-API
2848
+
2849
+ $(function () {
2850
+ $('body').on('mousedown.pillbox.data-api', '.pillbox', function (e) {
2851
+ var $this = $(this);
2852
+ if ($this.data('pillbox')) return;
2853
+ $this.pillbox($this.data());
2854
+ });
2855
+ });
2856
+
2857
+ });
2858
+
2859
+
2860
+ /*
2861
+ * Fuel UX Search
2862
+ * https://github.com/ExactTarget/fuelux
2863
+ *
2864
+ * Copyright (c) 2012 ExactTarget
2865
+ * Licensed under the MIT license.
2866
+ */
2867
+
2868
+ define('fuelux/search',['require','jquery'],function(require) {
2869
+
2870
+ var $ = require('jquery');
2871
+
2872
+
2873
+ // SEARCH CONSTRUCTOR AND PROTOTYPE
2874
+
2875
+ var Search = function (element, options) {
2876
+ this.$element = $(element);
2877
+ this.options = $.extend({}, $.fn.search.defaults, options);
2878
+ this.$element.find('button').on('click', $.proxy(this.buttonclicked, this));
2879
+ this.$input = this.$element.find('input').on('keyup', $.proxy(this.keypressed, this));
2880
+ this.$icon = this.$element.find('i');
2881
+ this.activeSearch = '';
2882
+ };
2883
+
2884
+ Search.prototype = {
2885
+
2886
+ constructor: Search,
2887
+
2888
+ search: function (searchText) {
2889
+ this.$icon.attr('class', 'icon-remove');
2890
+ this.activeSearch = searchText;
2891
+ this.$element.trigger('searched', searchText);
2892
+ },
2893
+
2894
+ clear: function () {
2895
+ this.$icon.attr('class', 'icon-search');
2896
+ this.activeSearch = '';
2897
+ this.$input.val('');
2898
+ this.$element.trigger('cleared');
2899
+ },
2900
+
2901
+ action: function () {
2902
+ var val = this.$input.val();
2903
+ var inputEmptyOrUnchanged = val === '' || val === this.activeSearch;
2904
+
2905
+ if (this.activeSearch && inputEmptyOrUnchanged) {
2906
+ this.clear();
2907
+ } else if (val) {
2908
+ this.search(val);
2909
+ }
2910
+ },
2911
+
2912
+ buttonclicked: function (e) {
2913
+ e.preventDefault();
2914
+ this.action();
2915
+ },
2916
+
2917
+ keypressed: function (e) {
2918
+ var val, inputPresentAndUnchanged;
2919
+
2920
+ if (e.which === 13) {
2921
+ e.preventDefault();
2922
+ this.action();
2923
+ } else {
2924
+ val = this.$input.val();
2925
+ inputPresentAndUnchanged = val && (val === this.activeSearch);
2926
+ this.$icon.attr('class', inputPresentAndUnchanged ? 'icon-remove' : 'icon-search');
2927
+ }
2928
+ }
2929
+
2930
+ };
2931
+
2932
+
2933
+ // SEARCH PLUGIN DEFINITION
2934
+
2935
+ $.fn.search = function (option) {
2936
+ return this.each(function () {
2937
+ var $this = $(this);
2938
+ var data = $this.data('search');
2939
+ var options = typeof option === 'object' && option;
2940
+
2941
+ if (!data) $this.data('search', (data = new Search(this, options)));
2942
+ if (typeof option === 'string') data[option]();
2943
+ });
2944
+ };
2945
+
2946
+ $.fn.search.defaults = {};
2947
+
2948
+ $.fn.search.Constructor = Search;
2949
+
2950
+
2951
+ // SEARCH DATA-API
2952
+
2953
+ $(function () {
2954
+ $('body').on('mousedown.search.data-api', '.search', function () {
2955
+ var $this = $(this);
2956
+ if ($this.data('search')) return;
2957
+ $this.search($this.data());
2958
+ });
2959
+ });
2960
+
2961
+ });
2962
+
2963
+ /*
2964
+ * Fuel UX Spinner
2965
+ * https://github.com/ExactTarget/fuelux
2966
+ *
2967
+ * Copyright (c) 2012 ExactTarget
2968
+ * Licensed under the MIT license.
2969
+ */
2970
+
2971
+ define('fuelux/spinner',['require','jquery'],function(require) {
2972
+
2973
+ var $ = require('jquery');
2974
+
2975
+
2976
+ // SPINNER CONSTRUCTOR AND PROTOTYPE
2977
+
2978
+ var Spinner = function (element, options) {
2979
+ this.$element = $(element);
2980
+ this.options = $.extend({}, $.fn.spinner.defaults, options);
2981
+ this.$input = this.$element.find('.spinner-input');
2982
+ this.$element.on('keyup', this.$input, $.proxy(this.change, this));
2983
+
2984
+ if (this.options.hold) {
2985
+ this.$element.on('mousedown', '.spinner-up', $.proxy(function() { this.startSpin(true); } , this));
2986
+ this.$element.on('mouseup', '.spinner-up, .spinner-down', $.proxy(this.stopSpin, this));
2987
+ this.$element.on('mouseout', '.spinner-up, .spinner-down', $.proxy(this.stopSpin, this));
2988
+ this.$element.on('mousedown', '.spinner-down', $.proxy(function() {this.startSpin(false);} , this));
2989
+ } else {
2990
+ this.$element.on('click', '.spinner-up', $.proxy(function() { this.step(true); } , this));
2991
+ this.$element.on('click', '.spinner-down', $.proxy(function() { this.step(false); }, this));
2992
+ }
2993
+
2994
+ this.switches = {
2995
+ count: 1,
2996
+ enabled: true
2997
+ };
2998
+
2999
+ if (this.options.speed === 'medium') {
3000
+ this.switches.speed = 300;
3001
+ } else if (this.options.speed === 'fast') {
3002
+ this.switches.speed = 100;
3003
+ } else {
3004
+ this.switches.speed = 500;
3005
+ }
3006
+
3007
+ this.render();
3008
+
3009
+ if (this.options.disabled) {
3010
+ this.disable();
3011
+ }
3012
+ };
3013
+
3014
+ Spinner.prototype = {
3015
+ constructor: Spinner,
3016
+
3017
+ render: function () {
3018
+ this.$input.val(this.options.value);
3019
+ this.$input.attr('maxlength',(this.options.max + '').split('').length);
3020
+ },
3021
+
3022
+ change: function () {
3023
+ var newVal = this.$input.val();
3024
+
3025
+ if(newVal/1){
3026
+ this.options.value = newVal/1;
3027
+ }else{
3028
+ newVal = newVal.replace(/[^0-9]/g,'');
3029
+ this.$input.val(newVal);
3030
+ this.options.value = newVal/1;
3031
+ }
3032
+
3033
+ this.$element.trigger('change');
3034
+ },
3035
+
3036
+ stopSpin: function () {
3037
+ clearTimeout(this.switches.timeout);
3038
+ this.switches.count = 1;
3039
+ this.$element.trigger('change');
3040
+ },
3041
+
3042
+ startSpin: function (type) {
3043
+
3044
+ if (!this.options.disabled) {
3045
+ var divisor = this.switches.count;
3046
+
3047
+ if (divisor === 1) {
3048
+ this.step(type);
3049
+ divisor = 1;
3050
+ } else if (divisor < 3){
3051
+ divisor = 1.5;
3052
+ } else if (divisor < 8){
3053
+ divisor = 2.5;
3054
+ } else {
3055
+ divisor = 4;
3056
+ }
3057
+
3058
+ this.switches.timeout = setTimeout($.proxy(function() {this.iterator(type);} ,this),this.switches.speed/divisor);
3059
+ this.switches.count++;
3060
+ }
3061
+ },
3062
+
3063
+ iterator: function (type) {
3064
+ this.step(type);
3065
+ this.startSpin(type);
3066
+ },
3067
+
3068
+ step: function (dir) {
3069
+ var curValue = this.options.value;
3070
+ var limValue = dir ? this.options.max : this.options.min;
3071
+
3072
+ if ((dir ? curValue < limValue : curValue > limValue)) {
3073
+ var newVal = curValue + (dir ? 1 : -1) * this.options.step;
3074
+
3075
+ if (dir ? newVal > limValue : newVal < limValue) {
3076
+ this.value(limValue);
3077
+ } else {
3078
+ this.value(newVal);
3079
+ }
3080
+ }
3081
+ },
3082
+
3083
+ value: function (value) {
3084
+ if (value) {
3085
+ this.options.value = value;
3086
+ this.$input.val(value);
3087
+ return this;
3088
+ } else {
3089
+ return this.options.value;
3090
+ }
3091
+ },
3092
+
3093
+ disable: function () {
3094
+ this.options.disabled = true;
3095
+ this.$input.attr('disabled','');
3096
+ this.$element.find('button').addClass('disabled');
3097
+ },
3098
+
3099
+ enable: function () {
3100
+ this.options.disabled = false;
3101
+ this.$input.removeAttr("disabled");
3102
+ this.$element.find('button').removeClass('disabled');
3103
+ }
3104
+ };
3105
+
3106
+
3107
+ // SPINNER PLUGIN DEFINITION
3108
+
3109
+ $.fn.spinner = function (option,value) {
3110
+ var methodReturn;
3111
+
3112
+ var $set = this.each(function () {
3113
+ var $this = $(this);
3114
+ var data = $this.data('spinner');
3115
+ var options = typeof option === 'object' && option;
3116
+
3117
+ if (!data) $this.data('spinner', (data = new Spinner(this, options)));
3118
+ if (typeof option === 'string') methodReturn = data[option](value);
3119
+ });
3120
+
3121
+ return (methodReturn === undefined) ? $set : methodReturn;
3122
+ };
3123
+
3124
+ $.fn.spinner.defaults = {
3125
+ value: 1,
3126
+ min: 1,
3127
+ max: 999,
3128
+ step: 1,
3129
+ hold: true,
3130
+ speed: 'medium',
3131
+ disabled: false
3132
+ };
3133
+
3134
+ $.fn.spinner.Constructor = Spinner;
3135
+
3136
+
3137
+ // SPINNER DATA-API
3138
+
3139
+ $(function () {
3140
+ $('body').on('mousedown.spinner.data-api', '.spinner', function (e) {
3141
+ var $this = $(this);
3142
+ if ($this.data('.spinner')) return;
3143
+ $this.spinner($this.data());
3144
+ });
3145
+ });
3146
+
3147
+ });
3148
+ /*
3149
+ * Fuel UX
3150
+ * https://github.com/ExactTarget/fuelux
3151
+ *
3152
+ * Copyright (c) 2012 ExactTarget
3153
+ * Licensed under the MIT license.
3154
+ */
3155
+
3156
+ define('fuelux/all',['require','jquery','bootstrap/bootstrap-affix','bootstrap/bootstrap-alert','bootstrap/bootstrap-button','bootstrap/bootstrap-carousel','bootstrap/bootstrap-collapse','bootstrap/bootstrap-dropdown','bootstrap/bootstrap-modal','bootstrap/bootstrap-popover','bootstrap/bootstrap-scrollspy','bootstrap/bootstrap-tab','bootstrap/bootstrap-tooltip','bootstrap/bootstrap-transition','bootstrap/bootstrap-typeahead','fuelux/combobox','fuelux/datagrid','fuelux/pillbox','fuelux/search','fuelux/spinner'],function (require) {
3157
+ require('jquery');
3158
+ require('bootstrap/bootstrap-affix');
3159
+ require('bootstrap/bootstrap-alert');
3160
+ require('bootstrap/bootstrap-button');
3161
+ require('bootstrap/bootstrap-carousel');
3162
+ require('bootstrap/bootstrap-collapse');
3163
+ require('bootstrap/bootstrap-dropdown');
3164
+ require('bootstrap/bootstrap-modal');
3165
+ require('bootstrap/bootstrap-popover');
3166
+ require('bootstrap/bootstrap-scrollspy');
3167
+ require('bootstrap/bootstrap-tab');
3168
+ require('bootstrap/bootstrap-tooltip');
3169
+ require('bootstrap/bootstrap-transition');
3170
+ require('bootstrap/bootstrap-typeahead');
3171
+ require('fuelux/combobox');
3172
+ require('fuelux/datagrid');
3173
+ require('fuelux/pillbox');
3174
+ require('fuelux/search');
3175
+ require('fuelux/spinner');
3176
+ });
3177
+
3178
+ /*
3179
+ * Fuel UX
3180
+ * https://github.com/ExactTarget/fuelux
3181
+ *
3182
+ * Copyright (c) 2012 ExactTarget
3183
+ * Licensed under the MIT license.
3184
+ */
3185
+
3186
+ define('jquery', [], function () { return jQuery; });
3187
+
3188
+ define('fuelux/loader', ['fuelux/all'], function () {});
3189
+
3190
+ require('fuelux/loader');