From 10a3972313bc9d7643e8dfa216cdf6329f40695d Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 23 May 2014 10:38:57 +0200 Subject: CS fixes --- program/js/app.js | 66 +++++++++++++++++++++++++++---------------------------- 1 file changed, 32 insertions(+), 34 deletions(-) (limited to 'program') diff --git a/program/js/app.js b/program/js/app.js index 19116a55d..b85edae59 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -1132,7 +1132,7 @@ function rcube_webmail() this.gui_objects.messagepartframe.contentWindow.print(); } else if (uid = this.get_single_uid()) { - ref.printwin = this.open_window(this.env.comm_path+'&_action=print&_uid='+uid+'&_mbox='+urlencode(this.get_message_mailbox(uid))+(this.env.safemode ? '&_safe=1' : ''), true, true); + this.printwin = this.open_window(this.env.comm_path+'&_action=print&_uid='+uid+'&_mbox='+urlencode(this.get_message_mailbox(uid))+(this.env.safemode ? '&_safe=1' : ''), true, true); if (this.printwin) { if (this.env.action != 'show') this.mark_message('read', uid); @@ -1787,7 +1787,7 @@ function rcube_webmail() this.triggerEvent('openwindow', { url:url, handle:extwin }); // focus window, delayed to bring to front - window.setTimeout(function() { extwin && extwin.focus(); }, 10); + setTimeout(function() { extwin && extwin.focus(); }, 10); return extwin; }; @@ -3785,7 +3785,7 @@ function rcube_webmail() this.compose_field_hash = function(save) { // check input fields - var ed, i, val, str = '', hash_fields = ['to', 'cc', 'bcc', 'subject']; + var ed, i, id, val, str = '', hash_fields = ['to', 'cc', 'bcc', 'subject']; for (i=0; i' + att.html; + if (!att.complete && this.env.loadingicon) + att.html = '' + att.html; if (!att.complete && att.frame) att.html = '' @@ -4239,7 +4239,8 @@ function rcube_webmail() { if (value != '') { var r, lock = this.set_busy(true, 'searching'), - url = this.search_params(value); + url = this.search_params(value), + action = this.env.action == 'compose' && this.contact_list ? 'search-contacts' : 'search'; if (this.message_list) this.clear_message_list(); @@ -4254,7 +4255,6 @@ function rcube_webmail() // reset vars this.env.current_page = 1; - var action = this.env.action == 'compose' && this.contact_list ? 'search-contacts' : 'search'; r = this.http_request(action, url, lock); this.env.qsearch = {lock: lock, request: r}; @@ -4268,9 +4268,9 @@ function rcube_webmail() this.continue_search = function(request_id) { - var lock = ref.set_busy(true, 'stillsearching'); + var lock = this.set_busy(true, 'stillsearching'); - setTimeout(function(){ + setTimeout(function() { var url = ref.search_params(); url._continue = request_id; ref.env.qsearch = { lock: lock, request: ref.http_request('search', url, lock) }; @@ -4362,9 +4362,9 @@ function rcube_webmail() this.is_multifolder_listing = function() { - return typeof this.env.multifolder_listing != 'undefined' ? this.env.multifolder_listing : + return this.env.multifolder_listing !== undefined ? this.env.multifolder_listing : (this.env.search_request && (this.env.search_scope || 'base') != 'base'); - } + }; this.sent_successfully = function(type, msg, folders) { @@ -4455,7 +4455,7 @@ function rcube_webmail() this.ksearch_visible = function() { - return (this.ksearch_selected !== null && this.ksearch_selected !== undefined && this.ksearch_value); + return this.ksearch_selected !== null && this.ksearch_selected !== undefined && this.ksearch_value; }; this.ksearch_select = function(node) @@ -5255,21 +5255,21 @@ function rcube_webmail() //remove selected contacts from current active group this.group_remove_selected = function() { - ref.http_post('group-delmembers', {_cid: this.contact_list.selection, + this.http_post('group-delmembers', {_cid: this.contact_list.selection, _source: this.env.source, _gid: this.env.group}); }; //callback after deleting contact(s) from current group this.remove_group_contacts = function(props) { - if('undefined' != typeof this.env.group && (this.env.group === props.gid)){ + if (this.env.group !== undefined && (this.env.group === props.gid)) { var n, selection = this.contact_list.get_selection(); for (n=0; n