From 1aae261490e9f0e236d505e99fbdbe80ced89ba5 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 21 May 2012 14:31:03 +0530 Subject: [PATCH] delete button in doclistview --- .../accounts/doctype/journal_voucher/listview.js | 13 +++++++------ .../accounts/doctype/purchase_invoice/listview.js | 3 ++- erpnext/accounts/doctype/sales_invoice/listview.js | 9 +++++---- erpnext/buying/doctype/purchase_order/listview.js | 9 +++++---- erpnext/buying/doctype/purchase_request/listview.js | 3 ++- erpnext/buying/doctype/supplier/listview.js | 3 ++- erpnext/hr/doctype/appraisal/listview.js | 3 ++- erpnext/hr/doctype/attendance/listview.js | 3 ++- erpnext/hr/doctype/employee/listview.js | 3 ++- erpnext/hr/doctype/expense_claim/listview.js | 3 ++- erpnext/hr/doctype/leave_application/listview.js | 3 ++- erpnext/hr/doctype/salary_slip/listview.js | 3 ++- erpnext/production/doctype/bom/listview.js | 3 ++- .../production/doctype/production_order/listview.js | 3 ++- erpnext/selling/doctype/lead/listview.js | 3 ++- erpnext/selling/doctype/opportunity/listview.js | 3 ++- erpnext/selling/doctype/quotation/listview.js | 3 ++- erpnext/selling/doctype/sales_order/listview.js | 3 ++- erpnext/stock/doctype/delivery_note/listview.js | 3 ++- erpnext/stock/doctype/item/listview.js | 3 ++- erpnext/stock/doctype/purchase_receipt/listview.js | 3 ++- erpnext/stock/doctype/stock_entry/listview.js | 3 ++- erpnext/support/doctype/support_ticket/listview.js | 3 ++- public/js/all-app.js | 2 +- public/js/all-web.js | 2 +- 25 files changed, 59 insertions(+), 36 deletions(-) diff --git a/erpnext/accounts/doctype/journal_voucher/listview.js b/erpnext/accounts/doctype/journal_voucher/listview.js index b9cc8e8057..eb3bd35043 100644 --- a/erpnext/accounts/doctype/journal_voucher/listview.js +++ b/erpnext/accounts/doctype/journal_voucher/listview.js @@ -18,11 +18,12 @@ wn.doclistviews['Journal Voucher'] = wn.views.ListView.extend({ } }, columns: [ - {width: '5%', content:'avatar'}, - {width: '3%', content:'docstatus'}, - {width: '12%', content:'name'}, - {width: '15%', content:'voucher_type'}, - {width: '38%', content:'tags+remark', css: {'color':'#222'}}, + {width: '3%', content: 'check'}, + {width: '5%', content: 'avatar'}, + {width: '3%', content: 'docstatus'}, + {width: '12%', content: 'name'}, + {width: '15%', content: 'voucher_type'}, + {width: '32%', content: 'tags+remark', css: {'color':'#222'}}, { width: '18%', content: function(parent, data) { @@ -30,6 +31,6 @@ wn.doclistviews['Journal Voucher'] = wn.views.ListView.extend({ }, css: {'text-align':'right'} }, - {width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}} + {width: '12%', content: 'modified', css: {'text-align': 'right', 'color':'#777'}} ], }); \ No newline at end of file diff --git a/erpnext/accounts/doctype/purchase_invoice/listview.js b/erpnext/accounts/doctype/purchase_invoice/listview.js index f431e0356c..2de50d3b4d 100644 --- a/erpnext/accounts/doctype/purchase_invoice/listview.js +++ b/erpnext/accounts/doctype/purchase_invoice/listview.js @@ -20,10 +20,11 @@ wn.doclistviews['Purchase Invoice'] = wn.views.ListView.extend({ }, columns: [ + {width: '3%', content: 'check'}, {width: '5%', content: 'avatar'}, {width: '3%', content: 'docstatus'}, {width: '15%', content: 'name'}, - {width: '37%', content: 'tags+supplier_name', css: {color: '#222'}}, + {width: '34%', content: 'tags+supplier_name', css: {color: '#222'}}, { width: '18%', content: function(parent, data) { diff --git a/erpnext/accounts/doctype/sales_invoice/listview.js b/erpnext/accounts/doctype/sales_invoice/listview.js index b792cafee5..626686b3bf 100644 --- a/erpnext/accounts/doctype/sales_invoice/listview.js +++ b/erpnext/accounts/doctype/sales_invoice/listview.js @@ -15,10 +15,11 @@ wn.doclistviews['Sales Invoice'] = wn.views.ListView.extend({ data.paid = flt((data.grand_total - data.outstanding_amount) / data.grand_total * 100, 2); }, columns: [ - {width: '5%', content:'avatar'}, - {width: '3%', content:'docstatus'}, - {width: '15%', content:'name'}, - {width: '37%', content:'tags+customer_name', css: {color:'#222'}}, + {width: '3%', content: 'check'}, + {width: '5%', content: 'avatar'}, + {width: '3%', content: 'docstatus'}, + {width: '15%', content: 'name'}, + {width: '34%', content: 'tags+customer_name', css: {color:'#222'}}, { width: '18%', content: function(parent, data) { diff --git a/erpnext/buying/doctype/purchase_order/listview.js b/erpnext/buying/doctype/purchase_order/listview.js index c2ae4e22a7..3cd3287e64 100644 --- a/erpnext/buying/doctype/purchase_order/listview.js +++ b/erpnext/buying/doctype/purchase_order/listview.js @@ -13,10 +13,11 @@ wn.doclistviews['Purchase Order'] = wn.views.ListView.extend({ }, columns: [ - {width: '5%', content:'avatar'}, - {width: '3%', content:'docstatus'}, - {width: '15%', content:'name'}, - {width: '35%', content:'tags+supplier_name', css: {color:'#222'}}, + {width: '3%', content: 'check'}, + {width: '5%', content: 'avatar'}, + {width: '3%', content: 'docstatus'}, + {width: '15%', content: 'name'}, + {width: '28%', content: 'tags+supplier_name', css: {color:'#222'}}, { width: '18%', content: function(parent, data) { diff --git a/erpnext/buying/doctype/purchase_request/listview.js b/erpnext/buying/doctype/purchase_request/listview.js index e45fc4c340..64ed8fa035 100644 --- a/erpnext/buying/doctype/purchase_request/listview.js +++ b/erpnext/buying/doctype/purchase_request/listview.js @@ -22,10 +22,11 @@ wn.doclistviews['Purchase Request'] = wn.views.ListView.extend({ }, columns: [ + {width: '3%', content: 'check'}, {width: '5%', content:'avatar'}, {width: '3%', content:'docstatus'}, {width: '17%', content:'name'}, - {width: '53%', content:'status_html+tags+remark', css: {'color': '#222'}}, + {width: '50%', content:'status_html+tags+remark', css: {'color': '#222'}}, {width: '10%', content: 'per_ordered', type:'bar-graph', label:'Ordered'}, {width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}} ] diff --git a/erpnext/buying/doctype/supplier/listview.js b/erpnext/buying/doctype/supplier/listview.js index 45ab1a4396..2bd4b121e9 100644 --- a/erpnext/buying/doctype/supplier/listview.js +++ b/erpnext/buying/doctype/supplier/listview.js @@ -14,11 +14,12 @@ wn.doclistviews['Supplier'] = wn.views.ListView.extend({ }, columns: [ + {width: '3%', content: 'check'}, {width: '5%', content:'avatar'}, {width: '20%', content:'name'}, {width: '30%', content:'supplier_name'}, {width: '10%', content:'tags'}, - {width: '23%', content:'supplier_type', css: {'color': '#aaa'}}, + {width: '20%', content:'supplier_type', css: {'color': '#aaa'}}, {width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}} ] }); diff --git a/erpnext/hr/doctype/appraisal/listview.js b/erpnext/hr/doctype/appraisal/listview.js index 34653f3687..074bced0e4 100644 --- a/erpnext/hr/doctype/appraisal/listview.js +++ b/erpnext/hr/doctype/appraisal/listview.js @@ -20,9 +20,10 @@ wn.doclistviews['Appraisal'] = wn.views.ListView.extend({ }, columns: [ + {width: '3%', content: 'check'}, {width: '3%', content: 'docstatus'}, {width: '15%', content: 'name'}, - {width: '28%', content: 'employee_name'}, + {width: '25%', content: 'employee_name'}, {width: '12%', content: 'status+tags'}, {width: '12%', content: 'total_score', css: {'text-align': 'right'}}, {width: '30%', content:'date_range', diff --git a/erpnext/hr/doctype/attendance/listview.js b/erpnext/hr/doctype/attendance/listview.js index 45729eacb2..4505980dcc 100644 --- a/erpnext/hr/doctype/attendance/listview.js +++ b/erpnext/hr/doctype/attendance/listview.js @@ -17,9 +17,10 @@ wn.doclistviews['Attendance'] = wn.views.ListView.extend({ }, columns: [ + {width: '3%', content: 'check'}, {width: '3%', content:'docstatus'}, {width: '12%', content:'name'}, - {width: '50%', content:'employee_name'}, + {width: '47%', content:'employee_name'}, {width: '13%', content:'status'}, {width: '10%', content:'tags'}, //{width: '23%', content:'supplier_type', css: {'color': '#aaa'}}, diff --git a/erpnext/hr/doctype/employee/listview.js b/erpnext/hr/doctype/employee/listview.js index 3aa87d29b1..4f92bbff29 100644 --- a/erpnext/hr/doctype/employee/listview.js +++ b/erpnext/hr/doctype/employee/listview.js @@ -35,10 +35,11 @@ wn.doclistviews['Employee'] = wn.views.ListView.extend({ }, columns: [ + {width: '3%', content: 'check'}, {width: '3%', content: 'docstatus'}, {width: '12%', content: 'name'}, {width: '25%', content: 'employee_name'}, - {width: '48%', content: 'description+tags', + {width: '45%', content: 'description+tags', css: {'color': '#aaa'}}, {width: '12%', content:'date_of_joining', css: {'text-align': 'right', 'color': '#777'}}, diff --git a/erpnext/hr/doctype/expense_claim/listview.js b/erpnext/hr/doctype/expense_claim/listview.js index 8f9fea11c1..62efe38b6f 100644 --- a/erpnext/hr/doctype/expense_claim/listview.js +++ b/erpnext/hr/doctype/expense_claim/listview.js @@ -22,10 +22,11 @@ wn.doclistviews['Expense Claim'] = wn.views.ListView.extend({ }, columns: [ + {width: '3%', content: 'check'}, {width: '5%', content: 'avatar'}, {width: '3%', content: 'docstatus'}, {width: '12%', content: 'name'}, - {width: '44%', content: 'employee_name+tags'}, + {width: '41%', content: 'employee_name+tags'}, {width: '10%', content: 'approval_status'}, { width: '12%', diff --git a/erpnext/hr/doctype/leave_application/listview.js b/erpnext/hr/doctype/leave_application/listview.js index 0f1b1b7ff7..4bcbab83c2 100644 --- a/erpnext/hr/doctype/leave_application/listview.js +++ b/erpnext/hr/doctype/leave_application/listview.js @@ -25,10 +25,11 @@ wn.doclistviews['Leave Application'] = wn.views.ListView.extend({ }, columns: [ + {width: '3%', content: 'check'}, {width: '5%', content:'avatar'}, {width: '3%', content:'docstatus'}, {width: '12%', content:'name'}, - {width: '40%', content:'employee_name+tags'}, + {width: '37%', content:'employee_name+tags'}, {width: '10%', content:'total_leave_days', css: {'color':'#777'}}, {width: '30%', content:'date_range'}, diff --git a/erpnext/hr/doctype/salary_slip/listview.js b/erpnext/hr/doctype/salary_slip/listview.js index cb3cfe4185..0763e2792f 100644 --- a/erpnext/hr/doctype/salary_slip/listview.js +++ b/erpnext/hr/doctype/salary_slip/listview.js @@ -24,10 +24,11 @@ wn.doclistviews['Salary Slip'] = wn.views.ListView.extend({ }, columns: [ + {width: '3%', content: 'check'}, {width: '3%', content: 'docstatus'}, {width: '14%', content: 'name'}, {width: '20%', content: 'employee_name'}, - {width: '30%', content: 'description+tags', css: {'color': '#aaa'}}, + {width: '27%', content: 'description+tags', css: {'color': '#aaa'}}, {width: '17%', content:'month', css: {'text-align': 'right', 'color':'#aaa'}}, { width: '16%', diff --git a/erpnext/production/doctype/bom/listview.js b/erpnext/production/doctype/bom/listview.js index e1398479d8..2aae904b86 100644 --- a/erpnext/production/doctype/bom/listview.js +++ b/erpnext/production/doctype/bom/listview.js @@ -21,10 +21,11 @@ wn.doclistviews['BOM'] = wn.views.ListView.extend({ }, columns: [ + {width: '3%', content: 'check'}, {width: '3%', content: 'docstatus'}, {width: '15%', content: 'name'}, {width: '15%', content: 'item'}, - {width: '26%', content: 'description+tags'}, + {width: '23%', content: 'description+tags'}, { width: '12%', content: function(parent, data) { diff --git a/erpnext/production/doctype/production_order/listview.js b/erpnext/production/doctype/production_order/listview.js index 5f510297ee..73b9535d46 100644 --- a/erpnext/production/doctype/production_order/listview.js +++ b/erpnext/production/doctype/production_order/listview.js @@ -19,9 +19,10 @@ wn.doclistviews['Production Order'] = wn.views.ListView.extend({ }, columns: [ + {width: '3%', content: 'check'}, {width: '5%', content: 'avatar'}, {width: '3%', content: 'docstatus'}, - {width: '20%', content: 'name'}, + {width: '17%', content: 'name'}, {width: '16%', content: 'production_item'}, {width: '20%', content: 'fg_warehouse'}, {width: '12%', content: 'status+tags'}, diff --git a/erpnext/selling/doctype/lead/listview.js b/erpnext/selling/doctype/lead/listview.js index c3efc1e3b4..b4d89347fa 100644 --- a/erpnext/selling/doctype/lead/listview.js +++ b/erpnext/selling/doctype/lead/listview.js @@ -24,9 +24,10 @@ wn.doclistviews['Lead'] = wn.views.ListView.extend({ }, columns: [ + {width: '3%', content: 'check'}, {width: '20%', content:'name'}, {width: '12%', content:'status_html'}, - {width: '55%', content:'tags+lead_name', css: {color:'#222'}}, + {width: '52%', content:'tags+lead_name', css: {color:'#222'}}, {width: '13%', content:'modified', css: {'text-align': 'right', 'color':'#777'}} ] }) diff --git a/erpnext/selling/doctype/opportunity/listview.js b/erpnext/selling/doctype/opportunity/listview.js index 3d2ab205b8..74cfbd1ce1 100644 --- a/erpnext/selling/doctype/opportunity/listview.js +++ b/erpnext/selling/doctype/opportunity/listview.js @@ -29,9 +29,10 @@ wn.doclistviews['Opportunity'] = wn.views.ListView.extend({ }, columns: [ + {width: '3%', content: 'check'}, {width: '15%', content:'name'}, {width: '18%', content:'status_html'}, - {width: '55%', content:'tags+enquiry_name', css: {color:'#222'}}, + {width: '52%', content:'tags+enquiry_name', css: {color:'#222'}}, {width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}} ] }) diff --git a/erpnext/selling/doctype/quotation/listview.js b/erpnext/selling/doctype/quotation/listview.js index cb8acb6e58..cf3a807bd1 100644 --- a/erpnext/selling/doctype/quotation/listview.js +++ b/erpnext/selling/doctype/quotation/listview.js @@ -22,10 +22,11 @@ wn.doclistviews['Quotation'] = wn.views.ListView.extend({ }, columns: [ + {width: '3%', content: 'check'}, {width: '5%', content:'avatar'}, {width: '3%', content:'docstatus'}, {width: '15%', content:'name'}, - {width: '47%', content:'tags+quotation_name', css: {color:'#222'}}, + {width: '44%', content:'tags+quotation_name', css: {color:'#222'}}, { width: '18%', content: function(parent, data) { diff --git a/erpnext/selling/doctype/sales_order/listview.js b/erpnext/selling/doctype/sales_order/listview.js index 3a910a0900..19d6a92032 100644 --- a/erpnext/selling/doctype/sales_order/listview.js +++ b/erpnext/selling/doctype/sales_order/listview.js @@ -13,10 +13,11 @@ wn.doclistviews['Sales Order'] = wn.views.ListView.extend({ }, columns: [ + {width: '3%', content: 'check'}, {width: '5%', content:'avatar'}, {width: '3%', content:'docstatus'}, {width: '15%', content:'name'}, - {width: '35%', content:'tags+customer_name', css: {color:'#222'}}, + {width: '32%', content:'tags+customer_name', css: {color:'#222'}}, { width: '18%', content: function(parent, data) { diff --git a/erpnext/stock/doctype/delivery_note/listview.js b/erpnext/stock/doctype/delivery_note/listview.js index 5b960be135..8c29961a1d 100644 --- a/erpnext/stock/doctype/delivery_note/listview.js +++ b/erpnext/stock/doctype/delivery_note/listview.js @@ -8,10 +8,11 @@ wn.doclistviews['Delivery Note'] = wn.views.ListView.extend({ ]); }, columns: [ + {width: '3%', content: 'check'}, {width: '5%', content:'avatar'}, {width: '3%', content:'docstatus'}, {width: '15%', content:'name'}, - {width: '50%', content:'tags+customer_name', css: {color:'#222'}}, + {width: '47%', content:'tags+customer_name', css: {color:'#222'}}, {width: '15%', content:'sales_order_no', type:'link', doctype:'Sales Order'}, {width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}} ] diff --git a/erpnext/stock/doctype/item/listview.js b/erpnext/stock/doctype/item/listview.js index 3f01dd4f9a..abb02ff104 100644 --- a/erpnext/stock/doctype/item/listview.js +++ b/erpnext/stock/doctype/item/listview.js @@ -18,9 +18,10 @@ wn.doclistviews['Item'] = wn.views.ListView.extend({ }, columns: [ + {width: '3%', content: 'check'}, {width: '5%', content:'avatar'}, {width: '20%', content:'name'}, - {width: '63%', content:'tags+description', css: {'color': '#222'}}, + {width: '60%', content:'tags+description', css: {'color': '#222'}}, {width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}} ] }); diff --git a/erpnext/stock/doctype/purchase_receipt/listview.js b/erpnext/stock/doctype/purchase_receipt/listview.js index ba2d0e3aff..5062091f8b 100644 --- a/erpnext/stock/doctype/purchase_receipt/listview.js +++ b/erpnext/stock/doctype/purchase_receipt/listview.js @@ -8,10 +8,11 @@ wn.doclistviews['Purchase Receipt'] = wn.views.ListView.extend({ ]); }, columns: [ + {width: '3%', content: 'check'}, {width: '5%', content:'avatar'}, {width: '3%', content:'docstatus'}, {width: '15%', content:'name'}, - {width: '50%', content:'tags+supplier_name', css: {color:'#222'}}, + {width: '47%', content:'tags+supplier_name', css: {color:'#222'}}, {width: '15%', content:'purchase_order_no', type:'link', doctype:'Purchase Order Order'}, {width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}} ] diff --git a/erpnext/stock/doctype/stock_entry/listview.js b/erpnext/stock/doctype/stock_entry/listview.js index fb79fb99aa..91a3ae8715 100644 --- a/erpnext/stock/doctype/stock_entry/listview.js +++ b/erpnext/stock/doctype/stock_entry/listview.js @@ -9,10 +9,11 @@ wn.doclistviews['Stock Entry'] = wn.views.ListView.extend({ ]); }, columns: [ + {width: '3%', content: 'check'}, {width: '5%', content:'avatar'}, {width: '3%', content:'docstatus'}, {width: '15%', content:'name'}, - {width: '18%', content:'tags+purpose', css: {color:'#222'}}, + {width: '15%', content:'tags+purpose', css: {color:'#222'}}, {width: '18%', content:'from_warehouse', template: 'From %(from_warehouse)s'}, {width: '18%', content:'to_warehouse', template: 'To %(to_warehouse)s'}, {width: '12%', content:'modified', css: {'text-align': 'right', 'color':'#777'}} diff --git a/erpnext/support/doctype/support_ticket/listview.js b/erpnext/support/doctype/support_ticket/listview.js index 32f825dccf..a1804b9608 100644 --- a/erpnext/support/doctype/support_ticket/listview.js +++ b/erpnext/support/doctype/support_ticket/listview.js @@ -44,10 +44,11 @@ wn.doclistviews['Support Ticket'] = wn.views.ListView.extend({ }, columns: [ + {width: '3%', content: 'check'}, {width: '3%', content:'check'}, {width: '20%', content:'name'}, {width: '10%', content:'status_html'}, - {width: '53%', content:'tags+description', css: {color:'#222'}}, + {width: '50%', content:'tags+description', css: {color:'#222'}}, {width: '14%', content:'modified', css: {'text-align': 'right', 'color':'#777'}} ] diff --git a/public/js/all-app.js b/public/js/all-app.js index 20ad511bee..8797c6827c 100644 --- a/public/js/all-app.js +++ b/public/js/all-app.js @@ -190,7 +190,7 @@ $.fn.done_working=function(){var ele=this.get(0);$(ele).attr('disabled',null);if /* * lib/js/wn/model.js */ -wn.provide('wn.model');wn.model={no_value_type:['Section Break','Column Break','HTML','Table','Button','Image'],new_names:{},with_doctype:function(doctype,callback){if(locals.DocType[doctype]){callback();}else{wn.call({method:'webnotes.widgets.form.load.getdoctype',args:{doctype:doctype},callback:callback});}},with_doc:function(doctype,name,callback){if(!name)name=doctype;if(locals[doctype]&&locals[doctype][name]){callback(name);}else{wn.call({method:'webnotes.widgets.form.load.getdoc',args:{doctype:doctype,name:name},callback:function(r){callback(name,r);}});}},can_delete:function(doctype){if(!doctype)return false;return locals.DocType[doctype].allow_trash&&wn.boot.profile.can_cancel.indexOf(doctype)!=-1;}} +wn.provide('wn.model');wn.model={no_value_type:['Section Break','Column Break','HTML','Table','Button','Image'],new_names:{},with_doctype:function(doctype,callback){if(locals.DocType[doctype]){callback();}else{wn.call({method:'webnotes.widgets.form.load.getdoctype',args:{doctype:doctype},callback:callback});}},with_doc:function(doctype,name,callback){if(!name)name=doctype;if(locals[doctype]&&locals[doctype][name]){callback(name);}else{wn.call({method:'webnotes.widgets.form.load.getdoc',args:{doctype:doctype,name:name},callback:function(r){callback(name,r);}});}},can_delete:function(doctype){if(!doctype)return false;return wn.boot.profile.can_cancel.indexOf(doctype)!=-1;}} /* * lib/js/wn/meta.js */ diff --git a/public/js/all-web.js b/public/js/all-web.js index 3d41a0075c..ff2ecc0337 100644 --- a/public/js/all-web.js +++ b/public/js/all-web.js @@ -77,7 +77,7 @@ $.fn.done_working=function(){var ele=this.get(0);$(ele).attr('disabled',null);if /* * lib/js/wn/model.js */ -wn.provide('wn.model');wn.model={no_value_type:['Section Break','Column Break','HTML','Table','Button','Image'],new_names:{},with_doctype:function(doctype,callback){if(locals.DocType[doctype]){callback();}else{wn.call({method:'webnotes.widgets.form.load.getdoctype',args:{doctype:doctype},callback:callback});}},with_doc:function(doctype,name,callback){if(!name)name=doctype;if(locals[doctype]&&locals[doctype][name]){callback(name);}else{wn.call({method:'webnotes.widgets.form.load.getdoc',args:{doctype:doctype,name:name},callback:function(r){callback(name,r);}});}},can_delete:function(doctype){if(!doctype)return false;return locals.DocType[doctype].allow_trash&&wn.boot.profile.can_cancel.indexOf(doctype)!=-1;}} +wn.provide('wn.model');wn.model={no_value_type:['Section Break','Column Break','HTML','Table','Button','Image'],new_names:{},with_doctype:function(doctype,callback){if(locals.DocType[doctype]){callback();}else{wn.call({method:'webnotes.widgets.form.load.getdoctype',args:{doctype:doctype},callback:callback});}},with_doc:function(doctype,name,callback){if(!name)name=doctype;if(locals[doctype]&&locals[doctype][name]){callback(name);}else{wn.call({method:'webnotes.widgets.form.load.getdoc',args:{doctype:doctype,name:name},callback:function(r){callback(name,r);}});}},can_delete:function(doctype){if(!doctype)return false;return wn.boot.profile.can_cancel.indexOf(doctype)!=-1;}} /* * lib/js/wn/meta.js */