[fix] [minor] show for comment in alert-warning
This commit is contained in:
parent
adae501f73
commit
9ddc77403f
1 changed files with 4 additions and 3 deletions
|
|
@ -21,7 +21,7 @@ wn.ui.form.Comments = Class.extend({
|
|||
.appendTo(this.row)
|
||||
.find("button")
|
||||
.click(function() {
|
||||
me.add_comment();
|
||||
me.add_comment(this);
|
||||
});
|
||||
this.list = $('<div class="comments" style="margin-top: 15px;"></div>')
|
||||
.appendTo(this.parent);
|
||||
|
|
@ -48,7 +48,7 @@ wn.ui.form.Comments = Class.extend({
|
|||
c.comment_on = dateutil.comment_when(c.creation);
|
||||
c.fullname = wn.user_info(c.comment_by).fullname;
|
||||
|
||||
$(repl('<div class="comment alert col-md-10" data-name="%(name)s">\
|
||||
$(repl('<div class="comment alert alert-warning col-md-10" data-name="%(name)s">\
|
||||
<div class="row">\
|
||||
<div class="col-md-1">\
|
||||
<span class="avatar avatar-small"><img src="%(image)s"></span>\
|
||||
|
|
@ -68,7 +68,7 @@ wn.ui.form.Comments = Class.extend({
|
|||
|
||||
});
|
||||
},
|
||||
add_comment: function() {
|
||||
add_comment: function(btn) {
|
||||
var me = this,
|
||||
txt = me.input.val();
|
||||
|
||||
|
|
@ -86,6 +86,7 @@ wn.ui.form.Comments = Class.extend({
|
|||
args: {
|
||||
doclist:[comment]
|
||||
},
|
||||
btn: btn,
|
||||
callback: function(r) {
|
||||
if(!r.exc) {
|
||||
me.frm.get_docinfo().comments =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue