From 75552b7bb35e6358226532b4ea90b1b23e27aaba Mon Sep 17 00:00:00 2001 From: Markus Weiland Date: Tue, 28 May 2019 01:12:02 +0200 Subject: [PATCH 1/2] #280 Bad UI layout and label in Calendar clone window * Fix label alignment. * Improve calendar name label text. * Improve variable declarations. * Fix missing semicolon. * Improve comparison operator. --- common/content/exchangeCloneSettings.js | 11 +++++------ common/content/exchangeCloneSettings.xul | 18 ++++++++++++++---- common/locale/cs_CZ/exchangeCloneSettings.dtd | 4 +--- common/locale/de/exchangeCloneSettings.dtd | 4 +--- common/locale/en/exchangeCloneSettings.dtd | 4 +--- common/locale/en_US/exchangeCloneSettings.dtd | 4 +--- common/locale/es_ES/exchangeCloneSettings.dtd | 4 +--- common/locale/fr_FR/exchangeCloneSettings.dtd | 4 +--- common/locale/gl/exchangeCloneSettings.dtd | 4 +--- common/locale/hu/exchangeCloneSettings.dtd | 4 +--- common/locale/it_IT/exchangeCloneSettings.dtd | 4 +--- common/locale/ja_JP/exchangeCloneSettings.dtd | 4 +--- common/locale/nl/exchangeCloneSettings.dtd | 4 +--- common/locale/pl/exchangeCloneSettings.dtd | 4 +--- common/locale/pt_BR/exchangeCloneSettings.dtd | 4 +--- common/locale/ro/exchangeCloneSettings.dtd | 4 +--- common/locale/ru/exchangeCloneSettings.dtd | 4 +--- common/locale/sk/exchangeCloneSettings.dtd | 4 +--- common/locale/sv/exchangeCloneSettings.dtd | 4 +--- common/locale/tr/exchangeCloneSettings.dtd | 4 +--- 20 files changed, 37 insertions(+), 64 deletions(-) diff --git a/common/content/exchangeCloneSettings.js b/common/content/exchangeCloneSettings.js index 6a5d0f0a..828be125 100644 --- a/common/content/exchangeCloneSettings.js +++ b/common/content/exchangeCloneSettings.js @@ -40,7 +40,7 @@ exchExchangeCloneSettings.prototype = { if (vbox) { let eList = vbox.getElementsByAttribute('required', 'true'); for (let i = 0; i < eList.length && canAdvance; ++i) { - canAdvance = (eList[i].value != ""); + canAdvance = (eList[i].value !== ""); } if (canAdvance) { @@ -60,16 +60,16 @@ exchExchangeCloneSettings.prototype = { }, onSave: function _onSave() { - var oldCalId = this._window.arguments[0].calendar.id; + let oldCalId = this._window.arguments[0].calendar.id; // Clone the Calendar settings to a new cal id. - var newCalId = this.globalFunctions.copyCalendarSettings(oldCalId); + let newCalId = this.globalFunctions.copyCalendarSettings(oldCalId); // Save settings in dialog to new cal id. tmpSettingsOverlay.exchWebServicesSaveExchangeSettingsByCalId(newCalId); // Save the description/name for the calendar and create a new unique uri. - var toCalPrefs = Cc["@mozilla.org/preferences-service;1"] + let toCalPrefs = Cc["@mozilla.org/preferences-service;1"] .getService(Ci.nsIPrefService) .getBranch("calendar.registry." + newCalId + "."); @@ -85,7 +85,6 @@ exchExchangeCloneSettings.prototype = { .getService(Ci.nsIPrefService).savePrefFile(null); return true; }, - -} +}; var tmpExchangeCloneSettings = new exchExchangeCloneSettings(document, window); diff --git a/common/content/exchangeCloneSettings.xul b/common/content/exchangeCloneSettings.xul index 665e05bb..d77a0504 100644 --- a/common/content/exchangeCloneSettings.xul +++ b/common/content/exchangeCloneSettings.xul @@ -39,10 +39,20 @@ onload="tmpExchangeCloneSettings.onLoad();">