From d79c33d48bb7e8dbc874a1cb704168367d001947 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 10 Jan 2013 19:51:26 +0530 Subject: [PATCH 1/3] fix in load reportview --- public/js/wn/views/load_reportview.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/wn/views/load_reportview.js b/public/js/wn/views/load_reportview.js index d1b7e94ce7..82cfd0ad23 100644 --- a/public/js/wn/views/load_reportview.js +++ b/public/js/wn/views/load_reportview.js @@ -3,7 +3,7 @@ wn.views.reportview = { show: function(dt, rep_name) { - wn.require('js/report-legacy.js'); + wn.require('js/report-legacy.min.js'); if(!_r.rb_con) { // first load From 0cbf704d6eccd25f89bd6f930939907918843430 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 11 Jan 2013 10:54:27 +0530 Subject: [PATCH 2/3] fields.js: cur_grid ref bugfix --- public/js/legacy/widgets/form/fields.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/legacy/widgets/form/fields.js b/public/js/legacy/widgets/form/fields.js index a4a0dbdc97..1c6167abfb 100644 --- a/public/js/legacy/widgets/form/fields.js +++ b/public/js/legacy/widgets/form/fields.js @@ -167,7 +167,7 @@ Field.prototype.get_status = function() { if(this.in_grid) a_o_s = this.grid.field.df.allow_on_submit; if(this.frm.meta.istable) { - a_o_s = cur_grid.field.df.allow_on_submit; + a_o_s = _f.cur_grid.field.df.allow_on_submit; } } From 293a965c521b8d9704cd061511723ff2a413fa83 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 11 Jan 2013 11:15:26 +0530 Subject: [PATCH 3/3] datepicker fixes --- public/js/legacy/widgets/form/fields.js | 2 +- public/js/legacy/widgets/form/form.js | 5 ++++- public/js/wn/ui/dialog.js | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/public/js/legacy/widgets/form/fields.js b/public/js/legacy/widgets/form/fields.js index 1c6167abfb..fdfa8ccc13 100644 --- a/public/js/legacy/widgets/form/fields.js +++ b/public/js/legacy/widgets/form/fields.js @@ -506,7 +506,7 @@ DateField.prototype.make_input = function() { this.user_fmt = sys_defaults.date_format; if(!this.user_fmt)this.user_fmt = 'dd-mm-yy'; - this.input = $("").appendTo(this.input_area).get(0); + this.input = $("").appendTo(this.input_area).get(0); $(this.input).datepicker({ dateFormat: me.user_fmt.replace('yyyy','yy'), diff --git a/public/js/legacy/widgets/form/form.js b/public/js/legacy/widgets/form/form.js index 8c3ac5aefb..ff575742ed 100644 --- a/public/js/legacy/widgets/form/form.js +++ b/public/js/legacy/widgets/form/form.js @@ -562,7 +562,10 @@ _f.Frm.prototype.refresh = function(docname) { // focus on first input if(this.doc.docstatus==0) { - $(this.wrapper).find('.form-layout-row :input:first').focus(); + var first = $(this.wrapper).find('.form-layout-row :input:first'); + if(first.attr("data-fieldtype")!="Date") { + first.focus(); + } } } else { diff --git a/public/js/wn/ui/dialog.js b/public/js/wn/ui/dialog.js index 7b2218a84b..35929b0d4c 100644 --- a/public/js/wn/ui/dialog.js +++ b/public/js/wn/ui/dialog.js @@ -94,7 +94,10 @@ wn.ui.Dialog = wn.ui.FieldGroup.extend({ if(this.onshow)this.onshow(); // focus on first input - $(this.wrapper).find(':input:first').focus(); + var first = $(this.wrapper).find(':input:first'); + if(first.attr("data-fieldtype")!="Date") { + first.focus(); + } }, hide: function() { // call onhide