Better close filter display
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 23 Oct 2009 19:28:09 +0000 (13:28 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Sat, 24 Oct 2009 23:57:35 +0000 (17:57 -0600)
imp/js/DimpBase.js
imp/templates/index/index-dimp.inc
imp/themes/screen-dimp.css

index aaa9ddd..db84996 100644 (file)
@@ -1385,10 +1385,8 @@ var DimpBase = {
         }
 
         if (this.isSearch()) {
-            DimpCore.DMenu.disable('qsearch_icon', true, false);
-            DimpCore.DMenu.disable('qsearch_icon', false, false);
             this.resetSelected();
-            $('qsearch', 'qsearch_input').invoke('show');
+            $('qsearch', 'qsearch_icon', 'qsearch_input').invoke('show');
             if (!noload) {
                 this.loadMailbox(this.search ? this.search.mbox : 'INBOX');
             }
@@ -1403,7 +1401,7 @@ var DimpBase = {
         $('qsearch_input').setValue(d ? DIMP.text.search + ' (' + $('ctx_qsearchby_' + DIMP.conf.qsearchfield).getText() + ')' : '');
         [ $('qsearch') ].invoke(d ? 'removeClassName' : 'addClassName', 'qsearchActive');
         if ($('qsearch_input').visible()) {
-            $('qsearch_close').hide();
+            $('qsearch_close').hide().next().hide();
         }
     },
 
@@ -1413,11 +1411,9 @@ var DimpBase = {
         if (hideall) {
             $('qsearch').hide();
         } else {
-            $('qsearch_close').show();
-            $('qsearch_input').hide();
+            $('qsearch_close').show().next().show();
+            $('qsearch_icon', 'qsearch_input').invoke('hide');
         }
-        DimpCore.DMenu.disable('qsearch_icon', true, true);
-        DimpCore.DMenu.disable('qsearch_icon', false, true);
     },
 
     /* Enable/Disable DIMP action buttons as needed. */
@@ -1797,6 +1793,7 @@ var DimpBase = {
                 break;
 
             case 'qsearch_close':
+            case 'qsearch_close_filter':
                 this.quicksearchClear();
                 e.stop();
                 return;
index 9e29e4a..3984c23 100644 (file)
@@ -171,6 +171,7 @@ function _simpleButton($id, $text, $image)
         <input autocomplete="off" id="qsearch_input" type="text" size="25" />
        </form>
        <span class="closeImg" id="qsearch_close" style="display:none" title="<?php echo _("Clear Search") ?>"></span>
+       <span id="qsearch_close_filter" style="display:none">Clear Filter</span>
       </span>
       </div>
 <?php endif; ?>
index e8f0009..93ce28f 100644 (file)
@@ -794,6 +794,11 @@ a.address:hover img {
     margin-bottom: 1px;
     padding: 0;
 }
+#qsearch_close_filter {
+    cursor: pointer;
+    padding-right: 3px;
+    vertical-align: middle;
+}
 .qsearchFocus, .qsearchFocus #qsearch_icon, .qsearchFocus #qsearch_input {
     background-color: #fff !important;
 }