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
30573e66
Commit
30573e66
authored
Jul 13, 2017
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add asc_setShowRowHeaders, asc_setShowColHeaders, asc_setShowRowStripes, asc_setShowColStripes;
parent
6f032292
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
109 additions
and
7 deletions
+109
-7
cell/api.js
cell/api.js
+40
-7
cell/model/PivotTables.js
cell/model/PivotTables.js
+43
-0
cell/model/UndoRedo.js
cell/model/UndoRedo.js
+26
-0
No files found.
cell/api.js
View file @
30573e66
...
...
@@ -312,6 +312,7 @@ var editor;
AscCommonExcel
.
g_oUndoRedoComment
=
new
AscCommonExcel
.
UndoRedoComment
(
wbModel
);
AscCommonExcel
.
g_oUndoRedoAutoFilters
=
new
AscCommonExcel
.
UndoRedoAutoFilters
(
wbModel
);
AscCommonExcel
.
g_oUndoRedoSparklines
=
new
AscCommonExcel
.
UndoRedoSparklines
(
wbModel
);
AscCommonExcel
.
g_oUndoRedoPivotTables
=
new
AscCommonExcel
.
UndoRedoPivotTables
(
wbModel
);
AscCommonExcel
.
g_DefNameWorksheet
=
new
AscCommonExcel
.
Worksheet
(
wbModel
,
-
1
);
};
...
...
@@ -559,10 +560,6 @@ var editor;
return
this
.
wb
.
af_getTablePictures
(
props
,
pivot
);
};
spreadsheet_api
.
prototype
.
asc_changePivotStyle
=
function
(
props
,
pivot
)
{
};
spreadsheet_api
.
prototype
.
getViewMode
=
function
()
{
return
this
.
isViewMode
;
};
...
...
@@ -1718,6 +1715,30 @@ var editor;
this
.
collaborativeEditing
.
onEndCheckLock
(
callback
);
};
spreadsheet_api
.
prototype
.
_isLockedPivot
=
function
(
pivotName
,
callback
)
{
var
lockInfo
=
this
.
collaborativeEditing
.
getLockInfo
(
c_oAscLockTypeElem
.
Object
,
/*subType*/
null
,
this
.
asc_getActiveWorksheetId
(),
pivotName
);
if
(
false
===
this
.
collaborativeEditing
.
getCollaborativeEditing
())
{
// Пользователь редактирует один: не ждем ответа, а сразу продолжаем редактирование
AscCommonExcel
.
applyFunction
(
callback
,
true
);
callback
=
undefined
;
}
if
(
false
!==
this
.
collaborativeEditing
.
getLockIntersection
(
lockInfo
,
c_oAscLockTypes
.
kLockTypeMine
,
false
))
{
// Редактируем сами
AscCommonExcel
.
applyFunction
(
callback
,
true
);
return
;
}
else
if
(
false
!==
this
.
collaborativeEditing
.
getLockIntersection
(
lockInfo
,
c_oAscLockTypes
.
kLockTypeOther
,
false
))
{
// Уже ячейку кто-то редактирует
AscCommonExcel
.
applyFunction
(
callback
,
false
);
return
;
}
this
.
collaborativeEditing
.
onStartCheckLock
();
this
.
collaborativeEditing
.
addCheckLock
(
lockInfo
);
this
.
collaborativeEditing
.
onEndCheckLock
(
callback
);
};
spreadsheet_api
.
prototype
.
_addWorksheet
=
function
(
name
,
i
)
{
var
t
=
this
;
var
addWorksheetCallback
=
function
(
res
)
{
...
...
@@ -3457,6 +3478,21 @@ var editor;
this
.
asc_closeCellEditor
();
};
spreadsheet_api
.
prototype
.
_changePivotStyle
=
function
(
pivot
,
callback
)
{
var
t
=
this
;
var
changePivotStyle
=
function
(
res
)
{
if
(
res
)
{
History
.
Create_NewPoint
();
History
.
StartTransaction
();
callback
();
History
.
EndTransaction
();
t
.
wb
.
_onWSSelectionChanged
();
t
.
wb
.
getWorksheet
().
draw
();
}
};
this
.
_isLockedPivot
(
pivot
.
asc_getName
(),
changePivotStyle
);
};
/*
* Export
* -----------------------------------------------------------------------------
...
...
@@ -3600,9 +3636,6 @@ var editor;
prot
[
"
asc_convertTableToRange
"
]
=
prot
.
asc_convertTableToRange
;
prot
[
"
asc_getTablePictures
"
]
=
prot
.
asc_getTablePictures
;
// Pivot Table
prot
[
"
asc_changePivotStyle
"
]
=
prot
.
asc_changePivotStyle
;
// Drawing objects interface
prot
[
"
asc_showDrawingObjects
"
]
=
prot
.
asc_showDrawingObjects
;
...
...
cell/model/PivotTables.js
View file @
30573e66
...
...
@@ -4501,6 +4501,9 @@ CT_PivotTableStyle.prototype.toXml = function(writer, name) {
writer
.
WriteXmlAttributeBool
(
"
showLastColumn
"
,
this
.
showLastColumn
);
}
writer
.
WriteXmlNodeEnd
(
name
,
true
,
true
);
};
CT_PivotTableStyle
.
prototype
.
set
=
function
()
{
};
CT_PivotTableStyle
.
prototype
.
asc_getName
=
function
()
{
return
this
.
name
;
...
...
@@ -4517,6 +4520,42 @@ CT_PivotTableStyle.prototype.asc_getShowRowStripes = function() {
CT_PivotTableStyle
.
prototype
.
asc_getShowColStripes
=
function
()
{
return
this
.
showColStripes
;
};
CT_PivotTableStyle
.
prototype
.
asc_setShowRowHeaders
=
function
(
api
,
pivot
,
newVal
)
{
if
(
newVal
!==
this
.
showRowHeaders
)
{
var
t
=
this
;
api
.
_changePivotStyle
(
pivot
,
function
()
{
t
.
_setShowRowHeaders
()});
}
};
CT_PivotTableStyle
.
prototype
.
asc_setShowColHeaders
=
function
(
api
,
pivot
,
newVal
)
{
if
(
newVal
!==
this
.
showColHeaders
)
{
var
t
=
this
;
api
.
_changePivotStyle
(
pivot
,
function
()
{
t
.
_setShowColHeaders
()});
}
};
CT_PivotTableStyle
.
prototype
.
asc_setShowRowStripes
=
function
(
api
,
pivot
,
newVal
)
{
if
(
newVal
!==
this
.
showRowStripes
)
{
var
t
=
this
;
api
.
_changePivotStyle
(
pivot
,
function
()
{
t
.
_setShowRowStripes
()});
}
};
CT_PivotTableStyle
.
prototype
.
asc_setShowColStripes
=
function
(
api
,
pivot
,
newVal
)
{
if
(
newVal
!==
this
.
showColStripes
)
{
var
t
=
this
;
api
.
_changePivotStyle
(
pivot
,
function
()
{
t
.
_setShowColStripes
()});
}
};
CT_PivotTableStyle
.
prototype
.
_setShowRowHeaders
=
function
(
newVal
)
{
this
.
showRowHeaders
=
newVal
;
};
CT_PivotTableStyle
.
prototype
.
_setShowColHeaders
=
function
(
newVal
)
{
this
.
showColHeaders
=
newVal
;
};
CT_PivotTableStyle
.
prototype
.
_setShowRowStripes
=
function
(
newVal
)
{
this
.
showRowStripes
=
newVal
;
};
CT_PivotTableStyle
.
prototype
.
_setShowColStripes
=
function
(
newVal
)
{
this
.
showColStripes
=
newVal
;
};
function
CT_PivotFilters
()
{
//Attributes
this
.
count
=
null
;
//0
...
...
@@ -10012,6 +10051,10 @@ prot["asc_getShowRowHeaders"] = prot.asc_getShowRowHeaders;
prot
[
"
asc_getShowColHeaders
"
]
=
prot
.
asc_getShowColHeaders
;
prot
[
"
asc_getShowRowStripes
"
]
=
prot
.
asc_getShowRowStripes
;
prot
[
"
asc_getShowColStripes
"
]
=
prot
.
asc_getShowColStripes
;
prot
[
"
asc_setShowRowHeaders
"
]
=
prot
.
asc_setShowRowHeaders
;
prot
[
"
asc_setShowColHeaders
"
]
=
prot
.
asc_setShowColHeaders
;
prot
[
"
asc_setShowRowStripes
"
]
=
prot
.
asc_setShowRowStripes
;
prot
[
"
asc_setShowColStripes
"
]
=
prot
.
asc_setShowColStripes
;
prot
=
CT_CacheField
.
prototype
;
prot
[
"
asc_getName
"
]
=
prot
.
asc_getName
;
...
...
cell/model/UndoRedo.js
View file @
30573e66
...
...
@@ -3806,6 +3806,30 @@ UndoRedoAutoFilters.prototype = {
UndoRedoSparklines
.
prototype
.
UndoRedo
=
function
(
Type
,
Data
,
nSheetId
,
bUndo
)
{
};
function
UndoRedoPivotTables
(
wb
)
{
this
.
wb
=
wb
;
this
.
nType
=
UndoRedoClassTypes
.
Add
(
function
()
{
return
AscCommonExcel
.
g_oUndoRedoPivotTables
;
});
}
UndoRedoPivotTables
.
prototype
.
getClassType
=
function
()
{
return
this
.
nType
;
};
UndoRedoPivotTables
.
prototype
.
Undo
=
function
(
Type
,
Data
,
nSheetId
)
{
this
.
UndoRedo
(
Type
,
Data
,
nSheetId
,
true
);
};
UndoRedoPivotTables
.
prototype
.
Redo
=
function
(
Type
,
Data
,
nSheetId
)
{
this
.
UndoRedo
(
Type
,
Data
,
nSheetId
,
false
);
};
UndoRedoPivotTables
.
prototype
.
UndoRedo
=
function
(
Type
,
Data
,
nSheetId
,
bUndo
)
{
var
wb
=
opt_wb
?
opt_wb
:
this
.
wb
;
var
ws
=
wb
.
getWorksheetById
(
nSheetId
);
if
(
ws
)
{
}
};
//----------------------------------------------------------export----------------------------------------------------
window
[
'
AscCommonExcel
'
]
=
window
[
'
AscCommonExcel
'
]
||
{};
window
[
'
AscCommonExcel
'
].
UndoRedoItemSerializable
=
UndoRedoItemSerializable
;
...
...
@@ -3834,6 +3858,7 @@ UndoRedoAutoFilters.prototype = {
window
[
'
AscCommonExcel
'
].
UndoRedoComment
=
UndoRedoComment
;
window
[
'
AscCommonExcel
'
].
UndoRedoAutoFilters
=
UndoRedoAutoFilters
;
window
[
'
AscCommonExcel
'
].
UndoRedoSparklines
=
UndoRedoSparklines
;
window
[
'
AscCommonExcel
'
].
UndoRedoPivotTables
=
UndoRedoPivotTables
;
window
[
'
AscCommonExcel
'
].
g_oUndoRedoWorkbook
=
null
;
window
[
'
AscCommonExcel
'
].
g_oUndoRedoCell
=
null
;
...
...
@@ -3843,4 +3868,5 @@ UndoRedoAutoFilters.prototype = {
window
[
'
AscCommonExcel
'
].
g_oUndoRedoComment
=
null
;
window
[
'
AscCommonExcel
'
].
g_oUndoRedoAutoFilters
=
null
;
window
[
'
AscCommonExcel
'
].
g_oUndoRedoSparklines
=
null
;
window
[
'
AscCommonExcel
'
].
g_oUndoRedoPivotTables
=
null
;
})(
window
);
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