fomantic-ui-sass 2.9.2 → 2.9.3.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 +8 -0
- data/Gemfile +2 -0
- data/Rakefile +2 -0
- data/app/assets/javascripts/semantic-ui/accordion.js +1 -5
- data/app/assets/javascripts/semantic-ui/api.js +22 -15
- data/app/assets/javascripts/semantic-ui/calendar.js +1 -6
- data/app/assets/javascripts/semantic-ui/checkbox.js +4 -6
- data/app/assets/javascripts/semantic-ui/dimmer.js +1 -5
- data/app/assets/javascripts/semantic-ui/dropdown.js +56 -33
- data/app/assets/javascripts/semantic-ui/embed.js +1 -6
- data/app/assets/javascripts/semantic-ui/flyout.js +40 -58
- data/app/assets/javascripts/semantic-ui/form.js +102 -53
- data/app/assets/javascripts/semantic-ui/modal.js +45 -33
- data/app/assets/javascripts/semantic-ui/nag.js +17 -9
- data/app/assets/javascripts/semantic-ui/popup.js +27 -19
- data/app/assets/javascripts/semantic-ui/progress.js +1 -6
- data/app/assets/javascripts/semantic-ui/rating.js +1 -5
- data/app/assets/javascripts/semantic-ui/search.js +4 -7
- data/app/assets/javascripts/semantic-ui/shape.js +1 -5
- data/app/assets/javascripts/semantic-ui/sidebar.js +15 -38
- data/app/assets/javascripts/semantic-ui/site.js +1 -1
- data/app/assets/javascripts/semantic-ui/slider.js +130 -34
- data/app/assets/javascripts/semantic-ui/state.js +23 -20
- data/app/assets/javascripts/semantic-ui/sticky.js +17 -16
- data/app/assets/javascripts/semantic-ui/tab.js +18 -8
- data/app/assets/javascripts/semantic-ui/toast.js +17 -9
- data/app/assets/javascripts/semantic-ui/transition.js +2 -6
- data/app/assets/javascripts/semantic-ui/visibility.js +15 -6
- data/app/assets/stylesheets/semantic-ui/collections/_breadcrumb.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/collections/_form.scss +53 -20
- data/app/assets/stylesheets/semantic-ui/collections/_grid.scss +107 -107
- data/app/assets/stylesheets/semantic-ui/collections/_menu.scss +13 -7
- data/app/assets/stylesheets/semantic-ui/collections/_message.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/collections/_table.scss +65 -1
- data/app/assets/stylesheets/semantic-ui/elements/_button.scss +2 -2
- data/app/assets/stylesheets/semantic-ui/elements/_container.scss +62 -1
- data/app/assets/stylesheets/semantic-ui/elements/_divider.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/elements/_emoji.scss +697 -249
- data/app/assets/stylesheets/semantic-ui/elements/_flag.scss +3 -2
- data/app/assets/stylesheets/semantic-ui/elements/_header.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/elements/_icon.scss +62 -62
- data/app/assets/stylesheets/semantic-ui/elements/_image.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/elements/_input.scss +3 -27
- data/app/assets/stylesheets/semantic-ui/elements/_label.scss +21 -2
- data/app/assets/stylesheets/semantic-ui/elements/_list.scss +13 -13
- data/app/assets/stylesheets/semantic-ui/elements/_loader.scss +282 -282
- data/app/assets/stylesheets/semantic-ui/elements/_placeholder.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/elements/_rail.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/elements/_reveal.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/elements/_segment.scss +161 -34
- data/app/assets/stylesheets/semantic-ui/elements/_step.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/elements/_text.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/globals/_reset.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/globals/_site.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_accordion.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_calendar.scss +145 -8
- data/app/assets/stylesheets/semantic-ui/modules/_checkbox.scss +50 -6
- data/app/assets/stylesheets/semantic-ui/modules/_dimmer.scss +3 -3
- data/app/assets/stylesheets/semantic-ui/modules/_dropdown.scss +119 -26
- data/app/assets/stylesheets/semantic-ui/modules/_embed.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_flyout.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_modal.scss +10 -3
- data/app/assets/stylesheets/semantic-ui/modules/_nag.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_popup.scss +41 -40
- data/app/assets/stylesheets/semantic-ui/modules/_progress.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_rating.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_search.scss +26 -1
- data/app/assets/stylesheets/semantic-ui/modules/_shape.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_sidebar.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_slider.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_sticky.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_tab.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/modules/_toast.scss +6 -1
- data/app/assets/stylesheets/semantic-ui/modules/_transition.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/views/_ad.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/views/_card.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/views/_comment.scss +6 -1
- data/app/assets/stylesheets/semantic-ui/views/_feed.scss +486 -5
- data/app/assets/stylesheets/semantic-ui/views/_item.scss +6 -1
- data/app/assets/stylesheets/semantic-ui/views/_statistic.scss +1 -1
- data/app/helpers/semantic_breadcrumbs_helper.rb +2 -0
- data/app/helpers/semantic_flash_helper.rb +2 -0
- data/app/helpers/semantic_icon_helper.rb +2 -0
- data/fomantic-ui-sass.gemspec +4 -2
- data/gemfiles/rails_5.0.gemfile +2 -0
- data/gemfiles/rails_5.1.gemfile +2 -0
- data/gemfiles/rails_5.2.gemfile +2 -0
- data/lib/fomantic/ui/sass/breadcrumbs.rb +2 -0
- data/lib/fomantic/ui/sass/engine.rb +5 -3
- data/lib/fomantic/ui/sass/version.rb +4 -2
- data/lib/fomantic-ui-sass.rb +2 -6
- data/spec/dummy/Rakefile +2 -0
- data/spec/dummy/app/controllers/application_controller.rb +2 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/bin/bundle +2 -0
- data/spec/dummy/bin/rails +2 -0
- data/spec/dummy/bin/rake +2 -0
- data/spec/dummy/config/application.rb +3 -1
- data/spec/dummy/config/boot.rb +2 -0
- data/spec/dummy/config/environment.rb +2 -0
- data/spec/dummy/config/environments/development.rb +3 -1
- data/spec/dummy/config/environments/production.rb +2 -0
- data/spec/dummy/config/environments/test.rb +3 -1
- data/spec/dummy/config/initializers/backtrace_silencers.rb +2 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +2 -0
- data/spec/dummy/config/initializers/inflections.rb +2 -0
- data/spec/dummy/config/initializers/mime_types.rb +2 -0
- data/spec/dummy/config/initializers/secret_token.rb +2 -0
- data/spec/dummy/config/initializers/session_store.rb +2 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +2 -0
- data/spec/dummy/config/routes.rb +2 -0
- data/spec/dummy/config.ru +3 -1
- data/spec/helpers/semantic_breadcrumbs_helper_spec.rb +2 -0
- data/spec/helpers/semantic_flash_helper_spec.rb +2 -0
- data/spec/helpers/semantic_icon_helper_spec.rb +2 -0
- data/spec/spec_helper.rb +2 -0
- data/tasks/converter.rb +9 -19
- data/templates/project/manifest.rb +2 -0
- metadata +12 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 834d34f8c089a3d1f5518ce3094eb0c0254e1b556dcdb074c0defc061c8f33c8
|
4
|
+
data.tar.gz: 966e889f65791ee79d19ccfb678e50667d96e283576ac205fcb8485ef36cf96c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ced8cc7cce8148ce51271d5f5c14c531cbf65c808992f3c8efd7c30dedde5e2b6ae0db610b1a38508110be80a27f4303f9b5d08f5bd21298fffa305f7d2fd2ce
|
7
|
+
data.tar.gz: 53f99320c8eb15e91bb86d58d6a50fc3da5d7adc5d5cccd0fac49fc63f092356ba370edaf7129b4bf65f0437eea7a516e6d97264c74de99588037d40dbc6131f
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## 2.9.3.1
|
2
|
+
|
3
|
+
Replace SassC with Dartsass [#17](https://github.com/fomantic/Fomantic-UI-SASS/pull/17)
|
4
|
+
|
5
|
+
## 2.9.3
|
6
|
+
|
7
|
+
Update Fomantic UI to [2.9.3](https://github.com/fomantic/Fomantic-UI/releases/tag/2.9.3)
|
8
|
+
|
1
9
|
## 2.9.2
|
2
10
|
|
3
11
|
Update Fomantic UI to [2.9.2](https://github.com/fomantic/Fomantic-UI/releases/tag/2.9.2)
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -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),
|
@@ -439,7 +438,7 @@
|
|
439
438
|
});
|
440
439
|
}
|
441
440
|
clearTimeout(module.performance.timer);
|
442
|
-
module.performance.timer = setTimeout(module.performance.display, 500);
|
441
|
+
module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
|
443
442
|
},
|
444
443
|
display: function () {
|
445
444
|
var
|
@@ -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) {
|
@@ -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
|
|
@@ -47,6 +58,7 @@
|
|
47
58
|
: $.extend({}, $.fn.api.settings),
|
48
59
|
|
49
60
|
// internal aliases
|
61
|
+
regExp = settings.regExp,
|
50
62
|
namespace = settings.namespace,
|
51
63
|
metadata = settings.metadata,
|
52
64
|
selector = settings.selector,
|
@@ -62,9 +74,7 @@
|
|
62
74
|
$form = $module.closest(selector.form),
|
63
75
|
|
64
76
|
// context used for state
|
65
|
-
$context = settings.stateContext
|
66
|
-
? ([window, document].indexOf(settings.stateContext) < 0 ? $(document).find(settings.stateContext) : $(settings.stateContext))
|
67
|
-
: $module,
|
77
|
+
$context = settings.stateContext ? contextCheck(settings.stateContext, window) : $module,
|
68
78
|
|
69
79
|
// request details
|
70
80
|
ajaxSettings,
|
@@ -351,8 +361,8 @@
|
|
351
361
|
optionalVariables
|
352
362
|
;
|
353
363
|
if (url) {
|
354
|
-
requiredVariables = url.match(
|
355
|
-
optionalVariables = url.match(
|
364
|
+
requiredVariables = url.match(regExp.required);
|
365
|
+
optionalVariables = url.match(regExp.optional);
|
356
366
|
urlData = urlData || settings.urlData;
|
357
367
|
if (requiredVariables) {
|
358
368
|
module.debug('Looking for required URL variables', requiredVariables);
|
@@ -449,7 +459,7 @@
|
|
449
459
|
});
|
450
460
|
});
|
451
461
|
$.each(formArray, function (i, el) {
|
452
|
-
if (!
|
462
|
+
if (!regExp.validate.test(el.name)) {
|
453
463
|
return;
|
454
464
|
}
|
455
465
|
var
|
@@ -460,7 +470,7 @@
|
|
460
470
|
|| (String(floatValue) === el.value
|
461
471
|
? floatValue
|
462
472
|
: (el.value === 'false' ? false : el.value)),
|
463
|
-
nameKeys = el.name.match(
|
473
|
+
nameKeys = el.name.match(regExp.key) || [],
|
464
474
|
pushKey = el.name.replace(/\[]$/, '')
|
465
475
|
;
|
466
476
|
if (!(pushKey in pushes)) {
|
@@ -480,9 +490,9 @@
|
|
480
490
|
|
481
491
|
if (k === '' && !Array.isArray(value)) { // foo[]
|
482
492
|
value = build([], pushes[pushKey]++, value);
|
483
|
-
} else if (
|
493
|
+
} else if (regExp.fixed.test(k)) { // foo[n]
|
484
494
|
value = build([], k, value);
|
485
|
-
} else if (
|
495
|
+
} else if (regExp.named.test(k)) { // foo; foo[bar]
|
486
496
|
value = build({}, k, value);
|
487
497
|
}
|
488
498
|
}
|
@@ -637,7 +647,7 @@
|
|
637
647
|
module.debug('Adding error state');
|
638
648
|
module.set.error();
|
639
649
|
if (module.should.removeError()) {
|
640
|
-
setTimeout(module.remove.error, settings.errorDuration);
|
650
|
+
setTimeout(function () { module.remove.error(); }, settings.errorDuration);
|
641
651
|
}
|
642
652
|
}
|
643
653
|
module.debug('API Request failed', errorMessage, xhr);
|
@@ -961,7 +971,7 @@
|
|
961
971
|
});
|
962
972
|
}
|
963
973
|
clearTimeout(module.performance.timer);
|
964
|
-
module.performance.timer = setTimeout(module.performance.display, 500);
|
974
|
+
module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
|
965
975
|
},
|
966
976
|
display: function () {
|
967
977
|
var
|
@@ -974,9 +984,6 @@
|
|
974
984
|
totalTime += data['Execution Time'];
|
975
985
|
});
|
976
986
|
title += ' ' + totalTime + 'ms';
|
977
|
-
if (moduleSelector) {
|
978
|
-
title += ' \'' + moduleSelector + '\'';
|
979
|
-
}
|
980
987
|
if (performance.length > 0) {
|
981
988
|
console.groupCollapsed(title);
|
982
989
|
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
|
|
@@ -1481,7 +1479,7 @@
|
|
1481
1479
|
});
|
1482
1480
|
}
|
1483
1481
|
clearTimeout(module.performance.timer);
|
1484
|
-
module.performance.timer = setTimeout(module.performance.display, 500);
|
1482
|
+
module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
|
1485
1483
|
},
|
1486
1484
|
display: function () {
|
1487
1485
|
var
|
@@ -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 = [],
|
@@ -242,7 +241,9 @@
|
|
242
241
|
$input.trigger('blur');
|
243
242
|
shortcutPressed = true;
|
244
243
|
event.stopPropagation();
|
245
|
-
} else if (!
|
244
|
+
} else if (!module.can.change()) {
|
245
|
+
shortcutPressed = true;
|
246
|
+
} else if (!event.ctrlKey) {
|
246
247
|
if (key === keyCode.space || (key === keyCode.enter && settings.enableEnterKey)) {
|
247
248
|
module.verbose('Enter/space key pressed, toggling checkbox');
|
248
249
|
module.toggle();
|
@@ -724,7 +725,7 @@
|
|
724
725
|
});
|
725
726
|
}
|
726
727
|
clearTimeout(module.performance.timer);
|
727
|
-
module.performance.timer = setTimeout(module.performance.display, 500);
|
728
|
+
module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
|
728
729
|
},
|
729
730
|
display: function () {
|
730
731
|
var
|
@@ -737,9 +738,6 @@
|
|
737
738
|
totalTime += data['Execution Time'];
|
738
739
|
});
|
739
740
|
title += ' ' + totalTime + 'ms';
|
740
|
-
if (moduleSelector) {
|
741
|
-
title += ' \'' + moduleSelector + '\'';
|
742
|
-
}
|
743
741
|
if (performance.length > 0) {
|
744
742
|
console.groupCollapsed(title);
|
745
743
|
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'
|
@@ -529,7 +528,7 @@
|
|
529
528
|
});
|
530
529
|
}
|
531
530
|
clearTimeout(module.performance.timer);
|
532
|
-
module.performance.timer = setTimeout(module.performance.display, 500);
|
531
|
+
module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
|
533
532
|
},
|
534
533
|
display: function () {
|
535
534
|
var
|
@@ -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),
|
@@ -91,7 +102,8 @@
|
|
91
102
|
selectObserver,
|
92
103
|
menuObserver,
|
93
104
|
classObserver,
|
94
|
-
module
|
105
|
+
module,
|
106
|
+
tempDisableApiCache = false
|
95
107
|
;
|
96
108
|
|
97
109
|
module = {
|
@@ -351,7 +363,7 @@
|
|
351
363
|
module.verbose('Adding clear icon');
|
352
364
|
$clear = $('<i />')
|
353
365
|
.addClass('remove icon')
|
354
|
-
.
|
366
|
+
.insertAfter($icon)
|
355
367
|
;
|
356
368
|
}
|
357
369
|
if (module.is.search() && !module.has.search()) {
|
@@ -517,7 +529,7 @@
|
|
517
529
|
callback = isFunction(callback)
|
518
530
|
? callback
|
519
531
|
: function () {};
|
520
|
-
if ((focused || iconClicked) && module.is.remote() && module.is.noApiCache()) {
|
532
|
+
if ((focused || iconClicked) && module.is.remote() && module.is.noApiCache() && !module.has.maxSelections()) {
|
521
533
|
module.clearItems();
|
522
534
|
}
|
523
535
|
if (!module.can.show() && module.is.remote()) {
|
@@ -567,7 +579,10 @@
|
|
567
579
|
if ($subMenu.length > 0) {
|
568
580
|
module.verbose('Hiding sub-menu', $subMenu);
|
569
581
|
$subMenu.each(function () {
|
570
|
-
|
582
|
+
var $sub = $(this);
|
583
|
+
if (!module.is.animating($sub)) {
|
584
|
+
module.animate.hide(false, $sub);
|
585
|
+
}
|
571
586
|
});
|
572
587
|
}
|
573
588
|
}
|
@@ -762,6 +777,8 @@
|
|
762
777
|
}
|
763
778
|
;
|
764
779
|
if (settings.useLabels && module.has.maxSelections()) {
|
780
|
+
module.show();
|
781
|
+
|
765
782
|
return;
|
766
783
|
}
|
767
784
|
if (settings.apiSettings) {
|
@@ -858,11 +875,12 @@
|
|
858
875
|
if (!$module.api('get request')) {
|
859
876
|
module.setup.api();
|
860
877
|
}
|
861
|
-
apiSettings = $.extend(true, {}, apiSettings, settings.apiSettings, apiCallbacks);
|
878
|
+
apiSettings = $.extend(true, {}, apiSettings, settings.apiSettings, apiCallbacks, tempDisableApiCache ? { cache: false } : {});
|
862
879
|
$module
|
863
880
|
.api('setting', apiSettings)
|
864
881
|
.api('query')
|
865
882
|
;
|
883
|
+
tempDisableApiCache = false;
|
866
884
|
},
|
867
885
|
|
868
886
|
filterItems: function (query) {
|
@@ -1084,8 +1102,8 @@
|
|
1084
1102
|
notFoundTokens = []
|
1085
1103
|
;
|
1086
1104
|
tokens.forEach(function (value) {
|
1087
|
-
if (module.set.selected(module.escape.htmlEntities(value.trim()), null,
|
1088
|
-
notFoundTokens.push(value);
|
1105
|
+
if (module.set.selected(module.escape.htmlEntities(value.trim()), null, false, true) === false) {
|
1106
|
+
notFoundTokens.push(value.trim());
|
1089
1107
|
}
|
1090
1108
|
});
|
1091
1109
|
event.preventDefault();
|
@@ -1218,7 +1236,7 @@
|
|
1218
1236
|
module.set.filtered();
|
1219
1237
|
}
|
1220
1238
|
clearTimeout(module.timer);
|
1221
|
-
module.timer = setTimeout(module.search, settings.delay.search);
|
1239
|
+
module.timer = setTimeout(function () { module.search(); }, settings.delay.search);
|
1222
1240
|
},
|
1223
1241
|
label: {
|
1224
1242
|
click: function (event) {
|
@@ -1394,11 +1412,13 @@
|
|
1394
1412
|
if (settings.allowAdditions) {
|
1395
1413
|
module.remove.userAddition();
|
1396
1414
|
}
|
1397
|
-
|
1415
|
+
if (!settings.keepSearchTerm) {
|
1416
|
+
module.remove.filteredItem();
|
1417
|
+
module.remove.searchTerm();
|
1418
|
+
}
|
1398
1419
|
if (!module.is.visible() && $target.length > 0) {
|
1399
1420
|
module.show();
|
1400
1421
|
}
|
1401
|
-
module.remove.searchTerm();
|
1402
1422
|
if (!module.is.focusedOnSearch() && skipRefocus !== true) {
|
1403
1423
|
module.focusSearch(true);
|
1404
1424
|
}
|
@@ -1584,7 +1604,9 @@
|
|
1584
1604
|
module.verbose('Selecting item from keyboard shortcut', $selectedItem);
|
1585
1605
|
module.event.item.click.call($selectedItem, event);
|
1586
1606
|
if (module.is.searchSelection()) {
|
1587
|
-
|
1607
|
+
if (!settings.keepSearchTerm) {
|
1608
|
+
module.remove.searchTerm();
|
1609
|
+
}
|
1588
1610
|
if (module.is.multiple()) {
|
1589
1611
|
$search.trigger('focus');
|
1590
1612
|
}
|
@@ -1801,7 +1823,7 @@
|
|
1801
1823
|
? value
|
1802
1824
|
: text;
|
1803
1825
|
if (module.can.activate($(element))) {
|
1804
|
-
module.set.selected(value, $(element));
|
1826
|
+
module.set.selected(value, $(element), false, settings.keepSearchTerm);
|
1805
1827
|
if (!module.is.multiple() && !(!settings.collapseOnActionable && $(element).hasClass(className.actionable))) {
|
1806
1828
|
module.hideAndClear();
|
1807
1829
|
}
|
@@ -2065,7 +2087,7 @@
|
|
2065
2087
|
values.push({
|
2066
2088
|
name: name,
|
2067
2089
|
value: value,
|
2068
|
-
text: text,
|
2090
|
+
text: module.escape.htmlEntities(text, true),
|
2069
2091
|
disabled: disabled,
|
2070
2092
|
});
|
2071
2093
|
}
|
@@ -2153,7 +2175,7 @@
|
|
2153
2175
|
return;
|
2154
2176
|
}
|
2155
2177
|
if (isMultiple) {
|
2156
|
-
if ($.inArray(module.escape.htmlEntities(String(optionValue)), value.map(String)) !== -1) {
|
2178
|
+
if ($.inArray(module.escape.htmlEntities(String(optionValue)), value.map(String).map(module.escape.htmlEntities)) !== -1) {
|
2157
2179
|
$selectedItem = $selectedItem
|
2158
2180
|
? $selectedItem.add($choice)
|
2159
2181
|
: $choice;
|
@@ -2214,7 +2236,7 @@
|
|
2214
2236
|
return false;
|
2215
2237
|
}
|
2216
2238
|
|
2217
|
-
return
|
2239
|
+
return false;
|
2218
2240
|
},
|
2219
2241
|
disabled: function () {
|
2220
2242
|
$search.attr('tabindex', module.is.disabled() ? -1 : 0);
|
@@ -2304,7 +2326,7 @@
|
|
2304
2326
|
$.each(values, function (value, name) {
|
2305
2327
|
module.set.text(name);
|
2306
2328
|
});
|
2307
|
-
} else {
|
2329
|
+
} else if (settings.useLabels) {
|
2308
2330
|
$.each(values, function (value, name) {
|
2309
2331
|
module.add.label(value, name);
|
2310
2332
|
});
|
@@ -2388,6 +2410,11 @@
|
|
2388
2410
|
module.set.value('', null, null, preventChangeTrigger);
|
2389
2411
|
},
|
2390
2412
|
|
2413
|
+
clearCache: function () {
|
2414
|
+
module.debug('Clearing API cache once');
|
2415
|
+
tempDisableApiCache = true;
|
2416
|
+
},
|
2417
|
+
|
2391
2418
|
scrollPage: function (direction, $selectedItem) {
|
2392
2419
|
var
|
2393
2420
|
$currentItem = $selectedItem || module.get.selectedItem(),
|
@@ -2446,7 +2473,7 @@
|
|
2446
2473
|
valueIsSet = searchValue !== ''
|
2447
2474
|
;
|
2448
2475
|
if (isMultiple && hasSearchValue) {
|
2449
|
-
module.verbose('Adjusting input width', searchWidth
|
2476
|
+
module.verbose('Adjusting input width', searchWidth);
|
2450
2477
|
$search.css('width', searchWidth + 'px');
|
2451
2478
|
}
|
2452
2479
|
if (hasSearchValue || (isSearchMultiple && valueIsSet)) {
|
@@ -2745,7 +2772,7 @@
|
|
2745
2772
|
return false;
|
2746
2773
|
}
|
2747
2774
|
module.debug('Setting selected menu item to', $selectedItem);
|
2748
|
-
if (module.is.multiple()) {
|
2775
|
+
if (module.is.multiple() && !keepSearchTerm) {
|
2749
2776
|
module.remove.searchWidth();
|
2750
2777
|
}
|
2751
2778
|
if (module.is.single()) {
|
@@ -3438,7 +3465,7 @@
|
|
3438
3465
|
return settings.apiSettings && module.can.useAPI();
|
3439
3466
|
},
|
3440
3467
|
noApiCache: function () {
|
3441
|
-
return settings.apiSettings && !settings.apiSettings.cache;
|
3468
|
+
return tempDisableApiCache || (settings.apiSettings && !settings.apiSettings.cache);
|
3442
3469
|
},
|
3443
3470
|
single: function () {
|
3444
3471
|
return !module.is.multiple();
|
@@ -3448,7 +3475,7 @@
|
|
3448
3475
|
selectChanged = false
|
3449
3476
|
;
|
3450
3477
|
$.each(mutations, function (index, mutation) {
|
3451
|
-
if ($(mutation.target).is('
|
3478
|
+
if ($(mutation.target).is('option, optgroup') || $(mutation.addedNodes).is('select') || ($(mutation.target).is('select') && mutation.type !== 'attributes')) {
|
3452
3479
|
selectChanged = true;
|
3453
3480
|
|
3454
3481
|
return false;
|
@@ -3720,12 +3747,12 @@
|
|
3720
3747
|
show: function () {
|
3721
3748
|
module.verbose('Delaying show event to ensure user intent');
|
3722
3749
|
clearTimeout(module.timer);
|
3723
|
-
module.timer = setTimeout(module.show, settings.delay.show);
|
3750
|
+
module.timer = setTimeout(function () { module.show(); }, settings.delay.show);
|
3724
3751
|
},
|
3725
3752
|
hide: function () {
|
3726
3753
|
module.verbose('Delaying hide event to ensure user intent');
|
3727
3754
|
clearTimeout(module.timer);
|
3728
|
-
module.timer = setTimeout(module.hide, settings.delay.hide);
|
3755
|
+
module.timer = setTimeout(function () { module.hide(); }, settings.delay.hide);
|
3729
3756
|
},
|
3730
3757
|
},
|
3731
3758
|
|
@@ -3757,7 +3784,7 @@
|
|
3757
3784
|
|
3758
3785
|
return text.replace(regExp.escape, '\\$&');
|
3759
3786
|
},
|
3760
|
-
htmlEntities: function (string) {
|
3787
|
+
htmlEntities: function (string, forceAmpersand) {
|
3761
3788
|
var
|
3762
3789
|
badChars = /["'<>`]/g,
|
3763
3790
|
shouldEscape = /["&'<>`]/,
|
@@ -3773,7 +3800,7 @@
|
|
3773
3800
|
}
|
3774
3801
|
;
|
3775
3802
|
if (shouldEscape.test(string)) {
|
3776
|
-
string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&');
|
3803
|
+
string = string.replace(forceAmpersand ? /&/g : /&(?![\d#a-z]{1,12};)/gi, '&');
|
3777
3804
|
|
3778
3805
|
return string.replace(badChars, escapedChar);
|
3779
3806
|
}
|
@@ -3851,7 +3878,7 @@
|
|
3851
3878
|
});
|
3852
3879
|
}
|
3853
3880
|
clearTimeout(module.performance.timer);
|
3854
|
-
module.performance.timer = setTimeout(module.performance.display, 500);
|
3881
|
+
module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
|
3855
3882
|
},
|
3856
3883
|
display: function () {
|
3857
3884
|
var
|
@@ -3864,9 +3891,6 @@
|
|
3864
3891
|
totalTime += data['Execution Time'];
|
3865
3892
|
});
|
3866
3893
|
title += ' ' + totalTime + 'ms';
|
3867
|
-
if (moduleSelector) {
|
3868
|
-
title += ' \'' + moduleSelector + '\'';
|
3869
|
-
}
|
3870
3894
|
if (performance.length > 0) {
|
3871
3895
|
console.groupCollapsed(title);
|
3872
3896
|
if (console.table) {
|
@@ -3991,6 +4015,7 @@
|
|
3991
4015
|
forceSelection: false, // force a choice on blur with search selection
|
3992
4016
|
|
3993
4017
|
allowAdditions: false, // whether multiple select should allow user added values
|
4018
|
+
keepSearchTerm: false, // whether the search value should be kept and menu stays filtered on item selection
|
3994
4019
|
ignoreCase: false, // whether to consider case sensitivity when creating labels
|
3995
4020
|
ignoreSearchCase: true, // whether to consider case sensitivity when filtering items
|
3996
4021
|
hideAdditions: true, // whether or not to hide special message prompting a user they can enter a value
|
@@ -4010,8 +4035,6 @@
|
|
4010
4035
|
duration: 200, // duration of transition
|
4011
4036
|
displayType: false, // displayType of transition
|
4012
4037
|
|
4013
|
-
glyphWidth: 1.037, // widest glyph width in em (W is 1.037 em) used to calculate multiselect input width
|
4014
|
-
|
4015
4038
|
headerDivider: true, // whether option headers should have an additional divider line underneath when converted from <select> <optgroup>
|
4016
4039
|
|
4017
4040
|
collapseOnActionable: true, // whether the dropdown should collapse upon selection of an actionable item
|
@@ -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
|
|
@@ -442,7 +440,7 @@
|
|
442
440
|
});
|
443
441
|
}
|
444
442
|
clearTimeout(module.performance.timer);
|
445
|
-
module.performance.timer = setTimeout(module.performance.display, 500);
|
443
|
+
module.performance.timer = setTimeout(function () { module.performance.display(); }, 500);
|
446
444
|
},
|
447
445
|
display: function () {
|
448
446
|
var
|
@@ -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
|
}
|