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