Merge branch 'master' of github.com:webnotes/wnframework
This commit is contained in:
commit
f355823380
2 changed files with 15 additions and 11 deletions
|
|
@ -94,7 +94,7 @@ cur_frm.cscript.hide_allow_attach = function(doc, dt, dn) {
|
|||
'Leave Application', 'Lead', 'Journal Voucher', 'Item', 'Material Request',
|
||||
'Expense Claim', 'Opportunity', 'Employee', 'Delivery Note',
|
||||
'Customer Issue', 'Customer', 'Contact Us Settings', 'Company',
|
||||
'Blog', 'BOM', 'About Us Settings'];
|
||||
'Blog', 'BOM', 'About Us Settings', 'Batch'];
|
||||
|
||||
if(inList(allow_attach_list, doc.doc_type)) {
|
||||
unhide_field('allow_attach');
|
||||
|
|
|
|||
|
|
@ -791,14 +791,7 @@ _f.Frm.prototype.runclientscript = function(caller, cdt, cdn) {
|
|||
validated = false;
|
||||
|
||||
// show error message
|
||||
console.group && console.group();
|
||||
console.log("----- error in client script -----");
|
||||
console.log("method: " + caller);
|
||||
console.log(e);
|
||||
console.log("error message: " + e.message);
|
||||
console.trace && console.trace();
|
||||
console.log("----- end of error message -----");
|
||||
console.group && console.groupEnd();
|
||||
this.log_error(caller, e);
|
||||
}
|
||||
if(caller && caller.toLowerCase()=='setup') {
|
||||
this.setup_client_js();
|
||||
|
|
@ -815,8 +808,8 @@ _f.Frm.prototype.setup_client_js = function(caller, cdt, cdn) {
|
|||
try {
|
||||
var tmp = eval(cs);
|
||||
} catch(e) {
|
||||
show_alert("Error in Client Script.")
|
||||
console.log(e);
|
||||
show_alert("Error in Client Script.");
|
||||
this.log_error(caller || "setup_client_js", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -833,6 +826,17 @@ _f.Frm.prototype.setup_client_js = function(caller, cdt, cdn) {
|
|||
}
|
||||
}
|
||||
|
||||
_f.Frm.prototype.log_error = function(caller, e) {
|
||||
console.group && console.group();
|
||||
console.log("----- error in client script -----");
|
||||
console.log("method: " + caller);
|
||||
console.log(e);
|
||||
console.log("error message: " + e.message);
|
||||
console.trace && console.trace();
|
||||
console.log("----- end of error message -----");
|
||||
console.group && console.groupEnd();
|
||||
}
|
||||
|
||||
_f.Frm.prototype.copy_doc = function(onload, from_amend) {
|
||||
if(!this.perm[0][CREATE]) {
|
||||
msgprint('You are not allowed to create '+this.meta.name);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue