Merge pull request #775 from rmehta/aug-14
[hot] double clicking fix and removed console.log
This commit is contained in:
commit
f52202808a
3 changed files with 7 additions and 5 deletions
|
|
@ -64,9 +64,6 @@ frappe.ui.form.Layout = Class.extend({
|
|||
});
|
||||
if(this.frm)
|
||||
$(this.frm.wrapper).trigger("refresh-fields");
|
||||
|
||||
console.log(this.wrapper.find(".frappe-control:visible"));
|
||||
|
||||
setTimeout(function() {
|
||||
if(!(me.wrapper.find(".frappe-control:visible").length)) {
|
||||
$('<div class="alert alert-info empty-form-alert">'+__("This form does not have any input")+'</div>')
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
frappe.provide("frappe.ui.form");
|
||||
|
||||
frappe.ui.form.save = function(frm, action, callback, btn) {
|
||||
$(btn).prop("disabled", true);
|
||||
|
||||
var save = function() {
|
||||
check_name();
|
||||
if(check_mandatory()) {
|
||||
|
|
@ -16,6 +18,8 @@ frappe.ui.form.save = function(frm, action, callback, btn) {
|
|||
},
|
||||
btn: btn
|
||||
});
|
||||
} else {
|
||||
$(btn).prop("disabled", false);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -41,6 +45,7 @@ frappe.ui.form.save = function(frm, action, callback, btn) {
|
|||
doc.__newname = strip(newname);
|
||||
} else {
|
||||
msgprint(__("Name is required"));
|
||||
$(btn).prop("disabled", false);
|
||||
throw "name required";
|
||||
}
|
||||
}
|
||||
|
|
@ -96,7 +101,7 @@ frappe.ui.form.save = function(frm, action, callback, btn) {
|
|||
var scroll_to = function(fieldname) {
|
||||
var f = cur_frm.fields_dict[fieldname];
|
||||
if(f) {
|
||||
$(document).scrollTop($(f.wrapper).offset().top + 100);
|
||||
$(document).scrollTop($(f.wrapper).offset().top - 80);
|
||||
}
|
||||
frm.scroll_set = true;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ $.extend(frappe.ui.toolbar, {
|
|||
.insertBefore(menu.find(".divider"))
|
||||
.find("a")
|
||||
.click(function() {
|
||||
click();
|
||||
click.apply(this);
|
||||
});
|
||||
},
|
||||
get_menu: function(label) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue