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
39c28168
Commit
39c28168
authored
Jan 11, 2017
by
Maxim Kadushkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SSE mobile] cutted down 'Add' options for image/chart/shape
parent
ab34b226
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
20 deletions
+51
-20
apps/spreadsheeteditor/mobile/app/controller/add/AddContainer.js
...readsheeteditor/mobile/app/controller/add/AddContainer.js
+29
-19
apps/spreadsheeteditor/mobile/app/controller/add/AddOther.js
apps/spreadsheeteditor/mobile/app/controller/add/AddOther.js
+13
-1
apps/spreadsheeteditor/mobile/app/view/add/AddOther.js
apps/spreadsheeteditor/mobile/app/view/add/AddOther.js
+9
-0
No files found.
apps/spreadsheeteditor/mobile/app/controller/add/AddContainer.js
View file @
39c28168
...
...
@@ -86,26 +86,28 @@ define([
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
{
if
(
!
iscelllocked
)
{
options
=
opts
;
if
(
!
options
)
{
switch
(
seltype
)
{
case
Asc
.
c_oAscSelectionType
.
RangeCells
:
case
Asc
.
c_oAscSelectionType
.
RangeRow
:
case
Asc
.
c_oAscSelectionType
.
RangeCol
:
case
Asc
.
c_oAscSelectionType
.
RangeMax
:
break
;
case
Asc
.
c_oAscSelectionType
.
RangeImage
:
case
Asc
.
c_oAscSelectionType
.
RangeShape
:
case
Asc
.
c_oAscSelectionType
.
RangeChart
:
case
Asc
.
c_oAscSelectionType
.
RangeChartText
:
case
Asc
.
c_oAscSelectionType
.
RangeShapeText
:
options
=
{
panels
:
[
'
image
'
,
'
shape
'
]};
break
;
}
}
options
=
opts
;
parentButton
=
!
opts
||
!
opts
.
button
?
'
#toolbar-add
'
:
opts
.
button
;
me
.
_showByStack
(
Common
.
SharedSettings
.
get
(
'
phone
'
));
}
this
.
api
.
asc_closeCellEditor
();
SSE
.
getController
(
'
Toolbar
'
).
getView
(
'
Toolbar
'
).
hideSearch
();
...
...
@@ -139,7 +141,7 @@ define([
});
}
if
(
!
options
)
if
(
!
options
||
!
(
_
.
indexOf
(
options
.
panels
,
'
shape
'
)
<
0
)
)
addViews
.
push
({
caption
:
me
.
textShape
,
id
:
'
add-shape
'
,
...
...
@@ -162,6 +164,14 @@ define([
});
}
if
(
options
&&
!
(
_
.
indexOf
(
options
.
panels
,
'
image
'
))
)
{
addViews
.
push
({
caption
:
'
Image
'
,
id
:
'
add-image
'
,
layout
:
SSE
.
getController
(
'
AddOther
'
).
getView
(
'
AddOther
'
).
childLayout
(
'
image
'
)
});
}
return
addViews
;
},
...
...
apps/spreadsheeteditor/mobile/app/controller/add/AddOther.js
View file @
39c28168
...
...
@@ -78,7 +78,10 @@ define([
this
.
createView
(
'
AddOther
'
).
render
();
},
initEvents
:
function
()
{
initEvents
:
function
(
args
)
{
if
(
args
&&
!
(
_
.
indexOf
(
args
.
panels
,
'
image
'
)
<
0
)
)
{
this
.
onPageShow
(
this
.
getView
(
'
AddOther
'
),
'
#addother-insimage
'
);
}
},
onPageShow
:
function
(
view
,
pageId
)
{
...
...
@@ -87,6 +90,15 @@ define([
if
(
pageId
==
'
#addother-sort
'
)
{
var
filterInfo
=
me
.
api
.
asc_getCellInfo
().
asc_getAutoFilterInfo
();
view
.
optionAutofilter
(
filterInfo
?
filterInfo
.
asc_getIsAutoFilter
()
:
null
)
}
else
if
(
pageId
==
'
#addother-insimage
'
)
{
$
(
'
#addimage-url
'
).
single
(
'
click
'
,
function
(
e
)
{
view
.
showImageFromUrl
();
});
$
(
'
#addimage-file
'
).
single
(
'
click
'
,
function
()
{
me
.
onInsertImage
({
islocal
:
true
});
});
}
},
...
...
apps/spreadsheeteditor/mobile/app/view/add/AddOther.js
View file @
39c28168
...
...
@@ -132,6 +132,15 @@ define([
return
''
;
},
childLayout
:
function
(
name
)
{
if
(
this
.
layout
)
{
if
(
name
==
'
image
'
)
return
this
.
layout
.
find
(
'
#addother-insimage .page-content
'
).
html
();
}
return
''
;
},
initControls
:
function
()
{
//
},
...
...
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