Ver a proveniência

Merge pull request #1249 from neilLasrado/develop

Multiple fixes
version-14
Anand Doshi há 10 anos
ascendente
cometimento
a1ea29a5b7
2 ficheiros alterados com 18 adições e 0 eliminações
  1. +10
    -0
      frappe/public/js/frappe/form/control.js
  2. +8
    -0
      frappe/public/js/frappe/form/grid.js

+ 10
- 0
frappe/public/js/frappe/form/control.js Ver ficheiro

@@ -119,6 +119,16 @@ frappe.ui.form.ControlHTML = frappe.ui.form.Control.extend({
}, },
html: function(html) { html: function(html) {
this.$wrapper.html(html || this.get_content()); this.$wrapper.html(html || this.get_content());
},
set_value: function(html) {
if(html.appendTo) {
// jquery object
html.appendTo(this.$wrapper.empty());
} else {
// html
this.df.options = html;
this.html(html);
}
} }
}); });




+ 8
- 0
frappe/public/js/frappe/form/grid.js Ver ficheiro

@@ -53,6 +53,14 @@ frappe.ui.form.Grid = Class.extend({
var me = this, var me = this,
$rows = $(me.parent).find(".rows"), $rows = $(me.parent).find(".rows"),
data = this.get_data(); data = this.get_data();
if (this.frm && this.frm.docname) {
// use doc specific docfield object
this.df = frappe.meta.get_docfield(this.frm.doctype, this.df.fieldname, this.frm.docname);
} else {
// use non-doc specific docfield
this.df = frappe.meta.get_docfield(this.df.options, this.df.fieldname);
}


this.docfields = frappe.meta.get_docfields(this.doctype, this.frm.docname); this.docfields = frappe.meta.get_docfields(this.doctype, this.frm.docname);
this.display_status = frappe.perm.get_field_display_status(this.df, this.frm.doc, this.display_status = frappe.perm.get_field_display_status(this.df, this.frm.doc,


Carregando…
Cancelar
Guardar