Removes title param from openTwoButtonDialog.

This commit is contained in:
damencho 2016-10-17 17:43:57 -05:00
parent b5f0d30298
commit f0ac52614b
3 changed files with 3 additions and 11 deletions

View File

@ -770,7 +770,6 @@ UI.connectionIndicatorShowMore = function(id) {
UI.showLoginPopup = function(callback) { UI.showLoginPopup = function(callback) {
console.log('password is required'); console.log('password is required');
let titleKey = "dialog.passwordRequired"; let titleKey = "dialog.passwordRequired";
let titleString = APP.translation.translateString(titleKey);
let message = ( let message = (
`<input name="username" type="text" `<input name="username" type="text"
@ -790,7 +789,6 @@ UI.showLoginPopup = function(callback) {
messageHandler.openTwoButtonDialog({ messageHandler.openTwoButtonDialog({
titleKey, titleKey,
titleString,
msgString: message, msgString: message,
leftButtonKey: 'dialog.Ok', leftButtonKey: 'dialog.Ok',
submitFunction, submitFunction,
@ -1242,7 +1240,6 @@ UI.showExtensionExternalInstallationDialog = function (url) {
messageHandler.openTwoButtonDialog({ messageHandler.openTwoButtonDialog({
titleKey: 'dialog.externalInstallationTitle', titleKey: 'dialog.externalInstallationTitle',
titleString: '',
msgKey: 'dialog.externalInstallationMsg', msgKey: 'dialog.externalInstallationMsg',
msgString: '', msgString: '',
leftButtonKey: 'dialog.goToStore', leftButtonKey: 'dialog.goToStore',

View File

@ -279,7 +279,6 @@ function showSipNumberInput () {
? config.defaultSipNumber ? config.defaultSipNumber
: ''; : '';
let titleKey = "dialog.sipMsg"; let titleKey = "dialog.sipMsg";
let sipMsg = APP.translation.generateTranslationHTML("dialog.sipMsg");
let msgString = (` let msgString = (`
<input name="sipNumber" type="text" <input name="sipNumber" type="text"
value="${defaultNumber}" autofocus> value="${defaultNumber}" autofocus>
@ -287,7 +286,6 @@ function showSipNumberInput () {
APP.UI.messageHandler.openTwoButtonDialog({ APP.UI.messageHandler.openTwoButtonDialog({
titleKey, titleKey,
titleString: sipMsg,
msgString, msgString,
leftButtonKey: "dialog.Dial", leftButtonKey: "dialog.Dial",
submitFunction: function (e, v, m, f) { submitFunction: function (e, v, m, f) {

View File

@ -61,7 +61,7 @@ var messageHandler = {
* 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
* parameter and the second is Cancel. * parameter and the second is Cancel.
* *
* @param titleString the title of the message * @param titleKey the key for the title of the message
* @param msgString the text of the message * @param msgString the text of the message
* @param persistent boolean value which determines whether the message is * @param persistent boolean value which determines whether the message is
* persistent or not * persistent or not
@ -79,7 +79,6 @@ var messageHandler = {
openTwoButtonDialog: function(options) { openTwoButtonDialog: function(options) {
let { let {
titleKey, titleKey,
titleString,
msgKey, msgKey,
msgString, msgString,
leftButtonKey, leftButtonKey,
@ -107,10 +106,8 @@ var messageHandler = {
= APP.translation.generateTranslationHTML("dialog.Cancel"); = APP.translation.generateTranslationHTML("dialog.Cancel");
buttons.push({title: cancelButton, value: false}); buttons.push({title: cancelButton, value: false});
var message = msgString, title = titleString; var message = msgString;
if (titleKey) { var title = APP.translation.generateTranslationHTML(titleKey);
title = APP.translation.generateTranslationHTML(titleKey);
}
if (msgKey) { if (msgKey) {
message = APP.translation.generateTranslationHTML(msgKey); message = APP.translation.generateTranslationHTML(msgKey);
} }