From 9b64ca86162cdd71c665fe0cbce3fc5114f3ff80 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 1 May 2012 17:11:36 +0530 Subject: [PATCH] double column fix --- js/all-app.js | 3 ++- js/all-web.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/js/all-app.js b/js/all-app.js index 2526a05313..e5289fba22 100644 --- a/js/all-app.js +++ b/js/all-app.js @@ -210,7 +210,8 @@ wn.provide('wn.model');wn.model={no_value_type:['Section Break','Column Break',' * lib/js/wn/meta.js */ wn.provide('wn.meta.docfield_map');wn.provide('wn.meta.docfield_list');wn.provide('wn.meta.doctypes');$.extend(wn.meta,{add_field:function(df){wn.provide('wn.meta.docfield_map.'+df.parent);wn.meta.docfield_map[df.parent][df.fieldname||df.label]=df;if(!wn.meta.docfield_list[df.parent]) -wn.meta.docfield_list[df.parent]=[] +wn.meta.docfield_list[df.parent]=[];for(var i in wn.meta.docfield_list[df.parent]){var d=wn.meta.docfield_list[df.parent][i];if(df.fieldname==d.fieldname) +return;} wn.meta.docfield_list[df.parent].push(df);}}); /* * lib/js/wn/misc/tools.js diff --git a/js/all-web.js b/js/all-web.js index a91934bfa1..cb6efeb0cb 100644 --- a/js/all-web.js +++ b/js/all-web.js @@ -97,7 +97,8 @@ wn.provide('wn.model');wn.model={no_value_type:['Section Break','Column Break',' * lib/js/wn/meta.js */ wn.provide('wn.meta.docfield_map');wn.provide('wn.meta.docfield_list');wn.provide('wn.meta.doctypes');$.extend(wn.meta,{add_field:function(df){wn.provide('wn.meta.docfield_map.'+df.parent);wn.meta.docfield_map[df.parent][df.fieldname||df.label]=df;if(!wn.meta.docfield_list[df.parent]) -wn.meta.docfield_list[df.parent]=[] +wn.meta.docfield_list[df.parent]=[];for(var i in wn.meta.docfield_list[df.parent]){var d=wn.meta.docfield_list[df.parent][i];if(df.fieldname==d.fieldname) +return;} wn.meta.docfield_list[df.parent].push(df);}}); /* * lib/js/wn/misc/tools.js