diff --git a/frappe/public/js/frappe/form/control.js b/frappe/public/js/frappe/form/control.js index 7dbeb2d29b..088b595954 100644 --- a/frappe/public/js/frappe/form/control.js +++ b/frappe/public/js/frappe/form/control.js @@ -1126,7 +1126,9 @@ frappe.ui.form.ControlLink = frappe.ui.form.ControlData.extend({ frappe.set_route("Form", me.get_options(), value); }); - if(this.only_input) this.$input_area.find(".link-btn").remove(); + if(this.only_input && !this.with_link_btn) { + this.$input_area.find(".link-btn").remove(); + } }, open_advanced_search: function() { var doctype = this.get_options(); diff --git a/frappe/public/js/frappe/form/grid.js b/frappe/public/js/frappe/form/grid.js index a80caad4fc..9d066f14ba 100644 --- a/frappe/public/js/frappe/form/grid.js +++ b/frappe/public/js/frappe/form/grid.js @@ -691,6 +691,7 @@ frappe.ui.form.GridRow = Class.extend({ df: df, parent: parent, only_input: true, + with_link_btn: true, doctype: this.doc.doctype, docname: this.doc.name, frm: this.grid.frm @@ -706,8 +707,7 @@ frappe.ui.form.GridRow = Class.extend({ // TAB if(e.which==9) { // last row, last column - if(cint($(this).attr('data-col-idx')) === me.grid.static_display_template.length-1 && - me.doc.idx===me.frm.doc[me.grid.df.fieldname].length) { + if(me.grid.wrapper.find('input:enabled:last').get(0)===this) { setTimeout(function() { me.grid.add_new_row(null, null, true); diff --git a/frappe/public/js/frappe/views/reports/reportview.js b/frappe/public/js/frappe/views/reports/reportview.js index aabdccb8fd..f764e26069 100644 --- a/frappe/public/js/frappe/views/reports/reportview.js +++ b/frappe/public/js/frappe/views/reports/reportview.js @@ -244,7 +244,7 @@ frappe.views.ReportView = frappe.ui.Listing.extend({ } } if(!docfield) return; - + coldef = { id: c[0], field: c[0], diff --git a/socketio.js b/socketio.js index 8ef469a170..90f7ea2454 100644 --- a/socketio.js +++ b/socketio.js @@ -201,6 +201,7 @@ function get_url(socket, path) { } function can_subscribe_doc(args) { + if(!args) return; request.get(get_url(args.socket, '/api/method/frappe.async.can_subscribe_doc')) .type('form') .send({