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) { if (showThankYou) {
APP.UI.messageHandler.openMessageDialog( APP.UI.messageHandler.openMessageDialog(
null, null, null, null, null,
APP.translation.translateString( APP.translation.translateString(
"dialog.thankYou", {appName:interfaceConfig.APP_NAME} "dialog.thankYou", {appName:interfaceConfig.APP_NAME}
) )

View File

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

View File

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

View File

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

View File

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