fomantic-ui 2.9.1-beta.22 → 2.9.1-beta.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslint/index.js +23 -0
- package/.eslint/no-extra-parens-rule.js +17 -0
- package/.eslint/package.json +11 -0
- package/.eslintrc.js +13 -70
- package/.stylelintrc.js +5 -7
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +26 -26
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +2 -2
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +95 -94
- package/dist/components/api.min.js +2 -2
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +1 -1
- package/dist/components/button.min.css +1 -1
- package/dist/components/calendar.css +3 -3
- package/dist/components/calendar.js +181 -151
- package/dist/components/calendar.min.css +2 -2
- package/dist/components/calendar.min.js +2 -2
- package/dist/components/card.css +1 -1
- package/dist/components/card.min.css +1 -1
- package/dist/components/checkbox.css +1 -1
- package/dist/components/checkbox.js +14 -14
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +2 -2
- package/dist/components/comment.css +1 -1
- package/dist/components/comment.min.css +1 -1
- package/dist/components/container.css +1 -1
- package/dist/components/container.min.css +1 -1
- package/dist/components/dimmer.css +1 -1
- package/dist/components/dimmer.js +23 -25
- package/dist/components/dimmer.min.css +1 -1
- package/dist/components/dimmer.min.js +2 -2
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +1 -1
- package/dist/components/dropdown.js +252 -254
- package/dist/components/dropdown.min.css +1 -1
- package/dist/components/dropdown.min.js +2 -2
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +27 -33
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- package/dist/components/feed.css +1 -1
- package/dist/components/feed.min.css +1 -1
- package/dist/components/flag.css +1 -1
- package/dist/components/flag.min.css +1 -1
- package/dist/components/flyout.css +2 -2
- package/dist/components/flyout.js +50 -44
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +2 -2
- package/dist/components/form.js +187 -163
- package/dist/components/form.min.css +2 -2
- package/dist/components/form.min.js +2 -2
- package/dist/components/grid.css +1 -1
- package/dist/components/grid.min.css +1 -1
- package/dist/components/header.css +1 -1
- package/dist/components/header.min.css +1 -1
- package/dist/components/icon.css +1 -1
- package/dist/components/icon.min.css +1 -1
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +1 -1
- package/dist/components/input.min.css +1 -1
- package/dist/components/item.css +1 -1
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +1 -1
- package/dist/components/label.min.css +1 -1
- package/dist/components/list.css +1 -1
- package/dist/components/list.min.css +1 -1
- package/dist/components/loader.css +1 -1
- package/dist/components/loader.min.css +1 -1
- package/dist/components/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +1 -1
- package/dist/components/modal.js +49 -45
- package/dist/components/modal.min.css +1 -1
- package/dist/components/modal.min.js +2 -2
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +22 -20
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +2 -2
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +1 -1
- package/dist/components/popup.js +71 -71
- package/dist/components/popup.min.css +1 -1
- package/dist/components/popup.min.js +2 -2
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +46 -46
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +2 -2
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +1 -1
- package/dist/components/rating.js +15 -15
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +2 -2
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +1 -1
- package/dist/components/search.js +69 -74
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +2 -2
- package/dist/components/segment.css +1 -1
- package/dist/components/segment.min.css +1 -1
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +39 -39
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +2 -2
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +39 -37
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +2 -2
- package/dist/components/site.css +1 -1
- package/dist/components/site.js +22 -21
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +2 -2
- package/dist/components/slider.js +69 -64
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +15 -15
- package/dist/components/state.min.js +2 -2
- package/dist/components/statistic.css +1 -1
- package/dist/components/statistic.min.css +1 -1
- package/dist/components/step.css +1 -1
- package/dist/components/step.min.css +1 -1
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +25 -25
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +2 -2
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +55 -57
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +2 -2
- package/dist/components/table.css +1 -1
- package/dist/components/table.min.css +1 -1
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +1 -1
- package/dist/components/toast.js +57 -30
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +7 -7
- package/dist/components/transition.js +45 -39
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +25 -25
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +60 -60
- package/dist/semantic.js +1518 -1427
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/examples/responsive.html +1 -1
- package/gulpfile.js +1 -1
- package/package.json +2 -1
- package/scripts/nightly-version.js +6 -4
- package/src/definitions/behaviors/api.js +94 -93
- package/src/definitions/behaviors/form.js +186 -162
- package/src/definitions/behaviors/state.js +14 -14
- package/src/definitions/behaviors/visibility.js +24 -24
- package/src/definitions/collections/menu.less +2 -2
- package/src/definitions/elements/button.less +2 -2
- package/src/definitions/elements/loader.less +4 -4
- package/src/definitions/elements/step.less +1 -1
- package/src/definitions/globals/site.js +21 -20
- package/src/definitions/modules/accordion.js +25 -25
- package/src/definitions/modules/calendar.js +180 -150
- package/src/definitions/modules/calendar.less +2 -2
- package/src/definitions/modules/checkbox.js +13 -13
- package/src/definitions/modules/dimmer.js +22 -24
- package/src/definitions/modules/dimmer.less +10 -10
- package/src/definitions/modules/dropdown.js +251 -253
- package/src/definitions/modules/embed.js +26 -32
- package/src/definitions/modules/flyout.js +49 -43
- package/src/definitions/modules/flyout.less +1 -1
- package/src/definitions/modules/modal.js +48 -44
- package/src/definitions/modules/nag.js +21 -19
- package/src/definitions/modules/popup.js +70 -70
- package/src/definitions/modules/progress.js +45 -45
- package/src/definitions/modules/rating.js +14 -14
- package/src/definitions/modules/search.js +68 -73
- package/src/definitions/modules/shape.js +38 -38
- package/src/definitions/modules/sidebar.js +38 -36
- package/src/definitions/modules/slider.js +68 -63
- package/src/definitions/modules/sticky.js +24 -24
- package/src/definitions/modules/tab.js +54 -56
- package/src/definitions/modules/toast.js +56 -29
- package/src/definitions/modules/transition.js +44 -38
- package/src/themes/amazon/elements/button.overrides +7 -7
- package/src/themes/default/collections/form.variables +1 -1
- package/src/themes/default/elements/reveal.variables +1 -1
- package/src/themes/default/globals/site.variables +1 -1
- package/src/themes/default/modules/dimmer.variables +6 -6
- package/src/themes/default/modules/modal.variables +1 -1
- package/src/themes/default/modules/slider.variables +4 -4
- package/src/themes/default/modules/toast.variables +2 -2
- package/src/themes/default/modules/transition.overrides +12 -12
- package/src/themes/flat/collections/form.overrides +2 -2
- package/src/themes/flat/globals/site.variables +1 -1
- package/src/themes/github/collections/form.overrides +2 -2
- package/src/themes/github/collections/menu.variables +1 -1
- package/src/themes/github/collections/message.overrides +3 -3
- package/src/themes/github/elements/input.overrides +2 -2
- package/src/themes/timeline/views/feed.overrides +3 -3
- package/src/themes/twitter/elements/button.overrides +2 -2
- package/tasks/README.md +1 -3
- package/tasks/admin/components/create.js +9 -16
- package/tasks/admin/components/init.js +7 -7
- package/tasks/admin/components/update.js +10 -10
- package/tasks/admin/distributions/create.js +16 -18
- package/tasks/admin/distributions/init.js +7 -7
- package/tasks/admin/distributions/update.js +10 -10
- package/tasks/admin/publish.js +1 -3
- package/tasks/admin/register.js +6 -6
- package/tasks/admin/release.js +1 -3
- package/tasks/build/assets.js +2 -2
- package/tasks/build/css.js +8 -3
- package/tasks/build/javascript.js +3 -1
- package/tasks/build.js +1 -1
- package/tasks/check-install.js +1 -1
- package/tasks/clean.js +1 -1
- package/tasks/collections/README.md +3 -5
- package/tasks/collections/admin.js +1 -1
- package/tasks/collections/docs.js +1 -1
- package/tasks/collections/install.js +1 -1
- package/tasks/collections/rtl.js +1 -1
- package/tasks/collections/various.js +1 -1
- package/tasks/config/admin/github.js +6 -8
- package/tasks/config/admin/templates/css-package.js +1 -1
- package/tasks/config/admin/templates/less-package.js +1 -1
- package/tasks/config/npm/gulpfile.js +7 -7
- package/tasks/config/project/config.js +14 -19
- package/tasks/config/project/install.js +35 -34
- package/tasks/config/project/release.js +15 -16
- package/tasks/config/tasks.js +18 -20
- package/tasks/config/user.js +5 -3
- package/tasks/docs/build.js +5 -3
- package/tasks/docs/metadata.js +7 -8
- package/tasks/docs/serve.js +6 -3
- package/tasks/install.js +39 -39
- package/tasks/rtl/build.js +1 -3
- package/tasks/rtl/watch.js +1 -3
- package/tasks/version.js +1 -3
- package/tasks/watch.js +1 -1
- package/test/.eslintrc.js +0 -4
- package/test/meteor/assets.js +1 -1
- package/test/modules/module.spec.js +15 -15
- package/test/modules/popup.spec.js +1 -1
- package/test/modules/search.spec.js +1 -1
- package/test/modules/tab.spec.js +1 -1
- package/test/modules/transition.spec.js +1 -1
@@ -15,7 +15,7 @@
|
|
15
15
|
return typeof obj === 'function' && typeof obj.nodeType !== 'number';
|
16
16
|
}
|
17
17
|
|
18
|
-
window =
|
18
|
+
window = window !== undefined && window.Math === Math
|
19
19
|
? window
|
20
20
|
: globalThis;
|
21
21
|
|
@@ -25,11 +25,11 @@
|
|
25
25
|
|
26
26
|
moduleSelector = $allModules.selector || '',
|
27
27
|
|
28
|
-
time =
|
28
|
+
time = Date.now(),
|
29
29
|
performance = [],
|
30
30
|
|
31
31
|
query = arguments[0],
|
32
|
-
methodInvoked =
|
32
|
+
methodInvoked = typeof query === 'string',
|
33
33
|
queryArguments = [].slice.call(arguments, 1),
|
34
34
|
|
35
35
|
returnedValue
|
@@ -37,7 +37,7 @@
|
|
37
37
|
|
38
38
|
$allModules.each(function () {
|
39
39
|
var
|
40
|
-
settings =
|
40
|
+
settings = $.isPlainObject(parameters)
|
41
41
|
? $.extend(true, {}, $.fn.progress.settings, parameters)
|
42
42
|
: $.extend({}, $.fn.progress.settings),
|
43
43
|
|
@@ -95,7 +95,7 @@
|
|
95
95
|
var precision = 1;
|
96
96
|
var ratio = min / total;
|
97
97
|
while (precisionPower < 10) {
|
98
|
-
ratio
|
98
|
+
ratio *= precision;
|
99
99
|
if (ratio > 1) {
|
100
100
|
break;
|
101
101
|
}
|
@@ -107,11 +107,9 @@
|
|
107
107
|
forceArray: function (element) {
|
108
108
|
return Array.isArray(element)
|
109
109
|
? element
|
110
|
-
: !isNaN(element)
|
110
|
+
: (!isNaN(element)
|
111
111
|
? [element]
|
112
|
-
: typeof element
|
113
|
-
? element.split(',')
|
114
|
-
: [];
|
112
|
+
: (typeof element === 'string' ? element.split(',') : [])); // eslint-disable-line unicorn/no-nested-ternary
|
115
113
|
},
|
116
114
|
},
|
117
115
|
|
@@ -256,22 +254,25 @@
|
|
256
254
|
return module.progressPoll;
|
257
255
|
},
|
258
256
|
total: function () {
|
259
|
-
return
|
257
|
+
return module.get.total() !== false;
|
260
258
|
},
|
261
259
|
},
|
262
260
|
|
263
261
|
get: {
|
264
262
|
text: function (templateText, index) {
|
263
|
+
if (!index) {
|
264
|
+
index = 0;
|
265
|
+
}
|
266
|
+
|
265
267
|
var
|
266
|
-
|
267
|
-
value = module.get.value(index_),
|
268
|
+
value = module.get.value(index),
|
268
269
|
total = module.get.total(),
|
269
|
-
percent =
|
270
|
-
? module.get.displayPercent(
|
271
|
-
: module.get.percent(
|
272
|
-
left =
|
270
|
+
percent = animating
|
271
|
+
? module.get.displayPercent(index)
|
272
|
+
: module.get.percent(index),
|
273
|
+
left = total !== false
|
273
274
|
? Math.max(0, total - value)
|
274
|
-
:
|
275
|
+
: 100 - percent
|
275
276
|
;
|
276
277
|
templateText = templateText || '';
|
277
278
|
templateText = templateText
|
@@ -279,7 +280,7 @@
|
|
279
280
|
.replace('{total}', total || 0)
|
280
281
|
.replace('{left}', left)
|
281
282
|
.replace('{percent}', percent)
|
282
|
-
.replace('{bar}', settings.text.bars[
|
283
|
+
.replace('{bar}', settings.text.bars[index] || '')
|
283
284
|
;
|
284
285
|
module.verbose('Adding variables to progress bar text', templateText);
|
285
286
|
|
@@ -322,10 +323,10 @@
|
|
322
323
|
},
|
323
324
|
|
324
325
|
numericValue: function (value) {
|
325
|
-
return
|
326
|
-
? (value.replace(/[^\d.]/g, '') !== ''
|
327
|
-
? +
|
328
|
-
: false
|
326
|
+
return typeof value === 'string'
|
327
|
+
? (value.replace(/[^\d.]/g, '') !== ''
|
328
|
+
? +value.replace(/[^\d.]/g, '')
|
329
|
+
: false)
|
329
330
|
: value;
|
330
331
|
},
|
331
332
|
|
@@ -354,21 +355,21 @@
|
|
354
355
|
barWidth = $bar.width(),
|
355
356
|
totalWidth = $module.width(),
|
356
357
|
minDisplay = parseInt($bar.css('min-width'), 10),
|
357
|
-
displayPercent =
|
358
|
-
? (barWidth / totalWidth * 100
|
358
|
+
displayPercent = barWidth > minDisplay
|
359
|
+
? (barWidth / totalWidth) * 100
|
359
360
|
: module.percent
|
360
361
|
;
|
361
362
|
|
362
|
-
return
|
363
|
+
return settings.precision > 0
|
363
364
|
? Math.round(displayPercent * (10 * settings.precision)) / (10 * settings.precision)
|
364
365
|
: Math.round(displayPercent);
|
365
366
|
},
|
366
367
|
|
367
368
|
percent: function (index) {
|
368
|
-
return module.percent && module.percent[index || 0] || 0;
|
369
|
+
return (module.percent && module.percent[index || 0]) || 0;
|
369
370
|
},
|
370
371
|
value: function (index) {
|
371
|
-
return module.nextValue || module.value && module.value[index || 0] || 0;
|
372
|
+
return module.nextValue || (module.value && module.value[index || 0]) || 0;
|
372
373
|
},
|
373
374
|
total: function () {
|
374
375
|
return module.total !== undefined ? module.total : false;
|
@@ -451,7 +452,7 @@
|
|
451
452
|
var barCounts = $bars.length;
|
452
453
|
var isMultiple = barCounts > 1;
|
453
454
|
var percents = values.map(function (value, index) {
|
454
|
-
var allZero =
|
455
|
+
var allZero = index === barCounts - 1 && valuesSum === 0;
|
455
456
|
var $bar = $($bars[index]);
|
456
457
|
if (value === 0 && isMultiple && !allZero) {
|
457
458
|
$bar.css('display', 'none');
|
@@ -486,7 +487,7 @@
|
|
486
487
|
},
|
487
488
|
duration: function (duration) {
|
488
489
|
duration = duration || settings.duration;
|
489
|
-
duration =
|
490
|
+
duration = typeof duration === 'number'
|
490
491
|
? duration + 'ms'
|
491
492
|
: duration;
|
492
493
|
module.verbose('Setting progress bar transition duration', duration);
|
@@ -498,11 +499,11 @@
|
|
498
499
|
},
|
499
500
|
percent: function (percents) {
|
500
501
|
percents = module.helper.forceArray(percents).map(function (percent) {
|
501
|
-
percent =
|
502
|
-
? +
|
502
|
+
percent = typeof percent === 'string'
|
503
|
+
? +percent.replace('%', '')
|
503
504
|
: percent;
|
504
505
|
|
505
|
-
return
|
506
|
+
return settings.limitValues
|
506
507
|
? Math.max(0, Math.min(100, percent))
|
507
508
|
: percent;
|
508
509
|
});
|
@@ -521,13 +522,13 @@
|
|
521
522
|
} else {
|
522
523
|
var autoPrecision = settings.precision > 0
|
523
524
|
? settings.precision
|
524
|
-
: isMultipleValues
|
525
|
+
: (isMultipleValues
|
525
526
|
? module.helper.derivePrecision(Math.min.apply(null, module.value), module.total)
|
526
|
-
: 0;
|
527
|
+
: 0);
|
527
528
|
|
528
529
|
// round display percentage
|
529
530
|
var roundedPercents = percents.map(function (percent) {
|
530
|
-
return
|
531
|
+
return autoPrecision > 0
|
531
532
|
? Math.round(percent * (10 * autoPrecision)) / (10 * autoPrecision)
|
532
533
|
: Math.round(percent)
|
533
534
|
;
|
@@ -535,7 +536,7 @@
|
|
535
536
|
module.percent = roundedPercents;
|
536
537
|
if (hasTotal) {
|
537
538
|
module.value = percents.map(function (percent) {
|
538
|
-
return
|
539
|
+
return autoPrecision > 0
|
539
540
|
? Math.round((percent / 100) * module.total * (10 * autoPrecision)) / (10 * autoPrecision)
|
540
541
|
: Math.round((percent / 100) * module.total * 10) / 10;
|
541
542
|
});
|
@@ -574,7 +575,6 @@
|
|
574
575
|
module.set.state();
|
575
576
|
},
|
576
577
|
label: function (text) {
|
577
|
-
text = text || '';
|
578
578
|
if (text) {
|
579
579
|
text = module.get.text(text);
|
580
580
|
module.verbose('Setting label to text', text);
|
@@ -582,7 +582,7 @@
|
|
582
582
|
}
|
583
583
|
},
|
584
584
|
state: function (percent) {
|
585
|
-
percent =
|
585
|
+
percent = percent !== undefined
|
586
586
|
? percent
|
587
587
|
: module.helper.sum(module.percent);
|
588
588
|
if (percent === 100) {
|
@@ -807,7 +807,7 @@
|
|
807
807
|
previousTime
|
808
808
|
;
|
809
809
|
if (settings.performance) {
|
810
|
-
currentTime =
|
810
|
+
currentTime = Date.now();
|
811
811
|
previousTime = time || currentTime;
|
812
812
|
executionTime = currentTime - previousTime;
|
813
813
|
time = currentTime;
|
@@ -858,11 +858,11 @@
|
|
858
858
|
;
|
859
859
|
passedArguments = passedArguments || queryArguments;
|
860
860
|
context = context || element;
|
861
|
-
if (typeof query
|
862
|
-
query = query.split(/[
|
861
|
+
if (typeof query === 'string' && object !== undefined) {
|
862
|
+
query = query.split(/[ .]/);
|
863
863
|
maxDepth = query.length - 1;
|
864
864
|
$.each(query, function (depth, value) {
|
865
|
-
var camelCaseValue =
|
865
|
+
var camelCaseValue = depth != maxDepth
|
866
866
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
867
867
|
: query
|
868
868
|
;
|
@@ -915,7 +915,7 @@
|
|
915
915
|
}
|
916
916
|
});
|
917
917
|
|
918
|
-
return
|
918
|
+
return returnedValue !== undefined
|
919
919
|
? returnedValue
|
920
920
|
: this;
|
921
921
|
};
|
@@ -945,7 +945,7 @@
|
|
945
945
|
|
946
946
|
label: 'percent',
|
947
947
|
precision: 0,
|
948
|
-
framerate:
|
948
|
+
framerate: 1000 / 30, /// 30 fps
|
949
949
|
|
950
950
|
percent: false,
|
951
951
|
total: false,
|
@@ -972,7 +972,7 @@
|
|
972
972
|
},
|
973
973
|
|
974
974
|
regExp: {
|
975
|
-
variable:
|
975
|
+
variable: /{\$*[\da-z]+}/gi,
|
976
976
|
},
|
977
977
|
|
978
978
|
metadata: {
|
@@ -15,7 +15,7 @@
|
|
15
15
|
return typeof obj === 'function' && typeof obj.nodeType !== 'number';
|
16
16
|
}
|
17
17
|
|
18
|
-
window =
|
18
|
+
window = window !== undefined && window.Math === Math
|
19
19
|
? window
|
20
20
|
: globalThis;
|
21
21
|
|
@@ -24,17 +24,17 @@
|
|
24
24
|
$allModules = $(this),
|
25
25
|
moduleSelector = $allModules.selector || '',
|
26
26
|
|
27
|
-
time =
|
27
|
+
time = Date.now(),
|
28
28
|
performance = [],
|
29
29
|
|
30
30
|
query = arguments[0],
|
31
|
-
methodInvoked =
|
31
|
+
methodInvoked = typeof query === 'string',
|
32
32
|
queryArguments = [].slice.call(arguments, 1),
|
33
33
|
returnedValue
|
34
34
|
;
|
35
35
|
$allModules.each(function () {
|
36
36
|
var
|
37
|
-
settings =
|
37
|
+
settings = $.isPlainObject(parameters)
|
38
38
|
? $.extend(true, {}, $.fn.rating.settings, parameters)
|
39
39
|
: $.extend({}, $.fn.rating.settings),
|
40
40
|
|
@@ -143,8 +143,8 @@
|
|
143
143
|
$activeIcon = $(this),
|
144
144
|
currentRating = module.get.rating(),
|
145
145
|
rating = $icon.index($activeIcon) + 1,
|
146
|
-
canClear =
|
147
|
-
?
|
146
|
+
canClear = settings.clearable == 'auto'
|
147
|
+
? $icon.length === 1
|
148
148
|
: settings.clearable
|
149
149
|
;
|
150
150
|
if (canClear && currentRating == rating) {
|
@@ -249,8 +249,8 @@
|
|
249
249
|
rating: function (rating) {
|
250
250
|
var
|
251
251
|
ratingIndex = Math.floor(
|
252
|
-
|
253
|
-
?
|
252
|
+
rating - 1 >= 0
|
253
|
+
? rating - 1
|
254
254
|
: 0
|
255
255
|
),
|
256
256
|
$activeIcon = $icon.eq(ratingIndex),
|
@@ -356,7 +356,7 @@
|
|
356
356
|
previousTime
|
357
357
|
;
|
358
358
|
if (settings.performance) {
|
359
|
-
currentTime =
|
359
|
+
currentTime = Date.now();
|
360
360
|
previousTime = time || currentTime;
|
361
361
|
executionTime = currentTime - previousTime;
|
362
362
|
time = currentTime;
|
@@ -385,7 +385,7 @@
|
|
385
385
|
title += ' \'' + moduleSelector + '\'';
|
386
386
|
}
|
387
387
|
if ($allModules.length > 1) {
|
388
|
-
title += '
|
388
|
+
title += ' (' + $allModules.length + ')';
|
389
389
|
}
|
390
390
|
if ((console.group !== undefined || console.table !== undefined) && performance.length > 0) {
|
391
391
|
console.groupCollapsed(title);
|
@@ -410,11 +410,11 @@
|
|
410
410
|
;
|
411
411
|
passedArguments = passedArguments || queryArguments;
|
412
412
|
context = context || element;
|
413
|
-
if (typeof query
|
414
|
-
query = query.split(/[
|
413
|
+
if (typeof query === 'string' && object !== undefined) {
|
414
|
+
query = query.split(/[ .]/);
|
415
415
|
maxDepth = query.length - 1;
|
416
416
|
$.each(query, function (depth, value) {
|
417
|
-
var camelCaseValue =
|
417
|
+
var camelCaseValue = depth != maxDepth
|
418
418
|
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
419
419
|
: query
|
420
420
|
;
|
@@ -464,7 +464,7 @@
|
|
464
464
|
}
|
465
465
|
});
|
466
466
|
|
467
|
-
return
|
467
|
+
return returnedValue !== undefined
|
468
468
|
? returnedValue
|
469
469
|
: this;
|
470
470
|
};
|