Commit 1b63975a authored by Alexander Yuzhin's avatar Alexander Yuzhin

[PE mobile] Add EditContainer and AddContainer.

parent 64b17d73
......@@ -138,8 +138,8 @@ require([
'Search',
'Main',
// 'DocumentHolder',
'Settings'
// 'EditContainer',
'Settings',
'EditContainer',
// 'EditText',
// 'EditParagraph',
// 'EditTable',
......@@ -147,7 +147,7 @@ require([
// 'EditShape',
// 'EditChart',
// 'EditHyperlink',
// 'AddContainer',
'AddContainer'
// 'AddTable',
// 'AddShape',
// 'AddImage',
......@@ -203,8 +203,8 @@ require([
'presentationeditor/mobile/app/controller/Search',
'presentationeditor/mobile/app/controller/Main',
// 'presentationeditor/mobile/app/controller/DocumentHolder',
'presentationeditor/mobile/app/controller/Settings'
// 'presentationeditor/mobile/app/controller/edit/EditContainer',
'presentationeditor/mobile/app/controller/Settings',
'presentationeditor/mobile/app/controller/edit/EditContainer',
// 'presentationeditor/mobile/app/controller/edit/EditText',
// 'presentationeditor/mobile/app/controller/edit/EditParagraph',
// 'presentationeditor/mobile/app/controller/edit/EditTable',
......@@ -212,7 +212,7 @@ require([
// 'presentationeditor/mobile/app/controller/edit/EditShape',
// 'presentationeditor/mobile/app/controller/edit/EditChart',
// 'presentationeditor/mobile/app/controller/edit/EditHyperlink',
// 'presentationeditor/mobile/app/controller/add/AddContainer',
'presentationeditor/mobile/app/controller/add/AddContainer'
// 'presentationeditor/mobile/app/controller/add/AddTable',
// 'presentationeditor/mobile/app/controller/add/AddShape',
// 'presentationeditor/mobile/app/controller/add/AddImage',
......
......@@ -81,16 +81,19 @@ define([
// Render layout
render: function() {
var $el = $(this.el);
var me = this,
$el = $(me.el);
$el.prepend(this.template({
$el.prepend(me.template({
android : Common.SharedSettings.get('android'),
phone : Common.SharedSettings.get('phone'),
backTitle : Common.SharedSettings.get('android') ? '' : this.textBack,
scope : this
backTitle : Common.SharedSettings.get('android') ? '' : me.textBack,
scope : me
}));
return this;
$('.view-main .navbar').on('addClass removeClass', _.bind(me.onDisplayMainNavbar, me));
return me;
},
setMode: function (mode) {
......@@ -101,6 +104,11 @@ define([
}
},
onDisplayMainNavbar: function (e) {
var $target = $(e.currentTarget);
$('#editor_sdk').css('marginTop', $target.hasClass('navbar-hidden') ? 0 : '');
},
// Search
searchToggle: function() {
if ($$('.searchbar.document').length > 0) {
......@@ -120,13 +128,13 @@ define([
// Editor
showEdition: function () {
// PE.getController('EditContainer').showModal();
PE.getController('EditContainer').showModal();
},
// Inserts
showInserts: function () {
// PE.getController('AddContainer').showModal();
PE.getController('AddContainer').showModal();
},
// Settings
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment