fomantic-ui 2.9.3-beta.0 → 2.9.3-beta.2
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/.all-contributorsrc +9 -0
- package/CONTRIBUTORS.md +102 -99
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +1 -5
- 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 +14 -8
- 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 +1 -1
- package/dist/components/calendar.js +1 -6
- package/dist/components/calendar.min.css +1 -1
- 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 +1 -5
- 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 +1 -5
- 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 +19 -11
- 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 +1 -6
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +2 -2
- package/dist/components/emoji.css +1 -1
- package/dist/components/emoji.min.css +1 -1
- 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 +1 -1
- package/dist/components/flyout.js +15 -8
- package/dist/components/flyout.min.css +1 -1
- package/dist/components/flyout.min.js +2 -2
- package/dist/components/form.css +1 -1
- package/dist/components/form.js +6 -6
- package/dist/components/form.min.css +1 -1
- 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/menu.css +1 -1
- package/dist/components/menu.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 +14 -7
- 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 +16 -8
- 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 +18 -12
- 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 +1 -6
- 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 +1 -5
- 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 +1 -5
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +2 -2
- package/dist/components/segment.css +3 -2
- package/dist/components/segment.min.css +2 -2
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +1 -5
- 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 +15 -8
- 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 +1 -1
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +1 -1
- package/dist/components/slider.css +1 -1
- package/dist/components/slider.js +1 -6
- package/dist/components/slider.min.css +1 -1
- package/dist/components/slider.min.js +2 -2
- package/dist/components/state.js +23 -20
- 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 +17 -16
- 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 +14 -6
- 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 +16 -8
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +2 -2
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +1 -5
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +2 -2
- package/dist/components/visibility.js +15 -6
- package/dist/components/visibility.min.js +2 -2
- package/dist/semantic.css +55 -54
- package/dist/semantic.js +215 -185
- package/dist/semantic.min.css +2 -2
- package/dist/semantic.min.js +2 -2
- package/package.json +1 -1
- package/src/definitions/behaviors/api.js +13 -7
- package/src/definitions/behaviors/form.js +5 -5
- package/src/definitions/behaviors/state.js +22 -19
- package/src/definitions/behaviors/visibility.js +14 -5
- package/src/definitions/elements/segment.less +2 -1
- package/src/definitions/modules/accordion.js +0 -4
- package/src/definitions/modules/calendar.js +0 -5
- package/src/definitions/modules/checkbox.js +0 -4
- package/src/definitions/modules/dimmer.js +0 -4
- package/src/definitions/modules/dropdown.js +18 -10
- package/src/definitions/modules/embed.js +0 -5
- package/src/definitions/modules/flyout.js +14 -7
- package/src/definitions/modules/modal.js +13 -6
- package/src/definitions/modules/nag.js +15 -7
- package/src/definitions/modules/popup.js +17 -11
- package/src/definitions/modules/progress.js +0 -5
- package/src/definitions/modules/rating.js +0 -4
- package/src/definitions/modules/search.js +0 -4
- package/src/definitions/modules/shape.js +0 -4
- package/src/definitions/modules/sidebar.js +14 -7
- package/src/definitions/modules/slider.js +0 -5
- package/src/definitions/modules/sticky.js +16 -15
- package/src/definitions/modules/tab.js +13 -5
- package/src/definitions/modules/toast.js +15 -7
- package/src/definitions/modules/transition.js +0 -4
package/package.json
CHANGED
@@ -29,14 +29,25 @@
|
|
29
29
|
$allModules = isFunction(this)
|
30
30
|
? $(window)
|
31
31
|
: $(this),
|
32
|
-
moduleSelector = $allModules.selector || '',
|
33
32
|
time = Date.now(),
|
34
33
|
performance = [],
|
35
34
|
|
36
35
|
query = arguments[0],
|
37
36
|
methodInvoked = typeof query === 'string',
|
38
37
|
queryArguments = [].slice.call(arguments, 1),
|
38
|
+
contextCheck = function (context, win) {
|
39
|
+
var $context;
|
40
|
+
if ([window, document].indexOf(context) >= 0) {
|
41
|
+
$context = $(context);
|
42
|
+
} else {
|
43
|
+
$context = $(win.document).find(context);
|
44
|
+
if ($context.length === 0) {
|
45
|
+
$context = win.frameElement ? contextCheck(context, win.parent) : window;
|
46
|
+
}
|
47
|
+
}
|
39
48
|
|
49
|
+
return $context;
|
50
|
+
},
|
40
51
|
returnedValue
|
41
52
|
;
|
42
53
|
|
@@ -62,9 +73,7 @@
|
|
62
73
|
$form = $module.closest(selector.form),
|
63
74
|
|
64
75
|
// context used for state
|
65
|
-
$context = settings.stateContext
|
66
|
-
? ([window, document].indexOf(settings.stateContext) < 0 ? $(document).find(settings.stateContext) : $(settings.stateContext))
|
67
|
-
: $module,
|
76
|
+
$context = settings.stateContext ? contextCheck(settings.stateContext, window) : $module,
|
68
77
|
|
69
78
|
// request details
|
70
79
|
ajaxSettings,
|
@@ -974,9 +983,6 @@
|
|
974
983
|
totalTime += data['Execution Time'];
|
975
984
|
});
|
976
985
|
title += ' ' + totalTime + 'ms';
|
977
|
-
if (moduleSelector) {
|
978
|
-
title += ' \'' + moduleSelector + '\'';
|
979
|
-
}
|
980
986
|
if (performance.length > 0) {
|
981
987
|
console.groupCollapsed(title);
|
982
988
|
if (console.table) {
|
@@ -22,7 +22,6 @@
|
|
22
22
|
$.fn.form = function (parameters) {
|
23
23
|
var
|
24
24
|
$allModules = $(this),
|
25
|
-
moduleSelector = $allModules.selector || '',
|
26
25
|
|
27
26
|
time = Date.now(),
|
28
27
|
performance = [],
|
@@ -171,7 +170,11 @@
|
|
171
170
|
$(window).on('beforeunload' + eventNamespace, module.event.beforeUnload);
|
172
171
|
}
|
173
172
|
|
174
|
-
$field.on('change
|
173
|
+
$field.on('change' + eventNamespace
|
174
|
+
+ ' click' + eventNamespace
|
175
|
+
+ ' keyup' + eventNamespace
|
176
|
+
+ ' keydown' + eventNamespace
|
177
|
+
+ ' blur' + eventNamespace, function (e) {
|
175
178
|
module.determine.isDirty();
|
176
179
|
});
|
177
180
|
|
@@ -1473,9 +1476,6 @@
|
|
1473
1476
|
totalTime += data['Execution Time'];
|
1474
1477
|
});
|
1475
1478
|
title += ' ' + totalTime + 'ms';
|
1476
|
-
if (moduleSelector) {
|
1477
|
-
title += ' \'' + moduleSelector + '\'';
|
1478
|
-
}
|
1479
1479
|
if ($allModules.length > 1) {
|
1480
1480
|
title += ' (' + $allModules.length + ')';
|
1481
1481
|
}
|
@@ -23,15 +23,25 @@
|
|
23
23
|
var
|
24
24
|
$allModules = $(this),
|
25
25
|
|
26
|
-
moduleSelector = $allModules.selector || '',
|
27
|
-
|
28
26
|
time = Date.now(),
|
29
27
|
performance = [],
|
30
28
|
|
31
29
|
query = arguments[0],
|
32
30
|
methodInvoked = typeof query === 'string',
|
33
31
|
queryArguments = [].slice.call(arguments, 1),
|
32
|
+
contextCheck = function (context, win) {
|
33
|
+
var $context;
|
34
|
+
if ([window, document].indexOf(context) >= 0) {
|
35
|
+
$context = $(context);
|
36
|
+
} else {
|
37
|
+
$context = $(win.document).find(context);
|
38
|
+
if ($context.length === 0) {
|
39
|
+
$context = win.frameElement ? contextCheck(context, win.parent) : window;
|
40
|
+
}
|
41
|
+
}
|
34
42
|
|
43
|
+
return $context;
|
44
|
+
},
|
35
45
|
returnedValue
|
36
46
|
;
|
37
47
|
$allModules.each(function () {
|
@@ -51,6 +61,7 @@
|
|
51
61
|
moduleNamespace = namespace + '-module',
|
52
62
|
|
53
63
|
$module = $(this),
|
64
|
+
$context = settings.context ? contextCheck(settings.context, window) : $module,
|
54
65
|
|
55
66
|
element = this,
|
56
67
|
instance = $module.data(moduleNamespace),
|
@@ -68,19 +79,11 @@
|
|
68
79
|
}
|
69
80
|
|
70
81
|
// bind events with delegated events
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
;
|
77
|
-
} else {
|
78
|
-
$module
|
79
|
-
.on('mouseenter' + eventNamespace, module.change.text)
|
80
|
-
.on('mouseleave' + eventNamespace, module.reset.text)
|
81
|
-
.on('click' + eventNamespace, module.toggle.state)
|
82
|
-
;
|
83
|
-
}
|
82
|
+
$context
|
83
|
+
.on('mouseenter' + eventNamespace, module.change.text)
|
84
|
+
.on('mouseleave' + eventNamespace, module.reset.text)
|
85
|
+
.on('click' + eventNamespace, module.toggle.state)
|
86
|
+
;
|
84
87
|
module.instantiate();
|
85
88
|
},
|
86
89
|
|
@@ -94,8 +97,11 @@
|
|
94
97
|
|
95
98
|
destroy: function () {
|
96
99
|
module.verbose('Destroying previous module', instance);
|
97
|
-
$
|
100
|
+
$context
|
98
101
|
.off(eventNamespace)
|
102
|
+
;
|
103
|
+
$module
|
104
|
+
.removeData(metadata.storedText)
|
99
105
|
.removeData(moduleNamespace)
|
100
106
|
;
|
101
107
|
},
|
@@ -489,9 +495,6 @@
|
|
489
495
|
totalTime += data['Execution Time'];
|
490
496
|
});
|
491
497
|
title += ' ' + totalTime + 'ms';
|
492
|
-
if (moduleSelector) {
|
493
|
-
title += ' \'' + moduleSelector + '\'';
|
494
|
-
}
|
495
498
|
if (performance.length > 0) {
|
496
499
|
console.groupCollapsed(title);
|
497
500
|
if (console.table) {
|
@@ -22,7 +22,6 @@
|
|
22
22
|
$.fn.visibility = function (parameters) {
|
23
23
|
var
|
24
24
|
$allModules = $(this),
|
25
|
-
moduleSelector = $allModules.selector || '',
|
26
25
|
|
27
26
|
time = Date.now(),
|
28
27
|
performance = [],
|
@@ -30,6 +29,19 @@
|
|
30
29
|
query = arguments[0],
|
31
30
|
methodInvoked = typeof query === 'string',
|
32
31
|
queryArguments = [].slice.call(arguments, 1),
|
32
|
+
contextCheck = function (context, win) {
|
33
|
+
var $context;
|
34
|
+
if ([window, document].indexOf(context) >= 0) {
|
35
|
+
$context = $(context);
|
36
|
+
} else {
|
37
|
+
$context = $(win.document).find(context);
|
38
|
+
if ($context.length === 0) {
|
39
|
+
$context = win.frameElement ? contextCheck(context, win.parent) : window;
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
return $context;
|
44
|
+
},
|
33
45
|
returnedValue,
|
34
46
|
|
35
47
|
moduleCount = $allModules.length,
|
@@ -53,7 +65,7 @@
|
|
53
65
|
$window = $(window),
|
54
66
|
|
55
67
|
$module = $(this),
|
56
|
-
$context =
|
68
|
+
$context = contextCheck(settings.context, window),
|
57
69
|
|
58
70
|
$placeholder,
|
59
71
|
|
@@ -1089,9 +1101,6 @@
|
|
1089
1101
|
totalTime += data['Execution Time'];
|
1090
1102
|
});
|
1091
1103
|
title += ' ' + totalTime + 'ms';
|
1092
|
-
if (moduleSelector) {
|
1093
|
-
title += ' \'' + moduleSelector + '\'';
|
1094
|
-
}
|
1095
1104
|
if (performance.length > 0) {
|
1096
1105
|
console.groupCollapsed(title);
|
1097
1106
|
if (console.table) {
|
@@ -437,6 +437,7 @@
|
|
437
437
|
border-radius: @groupedBorderRadius;
|
438
438
|
border: @groupedBorder;
|
439
439
|
}
|
440
|
+
.ui.wrapping.horizontal.segments,
|
440
441
|
.ui.stackable.horizontal.segments {
|
441
442
|
flex-wrap: wrap;
|
442
443
|
}
|
@@ -473,7 +474,7 @@
|
|
473
474
|
.ui.segments > .horizontal.segments:first-child {
|
474
475
|
border-top: none;
|
475
476
|
}
|
476
|
-
.ui.horizontal.segments:not(.stackable) > .segment:first-child {
|
477
|
+
.ui.horizontal.segments:not(.stackable):not(.wrapping) > .segment:first-child {
|
477
478
|
border-left: none;
|
478
479
|
}
|
479
480
|
.ui.horizontal.segments > .segment:first-child {
|
@@ -45,7 +45,6 @@
|
|
45
45
|
|
46
46
|
eventNamespace = '.' + namespace,
|
47
47
|
moduleNamespace = 'module-' + namespace,
|
48
|
-
moduleSelector = $allModules.selector || '',
|
49
48
|
|
50
49
|
$module = $(this),
|
51
50
|
$title = $module.find(selector.title),
|
@@ -452,9 +451,6 @@
|
|
452
451
|
totalTime += data['Execution Time'];
|
453
452
|
});
|
454
453
|
title += ' ' + totalTime + 'ms';
|
455
|
-
if (moduleSelector) {
|
456
|
-
title += ' \'' + moduleSelector + '\'';
|
457
|
-
}
|
458
454
|
if (performance.length > 0) {
|
459
455
|
console.groupCollapsed(title);
|
460
456
|
if (console.table) {
|
@@ -24,8 +24,6 @@
|
|
24
24
|
$allModules = $(this),
|
25
25
|
$document = $(document),
|
26
26
|
|
27
|
-
moduleSelector = $allModules.selector || '',
|
28
|
-
|
29
27
|
time = Date.now(),
|
30
28
|
performance = [],
|
31
29
|
|
@@ -1494,9 +1492,6 @@
|
|
1494
1492
|
totalTime += data['Execution Time'];
|
1495
1493
|
});
|
1496
1494
|
title += ' ' + totalTime + 'ms';
|
1497
|
-
if (moduleSelector) {
|
1498
|
-
title += ' \'' + moduleSelector + '\'';
|
1499
|
-
}
|
1500
1495
|
if (performance.length > 0) {
|
1501
1496
|
console.groupCollapsed(title);
|
1502
1497
|
if (console.table) {
|
@@ -22,7 +22,6 @@
|
|
22
22
|
$.fn.checkbox = function (parameters) {
|
23
23
|
var
|
24
24
|
$allModules = $(this),
|
25
|
-
moduleSelector = $allModules.selector || '',
|
26
25
|
|
27
26
|
time = Date.now(),
|
28
27
|
performance = [],
|
@@ -737,9 +736,6 @@
|
|
737
736
|
totalTime += data['Execution Time'];
|
738
737
|
});
|
739
738
|
title += ' ' + totalTime + 'ms';
|
740
|
-
if (moduleSelector) {
|
741
|
-
title += ' \'' + moduleSelector + '\'';
|
742
|
-
}
|
743
739
|
if (performance.length > 0) {
|
744
740
|
console.groupCollapsed(title);
|
745
741
|
if (console.table) {
|
@@ -46,7 +46,6 @@
|
|
46
46
|
|
47
47
|
eventNamespace = '.' + namespace,
|
48
48
|
moduleNamespace = 'module-' + namespace,
|
49
|
-
moduleSelector = $allModules.selector || '',
|
50
49
|
|
51
50
|
clickEvent = 'ontouchstart' in document.documentElement
|
52
51
|
? 'touchstart'
|
@@ -542,9 +541,6 @@
|
|
542
541
|
totalTime += data['Execution Time'];
|
543
542
|
});
|
544
543
|
title += ' ' + totalTime + 'ms';
|
545
|
-
if (moduleSelector) {
|
546
|
-
title += ' \'' + moduleSelector + '\'';
|
547
|
-
}
|
548
544
|
if ($allModules.length > 1) {
|
549
545
|
title += ' (' + $allModules.length + ')';
|
550
546
|
}
|
@@ -24,14 +24,25 @@
|
|
24
24
|
$allModules = $(this),
|
25
25
|
$document = $(document),
|
26
26
|
|
27
|
-
moduleSelector = $allModules.selector || '',
|
28
|
-
|
29
27
|
time = Date.now(),
|
30
28
|
performance = [],
|
31
29
|
|
32
30
|
query = arguments[0],
|
33
31
|
methodInvoked = typeof query === 'string',
|
34
32
|
queryArguments = [].slice.call(arguments, 1),
|
33
|
+
contextCheck = function (context, win) {
|
34
|
+
var $context;
|
35
|
+
if ([window, document].indexOf(context) >= 0) {
|
36
|
+
$context = $(context);
|
37
|
+
} else {
|
38
|
+
$context = $(win.document).find(context);
|
39
|
+
if ($context.length === 0) {
|
40
|
+
$context = win.frameElement ? contextCheck(context, win.parent) : window;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
return $context;
|
45
|
+
},
|
35
46
|
returnedValue
|
36
47
|
;
|
37
48
|
|
@@ -56,7 +67,7 @@
|
|
56
67
|
moduleNamespace = 'module-' + namespace,
|
57
68
|
|
58
69
|
$module = $(this),
|
59
|
-
$context =
|
70
|
+
$context = contextCheck(settings.context, window),
|
60
71
|
$text = $module.find(selector.text),
|
61
72
|
$search = $module.find(selector.search),
|
62
73
|
$sizer = $module.find(selector.sizer),
|
@@ -2065,7 +2076,7 @@
|
|
2065
2076
|
values.push({
|
2066
2077
|
name: name,
|
2067
2078
|
value: value,
|
2068
|
-
text: text,
|
2079
|
+
text: module.escape.htmlEntities(text, true),
|
2069
2080
|
disabled: disabled,
|
2070
2081
|
});
|
2071
2082
|
}
|
@@ -3448,7 +3459,7 @@
|
|
3448
3459
|
selectChanged = false
|
3449
3460
|
;
|
3450
3461
|
$.each(mutations, function (index, mutation) {
|
3451
|
-
if ($(mutation.target).is('
|
3462
|
+
if ($(mutation.target).is('option, optgroup') || $(mutation.addedNodes).is('select') || ($(mutation.target).is('select') && mutation.type !== 'attributes')) {
|
3452
3463
|
selectChanged = true;
|
3453
3464
|
|
3454
3465
|
return false;
|
@@ -3757,7 +3768,7 @@
|
|
3757
3768
|
|
3758
3769
|
return text.replace(regExp.escape, '\\$&');
|
3759
3770
|
},
|
3760
|
-
htmlEntities: function (string) {
|
3771
|
+
htmlEntities: function (string, forceAmpersand) {
|
3761
3772
|
var
|
3762
3773
|
badChars = /["'<>`]/g,
|
3763
3774
|
shouldEscape = /["&'<>`]/,
|
@@ -3773,7 +3784,7 @@
|
|
3773
3784
|
}
|
3774
3785
|
;
|
3775
3786
|
if (shouldEscape.test(string)) {
|
3776
|
-
string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&');
|
3787
|
+
string = string.replace(forceAmpersand ? /&/g : /&(?![\d#a-z]{1,12};)/gi, '&');
|
3777
3788
|
|
3778
3789
|
return string.replace(badChars, escapedChar);
|
3779
3790
|
}
|
@@ -3864,9 +3875,6 @@
|
|
3864
3875
|
totalTime += data['Execution Time'];
|
3865
3876
|
});
|
3866
3877
|
title += ' ' + totalTime + 'ms';
|
3867
|
-
if (moduleSelector) {
|
3868
|
-
title += ' \'' + moduleSelector + '\'';
|
3869
|
-
}
|
3870
3878
|
if (performance.length > 0) {
|
3871
3879
|
console.groupCollapsed(title);
|
3872
3880
|
if (console.table) {
|
@@ -23,8 +23,6 @@
|
|
23
23
|
var
|
24
24
|
$allModules = $(this),
|
25
25
|
|
26
|
-
moduleSelector = $allModules.selector || '',
|
27
|
-
|
28
26
|
time = Date.now(),
|
29
27
|
performance = [],
|
30
28
|
|
@@ -455,9 +453,6 @@
|
|
455
453
|
totalTime += data['Execution Time'];
|
456
454
|
});
|
457
455
|
title += ' ' + totalTime + 'ms';
|
458
|
-
if (moduleSelector) {
|
459
|
-
title += ' \'' + moduleSelector + '\'';
|
460
|
-
}
|
461
456
|
if ($allModules.length > 1) {
|
462
457
|
title += ' (' + $allModules.length + ')';
|
463
458
|
}
|
@@ -28,15 +28,25 @@
|
|
28
28
|
$head = $('head'),
|
29
29
|
$body = $('body'),
|
30
30
|
|
31
|
-
moduleSelector = $allModules.selector || '',
|
32
|
-
|
33
31
|
time = Date.now(),
|
34
32
|
performance = [],
|
35
33
|
|
36
34
|
query = arguments[0],
|
37
35
|
methodInvoked = typeof query === 'string',
|
38
36
|
queryArguments = [].slice.call(arguments, 1),
|
37
|
+
contextCheck = function (context, win) {
|
38
|
+
var $context;
|
39
|
+
if ([window, document].indexOf(context) >= 0) {
|
40
|
+
$context = $body;
|
41
|
+
} else {
|
42
|
+
$context = $(win.document).find(context);
|
43
|
+
if ($context.length === 0) {
|
44
|
+
$context = win.frameElement ? contextCheck(context, win.parent) : $body;
|
45
|
+
}
|
46
|
+
}
|
39
47
|
|
48
|
+
return $context;
|
49
|
+
},
|
40
50
|
returnedValue
|
41
51
|
;
|
42
52
|
|
@@ -57,7 +67,7 @@
|
|
57
67
|
moduleNamespace = 'module-' + namespace,
|
58
68
|
|
59
69
|
$module = $(this),
|
60
|
-
$context =
|
70
|
+
$context = contextCheck(settings.context, window),
|
61
71
|
$closeIcon = $module.find(selector.close),
|
62
72
|
$inputs,
|
63
73
|
$focusedElement,
|
@@ -527,7 +537,7 @@
|
|
527
537
|
},
|
528
538
|
refresh: function () {
|
529
539
|
module.verbose('Refreshing selector cache');
|
530
|
-
$context =
|
540
|
+
$context = contextCheck(settings.context, window);
|
531
541
|
module.refreshFlyouts();
|
532
542
|
$pusher = $context.children(selector.pusher);
|
533
543
|
module.clear.cache();
|
@@ -1244,9 +1254,6 @@
|
|
1244
1254
|
totalTime += data['Execution Time'];
|
1245
1255
|
});
|
1246
1256
|
title += ' ' + totalTime + 'ms';
|
1247
|
-
if (moduleSelector) {
|
1248
|
-
title += ' \'' + moduleSelector + '\'';
|
1249
|
-
}
|
1250
1257
|
if (performance.length > 0) {
|
1251
1258
|
console.groupCollapsed(title);
|
1252
1259
|
if (console.table) {
|
@@ -26,15 +26,25 @@
|
|
26
26
|
$document = $(document),
|
27
27
|
$body = $('body'),
|
28
28
|
|
29
|
-
moduleSelector = $allModules.selector || '',
|
30
|
-
|
31
29
|
time = Date.now(),
|
32
30
|
performance = [],
|
33
31
|
|
34
32
|
query = arguments[0],
|
35
33
|
methodInvoked = typeof query === 'string',
|
36
34
|
queryArguments = [].slice.call(arguments, 1),
|
35
|
+
contextCheck = function (context, win) {
|
36
|
+
var $context;
|
37
|
+
if ([window, document].indexOf(context) >= 0) {
|
38
|
+
$context = $body;
|
39
|
+
} else {
|
40
|
+
$context = $(win.document).find(context);
|
41
|
+
if ($context.length === 0) {
|
42
|
+
$context = win.frameElement ? contextCheck(context, win.parent) : $body;
|
43
|
+
}
|
44
|
+
}
|
37
45
|
|
46
|
+
return $context;
|
47
|
+
},
|
38
48
|
returnedValue
|
39
49
|
;
|
40
50
|
|
@@ -54,7 +64,7 @@
|
|
54
64
|
moduleNamespace = 'module-' + namespace,
|
55
65
|
|
56
66
|
$module = $(this),
|
57
|
-
$context =
|
67
|
+
$context = contextCheck(settings.context, window),
|
58
68
|
isBody = $context[0] === $body[0],
|
59
69
|
$closeIcon = $module.find(selector.closeIcon),
|
60
70
|
$inputs,
|
@@ -1271,9 +1281,6 @@
|
|
1271
1281
|
totalTime += data['Execution Time'];
|
1272
1282
|
});
|
1273
1283
|
title += ' ' + totalTime + 'ms';
|
1274
|
-
if (moduleSelector) {
|
1275
|
-
title += ' \'' + moduleSelector + '\'';
|
1276
|
-
}
|
1277
1284
|
if (performance.length > 0) {
|
1278
1285
|
console.groupCollapsed(title);
|
1279
1286
|
if (console.table) {
|
@@ -22,7 +22,7 @@
|
|
22
22
|
$.fn.nag = function (parameters) {
|
23
23
|
var
|
24
24
|
$allModules = $(this),
|
25
|
-
|
25
|
+
$body = $('body'),
|
26
26
|
|
27
27
|
time = Date.now(),
|
28
28
|
performance = [],
|
@@ -30,6 +30,19 @@
|
|
30
30
|
query = arguments[0],
|
31
31
|
methodInvoked = typeof query === 'string',
|
32
32
|
queryArguments = [].slice.call(arguments, 1),
|
33
|
+
contextCheck = function (context, win) {
|
34
|
+
var $context;
|
35
|
+
if ([window, document].indexOf(context) >= 0) {
|
36
|
+
$context = $(context);
|
37
|
+
} else {
|
38
|
+
$context = $(win.document).find(context);
|
39
|
+
if ($context.length === 0) {
|
40
|
+
$context = win.frameElement ? contextCheck(context, win.parent) : $body;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
return $context;
|
45
|
+
},
|
33
46
|
returnedValue
|
34
47
|
;
|
35
48
|
$allModules.each(function () {
|
@@ -47,9 +60,7 @@
|
|
47
60
|
|
48
61
|
$module = $(this),
|
49
62
|
|
50
|
-
$context = settings.context
|
51
|
-
? ([window, document].indexOf(settings.context) < 0 ? $(document).find(settings.context) : $(settings.context))
|
52
|
-
: $('body'),
|
63
|
+
$context = settings.context ? contextCheck(settings.context, window) : $body,
|
53
64
|
|
54
65
|
element = this,
|
55
66
|
instance = $module.data(moduleNamespace),
|
@@ -379,9 +390,6 @@
|
|
379
390
|
totalTime += data['Execution Time'];
|
380
391
|
});
|
381
392
|
title += ' ' + totalTime + 'ms';
|
382
|
-
if (moduleSelector) {
|
383
|
-
title += ' \'' + moduleSelector + '\'';
|
384
|
-
}
|
385
393
|
if (performance.length > 0) {
|
386
394
|
console.groupCollapsed(title);
|
387
395
|
if (console.table) {
|
@@ -26,8 +26,6 @@
|
|
26
26
|
$window = $(window),
|
27
27
|
$body = $('body'),
|
28
28
|
|
29
|
-
moduleSelector = $allModules.selector || '',
|
30
|
-
|
31
29
|
clickEvent = 'ontouchstart' in document.documentElement
|
32
30
|
? 'touchstart'
|
33
31
|
: 'click',
|
@@ -38,6 +36,19 @@
|
|
38
36
|
query = arguments[0],
|
39
37
|
methodInvoked = typeof query === 'string',
|
40
38
|
queryArguments = [].slice.call(arguments, 1),
|
39
|
+
contextCheck = function (context, win) {
|
40
|
+
var $context;
|
41
|
+
if ([window, document].indexOf(context) >= 0) {
|
42
|
+
$context = $(context);
|
43
|
+
} else {
|
44
|
+
$context = $(win.document).find(context);
|
45
|
+
if ($context.length === 0) {
|
46
|
+
$context = win.frameElement ? contextCheck(context, win.parent) : $body;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
return $context;
|
51
|
+
},
|
41
52
|
|
42
53
|
returnedValue
|
43
54
|
;
|
@@ -57,12 +68,10 @@
|
|
57
68
|
moduleNamespace = 'module-' + namespace,
|
58
69
|
|
59
70
|
$module = $(this),
|
60
|
-
$context =
|
61
|
-
$scrollContext =
|
62
|
-
$boundary =
|
63
|
-
$target = settings.target
|
64
|
-
? ([window, document].indexOf(settings.target) < 0 ? $document.find(settings.target) : $(settings.target))
|
65
|
-
: $module,
|
71
|
+
$context = contextCheck(settings.context, window),
|
72
|
+
$scrollContext = contextCheck(settings.scrollContext, window),
|
73
|
+
$boundary = contextCheck(settings.boundary, window),
|
74
|
+
$target = settings.target ? contextCheck(settings.target, window) : $module,
|
66
75
|
|
67
76
|
$popup,
|
68
77
|
$offsetParent,
|
@@ -1246,9 +1255,6 @@
|
|
1246
1255
|
totalTime += data['Execution Time'];
|
1247
1256
|
});
|
1248
1257
|
title += ' ' + totalTime + 'ms';
|
1249
|
-
if (moduleSelector) {
|
1250
|
-
title += ' \'' + moduleSelector + '\'';
|
1251
|
-
}
|
1252
1258
|
if (performance.length > 0) {
|
1253
1259
|
console.groupCollapsed(title);
|
1254
1260
|
if (console.table) {
|
@@ -23,8 +23,6 @@
|
|
23
23
|
var
|
24
24
|
$allModules = $(this),
|
25
25
|
|
26
|
-
moduleSelector = $allModules.selector || '',
|
27
|
-
|
28
26
|
time = Date.now(),
|
29
27
|
performance = [],
|
30
28
|
|
@@ -806,9 +804,6 @@
|
|
806
804
|
totalTime += data['Execution Time'];
|
807
805
|
});
|
808
806
|
title += ' ' + totalTime + 'ms';
|
809
|
-
if (moduleSelector) {
|
810
|
-
title += ' \'' + moduleSelector + '\'';
|
811
|
-
}
|
812
807
|
if (performance.length > 0) {
|
813
808
|
console.groupCollapsed(title);
|
814
809
|
if (console.table) {
|
@@ -22,7 +22,6 @@
|
|
22
22
|
$.fn.rating = function (parameters) {
|
23
23
|
var
|
24
24
|
$allModules = $(this),
|
25
|
-
moduleSelector = $allModules.selector || '',
|
26
25
|
|
27
26
|
time = Date.now(),
|
28
27
|
performance = [],
|
@@ -382,9 +381,6 @@
|
|
382
381
|
totalTime += data['Execution Time'];
|
383
382
|
});
|
384
383
|
title += ' ' + totalTime + 'ms';
|
385
|
-
if (moduleSelector) {
|
386
|
-
title += ' \'' + moduleSelector + '\'';
|
387
|
-
}
|
388
384
|
if ($allModules.length > 1) {
|
389
385
|
title += ' (' + $allModules.length + ')';
|
390
386
|
}
|