X-Git-Url: https://git.donarmstrong.com/?p=roundcube.git;a=blobdiff_plain;f=program%2Fjs%2Fapp.js.src;h=472dc6e8b5b62c065abe1b79803b0877271ac076;hp=45dac5e6504f417e462e2a3580f2d86375eaf59d;hb=07e1de2dcd3f3ff8910a3680493f035b3c693cf0;hpb=7f5f46ce0922d9fdeb02e45c759aaacbd0ea5f9a diff --git a/program/js/app.js.src b/program/js/app.js.src index 45dac5e..472dc6e 100644 --- a/program/js/app.js.src +++ b/program/js/app.js.src @@ -14,7 +14,7 @@ | Requires: jquery.js, common.js, list.js | +-----------------------------------------------------------------------+ - $Id: app.js 4469 2011-01-29 14:55:12Z thomasb $ + $Id: app.js 4666 2011-04-17 09:34:02Z alec $ */ @@ -2994,11 +2994,11 @@ function rcube_webmail() this.compose_field_hash = function(save) { // check input fields - var value_to = $("[name='_to']").val(); - var value_cc = $("[name='_cc']").val(); - var value_bcc = $("[name='_bcc']").val(); - var value_subject = $("[name='_subject']").val(); - var str = ''; + var ed, str = '', + value_to = $("[name='_to']").val(), + value_cc = $("[name='_cc']").val(), + value_bcc = $("[name='_bcc']").val(), + value_subject = $("[name='_subject']").val(); if (value_to) str += value_to+':'; @@ -3009,9 +3009,8 @@ function rcube_webmail() if (value_subject) str += value_subject+':'; - var editor = tinyMCE.get(this.env.composebody); - if (editor) - str += editor.getContent(); + if (window.tinyMCE && (ed = tinyMCE.get(this.env.composebody))) + str += ed.getContent(); else str += $("[name='_message']").val(); @@ -4622,7 +4621,7 @@ function rcube_webmail() var current_li, target_li; if ((current_li = this.get_folder_li(old, prefix))) { - $(current_li).removeClass('selected').removeClass('unfocused'); + $(current_li).removeClass('selected').addClass('unfocused'); } if ((target_li = this.get_folder_li(name, prefix))) { $(target_li).removeClass('unfocused').addClass('selected'); @@ -4651,17 +4650,18 @@ function rcube_webmail() // and for setting some message list global variables this.set_message_coltypes = function(coltypes, repl) { - this.env.coltypes = coltypes; + var list = this.message_list, + thead = list ? list.list.tHead : null, + cell, col, n, len, th, tr; - // set correct list titles - var thead = this.gui_objects.messagelist ? this.gui_objects.messagelist.tHead : null, - cell, col, n, len; + this.env.coltypes = coltypes; // replace old column headers if (thead) { if (repl) { - var th = document.createElement('thead'), - tr = document.createElement('tr'); + th = document.createElement('thead'); + tr = document.createElement('tr'); + for (c=0, len=repl.length; c < len; c++) { cell = document.createElement('td'); cell.innerHTML = repl[c].html; @@ -4695,15 +4695,16 @@ function rcube_webmail() if ((n = $.inArray('subject', this.env.coltypes)) >= 0) { this.set_env('subject_col', n); - if (this.message_list) - this.message_list.subject_col = n; + if (list) + list.subject_col = n; } if ((n = $.inArray('flag', this.env.coltypes)) >= 0) this.set_env('flagged_col', n); if ((n = $.inArray('status', this.env.coltypes)) >= 0) this.set_env('status_col', n); - this.message_list.init_header(); + if (list) + list.init_header(); }; // replace content of row count display