Merge branch 'master' into edge

This commit is contained in:
Rushabh Mehta 2013-01-11 15:01:44 +05:30
commit 702fcf30fe
3 changed files with 10 additions and 4 deletions

View file

@ -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;
}
}
@ -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 = $("<input type='text'>").appendTo(this.input_area).get(0);
this.input = $("<input type='text' data-fieldtype='Date'>").appendTo(this.input_area).get(0);
$(this.input).datepicker({
dateFormat: me.user_fmt.replace('yyyy','yy'),

View file

@ -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 {

View file

@ -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