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,558 +1,552 @@
|
|
1
1
|
/*!
|
2
2
|
* # Fomantic-UI - Nag
|
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
|
-
'use strict';
|
14
|
-
|
15
|
-
$.isFunction = $.isFunction || function(obj) {
|
16
|
-
return typeof obj === "function" && typeof obj.nodeType !== "number";
|
17
|
-
};
|
18
|
-
|
19
|
-
window = (typeof window != 'undefined' && window.Math == Math)
|
20
|
-
? window
|
21
|
-
: (typeof self != 'undefined' && self.Math == Math)
|
22
|
-
? self
|
23
|
-
: Function('return this')()
|
24
|
-
;
|
25
|
-
|
26
|
-
$.fn.nag = function(parameters) {
|
27
|
-
var
|
28
|
-
$allModules = $(this),
|
29
|
-
moduleSelector = $allModules.selector || '',
|
30
|
-
|
31
|
-
time = new Date().getTime(),
|
32
|
-
performance = [],
|
33
|
-
|
34
|
-
query = arguments[0],
|
35
|
-
methodInvoked = (typeof query == 'string'),
|
36
|
-
queryArguments = [].slice.call(arguments, 1),
|
37
|
-
returnedValue
|
38
|
-
;
|
39
|
-
$allModules
|
40
|
-
.each(function() {
|
41
|
-
var
|
42
|
-
settings = ( $.isPlainObject(parameters) )
|
43
|
-
? $.extend(true, {}, $.fn.nag.settings, parameters)
|
44
|
-
: $.extend({}, $.fn.nag.settings),
|
45
|
-
|
46
|
-
selector = settings.selector,
|
47
|
-
error = settings.error,
|
48
|
-
namespace = settings.namespace,
|
49
|
-
|
50
|
-
eventNamespace = '.' + namespace,
|
51
|
-
moduleNamespace = namespace + '-module',
|
52
|
-
|
53
|
-
$module = $(this),
|
54
|
-
|
55
|
-
$context = (settings.context)
|
56
|
-
? $(settings.context)
|
57
|
-
: $('body'),
|
58
|
-
|
59
|
-
element = this,
|
60
|
-
instance = $module.data(moduleNamespace),
|
61
|
-
storage,
|
62
|
-
module
|
63
|
-
;
|
64
|
-
module = {
|
65
|
-
|
66
|
-
initialize: function() {
|
67
|
-
module.verbose('Initializing element');
|
68
|
-
storage = module.get.storage();
|
69
|
-
$module
|
70
|
-
.on('click' + eventNamespace, selector.close, module.dismiss)
|
71
|
-
.data(moduleNamespace, module)
|
72
|
-
;
|
73
|
-
|
74
|
-
if(settings.detachable && $module.parent()[0] !== $context[0]) {
|
75
|
-
$module
|
76
|
-
.detach()
|
77
|
-
.prependTo($context)
|
78
|
-
;
|
79
|
-
}
|
11
|
+
(function ($, window, document) {
|
12
|
+
'use strict';
|
80
13
|
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
module.show();
|
85
|
-
},
|
14
|
+
function isFunction(obj) {
|
15
|
+
return typeof obj === 'function' && typeof obj.nodeType !== 'number';
|
16
|
+
}
|
86
17
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
.removeData(moduleNamespace)
|
91
|
-
.off(eventNamespace)
|
92
|
-
;
|
93
|
-
},
|
18
|
+
window = window !== undefined && window.Math === Math
|
19
|
+
? window
|
20
|
+
: globalThis;
|
94
21
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
return false;
|
100
|
-
}
|
101
|
-
module.debug('Showing nag', settings.animation.show);
|
102
|
-
if(settings.animation.show === 'fade') {
|
103
|
-
$module
|
104
|
-
.fadeIn(settings.duration, settings.easing, settings.onVisible)
|
105
|
-
;
|
106
|
-
}
|
107
|
-
else {
|
108
|
-
$module
|
109
|
-
.slideDown(settings.duration, settings.easing, settings.onVisible)
|
110
|
-
;
|
111
|
-
}
|
112
|
-
}
|
113
|
-
},
|
22
|
+
$.fn.nag = function (parameters) {
|
23
|
+
var
|
24
|
+
$allModules = $(this),
|
25
|
+
moduleSelector = $allModules.selector || '',
|
114
26
|
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
27
|
+
time = Date.now(),
|
28
|
+
performance = [],
|
29
|
+
|
30
|
+
query = arguments[0],
|
31
|
+
methodInvoked = typeof query === 'string',
|
32
|
+
queryArguments = [].slice.call(arguments, 1),
|
33
|
+
returnedValue
|
34
|
+
;
|
35
|
+
$allModules.each(function () {
|
36
|
+
var
|
37
|
+
settings = $.isPlainObject(parameters)
|
38
|
+
? $.extend(true, {}, $.fn.nag.settings, parameters)
|
39
|
+
: $.extend({}, $.fn.nag.settings),
|
40
|
+
|
41
|
+
selector = settings.selector,
|
42
|
+
error = settings.error,
|
43
|
+
namespace = settings.namespace,
|
44
|
+
|
45
|
+
eventNamespace = '.' + namespace,
|
46
|
+
moduleNamespace = namespace + '-module',
|
47
|
+
|
48
|
+
$module = $(this),
|
49
|
+
|
50
|
+
$context = settings.context
|
51
|
+
? ([window, document].indexOf(settings.context) < 0 ? $(document).find(settings.context) : $(settings.context))
|
52
|
+
: $('body'),
|
53
|
+
|
54
|
+
element = this,
|
55
|
+
instance = $module.data(moduleNamespace),
|
56
|
+
storage,
|
57
|
+
module
|
129
58
|
;
|
130
|
-
|
131
|
-
},
|
59
|
+
module = {
|
132
60
|
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
61
|
+
initialize: function () {
|
62
|
+
module.verbose('Initializing element');
|
63
|
+
if (typeof settings.value !== 'string') {
|
64
|
+
settings.value = JSON.stringify(settings.value);
|
65
|
+
}
|
66
|
+
storage = module.get.storage();
|
67
|
+
$module
|
68
|
+
.on('click' + eventNamespace, selector.close, module.dismiss)
|
69
|
+
.data(moduleNamespace, module)
|
70
|
+
;
|
71
|
+
|
72
|
+
if (settings.detachable && $module.parent()[0] !== $context[0]) {
|
73
|
+
$module
|
74
|
+
.detach()
|
75
|
+
.prependTo($context)
|
76
|
+
;
|
77
|
+
}
|
141
78
|
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
}
|
148
|
-
if( module.storage.get(settings.key) != settings.value.toString() ) {
|
149
|
-
module.debug('Stored value is not set, can show nag', module.storage.get(settings.key));
|
150
|
-
return true;
|
151
|
-
}
|
152
|
-
module.debug('Stored value is set, cannot show nag', module.storage.get(settings.key));
|
153
|
-
return false;
|
154
|
-
}
|
155
|
-
},
|
79
|
+
if (settings.displayTime > 0) {
|
80
|
+
setTimeout(module.hide, settings.displayTime);
|
81
|
+
}
|
82
|
+
module.show();
|
83
|
+
},
|
156
84
|
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
key = encodeURIComponent(key)
|
183
|
-
.replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)
|
184
|
-
.replace(/[()]/g, escape);
|
185
|
-
value = encodeURIComponent(value)
|
186
|
-
.replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent);
|
187
|
-
|
188
|
-
var cookieOptions = '';
|
189
|
-
for (var option in options) {
|
190
|
-
if (options.hasOwnProperty(option)) {
|
191
|
-
cookieOptions += '; ' + option;
|
192
|
-
if (typeof options[option] === 'string') {
|
193
|
-
cookieOptions += '=' + options[option].split(';')[0];
|
194
|
-
}
|
85
|
+
destroy: function () {
|
86
|
+
module.verbose('Destroying instance');
|
87
|
+
$module
|
88
|
+
.removeData(moduleNamespace)
|
89
|
+
.off(eventNamespace)
|
90
|
+
;
|
91
|
+
},
|
92
|
+
|
93
|
+
show: function () {
|
94
|
+
if (module.should.show() && !$module.is(':visible')) {
|
95
|
+
if (settings.onShow.call(element) === false) {
|
96
|
+
module.debug('onShow callback returned false, cancelling nag animation');
|
97
|
+
|
98
|
+
return false;
|
99
|
+
}
|
100
|
+
module.debug('Showing nag', settings.animation.show);
|
101
|
+
if (settings.animation.show === 'fade') {
|
102
|
+
$module
|
103
|
+
.fadeIn(settings.duration, settings.easing, settings.onVisible)
|
104
|
+
;
|
105
|
+
} else {
|
106
|
+
$module
|
107
|
+
.slideDown(settings.duration, settings.easing, settings.onVisible)
|
108
|
+
;
|
109
|
+
}
|
195
110
|
}
|
196
|
-
}
|
197
|
-
document.cookie = key + '=' + value + cookieOptions;
|
198
111
|
},
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
112
|
+
|
113
|
+
hide: function () {
|
114
|
+
if (settings.onHide.call(element) === false) {
|
115
|
+
module.debug('onHide callback returned false, cancelling nag animation');
|
116
|
+
|
117
|
+
return false;
|
118
|
+
}
|
119
|
+
module.debug('Hiding nag', settings.animation.hide);
|
120
|
+
if (settings.animation.hide === 'fade') {
|
121
|
+
$module
|
122
|
+
.fadeOut(settings.duration, settings.easing, settings.onHidden)
|
123
|
+
;
|
124
|
+
} else {
|
125
|
+
$module
|
126
|
+
.slideUp(settings.duration, settings.easing, settings.onHidden)
|
127
|
+
;
|
128
|
+
}
|
129
|
+
},
|
130
|
+
|
131
|
+
dismiss: function (event) {
|
132
|
+
if (module.hide() !== false && settings.storageMethod) {
|
133
|
+
module.debug('Dismissing nag', settings.storageMethod, settings.key, settings.value, settings.expires);
|
134
|
+
module.storage.set(settings.key, settings.value);
|
206
135
|
}
|
207
|
-
|
136
|
+
event.stopImmediatePropagation();
|
137
|
+
event.preventDefault();
|
138
|
+
},
|
139
|
+
|
140
|
+
should: {
|
141
|
+
show: function () {
|
142
|
+
if (settings.persist) {
|
143
|
+
module.debug('Persistent nag is set, can show nag');
|
144
|
+
|
145
|
+
return true;
|
146
|
+
}
|
147
|
+
if (module.storage.get(settings.key) != settings.value.toString()) {
|
148
|
+
module.debug('Stored value is not set, can show nag', module.storage.get(settings.key));
|
149
|
+
|
150
|
+
return true;
|
151
|
+
}
|
152
|
+
module.debug('Stored value is set, cannot show nag', module.storage.get(settings.key));
|
153
|
+
|
154
|
+
return false;
|
155
|
+
},
|
156
|
+
},
|
157
|
+
|
158
|
+
get: {
|
159
|
+
expirationDate: function (expires) {
|
160
|
+
if (typeof expires === 'number') {
|
161
|
+
expires = new Date(Date.now() + expires * 864e5);
|
162
|
+
}
|
163
|
+
if (expires instanceof Date && expires.getTime()) {
|
164
|
+
return expires.toUTCString();
|
165
|
+
}
|
166
|
+
|
167
|
+
module.error(error.expiresFormat);
|
168
|
+
},
|
169
|
+
storage: function () {
|
170
|
+
if (settings.storageMethod === 'localstorage' && window.localStorage !== undefined) {
|
171
|
+
module.debug('Using local storage');
|
172
|
+
|
173
|
+
return window.localStorage;
|
174
|
+
}
|
175
|
+
if (settings.storageMethod === 'sessionstorage' && window.sessionStorage !== undefined) {
|
176
|
+
module.debug('Using session storage');
|
177
|
+
|
178
|
+
return window.sessionStorage;
|
179
|
+
}
|
180
|
+
if ('cookie' in document) {
|
181
|
+
module.debug('Using cookie');
|
182
|
+
|
183
|
+
return {
|
184
|
+
setItem: function (key, value, options) {
|
185
|
+
// RFC6265 compliant encoding
|
186
|
+
key = encodeURIComponent(key)
|
187
|
+
.replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)
|
188
|
+
.replace(/[()]/g, escape)
|
189
|
+
;
|
190
|
+
value = encodeURIComponent(value)
|
191
|
+
.replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[B-D])/g, decodeURIComponent)
|
192
|
+
;
|
193
|
+
|
194
|
+
var cookieOptions = '';
|
195
|
+
for (var option in options) {
|
196
|
+
if (Object.prototype.hasOwnProperty.call(options, option)) {
|
197
|
+
cookieOptions += '; ' + option;
|
198
|
+
if (typeof options[option] === 'string') {
|
199
|
+
cookieOptions += '=' + options[option].split(';')[0];
|
200
|
+
}
|
201
|
+
}
|
202
|
+
}
|
203
|
+
document.cookie = key + '=' + value + cookieOptions;
|
204
|
+
},
|
205
|
+
getItem: function (key) {
|
206
|
+
var cookies = document.cookie.split('; ');
|
207
|
+
for (var i = 0, il = cookies.length; i < il; i++) {
|
208
|
+
var
|
209
|
+
parts = cookies[i].split('='),
|
210
|
+
foundKey = parts[0].replace(/(%[\da-f]{2})+/gi, decodeURIComponent)
|
211
|
+
;
|
212
|
+
if (key === foundKey) {
|
213
|
+
return parts[1] || '';
|
214
|
+
}
|
215
|
+
}
|
216
|
+
},
|
217
|
+
removeItem: function (key, options) {
|
218
|
+
storage.setItem(key, '', options);
|
219
|
+
},
|
220
|
+
};
|
221
|
+
}
|
222
|
+
|
223
|
+
module.error(error.noStorage);
|
224
|
+
},
|
225
|
+
storageOptions: function () {
|
226
|
+
var
|
227
|
+
options = {}
|
228
|
+
;
|
229
|
+
if (settings.expires) {
|
230
|
+
options.expires = module.get.expirationDate(settings.expires);
|
231
|
+
}
|
232
|
+
if (settings.domain) {
|
233
|
+
options.domain = settings.domain;
|
234
|
+
}
|
235
|
+
if (settings.path) {
|
236
|
+
options.path = settings.path;
|
237
|
+
}
|
238
|
+
if (settings.secure) {
|
239
|
+
options.secure = settings.secure;
|
240
|
+
}
|
241
|
+
if (settings.samesite) {
|
242
|
+
options.samesite = settings.samesite;
|
243
|
+
}
|
244
|
+
|
245
|
+
return options;
|
246
|
+
},
|
247
|
+
},
|
248
|
+
|
249
|
+
clear: function () {
|
250
|
+
module.storage.remove(settings.key);
|
251
|
+
},
|
252
|
+
|
253
|
+
storage: {
|
254
|
+
set: function (key, value) {
|
255
|
+
var
|
256
|
+
options = module.get.storageOptions()
|
257
|
+
;
|
258
|
+
if (storage === window.localStorage && options.expires) {
|
259
|
+
module.debug('Storing expiration value in localStorage', key, options.expires);
|
260
|
+
storage.setItem(key + settings.expirationKey, options.expires);
|
261
|
+
}
|
262
|
+
module.debug('Value stored', key, value);
|
263
|
+
try {
|
264
|
+
storage.setItem(key, value, options);
|
265
|
+
} catch (e) {
|
266
|
+
module.error(error.setItem, e);
|
267
|
+
}
|
268
|
+
},
|
269
|
+
get: function (key) {
|
270
|
+
var
|
271
|
+
storedValue
|
272
|
+
;
|
273
|
+
storedValue = storage.getItem(key);
|
274
|
+
if (storage === window.localStorage) {
|
275
|
+
var expiration = storage.getItem(key + settings.expirationKey);
|
276
|
+
if (expiration !== null && expiration !== undefined && new Date(expiration) < new Date()) {
|
277
|
+
module.debug('Value in localStorage has expired. Deleting key', key);
|
278
|
+
module.storage.remove(key);
|
279
|
+
storedValue = null;
|
280
|
+
}
|
281
|
+
}
|
282
|
+
if (storedValue === 'undefined' || storedValue === 'null' || storedValue === undefined || storedValue === null) {
|
283
|
+
storedValue = undefined;
|
284
|
+
}
|
285
|
+
|
286
|
+
return storedValue;
|
287
|
+
},
|
288
|
+
remove: function (key) {
|
289
|
+
var
|
290
|
+
options = module.get.storageOptions()
|
291
|
+
;
|
292
|
+
options.expires = module.get.expirationDate(-1);
|
293
|
+
if (storage === window.localStorage) {
|
294
|
+
storage.removeItem(key + settings.expirationKey);
|
295
|
+
}
|
296
|
+
storage.removeItem(key, options);
|
297
|
+
},
|
208
298
|
},
|
209
|
-
|
210
|
-
|
299
|
+
|
300
|
+
setting: function (name, value) {
|
301
|
+
module.debug('Changing setting', name, value);
|
302
|
+
if ($.isPlainObject(name)) {
|
303
|
+
$.extend(true, settings, name);
|
304
|
+
} else if (value !== undefined) {
|
305
|
+
if ($.isPlainObject(settings[name])) {
|
306
|
+
$.extend(true, settings[name], value);
|
307
|
+
} else {
|
308
|
+
settings[name] = value;
|
309
|
+
}
|
310
|
+
} else {
|
311
|
+
return settings[name];
|
312
|
+
}
|
313
|
+
},
|
314
|
+
internal: function (name, value) {
|
315
|
+
if ($.isPlainObject(name)) {
|
316
|
+
$.extend(true, module, name);
|
317
|
+
} else if (value !== undefined) {
|
318
|
+
module[name] = value;
|
319
|
+
} else {
|
320
|
+
return module[name];
|
321
|
+
}
|
322
|
+
},
|
323
|
+
debug: function () {
|
324
|
+
if (!settings.silent && settings.debug) {
|
325
|
+
if (settings.performance) {
|
326
|
+
module.performance.log(arguments);
|
327
|
+
} else {
|
328
|
+
module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');
|
329
|
+
module.debug.apply(console, arguments);
|
330
|
+
}
|
331
|
+
}
|
332
|
+
},
|
333
|
+
verbose: function () {
|
334
|
+
if (!settings.silent && settings.verbose && settings.debug) {
|
335
|
+
if (settings.performance) {
|
336
|
+
module.performance.log(arguments);
|
337
|
+
} else {
|
338
|
+
module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');
|
339
|
+
module.verbose.apply(console, arguments);
|
340
|
+
}
|
341
|
+
}
|
342
|
+
},
|
343
|
+
error: function () {
|
344
|
+
if (!settings.silent) {
|
345
|
+
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
|
346
|
+
module.error.apply(console, arguments);
|
347
|
+
}
|
348
|
+
},
|
349
|
+
performance: {
|
350
|
+
log: function (message) {
|
351
|
+
var
|
352
|
+
currentTime,
|
353
|
+
executionTime,
|
354
|
+
previousTime
|
355
|
+
;
|
356
|
+
if (settings.performance) {
|
357
|
+
currentTime = Date.now();
|
358
|
+
previousTime = time || currentTime;
|
359
|
+
executionTime = currentTime - previousTime;
|
360
|
+
time = currentTime;
|
361
|
+
performance.push({
|
362
|
+
Name: message[0],
|
363
|
+
Arguments: [].slice.call(message, 1) || '',
|
364
|
+
Element: element,
|
365
|
+
'Execution Time': executionTime,
|
366
|
+
});
|
367
|
+
}
|
368
|
+
clearTimeout(module.performance.timer);
|
369
|
+
module.performance.timer = setTimeout(module.performance.display, 500);
|
370
|
+
},
|
371
|
+
display: function () {
|
372
|
+
var
|
373
|
+
title = settings.name + ':',
|
374
|
+
totalTime = 0
|
375
|
+
;
|
376
|
+
time = false;
|
377
|
+
clearTimeout(module.performance.timer);
|
378
|
+
$.each(performance, function (index, data) {
|
379
|
+
totalTime += data['Execution Time'];
|
380
|
+
});
|
381
|
+
title += ' ' + totalTime + 'ms';
|
382
|
+
if (moduleSelector) {
|
383
|
+
title += ' \'' + moduleSelector + '\'';
|
384
|
+
}
|
385
|
+
if (performance.length > 0) {
|
386
|
+
console.groupCollapsed(title);
|
387
|
+
if (console.table) {
|
388
|
+
console.table(performance);
|
389
|
+
} else {
|
390
|
+
$.each(performance, function (index, data) {
|
391
|
+
console.log(data.Name + ': ' + data['Execution Time'] + 'ms');
|
392
|
+
});
|
393
|
+
}
|
394
|
+
console.groupEnd();
|
395
|
+
}
|
396
|
+
performance = [];
|
397
|
+
},
|
398
|
+
},
|
399
|
+
invoke: function (query, passedArguments, context) {
|
400
|
+
var
|
401
|
+
object = instance,
|
402
|
+
maxDepth,
|
403
|
+
found,
|
404
|
+
response
|
405
|
+
;
|
406
|
+
passedArguments = passedArguments || queryArguments;
|
407
|
+
context = context || element;
|
408
|
+
if (typeof query === 'string' && object !== undefined) {
|
409
|
+
query = query.split(/[ .]/);
|
410
|
+
maxDepth = query.length - 1;
|
411
|
+
$.each(query, function (depth, value) {
|
412
|
+
var camelCaseValue = depth !== maxDepth
|
413
|
+
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
414
|
+
: query
|
415
|
+
;
|
416
|
+
if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
|
417
|
+
object = object[camelCaseValue];
|
418
|
+
} else if (object[camelCaseValue] !== undefined) {
|
419
|
+
found = object[camelCaseValue];
|
420
|
+
|
421
|
+
return false;
|
422
|
+
} else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
|
423
|
+
object = object[value];
|
424
|
+
} else if (object[value] !== undefined) {
|
425
|
+
found = object[value];
|
426
|
+
|
427
|
+
return false;
|
428
|
+
} else {
|
429
|
+
module.error(error.method, query);
|
430
|
+
|
431
|
+
return false;
|
432
|
+
}
|
433
|
+
});
|
434
|
+
}
|
435
|
+
if (isFunction(found)) {
|
436
|
+
response = found.apply(context, passedArguments);
|
437
|
+
} else if (found !== undefined) {
|
438
|
+
response = found;
|
439
|
+
}
|
440
|
+
if (Array.isArray(returnedValue)) {
|
441
|
+
returnedValue.push(response);
|
442
|
+
} else if (returnedValue !== undefined) {
|
443
|
+
returnedValue = [returnedValue, response];
|
444
|
+
} else if (response !== undefined) {
|
445
|
+
returnedValue = response;
|
446
|
+
}
|
447
|
+
|
448
|
+
return found;
|
449
|
+
},
|
450
|
+
};
|
451
|
+
|
452
|
+
if (methodInvoked) {
|
453
|
+
if (instance === undefined) {
|
454
|
+
module.initialize();
|
211
455
|
}
|
212
|
-
|
456
|
+
module.invoke(query);
|
213
457
|
} else {
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
var
|
219
|
-
options = {}
|
220
|
-
;
|
221
|
-
if(settings.expires) {
|
222
|
-
options.expires = module.get.expirationDate(settings.expires);
|
223
|
-
}
|
224
|
-
if(settings.domain) {
|
225
|
-
options.domain = settings.domain;
|
226
|
-
}
|
227
|
-
if(settings.path) {
|
228
|
-
options.path = settings.path;
|
229
|
-
}
|
230
|
-
if(settings.secure) {
|
231
|
-
options.secure = settings.secure;
|
232
|
-
}
|
233
|
-
if(settings.samesite) {
|
234
|
-
options.samesite = settings.samesite;
|
458
|
+
if (instance !== undefined) {
|
459
|
+
instance.invoke('destroy');
|
460
|
+
}
|
461
|
+
module.initialize();
|
235
462
|
}
|
236
|
-
|
237
|
-
}
|
238
|
-
},
|
463
|
+
});
|
239
464
|
|
240
|
-
|
241
|
-
|
242
|
-
|
465
|
+
return returnedValue !== undefined
|
466
|
+
? returnedValue
|
467
|
+
: this;
|
468
|
+
};
|
243
469
|
|
244
|
-
|
245
|
-
set: function(key, value) {
|
246
|
-
var
|
247
|
-
options = module.get.storageOptions()
|
248
|
-
;
|
249
|
-
if(storage === window.localStorage && options.expires) {
|
250
|
-
module.debug('Storing expiration value in localStorage', key, options.expires);
|
251
|
-
storage.setItem(key + settings.expirationKey, options.expires );
|
252
|
-
}
|
253
|
-
module.debug('Value stored', key, value);
|
254
|
-
try {
|
255
|
-
storage.setItem(key, value, options);
|
256
|
-
}
|
257
|
-
catch(e) {
|
258
|
-
module.error(error.setItem, e);
|
259
|
-
}
|
260
|
-
},
|
261
|
-
get: function(key) {
|
262
|
-
var
|
263
|
-
storedValue
|
264
|
-
;
|
265
|
-
storedValue = storage.getItem(key);
|
266
|
-
if(storage === window.localStorage) {
|
267
|
-
var expiration = storage.getItem(key + settings.expirationKey);
|
268
|
-
if(expiration !== null && expiration !== undefined && new Date(expiration) < new Date()) {
|
269
|
-
module.debug('Value in localStorage has expired. Deleting key', key);
|
270
|
-
module.storage.remove(key);
|
271
|
-
storedValue = null;
|
272
|
-
}
|
273
|
-
}
|
274
|
-
if(storedValue == 'undefined' || storedValue == 'null' || storedValue === undefined || storedValue === null) {
|
275
|
-
storedValue = undefined;
|
276
|
-
}
|
277
|
-
return storedValue;
|
278
|
-
},
|
279
|
-
remove: function(key) {
|
280
|
-
var
|
281
|
-
options = module.get.storageOptions()
|
282
|
-
;
|
283
|
-
options.expires = module.get.expirationDate(-1);
|
284
|
-
if(storage === window.localStorage) {
|
285
|
-
storage.removeItem(key + settings.expirationKey);
|
286
|
-
}
|
287
|
-
storage.removeItem(key, options);
|
288
|
-
}
|
289
|
-
},
|
470
|
+
$.fn.nag.settings = {
|
290
471
|
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
if( $.isPlainObject(name) ) {
|
310
|
-
$.extend(true, module, name);
|
311
|
-
}
|
312
|
-
else if(value !== undefined) {
|
313
|
-
module[name] = value;
|
314
|
-
}
|
315
|
-
else {
|
316
|
-
return module[name];
|
317
|
-
}
|
318
|
-
},
|
319
|
-
debug: function() {
|
320
|
-
if(!settings.silent && settings.debug) {
|
321
|
-
if(settings.performance) {
|
322
|
-
module.performance.log(arguments);
|
323
|
-
}
|
324
|
-
else {
|
325
|
-
module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');
|
326
|
-
module.debug.apply(console, arguments);
|
327
|
-
}
|
328
|
-
}
|
472
|
+
name: 'Nag',
|
473
|
+
|
474
|
+
silent: false,
|
475
|
+
debug: false,
|
476
|
+
verbose: false,
|
477
|
+
performance: true,
|
478
|
+
|
479
|
+
namespace: 'Nag',
|
480
|
+
|
481
|
+
// allows cookie to be overridden
|
482
|
+
persist: false,
|
483
|
+
|
484
|
+
// set to zero to require manually dismissal, otherwise hides on its own
|
485
|
+
displayTime: 0,
|
486
|
+
|
487
|
+
animation: {
|
488
|
+
show: 'slide',
|
489
|
+
hide: 'slide',
|
329
490
|
},
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
491
|
+
|
492
|
+
context: false,
|
493
|
+
detachable: false,
|
494
|
+
|
495
|
+
expires: 30,
|
496
|
+
|
497
|
+
// cookie storage only options
|
498
|
+
domain: false,
|
499
|
+
path: '/',
|
500
|
+
secure: false,
|
501
|
+
samesite: false,
|
502
|
+
|
503
|
+
// type of storage to use
|
504
|
+
storageMethod: 'cookie',
|
505
|
+
|
506
|
+
// value to store in dismissed localstorage/cookie
|
507
|
+
key: 'nag',
|
508
|
+
value: 'dismiss',
|
509
|
+
|
510
|
+
// Key suffix to support expiration in localstorage
|
511
|
+
expirationKey: 'ExpirationDate',
|
512
|
+
|
513
|
+
error: {
|
514
|
+
noStorage: 'Unsupported storage method',
|
515
|
+
method: 'The method you called is not defined.',
|
516
|
+
setItem: 'Unexpected error while setting value',
|
517
|
+
expiresFormat: '"expires" must be a number of days or a Date Object',
|
340
518
|
},
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
}
|
519
|
+
|
520
|
+
className: {
|
521
|
+
bottom: 'bottom',
|
522
|
+
fixed: 'fixed',
|
346
523
|
},
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
currentTime,
|
351
|
-
executionTime,
|
352
|
-
previousTime
|
353
|
-
;
|
354
|
-
if(settings.performance) {
|
355
|
-
currentTime = new Date().getTime();
|
356
|
-
previousTime = time || currentTime;
|
357
|
-
executionTime = currentTime - previousTime;
|
358
|
-
time = currentTime;
|
359
|
-
performance.push({
|
360
|
-
'Name' : message[0],
|
361
|
-
'Arguments' : [].slice.call(message, 1) || '',
|
362
|
-
'Element' : element,
|
363
|
-
'Execution Time' : executionTime
|
364
|
-
});
|
365
|
-
}
|
366
|
-
clearTimeout(module.performance.timer);
|
367
|
-
module.performance.timer = setTimeout(module.performance.display, 500);
|
368
|
-
},
|
369
|
-
display: function() {
|
370
|
-
var
|
371
|
-
title = settings.name + ':',
|
372
|
-
totalTime = 0
|
373
|
-
;
|
374
|
-
time = false;
|
375
|
-
clearTimeout(module.performance.timer);
|
376
|
-
$.each(performance, function(index, data) {
|
377
|
-
totalTime += data['Execution Time'];
|
378
|
-
});
|
379
|
-
title += ' ' + totalTime + 'ms';
|
380
|
-
if(moduleSelector) {
|
381
|
-
title += ' \'' + moduleSelector + '\'';
|
382
|
-
}
|
383
|
-
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
|
384
|
-
console.groupCollapsed(title);
|
385
|
-
if(console.table) {
|
386
|
-
console.table(performance);
|
387
|
-
}
|
388
|
-
else {
|
389
|
-
$.each(performance, function(index, data) {
|
390
|
-
console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
|
391
|
-
});
|
392
|
-
}
|
393
|
-
console.groupEnd();
|
394
|
-
}
|
395
|
-
performance = [];
|
396
|
-
}
|
524
|
+
|
525
|
+
selector: {
|
526
|
+
close: '> .close.icon',
|
397
527
|
},
|
398
|
-
invoke: function(query, passedArguments, context) {
|
399
|
-
var
|
400
|
-
object = instance,
|
401
|
-
maxDepth,
|
402
|
-
found,
|
403
|
-
response
|
404
|
-
;
|
405
|
-
passedArguments = passedArguments || queryArguments;
|
406
|
-
context = element || context;
|
407
|
-
if(typeof query == 'string' && object !== undefined) {
|
408
|
-
query = query.split(/[\. ]/);
|
409
|
-
maxDepth = query.length - 1;
|
410
|
-
$.each(query, function(depth, value) {
|
411
|
-
var camelCaseValue = (depth != maxDepth)
|
412
|
-
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
413
|
-
: query
|
414
|
-
;
|
415
|
-
if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
|
416
|
-
object = object[camelCaseValue];
|
417
|
-
}
|
418
|
-
else if( object[camelCaseValue] !== undefined ) {
|
419
|
-
found = object[camelCaseValue];
|
420
|
-
return false;
|
421
|
-
}
|
422
|
-
else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
|
423
|
-
object = object[value];
|
424
|
-
}
|
425
|
-
else if( object[value] !== undefined ) {
|
426
|
-
found = object[value];
|
427
|
-
return false;
|
428
|
-
}
|
429
|
-
else {
|
430
|
-
module.error(error.method, query);
|
431
|
-
return false;
|
432
|
-
}
|
433
|
-
});
|
434
|
-
}
|
435
|
-
if ( $.isFunction( found ) ) {
|
436
|
-
response = found.apply(context, passedArguments);
|
437
|
-
}
|
438
|
-
else if(found !== undefined) {
|
439
|
-
response = found;
|
440
|
-
}
|
441
|
-
if(Array.isArray(returnedValue)) {
|
442
|
-
returnedValue.push(response);
|
443
|
-
}
|
444
|
-
else if(returnedValue !== undefined) {
|
445
|
-
returnedValue = [returnedValue, response];
|
446
|
-
}
|
447
|
-
else if(response !== undefined) {
|
448
|
-
returnedValue = response;
|
449
|
-
}
|
450
|
-
return found;
|
451
|
-
}
|
452
|
-
};
|
453
|
-
|
454
|
-
if(methodInvoked) {
|
455
|
-
if(instance === undefined) {
|
456
|
-
module.initialize();
|
457
|
-
}
|
458
|
-
module.invoke(query);
|
459
|
-
}
|
460
|
-
else {
|
461
|
-
if(instance !== undefined) {
|
462
|
-
instance.invoke('destroy');
|
463
|
-
}
|
464
|
-
module.initialize();
|
465
|
-
}
|
466
|
-
})
|
467
|
-
;
|
468
|
-
|
469
|
-
return (returnedValue !== undefined)
|
470
|
-
? returnedValue
|
471
|
-
: this
|
472
|
-
;
|
473
|
-
};
|
474
|
-
|
475
|
-
$.fn.nag.settings = {
|
476
|
-
|
477
|
-
name : 'Nag',
|
478
|
-
|
479
|
-
silent : false,
|
480
|
-
debug : false,
|
481
|
-
verbose : false,
|
482
|
-
performance : true,
|
483
|
-
|
484
|
-
namespace : 'Nag',
|
485
|
-
|
486
|
-
// allows cookie to be overridden
|
487
|
-
persist : false,
|
488
|
-
|
489
|
-
// set to zero to require manually dismissal, otherwise hides on its own
|
490
|
-
displayTime : 0,
|
491
|
-
|
492
|
-
animation : {
|
493
|
-
show : 'slide',
|
494
|
-
hide : 'slide'
|
495
|
-
},
|
496
|
-
|
497
|
-
context : false,
|
498
|
-
detachable : false,
|
499
|
-
|
500
|
-
expires : 30,
|
501
|
-
|
502
|
-
// cookie storage only options
|
503
|
-
domain : false,
|
504
|
-
path : '/',
|
505
|
-
secure : false,
|
506
|
-
samesite : false,
|
507
|
-
|
508
|
-
// type of storage to use
|
509
|
-
storageMethod : 'cookie',
|
510
|
-
|
511
|
-
// value to store in dismissed localstorage/cookie
|
512
|
-
key : 'nag',
|
513
|
-
value : 'dismiss',
|
514
|
-
|
515
|
-
// Key suffix to support expiration in localstorage
|
516
|
-
expirationKey : 'ExpirationDate',
|
517
|
-
|
518
|
-
error: {
|
519
|
-
noStorage : 'Unsupported storage method',
|
520
|
-
method : 'The method you called is not defined.',
|
521
|
-
setItem : 'Unexpected error while setting value',
|
522
|
-
expiresFormat : '"expires" must be a number of days or a Date Object'
|
523
|
-
},
|
524
|
-
|
525
|
-
className : {
|
526
|
-
bottom : 'bottom',
|
527
|
-
fixed : 'fixed'
|
528
|
-
},
|
529
|
-
|
530
|
-
selector : {
|
531
|
-
close : '> .close.icon'
|
532
|
-
},
|
533
|
-
|
534
|
-
duration : 500,
|
535
|
-
easing : 'easeOutQuad',
|
536
|
-
|
537
|
-
// callback before show animation, return false to prevent show
|
538
|
-
onShow : function() {},
|
539
|
-
|
540
|
-
// called after show animation
|
541
|
-
onVisible : function() {},
|
542
|
-
|
543
|
-
// callback before hide animation, return false to prevent hide
|
544
|
-
onHide : function() {},
|
545
|
-
|
546
|
-
// callback after hide animation
|
547
|
-
onHidden : function() {}
|
548
|
-
|
549
|
-
};
|
550
|
-
|
551
|
-
// Adds easing
|
552
|
-
$.extend( $.easing, {
|
553
|
-
easeOutQuad: function (x, t, b, c, d) {
|
554
|
-
return -c *(t/=d)*(t-2) + b;
|
555
|
-
}
|
556
|
-
});
|
557
528
|
|
558
|
-
|
529
|
+
duration: 500,
|
530
|
+
easing: 'easeOutQuad',
|
531
|
+
|
532
|
+
// callback before show animation, return false to prevent show
|
533
|
+
onShow: function () {},
|
534
|
+
|
535
|
+
// called after show animation
|
536
|
+
onVisible: function () {},
|
537
|
+
|
538
|
+
// callback before hide animation, return false to prevent hide
|
539
|
+
onHide: function () {},
|
540
|
+
|
541
|
+
// callback after hide animation
|
542
|
+
onHidden: function () {},
|
543
|
+
|
544
|
+
};
|
545
|
+
|
546
|
+
// Adds easing
|
547
|
+
$.extend($.easing, {
|
548
|
+
easeOutQuad: function (x) {
|
549
|
+
return 1 - (1 - x) * (1 - x);
|
550
|
+
},
|
551
|
+
});
|
552
|
+
})(jQuery, window, document);
|