| | |
| | | messagemenu:'messagemenu', |
| | | listmenu:'listmenu', |
| | | dragmessagemenu:'dragmessagemenu', |
| | | groupmenu:'groupoptionsmenu' |
| | | groupmenu:'groupoptionsmenu', |
| | | mailboxmenu:'mailboxoptionsmenu' |
| | | }; |
| | | |
| | | var obj; |
| | |
| | | { |
| | | if (typeof show == 'undefined') |
| | | show = obj.is(':visible') ? false : true; |
| | | |
| | | |
| | | var ref = rcube_find_object(refname); |
| | | if (show && ref) { |
| | | var pos = $(ref).offset(); |
| | |
| | | show_groupmenu: function(show) |
| | | { |
| | | this.show_popupmenu(this.groupmenu, 'groupactionslink', show, true); |
| | | }, |
| | | |
| | | show_mailboxmenu: function(show) |
| | | { |
| | | this.show_popupmenu(this.mailboxmenu, 'mboxactionslink', show, true); |
| | | }, |
| | | |
| | | show_searchmenu: function(show) |
| | |
| | | |
| | | var ref = rcube_find_object('listmenulink'); |
| | | if (show && ref) { |
| | | var pos = $(ref).offset(); |
| | | var pos = $(ref).offset(), |
| | | menuwidth = this.listmenu.width(), |
| | | pagewidth = $(document).width(); |
| | | |
| | | if (pagewidth - pos.left < menuwidth && pos.left > menuwidth) |
| | | pos.left = pos.left - menuwidth; |
| | | |
| | | this.listmenu.css({ left:pos.left, top:(pos.top + ref.offsetHeight + 2)}); |
| | | // set form values |
| | | $('input[name="sort_col"][value="'+rcmail.env.sort_col+'"]').attr('checked', 1); |
| | |
| | | this.dragmessagemenu.hide(); |
| | | else if (this.groupmenu && this.groupmenu.is(':visible') && target != rcube_find_object('groupactionslink')) |
| | | this.show_groupmenu(false); |
| | | else if (this.mailboxmenu && this.mailboxmenu.is(':visible') && target != rcube_find_object('mboxactionslink')) |
| | | this.show_mailboxmenu(false); |
| | | else if (this.listmenu && this.listmenu.is(':visible') && target != rcube_find_object('listmenulink')) { |
| | | var menu = rcube_find_object('listmenu'); |
| | | while (target.parentNode) { |
| | |
| | | this[k].hide(); |
| | | } |
| | | } |
| | | }, |
| | | |
| | | switch_preview_pane: function(elem) |
| | | { |
| | | var uid, prev_frm = $('#mailpreviewframe'); |
| | | |
| | | if (elem.checked) { |
| | | rcmail.env.contentframe = 'messagecontframe'; |
| | | if (mailviewsplit.layer) { |
| | | mailviewsplit.resize(); |
| | | mailviewsplit.layer.elm.style.display = ''; |
| | | } else |
| | | mailviewsplit.init(); |
| | | prev_frm.show(); |
| | | if (uid = rcmail.message_list.get_single_selection()) |
| | | rcmail.show_message(uid, false, true); |
| | | rcmail.http_post('save-pref', '_name=preview_pane&_value=1'); |
| | | } else { |
| | | prev_frm.hide(); |
| | | if (bw.ie6 || bw.ie7) { |
| | | var fr = document.getElementById('mailcontframe'); |
| | | fr.style.bottom = 0; |
| | | fr.style.height = parseInt(fr.parentNode.offsetHeight)+'px'; |
| | | } |
| | | else |
| | | $('#mailcontframe').css({height: 'auto', bottom: 0}); |
| | | if (mailviewsplit.layer) |
| | | mailviewsplit.layer.elm.style.display = 'none'; |
| | | rcmail.env.contentframe = null; |
| | | rcmail.show_contentframe(false); |
| | | rcmail.http_post('save-pref', '_name=preview_pane&_value=0'); |
| | | } |
| | | } |
| | | |
| | | }; |