deprecated account balance and fixed expiry msg

This commit is contained in:
Anand Doshi
2012-09-28 16:03:11 +05:30
parent 4bfbee8281
commit 440c1eb465
59 changed files with 1135 additions and 3578 deletions

View File

@@ -975,7 +975,8 @@ this.listview.parent=this;this.wrapper=this.$page.find('.wnlist-area');this.page
<hr>\
<p><button class="btn btn-info btn-small" list_view_doc="%(doctype)s">\
Make a new %(doctype_label)s</button>\
</p></div>',{doctype_label:get_doctype_label(this.doctype),doctype:this.doctype});return no_result_message;},render_row:function(row,data){data.doctype=this.doctype;this.listview.render(row,data,this);},get_query_fields:function(){return this.listview.fields;},get_args:function(){return{doctype:this.doctype,fields:this.get_query_fields(),filters:this.filter_list.get_filters(),docstatus:this.can_submit?$.map(this.$page.find('.show-docstatus :checked'),function(inp){return $(inp).attr('data-docstatus')}):[],order_by:this.listview.order_by||undefined,group_by:this.listview.group_by||undefined,}},add_delete_option:function(){var me=this;if(this.can_delete){this.add_button('Delete',function(){me.delete_items();},'icon-remove');$('<div style="padding: 4px"><input type="checkbox" name="select-all" />\
</p></div>',{doctype_label:get_doctype_label(this.doctype),doctype:this.doctype});return no_result_message;},render_row:function(row,data){data.doctype=this.doctype;this.listview.render(row,data,this);},get_query_fields:function(){return this.listview.fields;},get_args:function(){var args={doctype:this.doctype,fields:this.get_query_fields(),filters:this.filter_list.get_filters(),docstatus:this.can_submit?$.map(this.$page.find('.show-docstatus :checked'),function(inp){return $(inp).attr('data-docstatus')}):[],order_by:this.listview.order_by||undefined,group_by:this.listview.group_by||undefined,}
$.each((this.listview.default_filters||[]),function(i,f){args.filters.push(f);});return args;},add_delete_option:function(){var me=this;if(this.can_delete){this.add_button('Delete',function(){me.delete_items();},'icon-remove');$('<div style="padding: 4px"><input type="checkbox" name="select-all" />\
Select all</div>').insertBefore(this.$page.find('.result-list'));this.$page.find('[name="select-all"]').click(function(){me.$page.find('.list-delete').attr('checked',$(this).attr('checked')||false);})}},delete_items:function(){var me=this;var dl=$.map(me.$page.find('.list-delete:checked'),function(e){return $(e).data('name');});if(!dl.length)
return;if(!confirm('This is PERMANENT action and you cannot undo. Continue?')){return;}
me.set_working(true);wn.call({method:'webnotes.widgets.doclistview.delete_items',args:{items:dl,doctype:me.doctype},callback:function(){me.set_working(false);me.refresh();}})},init_stats:function(){var me=this
@@ -1088,7 +1089,7 @@ me.filter_inputs[v.fieldname]=input;});},make_waiting:function(){this.waiting=$(
<div class="progress progress-striped active">\
<div class="bar" style="width: 10%"></div></div>').appendTo(this.wrapper);},load_filter_values:function(){var me=this;$.each(this.filter_inputs,function(i,f){var opts=f.get(0).opts;if(opts.fieldtype!='Button'){me[opts.fieldname]=f.val();if(opts.fieldtype=="Date"){me[opts.fieldname]=dateutil.user_to_str(me[opts.fieldname]);}else if(opts.fieldtype=="Select"){me[opts.fieldname+'_default']=opts.default_value;}}});if(this.filter_inputs.from_date&&this.filter_inputs.to_date&&(this.to_date<this.from_date)){msgprint("From Date must be before To Date");return;}},make_name_map:function(data,key){var map={};key=key||"name";$.each(data,function(i,v){map[v[key]]=v;})
return map;},reset_item_values:function(item){var me=this;$.each(this.columns,function(i,col){if(col.formatter==me.currency_formatter){item[col.id]=0;}});},import_slickgrid:function(){wn.require('js/lib/slickgrid/slick.grid.css');wn.require('js/lib/slickgrid/slick-default-theme.css');wn.require('js/lib/slickgrid/jquery.event.drag.min.js');wn.require('js/lib/slickgrid/slick.core.js');wn.require('js/lib/slickgrid/slick.grid.js');wn.require('js/lib/slickgrid/slick.dataview.js');wn.dom.set_style('.slick-cell { font-size: 12px; }');if(this.tree_grid.show)wn.require("js/app/tree_grid.css");},refresh:function(){this.waiting.toggle(false);if(!this.grid_wrapper)
this.make();this.show_zero=$('.show-zero input:checked').length;this.load_filter_values();this.setup_columns();this.setup_dataview_columns();this.apply_link_formatters();this.prepare_data();this.prepare_data_view();this.wrapper.find(".processing").toggle(true);this.wrapper.find(".processing").delay(2000).fadeOut(300);this.render();this.render_plot&&this.render_plot();},setup_dataview_columns:function(){this.dataview_columns=$.map(this.columns,function(col){return!col.hidden?col:null;});},make:function(){this.plot_area=$('<div class="plot" style="margin-bottom: 15px; display: none; \
this.make();this.show_zero=$('.show-zero input:checked').length;this.load_filter_values();this.setup_columns();this.setup_dataview_columns();this.apply_link_formatters();this.prepare_data();this.prepare_data_view();this.wrapper.find(".processing").toggle(true);this.wrapper.find(".processing").delay(2000).fadeOut(300);this.render();this.render_plot&&this.render_plot();},setup_dataview_columns:function(){this.dataview_columns=$.map(this.columns,function(col){return!col.hidden?col:null;});},make:function(){var me=this;this.plot_area=$('<div class="plot" style="margin-bottom: 15px; display: none; \
height: 300px; width: 100%;"></div>').appendTo(this.wrapper);$('<div style="text-align: right;"> \
<div class="processing" style="background-color: #fec; display: none; float: left; margin: 2px"> \
Updated! </div>\