use jQuery UI position for hint
authorDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 21 May 2010 17:35:49 +0000 (19:35 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 21 May 2010 17:35:49 +0000 (19:35 +0200)
public/mojo_facets.css
templates/all_checkboxes.html.ep

index 4144b7b..d067e35 100644 (file)
@@ -8,6 +8,20 @@
        content: ")";
 }
 
+label span.hint {
+       display: none;
+       position: absolute;
+       background: #fff;
+       color: #888;
+       z-index: 100;
+       padding: 3px;
+}
+
+label:hover span.hint {
+       display: block;
+}
+
+
 span.sort-by {
        float: right;
 }
index 0e034d3..0e46343 100644 (file)
@@ -1,13 +1,24 @@
 <a id="all"  href="#">all</a>
 <a id="none" href="#">none</a>
 
+<label for=filter_regex>regex:
 <input type=text name=filter_regex>
+<span class=hint>tab or click outside to apply</span>
 <a id="included" href="#">included</a>
 <a id="excluded" href="#">excluded</a>
+</label>
 
 
 <script type="text/javascript">
 
+$(document).ready( function(){
+
+$('label span.hint').position({
+       my: 'left bottom',
+       at: 'left top',
+       of: $('label input'),
+});
+
 $('a#all').click( function(){
     $("input[type='checkbox']:not([disabled='disabled'])").attr('checked', true);
 });
@@ -43,5 +54,7 @@ $('input[name=filter_regex]').change( function(e) {
        $('a#excluded').text('-' + excluded).show();
 });
 
+}); // document.ready
+
 </script>