Commit 321fb384bc3ea608619389ebaee4c4f15f33af57
1 parent
81eb23f2
Exists in
staging
and in
42 other branches
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.
Showing
3 changed files
with
6 additions
and
11 deletions
Show diff stats
app/views/layouts/application-ng.rhtml
@@ -66,15 +66,9 @@ | @@ -66,15 +66,9 @@ | ||
66 | </div> | 66 | </div> |
67 | </span> | 67 | </span> |
68 | <form action="/search" class="search_form" method="get" class="clean"> | 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 | <div><%=_('Press <strong>Enter</strong> to send the search query.')%></div> | 70 | <div><%=_('Press <strong>Enter</strong> to send the search query.')%></div> |
71 | + <%= javascript_tag 'jQuery("#user form input").hint();' %> | ||
78 | </form> | 72 | </form> |
79 | </div><!-- end id="user" --> | 73 | </div><!-- end id="user" --> |
80 | 74 |
public/designs/themes/base/style.css
@@ -108,14 +108,14 @@ body, th, td, input { | @@ -108,14 +108,14 @@ body, th, td, input { | ||
108 | margin-left: 20px; | 108 | margin-left: 20px; |
109 | } | 109 | } |
110 | 110 | ||
111 | -#user form input { | 111 | +#user form input .blur { |
112 | width: 160px; | 112 | width: 160px; |
113 | border: 1px solid #BBB; | 113 | border: 1px solid #BBB; |
114 | -moz-border-radius: 3px; | 114 | -moz-border-radius: 3px; |
115 | -webkit-border-radius: 3px; | 115 | -webkit-border-radius: 3px; |
116 | color: #CCC; | 116 | color: #CCC; |
117 | } | 117 | } |
118 | -#user form.focused input { | 118 | +#user form input { |
119 | border: 1px solid #888; | 119 | border: 1px solid #888; |
120 | color: #555; | 120 | color: #555; |
121 | } | 121 | } |
public/stylesheets/application.css
@@ -6281,7 +6281,8 @@ li.product-item { | @@ -6281,7 +6281,8 @@ li.product-item { | ||
6281 | overflow: visible; | 6281 | overflow: visible; |
6282 | color:#fff; | 6282 | color:#fff; |
6283 | text-align: left; | 6283 | text-align: left; |
6284 | - padding:0; | 6284 | + font-weight: bold; |
6285 | + padding-left: 10px; | ||
6285 | border: none; | 6286 | border: none; |
6286 | height:34px; | 6287 | height:34px; |
6287 | display:inline-block; | 6288 | display:inline-block; |