Removes not used parameter of openMessageDialog (title).

We pass key which is enough to obtain the title.
This commit is contained in:
damencho 2016-10-17 17:33:30 -05:00
parent d97ed17052
commit b5f0d30298
5 changed files with 6 additions and 13 deletions

View File

@ -195,7 +195,7 @@ function maybeRedirectToWelcomePage(showThankYou) {
if (showThankYou) {
APP.UI.messageHandler.openMessageDialog(
null, null, null,
null, null,
APP.translation.translateString(
"dialog.thankYou", {appName:interfaceConfig.APP_NAME}
)

View File

@ -1219,7 +1219,6 @@ UI.showExtensionRequiredDialog = function (url) {
messageHandler.openMessageDialog(
"dialog.extensionRequired",
null,
null,
APP.translation.generateTranslationHTML(
"dialog.firefoxExtensionPrompt", {url: url}));
};
@ -1397,7 +1396,6 @@ UI.showTrackNotWorkingDialog = function (stream) {
"dialog.error",
stream.isAudioTrack()? "dialog.micNotSendingData" :
"dialog.cameraNotSendingData",
null,
null);
};

View File

@ -365,7 +365,7 @@ var Recording = {
dialog = APP.UI.messageHandler.openMessageDialog(
self.recordingTitle,
self.recordingBusy,
null, null,
null,
function () {
dialog = null;
}
@ -376,7 +376,7 @@ var Recording = {
dialog = APP.UI.messageHandler.openMessageDialog(
self.recordingTitle,
self.recordingUnavailable,
null, null,
null,
function () {
dialog = null;
}

View File

@ -93,7 +93,7 @@ export default class SharedVideoManager {
dialog = APP.UI.messageHandler.openMessageDialog(
"dialog.shareVideoTitle",
"dialog.alreadySharedVideoMsg",
null, null,
null,
function () {
dialog = null;
}

View File

@ -31,22 +31,17 @@ var messageHandler = {
* message, if a message title is not provided.
* @param messageKey the key used to find the translation of the message,
* if a message is not provided.
* @param title the title of the message. If a falsy value is provided,
* titleKey will be used to get a title via the translation API.
* @param message the message to show. If a falsy value is provided,
* messageKey will be used to get a message via the translation API.
* @param closeFunction function to be called after
* the prompt is closed (optional)
* @return the prompt that was created, or null
*/
openMessageDialog: function(titleKey, messageKey, title, message,
closeFunction) {
openMessageDialog: function(titleKey, messageKey, message, closeFunction) {
if (!popupEnabled)
return null;
if (!title) {
title = APP.translation.generateTranslationHTML(titleKey);
}
let title = APP.translation.generateTranslationHTML(titleKey);
if (!message) {
message = APP.translation.generateTranslationHTML(messageKey);
}