diff options
author | Aleksander Machniak <alec@alec.pl> | 2014-04-07 13:31:21 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2014-04-07 13:31:21 +0200 |
commit | e7a3ae9a765cef4b2a851ed49a718629e6e8d186 (patch) | |
tree | db3176726af7d2d5e1ce43509f0fd7b5bffb51db /skins/larry | |
parent | 8a73fdb67fb2bac197db365c327e63d9557ca54e (diff) | |
parent | c83535876c0a8903f1e77effef90d765eb96ab7f (diff) |
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'skins/larry')
-rw-r--r-- | skins/larry/mail.css | 12 | ||||
-rw-r--r-- | skins/larry/templates/mail.html | 13 | ||||
-rw-r--r-- | skins/larry/ui.js | 65 |
3 files changed, 58 insertions, 32 deletions
diff --git a/skins/larry/mail.css b/skins/larry/mail.css index 74ce43e29..34ce789d0 100644 --- a/skins/larry/mail.css +++ b/skins/larry/mail.css @@ -514,6 +514,18 @@ table.messagelist.fixedcopy { width: 155px; } +.messagelist tr td.folder { + width: 135px; +} + +.messagelist tr td.folder { + width: 135px; +} + +.messagelist tr td.hidden { + display: none; +} + .messagelist tr.message { /* background-color: #fff; */ } diff --git a/skins/larry/templates/mail.html b/skins/larry/templates/mail.html index b4e216a09..2f6fbe28c 100644 --- a/skins/larry/templates/mail.html +++ b/skins/larry/templates/mail.html @@ -76,13 +76,8 @@ <!-- list footer --> <div id="messagelistfooter"> <div id="listcontrols"> - <roundcube:if condition="env:threads" /> - <a href="#list" class="iconbutton listmode" id="maillistmode" title="<roundcube:label name='list' />">List</a> - <a href="#threads" class="iconbutton threadmode" id="mailthreadmode" title="<roundcube:label name='threads' />">Threads</a> - <roundcube:else /> - <a href="#list" class="iconbutton listmode selected" title="<roundcube:label name='list' />" onclick="return false">List</a> - <a href="#threads" class="iconbutton threadmode disabled" title="<roundcube:label name='threads' />" onclick="return false">Threads</a> - <roundcube:endif /> + <roundcube:button href="#list" command="set-listmode" prop="list" class="iconbutton listmode disabled" classAct="iconbutton listmode" id="maillistmode" title="list" content="List" /> + <roundcube:button href="#threads" command="set-listmode" prop="threads" class="iconbutton threadmode disabled" classAct="iconbutton threadmode" id="mailthreadmode" title="threads" content="Threads" /> </div> <div id="listselectors"> @@ -132,6 +127,10 @@ <li><label><input type="checkbox" name="s_mods[]" value="bcc" id="s_mod_bcc" onclick="UI.set_searchmod(this)" /> <span><roundcube:label name="bcc" /></span></label></li> <li><label><input type="checkbox" name="s_mods[]" value="body" id="s_mod_body" onclick="UI.set_searchmod(this)" /> <span><roundcube:label name="body" /></span></label></li> <li><label><input type="checkbox" name="s_mods[]" value="text" id="s_mod_text" onclick="UI.set_searchmod(this)" /> <span><roundcube:label name="msgtext" /></span></label></li> + <li class="separator" id=""><label><roundcube:label name="searchscope" /></label></li> + <li><label><input type="radio" name="s_scope" value="base" id="s_scope_base" onclick="UI.set_searchscope(this)" /> <span><roundcube:label name="currentfolder" /></span></label></li> + <li><label><input type="radio" name="s_scope" value="sub" id="s_scope_sub" onclick="UI.set_searchscope(this)" /> <span><roundcube:label name="subfolders" /></span></label></li> + <li><label><input type="radio" name="s_scope" value="all" id="s_scope_all" onclick="UI.set_searchscope(this)" /> <span><roundcube:label name="allfolders" /></span></label></li> </ul> </div> diff --git a/skins/larry/ui.js b/skins/larry/ui.js index 05bfa704e..b00231183 100644 --- a/skins/larry/ui.js +++ b/skins/larry/ui.js @@ -41,6 +41,7 @@ function rcube_mail_ui() this.show_popup = show_popup; this.add_popup = add_popup; this.set_searchmod = set_searchmod; + this.set_searchscope = set_searchscope; this.show_uploadform = show_uploadform; this.show_header_row = show_header_row; this.hide_header_row = hide_header_row; @@ -138,7 +139,8 @@ function rcube_mail_ui() if (rcmail.env.task == 'mail') { rcmail.addEventListener('menu-open', menu_open) .addEventListener('menu-save', menu_save) - .addEventListener('responseafterlist', function(e){ switch_view_mode(rcmail.env.threading ? 'thread' : 'list') }); + .addEventListener('responseafterlist', function(e){ switch_view_mode(rcmail.env.threading ? 'thread' : 'list', true) }) + .addEventListener('responseaftersearch', function(e){ switch_view_mode(rcmail.env.threading ? 'thread' : 'list', true) }); var dragmenu = $('#dragmessagemenu'); if (dragmenu.length) { @@ -729,13 +731,12 @@ function rcube_mail_ui() /** * */ - function switch_view_mode(mode) + function switch_view_mode(mode, force) { - if (rcmail.env.threading != (mode == 'thread')) - rcmail.set_list_options(null, undefined, undefined, mode == 'thread' ? 1 : 0); - - $('#maillistmode, #mailthreadmode').removeClass('selected'); - $('#mail'+mode+'mode').addClass('selected'); + if (force || !$('#mail'+mode+'mode').hasClass('disabled')) { + $('#maillistmode, #mailthreadmode').removeClass('selected'); + $('#mail'+mode+'mode').addClass('selected'); + } } @@ -761,11 +762,15 @@ function rcube_mail_ui() obj = popups['searchmenu'], list = $('input:checkbox[name="s_mods[]"]', obj), mbox = rcmail.env.mailbox, - mods = rcmail.env.search_mods; + mods = rcmail.env.search_mods, + scope = rcmail.env.search_scope || 'base'; if (rcmail.env.task == 'mail') { + if (scope == 'all') + mbox = '*'; mods = mods[mbox] ? mods[mbox] : mods['*']; all = 'text'; + $('input:radio[name="s_scope"]').prop('checked', false).filter('#s_scope_'+scope).prop('checked', true); } else { all = '*'; @@ -856,7 +861,7 @@ function rcube_mail_ui() // set checkboxes $('input[name="list_col[]"]').each(function() { - $(this).prop('checked', $.inArray(this.value, rcmail.env.coltypes) != -1); + $(this).prop('checked', $.inArray(this.value, rcmail.env.listcols) != -1); }); $dialog.dialog({ @@ -896,7 +901,11 @@ function rcube_mail_ui() { var all, m, task = rcmail.env.task, mods = rcmail.env.search_mods, - mbox = rcmail.env.mailbox; + mbox = rcmail.env.mailbox, + scope = $('input[name="s_scope"]:checked').val(); + + if (scope == 'all') + mbox = '*'; if (!mods) mods = {}; @@ -918,23 +927,29 @@ function rcube_mail_ui() m[elem.value] = 1; // mark all fields - if (elem.value != all) - return; + if (elem.value == all) { + $('input:checkbox[name="s_mods[]"]').map(function() { + if (this == elem) + return; + + this.checked = true; + if (elem.checked) { + this.disabled = true; + delete m[this.value]; + } + else { + this.disabled = false; + m[this.value] = 1; + } + }); + } - $('input:checkbox[name="s_mods[]"]').map(function() { - if (this == elem) - return; + rcmail.set_searchmods(m); + } - this.checked = true; - if (elem.checked) { - this.disabled = true; - delete m[this.value]; - } - else { - this.disabled = false; - m[this.value] = 1; - } - }); + function set_searchscope(elem) + { + rcmail.set_searchscope(elem.value); } function push_contactgroup(p) |