diff --git a/css/legacy/body.css b/css/legacy/body.css index 774b523005..4c4c7b35ec 100644 --- a/css/legacy/body.css +++ b/css/legacy/body.css @@ -176,6 +176,9 @@ header .container { header .container, .content { width: 1100px; } + div#body_div { + min-height: 600px; + } } div.no_script { diff --git a/js/core.min.js b/js/core.min.js index e8b6500088..fdf02ad2bd 100644 --- a/js/core.min.js +++ b/js/core.min.js @@ -148,6 +148,8 @@ this.prepare_opts();$.extend(this,this.opts);$(this.parent).html(repl('\
\
\
\ + \ \
\ @@ -194,7 +196,7 @@ if(this.onrun)this.onrun();if(this.callback)this.callback(r);},render_list:funct /* * lib/js/wn/ui/filters.js */ -wn.ui.FilterList=Class.extend({init:function(opts){wn.require('lib/js/legacy/widgets/form/fields.js');$.extend(this,opts);this.filters=[];this.$w=this.$parent;this.set_events();},set_events:function(){var me=this;this.$w.find('.add-filter-btn').bind('click',function(){me.add_filter();});},show_filters:function(){this.$w.find('.show_filters').toggle();if(!this.filters.length) +wn.ui.FilterList=Class.extend({init:function(opts){wn.require('lib/js/legacy/widgets/form/fields.js');$.extend(this,opts);this.filters=[];this.$w=this.$parent;this.set_events();},set_events:function(){var me=this;this.$w.find('.add-filter-btn').bind('click',function(){me.add_filter();});this.$w.find('.search-btn').bind('click',function(){me.listobj.run();});},show_filters:function(){this.$w.find('.show_filters').toggle();if(!this.filters.length) this.add_filter();},add_filter:function(fieldname,condition,value){this.filters.push(new wn.ui.Filter({flist:this,fieldname:fieldname,condition:condition,value:value}));if(fieldname){this.$w.find('.show_filters').toggle(true);}},get_filters:function(){var values=[];$.each(this.filters,function(i,f){if(f.field) values.push(f.get_value());}) return values;},update_filters:function(){var fl=[];$.each(this.filters,function(i,f){if(f.field)fl.push(f);}) diff --git a/js/wn/ui/filters.js b/js/wn/ui/filters.js index df35e5d0f4..79825f6c89 100644 --- a/js/wn/ui/filters.js +++ b/js/wn/ui/filters.js @@ -34,7 +34,9 @@ wn.ui.FilterList = Class.extend({ this.$w.find('.add-filter-btn').bind('click', function() { me.add_filter(); }); - + this.$w.find('.search-btn').bind('click', function() { + me.listobj.run(); + }); }, show_filters: function() { diff --git a/js/wn/ui/listing.js b/js/wn/ui/listing.js index 11de8b1215..fcd28f24ae 100644 --- a/js/wn/ui/listing.js +++ b/js/wn/ui/listing.js @@ -87,6 +87,8 @@ wn.ui.Listing = Class.extend({
\
\
\ + \ \
\ @@ -165,6 +167,7 @@ wn.ui.Listing = Class.extend({ this.add_button('Refresh', function() { me.run(); }, 'icon-refresh'); + } // new diff --git a/py/core/doctype/print_format/print_format.js b/py/core/doctype/print_format/print_format.js index c3544405c5..31f6ad6069 100644 --- a/py/core/doctype/print_format/print_format.js +++ b/py/core/doctype/print_format/print_format.js @@ -1,5 +1,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { if (doc.standard == 'Yes') { set_field_permlevel('html', 1); + set_field_permlevel('doc_type', 1); + set_field_permlevel('module', 1); } } \ No newline at end of file diff --git a/py/webnotes/session_cache.py b/py/webnotes/session_cache.py index e317efb720..6c1ef9b3e1 100644 --- a/py/webnotes/session_cache.py +++ b/py/webnotes/session_cache.py @@ -75,11 +75,12 @@ def get(): return bootinfo def load(country): - """load from cache""" + """load from cache""" + import json try: sd = webnotes.conn.sql("select cache from __SessionCache where user='%s' %s" % (webnotes.session['user'], (country and (" and country='%s'" % country) or ''))) if sd: - return eval(sd[0][0]) + return json.loads(sd[0][0]) else: return None except Exception, e: @@ -90,6 +91,7 @@ def load(country): def add_to_cache(bootinfo, country): """add to cache""" + import json import webnotes.model.utils if bootinfo.get('docs'): @@ -102,4 +104,4 @@ def add_to_cache(bootinfo, country): # make new webnotes.conn.sql("""insert into `__SessionCache` (user, country, cache) VALUES (%s, %s, %s)""", \ - (webnotes.session['user'], country, str(bootinfo))) + (webnotes.session['user'], country, json.dumps(bootinfo)))