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
8b7d463d
Commit
8b7d463d
authored
Jan 09, 2017
by
Maxim Kadushkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SSE mobile] refactoring
parent
0b5edaae
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
24 deletions
+37
-24
apps/spreadsheeteditor/mobile/app/controller/DocumentHolder.js
...spreadsheeteditor/mobile/app/controller/DocumentHolder.js
+9
-14
apps/spreadsheeteditor/mobile/app/controller/Statusbar.js
apps/spreadsheeteditor/mobile/app/controller/Statusbar.js
+5
-3
apps/spreadsheeteditor/mobile/app/controller/add/AddContainer.js
...readsheeteditor/mobile/app/controller/add/AddContainer.js
+23
-0
apps/spreadsheeteditor/mobile/app/controller/add/AddOther.js
apps/spreadsheeteditor/mobile/app/controller/add/AddOther.js
+0
-7
No files found.
apps/spreadsheeteditor/mobile/app/controller/DocumentHolder.js
View file @
8b7d463d
...
...
@@ -185,20 +185,16 @@ define([
}];
}
else
{
var
menuItems
=
[
{
var
menuItems
=
[{
caption
:
'
Cut
'
,
event
:
'
cut
'
},
{
},{
caption
:
'
Copy
'
,
event
:
'
copy
'
},
{
},{
caption
:
'
Paste
'
,
event
:
'
paste
'
}
];
}];
var
iscellmenu
,
isrowmenu
,
iscolmenu
,
isallmenu
,
ischartmenu
,
isimagemenu
,
istextshapemenu
,
isshapemenu
,
istextchartmenu
,
seltype
=
cellinfo
.
asc_getFlags
().
asc_getSelectionType
(),
...
...
@@ -217,13 +213,13 @@ define([
case
Asc
.
c_oAscSelectionType
.
RangeShapeText
:
istextshapemenu
=
true
;
break
;
}
if
(
isimagemenu
||
isshapemenu
||
ischartmenu
)
{
if
(
isimagemenu
||
isshapemenu
||
ischartmenu
||
istextshapemenu
||
istextchartmenu
)
{
menuItems
.
push
({
caption
:
'
Edit
'
,
event
:
'
edit
'
});
}
else
if
(
istextshapemenu
||
istextchartmenu
)
{
}
else
{
if
(
iscolmenu
||
isrowmenu
)
{
menuItems
.
push
({
...
...
@@ -238,7 +234,6 @@ define([
});
}
else
if
(
iscellmenu
)
{
!
iscelledited
&&
menuItems
.
push
({
caption
:
'
Delete
'
,
event
:
'
del
'
...
...
@@ -272,7 +267,7 @@ define([
event
:
'
wrap
'
});
if
(
cellinfo
.
asc_getHyperlink
()
&&
!
iscelledited
&&
!
cellinfo
.
asc_getFlags
().
asc_getMultiselect
()
&&
if
(
cellinfo
.
asc_getHyperlink
()
&&
!
cellinfo
.
asc_getFlags
().
asc_getMultiselect
()
&&
cellinfo
.
asc_getHyperlink
().
asc_getType
()
==
Asc
.
c_oAscHyperlinkType
.
WebLink
)
{
menuItems
.
push
({
...
...
@@ -280,7 +275,7 @@ define([
event
:
'
openlink
'
});
}
else
if
(
!
cellinfo
.
asc_getHyperlink
()
&&
!
iscelledited
&&
!
cellinfo
.
asc_getFlags
().
asc_getMultiselect
()
&&
if
(
!
cellinfo
.
asc_getHyperlink
()
&&
!
cellinfo
.
asc_getFlags
().
asc_getMultiselect
()
&&
!
cellinfo
.
asc_getFlags
().
asc_getLockText
()
&&
!!
cellinfo
.
asc_getText
()
)
{
menuItems
.
push
({
...
...
apps/spreadsheeteditor/mobile/app/controller/Statusbar.js
View file @
8b7d463d
...
...
@@ -426,13 +426,15 @@ define([
var
opened
=
$
(
'
.document-menu.modal-in
'
).
length
;
uiApp
.
closeModal
(
'
.document-menu.modal-in
'
);
var
new
index
=
model
.
get
(
'
index
'
);
if
(
new
index
==
this
.
api
.
asc_getActiveWorksheetIndex
()
)
{
var
sdk
index
=
model
.
get
(
'
index
'
);
if
(
sdk
index
==
this
.
api
.
asc_getActiveWorksheetIndex
()
)
{
if
(
!
opened
)
this
.
statusbar
.
showTabContextMenu
(
this
.
_getTabMenuItems
(),
model
);
}
else
{
this
.
api
.
asc_showWorksheet
(
new
index
);
this
.
api
.
asc_showWorksheet
(
sdk
index
);
this
.
statusbar
.
setActiveTab
(
index
);
Common
.
NotificationCenter
.
trigger
(
'
sheet:active
'
,
sdkindex
);
}
},
...
...
apps/spreadsheeteditor/mobile/app/controller/add/AddContainer.js
View file @
8b7d463d
...
...
@@ -80,6 +80,29 @@ define([
uiApp
.
closeModal
();
me
.
api
.
asc_getCellInfo
();
var
iscellmenu
,
isrowmenu
,
iscolmenu
,
isallmenu
,
ischartmenu
,
isimagemenu
,
istextshapemenu
,
isshapemenu
,
istextchartmenu
,
seltype
=
cellinfo
.
asc_getFlags
().
asc_getSelectionType
(),
iscelllocked
=
cellinfo
.
asc_getLocked
(),
isTableLocked
=
cellinfo
.
asc_getLockedTable
()
===
true
;
switch
(
seltype
)
{
case
Asc
.
c_oAscSelectionType
.
RangeCells
:
iscellmenu
=
true
;
break
;
case
Asc
.
c_oAscSelectionType
.
RangeRow
:
isrowmenu
=
true
;
break
;
case
Asc
.
c_oAscSelectionType
.
RangeCol
:
iscolmenu
=
true
;
break
;
case
Asc
.
c_oAscSelectionType
.
RangeMax
:
isallmenu
=
true
;
break
;
case
Asc
.
c_oAscSelectionType
.
RangeImage
:
isimagemenu
=
true
;
break
;
case
Asc
.
c_oAscSelectionType
.
RangeShape
:
isshapemenu
=
true
;
break
;
case
Asc
.
c_oAscSelectionType
.
RangeChart
:
ischartmenu
=
true
;
break
;
case
Asc
.
c_oAscSelectionType
.
RangeChartText
:
istextchartmenu
=
true
;
break
;
case
Asc
.
c_oAscSelectionType
.
RangeShapeText
:
istextshapemenu
=
true
;
break
;
}
if
(
iscellmenu
)
{}
else
{
}
options
=
opts
;
parentButton
=
!
opts
?
'
#toolbar-add
'
:
opts
.
button
;
me
.
_showByStack
(
Common
.
SharedSettings
.
get
(
'
phone
'
));
...
...
apps/spreadsheeteditor/mobile/app/controller/add/AddOther.js
View file @
8b7d463d
...
...
@@ -45,13 +45,6 @@ define([
'
use strict
'
;
SSE
.
Controllers
.
AddOther
=
Backbone
.
Controller
.
extend
(
_
.
extend
((
function
()
{
var
c_pageNumPosition
=
{
PAGE_NUM_POSITION_TOP
:
0x01
,
PAGE_NUM_POSITION_BOTTOM
:
0x02
,
PAGE_NUM_POSITION_RIGHT
:
0
,
PAGE_NUM_POSITION_LEFT
:
1
,
PAGE_NUM_POSITION_CENTER
:
2
};
return
{
models
:
[],
...
...
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