Merge pull request #879 from rmehta/item-variants
[enhancement] append feature in frm.set_intro
This commit is contained in:
commit
3851baecca
2 changed files with 4 additions and 4 deletions
|
|
@ -99,13 +99,13 @@ frappe.utils = {
|
|||
return list;
|
||||
}
|
||||
},
|
||||
set_intro: function(me, wrapper, txt) {
|
||||
set_intro: function(me, wrapper, txt, append) {
|
||||
if(!me.intro_area) {
|
||||
me.intro_area = $('<div class="alert alert-info form-intro-area">')
|
||||
.prependTo(wrapper);
|
||||
}
|
||||
if(txt) {
|
||||
me.intro_area.html(txt);
|
||||
me.intro_area.html(((append && strip(me.intro_area.text())) ? (me.intro_area.html() + "<br><br>") : "") + txt);
|
||||
} else {
|
||||
me.intro_area.remove();
|
||||
me.intro_area = null;
|
||||
|
|
|
|||
|
|
@ -696,8 +696,8 @@ _f.Frm.prototype.get_perm = function(permlevel, access_type) {
|
|||
}
|
||||
|
||||
|
||||
_f.Frm.prototype.set_intro = function(txt) {
|
||||
frappe.utils.set_intro(this, this.body, txt);
|
||||
_f.Frm.prototype.set_intro = function(txt, append) {
|
||||
frappe.utils.set_intro(this, this.body, txt, append);
|
||||
}
|
||||
|
||||
_f.Frm.prototype.set_footnote = function(txt) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue