Pārlūkot izejas kodu

Return Impormptu api when create dialog

j8
Ilya Daynatovich 8 gadus atpakaļ
vecāks
revīzija
f4e6dceaa4
1 mainītis faili ar 11 papildinājumiem un 11 dzēšanām
  1. 11
    11
      modules/UI/util/MessageHandler.js

+ 11
- 11
modules/UI/util/MessageHandler.js Parādīt failu

1
-/* global $, APP, toastr, Impromptu */
1
+/* global $, APP, toastr */
2
 
2
 
3
 import UIUtil from './UIUtil';
3
 import UIUtil from './UIUtil';
4
 import jitsiLocalStorage from '../../util/JitsiLocalStorage';
4
 import jitsiLocalStorage from '../../util/JitsiLocalStorage';
126
         if (!popupEnabled)
126
         if (!popupEnabled)
127
             return null;
127
             return null;
128
 
128
 
129
-        let dialog = new Impromptu(
129
+        let dialog = $.prompt(
130
             APP.translation.generateTranslationHTML(messageKey, i18nOptions), {
130
             APP.translation.generateTranslationHTML(messageKey, i18nOptions), {
131
             title: this._getFormattedTitleString(titleKey),
131
             title: this._getFormattedTitleString(titleKey),
132
             persistent: false,
132
             persistent: false,
138
             }
138
             }
139
         });
139
         });
140
         APP.translation.translateElement(dialog, i18nOptions);
140
         APP.translation.translateElement(dialog, i18nOptions);
141
-        return dialog;
141
+        return $.prompt.getApi();
142
     },
142
     },
143
     /**
143
     /**
144
      * Shows a message to the user with two buttons: first is given as a
144
      * Shows a message to the user with two buttons: first is given as a
218
             classes.prompt += ` ${wrapperClass}`;
218
             classes.prompt += ` ${wrapperClass}`;
219
         }
219
         }
220
 
220
 
221
-        twoButtonDialog = new Impromptu(message, {
221
+        twoButtonDialog = $.prompt(message, {
222
             title: this._getFormattedTitleString(titleKey),
222
             title: this._getFormattedTitleString(titleKey),
223
             persistent: false,
223
             persistent: false,
224
             buttons: buttons,
224
             buttons: buttons,
242
             }
242
             }
243
         });
243
         });
244
         APP.translation.translateElement(twoButtonDialog);
244
         APP.translation.translateElement(twoButtonDialog);
245
-        return twoButtonDialog;
245
+        return $.prompt.getApi();
246
     },
246
     },
247
 
247
 
248
     /**
248
     /**
300
             args.closeText = '';
300
             args.closeText = '';
301
         }
301
         }
302
 
302
 
303
-        let dialog = new Impromptu(
303
+        let dialog = $.prompt(
304
             msgString + generateDontShowCheckbox(dontShowAgain), args);
304
             msgString + generateDontShowCheckbox(dontShowAgain), args);
305
-        APP.translation.translateElement(dialog.getPrompt());
306
-        return dialog;
305
+        APP.translation.translateElement(dialog);
306
+        return $.prompt.getApi();
307
     },
307
     },
308
 
308
 
309
     /**
309
     /**
360
                     = this._getFormattedTitleString(currentState.titleKey);
360
                     = this._getFormattedTitleString(currentState.titleKey);
361
             }
361
             }
362
         }
362
         }
363
-        let dialog = new Impromptu(statesObject, options);
364
-        APP.translation.translateElement(dialog.getPrompt(), translateOptions);
365
-        return dialog;
363
+        let dialog = $.prompt(statesObject, options);
364
+        APP.translation.translateElement(dialog, translateOptions);
365
+        return $.prompt.getApi();
366
     },
366
     },
367
 
367
 
368
     /**
368
     /**

Notiek ielāde…
Atcelt
Saglabāt