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
409121c2
Commit
409121c2
authored
Dec 07, 2016
by
Julia Radzhabova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PE mobile] Add slides.
parent
35ed40ce
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
342 additions
and
14 deletions
+342
-14
apps/presentationeditor/mobile/app-dev.js
apps/presentationeditor/mobile/app-dev.js
+4
-2
apps/presentationeditor/mobile/app.js
apps/presentationeditor/mobile/app.js
+4
-2
apps/presentationeditor/mobile/app/controller/add/AddContainer.js
...sentationeditor/mobile/app/controller/add/AddContainer.js
+3
-1
apps/presentationeditor/mobile/app/controller/add/AddSlide.js
.../presentationeditor/mobile/app/controller/add/AddSlide.js
+127
-0
apps/presentationeditor/mobile/app/template/AddSlide.template
.../presentationeditor/mobile/app/template/AddSlide.template
+5
-0
apps/presentationeditor/mobile/app/view/add/AddSlide.js
apps/presentationeditor/mobile/app/view/add/AddSlide.js
+135
-0
apps/presentationeditor/mobile/resources/css/app-ios.css
apps/presentationeditor/mobile/resources/css/app-ios.css
+13
-1
apps/presentationeditor/mobile/resources/css/app-material.css
.../presentationeditor/mobile/resources/css/app-material.css
+14
-8
apps/presentationeditor/mobile/resources/less/app-ios.less
apps/presentationeditor/mobile/resources/less/app-ios.less
+19
-0
apps/presentationeditor/mobile/resources/less/app-material.less
...resentationeditor/mobile/resources/less/app-material.less
+18
-0
No files found.
apps/presentationeditor/mobile/app-dev.js
View file @
409121c2
...
...
@@ -150,7 +150,8 @@ require([
'
AddTable
'
,
'
AddShape
'
,
'
AddImage
'
,
'
AddLink
'
'
AddLink
'
,
'
AddSlide
'
]
});
...
...
@@ -214,7 +215,8 @@ require([
'
presentationeditor/mobile/app/controller/add/AddTable
'
,
'
presentationeditor/mobile/app/controller/add/AddShape
'
,
'
presentationeditor/mobile/app/controller/add/AddImage
'
,
'
presentationeditor/mobile/app/controller/add/AddLink
'
'
presentationeditor/mobile/app/controller/add/AddLink
'
,
'
presentationeditor/mobile/app/controller/add/AddSlide
'
],
function
()
{
app
.
start
();
...
...
apps/presentationeditor/mobile/app.js
View file @
409121c2
...
...
@@ -161,7 +161,8 @@ require([
'
AddTable
'
,
'
AddShape
'
,
'
AddImage
'
,
'
AddLink
'
'
AddLink
'
,
'
AddSlide
'
]
});
...
...
@@ -225,7 +226,8 @@ require([
'
presentationeditor/mobile/app/controller/add/AddTable
'
,
'
presentationeditor/mobile/app/controller/add/AddShape
'
,
'
presentationeditor/mobile/app/controller/add/AddImage
'
,
'
presentationeditor/mobile/app/controller/add/AddLink
'
'
presentationeditor/mobile/app/controller/add/AddLink
'
,
'
presentationeditor/mobile/app/controller/add/AddSlide
'
],
function
()
{
app
.
start
();
});
...
...
apps/presentationeditor/mobile/app/controller/add/AddContainer.js
View file @
409121c2
...
...
@@ -108,7 +108,9 @@ define([
addViews
.
push
({
caption
:
me
.
textSlide
,
id
:
'
add-slide
'
,
layout
:
me
.
_dummyEditController
().
getLayout
()
layout
:
PE
.
getController
(
'
AddSlide
'
)
.
getView
(
'
AddSlide
'
)
.
rootLayout
()
});
addViews
.
push
({
...
...
apps/presentationeditor/mobile/app/controller/add/AddSlide.js
0 → 100644
View file @
409121c2
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
/**
* AddSlide.js
* Presentation Editor
*
* Created by Julia Radzhabova on 12/06/16
* Copyright (c) 2016 Ascensio System SIA. All rights reserved.
*
*/
define
([
'
core
'
,
'
presentationeditor/mobile/app/view/add/AddSlide
'
],
function
(
core
)
{
'
use strict
'
;
PE
.
Controllers
.
AddSlide
=
Backbone
.
Controller
.
extend
(
_
.
extend
((
function
()
{
var
_layouts
=
[];
return
{
models
:
[],
collections
:
[],
views
:
[
'
AddSlide
'
],
initialize
:
function
()
{
Common
.
NotificationCenter
.
on
(
'
addcontainer:show
'
,
_
.
bind
(
this
.
initEvents
,
this
));
},
setApi
:
function
(
api
)
{
var
me
=
this
;
me
.
api
=
api
;
me
.
api
.
asc_registerCallback
(
'
asc_onUpdateLayout
'
,
_
.
bind
(
me
.
onUpdateLayout
,
me
));
},
onLaunch
:
function
()
{
this
.
createView
(
'
AddSlide
'
).
render
();
},
initEvents
:
function
()
{
var
me
=
this
;
me
.
getView
(
'
AddSlide
'
).
updateLayouts
(
_layouts
);
$
(
'
#add-slide .slide-layout li
'
).
single
(
'
click
'
,
_
.
buffered
(
me
.
onStyleClick
,
100
,
me
));
},
onStyleClick
:
function
(
e
)
{
var
me
=
this
,
$target
=
$
(
e
.
currentTarget
),
type
=
$target
.
data
(
'
type
'
);
me
.
api
.
AddSlide
(
type
);
PE
.
getController
(
'
AddContainer
'
).
hideModal
();
},
// Public
getLayouts
:
function
()
{
return
_layouts
;
},
// API handlers
onUpdateLayout
:
function
(
layouts
){
var
me
=
this
;
_layouts
=
[];
if
(
!
_
.
isEmpty
(
layouts
)){
_
.
each
(
layouts
,
function
(
layout
){
var
name
=
layout
.
get_Name
();
_layouts
.
push
({
imageUrl
:
layout
.
get_Image
(),
title
:
(
name
!==
''
)
?
name
:
me
.
layoutNames
[
layout
.
getType
()],
itemWidth
:
layout
.
get_Width
(),
itemHeight
:
layout
.
get_Height
(),
idx
:
layout
.
getIndex
()
});
});
}
Common
.
SharedSettings
.
set
(
'
slidelayouts
'
,
_layouts
);
Common
.
NotificationCenter
.
trigger
(
'
slidelayouts:load
'
,
_layouts
);
this
.
getView
(
'
AddSlide
'
).
updateLayouts
(
_layouts
);
$
(
'
#add-slide .slide-layout li
'
).
single
(
'
click
'
,
_
.
buffered
(
me
.
onStyleClick
,
100
,
me
));
},
textTableSize
:
'
Table Size
'
,
textColumns
:
'
Columns
'
,
textRows
:
'
Rows
'
,
textCancel
:
'
Cancel
'
}
})(),
PE
.
Controllers
.
AddSlide
||
{}))
});
\ No newline at end of file
apps/presentationeditor/mobile/app/template/AddSlide.template
0 → 100644
View file @
409121c2
<!-- Root view -->
<div id="add-slide-root">
<div class="page-content dataview slide-layout" style="width: 100%;">
</div>
</div>
\ No newline at end of file
apps/presentationeditor/mobile/app/view/add/AddSlide.js
0 → 100644
View file @
409121c2
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
/**
* AddSlide.js
* Presentation Editor
*
* Created by Julia Radzhabova on 12/06/16
* Copyright (c) 2016 Ascensio System SIA. All rights reserved.
*
*/
define
([
'
text!presentationeditor/mobile/app/template/AddSlide.template
'
,
'
jquery
'
,
'
underscore
'
,
'
backbone
'
],
function
(
addTemplate
,
$
,
_
,
Backbone
)
{
'
use strict
'
;
PE
.
Views
.
AddSlide
=
Backbone
.
View
.
extend
(
_
.
extend
((
function
()
{
// private
var
_layouts
=
[];
return
{
// el: '.view-main',
template
:
_
.
template
(
addTemplate
),
events
:
{
},
initialize
:
function
()
{
Common
.
NotificationCenter
.
on
(
'
addcontainer:show
'
,
_
.
bind
(
this
.
initEvents
,
this
));
},
initEvents
:
function
()
{
var
me
=
this
;
me
.
initControls
();
},
// Render layout
render
:
function
()
{
this
.
layout
=
$
(
'
<div/>
'
).
append
(
this
.
template
({
android
:
Common
.
SharedSettings
.
get
(
'
android
'
),
phone
:
Common
.
SharedSettings
.
get
(
'
phone
'
)
}));
return
this
;
},
rootLayout
:
function
()
{
if
(
this
.
layout
)
{
return
this
.
layout
.
find
(
'
#add-slide-root
'
)
.
html
();
}
return
''
;
},
initControls
:
function
()
{
//
},
updateLayouts
:
function
(
layouts
)
{
_layouts
=
layouts
;
this
.
renderLayouts
();
},
renderLayouts
:
function
()
{
var
$layoutContainer
=
$
(
'
.container-add .slide-layout
'
);
if
(
$layoutContainer
.
length
>
0
&&
_layouts
.
length
>
0
)
{
var
columns
=
parseInt
((
$layoutContainer
.
width
()
-
20
)
/
(
_layouts
[
0
].
itemWidth
+
2
)),
// magic
row
=
-
1
,
layouts
=
[];
_
.
each
(
_layouts
,
function
(
layout
,
index
)
{
if
(
0
==
index
%
columns
)
{
layouts
.
push
([]);
row
++
}
layouts
[
row
].
push
(
layout
);
});
var
template
=
_
.
template
([
'
<% _.each(layouts, function(row) { %>
'
,
'
<ul class="row">
'
,
'
<% _.each(row, function(item) { %>
'
,
'
<li data-type="<%= item.idx %>">
'
,
'
<img src="<%= item.imageUrl %>" width="<%= item.itemWidth %>" height="<%= item.itemHeight %>">
'
,
'
</li>
'
,
'
<% }); %>
'
,
'
</ul>
'
,
'
<% }); %>
'
].
join
(
''
),
{
layouts
:
layouts
});
$layoutContainer
.
html
(
template
);
}
}
}
})(),
PE
.
Views
.
AddSlide
||
{}))
});
\ No newline at end of file
apps/presentationeditor/mobile/resources/css/app-ios.css
View file @
409121c2
This diff is collapsed.
Click to expand it.
apps/presentationeditor/mobile/resources/css/app-material.css
View file @
409121c2
This diff is collapsed.
Click to expand it.
apps/presentationeditor/mobile/resources/less/app-ios.less
View file @
409121c2
...
...
@@ -170,4 +170,23 @@ input, textarea {
}
}
}
}
// Slide layout
.slide-layout {
.row {
margin-bottom: 12px;
}
li {
margin: 0;
padding: 1px;
img {
width: 119px;
height: 67px;
box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}
}
}
\ No newline at end of file
apps/presentationeditor/mobile/resources/less/app-material.less
View file @
409121c2
...
...
@@ -165,3 +165,21 @@ input, textarea {
}
}
// Slide layout
.slide-layout {
.row {
margin-bottom: 12px;
}
li {
margin: 0;
padding: 1px;
img {
width: 119px;
height: 67px;
box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}
}
}
\ No newline at end of file
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