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
291e0770
Commit
291e0770
authored
Apr 20, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
History constants to closure
parent
ea6b2f1f
Changes
12
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
396 additions
and
375 deletions
+396
-375
cell/api.js
cell/api.js
+1
-1
cell/model/CellComment.js
cell/model/CellComment.js
+11
-11
cell/model/History.js
cell/model/History.js
+122
-113
cell/model/UndoRedo.js
cell/model/UndoRedo.js
+82
-82
cell/model/Workbook.js
cell/model/Workbook.js
+76
-76
cell/model/WorkbookElems.js
cell/model/WorkbookElems.js
+42
-42
cell/model/autofilters.js
cell/model/autofilters.js
+40
-40
cell/native/native.js
cell/native/native.js
+6
-0
cell/view/WorkbookView.js
cell/view/WorkbookView.js
+8
-8
cell/view/WorksheetView.js
cell/view/WorksheetView.js
+1
-1
common/Native/native.js
common/Native/native.js
+6
-0
common/editorscommon.js
common/editorscommon.js
+1
-1
No files found.
cell/api.js
View file @
291e0770
...
...
@@ -3022,7 +3022,7 @@ var editor;
}
History
.
Create_NewPoint
();
//не делаем Duplicate потому что предполагаем что схема не будет менять частями, а только обьектом целиком.
History
.
Add
(
AscCommonExcel
.
g_oUndoRedoWorkbook
,
historyitem_Workbook_ChangeColorScheme
,
null
,
null
,
new
AscCommonExcel
.
UndoRedoData_ClrScheme
(
oldClrScheme
,
theme
.
themeElements
.
clrScheme
));
History
.
Add
(
AscCommonExcel
.
g_oUndoRedoWorkbook
,
AscCH
.
historyitem_Workbook_ChangeColorScheme
,
null
,
null
,
new
AscCommonExcel
.
UndoRedoData_ClrScheme
(
oldClrScheme
,
theme
.
themeElements
.
clrScheme
));
t
.
asc_AfterChangeColorScheme
();
}
};
...
...
cell/model/CellComment.js
View file @
291e0770
...
...
@@ -474,7 +474,7 @@ CCellCommentator.prototype.moveRangeComments = function(rangeFrom, rangeTo) {
compositeComment
.
commentAfter
=
commentAfter
;
History
.
Create_NewPoint
();
History
.
Add
(
AscCommonExcel
.
g_oUndoRedoComment
,
historyitem_Comment_Change
,
this
.
worksheet
.
model
.
getId
(),
null
,
compositeComment
);
History
.
Add
(
AscCommonExcel
.
g_oUndoRedoComment
,
AscCH
.
historyitem_Comment_Change
,
this
.
worksheet
.
model
.
getId
(),
null
,
compositeComment
);
}
}
}
...
...
@@ -1148,7 +1148,7 @@ CCellCommentator.prototype.changeComment = function(id, oComment, bChangeCoords,
compositeComment
.
commentAfter
=
commentAfter
;
History
.
Create_NewPoint
();
History
.
Add
(
AscCommonExcel
.
g_oUndoRedoComment
,
historyitem_Comment_Change
,
t
.
worksheet
.
model
.
getId
(),
null
,
compositeComment
);
History
.
Add
(
AscCommonExcel
.
g_oUndoRedoComment
,
AscCH
.
historyitem_Comment_Change
,
t
.
worksheet
.
model
.
getId
(),
null
,
compositeComment
);
}
if
(
!
bNoDraw
)
...
...
@@ -1255,7 +1255,7 @@ CCellCommentator.prototype._addComment = function (oComment, bChange, bIsNotUpda
// Add new comment
if
(
!
bChange
)
{
History
.
Create_NewPoint
();
History
.
Add
(
AscCommonExcel
.
g_oUndoRedoComment
,
historyitem_Comment_Add
,
this
.
worksheet
.
model
.
getId
(),
null
,
new
asc_CCommentData
(
oComment
));
History
.
Add
(
AscCommonExcel
.
g_oUndoRedoComment
,
AscCH
.
historyitem_Comment_Add
,
this
.
worksheet
.
model
.
getId
(),
null
,
new
asc_CCommentData
(
oComment
));
this
.
aComments
.
push
(
oComment
);
...
...
@@ -1276,7 +1276,7 @@ CCellCommentator.prototype._removeComment = function (comment, bNoEvent, isDraw)
if
(
this
.
bSaveHistory
)
{
History
.
Create_NewPoint
();
History
.
Add
(
AscCommonExcel
.
g_oUndoRedoComment
,
historyitem_Comment_Remove
,
this
.
worksheet
.
model
.
getId
(),
null
,
new
asc_CCommentData
(
comment
.
oParent
.
aReplies
[
i
]));
History
.
Add
(
AscCommonExcel
.
g_oUndoRedoComment
,
AscCH
.
historyitem_Comment_Remove
,
this
.
worksheet
.
model
.
getId
(),
null
,
new
asc_CCommentData
(
comment
.
oParent
.
aReplies
[
i
]));
}
comment
.
oParent
.
aReplies
.
splice
(
i
,
1
);
...
...
@@ -1289,7 +1289,7 @@ CCellCommentator.prototype._removeComment = function (comment, bNoEvent, isDraw)
if
(
this
.
bSaveHistory
)
{
History
.
Create_NewPoint
();
History
.
Add
(
AscCommonExcel
.
g_oUndoRedoComment
,
historyitem_Comment_Remove
,
this
.
worksheet
.
model
.
getId
(),
null
,
new
asc_CCommentData
(
this
.
aComments
[
i
]));
History
.
Add
(
AscCommonExcel
.
g_oUndoRedoComment
,
AscCH
.
historyitem_Comment_Remove
,
this
.
worksheet
.
model
.
getId
(),
null
,
new
asc_CCommentData
(
this
.
aComments
[
i
]));
}
this
.
aComments
.
splice
(
i
,
1
);
...
...
@@ -1358,7 +1358,7 @@ CCellCommentator.prototype.Undo = function(type, data) {
var
i
,
parentComment
;
switch
(
type
)
{
case
historyitem_Comment_Add
:
case
AscCH
.
historyitem_Comment_Add
:
if
(
data
.
oParent
)
{
parentComment
=
this
.
findComment
(
data
.
oParent
.
asc_getId
());
for
(
i
=
0
;
i
<
parentComment
.
aReplies
.
length
;
i
++
)
{
...
...
@@ -1378,7 +1378,7 @@ CCellCommentator.prototype.Undo = function(type, data) {
}
break
;
case
historyitem_Comment_Remove
:
case
AscCH
.
historyitem_Comment_Remove
:
if
(
data
.
oParent
)
{
parentComment
=
this
.
findComment
(
data
.
oParent
.
asc_getId
());
parentComment
.
aReplies
.
push
(
data
);
...
...
@@ -1388,7 +1388,7 @@ CCellCommentator.prototype.Undo = function(type, data) {
}
break
;
case
historyitem_Comment_Change
:
case
AscCH
.
historyitem_Comment_Change
:
if
(
data
.
commentAfter
.
oParent
)
{
parentComment
=
this
.
findComment
(
data
.
commentAfter
.
oParent
.
asc_getId
());
for
(
i
=
0
;
i
<
parentComment
.
aReplies
.
length
;
i
++
)
{
...
...
@@ -1417,7 +1417,7 @@ CCellCommentator.prototype.Redo = function(type, data) {
var
parentComment
,
i
;
switch
(
type
)
{
case
historyitem_Comment_Add
:
case
AscCH
.
historyitem_Comment_Add
:
if
(
data
.
oParent
)
{
parentComment
=
this
.
findComment
(
data
.
oParent
.
asc_getId
());
parentComment
.
aReplies
.
push
(
data
);
...
...
@@ -1427,7 +1427,7 @@ CCellCommentator.prototype.Redo = function(type, data) {
}
break
;
case
historyitem_Comment_Remove
:
case
AscCH
.
historyitem_Comment_Remove
:
if
(
data
.
oParent
)
{
parentComment
=
this
.
findComment
(
data
.
oParent
.
asc_getId
());
for
(
i
=
0
;
i
<
parentComment
.
aReplies
.
length
;
i
++
)
{
...
...
@@ -1447,7 +1447,7 @@ CCellCommentator.prototype.Redo = function(type, data) {
}
break
;
case
historyitem_Comment_Change
:
case
AscCH
.
historyitem_Comment_Change
:
if
(
data
.
commentBefore
.
oParent
)
{
parentComment
=
this
.
findComment
(
data
.
commentBefore
.
oParent
.
asc_getId
());
for
(
i
=
0
;
i
<
parentComment
.
aReplies
.
length
;
i
++
)
{
...
...
cell/model/History.js
View file @
291e0770
This diff is collapsed.
Click to expand it.
cell/model/UndoRedo.js
View file @
291e0770
This diff is collapsed.
Click to expand it.
cell/model/Workbook.js
View file @
291e0770
This diff is collapsed.
Click to expand it.
cell/model/WorkbookElems.js
View file @
291e0770
This diff is collapsed.
Click to expand it.
cell/model/autofilters.js
View file @
291e0770
This diff is collapsed.
Click to expand it.
cell/native/native.js
View file @
291e0770
...
...
@@ -50,6 +50,12 @@ var Asc = window["Asc"];
window
[
"
AscCommon
"
]
=
{};
var
AscCommon
=
window
[
"
AscCommon
"
];
window
[
"
AscDFH
"
]
=
{};
var
AscDFH
=
window
[
"
AscDFH
"
];
window
[
"
AscCH
"
]
=
{};
var
AscCH
=
window
[
"
AscCH
"
];
window
[
"
AscCommonExcel
"
]
=
{};
var
AscCommonExcel
=
window
[
"
AscCommonExcel
"
];
...
...
cell/view/WorkbookView.js
View file @
291e0770
...
...
@@ -668,30 +668,30 @@
});
this
.
model
.
handlers
.
add
(
"
undoRedoAddRemoveRowCols
"
,
function
(
sheetId
,
type
,
range
,
bUndo
)
{
if
(
true
===
bUndo
)
{
if
(
historyitem_Worksheet_AddRows
===
type
)
{
if
(
AscCH
.
historyitem_Worksheet_AddRows
===
type
)
{
self
.
collaborativeEditing
.
removeRowsRange
(
sheetId
,
range
.
clone
(
true
));
self
.
collaborativeEditing
.
undoRows
(
sheetId
,
range
.
r2
-
range
.
r1
+
1
);
}
else
if
(
historyitem_Worksheet_RemoveRows
===
type
)
{
}
else
if
(
AscCH
.
historyitem_Worksheet_RemoveRows
===
type
)
{
self
.
collaborativeEditing
.
addRowsRange
(
sheetId
,
range
.
clone
(
true
));
self
.
collaborativeEditing
.
undoRows
(
sheetId
,
range
.
r2
-
range
.
r1
+
1
);
}
else
if
(
historyitem_Worksheet_AddCols
===
type
)
{
}
else
if
(
AscCH
.
historyitem_Worksheet_AddCols
===
type
)
{
self
.
collaborativeEditing
.
removeColsRange
(
sheetId
,
range
.
clone
(
true
));
self
.
collaborativeEditing
.
undoCols
(
sheetId
,
range
.
c2
-
range
.
c1
+
1
);
}
else
if
(
historyitem_Worksheet_RemoveCols
===
type
)
{
}
else
if
(
AscCH
.
historyitem_Worksheet_RemoveCols
===
type
)
{
self
.
collaborativeEditing
.
addColsRange
(
sheetId
,
range
.
clone
(
true
));
self
.
collaborativeEditing
.
undoCols
(
sheetId
,
range
.
c2
-
range
.
c1
+
1
);
}
}
else
{
if
(
historyitem_Worksheet_AddRows
===
type
)
{
if
(
AscCH
.
historyitem_Worksheet_AddRows
===
type
)
{
self
.
collaborativeEditing
.
addRowsRange
(
sheetId
,
range
.
clone
(
true
));
self
.
collaborativeEditing
.
addRows
(
sheetId
,
range
.
r1
,
range
.
r2
-
range
.
r1
+
1
);
}
else
if
(
historyitem_Worksheet_RemoveRows
===
type
)
{
}
else
if
(
AscCH
.
historyitem_Worksheet_RemoveRows
===
type
)
{
self
.
collaborativeEditing
.
removeRowsRange
(
sheetId
,
range
.
clone
(
true
));
self
.
collaborativeEditing
.
removeRows
(
sheetId
,
range
.
r1
,
range
.
r2
-
range
.
r1
+
1
);
}
else
if
(
historyitem_Worksheet_AddCols
===
type
)
{
}
else
if
(
AscCH
.
historyitem_Worksheet_AddCols
===
type
)
{
self
.
collaborativeEditing
.
addColsRange
(
sheetId
,
range
.
clone
(
true
));
self
.
collaborativeEditing
.
addCols
(
sheetId
,
range
.
c1
,
range
.
c2
-
range
.
c1
+
1
);
}
else
if
(
historyitem_Worksheet_RemoveCols
===
type
)
{
}
else
if
(
AscCH
.
historyitem_Worksheet_RemoveCols
===
type
)
{
self
.
collaborativeEditing
.
removeColsRange
(
sheetId
,
range
.
clone
(
true
));
self
.
collaborativeEditing
.
removeCols
(
sheetId
,
range
.
c1
,
range
.
c2
-
range
.
c1
+
1
);
}
...
...
cell/view/WorksheetView.js
View file @
291e0770
...
...
@@ -3509,7 +3509,7 @@
}
History
.
Create_NewPoint
();
var
oData
=
new
AscCommonExcel
.
UndoRedoData_FromTo
(
new
AscCommonExcel
.
UndoRedoData_BBox
(
new
asc_Range
(
lastCol
,
lastRow
,
lastCol
,
lastRow
)
),
new
AscCommonExcel
.
UndoRedoData_BBox
(
new
asc_Range
(
col
,
row
,
col
,
row
)
),
null
);
History
.
Add
(
AscCommonExcel
.
g_oUndoRedoWorksheet
,
historyitem_Worksheet_ChangeFrozenCell
,
this
.
model
.
getId
(),
null
,
oData
);
History
.
Add
(
AscCommonExcel
.
g_oUndoRedoWorksheet
,
AscCH
.
historyitem_Worksheet_ChangeFrozenCell
,
this
.
model
.
getId
(),
null
,
oData
);
var
isUpdate
=
false
;
if
(
0
===
col
&&
0
===
row
)
{
// Очистка
...
...
common/Native/native.js
View file @
291e0770
...
...
@@ -46,6 +46,12 @@ var Asc = window["Asc"];
window
[
"
AscCommon
"
]
=
{};
var
AscCommon
=
window
[
"
AscCommon
"
];
window
[
"
AscDFH
"
]
=
{};
var
AscDFH
=
window
[
"
AscDFH
"
];
window
[
"
AscCH
"
]
=
{};
var
AscCH
=
window
[
"
AscCH
"
];
window
[
"
AscCommonExcel
"
]
=
{};
var
AscCommonExcel
=
window
[
"
AscCommonExcel
"
];
...
...
common/editorscommon.js
View file @
291e0770
...
...
@@ -2362,7 +2362,7 @@ CTableId.prototype.Load_Changes = function(Reader, Reader2)
// console.log("----------------------------");
// console.log("FileCheckSum " + FileCheckSum);
// console.log("FileSize " + FileSize);
// console.log("Description " + Description + " " + Get_HistoryPointStringDescription(Description));
// console.log("Description " + Description + " " +
AscDFH.
Get_HistoryPointStringDescription(Description));
// console.log("PointIndex " + PointIndex);
// console.log("StartPoint " + StartPoint);
// console.log("LastPoint " + LastPoint);
...
...
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