PluginProbe
Elementor Website Builder – more than just a page builder / 3.23.0-dev2
Elementor Website Builder – more than just a page builder v3.23.0-dev2
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
elementor / assets / lib / dialog / dialog.js

dialog.js in Elementor Website Builder – more than just a page builder 3.23.0-dev2, at assets/lib/dialog/dialog.js

1,018 lines 20.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*!
2 * Dialogs Manager v4.9.3
3 * https://github.com/kobizz/dialogs-manager
4 *
5 * Copyright Kobi Zaltzberg
6 * Released under the MIT license
7 * https://github.com/kobizz/dialogs-manager/blob/master/LICENSE.txt
8 */
9
10 (function($, global) {
11 'use strict';
12
13 /*
14 * Dialog Manager
15 */
16 var DialogsManager = {
17 widgetsTypes: {},
18 createWidgetType: function(typeName, properties, Parent) {
19
20 if (!Parent) {
21 Parent = this.Widget;
22 }
23
24 var WidgetType = function() {
25
26 Parent.apply(this, arguments);
27 };
28
29 var prototype = WidgetType.prototype = new Parent(typeName);
30
31 prototype.types = prototype.types.concat([typeName]);
32
33 $.extend(prototype, properties);
34
35 prototype.constructor = WidgetType;
36
37 WidgetType.extend = function(typeName, properties) {
38
39 return DialogsManager.createWidgetType(typeName, properties, WidgetType);
40 };
41
42 return WidgetType;
43 },
44 addWidgetType: function(typeName, properties, Parent) {
45
46 if (properties && properties.prototype instanceof this.Widget) {
47 return this.widgetsTypes[typeName] = properties;
48 }
49
50 return this.widgetsTypes[typeName] = this.createWidgetType(typeName, properties, Parent);
51 },
52 getWidgetType: function(widgetType) {
53
54 return this.widgetsTypes[widgetType];
55 }
56 };
57
58 /*
59 * Dialog Manager instances constructor
60 */
61 DialogsManager.Instance = function() {
62
63 var self = this,
64 elements = {},
65 settings = {};
66
67 var initElements = function() {
68
69 elements.body = $('body');
70 };
71
72 var initSettings = function(options) {
73
74 var defaultSettings = {
75 classPrefix: 'dialog',
76 effects: {
77 show: 'fadeIn',
78 hide: 'fadeOut'
79 }
80 };
81
82 $.extend(settings, defaultSettings, options);
83 };
84
85 this.createWidget = function(widgetType, properties) {
86
87 var WidgetTypeConstructor = DialogsManager.getWidgetType(widgetType),
88 widget = new WidgetTypeConstructor(widgetType);
89
90 properties = properties || {};
91
92 widget.init(self, properties);
93
94 return widget;
95 };
96
97 this.getSettings = function(property) {
98
99 if (property) {
100 return settings[property];
101 }
102
103 return Object.create(settings);
104 };
105
106 this.init = function(settings) {
107
108 initSettings(settings);
109
110 initElements();
111
112 return self;
113 };
114
115 self.init();
116 };
117
118 /*
119 * Widget types constructor
120 */
121 DialogsManager.Widget = function(widgetName) {
122
123 var self = this,
124 settings = {},
125 events = {},
126 elements = {},
127 hideTimeOut = 0,
128 baseClosureMethods = ['refreshPosition'];
129
130 var bindEvents = function() {
131
132 var windows = [elements.window];
133
134 if (elements.iframe) {
135 windows.push(jQuery(elements.iframe[0].contentWindow));
136 }
137
138 windows.forEach(function(window) {
139 if (settings.hide.onEscKeyPress) {
140 window.on('keyup', onWindowKeyUp);
141 }
142
143 if (settings.hide.onOutsideClick) {
144 window[0].addEventListener('click', hideOnOutsideClick, true);
145 }
146
147 if (settings.hide.onOutsideContextMenu) {
148 window[0].addEventListener('contextmenu', hideOnOutsideClick, true);
149 }
150
151 if (settings.position.autoRefresh) {
152 window.on('resize', self.refreshPosition);
153 }
154 });
155
156 if (settings.hide.onClick || settings.hide.onBackgroundClick) {
157 elements.widget.on('click', hideOnClick);
158 }
159 };
160
161 var callEffect = function(intent, params) {
162
163 var effect = settings.effects[intent],
164 $widget = elements.widget;
165
166 if ('function' === typeof effect) {
167 effect.apply($widget, params);
168 } else {
169
170 if ($widget[effect]) {
171 $widget[effect].apply($widget, params);
172 } else {
173 throw 'Reference Error: The effect ' + effect + ' not found';
174 }
175 }
176 };
177
178 var ensureClosureMethods = function() {
179
180 var closureMethodsNames = baseClosureMethods.concat(self.getClosureMethods());
181
182 $.each(closureMethodsNames, function() {
183
184 var methodName = this,
185 oldMethod = self[methodName];
186
187 self[methodName] = function() {
188
189 oldMethod.apply(self, arguments);
190 };
191 });
192 };
193
194 var fixIframePosition = function(position) {
195 if (! position.my) {
196 return;
197 }
198
199 var horizontalOffsetRegex = /left|right/,
200 extraOffsetRegex = /([+-]\d+)?$/,
201 iframeOffset = elements.iframe.offset(),
202 iframeWindow = elements.iframe[0].contentWindow,
203 myParts = position.my.split(' '),
204 fixedParts = [];
205
206 if (myParts.length === 1) {
207 if (horizontalOffsetRegex.test(myParts[0])) {
208 myParts.push('center');
209 } else {
210 myParts.unshift('center');
211 }
212 }
213
214 myParts.forEach(function(part, index) {
215 var fixedPart = part.replace(extraOffsetRegex, function(partOffset) {
216 partOffset = +partOffset || 0;
217
218 if (! index) {
219 partOffset += iframeOffset.left - iframeWindow.scrollX;
220 } else {
221 partOffset += iframeOffset.top - iframeWindow.scrollY;
222 }
223
224 if (partOffset >= 0) {
225 partOffset = '+' + partOffset;
226 }
227
228 return partOffset;
229 });
230
231 fixedParts.push(fixedPart);
232 });
233
234 position.my = fixedParts.join(' ');
235 };
236
237 var hideOnClick = function(event) {
238
239 if (isContextMenuClickEvent(event)) {
240 return;
241 }
242
243 if (settings.hide.onClick) {
244
245 if ($(event.target).closest(settings.selectors.preventClose).length) {
246 return;
247 }
248 } else if (event.target !== this) {
249 return;
250 }
251
252 self.hide();
253 };
254
255 var isIgnoredTarget = function(event) {
256
257 if (! settings.hide.ignore) {
258 return false;
259 }
260
261 return !! $(event.target).closest(settings.hide.ignore).length;
262 };
263
264 var hideOnOutsideClick = function(event) {
265
266 if (isContextMenuClickEvent(event) || $(event.target).closest(elements.widget).length || isIgnoredTarget(event)) {
267 return;
268 }
269
270 self.hide();
271 };
272
273 var initElements = function() {
274
275 self.addElement('widget');
276
277 self.addElement('header');
278
279 self.addElement('message');
280
281 self.addElement('window', window);
282
283 self.addElement('body', document.body);
284
285 self.addElement('container', settings.container);
286
287 if (settings.iframe) {
288 self.addElement('iframe', settings.iframe);
289 }
290
291 if (settings.closeButton) {
292 if ( settings.closeButtonClass ) {
293 // Backwards compatibility
294 settings.closeButtonOptions.iconClass = settings.closeButtonClass;
295 }
296
297 const $button = $('<a>', settings.closeButtonOptions.attributes),
298 $buttonIcon = $(settings.closeButtonOptions.iconElement).addClass(settings.closeButtonOptions.iconClass);
299
300 $button.append($buttonIcon);
301
302 self.addElement('closeButton', $button);
303 }
304
305 var id = self.getSettings('id');
306
307 if (id) {
308 self.setID(id);
309 }
310
311 var classes = [];
312
313 $.each(self.types, function() {
314 classes.push(settings.classes.globalPrefix + '-type-' + this);
315 });
316
317 classes.push(self.getSettings('className'));
318
319 elements.widget
320 .addClass(classes.join(' '))
321 .attr({
322 'aria-modal': true,
323 'role': 'document',
324 'tabindex': 0,
325 });
326 };
327
328 var initSettings = function(parent, userSettings) {
329
330 var parentSettings = $.extend(true, {}, parent.getSettings());
331
332 settings = {
333 headerMessage: '',
334 message: '',
335 effects: parentSettings.effects,
336 classes: {
337 globalPrefix: parentSettings.classPrefix,
338 prefix: parentSettings.classPrefix + '-' + widgetName,
339 preventScroll: parentSettings.classPrefix + '-prevent-scroll',
340 },
341 selectors: {
342 preventClose: '.' + parentSettings.classPrefix + '-prevent-close',
343 },
344 container: 'body',
345 preventScroll: false,
346 iframe: null,
347 closeButton: false,
348 closeButtonOptions: {
349 iconClass: parentSettings.classPrefix + '-close-button-icon',
350 attributes: {
351 role: 'button',
352 'tabindex': 0,
353 'aria-label': 'Close',
354 href: '#',
355 },
356 iconElement: '<i>',
357 },
358 position: {
359 element: 'widget',
360 my: 'center',
361 at: 'center',
362 enable: true,
363 autoRefresh: false,
364 },
365 hide: {
366 auto: false,
367 autoDelay: 5000,
368 onClick: false,
369 onOutsideClick: true,
370 onOutsideContextMenu: false,
371 onBackgroundClick: true,
372 onEscKeyPress: true,
373 ignore: '',
374 },
375 };
376
377 $.extend(true, settings, self.getDefaultSettings(), userSettings);
378
379 initSettingsEvents();
380 };
381
382 var initSettingsEvents = function() {
383
384 $.each(settings, function(settingKey) {
385
386 var eventName = settingKey.match(/^on([A-Z].*)/);
387
388 if (!eventName) {
389 return;
390 }
391
392 eventName = eventName[1].charAt(0).toLowerCase() + eventName[1].slice(1);
393
394 self.on(eventName, this);
395 });
396 };
397
398 var isContextMenuClickEvent = function(event) {
399 // Firefox fires `click` event on every `contextmenu` event.
400 return event.type === 'click' && event.button === 2;
401 };
402
403 var normalizeClassName = function(name) {
404
405 return name.replace(/([a-z])([A-Z])/g, function() {
406
407 return arguments[1] + '-' + arguments[2].toLowerCase();
408 });
409 };
410
411 var onWindowKeyUp = function(event) {
412 var ESC_KEY = 27,
413 keyCode = event.which;
414
415 if (ESC_KEY === keyCode) {
416 self.hide();
417 }
418 };
419
420 var unbindEvents = function() {
421
422 var windows = [elements.window];
423
424 if (elements.iframe) {
425 windows.push(jQuery(elements.iframe[0].contentWindow));
426 }
427
428 windows.forEach(function(window) {
429 if (settings.hide.onEscKeyPress) {
430 window.off('keyup', onWindowKeyUp);
431 }
432
433 if (settings.hide.onOutsideClick) {
434 window[0].removeEventListener('click', hideOnOutsideClick, true);
435 }
436
437 if (settings.hide.onOutsideContextMenu) {
438 window[0].removeEventListener('contextmenu', hideOnOutsideClick, true);
439 }
440
441 if (settings.position.autoRefresh) {
442 window.off('resize', self.refreshPosition);
443 }
444 });
445
446 if (settings.hide.onClick || settings.hide.onBackgroundClick) {
447 elements.widget.off('click', hideOnClick);
448 }
449 };
450
451 this.addElement = function(name, element, classes) {
452
453 var $newElement = elements[name] = $(element || '<div>'),
454 normalizedName = normalizeClassName(name);
455
456 classes = classes ? classes + ' ' : '';
457
458 classes += settings.classes.globalPrefix + '-' + normalizedName;
459
460 classes += ' ' + settings.classes.prefix + '-' + normalizedName;
461
462 $newElement.addClass(classes);
463
464 return $newElement;
465 };
466
467 this.destroy = function() {
468
469 unbindEvents();
470
471 elements.widget.remove();
472
473 self.trigger('destroy');
474
475 return self;
476 };
477
478 this.getElements = function(item) {
479
480 return item ? elements[item] : elements;
481 };
482
483 this.getSettings = function(setting) {
484
485 var copy = Object.create(settings);
486
487 if (setting) {
488 return copy[setting];
489 }
490
491 return copy;
492 };
493
494 this.hide = function() {
495
496 if (! self.isVisible()) {
497 return;
498 }
499
500 clearTimeout(hideTimeOut);
501
502 callEffect('hide', arguments);
503
504 unbindEvents();
505
506 if (settings.preventScroll) {
507 self.getElements('body').removeClass(settings.classes.preventScroll);
508 }
509
510 self.trigger('hide');
511
512 return self;
513 };
514
515 this.init = function(parent, properties) {
516
517 if (!(parent instanceof DialogsManager.Instance)) {
518 throw 'The ' + self.widgetName + ' must to be initialized from an instance of DialogsManager.Instance';
519 }
520
521 ensureClosureMethods();
522
523 self.trigger('init', properties);
524
525 initSettings(parent, properties);
526
527 initElements();
528
529 self.buildWidget();
530
531 self.attachEvents();
532
533 self.trigger('ready');
534
535 return self;
536 };
537
538 this.isVisible = function() {
539
540 return elements.widget.is(':visible');
541 };
542
543 this.on = function(eventName, callback) {
544
545 if ('object' === typeof eventName) {
546 $.each(eventName, function(singleEventName) {
547 self.on(singleEventName, this);
548 });
549
550 return self;
551 }
552
553 var eventNames = eventName.split(' ');
554
555 eventNames.forEach(function(singleEventName) {
556 if (!events[singleEventName]) {
557 events[singleEventName] = [];
558 }
559
560 events[singleEventName].push(callback);
561 });
562
563 return self;
564 };
565
566 this.off = function(eventName, callback) {
567
568 if (! events[ eventName ]) {
569 return self;
570 }
571
572 if (! callback) {
573 delete events[eventName];
574
575 return self;
576 }
577
578 var callbackIndex = events[eventName].indexOf(callback);
579
580 if (-1 !== callbackIndex) {
581 events[eventName].splice(callbackIndex, 1);
582 }
583
584 return self;
585 };
586
587 this.refreshPosition = function() {
588
589 if (! settings.position.enable) {
590 return;
591 }
592
593 var position = $.extend({}, settings.position);
594
595 if (elements[position.of]) {
596 position.of = elements[position.of];
597 }
598
599 if (! position.of) {
600 position.of = window;
601 }
602
603 if (settings.iframe) {
604 fixIframePosition(position);
605 }
606
607 elements[position.element].position(position);
608 };
609
610 this.setID = function(id) {
611
612 elements.widget.attr('id', id);
613
614 return self;
615 };
616
617 this.setHeaderMessage = function(message) {
618
619 self.getElements('header').html(message);
620
621 return self;
622 };
623
624 this.setMessage = function(message) {
625
626 elements.message.html(message);
627
628 return self;
629 };
630
631 this.setSettings = function(key, value) {
632
633 if (jQuery.isPlainObject(value)) {
634 $.extend(true, settings[key], value);
635 } else {
636 settings[key] = value;
637 }
638
639 return self;
640 };
641
642 this.show = function() {
643
644 clearTimeout(hideTimeOut);
645
646 elements.widget.appendTo(elements.container).hide();
647
648 callEffect('show', arguments);
649
650 self.refreshPosition();
651
652 if (settings.hide.auto) {
653 hideTimeOut = setTimeout(self.hide, settings.hide.autoDelay);
654 }
655
656 bindEvents();
657
658 if (settings.preventScroll) {
659 self.getElements('body').addClass(settings.classes.preventScroll);
660 }
661
662 self.trigger('show');
663
664 return self;
665 };
666
667 this.trigger = function(eventName, params) {
668
669 var methodName = 'on' + eventName[0].toUpperCase() + eventName.slice(1);
670
671 if (self[methodName]) {
672 self[methodName](params);
673 }
674
675 var callbacks = events[eventName];
676
677 if (!callbacks) {
678 return;
679 }
680
681 $.each(callbacks, function(index, callback) {
682
683 callback.call(self, params);
684 });
685
686 return self;
687 };
688 };
689
690 DialogsManager.Widget.prototype.types = [];
691
692 // Inheritable widget methods
693 DialogsManager.Widget.prototype.buildWidget = function() {
694
695 var elements = this.getElements(),
696 settings = this.getSettings();
697
698 elements.widget.append(elements.header, elements.message);
699
700 this.setHeaderMessage(settings.headerMessage);
701
702 this.setMessage(settings.message);
703
704 if (this.getSettings('closeButton')) {
705 elements.widget.prepend(elements.closeButton);
706 }
707 };
708
709 DialogsManager.Widget.prototype.attachEvents = function() {
710
711 var self = this;
712
713 if (self.getSettings('closeButton')) {
714 self.getElements('closeButton').on('click', function(event) {
715 event.preventDefault();
716 self.hide();
717 });
718 }
719 };
720
721 DialogsManager.Widget.prototype.getDefaultSettings = function() {
722
723 return {};
724 };
725
726 DialogsManager.Widget.prototype.getClosureMethods = function() {
727
728 return [];
729 };
730
731 DialogsManager.Widget.prototype.onHide = function() {
732 };
733
734 DialogsManager.Widget.prototype.onShow = function() {
735 };
736
737 DialogsManager.Widget.prototype.onInit = function() {
738 };
739
740 DialogsManager.Widget.prototype.onReady = function() {
741 };
742
743 DialogsManager.widgetsTypes.simple = DialogsManager.Widget;
744
745 DialogsManager.addWidgetType('buttons', {
746 activeKeyUp: function(event) {
747
748 var TAB_KEY = 9;
749
750 if (event.which === TAB_KEY) {
751 event.preventDefault();
752 }
753
754 if (this.hotKeys[event.which]) {
755 this.hotKeys[event.which](this);
756 }
757 },
758 activeKeyDown: function(event) {
759
760 if (!this.focusedButton) {
761 return;
762 }
763
764 var TAB_KEY = 9;
765
766 if (event.which === TAB_KEY) {
767 event.preventDefault();
768
769 var currentButtonIndex = this.focusedButton.index(),
770 nextButtonIndex;
771
772 if (event.shiftKey) {
773
774 nextButtonIndex = currentButtonIndex - 1;
775
776 if (nextButtonIndex < 0) {
777 nextButtonIndex = this.buttons.length - 1;
778 }
779 } else {
780
781 nextButtonIndex = currentButtonIndex + 1;
782
783 if (nextButtonIndex >= this.buttons.length) {
784 nextButtonIndex = 0;
785 }
786 }
787
788 this.focusedButton = this.buttons[nextButtonIndex].trigger('focus');
789 }
790 },
791 addButton: function(options) {
792
793 var self = this,
794 settings = self.getSettings(),
795 buttonSettings = jQuery.extend(settings.button, options);
796
797 var classes = options.classes ? options.classes + ' ' : '';
798
799 classes += settings.classes.globalPrefix + '-button';
800
801 var $button = self.addElement(options.name, $('<' + buttonSettings.tag + '>').html(options.text), classes);
802
803 self.buttons.push($button);
804
805 var buttonFn = function() {
806
807 if (settings.hide.onButtonClick) {
808 self.hide();
809 }
810
811 if ('function' === typeof options.callback) {
812 options.callback.call(this, self);
813 }
814 };
815
816 $button.on('click', buttonFn);
817
818 if (options.hotKey) {
819 this.hotKeys[options.hotKey] = buttonFn;
820 }
821
822 this.getElements('buttonsWrapper').append($button);
823
824 if (options.focus) {
825 this.focusedButton = $button;
826 }
827
828 return self;
829 },
830 bindHotKeys: function() {
831
832 this.getElements('window').on({
833 keyup: this.activeKeyUp,
834 keydown: this.activeKeyDown
835 });
836 },
837 buildWidget: function() {
838
839 DialogsManager.Widget.prototype.buildWidget.apply(this, arguments);
840
841 var $buttonsWrapper = this.addElement('buttonsWrapper');
842
843 this.getElements('widget').append($buttonsWrapper);
844 },
845 getClosureMethods: function() {
846
847 return [
848 'activeKeyUp',
849 'activeKeyDown'
850 ];
851 },
852 getDefaultSettings: function() {
853
854 return {
855 hide: {
856 onButtonClick: true
857 },
858 button: {
859 tag: 'button'
860 }
861 };
862 },
863 onHide: function() {
864
865 this.unbindHotKeys();
866 },
867 onInit: function() {
868
869 this.buttons = [];
870
871 this.hotKeys = {};
872
873 this.focusedButton = null;
874 },
875 onShow: function() {
876
877 this.bindHotKeys();
878
879 if (!this.focusedButton) {
880 this.focusedButton = this.buttons[0];
881 }
882
883 if (this.focusedButton) {
884 this.focusedButton.trigger('focus');
885 }
886 },
887 unbindHotKeys: function() {
888
889 this.getElements('window').off({
890 keyup: this.activeKeyUp,
891 keydown: this.activeKeyDown
892 });
893 }
894 });
895
896 DialogsManager.addWidgetType('lightbox', DialogsManager.getWidgetType('buttons').extend('lightbox', {
897 getDefaultSettings: function() {
898
899 var settings = DialogsManager.getWidgetType('buttons').prototype.getDefaultSettings.apply(this, arguments);
900
901 return $.extend(true, settings, {
902 contentWidth: 'auto',
903 contentHeight: 'auto',
904 position: {
905 element: 'widgetContent',
906 of: 'widget',
907 autoRefresh: true
908 }
909 });
910 },
911 buildWidget: function() {
912
913 DialogsManager.getWidgetType('buttons').prototype.buildWidget.apply(this, arguments);
914
915 var $widgetContent = this.addElement('widgetContent'),
916 elements = this.getElements();
917
918 $widgetContent.append(elements.header, elements.message, elements.buttonsWrapper);
919
920 elements.widget.html($widgetContent);
921
922 if (elements.closeButton) {
923 $widgetContent.prepend(elements.closeButton);
924 }
925 },
926 onReady: function() {
927
928 var elements = this.getElements(),
929 settings = this.getSettings();
930
931 if ('auto' !== settings.contentWidth) {
932 elements.message.width(settings.contentWidth);
933 }
934
935 if ('auto' !== settings.contentHeight) {
936 elements.message.height(settings.contentHeight);
937 }
938 }
939 }));
940
941 DialogsManager.addWidgetType('confirm', DialogsManager.getWidgetType('lightbox').extend('confirm', {
942 onReady: function() {
943
944 DialogsManager.getWidgetType('lightbox').prototype.onReady.apply(this, arguments);
945
946 var strings = this.getSettings('strings'),
947 isDefaultCancel = this.getSettings('defaultOption') === 'cancel';
948
949 this.addButton({
950 name: 'cancel',
951 text: strings.cancel,
952 callback: function(widget) {
953
954 widget.trigger('cancel');
955 },
956 focus: isDefaultCancel
957 });
958
959 this.addButton({
960 name: 'ok',
961 text: strings.confirm,
962 callback: function(widget) {
963
964 widget.trigger('confirm');
965 },
966 focus: !isDefaultCancel
967 });
968 },
969 getDefaultSettings: function() {
970
971 var settings = DialogsManager.getWidgetType('lightbox').prototype.getDefaultSettings.apply(this, arguments);
972
973 settings.strings = {
974 confirm: 'OK',
975 cancel: 'Cancel'
976 };
977
978 settings.defaultOption = 'cancel';
979
980 return settings;
981 }
982 }));
983
984 DialogsManager.addWidgetType('alert', DialogsManager.getWidgetType('lightbox').extend('alert', {
985 onReady: function() {
986
987 DialogsManager.getWidgetType('lightbox').prototype.onReady.apply(this, arguments);
988
989 var strings = this.getSettings('strings');
990
991 this.addButton({
992 name: 'ok',
993 text: strings.confirm,
994 callback: function(widget) {
995
996 widget.trigger('confirm');
997 }
998 });
999 },
1000 getDefaultSettings: function() {
1001
1002 var settings = DialogsManager.getWidgetType('lightbox').prototype.getDefaultSettings.apply(this, arguments);
1003
1004 settings.strings = {
1005 confirm: 'OK'
1006 };
1007
1008 return settings;
1009 }
1010 }));
1011
1012 // Exporting the DialogsManager variable to global
1013 global.DialogsManager = DialogsManager;
1014 })(
1015 typeof jQuery !== 'undefined' ? jQuery : typeof require === 'function' && require('jquery'),
1016 (typeof module !== 'undefined' && typeof module.exports !== 'undefined') ? module.exports : window
1017 );
1018