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
ada2eca0
Commit
ada2eca0
authored
Apr 01, 2016
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SSE] Disable/Enable пунктов редактирования таблицы.
parent
95590e2b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
4 deletions
+22
-4
apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
+12
-0
apps/spreadsheeteditor/main/app/view/TableSettings.js
apps/spreadsheeteditor/main/app/view/TableSettings.js
+10
-4
No files found.
apps/spreadsheeteditor/main/app/controller/DocumentHolder.js
View file @
ada2eca0
...
@@ -1162,6 +1162,18 @@ define([
...
@@ -1162,6 +1162,18 @@ define([
documentHolder
.
pmiInsFunction
.
setVisible
(
iscellmenu
||
insfunc
);
documentHolder
.
pmiInsFunction
.
setVisible
(
iscellmenu
||
insfunc
);
documentHolder
.
pmiAddNamedRange
.
setVisible
(
iscellmenu
&&
!
iscelledit
);
documentHolder
.
pmiAddNamedRange
.
setVisible
(
iscellmenu
&&
!
iscelledit
);
if
(
isintable
)
{
documentHolder
.
pmiInsertTable
.
menu
.
items
[
0
].
setDisabled
(
!
formatTableInfo
.
asc_getIsInsertRowAbove
());
documentHolder
.
pmiInsertTable
.
menu
.
items
[
1
].
setDisabled
(
!
formatTableInfo
.
asc_getIsInsertRowBelow
());
documentHolder
.
pmiInsertTable
.
menu
.
items
[
2
].
setDisabled
(
!
formatTableInfo
.
asc_getIsInsertColumnLeft
());
documentHolder
.
pmiInsertTable
.
menu
.
items
[
3
].
setDisabled
(
!
formatTableInfo
.
asc_getIsInsertColumnRight
());
documentHolder
.
pmiDeleteTable
.
menu
.
items
[
0
].
setDisabled
(
!
formatTableInfo
.
asc_getIsDeleteRow
());
documentHolder
.
pmiDeleteTable
.
menu
.
items
[
1
].
setDisabled
(
!
formatTableInfo
.
asc_getIsDeleteColumn
());
documentHolder
.
pmiDeleteTable
.
menu
.
items
[
2
].
setDisabled
(
!
formatTableInfo
.
asc_getIsDeleteTable
());
}
var
hyperinfo
=
cellinfo
.
asc_getHyperlink
();
var
hyperinfo
=
cellinfo
.
asc_getHyperlink
();
documentHolder
.
menuHyperlink
.
setVisible
(
iscellmenu
&&
hyperinfo
&&
!
iscelledit
);
documentHolder
.
menuHyperlink
.
setVisible
(
iscellmenu
&&
hyperinfo
&&
!
iscelledit
);
documentHolder
.
menuAddHyperlink
.
setVisible
(
iscellmenu
&&
!
hyperinfo
&&
!
iscelledit
);
documentHolder
.
menuAddHyperlink
.
setVisible
(
iscellmenu
&&
!
hyperinfo
&&
!
iscelledit
);
...
...
apps/spreadsheeteditor/main/app/view/TableSettings.js
View file @
ada2eca0
...
@@ -161,10 +161,16 @@ define([
...
@@ -161,10 +161,16 @@ define([
})
})
});
});
this
.
btnEdit
.
render
(
$
(
'
#table-btn-edit
'
))
;
this
.
btnEdit
.
render
(
$
(
'
#table-btn-edit
'
))
;
this
.
btnEdit
.
menu
.
on
(
'
show:after
'
,
_
.
bind
(
function
(){
this
.
btnEdit
.
menu
.
on
(
'
show:after
'
,
_
.
bind
(
function
(
menu
){
if
(
this
.
api
)
{
if
(
this
.
api
)
{
// this.mnuMerge.setDisabled(!this.api.CheckBeforeMergeCells());
menu
.
items
[
5
].
setDisabled
(
!
this
.
_originalProps
.
asc_getIsInsertRowAbove
());
// this.mnuSplit.setDisabled(!this.api.CheckBeforeSplitCells());
menu
.
items
[
6
].
setDisabled
(
!
this
.
_originalProps
.
asc_getIsInsertRowBelow
());
menu
.
items
[
7
].
setDisabled
(
!
this
.
_originalProps
.
asc_getIsInsertColumnLeft
());
menu
.
items
[
8
].
setDisabled
(
!
this
.
_originalProps
.
asc_getIsInsertColumnRight
());
menu
.
items
[
10
].
setDisabled
(
!
this
.
_originalProps
.
asc_getIsDeleteRow
());
menu
.
items
[
11
].
setDisabled
(
!
this
.
_originalProps
.
asc_getIsDeleteColumn
());
menu
.
items
[
12
].
setDisabled
(
!
this
.
_originalProps
.
asc_getIsDeleteTable
());
}
}
},
this
));
},
this
));
this
.
btnEdit
.
menu
.
on
(
'
item:click
'
,
_
.
bind
(
this
.
onEditClick
,
this
));
this
.
btnEdit
.
menu
.
on
(
'
item:click
'
,
_
.
bind
(
this
.
onEditClick
,
this
));
...
@@ -173,7 +179,7 @@ define([
...
@@ -173,7 +179,7 @@ define([
onCheckTemplateChange
:
function
(
type
,
field
,
newValue
,
oldValue
,
eOpts
)
{
onCheckTemplateChange
:
function
(
type
,
field
,
newValue
,
oldValue
,
eOpts
)
{
if
(
this
.
api
)
if
(
this
.
api
)
this
.
api
.
asc_changeFormatTableInfo
(
this
.
_state
.
TableName
,
type
);
this
.
api
.
asc_changeFormatTableInfo
(
this
.
_state
.
TableName
,
type
,
newValue
==
'
checked
'
);
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
this
);
Common
.
NotificationCenter
.
trigger
(
'
edit:complete
'
,
this
);
},
},
...
...
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