diff options
author | thomascube <thomas@roundcube.net> | 2009-04-19 17:44:29 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2009-04-19 17:44:29 +0000 |
commit | cc97ea0559af1a92a54dbcdf738ee4d95e67d3ff (patch) | |
tree | f9e18128e5a90abb06f079b09f8cd9ed92044faf /skins/default/functions.js | |
parent | fb253ee9a89e2da779d11058f1f0c63c314b2840 (diff) |
Merged branch devel-api (from r2208 to r2387) back into trunk (omitting some sample plugins)
Diffstat (limited to 'skins/default/functions.js')
-rw-r--r-- | skins/default/functions.js | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/skins/default/functions.js b/skins/default/functions.js index 9e71f6f9a..fd6e612ee 100644 --- a/skins/default/functions.js +++ b/skins/default/functions.js @@ -8,24 +8,16 @@ function rcube_init_settings_tabs() { + var tab = '#settingstabdefault'; if (window.rcmail && rcmail.env.action) - { - var action = rcmail.env.action=='preferences' ? 'default' : (rcmail.env.action.indexOf('identity')>0 ? 'identities' : rcmail.env.action); - var tab = document.getElementById('settingstab'+action); - } - else - var tab = document.getElementById('settingstabdefault'); - - if (tab) - tab.className = 'tablink-selected'; + tab = '#settingstab' + (rcmail.env.action=='preferences' ? 'default' : (rcmail.env.action.indexOf('identity')>0 ? 'identities' : rcmail.env.action.replace(/\./g, ''))); + + $(tab).addClass('tablink-selected'); } function rcube_show_advanced(visible) { - var rows = document.getElementsByTagName('TR'); - for(var i=0; i<rows.length; i++) - if(rows[i].className && rows[i].className.match(/advanced/)) - rows[i].style.display = visible ? (bw.ie ? 'block' : 'table-row') : 'none'; + $('tr.advanced').css('display', (visible ? (bw.ie ? 'block' : 'table-row') : 'none')); } /** @@ -128,7 +120,7 @@ function rcmail_init_compose_form() function rcube_mail_ui() { - this.markmenu = new rcube_layer('markmessagemenu'); + this.markmenu = $('#markmessagemenu'); } rcube_mail_ui.prototype = { @@ -136,24 +128,24 @@ rcube_mail_ui.prototype = { show_markmenu: function(show) { if (typeof show == 'undefined') - show = this.markmenu.visible ? false : true; + show = this.markmenu.is(':visible') ? false : true; var ref = rcube_find_object('markreadbutton'); if (show && ref) - this.markmenu.move(ref.offsetLeft, ref.offsetTop + ref.offsetHeight); + this.markmenu.css({ left:ref.offsetLeft, top:(ref.offsetTop + ref.offsetHeight) }); - this.markmenu.show(show); + this.markmenu[show?'show':'hide'](); }, body_mouseup: function(evt, p) { - if (this.markmenu && this.markmenu.visible && rcube_event.get_target(evt) != rcube_find_object('markreadbutton')) + if (this.markmenu && this.markmenu.is(':visible') && rcube_event.get_target(evt) != rcube_find_object('markreadbutton')) this.show_markmenu(false); }, body_keypress: function(evt, p) { - if (rcube_event.get_keycode(evt) == 27 && this.markmenu && this.markmenu.visible) + if (rcube_event.get_keycode(evt) == 27 && this.markmenu && this.markmenu.is(':visible')) this.show_markmenu(false); } |