瀏覽代碼

Return Impormptu api when create dialog

j8
Ilya Daynatovich 8 年之前
父節點
當前提交
f4e6dceaa4
共有 1 個檔案被更改,包括 11 行新增11 行删除
  1. 11
    11
      modules/UI/util/MessageHandler.js

+ 11
- 11
modules/UI/util/MessageHandler.js 查看文件

@@ -1,4 +1,4 @@
1
-/* global $, APP, toastr, Impromptu */
1
+/* global $, APP, toastr */
2 2
 
3 3
 import UIUtil from './UIUtil';
4 4
 import jitsiLocalStorage from '../../util/JitsiLocalStorage';
@@ -126,7 +126,7 @@ var messageHandler = {
126 126
         if (!popupEnabled)
127 127
             return null;
128 128
 
129
-        let dialog = new Impromptu(
129
+        let dialog = $.prompt(
130 130
             APP.translation.generateTranslationHTML(messageKey, i18nOptions), {
131 131
             title: this._getFormattedTitleString(titleKey),
132 132
             persistent: false,
@@ -138,7 +138,7 @@ var messageHandler = {
138 138
             }
139 139
         });
140 140
         APP.translation.translateElement(dialog, i18nOptions);
141
-        return dialog;
141
+        return $.prompt.getApi();
142 142
     },
143 143
     /**
144 144
      * Shows a message to the user with two buttons: first is given as a
@@ -218,7 +218,7 @@ var messageHandler = {
218 218
             classes.prompt += ` ${wrapperClass}`;
219 219
         }
220 220
 
221
-        twoButtonDialog = new Impromptu(message, {
221
+        twoButtonDialog = $.prompt(message, {
222 222
             title: this._getFormattedTitleString(titleKey),
223 223
             persistent: false,
224 224
             buttons: buttons,
@@ -242,7 +242,7 @@ var messageHandler = {
242 242
             }
243 243
         });
244 244
         APP.translation.translateElement(twoButtonDialog);
245
-        return twoButtonDialog;
245
+        return $.prompt.getApi();
246 246
     },
247 247
 
248 248
     /**
@@ -300,10 +300,10 @@ var messageHandler = {
300 300
             args.closeText = '';
301 301
         }
302 302
 
303
-        let dialog = new Impromptu(
303
+        let dialog = $.prompt(
304 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,9 +360,9 @@ var messageHandler = {
360 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
     /**

Loading…
取消
儲存