| | |
| | | } |
| | | |
| | | $('#composeoptionstoggle').click(function(e){ |
| | | $('#composeoptionstoggle').toggleClass('remove'); |
| | | $('#composeoptions').toggle(); |
| | | var expanded = $('#composeoptions').toggle().is(':visible'); |
| | | $('#composeoptionstoggle').toggleClass('remove').attr('aria-expanded', expanded ? 'true' : 'false'); |
| | | layout_composeview(); |
| | | save_pref('composeoptions', $('#composeoptions').is(':visible') ? '1' : '0'); |
| | | save_pref('composeoptions', expanded ? '1' : '0'); |
| | | if (!rcube_event.is_keyboard(e)) |
| | | this.blur(); |
| | | return false; |
| | |
| | | } |
| | | else if (rcmail.env.action == 'list' || !rcmail.env.action) { |
| | | var previewframe = $('#mailpreviewframe').is(':visible'); |
| | | $('#mailpreviewtoggle').addClass(previewframe ? 'enabled' : 'closed').click(function(e){ toggle_preview_pane(e); return false }); |
| | | $('#mailpreviewtoggle').addClass(previewframe ? 'enabled' : 'closed').attr('aria-expanded', previewframe ? 'true' : 'false').click(function(e){ toggle_preview_pane(e); return false }); |
| | | $('#maillistmode').addClass(rcmail.env.threading ? '' : 'selected').click(function(e){ switch_view_mode('list'); return false }); |
| | | $('#mailthreadmode').addClass(rcmail.env.threading ? 'selected' : '').click(function(e){ switch_view_mode('thread'); return false }); |
| | | |
| | |
| | | orientation:'v', relative:true, start:266, min:180, size:12 }).init(); |
| | | } |
| | | else if (rcmail.env.action == 'edit-prefs') { |
| | | $('<a href="#toggle">▼</a>') |
| | | $('<a href="#toggle"></a>') |
| | | .text(env.toggleoptions) |
| | | .attr('title', env.toggleoptions) |
| | | .addClass('advanced-toggle') |
| | | .appendTo('#preferences-details fieldset.advanced legend'); |
| | | |
| | |
| | | w, h, bh, ovflw, btns = 0, |
| | | minheight = 300, |
| | | |
| | | bh = (form.height() - bottom.position().top); |
| | | bh = form.height() - bottom.position().top; |
| | | ovflw = minheight - bh; |
| | | btns = ovflw > -100 ? 0 : 40; |
| | | bottom.css('height', Math.max(minheight, bh) + 'px'); |
| | | bottom.height(Math.max(minheight, bh)); |
| | | form.css('overflow', ovflw > 0 ? 'auto' : 'hidden'); |
| | | |
| | | w = body.parent().width() - 5; |
| | | h = body.parent().height() - 16; |
| | | h = body.parent().height() - 8; |
| | | body.width(w).height(h); |
| | | |
| | | $('#composebody_tbl').width((w+8)+'px').height('').css('margin-top', '1px'); |
| | | $('#composebody_ifr').width((w+8)+'px').height((h-40)+'px'); |
| | | $('#googie_edit_layer').height(h+'px'); |
| | | $('#composebodycontainer > div').width(w+8); |
| | | $('#composebody_ifr').height(h + 4 - $('div.mce-toolbar').height()); |
| | | $('#googie_edit_layer').height(h - 8); |
| | | // $('#composebodycontainer')[(btns ? 'addClass' : 'removeClass')]('buttons'); |
| | | // $('#composeformbuttons')[(btns ? 'show' : 'hide')](); |
| | | |
| | |
| | | topstyles, bottomstyles, uid; |
| | | |
| | | frame.toggle(); |
| | | button.removeClass().addClass(visible ? 'enabled' : 'closed'); |
| | | button.removeClass().toggleClass('enabled closed').attr('aria-expanded', visible ? 'true' : 'false'); |
| | | |
| | | if (visible) { |
| | | $('#mailview-top').removeClass('fullheight').css({ bottom:'auto' }); |
| | |
| | | |
| | | // add toggle button to full headers table |
| | | if (full.is(':visible')) |
| | | button.attr('href', '#hide').removeClass('add').addClass('remove') |
| | | button.attr('href', '#hide').removeClass('add').addClass('remove').attr('aria-expanded', 'true'); |
| | | else |
| | | button.attr('href', '#details').removeClass('remove').addClass('add') |
| | | button.attr('href', '#details').removeClass('remove').addClass('add').attr('aria-expanded', 'false'); |
| | | |
| | | save_pref('previewheaders', full.is(':visible') ? '1' : '0'); |
| | | } |
| | |
| | | content.attr('id', id); |
| | | } |
| | | |
| | | // first hide not selected tabs |
| | | current = current || 0; |
| | | fs.each(function(idx) { if (idx != current) $(this).hide(); }); |
| | | |
| | | // create tabs container |
| | | var tabs = $('<div>').addClass('tabsbar').prependTo(content); |
| | | var tabs = $('<ul>').addClass('tabsbar').prependTo(content); |
| | | |
| | | // convert fildsets into tabs |
| | | fs.each(function(idx) { |
| | | var tab, a, elm = $(this), legend = elm.children('legend'); |
| | | var tab, a, elm = $(this), |
| | | legend = elm.children('legend'), |
| | | tid = id + '-t' + idx; |
| | | |
| | | // create a tab |
| | | a = $('<a>').text(legend.text()).attr('href', '#'); |
| | | tab = $('<span>').attr({'id': 'tab'+idx, 'class': 'tablink'}) |
| | | .click(function() { show_tab(id, idx); return false }) |
| | | a = $('<a>').text(legend.text()).attr('href', '#' + tid); |
| | | tab = $('<li>').addClass('tablink'); |
| | | |
| | | // remove legend |
| | | legend.remove(); |
| | | // style fieldset |
| | | elm.addClass('tab'); |
| | | // style selected tab |
| | | if (idx == current) |
| | | tab.addClass('selected'); |
| | | |
| | | // link fieldset with tab item |
| | | elm.attr('id', tid); |
| | | |
| | | // add the tab to container |
| | | tab.append(a).appendTo(tabs); |
| | | }); |
| | | } |
| | | |
| | | function show_tab(id, index) |
| | | { |
| | | var fs = $('#'+id).children('fieldset'); |
| | | |
| | | fs.each(function(idx) { |
| | | // Show/hide fieldset (tab content) |
| | | $(this)[index==idx ? 'show' : 'hide'](); |
| | | // Select/unselect tab |
| | | $('#tab'+idx).toggleClass('selected', idx==index); |
| | | // use jquery UI tabs widget to do the interaction and styling |
| | | content.tabs({ |
| | | active: current || 0, |
| | | heightStyle: 'content', |
| | | activate: function(e, ui) {resize(); } |
| | | }); |
| | | |
| | | resize(); |
| | | } |
| | | |
| | | /** |
| | |
| | | this.handle = $('<div>') |
| | | .attr('id', this.id) |
| | | .attr('unselectable', 'on') |
| | | .attr('role', 'presentation') |
| | | .addClass('splitter ' + (this.horizontal ? 'splitter-h' : 'splitter-v')) |
| | | .appendTo(this.parent) |
| | | .bind('mousedown', onDragStart); |
| | |
| | | return rcube_splitter._instances[id]; |
| | | }; |
| | | |
| | | // @license-end |
| | | // @license-end |