Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
eb5d725b
Commit
eb5d725b
authored
May 31, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delete sQuoteText info from cell comment
delete function asc_getWorkbookComments
parent
a9e1cb67
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
45 deletions
+4
-45
cell/Private/comments.js
cell/Private/comments.js
+0
-5
cell/api.js
cell/api.js
+0
-17
cell/model/CellComment.js
cell/model/CellComment.js
+4
-21
cell/model/Workbook.js
cell/model/Workbook.js
+0
-1
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+0
-1
No files found.
cell/Private/comments.js
View file @
eb5d725b
...
@@ -39,11 +39,6 @@
...
@@ -39,11 +39,6 @@
if
(
existComments
.
length
)
{
if
(
existComments
.
length
)
{
oComment
=
existComments
[
0
];
oComment
=
existComments
[
0
];
bChange
=
true
;
bChange
=
true
;
}
else
{
if
((
oComment
.
nCol
!=
null
)
&&
(
oComment
.
nRow
!=
null
))
{
var
cellAddress
=
new
AscCommon
.
CellAddress
(
oComment
.
nRow
,
oComment
.
nCol
,
0
);
oComment
.
sQuoteText
=
cellAddress
.
getID
()
+
"
:
"
+
this
.
worksheet
.
model
.
getCell
(
cellAddress
).
getValueWithFormat
();
}
}
}
}
}
...
...
cell/api.js
View file @
eb5d725b
...
@@ -2309,22 +2309,6 @@ var editor;
...
@@ -2309,22 +2309,6 @@ var editor;
return
ws
.
cellCommentator
.
hideComments
();
return
ws
.
cellCommentator
.
hideComments
();
};
};
spreadsheet_api
.
prototype
.
asc_getWorkbookComments
=
function
()
{
var
_this
=
this
,
comments
=
[];
if
(
_this
.
wb
)
{
for
(
var
key
in
_this
.
wb
.
wsViews
)
{
var
ws
=
_this
.
wb
.
wsViews
[
key
];
if
(
ws
)
{
for
(
var
i
=
0
;
i
<
ws
.
cellCommentator
.
aComments
.
length
;
i
++
)
{
var
comment
=
ws
.
cellCommentator
.
aComments
[
i
];
comments
.
push
({
"
Id
"
:
comment
.
asc_getId
(),
"
Comment
"
:
comment
});
}
}
}
}
return
comments
;
};
// Shapes
// Shapes
spreadsheet_api
.
prototype
.
setStartPointHistory
=
function
()
{
spreadsheet_api
.
prototype
.
setStartPointHistory
=
function
()
{
this
.
noCreatePoint
=
true
;
this
.
noCreatePoint
=
true
;
...
@@ -3393,7 +3377,6 @@ var editor;
...
@@ -3393,7 +3377,6 @@ var editor;
prot
[
"
asc_getComments
"
]
=
prot
.
asc_getComments
;
prot
[
"
asc_getComments
"
]
=
prot
.
asc_getComments
;
prot
[
"
asc_getDocumentComments
"
]
=
prot
.
asc_getDocumentComments
;
prot
[
"
asc_getDocumentComments
"
]
=
prot
.
asc_getDocumentComments
;
prot
[
"
asc_getWorkbookComments
"
]
=
prot
.
asc_getWorkbookComments
;
// Shapes
// Shapes
prot
[
"
setStartPointHistory
"
]
=
prot
.
setStartPointHistory
;
prot
[
"
setStartPointHistory
"
]
=
prot
.
setStartPointHistory
;
...
...
cell/model/CellComment.js
View file @
eb5d725b
...
@@ -145,7 +145,6 @@ function asc_CCommentData(obj) {
...
@@ -145,7 +145,6 @@ function asc_CCommentData(obj) {
nId
:
3
,
nId
:
3
,
nLevel
:
5
,
nLevel
:
5
,
sText
:
6
,
sText
:
6
,
sQuoteText
:
7
,
sTime
:
8
,
sTime
:
8
,
sUserId
:
9
,
sUserId
:
9
,
sUserName
:
10
,
sUserName
:
10
,
...
@@ -165,7 +164,6 @@ function asc_CCommentData(obj) {
...
@@ -165,7 +164,6 @@ function asc_CCommentData(obj) {
// Common
// Common
this
.
sText
=
""
;
this
.
sText
=
""
;
this
.
sQuoteText
=
""
;
this
.
sTime
=
""
;
this
.
sTime
=
""
;
this
.
sUserId
=
""
;
this
.
sUserId
=
""
;
this
.
sUserName
=
""
;
this
.
sUserName
=
""
;
...
@@ -184,7 +182,6 @@ function asc_CCommentData(obj) {
...
@@ -184,7 +182,6 @@ function asc_CCommentData(obj) {
// Common
// Common
this
.
sText
=
obj
.
sText
;
this
.
sText
=
obj
.
sText
;
this
.
sQuoteText
=
obj
.
sQuoteText
;
this
.
sTime
=
obj
.
sTime
;
this
.
sTime
=
obj
.
sTime
;
this
.
sUserId
=
obj
.
sUserId
;
this
.
sUserId
=
obj
.
sUserId
;
this
.
sUserName
=
obj
.
sUserName
;
this
.
sUserName
=
obj
.
sUserName
;
...
@@ -212,8 +209,10 @@ asc_CCommentData.prototype = {
...
@@ -212,8 +209,10 @@ asc_CCommentData.prototype = {
this
.
nId
=
"
sheet
"
+
this
.
wsId
+
"
_
"
+
this
.
guid
();
this
.
nId
=
"
sheet
"
+
this
.
wsId
+
"
_
"
+
this
.
guid
();
},
},
asc_putQuoteText
:
function
(
val
)
{
this
.
sQuoteText
=
val
;
},
asc_putQuoteText
:
function
(
val
)
{},
asc_getQuoteText
:
function
()
{
return
this
.
sQuoteText
;
},
asc_getQuoteText
:
function
()
{
return
AscCommon
.
g_oCellAddressUtils
.
getCellId
(
this
.
nRow
,
this
.
nCol
);
},
asc_putRow
:
function
(
val
)
{
this
.
nRow
=
val
;
},
asc_putRow
:
function
(
val
)
{
this
.
nRow
=
val
;
},
asc_getRow
:
function
()
{
return
this
.
nRow
;
},
asc_getRow
:
function
()
{
return
this
.
nRow
;
},
...
@@ -289,7 +288,6 @@ asc_CCommentData.prototype = {
...
@@ -289,7 +288,6 @@ asc_CCommentData.prototype = {
case
this
.
Properties
.
nId
:
return
this
.
nId
;
break
;
case
this
.
Properties
.
nId
:
return
this
.
nId
;
break
;
case
this
.
Properties
.
nLevel
:
return
this
.
nLevel
;
break
;
case
this
.
Properties
.
nLevel
:
return
this
.
nLevel
;
break
;
case
this
.
Properties
.
sText
:
return
this
.
sText
;
break
;
case
this
.
Properties
.
sText
:
return
this
.
sText
;
break
;
case
this
.
Properties
.
sQuoteText
:
return
this
.
sQuoteText
;
break
;
case
this
.
Properties
.
sTime
:
return
this
.
sTime
;
break
;
case
this
.
Properties
.
sTime
:
return
this
.
sTime
;
break
;
case
this
.
Properties
.
sUserId
:
return
this
.
sUserId
;
break
;
case
this
.
Properties
.
sUserId
:
return
this
.
sUserId
;
break
;
case
this
.
Properties
.
sUserName
:
return
this
.
sUserName
;
break
;
case
this
.
Properties
.
sUserName
:
return
this
.
sUserName
;
break
;
...
@@ -309,7 +307,6 @@ asc_CCommentData.prototype = {
...
@@ -309,7 +307,6 @@ asc_CCommentData.prototype = {
case
this
.
Properties
.
nId
:
this
.
nId
=
value
;
break
;
case
this
.
Properties
.
nId
:
this
.
nId
=
value
;
break
;
case
this
.
Properties
.
nLevel
:
this
.
nLevel
=
value
;
break
;
case
this
.
Properties
.
nLevel
:
this
.
nLevel
=
value
;
break
;
case
this
.
Properties
.
sText
:
this
.
sText
=
value
;
break
;
case
this
.
Properties
.
sText
:
this
.
sText
=
value
;
break
;
case
this
.
Properties
.
sQuoteText
:
this
.
sQuoteText
=
value
;
break
;
case
this
.
Properties
.
sTime
:
this
.
sTime
=
value
;
break
;
case
this
.
Properties
.
sTime
:
this
.
sTime
=
value
;
break
;
case
this
.
Properties
.
sUserId
:
this
.
sUserId
=
value
;
break
;
case
this
.
Properties
.
sUserId
:
this
.
sUserId
=
value
;
break
;
case
this
.
Properties
.
sUserName
:
this
.
sUserName
=
value
;
break
;
case
this
.
Properties
.
sUserName
:
this
.
sUserName
=
value
;
break
;
...
@@ -442,8 +439,6 @@ CCellCommentator.prototype.moveRangeComments = function(rangeFrom, rangeTo) {
...
@@ -442,8 +439,6 @@ CCellCommentator.prototype.moveRangeComments = function(rangeFrom, rangeTo) {
comment
.
nCol
+=
colOffset
;
comment
.
nCol
+=
colOffset
;
comment
.
nRow
+=
rowOffset
;
comment
.
nRow
+=
rowOffset
;
var
cellAddress
=
new
CellAddress
(
comment
.
nRow
,
comment
.
nCol
,
0
);
comment
.
sQuoteText
=
cellAddress
.
getID
()
+
"
:
"
+
this
.
worksheet
.
model
.
getCell
(
cellAddress
).
getValueWithFormat
();
this
.
worksheet
.
model
.
workbook
.
handlers
.
trigger
(
"
asc_onChangeCommentData
"
,
comment
.
asc_getId
(),
comment
);
this
.
worksheet
.
model
.
workbook
.
handlers
.
trigger
(
"
asc_onChangeCommentData
"
,
comment
.
asc_getId
(),
comment
);
var
commentAfter
=
new
asc_CCommentData
(
comment
);
var
commentAfter
=
new
asc_CCommentData
(
comment
);
...
@@ -488,10 +483,6 @@ CCellCommentator.prototype.prepareComments = function(arrComments) {
...
@@ -488,10 +483,6 @@ CCellCommentator.prototype.prepareComments = function(arrComments) {
CCellCommentator
.
prototype
.
addCommentSerialize
=
function
(
oComment
)
{
CCellCommentator
.
prototype
.
addCommentSerialize
=
function
(
oComment
)
{
if
(
oComment
)
{
if
(
oComment
)
{
if
(
!
oComment
.
bDocument
&&
(
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
();
}
this
.
aComments
.
push
(
oComment
);
this
.
aComments
.
push
(
oComment
);
}
}
};
};
...
@@ -1106,11 +1097,6 @@ CCellCommentator.prototype.changeComment = function(id, oComment, bChangeCoords,
...
@@ -1106,11 +1097,6 @@ CCellCommentator.prototype.changeComment = function(id, oComment, bChangeCoords,
comment
.
asc_putHiddenFlag
(
oComment
.
asc_getHiddenFlag
());
comment
.
asc_putHiddenFlag
(
oComment
.
asc_getHiddenFlag
());
comment
.
aReplies
=
[];
comment
.
aReplies
=
[];
if
(
!
comment
.
bDocument
&&
(
comment
.
nCol
!=
null
)
&&
(
comment
.
nRow
!=
null
)
)
{
var
cellAddress
=
new
CellAddress
(
comment
.
nRow
,
comment
.
nCol
,
0
);
comment
.
sQuoteText
=
cellAddress
.
getID
()
+
"
:
"
+
t
.
worksheet
.
model
.
getCell
(
cellAddress
).
getValueWithFormat
();
}
var
count
=
oComment
.
asc_getRepliesCount
();
var
count
=
oComment
.
asc_getRepliesCount
();
for
(
var
i
=
0
;
i
<
count
;
i
++
)
{
for
(
var
i
=
0
;
i
<
count
;
i
++
)
{
comment
.
asc_addReply
(
oComment
.
asc_getReply
(
i
));
comment
.
asc_addReply
(
oComment
.
asc_getReply
(
i
));
...
@@ -1320,9 +1306,6 @@ CCellCommentator.prototype.mergeComments = function (range) {
...
@@ -1320,9 +1306,6 @@ CCellCommentator.prototype.mergeComments = function (range) {
// add Comment
// add Comment
mergeComment
.
nCol
=
c1
;
mergeComment
.
nCol
=
c1
;
mergeComment
.
nRow
=
r1
;
mergeComment
.
nRow
=
r1
;
var
cellAddress
=
new
CellAddress
(
mergeComment
.
nRow
,
mergeComment
.
nCol
,
0
);
mergeComment
.
sQuoteText
=
cellAddress
.
getID
()
+
"
:
"
+
this
.
worksheet
.
model
.
getCell
(
cellAddress
).
getValueWithFormat
();
this
.
_addComment
(
mergeComment
,
false
,
true
);
this
.
_addComment
(
mergeComment
,
false
,
true
);
}
}
for
(
i
=
0
,
length
=
deleteComments
.
length
;
i
<
length
;
++
i
)
{
for
(
i
=
0
,
length
=
deleteComments
.
length
;
i
<
length
;
++
i
)
{
...
...
cell/model/Workbook.js
View file @
eb5d725b
...
@@ -1944,7 +1944,6 @@ function Workbook(eventsHandlers, oApi){
...
@@ -1944,7 +1944,6 @@ function Workbook(eventsHandlers, oApi){
this
.
oStyleManager
=
new
AscCommonExcel
.
StyleManager
();
this
.
oStyleManager
=
new
AscCommonExcel
.
StyleManager
();
this
.
calcChain
=
[];
this
.
calcChain
=
[];
this
.
aComments
=
[];
// Комментарии к документу
this
.
aComments
=
[];
// Комментарии к документу
this
.
aCommentsCoords
=
[];
this
.
aWorksheets
=
[];
this
.
aWorksheets
=
[];
this
.
aWorksheetsById
=
{};
this
.
aWorksheetsById
=
{};
this
.
cwf
=
{};
this
.
cwf
=
{};
...
...
cell/view/WorksheetView.js
View file @
eb5d725b
...
@@ -1160,7 +1160,6 @@
...
@@ -1160,7 +1160,6 @@
};
};
WorksheetView
.
prototype
.
_prepareComments
=
function
()
{
WorksheetView
.
prototype
.
_prepareComments
=
function
()
{
// Теперь получение всех комментариев через asc_getWorkbookComments
var
commentList
=
this
.
cellCommentator
.
prepareComments
(
this
.
model
.
aComments
);
var
commentList
=
this
.
cellCommentator
.
prepareComments
(
this
.
model
.
aComments
);
if
(
0
<
commentList
.
length
)
{
if
(
0
<
commentList
.
length
)
{
this
.
model
.
workbook
.
handlers
.
trigger
(
"
asc_onAddComments
"
,
commentList
);
this
.
model
.
workbook
.
handlers
.
trigger
(
"
asc_onAddComments
"
,
commentList
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment