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
848e27bb
Commit
848e27bb
authored
Dec 06, 2016
by
Alexander Yuzhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SE mobile] Add EditContainer.
parent
3a1e43e5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
35 deletions
+36
-35
apps/documenteditor/mobile/app/controller/edit/EditContainer.js
...ocumenteditor/mobile/app/controller/edit/EditContainer.js
+6
-3
apps/presentationeditor/mobile/app/controller/edit/EditContainer.js
...ntationeditor/mobile/app/controller/edit/EditContainer.js
+1
-1
apps/spreadsheeteditor/mobile/app-dev.js
apps/spreadsheeteditor/mobile/app-dev.js
+2
-2
apps/spreadsheeteditor/mobile/app/controller/edit/EditContainer.js
...adsheeteditor/mobile/app/controller/edit/EditContainer.js
+26
-28
apps/spreadsheeteditor/mobile/app/view/Toolbar.js
apps/spreadsheeteditor/mobile/app/view/Toolbar.js
+1
-1
No files found.
apps/documenteditor/mobile/app/controller/edit/EditContainer.js
View file @
848e27bb
...
@@ -40,8 +40,11 @@
...
@@ -40,8 +40,11 @@
*
*
*/
*/
define
([
define
([
'
core
'
'
core
'
,
],
function
(
core
)
{
'
jquery
'
,
'
underscore
'
,
'
backbone
'
],
function
(
core
,
$
,
_
,
Backbone
)
{
'
use strict
'
;
'
use strict
'
;
DE
.
Controllers
.
EditContainer
=
Backbone
.
Controller
.
extend
(
_
.
extend
((
function
()
{
DE
.
Controllers
.
EditContainer
=
Backbone
.
Controller
.
extend
(
_
.
extend
((
function
()
{
...
@@ -108,7 +111,7 @@ define([
...
@@ -108,7 +111,7 @@ define([
var
me
=
this
,
var
me
=
this
,
editors
=
[];
editors
=
[];
if
(
_settings
.
length
<
0
)
{
if
(
_settings
.
length
<
1
)
{
editors
.
push
(
me
.
_emptyEditController
());
editors
.
push
(
me
.
_emptyEditController
());
}
else
{
}
else
{
if
(
_
.
contains
(
_settings
,
'
text
'
))
{
if
(
_
.
contains
(
_settings
,
'
text
'
))
{
...
...
apps/presentationeditor/mobile/app/controller/edit/EditContainer.js
View file @
848e27bb
...
@@ -108,7 +108,7 @@ define([
...
@@ -108,7 +108,7 @@ define([
var
me
=
this
,
var
me
=
this
,
editors
=
[];
editors
=
[];
if
(
_settings
.
length
<
0
)
{
if
(
_settings
.
length
<
1
)
{
editors
.
push
(
me
.
_emptyEditController
());
editors
.
push
(
me
.
_emptyEditController
());
}
else
{
}
else
{
if
(
_
.
contains
(
_settings
,
'
slide
'
))
{
if
(
_
.
contains
(
_settings
,
'
slide
'
))
{
...
...
apps/spreadsheeteditor/mobile/app-dev.js
View file @
848e27bb
...
@@ -122,7 +122,7 @@ require([
...
@@ -122,7 +122,7 @@ require([
,
'
CellEditor
'
,
'
CellEditor
'
,
'
Statusbar
'
,
'
Statusbar
'
,
'
Settings
'
,
'
Settings
'
//
,'EditContainer'
,
'
EditContainer
'
// ,'EditText'
// ,'EditText'
// ,'EditParagraph'
// ,'EditParagraph'
// ,'EditTable'
// ,'EditTable'
...
@@ -192,7 +192,7 @@ require([
...
@@ -192,7 +192,7 @@ require([
,
'
spreadsheeteditor/mobile/app/controller/CellEditor
'
,
'
spreadsheeteditor/mobile/app/controller/CellEditor
'
,
'
spreadsheeteditor/mobile/app/controller/Statusbar
'
,
'
spreadsheeteditor/mobile/app/controller/Statusbar
'
,
'
spreadsheeteditor/mobile/app/controller/Settings
'
,
'
spreadsheeteditor/mobile/app/controller/Settings
'
//
,'spreadsheeteditor/mobile/app/controller/edit/EditContainer'
,
'
spreadsheeteditor/mobile/app/controller/edit/EditContainer
'
// ,'spreadsheeteditor/mobile/app/controller/edit/EditText'
// ,'spreadsheeteditor/mobile/app/controller/edit/EditText'
// ,'spreadsheeteditor/mobile/app/controller/edit/EditParagraph'
// ,'spreadsheeteditor/mobile/app/controller/edit/EditParagraph'
// ,'spreadsheeteditor/mobile/app/controller/edit/EditTable'
// ,'spreadsheeteditor/mobile/app/controller/edit/EditTable'
...
...
apps/spreadsheeteditor/mobile/app/controller/edit/EditContainer.js
View file @
848e27bb
...
@@ -33,18 +33,21 @@
...
@@ -33,18 +33,21 @@
/**
/**
* EditContainer.js
* EditContainer.js
*
Documen
t Editor
*
Spreadshee
t Editor
*
*
* Created by Alexander Yuzhin on
9/27
/16
* Created by Alexander Yuzhin on
12/6
/16
* Copyright (c) 2016 Ascensio System SIA. All rights reserved.
* Copyright (c) 2016 Ascensio System SIA. All rights reserved.
*
*
*/
*/
define
([
define
([
'
core
'
'
core
'
,
],
function
(
core
)
{
'
jquery
'
,
'
underscore
'
,
'
backbone
'
],
function
(
core
,
$
,
_
,
Backbone
)
{
'
use strict
'
;
'
use strict
'
;
D
E
.
Controllers
.
EditContainer
=
Backbone
.
Controller
.
extend
(
_
.
extend
((
function
()
{
SS
E
.
Controllers
.
EditContainer
=
Backbone
.
Controller
.
extend
(
_
.
extend
((
function
()
{
// Private
// Private
var
_settings
=
[];
var
_settings
=
[];
...
@@ -68,7 +71,7 @@ define([
...
@@ -68,7 +71,7 @@ define([
showModal
:
function
()
{
showModal
:
function
()
{
var
me
=
this
,
var
me
=
this
,
mainView
=
D
E
.
getController
(
'
Editor
'
).
getView
(
'
Editor
'
).
f7View
,
mainView
=
SS
E
.
getController
(
'
Editor
'
).
getView
(
'
Editor
'
).
f7View
,
isAndroid
=
Framework7
.
prototype
.
device
.
android
===
true
;
isAndroid
=
Framework7
.
prototype
.
device
.
android
===
true
;
if
(
$$
(
'
.container-edit.modal-in
'
).
length
>
0
)
{
if
(
$$
(
'
.container-edit.modal-in
'
).
length
>
0
)
{
...
@@ -81,7 +84,7 @@ define([
...
@@ -81,7 +84,7 @@ define([
me
.
_showByStack
(
Common
.
SharedSettings
.
get
(
'
phone
'
));
me
.
_showByStack
(
Common
.
SharedSettings
.
get
(
'
phone
'
));
D
E
.
getController
(
'
Toolbar
'
).
getView
(
'
Toolbar
'
).
hideSearch
();
SS
E
.
getController
(
'
Toolbar
'
).
getView
(
'
Toolbar
'
).
hideSearch
();
},
},
hideModal
:
function
()
{
hideModal
:
function
()
{
...
@@ -108,56 +111,49 @@ define([
...
@@ -108,56 +111,49 @@ define([
var
me
=
this
,
var
me
=
this
,
editors
=
[];
editors
=
[];
if
(
_settings
.
length
<
0
)
{
if
(
_settings
.
length
<
1
)
{
editors
.
push
(
me
.
_emptyEditController
());
editors
.
push
(
me
.
_emptyEditController
());
}
else
{
}
else
{
if
(
_
.
contains
(
_settings
,
'
text
'
))
{
if
(
_
.
contains
(
_settings
,
'
cell
'
))
{
editors
.
push
({
editors
.
push
({
caption
:
me
.
textText
,
caption
:
me
.
textCell
,
id
:
'
edit-text
'
,
id
:
'
edit-cell
'
,
layout
:
DE
.
getController
(
'
EditText
'
).
getView
(
'
EditText
'
).
rootLayout
()
layout
:
SSE
.
getController
(
'
EditCell
'
).
getView
(
'
EditCell
'
).
rootLayout
()
})
}
if
(
_
.
contains
(
_settings
,
'
paragraph
'
))
{
editors
.
push
({
caption
:
me
.
textParagraph
,
id
:
'
edit-paragraph
'
,
layout
:
DE
.
getController
(
'
EditParagraph
'
).
getView
(
'
EditParagraph
'
).
rootLayout
()
})
})
}
}
if
(
_
.
contains
(
_settings
,
'
table
'
))
{
if
(
_
.
contains
(
_settings
,
'
table
'
))
{
editors
.
push
({
editors
.
push
({
caption
:
me
.
textTable
,
caption
:
me
.
textTable
,
id
:
'
edit-table
'
,
id
:
'
edit-table
'
,
layout
:
D
E
.
getController
(
'
EditTable
'
).
getView
(
'
EditTable
'
).
rootLayout
()
layout
:
SS
E
.
getController
(
'
EditTable
'
).
getView
(
'
EditTable
'
).
rootLayout
()
})
})
}
}
if
(
_
.
contains
(
_settings
,
'
shape
'
))
{
if
(
_
.
contains
(
_settings
,
'
shape
'
))
{
editors
.
push
({
editors
.
push
({
caption
:
me
.
textShape
,
caption
:
me
.
textShape
,
id
:
'
edit-shape
'
,
id
:
'
edit-shape
'
,
layout
:
D
E
.
getController
(
'
EditShape
'
).
getView
(
'
EditShape
'
).
rootLayout
()
layout
:
SS
E
.
getController
(
'
EditShape
'
).
getView
(
'
EditShape
'
).
rootLayout
()
})
})
}
}
if
(
_
.
contains
(
_settings
,
'
image
'
))
{
if
(
_
.
contains
(
_settings
,
'
image
'
))
{
editors
.
push
({
editors
.
push
({
caption
:
me
.
textImage
,
caption
:
me
.
textImage
,
id
:
'
edit-image
'
,
id
:
'
edit-image
'
,
layout
:
D
E
.
getController
(
'
EditImage
'
).
getView
(
'
EditImage
'
).
rootLayout
()
layout
:
SS
E
.
getController
(
'
EditImage
'
).
getView
(
'
EditImage
'
).
rootLayout
()
})
})
}
}
if
(
_
.
contains
(
_settings
,
'
chart
'
))
{
if
(
_
.
contains
(
_settings
,
'
chart
'
))
{
editors
.
push
({
editors
.
push
({
caption
:
me
.
textChart
,
caption
:
me
.
textChart
,
id
:
'
edit-chart
'
,
id
:
'
edit-chart
'
,
layout
:
D
E
.
getController
(
'
EditChart
'
).
getView
(
'
EditChart
'
).
rootLayout
()
layout
:
SS
E
.
getController
(
'
EditChart
'
).
getView
(
'
EditChart
'
).
rootLayout
()
})
})
}
}
if
(
_
.
contains
(
_settings
,
'
hyperlink
'
))
{
if
(
_
.
contains
(
_settings
,
'
hyperlink
'
))
{
editors
.
push
({
editors
.
push
({
caption
:
me
.
textHyperlink
,
caption
:
me
.
textHyperlink
,
id
:
'
edit-link
'
,
id
:
'
edit-link
'
,
layout
:
D
E
.
getController
(
'
EditHyperlink
'
).
getView
(
'
EditHyperlink
'
).
rootLayout
()
layout
:
SS
E
.
getController
(
'
EditHyperlink
'
).
getView
(
'
EditHyperlink
'
).
rootLayout
()
})
})
}
}
}
}
...
@@ -167,7 +163,7 @@ define([
...
@@ -167,7 +163,7 @@ define([
_showByStack
:
function
(
isPhone
)
{
_showByStack
:
function
(
isPhone
)
{
var
me
=
this
,
var
me
=
this
,
mainView
=
D
E
.
getController
(
'
Editor
'
).
getView
(
'
Editor
'
).
f7View
,
mainView
=
SS
E
.
getController
(
'
Editor
'
).
getView
(
'
Editor
'
).
f7View
,
isAndroid
=
Framework7
.
prototype
.
device
.
android
===
true
,
isAndroid
=
Framework7
.
prototype
.
device
.
android
===
true
,
layoutEditors
=
me
.
_layoutEditorsByStack
();
layoutEditors
=
me
.
_layoutEditorsByStack
();
...
@@ -350,11 +346,13 @@ define([
...
@@ -350,11 +346,13 @@ define([
}
}
_settings
=
_
.
uniq
(
_settings
);
_settings
=
_
.
uniq
(
_settings
);
//TODO: DEBUG ONLY
_settings
=
[];
},
},
textSettings
:
'
Settings
'
,
textSettings
:
'
Settings
'
,
textText
:
'
Text
'
,
textCell
:
'
Cell
'
,
textParagraph
:
'
Paragraph
'
,
textTable
:
'
Table
'
,
textTable
:
'
Table
'
,
textShape
:
'
Shape
'
,
textShape
:
'
Shape
'
,
textImage
:
'
Image
'
,
textImage
:
'
Image
'
,
...
@@ -362,5 +360,5 @@ define([
...
@@ -362,5 +360,5 @@ define([
textHyperlink
:
'
Hyperlink
'
textHyperlink
:
'
Hyperlink
'
}
}
})(),
D
E
.
Controllers
.
EditContainer
||
{}))
})(),
SS
E
.
Controllers
.
EditContainer
||
{}))
});
});
\ No newline at end of file
apps/spreadsheeteditor/mobile/app/view/Toolbar.js
View file @
848e27bb
...
@@ -124,7 +124,7 @@ define([
...
@@ -124,7 +124,7 @@ define([
// Editor
// Editor
showEdition
:
function
()
{
showEdition
:
function
()
{
//
SSE.getController('EditContainer').showModal();
SSE
.
getController
(
'
EditContainer
'
).
showModal
();
},
},
// Inserts
// Inserts
...
...
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