Commit 321fb384bc3ea608619389ebaee4c4f15f33af57

Authored by Braulio Bhavamitra
1 parent 81eb23f2

Use jquery hint for text inputs

This allow simples hints for inputs in Noosfero.
Later a search input will receive use this plugin for hints.
app/views/layouts/application-ng.rhtml
... ... @@ -66,15 +66,9 @@
66 66 </div>
67 67 </span>
68 68 <form action="/search" class="search_form" method="get" class="clean">
69   - <input name="query" size="15" value="<%=_('Search...')%>"
70   - onfocus="this.form.className='focused';
71   - if(this.value=='<%=_('Search...')%>'){this.value=''}"
72   - onblur="this.form.className='';
73   - if(/^\s*$/.test(this.value)){
74   - this.value='<%=_('Search...')%>';
75   - this.form.className='clean'
76   - }" />
  69 + <input name="query" size="15" title="<%=_('Search...')%>" />
77 70 <div><%=_('Press <strong>Enter</strong> to send the search query.')%></div>
  71 + <%= javascript_tag 'jQuery("#user form input").hint();' %>
78 72 </form>
79 73 </div><!-- end id="user" -->
80 74  
... ...
public/designs/themes/base/style.css
... ... @@ -108,14 +108,14 @@ body, th, td, input {
108 108 margin-left: 20px;
109 109 }
110 110  
111   -#user form input {
  111 +#user form input .blur {
112 112 width: 160px;
113 113 border: 1px solid #BBB;
114 114 -moz-border-radius: 3px;
115 115 -webkit-border-radius: 3px;
116 116 color: #CCC;
117 117 }
118   -#user form.focused input {
  118 +#user form input {
119 119 border: 1px solid #888;
120 120 color: #555;
121 121 }
... ...
public/stylesheets/application.css
... ... @@ -6281,7 +6281,8 @@ li.product-item {
6281 6281 overflow: visible;
6282 6282 color:#fff;
6283 6283 text-align: left;
6284   - padding:0;
  6284 + font-weight: bold;
  6285 + padding-left: 10px;
6285 6286 border: none;
6286 6287 height:34px;
6287 6288 display:inline-block;
... ...