summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2012-01-24 07:54:40 +0000
committerthomascube <thomas@roundcube.net>2012-01-24 07:54:40 +0000
commit5ff7ba44ecb57fc3af6ded2094eb128a724f9cb4 (patch)
tree93b9f0850306e2e79f8f6ec6ab7893730bc71373
parente65c36d172a737d5a69e10cdec4aeb87c2d2e12e (diff)
Fix address book searchmods; a little code cleanup
-rw-r--r--skins/larry/styles.css2
-rw-r--r--skins/larry/templates/addressbook.html10
-rw-r--r--skins/larry/ui.js29
3 files changed, 23 insertions, 18 deletions
diff --git a/skins/larry/styles.css b/skins/larry/styles.css
index 2c22cfed0..94ad1fb64 100644
--- a/skins/larry/styles.css
+++ b/skins/larry/styles.css
@@ -377,7 +377,7 @@ a.iconlink.add {
}
a.iconlink.remove {
- background-position: -7px -377px;
+ background-position: -7px -378px;
}
a.iconlink.cancel {
diff --git a/skins/larry/templates/addressbook.html b/skins/larry/templates/addressbook.html
index ffba90251..94d326a9d 100644
--- a/skins/larry/templates/addressbook.html
+++ b/skins/larry/templates/addressbook.html
@@ -75,11 +75,11 @@
<div id="searchmenu" class="popupmenu">
<ul class="toolbarmenu">
- <li><label><input type="checkbox" name="s_mods[]" value="name" onclick="UI.set_searchmod(this)" /> <roundcube:label name="name" /></label></li>
- <li><label><input type="checkbox" name="s_mods[]" value="firstname" onclick="UI.set_searchmod(this)" /> <roundcube:label name="firstname" /></label></li>
- <li><label><input type="checkbox" name="s_mods[]" value="surname" onclick="UI.set_searchmod(this)" /> <roundcube:label name="surname" /></label></li>
- <li><label><input type="checkbox" name="s_mods[]" value="email" onclick="UI.set_searchmod(this)" /> <roundcube:label name="email" /></label></li>
- <li><label><input type="checkbox" name="s_mods[]" value="*" onclick="UI.set_searchmod(this)" /> <roundcube:label name="allfields" /></label></li>
+ <li><label><input type="checkbox" name="s_mods[]" value="name" id="s_mod_name" onclick="UI.set_searchmod(this)" /> <roundcube:label name="name" /></label></li>
+ <li><label><input type="checkbox" name="s_mods[]" value="firstname" id="s_mod_firstname" onclick="UI.set_searchmod(this)" /> <roundcube:label name="firstname" /></label></li>
+ <li><label><input type="checkbox" name="s_mods[]" value="surname" id="s_mod_surname" onclick="UI.set_searchmod(this)" /> <roundcube:label name="surname" /></label></li>
+ <li><label><input type="checkbox" name="s_mods[]" value="email" id="s_mod_email" onclick="UI.set_searchmod(this)" /> <roundcube:label name="email" /></label></li>
+ <li><label><input type="checkbox" name="s_mods[]" value="*" id="s_mod_all" onclick="UI.set_searchmod(this)" /> <roundcube:label name="allfields" /></label></li>
</ul>
</div>
diff --git a/skins/larry/ui.js b/skins/larry/ui.js
index d07ee6c59..d69e7faf9 100644
--- a/skins/larry/ui.js
+++ b/skins/larry/ui.js
@@ -54,12 +54,14 @@ function rcube_mail_ui()
}
/**
- *
+ * Initialize UI
+ * Called on document.ready
*/
function init()
{
rcmail.addEventListener('message', message_displayed);
-
+
+ /*** mail task ***/
if (rcmail.env.task == 'mail') {
rcmail.addEventListener('menu-open', show_listoptions);
rcmail.addEventListener('menu-save', save_listoptions);
@@ -71,11 +73,6 @@ function rcube_mail_ui()
popups.dragmessagemenu = dragmenu;
}
- var previewframe = $('#mailpreviewframe').is(':visible');
- $('#mailpreviewtoggle').addClass(previewframe ? 'enabled' : 'closed').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 });
-
if (rcmail.env.action == 'show' || rcmail.env.action == 'preview') {
layout_messageview();
$("#all-headers").resizable({ handles: 's', minHeight: 50 });
@@ -105,12 +102,17 @@ function rcube_mail_ui()
orientation:'v', relative:true, start:248, min:170, size:12, render:layout_composeview }).init();
}
else if (rcmail.env.action == 'list' || !rcmail.env.action) {
- mailviewsplit = new rcube_splitter({ id:'mailviewsplitter', p1:'#mailview-top', p2:'#mailview-bottom',
- orientation:'h', relative:true, start:310, min:150, size:0, offset:-22 });
- if (previewframe)
- mailviewsplit.init();
+ var previewframe = $('#mailpreviewframe').is(':visible');
+ $('#mailpreviewtoggle').addClass(previewframe ? 'enabled' : 'closed').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 });
+
+ mailviewsplit = new rcube_splitter({ id:'mailviewsplitter', p1:'#mailview-top', p2:'#mailview-bottom',
+ orientation:'h', relative:true, start:310, min:150, size:0, offset:-22 });
+ if (previewframe)
+ mailviewsplit.init();
- rcmail.addEventListener('setquota', update_quota);
+ rcmail.addEventListener('setquota', update_quota);
}
if ($('#mailview-left').length) {
@@ -118,6 +120,7 @@ function rcube_mail_ui()
orientation:'v', relative:true, start:248, min:150, size:12, callback:render_mailboxlist, render:resize_leftcol }).init();
}
}
+ /*** settings task ***/
else if (rcmail.env.task == 'settings') {
rcmail.addEventListener('init', function(){
var tab = '#settingstabpreferences';
@@ -137,6 +140,7 @@ function rcube_mail_ui()
orientation:'v', relative:true, start:305, min:150, size:12 }).init();
}
}
+ /*** addressbook task ***/
else if (rcmail.env.task == 'addressbook') {
rcmail.addEventListener('afterupload-photo', show_uploadform);
@@ -147,6 +151,7 @@ function rcube_mail_ui()
orientation:'v', relative:true, start:296, min:220, size:12 }).init();
}
}
+ /*** login page ***/
else if (rcmail.env.task == 'login') {
if (bw.ie && bw.vendver < 9) {
var popup = $('<div>')