|
@@ -262,35 +262,6 @@ const messageHandler = {
|
262
|
262
|
};
|
263
|
263
|
},
|
264
|
264
|
|
265
|
|
- /**
|
266
|
|
- * Shows a dialog with different states to the user.
|
267
|
|
- *
|
268
|
|
- * @param statesObject object containing all the states of the dialog.
|
269
|
|
- * @param options impromptu options
|
270
|
|
- * @param translateOptions options passed to translation
|
271
|
|
- */
|
272
|
|
- openDialogWithStates(statesObject, options, translateOptions) {
|
273
|
|
- const { classes, size } = options;
|
274
|
|
- const defaultClasses = this._getDialogClasses(size);
|
275
|
|
-
|
276
|
|
- options.classes = Object.assign({}, defaultClasses, classes);
|
277
|
|
- options.promptspeed = options.promptspeed || 0;
|
278
|
|
-
|
279
|
|
- for (const state in statesObject) { // eslint-disable-line guard-for-in
|
280
|
|
- const currentState = statesObject[state];
|
281
|
|
-
|
282
|
|
- if (currentState.titleKey) {
|
283
|
|
- currentState.title
|
284
|
|
- = this._getFormattedTitleString(currentState.titleKey);
|
285
|
|
- }
|
286
|
|
- }
|
287
|
|
- const dialog = $.prompt(statesObject, options);
|
288
|
|
-
|
289
|
|
- APP.translation.translateElement(dialog, translateOptions);
|
290
|
|
-
|
291
|
|
- return $.prompt.getApi();
|
292
|
|
- },
|
293
|
|
-
|
294
|
265
|
/**
|
295
|
266
|
* Opens new popup window for given <tt>url</tt> centered over current
|
296
|
267
|
* window.
|
|
@@ -370,22 +341,6 @@ const messageHandler = {
|
370
|
341
|
title: displayName
|
371
|
342
|
},
|
372
|
343
|
timeout));
|
373
|
|
- },
|
374
|
|
-
|
375
|
|
- /**
|
376
|
|
- * Displays a notification.
|
377
|
|
- *
|
378
|
|
- * @param {string} titleKey - The key from the language file for the title
|
379
|
|
- * of the notification.
|
380
|
|
- * @param {string} messageKey - The key from the language file for the text
|
381
|
|
- * of the message.
|
382
|
|
- * @param {Object} messageArguments - The arguments for the message
|
383
|
|
- * translation.
|
384
|
|
- * @returns {void}
|
385
|
|
- */
|
386
|
|
- notify(titleKey, messageKey, messageArguments) {
|
387
|
|
- this.participantNotification(
|
388
|
|
- null, titleKey, null, messageKey, messageArguments);
|
389
|
344
|
}
|
390
|
345
|
};
|
391
|
346
|
|