Return Impormptu api when create dialog
This commit is contained in:
parent
2b08950294
commit
f4e6dceaa4
|
@ -1,4 +1,4 @@
|
||||||
/* global $, APP, toastr, Impromptu */
|
/* global $, APP, toastr */
|
||||||
|
|
||||||
import UIUtil from './UIUtil';
|
import UIUtil from './UIUtil';
|
||||||
import jitsiLocalStorage from '../../util/JitsiLocalStorage';
|
import jitsiLocalStorage from '../../util/JitsiLocalStorage';
|
||||||
|
@ -126,7 +126,7 @@ var messageHandler = {
|
||||||
if (!popupEnabled)
|
if (!popupEnabled)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
let dialog = new Impromptu(
|
let dialog = $.prompt(
|
||||||
APP.translation.generateTranslationHTML(messageKey, i18nOptions), {
|
APP.translation.generateTranslationHTML(messageKey, i18nOptions), {
|
||||||
title: this._getFormattedTitleString(titleKey),
|
title: this._getFormattedTitleString(titleKey),
|
||||||
persistent: false,
|
persistent: false,
|
||||||
|
@ -138,7 +138,7 @@ var messageHandler = {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
APP.translation.translateElement(dialog, i18nOptions);
|
APP.translation.translateElement(dialog, i18nOptions);
|
||||||
return dialog;
|
return $.prompt.getApi();
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* Shows a message to the user with two buttons: first is given as a
|
* Shows a message to the user with two buttons: first is given as a
|
||||||
|
@ -218,7 +218,7 @@ var messageHandler = {
|
||||||
classes.prompt += ` ${wrapperClass}`;
|
classes.prompt += ` ${wrapperClass}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
twoButtonDialog = new Impromptu(message, {
|
twoButtonDialog = $.prompt(message, {
|
||||||
title: this._getFormattedTitleString(titleKey),
|
title: this._getFormattedTitleString(titleKey),
|
||||||
persistent: false,
|
persistent: false,
|
||||||
buttons: buttons,
|
buttons: buttons,
|
||||||
|
@ -242,7 +242,7 @@ var messageHandler = {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
APP.translation.translateElement(twoButtonDialog);
|
APP.translation.translateElement(twoButtonDialog);
|
||||||
return twoButtonDialog;
|
return $.prompt.getApi();
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -300,10 +300,10 @@ var messageHandler = {
|
||||||
args.closeText = '';
|
args.closeText = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
let dialog = new Impromptu(
|
let dialog = $.prompt(
|
||||||
msgString + generateDontShowCheckbox(dontShowAgain), args);
|
msgString + generateDontShowCheckbox(dontShowAgain), args);
|
||||||
APP.translation.translateElement(dialog.getPrompt());
|
APP.translation.translateElement(dialog);
|
||||||
return dialog;
|
return $.prompt.getApi();
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -360,9 +360,9 @@ var messageHandler = {
|
||||||
= this._getFormattedTitleString(currentState.titleKey);
|
= this._getFormattedTitleString(currentState.titleKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let dialog = new Impromptu(statesObject, options);
|
let dialog = $.prompt(statesObject, options);
|
||||||
APP.translation.translateElement(dialog.getPrompt(), translateOptions);
|
APP.translation.translateElement(dialog, translateOptions);
|
||||||
return dialog;
|
return $.prompt.getApi();
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue