summaryrefslogtreecommitdiff
path: root/skins/default
diff options
context:
space:
mode:
Diffstat (limited to 'skins/default')
-rw-r--r--skins/default/common.css9
-rw-r--r--skins/default/functions.js50
-rw-r--r--skins/default/images/icons/glass.gifbin0 -> 909 bytes
-rw-r--r--skins/default/images/searchfield.gifbin484 -> 397 bytes
-rw-r--r--skins/default/mail.css13
-rw-r--r--skins/default/templates/addressbook.html4
-rw-r--r--skins/default/templates/mail.html15
7 files changed, 85 insertions, 6 deletions
diff --git a/skins/default/common.css b/skins/default/common.css
index a01985413..b445cd2c9 100644
--- a/skins/default/common.css
+++ b/skins/default/common.css
@@ -347,7 +347,7 @@ table.records-table tr.unfocused td
background: url('images/searchfield.gif') top left no-repeat;
}
-#quicksearchbar a
+#searchreset
{
position: absolute;
top: 3px;
@@ -355,6 +355,13 @@ table.records-table tr.unfocused td
text-decoration: none;
}
+#searchmod
+{
+ position: absolute;
+ top: 3px;
+ right: 162px;
+}
+
#quicksearchbar img
{
vertical-align: middle;
diff --git a/skins/default/functions.js b/skins/default/functions.js
index fd6e612ee..31c464792 100644
--- a/skins/default/functions.js
+++ b/skins/default/functions.js
@@ -121,6 +121,7 @@ function rcmail_init_compose_form()
function rcube_mail_ui()
{
this.markmenu = $('#markmessagemenu');
+ this.searchmenu = $('#searchmenu');
}
rcube_mail_ui.prototype = {
@@ -137,16 +138,61 @@ show_markmenu: function(show)
this.markmenu[show?'show':'hide']();
},
+show_searchmenu: function(show)
+{
+ if (typeof show == 'undefined')
+ show = this.searchmenu.is(':visible') ? false : true;
+
+ var ref = rcube_find_object('searchmod');
+ if (show && ref) {
+ var pos = $(ref).offset();
+ this.searchmenu.css({ left:pos.left, top:(pos.top + ref.offsetHeight + 2)});
+
+ if (rcmail.env.search_mods) {
+ for (var n in rcmail.env.search_mods) {
+ box = rcube_find_object('s_mod_' + n);
+ box.checked = 'checked';
+ }
+ }
+ }
+ this.searchmenu[show?'show':'hide']();
+},
+
+set_searchmod: function(elem)
+{
+ if (!rcmail.env.search_mods)
+ rcmail.env.search_mods = new Object();
+
+ if (!elem.checked)
+ delete(rcmail.env.search_mods[elem.value]);
+ else
+ rcmail.env.search_mods[elem.value] = elem.value;
+},
+
body_mouseup: function(evt, p)
{
if (this.markmenu && this.markmenu.is(':visible') && rcube_event.get_target(evt) != rcube_find_object('markreadbutton'))
this.show_markmenu(false);
+ else if (this.searchmenu && this.searchmenu.is(':visible') && rcube_event.get_target(evt) != rcube_find_object('searchmod')) {
+ var menu = rcube_find_object('searchmenu');
+ var target = rcube_event.get_target(evt);
+ while (target.parentNode) {
+ if (target.parentNode == menu)
+ return;
+ target = target.parentNode;
+ }
+ this.show_searchmenu(false);
+ }
},
body_keypress: function(evt, p)
{
- if (rcube_event.get_keycode(evt) == 27 && this.markmenu && this.markmenu.is(':visible'))
- this.show_markmenu(false);
+ if (rcube_event.get_keycode(evt) == 27) {
+ if (this.markmenu && this.markmenu.is(':visible'))
+ this.show_markmenu(false);
+ if (this.searchmenu && this.searchmenu.is(':visible'))
+ this.show_searchmenu(false);
+ }
}
};
diff --git a/skins/default/images/icons/glass.gif b/skins/default/images/icons/glass.gif
new file mode 100644
index 000000000..9a705b410
--- /dev/null
+++ b/skins/default/images/icons/glass.gif
Binary files differ
diff --git a/skins/default/images/searchfield.gif b/skins/default/images/searchfield.gif
index b1dc9389e..756a17e47 100644
--- a/skins/default/images/searchfield.gif
+++ b/skins/default/images/searchfield.gif
Binary files differ
diff --git a/skins/default/mail.css b/skins/default/mail.css
index 93c63de0f..00f8ca327 100644
--- a/skins/default/mail.css
+++ b/skins/default/mail.css
@@ -45,7 +45,8 @@
padding-left: 2px;
}
-#markmessagemenu
+#markmessagemenu,
+#searchmenu
{
position: absolute;
top: 32px;
@@ -60,6 +61,11 @@
z-index: 240;
}
+#searchmenu
+{
+ width: 172px;
+}
+
ul.toolbarmenu
{
margin: 0;
@@ -89,6 +95,11 @@ ul.toolbarmenu li a.active:hover
background-color: #ddd;
}
+ul.toolbarmenu li input
+{
+ vertical-align: middle;
+}
+
#searchfilter
{
position: absolute;
diff --git a/skins/default/templates/addressbook.html b/skins/default/templates/addressbook.html
index 431c0589e..b341172f1 100644
--- a/skins/default/templates/addressbook.html
+++ b/skins/default/templates/addressbook.html
@@ -41,7 +41,9 @@
</div>
<div id="quicksearchbar">
-<roundcube:object name="searchform" id="quicksearchbox" /><roundcube:button command="reset-search" id="searchreset" image="/images/icons/reset.gif" title="resetsearch" />
+<roundcube:button name="searchmod" id="searchmod" image="/images/icons/glass.gif" />
+<roundcube:object name="searchform" id="quicksearchbox" />
+<roundcube:button command="reset-search" id="searchreset" image="/images/icons/reset.gif" title="resetsearch" />
</div>
<roundcube:if condition="count(env:address_sources) &gt; 1" />
diff --git a/skins/default/templates/mail.html b/skins/default/templates/mail.html
index 4e1d7ce3a..735144646 100644
--- a/skins/default/templates/mail.html
+++ b/skins/default/templates/mail.html
@@ -136,8 +136,21 @@
</div>
</div>
+<div id="searchmenu">
+ <ul class="toolbarmenu">
+ <li><input type="checkbox" name="s_mods[]" value="subject" id="s_mod_subject" onclick="rcmail_ui.set_searchmod(this)" /><label for="s_mod_subject"><roundcube:label name="subject" /></label></li>
+ <li><input type="checkbox" name="s_mods[]" value="from" id="s_mod_from" onclick="rcmail_ui.set_searchmod(this)" /><label for="s_mod_from"><roundcube:label name="from" /></label></li>
+ <li><input type="checkbox" name="s_mods[]" value="to" id="s_mod_to" onclick="rcmail_ui.set_searchmod(this)" /><label for="s_mod_to"><roundcube:label name="to" /></label></li>
+ <li><input type="checkbox" name="s_mods[]" value="cc" id="s_mod_cc" onclick="rcmail_ui.set_searchmod(this)" /><label for="s_mod_cc"><roundcube:label name="cc" /></label></li>
+ <li><input type="checkbox" name="s_mods[]" value="bcc" id="s_mod_bcc" onclick="rcmail_ui.set_searchmod(this)" /><label for="s_mod_bcc"><roundcube:label name="bcc" /></label></li>
+ <li><input type="checkbox" name="s_mods[]" value="text" id="s_mod_text" onclick="rcmail_ui.set_searchmod(this)" /><label for="s_mod_text"><roundcube:label name="msgtext" /></label></li>
+ </ul>
+</div>
+
<div id="quicksearchbar">
-<roundcube:object name="searchform" id="quicksearchbox" /><roundcube:button command="reset-search" id="searchreset" image="/images/icons/reset.gif" title="resetsearch" />
+<roundcube:button name="searchmod" id="searchmod" image="/images/icons/glass.gif" onclick="rcmail_ui.show_searchmenu();return false" title="searchmod" />
+<roundcube:object name="searchform" id="quicksearchbox" />
+<roundcube:button command="reset-search" id="searchreset" image="/images/icons/reset.gif" title="resetsearch" />
</div>
</body>