From 457743941ccf9bfb5f4dca25df255026fa06689a Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 22 Mar 2012 12:40:09 +0530 Subject: [PATCH] allow doctype doctype --- js/all-app.js | 2 +- version.num | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/js/all-app.js b/js/all-app.js index 40a67fc2a16..28f0e45013f 100644 --- a/js/all-app.js +++ b/js/all-app.js @@ -1658,7 +1658,7 @@ var doc=locals[f.doctype][f.docname];var sl=this.get_status_tags(doc,f);this.set */ wn.provide('_f');_f.frms={};_f.Frm=function(doctype,parent){this.docname='';this.doctype=doctype;this.display=0;var me=this;this.is_editable={};this.opendocs={};this.sections=[];this.grids=[];this.cscript={};this.pformat={};this.fetch_dict={};this.parent=parent;this.tinymce_id_list=[];this.setup_meta(doctype);var me=this;$(document).bind('rename',function(event,dt,old_name,new_name){if(dt==me.doctype) me.rename_notify(dt,old_name,new_name)});} -_f.Frm.prototype.check_doctype_conflict=function(docname){var me=this;if(this.doctype=='DocType'){if(wn.views.formview[docname]){msgprint("Cannot open DocType when its instance is open") +_f.Frm.prototype.check_doctype_conflict=function(docname){var me=this;if(this.doctype=='DocType'&&docname=='DocType'){msgprint('Allowing DocType, DocType. Be careful!')}else if(this.doctype=='DocType'){if(wn.views.formview[docname]){msgprint("Cannot open DocType when its instance is open") throw'doctype open conflict'}}else{if(wn.views.formview.DocType&&wn.views.formview.DocType.frm.opendocs[this.doctype]){msgprint("Cannot open instance when its DocType is open") throw'doctype open conflict'}}} _f.Frm.prototype.setup=function(){var me=this;this.fields=[];this.fields_dict={};this.wrapper=this.parent;this.setup_print_layout();this.saved_wrapper=$a(this.wrapper,'div');this.setup_std_layout();this.setup_client_script();this.setup_done=true;} diff --git a/version.num b/version.num index 5b2b555c51a..438ea09fbbc 100644 --- a/version.num +++ b/version.num @@ -1 +1 @@ -1340 \ No newline at end of file +1341 \ No newline at end of file