Fix Bug 37570
This commit is contained in:
parent
2e15b1dbc1
commit
0523524829
|
@ -760,6 +760,7 @@ define([
|
|||
user = usersStore.findWhere({id: userId});
|
||||
if (user) {
|
||||
this.getPopover() && this.getPopover().saveText();
|
||||
this.view.saveText();
|
||||
cur.set('lock', true);
|
||||
cur.set('lockuserid', this.view.getUserName(user.get('username')));
|
||||
}
|
||||
|
@ -771,6 +772,7 @@ define([
|
|||
if (cur) {
|
||||
cur.set('lock', false);
|
||||
this.getPopover() && this.getPopover().loadText();
|
||||
this.view.loadText();
|
||||
}
|
||||
},
|
||||
onApiShowComment: function (uids, posX, posY, leftX, opts, hint) {
|
||||
|
|
|
@ -183,7 +183,7 @@ define([
|
|||
newHeight = 0;
|
||||
|
||||
function updateTextBoxHeight() {
|
||||
scrollPos = $(view.scroller.el).scrollTop();
|
||||
scrollPos = view.scroller.getScrollTop();
|
||||
|
||||
if (domTextBox.scrollHeight > domTextBox.clientHeight) {
|
||||
textBox.css({height: (domTextBox.scrollHeight + lineHeight) + 'px'});
|
||||
|
@ -841,6 +841,7 @@ define([
|
|||
render: function () {
|
||||
var me = this;
|
||||
|
||||
if (!this.rendered) {
|
||||
this.$el.html(this.template({
|
||||
textAddCommentToDoc: me.textAddCommentToDoc,
|
||||
textAddComment: me.textAddComment,
|
||||
|
@ -884,7 +885,7 @@ define([
|
|||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
var CommentsPanelDataView = Common.UI.DataView.extend((function() {
|
||||
|
||||
var parentView = me;
|
||||
|
@ -983,7 +984,6 @@ define([
|
|||
})());
|
||||
if (CommentsPanelDataView) {
|
||||
if (this.commentsView) {
|
||||
this.commentsView.render($('.messages-ct',me.el));
|
||||
this.commentsView.onResetItems();
|
||||
} else {
|
||||
this.commentsView = new CommentsPanelDataView({
|
||||
|
@ -1139,8 +1139,9 @@ define([
|
|||
}
|
||||
}
|
||||
|
||||
this.setupLayout();
|
||||
if (!this.rendered) this.setupLayout();
|
||||
this.update();
|
||||
this.rendered = true;
|
||||
|
||||
return this;
|
||||
},
|
||||
|
@ -1204,6 +1205,23 @@ define([
|
|||
this.showEditContainer(false);
|
||||
},
|
||||
|
||||
saveText: function (clear) {
|
||||
if (this.commentsView && this.commentsView.cmpEl.find('.lock-area').length<1) {
|
||||
this.textVal = undefined;
|
||||
if (!clear) {
|
||||
this.textVal = this.commentsView.getActiveTextBoxVal();
|
||||
} else {
|
||||
this.commentsView.clearTextBoxBind();
|
||||
}
|
||||
}
|
||||
},
|
||||
loadText: function () {
|
||||
if (this.textVal && this.commentsView) {
|
||||
var textBox = this.commentsView.getTextBox();
|
||||
textBox && textBox.val(this.textVal);
|
||||
}
|
||||
},
|
||||
|
||||
hookTextBox: function () {
|
||||
var me = this,
|
||||
textBox = this.commentsView.getTextBox();
|
||||
|
|
Loading…
Reference in a new issue