From aff9a59f2dfb5e7baadf411b0a6a7a0aee90fe6b Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 29 Jan 2015 19:49:34 +0530 Subject: [PATCH] [minor] removed pscript from Feature Setup, made Activity Type as mandator in Time Log --- erpnext/projects/doctype/time_log/time_log.json | 4 ++-- erpnext/public/js/feature_setup.js | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/erpnext/projects/doctype/time_log/time_log.json b/erpnext/projects/doctype/time_log/time_log.json index ebe09cf251..0867c5b9ab 100644 --- a/erpnext/projects/doctype/time_log/time_log.json +++ b/erpnext/projects/doctype/time_log/time_log.json @@ -76,7 +76,7 @@ "options": "Activity Type", "permlevel": 0, "read_only": 0, - "reqd": 0 + "reqd": 1 }, { "depends_on": "eval:doc.time_log_for != 'Manufacturing'", @@ -199,7 +199,7 @@ "icon": "icon-time", "idx": 1, "is_submittable": 1, - "modified": "2015-01-07 15:11:45.194002", + "modified": "2015-01-29 07:36:29.343589", "modified_by": "Administrator", "module": "Projects", "name": "Time Log", diff --git a/erpnext/public/js/feature_setup.js b/erpnext/public/js/feature_setup.js index d3ff49e9f9..536f956347 100644 --- a/erpnext/public/js/feature_setup.js +++ b/erpnext/public/js/feature_setup.js @@ -13,7 +13,8 @@ Dictionary Format } } // ====================================================================*/ -pscript.feature_dict = { +frappe.provide("erpnext.feature_setup"); +erpnext.feature_setup.feature_dict = { 'fs_projects': { 'BOM': {'fields':['project_name']}, 'Delivery Note': {'fields':['project_name']}, @@ -183,15 +184,16 @@ pscript.feature_dict = { } $(document).bind('form_refresh', function() { + var feature_dict = erpnext.feature_setup.feature_dict; for(var sys_feat in sys_defaults) { if(sys_defaults[sys_feat]=='0' - && (sys_feat in pscript.feature_dict)) { //"Features to hide" exists - if(cur_frm.doc.doctype in pscript.feature_dict[sys_feat]) { - for(var fort in pscript.feature_dict[sys_feat][cur_frm.doc.doctype]) { + && (sys_feat in feature_dict)) { //"Features to hide" exists + if(cur_frm.doc.doctype in feature_dict[sys_feat]) { + for(var fort in feature_dict[sys_feat][cur_frm.doc.doctype]) { if(fort=='fields') { - hide_field(pscript.feature_dict[sys_feat][cur_frm.doc.doctype][fort]); + hide_field(feature_dict[sys_feat][cur_frm.doc.doctype][fort]); } else if(cur_frm.fields_dict[fort]) { - cur_frm.fields_dict[fort].grid.set_column_disp(pscript.feature_dict[sys_feat][cur_frm.doc.doctype][fort], false); + cur_frm.fields_dict[fort].grid.set_column_disp(feature_dict[sys_feat][cur_frm.doc.doctype][fort], false); } else { msgprint(__('Grid "')+fort+__('" does not exists')); }