From e70d6ea64e711096af36b1234f8545b870ea5f45 Mon Sep 17 00:00:00 2001 From: thomascube Date: Sat, 5 Apr 2008 12:49:21 +0000 Subject: Apply changes from trunk to 0.1-stable --- program/js/app.js | 107 ++++++++------------- program/js/list.js | 7 +- .../themes/advanced/css/editor_content.css | 58 +++++++++++ 3 files changed, 106 insertions(+), 66 deletions(-) create mode 100644 program/js/tiny_mce/themes/advanced/css/editor_content.css (limited to 'program/js') diff --git a/program/js/app.js b/program/js/app.js index 73c03c860..4359e5985 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -132,7 +132,7 @@ function rcube_webmail() this.message_list.addEventListener('dblclick', function(o){ p.msglist_dbl_click(o); }); this.message_list.addEventListener('keypress', function(o){ p.msglist_keypress(o); }); this.message_list.addEventListener('select', function(o){ p.msglist_select(o); }); - this.message_list.addEventListener('dragstart', function(o){ p.drag_active = true; }); + this.message_list.addEventListener('dragstart', function(o){ p.drag_active = true; if (p.preview_timer) clearTimeout(p.preview_timer); }); this.message_list.addEventListener('dragend', function(o){ p.drag_active = false; }); this.message_list.init(); @@ -202,7 +202,7 @@ function rcube_webmail() } if (this.env.messagecount) - this.enable_command('select-all', 'select-none', 'sort', 'expunge', true); + this.enable_command('select-all', 'select-none', 'expunge', true); if (this.env.messagecount && (this.env.mailbox==this.env.trash_mailbox || this.env.mailbox==this.env.junk_mailbox)) this.enable_command('purge', true); @@ -314,7 +314,7 @@ function rcube_webmail() var input_user = rcube_find_object('rcmloginuser'); var input_pass = rcube_find_object('rcmloginpwd'); if (input_user) - input_user.onkeypress = function(e){ return rcmail.login_user_keypress(e); }; + input_user.onkeyup = function(e){ return rcmail.login_user_keyup(e); }; if (input_user && input_user.value=='') input_user.focus(); else if (input_pass) @@ -712,7 +712,7 @@ function rcube_webmail() break; case 'load-attachment': - var qstring = '_mbox='+this.env.mailbox+'&_uid='+this.env.uid+'&_part='+props.part; + var qstring = '_mbox='+urlencode(this.env.mailbox)+'&_uid='+this.env.uid+'&_part='+props.part; // open attachment in frame if it's of a supported mimetype if (this.env.uid && props.mimetype && find_in_array(props.mimetype, this.mimetypes)>=0) @@ -892,7 +892,7 @@ function rcube_webmail() { setTimeout(function(){ ref.printwin.focus(); }, 20); if (this.env.action != 'show') - this.toggle_read_status('read', [uid]); + this.mark_message('read', uid); } } break; @@ -1138,7 +1138,7 @@ function rcube_webmail() } // start timer for message preview (wait for double click) - if (selected && this.env.contentframe) + if (selected && this.env.contentframe && !list.multi_selecting) this.preview_timer = setTimeout(function(){ ref.msglist_get_preview(); }, this.dblclick_time + 10); else if (this.env.contentframe) this.show_contentframe(false); @@ -1486,6 +1486,7 @@ function rcube_webmail() this.mark_message = function(flag, uid) { var a_uids = new Array(); + var r_uids = new Array(); var selection = this.message_list ? this.message_list.get_selection() : new Array(); if (uid) @@ -1496,26 +1497,35 @@ function rcube_webmail() { for (var id, n=0; n 0)); case 'expunge': this.enable_command('select-all', 'select-none', 'expunge', this.env.messagecount ? true : false); break; + } request_obj.reset(); diff --git a/program/js/list.js b/program/js/list.js index e42d3f6b7..2b3c7a8f6 100644 --- a/program/js/list.js +++ b/program/js/list.js @@ -35,6 +35,7 @@ function rcube_list_widget(list, p) this.subject_col = -1; this.shiftkey = false; this.multiselect = false; + this.multi_selecting = false; this.draggable = false; this.keyboard = false; this.toggleselect = false; @@ -319,6 +320,7 @@ select_row: function(id, mod_key, with_mouse) { this.shift_start = id; this.highlight_row(id, false); + this.multi_selecting = false; } else { @@ -341,6 +343,7 @@ select_row: function(id, mod_key, with_mouse) this.highlight_row(id, false); break; } + this.multi_selecting = true; } // trigger event if selection changed @@ -456,6 +459,8 @@ select_all: function(filter) if (this.selection.join(',') != select_before) this.trigger_event('select'); + this.focus(); + return true; }, @@ -508,7 +513,7 @@ highlight_row: function(id, multiple) { if (this.rows[id] && !multiple) { - if (!this.in_selection(id)) + if (this.selection.length > 1 || !this.in_selection(id)) { this.clear_selection(); this.selection[0] = id; diff --git a/program/js/tiny_mce/themes/advanced/css/editor_content.css b/program/js/tiny_mce/themes/advanced/css/editor_content.css new file mode 100644 index 000000000..182e79121 --- /dev/null +++ b/program/js/tiny_mce/themes/advanced/css/editor_content.css @@ -0,0 +1,58 @@ +/* This file contains the CSS data for the editable area(iframe) of TinyMCE */ +/* You can extend this CSS by adding your own CSS file with the the content_css option */ + +body, td, pre { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; +} + +body { + background-color: #FFFFFF; +} + +.mceVisualAid { + border: 1px dashed #BBBBBB !important; +} + +div.mceVisualAid { + background-image:url('../images/spacer.gif'); + visibility: visible !important; +} + +.mceItemAnchor { + width: 12px; + line-height: 6px; + overflow: hidden; + padding-left: 12px; + background-image: url('../images/anchor_symbol.gif'); + background-position: bottom; + background-repeat: no-repeat; +} + +/* Important is needed in Gecko browsers inorder to style links */ +/* +a { + color: green !important; +} +*/ + +/* Style selection range colors in Gecko browsers */ +/* +::-moz-selection { + background-color: red; + color: green; +} +*/ + +/* MSIE specific */ + +* html body { + scrollbar-3dlight-color: #F0F0EE; + scrollbar-arrow-color: #676662; + scrollbar-base-color: #F0F0EE; + scrollbar-darkshadow-color: #DDDDDD; + scrollbar-face-color: #E0E0DD; + scrollbar-highlight-color: #F0F0EE; + scrollbar-shadow-color: #F0F0EE; + scrollbar-track-color: #F5F5F5; +} -- cgit v1.2.3