From 8b031a2ee2b5c82ff9ae138ae000633897b6d055 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 3 Mar 2014 13:10:27 +0000 Subject: [PATCH] fixed undeclared variables becomming global variables --- mail/js/app.js | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/mail/js/app.js b/mail/js/app.js index 20ad8bfd74..131eb2dade 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -145,7 +145,7 @@ app.classes.mail = AppJS.extend( var body = this.et2.getWidgetById('mailDisplayBodySrc'); body.node.parentNode.style.top=subject.node.offsetTop+40+'px'; var app_registry = egw.link_get_registry('mail'); - w=870; + var w=870; if (typeof app_registry['view'] != 'undefined' && typeof app_registry['view_popup'] != 'undefined' ) { var w_h =app_registry['view_popup'].split('x'); @@ -445,7 +445,7 @@ app.classes.mail = AppJS.extend( { cbAllMessages = cbAllVisibleMessages = Check = false; } - if (typeof prefAskForMultipleForward == 'undefined') prefAskForMultipleForward = egw.preference('prefaskformultipleforward','mail'); + if (typeof this.prefAskForMultipleForward == 'undefined') this.prefAskForMultipleForward = egw.preference('prefaskformultipleforward','mail'); if (cbAllMessages == true || cbAllVisibleMessages == true) { Check = confirm(this.egw.lang('multiple forward of all mesages')); @@ -469,9 +469,9 @@ app.classes.mail = AppJS.extend( //sMessageList.concat(','); } } - if (prefAskForMultipleForward == 1 && Check == true && alreadyAsked == false && sMessageList.length >0 && _messageList['msg'].length>1) + if (this.prefAskForMultipleForward == 1 && Check == true && alreadyAsked == false && sMessageList.length >0 && _messageList['msg'].length>1) { - askme = this.egw.lang('multipleforward'); + var askme = this.egw.lang('multipleforward'); //if (cbAllMessages == true || cbAllVisibleMessages == true) askme = egw_appWindow('felamimail').lang_confirm_all_messages; // not supported Check = confirm(askme); } @@ -1059,7 +1059,7 @@ app.classes.mail = AppJS.extend( */ mail_reduceCounterWithoutServerRoundtrip: function() { - ftree = this.et2.getWidgetById(this.nm_index+'[foldertree]'); + var ftree = this.et2.getWidgetById(this.nm_index+'[foldertree]'); var _foldernode = ftree.getSelectedNode(); var counter = _foldernode.label.match(this._unseen_regexp); var icounter = 0; @@ -1083,7 +1083,7 @@ app.classes.mail = AppJS.extend( */ mail_splitRowId: function(_rowID) { - res = _rowID.split('::'); + var res = _rowID.split('::'); // as a rowID is perceeded by app::, should be mail! if (res.length==4 && parseInt(res[0])!=NaN ) { @@ -1155,8 +1155,7 @@ app.classes.mail = AppJS.extend( { var reason = responseObject['response']; var messageList = responseObject['messageList']; - Check = confirm(reason); - if (Check==true) + if (confirm(reason)) { this.mail_deleteMessages(messageList,'remove_immediately'); } @@ -1342,7 +1341,7 @@ app.classes.mail = AppJS.extend( if ( _action.id=='unlabel') // this means all labels should be removed { var labels = ['labelone','labeltwo','labelthree','labelfour','labelfive']; - for (i=0; i-1) mailid = mailida[i]; } @@ -1865,7 +1864,7 @@ app.classes.mail = AppJS.extend( url += '&mode=select-dir'; url += '&method=mail.mail_ui.vfsSaveAttachment'; url += '&label='+egw.lang('Save all'); - for (i=0;i