Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
web-apps
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
web-apps
Commits
a87f840c
Commit
a87f840c
authored
Jun 21, 2017
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SSE] Disable filters, sort, merge, hyperlinks when in pivot table.
parent
75f92f84
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
9 deletions
+18
-9
apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
+7
-2
apps/spreadsheeteditor/main/app/controller/Toolbar.js
apps/spreadsheeteditor/main/app/controller/Toolbar.js
+3
-0
apps/spreadsheeteditor/main/app/view/Toolbar.js
apps/spreadsheeteditor/main/app/view/Toolbar.js
+8
-7
No files found.
apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
View file @
a87f840c
...
...
@@ -1446,6 +1446,8 @@ define([
documentHolder
.
pmiInsertCells
.
menu
.
items
[
1
].
setDisabled
(
isApplyAutoFilter
);
documentHolder
.
pmiDeleteCells
.
menu
.
items
[
1
].
setDisabled
(
isApplyAutoFilter
);
var
inPivot
=
!!
cellinfo
.
asc_getPivotTableInfo
();
_
.
each
(
documentHolder
.
ssMenu
.
items
,
function
(
item
)
{
item
.
setDisabled
(
isCellLocked
);
});
...
...
@@ -1456,9 +1458,12 @@ define([
documentHolder
.
pmiDeleteEntire
.
setDisabled
(
isCellLocked
||
isTableLocked
);
documentHolder
.
pmiDeleteCells
.
setDisabled
(
isCellLocked
||
isTableLocked
);
documentHolder
.
pmiDeleteTable
.
setDisabled
(
isCellLocked
||
isTableLocked
);
documentHolder
.
pmiFilterCells
.
setDisabled
(
isCellLocked
||
isTableLocked
||
(
filterInfo
==
null
));
documentHolder
.
pmiSortCells
.
setDisabled
(
isCellLocked
||
isTableLocked
||
(
filterInfo
==
null
));
documentHolder
.
pmiFilterCells
.
setDisabled
(
isCellLocked
||
isTableLocked
||
(
filterInfo
==
null
)
||
inPivot
);
documentHolder
.
pmiSortCells
.
setDisabled
(
isCellLocked
||
isTableLocked
||
(
filterInfo
==
null
)
||
inPivot
);
documentHolder
.
pmiReapply
.
setDisabled
(
isCellLocked
||
isTableLocked
||
(
isApplyAutoFilter
!==
true
));
documentHolder
.
menuHyperlink
.
setDisabled
(
isCellLocked
||
inPivot
);
documentHolder
.
menuAddHyperlink
.
setDisabled
(
isCellLocked
||
inPivot
);
if
(
showMenu
)
this
.
showPopupMenu
(
documentHolder
.
ssMenu
,
{},
event
);
}
else
if
(
this
.
permissions
.
isEditDiagram
&&
seltype
==
Asc
.
c_oAscSelectionType
.
RangeChartText
)
{
if
(
!
showMenu
&&
!
documentHolder
.
textInShapeMenu
.
isVisible
())
return
;
...
...
apps/spreadsheeteditor/main/app/controller/Toolbar.js
View file @
a87f840c
...
...
@@ -2007,6 +2007,9 @@ define([
this
.
_state
.
multiselect
=
info
.
asc_getFlags
().
asc_getMultiselect
();
toolbar
.
lockToolbar
(
SSE
.
enumLock
.
multiselect
,
this
.
_state
.
multiselect
,
{
array
:
[
toolbar
.
btnTableTemplate
,
toolbar
.
btnInsertHyperlink
]});
need_disable
=
!!
info
.
asc_getPivotTableInfo
();
toolbar
.
lockToolbar
(
SSE
.
enumLock
.
editPivot
,
need_disable
,
{
array
:
[
toolbar
.
btnMerge
,
toolbar
.
btnInsertHyperlink
,
toolbar
.
btnSetAutofilter
,
toolbar
.
btnClearAutofilter
,
toolbar
.
btnSortDown
,
toolbar
.
btnSortUp
,
toolbar
.
btnAutofilter
]});
}
val
=
info
.
asc_getNumFormatInfo
();
...
...
apps/spreadsheeteditor/main/app/view/Toolbar.js
View file @
a87f840c
...
...
@@ -63,6 +63,7 @@ define([
editCell
:
'
cell-editing
'
,
editFormula
:
'
is-formula
'
,
editText
:
'
is-text
'
,
editPivot
:
'
is-pivot
'
,
selImage
:
'
sel-image
'
,
selShape
:
'
sel-shape
'
,
selShapeText
:
'
sel-shape-txt
'
,
...
...
@@ -375,7 +376,7 @@ define([
enableToggle
:
true
,
allowDepress
:
true
,
split
:
true
,
lock
:
[
_set
.
editCell
,
_set
.
selShape
,
_set
.
selShapeText
,
_set
.
selChart
,
_set
.
selChartText
,
_set
.
selImage
,
_set
.
lostConnect
,
_set
.
coAuth
,
_set
.
ruleMerge
],
lock
:
[
_set
.
editCell
,
_set
.
selShape
,
_set
.
selShapeText
,
_set
.
selChart
,
_set
.
selChartText
,
_set
.
selImage
,
_set
.
lostConnect
,
_set
.
coAuth
,
_set
.
ruleMerge
,
_set
.
editPivot
],
menu
:
new
Common
.
UI
.
Menu
({
items
:
[
{
...
...
@@ -497,7 +498,7 @@ define([
id
:
'
id-toolbar-btn-inserthyperlink
'
,
cls
:
'
btn-toolbar
'
,
iconCls
:
'
btn-inserthyperlink
'
,
lock
:
[
_set
.
editCell
,
_set
.
selChart
,
_set
.
selChartText
,
_set
.
selImage
,
_set
.
selShape
,
_set
.
cantHyperlink
,
_set
.
multiselect
,
_set
.
lostConnect
,
_set
.
coAuth
]
lock
:
[
_set
.
editCell
,
_set
.
selChart
,
_set
.
selChartText
,
_set
.
selImage
,
_set
.
selShape
,
_set
.
cantHyperlink
,
_set
.
multiselect
,
_set
.
lostConnect
,
_set
.
coAuth
,
_set
.
editPivot
]
});
me
.
btnInsertChart
=
new
Common
.
UI
.
Button
({
...
...
@@ -568,21 +569,21 @@ define([
id
:
'
id-toolbar-btn-sort-down
'
,
cls
:
'
btn-toolbar
'
,
iconCls
:
'
btn-sort-down
'
,
lock
:
[
_set
.
editCell
,
_set
.
selChart
,
_set
.
selChartText
,
_set
.
selShape
,
_set
.
selShapeText
,
_set
.
selImage
,
_set
.
lostConnect
,
_set
.
coAuth
,
_set
.
ruleFilter
]
lock
:
[
_set
.
editCell
,
_set
.
selChart
,
_set
.
selChartText
,
_set
.
selShape
,
_set
.
selShapeText
,
_set
.
selImage
,
_set
.
lostConnect
,
_set
.
coAuth
,
_set
.
ruleFilter
,
_set
.
editPivot
]
});
me
.
btnSortUp
=
new
Common
.
UI
.
Button
({
id
:
'
id-toolbar-btn-sort-up
'
,
cls
:
'
btn-toolbar
'
,
iconCls
:
'
btn-sort-up
'
,
lock
:
[
_set
.
editCell
,
_set
.
selChart
,
_set
.
selChartText
,
_set
.
selShape
,
_set
.
selShapeText
,
_set
.
selImage
,
_set
.
lostConnect
,
_set
.
coAuth
,
_set
.
ruleFilter
]
lock
:
[
_set
.
editCell
,
_set
.
selChart
,
_set
.
selChartText
,
_set
.
selShape
,
_set
.
selShapeText
,
_set
.
selImage
,
_set
.
lostConnect
,
_set
.
coAuth
,
_set
.
ruleFilter
,
_set
.
editPivot
]
});
me
.
btnSetAutofilter
=
new
Common
.
UI
.
Button
({
id
:
'
id-toolbar-btn-setautofilter
'
,
cls
:
'
btn-toolbar
'
,
iconCls
:
'
btn-autofilter
'
,
lock
:
[
_set
.
editCell
,
_set
.
selChart
,
_set
.
selChartText
,
_set
.
selShape
,
_set
.
selShapeText
,
_set
.
selImage
,
_set
.
lostConnect
,
_set
.
coAuth
,
_set
.
ruleFilter
],
lock
:
[
_set
.
editCell
,
_set
.
selChart
,
_set
.
selChartText
,
_set
.
selShape
,
_set
.
selShapeText
,
_set
.
selImage
,
_set
.
lostConnect
,
_set
.
coAuth
,
_set
.
ruleFilter
,
_set
.
editPivot
],
enableToggle
:
true
});
...
...
@@ -590,7 +591,7 @@ define([
id
:
'
id-toolbar-btn-clearfilter
'
,
cls
:
'
btn-toolbar
'
,
iconCls
:
'
btn-clear-filter
'
,
lock
:
[
_set
.
editCell
,
_set
.
selChart
,
_set
.
selChartText
,
_set
.
selShape
,
_set
.
selShapeText
,
_set
.
selImage
,
_set
.
lostConnect
,
_set
.
coAuth
,
_set
.
ruleDelFilter
]
lock
:
[
_set
.
editCell
,
_set
.
selChart
,
_set
.
selChartText
,
_set
.
selShape
,
_set
.
selShapeText
,
_set
.
selImage
,
_set
.
lostConnect
,
_set
.
coAuth
,
_set
.
ruleDelFilter
,
_set
.
editPivot
]
});
me
.
btnSearch
=
new
Common
.
UI
.
Button
({
...
...
@@ -1041,7 +1042,7 @@ define([
id
:
'
id-toolbar-btn-autofilter
'
,
cls
:
'
btn-toolbar
'
,
iconCls
:
'
btn-autofilter
'
,
lock
:
[
_set
.
editCell
,
_set
.
selChart
,
_set
.
selChartText
,
_set
.
selShape
,
_set
.
selShapeText
,
_set
.
selImage
,
_set
.
lostConnect
,
_set
.
coAuth
,
_set
.
ruleFilter
],
lock
:
[
_set
.
editCell
,
_set
.
selChart
,
_set
.
selChartText
,
_set
.
selShape
,
_set
.
selShapeText
,
_set
.
selImage
,
_set
.
lostConnect
,
_set
.
coAuth
,
_set
.
ruleFilter
,
_set
.
editPivot
],
menu
:
new
Common
.
UI
.
Menu
({
items
:
[
me
.
mnuitemSortAZ
=
new
Common
.
UI
.
MenuItem
({
...
...
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