semantic-ui-sass 0.19.3.1 → 1.7.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/README.md +5 -6
- data/app/assets/fonts/semantic-ui/icons.eot +0 -0
- data/app/assets/fonts/semantic-ui/icons.otf +0 -0
- data/app/assets/fonts/semantic-ui/icons.svg +472 -367
- data/app/assets/fonts/semantic-ui/icons.ttf +0 -0
- data/app/assets/fonts/semantic-ui/icons.woff +0 -0
- data/app/assets/images/semantic-ui/flags.png +0 -0
- data/app/assets/javascripts/semantic-ui.js +9 -5
- data/app/assets/javascripts/semantic-ui/accordion.js +169 -102
- data/app/assets/javascripts/semantic-ui/api.js +840 -0
- data/app/assets/javascripts/semantic-ui/checkbox.js +203 -46
- data/app/assets/javascripts/semantic-ui/{behavior/colorize.js → colorize.js} +4 -2
- data/app/assets/javascripts/semantic-ui/dimmer.js +110 -76
- data/app/assets/javascripts/semantic-ui/dropdown.js +897 -285
- data/app/assets/javascripts/semantic-ui/{behavior/form.js → form.js} +127 -42
- data/app/assets/javascripts/semantic-ui/modal.js +294 -219
- data/app/assets/javascripts/semantic-ui/nag.js +120 -186
- data/app/assets/javascripts/semantic-ui/popup.js +491 -223
- data/app/assets/javascripts/semantic-ui/progress.js +779 -0
- data/app/assets/javascripts/semantic-ui/rating.js +66 -22
- data/app/assets/javascripts/semantic-ui/search.js +219 -99
- data/app/assets/javascripts/semantic-ui/shape.js +72 -29
- data/app/assets/javascripts/semantic-ui/sidebar.js +678 -142
- data/app/assets/javascripts/semantic-ui/site.js +487 -0
- data/app/assets/javascripts/semantic-ui/{behavior/state.js → state.js} +116 -151
- data/app/assets/javascripts/semantic-ui/sticky.js +771 -0
- data/app/assets/javascripts/semantic-ui/tab.js +680 -603
- data/app/assets/javascripts/semantic-ui/transition.js +269 -158
- data/app/assets/javascripts/semantic-ui/video.js +113 -32
- data/app/assets/javascripts/semantic-ui/visibility.js +970 -0
- data/app/assets/javascripts/semantic-ui/visit.js +513 -0
- data/app/assets/stylesheets/semantic-ui.scss +2 -0
- data/app/assets/stylesheets/semantic-ui/collections/_breadcrumb.scss +58 -14
- data/app/assets/stylesheets/semantic-ui/collections/_form.scss +464 -372
- data/app/assets/stylesheets/semantic-ui/collections/_grid.scss +1385 -533
- data/app/assets/stylesheets/semantic-ui/collections/_menu.scss +482 -655
- data/app/assets/stylesheets/semantic-ui/collections/_message.scss +238 -139
- data/app/assets/stylesheets/semantic-ui/collections/_table.scss +631 -280
- data/app/assets/stylesheets/semantic-ui/elements/_all.scss +3 -2
- data/app/assets/stylesheets/semantic-ui/elements/_button.scss +1614 -657
- data/app/assets/stylesheets/semantic-ui/elements/_divider.scss +143 -80
- data/app/assets/stylesheets/semantic-ui/elements/_flag.scss +1018 -0
- data/app/assets/stylesheets/semantic-ui/elements/_header.scss +302 -145
- data/app/assets/stylesheets/semantic-ui/elements/_icon.scss +1653 -1365
- data/app/assets/stylesheets/semantic-ui/elements/_image.scss +160 -59
- data/app/assets/stylesheets/semantic-ui/elements/_input.scss +247 -118
- data/app/assets/stylesheets/semantic-ui/elements/_label.scss +501 -470
- data/app/assets/stylesheets/semantic-ui/elements/_list.scss +888 -0
- data/app/assets/stylesheets/semantic-ui/elements/_loader.scss +189 -98
- data/app/assets/stylesheets/semantic-ui/elements/_rail.scss +125 -0
- data/app/assets/stylesheets/semantic-ui/elements/_reveal.scss +147 -212
- data/app/assets/stylesheets/semantic-ui/elements/_segment.scss +328 -190
- data/app/assets/stylesheets/semantic-ui/elements/_step.scss +261 -185
- data/app/assets/stylesheets/semantic-ui/globals/_all.scss +2 -0
- data/app/assets/stylesheets/semantic-ui/globals/_reset.scss +430 -0
- data/app/assets/stylesheets/semantic-ui/globals/_site.scss +128 -0
- data/app/assets/stylesheets/semantic-ui/modules/_accordion.scss +190 -106
- data/app/assets/stylesheets/semantic-ui/modules/_all.scss +2 -1
- data/app/assets/stylesheets/semantic-ui/modules/_checkbox.scss +303 -201
- data/app/assets/stylesheets/semantic-ui/modules/_dimmer.scss +72 -63
- data/app/assets/stylesheets/semantic-ui/modules/_dropdown.scss +711 -331
- data/app/assets/stylesheets/semantic-ui/modules/_modal.scss +262 -140
- data/app/assets/stylesheets/semantic-ui/modules/_nag.scss +82 -71
- data/app/assets/stylesheets/semantic-ui/modules/_popup.scss +163 -119
- data/app/assets/stylesheets/semantic-ui/modules/_progress.scss +435 -0
- data/app/assets/stylesheets/semantic-ui/modules/_rating.scss +163 -68
- data/app/assets/stylesheets/semantic-ui/modules/_search.scss +223 -150
- data/app/assets/stylesheets/semantic-ui/modules/_shape.scss +39 -40
- data/app/assets/stylesheets/semantic-ui/modules/_sidebar.scss +413 -147
- data/app/assets/stylesheets/semantic-ui/modules/_sticky.scss +80 -0
- data/app/assets/stylesheets/semantic-ui/modules/_tab.scss +49 -20
- data/app/assets/stylesheets/semantic-ui/modules/_transition.scss +542 -568
- data/app/assets/stylesheets/semantic-ui/modules/_video.scss +69 -37
- data/app/assets/stylesheets/semantic-ui/views/_ad.scss +265 -0
- data/app/assets/stylesheets/semantic-ui/views/_all.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/views/_card.scss +758 -0
- data/app/assets/stylesheets/semantic-ui/views/_comment.scss +133 -92
- data/app/assets/stylesheets/semantic-ui/views/_feed.scss +200 -87
- data/app/assets/stylesheets/semantic-ui/views/_item.scss +298 -523
- data/app/assets/stylesheets/semantic-ui/views/_statistic.scss +390 -12
- data/lib/semantic/ui/sass/version.rb +2 -2
- data/tasks/converter.rb +99 -216
- metadata +22 -27
- data/app/assets/fonts/semantic-ui/basic.icons.eot +0 -0
- data/app/assets/fonts/semantic-ui/basic.icons.svg +0 -450
- data/app/assets/fonts/semantic-ui/basic.icons.ttf +0 -0
- data/app/assets/fonts/semantic-ui/basic.icons.woff +0 -0
- data/app/assets/images/semantic-ui/loader-large-inverted.gif +0 -0
- data/app/assets/images/semantic-ui/loader-large.gif +0 -0
- data/app/assets/images/semantic-ui/loader-medium-inverted.gif +0 -0
- data/app/assets/images/semantic-ui/loader-medium.gif +0 -0
- data/app/assets/images/semantic-ui/loader-mini-inverted.gif +0 -0
- data/app/assets/images/semantic-ui/loader-mini.gif +0 -0
- data/app/assets/images/semantic-ui/loader-small-inverted.gif +0 -0
- data/app/assets/images/semantic-ui/loader-small.gif +0 -0
- data/app/assets/javascripts/semantic-ui/behavior/api.js +0 -634
- data/app/assets/javascripts/semantic-ui/chatroom.js +0 -772
- data/app/assets/stylesheets/semantic-ui/depends/_basic.icon.scss +0 -4
- data/app/assets/stylesheets/semantic-ui/depends/_icon.scss +0 -4
- data/app/assets/stylesheets/semantic-ui/depends/_loader.scss +0 -8
- data/app/assets/stylesheets/semantic-ui/elements/_basic.icon.scss +0 -1124
- data/app/assets/stylesheets/semantic-ui/elements/_progress.scss +0 -280
- data/app/assets/stylesheets/semantic-ui/modules/_chatroom.scss +0 -299
- data/app/assets/stylesheets/semantic-ui/modules/_reveal.scss +0 -322
- data/app/assets/stylesheets/semantic-ui/views/_list.scss +0 -700
@@ -0,0 +1,487 @@
|
|
1
|
+
/*
|
2
|
+
* # Semantic - Site
|
3
|
+
* http://github.com/semantic-org/semantic-ui/
|
4
|
+
*
|
5
|
+
*
|
6
|
+
* Copyright 2014 Contributor
|
7
|
+
* Released under the MIT license
|
8
|
+
* http://opensource.org/licenses/MIT
|
9
|
+
*
|
10
|
+
*/
|
11
|
+
;(function ( $, window, document, undefined ) {
|
12
|
+
|
13
|
+
$.site = $.fn.site = function(parameters) {
|
14
|
+
var
|
15
|
+
time = new Date().getTime(),
|
16
|
+
performance = [],
|
17
|
+
|
18
|
+
query = arguments[0],
|
19
|
+
methodInvoked = (typeof query == 'string'),
|
20
|
+
queryArguments = [].slice.call(arguments, 1),
|
21
|
+
|
22
|
+
settings = ( $.isPlainObject(parameters) )
|
23
|
+
? $.extend(true, {}, $.site.settings, parameters)
|
24
|
+
: $.extend({}, $.site.settings),
|
25
|
+
|
26
|
+
namespace = settings.namespace,
|
27
|
+
error = settings.error,
|
28
|
+
|
29
|
+
eventNamespace = '.' + namespace,
|
30
|
+
moduleNamespace = 'module-' + namespace,
|
31
|
+
|
32
|
+
$document = $(document),
|
33
|
+
$module = $document,
|
34
|
+
element = this,
|
35
|
+
instance = $module.data(moduleNamespace),
|
36
|
+
|
37
|
+
module,
|
38
|
+
returnedValue
|
39
|
+
;
|
40
|
+
module = {
|
41
|
+
|
42
|
+
initialize: function() {
|
43
|
+
module.instantiate();
|
44
|
+
},
|
45
|
+
|
46
|
+
instantiate: function() {
|
47
|
+
module.verbose('Storing instance of site', module);
|
48
|
+
instance = module;
|
49
|
+
$module
|
50
|
+
.data(moduleNamespace, module)
|
51
|
+
;
|
52
|
+
},
|
53
|
+
|
54
|
+
normalize: function() {
|
55
|
+
module.fix.console();
|
56
|
+
module.fix.requestAnimationFrame();
|
57
|
+
},
|
58
|
+
|
59
|
+
fix: {
|
60
|
+
console: function() {
|
61
|
+
module.debug('Normalizing window.console');
|
62
|
+
if (console === undefined || console.log === undefined) {
|
63
|
+
module.verbose('Console not available, normalizing events');
|
64
|
+
module.disable.console();
|
65
|
+
}
|
66
|
+
if (typeof console.group == 'undefined' || typeof console.groupEnd == 'undefined' || typeof console.groupCollapsed == 'undefined') {
|
67
|
+
module.verbose('Console group not available, normalizing events');
|
68
|
+
window.console.group = function() {};
|
69
|
+
window.console.groupEnd = function() {};
|
70
|
+
window.console.groupCollapsed = function() {};
|
71
|
+
}
|
72
|
+
if (typeof console.markTimeline == 'undefined') {
|
73
|
+
module.verbose('Mark timeline not available, normalizing events');
|
74
|
+
window.console.markTimeline = function() {};
|
75
|
+
}
|
76
|
+
},
|
77
|
+
consoleClear: function() {
|
78
|
+
module.debug('Disabling programmatic console clearing');
|
79
|
+
window.console.clear = function() {};
|
80
|
+
},
|
81
|
+
requestAnimationFrame: function() {
|
82
|
+
module.debug('Normalizing requestAnimationFrame');
|
83
|
+
if(window.requestAnimationFrame === undefined) {
|
84
|
+
module.debug('RequestAnimationFrame not available, normailizing event');
|
85
|
+
window.requestAnimationFrame = window.requestAnimationFrame
|
86
|
+
|| window.mozRequestAnimationFrame
|
87
|
+
|| window.webkitRequestAnimationFrame
|
88
|
+
|| window.msRequestAnimationFrame
|
89
|
+
|| function(callback) { setTimeout(callback, 0); }
|
90
|
+
;
|
91
|
+
}
|
92
|
+
}
|
93
|
+
},
|
94
|
+
|
95
|
+
moduleExists: function(name) {
|
96
|
+
return ($.fn[name] !== undefined && $.fn[name].settings !== undefined);
|
97
|
+
},
|
98
|
+
|
99
|
+
enabled: {
|
100
|
+
modules: function(modules) {
|
101
|
+
var
|
102
|
+
enabledModules = []
|
103
|
+
;
|
104
|
+
modules = modules || settings.modules;
|
105
|
+
$.each(modules, function(index, name) {
|
106
|
+
if(module.moduleExists(name)) {
|
107
|
+
enabledModules.push(name);
|
108
|
+
}
|
109
|
+
});
|
110
|
+
return enabledModules;
|
111
|
+
}
|
112
|
+
},
|
113
|
+
|
114
|
+
disabled: {
|
115
|
+
modules: function(modules) {
|
116
|
+
var
|
117
|
+
disabledModules = []
|
118
|
+
;
|
119
|
+
modules = modules || settings.modules;
|
120
|
+
$.each(modules, function(index, name) {
|
121
|
+
if(!module.moduleExists(name)) {
|
122
|
+
disabledModules.push(name);
|
123
|
+
}
|
124
|
+
});
|
125
|
+
return disabledModules;
|
126
|
+
}
|
127
|
+
},
|
128
|
+
|
129
|
+
change: {
|
130
|
+
setting: function(setting, value, modules, modifyExisting) {
|
131
|
+
modules = (typeof modules === 'string')
|
132
|
+
? (modules === 'all')
|
133
|
+
? settings.modules
|
134
|
+
: [modules]
|
135
|
+
: modules || settings.modules
|
136
|
+
;
|
137
|
+
modifyExisting = (modifyExisting !== undefined)
|
138
|
+
? modifyExisting
|
139
|
+
: true
|
140
|
+
;
|
141
|
+
$.each(modules, function(index, name) {
|
142
|
+
var
|
143
|
+
namespace = (module.moduleExists(name))
|
144
|
+
? $.fn[name].settings.namespace || false
|
145
|
+
: true,
|
146
|
+
$existingModules
|
147
|
+
;
|
148
|
+
if(module.moduleExists(name)) {
|
149
|
+
module.verbose('Changing default setting', setting, value, name);
|
150
|
+
$.fn[name].settings[setting] = value;
|
151
|
+
if(modifyExisting && namespace) {
|
152
|
+
$existingModules = $(':data(module-' + namespace + ')');
|
153
|
+
if($existingModules.size() > 0) {
|
154
|
+
module.verbose('Modifying existing settings', $existingModules);
|
155
|
+
$existingModules[name]('setting', setting, value);
|
156
|
+
}
|
157
|
+
}
|
158
|
+
}
|
159
|
+
});
|
160
|
+
},
|
161
|
+
settings: function(newSettings, modules, modifyExisting) {
|
162
|
+
modules = (typeof modules === 'string')
|
163
|
+
? [modules]
|
164
|
+
: modules || settings.modules
|
165
|
+
;
|
166
|
+
modifyExisting = (modifyExisting !== undefined)
|
167
|
+
? modifyExisting
|
168
|
+
: true
|
169
|
+
;
|
170
|
+
$.each(modules, function(index, name) {
|
171
|
+
var
|
172
|
+
$existingModules
|
173
|
+
;
|
174
|
+
if(module.moduleExists(name)) {
|
175
|
+
module.verbose('Changing default setting', newSettings, name);
|
176
|
+
$.extend(true, $.fn[name].settings, newSettings);
|
177
|
+
if(modifyExisting && namespace) {
|
178
|
+
$existingModules = $(':data(module-' + namespace + ')');
|
179
|
+
if($existingModules.size() > 0) {
|
180
|
+
module.verbose('Modifying existing settings', $existingModules);
|
181
|
+
$existingModules[name]('setting', newSettings);
|
182
|
+
}
|
183
|
+
}
|
184
|
+
}
|
185
|
+
});
|
186
|
+
}
|
187
|
+
},
|
188
|
+
|
189
|
+
enable: {
|
190
|
+
console: function() {
|
191
|
+
module.console(true);
|
192
|
+
},
|
193
|
+
debug: function(modules, modifyExisting) {
|
194
|
+
modules = modules || settings.modules;
|
195
|
+
module.debug('Enabling debug for modules', modules);
|
196
|
+
module.change.setting('debug', true, modules, modifyExisting);
|
197
|
+
},
|
198
|
+
verbose: function(modules, modifyExisting) {
|
199
|
+
modules = modules || settings.modules;
|
200
|
+
module.debug('Enabling verbose debug for modules', modules);
|
201
|
+
module.change.setting('verbose', true, modules, modifyExisting);
|
202
|
+
}
|
203
|
+
},
|
204
|
+
disable: {
|
205
|
+
console: function() {
|
206
|
+
module.console(false);
|
207
|
+
},
|
208
|
+
debug: function(modules, modifyExisting) {
|
209
|
+
modules = modules || settings.modules;
|
210
|
+
module.debug('Disabling debug for modules', modules);
|
211
|
+
module.change.setting('debug', false, modules, modifyExisting);
|
212
|
+
},
|
213
|
+
verbose: function(modules, modifyExisting) {
|
214
|
+
modules = modules || settings.modules;
|
215
|
+
module.debug('Disabling verbose debug for modules', modules);
|
216
|
+
module.change.setting('verbose', false, modules, modifyExisting);
|
217
|
+
}
|
218
|
+
},
|
219
|
+
|
220
|
+
console: function(enable) {
|
221
|
+
if(enable) {
|
222
|
+
if(instance.cache.console === undefined) {
|
223
|
+
module.error(error.console);
|
224
|
+
return;
|
225
|
+
}
|
226
|
+
module.debug('Restoring console function');
|
227
|
+
window.console = instance.cache.console;
|
228
|
+
}
|
229
|
+
else {
|
230
|
+
module.debug('Disabling console function');
|
231
|
+
instance.cache.console = window.console;
|
232
|
+
window.console = {
|
233
|
+
clear : function(){},
|
234
|
+
error : function(){},
|
235
|
+
group : function(){},
|
236
|
+
groupCollapsed : function(){},
|
237
|
+
groupEnd : function(){},
|
238
|
+
info : function(){},
|
239
|
+
log : function(){},
|
240
|
+
markTimeline : function(){},
|
241
|
+
warn : function(){}
|
242
|
+
};
|
243
|
+
}
|
244
|
+
},
|
245
|
+
|
246
|
+
destroy: function() {
|
247
|
+
module.verbose('Destroying previous site for', $module);
|
248
|
+
$module
|
249
|
+
.removeData(moduleNamespace)
|
250
|
+
;
|
251
|
+
},
|
252
|
+
|
253
|
+
cache: {},
|
254
|
+
|
255
|
+
setting: function(name, value) {
|
256
|
+
if( $.isPlainObject(name) ) {
|
257
|
+
$.extend(true, settings, name);
|
258
|
+
}
|
259
|
+
else if(value !== undefined) {
|
260
|
+
settings[name] = value;
|
261
|
+
}
|
262
|
+
else {
|
263
|
+
return settings[name];
|
264
|
+
}
|
265
|
+
},
|
266
|
+
internal: function(name, value) {
|
267
|
+
if( $.isPlainObject(name) ) {
|
268
|
+
$.extend(true, module, name);
|
269
|
+
}
|
270
|
+
else if(value !== undefined) {
|
271
|
+
module[name] = value;
|
272
|
+
}
|
273
|
+
else {
|
274
|
+
return module[name];
|
275
|
+
}
|
276
|
+
},
|
277
|
+
debug: function() {
|
278
|
+
if(settings.debug) {
|
279
|
+
if(settings.performance) {
|
280
|
+
module.performance.log(arguments);
|
281
|
+
}
|
282
|
+
else {
|
283
|
+
module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');
|
284
|
+
module.debug.apply(console, arguments);
|
285
|
+
}
|
286
|
+
}
|
287
|
+
},
|
288
|
+
verbose: function() {
|
289
|
+
if(settings.verbose && settings.debug) {
|
290
|
+
if(settings.performance) {
|
291
|
+
module.performance.log(arguments);
|
292
|
+
}
|
293
|
+
else {
|
294
|
+
module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');
|
295
|
+
module.verbose.apply(console, arguments);
|
296
|
+
}
|
297
|
+
}
|
298
|
+
},
|
299
|
+
error: function() {
|
300
|
+
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
|
301
|
+
module.error.apply(console, arguments);
|
302
|
+
},
|
303
|
+
performance: {
|
304
|
+
log: function(message) {
|
305
|
+
var
|
306
|
+
currentTime,
|
307
|
+
executionTime,
|
308
|
+
previousTime
|
309
|
+
;
|
310
|
+
if(settings.performance) {
|
311
|
+
currentTime = new Date().getTime();
|
312
|
+
previousTime = time || currentTime;
|
313
|
+
executionTime = currentTime - previousTime;
|
314
|
+
time = currentTime;
|
315
|
+
performance.push({
|
316
|
+
'Element' : element,
|
317
|
+
'Name' : message[0],
|
318
|
+
'Arguments' : [].slice.call(message, 1) || '',
|
319
|
+
'Execution Time' : executionTime
|
320
|
+
});
|
321
|
+
}
|
322
|
+
clearTimeout(module.performance.timer);
|
323
|
+
module.performance.timer = setTimeout(module.performance.display, 100);
|
324
|
+
},
|
325
|
+
display: function() {
|
326
|
+
var
|
327
|
+
title = settings.name + ':',
|
328
|
+
totalTime = 0
|
329
|
+
;
|
330
|
+
time = false;
|
331
|
+
clearTimeout(module.performance.timer);
|
332
|
+
$.each(performance, function(index, data) {
|
333
|
+
totalTime += data['Execution Time'];
|
334
|
+
});
|
335
|
+
title += ' ' + totalTime + 'ms';
|
336
|
+
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
|
337
|
+
console.groupCollapsed(title);
|
338
|
+
if(console.table) {
|
339
|
+
console.table(performance);
|
340
|
+
}
|
341
|
+
else {
|
342
|
+
$.each(performance, function(index, data) {
|
343
|
+
console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
|
344
|
+
});
|
345
|
+
}
|
346
|
+
console.groupEnd();
|
347
|
+
}
|
348
|
+
performance = [];
|
349
|
+
}
|
350
|
+
},
|
351
|
+
invoke: function(query, passedArguments, context) {
|
352
|
+
var
|
353
|
+
object = instance,
|
354
|
+
maxDepth,
|
355
|
+
found,
|
356
|
+
response
|
357
|
+
;
|
358
|
+
passedArguments = passedArguments || queryArguments;
|
359
|
+
context = element || context;
|
360
|
+
if(typeof query == 'string' && object !== undefined) {
|
361
|
+
query = query.split(/[\. ]/);
|
362
|
+
maxDepth = query.length - 1;
|
363
|
+
$.each(query, function(depth, value) {
|
364
|
+
var camelCaseValue = (depth != maxDepth)
|
365
|
+
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
366
|
+
: query
|
367
|
+
;
|
368
|
+
if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
|
369
|
+
object = object[camelCaseValue];
|
370
|
+
}
|
371
|
+
else if( object[camelCaseValue] !== undefined ) {
|
372
|
+
found = object[camelCaseValue];
|
373
|
+
return false;
|
374
|
+
}
|
375
|
+
else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
|
376
|
+
object = object[value];
|
377
|
+
}
|
378
|
+
else if( object[value] !== undefined ) {
|
379
|
+
found = object[value];
|
380
|
+
return false;
|
381
|
+
}
|
382
|
+
else {
|
383
|
+
module.error(error.method, query);
|
384
|
+
return false;
|
385
|
+
}
|
386
|
+
});
|
387
|
+
}
|
388
|
+
if ( $.isFunction( found ) ) {
|
389
|
+
response = found.apply(context, passedArguments);
|
390
|
+
}
|
391
|
+
else if(found !== undefined) {
|
392
|
+
response = found;
|
393
|
+
}
|
394
|
+
if($.isArray(returnedValue)) {
|
395
|
+
returnedValue.push(response);
|
396
|
+
}
|
397
|
+
else if(returnedValue !== undefined) {
|
398
|
+
returnedValue = [returnedValue, response];
|
399
|
+
}
|
400
|
+
else if(response !== undefined) {
|
401
|
+
returnedValue = response;
|
402
|
+
}
|
403
|
+
return found;
|
404
|
+
}
|
405
|
+
};
|
406
|
+
|
407
|
+
if(methodInvoked) {
|
408
|
+
if(instance === undefined) {
|
409
|
+
module.initialize();
|
410
|
+
}
|
411
|
+
module.invoke(query);
|
412
|
+
}
|
413
|
+
else {
|
414
|
+
if(instance !== undefined) {
|
415
|
+
module.destroy();
|
416
|
+
}
|
417
|
+
module.initialize();
|
418
|
+
}
|
419
|
+
return (returnedValue !== undefined)
|
420
|
+
? returnedValue
|
421
|
+
: this
|
422
|
+
;
|
423
|
+
};
|
424
|
+
|
425
|
+
$.site.settings = {
|
426
|
+
|
427
|
+
name : 'Site',
|
428
|
+
namespace : 'site',
|
429
|
+
|
430
|
+
error : {
|
431
|
+
console : 'Console cannot be restored, most likely it was overwritten outside of module',
|
432
|
+
method : 'The method you called is not defined.'
|
433
|
+
},
|
434
|
+
|
435
|
+
debug : false,
|
436
|
+
verbose : true,
|
437
|
+
performance : true,
|
438
|
+
|
439
|
+
modules: [
|
440
|
+
'accordion',
|
441
|
+
'api',
|
442
|
+
'checkbox',
|
443
|
+
'dimmer',
|
444
|
+
'dropdown',
|
445
|
+
'form',
|
446
|
+
'modal',
|
447
|
+
'nag',
|
448
|
+
'popup',
|
449
|
+
'rating',
|
450
|
+
'shape',
|
451
|
+
'sidebar',
|
452
|
+
'state',
|
453
|
+
'sticky',
|
454
|
+
'tab',
|
455
|
+
'transition',
|
456
|
+
'video',
|
457
|
+
'visit',
|
458
|
+
'visibility'
|
459
|
+
],
|
460
|
+
|
461
|
+
siteNamespace : 'site',
|
462
|
+
namespaceStub : {
|
463
|
+
cache : {},
|
464
|
+
config : {},
|
465
|
+
sections : {},
|
466
|
+
section : {},
|
467
|
+
utilities : {}
|
468
|
+
}
|
469
|
+
|
470
|
+
};
|
471
|
+
|
472
|
+
// allows for selection of elements with data attributes
|
473
|
+
$.extend($.expr[ ":" ], {
|
474
|
+
data: ($.expr.createPseudo)
|
475
|
+
? $.expr.createPseudo(function(dataName) {
|
476
|
+
return function(elem) {
|
477
|
+
return !!$.data(elem, dataName);
|
478
|
+
};
|
479
|
+
})
|
480
|
+
: function(elem, i, match) {
|
481
|
+
// support: jQuery < 1.8
|
482
|
+
return !!$.data(elem, match[ 3 ]);
|
483
|
+
}
|
484
|
+
});
|
485
|
+
|
486
|
+
|
487
|
+
})( jQuery, window , document );
|