[grid] ux fixes and fixes for frappe/erpnext#5376
This commit is contained in:
parent
947505f608
commit
f97654a7c7
4 changed files with 7 additions and 4 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ frappe.views.ReportView = frappe.ui.Listing.extend({
|
|||
}
|
||||
}
|
||||
if(!docfield) return;
|
||||
|
||||
|
||||
coldef = {
|
||||
id: c[0],
|
||||
field: c[0],
|
||||
|
|
|
|||
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue