@ntlab/ntjs-assets 1.1.0 → 1.1.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/assets/js/jquery/jquery.js +118 -109
- package/assets/js/jquery/jquery.min.js +2 -2
- package/assets/js/jquery/jquery.min.map +1 -1
- package/assets/js/semantic-ui/components/accordion.css +1 -1
- package/assets/js/semantic-ui/components/accordion.js +1 -1
- package/assets/js/semantic-ui/components/accordion.min.css +1 -1
- package/assets/js/semantic-ui/components/accordion.min.js +3 -3
- package/assets/js/semantic-ui/components/ad.css +1 -1
- package/assets/js/semantic-ui/components/ad.min.css +1 -1
- package/assets/js/semantic-ui/components/api.js +1 -1
- package/assets/js/semantic-ui/components/api.min.js +3 -3
- package/assets/js/semantic-ui/components/breadcrumb.css +1 -1
- package/assets/js/semantic-ui/components/breadcrumb.min.css +1 -1
- package/assets/js/semantic-ui/components/button.css +29 -2
- package/assets/js/semantic-ui/components/button.min.css +2 -2
- package/assets/js/semantic-ui/components/calendar.css +3 -3
- package/assets/js/semantic-ui/components/calendar.js +10 -12
- package/assets/js/semantic-ui/components/calendar.min.css +2 -2
- package/assets/js/semantic-ui/components/calendar.min.js +4 -4
- package/assets/js/semantic-ui/components/card.css +74 -2
- package/assets/js/semantic-ui/components/card.min.css +2 -2
- package/assets/js/semantic-ui/components/checkbox.css +46 -4
- package/assets/js/semantic-ui/components/checkbox.js +1 -1
- package/assets/js/semantic-ui/components/checkbox.min.css +2 -2
- package/assets/js/semantic-ui/components/checkbox.min.js +3 -3
- package/assets/js/semantic-ui/components/comment.css +1 -1
- package/assets/js/semantic-ui/components/comment.min.css +1 -1
- package/assets/js/semantic-ui/components/container.css +3 -4
- package/assets/js/semantic-ui/components/container.min.css +2 -2
- package/assets/js/semantic-ui/components/dimmer.css +1 -1
- package/assets/js/semantic-ui/components/dimmer.js +9 -12
- package/assets/js/semantic-ui/components/dimmer.min.css +1 -1
- package/assets/js/semantic-ui/components/dimmer.min.js +4 -4
- package/assets/js/semantic-ui/components/divider.css +1 -1
- package/assets/js/semantic-ui/components/divider.min.css +1 -1
- package/assets/js/semantic-ui/components/dropdown.css +72 -3
- package/assets/js/semantic-ui/components/dropdown.js +193 -101
- package/assets/js/semantic-ui/components/dropdown.min.css +2 -2
- package/assets/js/semantic-ui/components/dropdown.min.js +4 -4
- package/assets/js/semantic-ui/components/embed.css +1 -1
- package/assets/js/semantic-ui/components/embed.js +1 -1
- package/assets/js/semantic-ui/components/embed.min.css +1 -1
- package/assets/js/semantic-ui/components/embed.min.js +3 -3
- package/assets/js/semantic-ui/components/feed.css +1 -1
- package/assets/js/semantic-ui/components/feed.min.css +1 -1
- package/assets/js/semantic-ui/components/flag.css +1 -1
- package/assets/js/semantic-ui/components/flag.min.css +1 -1
- package/assets/js/semantic-ui/components/form.css +46 -5
- package/assets/js/semantic-ui/components/form.js +99 -61
- package/assets/js/semantic-ui/components/form.min.css +2 -2
- package/assets/js/semantic-ui/components/form.min.js +4 -4
- package/assets/js/semantic-ui/components/grid.css +14 -7
- package/assets/js/semantic-ui/components/grid.min.css +2 -2
- package/assets/js/semantic-ui/components/header.css +10 -5
- package/assets/js/semantic-ui/components/header.min.css +2 -2
- package/assets/js/semantic-ui/components/icon.css +237 -65
- package/assets/js/semantic-ui/components/icon.min.css +2 -2
- package/assets/js/semantic-ui/components/image.css +1 -1
- package/assets/js/semantic-ui/components/image.min.css +1 -1
- package/assets/js/semantic-ui/components/input.css +2 -1
- package/assets/js/semantic-ui/components/input.min.css +2 -2
- package/assets/js/semantic-ui/components/item.css +1 -1
- package/assets/js/semantic-ui/components/item.min.css +1 -1
- package/assets/js/semantic-ui/components/label.css +1 -1
- package/assets/js/semantic-ui/components/label.min.css +1 -1
- package/assets/js/semantic-ui/components/list.css +1 -1
- package/assets/js/semantic-ui/components/list.min.css +1 -1
- package/assets/js/semantic-ui/components/loader.css +41 -37
- package/assets/js/semantic-ui/components/loader.min.css +2 -2
- package/assets/js/semantic-ui/components/menu.css +8 -6
- package/assets/js/semantic-ui/components/menu.min.css +1 -1
- package/assets/js/semantic-ui/components/message.css +50 -3
- package/assets/js/semantic-ui/components/message.min.css +2 -2
- package/assets/js/semantic-ui/components/modal.css +19 -8
- package/assets/js/semantic-ui/components/modal.js +260 -17
- package/assets/js/semantic-ui/components/modal.min.css +2 -2
- package/assets/js/semantic-ui/components/modal.min.js +4 -4
- package/assets/js/semantic-ui/components/nag.css +168 -16
- package/assets/js/semantic-ui/components/nag.js +131 -65
- package/assets/js/semantic-ui/components/nag.min.css +2 -2
- package/assets/js/semantic-ui/components/nag.min.js +4 -4
- package/assets/js/semantic-ui/components/placeholder.css +1 -1
- package/assets/js/semantic-ui/components/placeholder.min.css +1 -1
- package/assets/js/semantic-ui/components/popup.css +4 -2
- package/assets/js/semantic-ui/components/popup.js +5 -5
- package/assets/js/semantic-ui/components/popup.min.css +2 -2
- package/assets/js/semantic-ui/components/popup.min.js +4 -4
- package/assets/js/semantic-ui/components/progress.css +18 -10
- package/assets/js/semantic-ui/components/progress.js +9 -11
- package/assets/js/semantic-ui/components/progress.min.css +2 -2
- package/assets/js/semantic-ui/components/progress.min.js +4 -4
- package/assets/js/semantic-ui/components/rail.css +1 -1
- package/assets/js/semantic-ui/components/rail.min.css +1 -1
- package/assets/js/semantic-ui/components/rating.css +18 -33
- package/assets/js/semantic-ui/components/rating.js +1 -1
- package/assets/js/semantic-ui/components/rating.min.css +2 -2
- package/assets/js/semantic-ui/components/rating.min.js +3 -3
- package/assets/js/semantic-ui/components/reset.css +2 -3
- package/assets/js/semantic-ui/components/reset.min.css +2 -2
- package/assets/js/semantic-ui/components/reveal.css +1 -1
- package/assets/js/semantic-ui/components/reveal.min.css +1 -1
- package/assets/js/semantic-ui/components/search.css +1 -1
- package/assets/js/semantic-ui/components/search.js +15 -13
- package/assets/js/semantic-ui/components/search.min.css +1 -1
- package/assets/js/semantic-ui/components/search.min.js +4 -4
- package/assets/js/semantic-ui/components/segment.css +34 -2
- package/assets/js/semantic-ui/components/segment.min.css +2 -2
- package/assets/js/semantic-ui/components/shape.css +1 -1
- package/assets/js/semantic-ui/components/shape.js +1 -1
- package/assets/js/semantic-ui/components/shape.min.css +1 -1
- package/assets/js/semantic-ui/components/shape.min.js +3 -3
- package/assets/js/semantic-ui/components/sidebar.css +1 -1
- package/assets/js/semantic-ui/components/sidebar.js +1 -1
- package/assets/js/semantic-ui/components/sidebar.min.css +1 -1
- package/assets/js/semantic-ui/components/sidebar.min.js +3 -3
- package/assets/js/semantic-ui/components/site.css +2 -2
- package/assets/js/semantic-ui/components/site.js +1 -1
- package/assets/js/semantic-ui/components/site.min.css +2 -2
- package/assets/js/semantic-ui/components/site.min.js +3 -3
- package/assets/js/semantic-ui/components/slider.css +3 -1
- package/assets/js/semantic-ui/components/slider.js +56 -32
- package/assets/js/semantic-ui/components/slider.min.css +1 -1
- package/assets/js/semantic-ui/components/slider.min.js +4 -4
- package/assets/js/semantic-ui/components/state.js +1 -1
- package/assets/js/semantic-ui/components/state.min.js +3 -3
- package/assets/js/semantic-ui/components/statistic.css +1 -1
- package/assets/js/semantic-ui/components/statistic.min.css +1 -1
- package/assets/js/semantic-ui/components/step.css +1 -1
- package/assets/js/semantic-ui/components/step.min.css +1 -1
- package/assets/js/semantic-ui/components/sticky.css +1 -2
- package/assets/js/semantic-ui/components/sticky.js +1 -1
- package/assets/js/semantic-ui/components/sticky.min.css +2 -2
- package/assets/js/semantic-ui/components/sticky.min.js +3 -3
- package/assets/js/semantic-ui/components/tab.css +1 -1
- package/assets/js/semantic-ui/components/tab.js +1 -1
- package/assets/js/semantic-ui/components/tab.min.css +1 -1
- package/assets/js/semantic-ui/components/tab.min.js +3 -3
- package/assets/js/semantic-ui/components/table.css +6 -2
- package/assets/js/semantic-ui/components/table.min.css +2 -2
- package/assets/js/semantic-ui/components/text.css +1 -1
- package/assets/js/semantic-ui/components/text.min.css +1 -1
- package/assets/js/semantic-ui/components/toast.css +97 -10
- package/assets/js/semantic-ui/components/toast.js +27 -7
- package/assets/js/semantic-ui/components/toast.min.css +2 -2
- package/assets/js/semantic-ui/components/toast.min.js +4 -4
- package/assets/js/semantic-ui/components/transition.css +1 -1
- package/assets/js/semantic-ui/components/transition.js +2 -2
- package/assets/js/semantic-ui/components/transition.min.css +1 -1
- package/assets/js/semantic-ui/components/transition.min.js +3 -3
- package/assets/js/semantic-ui/components/visibility.js +2 -2
- package/assets/js/semantic-ui/components/visibility.min.js +3 -3
- package/assets/js/semantic-ui/semantic.css +1151 -247
- package/assets/js/semantic-ui/semantic.js +835 -357
- package/assets/js/semantic-ui/semantic.min.css +4 -397
- package/assets/js/semantic-ui/semantic.min.js +4 -4
- package/assets/js/socket.io/socket.io.esm.min.js +7 -0
- package/assets/js/socket.io/socket.io.esm.min.js.map +1 -0
- package/assets/js/socket.io/socket.io.js +4440 -6084
- package/assets/js/socket.io/socket.io.js.map +1 -1
- package/assets/js/socket.io/socket.io.min.js +7 -7
- package/assets/js/socket.io/socket.io.min.js.map +1 -1
- package/assets/js/socket.io/socket.io.msgpack.min.js +7 -7
- package/assets/js/socket.io/socket.io.msgpack.min.js.map +1 -1
- package/cdn.json +4 -4
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* # Fomantic-UI - Modal
|
|
2
|
+
* # Fomantic-UI 2.8.8 - Modal
|
|
3
3
|
* http://github.com/fomantic/Fomantic-UI/
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -58,6 +58,7 @@ $.fn.modal = function(parameters) {
|
|
|
58
58
|
selector = settings.selector,
|
|
59
59
|
className = settings.className,
|
|
60
60
|
namespace = settings.namespace,
|
|
61
|
+
fields = settings.fields,
|
|
61
62
|
error = settings.error,
|
|
62
63
|
|
|
63
64
|
eventNamespace = '.' + namespace,
|
|
@@ -74,7 +75,7 @@ $.fn.modal = function(parameters) {
|
|
|
74
75
|
$dimmer,
|
|
75
76
|
|
|
76
77
|
element = this,
|
|
77
|
-
instance = $module.data(moduleNamespace),
|
|
78
|
+
instance = $module.hasClass('modal') ? $module.data(moduleNamespace) : undefined,
|
|
78
79
|
|
|
79
80
|
ignoreRepeatedEvents = false,
|
|
80
81
|
|
|
@@ -91,6 +92,46 @@ $.fn.modal = function(parameters) {
|
|
|
91
92
|
module = {
|
|
92
93
|
|
|
93
94
|
initialize: function() {
|
|
95
|
+
if(!$module.hasClass('modal')) {
|
|
96
|
+
module.create.modal();
|
|
97
|
+
if(!$.isFunction(settings.onHidden)) {
|
|
98
|
+
settings.onHidden = function () {
|
|
99
|
+
module.destroy();
|
|
100
|
+
$module.remove();
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
$module.addClass(settings.class);
|
|
105
|
+
if (settings.title !== '') {
|
|
106
|
+
$module.find(selector.title).html(module.helpers.escape(settings.title, settings.preserveHTML)).addClass(settings.classTitle);
|
|
107
|
+
}
|
|
108
|
+
if (settings.content !== '') {
|
|
109
|
+
$module.find(selector.content).html(module.helpers.escape(settings.content, settings.preserveHTML)).addClass(settings.classContent);
|
|
110
|
+
}
|
|
111
|
+
if(module.has.configActions()){
|
|
112
|
+
var $actions = $module.find(selector.actions).addClass(settings.classActions);
|
|
113
|
+
if ($actions.length === 0) {
|
|
114
|
+
$actions = $('<div/>', {class: className.actions + ' ' + (settings.classActions || '')}).appendTo($module);
|
|
115
|
+
} else {
|
|
116
|
+
$actions.empty();
|
|
117
|
+
}
|
|
118
|
+
settings.actions.forEach(function (el) {
|
|
119
|
+
var icon = el[fields.icon] ? '<i class="' + module.helpers.deQuote(el[fields.icon]) + ' icon"></i>' : '',
|
|
120
|
+
text = module.helpers.escape(el[fields.text] || '', settings.preserveHTML),
|
|
121
|
+
cls = module.helpers.deQuote(el[fields.class] || ''),
|
|
122
|
+
click = el[fields.click] && $.isFunction(el[fields.click]) ? el[fields.click] : function () {};
|
|
123
|
+
$actions.append($('<button/>', {
|
|
124
|
+
html: icon + text,
|
|
125
|
+
class: className.button + ' ' + cls,
|
|
126
|
+
click: function () {
|
|
127
|
+
if (click.call(element, $module) === false) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
module.hide();
|
|
131
|
+
}
|
|
132
|
+
}));
|
|
133
|
+
});
|
|
134
|
+
}
|
|
94
135
|
module.cache = {};
|
|
95
136
|
module.verbose('Initializing dimmer', $context);
|
|
96
137
|
|
|
@@ -110,6 +151,9 @@ $.fn.modal = function(parameters) {
|
|
|
110
151
|
module.observeChanges();
|
|
111
152
|
}
|
|
112
153
|
module.instantiate();
|
|
154
|
+
if(settings.autoShow){
|
|
155
|
+
module.show();
|
|
156
|
+
}
|
|
113
157
|
},
|
|
114
158
|
|
|
115
159
|
instantiate: function() {
|
|
@@ -121,6 +165,23 @@ $.fn.modal = function(parameters) {
|
|
|
121
165
|
},
|
|
122
166
|
|
|
123
167
|
create: {
|
|
168
|
+
modal: function() {
|
|
169
|
+
$module = $('<div/>', {class: className.modal});
|
|
170
|
+
if (settings.closeIcon) {
|
|
171
|
+
$close = $('<i/>', {class: className.close})
|
|
172
|
+
$module.append($close);
|
|
173
|
+
}
|
|
174
|
+
if (settings.title !== '') {
|
|
175
|
+
$('<div/>', {class: className.title}).appendTo($module);
|
|
176
|
+
}
|
|
177
|
+
if (settings.content !== '') {
|
|
178
|
+
$('<div/>', {class: className.content}).appendTo($module);
|
|
179
|
+
}
|
|
180
|
+
if (module.has.configActions()) {
|
|
181
|
+
$('<div/>', {class: className.actions}).appendTo($module);
|
|
182
|
+
}
|
|
183
|
+
$context.append($module);
|
|
184
|
+
},
|
|
124
185
|
dimmer: function() {
|
|
125
186
|
var
|
|
126
187
|
defaultSettings = {
|
|
@@ -247,6 +308,12 @@ $.fn.modal = function(parameters) {
|
|
|
247
308
|
get: {
|
|
248
309
|
id: function() {
|
|
249
310
|
return (Math.random().toString(16) + '000000000').substr(2, 8);
|
|
311
|
+
},
|
|
312
|
+
element: function() {
|
|
313
|
+
return $module;
|
|
314
|
+
},
|
|
315
|
+
settings: function() {
|
|
316
|
+
return settings;
|
|
250
317
|
}
|
|
251
318
|
},
|
|
252
319
|
|
|
@@ -424,9 +491,9 @@ $.fn.modal = function(parameters) {
|
|
|
424
491
|
$module
|
|
425
492
|
.transition({
|
|
426
493
|
debug : settings.debug,
|
|
427
|
-
animation : settings.transition + ' in',
|
|
494
|
+
animation : (settings.transition.showMethod || settings.transition) + ' in',
|
|
428
495
|
queue : settings.queue,
|
|
429
|
-
duration : settings.duration,
|
|
496
|
+
duration : settings.transition.showDuration || settings.duration,
|
|
430
497
|
useFailSafe : true,
|
|
431
498
|
onComplete : function() {
|
|
432
499
|
settings.onVisible.apply(element);
|
|
@@ -474,9 +541,9 @@ $.fn.modal = function(parameters) {
|
|
|
474
541
|
$module
|
|
475
542
|
.transition({
|
|
476
543
|
debug : settings.debug,
|
|
477
|
-
animation : settings.transition + ' out',
|
|
544
|
+
animation : (settings.transition.hideMethod || settings.transition) + ' out',
|
|
478
545
|
queue : settings.queue,
|
|
479
|
-
duration : settings.duration,
|
|
546
|
+
duration : settings.transition.hideDuration || settings.duration,
|
|
480
547
|
useFailSafe : true,
|
|
481
548
|
onStart : function() {
|
|
482
549
|
if(!module.others.active() && !module.others.animating() && !keepDimmed) {
|
|
@@ -499,7 +566,9 @@ $.fn.modal = function(parameters) {
|
|
|
499
566
|
$previousModal.find(selector.dimmer).removeClass('active');
|
|
500
567
|
}
|
|
501
568
|
}
|
|
502
|
-
settings.onHidden
|
|
569
|
+
if($.isFunction(settings.onHidden)) {
|
|
570
|
+
settings.onHidden.call(element);
|
|
571
|
+
}
|
|
503
572
|
module.remove.dimmerStyles();
|
|
504
573
|
module.restore.focus();
|
|
505
574
|
callback();
|
|
@@ -625,7 +694,12 @@ $.fn.modal = function(parameters) {
|
|
|
625
694
|
bodyMargin: function() {
|
|
626
695
|
var position = module.can.leftBodyScrollbar() ? 'left':'right';
|
|
627
696
|
$body.css('margin-'+position, initialBodyMargin);
|
|
628
|
-
$body.find(selector.bodyFixed.replace('right',position)).
|
|
697
|
+
$body.find(selector.bodyFixed.replace('right',position)).each(function(){
|
|
698
|
+
var el = $(this),
|
|
699
|
+
attribute = el.css('position') === 'fixed' ? 'padding-'+position : position
|
|
700
|
+
;
|
|
701
|
+
el.css(attribute, '');
|
|
702
|
+
});
|
|
629
703
|
}
|
|
630
704
|
},
|
|
631
705
|
|
|
@@ -699,7 +773,35 @@ $.fn.modal = function(parameters) {
|
|
|
699
773
|
$module.removeClass(className.loading);
|
|
700
774
|
module.debug('Caching modal and container sizes', module.cache);
|
|
701
775
|
},
|
|
702
|
-
|
|
776
|
+
helpers: {
|
|
777
|
+
deQuote: function(string) {
|
|
778
|
+
return String(string).replace(/"/g,"");
|
|
779
|
+
},
|
|
780
|
+
escape: function(string, preserveHTML) {
|
|
781
|
+
if (preserveHTML){
|
|
782
|
+
return string;
|
|
783
|
+
}
|
|
784
|
+
var
|
|
785
|
+
badChars = /[<>"'`]/g,
|
|
786
|
+
shouldEscape = /[&<>"'`]/,
|
|
787
|
+
escape = {
|
|
788
|
+
"<": "<",
|
|
789
|
+
">": ">",
|
|
790
|
+
'"': """,
|
|
791
|
+
"'": "'",
|
|
792
|
+
"`": "`"
|
|
793
|
+
},
|
|
794
|
+
escapedChar = function(chr) {
|
|
795
|
+
return escape[chr];
|
|
796
|
+
}
|
|
797
|
+
;
|
|
798
|
+
if(shouldEscape.test(string)) {
|
|
799
|
+
string = string.replace(/&(?![a-z0-9#]{1,6};)/, "&");
|
|
800
|
+
return string.replace(badChars, escapedChar);
|
|
801
|
+
}
|
|
802
|
+
return string;
|
|
803
|
+
}
|
|
804
|
+
},
|
|
703
805
|
can: {
|
|
704
806
|
leftBodyScrollbar: function(){
|
|
705
807
|
if(module.cache.leftBodyScrollbar === undefined) {
|
|
@@ -734,7 +836,11 @@ $.fn.modal = function(parameters) {
|
|
|
734
836
|
;
|
|
735
837
|
}
|
|
736
838
|
},
|
|
737
|
-
|
|
839
|
+
has: {
|
|
840
|
+
configActions: function () {
|
|
841
|
+
return Array.isArray(settings.actions) && settings.actions.length > 0;
|
|
842
|
+
}
|
|
843
|
+
},
|
|
738
844
|
is: {
|
|
739
845
|
active: function() {
|
|
740
846
|
return $module.hasClass(className.active);
|
|
@@ -811,7 +917,12 @@ $.fn.modal = function(parameters) {
|
|
|
811
917
|
if(settings.detachable || module.can.fit()) {
|
|
812
918
|
$body.css('margin-'+position, tempBodyMargin + 'px');
|
|
813
919
|
}
|
|
814
|
-
$body.find(selector.bodyFixed.replace('right',position)).
|
|
920
|
+
$body.find(selector.bodyFixed.replace('right',position)).each(function(){
|
|
921
|
+
var el = $(this),
|
|
922
|
+
attribute = el.css('position') === 'fixed' ? 'padding-'+position : position
|
|
923
|
+
;
|
|
924
|
+
el.css(attribute, 'calc(' + el.css(attribute) + ' + ' + tempBodyMargin + 'px)');
|
|
925
|
+
});
|
|
815
926
|
},
|
|
816
927
|
clickaway: function() {
|
|
817
928
|
if (!settings.detachable) {
|
|
@@ -838,8 +949,8 @@ $.fn.modal = function(parameters) {
|
|
|
838
949
|
closable : 'auto',
|
|
839
950
|
useFlex : module.can.useFlex(),
|
|
840
951
|
duration : {
|
|
841
|
-
show : settings.duration,
|
|
842
|
-
hide : settings.duration
|
|
952
|
+
show : settings.transition.showDuration || settings.duration,
|
|
953
|
+
hide : settings.transition.hideDuration || settings.duration
|
|
843
954
|
}
|
|
844
955
|
},
|
|
845
956
|
dimmerSettings = $.extend(true, defaultSettings, settings.dimmerSettings)
|
|
@@ -1098,15 +1209,29 @@ $.fn.modal = function(parameters) {
|
|
|
1098
1209
|
|
|
1099
1210
|
if(methodInvoked) {
|
|
1100
1211
|
if(instance === undefined) {
|
|
1212
|
+
if ($.isFunction(settings.templates[query])) {
|
|
1213
|
+
settings.autoShow = true;
|
|
1214
|
+
settings.className.modal = settings.className.template;
|
|
1215
|
+
settings = $.extend(true, {}, settings, settings.templates[query].apply(module ,queryArguments));
|
|
1216
|
+
|
|
1217
|
+
// reassign shortcuts
|
|
1218
|
+
className = settings.className;
|
|
1219
|
+
namespace = settings.namespace;
|
|
1220
|
+
fields = settings.fields;
|
|
1221
|
+
error = settings.error;
|
|
1222
|
+
}
|
|
1101
1223
|
module.initialize();
|
|
1102
1224
|
}
|
|
1103
|
-
|
|
1225
|
+
if (!$.isFunction(settings.templates[query])) {
|
|
1226
|
+
module.invoke(query);
|
|
1227
|
+
}
|
|
1104
1228
|
}
|
|
1105
1229
|
else {
|
|
1106
1230
|
if(instance !== undefined) {
|
|
1107
1231
|
instance.invoke('destroy');
|
|
1108
1232
|
}
|
|
1109
1233
|
module.initialize();
|
|
1234
|
+
returnedValue = $module;
|
|
1110
1235
|
}
|
|
1111
1236
|
})
|
|
1112
1237
|
;
|
|
@@ -1137,6 +1262,7 @@ $.fn.modal.settings = {
|
|
|
1137
1262
|
closable : true,
|
|
1138
1263
|
autofocus : true,
|
|
1139
1264
|
restoreFocus : true,
|
|
1265
|
+
autoShow : false,
|
|
1140
1266
|
|
|
1141
1267
|
inverted : false,
|
|
1142
1268
|
blurring : false,
|
|
@@ -1161,6 +1287,24 @@ $.fn.modal.settings = {
|
|
|
1161
1287
|
padding : 50,
|
|
1162
1288
|
scrollbarWidth: 10,
|
|
1163
1289
|
|
|
1290
|
+
//dynamic content
|
|
1291
|
+
title : '',
|
|
1292
|
+
content : '',
|
|
1293
|
+
class : '',
|
|
1294
|
+
classTitle : '',
|
|
1295
|
+
classContent : '',
|
|
1296
|
+
classActions : '',
|
|
1297
|
+
closeIcon : false,
|
|
1298
|
+
actions : false,
|
|
1299
|
+
preserveHTML : true,
|
|
1300
|
+
|
|
1301
|
+
fields : {
|
|
1302
|
+
class : 'class',
|
|
1303
|
+
text : 'text',
|
|
1304
|
+
icon : 'icon',
|
|
1305
|
+
click : 'click'
|
|
1306
|
+
},
|
|
1307
|
+
|
|
1164
1308
|
// called before show animation
|
|
1165
1309
|
onShow : function(){},
|
|
1166
1310
|
|
|
@@ -1171,7 +1315,7 @@ $.fn.modal.settings = {
|
|
|
1171
1315
|
onHide : function(){ return true; },
|
|
1172
1316
|
|
|
1173
1317
|
// called after hide animation
|
|
1174
|
-
onHidden :
|
|
1318
|
+
onHidden : false,
|
|
1175
1319
|
|
|
1176
1320
|
// called after approve selector match
|
|
1177
1321
|
onApprove : function(){ return true; },
|
|
@@ -1180,12 +1324,16 @@ $.fn.modal.settings = {
|
|
|
1180
1324
|
onDeny : function(){ return true; },
|
|
1181
1325
|
|
|
1182
1326
|
selector : {
|
|
1327
|
+
title : '> .header',
|
|
1328
|
+
content : '> .content',
|
|
1329
|
+
actions : '> .actions',
|
|
1183
1330
|
close : '> .close',
|
|
1184
1331
|
approve : '.actions .positive, .actions .approve, .actions .ok',
|
|
1185
1332
|
deny : '.actions .negative, .actions .deny, .actions .cancel',
|
|
1186
1333
|
modal : '.ui.modal',
|
|
1187
1334
|
dimmer : '> .ui.dimmer',
|
|
1188
|
-
bodyFixed: '> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar'
|
|
1335
|
+
bodyFixed: '> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close',
|
|
1336
|
+
prompt : '.ui.input > input'
|
|
1189
1337
|
},
|
|
1190
1338
|
error : {
|
|
1191
1339
|
dimmer : 'UI Dimmer, a required component is not included in this page',
|
|
@@ -1201,9 +1349,104 @@ $.fn.modal.settings = {
|
|
|
1201
1349
|
loading : 'loading',
|
|
1202
1350
|
scrolling : 'scrolling',
|
|
1203
1351
|
undetached : 'undetached',
|
|
1204
|
-
front : 'front'
|
|
1352
|
+
front : 'front',
|
|
1353
|
+
close : 'close icon',
|
|
1354
|
+
button : 'ui button',
|
|
1355
|
+
modal : 'ui modal',
|
|
1356
|
+
title : 'header',
|
|
1357
|
+
content : 'content',
|
|
1358
|
+
actions : 'actions',
|
|
1359
|
+
template : 'ui tiny modal',
|
|
1360
|
+
ok : 'positive',
|
|
1361
|
+
cancel : 'negative',
|
|
1362
|
+
prompt : 'ui fluid input'
|
|
1363
|
+
},
|
|
1364
|
+
text: {
|
|
1365
|
+
ok : 'Ok',
|
|
1366
|
+
cancel: 'Cancel'
|
|
1205
1367
|
}
|
|
1206
1368
|
};
|
|
1207
1369
|
|
|
1370
|
+
$.fn.modal.settings.templates = {
|
|
1371
|
+
getArguments: function(args) {
|
|
1372
|
+
var queryArguments = [].slice.call(args);
|
|
1373
|
+
if($.isPlainObject(queryArguments[0])){
|
|
1374
|
+
return $.extend({
|
|
1375
|
+
handler:function(){},
|
|
1376
|
+
content:'',
|
|
1377
|
+
title: ''
|
|
1378
|
+
}, queryArguments[0]);
|
|
1379
|
+
} else {
|
|
1380
|
+
if(!$.isFunction(queryArguments[queryArguments.length-1])) {
|
|
1381
|
+
queryArguments.push(function() {});
|
|
1382
|
+
}
|
|
1383
|
+
return {
|
|
1384
|
+
handler: queryArguments.pop(),
|
|
1385
|
+
content: queryArguments.pop() || '',
|
|
1386
|
+
title: queryArguments.pop() || ''
|
|
1387
|
+
};
|
|
1388
|
+
}
|
|
1389
|
+
},
|
|
1390
|
+
alert: function () {
|
|
1391
|
+
var settings = this.get.settings(),
|
|
1392
|
+
args = settings.templates.getArguments(arguments)
|
|
1393
|
+
;
|
|
1394
|
+
return {
|
|
1395
|
+
title : args.title,
|
|
1396
|
+
content: args.content,
|
|
1397
|
+
actions: [{
|
|
1398
|
+
text : settings.text.ok,
|
|
1399
|
+
class: settings.className.ok,
|
|
1400
|
+
click: args.handler
|
|
1401
|
+
}]
|
|
1402
|
+
}
|
|
1403
|
+
},
|
|
1404
|
+
confirm: function () {
|
|
1405
|
+
var settings = this.get.settings(),
|
|
1406
|
+
args = settings.templates.getArguments(arguments)
|
|
1407
|
+
;
|
|
1408
|
+
return {
|
|
1409
|
+
title : args.title,
|
|
1410
|
+
content: args.content,
|
|
1411
|
+
actions: [{
|
|
1412
|
+
text : settings.text.ok,
|
|
1413
|
+
class: settings.className.ok,
|
|
1414
|
+
click: function(){args.handler(true)}
|
|
1415
|
+
},{
|
|
1416
|
+
text: settings.text.cancel,
|
|
1417
|
+
class: settings.className.cancel,
|
|
1418
|
+
click: function(){args.handler(false)}
|
|
1419
|
+
}]
|
|
1420
|
+
}
|
|
1421
|
+
},
|
|
1422
|
+
prompt: function () {
|
|
1423
|
+
var $this = this,
|
|
1424
|
+
settings = this.get.settings(),
|
|
1425
|
+
args = settings.templates.getArguments(arguments),
|
|
1426
|
+
input = $($.parseHTML(args.content)).filter('.ui.input')
|
|
1427
|
+
;
|
|
1428
|
+
if (input.length === 0) {
|
|
1429
|
+
args.content += '<p><div class="'+settings.className.prompt+'"><input placeholder="'+this.helpers.deQuote(args.placeholder || '')+'" type="text" value="'+this.helpers.deQuote(args.defaultValue || '')+'"></div></p>';
|
|
1430
|
+
}
|
|
1431
|
+
return {
|
|
1432
|
+
title : args.title,
|
|
1433
|
+
content: args.content,
|
|
1434
|
+
actions: [{
|
|
1435
|
+
text: settings.text.ok,
|
|
1436
|
+
class: settings.className.ok,
|
|
1437
|
+
click: function(){
|
|
1438
|
+
var settings = $this.get.settings(),
|
|
1439
|
+
inputField = $this.get.element().find(settings.selector.prompt)[0]
|
|
1440
|
+
;
|
|
1441
|
+
args.handler($(inputField).val());
|
|
1442
|
+
}
|
|
1443
|
+
},{
|
|
1444
|
+
text: settings.text.cancel,
|
|
1445
|
+
class: settings.className.cancel,
|
|
1446
|
+
click: function(){args.handler(null)}
|
|
1447
|
+
}]
|
|
1448
|
+
}
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1208
1451
|
|
|
1209
1452
|
})( jQuery, window, document );
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* # Fomantic-UI - Modal
|
|
2
|
+
* # Fomantic-UI 2.8.8 - Modal
|
|
3
3
|
* http://github.com/fomantic/Fomantic-UI/
|
|
4
4
|
*
|
|
5
5
|
*
|
|
6
6
|
* Released under the MIT license
|
|
7
7
|
* http://opensource.org/licenses/MIT
|
|
8
8
|
*
|
|
9
|
-
*/.ui.modal{position:absolute;display:none;z-index:1001;text-align:left;background:#fff;border:none;-webkit-box-shadow:1px 3px 3px 0 rgba(0,0,0,.2),1px 3px 15px 2px rgba(0,0,0,.2);box-shadow:1px 3px 3px 0 rgba(0,0,0,.2),1px 3px 15px 2px rgba(0,0,0,.2);-webkit-transform-origin:50% 25%;transform-origin:50% 25%;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;border-radius:.28571429rem;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;will-change:top,left,margin,transform,opacity}.ui.modal>.dimmer:first-child+:not(.icon),.ui.modal>.dimmer:first-child+i.icon+*,.ui.modal>:first-child:not(.icon):not(.dimmer),.ui.modal>i.icon:first-child+*{border-top-left-radius:.28571429rem;border-top-right-radius:.28571429rem}.ui.modal>:last-child{border-bottom-left-radius:.28571429rem;border-bottom-right-radius:.28571429rem}.ui.modal>.ui.dimmer{border-radius:inherit}.ui.modal>.close{cursor:pointer;position:absolute;top:-2.5rem;right:-2.5rem;z-index:1;opacity:.8;font-size:1.25em;color:#fff;width:2.25rem;height:2.25rem;padding:.625rem 0 0 0}.ui.modal>.close:hover{opacity:1}.ui.modal>.header{display:block;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;background:#fff;margin:0;padding:1.25rem 1.5rem;-webkit-box-shadow:none;box-shadow:none;color:rgba(0,0,0,.85);border-bottom:1px solid rgba(34,36,38,.15)}.ui.modal>.header:not(.ui){font-size:1.42857143rem;line-height:1.28571429em;font-weight:700}.ui.modal>.content{display:block;width:100%;font-size:1em;line-height:1.4;padding:1.5rem;background:#fff}.ui.modal>.image.content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.ui.modal>.content>.image{display:block;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;width:'';-ms-flex-item-align:start;align-self:start;max-width:100%}.ui.modal>[class*="top aligned"]{-ms-flex-item-align:start;align-self:start}.ui.modal>[class*="middle aligned"]{-ms-flex-item-align:center;align-self:center}.ui.modal>[class*=stretched]{-ms-flex-item-align:stretch;align-self:stretch}.ui.modal>.content>.description{display:block;-webkit-box-flex:1;-ms-flex:1 0 auto;flex:1 0 auto;min-width:0;-ms-flex-item-align:start;align-self:start}.ui.modal>.content>.image+.description,.ui.modal>.content>i.icon+.description{-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;min-width:'';width:auto;padding-left:2em}.ui.modal>.content>.image>i.icon{margin:0;opacity:1;width:auto;line-height:1;font-size:8rem}.ui.modal>.actions{background:#f9fafb;padding:1rem 1rem;border-top:1px solid rgba(34,36,38,.15);text-align:right}.ui.modal .actions>.button:not(.fluid){margin-left:.75em}.ui.basic.modal>.actions{border-top:none}@media only screen and (max-width:767.98px){.ui.modal:not(.fullscreen){width:95%;margin:0}}@media only screen and (min-width:768px){.ui.modal:not(.fullscreen){width:88%;margin:0}}@media only screen and (min-width:992px){.ui.modal:not(.fullscreen){width:850px;margin:0}}@media only screen and (min-width:1200px){.ui.modal:not(.fullscreen){width:900px;margin:0}}@media only screen and (min-width:1920px){.ui.modal:not(.fullscreen){width:950px;margin:0}}@media only screen and (max-width:991.98px){.ui.modal>.header{padding-right:2.25rem}.ui.modal>.close{top:1.0535rem;right:1rem;color:rgba(0,0,0,.87)}}@media only screen and (max-width:767.98px){.ui.modal>.header{padding:.75rem 1rem!important;padding-right:2.25rem!important}.ui.overlay.fullscreen.modal>.content.content.content{min-height:calc(100vh - 8.1rem)}.ui.overlay.fullscreen.modal>.scrolling.content.content.content{max-height:calc(100vh - 8.1rem)}.ui.modal>.content{display:block;padding:1rem!important}.ui.modal>.close{top:.5rem!important;right:.5rem!important}.ui.modal .image.content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.ui.modal>.content>.image{display:block;max-width:100%;margin:0 auto!important;text-align:center;padding:0 0 1rem!important}.ui.modal>.content>.image>i.icon{font-size:5rem;text-align:center}.ui.modal>.content>.description{display:block;width:100%!important;margin:0!important;padding:1rem 0!important;-webkit-box-shadow:none;box-shadow:none}.ui.modal>.actions{padding:1rem 1rem 0!important}.ui.modal .actions>.button,.ui.modal .actions>.buttons{margin-bottom:1rem}}.ui.inverted.dimmer>.ui.modal{-webkit-box-shadow:1px 3px 10px 2px rgba(0,0,0,.2);box-shadow:1px 3px 10px 2px rgba(0,0,0,.2)}.ui.basic.modal{background-color:transparent;border:none;border-radius:0;-webkit-box-shadow:none!important;box-shadow:none!important;color:#fff}.ui.basic.modal>.actions,.ui.basic.modal>.content,.ui.basic.modal>.header{background-color:transparent}.ui.basic.modal>.header{color:#fff;border-bottom:none}.ui.basic.modal>.close{top:1rem;right:1.5rem;color:#fff}.ui.inverted.dimmer>.basic.modal{color:rgba(0,0,0,.87)}.ui.inverted.dimmer>.ui.basic.modal>.header{color:rgba(0,0,0,.85)}.ui.legacy.legacy.modal,.ui.legacy.legacy.page.dimmer>.ui.modal{left:50%!important}.ui.legacy.legacy.modal:not(.aligned),.ui.legacy.legacy.page.dimmer>.ui.modal:not(.aligned){top:50%}.ui.legacy.legacy.page.dimmer>.ui.scrolling.modal:not(.aligned),.ui.page.dimmer>.ui.scrolling.legacy.legacy.modal:not(.aligned),.ui.top.aligned.dimmer>.ui.legacy.legacy.modal:not(.aligned),.ui.top.aligned.legacy.legacy.page.dimmer>.ui.modal:not(.aligned){top:auto}.ui.legacy.overlay.fullscreen.modal{margin-top:-2rem!important}.ui.loading.modal{display:block;visibility:hidden;z-index:-1}.ui.active.modal{display:block}.modals.dimmer .ui.top.aligned.modal{top:5vh}.modals.dimmer .ui.bottom.aligned.modal{bottom:5vh}@media only screen and (max-width:767.98px){.modals.dimmer .ui.top.aligned.modal{top:1rem}.modals.dimmer .ui.bottom.aligned.modal{bottom:1rem}}.scrolling.dimmable.dimmed{overflow:hidden}.scrolling.dimmable>.dimmer{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;position:fixed}.scrolling.dimmable.dimmed>.dimmer{overflow:auto;-webkit-overflow-scrolling:touch}.modals.dimmer .ui.scrolling.modal:not(.fullscreen){margin:2rem auto}.modals.dimmer .ui.scrolling.modal:not([class*="overlay fullscreen"])::after{content:'\00A0';position:absolute;height:2rem}.scrolling.undetached.dimmable.dimmed{overflow:auto;-webkit-overflow-scrolling:touch}.scrolling.undetached.dimmable.dimmed>.dimmer{overflow:hidden}.scrolling.undetached.dimmable .ui.scrolling.modal:not(.fullscreen){position:absolute;left:50%}.ui.modal>.scrolling.content{max-height:calc(80vh - 10rem);overflow:auto}.ui.overlay.fullscreen.modal>.content{min-height:calc(100vh - 9.1rem)}.ui.overlay.fullscreen.modal>.scrolling.content{max-height:calc(100vh - 9.1rem)}.ui.fullscreen.modal{width:95%;left:2.5%;margin:1em auto}.ui.overlay.fullscreen.modal{width:100%;left:0;margin:0 auto;top:0;border-radius:0}.ui.fullscreen.modal>.header,.ui.modal>.close.inside+.header{padding-right:2.25rem}.ui.fullscreen.modal>.close,.ui.modal>.close.inside{top:1.0535rem;right:1rem;color:rgba(0,0,0,.87)}.ui.basic.fullscreen.modal>.close{color:#fff}.ui.modal{font-size:1rem}.ui.mini.modal>.header:not(.ui){font-size:1.3em}@media only screen and (max-width:767.98px){.ui.mini.modal{width:95%;margin:0}}@media only screen and (min-width:768px){.ui.mini.modal{width:35.2%;margin:0}}@media only screen and (min-width:992px){.ui.mini.modal{width:340px;margin:0}}@media only screen and (min-width:1200px){.ui.mini.modal{width:360px;margin:0}}@media only screen and (min-width:1920px){.ui.mini.modal{width:380px;margin:0}}.ui.tiny.modal>.header:not(.ui){font-size:1.3em}@media only screen and (max-width:767.98px){.ui.tiny.modal{width:95%;margin:0}}@media only screen and (min-width:768px){.ui.tiny.modal{width:52.8%;margin:0}}@media only screen and (min-width:992px){.ui.tiny.modal{width:510px;margin:0}}@media only screen and (min-width:1200px){.ui.tiny.modal{width:540px;margin:0}}@media only screen and (min-width:1920px){.ui.tiny.modal{width:570px;margin:0}}.ui.small.modal>.header:not(.ui){font-size:1.3em}@media only screen and (max-width:767.98px){.ui.small.modal{width:95%;margin:0}}@media only screen and (min-width:768px){.ui.small.modal{width:70.4%;margin:0}}@media only screen and (min-width:992px){.ui.small.modal{width:680px;margin:0}}@media only screen and (min-width:1200px){.ui.small.modal{width:720px;margin:0}}@media only screen and (min-width:1920px){.ui.small.modal{width:760px;margin:0}}.ui.large.modal>.header:not(.ui){font-size:1.6em}@media only screen and (max-width:767.98px){.ui.large.modal{width:95%;margin:0}}@media only screen and (min-width:768px){.ui.large.modal{width:88%;margin:0}}@media only screen and (min-width:992px){.ui.large.modal{width:1020px;margin:0}}@media only screen and (min-width:1200px){.ui.large.modal{width:1080px;margin:0}}@media only screen and (min-width:1920px){.ui.large.modal{width:1140px;margin:0}}.ui.big.modal>.header:not(.ui){font-size:1.6em}@media only screen and (max-width:767.98px){.ui.big.modal{width:95%;margin:0}}@media only screen and (min-width:768px){.ui.big.modal{width:88%;margin:0}}@media only screen and (min-width:992px){.ui.big.modal{width:1190px;margin:0}}@media only screen and (min-width:1200px){.ui.big.modal{width:1260px;margin:0}}@media only screen and (min-width:1920px){.ui.big.modal{width:1330px;margin:0}}.ui.huge.modal>.header:not(.ui){font-size:1.6em}@media only screen and (max-width:767.98px){.ui.huge.modal{width:95%;margin:0}}@media only screen and (min-width:768px){.ui.huge.modal{width:88%;margin:0}}@media only screen and (min-width:992px){.ui.huge.modal{width:1360px;margin:0}}@media only screen and (min-width:1200px){.ui.huge.modal{width:1440px;margin:0}}@media only screen and (min-width:1920px){.ui.huge.modal{width:1520px;margin:0}}.ui.massive.modal>.header:not(.ui){font-size:1.8em}@media only screen and (max-width:767.98px){.ui.massive.modal{width:95%;margin:0}}@media only screen and (min-width:768px){.ui.massive.modal{width:88%;margin:0}}@media only screen and (min-width:992px){.ui.massive.modal{width:1530px;margin:0}}@media only screen and (min-width:1200px){.ui.massive.modal{width:1620px;margin:0}}@media only screen and (min-width:1920px){.ui.massive.modal{width:1710px;margin:0}}.ui.inverted.modal{background:rgba(0,0,0,.9)}.ui.inverted.modal>.content,.ui.inverted.modal>.header{background:rgba(0,0,0,.9);color:#fff}.ui.inverted.modal>.actions{background:#191a1b;border-top:1px solid rgba(34,36,38,.85);color:#fff}.ui.inverted.dimmer>.modal>.close{color:rgba(0,0,0,.85)}@media only screen and (max-width:991.98px){.ui.dimmer .inverted.modal>.close{color:#fff}}.ui.inverted.fullscreen.modal>.close,.ui.inverted.modal>.close.inside{color:#fff}
|
|
9
|
+
*/.ui.modal{position:absolute;display:none;z-index:1001;text-align:left;background:#fff;border:none;-webkit-box-shadow:1px 3px 3px 0 rgba(0,0,0,.2),1px 3px 15px 2px rgba(0,0,0,.2);box-shadow:1px 3px 3px 0 rgba(0,0,0,.2),1px 3px 15px 2px rgba(0,0,0,.2);-webkit-transform-origin:50% 25%;transform-origin:50% 25%;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;border-radius:.28571429rem;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;will-change:top,left,margin,transform,opacity}.ui.modal>.dimmer:first-child+:not(.close),.ui.modal>.dimmer:first-child+i.icon+*,.ui.modal>:first-child:not(.close):not(.dimmer),.ui.modal>i.icon:first-child+*{border-top-left-radius:.28571429rem;border-top-right-radius:.28571429rem}.ui.modal>:last-child{border-bottom-left-radius:.28571429rem;border-bottom-right-radius:.28571429rem}.ui.modal>.ui.dimmer{border-radius:inherit}.ui.modal>.close{cursor:pointer;position:absolute;top:-2.5rem;right:-2.5rem;z-index:1;opacity:.8;font-size:1.25em;color:#fff;width:2.25rem;height:2.25rem;padding:.625rem 0 0 0}.ui.modal>.close:hover{opacity:1}.ui.modal>.header{display:block;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;background:#fff;margin:0;padding:1.25rem 1.5rem;-webkit-box-shadow:none;box-shadow:none;color:rgba(0,0,0,.85);border-bottom:1px solid rgba(34,36,38,.15)}.ui.modal>.header:not(.ui){font-size:1.42857143rem;line-height:1.28571429em;font-weight:700}.ui.modal>.content{display:block;width:100%;font-size:1em;line-height:1.4;padding:1.5rem;background:#fff}.ui.modal>.image.content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.ui.modal>.content>.image{display:block;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;width:'';-ms-flex-item-align:start;align-self:start;max-width:100%}.ui.modal>[class*="top aligned"]{-ms-flex-item-align:start;align-self:start}.ui.modal>[class*="middle aligned"]{-ms-flex-item-align:center;align-self:center}.ui.modal>[class*=stretched]{-ms-flex-item-align:stretch;align-self:stretch}.ui.modal>.content>.description{display:block;-webkit-box-flex:1;-ms-flex:1 0 auto;flex:1 0 auto;min-width:0;-ms-flex-item-align:start;align-self:start}.ui.modal>.content>.image+.description,.ui.modal>.content>i.icon+.description{-webkit-box-flex:0;-ms-flex:0 1 auto;flex:0 1 auto;min-width:'';width:auto;padding-left:2em}.ui.modal>.content>.image>i.icon{margin:0;opacity:1;width:auto;line-height:1;font-size:8rem}.ui.modal>.actions{background:#f9fafb;padding:1rem 1rem;border-top:1px solid rgba(34,36,38,.15);text-align:right}.ui.modal .actions>.button:not(.fluid){margin-left:.75em}.ui.basic.modal>.actions{border-top:none}.ui.modal>.center.aligned,.ui.modal>.centered{text-align:center}.ui.modal>.center.aligned.actions>.button:not(.fluid),.ui.modal>.centered.actions>.button:not(.fluid){margin-left:.5em;margin-right:.5em}@media only screen and (max-width:767.98px){.ui.modal:not(.fullscreen){width:95%;margin:0}}@media only screen and (min-width:768px){.ui.modal:not(.fullscreen){width:88%;margin:0}}@media only screen and (min-width:992px){.ui.modal:not(.fullscreen){width:850px;margin:0}}@media only screen and (min-width:1200px){.ui.modal:not(.fullscreen){width:900px;margin:0}}@media only screen and (min-width:1920px){.ui.modal:not(.fullscreen){width:950px;margin:0}}@media only screen and (max-width:991.98px){.ui.modal>.close+.header{padding-right:2.25rem}.ui.modal>.close{top:1.0535rem;right:1rem;color:rgba(0,0,0,.87)}}@media only screen and (max-width:767.98px){.ui.modal>.header{padding:.75rem 1rem}.ui.modal>.close+.header{padding-right:2.25rem}.ui.overlay.fullscreen.modal>.content.content.content{min-height:calc(100vh - 8.1rem)}.ui.overlay.fullscreen.modal>.scrolling.content.content.content{max-height:calc(100vh - 8.1rem)}.ui.modal>.content{display:block;padding:1rem!important}.ui.modal>.close{top:.5rem!important;right:.5rem!important}.ui.modal .image.content{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.ui.modal>.content>.image{display:block;max-width:100%;margin:0 auto!important;text-align:center;padding:0 0 1rem!important}.ui.modal>.content>.image>i.icon{font-size:5rem;text-align:center}.ui.modal>.content>.description{display:block;width:100%!important;margin:0!important;padding:1rem 0!important;-webkit-box-shadow:none;box-shadow:none}.ui.modal>.actions{padding:1rem 1rem 0!important}.ui.modal .actions>.button,.ui.modal .actions>.buttons{margin-bottom:1rem}}.ui.inverted.dimmer>.ui.modal{-webkit-box-shadow:1px 3px 10px 2px rgba(0,0,0,.2);box-shadow:1px 3px 10px 2px rgba(0,0,0,.2)}.ui.basic.modal{background-color:transparent;border:none;border-radius:0;-webkit-box-shadow:none!important;box-shadow:none!important;color:#fff}.ui.basic.modal>.actions,.ui.basic.modal>.content,.ui.basic.modal>.header{background-color:transparent}.ui.basic.modal>.header{color:#fff;border-bottom:none}.ui.basic.modal>.close{top:1rem;right:1.5rem;color:#fff}.ui.inverted.dimmer>.basic.modal{color:rgba(0,0,0,.87)}.ui.inverted.dimmer>.ui.basic.modal>.header{color:rgba(0,0,0,.85)}.ui.legacy.legacy.modal,.ui.legacy.legacy.page.dimmer>.ui.modal{left:50%!important}.ui.legacy.legacy.modal:not(.aligned),.ui.legacy.legacy.page.dimmer>.ui.modal:not(.aligned){top:50%}.ui.legacy.legacy.page.dimmer>.ui.scrolling.modal:not(.aligned),.ui.page.dimmer>.ui.scrolling.legacy.legacy.modal:not(.aligned),.ui.top.aligned.dimmer>.ui.legacy.legacy.modal:not(.aligned),.ui.top.aligned.legacy.legacy.page.dimmer>.ui.modal:not(.aligned){top:auto}.ui.legacy.overlay.fullscreen.modal{margin-top:-2rem!important}.ui.loading.modal{display:block;visibility:hidden;z-index:-1}.ui.active.modal{display:block}.modals.dimmer .ui.top.aligned.modal{top:5vh}.modals.dimmer .ui.bottom.aligned.modal{bottom:5vh}@media only screen and (max-width:767.98px){.modals.dimmer .ui.top.aligned.modal{top:1rem}.modals.dimmer .ui.bottom.aligned.modal{bottom:1rem}}.scrolling.dimmable.dimmed{overflow:hidden}.scrolling.dimmable>.dimmer{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;position:fixed}.scrolling.dimmable.dimmed>.dimmer{overflow:auto;-webkit-overflow-scrolling:touch}.modals.dimmer .ui.scrolling.modal:not(.fullscreen){margin:2rem auto}.modals.dimmer .ui.scrolling.modal:not([class*="overlay fullscreen"])::after{content:'\00A0';position:absolute;height:2rem}.scrolling.undetached.dimmable.dimmed{overflow:auto;-webkit-overflow-scrolling:touch}.scrolling.undetached.dimmable.dimmed>.dimmer{overflow:hidden}.scrolling.undetached.dimmable .ui.scrolling.modal:not(.fullscreen){position:absolute;left:50%}.ui.modal>.scrolling.content{max-height:calc(80vh - 10rem);overflow:auto}.ui.overlay.fullscreen.modal>.content{min-height:calc(100vh - 9.1rem)}.ui.overlay.fullscreen.modal>.scrolling.content{max-height:calc(100vh - 9.1rem)}.ui.fullscreen.modal{width:95%;left:2.5%;margin:1em auto}.ui.overlay.fullscreen.modal{width:100%;left:0;margin:0 auto;top:0;border-radius:0}.ui.fullscreen.modal>.close+.header:not(.centered):not(.center):not(.icon),.ui.modal>.close.inside+.header:not(.centered):not(.center):not(.icon){padding-right:2.25rem}.ui.fullscreen.modal>.close,.ui.modal>.close.inside{top:1.0535rem;right:1rem;color:rgba(0,0,0,.87)}.ui.basic.fullscreen.modal>.close{color:#fff}.ui.modal{font-size:1rem}.ui.mini.modal>.header:not(.ui){font-size:1.3em}@media only screen and (max-width:767.98px){.ui.mini.modal{width:95%;margin:0}}@media only screen and (min-width:768px){.ui.mini.modal{width:35.2%;margin:0}}@media only screen and (min-width:992px){.ui.mini.modal{width:340px;margin:0}}@media only screen and (min-width:1200px){.ui.mini.modal{width:360px;margin:0}}@media only screen and (min-width:1920px){.ui.mini.modal{width:380px;margin:0}}.ui.tiny.modal>.header:not(.ui){font-size:1.3em}@media only screen and (max-width:767.98px){.ui.tiny.modal{width:95%;margin:0}}@media only screen and (min-width:768px){.ui.tiny.modal{width:52.8%;margin:0}}@media only screen and (min-width:992px){.ui.tiny.modal{width:510px;margin:0}}@media only screen and (min-width:1200px){.ui.tiny.modal{width:540px;margin:0}}@media only screen and (min-width:1920px){.ui.tiny.modal{width:570px;margin:0}}.ui.small.modal>.header:not(.ui){font-size:1.3em}@media only screen and (max-width:767.98px){.ui.small.modal{width:95%;margin:0}}@media only screen and (min-width:768px){.ui.small.modal{width:70.4%;margin:0}}@media only screen and (min-width:992px){.ui.small.modal{width:680px;margin:0}}@media only screen and (min-width:1200px){.ui.small.modal{width:720px;margin:0}}@media only screen and (min-width:1920px){.ui.small.modal{width:760px;margin:0}}.ui.large.modal>.header:not(.ui){font-size:1.6em}@media only screen and (max-width:767.98px){.ui.large.modal{width:95%;margin:0}}@media only screen and (min-width:768px){.ui.large.modal{width:88%;margin:0}}@media only screen and (min-width:992px){.ui.large.modal{width:1020px;margin:0}}@media only screen and (min-width:1200px){.ui.large.modal{width:1080px;margin:0}}@media only screen and (min-width:1920px){.ui.large.modal{width:1140px;margin:0}}.ui.big.modal>.header:not(.ui){font-size:1.6em}@media only screen and (max-width:767.98px){.ui.big.modal{width:95%;margin:0}}@media only screen and (min-width:768px){.ui.big.modal{width:88%;margin:0}}@media only screen and (min-width:992px){.ui.big.modal{width:1190px;margin:0}}@media only screen and (min-width:1200px){.ui.big.modal{width:1260px;margin:0}}@media only screen and (min-width:1920px){.ui.big.modal{width:1330px;margin:0}}.ui.huge.modal>.header:not(.ui){font-size:1.6em}@media only screen and (max-width:767.98px){.ui.huge.modal{width:95%;margin:0}}@media only screen and (min-width:768px){.ui.huge.modal{width:88%;margin:0}}@media only screen and (min-width:992px){.ui.huge.modal{width:1360px;margin:0}}@media only screen and (min-width:1200px){.ui.huge.modal{width:1440px;margin:0}}@media only screen and (min-width:1920px){.ui.huge.modal{width:1520px;margin:0}}.ui.massive.modal>.header:not(.ui){font-size:1.8em}@media only screen and (max-width:767.98px){.ui.massive.modal{width:95%;margin:0}}@media only screen and (min-width:768px){.ui.massive.modal{width:88%;margin:0}}@media only screen and (min-width:992px){.ui.massive.modal{width:1530px;margin:0}}@media only screen and (min-width:1200px){.ui.massive.modal{width:1620px;margin:0}}@media only screen and (min-width:1920px){.ui.massive.modal{width:1710px;margin:0}}.ui.inverted.modal{background:rgba(0,0,0,.9)}.ui.inverted.modal>.content,.ui.inverted.modal>.header{background:rgba(0,0,0,.9);color:#fff}.ui.inverted.modal>.actions{background:#191a1b;border-top:1px solid rgba(34,36,38,.85);color:#fff}.ui.inverted.dimmer>.modal>.close{color:rgba(0,0,0,.85)}@media only screen and (max-width:991.98px){.ui.dimmer .inverted.modal>.close{color:#fff}}.ui.inverted.fullscreen.modal>.close,.ui.inverted.modal>.close.inside{color:#fff}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
* # Fomantic UI - 2.8.
|
|
1
|
+
/*
|
|
2
|
+
* # Fomantic UI - 2.8.8
|
|
3
3
|
* https://github.com/fomantic/Fomantic-UI
|
|
4
4
|
* http://fomantic-ui.com/
|
|
5
5
|
*
|
|
6
|
-
* Copyright
|
|
6
|
+
* Copyright 2021 Contributors
|
|
7
7
|
* Released under the MIT license
|
|
8
8
|
* http://opensource.org/licenses/MIT
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
11
|
-
!function(I,R,N,P){"use strict";I.isFunction=I.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},R=void 0!==R&&R.Math==Math?R:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),I.fn.modal=function(M){var H,e=I(this),T=I(R),D=I(N),A=I("body"),E=e.selector||"",O=(new Date).getTime(),L=[],z=M,j="string"==typeof z,q=[].slice.call(arguments,1),B=R.requestAnimationFrame||R.mozRequestAnimationFrame||R.webkitRequestAnimationFrame||R.msRequestAnimationFrame||function(e){setTimeout(e,0)};return e.each(function(){var o,r,e,t,n,a,s,i,c,l,d,u=I.isPlainObject(M)?I.extend(!0,{},I.fn.modal.settings,M):I.extend({},I.fn.modal.settings),m=u.selector,f=u.className,g=u.namespace,h=u.error,v="."+g,b="module-"+g,p=I(this),y=I(u.context),w=p.find(m.close),S=this,C=p.data(b),x=!1,k="",F="";d={initialize:function(){d.cache={},d.verbose("Initializing dimmer",y),d.create.id(),d.create.dimmer(),u.allowMultiple&&d.create.innerDimmer(),u.centered||p.addClass("top aligned"),d.refreshModals(),d.bind.events(),u.observeChanges&&d.observeChanges(),d.instantiate()},instantiate:function(){d.verbose("Storing instance of modal"),C=d,p.data(b,C)},create:{dimmer:function(){var e={debug:u.debug,dimmerName:"modals"},i=I.extend(!0,e,u.dimmerSettings);I.fn.dimmer!==P?(d.debug("Creating dimmer"),t=y.dimmer(i),u.detachable?(d.verbose("Modal is detachable, moving content into dimmer"),t.dimmer("add content",p)):d.set.undetached(),n=t.dimmer("get dimmer")):d.error(h.dimmer)},id:function(){c=(Math.random().toString(16)+"000000000").substr(2,8),i="."+c,d.verbose("Creating unique id for element",c)},innerDimmer:function(){0==p.find(m.dimmer).length&&p.prepend('<div class="ui inverted dimmer"></div>')}},destroy:function(){l&&l.disconnect(),d.verbose("Destroying previous modal"),p.removeData(b).off(v),T.off(i),n.off(i),w.off(v),y.dimmer("destroy")},observeChanges:function(){"MutationObserver"in R&&((l=new MutationObserver(function(e){d.debug("DOM tree modified, refreshing"),d.refresh()})).observe(S,{childList:!0,subtree:!0}),d.debug("Setting up mutation observer",l))},refresh:function(){d.remove.scrolling(),d.cacheSizes(),d.can.useFlex()||d.set.modalOffset(),d.set.screenHeight(),d.set.type()},refreshModals:function(){r=p.siblings(m.modal),o=r.add(p)},attachEvents:function(e,i){var n=I(e);i=I.isFunction(d[i])?d[i]:d.toggle,0<n.length?(d.debug("Attaching modal events to element",e,i),n.off(v).on("click"+v,i)):d.error(h.notFound,e)},bind:{events:function(){d.verbose("Attaching events"),p.on("click"+v,m.close,d.event.close).on("click"+v,m.approve,d.event.approve).on("click"+v,m.deny,d.event.deny),T.on("resize"+i,d.event.resize)},scrollLock:function(){t.get(0).addEventListener("touchmove",d.event.preventScroll,{passive:!1})}},unbind:{scrollLock:function(){t.get(0).removeEventListener("touchmove",d.event.preventScroll,{passive:!1})}},get:{id:function(){return(Math.random().toString(16)+"000000000").substr(2,8)}},event:{approve:function(){x||!1===u.onApprove.call(S,I(this))?d.verbose("Approve callback returned false cancelling hide"):(x=!0,d.hide(function(){x=!1}))},preventScroll:function(e){-1!==e.target.className.indexOf("dimmer")&&e.preventDefault()},deny:function(){x||!1===u.onDeny.call(S,I(this))?d.verbose("Deny callback returned false cancelling hide"):(x=!0,d.hide(function(){x=!1}))},close:function(){d.hide()},mousedown:function(e){var i=I(e.target),n=d.is.rtl();(a=0<i.closest(m.modal).length)&&d.verbose("Mouse down event registered inside the modal"),(s=d.is.scrolling()&&(!n&&I(R).outerWidth()-u.scrollbarWidth<=e.clientX||n&&u.scrollbarWidth>=e.clientX))&&d.verbose("Mouse down event registered inside the scrollbar")},mouseup:function(e){if(u.closable)if(a)d.debug("Dimmer clicked but mouse down was initially registered inside the modal");else if(s)d.debug("Dimmer clicked but mouse down was initially registered inside the scrollbar");else{var i=0<I(e.target).closest(m.modal).length,n=I.contains(N.documentElement,e.target);if(!i&&n&&d.is.active()&&p.hasClass(f.front)){if(d.debug("Dimmer clicked, hiding all modals"),u.allowMultiple){if(!d.hideAll())return}else if(!d.hide())return;d.remove.clickaway()}}else d.verbose("Dimmer clicked but closable setting is disabled")},debounce:function(e,i){clearTimeout(d.timer),d.timer=setTimeout(e,i)},keyboard:function(e){27==e.which&&(u.closable?(d.debug("Escape key pressed hiding modal"),p.hasClass(f.front)&&d.hide()):d.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){t.dimmer("is active")&&(d.is.animating()||d.is.active())&&B(d.refresh)}},toggle:function(){d.is.active()||d.is.animating()?d.hide():d.show()},show:function(e){e=I.isFunction(e)?e:function(){},d.refreshModals(),d.set.dimmerSettings(),d.set.dimmerStyles(),d.showModal(e)},hide:function(e){return e=I.isFunction(e)?e:function(){},d.refreshModals(),d.hideModal(e)},showModal:function(e){e=I.isFunction(e)?e:function(){},d.is.animating()||!d.is.active()?(d.showDimmer(),d.cacheSizes(),d.set.bodyMargin(),d.can.useFlex()?d.remove.legacy():(d.set.legacy(),d.set.modalOffset(),d.debug("Using non-flex legacy modal positioning.")),d.set.screenHeight(),d.set.type(),d.set.clickaway(),!u.allowMultiple&&d.others.active()?d.hideOthers(d.showModal):(x=!1,u.allowMultiple&&(d.others.active()&&r.filter("."+f.active).find(m.dimmer).addClass("active"),u.detachable&&p.detach().appendTo(n)),u.onShow.call(S),u.transition&&I.fn.transition!==P&&p.transition("is supported")?(d.debug("Showing modal with css animations"),p.transition({debug:u.debug,animation:u.transition+" in",queue:u.queue,duration:u.duration,useFailSafe:!0,onComplete:function(){u.onVisible.apply(S),u.keyboardShortcuts&&d.add.keyboardShortcuts(),d.save.focus(),d.set.active(),u.autofocus&&d.set.autofocus(),e()}})):d.error(h.noTransition))):d.debug("Modal is already visible")},hideModal:function(e,i,n){var t=r.filter("."+f.active).last();if(e=I.isFunction(e)?e:function(){},d.debug("Hiding modal"),!1===u.onHide.call(S,I(this)))return d.verbose("Hide callback returned false cancelling hide"),x=!1;(d.is.animating()||d.is.active())&&(u.transition&&I.fn.transition!==P&&p.transition("is supported")?(d.remove.active(),p.transition({debug:u.debug,animation:u.transition+" out",queue:u.queue,duration:u.duration,useFailSafe:!0,onStart:function(){d.others.active()||d.others.animating()||i||d.hideDimmer(),u.keyboardShortcuts&&!d.others.active()&&d.remove.keyboardShortcuts()},onComplete:function(){d.unbind.scrollLock(),u.allowMultiple&&(t.addClass(f.front),p.removeClass(f.front),n?o.find(m.dimmer).removeClass("active"):t.find(m.dimmer).removeClass("active")),u.onHidden.call(S),d.remove.dimmerStyles(),d.restore.focus(),e()}})):d.error(h.noTransition))},showDimmer:function(){t.dimmer("is animating")||!t.dimmer("is active")?(d.save.bodyMargin(),d.debug("Showing dimmer"),t.dimmer("show")):d.debug("Dimmer already visible")},hideDimmer:function(){t.dimmer("is animating")||t.dimmer("is active")?(d.unbind.scrollLock(),t.dimmer("hide",function(){d.restore.bodyMargin(),d.remove.clickaway(),d.remove.screenHeight()})):d.debug("Dimmer is not visible cannot hide")},hideAll:function(n){var e=o.filter("."+f.active+", ."+f.animating);if(n=I.isFunction(n)?n:function(){},0<e.length){d.debug("Hiding all visible modals");var t=!0;return I(e.get().reverse()).each(function(e,i){t=t&&I(i).modal("hide modal",n,!1,!0)}),t&&d.hideDimmer(),t}},hideOthers:function(e){var i=r.filter("."+f.active+", ."+f.animating);e=I.isFunction(e)?e:function(){},0<i.length&&(d.debug("Hiding other modals",r),i.modal("hide modal",e,!0))},others:{active:function(){return 0<r.filter("."+f.active).length},animating:function(){return 0<r.filter("."+f.animating).length}},add:{keyboardShortcuts:function(){d.verbose("Adding keyboard shortcuts"),D.on("keyup"+v,d.event.keyboard)}},save:{focus:function(){0<I(N.activeElement).closest(p).length||(e=I(N.activeElement).blur())},bodyMargin:function(){k=A.css("margin-"+(d.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(k.replace(/[^\d.]/g,"")),i=R.innerWidth-N.documentElement.clientWidth;F=e+i}},restore:{focus:function(){e&&0<e.length&&u.restoreFocus&&e.focus()},bodyMargin:function(){var e=d.can.leftBodyScrollbar()?"left":"right";A.css("margin-"+e,k),A.find(m.bodyFixed.replace("right",e)).css("padding-"+e,k)}},remove:{active:function(){p.removeClass(f.active)},legacy:function(){p.removeClass(f.legacy)},clickaway:function(){u.detachable||p.off("mousedown"+i),n.off("mousedown"+i),n.off("mouseup"+i)},dimmerStyles:function(){n.removeClass(f.inverted),t.removeClass(f.blurring)},bodyStyle:function(){""===A.attr("style")&&(d.verbose("Removing style attribute"),A.removeAttr("style"))},screenHeight:function(){d.debug("Removing page height"),A.css("height","")},keyboardShortcuts:function(){d.verbose("Removing keyboard shortcuts"),D.off("keyup"+v)},scrolling:function(){t.removeClass(f.scrolling),p.removeClass(f.scrolling)}},cacheSizes:function(){p.addClass(f.loading);var e=p.prop("scrollHeight"),i=p.outerWidth(),n=p.outerHeight();d.cache.pageHeight!==P&&0===n||(I.extend(d.cache,{pageHeight:I(N).outerHeight(),width:i,height:n+u.offset,scrollHeight:e+u.offset,contextHeight:"body"==u.context?I(R).height():t.height()}),d.cache.topOffset=-d.cache.height/2),p.removeClass(f.loading),d.debug("Caching modal and container sizes",d.cache)},can:{leftBodyScrollbar:function(){return d.cache.leftBodyScrollbar===P&&(d.cache.leftBodyScrollbar=d.is.rtl()&&(d.is.iframe&&!d.is.firefox()||d.is.safari()||d.is.edge()||d.is.ie())),d.cache.leftBodyScrollbar},useFlex:function(){return"auto"===u.useFlex?u.detachable&&!d.is.ie():(u.useFlex&&d.is.ie()?d.debug("useFlex true is not supported in IE"):u.useFlex&&!u.detachable&&d.debug("useFlex true in combination with detachable false is not supported"),u.useFlex)},fit:function(){var e=d.cache.contextHeight,i=d.cache.contextHeight/2,n=d.cache.topOffset,t=d.cache.scrollHeight,o=d.cache.height,r=u.padding;return o<t?i+n+t+r<e:o+2*r<e}},is:{active:function(){return p.hasClass(f.active)},ie:function(){if(d.cache.isIE===P){var e=!R.ActiveXObject&&"ActiveXObject"in R,i="ActiveXObject"in R;d.cache.isIE=e||i}return d.cache.isIE},animating:function(){return p.transition("is supported")?p.transition("is animating"):p.is(":visible")},scrolling:function(){return t.hasClass(f.scrolling)},modernBrowser:function(){return!(R.ActiveXObject||"ActiveXObject"in R)},rtl:function(){return d.cache.isRTL===P&&(d.cache.isRTL="rtl"===A.attr("dir")||"rtl"===A.css("direction")),d.cache.isRTL},safari:function(){return d.cache.isSafari===P&&(d.cache.isSafari=/constructor/i.test(R.HTMLElement)||!!R.ApplePaySession),d.cache.isSafari},edge:function(){return d.cache.isEdge===P&&(d.cache.isEdge=!!R.setImmediate&&!d.is.ie()),d.cache.isEdge},firefox:function(){return d.cache.isFirefox===P&&(d.cache.isFirefox=!!R.InstallTrigger),d.cache.isFirefox},iframe:function(){return!(self===top)}},set:{autofocus:function(){var e=p.find("[tabindex], :input").filter(":visible").filter(function(){return 0===I(this).closest(".disabled").length}),i=e.filter("[autofocus]"),n=0<i.length?i.first():e.first();0<n.length&&n.focus()},bodyMargin:function(){var e=d.can.leftBodyScrollbar()?"left":"right";(u.detachable||d.can.fit())&&A.css("margin-"+e,F+"px"),A.find(m.bodyFixed.replace("right",e)).css("padding-"+e,F+"px")},clickaway:function(){u.detachable||p.on("mousedown"+i,d.event.mousedown),n.on("mousedown"+i,d.event.mousedown),n.on("mouseup"+i,d.event.mouseup)},dimmerSettings:function(){if(I.fn.dimmer!==P){var e={debug:u.debug,dimmerName:"modals",closable:"auto",useFlex:d.can.useFlex(),duration:{show:u.duration,hide:u.duration}},i=I.extend(!0,e,u.dimmerSettings);u.inverted&&(i.variation=i.variation!==P?i.variation+" inverted":"inverted"),y.dimmer("setting",i)}else d.error(h.dimmer)},dimmerStyles:function(){u.inverted?n.addClass(f.inverted):n.removeClass(f.inverted),u.blurring?t.addClass(f.blurring):t.removeClass(f.blurring)},modalOffset:function(){if(u.detachable)p.css({marginTop:!p.hasClass("aligned")&&d.can.fit()?-d.cache.height/2:u.padding/2,marginLeft:-d.cache.width/2});else{var e=d.can.fit();p.css({top:!p.hasClass("aligned")&&e?I(N).scrollTop()+(d.cache.contextHeight-d.cache.height)/2:!e||p.hasClass("top")?I(N).scrollTop()+u.padding:I(N).scrollTop()+(d.cache.contextHeight-d.cache.height-u.padding),marginLeft:-d.cache.width/2})}d.verbose("Setting modal offset for legacy mode")},screenHeight:function(){d.can.fit()?A.css("height",""):p.hasClass("bottom")||(d.debug("Modal is taller than page content, resizing page height"),A.css("height",d.cache.height+2*u.padding))},active:function(){p.addClass(f.active+" "+f.front),r.filter("."+f.active).removeClass(f.front)},scrolling:function(){t.addClass(f.scrolling),p.addClass(f.scrolling),d.unbind.scrollLock()},legacy:function(){p.addClass(f.legacy)},type:function(){d.can.fit()?(d.verbose("Modal fits on screen"),d.others.active()||d.others.animating()||(d.remove.scrolling(),d.bind.scrollLock())):p.hasClass("bottom")?d.verbose("Bottom aligned modal not fitting on screen is unsupported for scrolling"):(d.verbose("Modal cannot fit on screen setting to scrolling"),d.set.scrolling())},undetached:function(){t.addClass(f.undetached)}},setting:function(e,i){if(d.debug("Changing setting",e,i),I.isPlainObject(e))I.extend(!0,u,e);else{if(i===P)return u[e];I.isPlainObject(u[e])?I.extend(!0,u[e],i):u[e]=i}},internal:function(e,i){if(I.isPlainObject(e))I.extend(!0,d,e);else{if(i===P)return d[e];d[e]=i}},debug:function(){!u.silent&&u.debug&&(u.performance?d.performance.log(arguments):(d.debug=Function.prototype.bind.call(console.info,console,u.name+":"),d.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?d.performance.log(arguments):(d.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),d.verbose.apply(console,arguments)))},error:function(){u.silent||(d.error=Function.prototype.bind.call(console.error,console,u.name+":"),d.error.apply(console,arguments))},performance:{log:function(e){var i,n;u.performance&&(n=(i=(new Date).getTime())-(O||i),O=i,L.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:S,"Execution Time":n})),clearTimeout(d.performance.timer),d.performance.timer=setTimeout(d.performance.display,500)},display:function(){var e=u.name+":",n=0;O=!1,clearTimeout(d.performance.timer),I.each(L,function(e,i){n+=i["Execution Time"]}),e+=" "+n+"ms",E&&(e+=" '"+E+"'"),(console.group!==P||console.table!==P)&&0<L.length&&(console.groupCollapsed(e),console.table?console.table(L):I.each(L,function(e,i){console.log(i.Name+": "+i["Execution Time"]+"ms")}),console.groupEnd()),L=[]}},invoke:function(t,e,i){var o,r,n,a=C;return e=e||q,i=S||i,"string"==typeof t&&a!==P&&(t=t.split(/[\. ]/),o=t.length-1,I.each(t,function(e,i){var n=e!=o?i+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(I.isPlainObject(a[n])&&e!=o)a=a[n];else{if(a[n]!==P)return r=a[n],!1;if(!I.isPlainObject(a[i])||e==o)return a[i]!==P&&(r=a[i]),!1;a=a[i]}})),I.isFunction(r)?n=r.apply(i,e):r!==P&&(n=r),Array.isArray(H)?H.push(n):H!==P?H=[H,n]:n!==P&&(H=n),r}},j?(C===P&&d.initialize(),d.invoke(z)):(C!==P&&C.invoke("destroy"),d.initialize())}),H!==P?H:this},I.fn.modal.settings={name:"Modal",namespace:"modal",useFlex:"auto",offset:0,silent:!1,debug:!1,verbose:!1,performance:!0,observeChanges:!1,allowMultiple:!1,detachable:!0,closable:!0,autofocus:!0,restoreFocus:!0,inverted:!1,blurring:!1,centered:!0,dimmerSettings:{closable:!1,useCSS:!0},keyboardShortcuts:!0,context:"body",queue:!1,duration:500,transition:"scale",padding:50,scrollbarWidth:10,onShow:function(){},onVisible:function(){},onHide:function(){return!0},onHidden:function(){},onApprove:function(){return!0},onDeny:function(){return!0},selector:{close:"> .close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel",modal:".ui.modal",dimmer:"> .ui.dimmer",bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar"},error:{dimmer:"UI Dimmer, a required component is not included in this page",method:"The method you called is not defined.",notFound:"The element you specified could not be found"},className:{active:"active",animating:"animating",blurring:"blurring",inverted:"inverted",legacy:"legacy",loading:"loading",scrolling:"scrolling",undetached:"undetached",front:"front"}}}(jQuery,window,document);
|
|
11
|
+
!function(B,R,P,W){"use strict";B.isFunction=B.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},R=void 0!==R&&R.Math==Math?R:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),B.fn.modal=function(T){var A,e=B(this),H=B(R),D=B(P),O=B("body"),E=e.selector||"",L=(new Date).getTime(),N=[],z=T,j="string"==typeof z,q=[].slice.call(arguments,1),I=R.requestAnimationFrame||R.mozRequestAnimationFrame||R.webkitRequestAnimationFrame||R.msRequestAnimationFrame||function(e){setTimeout(e,0)};return e.each(function(){var o,s,e,i,n,a,c,t,r,l,d,u=B.isPlainObject(T)?B.extend(!0,{},B.fn.modal.settings,T):B.extend({},B.fn.modal.settings),m=u.selector,f=u.className,h=u.namespace,g=u.fields,p=u.error,v="."+h,b="module-"+h,y=B(this),x=B(u.context),k=y.find(m.close),w=this,C=y.hasClass("modal")?y.data(b):W,S=!1,F="",M="";d={initialize:function(){if(y.hasClass("modal")||(d.create.modal(),B.isFunction(u.onHidden)||(u.onHidden=function(){d.destroy(),y.remove()})),y.addClass(u.class),""!==u.title&&y.find(m.title).html(d.helpers.escape(u.title,u.preserveHTML)).addClass(u.classTitle),""!==u.content&&y.find(m.content).html(d.helpers.escape(u.content,u.preserveHTML)).addClass(u.classContent),d.has.configActions()){var s=y.find(m.actions).addClass(u.classActions);0===s.length?s=B("<div/>",{class:f.actions+" "+(u.classActions||"")}).appendTo(y):s.empty(),u.actions.forEach(function(e){var t=e[g.icon]?'<i class="'+d.helpers.deQuote(e[g.icon])+' icon"></i>':"",n=d.helpers.escape(e[g.text]||"",u.preserveHTML),i=d.helpers.deQuote(e[g.class]||""),o=e[g.click]&&B.isFunction(e[g.click])?e[g.click]:function(){};s.append(B("<button/>",{html:t+n,class:f.button+" "+i,click:function(){!1!==o.call(w,y)&&d.hide()}}))})}d.cache={},d.verbose("Initializing dimmer",x),d.create.id(),d.create.dimmer(),u.allowMultiple&&d.create.innerDimmer(),u.centered||y.addClass("top aligned"),d.refreshModals(),d.bind.events(),u.observeChanges&&d.observeChanges(),d.instantiate(),u.autoShow&&d.show()},instantiate:function(){d.verbose("Storing instance of modal"),C=d,y.data(b,C)},create:{modal:function(){y=B("<div/>",{class:f.modal}),u.closeIcon&&(k=B("<i/>",{class:f.close}),y.append(k)),""!==u.title&&B("<div/>",{class:f.title}).appendTo(y),""!==u.content&&B("<div/>",{class:f.content}).appendTo(y),d.has.configActions()&&B("<div/>",{class:f.actions}).appendTo(y),x.append(y)},dimmer:function(){var e={debug:u.debug,dimmerName:"modals"},t=B.extend(!0,e,u.dimmerSettings);B.fn.dimmer!==W?(d.debug("Creating dimmer"),i=x.dimmer(t),u.detachable?(d.verbose("Modal is detachable, moving content into dimmer"),i.dimmer("add content",y)):d.set.undetached(),n=i.dimmer("get dimmer")):d.error(p.dimmer)},id:function(){r=(Math.random().toString(16)+"000000000").substr(2,8),t="."+r,d.verbose("Creating unique id for element",r)},innerDimmer:function(){0==y.find(m.dimmer).length&&y.prepend('<div class="ui inverted dimmer"></div>')}},destroy:function(){l&&l.disconnect(),d.verbose("Destroying previous modal"),y.removeData(b).off(v),H.off(t),n.off(t),k.off(v),x.dimmer("destroy")},observeChanges:function(){"MutationObserver"in R&&((l=new MutationObserver(function(e){d.debug("DOM tree modified, refreshing"),d.refresh()})).observe(w,{childList:!0,subtree:!0}),d.debug("Setting up mutation observer",l))},refresh:function(){d.remove.scrolling(),d.cacheSizes(),d.can.useFlex()||d.set.modalOffset(),d.set.screenHeight(),d.set.type()},refreshModals:function(){s=y.siblings(m.modal),o=s.add(y)},attachEvents:function(e,t){var n=B(e);t=B.isFunction(d[t])?d[t]:d.toggle,0<n.length?(d.debug("Attaching modal events to element",e,t),n.off(v).on("click"+v,t)):d.error(p.notFound,e)},bind:{events:function(){d.verbose("Attaching events"),y.on("click"+v,m.close,d.event.close).on("click"+v,m.approve,d.event.approve).on("click"+v,m.deny,d.event.deny),H.on("resize"+t,d.event.resize)},scrollLock:function(){i.get(0).addEventListener("touchmove",d.event.preventScroll,{passive:!1})}},unbind:{scrollLock:function(){i.get(0).removeEventListener("touchmove",d.event.preventScroll,{passive:!1})}},get:{id:function(){return(Math.random().toString(16)+"000000000").substr(2,8)},element:function(){return y},settings:function(){return u}},event:{approve:function(){S||!1===u.onApprove.call(w,B(this))?d.verbose("Approve callback returned false cancelling hide"):(S=!0,d.hide(function(){S=!1}))},preventScroll:function(e){-1!==e.target.className.indexOf("dimmer")&&e.preventDefault()},deny:function(){S||!1===u.onDeny.call(w,B(this))?d.verbose("Deny callback returned false cancelling hide"):(S=!0,d.hide(function(){S=!1}))},close:function(){d.hide()},mousedown:function(e){var t=B(e.target),n=d.is.rtl();(a=0<t.closest(m.modal).length)&&d.verbose("Mouse down event registered inside the modal"),(c=d.is.scrolling()&&(!n&&B(R).outerWidth()-u.scrollbarWidth<=e.clientX||n&&u.scrollbarWidth>=e.clientX))&&d.verbose("Mouse down event registered inside the scrollbar")},mouseup:function(e){if(u.closable)if(a)d.debug("Dimmer clicked but mouse down was initially registered inside the modal");else if(c)d.debug("Dimmer clicked but mouse down was initially registered inside the scrollbar");else{var t=0<B(e.target).closest(m.modal).length,n=B.contains(P.documentElement,e.target);if(!t&&n&&d.is.active()&&y.hasClass(f.front)){if(d.debug("Dimmer clicked, hiding all modals"),u.allowMultiple){if(!d.hideAll())return}else if(!d.hide())return;d.remove.clickaway()}}else d.verbose("Dimmer clicked but closable setting is disabled")},debounce:function(e,t){clearTimeout(d.timer),d.timer=setTimeout(e,t)},keyboard:function(e){27==e.which&&(u.closable?(d.debug("Escape key pressed hiding modal"),y.hasClass(f.front)&&d.hide()):d.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){i.dimmer("is active")&&(d.is.animating()||d.is.active())&&I(d.refresh)}},toggle:function(){d.is.active()||d.is.animating()?d.hide():d.show()},show:function(e){e=B.isFunction(e)?e:function(){},d.refreshModals(),d.set.dimmerSettings(),d.set.dimmerStyles(),d.showModal(e)},hide:function(e){return e=B.isFunction(e)?e:function(){},d.refreshModals(),d.hideModal(e)},showModal:function(e){e=B.isFunction(e)?e:function(){},d.is.animating()||!d.is.active()?(d.showDimmer(),d.cacheSizes(),d.set.bodyMargin(),d.can.useFlex()?d.remove.legacy():(d.set.legacy(),d.set.modalOffset(),d.debug("Using non-flex legacy modal positioning.")),d.set.screenHeight(),d.set.type(),d.set.clickaway(),!u.allowMultiple&&d.others.active()?d.hideOthers(d.showModal):(S=!1,u.allowMultiple&&(d.others.active()&&s.filter("."+f.active).find(m.dimmer).addClass("active"),u.detachable&&y.detach().appendTo(n)),u.onShow.call(w),u.transition&&B.fn.transition!==W&&y.transition("is supported")?(d.debug("Showing modal with css animations"),y.transition({debug:u.debug,animation:(u.transition.showMethod||u.transition)+" in",queue:u.queue,duration:u.transition.showDuration||u.duration,useFailSafe:!0,onComplete:function(){u.onVisible.apply(w),u.keyboardShortcuts&&d.add.keyboardShortcuts(),d.save.focus(),d.set.active(),u.autofocus&&d.set.autofocus(),e()}})):d.error(p.noTransition))):d.debug("Modal is already visible")},hideModal:function(e,t,n){var i=s.filter("."+f.active).last();if(e=B.isFunction(e)?e:function(){},d.debug("Hiding modal"),!1===u.onHide.call(w,B(this)))return d.verbose("Hide callback returned false cancelling hide"),S=!1;(d.is.animating()||d.is.active())&&(u.transition&&B.fn.transition!==W&&y.transition("is supported")?(d.remove.active(),y.transition({debug:u.debug,animation:(u.transition.hideMethod||u.transition)+" out",queue:u.queue,duration:u.transition.hideDuration||u.duration,useFailSafe:!0,onStart:function(){d.others.active()||d.others.animating()||t||d.hideDimmer(),u.keyboardShortcuts&&!d.others.active()&&d.remove.keyboardShortcuts()},onComplete:function(){d.unbind.scrollLock(),u.allowMultiple&&(i.addClass(f.front),y.removeClass(f.front),n?o.find(m.dimmer).removeClass("active"):i.find(m.dimmer).removeClass("active")),B.isFunction(u.onHidden)&&u.onHidden.call(w),d.remove.dimmerStyles(),d.restore.focus(),e()}})):d.error(p.noTransition))},showDimmer:function(){i.dimmer("is animating")||!i.dimmer("is active")?(d.save.bodyMargin(),d.debug("Showing dimmer"),i.dimmer("show")):d.debug("Dimmer already visible")},hideDimmer:function(){i.dimmer("is animating")||i.dimmer("is active")?(d.unbind.scrollLock(),i.dimmer("hide",function(){d.restore.bodyMargin(),d.remove.clickaway(),d.remove.screenHeight()})):d.debug("Dimmer is not visible cannot hide")},hideAll:function(n){var e=o.filter("."+f.active+", ."+f.animating);if(n=B.isFunction(n)?n:function(){},0<e.length){d.debug("Hiding all visible modals");var i=!0;return B(e.get().reverse()).each(function(e,t){i=i&&B(t).modal("hide modal",n,!1,!0)}),i&&d.hideDimmer(),i}},hideOthers:function(e){var t=s.filter("."+f.active+", ."+f.animating);e=B.isFunction(e)?e:function(){},0<t.length&&(d.debug("Hiding other modals",s),t.modal("hide modal",e,!0))},others:{active:function(){return 0<s.filter("."+f.active).length},animating:function(){return 0<s.filter("."+f.animating).length}},add:{keyboardShortcuts:function(){d.verbose("Adding keyboard shortcuts"),D.on("keyup"+v,d.event.keyboard)}},save:{focus:function(){0<B(P.activeElement).closest(y).length||(e=B(P.activeElement).blur())},bodyMargin:function(){F=O.css("margin-"+(d.can.leftBodyScrollbar()?"left":"right"));var e=parseInt(F.replace(/[^\d.]/g,"")),t=R.innerWidth-P.documentElement.clientWidth;M=e+t}},restore:{focus:function(){e&&0<e.length&&u.restoreFocus&&e.focus()},bodyMargin:function(){var n=d.can.leftBodyScrollbar()?"left":"right";O.css("margin-"+n,F),O.find(m.bodyFixed.replace("right",n)).each(function(){var e=B(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"")})}},remove:{active:function(){y.removeClass(f.active)},legacy:function(){y.removeClass(f.legacy)},clickaway:function(){u.detachable||y.off("mousedown"+t),n.off("mousedown"+t),n.off("mouseup"+t)},dimmerStyles:function(){n.removeClass(f.inverted),i.removeClass(f.blurring)},bodyStyle:function(){""===O.attr("style")&&(d.verbose("Removing style attribute"),O.removeAttr("style"))},screenHeight:function(){d.debug("Removing page height"),O.css("height","")},keyboardShortcuts:function(){d.verbose("Removing keyboard shortcuts"),D.off("keyup"+v)},scrolling:function(){i.removeClass(f.scrolling),y.removeClass(f.scrolling)}},cacheSizes:function(){y.addClass(f.loading);var e=y.prop("scrollHeight"),t=y.outerWidth(),n=y.outerHeight();d.cache.pageHeight!==W&&0===n||(B.extend(d.cache,{pageHeight:B(P).outerHeight(),width:t,height:n+u.offset,scrollHeight:e+u.offset,contextHeight:"body"==u.context?B(R).height():i.height()}),d.cache.topOffset=-d.cache.height/2),y.removeClass(f.loading),d.debug("Caching modal and container sizes",d.cache)},helpers:{deQuote:function(e){return String(e).replace(/"/g,"")},escape:function(e,t){if(t)return e;var n={"<":"<",">":">",'"':""","'":"'","`":"`"};return/[&<>"'`]/.test(e)?(e=e.replace(/&(?![a-z0-9#]{1,6};)/,"&")).replace(/[<>"'`]/g,function(e){return n[e]}):e}},can:{leftBodyScrollbar:function(){return d.cache.leftBodyScrollbar===W&&(d.cache.leftBodyScrollbar=d.is.rtl()&&(d.is.iframe&&!d.is.firefox()||d.is.safari()||d.is.edge()||d.is.ie())),d.cache.leftBodyScrollbar},useFlex:function(){return"auto"===u.useFlex?u.detachable&&!d.is.ie():(u.useFlex&&d.is.ie()?d.debug("useFlex true is not supported in IE"):u.useFlex&&!u.detachable&&d.debug("useFlex true in combination with detachable false is not supported"),u.useFlex)},fit:function(){var e=d.cache.contextHeight,t=d.cache.contextHeight/2,n=d.cache.topOffset,i=d.cache.scrollHeight,o=d.cache.height,s=u.padding;return o<i?t+n+i+s<e:o+2*s<e}},has:{configActions:function(){return Array.isArray(u.actions)&&0<u.actions.length}},is:{active:function(){return y.hasClass(f.active)},ie:function(){if(d.cache.isIE===W){var e=!R.ActiveXObject&&"ActiveXObject"in R,t="ActiveXObject"in R;d.cache.isIE=e||t}return d.cache.isIE},animating:function(){return y.transition("is supported")?y.transition("is animating"):y.is(":visible")},scrolling:function(){return i.hasClass(f.scrolling)},modernBrowser:function(){return!(R.ActiveXObject||"ActiveXObject"in R)},rtl:function(){return d.cache.isRTL===W&&(d.cache.isRTL="rtl"===O.attr("dir")||"rtl"===O.css("direction")),d.cache.isRTL},safari:function(){return d.cache.isSafari===W&&(d.cache.isSafari=/constructor/i.test(R.HTMLElement)||!!R.ApplePaySession),d.cache.isSafari},edge:function(){return d.cache.isEdge===W&&(d.cache.isEdge=!!R.setImmediate&&!d.is.ie()),d.cache.isEdge},firefox:function(){return d.cache.isFirefox===W&&(d.cache.isFirefox=!!R.InstallTrigger),d.cache.isFirefox},iframe:function(){return!(self===top)}},set:{autofocus:function(){var e=y.find("[tabindex], :input").filter(":visible").filter(function(){return 0===B(this).closest(".disabled").length}),t=e.filter("[autofocus]"),n=0<t.length?t.first():e.first();0<n.length&&n.focus()},bodyMargin:function(){var n=d.can.leftBodyScrollbar()?"left":"right";(u.detachable||d.can.fit())&&O.css("margin-"+n,M+"px"),O.find(m.bodyFixed.replace("right",n)).each(function(){var e=B(this),t="fixed"===e.css("position")?"padding-"+n:n;e.css(t,"calc("+e.css(t)+" + "+M+"px)")})},clickaway:function(){u.detachable||y.on("mousedown"+t,d.event.mousedown),n.on("mousedown"+t,d.event.mousedown),n.on("mouseup"+t,d.event.mouseup)},dimmerSettings:function(){if(B.fn.dimmer!==W){var e={debug:u.debug,dimmerName:"modals",closable:"auto",useFlex:d.can.useFlex(),duration:{show:u.transition.showDuration||u.duration,hide:u.transition.hideDuration||u.duration}},t=B.extend(!0,e,u.dimmerSettings);u.inverted&&(t.variation=t.variation!==W?t.variation+" inverted":"inverted"),x.dimmer("setting",t)}else d.error(p.dimmer)},dimmerStyles:function(){u.inverted?n.addClass(f.inverted):n.removeClass(f.inverted),u.blurring?i.addClass(f.blurring):i.removeClass(f.blurring)},modalOffset:function(){if(u.detachable)y.css({marginTop:!y.hasClass("aligned")&&d.can.fit()?-d.cache.height/2:u.padding/2,marginLeft:-d.cache.width/2});else{var e=d.can.fit();y.css({top:!y.hasClass("aligned")&&e?B(P).scrollTop()+(d.cache.contextHeight-d.cache.height)/2:!e||y.hasClass("top")?B(P).scrollTop()+u.padding:B(P).scrollTop()+(d.cache.contextHeight-d.cache.height-u.padding),marginLeft:-d.cache.width/2})}d.verbose("Setting modal offset for legacy mode")},screenHeight:function(){d.can.fit()?O.css("height",""):y.hasClass("bottom")||(d.debug("Modal is taller than page content, resizing page height"),O.css("height",d.cache.height+2*u.padding))},active:function(){y.addClass(f.active+" "+f.front),s.filter("."+f.active).removeClass(f.front)},scrolling:function(){i.addClass(f.scrolling),y.addClass(f.scrolling),d.unbind.scrollLock()},legacy:function(){y.addClass(f.legacy)},type:function(){d.can.fit()?(d.verbose("Modal fits on screen"),d.others.active()||d.others.animating()||(d.remove.scrolling(),d.bind.scrollLock())):y.hasClass("bottom")?d.verbose("Bottom aligned modal not fitting on screen is unsupported for scrolling"):(d.verbose("Modal cannot fit on screen setting to scrolling"),d.set.scrolling())},undetached:function(){i.addClass(f.undetached)}},setting:function(e,t){if(d.debug("Changing setting",e,t),B.isPlainObject(e))B.extend(!0,u,e);else{if(t===W)return u[e];B.isPlainObject(u[e])?B.extend(!0,u[e],t):u[e]=t}},internal:function(e,t){if(B.isPlainObject(e))B.extend(!0,d,e);else{if(t===W)return d[e];d[e]=t}},debug:function(){!u.silent&&u.debug&&(u.performance?d.performance.log(arguments):(d.debug=Function.prototype.bind.call(console.info,console,u.name+":"),d.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?d.performance.log(arguments):(d.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),d.verbose.apply(console,arguments)))},error:function(){u.silent||(d.error=Function.prototype.bind.call(console.error,console,u.name+":"),d.error.apply(console,arguments))},performance:{log:function(e){var t,n;u.performance&&(n=(t=(new Date).getTime())-(L||t),L=t,N.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:w,"Execution Time":n})),clearTimeout(d.performance.timer),d.performance.timer=setTimeout(d.performance.display,500)},display:function(){var e=u.name+":",n=0;L=!1,clearTimeout(d.performance.timer),B.each(N,function(e,t){n+=t["Execution Time"]}),e+=" "+n+"ms",E&&(e+=" '"+E+"'"),(console.group!==W||console.table!==W)&&0<N.length&&(console.groupCollapsed(e),console.table?console.table(N):B.each(N,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),N=[]}},invoke:function(i,e,t){var o,s,n,a=C;return e=e||q,t=w||t,"string"==typeof i&&a!==W&&(i=i.split(/[\. ]/),o=i.length-1,B.each(i,function(e,t){var n=e!=o?t+i[e+1].charAt(0).toUpperCase()+i[e+1].slice(1):i;if(B.isPlainObject(a[n])&&e!=o)a=a[n];else{if(a[n]!==W)return s=a[n],!1;if(!B.isPlainObject(a[t])||e==o)return a[t]!==W&&(s=a[t]),!1;a=a[t]}})),B.isFunction(s)?n=s.apply(t,e):s!==W&&(n=s),Array.isArray(A)?A.push(n):A!==W?A=[A,n]:n!==W&&(A=n),s}},j?(C===W&&(B.isFunction(u.templates[z])&&(u.autoShow=!0,u.className.modal=u.className.template,u=B.extend(!0,{},u,u.templates[z].apply(d,q)),f=u.className,h=u.namespace,g=u.fields,p=u.error),d.initialize()),B.isFunction(u.templates[z])||d.invoke(z)):(C!==W&&C.invoke("destroy"),d.initialize(),A=y)}),A!==W?A:this},B.fn.modal.settings={name:"Modal",namespace:"modal",useFlex:"auto",offset:0,silent:!1,debug:!1,verbose:!1,performance:!0,observeChanges:!1,allowMultiple:!1,detachable:!0,closable:!0,autofocus:!0,restoreFocus:!0,autoShow:!1,inverted:!1,blurring:!1,centered:!0,dimmerSettings:{closable:!1,useCSS:!0},keyboardShortcuts:!0,context:"body",queue:!1,duration:500,transition:"scale",padding:50,scrollbarWidth:10,title:"",content:"",class:"",classTitle:"",classContent:"",classActions:"",closeIcon:!1,actions:!1,preserveHTML:!0,fields:{class:"class",text:"text",icon:"icon",click:"click"},onShow:function(){},onVisible:function(){},onHide:function(){return!0},onHidden:!1,onApprove:function(){return!0},onDeny:function(){return!0},selector:{title:"> .header",content:"> .content",actions:"> .actions",close:"> .close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel",modal:".ui.modal",dimmer:"> .ui.dimmer",bodyFixed:"> .ui.fixed.menu, > .ui.right.toast-container, > .ui.right.sidebar, > .ui.fixed.nag, > .ui.fixed.nag > .close",prompt:".ui.input > input"},error:{dimmer:"UI Dimmer, a required component is not included in this page",method:"The method you called is not defined.",notFound:"The element you specified could not be found"},className:{active:"active",animating:"animating",blurring:"blurring",inverted:"inverted",legacy:"legacy",loading:"loading",scrolling:"scrolling",undetached:"undetached",front:"front",close:"close icon",button:"ui button",modal:"ui modal",title:"header",content:"content",actions:"actions",template:"ui tiny modal",ok:"positive",cancel:"negative",prompt:"ui fluid input"},text:{ok:"Ok",cancel:"Cancel"}},B.fn.modal.settings.templates={getArguments:function(e){var t=[].slice.call(e);return B.isPlainObject(t[0])?B.extend({handler:function(){},content:"",title:""},t[0]):(B.isFunction(t[t.length-1])||t.push(function(){}),{handler:t.pop(),content:t.pop()||"",title:t.pop()||""})},alert:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments);return{title:t.title,content:t.content,actions:[{text:e.text.ok,class:e.className.ok,click:t.handler}]}},confirm:function(){var e=this.get.settings(),t=e.templates.getArguments(arguments);return{title:t.title,content:t.content,actions:[{text:e.text.ok,class:e.className.ok,click:function(){t.handler(!0)}},{text:e.text.cancel,class:e.className.cancel,click:function(){t.handler(!1)}}]}},prompt:function(){var n=this,e=this.get.settings(),i=e.templates.getArguments(arguments);return 0===B(B.parseHTML(i.content)).filter(".ui.input").length&&(i.content+='<p><div class="'+e.className.prompt+'"><input placeholder="'+this.helpers.deQuote(i.placeholder||"")+'" type="text" value="'+this.helpers.deQuote(i.defaultValue||"")+'"></div></p>'),{title:i.title,content:i.content,actions:[{text:e.text.ok,class:e.className.ok,click:function(){var e=n.get.settings(),t=n.get.element().find(e.selector.prompt)[0];i.handler(B(t).val())}},{text:e.text.cancel,class:e.className.cancel,click:function(){i.handler(null)}}]}}}}(jQuery,window,document);
|