Commit 1d050aac authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Убрал добавление комментариев в Private

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66124 954022d7-b5bf-4e40-9824-e11837661b57
parent 37289cb5
......@@ -16,14 +16,43 @@
var prot;
asc['spreadsheet_api'].prototype.asc_addComment = function(oComment) {
if (oComment.bDocument) {
this.wb.cellCommentator.addComment(oComment);
} else {
var ws = this.wb.getWorksheet();
ws.cellCommentator.addComment(oComment);
}
var oPlace = oComment.bDocument ? this.wb : this.wb.getWorksheet();
oPlace.cellCommentator.addComment(oComment);
};
prot = asc['spreadsheet_api'].prototype;
prot['asc_addComment'] = prot.asc_addComment;
})(jQuery, window);
CCellCommentator.prototype.addComment = function(comment, bIsNotUpdate) {
var t = this;
var oComment = comment;
var bChange = false;
oComment.wsId = this.worksheet.model.getId();
oComment.setId();
if (!oComment.bDocument) {
if (!bIsNotUpdate) {
oComment.asc_putCol(this.worksheet.getSelectedColumnIndex());
oComment.asc_putRow(this.worksheet.getSelectedRowIndex());
}
var existComments = this.getComments(oComment.nCol, oComment.nRow);
if (existComments.length) {
oComment = existComments[0];
bChange = true;
} else {
if ((oComment.nCol != null) && (oComment.nRow != null)) {
var cellAddress = new CellAddress(oComment.nRow, oComment.nCol, 0);
oComment.sQuoteText = cellAddress.getID() + " : " + this.worksheet.model.getCell(cellAddress).getValueWithFormat();
}
}
}
var onAddCommentCallback = function (isSuccess) {
if (false === isSuccess)
return;
t._addComment(oComment, bChange, bIsNotUpdate);
};
this.isLockedComment(oComment, onAddCommentCallback);
};
\ No newline at end of file
......@@ -1143,36 +1143,6 @@ CCellCommentator.prototype.findComment = function(id) {
};
CCellCommentator.prototype.addComment = function(comment, bIsNotUpdate) {
var t = this;
var oComment = comment;
var bChange = false;
oComment.wsId = this.worksheet.model.getId();
oComment.setId();
if (!oComment.bDocument) {
if (!bIsNotUpdate) {
oComment.asc_putCol(this.worksheet.getSelectedColumnIndex());
oComment.asc_putRow(this.worksheet.getSelectedRowIndex());
}
var existComments = this.getComments(oComment.nCol, oComment.nRow);
if (existComments.length) {
oComment = existComments[0];
bChange = true;
} else {
if ((oComment.nCol != null) && (oComment.nRow != null)) {
var cellAddress = new CellAddress(oComment.nRow, oComment.nCol, 0);
oComment.sQuoteText = cellAddress.getID() + " : " + this.worksheet.model.getCell(cellAddress).getValueWithFormat();
}
}
}
var onAddCommentCallback = function (isSuccess) {
if (false === isSuccess)
return;
t._addComment(oComment, bChange, bIsNotUpdate);
};
this.isLockedComment(oComment, onAddCommentCallback);
};
CCellCommentator.prototype.changeComment = function(id, oComment, bChangeCoords, bNoEvent, bNoAscLock, bNoDraw) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment