Bug 1670459 - Fix a parameter problem when calling onCheckItem(). r=mkmelin DONTBUILD

This commit is contained in:
Alfred Peters 2020-10-13 13:13:50 +03:00
Родитель d321a035e8
Коммит ce717ab0e7
2 изменённых файлов: 7 добавлений и 8 удалений

Просмотреть файл

@ -98,7 +98,7 @@
<checkbox wsm_persist="true" id="offline.notDownload" hidefor="imap"
label="&offlineNotDownload.label;"
accesskey="&offlineNotDownload.accesskey;"
oncommand="onCheckItem('offline.notDownloadMin', 'offline.notDownload');"/>
oncommand="onCheckItem('offline.notDownloadMin', [this.id]);"/>
<checkbox wsm_persist="true" id="autosyncNotDownload" hidefor="pop3,nntp,movemail"
label="&autosyncNotDownload.label;"
accesskey="&autosyncNotDownload.accesskey;"
@ -115,7 +115,7 @@
<checkbox wsm_persist="true" id="nntp.downloadMsg"
label="&nntpDownloadMsg.label;"
accesskey="&nntpDownloadMsg.accesskey;"
oncommand="onCheckItem('nntp.downloadMsgMin', 'nntp.downloadMsg');"/>
oncommand="onCheckItem('nntp.downloadMsgMin', [this.id]);"/>
<html:input id="nntp.downloadMsgMin" type="number"
class="size2 input-inline" min="1" value="30"
wsm_persist="true"
@ -161,7 +161,7 @@
</hbox>
<hbox align="center" class="indent" hidefor="movemail,pop3,imap,none,rss">
<checkbox id="nntp.removeBody" accesskey="&nntpRemoveMsgBody.accesskey;"
label="&nntpRemoveMsgBody.label;" oncommand="onCheckItem('nntp.removeBodyMin', 'nntp.removeBody');"/>
label="&nntpRemoveMsgBody.label;" oncommand="onCheckItem('nntp.removeBodyMin', [this.id]);"/>
<html:input id="nntp.removeBodyMin" type="number"
class="size2 input-inline" min="1" value="30"
aria-labelledby="nntp.removeBody nntp.removeBodyMin daysOldMsg"/>

Просмотреть файл

@ -82,12 +82,11 @@ function getAccountValueIsLocked(aElement) {
* Enables/disables element (slave) according to the checked state
* of another elements (masters).
*
* @param aChangeElementId Slave element which should be enabled
* if all the checkElementIDs are checked.
* Otherwise it gets disabled.
* @param aCheckElementIds An array of IDs of the master elements.
* @param {string} aChangeElementId - Slave element which should be enabled
* if all the checkElementIDs are checked. Otherwise it gets disabled.
* @param {string[]} aCheckElementIds - An array of IDs of the master elements.
*
* See bug 728681 for the pattern on how this is used.
* @see bug 728681 for the pattern on how this is used.
*/
function onCheckItem(aChangeElementId, aCheckElementIds) {
let elementToControl = document.getElementById(aChangeElementId);