fixed magnifying glass in design page

This commit is contained in:
mdipierro
2012-08-14 20:36:07 -05:00
parent 360f778ade
commit f3d97a1107
3 changed files with 11 additions and 7 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.00.0 (2012-08-14 20:26:37) dev
Version 2.00.0 (2012-08-14 20:36:02) dev
+1 -1
View File
@@ -33,6 +33,6 @@ def helpicon():
return IMG(_src=URL('static', 'images/help.png'), _alt='help')
def searchbox(elementid):
return TAG[''](LABEL(IMG(_src=URL('static', 'images/search.png'), _alt=T('filter')), _class='icon', _for=elementid), ' ', INPUT(_id=elementid, _type='text', _size=12))
return TAG[''](LABEL(IMG(_id="search_start",_src=URL('static', 'images/search.png'), _alt=T('filter')), _class='icon', _for=elementid), ' ', INPUT(_id=elementid, _type='text', _size=12))
+9 -5
View File
@@ -402,10 +402,8 @@ for c in controllers: controller_functions+=[c[:-3]+'/%s.html'%x for x in functi
<script>
jQuery(document).ready(function(){
jQuery('#search').keyup(function(e){
var code = (e.keyCode ? e.keyCode : e.which);
if(code==13 && jQuery('#search').val()){
function filter_files() {
if(jQuery('#search').val()){
jQuery.getJSON('{{=URL('search',args=request.args)}}?keywords='+escape(jQuery('#search').val()),null,function(data, textStatus, xhr){
jQuery('.component_contents li, .formfield, .comptools').hide();
files=data['files'];
@@ -414,11 +412,17 @@ jQuery(document).ready(function(){
jQuery('li#'+files[i].replace(/\//g,'__').replace('.','__')).slideDown();
jQuery('.flash').html(message).slideDown();
});
} else if(code==13) {
} else {
jQuery('.component_contents li, .formfield, .comptools').slideDown();
jQuery('.flash').html('').hide();
}
}
jQuery(document).ready(function(){
jQuery('#search').keyup(function(e){
var code = (e.keyCode ? e.keyCode : e.which);
if(code==13) filter_files();
});
jQuery('#search_start').click(function(e){ filter_files(); });
});
</script>