##// END OF EJS Templates
use placeholders in qfilter, not the ugly JS logic
marcink -
r3665:690a955b beta
parent child Browse files
Show More
@@ -699,10 +699,6 b' var q_filter = function(target,nodes,dis'
699 var q_filter_field = YUD.get(target);
699 var q_filter_field = YUD.get(target);
700 var F = YAHOO.namespace(target);
700 var F = YAHOO.namespace(target);
701
701
702 YUE.on(q_filter_field,'click',function(){
703 q_filter_field.value = '';
704 });
705
706 YUE.on(q_filter_field,'keyup',function(e){
702 YUE.on(q_filter_field,'keyup',function(e){
707 clearTimeout(F.filterTimeout);
703 clearTimeout(F.filterTimeout);
708 F.filterTimeout = setTimeout(F.updateFilter,600);
704 F.filterTimeout = setTimeout(F.updateFilter,600);
@@ -6,7 +6,7 b''
6 </%def>
6 </%def>
7
7
8 <%def name="breadcrumbs_links()">
8 <%def name="breadcrumbs_links()">
9 <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> ${h.link_to(_('Admin'),h.url('admin_home'))} &raquo; <span id="repo_count">0</span> ${_('repositories')}
9 <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value=""/> ${h.link_to(_('Admin'),h.url('admin_home'))} &raquo; <span id="repo_count">0</span> ${_('repositories')}
10 </%def>
10 </%def>
11 <%def name="page_nav()">
11 <%def name="page_nav()">
12 ${self.menu('admin')}
12 ${self.menu('admin')}
@@ -127,7 +127,6 b''
127 };
127 };
128 YUE.on('q_filter','click',function(){
128 YUE.on('q_filter','click',function(){
129 if(!YUD.hasClass('q_filter', 'loaded')){
129 if(!YUD.hasClass('q_filter', 'loaded')){
130 YUD.get('q_filter').value = '';
131 //TODO: load here full list later to do search within groups
130 //TODO: load here full list later to do search within groups
132 YUD.addClass('q_filter', 'loaded');
131 YUD.addClass('q_filter', 'loaded');
133 }
132 }
@@ -28,7 +28,7 b''
28 <!-- box / title -->
28 <!-- box / title -->
29 <div class="title">
29 <div class="title">
30 <h5>
30 <h5>
31 <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}" style="display: none"/>
31 <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value="" style="display: none"/>
32 </h5>
32 </h5>
33 <ul class="links" style="color:#DADADA">
33 <ul class="links" style="color:#DADADA">
34 <li>
34 <li>
@@ -268,7 +268,6 b' function table_renderer(data){'
268 };
268 };
269 YUE.on('q_filter','click',function(){
269 YUE.on('q_filter','click',function(){
270 if(!YUD.hasClass('q_filter', 'loaded')){
270 if(!YUD.hasClass('q_filter', 'loaded')){
271 YUD.get('q_filter').value = '';
272 //TODO: load here full list later to do search within groups
271 //TODO: load here full list later to do search within groups
273 YUD.addClass('q_filter', 'loaded');
272 YUD.addClass('q_filter', 'loaded');
274 }
273 }
@@ -6,7 +6,7 b''
6 </%def>
6 </%def>
7
7
8 <%def name="breadcrumbs_links()">
8 <%def name="breadcrumbs_links()">
9 <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> ${h.link_to(_('Admin'),h.url('admin_home'))} &raquo; <span id="user_count">0</span> ${_('users')}
9 <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value=""/> ${h.link_to(_('Admin'),h.url('admin_home'))} &raquo; <span id="user_count">0</span> ${_('users')}
10 </%def>
10 </%def>
11
11
12 <%def name="page_nav()">
12 <%def name="page_nav()">
@@ -134,9 +134,6 b''
134 });
134 });
135
135
136 };
136 };
137 YUE.on('q_filter','click',function(){
138 YUD.get('q_filter').value = '';
139 });
140
137
141 YUE.on('q_filter','keyup',function (e) {
138 YUE.on('q_filter','keyup',function (e) {
142 clearTimeout(filterTimeout);
139 clearTimeout(filterTimeout);
@@ -6,7 +6,7 b''
6 </%def>
6 </%def>
7
7
8 <%def name="breadcrumbs_links()">
8 <%def name="breadcrumbs_links()">
9 <input class="q_filter_box" id="q_filter_bookmarks" size="15" type="text" name="filter" value="${_('quick filter...')}"/>
9 <input class="q_filter_box" id="q_filter_bookmarks" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value=""/>
10 ${_('Bookmarks')}
10 ${_('Bookmarks')}
11 </%def>
11 </%def>
12
12
@@ -6,7 +6,7 b''
6 </%def>
6 </%def>
7
7
8 <%def name="breadcrumbs_links()">
8 <%def name="breadcrumbs_links()">
9 <input class="q_filter_box" id="q_filter_branches" size="15" type="text" name="filter" value="${_('quick filter...')}"/>
9 <input class="q_filter_box" id="q_filter_branches" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value=""/>
10 ${_('Branches')}
10 ${_('Branches')}
11 </%def>
11 </%def>
12
12
@@ -3,7 +3,7 b''
3 <!-- box / title -->
3 <!-- box / title -->
4 <div class="title">
4 <div class="title">
5 <h5>
5 <h5>
6 <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> ${parent.breadcrumbs()} <span id="repo_count">0</span> ${_('repositories')}
6 <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value=""/> ${parent.breadcrumbs()} <span id="repo_count">0</span> ${_('repositories')}
7 </h5>
7 </h5>
8 %if c.rhodecode_user.username != 'default':
8 %if c.rhodecode_user.username != 'default':
9 <ul class="links">
9 <ul class="links">
@@ -326,7 +326,6 b''
326 };
326 };
327 YUE.on('q_filter','click',function(){
327 YUE.on('q_filter','click',function(){
328 if(!YUD.hasClass('q_filter', 'loaded')){
328 if(!YUD.hasClass('q_filter', 'loaded')){
329 YUD.get('q_filter').value = '';
330 //TODO: load here full list later to do search within groups
329 //TODO: load here full list later to do search within groups
331 YUD.addClass('q_filter', 'loaded');
330 YUD.addClass('q_filter', 'loaded');
332 }
331 }
@@ -43,8 +43,8 b''
43
43
44 <div class="title">
44 <div class="title">
45 <h5>
45 <h5>
46 <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}" style="display: none"/>
46 <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value="" style="display: none"/>
47 <input class="q_filter_box" id="q_filter_watched" size="15" type="text" name="filter" value="${_('quick filter...')}" style="display: none"/>
47 <input class="q_filter_box" id="q_filter_watched" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value="" style="display: none"/>
48 </h5>
48 </h5>
49 <ul class="links" style="color:#DADADA">
49 <ul class="links" style="color:#DADADA">
50 <li>
50 <li>
@@ -247,7 +247,6 b''
247 };
247 };
248 YUE.on('q_filter_watched','click',function(){
248 YUE.on('q_filter_watched','click',function(){
249 if(!YUD.hasClass('q_filter_watched', 'loaded')){
249 if(!YUD.hasClass('q_filter_watched', 'loaded')){
250 YUD.get('q_filter_watched').value = '';
251 //TODO: load here full list later to do search within groups
250 //TODO: load here full list later to do search within groups
252 YUD.addClass('q_filter_watched', 'loaded');
251 YUD.addClass('q_filter_watched', 'loaded');
253 }
252 }
@@ -351,7 +350,6 b''
351 };
350 };
352 YUE.on('q_filter','click',function(){
351 YUE.on('q_filter','click',function(){
353 if(!YUD.hasClass('q_filter', 'loaded')){
352 if(!YUD.hasClass('q_filter', 'loaded')){
354 YUD.get('q_filter').value = '';
355 //TODO: load here full list later to do search within groups
353 //TODO: load here full list later to do search within groups
356 YUD.addClass('q_filter', 'loaded');
354 YUD.addClass('q_filter', 'loaded');
357 }
355 }
@@ -1,7 +1,7 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2
2
3 <li class="qfilter_rs">
3 <li class="qfilter_rs">
4 <input type="text" style="border:0;width:100%" value="${_('quick filter...')}" name="filter" id="q_filter_rs" />
4 <input type="text" style="border:0;width:100%" placeholder="${_('quick filter...')}" value="" name="filter" id="q_filter_rs" />
5 </li>
5 </li>
6
6
7 %for repo in c.repos_list:
7 %for repo in c.repos_list:
@@ -6,7 +6,7 b''
6 </%def>
6 </%def>
7
7
8 <%def name="breadcrumbs_links()">
8 <%def name="breadcrumbs_links()">
9 <input class="q_filter_box" id="q_filter_tags" size="15" type="text" name="filter" value="${_('quick filter...')}"/>
9 <input class="q_filter_box" id="q_filter_tags" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value=""/>
10 ${_('Tags')}
10 ${_('Tags')}
11 </%def>
11 </%def>
12
12
General Comments 0
You need to be logged in to leave comments. Login now