[PE mobile] clear sources

This commit is contained in:
Maxim Kadushkin 2020-11-25 17:15:10 +03:00
parent cc4bed7267
commit ea4a9f8c67
61 changed files with 0 additions and 31803 deletions

View file

@ -1,237 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* app.js
* Presentation Editor
*
* Created by Alexander Yuzhin on 11/21/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
'use strict';
var reqerr;
require.config({
baseUrl: '../../',
paths: {
jquery : '../vendor/jquery/jquery',
underscore : '../vendor/underscore/underscore',
backbone : '../vendor/backbone/backbone',
framework7 : '../vendor/framework7/js/framework7',
text : '../vendor/requirejs-text/text',
xregexp : '../vendor/xregexp/xregexp-all-min',
sockjs : '../vendor/sockjs/sockjs.min',
api : 'api/documents/api',
core : 'common/main/lib/core/application',
extendes : 'common/mobile/utils/extendes',
notification : 'common/main/lib/core/NotificationCenter',
localstorage : 'common/main/lib/util/LocalStorage',
analytics : 'common/Analytics',
gateway : 'common/Gateway',
locale : 'common/locale',
irregularstack : 'common/IrregularStack',
sharedsettings : 'common/mobile/utils/SharedSettings',
features : '../../web-apps-mobile/slide/patch'
},
shim: {
framework7: {
exports: 'Framework7'
},
underscore: {
exports: '_'
},
backbone: {
deps: [
'underscore',
'jquery'
],
exports: 'Backbone'
},
core: {
deps: [
'backbone',
'notification',
'irregularstack',
'sharedsettings'
]
},
extendes: {
deps: [
'underscore',
'jquery',
'framework7'
]
},
gateway: {
deps: [
'jquery'
]
},
analytics: {
deps: [
'jquery'
]
}
}
});
require([
'backbone',
'framework7',
'core',
'underscore',
'extendes',
'api',
'analytics',
'gateway',
'locale',
'sockjs'
], function (Backbone, Framework7, Core) {
Backbone.history.start();
/**
* Application instance with DE namespace defined
*/
var app = new Backbone.Application({
nameSpace: 'PE',
autoCreate: false,
controllers : [
'Common.Controllers.Plugins',
'Editor',
'Toolbar',
'Search',
'Main',
'DocumentHolder',
'DocumentPreview',
'Settings',
'EditContainer',
'EditText',
'EditTable',
'EditImage',
'EditShape',
'EditSlide',
'EditChart',
'EditLink',
'AddContainer',
'AddTable',
'AddShape',
'AddImage',
'AddLink',
'AddSlide',
'AddOther',
'Common.Controllers.Collaboration'
]
});
var device = Framework7.prototype.device;
var loadPlatformCss = function (filename, opt){
var fileref = document.createElement('link');
fileref.setAttribute('rel', 'stylesheet');
fileref.setAttribute('type', 'text/css');
fileref.setAttribute('href', filename);
if (typeof fileref != 'undefined') {
document.getElementsByTagName("head")[0].appendChild(fileref);
}
};
//Store Framework7 initialized instance for easy access
window.uiApp = new Framework7({
// Default title for modals
modalTitle: 'ONLYOFFICE',
// If it is webapp, we can enable hash navigation:
// pushState: false,
// If Android
material: device.android,
// Hide and show indicator during ajax requests
onAjaxStart: function (xhr) {
uiApp.showIndicator();
},
onAjaxComplete: function (xhr) {
uiApp.hideIndicator();
}
});
//Export DOM7 to local variable to make it easy accessable
window.$$ = Dom7;
//Load platform styles
loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css');
Common.Locale.apply(function(){
require([
'common/main/lib/util/LocalStorage',
'common/main/lib/util/utils',
'common/mobile/lib/controller/Plugins',
'presentationeditor/mobile/app/controller/Editor',
'presentationeditor/mobile/app/controller/Toolbar',
'presentationeditor/mobile/app/controller/Search',
'presentationeditor/mobile/app/controller/Main',
'presentationeditor/mobile/app/controller/DocumentHolder',
'presentationeditor/mobile/app/controller/DocumentPreview',
'presentationeditor/mobile/app/controller/Settings',
'presentationeditor/mobile/app/controller/edit/EditContainer',
'presentationeditor/mobile/app/controller/edit/EditText',
'presentationeditor/mobile/app/controller/edit/EditTable',
'presentationeditor/mobile/app/controller/edit/EditImage',
'presentationeditor/mobile/app/controller/edit/EditShape',
'presentationeditor/mobile/app/controller/edit/EditSlide',
'presentationeditor/mobile/app/controller/edit/EditChart',
'presentationeditor/mobile/app/controller/edit/EditLink',
'presentationeditor/mobile/app/controller/add/AddContainer',
'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/AddSlide',
'presentationeditor/mobile/app/controller/add/AddOther',
'common/mobile/lib/controller/Collaboration'
], function() {
window.compareVersions = true;
var _s = app.start.bind(app);
require(['features'], _s, _s);
});
});
}, function(err) {
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {
reqerr = window.requireTimeourError();
window.alert(reqerr);
window.location.reload();
}
});

View file

@ -1,244 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* app.js
* Presentation Editor
*
* Created by Alexander Yuzhin on 11/21/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
'use strict';
var reqerr;
require.config({
baseUrl: '../../',
paths: {
jquery : '../vendor/jquery/jquery',
underscore : '../vendor/underscore/underscore',
backbone : '../vendor/backbone/backbone',
framework7 : '../vendor/framework7/js/framework7',
text : '../vendor/requirejs-text/text',
xregexp : '../vendor/xregexp/xregexp-all-min',
sockjs : '../vendor/sockjs/sockjs.min',
allfonts : '../../sdkjs/common/AllFonts',
sdk : '../../sdkjs/slide/sdk-all-min',
api : 'api/documents/api',
core : 'common/main/lib/core/application',
extendes : 'common/mobile/utils/extendes',
notification : 'common/main/lib/core/NotificationCenter',
localstorage : 'common/main/lib/util/LocalStorage',
analytics : 'common/Analytics',
gateway : 'common/Gateway',
locale : 'common/locale',
irregularstack : 'common/IrregularStack',
sharedsettings : 'common/mobile/utils/SharedSettings'
},
shim: {
framework7: {
exports: 'Framework7'
},
underscore: {
exports: '_'
},
backbone: {
deps: [
'underscore',
'jquery'
],
exports: 'Backbone'
},
core: {
deps: [
'backbone',
'notification',
'irregularstack',
'sharedsettings'
]
},
extendes: {
deps: [
'underscore',
'jquery',
'framework7'
]
},
sdk: {
deps: [
'jquery',
'underscore',
'allfonts',
'xregexp',
'sockjs'
]
},
gateway: {
deps: [
'jquery'
]
},
analytics: {
deps: [
'jquery'
]
}
}
});
require([
'backbone',
'framework7',
'core',
'underscore',
'extendes',
'sdk',
'api',
'analytics',
'gateway',
'locale'
], function (Backbone, Framework7, Core) {
Backbone.history.start();
/**
* Application instance with PE namespace defined
*/
var app = new Backbone.Application({
nameSpace: 'PE',
autoCreate: false,
controllers : [
'Common.Controllers.Plugins',
'Editor',
'Toolbar',
'Search',
'Main',
'DocumentHolder',
'DocumentPreview',
'Settings',
'EditContainer',
'EditText',
'EditTable',
'EditImage',
'EditShape',
'EditSlide',
'EditChart',
'EditLink',
'AddContainer',
'AddTable',
'AddShape',
'AddImage',
'AddLink',
'AddSlide',
'AddOther',
'Common.Controllers.Collaboration'
]
});
var device = Framework7.prototype.device;
var loadPlatformCss = function (filename, opt){
var fileref = document.createElement('link');
fileref.setAttribute('rel', 'stylesheet');
fileref.setAttribute('type', 'text/css');
fileref.setAttribute('href', filename);
if (typeof fileref != 'undefined') {
document.getElementsByTagName("head")[0].appendChild(fileref);
}
};
//Store Framework7 initialized instance for easy access
window.uiApp = new Framework7({
// Default title for modals
modalTitle: '{{APP_TITLE_TEXT}}',
// If it is webapp, we can enable hash navigation:
// pushState: false,
// If Android
material: device.android,
// Hide and show indicator during ajax requests
onAjaxStart: function (xhr) {
uiApp.showIndicator();
},
onAjaxComplete: function (xhr) {
uiApp.hideIndicator();
}
});
//Export DOM7 to local variable to make it easy accessable
window.$$ = Dom7;
//Load platform styles
loadPlatformCss('resources/css/app-' + (device.android ? 'material' : 'ios') + '.css');
Common.Locale.apply(function(){
require([
'common/main/lib/util/LocalStorage',
'common/main/lib/util/utils',
'common/mobile/lib/controller/Plugins',
'presentationeditor/mobile/app/controller/Editor',
'presentationeditor/mobile/app/controller/Toolbar',
'presentationeditor/mobile/app/controller/Search',
'presentationeditor/mobile/app/controller/Main',
'presentationeditor/mobile/app/controller/DocumentHolder',
'presentationeditor/mobile/app/controller/DocumentPreview',
'presentationeditor/mobile/app/controller/Settings',
'presentationeditor/mobile/app/controller/edit/EditContainer',
'presentationeditor/mobile/app/controller/edit/EditText',
'presentationeditor/mobile/app/controller/edit/EditTable',
'presentationeditor/mobile/app/controller/edit/EditImage',
'presentationeditor/mobile/app/controller/edit/EditShape',
'presentationeditor/mobile/app/controller/edit/EditSlide',
'presentationeditor/mobile/app/controller/edit/EditChart',
'presentationeditor/mobile/app/controller/edit/EditLink',
'presentationeditor/mobile/app/controller/add/AddContainer',
'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/AddSlide',
'presentationeditor/mobile/app/controller/add/AddOther',
'common/mobile/lib/controller/Collaboration'
], function() {
app.start();
});
});
}, function(err) {
if (err.requireType == 'timeout' && !reqerr && window.requireTimeourError) {
reqerr = window.requireTimeourError();
window.alert(reqerr);
window.location.reload();
}
});

View file

@ -1,447 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* DocumentHolder.js
* Presentation Editor
*
* Created by Julia Radzhabova on 12/19/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'core',
'jquery',
'underscore',
'backbone',
'presentationeditor/mobile/app/view/DocumentHolder'
], function (core, $, _, Backbone) {
'use strict';
PE.Controllers.DocumentHolder = Backbone.Controller.extend(_.extend((function() {
// private
var _stack,
_view,
_actionSheets = [],
_isEdit = false,
_isPopMenuHidden = false,
_isComments = false,
_canViewComments = true;
return {
models: [],
collections: [],
views: [
'DocumentHolder'
],
initialize: function() {
this.addListeners({
'DocumentHolder': {
'contextmenu:click' : this.onContextMenuClick
}
});
},
setApi: function(api) {
var me = this;
me.api = api;
me.api.asc_registerCallback('asc_onShowPopMenu', _.bind(me.onApiShowPopMenu, me));
me.api.asc_registerCallback('asc_onHidePopMenu', _.bind(me.onApiHidePopMenu, me));
me.api.asc_registerCallback('asc_onDocumentContentReady', _.bind(me.onApiDocumentContentReady, me));
Common.NotificationCenter.on('api:disconnect', _.bind(me.onCoAuthoringDisconnect, me));
me.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(me.onCoAuthoringDisconnect,me));
me.api.asc_registerCallback('asc_onShowComment', _.bind(me.onApiShowComment, me));
me.api.asc_registerCallback('asc_onHideComment', _.bind(me.onApiHideComment, me));
},
onApiShowComment: function(comments) {
_isComments = comments && comments.length>0;
},
onApiHideComment: function() {
_isComments = false;
},
setMode: function (mode) {
_isEdit = mode.isEdit;
_canViewComments = mode.canViewComments;
},
// When our application is ready, lets get started
onLaunch: function() {
var me = this;
_view = me.createView('DocumentHolder').render();
$$(window).on('resize', _.bind(me.onEditorResize, me));
},
// Handlers
onContextMenuClick: function (view, eventName) {
var me = this;
if ('cut' == eventName) {
var res = me.api.Cut();
if (!res) {
_view.hideMenu();
if (!Common.localStorage.getBool("pe-hide-copy-cut-paste-warning")) {
uiApp.modal({
title: me.textCopyCutPasteActions,
text: me.errorCopyCutPaste,
afterText: '<label class="label-checkbox item-content no-ripple">' +
'<input type="checkbox" name="checkbox-show-cut">' +
'<div class="item-media" style="margin-top: 10px; display: flex; align-items: center;">' +
'<i class="icon icon-form-checkbox"></i><span style="margin-left: 10px;">' + me.textDoNotShowAgain + '</span>' +
'</div>' +
'</label>',
buttons: [{
text: 'OK',
onClick: function () {
var dontshow = $('input[name="checkbox-show-cut"]').prop('checked');
if (dontshow) Common.localStorage.setItem("pe-hide-copy-cut-paste-warning", 1);
}
}]
});
}
}
} else if ('copy' == eventName) {
var res = me.api.Copy();
if (!res) {
_view.hideMenu();
if (!Common.localStorage.getBool("pe-hide-copy-cut-paste-warning")) {
uiApp.modal({
title: me.textCopyCutPasteActions,
text: me.errorCopyCutPaste,
afterText: '<label class="label-checkbox item-content no-ripple">' +
'<input type="checkbox" name="checkbox-show-copy">' +
'<div class="item-media" style="margin-top: 10px; display: flex; align-items: center;">' +
'<i class="icon icon-form-checkbox"></i><span style="margin-left: 10px;">' + me.textDoNotShowAgain + '</span>' +
'</div>' +
'</label>',
buttons: [{
text: 'OK',
onClick: function () {
var dontshow = $('input[name="checkbox-show-copy"]').prop('checked');
if (dontshow) Common.localStorage.setItem("pe-hide-copy-cut-paste-warning", 1);
}
}]
});
}
}
} else if ('paste' == eventName) {
var res = me.api.Paste();
if (!res) {
_view.hideMenu();
if (!Common.localStorage.getBool("pe-hide-copy-cut-paste-warning")) {
uiApp.modal({
title: me.textCopyCutPasteActions,
text: me.errorCopyCutPaste,
afterText: '<label class="label-checkbox item-content no-ripple">' +
'<input type="checkbox" name="checkbox-show-paste">' +
'<div class="item-media" style="margin-top: 10px; display: flex; align-items: center;">' +
'<i class="icon icon-form-checkbox"></i><span style="margin-left: 10px;">' + me.textDoNotShowAgain + '</span>' +
'</div>' +
'</label>',
buttons: [{
text: 'OK',
onClick: function () {
var dontshow = $('input[name="checkbox-show-paste"]').prop('checked');
if (dontshow) Common.localStorage.setItem("pe-hide-copy-cut-paste-warning", 1);
}
}]
});
}
}
} else if ('delete' == eventName) {
me.api.asc_Remove();
} else if ('edit' == eventName) {
_view.hideMenu();
PE.getController('EditContainer').showModal();
} else if ('addlink' == eventName) {
_view.hideMenu();
PE.getController('AddContainer').showModal();
uiApp.showTab('#add-other');
PE.getController('AddOther').getView('AddOther').showPageLink();
} else if ('openlink' == eventName) {
_.some(_stack, function (item) {
if (item.get_ObjectType() == Asc.c_oAscTypeSelectElement.Hyperlink) {
me._openLink(item.get_ObjectValue().get_Value());
return true;
}
});
} else if ('viewcomment' == eventName) {
var getCollaboration = PE.getController('Common.Controllers.Collaboration');
getCollaboration.showCommentModal();
} else if ('addcomment' == eventName) {
_view.hideMenu();
PE.getController('AddContainer').showModal();
PE.getController('AddOther').getView('AddOther').showPageComment(false);
} else if ('showActionSheet' == eventName && _actionSheets.length > 0) {
_.delay(function () {
_.each(_actionSheets, function (action) {
action.text = action.caption
action.onClick = function () {
me.onContextMenuClick(null, action.event)
}
});
uiApp.actions([_actionSheets, [
{
text: me.sheetCancel,
bold: true
}
]]);
}, 100);
}
_view.hideMenu();
},
stopApiPopMenu: function() {
_isPopMenuHidden = true;
this.onApiHidePopMenu();
},
startApiPopMenu: function() {
_isPopMenuHidden = false;
},
// API Handlers
onEditorResize: function(cmp) {
// Hide context menu
},
onApiShowPopMenu: function(posX, posY) {
if (_isPopMenuHidden || $('.popover.settings, .popup.settings, .picker-modal.settings, .modal-in, .actions-modal').length > 0)
return;
var me = this,
items;
_stack = me.api.getSelectedElements();
items = me._initMenu(_stack);
_view.showMenu(items, posX, posY);
},
onApiHidePopMenu: function() {
_view && _view.hideMenu();
},
onApiDocumentContentReady: function () {
_view = this.createView('DocumentHolder').render();
},
// Internal
_openLink: function(url) {
if (this.api.asc_getUrlType(url) > 0) {
var newDocumentPage = window.open(url, '_blank');
if (newDocumentPage) {
newDocumentPage.focus();
}
} else
this.api.asc_GoToInternalHyperlink(url);
},
_initMenu: function (stack) {
var me = this,
arrItems = [],
arrItemsIcon = [],
canCopy = me.api.can_CopyCut();
_actionSheets = [];
var isText = false,
isTable = false,
isImage = false,
isChart = false,
isShape = false,
isLink = false,
isSlide = false,
isObject = false;
_.each(stack, function (item) {
var objectType = item.get_ObjectType(),
objectValue = item.get_ObjectValue();
if (objectType == Asc.c_oAscTypeSelectElement.Paragraph) {
isText = true;
} else if (objectType == Asc.c_oAscTypeSelectElement.Image) {
isImage = true;
} else if (objectType == Asc.c_oAscTypeSelectElement.Chart) {
isChart = true;
} else if (objectType == Asc.c_oAscTypeSelectElement.Shape) {
isShape = true;
} else if (objectType == Asc.c_oAscTypeSelectElement.Table) {
isTable = true;
} else if (objectType == Asc.c_oAscTypeSelectElement.Hyperlink) {
isLink = true;
} else if (objectType == Asc.c_oAscTypeSelectElement.Slide) {
isSlide = true;
}
});
isObject = isText || isImage || isChart || isShape || isTable;
if (canCopy && isObject) {
arrItemsIcon.push({
caption: me.menuCopy,
event: 'copy',
icon: 'icon-copy'
});
}
if (_canViewComments && _isComments && !_isEdit) {
arrItems.push({
caption: me.menuViewComment,
event: 'viewcomment'
});
}
if (stack.length > 0) {
var topObject = stack[stack.length - 1],
topObjectType = topObject.get_ObjectType(),
topObjectValue = topObject.get_ObjectValue(),
objectLocked = _.isFunction(topObjectValue.get_Locked) ? topObjectValue.get_Locked() : false;
!objectLocked && (objectLocked = _.isFunction(topObjectValue.get_LockDelete) ? topObjectValue.get_LockDelete() : false);
var swapItems = function(items, indexBefore, indexAfter) {
items[indexAfter] = items.splice(indexBefore, 1, items[indexAfter])[0];
};
if (!objectLocked && _isEdit && !me.isDisconnected) {
if (canCopy && isObject) {
arrItemsIcon.push({
caption: me.menuCut,
event: 'cut',
icon: 'icon-cut'
});
// Swap 'Copy' and 'Cut'
swapItems(arrItemsIcon, 0, 1);
}
arrItemsIcon.push({
caption: me.menuPaste,
event: 'paste',
icon: 'icon-paste'
});
if (isObject)
arrItems.push({
caption: me.menuDelete,
event: 'delete'
});
arrItems.push({
caption: me.menuEdit,
event: 'edit'
});
if (!isLink && me.api.can_AddHyperlink()!==false) {
arrItems.push({
caption: me.menuAddLink,
event: 'addlink'
});
}
if (_isComments && _canViewComments) {
arrItems.push({
caption: me.menuViewComment,
event: 'viewcomment'
});
}
var hideAddComment = (isText && isChart) || me.api.can_AddQuotedComment() === false || !_canViewComments;
if (!hideAddComment) {
arrItems.push({
caption: me.menuAddComment,
event: 'addcomment'
});
}
}
}
if (isLink) {
arrItems.push({
caption: me.menuOpenLink,
event: 'openlink'
});
}
if (Common.SharedSettings.get('phone') && arrItems.length > 2) {
_actionSheets = arrItems.slice(2);
arrItems = arrItems.slice(0, 2);
arrItems.push({
caption: me.menuMore,
event: 'showActionSheet'
});
}
var menuItems = {itemsIcon: arrItemsIcon, items: arrItems};
return menuItems;
},
onCoAuthoringDisconnect: function() {
this.isDisconnected = true;
},
menuCut: 'Cut',
menuCopy: 'Copy',
menuPaste: 'Paste',
menuEdit: 'Edit',
menuDelete: 'Delete',
menuAddLink: 'Add Link',
menuOpenLink: 'Open Link',
menuMore: 'More',
menuViewComment: 'View Comment',
menuAddComment: 'Add Comment',
sheetCancel: 'Cancel',
textCopyCutPasteActions: 'Copy, Cut and Paste Actions',
errorCopyCutPaste: 'Copy, cut and paste actions using the context menu will be performed within the current file only.',
textDoNotShowAgain: 'Don\'t show again'
}
})(), PE.Controllers.DocumentHolder || {}))
});

View file

@ -1,152 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* DocumentPreview.js
* Presentation Editor
*
* Created by Julia Radzhabova on 12/22/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'core',
'jquery',
'underscore',
'backbone',
'presentationeditor/mobile/app/view/DocumentPreview'
], function (core, $, _, Backbone) {
'use strict';
PE.Controllers.DocumentPreview = Backbone.Controller.extend(_.extend((function() {
// private
var _view,
_touches,
_touchStart,
_touchEnd;
return {
models: [],
collections: [],
views: [
'DocumentPreview'
],
initialize: function() {
},
setApi: function(api) {
var me = this;
me.api = api;
me.api.asc_registerCallback('asc_onEndDemonstration', _.bind(me.onEndDemonstration, me));
me.api.DemonstrationEndShowMessage(me.txtFinalMessage);
},
// When our application is ready, lets get started
onLaunch: function() {
var me = this;
_view = me.createView('DocumentPreview').render();
$$('#pe-preview').on('touchstart', _.bind(me.onTouchStart, me))
.on('touchmove', _.bind(me.onTouchMove, me))
.on('touchend', _.bind(me.onTouchEnd, me))
.on('click', _.bind(me.onClick, me));
},
// Handlers
show: function() {
_view.$el.css('display', 'block');
$('.view.view-main').css('z-index','0');
PE.getController('DocumentHolder').stopApiPopMenu();
this.api.StartDemonstration('presentation-preview', this.api.getCurrentPage());
},
onTouchStart: function(event) {
event.preventDefault();
_touches = [];
for (var i=0; i<event.touches.length; i++) {
_touches.push([event.touches[i].pageX, event.touches[i].pageY]);
}
_touchEnd = _touchStart = [event.touches[0].pageX, event.touches[0].pageY];
},
onTouchMove: function(event) {
event.preventDefault();
_touchEnd = [event.touches[0].pageX, event.touches[0].pageY];
if (event.touches.length<2) return;
for (var i=0; i<event.touches.length; i++) {
if (Math.abs(event.touches[i].pageX - _touches[i][0]) > 20 || Math.abs(event.touches[i].pageY - _touches[i][1]) > 20 ) {
this.api.EndDemonstration();
break;
}
}
},
onTouchEnd: function(event) {
event.preventDefault();
if (_touchEnd[0] - _touchStart[0] > 20)
this.api.DemonstrationPrevSlide();
else if (_touchStart[0] - _touchEnd[0] > 20)
this.api.DemonstrationNextSlide();
},
onClick: function(event) {
this.api.DemonstrationNextSlide();
},
// API Handlers
onEndDemonstration: function() {
_view.$el.css('display', 'none');
$('.view.view-main').css('z-index','auto');
PE.getController('DocumentHolder').startApiPopMenu();
},
txtFinalMessage: 'The end of slide preview. Click to exit.'
// Internal
}
})(), PE.Controllers.DocumentPreview || {}))
});

View file

@ -1,122 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* Editor.js
* Presentation Editor
*
* Created by Alexander Yuzhin on 11/21/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'core',
'presentationeditor/mobile/app/view/Editor'
], function (core) {
'use strict';
PE.Controllers.Editor = Backbone.Controller.extend((function() {
// private
function isPhone() {
var ua = navigator.userAgent,
isMobile = /Mobile(\/|\s|;)/.test(ua);
return /(iPhone|iPod)/.test(ua) ||
(!/(Silk)/.test(ua) && (/(Android)/.test(ua) && (/(Android 2)/.test(ua) || isMobile))) ||
(/(BlackBerry|BB)/.test(ua) && isMobile) ||
/(Windows Phone)/.test(ua);
}
function isTablet() {
var ua = navigator.userAgent;
return !isPhone(ua) && (/iPad/.test(ua) || /Android/.test(ua) || /(RIM Tablet OS)/.test(ua) ||
(/MSIE 10/.test(ua) && /; Touch/.test(ua)));
}
function isSailfish() {
var ua = navigator.userAgent;
return /Sailfish/.test(ua) || /Jolla/.test(ua);
}
return {
// Specifying a EditorController model
models: [],
// Specifying a collection of out EditorView
collections: [],
// Specifying application views
views: [
'Editor' // is main application layout
],
// When controller is created let's setup view event listeners
initialize: function() {
// This most important part when we will tell our controller what events should be handled
},
setApi: function(api) {
this.api = api;
},
// When our application is ready, lets get started
onLaunch: function() {
// Device detection
var phone = isPhone();
// console.debug('Layout profile:', phone ? 'Phone' : 'Tablet');
if ( isSailfish() ) {
Common.SharedSettings.set('sailfish', true);
$('html').addClass('sailfish');
}
Common.SharedSettings.set('android', Framework7.prototype.device.android);
Common.SharedSettings.set('phone', phone);
$('html').addClass(phone ? 'phone' : 'tablet');
// Create and render main view
this.editorView = this.createView('Editor').render();
$$(window).on('resize', _.bind(this.onWindowResize, this));
},
onWindowResize: function(e) {
this.api && this.api.Resize();
}
}
})());
});

File diff suppressed because it is too large Load diff

View file

@ -1,337 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* Search.js
* Presentation Editor
*
* Created by Alexander Yuzhin on 11/22/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'core',
'jquery',
'underscore',
'backbone',
'presentationeditor/mobile/app/view/Search'
], function (core, $, _, Backbone) {
'use strict';
PE.Controllers.Search = Backbone.Controller.extend(_.extend((function() {
// private
var _isShow = false,
_startPoint = {};
var pointerEventToXY = function(e){
var out = {x:0, y:0};
if(e.type == 'touchstart' || e.type == 'touchend'){
var touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
out.x = touch.pageX;
out.y = touch.pageY;
} else if (e.type == 'mousedown' || e.type == 'mouseup') {
out.x = e.pageX;
out.y = e.pageY;
}
return out;
};
function iOSVersion() {
var ua = navigator.userAgent;
var m;
return (m = /(iPad|iPhone|iphone).*?(OS |os |OS\_)(\d+((_|\.)\d)?((_|\.)\d)?)/.exec(ua)) ? parseFloat(m[3]) : 0;
}
return {
models: [],
collections: [],
views: [
'Search'
],
initialize: function() {
this.addListeners({
'Search': {
'searchbar:show' : this.onSearchbarShow,
'searchbar:hide' : this.onSearchbarHide,
'searchbar:render' : this.onSearchbarRender,
'searchbar:showsettings': this.onSearchbarSettings
}
});
},
setApi: function(api) {
this.api = api;
},
setMode: function (mode) {
this.getView('Search').setMode(mode);
},
onLaunch: function() {
var me = this;
me.createView('Search').render();
if (iOSVersion()<13) {
$('#editor_sdk').single('mousedown touchstart', _.bind(me.onEditorTouchStart, me));
$('#editor_sdk').single('mouseup touchend', _.bind(me.onEditorTouchEnd, me));
} else {
$('#editor_sdk').single('pointerdown', _.bind(me.onEditorTouchStart, me));
$('#editor_sdk').single('pointerup', _.bind(me.onEditorTouchEnd, me));
}
},
showSearch: function () {
this.getView('Search').showSearch();
},
hideSearch: function () {
this.getView('Search').hideSearch();
},
// Handlers
onEditorTouchStart: function (e) {
_startPoint = pointerEventToXY(e);
},
onEditorTouchEnd: function (e) {
var _endPoint = pointerEventToXY(e);
if (_isShow) {
var distance = (_startPoint.x===undefined || _startPoint.y===undefined) ? 0 :
Math.sqrt((_endPoint.x -= _startPoint.x) * _endPoint.x + (_endPoint.y -= _startPoint.y) * _endPoint.y);
if (distance < 1) {
this.hideSearch();
}
}
},
onSearchbarRender: function(bar) {
var me = this,
searchString = Common.SharedSettings.get('search-search') || '',
replaceString = Common.SharedSettings.get('search-replace')|| '';
me.searchBar = uiApp.searchbar('.searchbar.document .searchbar.search', {
customSearch: true,
onSearch : _.bind(me.onSearchChange, me),
onEnable : _.bind(me.onSearchEnable, me),
onClear : _.bind(me.onSearchClear, me)
});
me.replaceBar = uiApp.searchbar('.searchbar.document .searchbar.replace', {
customSearch: true,
onSearch : _.bind(me.onReplaceChange, me),
onEnable : _.bind(me.onReplaceEnable, me),
onClear : _.bind(me.onReplaceClear, me)
});
me.searchPrev = $('.searchbar.document .prev');
me.searchNext = $('.searchbar.document .next');
me.replaceBtn = $('.searchbar.document .link.replace');
me.searchPrev.single('click', _.bind(me.onSearchPrev, me));
me.searchNext.single('click', _.bind(me.onSearchNext, me));
me.replaceBtn.single('click', _.bind(me.onReplace, me));
$$('.searchbar.document .link.replace').on('taphold', _.bind(me.onReplaceAll, me));
me.searchBar.search(searchString);
me.replaceBar.search(replaceString);
},
onSearchbarSettings: function (view) {
var strictBool = function (settingName) {
var value = Common.SharedSettings.get(settingName);
return !_.isUndefined(value) && (value === true);
};
var me = this,
isReplace = strictBool('search-is-replace'),
isCaseSensitive = strictBool('search-case-sensitive'),
$pageSettings = $('.page[data-page=search-settings]'),
$inputType = $pageSettings.find('input[name=search-type]'),
$inputCase = $pageSettings.find('#search-case-sensitive input:checkbox');
$inputType.val([isReplace ? 'replace' : 'search']);
$inputCase.prop('checked', isCaseSensitive);
// init events
$inputType.single('change', _.bind(me.onTypeChange, me));
$inputCase.single('change', _.bind(me.onCaseClick, me));
},
onSearchbarShow: function(bar) {
_isShow = true;
},
onSearchEnable: function (bar) {
this.replaceBar.container.removeClass('searchbar-active');
},
onSearchbarHide: function(bar) {
_isShow = false;
},
onSearchChange: function(search) {
var me = this,
isEmpty = (search.query.trim().length < 1);
Common.SharedSettings.set('search-search', search.query);
_.each([me.searchPrev, me.searchNext, me.replaceBtn], function(btn) {
btn.toggleClass('disabled', isEmpty);
});
},
onSearchClear: function(search) {
Common.SharedSettings.set('search-search', '');
// window.focus();
// document.activeElement.blur();
},
onReplaceChange: function(replace) {
var me = this,
isEmpty = (replace.query.trim().length < 1);
Common.SharedSettings.set('search-replace', replace.query);
},
onReplaceEnable: function (bar) {
this.searchBar.container.removeClass('searchbar-active');
},
onReplaceClear: function(replace) {
Common.SharedSettings.set('search-replace', '');
},
onSearchPrev: function(btn) {
this.onQuerySearch(this.searchBar.query, 'back');
},
onSearchNext: function(btn) {
this.onQuerySearch(this.searchBar.query, 'next');
},
onReplace: function (btn) {
this.onQueryReplace(this.searchBar.query, this.replaceBar.query);
},
onReplaceAll: function (e) {
var me = this,
popover = [
'<div class="popover" style="width: auto;">',
'<div class="popover-inner">',
'<div class="list-block">',
'<ul>',
'<li><a href="#" id="replace-all" class="item-link list-button">{0}</li>'.format(me.textReplaceAll),
'</ul>',
'</div>',
'</div>',
'</div>'
].join('');
popover = uiApp.popover(popover, $$(e.currentTarget));
$('#replace-all').single('click', _.bind(function () {
me.onQueryReplaceAll(this.searchBar.query, this.replaceBar.query);
uiApp.closeModal(popover);
}, me))
},
onQuerySearch: function(query, direction) {
var matchcase = Common.SharedSettings.get('search-case-sensitive') || false;
if (query && query.length) {
if (!this.api.findText(query, direction != 'back', matchcase)) {
var me = this;
uiApp.alert(
'',
me.textNoTextFound,
function () {
me.searchBar.input.focus();
}
);
}
}
},
onQueryReplace: function(search, replace) {
var matchcase = Common.SharedSettings.get('search-case-sensitive') || false;
if (search && search.length) {
if (!this.api.asc_replaceText(search, replace, false, matchcase)) {
var me = this;
uiApp.alert(
'',
me.textNoTextFound,
function () {
me.searchBar.input.focus();
}
);
}
}
},
onQueryReplaceAll: function(search, replace) {
var matchcase = Common.SharedSettings.get('search-case-sensitive') || false;
if (search && search.length) {
this.api.asc_replaceText(search, replace, true, matchcase);
}
},
onTypeChange: function (e) {
var me = this,
$target = $(e.currentTarget),
isReplace = ($target.val() === 'replace');
Common.SharedSettings.set('search-is-replace', isReplace);
$('.searchbar.document').toggleClass('replace', isReplace);
},
onCaseClick: function (e) {
Common.SharedSettings.set('search-case-sensitive', $(e.currentTarget).is(':checked'));
},
// API handlers
textNoTextFound : 'Text not found',
textReplaceAll: 'Replace All'
}
})(), PE.Controllers.Search || {}))
});

View file

@ -1,419 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* Settings.js
* Presentation Editor
*
* Created by Alexander Yuzhin on 11/22/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'core',
'jquery',
'underscore',
'backbone',
'presentationeditor/mobile/app/view/Settings'
], function (core, $, _, Backbone) {
'use strict';
PE.Controllers.Settings = Backbone.Controller.extend(_.extend((function() {
// private
var rootView,
inProgress,
infoObj,
modalView,
_licInfo,
_lang;
var _slideSizeArr = [
[254, 190.5], [254, 143]
];
return {
models: [],
collections: [],
views: [
'Settings'
],
initialize: function () {
Common.SharedSettings.set('readerMode', false);
Common.NotificationCenter.on('settingscontainer:show', _.bind(this.initEvents, this));
this.addListeners({
'Settings': {
'page:show' : this.onPageShow
}
});
},
setApi: function (api) {
this.api = api;
this.api.asc_registerCallback('asc_onPresentationSize', _.bind(this.onApiPageSize, this));
this.api.asc_registerCallback('asc_onSendThemeColorSchemes', _.bind(this.onSendThemeColorSchemes, this));
},
onLaunch: function () {
this.createView('Settings').render();
},
setMode: function (mode) {
this.getView('Settings').setMode(mode);
if (mode.canBranding)
_licInfo = mode.customization;
_lang = mode.lang;
},
initEvents: function () {
},
rootView : function() {
return rootView;
},
showModal: function() {
uiApp.closeModal();
if (Common.SharedSettings.get('phone')) {
modalView = uiApp.popup(
'<div class="popup settings container-settings">' +
'<div class="content-block">' +
'<div class="view settings-root-view navbar-through">' +
this.getView('Settings').rootLayout() +
'</div>' +
'</div>' +
'</div>'
);
} else {
modalView = uiApp.popover(
'<div class="popover settings container-settings">' +
'<div class="popover-angle"></div>' +
'<div class="popover-inner">' +
'<div class="content-block">' +
'<div class="view popover-view settings-root-view navbar-through">' +
this.getView('Settings').rootLayout() +
'</div>' +
'</div>' +
'</div>' +
'</div>',
$$('#toolbar-settings')
);
}
if (Framework7.prototype.device.android === true) {
$$('.view.settings-root-view.navbar-through').removeClass('navbar-through').addClass('navbar-fixed');
$$('.view.settings-root-view .navbar').prependTo('.view.settings-root-view > .pages > .page');
}
rootView = uiApp.addView('.settings-root-view', {
dynamicNavbar: true,
domCache: true
});
Common.NotificationCenter.trigger('settingscontainer:show');
this.onPageShow(this.getView('Settings'));
},
hideModal: function() {
if (modalView) {
uiApp.closeModal(modalView);
}
},
onPageShow: function(view, pageId) {
var me = this;
$('#settings-spellcheck input:checkbox').attr('checked', Common.Utils.InternalSettings.get("pe-mobile-spellcheck"));
$('#settings-search').single('click', _.bind(me._onSearch, me));
$('#settings-readermode input:checkbox').single('change', _.bind(me._onReaderMode, me));
$('#settings-spellcheck input:checkbox').single('change', _.bind(me._onSpellcheck, me));
$(modalView).find('.formats .page-content a').single('click', _.bind(me._onSaveFormat, me));
$('#page-settings-view #slide-size-block li').single('click', _.bind(me._onSlideSize, me));
$('#settings-print').single('click', _.bind(me._onPrint, me));
$('#settings-collaboration').single('click', _.bind(me.onCollaboration, me));
var _userCount = PE.getController('Main').returnUserCount();
if (_userCount > 0) {
$('#settings-collaboration').show();
}
Common.Utils.addScrollIfNeed('.page[data-page=settings-setup-view]', '.page[data-page=settings-setup-view] .page-content');
Common.Utils.addScrollIfNeed('.page[data-page=settings-download-view]', '.page[data-page=settings-download-view] .page-content');
Common.Utils.addScrollIfNeed('.page[data-page=settings-info-view]', '.page[data-page=settings-info-view] .page-content');
Common.Utils.addScrollIfNeed('.page[data-page=settings-about-view]', '.page[data-page=settings-about-view] .page-content');
Common.Utils.addScrollIfNeed('.page[data-page=color-schemes-view]', '.page[data-page=color-schemes-view] .page-content');
Common.Utils.addScrollIfNeed('.page[data-page=settings-macros-view]', '.page[data-page=settings-macros-view] .page-content');
me.initSettings(pageId);
},
initSettings: function (pageId) {
var me = this;
if (pageId == '#settings-setup-view') {
me.onApiPageSize(me.api.get_PresentationWidth(), me.api.get_PresentationHeight());
} else if (pageId == '#settings-about-view') {
// About
me.setLicInfo(_licInfo);
} else if ('#settings-application-view' == pageId) {
me.initPageApplicationSettings();
} else if ('#color-schemes-view' == pageId) {
me.initPageColorSchemes();
} else if ('#settings-info-view' == pageId) {
me.initPageInfo();
} else if ('#settings-macros-view' == pageId) {
me.initPageMacrosSettings();
}
},
initPageMacrosSettings: function() {
var me = this,
$pageMacrosSettings = $('.page[data-page="settings-macros-view"] input:radio[name=macros-settings]'),
value = Common.Utils.InternalSettings.get("pe-mobile-macros-mode") || 0;
$pageMacrosSettings.single('change', _.bind(me.onChangeMacrosSettings, me));
$pageMacrosSettings.val([value]);
},
onChangeMacrosSettings: function(e) {
var value = parseInt($(e.currentTarget).val());
Common.Utils.InternalSettings.set("pe-mobile-macros-mode", value);
Common.localStorage.setItem("pe-mobile-macros-mode", value);
},
initPageInfo: function() {
var document = Common.SharedSettings.get('document') || {},
info = document.info || {};
document.title ? $('#settings-presentation-title').html(document.title) : $('.display-presentation-title').remove();
var value = info.owner || info.author;
value ? $('#settings-pe-owner').html(value) : $('.display-owner').remove();
value = info.uploaded || info.created;
value ? $('#settings-pe-uploaded').html(value) : $('.display-uploaded').remove();
info.folder ? $('#settings-pe-location').html(info.folder) : $('.display-location').remove();
var appProps = (this.api) ? this.api.asc_getAppProps() : null;
if (appProps) {
var appName = (appProps.asc_getApplication() || '') + ' ' + (appProps.asc_getAppVersion() || '');
appName ? $('#settings-pe-application').html(appName) : $('.display-application').remove();
}
var props = (this.api) ? this.api.asc_getCoreProps() : null;
if (props) {
value = props.asc_getTitle();
value ? $('#settings-pe-title').html(value) : $('.display-title').remove();
value = props.asc_getSubject();
value ? $('#settings-pe-subject').html(value) : $('.display-subject').remove();
value = props.asc_getDescription();
value ? $('#settings-pe-comment').html(value) : $('.display-comment').remove();
value = props.asc_getModified();
value ? $('#settings-pe-last-mod').html(value.toLocaleString(_lang, {year: 'numeric', month: '2-digit', day: '2-digit'}) + ' ' + value.toLocaleString(_lang, {timeStyle: 'short'})) : $('.display-last-mode').remove();
value = props.asc_getLastModifiedBy();
value ? $('#settings-pe-mod-by').html(value) : $('.display-mode-by').remove();
value = props.asc_getCreated();
value ? $('#settings-pe-date').html(value.toLocaleString(_lang, {year: 'numeric', month: '2-digit', day: '2-digit'}) + ' ' + value.toLocaleString(_lang, {timeStyle: 'short'})) : $('.display-created-date').remove();
value = props.asc_getCreator();
var templateCreator = "";
value && value.split(/\s*[,;]\s*/).forEach(function(item) {
templateCreator = templateCreator + "<li class='item-content'><div class='item-inner'><div class='item-title'>" + item + "</div></div></li>";
});
templateCreator ? $('#list-creator').html(templateCreator) : $('.display-author').remove();
}
},
onCollaboration: function() {
PE.getController('Common.Controllers.Collaboration').showModal();
},
initPageColorSchemes: function() {
this.curSchemas = (this.api) ? this.api.asc_GetCurrentColorSchemeIndex() : 0;
this.getView('Settings').renderSchemaSettings(this.curSchemas, this.schemas);
$('.page[data-page=color-schemes-view] input:radio[name=color-schema]').single('change', _.bind(this.onColorSchemaChange, this));
Common.Utils.addScrollIfNeed('.page[data-page=color-schemes-view', '.page[data-page=color-schemes-view] .page-content');
},
onSendThemeColorSchemes: function (schemas) {
this.schemas = schemas;
},
onColorSchemaChange: function(event) {
if (this.api) {
var ind = $(event.currentTarget).val();
if (this.curSchemas !== ind)
this.api.asc_ChangeColorSchemeByIdx(parseInt(ind));
}
},
initPageApplicationSettings: function () {
var me = this,
$unitMeasurement = $('.page[data-page=settings-application-view] input:radio[name=unit-of-measurement]');
$unitMeasurement.single('change', _.bind(me.unitMeasurementChange, me));
var value = Common.Utils.Metric.getCurrentMetric();
$unitMeasurement.val([value]);
},
unitMeasurementChange: function (e) {
var value = $(e.currentTarget).val();
value = (value!==null) ? parseInt(value) : Common.Utils.Metric.getDefaultMetric();
Common.Utils.Metric.setCurrentMetric(value);
Common.localStorage.setItem("pe-mobile-settings-unit", value);
this.api.asc_SetDocumentUnits((value==Common.Utils.Metric.c_MetricUnits.inch) ? Asc.c_oAscDocumentUnits.Inch : ((value==Common.Utils.Metric.c_MetricUnits.pt) ? Asc.c_oAscDocumentUnits.Point : Asc.c_oAscDocumentUnits.Millimeter));
},
setLicInfo: function(data){
if (data && typeof data == 'object' && typeof(data.customer)=='object') {
$('.page[data-page=settings-about-view] .logo').hide();
$('#settings-about-tel').parent().hide();
$('#settings-about-licensor').show();
var customer = data.customer,
value = customer.name;
value && value.length ?
$('#settings-about-name').text(value) :
$('#settings-about-name').hide();
value = customer.address;
value && value.length ?
$('#settings-about-address').text(value) :
$('#settings-about-address').parent().hide();
(value = customer.mail) && value.length ?
$('#settings-about-email').attr('href', "mailto:"+value).text(value) :
$('#settings-about-email').parent().hide();
if ((value = customer.www) && value.length) {
var http = !/^https?:\/{2}/i.test(value) ? "http:\/\/" : '';
$('#settings-about-url').attr('href', http+value).text(value);
} else
$('#settings-about-url').hide();
if ((value = customer.info) && value.length) {
$('#settings-about-info').show().text(value);
}
if ( (value = customer.logo) && value.length ) {
$('#settings-about-logo').show().html('<img src="'+value+'" style="max-width:216px; max-height: 35px;" />');
}
}
},
// API handlers
onApiPageSize: function(width, height) {
var $input = $('#page-settings-view input[name="slide-size"]');
if ($input.length > 0) {
for (var i = 0; i < _slideSizeArr.length; i++) {
if (Math.abs(_slideSizeArr[i][0] - width) < 0.001 && Math.abs(_slideSizeArr[i][1] - height) < 0.001) {
$input.val([i]);
break;
}
}
}
},
_onApiDocumentName: function(name) {
$('#settings-presentation-title').html(name ? name : '-');
},
_onSearch: function (e) {
var toolbarView = PE.getController('Toolbar').getView('Toolbar');
if (toolbarView) {
toolbarView.showSearch();
}
this.hideModal();
},
_onPrint: function(e) {
var me = this;
_.defer(function () {
me.api.asc_Print();
});
me.hideModal();
},
_onSpellcheck: function (e) {
var $checkbox = $(e.currentTarget),
state = $checkbox.is(':checked');
Common.localStorage.setItem("pe-mobile-spellcheck", state ? 1 : 0);
Common.Utils.InternalSettings.set("pe-mobile-spellcheck", state);
this.api && this.api.asc_setSpellCheck(state);
},
_onReaderMode: function (e) {
var me = this;
Common.SharedSettings.set('readerMode', !Common.SharedSettings.get('readerMode'));
me.api && me.api.ChangeReaderMode();
if (Common.SharedSettings.get('phone')) {
_.defer(function () {
me.hideModal();
}, 1000);
}
Common.NotificationCenter.trigger('readermode:change', Common.SharedSettings.get('readerMode'));
},
_onSaveFormat: function(e) {
var me = this,
format = $(e.currentTarget).data('format');
if (format) {
_.defer(function () {
me.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(format));
});
}
me.hideModal();
},
_onSlideSize: function(e) {
var $target = $(e.currentTarget).find('input');
if ($target && this.api) {
var value = parseFloat($target.prop('value'));
this.api.changeSlideSize(_slideSizeArr[value][0], _slideSizeArr[value][1]);
}
},
txtLoading : 'Loading...',
notcriticalErrorTitle : 'Warning'
}
})(), PE.Controllers.Settings || {}))
});

View file

@ -1,219 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* Toolbar.js
* Presentation Editor
*
* Created by Alexander Yuzhin on 11/21/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'core',
'jquery',
'underscore',
'backbone',
'presentationeditor/mobile/app/view/Toolbar'
], function (core, $, _, Backbone) {
'use strict';
PE.Controllers.Toolbar = Backbone.Controller.extend(_.extend((function() {
// private
return {
models: [],
collections: [],
views: [
'Toolbar'
],
initialize: function() {
Common.Gateway.on('init', _.bind(this.loadConfig, this));
},
loadConfig: function (data) {
if (data && data.config && data.config.canBackToFolder !== false &&
data.config.customization && data.config.customization.goback && (data.config.customization.goback.url || data.config.customization.goback.requestClose && data.config.canRequestClose)) {
$('#document-back').show().single('click', _.bind(this.onBack, this));
}
},
setApi: function(api) {
this.api = api;
this.api.asc_registerCallback('asc_onCanUndo', _.bind(this.onApiCanRevert, this, 'undo'));
this.api.asc_registerCallback('asc_onCanRedo', _.bind(this.onApiCanRevert, this, 'redo'));
this.api.asc_registerCallback('asc_onFocusObject', _.bind(this.onApiFocusObject, this));
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onCoAuthoringDisconnect, this));
this.api.asc_registerCallback('asc_onAuthParticipantsChanged', _.bind(this.displayCollaboration, this));
this.api.asc_registerCallback('asc_onParticipantsChanged', _.bind(this.displayCollaboration, this));
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
},
setMode: function (mode) {
this.getView('Toolbar').setMode(mode);
},
onLaunch: function() {
var me = this;
me.createView('Toolbar').render();
$('#toolbar-undo').single('click', _.bind(me.onUndo, me));
$('#toolbar-redo').single('click', _.bind(me.onRedo, me));
},
setDocumentTitle: function (title) {
$('#toolbar-title').html(title);
},
// Handlers
onBack: function (e) {
var me = this;
if (me.api.isDocumentModified()) {
uiApp.modal({
title : me.dlgLeaveTitleText,
text : me.dlgLeaveMsgText,
verticalButtons: true,
buttons : [
{
text: me.leaveButtonText,
onClick: function() {
Common.NotificationCenter.trigger('goback', true);
}
},
{
text: me.stayButtonText,
bold: true
}
]
});
} else {
Common.NotificationCenter.trigger('goback', true);
}
},
onUndo: function (e) {
if (this.api)
this.api.Undo();
},
onRedo: function (e) {
if (this.api)
this.api.Redo();
},
// API handlers
onApiCanRevert: function(which, can) {
if (this.isDisconnected) return;
if (which == 'undo') {
$('#toolbar-undo').toggleClass('disabled', !can);
} else {
$('#toolbar-redo').toggleClass('disabled', !can);
}
},
onApiFocusObject: function (objects) {
if (this.isDisconnected) return;
if (objects.length > 0) {
var slide_deleted = false,
slide_lock = false,
no_object = true,
objectLocked = false;
_.each(objects, function(object) {
var type = object.get_ObjectType(),
objectValue = object.get_ObjectValue();
if (type == Asc.c_oAscTypeSelectElement.Slide) {
slide_deleted = objectValue.get_LockDelete();
slide_lock = objectValue.get_LockLayout() || objectValue.get_LockBackground() || objectValue.get_LockTranzition() || objectValue.get_LockTiming();
} else if (objectValue && _.isFunction(objectValue.get_Locked)) {
no_object = false;
objectLocked = objectLocked || objectValue.get_Locked();
}
});
$('#toolbar-add').toggleClass('disabled', slide_deleted);
$('#toolbar-edit').toggleClass('disabled', slide_deleted || (objectLocked || no_object) && slide_lock );
}
},
activateControls: function() {
$('#toolbar-preview, #toolbar-settings, #toolbar-search, #document-back, #toolbar-edit-document, #toolbar-collaboration').removeClass('disabled');
},
activateViewControls: function() {
$('#toolbar-preview, #toolbar-search, #document-back, #toolbar-collaboration').removeClass('disabled');
},
deactivateEditControls: function() {
$('#toolbar-edit, #toolbar-add, #toolbar-settings').addClass('disabled');
},
onCoAuthoringDisconnect: function() {
this.isDisconnected = true;
this.deactivateEditControls();
$('#toolbar-undo').toggleClass('disabled', true);
$('#toolbar-redo').toggleClass('disabled', true);
PE.getController('AddContainer').hideModal();
PE.getController('EditContainer').hideModal();
PE.getController('Settings').hideModal();
},
displayCollaboration: function(users) {
if(users !== undefined) {
var length = 0;
_.each(users, function (item) {
if (!item.asc_getView())
length++;
});
if (length > 0) {
$('#toolbar-collaboration').show();
} else {
$('#toolbar-collaboration').hide();
}
}
},
dlgLeaveTitleText : 'You leave the application',
dlgLeaveMsgText : 'You have unsaved changes in this document. Click \'Stay on this Page\' to await the autosave of the document. Click \'Leave this Page\' to discard all the unsaved changes.',
leaveButtonText : 'Leave this Page',
stayButtonText : 'Stay on this Page'
}
})(), PE.Controllers.Toolbar || {}))
});

View file

@ -1,270 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* AddContainer.js
* Presentation Editor
*
* Created by Alexander Yuzhin on 11/22/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'core'
], function (core) {
'use strict';
PE.Controllers.AddContainer = Backbone.Controller.extend(_.extend((function() {
// private
return {
models: [],
collections: [],
views: [],
initialize: function() {
//
},
setApi: function(api) {
this.api = api;
},
onLaunch: function() {
//
},
showModal: function() {
var me = this;
if ($$('.container-add.modal-in').length > 0) {
return;
}
uiApp.closeModal();
me._showByStack(Common.SharedSettings.get('phone'));
PE.getController('Toolbar').getView('Toolbar').hideSearch();
},
hideModal: function () {
if (this.picker) {
uiApp.closeModal(this.picker);
}
},
_layoutEditorsByStack: function () {
var me = this,
addViews = [];
addViews.push({
caption: me.textSlide,
id: 'add-slide',
icon: 'icon-add-slide',
layout: PE.getController('AddSlide')
.getView('AddSlide')
.rootLayout()
});
addViews.push({
caption: me.textShape,
id: 'add-shape',
icon: 'icon-add-shape',
layout: PE.getController('AddShape')
.getView('AddShape')
.rootLayout()
});
addViews.push({
caption: me.textImage,
id: 'add-image',
icon: 'icon-add-image',
layout: PE.getController('AddImage')
.getView('AddImage')
.rootLayout()
});
addViews.push({
caption: me.textOther,
id: 'add-other',
icon: 'icon-add-other',
layout: PE.getController('AddOther')
.getView('AddOther')
.rootLayout()
});
return addViews;
},
_showByStack: function(isPhone) {
var me = this,
isAndroid = Framework7.prototype.device.android === true,
layoutAdds = me._layoutEditorsByStack();
if ($$('.container-add.modal-in').length > 0) {
return;
}
// Navigation bar
var $layoutNavbar = $(
'<div class="navbar">' +
'<div data-page="index" class="navbar-inner">' +
'<div class="center sliding categories"></div>' +
(isPhone ? '<div class="right sliding"><a href="#" class="link icon-only close-popup"><i class="icon icon-expand-down"></i></a></div>' : '') +
'</div>' +
'</div>'
);
if (isAndroid) {
$layoutNavbar
.find('.center')
.append('<div class="toolbar tabbar"><div data-page="index" class="toolbar-inner"></div></div>');
_.each(layoutAdds, function (layout, index) {
$layoutNavbar
.find('.toolbar-inner')
.append(
'<a href="#' + layout.id + '" class="tab-link ' + (index < 1 ? 'active' : '') + '"><i class="icon ' + layout.icon + '"></i></a>'
);
});
$layoutNavbar
.find('.toolbar-inner')
.append('<span class="tab-link-highlight" style="width: ' + (100/layoutAdds.length) + '%;"></span>');
} else {
$layoutNavbar
.find('.center')
.append('<div class="buttons-row"></div>');
_.each(layoutAdds, function (layout, index) {
$layoutNavbar
.find('.buttons-row')
.append(
'<a href="#' + layout.id + '" class="tab-link button ' + (index < 1 ? 'active' : '') + '"><i class="icon ' + layout.icon + '"></i></a>'
);
});
}
// Content
var $layoutPages = $(
'<div class="pages">' +
'<div class="page" data-page="index">' +
'<div class="page-content tabs">' +
'</div>' +
'</div>' +
'</div>'
);
_.each(layoutAdds, function (addView, index) {
$layoutPages.find('.tabs').append(
'<div id="' + addView.id + '" class="tab view ' + (index < 1 ? 'active' : '') + '">' +
'<div class="pages">' +
'<div class="page no-navbar">' +
'<div class="page-content">' +
addView.layout +
'</div>' +
'</div>' +
'</div>' +
'</div>'
);
});
if (isPhone) {
me.picker = $$(uiApp.popup(
'<div class="popup settings container-add">' +
'<div class="view add-root-view navbar-through">' +
$layoutNavbar.prop('outerHTML') +
$layoutPages.prop('outerHTML') +
'</div>' +
'</div>'
))
} else {
me.picker = uiApp.popover(
'<div class="popover settings container-add">' +
'<div class="popover-angle"></div>' +
'<div class="popover-inner">' +
'<div class="content-block">' +
'<div class="view popover-view add-root-view navbar-through">' +
$layoutNavbar.prop('outerHTML') +
$layoutPages.prop('outerHTML') +
'</div>' +
'</div>' +
'</div>',
$$('#toolbar-add')
);
// Prevent hide overlay. Conflict popover and modals.
var $overlay = $('.modal-overlay');
$$(me.picker).on('opened', function () {
$overlay.on('removeClass', function () {
if (!$overlay.hasClass('modal-overlay-visible')) {
$overlay.addClass('modal-overlay-visible')
}
});
}).on('close', function () {
$overlay.off('removeClass');
$overlay.removeClass('modal-overlay-visible')
});
}
$('.container-add .tab').single('show', function (e) {
Common.NotificationCenter.trigger('addcategory:show', e);
});
if (isAndroid) {
$$('.view.add-root-view.navbar-through').removeClass('navbar-through').addClass('navbar-fixed');
$$('.view.add-root-view .navbar').prependTo('.view.add-root-view > .pages > .page');
}
me.rootView = uiApp.addView('.add-root-view', {
dynamicNavbar: true,
domCache: true
});
Common.NotificationCenter.trigger('addcontainer:show');
},
textSlide: 'Slide',
textTable: 'Table',
textShape: 'Shape',
textImage: 'Image',
textLink: 'Link',
textOther: 'Other'
}
})(), PE.Controllers.AddContainer || {}))
});

View file

@ -1,127 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* AddImage.js
* Presentation Editor
*
* Created by Julia Radzhabova on 11/30/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'core',
'presentationeditor/mobile/app/view/add/AddImage'
], function (core) {
'use strict';
PE.Controllers.AddImage = Backbone.Controller.extend(_.extend((function() {
//
return {
models: [],
collections: [],
views: [
'AddImage'
],
initialize: function () {
Common.NotificationCenter.on('addcontainer:show', _.bind(this.initEvents, this));
this.addListeners({
'AddImage': {
'page:show' : this.onPageShow
}
});
},
setApi: function (api) {
this.api = api;
},
onLaunch: function () {
this.createView('AddImage').render();
},
initEvents: function () {
var me = this;
$('#add-image-file').single('click', _.bind(me.onInsertByFile, me));
},
onPageShow: function () {
var me = this;
$('#addimage-insert a').single('click', _.buffered(me.onInsertByUrl, 100, me));
$('#addimage-url input[type=url]').single('input', _.bind(me.onUrlChange, me));
_.delay(function () {
$('#addimage-link-url input[type=url]').focus();
}, 1000);
},
// Handlers
onInsertByFile: function (e) {
PE.getController('AddContainer').hideModal();
},
onUrlChange: function (e) {
$('#addimage-insert').toggleClass('disabled', _.isEmpty($(e.currentTarget).val()));
},
onInsertByUrl: function (e) {
var me = this,
$input = $('#addimage-link-url input[type=url]');
if ($input) {
var value = ($input.val()).replace(/ /g, '');
if (!_.isEmpty(value)) {
if ((/((^https?)|(^ftp)):\/\/.+/i.test(value))) {
PE.getController('AddContainer').hideModal();
} else {
uiApp.alert(me.txtNotUrl);
}
} else {
uiApp.alert(me.textEmptyImgUrl);
}
}
},
textEmptyImgUrl : 'You need to specify image URL.',
txtNotUrl : 'This field should be a URL in the format \"http://www.example.com\"'
}
})(), PE.Controllers.AddImage || {}))
});

View file

@ -1,216 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* AddLink.js
* Presentation Editor
*
* Created by Julia Radzhabova on 12/01/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'core',
'presentationeditor/mobile/app/view/add/AddOther'
], function (core) {
'use strict';
PE.Controllers.AddLink = Backbone.Controller.extend(_.extend((function() {
var c_oHyperlinkType = {
InternalLink:0,
WebLink: 1
},
c_oSlideLink = {
Next: 0,
Previouse: 1,
Last: 2,
First: 3,
Num: 4
},
_slidesCount = 0;
return {
models: [],
collections: [],
views: [
'AddOther'
],
initialize: function () {
this.addListeners({
'AddOther': {
'category:show': this.categoryShow,
'page:show' : this.onPageShow
}
});
var me = this;
uiApp.onPageBack('addlink-type addlink-slidenumber', function (page) {
me.initSettings();
});
this._linkType = c_oHyperlinkType.WebLink;
this._slideLink = 0;
this._slideNum = 0;
},
setApi: function (api) {
var me = this;
me.api = api;
},
initEvents: function () {
var me = this;
$('#add-link-insert').single('click', _.buffered(me.onInsertLink, 100, me));
},
categoryShow: function (view, pageId) {
if (pageId === '#addother-insert-link') {
this._linkType = c_oHyperlinkType.WebLink;
this._slideLink = this._slideNum = 0;
var text = this.api.can_AddHyperlink();
if (text !== false) {
$('#add-link-display input').val((text !== null) ? text : this.textDefault);
$('#add-link-display').toggleClass('disabled', text === null);
}
this.initEvents();
this.initSettings();
}
},
initSettings: function (pageId) {
var me = this;
if (pageId == '#addlink-type') {
$('#page-addlink-type input').val([this._linkType]);
} else if (pageId == '#addlink-slidenumber') {
_slidesCount = me.api.getCountPages();
$('#page-addlink-slidenumber input').val([this._slideLink]);
$('#addlink-slide-number .item-after label').text(this._slideNum+1);
} else {
$('#add-link-type .item-after').text((this._linkType==c_oHyperlinkType.WebLink) ? me.textExternalLink : me.textInternalLink);
$('#add-link-url')[(this._linkType==c_oHyperlinkType.WebLink) ? 'show' : 'hide']();
$('#add-link-number')[(this._linkType==c_oHyperlinkType.WebLink) ? 'hide' : 'show']();
if (this._linkType==c_oHyperlinkType.WebLink) {
$('#add-link-url input[type=url]').single('input', _.bind(function(e) {
$('#add-link-insert').toggleClass('disabled', _.isEmpty($('#add-link-url input').val()));
}, this));
_.delay(function () {
$('#add-link-url input[type=url]').focus();
}, 1000);
} else {
var slidename = '';
switch (this._slideLink) {
case 0:
slidename = me.textNext;
break;
case 1:
slidename = me.textPrev;
break;
case 2:
slidename = me.textFirst;
break;
case 3:
slidename = me.textLast;
break;
case 4:
slidename = me.textSlide + ' ' + (this._slideNum+1);
break;
}
$('#add-link-number .item-after').text(slidename);
}
$('#add-link-insert').toggleClass('disabled', (this._linkType==c_oHyperlinkType.WebLink) && _.isEmpty($('#add-link-url input').val()));
}
},
onPageShow: function (view, pageId) {
var me = this;
$('#page-addlink-type li').single('click', _.buffered(me.onLinkType, 100, me));
$('#page-addlink-slidenumber li').single('click', _.buffered(me.onSlideLink, 100, me));
$('#addlink-slide-number .button').single('click',_.buffered(me.onSlideNumber, 100, me));
me.initSettings(pageId);
},
// Handlers
onInsertLink: function (e) {
PE.getController('AddContainer').hideModal();
},
onLinkType: function (e) {
var $target = $(e.currentTarget).find('input');
if ($target && this.api) {
this._linkType = parseFloat($target.prop('value'));
}
},
onSlideLink: function (e) {
var $target = $(e.currentTarget).find('input');
if ($target && this.api) {
this._slideLink = parseFloat($target.prop('value'));
}
},
onSlideNumber: function (e) {
var $button = $(e.currentTarget),
slide = this._slideNum;
if ($button.hasClass('decrement')) {
slide = Math.max(0, --slide);
} else {
slide = Math.min(_slidesCount-1, ++slide);
}
this._slideNum = slide;
$('#addlink-slide-number .item-after label').text(slide+1);
},
txtNotUrl: 'This field should be a URL in the format \"http://www.example.com\"',
textDefault: 'Selected text',
textNext: 'Next Slide',
textPrev: 'Previous Slide',
textFirst: 'First Slide',
textLast: 'Last Slide',
textSlide: 'Slide',
textExternalLink: 'External Link',
textInternalLink: 'Slide in this Presentation'
}
})(), PE.Controllers.AddLink || {}))
});

View file

@ -1,185 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* AddOther.js
* Presentation Editor
*
* Created by Julia Svinareva on 10/04/20
* Copyright (c) 2020 Ascensio System SIA. All rights reserved.
*
*/
define([
'core',
'presentationeditor/mobile/app/view/add/AddOther',
'jquery',
'underscore',
'backbone'
], function (core, view, $, _, Backbone) {
'use strict';
PE.Controllers.AddOther = Backbone.Controller.extend(_.extend((function() {
var _canAddHyperlink = false,
_paragraphLocked = false;
return {
models: [],
collections: [],
views: [
'AddOther'
],
initialize: function () {
Common.NotificationCenter.on('addcontainer:show', _.bind(this.initEvents, this));
this.addListeners({
'AddOther': {
'page:show' : this.onPageShow
}
});
},
setApi: function (api) {
var me = this;
me.api = api;
me.api.asc_registerCallback('asc_onCanAddHyperlink', _.bind(me.onApiCanAddHyperlink, me));
me.api.asc_registerCallback('asc_onFocusObject', _.bind(me.onApiFocusObject, me));
},
setMode: function (mode) {
this.view = this.getView('AddOther');
this.view.canViewComments = mode.canViewComments;
},
onLaunch: function () {
this.createView('AddOther').render();
},
initEvents: function () {
var me = this;
this.view.hideInsertComments = this.isHideInsertComment();
this.view.hideInsertLink = !(_canAddHyperlink && !_paragraphLocked);
},
onApiCanAddHyperlink: function(value) {
_canAddHyperlink = value;
},
onApiFocusObject: function (objects) {
_paragraphLocked = false;
_.each(objects, function(object) {
if (Asc.c_oAscTypeSelectElement.Paragraph == object.get_ObjectType()) {
_paragraphLocked = object.get_ObjectValue().get_Locked();
}
});
},
isHideInsertComment: function() {
var stack = this.api.getSelectedElements();
var isText = false,
isChart = false;
_.each(stack, function (item) {
var objectType = item.get_ObjectType();
if (objectType == Asc.c_oAscTypeSelectElement.Paragraph) {
isText = true;
} else if (objectType == Asc.c_oAscTypeSelectElement.Chart) {
isChart = true;
}
});
if (stack.length > 0) {
var topObject = stack[stack.length - 1],
topObjectValue = topObject.get_ObjectValue(),
objectLocked = _.isFunction(topObjectValue.get_Locked) ? topObjectValue.get_Locked() : false;
!objectLocked && (objectLocked = _.isFunction(topObjectValue.get_LockDelete) ? topObjectValue.get_LockDelete() : false);
if (!objectLocked) {
return ((isText && isChart) || this.api.can_AddQuotedComment() === false);
}
}
return true;
},
onPageShow: function (view, pageId) {
var me = this;
if (pageId == '#addother-insert-comment') {
me.initInsertComment(false);
}
},
// Handlers
initInsertComment: function (documentFlag) {
var comment = PE.getController('Common.Controllers.Collaboration').getCommentInfo();
if (comment) {
this.getView('AddOther').renderComment(comment);
$('#done-comment').single('click', _.bind(this.onDoneComment, this, documentFlag));
$('.back-from-add-comment').single('click', _.bind(function () {
if ($('#comment-text').val().length > 0) {
uiApp.modal({
title: '',
text: this.textDeleteDraft,
buttons: [
{
text: this.textCancel
},
{
text: this.textDelete,
bold: true,
onClick: function () {
PE.getController('AddContainer').rootView.router.back();
}
}]
})
} else {
PE.getController('AddContainer').rootView.router.back();
}
}, this))
}
},
onDoneComment: function(documentFlag) {
var value = $('#comment-text').val().trim();
if (value.length > 0) {
PE.getController('Common.Controllers.Collaboration').onAddNewComment(value, documentFlag);
PE.getController('AddContainer').hideModal();
}
},
textDeleteDraft: 'Do you really want to delete draft?',
textCancel: 'Cancel',
//textContinue: 'Continue',
textDelete: 'Delete'
}
})(), PE.Controllers.AddOther || {}))
});

View file

@ -1,225 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* AddShape.js
* Presentation Editor
*
* Created by Julia Radzhabova on 11/28/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'core',
'presentationeditor/mobile/app/view/add/AddShape'
], function (core) {
'use strict';
PE.Controllers.AddShape = Backbone.Controller.extend(_.extend((function() {
var _styles = [];
return {
models: [],
collections: [],
views: [
'AddShape'
],
initialize: function () {
Common.NotificationCenter.on('addcontainer:show', _.bind(this.initEvents, this));
// Fill shapes
function randomColor() {
return '#' + Math.floor(Math.random()*16777215).toString(16);
}
_styles = [
{
title: 'Text',
thumb: 'shape-01.svg',
type: 'textRect'
},
{
title: 'Line',
thumb: 'shape-02.svg',
type: 'line'
},
{
title: 'Line with arrow',
thumb: 'shape-03.svg',
type: 'lineWithArrow'
},
{
title: 'Line with two arrows',
thumb: 'shape-04.svg',
type: 'lineWithTwoArrows'
},
{
title: 'Rect',
thumb: 'shape-05.svg',
type: 'rect'
},
{
title: 'Hexagon',
thumb: 'shape-06.svg',
type: 'hexagon'
},
{
title: 'Round rect',
thumb: 'shape-07.svg',
type: 'roundRect'
},
{
title: 'Ellipse',
thumb: 'shape-08.svg',
type: 'ellipse'
},
{
title: 'Triangle',
thumb: 'shape-09.svg',
type: 'triangle'
},
{
title: 'Triangle',
thumb: 'shape-10.svg',
type: 'rtTriangle'
},
{
title: 'Trapezoid',
thumb: 'shape-11.svg',
type: 'trapezoid'
},
{
title: 'Diamond',
thumb: 'shape-12.svg',
type: 'diamond'
},
{
title: 'Right arrow',
thumb: 'shape-13.svg',
type: 'rightArrow'
},
{
title: 'Left-right arrow',
thumb: 'shape-14.svg',
type: 'leftRightArrow'
},
{
title: 'Left arrow callout',
thumb: 'shape-15.svg',
type: 'leftArrow'
},
{
title: 'Right arrow callout',
thumb: 'shape-16.svg',
type: 'bentUpArrow'
},
{
title: 'Flow chart off page connector',
thumb: 'shape-17.svg',
type: 'flowChartOffpageConnector'
},
{
title: 'Heart',
thumb: 'shape-18.svg',
type: 'heart'
},
{
title: 'Math minus',
thumb: 'shape-19.svg',
type: 'mathMinus'
},
{
title: 'Math plus',
thumb: 'shape-20.svg',
type: 'mathPlus'
},
{
title: 'Parallelogram',
thumb: 'shape-21.svg',
type: 'parallelogram'
},
{
title: 'Wedge rect callout',
thumb: 'shape-22.svg',
type: 'wedgeRectCallout'
},
{
title: 'Wedge ellipse callout',
thumb: 'shape-23.svg',
type: 'wedgeEllipseCallout'
},
{
title: 'Cloud callout',
thumb: 'shape-24.svg',
type: 'cloudCallout'
}
];
var elementsInRow = 4;
var groups = _.chain(_styles).groupBy(function(element, index){
return Math.floor(index/elementsInRow);
}).toArray().value();
Common.SharedSettings.set('shapes', groups);
Common.NotificationCenter.trigger('shapes:load', groups);
},
setApi: function (api) {
this.api = api;
},
onLaunch: function () {
this.createView('AddShape').render();
},
initEvents: function () {
var me = this;
$('#add-shape li').single('click', _.buffered(me.onShapeClick, 100, me));
},
onShapeClick: function (e) {
PE.getController('AddContainer').hideModal();
},
// Public
getStyles: function () {
return _styles;
}
}
})(), PE.Controllers.AddShape || {}))
});

View file

@ -1,89 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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) 2018 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() {
return {
models: [],
collections: [],
views: [
'AddSlide'
],
initialize: function () {
Common.NotificationCenter.on('addcontainer:show', _.bind(this.initEvents, this));
this._layouts = [];
},
setApi: function (api) {
var me = this;
me.api = api;
},
onLaunch: function () {
this.createView('AddSlide').render();
},
initEvents: function () {
var me = this;
me.getView('AddSlide').updateLayouts(this._layouts);
$('#add-slide .slide-layout li').single('click', _.buffered(me.onLayoutClick, 100, me));
},
onLayoutClick: function (e) {
PE.getController('AddContainer').hideModal();
},
// Public
getLayouts: function () {
return this._layouts;
}
}
})(), PE.Controllers.AddSlide || {}))
});

View file

@ -1,156 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* AddTable.js
* Presentation Editor
*
* Created by Julia Radzhabova on 11/30/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'core',
], function (core) {
'use strict';
PE.Controllers.AddTable = Backbone.Controller.extend(_.extend((function() {
return {
models: [],
collections: [],
views: [
'AddTable'
],
initialize: function () {
this._styles = [];
this._initDefaultStyles = false;
},
setApi: function (api) {
var me = this;
me.api = api;
},
initEvents: function () {
var me = this;
$('.page[data-page="addother-insert-table"] li').single('click', _.buffered(me.onStyleClick, 100, me));
},
onStyleClick: function (e) {
var me = this,
$target = $(e.currentTarget),
type = $target.data('type');
if ($('.modal.modal-in').length > 0) {
return;
}
PE.getController('AddContainer').hideModal();
if ($target) {
var picker;
var modal = uiApp.modal({
title: me.textTableSize,
text: '',
afterText:
'<div class="content-block">' +
'<div class="row no-gutter" style="text-align: center;">' +
'<div class="col-50">' + me.textColumns + '</div>' +
'<div class="col-50">' + me.textRows + '</div>' +
'</div>' +
'<div id="picker-table-size"></div>' +
'</div>',
buttons: [
{
text: me.textCancel
},
{
text: 'OK',
bold: true,
onClick: function () {
var size = picker.value;
if (me.api) {
me.api.put_Table(parseInt(size[0]), parseInt(size[1]));
var properties = new Asc.CTableProp();
properties.put_TableStyle(type);
me.api.tblApply(properties);
}
}
}
]
});
picker = uiApp.picker({
container: '#picker-table-size',
toolbar: false,
rotateEffect: true,
value: [3, 3],
cols: [{
textAlign: 'center',
width: '100%',
values: [1,2,3,4,5,6,7,8,9,10]
}, {
textAlign: 'center',
width: '100%',
values: [1,2,3,4,5,6,7,8,9,10]
}]
});
// Vertical align
$$(modal).css({
marginTop: - Math.round($$(modal).outerHeight() / 2) + 'px'
});
}
},
// Public
getStyles: function () {
return this._styles;
},
// API handlers
textTableSize: 'Table Size',
textColumns: 'Columns',
textRows: 'Rows',
textCancel: 'Cancel'
}
})(), PE.Controllers.AddTable || {}))
});

View file

@ -1,423 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* EditChart.js
* Presentation Editor
*
* Created by Julia Radzhabova on 12/19/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'core',
'presentationeditor/mobile/app/view/edit/EditChart',
'jquery',
'underscore',
'backbone'
], function (core, view, $, _, Backbone) {
'use strict';
PE.Controllers.EditChart = Backbone.Controller.extend(_.extend((function() {
// Private
var _stack = [],
_shapeObject = undefined,
_metricText = Common.Utils.Metric.getCurrentMetricName(),
_borderColor = 'transparent';
var borderSizeTransform = (function() {
var _sizes = [0, 0.5, 1, 1.5, 2.25, 3, 4.5, 6];
return {
sizeByIndex: function (index) {
if (index < 1) return _sizes[0];
if (index > _sizes.length - 1) return _sizes[_sizes.length - 1];
return _sizes[index];
},
indexSizeByValue: function (value) {
var index = 0;
_.each(_sizes, function (size, idx) {
if (Math.abs(size - value) < 0.25) {
index = idx;
}
});
return index
},
sizeByValue: function (value) {
return _sizes[this.indexSizeByValue(value)];
}
}
})();
return {
models: [],
collections: [],
views: [
'EditChart'
],
initialize: function () {
Common.NotificationCenter.on('editcontainer:show', _.bind(this.initEvents, this));
this.addListeners({
'EditChart': {
'page:show': this.onPageShow
}
});
this._chartObject = undefined;
},
setApi: function (api) {
var me = this;
me.api = api;
me.api.asc_registerCallback('asc_onFocusObject', _.bind(me.onApiFocusObject, me));
},
onLaunch: function () {
this.createView('EditChart').render();
},
initEvents: function () {
var me = this;
$('#chart-remove').single('click', _.bind(me.onRemoveChart, me));
me.initSettings();
},
onPageShow: function (view, pageId) {
var me = this;
$('.chart-reorder a').single('click', _.bind(me.onReorder, me));
$('.chart-replace li').single('click', _.buffered(me.onReplace, 100, me));
$('.chart-align a').single('click', _.bind(me.onAlign, me));
$('#edit-chart-bordersize input').single('change touchend', _.buffered(me.onBorderSize, 100, me));
$('#edit-chart-bordersize input').single('input', _.bind(me.onBorderSizeChanging, me));
$('#tab-chart-type li').single('click', _.buffered(me.onType, 100, me));
me.initSettings(pageId);
},
initSettings: function (pageId) {
var me = this;
if (me._chartObject) {
if (pageId == '#edit-chart-style') {
me._updateChartStyles(me.api.asc_getChartPreviews(me._chartObject.getType()));
me._initStyleView();
} else if (pageId == '#edit-chart-border-color-view') {
me._initStyleView();
}
}
},
_initStyleView: function (updateStyles) {
var me = this,
chartProperties = me._chartObject,
shapeProperties = _shapeObject,
paletteFillColor = me.getView('EditChart').paletteFillColor,
paletteBorderColor = me.getView('EditChart').paletteBorderColor;
// Style
var type = chartProperties.getType();
$('.chart-types li').removeClass('active');
$('.chart-types li[data-type=' + type + ']').addClass('active');
// Init style border size
var borderSize = shapeProperties.get_stroke().get_width() * 72.0 / 25.4,
borderType = _shapeObject.get_stroke().get_type();
$('#edit-chart-bordersize input').val([(borderType == Asc.c_oAscStrokeType.STROKE_NONE) ? 0 : borderSizeTransform.indexSizeByValue(borderSize)]);
$('#edit-chart-bordersize .item-after').text(((borderType == Asc.c_oAscStrokeType.STROKE_NONE) ? 0 : borderSizeTransform.sizeByValue(borderSize)) + ' ' + Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt));
paletteFillColor && paletteFillColor.on('select', _.bind(me.onFillColor, me));
paletteBorderColor && paletteBorderColor.on('select', _.bind(me.onBorderColor, me));
var sdkColor, color;
// Init fill color
var fill = shapeProperties.get_fill(),
fillType = fill.get_type();
color = 'transparent';
if (fillType == Asc.c_oAscFill.FILL_TYPE_SOLID) {
fill = fill.get_fill();
sdkColor = fill.get_color();
if (sdkColor) {
if (sdkColor.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
color = {color: Common.Utils.ThemeColor.getHexColor(sdkColor.get_r(), sdkColor.get_g(), sdkColor.get_b()), effectValue: sdkColor.get_value()};
} else {
color = Common.Utils.ThemeColor.getHexColor(sdkColor.get_r(), sdkColor.get_g(), sdkColor.get_b());
}
}
}
paletteFillColor && paletteFillColor.select(color);
// Init border color
me._initBorderColorView();
},
_initBorderColorView: function () {
if (!_shapeObject) return;
var me = this,
paletteBorderColor = me.getView('EditChart').paletteBorderColor,
stroke = _shapeObject.get_stroke();
var color = 'transparent';
if (stroke && stroke.get_type() == Asc.c_oAscStrokeType.STROKE_COLOR) {
var sdkColor = stroke.get_color();
if (sdkColor) {
if (sdkColor.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
color = {color: Common.Utils.ThemeColor.getHexColor(sdkColor.get_r(), sdkColor.get_g(), sdkColor.get_b()), effectValue: sdkColor.get_value()};
}
else {
color = Common.Utils.ThemeColor.getHexColor(sdkColor.get_r(), sdkColor.get_g(), sdkColor.get_b());
}
}
}
_borderColor = color;
paletteBorderColor && paletteBorderColor.select(color);
$('#edit-chart-bordercolor .color-preview').css('background-color', ('transparent' == color) ? color : ('#' + (_.isObject(color) ? color.color : color)))
},
// Public
getChart: function () {
return this._chartObject;
},
// Handlers
onType: function (e) {
},
onStyle: function (e) {
var me = this,
$target = $(e.currentTarget),
type = $target.data('type');
var chart = new Asc.CAscChartProp();
chart.putStyle(type);
me.api.ChartApply(chart);
},
onRemoveChart: function () {
this.api.asc_Remove();
PE.getController('EditContainer').hideModal();
},
onReorder: function (e) {
var $target = $(e.currentTarget),
type = $target.data('type');
if ('all-up' == type) {
this.api.shapes_bringToFront();
} else if ('all-down' == type) {
this.api.shapes_bringToBack();
} else if ('move-up' == type) {
this.api.shapes_bringForward();
} else if ('move-down' == type) {
this.api.shapes_bringBackward();
}
},
onAlign: function (e) {
var $target = $(e.currentTarget),
type = $target.data('type');
if ('align-left' == type) {
this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_LEFT);
} else if ('align-center' == type) {
this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_CENTER);
} else if ('align-right' == type) {
this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_RIGHT);
} else if ('align-top' == type) {
this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_TOP);
} else if ('align-middle' == type) {
this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_MIDDLE);
}else if ('align-bottom' == type) {
this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_BOTTOM);
}else if ('distrib-hor' == type) {
this.api.DistributeHorizontally();
}else if ('distrib-vert' == type) {
this.api.DistributeVertically();
}
},
onBorderSize: function (e) {
var me = this,
$target = $(e.currentTarget),
value = $target.val(),
shape = new Asc.asc_CShapeProperty(),
stroke = new Asc.asc_CStroke();
value = borderSizeTransform.sizeByIndex(parseInt(value));
if (value < 0.01) {
stroke.put_type(Asc.c_oAscStrokeType.STROKE_NONE);
} else {
stroke.put_type(Asc.c_oAscStrokeType.STROKE_COLOR);
if (_borderColor == 'transparent')
stroke.put_color(Common.Utils.ThemeColor.getRgbColor({color: '000000', effectId: 29}));
else
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(Common.Utils.ThemeColor.colorValue2EffectId(_borderColor)));
stroke.put_width(value * 25.4 / 72.0);
}
shape.put_stroke(stroke);
me.api.ShapeApply(shape);
me._initBorderColorView(); // when select STROKE_NONE or change from STROKE_NONE to STROKE_COLOR
},
onBorderSizeChanging: function (e) {
var $target = $(e.currentTarget);
$('#edit-chart-bordersize .item-after').text(borderSizeTransform.sizeByIndex($target.val()) + ' ' + Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt));
},
onFillColor: function(palette, color) {
var me = this;
if (me.api) {
var shape = new Asc.asc_CShapeProperty(),
fill = new Asc.asc_CShapeFill();
if (color == 'transparent') {
fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null);
} else {
fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill(new Asc.asc_CFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor(color));
}
shape.put_fill(fill);
me.api.ShapeApply(shape);
}
},
onBorderColor: function (palette, color) {
var me = this;
$('#edit-chart-bordercolor .color-preview').css('background-color', ('transparent' == color) ? color : ('#' + (_.isObject(color) ? color.color : color)));
_borderColor = color;
if (me.api && _shapeObject && _shapeObject.get_stroke().get_type() == Asc.c_oAscStrokeType.STROKE_COLOR) {
var shape = new Asc.asc_CShapeProperty(),
stroke = new Asc.asc_CStroke();
if (_shapeObject.get_stroke().get_width() < 0.01) {
stroke.put_type(Asc.c_oAscStrokeType.STROKE_NONE);
} else {
stroke.put_type(Asc.c_oAscStrokeType.STROKE_COLOR);
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(color));
stroke.put_width(_shapeObject.get_stroke().get_width());
stroke.asc_putPrstDash(_shapeObject.get_stroke().asc_getPrstDash());
}
shape.put_stroke(stroke);
me.api.ShapeApply(shape);
}
},
// API handlers
onApiFocusObject: function (objects) {
_stack = objects;
var charts = [],
shapes = [];
_.each(_stack, function (object) {
if (object.get_ObjectType() == Asc.c_oAscTypeSelectElement.Chart)
charts.push(object);
else if (object.get_ObjectType() == Asc.c_oAscTypeSelectElement.Shape && object.get_ObjectValue() && object.get_ObjectValue().get_FromChart()) {
shapes.push(object);
}
});
var getTopObject = function(array) {
if (array.length > 0) {
var object = array[array.length - 1]; // get top
return object.get_ObjectValue();
} else {
return undefined;
}
};
this._chartObject = getTopObject(charts);
_shapeObject = getTopObject(shapes);
},
// Helpers
_updateChartStyles: function(styles) {
},
_closeIfNeed: function () {
if (!this._isChartInStack()) {
PE.getController('EditContainer').hideModal();
}
},
_isChartInStack: function () {
var chartExist = false;
_.some(_stack, function(object) {
if (object.get_ObjectType() == Asc.c_oAscTypeSelectElement.Chart && object.get_ObjectValue()) {
chartExist = true;
return true;
}
});
return chartExist;
}
};
})(), PE.Controllers.EditChart || {}))
});

View file

@ -1,392 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* EditContainer.js
* Presentation Editor
*
* Created by Alexander Yuzhin on 9/27/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'core',
'jquery',
'underscore',
'backbone'
], function (core, $, _, Backbone) {
'use strict';
PE.Controllers.EditContainer = Backbone.Controller.extend(_.extend((function() {
// Private
var _settings = [];
return {
models: [],
collections: [],
views: [],
initialize: function() {
//
},
setApi: function(api) {
this.api = api;
this.api.asc_registerCallback('asc_onFocusObject', _.bind(this.onApiFocusObject, this));
},
onLaunch: function() {
//
},
showModal: function() {
var me = this,
mainView = PE.getController('Editor').getView('Editor').f7View,
isAndroid = Framework7.prototype.device.android === true;
if ($$('.container-edit.modal-in').length > 0) {
// myApp.closeModal('.picker-modal.edit.modal-in');
// me.fireEvent('editcontainer:error', [this, 'alreadyOpen']);
return;
}
uiApp.closeModal();
me._showByStack(Common.SharedSettings.get('phone'));
PE.getController('Toolbar').getView('Toolbar').hideSearch();
},
hideModal: function () {
if (this.picker) {
uiApp.closeModal(this.picker);
}
},
_emptyEditController: function () {
var layout =
'<div class="content-block inset">' +
'<div class="content-block-inner"> ' +
'<p>Select object to edit</p>' +
'</div>' +
'</div>';
return {
caption: this.textSettings,
layout: layout
}
},
_layoutEditorsByStack: function () {
var me = this,
editors = [];
if (_settings.length < 1) {
editors.push(me._emptyEditController());
} else {
if (_.contains(_settings, 'slide')) {
editors.push({
caption: me.textSlide,
id: 'edit-slide',
layout: PE.getController('EditSlide').getView('EditSlide').rootLayout()
})
}
if (_.contains(_settings, 'text')) {
editors.push({
caption: me.textText,
id: 'edit-text',
layout: PE.getController('EditText').getView('EditText').rootLayout()
})
}
if (_.contains(_settings, 'table')) {
editors.push({
caption: me.textTable,
id: 'edit-table',
layout: PE.getController('EditTable').getView('EditTable').rootLayout()
})
}
if (_.contains(_settings, 'shape')) {
editors.push({
caption: me.textShape,
id: 'edit-shape',
layout: PE.getController('EditShape').getView('EditShape').rootLayout()
})
}
if (_.contains(_settings, 'image')) {
editors.push({
caption: me.textImage,
id: 'edit-image',
layout: PE.getController('EditImage').getView('EditImage').rootLayout()
})
}
if (_.contains(_settings, 'chart')) {
editors.push({
caption: me.textChart,
id: 'edit-chart',
layout: PE.getController('EditChart').getView('EditChart').rootLayout()
})
}
if (_.contains(_settings, 'hyperlink')) {
editors.push({
caption: me.textHyperlink,
id: 'edit-link',
layout: PE.getController('EditLink').getView('EditLink').rootLayout()
})
}
}
return editors;
},
_showByStack: function(isPhone) {
var me = this,
mainView = PE.getController('Editor').getView('Editor').f7View,
isAndroid = Framework7.prototype.device.android === true,
layoutEditors = me._layoutEditorsByStack();
if ($$('.container-edit.modal-in').length > 0) {
return;
}
// Navigation bar
var $layoutNavbar = $(
'<div class="navbar">' +
'<div data-page="index" class="navbar-inner">' +
'<div class="center sliding categories"></div>' +
(isPhone ? '<div class="right sliding"><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a></div>' : '') +
'</div>' +
'</div>'
);
if (layoutEditors.length < 2) {
$layoutNavbar
.find('.center')
.removeClass('categories')
.html(layoutEditors.length>0 ? layoutEditors[0].caption: '');
} else {
if (isAndroid) {
$layoutNavbar
.find('.center')
.append('<div class="toolbar tabbar"><div data-page="index" class="toolbar-inner"></div></div>');
_.each(layoutEditors, function (layout, index) {
$layoutNavbar
.find('.toolbar-inner')
.append(
'<a href="#' + layout.id + '" class="tab-link ' + (index < 1 ? 'active' : '') + '">' + layout.caption + '</a>'
);
});
$layoutNavbar
.find('.toolbar-inner')
.append('<span class="tab-link-highlight" style="width: ' + (100/layoutEditors.length) + '%;"></span>');
} else {
$layoutNavbar
.find('.center')
.append('<div class="buttons-row"></div>');
_.each(layoutEditors, function (layout, index) {
$layoutNavbar
.find('.buttons-row')
.append(
'<a href="#' + layout.id + '" class="tab-link button ' + (index < 1 ? 'active' : '') + '">' + layout.caption + '</a>'
);
});
}
}
// Content
var $layoutPages = $(
'<div class="pages">' +
'<div class="page" data-page="index">' +
'<div class="page-content tabs">' +
'</div>' +
'</div>' +
'</div>'
);
_.each(layoutEditors, function (editor, index) {
$layoutPages.find('.tabs').append(
'<div id="' + editor.id + '" class="tab view ' + (index < 1 ? 'active' : '') + '">' +
'<div class="pages">' +
'<div class="page no-navbar">' +
'<div class="page-content">' +
editor.layout +
'</div>' +
'</div>' +
'</div>' +
'</div>'
);
});
if (isPhone) {
me.picker = $$(uiApp.pickerModal(
'<div class="picker-modal settings container-edit">' +
'<div class="view edit-root-view navbar-through">' +
$layoutNavbar.prop('outerHTML') +
$layoutPages.prop('outerHTML') +
'</div>' +
'</div>'
)).on('opened', function () {
if (_.isFunction(me.api.asc_OnShowContextMenu)) {
me.api.asc_OnShowContextMenu()
}
}).on('close', function (e) {
mainView.showNavbar();
}).on('closed', function () {
if (_.isFunction(me.api.asc_OnHideContextMenu)) {
me.api.asc_OnHideContextMenu()
}
});
mainView.hideNavbar();
} else {
me.picker = uiApp.popover(
'<div class="popover settings container-edit">' +
'<div class="popover-angle"></div>' +
'<div class="popover-inner">' +
'<div class="content-block">' +
'<div class="view popover-view edit-root-view navbar-through">' +
$layoutNavbar.prop('outerHTML') +
$layoutPages.prop('outerHTML') +
'</div>' +
'</div>' +
'</div>',
$$('#toolbar-edit')
);
// Prevent hide overlay. Conflict popover and modals.
var $overlay = $('.modal-overlay');
$$(me.picker).on('opened', function () {
$overlay.on('removeClass', function () {
if (!$overlay.hasClass('modal-overlay-visible')) {
$overlay.addClass('modal-overlay-visible')
}
});
if (_.isFunction(me.api.asc_OnShowContextMenu)) {
me.api.asc_OnShowContextMenu()
}
}).on('close', function () {
$overlay.off('removeClass');
$overlay.removeClass('modal-overlay-visible')
}).on('closed', function () {
if (_.isFunction(me.api.asc_OnHideContextMenu)) {
me.api.asc_OnHideContextMenu()
}
});
}
$('.container-edit .tab').single('show', function (e) {
Common.NotificationCenter.trigger('editcategory:show', e);
});
if (isAndroid) {
$$('.view.edit-root-view.navbar-through').removeClass('navbar-through').addClass('navbar-fixed');
$$('.view.edit-root-view .navbar').prependTo('.view.edit-root-view > .pages > .page');
}
me.rootView = uiApp.addView('.edit-root-view', {
dynamicNavbar: true,
domCache: true
});
Common.NotificationCenter.trigger('editcontainer:show');
},
// API handlers
onApiFocusObject: function (objects) {
_settings = [];
var no_text = true;
_.each(objects, function(object) {
var type = object.get_ObjectType(),
objectValue = object.get_ObjectValue();
if (Asc.c_oAscTypeSelectElement.Paragraph == type) {
if ( !objectValue.get_Locked() )
no_text = false;
} else if (Asc.c_oAscTypeSelectElement.Table == type) {
if ( !objectValue.get_Locked() ) {
_settings.push('table');
no_text = false;
}
} else if (Asc.c_oAscTypeSelectElement.Slide == type) {
if ( !(objectValue.get_LockLayout() || objectValue.get_LockBackground() || objectValue.get_LockTranzition() || objectValue.get_LockTiming() ))
_settings.push('slide');
} else if (Asc.c_oAscTypeSelectElement.Image == type) {
if ( !objectValue.get_Locked() )
_settings.push('image');
} else if (Asc.c_oAscTypeSelectElement.Chart == type) {
if ( !objectValue.get_Locked() )
_settings.push('chart');
} else if (Asc.c_oAscTypeSelectElement.Shape == type && !objectValue.get_FromChart()) {
if ( !objectValue.get_Locked() ) {
_settings.push('shape');
no_text = false;
}
} else if (Asc.c_oAscTypeSelectElement.Hyperlink == type) {
_settings.push('hyperlink');
}
});
if (!no_text && !_.contains(_settings, 'image'))
_settings.unshift('text');
// Exclude hyperlink if text is locked
if (_settings.indexOf('hyperlink') > -1 && _settings.indexOf('text')<0) {
_settings = _.without(_settings, 'hyperlink');
}
// Exclude shapes if chart exist
if (_settings.indexOf('chart') > -1) {
_settings = _.without(_settings, 'shape');
}
_settings = _.uniq(_settings);
},
textSettings: 'Settings',
textText: 'Text',
textTable: 'Table',
textShape: 'Shape',
textImage: 'Image',
textChart: 'Chart',
textHyperlink: 'Hyperlink',
textSlide: 'Slide'
}
})(), PE.Controllers.EditContainer || {}))
});

View file

@ -1,250 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* EditImage.js
* Presentation Editor
*
* Created by Julia Radzhabova on 11/30/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'core',
'presentationeditor/mobile/app/view/edit/EditImage',
'jquery',
'underscore',
'backbone'
], function (core, view, $, _, Backbone) {
'use strict';
PE.Controllers.EditImage = Backbone.Controller.extend(_.extend((function() {
// Private
var _stack = [],
_imageObject = undefined,
_metricText = Common.Utils.Metric.getCurrentMetricName();
return {
models: [],
collections: [],
views: [
'EditImage'
],
initialize: function () {
Common.NotificationCenter.on('editcontainer:show', _.bind(this.initEvents, this));
this.addListeners({
'EditImage': {
'page:show': this.onPageShow
}
});
},
setApi: function (api) {
var me = this;
me.api = api;
me.api.asc_registerCallback('asc_onFocusObject', _.bind(me.onApiFocusObject, me));
},
onLaunch: function () {
this.createView('EditImage').render();
},
initEvents: function () {
var me = this;
$('#image-default').single('click', _.bind(me.onDefaulSize, me));
$('#image-remove').single('click', _.bind(me.onRemoveImage, me));
me.initSettings();
},
onPageShow: function (view, pageId) {
var me = this;
$('#edit-image-file').single('click', _.bind(me.onReplaceByFile, me));
$('.edit-image-url-link .button, .edit-image-url-link .list-button').single('click', _.bind(me.onReplaceByUrl, me));
$('.image-reorder a').single('click', _.bind(me.onReorder, me));
$('.image-align a').single('click', _.bind(me.onAlign, me));
// me.initSettings(pageId);
},
initSettings: function (pageId) {
},
// Public
getImage: function () {
return _imageObject;
},
// Handlers
onDefaulSize: function () {
var me = this;
if (me.api) {
var imgsize = me.api.get_OriginalSizeImage(),
properties = new Asc.asc_CImgProperty();
properties.put_Width(imgsize.get_ImageWidth());
properties.put_Height(imgsize.get_ImageHeight());
properties.put_ResetCrop(true);
me.api.ImgApply(properties);
}
},
onRemoveImage: function () {
this.api.asc_Remove();
PE.getController('EditContainer').hideModal();
},
onReplaceByFile: function () {
this.api.ChangeImageFromFile();
PE.getController('EditContainer').hideModal();
},
onReplaceByUrl: function () {
var me = this,
$input = $('.edit-image-url-link input[type=url]');
if ($input) {
var value = ($input.val()).replace(/ /g, '');
if (!_.isEmpty(value)) {
if ((/((^https?)|(^ftp)):\/\/.+/i.test(value))) {
PE.getController('EditContainer').hideModal();
_.defer(function () {
var image = new Asc.asc_CImgProperty();
image.put_ImageUrl(value);
me.api.ImgApply(image);
});
} else {
uiApp.alert(me.txtNotUrl);
}
} else {
uiApp.alert(me.textEmptyImgUrl);
}
}
},
onReorder: function (e) {
var $target = $(e.currentTarget),
type = $target.data('type');
if ('all-up' == type) {
this.api.shapes_bringToFront();
} else if ('all-down' == type) {
this.api.shapes_bringToBack();
} else if ('move-up' == type) {
this.api.shapes_bringForward();
} else if ('move-down' == type) {
this.api.shapes_bringBackward();
}
},
onAlign: function (e) {
var $target = $(e.currentTarget),
type = $target.data('type');
if ('align-left' == type) {
this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_LEFT);
} else if ('align-center' == type) {
this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_CENTER);
} else if ('align-right' == type) {
this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_RIGHT);
} else if ('align-top' == type) {
this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_TOP);
} else if ('align-middle' == type) {
this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_MIDDLE);
}else if ('align-bottom' == type) {
this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_BOTTOM);
}else if ('distrib-hor' == type) {
this.api.DistributeHorizontally();
}else if ('distrib-vert' == type) {
this.api.DistributeVertically();
}
},
// API handlers
onApiFocusObject: function (objects) {
_stack = objects;
var images = [];
_.each(_stack, function (object) {
if (object.get_ObjectType() == Asc.c_oAscTypeSelectElement.Image && object.get_ObjectValue()) {
images.push(object);
}
});
if (images.length > 0) {
var object = images[images.length - 1]; // get top
_imageObject = object.get_ObjectValue();
} else {
_imageObject = undefined;
}
},
// Helpers
_closeIfNeed: function () {
if (!this._isImageInStack()) {
PE.getController('EditContainer').hideModal();
}
},
_isImageInStack: function () {
var imageExist = false;
_.some(_stack, function(object) {
if (object.get_ObjectType() == Asc.c_oAscTypeSelectElement.Image && object.get_ObjectValue()) {
imageExist = true;
return true;
}
});
return imageExist;
},
textEmptyImgUrl: 'You need to specify image URL.',
txtNotUrl: 'This field should be a URL in the format \"http://www.example.com\"'
}
})(), PE.Controllers.EditImage || {}))
});

View file

@ -1,358 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* EditLink.js
* Presentation Editor
*
* Created by Julia Radzhabova on 12/06/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'core',
'presentationeditor/mobile/app/view/edit/EditLink'
], function (core) {
'use strict';
PE.Controllers.EditLink = Backbone.Controller.extend(_.extend((function() {
// Private
var _stack = [],
_linkObject = undefined,
c_oHyperlinkType = {
InternalLink:0,
WebLink: 1
},
c_oSlideLink = {
Next: 0,
Previouse: 1,
Last: 2,
First: 3,
Num: 4
},
_linkType = c_oHyperlinkType.WebLink,
_slideLink = 0,
_slideNum = 0,
_slidesCount = 0;
return {
models: [],
collections: [],
views: [
'EditLink'
],
initialize: function () {
Common.NotificationCenter.on('editcontainer:show', _.bind(this.initEvents, this));
Common.NotificationCenter.on('editcategory:show', _.bind(this.categoryShow, this));
this.addListeners({
'EditLink': {
'page:show' : this.onPageShow
}
});
var me = this;
uiApp.onPageBack('editlink-type editlink-slidenumber', function (page) {
me.initSettings();
});
},
setApi: function (api) {
var me = this;
me.api = api;
me.api.asc_registerCallback('asc_onFocusObject', _.bind(me.onApiFocusObject, me));
},
onLaunch: function () {
this.createView('EditLink').render();
},
initEvents: function () {
var me = this;
$('#edit-link-edit').single('click', _.bind(me.onEditLink, me));
$('#edit-link-remove').single('click', _.bind(me.onRemoveLink, me));
},
categoryShow: function (e) {
var $target = $(e.currentTarget);
if ($target && $target.prop('id') === 'edit-link' && _linkObject) {
var url = _linkObject.get_Value();
if (url===null || url===undefined || url=='' )
_linkType = c_oHyperlinkType.WebLink;
else {
var indAction = url.indexOf("ppaction://hlink");
if (0 == indAction) {
if (url == "ppaction://hlinkshowjump?jump=firstslide") {
_slideLink = 2;
} else if (url == "ppaction://hlinkshowjump?jump=lastslide") {
_slideLink = 3;
}
else if (url == "ppaction://hlinkshowjump?jump=nextslide") {
_slideLink = 0;
}
else if (url == "ppaction://hlinkshowjump?jump=previousslide") {
_slideLink = 1;
}
else {
_slideLink = 4;
_slidesCount = this.api.getCountPages();
var mask = "ppaction://hlinksldjumpslide",
indSlide = url.indexOf(mask);
if (0 == indSlide) {
_slideNum = parseInt(url.substring(mask.length));
if (_slideNum < 0) _slideNum = 0;
if (_slideNum >= _slidesCount) _slideNum = _slidesCount - 1;
} else
_slideNum = 0;
}
_linkType = c_oHyperlinkType.InternalLink;
} else {
_linkType = c_oHyperlinkType.WebLink;
}
}
var text = _linkObject.get_Text();
if (text !== false) {
$('#edit-link-display input').val((text !== null) ? text : this.textDefault);
$('#edit-link-display').toggleClass('disabled', text === null);
}
if (_linkType==c_oHyperlinkType.WebLink) {
var value = _linkObject.get_Value();
$('#edit-link-url input').val(value ? [value.replace(new RegExp(" ", 'g'), "%20")] : '');
}
$('#edit-link-tip input').val([_linkObject.get_ToolTip()]);
this.initSettings();
}
},
initSettings: function (pageId) {
var me = this;
if (pageId == '#editlink-type') {
$('#page-editlink-type input').val([_linkType]);
} else if (pageId == '#editlink-slidenumber') {
_slidesCount = me.api.getCountPages();
$('#page-editlink-slidenumber input').val([_slideLink]);
$('#editlink-slide-number .item-after label').text(_slideNum+1);
} else {
$('#edit-link-type .item-after').text((_linkType==c_oHyperlinkType.WebLink) ? me.textExternalLink : me.textInternalLink);
$('#edit-link-url')[(_linkType==c_oHyperlinkType.WebLink) ? 'show' : 'hide']();
$('#edit-link-number')[(_linkType==c_oHyperlinkType.WebLink) ? 'hide' : 'show']();
if (_linkType==c_oHyperlinkType.WebLink) {
_.delay(function () {
$('.page[data-page=editlink-link] input[type=url]').focus();
}, 1000);
} else {
var slidename = '';
switch (_slideLink) {
case 0:
slidename = me.textNext;
break;
case 1:
slidename = me.textPrev;
break;
case 2:
slidename = me.textFirst;
break;
case 3:
slidename = me.textLast;
break;
case 4:
slidename = me.textSlide + ' ' + (_slideNum+1);
break;
}
$('#edit-link-number .item-after').text(slidename);
}
$('#edit-link-edit').toggleClass('disabled', (_linkType==c_oHyperlinkType.WebLink) && _.isEmpty($('#edit-link-url input').val()));
}
},
onPageShow: function (view, pageId) {
var me = this;
$('#page-editlink-type li').single('click', _.buffered(me.onLinkType, 100, me));
$('#page-editlink-slidenumber li').single('click', _.buffered(me.onSlideLink, 100, me));
$('#editlink-slide-number .button').single('click',_.buffered(me.onSlideNumber, 100, me));
me.initSettings(pageId);
},
// Handlers
onEditLink: function () {
var me = this,
display = $('#edit-link-display input').val(),
tip = $('#edit-link-tip input').val(),
props = new Asc.CHyperlinkProperty(),
def_display = '';
if (_linkType==c_oHyperlinkType.WebLink) {
var url = $('#edit-link-url input').val(),
urltype = me.api.asc_getUrlType($.trim(url)),
isEmail = (urltype == 2);
if (urltype < 1) {
uiApp.alert(me.txtNotUrl);
return;
}
url = url.replace(/^\s+|\s+$/g,'');
if (! /(((^https?)|(^ftp)):\/\/)|(^mailto:)/i.test(url) )
url = (isEmail ? 'mailto:' : 'http://' ) + url;
url = url.replace(new RegExp("%20",'g')," ");
props.put_Value( url );
props.put_ToolTip(tip);
def_display = url;
} else {
var url = "ppaction://hlink";
var slidetip = '';
switch (_slideLink) {
case 0:
url = url + "showjump?jump=nextslide";
slidetip = this.textNext;
break;
case 1:
url = url + "showjump?jump=previousslide";
slidetip = this.textPrev;
break;
case 2:
url = url + "showjump?jump=firstslide";
slidetip = this.textFirst;
break;
case 3:
url = url + "showjump?jump=lastslide";
slidetip = this.textLast;
break;
case 4:
url = url + "sldjumpslide" + _slideNum;
slidetip = this.textSlide + ' ' + (_slideNum+1);
break;
}
props.put_Value( url );
props.put_ToolTip(_.isEmpty(tip) ? slidetip : tip);
def_display = slidetip;
}
if (!$('#edit-link-display').hasClass('disabled')) {
props.put_Text(_.isEmpty(display) ? def_display : display);
} else
props.put_Text(null);
me.api.change_Hyperlink(props);
PE.getController('EditContainer').hideModal();
},
onRemoveLink: function () {
this.api && this.api.remove_Hyperlink();
PE.getController('EditContainer').hideModal();
},
onLinkType: function (e) {
var $target = $(e.currentTarget).find('input');
if ($target && this.api) {
_linkType = parseFloat($target.prop('value'));
}
},
onSlideLink: function (e) {
var $target = $(e.currentTarget).find('input');
if ($target && this.api) {
_slideLink = parseFloat($target.prop('value'));
}
},
onSlideNumber: function (e) {
var $button = $(e.currentTarget),
slide = _slideNum;
if ($button.hasClass('decrement')) {
slide = Math.max(0, --slide);
} else {
slide = Math.min(_slidesCount-1, ++slide);
}
_slideNum = slide;
$('#editlink-slide-number .item-after label').text(slide+1);
},
// API handlers
onApiFocusObject: function (objects) {
_stack = objects;
var links = [];
_.each(_stack, function (object) {
if (object.get_ObjectType() == Asc.c_oAscTypeSelectElement.Hyperlink) {
links.push(object);
}
});
if (links.length > 0) {
var object = links[links.length - 1]; // get top
_linkObject = object.get_ObjectValue();
} else {
_linkObject = undefined;
}
},
// Helpers
_closeIfNeed: function () {
if (!this._isImageInStack()) {
PE.getController('EditContainer').hideModal();
}
},
txtNotUrl: 'This field should be a URL in the format \"http://www.example.com\"',
textDefault: 'Selected text',
textNext: 'Next Slide',
textPrev: 'Previous Slide',
textFirst: 'First Slide',
textLast: 'Last Slide',
textSlide: 'Slide',
textExternalLink: 'External Link',
textInternalLink: 'Slide in this Presentation'
};
})(), PE.Controllers.EditLink || {}))
});

View file

@ -1,405 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* EditShape.js
* Presentation Editor
*
* Created by Julia Radzhabova on 11/25/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'core',
'presentationeditor/mobile/app/view/edit/EditShape',
'jquery',
'underscore',
'backbone'
], function (core, view, $, _, Backbone) {
'use strict';
PE.Controllers.EditShape = Backbone.Controller.extend(_.extend((function() {
// Private
var _stack = [],
_shapeObject = undefined,
_metricText = Common.Utils.Metric.getCurrentMetricName(),
_borderColor = 'transparent';
var borderSizeTransform = (function() {
var _sizes = [0, 0.5, 1, 1.5, 2.25, 3, 4.5, 6];
return {
sizeByIndex: function (index) {
if (index < 1) return _sizes[0];
if (index > _sizes.length - 1) return _sizes[_sizes.length - 1];
return _sizes[index];
},
indexSizeByValue: function (value) {
var index = 0;
_.each(_sizes, function (size, idx) {
if (Math.abs(size - value) < 0.25) {
index = idx;
}
});
return index
},
sizeByValue: function (value) {
return _sizes[this.indexSizeByValue(value)];
}
}
})();
return {
models: [],
collections: [],
views: [
'EditShape'
],
initialize: function () {
Common.NotificationCenter.on('editcontainer:show', _.bind(this.initEvents, this));
this.addListeners({
'EditShape': {
'page:show': this.onPageShow
}
});
},
setApi: function (api) {
var me = this;
me.api = api;
me.api.asc_registerCallback('asc_onFocusObject', _.bind(me.onApiFocusObject, me));
},
onLaunch: function () {
this.createView('EditShape').render();
},
initEvents: function () {
var me = this;
$('#shape-remove').single('click', _.bind(me.onRemoveShape, me));
me.initSettings();
},
onPageShow: function (view, pageId) {
var me = this;
$('.shape-reorder a').single('click', _.bind(me.onReorder, me));
$('.shape-replace li').single('click', _.buffered(me.onReplace, 100, me));
$('.shape-align a').single('click', _.bind(me.onAlign, me));
$('#edit-shape-bordersize input').single('change touchend', _.buffered(me.onBorderSize, 100, me));
$('#edit-shape-bordersize input').single('input', _.bind(me.onBorderSizeChanging, me));
$('#edit-shape-effect input').single('change touchend', _.buffered(me.onOpacity, 100, me));
$('#edit-shape-effect input').single('input', _.bind(me.onOpacityChanging, me));
me.initSettings(pageId);
},
initSettings: function (pageId) {
var me = this;
// me.api && me.api.UpdateInterfaceState();
if (_shapeObject) {
if (pageId == '#edit-shape-style' || pageId == '#edit-shape-style-nofill' || pageId == '#edit-shape-border-color-view') {
me._initStyleView();
} else {
me.getView('EditShape').isShapeCanFill = _shapeObject.get_CanFill();
}
}
},
_initStyleView: function () {
var me = this,
paletteFillColor = me.getView('EditShape').paletteFillColor,
paletteBorderColor = me.getView('EditShape').paletteBorderColor;
// Init style border size
var borderSize = _shapeObject.get_stroke().get_width() * 72.0 / 25.4,
borderType = _shapeObject.get_stroke().get_type();
$('#edit-shape-bordersize input').val([(borderType == Asc.c_oAscStrokeType.STROKE_NONE) ? 0 : borderSizeTransform.indexSizeByValue(borderSize)]);
$('#edit-shape-bordersize .item-after').text(((borderType == Asc.c_oAscStrokeType.STROKE_NONE) ? 0 : borderSizeTransform.sizeByValue(borderSize)) + ' ' + Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt));
// Init style opacity
$('#edit-shape-effect input').val([_shapeObject.get_fill().asc_getTransparent() ? _shapeObject.get_fill().asc_getTransparent() / 2.55 : 100]);
$('#edit-shape-effect .item-after').text($('#edit-shape-effect input').val() + ' ' + "%");
paletteFillColor && paletteFillColor.on('select', _.bind(me.onFillColor, me));
paletteBorderColor && paletteBorderColor.on('select', _.bind(me.onBorderColor, me));
var sdkColor, color;
// Init fill color
var fill = _shapeObject.get_fill(),
fillType = fill.get_type();
color = 'transparent';
if (fillType == Asc.c_oAscFill.FILL_TYPE_SOLID) {
fill = fill.get_fill();
sdkColor = fill.get_color();
if (sdkColor) {
if (sdkColor.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
color = {color: Common.Utils.ThemeColor.getHexColor(sdkColor.get_r(), sdkColor.get_g(), sdkColor.get_b()), effectValue: sdkColor.get_value()};
} else {
color = Common.Utils.ThemeColor.getHexColor(sdkColor.get_r(), sdkColor.get_g(), sdkColor.get_b());
}
}
}
paletteFillColor && paletteFillColor.select(color);
// Init border color
me._initBorderColorView();
},
_initBorderColorView: function () {
if (!_shapeObject) return;
var me = this,
paletteBorderColor = me.getView('EditShape').paletteBorderColor,
stroke = _shapeObject.get_stroke();
var color = 'transparent';
if (stroke && stroke.get_type() == Asc.c_oAscStrokeType.STROKE_COLOR) {
var sdkColor = stroke.get_color();
if (sdkColor) {
if (sdkColor.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
color = {color: Common.Utils.ThemeColor.getHexColor(sdkColor.get_r(), sdkColor.get_g(), sdkColor.get_b()), effectValue: sdkColor.get_value()};
}
else {
color = Common.Utils.ThemeColor.getHexColor(sdkColor.get_r(), sdkColor.get_g(), sdkColor.get_b());
}
}
}
_borderColor = color;
paletteBorderColor && paletteBorderColor.select(color);
$('#edit-shape-bordercolor .color-preview').css('background-color', ('transparent' == color) ? color : ('#' + (_.isObject(color) ? color.color : color)))
},
// Public
getShape: function () {
return _shapeObject;
},
// Handlers
onRemoveShape: function () {
this.api.asc_Remove();
PE.getController('EditContainer').hideModal();
},
onReorder: function (e) {
},
onAlign: function (e) {
var $target = $(e.currentTarget),
type = $target.data('type');
if ('align-left' == type) {
this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_LEFT);
} else if ('align-center' == type) {
this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_CENTER);
} else if ('align-right' == type) {
this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_RIGHT);
} else if ('align-top' == type) {
this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_TOP);
} else if ('align-middle' == type) {
this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_MIDDLE);
}else if ('align-bottom' == type) {
this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_BOTTOM);
}else if ('distrib-hor' == type) {
this.api.DistributeHorizontally();
}else if ('distrib-vert' == type) {
this.api.DistributeVertically();
}
},
onReplace: function (e) {
},
onBorderSize: function (e) {
var me = this,
$target = $(e.currentTarget),
value = $target.val(),
shape = new Asc.asc_CShapeProperty(),
stroke = new Asc.asc_CStroke();
value = borderSizeTransform.sizeByIndex(parseInt(value));
if (value < 0.01) {
stroke.put_type(Asc.c_oAscStrokeType.STROKE_NONE);
} else {
stroke.put_type(Asc.c_oAscStrokeType.STROKE_COLOR);
if (_borderColor == 'transparent')
stroke.put_color(Common.Utils.ThemeColor.getRgbColor({color: '000000', effectId: 29}));
else
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(Common.Utils.ThemeColor.colorValue2EffectId(_borderColor)));
stroke.put_width(value * 25.4 / 72.0);
}
shape.put_stroke(stroke);
me.api.ShapeApply(shape);
me._initBorderColorView(); // when select STROKE_NONE or change from STROKE_NONE to STROKE_COLOR
},
onBorderSizeChanging: function (e) {
var $target = $(e.currentTarget);
$('#edit-shape-bordersize .item-after').text(borderSizeTransform.sizeByIndex($target.val()) + ' ' + Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt));
},
onOpacity: function (e) {
var me = this,
$target = $(e.currentTarget),
value = $target.val(),
fill = new Asc.asc_CShapeFill(),
shape = new Asc.asc_CShapeProperty();
fill.put_transparent(parseInt(value * 2.55));
shape.put_fill(fill);
me.api.ShapeApply(shape);
},
onOpacityChanging: function (e) {
var $target = $(e.currentTarget);
$('#edit-shape-effect .item-after').text($target.val() + ' %');
},
onFillColor: function(palette, color) {
var me = this;
if (me.api) {
var shape = new Asc.asc_CShapeProperty(),
fill = new Asc.asc_CShapeFill();
if (color == 'transparent') {
fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null);
} else {
fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill(new Asc.asc_CFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor(color));
}
shape.put_fill(fill);
me.api.ShapeApply(shape);
}
},
onBorderColor: function (palette, color) {
var me = this;
$('#edit-shape-bordercolor .color-preview').css('background-color', ('transparent' == color) ? color : ('#' + (_.isObject(color) ? color.color : color)));
_borderColor = color;
if (me.api && _shapeObject && _shapeObject.get_stroke().get_type() == Asc.c_oAscStrokeType.STROKE_COLOR) {
var shape = new Asc.asc_CShapeProperty(),
stroke = new Asc.asc_CStroke();
if (_shapeObject.get_stroke().get_width() < 0.01) {
stroke.put_type(Asc.c_oAscStrokeType.STROKE_NONE);
} else {
stroke.put_type(Asc.c_oAscStrokeType.STROKE_COLOR);
stroke.put_color(Common.Utils.ThemeColor.getRgbColor(color));
stroke.put_width(_shapeObject.get_stroke().get_width());
stroke.asc_putPrstDash(_shapeObject.get_stroke().asc_getPrstDash());
}
shape.put_stroke(stroke);
me.api.ShapeApply(shape);
}
},
// API handlers
onApiFocusObject: function (objects) {
_stack = objects;
var shapes = [];
_.each(_stack, function (object) {
if (object.get_ObjectType() == Asc.c_oAscTypeSelectElement.Shape) {
shapes.push(object);
}
});
if (shapes.length > 0) {
var object = shapes[shapes.length - 1]; // get top shape
_shapeObject = object.get_ObjectValue();
this.getView('EditShape').isShapeCanFill = _shapeObject.get_CanFill();
} else {
_shapeObject = undefined;
}
},
// Helpers
_closeIfNeed: function () {
if (!this._isShapeInStack()) {
PE.getController('EditContainer').hideModal();
}
},
_isShapeInStack: function () {
var shapeExist = false;
_.some(_stack, function(object) {
if (object.get_ObjectType() == Asc.c_oAscTypeSelectElement.Shape) {
shapeExist = true;
return true;
}
});
return shapeExist;
}
};
})(), PE.Controllers.EditShape || {}))
});

View file

@ -1,413 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* EditSlide.js
* Presentation Editor
*
* Created by Julia Radzhabova on 12/07/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'core',
'presentationeditor/mobile/app/view/edit/EditSlide',
'jquery',
'underscore',
'backbone'
], function (core, view, $, _, Backbone) {
'use strict';
PE.Controllers.EditSlide = Backbone.Controller.extend(_.extend((function() {
// Private
var _stack = [],
_slideObject = undefined,
_slideLayoutIndex = -1,
_themeId = -1,
_effect = Asc.c_oAscSlideTransitionTypes.None,
_effectType = -1,
_effectDuration = 2000,
_effectDelay = 10000;
return {
models: [],
collections: [],
views: [
'EditSlide'
],
initialize: function () {
Common.NotificationCenter.on('editcontainer:show', _.bind(this.initEvents, this));
Common.NotificationCenter.on('slidelayouts:load', _.bind(this.updateLayouts, this));
this.addListeners({
'EditSlide': {
'page:show': this.onPageShow
}
});
var me = this;
uiApp.onPageBack('editslide-effect-type editslide-effect', function (page) {
me.initSettings('#edit-slide-transition');
});
this._themes = [];
},
setApi: function (api) {
var me = this;
me.api = api;
me.api.asc_registerCallback('asc_onFocusObject', _.bind(me.onApiFocusObject, me));
me.api.asc_registerCallback('asc_onUpdateThemeIndex', _.bind(me.onApiUpdateThemeIndex, me));
},
onLaunch: function () {
this.createView('EditSlide').render();
},
initEvents: function () {
var me = this;
$('#slide-remove').single('click', _.bind(me.onRemoveSlide, me));
$('#slide-duplicate').single('click', _.bind(me.onDuplicateSlide, me));
me.initSettings();
},
onPageShow: function (view, pageId) {
var me = this;
me.initSettings(pageId);
},
initSettings: function (pageId) {
var me = this;
if (_slideObject) {
if (pageId == '#edit-slide-style') {
me._initStyleView();
var paletteFillColor = me.getView('EditSlide').paletteFillColor;
paletteFillColor && paletteFillColor.on('select', _.bind(me.onFillColor, me));
} else if (pageId == '#edit-slide-layout') {
$('.container-edit .slide-layout li').removeClass('active').single('click', _.buffered(me.onLayoutClick, 100, me));
$('.container-edit .slide-layout li[data-type=' + _slideLayoutIndex + ']').addClass('active');
} else if (pageId == '#edit-slide-theme') {
this.getView('EditSlide').renderThemes();
$('.container-edit .slide-theme .row div').removeClass('active').single('click', _.buffered(me.onThemeClick, 100, me));
$('.container-edit .slide-theme div[data-type=' + _themeId + ']').addClass('active');
} else if (pageId == '#edit-slide-transition') {
me._initTransitionView();
$('#slide-apply-all').single('click', _.bind(me.onApplyAll, me));
$('#edit-slide-duration .button').single('click', _.bind(me.onDuration, me));
$('#edit-slide-start-click input:checkbox').single('change', _.bind(me.onStartClick, me));
$('#edit-slide-delay input:checkbox').single('change', _.bind(me.onDelayCheck, me));
$('#edit-slide-delay .item-content:nth-child(2) input').single('change touchend', _.buffered(me.onDelay, 100, me));
$('#edit-slide-delay .item-content:nth-child(2) input').single('input', _.bind(me.onDelayChanging, me));
} else if (pageId == '#editslide-effect') {
$('#page-editslide-effect input').val([_effect]);
$('#page-editslide-effect li').single('click', _.buffered(me.onEffectClick, 100, me));
} else if (pageId == '#editslide-effect-type') {
me.getView('EditSlide').renderEffectTypes();
$('#page-editslide-effect-type input').val([_effectType]);
$('#page-editslide-effect-type li').single('click', _.buffered(me.onEffectTypeClick, 100, me));
}
}
},
_initStyleView: function () {
var me = this,
paletteFillColor = me.getView('EditSlide').paletteFillColor;
var sdkColor, color;
// Init fill color
var fill = _slideObject.get_background(),
fillType = fill.get_type();
color = 'transparent';
if (fillType == Asc.c_oAscFill.FILL_TYPE_SOLID) {
fill = fill.get_fill();
sdkColor = fill.get_color();
if (sdkColor) {
if (sdkColor.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
color = {color: Common.Utils.ThemeColor.getHexColor(sdkColor.get_r(), sdkColor.get_g(), sdkColor.get_b()), effectValue: sdkColor.get_value()};
} else {
color = Common.Utils.ThemeColor.getHexColor(sdkColor.get_r(), sdkColor.get_g(), sdkColor.get_b());
}
}
}
paletteFillColor && paletteFillColor.select(color);
},
_initTransitionView: function () {
var me = this;
var timing = _slideObject.get_timing();
if (timing) {
_effect = timing.get_TransitionType();
me.getView('EditSlide').fillEffectTypes(_effect);
$('#edit-slide-effect .item-after').text(me.getView('EditSlide').getEffectName(_effect));
$('#edit-slide-effect-type').toggleClass('disabled', _effect == Asc.c_oAscSlideTransitionTypes.None);
$('#edit-slide-duration').toggleClass('disabled', _effect == Asc.c_oAscSlideTransitionTypes.None);
_effectType = timing.get_TransitionOption();
$('#edit-slide-effect-type .item-after').text((_effect != Asc.c_oAscSlideTransitionTypes.None) ? me.getView('EditSlide').getEffectTypeName(_effectType) : '');
_effectDuration = timing.get_TransitionDuration();
$('#edit-slide-duration .item-after label').text((_effectDuration!==null && _effectDuration!==undefined) ? (parseInt(_effectDuration/1000.) + ' ' + me.textSec) : '');
$('#edit-slide-start-click input:checkbox').prop('checked', !!timing.get_SlideAdvanceOnMouseClick());
$('#edit-slide-delay input:checkbox').prop('checked', !!timing.get_SlideAdvanceAfter());
$('#edit-slide-delay .item-content:nth-child(2)').toggleClass('disabled',!timing.get_SlideAdvanceAfter());
_effectDelay = timing.get_SlideAdvanceDuration();
$('#edit-slide-delay .item-content:nth-child(2) .item-after').text((_effectDelay!==null && _effectDelay!==undefined) ? (parseInt(_effectDelay/1000.) + ' ' + me.textSec) : '');
$('#edit-slide-delay .item-content:nth-child(2) input').val([(_effectDelay!==null && _effectDelay!==undefined) ? parseInt(_effectDelay/1000.) : 0]);
}
},
// Public
getSlide: function () {
return _slideObject;
},
getThemes: function () {
return this._themes || [];
},
// Handlers
onLayoutClick: function (e) {
},
onThemeClick: function (e) {
},
onRemoveSlide: function () {
this.api.DeleteSlide();
PE.getController('EditContainer').hideModal();
},
onDuplicateSlide: function () {
this.api.DublicateSlide();
PE.getController('EditContainer').hideModal();
},
onFillColor: function(palette, color) {
var me = this;
if (me.api) {
var props = new Asc.CAscSlideProps();
var fill = new Asc.asc_CShapeFill();
if (color == 'transparent') {
fill.put_type(Asc.c_oAscFill.FILL_TYPE_NOFILL);
fill.put_fill(null);
} else {
fill.put_type(Asc.c_oAscFill.FILL_TYPE_SOLID);
fill.put_fill(new Asc.asc_CFillSolid());
fill.get_fill().put_color(Common.Utils.ThemeColor.getRgbColor(color));
}
props.put_background(fill);
me.api.SetSlideProps(props);
}
},
updateLayouts: function(layouts){
this.getView('EditSlide').updateLayouts();
$('.container-edit .slide-layout li').single('click', _.buffered(this.onLayoutClick, 100, this));
$('.container-edit .slide-layout li[data-type=' + _slideLayoutIndex + ']').addClass('active');
},
onEffectClick: function (e) {
var $target = $(e.currentTarget).find('input');
if ($target && this.api) {
_effect = parseFloat($target.prop('value'));
_effectType = this.getView('EditSlide').fillEffectTypes(_effect);
var props = new Asc.CAscSlideProps(),
timing = new Asc.CAscSlideTiming();
timing.put_TransitionType(_effect);
timing.put_TransitionOption(_effectType);
props.put_timing(timing);
this.api.SetSlideProps(props);
}
},
onEffectTypeClick: function (e) {
var $target = $(e.currentTarget).find('input');
if ($target && this.api) {
_effectType = parseFloat($target.prop('value'));
var props = new Asc.CAscSlideProps(),
timing = new Asc.CAscSlideTiming();
timing.put_TransitionType(_effect);
timing.put_TransitionOption(_effectType);
props.put_timing(timing);
this.api.SetSlideProps(props);
}
},
onDuration: function (e) {
var $button = $(e.currentTarget),
duration = parseInt(_effectDuration/1000);
if ($button.hasClass('decrement')) {
duration = Math.max(0, --duration);
} else {
duration = Math.min(300, ++duration);
}
_effectDuration = duration * 1000;
$('#edit-slide-duration .item-after label').text(duration + ' ' + this.textSec);
var props = new Asc.CAscSlideProps(),
timing = new Asc.CAscSlideTiming();
timing.put_TransitionDuration(_effectDuration);
props.put_timing(timing);
this.api.SetSlideProps(props);
},
onStartClick: function (e) {
var $checkbox = $(e.currentTarget);
var props = new Asc.CAscSlideProps(),
timing = new Asc.CAscSlideTiming();
timing.put_SlideAdvanceOnMouseClick($checkbox.is(':checked'));
props.put_timing(timing);
this.api.SetSlideProps(props);
},
onDelayCheck: function (e) {
var $checkbox = $(e.currentTarget);
$('#edit-slide-delay .item-content:nth-child(2)').toggleClass('disabled',!$checkbox.is(':checked'));
var props = new Asc.CAscSlideProps(),
timing = new Asc.CAscSlideTiming();
timing.put_SlideAdvanceAfter($checkbox.is(':checked'));
timing.put_SlideAdvanceDuration(_effectDelay);
props.put_timing(timing);
this.api.SetSlideProps(props);
},
onDelay: function (e) {
var $target = $(e.currentTarget),
delay = $target.val();
_effectDelay = delay * 1000;
$('#edit-slide-delay .item-content:nth-child(2) .item-after').text(delay + ' ' + this.textSec);
var props = new Asc.CAscSlideProps(),
timing = new Asc.CAscSlideTiming();
timing.put_SlideAdvanceDuration(_effectDelay);
props.put_timing(timing);
this.api.SetSlideProps(props);
},
onDelayChanging: function (e) {
var $target = $(e.currentTarget);
$('#edit-slide-delay .item-content:nth-child(2) .item-after').text($target.val() + ' ' + this.textSec);
},
onApplyAll: function (e) {
this.api.SlideTimingApplyToAll();
},
// API handlers
onApiFocusObject: function (objects) {
_stack = objects;
var slides = [];
_.each(_stack, function (object) {
if (object.get_ObjectType() == Asc.c_oAscTypeSelectElement.Slide) {
slides.push(object);
}
});
if (slides.length > 0) {
var object = slides[slides.length - 1]; // get top slide
_slideObject = object.get_ObjectValue();
_slideLayoutIndex = _slideObject.get_LayoutIndex();
if ($('.container-edit .slide-layout').length > 0) {
$('.container-edit .slide-layout li').removeClass('active');
$('.container-edit .slide-layout li[data-type=' + _slideLayoutIndex + ']').addClass('active');
}
} else {
_slideObject = undefined;
}
},
onApiUpdateThemeIndex: function(themeId) {
_themeId = themeId;
$('.container-edit .slide-theme .row div').removeClass('active');
$('.container-edit .slide-theme div[data-type=' + _themeId + ']').addClass('active');
},
// Helpers
_closeIfNeed: function () {
if (!this._isSlideInStack()) {
PE.getController('EditContainer').hideModal();
}
},
_isSlideInStack: function () {
var slideExist = false;
_.some(_stack, function(object) {
if (object.get_ObjectType() == Asc.c_oAscTypeSelectElement.Slide) {
slideExist = true;
return true;
}
});
return slideExist;
},
textSec: 's'
};
})(), PE.Controllers.EditSlide || {}))
});

View file

@ -1,544 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* EditTable.js
* Presentation Editor
*
* Created by Julia Radzhabova on 11/30/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'core',
'presentationeditor/mobile/app/view/edit/EditTable',
'jquery',
'underscore',
'backbone'
], function (core, view, $, _, Backbone) {
'use strict';
PE.Controllers.EditTable = Backbone.Controller.extend(_.extend((function() {
// Private
var _stack = [],
_metricText = Common.Utils.Metric.getCurrentMetricName(),
_tableObject = undefined,
_tableLook = {},
_cellBorders = undefined,
_cellBorderColor = '000000',
_cellBorderWidth = 0.5;
var borderSizeTransform = (function() {
var _sizes = [0, 0.5, 1, 1.5, 2.25, 3, 4.5, 6];
return {
sizeByIndex: function (index) {
if (index < 1) return _sizes[0];
if (index > _sizes.length - 1) return _sizes[_sizes.length - 1];
return _sizes[index];
},
indexSizeByValue: function (value) {
var index = 0;
_.each(_sizes, function (size, idx) {
if (Math.abs(size - value) < 0.25) {
index = idx;
}
});
return index;
},
sizeByValue: function (value) {
return _sizes[this.indexSizeByValue(value)];
}
}
})();
return {
models: [],
collections: [],
views: [
'EditTable'
],
initialize: function () {
Common.NotificationCenter.on('editcontainer:show', _.bind(this.initEvents, this));
this.addListeners({
'EditTable': {
'page:show' : this.onPageShow
}
});
var me = this;
uiApp.onPageBack('edit-table-style-options', function (page) {
$('.dataview.table-styles .row div').single('click', _.bind(me.onStyleClick, me));
me.initSettings('#edit-table-style');
});
},
setApi: function (api) {
var me = this;
me.api = api;
},
onLaunch: function () {
this.createView('EditTable').render();
},
initEvents: function () {
var me = this;
$('#table-options-margins input').single('change touchend', _.buffered(me.onOptionMargin, 100, me));
$('#table-options-margins input').single('input', _.bind(me.onOptionMarginChanging, me));
me.initSettings();
},
onPageShow: function (view, pageId) {
var me = this,
paletteFillColor = me.getView('EditTable').paletteFillColor,
paletteBorderColor = me.getView('EditTable').paletteBorderColor;
$('#table-options-header-row input:checkbox').single('change', _.bind(me.onCheckTemplateChange, me, 0));
$('#table-options-total-row input:checkbox').single('change', _.bind(me.onCheckTemplateChange, me, 1));
$('#table-options-banded-row input:checkbox').single('change', _.bind(me.onCheckTemplateChange, me, 2));
$('#table-options-first-column input:checkbox').single('change', _.bind(me.onCheckTemplateChange, me, 3));
$('#table-options-last-column input:checkbox').single('change', _.bind(me.onCheckTemplateChange, me, 4));
$('#table-options-banded-column input:checkbox').single('change', _.bind(me.onCheckTemplateChange, me, 5));
$('#edit-table-bordertypes a').single('click', _.bind(me.onBorderTypeClick, me));
$('.dataview.table-styles .row div').single('click', _.bind(me.onStyleClick, me));
$('#edit-table-bordersize input').single('change touchend', _.buffered(me.onBorderSize, 100, me));
$('#edit-table-bordersize input').single('input', _.bind(me.onBorderSizeChanging, me));
paletteFillColor && paletteFillColor.on('select', _.bind(me.onFillColor, me));
paletteBorderColor && paletteBorderColor.on('select', _.bind(me.onBorderColor, me));
$('.table-reorder a').single('click', _.bind(me.onReorder, me));
$('.table-align a').single('click', _.bind(me.onAlign, me));
me.initSettings(pageId);
},
initSettings: function (pageId) {
var me = this;
_metricText = Common.Utils.Metric.getMetricName(Common.Utils.Metric.getCurrentMetric());
if (_tableObject) {
if (pageId == "#edit-table-style" || pageId == '#edit-table-border-color-view') {
me._initStyleView();
} else if (pageId == '#edit-table-style-options-view') {
me._initStyleOptionsView();
} else
me._initTableOptionsView();
}
},
_initStyleOptionsView: function() {
$('#table-options-header-row input').prop('checked', _tableLook.get_FirstRow());
$('#table-options-total-row input').prop('checked', _tableLook.get_LastRow());
$('#table-options-banded-row input').prop('checked', _tableLook.get_BandHor());
$('#table-options-first-column input').prop('checked', _tableLook.get_FirstCol());
$('#table-options-last-column input').prop('checked', _tableLook.get_LastCol());
$('#table-options-banded-column input').prop('checked', _tableLook.get_BandVer());
},
_initTableOptionsView: function() {
var margins = _tableObject.get_CellMargins();
if (margins) {
var distance = Common.Utils.Metric.fnRecalcFromMM(margins.get_Left());
$('#table-options-margins input').val(distance);
$('#table-options-margins .item-after').text(distance + ' ' + _metricText);
}
},
_initStyleView: function() {
var me = this;
/**
* Style
*/
var styleId = _tableObject.get_TableStyle();
$('#edit-table-styles .table-styles div').removeClass('active');
$('#edit-table-styles .table-styles div[data-type=' + styleId + ']').addClass('active');
/**
* Fill
*/
var background = _tableObject.get_CellsBackground(),
fillColor = 'transparent';
if (background) {
if (background.get_Value()==0) {
var color = background.get_Color();
if (color) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
fillColor = {color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()), effectValue: color.get_value()};
} else {
fillColor = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
}
}
}
}
var palette = me.getView('EditTable').paletteFillColor;
if (palette) {
palette.select(fillColor);
}
/**
* Border
*/
// if (_.isUndefined(_cellBorderColor) || _.isUndefined(_cellBorderWidth)) {
// _cellBorders = _tableObject.get_CellBorders();
//
// _.some([
// _cellBorders.get_Left(),
// _cellBorders.get_Top(),
// _cellBorders.get_Right(),
// _cellBorders.get_Bottom(),
// _cellBorders.get_InsideV(),
// _cellBorders.get_InsideH()
// ], function (border) {
// if (border.get_Value() > 0) {
// var borderColor = border.get_Color();
//
// if (borderColor.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
// borderColor = {
// color: Common.Utils.ThemeColor.getHexColor(borderColor.get_r(), borderColor.get_g(), borderColor.get_b()),
// effectValue: borderColor.get_value()
// };
// } else {
// borderColor = Common.Utils.ThemeColor.getHexColor(borderColor.get_r(), borderColor.get_g(), borderColor.get_b());
// }
//
// _cellBorderWidth = border.get_Size();
// _cellBorderColor = borderColor;
//
// return true;
// }
// });
// }
$('#edit-table-bordersize input').val([borderSizeTransform.indexSizeByValue(_cellBorderWidth)]);
$('#edit-table-bordersize .item-after').text(borderSizeTransform.sizeByValue(_cellBorderWidth) + ' ' + Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt));
var borderPalette = me.getView('EditTable').paletteBorderColor;
if (borderPalette) {
borderPalette.select(_cellBorderColor);
}
$('#edit-table-bordercolor .color-preview').css('background-color', ('transparent' == _cellBorderColor) ? _cellBorderColor : ('#' + (_.isObject(_cellBorderColor) ? _cellBorderColor.color : _cellBorderColor)));
},
_updateBordersStyle: function(border) {
_cellBorders = new Asc.CBorders();
var updateBorders = _cellBorders;
var visible = (border != '');
if (border.indexOf('l') > -1 || !visible) {
if (updateBorders.get_Left()===null || updateBorders.get_Left()===undefined)
updateBorders.put_Left(new Asc.asc_CTextBorder());
this._updateBorderStyle (updateBorders.get_Left(), visible);
}
if (border.indexOf('t') > -1 || !visible) {
if (updateBorders.get_Top()===null || updateBorders.get_Top()===undefined)
updateBorders.put_Top(new Asc.asc_CTextBorder());
this._updateBorderStyle (updateBorders.get_Top(), visible);
}
if (border.indexOf('r') > -1 || !visible) {
if (updateBorders.get_Right()===null || updateBorders.get_Right()===undefined)
updateBorders.put_Right(new Asc.asc_CTextBorder());
this._updateBorderStyle (updateBorders.get_Right(), visible);
}
if (border.indexOf('b') > -1 || !visible) {
if (updateBorders.get_Bottom()===null || updateBorders.get_Bottom()===undefined)
updateBorders.put_Bottom(new Asc.asc_CTextBorder());
this._updateBorderStyle (updateBorders.get_Bottom(), visible);
}
if (border.indexOf('c') > -1 || !visible) {
if (updateBorders.get_InsideV()===null || updateBorders.get_InsideV()===undefined)
updateBorders.put_InsideV(new Asc.asc_CTextBorder());
this._updateBorderStyle (updateBorders.get_InsideV(), visible);
}
if (border.indexOf('m') > -1 || !visible) {
if (updateBorders.get_InsideH()===null || updateBorders.get_InsideH()===undefined)
updateBorders.put_InsideH(new Asc.asc_CTextBorder());
this._updateBorderStyle (updateBorders.get_InsideH(), visible);
}
},
_updateBorderStyle: function(border, visible) {
if (_.isNull(border)) {
border = new Asc.asc_CTextBorder();
}
if (visible && _cellBorderWidth > 0){
var size = parseFloat(_cellBorderWidth);
border.put_Value(1);
border.put_Size(size * 25.4 / 72.0);
var color = Common.Utils.ThemeColor.getRgbColor(_cellBorderColor);
border.put_Color(color);
}
else {
border.put_Value(0);
}
},
// Public
getTable: function() {
return _tableObject;
},
// Handlers
onOptionMargin: function (e) {
var me = this,
$target = $(e.currentTarget),
value = $target.val(),
properties = new Asc.CTableProp(),
margins = new Asc.CMargins();
$('#table-options-margins .item-after').text(value + ' ' + _metricText);
value = Common.Utils.Metric.fnRecalcToMM(value);
margins.put_Top(value);
margins.put_Right(value);
margins.put_Bottom(value);
margins.put_Left(value);
margins.put_Flag(2);
properties.put_CellMargins(margins);
me.api.tblApply(properties);
},
onOptionMarginChanging: function (e) {
var $target = $(e.currentTarget);
$('#table-options-margins .item-after').text($target.val() + ' ' + _metricText);
},
onCheckTemplateChange: function(type, e) {
if (this.api) {
var properties = new Asc.CTableProp();
switch (type) {
case 0:
_tableLook.put_FirstRow($('#table-options-header-row input').is(':checked'));
break;
case 1:
_tableLook.put_LastRow($('#table-options-total-row input').is(':checked'));
break;
case 2:
_tableLook.put_BandHor($('#table-options-banded-row input').is(':checked'));
break;
case 3:
_tableLook.put_FirstCol($('#table-options-first-column input').is(':checked'));
break;
case 4:
_tableLook.put_LastCol($('#table-options-last-column input').is(':checked'));
break;
case 5:
_tableLook.put_BandVer($('#table-options-banded-column input').is(':checked'));
break;
}
properties.put_TableLook(_tableLook);
this.api.tblApply(properties);
}
},
onBorderTypeClick: function (e) {
var me = this,
$target = $(e.currentTarget),
type = $target.data('type');
this._updateBordersStyle(type);
if (me.api) {
var properties = new Asc.CTableProp();
_cellBorders = _.isUndefined(_cellBorders) ? new Asc.CBorders() : _cellBorders;
properties.put_CellBorders(_cellBorders);
properties.put_CellSelect(true);
me.api.tblApply(properties);
}
},
onFillColor: function(palette, color) {
if (this.api) {
var properties = new Asc.CTableProp(),
background = new Asc.CBackground();
properties.put_CellsBackground(background);
if ('transparent' == color) {
background.put_Value(1);
} else {
background.put_Value(0);
background.put_Color(Common.Utils.ThemeColor.getRgbColor(color));
}
properties.put_CellSelect(true);
this.api.tblApply(properties);
}
},
onBorderColor: function (palette, color) {
_cellBorderColor = color;
$('#edit-table-bordercolor .color-preview').css('background-color', ('transparent' == color) ? color : ('#' + (_.isObject(color) ? color.color : color)));
},
onStyleClick: function (e) {
var me = this,
$target = $(e.currentTarget),
type = $target.data('type'),
properties = new Asc.CTableProp();
$('#edit-table-styles .table-styles div').removeClass('active');
$target.addClass('active');
properties.put_TableStyle(type);
me.api.tblApply(properties);
},
onBorderSize: function (e) {
var $target = $(e.currentTarget),
value = $target.val();
_cellBorderWidth = borderSizeTransform.sizeByIndex(parseInt(value));
},
onBorderSizeChanging: function (e) {
var $target = $(e.currentTarget);
$('#edit-table-bordersize .item-after').text(borderSizeTransform.sizeByIndex($target.val()) + ' ' + Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt));
},
onReorder: function (e) {
var $target = $(e.currentTarget),
type = $target.data('type');
if ('all-up' == type) {
this.api.shapes_bringToFront();
} else if ('all-down' == type) {
this.api.shapes_bringToBack();
} else if ('move-up' == type) {
this.api.shapes_bringForward();
} else if ('move-down' == type) {
this.api.shapes_bringBackward();
}
},
onAlign: function (e) {
var $target = $(e.currentTarget),
type = $target.data('type');
if ('align-left' == type) {
this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_LEFT);
} else if ('align-center' == type) {
this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_CENTER);
} else if ('align-right' == type) {
this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_RIGHT);
} else if ('align-top' == type) {
this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_TOP);
} else if ('align-middle' == type) {
this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_MIDDLE);
}else if ('align-bottom' == type) {
this.api.put_ShapesAlign(Asc.c_oAscAlignShapeType.ALIGN_BOTTOM);
}else if ('distrib-hor' == type) {
this.api.DistributeHorizontally();
}else if ('distrib-vert' == type) {
this.api.DistributeVertically();
}
},
// API handlers
onApiFocusObject: function (objects) {
_stack = objects;
var tables = [];
_.each(_stack, function(object) {
if (object.get_ObjectType() == Asc.c_oAscTypeSelectElement.Table) {
tables.push(object);
}
});
if (tables.length > 0) {
var object = tables[tables.length - 1]; // get top table
_tableObject = object.get_ObjectValue();
_tableLook = _tableObject.get_TableLook();
} else {
_tableObject = undefined;
}
},
// Helpers
_closeIfNeed: function () {
if (!this._isTableInStack()) {
PE.getController('EditContainer').hideModal();
}
},
_isTableInStack: function () {
var tableExist = false;
_.some(_stack, function(object) {
if (object.get_ObjectType() == Asc.c_oAscTypeSelectElement.Table) {
tableExist = true;
return true;
}
});
return tableExist;
}
}
})(), PE.Controllers.EditTable || {}))
});

View file

@ -1,595 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* EditText.js
* Presentation Editor
*
* Created by Alexander Yuzhin on 10/4/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'core',
'presentationeditor/mobile/app/view/edit/EditText',
'jquery',
'underscore',
'backbone',
'common/mobile/lib/component/ThemeColorPalette'
], function (core, view, $, _, Backbone) {
'use strict';
PE.Controllers.EditText = Backbone.Controller.extend(_.extend((function() {
var _stack = [],
_paragraphObject = undefined,
_fontInfo = {},
_paragraphInfo = {},
metricText = Common.Utils.Metric.getCurrentMetricName();
return {
models: [],
collections: [],
views: [
'EditText'
],
initialize: function () {
Common.NotificationCenter.on('editcontainer:show', _.bind(this.initEvents, this));
Common.NotificationCenter.on('editcategory:show', _.bind(this.categoryShow, this));
this.addListeners({
'EditText': {
'page:show' : this.onPageShow,
'font:click': this.onFontClick
}
});
this._fontsArray = [];
},
setApi: function (api) {
var me = this;
me.api = api;
},
onLaunch: function () {
this.createView('EditText').render();
},
initEvents: function () {
var me = this;
$('#font-bold').single('click', _.bind(me.onBold, me));
$('#font-italic').single('click', _.bind(me.onItalic, me));
$('#font-underline').single('click', _.bind(me.onUnderline, me));
$('#font-strikethrough').single('click', _.bind(me.onStrikethrough, me));
$('#paragraph-align .button').single('click', _.bind(me.onParagraphAlign, me));
$('#paragraph-valign .button').single('click', _.bind(me.onParagraphVAlign, me));
$('#font-moveleft, #font-moveright').single('click', _.bind(me.onParagraphMove, me));
$('#paragraph-distance-before .button').single('click', _.bind(me.onDistanceBefore, me));
$('#paragraph-distance-after .button').single('click', _.bind(me.onDistanceAfter, me));
// me.initSettings();
},
categoryShow: function (e) {
var $target = $(e.currentTarget);
if ($target && $target.prop('id') === 'edit-text') {
this.initSettings();
}
},
onPageShow: function (view, pageId) {
var me = this,
paletteTextColor = me.getView('EditText').paletteTextColor;
$('#text-additional li').single('click', _.buffered(me.onAdditional, 100, me));
$('#page-text-linespacing li').single('click', _.buffered(me.onLineSpacing, 100, me));
$('#font-size .button').single('click', _.bind(me.onFontSize, me));
$('#letter-spacing .button').single('click', _.bind(me.onLetterSpacing, me));
$('.dataview.bullets li').single('click', _.buffered(me.onBullet, 100, me));
$('.dataview.numbers li').single('click', _.buffered(me.onNumber, 100, me));
paletteTextColor && paletteTextColor.on('select', _.bind(me.onTextColor, me));
me.initSettings(pageId);
},
initSettings: function (pageId) {
var me = this;
metricText = Common.Utils.Metric.getMetricName(Common.Utils.Metric.getCurrentMetric());
me.api && me.api.UpdateInterfaceState(); // TODO: refactor me
if (_paragraphObject) {
if (pageId == '#edit-text-additional') {
var $inputStrikethrough = $('#text-additional input[name=text-strikethrough]');
var $inputTextCaps = $('#text-additional input[name=text-caps]');
_paragraphObject.get_Strikeout() && $inputStrikethrough.val(['strikethrough']).prop('prevValue', 'strikethrough');
_paragraphObject.get_DStrikeout() && $inputStrikethrough.val(['double-strikethrough']).prop('prevValue', 'double-strikethrough');
_paragraphObject.get_SmallCaps() && $inputTextCaps.val(['small']).prop('prevValue', 'small');
_paragraphObject.get_AllCaps() && $inputTextCaps.val(['all']).prop('prevValue', 'all');
_fontInfo.letterSpacing = Common.Utils.Metric.fnRecalcFromMM(_paragraphObject.get_TextSpacing());
$('#letter-spacing .item-after label').text(_fontInfo.letterSpacing + ' ' + Common.Utils.Metric.getCurrentMetricName());
}
_paragraphInfo.spaceBefore = _paragraphObject.get_Spacing().get_Before() < 0 ? _paragraphObject.get_Spacing().get_Before() : Common.Utils.Metric.fnRecalcFromMM(_paragraphObject.get_Spacing().get_Before());
_paragraphInfo.spaceAfter = _paragraphObject.get_Spacing().get_After() < 0 ? _paragraphObject.get_Spacing().get_After() : Common.Utils.Metric.fnRecalcFromMM(_paragraphObject.get_Spacing().get_After());
$('#paragraph-distance-before .item-after label').text(_paragraphInfo.spaceBefore < 0 ? 'Auto' : _paragraphInfo.spaceBefore + ' ' + metricText);
$('#paragraph-distance-after .item-after label').text(_paragraphInfo.spaceAfter < 0 ? 'Auto' : _paragraphInfo.spaceAfter + ' ' + metricText);
}
},
// Public
getFonts: function() {
return this._fontsArray;
},
getStack: function() {
return _stack;
},
getFontInfo: function () {
return _fontInfo;
},
getParagraph: function () {
return _paragraphObject;
},
// Handlers
onBold: function (e) {
var pressed = this._toggleButton(e);
if (this.api) {
this.api.put_TextPrBold(pressed);
}
},
onItalic: function (e) {
var pressed = this._toggleButton(e);
if (this.api) {
this.api.put_TextPrItalic(pressed);
}
},
onUnderline: function (e) {
var pressed = this._toggleButton(e);
if (this.api) {
this.api.put_TextPrUnderline(pressed);
}
},
onStrikethrough: function (e) {
var pressed = this._toggleButton(e);
if (this.api) {
this.api.put_TextPrStrikeout(pressed);
}
},
onAdditionalStrikethrough : function ($target) {
var value = $target.prop('value'),
checked = $target.prop('checked'),
paragraphProps = new Asc.asc_CParagraphProperty();
if ('strikethrough' == value) {
paragraphProps.put_DStrikeout(false);
paragraphProps.put_Strikeout(checked);
} else {
paragraphProps.put_DStrikeout(checked);
paragraphProps.put_Strikeout(false);
}
this.api.paraApply(paragraphProps);
},
onAdditionalScript : function ($target) {
var value = $target.prop('value'),
checked = $target.prop('checked');
if ('superscript' == value) {
this.api.put_TextPrBaseline(checked ? 1 : 0);
} else {
this.api.put_TextPrBaseline(checked ? 2 : 0);
}
},
onAdditionalCaps : function ($target) {
var value = $target.prop('value'),
checked = $target.prop('checked'),
paragraphProps = new Asc.asc_CParagraphProperty();
if ('small' == value) {
paragraphProps.put_AllCaps(false);
paragraphProps.put_SmallCaps(checked);
} else {
paragraphProps.put_AllCaps(checked);
paragraphProps.put_SmallCaps(false);
}
this.api.paraApply(paragraphProps);
},
onAdditional: function(e) {
var me = this,
$target = $(e.currentTarget).find('input'),
prevValue = $target.prop('prevValue');
if (prevValue == $target.prop('value')) {
$target.prop('checked', false);
prevValue = null;
} else {
$target.prop('checked', true);
prevValue = $target.prop('value');
}
$('#page-text-additional input[name="'+ $target.prop('name') +'"]').prop('prevValue', prevValue);
var radioName = $target.prop('name');
if ('text-strikethrough' == radioName) {
me.onAdditionalStrikethrough($target);
} else if ('text-script' == radioName) {
me.onAdditionalScript($target);
} else if ('text-caps' == radioName){
me.onAdditionalCaps($target);
}
},
onFontClick: function (view, e) {
var $item = $(e.currentTarget).find('input');
if ($item) {
this.api.put_TextPrFontName($item.prop('value'));
}
},
onFontSize: function (e) {
var $button = $(e.currentTarget),
fontSize = _fontInfo.size;
if ($button.hasClass('decrement')) {
_.isUndefined(fontSize) ? this.api.FontSizeOut() : fontSize = Math.max(1, --fontSize);
} else {
_.isUndefined(fontSize) ? this.api.FontSizeIn() : fontSize = Math.min(100, ++fontSize);
}
if (! _.isUndefined(fontSize)) {
this.api.put_TextPrFontSize(fontSize);
}
},
onLetterSpacing: function (e) {
var $button = $(e.currentTarget),
spacing = _fontInfo.letterSpacing;
if ($button.hasClass('decrement')) {
spacing = Math.max(-100, --spacing);
} else {
spacing = Math.min(100, ++spacing);
}
_fontInfo.letterSpacing = spacing;
$('#letter-spacing .item-after label').text(spacing + ' ' + Common.Utils.Metric.getCurrentMetricName());
var properties = new Asc.asc_CParagraphProperty();
properties.put_TextSpacing(Common.Utils.Metric.fnRecalcToMM(spacing));
this.api.paraApply(properties);
},
onTextColor: function (palette, color) {
// $('.btn-color-value-line', this.toolbar.btnFontColor.cmpEl).css('background-color', '#' + clr);
if (this.api) {
this.api.put_TextColor(Common.Utils.ThemeColor.getRgbColor(color));
}
},
onParagraphAlign: function (e) {
var $target = $(e.currentTarget);
if ($target) {
var id = $target.attr('id'),
type = 1;
if ('font-just' == id) {
type = 3;
} else if ('font-right' == id) {
type = 0;
} else if ('font-center' == id) {
type = 2;
}
$('#paragraph-align .button').removeClass('active');
$target.addClass('active');
this.api.put_PrAlign(type);
}
},
onParagraphVAlign: function (e) {
var $target = $(e.currentTarget);
if ($target) {
var id = $target.attr('id'),
type = Asc.c_oAscVAlign.Bottom;
if ('font-top' == id) {
type = Asc.c_oAscVAlign.Top;
} else if ('font-middle' == id) {
type = Asc.c_oAscVAlign.Center;
}
$('#paragraph-align .button').removeClass('active');
$target.addClass('active');
this.api.setVerticalAlign(type);
}
},
onParagraphMove: function (e) {
var $target = $(e.currentTarget);
if ($target && this.api) {
var id = $target.attr('id');
if ('font-moveleft' == id) {
this.api.DecreaseIndent();
} else {
this.api.IncreaseIndent();
}
}
},
onLineSpacing: function (e) {
var $target = $(e.currentTarget).find('input');
if ($target && this.api) {
var value = parseFloat($target.prop('value')),
LINERULE_AUTO = 1;
this.api.put_PrLineSpacing(LINERULE_AUTO, value);
}
},
onBullet: function (e) {
var $bullet = $(e.currentTarget),
type = $bullet.data('type');
$('.dataview.bullets li').removeClass('active');
$bullet.addClass('active');
this.api.put_ListType(0, parseInt(type));
},
onNumber: function (e) {
var $number = $(e.currentTarget),
type = $number.data('type');
$('.dataview.numbers li').removeClass('active');
$number.addClass('active');
this.api.put_ListType(1, parseInt(type));
},
onDistanceBefore: function (e) {
var $button = $(e.currentTarget),
distance = _paragraphInfo.spaceBefore;
if ($button.hasClass('decrement')) {
distance = Math.max(-1, --distance);
} else {
distance = Math.min(100, ++distance);
}
_paragraphInfo.spaceBefore = distance;
$('#paragraph-distance-before .item-after label').text(_paragraphInfo.spaceBefore < 0 ? 'Auto' : (_paragraphInfo.spaceBefore) + ' ' + metricText);
this.api.put_LineSpacingBeforeAfter(0, (_paragraphInfo.spaceBefore < 0) ? -1 : Common.Utils.Metric.fnRecalcToMM(_paragraphInfo.spaceBefore));
},
onDistanceAfter: function (e) {
var $button = $(e.currentTarget),
distance = _paragraphInfo.spaceAfter;
if ($button.hasClass('decrement')) {
distance = Math.max(-1, --distance);
} else {
distance = Math.min(100, ++distance);
}
_paragraphInfo.spaceAfter = distance;
$('#paragraph-distance-after .item-after label').text(_paragraphInfo.spaceAfter < 0 ? 'Auto' : (_paragraphInfo.spaceAfter) + ' ' + metricText);
this.api.put_LineSpacingBeforeAfter(1, (_paragraphInfo.spaceAfter < 0) ? -1 : Common.Utils.Metric.fnRecalcToMM(_paragraphInfo.spaceAfter));
},
// API handlers
onApiFocusObject: function (objects) {
_stack = objects;
var paragraphs = [];
_.each(_stack, function(object) {
if (object.get_ObjectType() == Asc.c_oAscTypeSelectElement.Paragraph) {
paragraphs.push(object);
}
});
if (paragraphs.length > 0) {
var object = paragraphs[paragraphs.length - 1]; // get top
_paragraphObject = object.get_ObjectValue();
} else {
_paragraphObject = undefined;
}
$('#edit-text div.edit-paragraph')[(paragraphs.length > 0) ? 'show' : 'hide']();
},
onApiChangeFont: function(font) {
var name = (_.isFunction(font.get_Name) ? font.get_Name() : font.asc_getName()) || this.textFonts;
_fontInfo.name = name;
$('#font-fonts .item-title').html(name);
},
onApiFontSize: function(size) {
_fontInfo.size = size;
var displaySize = _fontInfo.size;
_.isUndefined(displaySize) ? displaySize = this.textAuto : displaySize = displaySize + ' ' + this.textPt;
$('#font-fonts .item-after span:first-child').html(displaySize);
$('#font-size .item-after label').html(displaySize);
},
onApiBold: function(on) {
$('#font-bold').toggleClass('active', on);
},
onApiItalic: function(on) {
$('#font-italic').toggleClass('active', on);
},
onApiUnderline: function(on) {
$('#font-underline').toggleClass('active', on);
},
onApiStrikeout: function(on) {
$('#font-strikethrough').toggleClass('active', on);
},
onApiVerticalAlign: function(typeBaseline) {
var value;
typeBaseline==1 && (value = 'superscript');
typeBaseline==2 && (value = 'subscript');
if (!_.isUndefined(value)) {
$('#text-additional input[name=text-script]').val([value]).prop('prevValue', value);
}
},
onApiTextColor: function (color) {
var me = this;
if (color.get_auto()) {
// on auto
} else {
var palette = me.getView('EditText').paletteTextColor,
clr;
if (color) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {
clr = {
color: Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b()),
effectValue: color.get_value()
}
} else {
clr = Common.Utils.ThemeColor.getHexColor(color.get_r(), color.get_g(), color.get_b());
}
$('#font-color .color-preview').css('background-color', '#' + (_.isObject(clr) ? clr.color : clr));
}
if (palette) {
palette.select(clr);
}
}
},
onApiBullets: function(data) {
var type = data.get_ListType(),
subtype = data.get_ListSubType();
switch (type) {
case 0:
$('.dataview.bullets li[data-type=' + subtype + ']').addClass('active');
break;
case 1:
$('.dataview.numbers li[data-type=' + subtype + ']').addClass('active');
break;
}
},
onApiParagraphAlign: function(align) {
$('#font-right').toggleClass('active', align===0);
$('#font-left').toggleClass('active', align===1);
$('#font-center').toggleClass('active', align===2);
$('#font-just').toggleClass('active', align===3);
},
onApiVerticalTextAlign: function(align) {
$('#font-top').toggleClass('active', align===Asc.c_oAscVAlign.Top);
$('#font-middle').toggleClass('active', align===Asc.c_oAscVAlign.Center);
$('#font-bottom').toggleClass('active', align===Asc.c_oAscVAlign.Bottom);
},
onApiLineSpacing: function(vc) {
var line = (vc.get_Line() === null || vc.get_LineRule() === null || vc.get_LineRule() != 1) ? -1 : vc.get_Line();
$('#page-text-linespacing input').val([line]);
},
onApiCanIncreaseIndent: function(value) {
$('#font-moveright').toggleClass('disabled', !value);
},
onApiCanDecreaseIndent: function(value) {
$('#font-moveleft').toggleClass('disabled', !value);
},
// Helpers
_toggleButton: function (e) {
return $(e.currentTarget).toggleClass('active').hasClass('active');
},
textFonts: 'Fonts',
textAuto: 'Auto',
textPt: 'pt'
}
})(), PE.Controllers.EditText || {}))
});

View file

@ -1,71 +0,0 @@
<!-- Root view -->
<div id="addimage-root-view">
<div class="list-block">
<ul>
<li>
<a id="add-image-file" class="item-link no-indicator no-fastclick">
<div class="item-content">
<div class="item-media">
<i class="icon icon-image-library"></i>
</div>
<div class="item-inner">
<div class="item-title"><%= scope.textFromLibrary %></div>
</div>
</div>
</a>
</li>
<li>
<a id="add-image-url" class="item-link">
<div class="item-content">
<div class="item-media">
<i class="icon icon-link"></i>
</div>
<div class="item-inner">
<div class="item-title"><%= scope.textFromURL %></div>
</div>
</div>
</a>
</li>
</ul>
</div>
</div>
<!-- Url view -->
<div id="addimage-url-view">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textLinkSettings %></div>
</div>
</div>
<div class="page" id="addimage-url">
<div class="page-content">
<% if (!android) { %><div class="content-block-title"><%= scope.textAddress %></div><% } %>
<div class="list-block">
<ul>
<li>
<div id="addimage-link-url" class="item-content">
<div class="item-inner">
<% if (android) { %><div class="item-title label"><%= scope.textAddress %></div><% } %>
<div class="item-input">
<input type="url" placeholder="<%= scope.textImageURL %>">
</div>
</div>
</div>
</li>
</ul>
</div>
<div class="list-block disabled" id="addimage-insert">
<% if (android) { %>
<a href="#" class="button button-fill button-raised" style="margin: 20px 16px;"><%= scope.textInsertImage %></a>
<% } else { %>
<ul>
<li>
<a href="#" class="list-button item-link"><%= scope.textInsertImage %></a>
</li>
</ul>
<% } %>
</div>
</div>
</div>
</div>

View file

@ -1,260 +0,0 @@
<!-- Root view -->
<div id="addother-root-view">
<div class="list-block">
<ul>
<li id='item-comment'>
<a id="add-other-table" class="item-link">
<div class="item-content">
<div class="item-media">
<i class="icon icon-add-table"></i>
</div>
<div class="item-inner">
<div class="item-title"><%= scope.textTable %></div>
</div>
</div>
</a>
</li>
<li id='item-comment'>
<a id="add-other-comment" class="item-link">
<div class="item-content">
<div class="item-media">
<i class="icon icon-insert-comment"></i>
</div>
<div class="item-inner">
<div class="item-title"><%= scope.textComment %></div>
</div>
</div>
</a>
</li>
<li id='item-link'>
<a id="add-other-link" class="item-link">
<div class="item-content">
<div class="item-media">
<i class="icon icon-link"></i>
</div>
<div class="item-inner">
<div class="item-title"><%= scope.textLink %></div>
</div>
</div>
</a>
</li>
</ul>
</div>
</div>
<!-- Page Insert Comment view -->
<div id="addother-insert-comment">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back-from-add-comment link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textAddComment %></div>
<div class="right sliding"><a id="done-comment"><% if (android) { %><i class="icon icon-done-comment-white"></i><% } else { %><%= scope.textDone %><% } %></a></div>
</div>
</div>
<div class="page page-add-comment" data-page="addother-insert-comment">
<div class="page-content">
<div id="comment-info" class="wrap-comment">
</div>
</div>
</div>
</div>
<!-- Page insert table view -->
<div id="addother-insert-table">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textTable %></div>
</div>
</div>
<div class="page" data-page="addother-insert-table">
<div class="page-content dataview table-styles">
<ul class="row">
</ul>
</div>
</div>
</div>
<!-- Page insert link view -->
<div id="addother-insert-link">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textLink %></div>
</div>
</div>
<div class="page" data-page="addother-insert-link">
<div class="page-content list-block">
<div class="list-block">
<ul>
<li>
<div id="add-link-type" class="item-content item-link">
<div class="item-inner">
<div class="item-title label"><%= scope.textLinkType %></div>
<div class="item-after"><%= scope.textExternalLink %></div>
</div>
</div>
</li>
<li>
<div id="add-link-url" class="item-content">
<div class="item-inner">
<div class="item-title label"><%= scope.textLink %></div>
<div class="item-input">
<input type="url" placeholder="<%= scope.textLink %>">
</div>
</div>
</div>
</li>
<li>
<div id="add-link-number" class="item-content item-link">
<div class="item-inner">
<div class="item-title label"><%= scope.textLinkSlide %></div>
<div class="item-after"><%= scope.textNext %></div>
</div>
</div>
</li>
<li>
<div id="add-link-display" class="item-content">
<div class="item-inner">
<div class="item-title label"><%= scope.textDisplay %></div>
<div class="item-input">
<input type="text" placeholder="<%= scope.textDisplay %>">
</div>
</div>
</div>
</li>
<li>
<div id="add-link-tip" class="item-content">
<div class="item-inner">
<div class="item-title label"><%= scope.textTip %></div>
<div class="item-input">
<input type="text" placeholder="<%= scope.textTip %>">
</div>
</div>
</div>
</li>
</ul>
</div>
<div class="list-block disabled" id="add-link-insert">
<% if (android) { %>
<a href="#" class="button button-fill button-raised" style="margin: 20px 16px;"><%= scope.textInsert %></a>
<% } else { %>
<ul>
<li>
<a href="#" class="list-button item-link"><%= scope.textInsert %></a>
</li>
</ul>
<% } %>
</div>
</div>
</div>
</div>
<!-- Link Type view -->
<div id="addlink-type">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textLinkType %></div>
</div>
</div>
<div class="page" id="page-addlink-type" data-page="addlink-type">
<div class="page-content">
<div class="list-block">
<ul>
<li>
<label class="label-radio item-content">
<input type="radio" name="addlink-type" value="1">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textExternalLink %></div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="addlink-type" value="0">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textInternalLink %></div>
</div>
</label>
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- Slide Number view -->
<div id="addlink-slidenumber">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textLinkSlide %></div>
</div>
</div>
<div class="page" id="page-addlink-slidenumber" data-page="addlink-slidenumber">
<div class="page-content">
<div class="list-block">
<ul>
<li>
<label class="label-radio item-content">
<input type="radio" name="addlink-slide" value="0">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textNext %></div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="addlink-slide" value="1">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textPrev %></div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="addlink-slide" value="2">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textFirst %></div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="addlink-slide" value="3">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textLast %></div>
</div>
</label>
</li>
<li id="addlink-slide-number">
<label class="label-radio item-content">
<input type="radio" name="addlink-slide" value="4">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textNumber %></div>
<div class="item-after splitter">
<% if (!android) { %><label></label><% } %>
<p class="buttons-row">
<span class="button decrement no-ripple"><% if (android) { %><i class="icon icon-expand-down"></i><% } else { %>-<% } %></span>
<% if (android) { %><label></label><% } %>
<span class="button increment no-ripple"><% if (android) { %><i class="icon icon-expand-up"></i><% } else { %>+<% } %></span>
</p>
</div>
</div>
</label>
</li>
</ul>
</div>
</div>
</div>
</div>

View file

@ -1,14 +0,0 @@
<!-- Root view -->
<div id="add-shapes-root">
<div class="page-content dataview shapes">
<% _.each(shapes, function(row) { %>
<ul class="row">
<% _.each(row, function(shape) { %>
<li data-type="<%= shape.type %>">
<div class="thumb" style="-webkit-mask-image:url('../mobile/resources/img/shapes/<%= shape.thumb %>')"></div>
</li>
<% }); %>
</ul>
<% }); %>
</div>
</div>

View file

@ -1,5 +0,0 @@
<!-- Root view -->
<div id="add-slide-root">
<div class="page-content dataview slide-layout" style="width: 100%;">
</div>
</div>

View file

@ -1,318 +0,0 @@
<!-- Root view -->
<div id="edit-chart-root">
<div class="list-block">
<ul>
<li>
<a id="chart-style" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textStyle %></div>
</div>
</div>
</a>
</li>
<li>
<a id="chart-reorder" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textReorder %></div>
</div>
</div>
</a>
</li>
<li>
<a id="chart-align" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textAlign %></div>
</div>
</div>
</a>
</li>
</ul>
</div>
<div class="list-block">
<% if (!android) { %>
<ul>
<li>
<a id="chart-remove" class="item-link list-button" style="text-align: center; color: #f00"><%= scope.textRemoveChart %></a>
</li>
</ul>
<% } else { %>
<a id="chart-remove" class="button button-raised button-fill" style="margin: 20px 16px; background-color: #f44336;"><%= scope.textRemoveChart %></a>
<% } %>
</div>
</div>
<!-- Reorder view -->
<div id="edit-chart-reorder">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textReorder %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page chart-reorder">
<div class="page-content">
<div class="list-block">
<ul>
<li>
<a data-type="all-up" class="item-link no-indicator">
<div class="item-content">
<div class="item-media"><i class="icon icon-move-foreground"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textToForeground %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="all-down" class="item-link no-indicator">
<div class="item-content">
<div class="item-media"><i class="icon icon-move-background"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textToBackground %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="move-up" class="item-link no-indicator">
<div class="item-content">
<div class="item-media"><i class="icon icon-move-forward"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textForward %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="move-down" class="item-link no-indicator">
<div data-type="move-down" class="item-content">
<div class="item-media"><i class="icon icon-move-backward"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textBackward %></div>
</div>
</div>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- Styles view -->
<div id="edit-chart-style">
<div class="navbar">
<div class="navbar-inner edit-chart-style" data-page="edit-chart-style">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding categories">
<% if (android) { %>
<div class="toolbar tabbar">
<div data-page="index" class="toolbar-inner">
<a href="#tab-chart-type" data-type="type" class="tab-link active"><%= scope.textType %></a>
<a href="#tab-chart-style" data-type="style" class="tab-link"><%= scope.textStyle %></a>
<a href="#tab-chart-fill" data-type="fill" class="tab-link"><%= scope.textFill %></a>
<a href="#tab-chart-border" data-type="border" class="tab-link"><%= scope.textBorder %></a>
</div>
</div>
<% } else { %>
<div class="buttons-row">
<a href="#tab-chart-type" data-type="type" class="tab-link button active"><%= scope.textType %></a>
<a href="#tab-chart-style" data-type="style" class="tab-link button"><%= scope.textStyle %></a>
<a href="#tab-chart-fill" data-type="fill" class="tab-link button"><%= scope.textFill %></a>
<a href="#tab-chart-border" data-type="border" class="tab-link button"><%= scope.textBorder %></a>
</div>
<% } %>
</div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page" data-page="edit-chart-style">
<div class="page-content tabs" style="padding-top: 0;">
<div id="tab-chart-type" class="page-content tab active dataview chart-types">
<% _.each(types, function(row) { %>
<ul class="row">
<% _.each(row, function(type) { %>
<li data-type="<%= type.type %>">
<div class="thumb" style="background-image:url('../mobile/resources/img/charts/<%= type.thumb %>')"></div>
</li>
<% }); %>
</ul>
<% }); %>
</div>
<div id="tab-chart-style" class="page-content tab dataview chart-styles" style="width: 100%;">
<!--Styles-->
</div>
<div id="tab-chart-fill" class="page-content tab">
<!--Fill colors-->
</div>
<div id="tab-chart-border" class="page-content tab">
<div class="list-block">
<ul>
<li id="edit-chart-bordersize">
<div style="padding: 15px 0 0 15px;"><%= scope.textSize %></div>
<div class="item-content">
<div class="item-inner">
<div class="item-input">
<div class="range-slider">
<input type="range" min="0" max="7" value="0" step="1">
</div>
</div>
<div class="item-after value">0 pt</div>
</div>
</div>
</li>
<li>
<a id="edit-chart-bordercolor" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textColor %></div>
<div class="item-after"><div class="color-preview"></div></div>
</div>
</div>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<!-- Border color view -->
<div id="edit-chart-border-color-view">
<div class="navbar">
<div class="navbar-inner" data-page="edit-chart-border-color">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textColor %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page" data-page="edit-chart-border-color">
<div class="page-content">
<!--Color palette-->
</div>
</div>
</div>
<!-- Align view -->
<div id="edit-chart-align">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textAlign %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page chart-align">
<div class="page-content">
<div class="list-block">
<ul>
<li>
<a data-type="align-left" class="item-link no-indicator">
<div class="item-content">
<div class="item-media"><i class="icon icon-align-left"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textAlignLeft %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="align-center" class="item-link no-indicator">
<div class="item-content">
<div class="item-media"><i class="icon icon-align-center"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textAlignCenter %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="align-right" class="item-link no-indicator">
<div class="item-content">
<div class="item-media"><i class="icon icon-align-right"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textAlignRight %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="align-top" class="item-link no-indicator">
<div data-type="move-down" class="item-content">
<div class="item-media"><i class="icon icon-align-top"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textAlignTop %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="align-middle" class="item-link no-indicator">
<div data-type="move-down" class="item-content">
<div class="item-media"><i class="icon icon-align-middle"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textAlignMiddle %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="align-bottom" class="item-link no-indicator">
<div data-type="move-down" class="item-content">
<div class="item-media"><i class="icon icon-align-bottom"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textAlignBottom %></div>
</div>
</div>
</a>
</li>
</ul>
</div>
<div class="list-block">
<ul>
<li>
<a data-type="distrib-hor" class="item-link no-indicator">
<div data-type="move-down" class="item-content">
<div class="item-media"><i class="icon icon-align-horizontal"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.txtDistribHor %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="distrib-vert" class="item-link no-indicator">
<div data-type="move-down" class="item-content">
<div class="item-media"><i class="icon icon-align-vertical"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.txtDistribVert %></div>
</div>
</div>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- Custom color view -->
<div id="edit-chart-custom-color-view">
<div class="navbar">
<div class="navbar-inner" data-page="edit-chart-custom-color">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textCustomColor %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page" data-page="edit-chart-custom-color">
<div class="page-content">
<!--Color HSB palette-->
</div>
</div>
</div>

View file

@ -1,296 +0,0 @@
<!-- Root view -->
<div id="edit-image-root">
<div class="list-block">
<ul>
<li>
<a id="image-replace" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textReplace %></div>
</div>
</div>
</a>
</li>
<li>
<a id="image-reorder" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textReorder %></div>
</div>
</div>
</a>
</li>
<li>
<a id="image-align" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textAlign %></div>
</div>
</div>
</a>
</li>
</ul>
</div>
<div class="list-block">
<ul>
<li>
<% if (android) { %>
<a id="image-default" class="button button-raised button-fill" style="margin: 20px 16px;"><%= scope.textDefault %></a>
<% } else { %>
<a id="image-default" class="item-link list-button" style="text-align: center;"><%= scope.textDefault %></a>
<% } %>
</li>
<li>
<% if (android) { %>
<a id="image-remove" class="button button-raised button-fill" style="margin: 20px 16px; background-color: #f44336;"><%= scope.textRemove %></a>
<% } else { %>
<a id="image-remove" class="item-link list-button" style="text-align: center; color: #f00"><%= scope.textRemove %></a>
<% } %>
</li>
</ul>
</div>
</div>
<!-- Reorder view -->
<div id="edit-image-reorder-view">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textReorder %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page image-reorder">
<div class="page-content">
<div class="list-block">
<ul>
<li>
<a data-type="all-up" class="item-link no-indicator">
<div class="item-content">
<div class="item-media"><i class="icon icon-move-foreground"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textToForeground %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="all-down" class="item-link no-indicator">
<div class="item-content">
<div class="item-media"><i class="icon icon-move-background"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textToBackground %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="move-up" class="item-link no-indicator">
<div class="item-content">
<div class="item-media"><i class="icon icon-move-forward"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textForward %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="move-down" class="item-link no-indicator">
<div data-type="move-down" class="item-content">
<div class="item-media"><i class="icon icon-move-backward"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textBackward %></div>
</div>
</div>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- Replace view -->
<div id="edit-image-replace-view">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textReplace %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page">
<div class="page-content">
<div class="list-block">
<ul>
<li>
<a id="edit-image-file" class="item-link no-indicator no-fastclick">
<div class="item-content">
<div class="item-media">
<i class="icon icon-image-library"></i>
</div>
<div class="item-inner">
<div class="item-title"><%= scope.textFromLibrary %></div>
</div>
</div>
</a>
</li>
<li>
<a id="edit-image-url" class="item-link">
<div class="item-content">
<div class="item-media">
<i class="icon icon-link"></i>
</div>
<div class="item-inner">
<div class="item-title"><%= scope.textFromURL %></div>
</div>
</div>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- Url view -->
<div id="edit-image-url-view">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textLinkSettings %></div>
</div>
</div>
<div class="page edit-image-url-link">
<div class="page-content">
<div class="content-block-title"><%= scope.textAddress %></div>
<div class="list-block">
<ul>
<li>
<div class="item-content">
<div class="item-inner">
<div class="item-input">
<input type="url" placeholder="<%= scope.textImageURL %>">
</div>
</div>
</div>
</li>
</ul>
</div>
<div class="list-block disabled buttons">
<% if (android) { %>
<a href="#" class="button button-fill button-raised" style="margin: 20px 16px;"><%= scope.textReplaceImg %></a>
<% } else { %>
<ul>
<li>
<a href="#" class="list-button item-link"><%= scope.textReplaceImg %></a>
</li>
</ul>
<% } %>
</div>
</div>
</div>
</div>
<!-- Align view -->
<div id="edit-image-align">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textAlign %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page image-align">
<div class="page-content">
<div class="list-block">
<ul>
<li>
<a data-type="align-left" class="item-link no-indicator">
<div class="item-content">
<div class="item-media"><i class="icon icon-align-left"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textAlignLeft %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="align-center" class="item-link no-indicator">
<div class="item-content">
<div class="item-media"><i class="icon icon-align-center"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textAlignCenter %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="align-right" class="item-link no-indicator">
<div class="item-content">
<div class="item-media"><i class="icon icon-align-right"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textAlignRight %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="align-top" class="item-link no-indicator">
<div data-type="move-down" class="item-content">
<div class="item-media"><i class="icon icon-align-top"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textAlignTop %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="align-middle" class="item-link no-indicator">
<div data-type="move-down" class="item-content">
<div class="item-media"><i class="icon icon-align-middle"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textAlignMiddle %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="align-bottom" class="item-link no-indicator">
<div data-type="move-down" class="item-content">
<div class="item-media"><i class="icon icon-align-bottom"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textAlignBottom %></div>
</div>
</div>
</a>
</li>
</ul>
</div>
<div class="list-block">
<ul>
<li>
<a data-type="distrib-hor" class="item-link no-indicator">
<div data-type="move-down" class="item-content">
<div class="item-media"><i class="icon icon-align-horizontal"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.txtDistribHor %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="distrib-vert" class="item-link no-indicator">
<div data-type="move-down" class="item-content">
<div class="item-media"><i class="icon icon-align-vertical"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.txtDistribVert %></div>
</div>
</div>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>

View file

@ -1,175 +0,0 @@
<!-- Root view -->
<div id="edit-link-root">
<div class="list-block">
<ul>
<li>
<div id="edit-link-type" class="item-content item-link">
<div class="item-inner">
<div class="item-title"><%= scope.textLinkType %></div>
<div class="item-after"><%= scope.textExternalLink %></div>
</div>
</div>
</li>
<li>
<div id="edit-link-url" class="item-content">
<div class="item-inner">
<div class="item-title label"><%= scope.textLink %></div>
<div class="item-input">
<input type="url" placeholder="<%= scope.textLink %>">
</div>
</div>
</div>
</li>
<li>
<div id="edit-link-number" class="item-content item-link">
<div class="item-inner">
<div class="item-title label"><%= scope.textLinkSlide %></div>
<div class="item-after"><%= scope.textNext %></div>
</div>
</div>
</li>
<li>
<div id="edit-link-display" class="item-content">
<div class="item-inner">
<div class="item-title label"><%= scope.textDisplay %></div>
<div class="item-input">
<input type="text" placeholder="<%= scope.textDisplay %>">
</div>
</div>
</div>
</li>
<li>
<div id="edit-link-tip" class="item-content">
<div class="item-inner">
<div class="item-title label"><%= scope.textTip %></div>
<div class="item-input">
<input type="text" placeholder="<%= scope.textTip %>">
</div>
</div>
</div>
</li>
</ul>
</div>
<div class="list-block">
<% if (android) { %>
<a href="#" id="edit-link-edit" class="button button-raised button-fill disabled" style="margin: 20px 16px;"><%= scope.textEdit %></a>
<a href="#" id="edit-link-remove" class="button button-raised button-fill" style="margin: 20px 16px; background-color: #f44336;"><%= scope.textRemove %></a>
<% } else { %>
<ul>
<li>
<a href="#" id="edit-link-edit" class="list-button item-link disabled" style="text-align: center;"><%= scope.textEdit %></a>
</li>
<li>
<a href="#" id="edit-link-remove" class="list-button item-link" style="text-align: center; color: #f00"><%= scope.textRemove %></a>
</li>
</ul>
<% } %>
</div>
</div>
<!-- Link Type view -->
<div id="editlink-type">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textLinkType %></div>
</div>
</div>
<div class="page" id="page-editlink-type" data-page="editlink-type">
<div class="page-content">
<div class="list-block">
<ul>
<li>
<label class="label-radio item-content">
<input type="radio" name="editlink-type" value="1">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textExternalLink %></div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="editlink-type" value="0">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textInternalLink %></div>
</div>
</label>
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- Slide Number view -->
<div id="editlink-slidenumber">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textLinkSlide %></div>
</div>
</div>
<div class="page" id="page-editlink-slidenumber" data-page="editlink-slidenumber">
<div class="page-content">
<div class="list-block">
<ul>
<li>
<label class="label-radio item-content">
<input type="radio" name="editlink-slide" value="0">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textNext %></div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="editlink-slide" value="1">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textPrev %></div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="editlink-slide" value="2">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textFirst %></div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="editlink-slide" value="3">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textLast %></div>
</div>
</label>
</li>
<li id="editlink-slide-number">
<label class="label-radio item-content">
<input type="radio" name="editlink-slide" value="4">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textNumber %></div>
<div class="item-after splitter">
<% if (!android) { %><label></label><% } %>
<p class="buttons-row">
<span class="button decrement no-ripple"><% if (android) { %><i class="icon icon-expand-down"></i><% } else { %>-<% } %></span>
<% if (android) { %><label></label><% } %>
<span class="button increment no-ripple"><% if (android) { %><i class="icon icon-expand-up"></i><% } else { %>+<% } %></span>
</p>
</div>
</div>
</label>
</li>
</ul>
</div>
</div>
</div>
</div>

View file

@ -1,395 +0,0 @@
<!-- Root view -->
<div id="edit-shape-root">
<div class="list-block">
<ul>
<li>
<a id="shape-style" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textStyle %></div>
</div>
</div>
</a>
</li>
<li>
<a id="shape-replace" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textReplace %></div>
</div>
</div>
</a>
</li>
<li>
<a id="shape-reorder" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textReorder %></div>
</div>
</div>
</a>
</li>
<li>
<a id="shape-align" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textAlign %></div>
</div>
</div>
</a>
</li>
</ul>
</div>
<div class="list-block">
<ul>
<li>
<% if (android) { %>
<a id="shape-remove" class="button button-raised button-fill" style="margin: 20px 16px; background-color: #f44336;"><%= scope.textRemoveShape %></a>
<% } else { %>
<a id="shape-remove" class="item-link list-button" style="text-align: center; color: #f00"><%= scope.textRemoveShape %></a>
<% } %>
</li>
</ul>
</div>
</div>
<!-- Reorder view -->
<div id="edit-shape-reorder">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textReorder %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page shape-reorder">
<div class="page-content">
<div class="list-block">
<ul>
<li>
<a data-type="all-up" class="item-link no-indicator">
<div class="item-content">
<div class="item-media"><i class="icon icon-move-foreground"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textToForeground %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="all-down" class="item-link no-indicator">
<div class="item-content">
<div class="item-media"><i class="icon icon-move-background"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textToBackground %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="move-up" class="item-link no-indicator">
<div class="item-content">
<div class="item-media"><i class="icon icon-move-forward"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textForward %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="move-down" class="item-link no-indicator">
<div data-type="move-down" class="item-content">
<div class="item-media"><i class="icon icon-move-backward"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textBackward %></div>
</div>
</div>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- Replace view -->
<div id="edit-shape-replace">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textReplace %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page shape-replace">
<div class="page-content dataview shapes">
<% _.each(shapes, function(row) { %>
<ul class="row">
<% _.each(row, function(shape) { %>
<li data-type="<%= shape.type %>">
<div class="thumb" style="-webkit-mask-image:url('../mobile/resources/img/shapes/<%= shape.thumb %>')"></div>
</li>
<% }); %>
</ul>
<% }); %>
</div>
</div>
</div>
<!-- Styles view -->
<div id="edit-shape-style">
<div class="navbar">
<div class="navbar-inner edit-shape-style" data-page="edit-shape-style">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding categories">
<% if (android) { %>
<div class="toolbar tabbar">
<div data-page="index" class="toolbar-inner">
<a href="#tab-shape-fill" data-type="fill" class="tab-link active"><%= scope.textFill %></a>
<a href="#tab-shape-border" data-type="border" class="tab-link"><%= scope.textBorder %></a>
<a href="#tab-shape-effects" data-type="effects" class="tab-link"><%= scope.textEffects %></a>
</div>
</div>
<% } else { %>
<div class="buttons-row">
<a href="#tab-shape-fill" data-type="fill" class="tab-link button active"><%= scope.textFill %></a>
<a href="#tab-shape-border" data-type="border" class="tab-link button"><%= scope.textBorder %></a>
<a href="#tab-shape-effects" data-type="effects" class="tab-link button"><%= scope.textEffects %></a>
</div>
<% } %>
</div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page" data-page="edit-shape-style">
<div class="page-content tabs" style="padding-top: 0;">
<div id="tab-shape-fill" class="page-content tab active">
<!--Fill colors-->
</div>
<div id="tab-shape-border" class="page-content tab">
<div class="list-block">
<ul>
<li id="edit-shape-bordersize">
<div style="padding: 15px 0 0 15px;"><%= scope.textSize %></div>
<div class="item-content">
<div class="item-inner">
<div class="item-input">
<div class="range-slider">
<input type="range" min="0" max="7" value="0" step="1">
</div>
</div>
<div class="item-after value">0 pt</div>
</div>
</div>
</li>
<li>
<a id="edit-shape-bordercolor" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textColor %></div>
<div class="item-after"><div class="color-preview"></div></div>
</div>
</div>
</a>
</li>
</ul>
</div>
</div>
<div id="tab-shape-effects" class="page-content tab">
<div class="list-block">
<ul>
<li id="edit-shape-effect">
<div style="padding: 15px 0 0 15px;"><%= scope.textOpacity %></div>
<div class="item-content">
<div class="item-inner">
<div class="item-input">
<div class="range-slider">
<input type="range" min="0" max="100" value="0" step="1">
</div>
</div>
<div class="item-after value">0 %</div>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div id="edit-shape-style-nofill">
<div class="navbar">
<div class="navbar-inner edit-shape-style" data-page="edit-shape-style">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textBorder %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page" data-page="edit-shape-style">
<div class="page-content">
<div class="list-block">
<ul>
<li id="edit-shape-bordersize">
<div style="padding: 15px 0 0 15px;"><%= scope.textSize %></div>
<div class="item-content">
<div class="item-inner">
<div class="item-input">
<div class="range-slider">
<input type="range" min="0" max="7" value="0" step="1">
</div>
</div>
<div class="item-after value">0 pt</div>
</div>
</div>
</li>
<li>
<a id="edit-shape-bordercolor" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textColor %></div>
<div class="item-after"><div class="color-preview"></div></div>
</div>
</div>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- Border color view -->
<div id="edit-shape-border-color-view">
<div class="navbar">
<div class="navbar-inner" data-page="edit-shape-border-color">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textColor %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page" data-page="edit-shape-border-color">
<div class="page-content">
<!--Color palette-->
</div>
</div>
</div>
<!-- Align view -->
<div id="edit-shape-align">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textAlign %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page shape-align">
<div class="page-content">
<div class="list-block">
<ul>
<li>
<a data-type="align-left" class="item-link no-indicator">
<div class="item-content">
<div class="item-media"><i class="icon icon-align-left"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textAlignLeft %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="align-center" class="item-link no-indicator">
<div class="item-content">
<div class="item-media"><i class="icon icon-align-center"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textAlignCenter %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="align-right" class="item-link no-indicator">
<div class="item-content">
<div class="item-media"><i class="icon icon-align-right"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textAlignRight %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="align-top" class="item-link no-indicator">
<div data-type="move-down" class="item-content">
<div class="item-media"><i class="icon icon-align-top"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textAlignTop %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="align-middle" class="item-link no-indicator">
<div data-type="move-down" class="item-content">
<div class="item-media"><i class="icon icon-align-middle"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textAlignMiddle %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="align-bottom" class="item-link no-indicator">
<div data-type="move-down" class="item-content">
<div class="item-media"><i class="icon icon-align-bottom"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textAlignBottom %></div>
</div>
</div>
</a>
</li>
</ul>
</div>
<div class="list-block">
<ul>
<li>
<a data-type="distrib-hor" class="item-link no-indicator">
<div data-type="move-down" class="item-content">
<div class="item-media"><i class="icon icon-align-horizontal"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.txtDistribHor %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="distrib-vert" class="item-link no-indicator">
<div data-type="move-down" class="item-content">
<div class="item-media"><i class="icon icon-align-vertical"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.txtDistribVert %></div>
</div>
</div>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- Custom color view -->
<div id="edit-shape-custom-color-view">
<div class="navbar">
<div class="navbar-inner" data-page="edit-shape-custom-color">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textCustomColor %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page" data-page="edit-shape-custom-color">
<div class="page-content">
<!--Color HSB palette-->
</div>
</div>
</div>

View file

@ -1,339 +0,0 @@
<!-- Root view -->
<div id="edit-slide-root">
<div class="list-block">
<ul>
<li>
<a id="slide-theme" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textTheme %></div>
</div>
</div>
</a>
</li>
<li>
<a id="slide-change-layout" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textLayout %></div>
</div>
</div>
</a>
</li>
<li>
<a id="slide-transition" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textTransition %></div>
</div>
</div>
</a>
</li>
<li>
<a id="slide-style" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textStyle %></div>
</div>
</div>
</a>
</li>
</ul>
</div>
<div class="list-block">
<ul>
<li>
<% if (android) { %>
<a id="slide-duplicate" class="button button-raised button-fill" style="margin: 20px 16px;"><%= scope.textDuplicateSlide %></a>
<% } else { %>
<a id="slide-duplicate" class="item-link list-button" style="text-align: center;"><%= scope.textDuplicateSlide %></a>
<% } %>
</li>
<li>
<% if (android) { %>
<a id="slide-remove" class="button button-raised button-fill" style="margin: 20px 16px; background-color: #f44336;"><%= scope.textRemoveSlide %></a>
<% } else { %>
<a id="slide-remove" class="item-link list-button" style="text-align: center; color: #f00"><%= scope.textRemoveSlide %></a>
<% } %>
</li>
</ul>
</div>
</div>
<!-- Transition view -->
<div id="edit-slide-transition">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textTransition %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page" data-page="edit-slide-transition">
<div class="page-content">
<div class="list-block">
<ul>
<li>
<div id="edit-slide-effect" class="item-content item-link">
<div class="item-inner">
<div class="item-title label"><%= scope.textEffect %></div>
<div class="item-after"><%= scope.textNone %></div>
</div>
</div>
</li>
<li>
<div id="edit-slide-effect-type" class="item-content item-link">
<div class="item-inner">
<div class="item-title label"><%= scope.textType %></div>
<div class="item-after"></div>
</div>
</div>
</li>
<li id="edit-slide-duration">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textDuration %></div>
<div class="item-after splitter">
<% if (!android) { %><label></label><% } %>
<p class="buttons-row">
<span class="button decrement no-ripple"><% if (android) { %><i class="icon icon-expand-down"></i><% } else { %>-<% } %></span>
<% if (android) { %><label></label><% } %>
<span class="button increment no-ripple"><% if (android) { %><i class="icon icon-expand-up"></i><% } else { %>+<% } %></span>
</p>
</div>
</div>
</div>
</li>
</ul>
</div>
<div class="list-block">
<ul>
<li id="edit-slide-start-click">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textStartOnClick %></div>
<div class="item-after">
<label class="label-switch">
<input type="checkbox" name="slide-start-click">
<div class="checkbox"></div>
</label>
</div>
</div>
</div>
</li>
<li id="edit-slide-delay">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textDelay %></div>
<div class="item-after">
<label class="label-switch">
<input type="checkbox" name="slide-delay-click">
<div class="checkbox"></div>
</label>
</div>
</div>
</div>
<div class="item-content">
<div class="item-inner">
<div class="item-input">
<div class="range-slider">
<input type="range" min="0" max="300" value="0" step="1">
</div>
</div>
<div class="item-after value"></div>
</div>
</div>
</li>
</ul>
</div>
<div class="list-block">
<ul>
<li>
<% if (android) { %>
<a id="slide-apply-all" class="button button-raised button-fill" style="margin: 20px 16px;"><%= scope.textApplyAll %></a>
<% } else { %>
<a id="slide-apply-all" class="item-link list-button" style="text-align: center;"><%= scope.textApplyAll %></a>
<% } %>
</li>
</ul>
</div>
</div>
</div>
</div>
<div id="editslide-effect">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textEffect %></div>
</div>
</div>
<div class="page" id="page-editslide-effect" data-page="editslide-effect">
<div class="page-content">
<div class="list-block">
<ul>
<li>
<label class="label-radio item-content">
<input type="radio" name="editslide-effect" value="0">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textNone %></div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="editslide-effect" value="1">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textFade %></div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="editslide-effect" value="2">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textPush %></div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="editslide-effect" value="3">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textWipe %></div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="editslide-effect" value="4">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textSplit %></div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="editslide-effect" value="5">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textUnCover %></div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="editslide-effect" value="6">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textCover %></div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="editslide-effect" value="7">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textClock %></div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="editslide-effect" value="8">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textZoom %></div>
</div>
</label>
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- Layout view -->
<div id="editslide-effect-type">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textType %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page" id="page-editslide-effect-type" data-page="editslide-effect-type">
<div class="page-content">
<div class="list-block"><ul>
</ul></div>
</div>
</div>
</div>
<!-- Layout view -->
<div id="edit-slide-layout">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textLayout %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page">
<div class="page-content dataview slide-layout" style="width: 100%;">
</div>
</div>
</div>
<!-- Theme view -->
<div id="edit-slide-theme">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textTheme %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page">
<div class="page-content dataview slide-theme" style="width: 100%;">
</div>
</div>
</div>
<!-- Styles view -->
<div id="edit-slide-style">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textFill %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page" data-page="edit-slide-style">
<div class="page-content">
<!--Fill colors-->
</div>
</div>
</div>
<!-- Custom color view -->
<div id="edit-slide-custom-color-view">
<div class="navbar">
<div class="navbar-inner" data-page="edit-slide-custom-color">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textCustomColor %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page" data-page="edit-slide-custom-color">
<div class="page-content">
<!--Color HSB palette-->
</div>
</div>
</div>

View file

@ -1,489 +0,0 @@
<!-- Root view -->
<div id="edit-table-root">
<div class="list-block">
<ul>
<li id="table-insert">
<div class="item-content buttons">
<div class="item-inner">
<div class="row">
<a id="insert-column-left" class="button no-ripple"><i class="icon icon-table-add-column-left"></i></a>
<a id="insert-column-right" class="button no-ripple"><i class="icon icon-table-add-column-right"></i></a>
<a id="insert-row-above" class="button no-ripple"><i class="icon icon-table-add-row-above"></i></a>
<a id="insert-row-below" class="button no-ripple"><i class="icon icon-table-add-row-below"></i></a>
</div>
</div>
</div>
</li>
<li id="table-remove">
<div class="item-content buttons">
<div class="item-inner">
<div class="row">
<a id="remove-column" class="button no-ripple"><i class="icon icon-table-remove-column"></i></a>
<a id="remove-row" class="button no-ripple"><i class="icon icon-table-remove-row"></i></a>
</div>
</div>
</div>
</li>
<li>
<% if (!android) { %>
<a id="table-remove-all" class="item-link list-button" style="text-align: center; color: #f00"><%= scope.textRemoveTable %></a>
<% } %>
</li>
</ul>
<% if (android) { %>
<a id="table-remove-all" class="button button-raised button-fill" style="margin: 20px 16px; background-color: #f44336;"><%= scope.textRemoveTable %></a>
<% } %>
</div>
<div class="list-block">
<ul>
<li>
<a id="table-style" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textStyle %></div>
</div>
</div>
</a>
</li>
<li>
<a id="table-reorder" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textReorder %></div>
</div>
</div>
</a>
</li>
<li>
<a id="table-align" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textAlign %></div>
</div>
</div>
</a>
</li>
</ul>
</div>
<div class="content-block-title"><%= scope.textCellMargins %></div>
<div class="list-block" style="margin-bottom: 40px;">
<ul>
<li id="table-options-margins">
<div class="item-content">
<div class="item-inner">
<div class="item-input">
<div class="range-slider">
<input type="range" min="0" max="150" value="0" step="1">
</div>
</div>
<div class="item-after value">0 pt</div>
</div>
</div>
</li>
</ul>
</div>
</div>
<!-- Styles view -->
<div id="edit-table-style">
<div class="navbar">
<div class="navbar-inner edit-table-style" data-page="edit-table-style">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding categories">
<% if (android) { %>
<div class="toolbar tabbar">
<div data-page="index" class="toolbar-inner">
<a href="#tab-table-style" data-type="style" class="tab-link active"><%= scope.textStyle %></a>
<a href="#tab-table-fill" data-type="fill" class="tab-link"><%= scope.textFill %></a>
<a href="#tab-table-border" data-type="border" class="tab-link"><%= scope.textBorder %></a>
</div>
</div>
<% } else { %>
<div class="buttons-row">
<a href="#tab-table-style" data-type="style" class="tab-link button active"><%= scope.textStyle %></a>
<a href="#tab-table-fill" data-type="fill" class="tab-link button"><%= scope.textFill %></a>
<a href="#tab-table-border" data-type="border" class="tab-link button"><%= scope.textBorder %></a>
</div>
<% } %>
</div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page" data-page="edit-table-style">
<div class="page-content tabs" style="padding-top: 0;">
<div id="tab-table-style" class="page-content tab active">
<div class="list-block">
<ul>
<li id="edit-table-styles">
<div class="item-content">
<div class="item-inner"></div>
</div>
</li>
</ul>
</div>
<div class="list-block" style="margin-bottom: 40px;">
<ul>
<li>
<a id="edit-table-style-options" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textStyleOptions %></div>
</div>
</div>
</a>
</li>
</ul>
</div>
</div>
<div id="tab-table-fill" class="page-content tab">
<!--Fill colors-->
</div>
<div id="tab-table-border" class="page-content tab">
<div class="list-block">
<ul>
<li id="edit-table-bordersize">
<div style="padding: 15px 0 0 15px;"><%= scope.textSize %></div>
<div class="item-content">
<div class="item-inner">
<div class="item-input">
<div class="range-slider">
<input type="range" min="0" max="7" value="0" step="1">
</div>
</div>
<div class="item-after value">0 pt</div>
</div>
</div>
</li>
<li>
<a id="edit-table-bordercolor" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textColor %></div>
<div class="item-after"><div class="color-preview"></div></div>
</div>
</div>
</a>
</li>
<li id="edit-table-bordertypes">
<div class="item-content buttons" style="-webkit-flex-flow: row wrap;justify-content: space-around;">
<div class="item-inner" style="margin: 20px 0;">
<div class="row">
<a class="button no-ripple" style="min-width:0;" data-type="lrtbcm"><i class="icon icon-table-borders-all"></i></a>
<a class="button no-ripple" style="min-width:0;" data-type=""><i class="icon icon-table-borders-none"></i></a>
<a class="button no-ripple" style="min-width:0;" data-type="cm"><i class="icon icon-table-borders-inner"></i></a>
<a class="button no-ripple" style="min-width:0;" data-type="lrtb"><i class="icon icon-table-borders-outer"></i></a>
<a class="button no-ripple" style="min-width:0;" data-type="l"><i class="icon icon-table-borders-left"></i></a>
</div>
</div>
<div class="item-inner" style="margin: 0 0 20px;">
<div class="row">
<a class="button no-ripple" style="min-width:0;" data-type="c"><i class="icon icon-table-borders-center"></i></a>
<a class="button no-ripple" style="min-width:0;" data-type="r"><i class="icon icon-table-borders-right"></i></a>
<a class="button no-ripple" style="min-width:0;" data-type="t"><i class="icon icon-table-borders-top"></i></a>
<a class="button no-ripple" style="min-width:0;" data-type="m"><i class="icon icon-table-borders-middle"></i></a>
<a class="button no-ripple" style="min-width:0;" data-type="b"><i class="icon icon-table-borders-bottom"></i></a>
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<!-- Style options view -->
<div id="edit-table-style-options-view">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textOptions %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page" data-page="edit-table-style-options">
<div class="page-content">
<div class="list-block">
<ul>
<li id="table-options-header-row">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textHeaderRow %></div>
<div class="item-after">
<label class="label-switch">
<input type="checkbox">
<div class="checkbox"></div>
</label>
</div>
</div>
</div>
</li>
<li id="table-options-total-row">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textTotalRow %></div>
<div class="item-after">
<label class="label-switch">
<input type="checkbox">
<div class="checkbox"></div>
</label>
</div>
</div>
</div>
</li>
<li id="table-options-banded-row">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textBandedRow %></div>
<div class="item-after">
<label class="label-switch">
<input type="checkbox">
<div class="checkbox"></div>
</label>
</div>
</div>
</div>
</li>
</ul>
</div>
<div class="list-block">
<ul>
<li id="table-options-first-column">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textFirstColumn %></div>
<div class="item-after">
<label class="label-switch">
<input type="checkbox">
<div class="checkbox"></div>
</label>
</div>
</div>
</div>
</li>
<li id="table-options-last-column">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textLastColumn %></div>
<div class="item-after">
<label class="label-switch">
<input type="checkbox">
<div class="checkbox"></div>
</label>
</div>
</div>
</div>
</li>
<li id="table-options-banded-column">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textBandedColumn %></div>
<div class="item-after">
<label class="label-switch">
<input type="checkbox">
<div class="checkbox"></div>
</label>
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- Style options view -->
<div id="edit-table-border-color-view">
<div class="navbar">
<div class="navbar-inner" data-page="edit-table-border-color">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textColor %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page" data-page="edit-table-border-color">
<div class="page-content">
<!--Color palette-->
</div>
</div>
</div>
<!-- Reorder view -->
<div id="edit-table-reorder">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textReorder %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page table-reorder">
<div class="page-content">
<div class="list-block">
<ul>
<li>
<a data-type="all-up" class="item-link no-indicator">
<div class="item-content">
<div class="item-media"><i class="icon icon-move-foreground"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textToForeground %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="all-down" class="item-link no-indicator">
<div class="item-content">
<div class="item-media"><i class="icon icon-move-background"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textToBackground %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="move-up" class="item-link no-indicator">
<div class="item-content">
<div class="item-media"><i class="icon icon-move-forward"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textForward %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="move-down" class="item-link no-indicator">
<div data-type="move-down" class="item-content">
<div class="item-media"><i class="icon icon-move-backward"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textBackward %></div>
</div>
</div>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- Align view -->
<div id="edit-table-align">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textAlign %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page table-align">
<div class="page-content">
<div class="list-block">
<ul>
<li>
<a data-type="align-left" class="item-link no-indicator">
<div class="item-content">
<div class="item-media"><i class="icon icon-align-left"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textAlignLeft %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="align-center" class="item-link no-indicator">
<div class="item-content">
<div class="item-media"><i class="icon icon-align-center"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textAlignCenter %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="align-right" class="item-link no-indicator">
<div class="item-content">
<div class="item-media"><i class="icon icon-align-right"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textAlignRight %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="align-top" class="item-link no-indicator">
<div data-type="move-down" class="item-content">
<div class="item-media"><i class="icon icon-align-top"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textAlignTop %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="align-middle" class="item-link no-indicator">
<div data-type="move-down" class="item-content">
<div class="item-media"><i class="icon icon-align-middle"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textAlignMiddle %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="align-bottom" class="item-link no-indicator">
<div data-type="move-down" class="item-content">
<div class="item-media"><i class="icon icon-align-bottom"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.textAlignBottom %></div>
</div>
</div>
</a>
</li>
</ul>
</div>
<div class="list-block">
<ul>
<li>
<a data-type="distrib-hor" class="item-link no-indicator">
<div data-type="move-down" class="item-content">
<div class="item-media"><i class="icon icon-align-horizontal"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.txtDistribHor %></div>
</div>
</div>
</a>
</li>
<li>
<a data-type="distrib-vert" class="item-link no-indicator">
<div data-type="move-down" class="item-content">
<div class="item-media"><i class="icon icon-align-vertical"></i></div>
<div class="item-inner">
<div class="item-title"><%= scope.txtDistribVert %></div>
</div>
</div>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- Custom color view -->
<div id="edit-table-custom-color-view">
<div class="navbar">
<div class="navbar-inner" data-page="edit-table-custom-color">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textCustomColor %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page" data-page="edit-table-custom-color">
<div class="page-content">
<!--Color HSB palette-->
</div>
</div>
</div>

View file

@ -1,425 +0,0 @@
<!-- Root view -->
<div id="edit-text-root">
<div class="list-block">
<ul>
<li><a id="font-fonts" class="item-link">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textFonts %></div>
<div class="item-after" style="color: #000;"><span></span><span style="margin-left: 5px;"></span></div>
</div>
</div></a></li>
<li><div class="item-content buttons">
<div class="item-inner">
<div class="row">
<a id="font-bold" class="button"><b><%= scope.textCharacterBold %></b></a>
<a id="font-italic" class="button"><i><%= scope.textCharacterItalic %></i></a>
<a id="font-underline" class="button" style="text-decoration: underline;"><%= scope.textCharacterUnderline %></a>
<a id="font-strikethrough" class="button" style="text-decoration: line-through"><%= scope.textCharacterStrikethrough %></a>
</div>
</div>
</div></li>
<li>
<a id="font-color" class="item-link">
<div class="item-content">
<% if (!android) { %><div class="item-media"><i class="icon icon-text-color"><span class="color-preview"></span></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textFontColor %></div>
<% if (android) { %><div class="item-after"><div class="color-preview"></div></div><% } %>
</div>
</div>
</a>
</li>
<li>
<a id="font-additional" class="item-link">
<div class="item-content">
<% if (!android) { %><div class="item-media"><i class="icon icon-text-additional"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textAdditionalFormat %></div>
</div>
</div>
</a>
</li>
</ul>
</div>
<div class="list-block edit-paragraph">
<ul>
<li><div id="paragraph-align" class="item-content buttons">
<div class="item-inner">
<div class="row">
<a id="font-left" class="button no-ripple"><i class="icon icon-text-align-left"></i></a>
<a id="font-center" class="button no-ripple"><i class="icon icon-text-align-center"></i></a>
<a id="font-right" class="button no-ripple"><i class="icon icon-text-align-right"></i></a>
<a id="font-just" class="button no-ripple"><i class="icon icon-text-align-jast"></i></a>
</div>
</div>
</div></li>
<li><div id="paragraph-valign" class="item-content buttons">
<div class="item-inner">
<div class="row">
<a id="font-top" class="button no-ripple"><i class="icon icon-text-valign-top"></i></a>
<a id="font-middle" class="button no-ripple"><i class="icon icon-text-valign-middle"></i></a>
<a id="font-bottom" class="button no-ripple"><i class="icon icon-text-valign-bottom"></i></a>
</div>
</div>
</div></li>
<li><div class="item-content buttons">
<div class="item-inner">
<div class="row">
<a id="font-moveleft" class="button no-ripple"><i class="icon icon-de-indent"></i></a>
<a id="font-moveright" class="button no-ripple"><i class="icon icon-in-indent"></i></a>
</div>
</div>
</div></li>
<li><a id="font-bullets" class="item-link">
<div class="item-content">
<% if (!android) { %><div class="item-media"><i class="icon icon-bullets"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textBullets %></div>
</div>
</div></a></li>
<li><a id="font-numbers" class="item-link">
<div class="item-content">
<% if (!android) { %><div class="item-media"><i class="icon icon-numbers"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textNumbers %></div>
</div>
</div></a></li>
<li><a id="font-line-spacing" class="item-link">
<div class="item-content">
<% if (!android) { %><div class="item-media"><i class="icon icon-linespacing"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textLineSpacing %></div>
</div>
</div></a></li>
</ul>
</div>
<div class="content-block-title edit-paragraph"><%= scope.textFromText %></div>
<div class="list-block edit-paragraph">
<ul>
<li id="paragraph-distance-before">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textBefore %></div>
<div class="item-after splitter">
<% if (!android) { %><label><%= scope.textAuto %></label><% } %>
<p class="buttons-row">
<span class="button decrement no-ripple"><% if (android) { %><i class="icon icon-expand-down"></i><% } else { %>-<% } %></span>
<% if (android) { %><label><%= scope.textAuto %></label><% } %>
<span class="button increment no-ripple"><% if (android) { %><i class="icon icon-expand-up"></i><% } else { %>+<% } %></span>
</p>
</div>
</div>
</div>
</li>
<li id="paragraph-distance-after">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textAfter %></div>
<div class="item-after splitter">
<% if (!android) { %><label><%= scope.textAuto %></label><% } %>
<p class="buttons-row">
<span class="button decrement no-ripple"><% if (android) { %><i class="icon icon-expand-down"></i><% } else { %>-<% } %></span>
<% if (android) { %><label><%= scope.textAuto %></label><% } %>
<span class="button increment no-ripple"><% if (android) { %><i class="icon icon-expand-up"></i><% } else { %>+<% } %></span>
</p>
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
<!-- Fonts view -->
<div id="edit-text-fonts">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textFonts %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page" data-page="edit-text-font-page">
<div class="page-content">
<div class="list-block">
<ul>
<li id="font-size">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textSize %></div>
<div class="item-after splitter">
<% if (!android) { %><label></label><% } %>
<p class="buttons-row">
<span class="button decrement no-ripple"><% if (android) { %><i class="icon icon-expand-down"></i><% } else { %>-<% } %></span>
<% if (android) { %><label></label><% } %>
<span class="button increment no-ripple"><% if (android) { %><i class="icon icon-expand-up"></i><% } else { %>+<% } %></span>
</p>
</div>
</div>
</div>
</li>
</ul>
</div>
<div class="content-block-title"><%= scope.textFonts %></div>
<div id="font-list" class="list-block virtual-list">
<!-- Fonts List -->
</div>
</div>
</div>
</div>
<!-- Font color view -->
<div id="edit-text-color">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"> <i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></a></div>
<div class="center sliding"><%= scope.textFontColors %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page" data-page="edit-text-font-color">
<div class="page-content">
<div class="list-block" style="<% if (!android) { %>margin-bottom: -36px;<% } %>">
<ul>
</ul>
</div>
</div>
</div>
</div>
<!-- Additional view -->
<div id="edit-text-additional">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"> <i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></a></div>
<div class="center sliding"><%= scope.textAdditional %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page" id="page-text-additional" data-page="edit-text-additional">
<div class="page-content">
<div class="list-block" id="text-additional">
<ul>
<li>
<label class="label-radio item-content">
<input type="radio" name="text-strikethrough" value="strikethrough">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textStrikethrough %></div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="text-strikethrough" value="double-strikethrough">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textDblStrikethrough %></div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="text-script" value="superscript">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textDblSuperscript %></div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="text-script" value="subscript">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textSubscript %></div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="text-caps" value="small">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textSmallCaps %></div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="text-caps" value="all">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textAllCaps %></div>
</div>
</label>
</li>
</ul>
</div>
<div class="list-block">
<ul>
<li id="letter-spacing">
<div class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textLetterSpacing %></div>
<div class="item-after splitter">
<% if (!android) { %><label></label><% } %>
<p class="buttons-row">
<span class="button decrement no-ripple"><% if (android) { %><i class="icon icon-expand-down"></i><% } else { %>-<% } %></span>
<% if (android) { %><label></label><% } %>
<span class="button increment no-ripple"><% if (android) { %><i class="icon icon-expand-up"></i><% } else { %>+<% } %></span>
</p>
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
<div id="edit-text-linespacing">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"> <i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></a></div>
<div class="center sliding"><%= scope.textLineSpacing %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page" id="page-text-linespacing" data-page="edit-text-additional">
<div class="page-content">
<div class="list-block">
<ul>
<li>
<label class="label-radio item-content">
<input type="radio" name="line-spacing" value="1">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title">1.0</div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="line-spacing" value="1.15">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title">1.15</div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="line-spacing" value="1.5">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title">1.5</div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="line-spacing" value="2">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title">2.0</div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="line-spacing" value="2.5">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title">2.5</div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="line-spacing" value="3">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title">3.0</div>
</div>
</label>
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- Bullets view -->
<div id="edit-text-bullets">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"> <i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></a></div>
<div class="center sliding"><%= scope.textBullets %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page" id="page-text-bullets">
<div class="page-content dataview bullets">
<% _.each(bullets, function(row) { %>
<ul class="row">
<% _.each(row, function(bullet) { %>
<li data-type="<%= bullet.type %>">
<% if (bullet.thumb.length < 1) { %>
<div class="thumb" style="position: relative;"><label><%= scope.textNone %></label></div>
<% } else { %>
<div class="thumb" style="background-image:url('../mobile/resources/img/bullets/<%= bullet.thumb %>')"></div>
<% } %>
</li>
<% }); %>
</ul>
<% }); %>
</div>
</div>
</div>
<!-- Numbers view -->
<div id="edit-text-numbers">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"> <i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></a></div>
<div class="center sliding"><%= scope.textNumbers %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page" id="page-text-numbers">
<div class="page-content dataview numbers">
<% _.each(numbers, function(row) { %>
<ul class="row">
<% _.each(row, function(number) { %>
<li data-type="<%= number.type %>">
<% if (number.thumb.length < 1) { %>
<div class="thumb" style="position: relative;"><label><%= scope.textNone %></label></div>
<% } else { %>
<div class="thumb" style="background-image:url('../mobile/resources/img/numbers/<%= number.thumb %>')"></div>
<% } %>
</li>
<% }); %>
</ul>
<% }); %>
</div>
</div>
</div>
<!-- Custom color view -->
<div id="edit-text-custom-color-view">
<div class="navbar">
<div class="navbar-inner" data-page="edit-text-custom-color">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textCustomColor %></div>
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
</div>
</div>
<div class="page" data-page="edit-text-custom-color">
<div class="page-content">
<!--Color HSB palette-->
</div>
</div>
</div>

View file

@ -1,10 +0,0 @@
<div class="views">
<div id="pe-preview" style="position:absolute; left: 0; top: 0; display:none; width:100%; height:100%; z-index: 1;"></div>
<div class="view view-main">
<div class="pages navbar-through">
<div data-page="index" class="page">
<div id="editor_sdk" class="page-content no-fastclick with-logo"></div>
</div>
</div>
</div>
</div>

View file

@ -1,94 +0,0 @@
<!--Toolbar panel-->
<div id="search-panel-view">
<div class="searchbar document navbar navbar-hidden">
<div class="navbar-inner">
<div class="left">
<a id="search-settings" href="#" class="link icon-only"><i class="icon icon-settings"></i></a>
</div>
<div class="center">
<form class="searchbar search">
<div class="searchbar-input search">
<input type="search" placeholder="<%= scope.textSearch %>"><a href="#" class="searchbar-clear"></a>
</div>
</form>
<form class="searchbar replace">
<div class="searchbar-input replace">
<input type="search" placeholder="<%= scope.textReplace %>"><a href="#" class="searchbar-clear"></a>
</div>
</form>
</div>
<div class="right">
<% if (phone) { %>
<p class="buttons-row">
<a href="#" class="link icon-only prev disabled"><i class="icon icon-prev"></i></a>
<a href="#" class="link icon-only next disabled"><i class="icon icon-next"></i></a>
</p>
<p class="buttons-row replace">
<a href="#" class="link replace disabled"><%= scope.textReplace %></a>
</p>
<% } else { %>
<p class="buttons-row">
<a href="#" class="link replace disabled"><%= scope.textReplace %></a>
<a href="#" class="link icon-only prev disabled"><i class="icon icon-prev"></i></a>
<a href="#" class="link icon-only next disabled"><i class="icon icon-next"></i></a>
</p>
<% } %>
</div>
</div>
</div>
</div>
<!--Settings-->
<div id="search-settings-view">
<div class="navbar">
<div class="navbar-inner">
<div class="center sliding"><%= isEdit ? scope.textFindAndReplace : scope.textFind %></div>
<div class="right"><% if (phone) { %><a href="#" class="link close-popup"><b><%= scope.textDone %></b></a><% } %></div>
</div>
</div>
<div class="page" data-page="search-settings">
<div class="page-content">
<% if (isEdit) { %>
<div class="list-block">
<ul>
<li>
<label class="label-radio item-content">
<input type="radio" name="search-type" value="search">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textFind %></div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="search-type" value="replace">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textFindAndReplace %></div>
</div>
</label>
</li>
</ul>
</div>
<% } %>
<div class="list-block">
<ul>
<li>
<div id="search-case-sensitive" class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textCase %></div>
<div class="item-after">
<label class="label-switch">
<input type="checkbox">
<div class="checkbox"></div>
</label>
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>

View file

@ -1,610 +0,0 @@
<!-- Root view -->
<div id="settings-root-view">
<div class="navbar">
<div class="navbar-inner">
<div class="center sliding"><%= scope.textSettings %></div>
<div class="right"><% if (phone) { %><a href="#" class="link close-popup"><%= scope.textDone %></a><% } %></div>
</div>
</div>
<div class="pages">
<div class="page" data-page="settings-root-view">
<div class="page-content">
<div class="list-block">
<ul>
<% if (phone) { %>
<li>
<a id="settings-search" class="item-link no-indicator">
<div class="item-content">
<div class="item-media">
<i class="icon icon-search"></i>
</div>
<div class="item-inner">
<div class="item-title"><%= scope.textFind %></div>
</div>
</div>
</a>
</li>
<% } %>
<% if(width < 390) {%>
<li>
<div id="settings-collaboration" class="item-content" style="display: none;">
<div class="item-media">
<i class="icon icon-collaboration"></i>
</div>
<div class="item-inner">
<div class="item-title"><%= scope.textCollaboration %></div>
</div>
</div>
</li>
<% } %>
<li>
<a id="settings-presentation-setup" class="item-link">
<div class="item-content">
<div class="item-media">
<i class="icon icon-setup"></i>
</div>
<div class="item-inner">
<div class="item-title"><%= scope.textPresentSettings %></div>
</div>
</div>
</a>
</li>
<li>
<a id="settings-application" class="item-link">
<div class="item-content">
<div class="item-media">
<i class="icon icon-app-settings"></i>
</div>
<div class="item-inner">
<div class="item-title"><%= scope.textApplicationSettings %></div>
</div>
</div>
</a>
</li>
<li>
<a id="settings-download" class="item-link">
<div class="item-content">
<div class="item-media">
<i class="icon icon-download"></i>
</div>
<div class="item-inner">
<div class="item-title"><%= scope.textDownload %></div>
</div>
</div>
</a>
</li>
<li>
<a id="settings-print" class="item-link no-indicator">
<div class="item-content">
<div class="item-media">
<i class="icon icon-print"></i>
</div>
<div class="item-inner">
<div class="item-title"><%= scope.textPrint %></div>
</div>
</div>
</a>
</li>
<li>
<a id="settings-document-info" class="item-link">
<div class="item-content">
<div class="item-media">
<i class="icon icon-info"></i>
</div>
<div class="item-inner">
<div class="item-title"><%= scope.textPresentInfo %></div>
</div>
</div>
</a>
</li>
<li>
<a id="settings-help" class="item-link">
<div class="item-content">
<div class="item-media">
<i class="icon icon-help"></i>
</div>
<div class="item-inner">
<div class="item-title"><%= scope.textHelp %></div>
</div>
</div>
</a>
</li>
<li>
<a id="settings-about" class="item-link">
<div class="item-content">
<div class="item-media">
<i class="icon icon-about"></i>
</div>
<div class="item-inner">
<div class="item-title"><%= scope.textAbout %></div>
</div>
</div>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<!-- Presentation Info view -->
<div id="settings-info-view">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding">
<a href="#" class="back link">
<i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %>
</a>
</div>
<div class="center sliding"><%= scope.textPresentInfo %></div>
</div>
</div>
<div class="pages">
<div class="page" data-page="settings-info-view">
<div class="page-content">
<div class="content-block-title display-presentation-title"><%= scope.textPresentTitle %></div>
<div class="list-block display-presentation-title">
<ul>
<li class="item-content">
<div class="item-inner">
<div id="settings-presentation-title" class="item-title"><%= scope.textLoading %></div>
</div>
</li>
</ul>
</div>
<div class="content-block-title display-owner"><%= scope.textOwner %></div>
<div class="list-block display-owner">
<ul>
<li class="item-content">
<div class="item-inner">
<div id="settings-pe-owner" class="item-title"><%= scope.textLoading %></div>
</div>
</li>
</ul>
</div>
<div class="content-block-title display-location"><%= scope.textLocation %></div>
<div class="list-block display-location">
<ul>
<li class="item-content">
<div class="item-inner">
<div id="settings-pe-location" class="item-title"><%= scope.textLoading %></div>
</div>
</li>
</ul>
</div>
<div class="content-block-title display-uploaded"><%= scope.textUploaded %></div>
<div class="list-block display-uploaded">
<ul>
<li class="item-content">
<div class="item-inner">
<div id="settings-pe-uploaded" class="item-title"><%= scope.textLoading %></div>
</div>
</li>
</ul>
</div>
<div class="content-block-title display-title"><%= scope.textTitle %></div>
<div class="list-block display-title">
<ul>
<li class="item-content">
<div class="item-inner">
<div id="settings-pe-title" class="item-title"><%= scope.textLoading %></div>
</div>
</li>
</ul>
</div>
<div class="content-block-title display-subject"><%= scope.textSubject %></div>
<div class="list-block display-subject">
<ul>
<li class="item-content">
<div class="item-inner">
<div id="settings-pe-subject" class="item-title"><%= scope.textLoading %></div>
</div>
</li>
</ul>
</div>
<div class="content-block-title display-comment"><%= scope.textComment %></div>
<div class="list-block display-comment">
<ul>
<li class="item-content">
<div class="item-inner">
<div id="settings-pe-comment" class="item-title"><%= scope.textLoading %></div>
</div>
</li>
</ul>
</div>
<div class="content-block-title display-last-mode"><%= scope.textLastModified %></div>
<div class="list-block display-last-mode">
<ul>
<li class="item-content">
<div class="item-inner">
<div id="settings-pe-last-mod" class="item-title"><%= scope.textLoading %></div>
</div>
</li>
</ul>
</div>
<div class="content-block-title display-mode-by"><%= scope.textLastModifiedBy %></div>
<div class="list-block display-mode-by">
<ul>
<li class="item-content">
<div class="item-inner">
<div id="settings-pe-mod-by" class="item-title"><%= scope.textLoading %></div>
</div>
</li>
</ul>
</div>
<div class="content-block-title display-created-date"><%= scope.textCreated %></div>
<div class="list-block display-created-date">
<ul>
<li class="item-content">
<div class="item-inner">
<div id="settings-pe-date" class="item-title"><%= scope.textLoading %></div>
</div>
</li>
</ul>
</div>
<div class="content-block-title display-application"><%= scope.textApplication %></div>
<div class="list-block display-application">
<ul>
<li class="item-content">
<div class="item-inner">
<div id="settings-pe-application" class="item-title"><%= scope.textLoading %></div>
</div>
</li>
</ul>
</div>
<div class="content-block-title display-author"><%= scope.textAuthor %></div>
<div class="list-block display-author">
<ul id="list-creator">
<li class="item-content">
<div class="item-inner">
<div id="settings-pe-author" class="item-title"><%= scope.textLoading %></div>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<!-- Download view -->
<div id="settings-download-view">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding">
<a href="#" class="back link">
<i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %>
</a>
</div>
<div class="center sliding"><%= scope.textDownload %></div>
</div>
</div>
<div class="pages">
<div class="page formats" data-page="settings-download-view">
<div class="page-content">
<div class="content-block-title"><%= scope.textDownloadAs %></div>
<div class="list-block">
<ul>
<li>
<a data-format="129" class="item-link no-indicator">
<div class="item-content">
<div class="item-media">
<i class="icon icon-format-pptx"></i>
</div>
<div class="item-inner">
<div class="item-title">PPTX</div>
</div>
</div>
</a>
</li>
<li>
<a data-format="513" class="item-link no-indicator">
<div class="item-content">
<div class="item-media">
<i class="icon icon-format-pdf"></i>
</div>
<div class="item-inner">
<div class="item-title">PDF</div>
</div>
</div>
</a>
</li>
<li>
<a data-format="2305" class="item-link no-indicator">
<div class="item-content">
<div class="item-media">
<i class="icon icon-format-pdfa"></i>
</div>
<div class="item-inner">
<div class="item-title">PDF/A</div>
</div>
</div>
</a>
</li>
<li>
<a data-format="131" class="item-link no-indicator">
<div class="item-content">
<div class="item-media">
<i class="icon icon-format-odp"></i>
</div>
<div class="item-inner">
<div class="item-title">ODP</div>
</div>
</div>
</a>
</li>
<li>
<a data-format="135" class="item-link no-indicator">
<div class="item-content">
<div class="item-media">
<i class="icon icon-format-potx"></i>
</div>
<div class="item-inner">
<div class="item-title">POTX</div>
</div>
</div>
</a>
</li>
<li>
<a data-format="138" class="item-link no-indicator">
<div class="item-content">
<div class="item-media">
<i class="icon icon-format-otp"></i>
</div>
<div class="item-inner">
<div class="item-title">OTP</div>
</div>
</div>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<!-- About view -->
<div id="settings-about-view">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding">
<a href="#" class="back link">
<i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %>
</a>
</div>
<div class="center sliding"><%= scope.textAbout %></div>
</div>
</div>
<div class="pages">
<div class="page about" data-page="settings-about-view">
<div class="page-content">
<div class="content-block">
<div class="logo" style="display: inline-block; width: 100%; height: 55px;"></div>
<div id="settings-about-logo" style="margin-top: 20px;display: none;"></div>
</div>
<div class="content-block">
<h3>PRESENTATION EDITOR</h3>
<h3><%= scope.textVersion %> <%= prodversion %></h3>
</div>
<div class="content-block">
<h3 id="settings-about-name" class="vendor"><%= publishername %></h3>
<p><label><%= scope.textAddress %>:</label><a id="settings-about-address" class="external" href="#"><%= publisheraddr %></a></p>
<p><label><%= scope.textEmail %>:</label><a id="settings-about-email" class="external" target="_blank" href="mailto:<%= supportemail %>"><%= supportemail %></a></p>
<p><label><%= scope.textTel %>:</label><a id="settings-about-tel" class="external" target="_blank" href="tel:<%= phonenum %>"><%= phonenum %></a></p>
<p><a id="settings-about-url" class="external" target="_blank" href="<%= publisherurl %>"><%= printed_url %></a></p>
<p><label id="settings-about-info" style="display: none;"></label></p>
</div>
<div class="content-block" id="settings-about-licensor" style="display: none;">
<div class="content-block-inner" style="padding-top:0; padding-bottom: 1px;"></div>
<p><label><%= scope.textPoweredBy %></label></p>
<h3 class="vendor"><%= publishername %></h3>
<p><a class="external" target="_blank" href="<%= publisherurl %>"><%= printed_url %></a></p>
</div>
</div>
</div>
</div>
</div>
<div id="settings-setup-view">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding">
<a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textPresentSettings %></div>
</div>
</div>
<div class="page" id="page-settings-view" data-page="settings-setup-view">
<div class="page-content">
<div class="content-block-title"><%= scope.textSlideSize %></div>
<div class="list-block" id="slide-size-block">
<ul>
<li>
<label class="label-radio item-content">
<input type="radio" name="slide-size" value="0">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.mniSlideStandard %></div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="slide-size" value="1">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.mniSlideWide %></div>
</div>
</label>
</li>
</ul>
</div>
<div class="list-block">
<ul>
<li>
<a id="color-schemes" class="item-link item-content">
<div class="item-inner">
<div class="item-title-row">
<div class="item-title"><%= scope.textColorSchemes %></div>
</div>
</div>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- Presentation application settings -->
<div id="settings-application-view">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding">
<a href="#" class="back link">
<i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %>
</a>
</div>
<div class="center sliding"><%= scope.textApplicationSettings %></div>
</div>
</div>
<div class="pages">
<div class="page" data-page="settings-application-view">
<div class="page-content">
<div class="content-block-title"><%= scope.textUnitOfMeasurement %></div>
<div class="list-block">
<ul>
<li>
<label class="label-radio item-content">
<input type="radio" name="unit-of-measurement" value="0">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textCentimeter %></div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="unit-of-measurement" value="1">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textPoint %></div>
</div>
</label>
</li>
<li>
<label class="label-radio item-content">
<input type="radio" name="unit-of-measurement" value="2">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textInch %></div>
</div>
</label>
</li>
</ul>
</div>
<div class="list-block">
<ul>
<div id="settings-spellcheck" class="item-content">
<div class="item-inner">
<div class="item-title"><%= scope.textSpellcheck %></div>
<div class="item-after">
<label class="label-switch">
<input type="checkbox">
<div class="checkbox"></div>
</label>
</div>
</div>
</div>
</ul>
</div>
<div class="list-block display-view">
<ul>
<li>
<a id="settings-macros" class="item-link item-content" data-page="#settings-macros-view">
<div class="item-inner">
<div class="item-title-row">
<div class="item-title"><%= scope.textMacrosSettings %></div>
</div>
</div>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<!-- Color schemes view -->
<div id="color-schemes-view">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"> <i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textColorSchemes %></div>
</div>
</div>
<div class="pages">
<div class="page" data-page="color-schemes-view">
<div class="page-content">
<div id="color-schemes-content" class="list-block">
<ul></ul>
</div>
</div>
</div>
</div>
</div>
<!-- Macros Settings view -->
<div id="settings-macros-view">
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"> <i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
<div class="center sliding"><%= scope.textMacrosSettings %></div>
</div>
</div>
<div class="pages">
<div class="page page-macros-settings" data-page="settings-macros-view">
<div class="page-content">
<div class="list-block">
<ul>
<li class="media-item">
<label class="label-radio item-content">
<input type="radio" name="macros-settings" value="2">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textDisableAll %></div>
<div class="item-subtitle"><%= scope.textDisableAllMacrosWithoutNotification %></div>
</div>
</label>
</li>
<li class="media-item">
<label class="label-radio item-content">
<input type="radio" name="macros-settings" value="0">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textShowNotification %></div>
<div class="item-subtitle"><%= scope.textDisableAllMacrosWithNotification %></div>
</div>
</label>
</li>
<li class="media-item">
<label class="label-radio item-content">
<input type="radio" name="macros-settings" value="1">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title"><%= scope.textEnableAll %></div>
<div class="item-subtitle"><%= scope.textEnableAllMacrosWithoutNotification %></div>
</div>
</label>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>

View file

@ -1,59 +0,0 @@
<div class="navbar logo-navbar" id="editor-navbar">
<div id="navbar-logo" style="padding-top: 12px;display: flex;justify-content: center;"><i class="icon icon-logo"></i></div>
<div class="navbar-inner">
<div class="left">
<a id="document-back" href="#" class="link" style="min-width: 22px; display: none;">
<i class="icon icon-back"></i>
<% if (backTitle && !phone) { %>
<span class="subtitle"><%= backTitle %></span>
<% } %>
</a>
<% if (!android) { %>
<a href="#" id="toolbar-undo" class="link icon-only disabled" style="display: none;">
<i class="icon icon-undo"></i>
</a>
<a href="#" id="toolbar-redo" class="link icon-only disabled" style="display: none;">
<i class="icon icon-redo"></i>
</a>
<% } %>
</div>
<% if (!phone) { %>
<div class="center" id="toolbar-title"></div>
<% } %>
<div class="right">
<% if (android) { %>
<a href="#" id="toolbar-undo" class="link icon-only disabled" style="display: none;">
<i class="icon icon-undo"></i>
</a>
<a href="#" id="toolbar-redo" class="link icon-only disabled" style="display: none;">
<i class="icon icon-redo"></i>
</a>
<% } %>
<a href="#" id="toolbar-preview" class="link icon-only">
<i class="icon icon-play"></i>
</a>
<a href="#" id="toolbar-edit" class="link icon-only" style="display: none;">
<i class="icon icon-edit-settings"></i>
</a>
<a href="#" id="toolbar-add" class="link icon-only" style="display: none;">
<i class="icon icon-plus"></i>
</a>
<a href="#" id="toolbar-edit-document" class="link icon-only" style="display: none;">
<i class="icon icon-edit"></i>
</a>
<% if (!phone) { %>
<a href="#" id="toolbar-search" class="link icon-only">
<i class="icon icon-search"></i>
</a>
<% } %>
<% if (width >= 390) { %>
<a href="#" id="toolbar-collaboration" class="link icon-only disabled" style="display: none;">
<i class="icon icon-collaboration"></i>
</a>
<% } %>
<a href="#" id="toolbar-settings" class="link icon-only">
<i class="icon icon-settings"></i>
</a>
</div>
</div>
</div>

View file

@ -1,136 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* DocumentHolder.js
* Presentation Editor
*
* Created by Julia Radzhabova on 12/19/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'jquery',
'underscore',
'backbone',
'common/mobile/utils/utils'
], function ($, _, Backbone) {
'use strict';
PE.Views.DocumentHolder = Backbone.View.extend((function() {
// private
var _anchorId = 'context-menu-target';
return {
el: '#editor_sdk',
template: _.template('<div id="' + _anchorId + '" style="position: absolute;"></div>'),
// Delegated events for creating new items, and clearing completed ones.
events: {
},
// Set innerHTML and get the references to the DOM elements
initialize: function() {
//
},
// Render layout
render: function() {
var el = $(this.el);
if (el.length > 0 && el.find('#' + _anchorId).length < 1) {
el.append(this.template());
}
return this;
},
showMenu: function (items, posX, posY) {
if (items.itemsIcon.length < 1 && items.items.length < 1) {
return;
}
var menuItemTemplate = _.template([
'<% if(menuItems.itemsIcon) {%>',
'<% _.each(menuItems.itemsIcon, function(item) { %>',
'<li data-event="<%= item.event %>"><a href="#" class="item-link list-button"><i class="icon <%= item.icon %>"></i></a></li>',
'<% }); }%>',
'<% if(menuItems.items) {%>',
'<% _.each(menuItems.items, function(item) { %>',
'<li data-event="<%= item.event %>"><a href="#" class="item-link list-button"><%= item.caption %></a></li>',
'<% }); }%>'
].join(''));
$('#' + _anchorId)
.css('left', posX)
.css('top', Math.max(0, posY));
uiApp.closeModal('.document-menu.modal-in');
var popoverHTML =
'<div class="popover document-menu">'+
'<div class="popover-inner">'+
'<div class="list-block">'+
'<ul>'+
menuItemTemplate({menuItems: items}) +
'</ul>'+
'</div>'+
'</div>'+
'</div>';
var popover = uiApp.popover(popoverHTML, $('#' + _anchorId));
if (Common.SharedSettings.get('android')) {
Common.Utils.androidMenuTop($(popover), $('#' + _anchorId));
}
$('.modal-overlay').removeClass('modal-overlay-visible');
$('.document-menu li').single('click', _.buffered(function(e) {
var $target = $(e.currentTarget),
eventName = $target.data('event');
this.fireEvent('contextmenu:click', [this, eventName]);
}, 100, this));
},
hideMenu: function () {
$('#' + _anchorId)
.css('left', -1000)
.css('top', -1000);
uiApp.closeModal('.document-menu.modal-in');
}
}
})());
});

View file

@ -1,75 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* DocumentPreview.js
* Presentation Editor
*
* Created by Julia Radzhabova on 12/22/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'jquery',
'underscore',
'backbone'
], function ($, _, Backbone) {
'use strict';
PE.Views.DocumentPreview = Backbone.View.extend((function() {
// private
return {
el: '#pe-preview',
template: _.template('<div id="presentation-preview" style="width:100%; height:100%"></div>'),
// Delegated events for creating new items, and clearing completed ones.
events: {
},
// Set innerHTML and get the references to the DOM elements
initialize: function() {
//
},
// Render layout
render: function() {
var el = $(this.el);
el.append(this.template({}));
return this;
}
}
})());
});

View file

@ -1,81 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* Editor.js
* Presentation Editor
*
* Created by Alexander Yuzhin on 11/21/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'text!presentationeditor/mobile/app/template/Editor.template',
'jquery',
'underscore',
'backbone'
], function (editorTemplate, $, _, Backbone) {
'use strict';
PE.Views.Editor = Backbone.View.extend({
el: 'body',
// Compile our stats template
template: _.template(editorTemplate),
// Delegated events for creating new items, and clearing completed ones.
events: {
},
// Set innerHTML and get the references to the DOM elements
initialize: function() {
//
},
// Render layout
render: function() {
var el = $(this.el);
el.prepend(this.template({
backTitle: Framework7.prototype.device.android ? '' : ''
}));
this.f7View = uiApp.addView('.view-main', {
// params
});
return this;
}
});
});

View file

@ -1,204 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* Search.js
* Presentation Editor
*
* Created by Alexander Yuzhin on 11/22/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'text!presentationeditor/mobile/app/template/Search.template',
'jquery',
'underscore',
'backbone'
], function (searchTemplate, $, _, Backbone) {
'use strict';
PE.Views.Search = Backbone.View.extend(_.extend((function() {
// private
var _isEdit = false,
_layout;
return {
el: '.view-main',
// Compile our stats template
template: _.template(searchTemplate),
// Delegated events for creating new items, and clearing completed ones.
events: {},
// Set innerHTML and get the references to the DOM elements
initialize: function () {
this.on('searchbar:show', _.bind(this.initEvents, this));
},
initEvents: function() {
$('#search-settings').single('click', _.bind(this.showSettings, this));
},
// Render layout
render: function () {
_layout = $('<div/>').append(this.template({
android : Common.SharedSettings.get('android'),
phone : Common.SharedSettings.get('phone'),
isEdit : _isEdit,
scope : this
}));
return this;
},
setMode: function (mode) {
_isEdit = mode.isEdit;
this.render();
},
showSettings: function (e) {
var me = this;
uiApp.closeModal();
if (Common.SharedSettings.get('phone')) {
me.picker = $$(uiApp.popup([
'<div class="popup settings">',
'<div class="view search-settings-view navbar-through">',
_layout.find('#search-settings-view').html(),
'</div>',
'</div>'].join('')
))
} else {
me.picker = uiApp.popover([
'<div class="popover settings" style="width: 280px; height: 300px;">',
'<div class="popover-angle"></div>',
'<div class="popover-inner">',
'<div class="content-block">',
'<div class="view popover-view search-settings-view navbar-through" style="height: 300px;">',
_layout.find('#search-settings-view').html(),
'</div>',
'</div>',
'</div>',
'</div>'].join(''),
$$('#search-settings')
);
// Prevent hide overlay. Conflict popover and modals.
var $overlay = $('.modal-overlay');
$$(me.picker).on('opened', function () {
$overlay.on('removeClass', function () {
if (!$overlay.hasClass('modal-overlay-visible')) {
$overlay.addClass('modal-overlay-visible')
}
});
}).on('close', function () {
$overlay.off('removeClass');
$overlay.removeClass('modal-overlay-visible')
});
}
if (Common.SharedSettings.get('android')) {
$$('.view.search-settings-view.navbar-through').removeClass('navbar-through').addClass('navbar-fixed');
$$('.view.search-settings-view .navbar').prependTo('.view.search-settings-view > .pages > .page');
}
me.fireEvent('searchbar:showsettings', me);
},
showSearch: function () {
var me = this,
searchBar = $$('.searchbar.document');
if (searchBar.length < 1) {
$(_layout.find('#search-panel-view').html()).insertAfter($(me.el).find('.pages'));
if ($('.logo-navbar').length > 0) {
$('.searchbar.document').css('margin-top', '27px');
}
//$(me.el).find('.pages .page').first().prepend(_layout.find('#search-panel-view').html());
// Show replace mode if needed
var isReplace = Common.SharedSettings.get('search-is-replace');
$('.searchbar.document').toggleClass('replace', !_.isUndefined(isReplace) && (isReplace === true));
me.fireEvent('searchbar:render', me);
me.fireEvent('searchbar:show', me);
searchBar = $$('.searchbar.document');
if ($('.logo-navbar').length > 0) {
var top = Common.SharedSettings.get('android') ? '80px' : '68px';
$('.navbar-through .page > .searchbar').css('top', top);
}
uiApp.showNavbar(searchBar);
if (!searchBar.hasClass('navbar-hidden')) {
$('.searchbar.search input').focus();
}
}
},
hideSearch: function () {
var me = this,
searchBar = $$('.searchbar.document');
if (searchBar.length > 0) {
// Animating
if (searchBar.hasClass('.navbar-hidding')) {
return;
}
me.fireEvent('searchbar:hide', me);
searchBar.remove();
uiApp.hideNavbar(searchBar);
}
},
textFind: 'Find',
textFindAndReplace: 'Find and Replace',
textDone: 'Done',
textSearch: 'Search',
textReplace: 'Replace',
textCase: 'Case sensitive',
textHighlight: 'Highlight results'
}
})(), PE.Views.Search || {}))
});

View file

@ -1,318 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* Settings.js
* Presentation Editor
*
* Created by Alexander Yuzhin on 11/22/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'text!presentationeditor/mobile/app/template/Settings.template',
'jquery',
'underscore',
'backbone'
], function (settingsTemplate, $, _, Backbone) {
'use strict';
PE.Views.Settings = Backbone.View.extend(_.extend((function() {
// private
var isEdit,
canEdit = false,
canDownload = false,
canAbout = true,
canHelp = true,
canPrint = false,
isShowMacros = true;
return {
// el: '.view-main',
template: _.template(settingsTemplate),
events: {
//
},
initialize: function () {
Common.NotificationCenter.on('settingscontainer:show', _.bind(this.initEvents, this));
Common.Gateway.on('opendocument', _.bind(this.loadDocument, this));
},
initEvents: function () {
var me = this;
$('#settings-document-info').single('click', _.bind(me.showInfo, me));
$('#settings-download').single('click', _.bind(me.showDownload, me));
$('#settings-history').single('click', _.bind(me.showHistory, me));
$('#settings-help').single('click', _.bind(me.showHelp, me));
$('#settings-about').single('click', _.bind(me.showAbout, me));
$('#settings-presentation-setup').single('click', _.bind(me.showSetup, me));
$('#settings-application').single('click', _.bind(me.showSetApp, me));
Common.Utils.addScrollIfNeed('.view[data-page=settings-root-view] .pages', '.view[data-page=settings-root-view] .page');
me.initControls();
},
// Render layout
render: function () {
this.layout = $('<div/>').append(this.template({
android: Common.SharedSettings.get('android'),
phone: Common.SharedSettings.get('phone'),
scope: this,
width: $(window).width(),
prodversion: '{{PRODUCT_VERSION}}',
publishername: '{{PUBLISHER_NAME}}',
publisheraddr: '{{PUBLISHER_ADDRESS}}',
publisherurl: '{{PUBLISHER_URL}}',
printed_url: ("{{PUBLISHER_URL}}").replace(/https?:\/{2}/, "").replace(/\/$/,""),
supportemail: '{{SUPPORT_EMAIL}}',
phonenum: '{{PUBLISHER_PHONE}}'
}));
return this;
},
setMode: function (mode) {
isEdit = mode.isEdit;
canEdit = !mode.isEdit && mode.canEdit && mode.canRequestEditRights;
canDownload = mode.canDownload || mode.canDownloadOrigin;
canPrint = mode.canPrint;
if (mode.customization && mode.canBrandingExt) {
canAbout = (mode.customization.about!==false);
}
if (mode.customization) {
canHelp = (mode.customization.help!==false);
isShowMacros = (mode.customization.macros!==false);
}
},
rootLayout: function () {
if (this.layout) {
var $layour = this.layout.find('#settings-root-view'),
isPhone = Common.SharedSettings.get('phone');
if (isEdit) {
$layour.find('#settings-readermode').hide();
$layour.find('#settings-search .item-title').text(this.textFindAndReplace)
} else {
$layour.find('#settings-spellcheck').hide();
$layour.find('#settings-presentation-setup').hide();
$layour.find('#settings-readermode input:checkbox')
.attr('checked', Common.SharedSettings.get('readerMode'))
.prop('checked', Common.SharedSettings.get('readerMode'));
}
if (!canDownload) $layour.find('#settings-download').hide();
if (!canAbout) $layour.find('#settings-about').hide();
if (!canHelp) $layour.find('#settings-help').hide();
if (!canPrint) $layour.find('#settings-print').hide();
if (!isShowMacros) $layour.find('#settings-macros').hide();
return $layour.html();
}
return '';
},
initControls: function () {
//
},
showPage: function (templateId) {
var rootView = PE.getController('Settings').rootView();
if (rootView && this.layout) {
var $content = this.layout.find(templateId);
// Android fix for navigation
if (Framework7.prototype.device.android) {
$content.find('.page').append($content.find('.navbar'));
}
rootView.router.load({
content: $content.html()
});
this.fireEvent('page:show', [this, templateId]);
}
},
showColorSchemes: function () {
this.showPage('#color-schemes-view');
},
showInfo: function () {
this.showPage('#settings-info-view');
},
showDownload: function () {
this.showPage('#settings-download-view');
},
showHistory: function () {
this.showPage('#settings-history-view');
},
showMacros: function () {
this.showPage('#settings-macros-view');
},
showHelp: function () {
var url = '{{HELP_URL}}';
if (url.charAt(url.length-1) !== '/') {
url += '/';
}
if (Common.SharedSettings.get('sailfish')) {
url+='mobile-applications/documents/mobile-web-editors/android/index.aspx';
} else if (Common.SharedSettings.get('android')) {
url+='mobile-applications/documents/mobile-web-editors/android/index.aspx';
} else {
url+='mobile-applications/documents/mobile-web-editors/ios/index.aspx';
}
window.open(url, "_blank");
PE.getController('Settings').hideModal();
},
showAbout: function () {
this.showPage('#settings-about-view');
},
showSetup: function () {
this.showPage('#settings-setup-view');
$('#color-schemes').single('click', _.bind(this.showColorSchemes, this));
},
showSetApp: function () {
this.showPage('#settings-application-view');
$('.page[data-page=settings-application-view] .page-content > :not(.display-view)').hide();
if (isShowMacros) {
$('#settings-macros').single('click', _.bind(this.showMacros, this));
}
},
loadDocument: function (data) {
var permissions = {};
if (data.doc) {
permissions = _.extend(permissions, data.doc.permissions);
if (permissions.edit === false) {
}
}
},
renderSchemaSettings: function(currentSchema, arrSchemas) {
if (arrSchemas) {
var templateInsert = "";
_.each(arrSchemas, function (schema, index) {
var colors = schema.get_colors(),//schema.colors;
name = schema.get_name();
templateInsert += '<li class="color-schemes-menu"><label class="label-radio item-content"><input type="radio" name="color-schema" value="' + index + '"';
if (index === currentSchema) {
templateInsert += ' checked="checked"'
}
templateInsert += '>';
if (Framework7.prototype.device.android) {
templateInsert += '<div class="item-media"><i class="icon icon-form-radio"></i></div>';
}
templateInsert += '<div class="item-inner"><span class="color-schema-block">';
for (var j = 2; j < 7; j++) {
var clr = '#' + Common.Utils.ThemeColor.getHexColor(colors[j].get_r(), colors[j].get_g(), colors[j].get_b());
templateInsert = templateInsert + "<span class='color' style='background: " + clr + ";'></span>"
}
templateInsert += '</span><span class="text">' + name + '</span></div></label></li>';
}, this);
$('#color-schemes-content ul').html(templateInsert);
}
},
unknownText: 'Unknown',
textSettings: 'Settings',
textFind: 'Find',
textDone: 'Done',
textEditPresent: 'Edit Presentation',
textPresentSetup: 'Presentation Setup',
textPresentSettings: 'Presentation Settings',
textDownload: 'Download',
textPresentInfo: 'Presentation Info',
textHelp: 'Help',
textAbout: 'About',
textBack: 'Back',
textPresentTitle: 'Presentation Title',
textLoading: 'Loading...',
textAuthor: 'Author',
textCreateDate: 'Create date',
textDownloadAs: 'Download As...',
textVersion: 'Version',
textAddress: 'address',
textEmail: 'email',
textTel: 'tel',
textSlideSize: 'Slide Size',
mniSlideStandard: 'Standard (4:3)',
mniSlideWide: 'Widescreen (16:9)',
textPoweredBy: 'Powered by',
textFindAndReplace: 'Find and Replace',
textSpellcheck: 'Spell Checking',
textPrint: 'Print',
textApplicationSettings: 'Application Settings',
textUnitOfMeasurement: 'Unit of Measurement',
textCentimeter: 'Centimeter',
textPoint: 'Point',
textInch: 'Inch',
textColorSchemes: 'Color Schemes',
textCollaboration: 'Collaboration',
textSubject: 'Subject',
textTitle: 'Title',
textComment: 'Comment',
textOwner: 'Owner',
textApplication : 'Application',
textCreated: 'Created',
textLastModified: 'Last Modified',
textLastModifiedBy: 'Last Modified By',
textUploaded: 'Uploaded',
textLocation: 'Location',
textMacrosSettings: 'Macros Settings',
textDisableAll: 'Disable All',
textDisableAllMacrosWithoutNotification: 'Disable all macros without notification',
textShowNotification: 'Show Notification',
textDisableAllMacrosWithNotification: 'Disable all macros with notification',
textEnableAll: 'Enable All',
textEnableAllMacrosWithoutNotification: 'Enable all macros without notification'
}
})(), PE.Views.Settings || {}))
});

View file

@ -1,172 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* Toolbar.js
* Presentation Editor
*
* Created by Alexander Yuzhin on 11/21/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'text!presentationeditor/mobile/app/template/Toolbar.template',
'jquery',
'underscore',
'backbone'
], function (toolbarTemplate, $, _, Backbone) {
'use strict';
PE.Views.Toolbar = Backbone.View.extend(_.extend((function() {
// private
return {
el: '.view-main',
// Compile our stats template
template: _.template(toolbarTemplate),
// Delegated events for creating new items, and clearing completed ones.
events: {
"click #toolbar-search" : "searchToggle",
"click #toolbar-edit" : "showEdition",
"click #toolbar-add" : "showInserts",
"click #toolbar-settings" : "showSettings",
"click #toolbar-preview" : "showPreview",
"click #toolbar-edit-document": "editDocument",
"click #toolbar-collaboration" : "showCollaboration"
},
// Set innerHTML and get the references to the DOM elements
initialize: function() {
var me = this;
Common.NotificationCenter.on('readermode:change', function (reader) {
if (reader) {
me.hideSearch();
$('#toolbar-search').addClass('disabled');
} else {
$('#toolbar-search').removeClass('disabled');
}
});
},
// Render layout
render: function() {
var me = this,
$el = $(me.el);
$el.prepend(me.template({
android : Common.SharedSettings.get('android'),
phone : Common.SharedSettings.get('phone'),
backTitle : Common.SharedSettings.get('android') ? '' : me.textBack,
scope : me,
width : $(window).width()
}));
$('.view-main .navbar').on('addClass removeClass', _.bind(me.onDisplayMainNavbar, me));
$('#toolbar-preview, #toolbar-edit, #toolbar-add, #toolbar-settings, #toolbar-search, #document-back, #toolbar-edit-document').addClass('disabled');
return me;
},
setMode: function (mode) {
if (mode.isEdit) {
$('#toolbar-edit, #toolbar-add, #toolbar-undo, #toolbar-redo').show();
} else if (mode.canEdit && mode.canRequestEditRights){
$('#toolbar-edit-document').show();
}
},
onDisplayMainNavbar: function (e) {
var $target = $(e.currentTarget),
navbarHidden = $target.hasClass('navbar-hidden'),
pickerHeight = $('.picker-modal').height() || 260;
$('#editor_sdk').css({
top : navbarHidden ? 0 : '',
bottom : navbarHidden ? pickerHeight : ''
});
},
// Search
searchToggle: function() {
if ($$('.searchbar.document').length > 0) {
this.hideSearch();
} else {
this.showSearch();
}
},
showSearch: function () {
PE.getController('Search').showSearch();
},
hideSearch: function () {
PE.getController('Search').hideSearch();
},
// Editor
showEdition: function () {
PE.getController('EditContainer').showModal();
},
// Inserts
showInserts: function () {
PE.getController('AddContainer').showModal();
},
// Settings
showSettings: function () {
PE.getController('Settings').showModal();
},
showPreview: function () {
PE.getController('DocumentPreview').show();
},
editDocument: function () {
Common.Gateway.requestEditRights();
},
//Collaboration
showCollaboration: function () {
PE.getController('Common.Controllers.Collaboration').showModal();
},
textBack: 'Back'
}
})(), PE.Views.Toolbar || {}))
});

View file

@ -1,132 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* AddImage.js
* Presentation Editor
*
* Created by Julia Radzhabova on 11/30/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'text!presentationeditor/mobile/app/template/AddImage.template',
'jquery',
'underscore',
'backbone'
], function (addTemplate, $, _, Backbone) {
'use strict';
PE.Views.AddImage = Backbone.View.extend(_.extend((function() {
// private
return {
// el: '.view-main',
template: _.template(addTemplate),
events: {
},
initialize: function () {
Common.NotificationCenter.on('addcontainer:show', _.bind(this.initEvents, this));
},
initEvents: function () {
var me = this;
$('#add-image-url').single('click', _.bind(me.showImageUrl, me));
me.initControls();
},
// Render layout
render: function () {
this.layout = $('<div/>').append(this.template({
android : Common.SharedSettings.get('android'),
phone : Common.SharedSettings.get('phone'),
scope : this
}));
return this;
},
rootLayout: function () {
if (this.layout) {
return this.layout
.find('#addimage-root-view')
.html();
}
return '';
},
initControls: function () {
//
},
showPage: function (templateId) {
var rootView = PE.getController('AddContainer').rootView;
if (rootView && this.layout) {
var $content = this.layout.find(templateId);
// Android fix for navigation
if (Framework7.prototype.device.android) {
$content.find('.page').append($content.find('.navbar'));
}
rootView.router.load({
content: $content.html()
});
this.fireEvent('page:show', this);
}
},
showImageUrl: function () {
this.showPage('#addimage-url-view');
},
textFromLibrary: 'Picture from Library',
textFromURL: 'Picture from URL',
textBack: 'Back',
textLinkSettings: 'Link Settings',
textAddress: 'Address',
textImageURL: 'Image URL',
textInsertImage: 'Insert Image'
}
})(), PE.Views.AddImage || {}))
});

View file

@ -1,234 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* AddOther.js
* Presentation Editor
*
* Created by Julia Svinareva on 10/04/20
* Copyright (c) 2020 Ascensio System SIA. All rights reserved.
*
*/
define([
'text!presentationeditor/mobile/app/template/AddOther.template',
'jquery',
'underscore',
'backbone'
], function (addTemplate, $, _, Backbone) {
'use strict';
PE.Views.AddOther = Backbone.View.extend(_.extend((function() {
// private
return {
// el: '.view-main',
template: _.template(addTemplate),
events: {
},
initialize: function () {
Common.NotificationCenter.on('addcontainer:show', _.bind(this.initEvents, this));
},
initEvents: function () {
if (this.hideInsertComments) {
$('#item-comment').hide();
} else {
$('#item-comment').show();
$('#add-other-comment').single('click', _.bind(this.showPageComment, this));
}
$('#add-other-table').single('click', _.bind(this.showPageTable, this));
if (this.hideInsertLink) {
$('#item-link').hide();
} else {
$('#item-link').show();
$('#add-other-link').single('click', _.bind(this.showPageLink, this));
}
this.initControls();
},
// Render layout
render: function () {
this.layout = $('<div/>').append(this.template({
android : Common.SharedSettings.get('android'),
phone : Common.SharedSettings.get('phone'),
scope : this
}));
return this;
},
rootLayout: function () {
if (this.layout) {
if (!this.canViewComments) {
this.layout.find('#addother-root-view #item-comment').remove();
}
return this.layout
.find('#addother-root-view')
.html();
}
return '';
},
initControls: function () {
//
},
showPage: function (templateId, animate) {
var rootView = PE.getController('AddContainer').rootView;
if (rootView && this.layout) {
var $content = this.layout.find(templateId);
// Android fix for navigation
if (Framework7.prototype.device.android) {
$content.find('.page').append($content.find('.navbar'));
}
rootView.router.load({
content: $content.html(),
animatePages: animate !== false
});
if (templateId === '#addother-insert-link') {
this.fireEvent('category:show', [this, templateId]);
} else {
this.fireEvent('page:show', [this, templateId]);
}
}
},
showPageComment: function(animate) {
this.showPage('#addother-insert-comment', animate);
},
renderComment: function(comment) {
var me = this;
_.delay(function () {
var $commentInfo = $('#comment-info');
var template = [
'<% if (android) { %><div class="header-comment"><div class="initials-comment" style="background-color: <%= comment.usercolor %>;"><%= comment.userInitials %></div><div><% } %>',
'<div class="user-name"><%= comment.username %></div>',
'<div class="comment-date"><%= comment.date %></div>',
'<% if (android) { %></div></div><% } %>',
'<div class="wrap-textarea"><textarea id="comment-text" class="comment-textarea" placeholder="<%= textAddComment %>" autofocus></textarea></div>'
].join('');
var insert = _.template(template)({
android: Framework7.prototype.device.android,
comment: comment,
textAddComment: me.textAddComment
});
$commentInfo.html(insert);
_.defer(function () {
var $textarea = $('.comment-textarea')[0];
var $btnAddComment = $('#done-comment');
$btnAddComment.addClass('disabled');
$textarea.focus();
$textarea.oninput = function () {
if ($textarea.value.length < 1) {
if (!$btnAddComment.hasClass('disabled'))
$btnAddComment.addClass('disabled');
} else {
if ($btnAddComment.hasClass('disabled')) {
$btnAddComment.removeClass('disabled');
}
}
};
});
}, 100);
},
showPageTable: function() {
this.showPage('#addother-insert-table');
this.renderTableStyles();
PE.getController('AddTable').initEvents();
},
renderTableStyles: function() {
var $stylesList = $('.table-styles ul');
var template = [
'<% _.each(styles, function(style) { %>',
'<li data-type="<%= style.templateId %>">',
'<img src="<%= style.imageUrl %>">',
'</li>',
'<% }); %>'
].join('');
var insert = _.template(template)({
android : Common.SharedSettings.get('android'),
phone : Common.SharedSettings.get('phone'),
styles : PE.getController('AddTable').getStyles()
});
$stylesList.html(insert);
},
showPageLink: function() {
this.showPage('#addother-insert-link');
$('#add-link-number').single('click', _.bind(this.showPageNumber, this));
$('#add-link-type').single('click', _.bind(this.showLinkType, this));
},
showLinkType: function () {
this.showPage('#addlink-type');
},
showPageNumber: function () {
this.showPage('#addlink-slidenumber');
},
textComment: 'Comment',
textAddComment: 'Add Comment',
textDone: 'Done',
textTable: 'Table',
textLinkType: 'Link Type',
textExternalLink: 'External Link',
textInternalLink: 'Slide in this Presentation',
textLink: 'Link',
textLinkSlide: 'Link to',
textBack: 'Back',
textDisplay: 'Display',
textTip: 'Screen Tip',
textInsert: 'Insert',
textNext: 'Next Slide',
textPrev: 'Previous Slide',
textFirst: 'First Slide',
textLast: 'Last Slide',
textNumber: 'Slide Number'
}
})(), PE.Views.AddOther || {}))
});

View file

@ -1,99 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* AddShape.js
* Presentation Editor
*
* Created by Julia Radzhabova on 11/28/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'text!presentationeditor/mobile/app/template/AddShape.template',
'jquery',
'underscore',
'backbone'
], function (addTemplate, $, _, Backbone) {
'use strict';
PE.Views.AddShape = Backbone.View.extend(_.extend((function() {
// private
return {
// el: '.view-main',
template: _.template(addTemplate),
events: {
},
initialize: function () {
Common.NotificationCenter.on('addcontainer:show', _.bind(this.initEvents, this));
Common.NotificationCenter.on('shapes:load', _.bind(this.render, this));
},
initEvents: function () {
Common.Utils.addScrollIfNeed('#add-shape .pages', '#add-shape .page');
this.initControls();
},
// Render layout
render: function () {
this.layout = $('<div/>').append(this.template({
android : Common.SharedSettings.get('android'),
phone : Common.SharedSettings.get('phone'),
shapes : Common.SharedSettings.get('shapes')
}));
return this;
},
rootLayout: function () {
if (this.layout) {
return this.layout
.find('#add-shapes-root')
.html();
}
return '';
},
initControls: function () {
//
}
}
})(), PE.Views.AddShape || {}))
});

View file

@ -1,137 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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) 2018 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;
Common.Utils.addScrollIfNeed('#add-slide .pages', '#add-slide .page');
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 || {}))
});

View file

@ -1,358 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* EditChart.js
* Presentation Editor
*
* Created by Julia Radzhabova on 12/19/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'text!presentationeditor/mobile/app/template/EditChart.template',
'jquery',
'underscore',
'backbone',
'common/mobile/lib/component/ThemeColorPalette',
'common/mobile/lib/component/HsbColorPicker'
], function (editTemplate, $, _, Backbone) {
'use strict';
PE.Views.EditChart = Backbone.View.extend(_.extend((function() {
// private
var _styles = [];
var _types = [
{ type: Asc.c_oAscChartTypeSettings.barNormal, thumb: 'chart-03.png'},
{ type: Asc.c_oAscChartTypeSettings.barStacked, thumb: 'chart-02.png'},
{ type: Asc.c_oAscChartTypeSettings.barStackedPer, thumb: 'chart-01.png'},
{ type: Asc.c_oAscChartTypeSettings.lineNormal, thumb: 'chart-06.png'},
{ type: Asc.c_oAscChartTypeSettings.lineStacked, thumb: 'chart-05.png'},
{ type: Asc.c_oAscChartTypeSettings.lineStackedPer, thumb: 'chart-04.png'},
{ type: Asc.c_oAscChartTypeSettings.hBarNormal, thumb: 'chart-09.png'},
{ type: Asc.c_oAscChartTypeSettings.hBarStacked, thumb: 'chart-08.png'},
{ type: Asc.c_oAscChartTypeSettings.hBarStackedPer, thumb: 'chart-07.png'},
{ type: Asc.c_oAscChartTypeSettings.areaNormal, thumb: 'chart-12.png'},
{ type: Asc.c_oAscChartTypeSettings.areaStacked, thumb: 'chart-11.png'},
{ type: Asc.c_oAscChartTypeSettings.areaStackedPer, thumb: 'chart-10.png'},
{ type: Asc.c_oAscChartTypeSettings.pie, thumb: 'chart-13.png'},
{ type: Asc.c_oAscChartTypeSettings.doughnut, thumb: 'chart-14.png'},
{ type: Asc.c_oAscChartTypeSettings.pie3d, thumb: 'chart-22.png'},
{ type: Asc.c_oAscChartTypeSettings.scatter, thumb: 'chart-15.png'},
{ type: Asc.c_oAscChartTypeSettings.stock, thumb: 'chart-16.png'},
{ type: Asc.c_oAscChartTypeSettings.line3d, thumb: 'chart-21.png'},
{ type: Asc.c_oAscChartTypeSettings.barNormal3d, thumb: 'chart-17.png'},
{ type: Asc.c_oAscChartTypeSettings.barStacked3d, thumb: 'chart-18.png'},
{ type: Asc.c_oAscChartTypeSettings.barStackedPer3d, thumb: 'chart-19.png'},
{ type: Asc.c_oAscChartTypeSettings.hBarNormal3d, thumb: 'chart-25.png'},
{ type: Asc.c_oAscChartTypeSettings.hBarStacked3d, thumb: 'chart-24.png'},
{ type: Asc.c_oAscChartTypeSettings.hBarStackedPer3d, thumb: 'chart-23.png'},
{ type: Asc.c_oAscChartTypeSettings.barNormal3dPerspective, thumb: 'chart-20.png'}
];
return {
// el: '.view-main',
template: _.template(editTemplate),
events: {
},
initialize: function () {
Common.NotificationCenter.on('editcontainer:show', _.bind(this.initEvents, this));
Common.NotificationCenter.on('editcategory:show', _.bind(this.categoryShow, this));
Common.NotificationCenter.on('chartstyles:load', _.bind(this.onStylesLoad, this));
},
initEvents: function () {
var me = this;
$('#chart-style').single('click', _.bind(me.showStyle, me));
$('#chart-reorder').single('click', _.bind(me.showReorder, me));
$('#edit-chart-bordercolor').single('click', _.bind(me.showBorderColor, me));
$('.edit-chart-style .categories a').single('click', _.bind(me.showStyleCategory, me));
$('#chart-align').single('click', _.bind(me.showAlign, me));
Common.Utils.addScrollIfNeed('#edit-chart .pages', '#edit-chart .page');
me.initControls();
me.renderStyles();
},
categoryShow: function(e) {
//
},
onStylesLoad: function () {
_styles = Common.SharedSettings.get('chartstyles');
this.renderStyles();
},
// Render layout
render: function () {
var elementsInRow = 3;
var groupsOfTypes = _.chain(_types).groupBy(function(element, index){
return Math.floor(index/elementsInRow);
}).toArray().value();
this.layout = $('<div/>').append(this.template({
android : Common.SharedSettings.get('android'),
phone : Common.SharedSettings.get('phone'),
types : groupsOfTypes,
scope : this
}));
return this;
},
rootLayout: function () {
if (this.layout) {
return this.layout
.find('#edit-chart-root')
.html();
}
return '';
},
initControls: function () {
//
},
showPage: function (templateId, suspendEvent) {
var rootView = PE.getController('EditContainer').rootView;
if (rootView && this.layout) {
var $content = this.layout.find(templateId);
// Android fix for navigation
if (Framework7.prototype.device.android) {
$content.find('.page').append($content.find('.navbar'));
}
rootView.router.load({
content: $content.html()
});
if (suspendEvent !== true) {
this.fireEvent('page:show', [this, templateId]);
}
this.initEvents();
}
Common.Utils.addScrollIfNeed('.page[data-page=edit-chart-border-color]', '.page[data-page=edit-chart-border-color] .page-content');
Common.Utils.addScrollIfNeed('.page[data-page=edit-chart-style] .tabs', '#tab-chart-type');
},
showStyleCategory: function (e) {
// remove android specific style
$('.page[data-page=edit-chart-style] .list-block.inputs-list').removeClass('inputs-list');
Common.Utils.addScrollIfNeed('.page[data-page=edit-chart-style] .tabs', '#tab-chart-type');
Common.Utils.addScrollIfNeed('.page[data-page=edit-chart-style] .tabs', '#tab-chart-style');
Common.Utils.addScrollIfNeed('.page[data-page=edit-chart-style] .tabs', '#tab-chart-fill');
Common.Utils.addScrollIfNeed('.page[data-page=edit-chart-style] .tabs', '#tab-chart-border');
},
renderStyles: function() {
var $styleContainer = $('#tab-chart-style');
if ($styleContainer.length > 0) {
var columns = parseInt($styleContainer.width() / 70), // magic
row = -1,
styles = [];
_.each(_styles, function (style, index) {
if (0 == index % columns) {
styles.push([]);
row++
}
styles[row].push(style);
});
var template = _.template([
'<% _.each(styles, function(row) { %>',
'<ul class="row">',
'<% _.each(row, function(style) { %>',
'<li data-type="<%= style.asc_getName() %>">',
'<img src="<%= style.asc_getImage() %>" width="50px" height="50px">',
'</li>',
'<% }); %>',
'</ul>',
'<% }); %>'
].join(''))({
styles: styles
});
$styleContainer.html(template);
}
},
showStyle: function () {
var me = this;
var selector = '#edit-chart-style';
this.showPage(selector, true);
this.paletteFillColor = new Common.UI.ThemeColorPalette({
el: $('#tab-chart-fill'),
transparent: true
});
this.paletteFillColor.on('customcolor', function () {
me.showCustomFillColor();
});
var template = _.template(['<div class="list-block">',
'<ul>',
'<li>',
'<a id="edit-chart-add-custom-color" class="item-link">',
'<div class="item-content">',
'<div class="item-inner">',
'<div class="item-title"><%= scope.textAddCustomColor %></div>',
'</div>',
'</div>',
'</a>',
'</li>',
'</ul>',
'</div>'].join(''));
$('#tab-chart-fill').append(template({scope: this}));
$('#edit-chart-add-custom-color').single('click', _.bind(this.showCustomFillColor, this));
this.fireEvent('page:show', [this, selector]);
},
showCustomFillColor: function () {
var me = this,
selector = '#edit-chart-custom-color-view';
me.showPage(selector, true);
me.customColorPicker = new Common.UI.HsbColorPicker({
el: $('.page[data-page=edit-chart-custom-color] .page-content'),
color: me.paletteFillColor.currentColor
});
me.customColorPicker.on('addcustomcolor', function (colorPicker, color) {
me.paletteFillColor.addNewDynamicColor(colorPicker, color);
PE.getController('EditContainer').rootView.router.back();
});
me.fireEvent('page:show', [me, selector]);
},
showReorder: function () {
this.showPage('#edit-chart-reorder');
Common.Utils.addScrollIfNeed('.page.chart-reorder', '.page.chart-reorder .page-content');
},
showBorderColor: function () {
var me = this;
var selector = '#edit-chart-border-color-view';
this.showPage(selector, true);
this.paletteBorderColor = new Common.UI.ThemeColorPalette({
el: $('.page[data-page=edit-chart-border-color] .page-content')
});
this.paletteBorderColor.on('customcolor', function () {
me.showCustomBorderColor();
});
var template = _.template(['<div class="list-block">',
'<ul>',
'<li>',
'<a id="edit-chart-add-custom-border-color" class="item-link">',
'<div class="item-content">',
'<div class="item-inner">',
'<div class="item-title"><%= scope.textAddCustomColor %></div>',
'</div>',
'</div>',
'</a>',
'</li>',
'</ul>',
'</div>'].join(''));
$('.page[data-page=edit-chart-border-color] .page-content').append(template({scope: this}));
$('#edit-chart-add-custom-border-color').single('click', _.bind(this.showCustomBorderColor, this));
this.fireEvent('page:show', [this, selector]);
},
showCustomBorderColor: function() {
var me = this,
selector = '#edit-chart-custom-color-view';
me.showPage(selector, true);
me.customBorderColorPicker = new Common.UI.HsbColorPicker({
el: $('.page[data-page=edit-chart-custom-color] .page-content'),
color: me.paletteBorderColor.currentColor
});
me.customBorderColorPicker.on('addcustomcolor', function (colorPicker, color) {
me.paletteBorderColor.addNewDynamicColor(colorPicker, color);
me.paletteFillColor.updateDynamicColors();
me.paletteFillColor.select(me.paletteFillColor.currentColor);
PE.getController('EditContainer').rootView.router.back();
});
me.fireEvent('page:show', [me, selector]);
},
showAlign: function () {
this.showPage('#edit-chart-align');
Common.Utils.addScrollIfNeed('.page.chart-align', '.page.chart-align .page-content');
},
textStyle: 'Style',
textReorder: 'Reorder',
textRemoveChart: 'Remove Chart',
textBack: 'Back',
textToForeground: 'Bring to Foreground',
textToBackground: 'Send to Background',
textForward: 'Move Forward',
textBackward: 'Move Backward',
textType: 'Type',
textFill: 'Fill',
textBorder: 'Border',
textSize: 'Size',
textColor: 'Color',
textAlign: 'Align',
textAlignLeft: 'Align Left',
textAlignRight: 'Align Right',
textAlignCenter: 'Align Center',
textAlignTop: 'Align Top',
textAlignBottom: 'Align Bottom',
textAlignMiddle: 'Align Middle',
txtDistribHor: 'Distribute Horizontally',
txtDistribVert: 'Distribute Vertically',
textAddCustomColor: 'Add Custom Color',
textCustomColor: 'Custom Color'
}
})(), PE.Views.EditChart || {}))
});

View file

@ -1,184 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* EditImage.js
* Presentation Editor
*
* Created by Julia Radzhabova on 11/30/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'text!presentationeditor/mobile/app/template/EditImage.template',
'jquery',
'underscore',
'backbone'
], function (editTemplate, $, _, Backbone) {
'use strict';
PE.Views.EditImage = Backbone.View.extend(_.extend((function() {
// private
return {
// el: '.view-main',
template: _.template(editTemplate),
events: {
},
initialize: function () {
Common.NotificationCenter.on('editcontainer:show', _.bind(this.initEvents, this));
Common.NotificationCenter.on('editcategory:show', _.bind(this.categoryShow, this));
},
initEvents: function () {
var me = this;
$('#image-replace').single('click', _.bind(me.showReplace, me));
$('#image-reorder').single('click', _.bind(me.showReorder, me));
$('#edit-image-url').single('click', _.bind(me.showEditUrl, me));
$('#image-align').single('click', _.bind(me.showAlign, me));
Common.Utils.addScrollIfNeed('#edit-image .pages', '#edit-image .page');
me.initControls();
},
categoryShow: function(e) {
//
},
// Render layout
render: function () {
this.layout = $('<div/>').append(this.template({
android : Common.SharedSettings.get('android'),
phone : Common.SharedSettings.get('phone'),
scope : this
}));
return this;
},
rootLayout: function () {
if (this.layout) {
return this.layout
.find('#edit-image-root')
.html();
}
return '';
},
initControls: function () {
//
},
showPage: function (templateId, suspendEvent) {
var rootView = PE.getController('EditContainer').rootView;
if (rootView && this.layout) {
var $content = this.layout.find(templateId);
// Android fix for navigation
if (Framework7.prototype.device.android) {
$content.find('.page').append($content.find('.navbar'));
}
rootView.router.load({
content: $content.html()
});
if (suspendEvent !== true) {
this.fireEvent('page:show', [this, templateId]);
}
this.initEvents();
}
Common.Utils.addScrollIfNeed('.page.edit-image-url-link', '.page.edit-image-url-link .page-content');
},
showReplace: function () {
this.showPage('#edit-image-replace-view');
},
showReorder: function () {
this.showPage('#edit-image-reorder-view');
Common.Utils.addScrollIfNeed('.page.image-reorder', '.page.image-reorder .page-content');
},
showEditUrl: function () {
this.showPage('#edit-image-url-view');
$('.edit-image-url-link input[type="url"]').single('input', _.bind(function(e) {
$('.edit-image-url-link .buttons').toggleClass('disabled', _.isEmpty($(e.currentTarget).val()));
}, this));
_.delay(function () {
$('.edit-image-url-link input[type="url"]').focus();
}, 1000);
},
showAlign: function () {
this.showPage('#edit-image-align');
Common.Utils.addScrollIfNeed('.page.image-align', '.page.image-align .page-content');
},
textReplace: 'Replace',
textReorder: 'Reorder',
textDefault: 'Actual Size',
textRemove: 'Remove Image',
textBack: 'Back',
textToForeground: 'Bring to Foreground',
textToBackground: 'Send to Background',
textForward: 'Move Forward',
textBackward: 'Move Backward',
textFromLibrary: 'Picture from Library',
textFromURL: 'Picture from URL',
textLinkSettings: 'Link Settings',
textAddress: 'Address',
textImageURL: 'Image URL',
textReplaceImg: 'Replace Image',
textAlign: 'Align',
textAlignLeft: 'Align Left',
textAlignRight: 'Align Right',
textAlignCenter: 'Align Center',
textAlignTop: 'Align Top',
textAlignBottom: 'Align Bottom',
textAlignMiddle: 'Align Middle',
txtDistribHor: 'Distribute Horizontally',
txtDistribVert: 'Distribute Vertically'
}
})(), PE.Views.EditImage || {}))
});

View file

@ -1,143 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* EditLink.js
* Presentation Editor
*
* Created by Julia Radzhabova on 12/06/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'text!presentationeditor/mobile/app/template/EditLink.template',
'jquery',
'underscore',
'backbone'
], function (editTemplate, $, _, Backbone) {
'use strict';
PE.Views.EditLink = Backbone.View.extend(_.extend((function() {
// private
return {
// el: '.view-main',
template: _.template(editTemplate),
events: {
},
initialize: function () {
Common.NotificationCenter.on('editcontainer:show', _.bind(this.initEvents, this));
},
initEvents: function () {
var me = this;
$('#edit-link-number').single('click', _.bind(me.showPageNumber, me));
$('#edit-link-type').single('click', _.bind(me.showLinkType, me));
Common.Utils.addScrollIfNeed('#edit-link .pages', '#edit-link .page');
},
// Render layout
render: function () {
this.layout = $('<div/>').append(this.template({
android : Common.SharedSettings.get('android'),
phone : Common.SharedSettings.get('phone'),
scope : this
}));
return this;
},
rootLayout: function () {
if (this.layout) {
return this.layout
.find('#edit-link-root')
.html();
}
return '';
},
showPage: function (templateId) {
var rootView = PE.getController('EditContainer').rootView;
if (rootView && this.layout) {
var $content = this.layout.find(templateId);
// Android fix for navigation
if (Framework7.prototype.device.android) {
$content.find('.page').append($content.find('.navbar'));
}
rootView.router.load({
content: $content.html()
});
this.fireEvent('page:show', [this, templateId]);
}
Common.Utils.addScrollIfNeed('.page[data-page=editlink-slidenumber]', '.page[data-page=editlink-slidenumber] .page-content');
},
showLinkType: function () {
this.showPage('#editlink-type');
},
showPageNumber: function () {
this.showPage('#editlink-slidenumber');
},
textLinkType: 'Link Type',
textExternalLink: 'External Link',
textInternalLink: 'Slide in this Presentation',
textLink: 'Link',
textLinkSlide: 'Link to',
textBack: 'Back',
textDisplay: 'Display',
textTip: 'Screen Tip',
textNext: 'Next Slide',
textPrev: 'Previous Slide',
textFirst: 'First Slide',
textLast: 'Last Slide',
textNumber: 'Slide Number',
textEdit: 'Save Link',
textRemove: 'Remove Link'
}
})(), PE.Views.EditLink || {}))
});

View file

@ -1,292 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* EditShape.js
* Presentation Editor
*
* Created by Julia Radzhabova on 11/25/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'text!presentationeditor/mobile/app/template/EditShape.template',
'jquery',
'underscore',
'backbone',
'common/mobile/lib/component/ThemeColorPalette',
'common/mobile/lib/component/HsbColorPicker'
], function (editTemplate, $, _, Backbone) {
'use strict';
PE.Views.EditShape = Backbone.View.extend(_.extend((function() {
// private
return {
// el: '.view-main',
template: _.template(editTemplate),
events: {
},
initialize: function () {
Common.NotificationCenter.on('editcontainer:show', _.bind(this.initEvents, this));
Common.NotificationCenter.on('editcategory:show', _.bind(this.categoryShow, this));
this.isShapeCanFill = true;
},
initEvents: function () {
var me = this;
$('#shape-style').single('click', _.bind(me.showStyle, me));
$('#shape-replace').single('click', _.bind(me.showReplace, me));
$('#shape-reorder').single('click', _.bind(me.showReorder, me));
$('#shape-align').single('click', _.bind(me.showAlign, me));
$('#edit-shape-bordercolor').single('click', _.bind(me.showBorderColor, me));
$('.edit-shape-style .categories a').single('click', _.bind(me.showStyleCategory, me));
Common.Utils.addScrollIfNeed('#edit-shape .pages', '#edit-shape .page');
me.initControls();
},
categoryShow: function(e) {
// if ('edit-shape' == $(e.currentTarget).prop('id')) {
// this.initEvents();
// }
},
// Render layout
render: function () {
var shapes = Common.SharedSettings.get('shapes').slice();
shapes.splice(0, 1); // Remove line shapes
this.layout = $('<div/>').append(this.template({
android : Common.SharedSettings.get('android'),
phone : Common.SharedSettings.get('phone'),
shapes : shapes,
scope : this
}));
return this;
},
rootLayout: function () {
if (this.layout) {
return this.layout
.find('#edit-shape-root')
.html();
}
return '';
},
initControls: function () {
//
},
showPage: function (templateId, suspendEvent) {
var rootView = PE.getController('EditContainer').rootView;
if (rootView && this.layout) {
var $content = this.layout.find(templateId);
// Android fix for navigation
if (Framework7.prototype.device.android) {
$content.find('.page').append($content.find('.navbar'));
}
rootView.router.load({
content: $content.html()
});
if (suspendEvent !== true) {
this.fireEvent('page:show', [this, templateId]);
}
this.initEvents();
}
},
showStyleCategory: function (e) {
// remove android specific style
$('.page[data-page=edit-shape-style] .list-block.inputs-list').removeClass('inputs-list');
},
showStyle: function () {
var me = this;
var selector = this.isShapeCanFill ? '#edit-shape-style' : '#edit-shape-style-nofill';
this.showPage(selector, true);
if (!this.isShapeCanFill)
this.showStyleCategory();
this.paletteFillColor = new Common.UI.ThemeColorPalette({
el: $('#tab-shape-fill'),
transparent: true
});
this.paletteFillColor.on('customcolor', function () {
me.showCustomFillColor();
});
var template = _.template(['<div class="list-block">',
'<ul>',
'<li>',
'<a id="edit-shape-add-custom-color" class="item-link">',
'<div class="item-content">',
'<div class="item-inner">',
'<div class="item-title"><%= scope.textAddCustomColor %></div>',
'</div>',
'</div>',
'</a>',
'</li>',
'</ul>',
'</div>'].join(''));
$('#tab-shape-fill').append(template({scope: this}));
$('#edit-shape-add-custom-color').single('click', _.bind(this.showCustomFillColor, this));
Common.Utils.addScrollIfNeed('.page[data-page=edit-shape-style]', '.page[data-page=edit-shape-style] .page-content');
this.fireEvent('page:show', [this, selector]);
},
showCustomFillColor: function () {
var me = this,
selector = '#edit-shape-custom-color-view';
me.showPage(selector, true);
me.customColorPicker = new Common.UI.HsbColorPicker({
el: $('.page[data-page=edit-shape-custom-color] .page-content'),
color: me.paletteFillColor.currentColor
});
me.customColorPicker.on('addcustomcolor', function (colorPicker, color) {
me.paletteFillColor.addNewDynamicColor(colorPicker, color);
PE.getController('EditContainer').rootView.router.back();
});
me.fireEvent('page:show', [me, selector]);
},
showReplace: function () {
this.showPage('#edit-shape-replace');
Common.Utils.addScrollIfNeed('.page.shape-replace', '.page.shape-replace .page-content');
},
showReorder: function () {
this.showPage('#edit-shape-reorder');
Common.Utils.addScrollIfNeed('.page.shape-reorder', '.page.shape-reorder .page-content');
},
showAlign: function () {
this.showPage('#edit-shape-align');
Common.Utils.addScrollIfNeed('.page.shape-align', '.page.shape-align .page-content');
},
showBorderColor: function () {
var me = this;
var selector = '#edit-shape-border-color-view';
this.showPage(selector, true);
this.paletteBorderColor = new Common.UI.ThemeColorPalette({
el: $('.page[data-page=edit-shape-border-color] .page-content')
});
this.paletteBorderColor.on('customcolor', function () {
me.showCustomBorderColor();
});
var template = _.template(['<div class="list-block">',
'<ul>',
'<li>',
'<a id="edit-shape-add-custom-border-color" class="item-link">',
'<div class="item-content">',
'<div class="item-inner">',
'<div class="item-title"><%= scope.textAddCustomColor %></div>',
'</div>',
'</div>',
'</a>',
'</li>',
'</ul>',
'</div>'].join(''));
$('.page[data-page=edit-shape-border-color] .page-content').append(template({scope: this}));
$('#edit-shape-add-custom-border-color').single('click', _.bind(this.showCustomBorderColor, this));
this.fireEvent('page:show', [this, selector]);
},
showCustomBorderColor: function () {
var me = this,
selector = '#edit-shape-custom-color-view';
me.showPage(selector, true);
me.customBorderColorPicker = new Common.UI.HsbColorPicker({
el: $('.page[data-page=edit-shape-custom-color] .page-content'),
color: me.paletteBorderColor.currentColor
});
me.customBorderColorPicker.on('addcustomcolor', function (colorPicker, color) {
me.paletteBorderColor.addNewDynamicColor(colorPicker, color);
me.paletteFillColor.updateDynamicColors();
me.paletteFillColor.select(me.paletteFillColor.currentColor);
PE.getController('EditContainer').rootView.router.back();
});
me.fireEvent('page:show', [me, selector]);
},
textStyle: 'Style',
textReplace: 'Replace',
textReorder: 'Reorder',
textRemoveShape: 'Remove Shape',
textBack: 'Back',
textToForeground: 'Bring to Foreground',
textToBackground: 'Send to Background',
textForward: 'Move Forward',
textBackward: 'Move Backward',
textFill: 'Fill',
textBorder: 'Border',
textEffects: 'Effects',
textSize: 'Size',
textColor: 'Color',
textOpacity: 'Opacity',
textAlign: 'Align',
textAlignLeft: 'Align Left',
textAlignRight: 'Align Right',
textAlignCenter: 'Align Center',
textAlignTop: 'Align Top',
textAlignBottom: 'Align Bottom',
textAlignMiddle: 'Align Middle',
txtDistribHor: 'Distribute Horizontally',
txtDistribVert: 'Distribute Vertically',
textAddCustomColor: 'Add Custom Color',
textCustomColor: 'Custom Color'
}
})(), PE.Views.EditShape || {}))
});

View file

@ -1,443 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* EditSlide.js
* Presentation Editor
*
* Created by Julia Radzhabova on 12/07/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'text!presentationeditor/mobile/app/template/EditSlide.template',
'jquery',
'underscore',
'backbone',
'common/mobile/lib/component/ThemeColorPalette',
'common/mobile/lib/component/HsbColorPicker'
], function (editTemplate, $, _, Backbone) {
'use strict';
PE.Views.EditSlide = Backbone.View.extend(_.extend((function() {
// private
var _layouts = [],
_arrCurrentEffectTypes = [];
return {
// el: '.view-main',
template: _.template(editTemplate),
events: {
},
initialize: function () {
Common.NotificationCenter.on('editcontainer:show', _.bind(this.initEvents, this));
Common.NotificationCenter.on('editcategory:show', _.bind(this.categoryShow, this));
this._arrEffectType = [
{displayValue: this.textSmoothly, value: Asc.c_oAscSlideTransitionParams.Fade_Smoothly},
{displayValue: this.textBlack, value: Asc.c_oAscSlideTransitionParams.Fade_Through_Black},
{displayValue: this.textLeft, value: Asc.c_oAscSlideTransitionParams.Param_Left},
{displayValue: this.textTop, value: Asc.c_oAscSlideTransitionParams.Param_Top},
{displayValue: this.textRight, value: Asc.c_oAscSlideTransitionParams.Param_Right},
{displayValue: this.textBottom, value: Asc.c_oAscSlideTransitionParams.Param_Bottom},
{displayValue: this.textTopLeft, value: Asc.c_oAscSlideTransitionParams.Param_TopLeft},
{displayValue: this.textTopRight, value: Asc.c_oAscSlideTransitionParams.Param_TopRight},
{displayValue: this.textBottomLeft, value: Asc.c_oAscSlideTransitionParams.Param_BottomLeft},
{displayValue: this.textBottomRight, value: Asc.c_oAscSlideTransitionParams.Param_BottomRight},
{displayValue: this.textVerticalIn, value: Asc.c_oAscSlideTransitionParams.Split_VerticalIn},
{displayValue: this.textVerticalOut, value: Asc.c_oAscSlideTransitionParams.Split_VerticalOut},
{displayValue: this.textHorizontalIn, value: Asc.c_oAscSlideTransitionParams.Split_HorizontalIn},
{displayValue: this.textHorizontalOut, value: Asc.c_oAscSlideTransitionParams.Split_HorizontalOut},
{displayValue: this.textClockwise, value: Asc.c_oAscSlideTransitionParams.Clock_Clockwise},
{displayValue: this.textCounterclockwise, value: Asc.c_oAscSlideTransitionParams.Clock_Counterclockwise},
{displayValue: this.textWedge, value: Asc.c_oAscSlideTransitionParams.Clock_Wedge},
{displayValue: this.textZoomIn, value: Asc.c_oAscSlideTransitionParams.Zoom_In},
{displayValue: this.textZoomOut, value: Asc.c_oAscSlideTransitionParams.Zoom_Out},
{displayValue: this.textZoomRotate, value: Asc.c_oAscSlideTransitionParams.Zoom_AndRotate}
];
this._arrEffect = [
{displayValue: this.textNone, value: Asc.c_oAscSlideTransitionTypes.None},
{displayValue: this.textFade, value: Asc.c_oAscSlideTransitionTypes.Fade},
{displayValue: this.textPush, value: Asc.c_oAscSlideTransitionTypes.Push},
{displayValue: this.textWipe, value: Asc.c_oAscSlideTransitionTypes.Wipe},
{displayValue: this.textSplit, value: Asc.c_oAscSlideTransitionTypes.Split},
{displayValue: this.textUnCover, value: Asc.c_oAscSlideTransitionTypes.UnCover},
{displayValue: this.textCover, value: Asc.c_oAscSlideTransitionTypes.Cover},
{displayValue: this.textClock, value: Asc.c_oAscSlideTransitionTypes.Clock},
{displayValue: this.textZoom, value: Asc.c_oAscSlideTransitionTypes.Zoom}
];
},
initEvents: function () {
var me = this;
$('#slide-theme').single('click', _.bind(me.showTheme, me));
$('#slide-change-layout').single('click', _.bind(me.showLayout, me));
$('#slide-transition').single('click', _.bind(me.showTransition, me));
$('#slide-style').single('click', _.bind(me.showStyle, me));
$('#edit-slide-effect').single('click', _.bind(me.showEffect, me));
$('#edit-slide-effect-type').single('click', _.bind(me.showEffectType, me));
Common.Utils.addScrollIfNeed('#edit-slide .pages', '#edit-slide .page');
me.initControls();
},
categoryShow: function(e) {
// if ('edit-slide' == $(e.currentTarget).prop('id')) {
// this.initEvents();
// }
},
// Render layout
render: function () {
this.layout = $('<div/>').append(this.template({
android : Common.SharedSettings.get('android'),
phone : Common.SharedSettings.get('phone'),
scope : this
}));
return this;
},
rootLayout: function () {
if (this.layout) {
return this.layout
.find('#edit-slide-root')
.html();
}
return '';
},
initControls: function () {
//
},
showPage: function (templateId, suspendEvent) {
var rootView = PE.getController('EditContainer').rootView;
if (rootView && this.layout) {
var $content = this.layout.find(templateId);
// Android fix for navigation
if (Framework7.prototype.device.android) {
$content.find('.page').append($content.find('.navbar'));
}
rootView.router.load({
content: $content.html()
});
if (suspendEvent !== true) {
this.fireEvent('page:show', [this, templateId]);
}
this.initEvents();
}
Common.Utils.addScrollIfNeed('.page[data-page=editslide-effect]', '.page[data-page=editslide-effect] .page-content');
Common.Utils.addScrollIfNeed('.page[data-page=editslide-effect-type]', '.page[data-page=editslide-effect-type] .page-content');
Common.Utils.addScrollIfNeed('.page[data-page=edit-slide-style]', '.page[data-page=edit-slide-style] .page-content');
},
showStyle: function () {
var me = this;
this.showPage('#edit-slide-style', true);
this.paletteFillColor = new Common.UI.ThemeColorPalette({
el: $('.page[data-page=edit-slide-style] .page-content'),
transparent: true
});
this.paletteFillColor.on('customcolor', function () {
me.showCustomSlideColor();
});
var template = _.template(['<div class="list-block">',
'<ul>',
'<li>',
'<a id="edit-slide-add-custom-color" class="item-link">',
'<div class="item-content">',
'<div class="item-inner">',
'<div class="item-title"><%= scope.textAddCustomColor %></div>',
'</div>',
'</div>',
'</a>',
'</li>',
'</ul>',
'</div>'].join(''));
$('.page[data-page=edit-slide-style] .page-content').append(template({scope: this}));
$('#edit-slide-add-custom-color').single('click', _.bind(this.showCustomSlideColor, this));
this.fireEvent('page:show', [this, '#edit-slide-style']);
},
showCustomSlideColor: function () {
var me = this,
selector = '#edit-slide-custom-color-view';
me.showPage(selector, true);
me.customColorPicker = new Common.UI.HsbColorPicker({
el: $('.page[data-page=edit-slide-custom-color] .page-content'),
color: me.paletteFillColor.currentColor
});
me.customColorPicker.on('addcustomcolor', function (colorPicker, color) {
me.paletteFillColor.addNewDynamicColor(colorPicker, color);
PE.getController('EditContainer').rootView.router.back();
});
me.fireEvent('page:show', [me, selector]);
},
showLayout: function () {
this.showPage('#edit-slide-layout', true);
this.renderLayouts();
Common.Utils.addScrollIfNeed('.view.edit-root-view .page-on-center', '.view.edit-root-view .page-on-center .page-content');
this.fireEvent('page:show', [this, '#edit-slide-layout']);
},
showTheme: function () {
this.showPage('#edit-slide-theme');
},
showTransition: function () {
this.showPage('#edit-slide-transition');
// remove android specific style
$('.page[data-page=edit-slide-transition] .list-block.inputs-list').removeClass('inputs-list');
Common.Utils.addScrollIfNeed('.page[data-page=edit-slide-transition]', '.page[data-page=edit-slide-transition] .page-content');
},
showEffect: function () {
this.showPage('#editslide-effect');
},
showEffectType: function () {
this.showPage('#editslide-effect-type');
},
updateLayouts: function () {
_layouts = Common.SharedSettings.get('slidelayouts');
this.renderLayouts();
},
renderLayouts: function() {
var $layoutContainer = $('.container-edit .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);
}
},
renderThemes: function() {
var $themeContainer = $('.container-edit .slide-theme'),
_arr = PE.getController('EditSlide').getThemes();
if ($themeContainer.length > 0 && _arr.length>0) {
var columns = parseInt(($themeContainer.width()-20) / 95), // magic
row = -1,
themes = [];
_.each(_arr, function (theme, index) {
if (0 == index % columns) {
themes.push([]);
row++
}
themes[row].push(theme);
});
var template = _.template([
'<% _.each(themes, function(row) { %>',
'<div class="row">',
'<% _.each(row, function(theme) { %>',
'<div class="item-theme" data-type="<%= theme.themeId %>" style="' + '<% if (typeof theme.imageUrl !== "undefined") { %>' + 'background-image: url(<%= theme.imageUrl %>);' + '<% } %> background-position: 0 -<%= theme.offsety %>px;"></div>',
'<% }); %>',
'</div>',
'<% }); %>'
].join(''))({
themes: themes
});
$themeContainer.html(template);
}
},
renderEffectTypes: function() {
var $typeContainer = $('#page-editslide-effect-type .list-block ul');
if ($typeContainer.length > 0 && _arrCurrentEffectTypes.length>0) {
var template = _.template([
'<% _.each(types, function(item) { %>',
'<li>',
'<label class="label-radio item-content">',
'<input type="radio" name="editslide-effect-type" value="<%= item.value %>">',
'<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>',
'<div class="item-inner">',
'<div class="item-title"><%= item.displayValue %></div>',
'</div>',
'</label>',
'</li>',
'<% }); %>'
].join(''))({
android : Common.SharedSettings.get('android'),
types: _arrCurrentEffectTypes
});
$typeContainer.html(template);
}
},
fillEffectTypes: function (type) {
_arrCurrentEffectTypes = [];
switch (type) {
case Asc.c_oAscSlideTransitionTypes.Fade:
_arrCurrentEffectTypes.push(this._arrEffectType[0], this._arrEffectType[1]);
break;
case Asc.c_oAscSlideTransitionTypes.Push:
_arrCurrentEffectTypes = this._arrEffectType.slice(2, 6);
break;
case Asc.c_oAscSlideTransitionTypes.Wipe:
_arrCurrentEffectTypes = this._arrEffectType.slice(2, 10);
break;
case Asc.c_oAscSlideTransitionTypes.Split:
_arrCurrentEffectTypes = this._arrEffectType.slice(10, 14);
break;
case Asc.c_oAscSlideTransitionTypes.UnCover:
_arrCurrentEffectTypes = this._arrEffectType.slice(2, 10);
break;
case Asc.c_oAscSlideTransitionTypes.Cover:
_arrCurrentEffectTypes = this._arrEffectType.slice(2, 10);
break;
case Asc.c_oAscSlideTransitionTypes.Clock:
_arrCurrentEffectTypes = this._arrEffectType.slice(14, 17);
break;
case Asc.c_oAscSlideTransitionTypes.Zoom:
_arrCurrentEffectTypes = this._arrEffectType.slice(17);
break;
}
return (_arrCurrentEffectTypes.length>0) ? _arrCurrentEffectTypes[0].value : -1;
},
getEffectName: function(effect) {
for (var i=0; i<this._arrEffect.length; i++) {
if (this._arrEffect[i].value == effect) return this._arrEffect[i].displayValue;
}
return '';
},
getEffectTypeName: function(type) {
for (var i=0; i<_arrCurrentEffectTypes.length; i++) {
if (_arrCurrentEffectTypes[i].value == type) return _arrCurrentEffectTypes[i].displayValue;
}
return '';
},
textTheme: 'Theme',
textStyle: 'Style',
textLayout: 'Layout',
textTransition: 'Transition',
textRemoveSlide: 'Delete Slide',
textDuplicateSlide: 'Duplicate Slide',
textBack: 'Back',
textFill: 'Fill',
textEffect: 'Effect',
textType: 'Type',
textDuration: 'Duration',
textColor: 'Color',
textOpacity: 'Opacity',
textNone: 'None',
textFade: 'Fade',
textPush: 'Push',
textWipe: 'Wipe',
textSplit: 'Split',
textUnCover: 'UnCover',
textCover: 'Cover',
textClock: 'Clock',
textZoom: 'Zoom',
textSmoothly: 'Smoothly',
textBlack: 'Through Black',
textLeft: 'Left',
textTop: 'Top',
textRight: 'Right',
textBottom: 'Bottom',
textTopLeft: 'Top-Left',
textTopRight: 'Top-Right',
textBottomLeft: 'Bottom-Left',
textBottomRight: 'Bottom-Right',
textVerticalIn: 'Vertical In',
textVerticalOut: 'Vertical Out',
textHorizontalIn: 'Horizontal In',
textHorizontalOut: 'Horizontal Out',
textClockwise: 'Clockwise',
textCounterclockwise: 'Counterclockwise',
textWedge: 'Wedge',
textZoomIn: 'Zoom In',
textZoomOut: 'Zoom Out',
textZoomRotate: 'Zoom and Rotate',
textStartOnClick: 'Start On Click',
textDelay: 'Delay',
textApplyAll: 'Apply to All Slides',
textAddCustomColor: 'Add Custom Color',
textCustomColor: 'Custom Color'
}
})(), PE.Views.EditSlide || {}))
});

View file

@ -1,340 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* EditTable.js
* Presentation Editor
*
* Created by Julia Radzhabova on 11/30/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'text!presentationeditor/mobile/app/template/EditTable.template',
'jquery',
'underscore',
'backbone',
'common/mobile/lib/component/ThemeColorPalette',
'common/mobile/lib/component/HsbColorPicker'
], function (editTemplate, $, _, Backbone) {
'use strict';
PE.Views.EditTable = Backbone.View.extend(_.extend((function() {
// private
var _styles = [];
return {
// el: '.view-main',
template: _.template(editTemplate),
events: {
},
initialize: function () {
Common.NotificationCenter.on('editcontainer:show', _.bind(this.initEvents, this));
Common.NotificationCenter.on('editcategory:show', _.bind(this.categoryShow, this));
},
initEvents: function () {
var me = this;
$('#table-style').single('click', _.bind(me.showTableStyle, me));
$('#edit-table-style-options').single('click', _.bind(me.showTableStyleOptions, me));
$('#edit-table-bordercolor').single('click', _.bind(me.showBorderColor, me));
$('.edit-table-style .categories a').single('click', _.bind(me.showStyleCategory, me));
$('#table-reorder').single('click', _.bind(me.showReorder, me));
$('#table-align').single('click', _.bind(me.showAlign, me));
Common.Utils.addScrollIfNeed('#edit-table .pages', '#edit-table .page');
me.initControls();
me.renderStyles();
},
// Render layout
render: function () {
this.layout = $('<div/>').append(this.template({
android : Common.SharedSettings.get('android'),
phone : Common.SharedSettings.get('phone'),
scope : this
}));
return this;
},
rootLayout: function () {
if (this.layout) {
return this.layout
.find('#edit-table-root')
.html();
}
return '';
},
initControls: function () {
//
},
updateStyles: function (styles) {
_styles = styles;
this.renderStyles();
},
renderStyles: function() {
var $styleContainer = $('#edit-table-styles .item-inner');
if ($styleContainer.length > 0) {
var columns = parseInt($styleContainer.width() / 70), // magic
row = -1,
styles = [];
_.each(_styles, function (style, index) {
if (0 == index % columns) {
styles.push([]);
row++
}
styles[row].push(style);
});
var template = _.template([
'<div class="dataview table-styles" style="width: 100%;">',
'<% _.each(styles, function(row) { %>',
'<div class="row">',
'<% _.each(row, function(style) { %>',
'<div data-type="<%= style.templateId %>">',
'<img src="<%= style.imageUrl %>">',
'</div>',
'<% }); %>',
'</div>',
'<% }); %>',
'</div>'
].join(''))({
styles: styles
});
$styleContainer.html(template);
}
},
categoryShow: function(e) {
// if ('edit-shape' == $(e.currentTarget).prop('id')) {
// this.initEvents();
// }
},
showStyleCategory: function (e) {
// remove android specific style
$('.page[data-page=edit-table-style] .list-block.inputs-list').removeClass('inputs-list');
if ($(e.currentTarget).data('type') == 'fill') {
this.fireEvent('page:show', [this, '#edit-table-style']);
}
// Common.Utils.addScrollIfNeed('.page[data-page=edit-table-style] .tabs', '#tab-table-style');
Common.Utils.addScrollIfNeed('#tab-table-style', '#tab-table-style .list-block');
Common.Utils.addScrollIfNeed('#tab-table-fill', '#tab-table-fill .list-block');
Common.Utils.addScrollIfNeed('#tab-table-border', '#tab-table-border .list-block');
},
showPage: function (templateId, suspendEvent) {
var rootView = PE.getController('EditContainer').rootView;
if (rootView && this.layout) {
var $content = this.layout.find(templateId);
// Android fix for navigation
if (Framework7.prototype.device.android) {
$content.find('.page').append($content.find('.navbar'));
}
rootView.router.load({
content: $content.html()
});
if (suspendEvent !== true) {
this.fireEvent('page:show', [this, templateId]);
}
this.initEvents();
}
Common.Utils.addScrollIfNeed('#tab-table-style', '#tab-table-style .list-block');
Common.Utils.addScrollIfNeed('.page.table-reorder', '.page.table-reorder .page-content');
},
showTableStyle: function () {
var me = this;
this.showPage('#edit-table-style', true);
this.paletteFillColor = new Common.UI.ThemeColorPalette({
el: $('#tab-table-fill'),
transparent: true
});
this.paletteFillColor.on('customcolor', function () {
me.showCustomFillColor();
});
var template = _.template(['<div class="list-block">',
'<ul>',
'<li>',
'<a id="edit-table-add-custom-color" class="item-link">',
'<div class="item-content">',
'<div class="item-inner">',
'<div class="item-title"><%= scope.textAddCustomColor %></div>',
'</div>',
'</div>',
'</a>',
'</li>',
'</ul>',
'</div>'].join(''));
$('#tab-table-fill').append(template({scope: this}));
$('#edit-table-add-custom-color').single('click', _.bind(this.showCustomFillColor, this));
this.fireEvent('page:show', [this, '#edit-table-style']);
},
showCustomFillColor: function () {
var me = this,
selector = '#edit-table-custom-color-view';
me.showPage(selector, true);
me.customColorPicker = new Common.UI.HsbColorPicker({
el: $('.page[data-page=edit-table-custom-color] .page-content'),
color: me.paletteFillColor.currentColor
});
me.customColorPicker.on('addcustomcolor', function (colorPicker, color) {
me.paletteFillColor.addNewDynamicColor(colorPicker, color);
PE.getController('EditContainer').rootView.router.back();
});
me.fireEvent('page:show', [me, selector]);
},
showBorderColor: function () {
var me = this;
this.showPage('#edit-table-border-color-view', true);
this.paletteBorderColor = new Common.UI.ThemeColorPalette({
el: $('.page[data-page=edit-table-border-color] .page-content')
});
this.paletteBorderColor.on('customcolor', function () {
me.showCustomBorderColor();
});
var template = _.template(['<div class="list-block">',
'<ul>',
'<li>',
'<a id="edit-table-add-custom-border-color" class="item-link">',
'<div class="item-content">',
'<div class="item-inner">',
'<div class="item-title"><%= scope.textAddCustomColor %></div>',
'</div>',
'</div>',
'</a>',
'</li>',
'</ul>',
'</div>'].join(''));
$('.page[data-page=edit-table-border-color] .page-content').append(template({scope: this}));
$('#edit-table-add-custom-border-color').single('click', _.bind(this.showCustomBorderColor, this));
this.fireEvent('page:show', [this, '#edit-table-border-color-view']);
},
showCustomBorderColor: function() {
var me = this,
selector = '#edit-table-custom-color-view';
me.showPage(selector, true);
me.customBorderColorPicker = new Common.UI.HsbColorPicker({
el: $('.page[data-page=edit-table-custom-color] .page-content'),
color: me.paletteBorderColor.currentColor
});
me.customBorderColorPicker.on('addcustomcolor', function (colorPicker, color) {
me.paletteBorderColor.addNewDynamicColor(colorPicker, color);
me.paletteFillColor.updateDynamicColors();
me.paletteFillColor.select(me.paletteFillColor.currentColor);
PE.getController('EditContainer').rootView.router.back();
});
me.fireEvent('page:show', [me, selector]);
},
showTableStyleOptions: function () {
this.showPage('#edit-table-style-options-view');
},
showReorder: function () {
this.showPage('#edit-table-reorder');
Common.Utils.addScrollIfNeed('.page.table-reorder', '.page.table-reorder .page-content');
},
showAlign: function () {
this.showPage('#edit-table-align');
Common.Utils.addScrollIfNeed('.page.table-align', '.page.table-align .page-content');
},
textRemoveTable: 'Remove Table',
textTableOptions: 'Table Options',
textStyle: 'Style',
textBack: 'Back',
textOptions: 'Options',
textCellMargins: 'Cell Margins',
textFill: 'Fill',
textBorder: 'Border',
textStyleOptions: 'Style Options',
textSize: 'Size',
textColor: 'Color',
textHeaderRow: 'Header Row',
textTotalRow: 'Total Row',
textBandedRow: 'Banded Row',
textFirstColumn: 'First Column',
textLastColumn: 'Last Column',
textBandedColumn: 'Banded Column',
textReorder: 'Reorder',
textToForeground: 'Bring to Foreground',
textToBackground: 'Send to Background',
textForward: 'Move Forward',
textBackward: 'Move Backward',
textAlign: 'Align',
textAlignLeft: 'Align Left',
textAlignRight: 'Align Right',
textAlignCenter: 'Align Center',
textAlignTop: 'Align Top',
textAlignBottom: 'Align Bottom',
textAlignMiddle: 'Align Middle',
txtDistribHor: 'Distribute Horizontally',
txtDistribVert: 'Distribute Vertically',
textAddCustomColor: 'Add Custom Color',
textCustomColor: 'Custom Color'
}
})(), PE.Views.EditTable || {}))
});

View file

@ -1,294 +0,0 @@
/*
*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
/**
* EditText.js
* Presentation Editor
*
* Created by Alexander Yuzhin on 10/4/16
* Copyright (c) 2018 Ascensio System SIA. All rights reserved.
*
*/
define([
'text!presentationeditor/mobile/app/template/EditText.template',
'jquery',
'underscore',
'backbone',
'common/mobile/lib/component/ThemeColorPalette',
'common/mobile/lib/component/HsbColorPicker'
], function (editTemplate, $, _, Backbone) {
'use strict';
PE.Views.EditText = Backbone.View.extend(_.extend((function() {
// private
var _fontsList,
_editTextController;
var _bullets = [
[
{type: -1, thumb: ''},
{type: 1, thumb: 'bullet-01.png'},
{type: 2, thumb: 'bullet-02.png'},
{type: 3, thumb: 'bullet-03.png'}
],
[
{type: 4, thumb: 'bullet-04.png'},
{type: 5, thumb: 'bullet-05.png'},
{type: 6, thumb: 'bullet-06.png'},
{type: 7, thumb: 'bullet-07.png'}
]
];
var _numbers = [
[
{type: -1, thumb: ''},
{type: 4, thumb: 'number-01.png'},
{type: 5, thumb: 'number-02.png'},
{type: 6, thumb: 'number-03.png'}
],
[
{type: 1, thumb: 'number-04.png'},
{type: 2, thumb: 'number-05.png'},
{type: 3, thumb: 'number-06.png'},
{type: 7, thumb: 'number-07.png'}
]
];
return {
// el: '.view-main',
template: _.template(editTemplate),
events: {
},
initialize: function () {
_editTextController = PE.getController('EditText');
Common.NotificationCenter.on('editcontainer:show', _.bind(this.initEvents, this));
},
initEvents: function () {
var me = this;
$('#font-fonts').single('click', _.bind(me.showFonts, me));
$('#font-color').single('click', _.bind(me.showFontColor, me));
$('#font-additional').single('click', _.bind(me.showAdditional, me));
$('#font-line-spacing').single('click', _.bind(me.showLineSpacing, me));
$('#font-bullets').single('click', _.bind(me.showBullets, me));
$('#font-numbers').single('click', _.bind(me.showNumbers, me));
me.initControls();
PE.getController('EditText').initSettings();
Common.Utils.addScrollIfNeed('#edit-text .pages', '#edit-text .page');
},
// Render layout
render: function () {
this.layout = $('<div/>').append(this.template({
android : Common.SharedSettings.get('android'),
phone : Common.SharedSettings.get('phone'),
scope : this,
bullets : _bullets,
numbers : _numbers
}));
return this;
},
rootLayout: function () {
if (this.layout) {
return this.layout
.find('#edit-text-root')
.html();
}
return '';
},
initControls: function () {
//
},
showPage: function (templateId, suspendEvent) {
var rootView = PE.getController('EditContainer').rootView;
if (rootView && this.layout) {
var $content = this.layout.find(templateId);
// Android fix for navigation
if (Framework7.prototype.device.android) {
$content.find('.page').append($content.find('.navbar'));
}
rootView.router.load({
content: $content.html()
});
if (suspendEvent !== true) {
this.fireEvent('page:show', [this, templateId]);
}
}
},
showFonts: function () {
this.showPage('#edit-text-fonts');
var me = this,
$template = $(
'<div>' +
'<li>' +
'<label class="label-radio item-content">' +
'<input type="radio" name="font-name" value="{{name}}">' +
(Framework7.prototype.device.android ? '<div class="item-media"><i class="icon icon-form-radio"></i></div>' : '') +
'<div class="item-inner">' +
'<div class="item-title" style="font-family: \'{{name}}\';">{{name}}</div>' +
'</div>' +
'</label>' +
'</li>' +
'</div>'
);
_fontsList = uiApp.virtualList('#font-list.virtual-list', {
items: PE.getController('EditText').getFonts(),
template: $template.html(),
onItemsAfterInsert: function (list, fragment) {
var fontInfo = _editTextController.getFontInfo();
$('#font-list input[name=font-name]').val([fontInfo.name]);
$('#font-list li').single('click', _.buffered(function (e) {
me.fireEvent('font:click', [me, e]);
}, 100));
}
});
Common.Utils.addScrollIfNeed('.page[data-page=edit-text-font-page]', '.page[data-page=edit-text-font-page] .page-content');
},
showFontColor: function () {
var me = this;
this.showPage('#edit-text-color', true);
this.paletteTextColor = new Common.UI.ThemeColorPalette({
el: $('.page[data-page=edit-text-font-color] .page-content')
});
this.paletteTextColor.on('customcolor', function () {
me.showCustomFontColor();
});
var template = _.template(['<div class="list-block">',
'<ul>',
'<li>',
'<a id="edit-text-add-custom-color" class="item-link">',
'<div class="item-content">',
'<div class="item-inner">',
'<div class="item-title"><%= scope.textAddCustomColor %></div>',
'</div>',
'</div>',
'</a>',
'</li>',
'</ul>',
'</div>'].join(''));
$('.page[data-page=edit-text-font-color] .page-content').append(template({scope: this}));
$('#edit-text-add-custom-color').single('click', _.bind(this.showCustomFontColor, this));
Common.Utils.addScrollIfNeed('.page[data-page=edit-text-font-color]', '.page[data-page=edit-text-font-color] .page-content');
this.fireEvent('page:show', [this, '#edit-text-color']);
},
showCustomFontColor: function () {
var me = this,
selector = '#edit-text-custom-color-view';
me.showPage(selector, true);
me.customColorPicker = new Common.UI.HsbColorPicker({
el: $('.page[data-page=edit-text-custom-color] .page-content'),
color: me.paletteTextColor.currentColor
});
me.customColorPicker.on('addcustomcolor', function (colorPicker, color) {
me.paletteTextColor.addNewDynamicColor(colorPicker, color);
PE.getController('EditContainer').rootView.router.back();
});
me.fireEvent('page:show', [me, selector]);
},
showAdditional: function () {
this.showPage('#edit-text-additional');
Common.Utils.addScrollIfNeed('.page[data-page=edit-text-additional]', '.page[data-page=edit-text-additional] .page-content');
},
showLineSpacing: function () {
this.showPage('#edit-text-linespacing');
Common.Utils.addScrollIfNeed('#page-text-linespacing', '#page-text-linespacing .page-content');
},
showBullets: function () {
this.showPage('#edit-text-bullets');
},
showNumbers: function () {
this.showPage('#edit-text-numbers');
},
textFonts: 'Fonts',
textFontColor: 'Font Color',
textAdditionalFormat: 'Additional Formatting',
textBack: 'Back',
textSize: 'Size',
textFontColors: 'Font Colors',
textAutomatic: 'Automatic',
textAdditional: 'Additional',
textStrikethrough: 'Strikethrough',
textDblStrikethrough: 'Double Strikethrough',
textDblSuperscript: 'Superscript',
textSubscript: 'Subscript',
textSmallCaps: 'Small Caps',
textAllCaps: 'All Caps',
textLetterSpacing: 'Letter Spacing',
textFromText: 'Distance from Text',
textBefore: 'Before',
textAfter: 'After',
textLineSpacing: 'Line Spacing',
textBullets: 'Bullets',
textNone: 'None',
textNumbers: 'Numbers',
textCharacterBold: 'B',
textCharacterItalic: 'I',
textCharacterUnderline: 'U',
textCharacterStrikethrough: 'S',
textAddCustomColor: 'Add Custom Color',
textCustomColor: 'Custom Color'
}
})(), PE.Views.EditText || {}))
});

View file

@ -1,274 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="mobile-web-app-capable" content="yes">
<title>ONLYOFFICE Document Editor</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,300,500,700" rel="stylesheet" type="text/css">
<!-- splash -->
<style type="text/css">
.loadmask {
left: 0;
top: 0;
position: absolute;
height: 100%;
width: 100%;
overflow: hidden;
border: none;
background-color: #f4f4f4;
z-index: 10000;
}
.loadmask > .brendpanel {
width: 100%;
position: absolute;
height: 68px;
background-color: #e2e2e2;
opacity: 0;
}
.loadmask > .brendpanel.visible {
opacity: 1;
}
.loadmask > .brendpanel.android {
height: 80px;
background: #aa5252;
}
.loadmask > .brendpanel > div {
display: flex;
align-items: flex-start;
height: 100%;
}
.loadmask > .brendpanel .loading-logo {
max-width: 200px;
height: 20px;
margin: 0 auto;
margin-top: 12px;
line-height: 14px;
opacity: 0;
}
.loadmask > .brendpanel .loading-logo > img {
display: inline-block;
max-width: 100px;
max-height: 20px;
}
.loadmask > .brendpanel .circle {
width: 28px;
height: 28px;
border-radius: 14px;
margin: 0 16px;
margin-bottom: 10px;
align-self: flex-end;
background: rgba(255, 255, 255, 0.3);
}
.loadmask > .brendpanel.android .circle {
margin-bottom: 12px;
background: rgba(255, 255, 255, 0.2);
}
.loadmask > .placeholder {
background: #f5f5f5;
width: 100%;
height: 100%;
padding-top: 40px;
}
.loadmask > .placeholder.android {
padding-top: 50px;
}
.loadmask > .placeholder .slide-h {
display: flex;
flex-direction: column;
justify-content: center;
flex-grow: 1;
width: 90%;
height: 100%;
margin: 0 auto;
}
.loadmask > .placeholder .slide-v {
display: flex;
position: relative;
flex-direction: column;
padding-bottom: 56.1333%;
}
.loadmask > .placeholder .slide-container {
position: absolute;
height: 100%;
width: 100%;
background: #fbfbfb;
border: 1px solid #dfdfdf;
-webkit-animation: flickerAnimation 2s infinite ease-in-out;
-moz-animation: flickerAnimation 2s infinite ease-in-out;
-o-animation: flickerAnimation 2s infinite ease-in-out;
animation: flickerAnimation 2s infinite ease-in-out;
}
.loadmask > .placeholder .slide-container > .line {
height: 20%;
margin: 0 120px;
border-radius: 6px;
background: #f5f5f5;
}
.loadmask > .placeholder .slide-container > .line.empty {
background: transparent;
}
.loadmask > .placeholder .slide-container > .line:nth-child(1) {
height: 30%;
margin: 10% 80px 0;
}
@keyframes flickerAnimation {
0% { opacity:1; }
50% { opacity:0.3; }
100% { opacity:1; }
}
@-o-keyframes flickerAnimation{
0% { opacity:1; }
50% { opacity:0.3; }
100% { opacity:1; }
}
@-moz-keyframes flickerAnimation{
0% { opacity:1; }
50% { opacity:0.3; }
100% { opacity:1; }
}
@-webkit-keyframes flickerAnimation{
0% { opacity:1; }
50% { opacity:0.3; }
100% { opacity:1; }
}
</style>
</head>
<body>
<div id="loading-mask" class="loadmask">
<div class="brendpanel">
<div>
<div class="circle"></div>
<div class="loading-logo">
</div>
<div class="circle"></div>
</div>
</div>
<div class="placeholder">
<div class="slide-h">
<div class="slide-v">
<div class="slide-container">
<div class="line"></div>
<div class="line empty"></div>
<div class="line"></div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var ua = navigator.userAgent;
if (/Sailfish/.test(ua) || /Jolla/.test(ua)) {
document.write('<script type="text/javascript" src="../../../vendor/iscroll/iscroll.min.js"><\/script>');
if (!/Android/.test(ua)) {
var ua = navigator.userAgent + ';Android 5.0;';
Object.defineProperty(navigator, 'userAgent', {
get: function () { return ua; }
});
}
}
function getUrlParams() {
var e,
a = /\+/g, // Regex for replacing addition symbol with a space
r = /([^&=]+)=?([^&]*)/g,
d = function (s) { return decodeURIComponent(s.replace(a, " ")); },
q = window.location.search.substring(1),
urlParams = {};
while (e = r.exec(q))
urlParams[d(e[1])] = d(e[2]);
return urlParams;
}
function encodeUrlParam(str) {
return str.replace(/&/g, '&amp;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&#39;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;');
}
var params = getUrlParams(),
lang = (params["lang"] || 'en').split(/[\-\_]/)[0],
logo = /*params["headerlogo"] ? encodeUrlParam(params["headerlogo"]) : */null;
var logoOO = null;
if (!logo) {
logoOO = /Android/.test(navigator.userAgent) ? "../../../apps/presentationeditor/mobile/resources/img/header/header-logo-android.png" : "../../../apps/presentationeditor/mobile/resources/img/header/header-logo-ios.png";
}
window.frameEditorId = params["frameEditorId"];
window.parentOrigin = params["parentOrigin"];
var brendpanel = document.getElementsByClassName('brendpanel')[0];
if (brendpanel) {
if (/Android/.test(navigator.userAgent)) {
brendpanel.classList.add('android');
}
brendpanel.classList.add('visible');
var elem = document.querySelector('.loading-logo');
if (elem) {
logo && (elem.innerHTML = '<img src=' + logo + '>');
logoOO && (elem.innerHTML = '<img src=' + logoOO + '>');
elem.style.opacity = 1;
}
}
var placeholder = document.getElementsByClassName('placeholder')[0];
if (placeholder && /Android/.test(navigator.userAgent)) {
placeholder.classList.add('android');
}
window.requireTimeourError = function(){
var reqerr;
if ( lang == 'de') reqerr = 'Die Verbindung ist zu langsam, einige Komponenten konnten nicht geladen werden. Aktualisieren Sie bitte die Seite.';
else if ( lang == 'es') reqerr = 'La conexión es muy lenta, algunos de los componentes no han podido cargar. Por favor recargue la página.';
else if ( lang == 'fr') reqerr = 'La connexion est trop lente, certains des composants n\'ons pas pu être chargé. Veuillez recharger la page.';
else if ( lang == 'ru') reqerr = 'Слишком медленное соединение, не удается загрузить некоторые компоненты. Пожалуйста, обновите страницу.';
else reqerr = 'The connection is too slow, some of the components could not be loaded. Please reload the page.';
return reqerr;
};
var requireTimeoutID = setTimeout(function(){
window.alert(window.requireTimeourError());
window.location.reload();
}, 30000);
var require = {
waitSeconds: 30,
callback: function(){
clearTimeout(requireTimeoutID);
}
};
</script>
<script data-main="app" src="../../../vendor/requirejs/require.js"></script>
</body>
</html>

View file

@ -1,264 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="mobile-web-app-capable" content="yes">
<title>ONLYOFFICE Presentations</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,300,500,700" rel="stylesheet" type="text/css">
<!-- App styles -->
<!-- splash -->
<style type="text/css">
.loadmask {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
overflow: hidden;
border: none;
background-color: #f4f4f4;
z-index: 10000;
}
.loader-page {
width: 100%;
height: 170px;
bottom: 42%;
position: absolute;
text-align: center;
line-height: 10px;
}
.loader-logo {
max-height: 160px;
margin-bottom: 10px;
}
.loader-page-romb {
width: 40px;
display: inline-block;
}
.loader-page-text {
width: 100%;
bottom: 42%;
position: absolute;
text-align: center;
color: #888;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
line-height: 20px;
}
.loader-page-text-loading {
font-size: 14px;
}
.loader-page-text-customer {
font-size: 16px;
margin-bottom: 5px;
}
.romb {
width: 40px;
height: 40px;
-webkit-transform: rotate(135deg) skew(20deg, 20deg);
-moz-transform: rotate(135deg) skew(20deg, 20deg);
-ms-transform: rotate(135deg) skew(20deg, 20deg);
-o-transform: rotate(135deg) skew(20deg, 20deg);
position: absolute;
background: red;
border-radius: 6px;
-webkit-animation: movedown 3s infinite ease;
-moz-animation: movedown 3s infinite ease;
-ms-animation: movedown 3s infinite ease;
-o-animation: movedown 3s infinite ease;
animation: movedown 3s infinite ease;
}
#blue {
z-index: 3;
background: #55bce6;
-webkit-animation-name: blue;
-moz-animation-name: blue;
-ms-animation-name: blue;
-o-animation-name: blue;
animation-name: blue;
}
#red {
z-index:1;
background: #de7a59;
-webkit-animation-name: red;
-moz-animation-name: red;
-ms-animation-name: red;
-o-animation-name: red;
animation-name: red;
}
#green {
z-index: 2;
background: #a1cb5c;
-webkit-animation-name: green;
-moz-animation-name: green;
-ms-animation-name: green;
-o-animation-name: green;
animation-name: green;
}
@-webkit-keyframes red {
0% { top:120px; background: #de7a59; }
10% { top:120px; background: #F2CBBF; }
14% { background: #f4f4f4; top:120px; }
15% { background: #f4f4f4; top:0;}
20% { background: #E6E4E4; }
30% { background: #D2D2D2; }
40% { top:120px; }
100% { top:120px; background: #de7a59; }
}
@keyframes red {
0% { top:120px; background: #de7a59; }
10% { top:120px; background: #F2CBBF; }
14% { background: #f4f4f4; top:120px; }
15% { background: #f4f4f4; top:0; }
20% { background: #E6E4E4; }
30% { background: #D2D2D2; }
40% { top:120px; }
100% { top:120px; background: #de7a59; }
}
@-webkit-keyframes green {
0% { top:110px; background: #a1cb5c; opacity:1; }
10% { top:110px; background: #CBE0AC; opacity:1; }
14% { background: #f4f4f4; top:110px; opacity:1; }
15% { background: #f4f4f4; top:0; opacity:1; }
20% { background: #f4f4f4; top:0; opacity:0; }
25% { background: #EFEFEF; top:0; opacity:1; }
30% { background:#E6E4E4; }
70% { top:110px; }
100% { top:110px; background: #a1cb5c; }
}
@keyframes green {
0% { top:110px; background: #a1cb5c; opacity:1; }
10% { top:110px; background: #CBE0AC; opacity:1; }
14% { background: #f4f4f4; top:110px; opacity:1; }
15% { background: #f4f4f4; top:0; opacity:1; }
20% { background: #f4f4f4; top:0; opacity:0; }
25% { background: #EFEFEF; top:0; opacity:1; }
30% { background:#E6E4E4; }
70% { top:110px; }
100% { top:110px; background: #a1cb5c; }
}
@-webkit-keyframes blue {
0% { top:100px; background: #55bce6; opacity:1; }
10% { top:100px; background: #BFE8F8; opacity:1; }
14% { background: #f4f4f4; top:100px; opacity:1; }
15% { background: #f4f4f4; top:0; opacity:1; }
20% { background: #f4f4f4; top:0; opacity:0; }
25% { background: #f4f4f4; top:0; opacity:0; }
45% { background: #EFEFEF; top:0; opacity:0.2; }
100% { top:100px; background: #55bce6; }
}
@keyframes blue {
0% { top:100px; background: #55bce6; opacity:1; }
10% { top:100px; background: #BFE8F8; opacity:1; }
14% { background: #f4f4f4; top:100px; opacity:1; }
15% { background: #f4f4f4; top:0; opacity:1; }
20% { background: #f4f4f4; top:0; opacity:0; }
25% { background: #fff; top:0; opacity:0; }
45% { background: #EFEFEF; top:0; opacity:0.2; }
100% { top:100px; background: #55bce6; }
}
</style>
</head>
<body>
<script type="text/javascript">
function getUrlParams() {
var e,
a = /\+/g, // Regex for replacing addition symbol with a space
r = /([^&=]+)=?([^&]*)/g,
d = function (s) { return decodeURIComponent(s.replace(a, " ")); },
q = window.location.search.substring(1),
urlParams = {};
while (e = r.exec(q))
urlParams[d(e[1])] = d(e[2]);
return urlParams;
}
function encodeUrlParam(str) {
return str.replace(/&/g, '&amp;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&#39;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;');
}
var params = getUrlParams(),
lang = (params["lang"] || 'en').split(/[\-\_]/)[0],
customer = params["customer"] ? ('<div class="loader-page-text-customer">' + encodeUrlParam(params["customer"]) + '</div>') : '',
margin = (customer !== '') ? 50 : 20,
loading = 'Loading...',
logo = params["logo"] ? ((params["logo"] !== 'none') ? ('<img src="' + encodeUrlParam(params["logo"]) + '" class="loader-logo" />') : '') : null;
window.frameEditorId = params["frameEditorId"];
window.parentOrigin = params["parentOrigin"];
if ( lang == 'de') loading = 'Ladevorgang...';
else if ( lang == 'es') loading = 'Cargando...';
else if ( lang == 'fr') loading = 'Chargement en cours...';
else if ( lang == 'it') loading = 'Caricamento in corso...';
else if ( lang == 'pt') loading = 'Carregando...';
else if ( lang == 'ru') loading = 'Загрузка...';
else if ( lang == 'sl') loading = 'Nalaganje...';
else if ( lang == 'tr') loading = 'Yükleniyor...';
else if ( lang == 'bg') loading = 'Зареждане...';
else if ( lang == 'cs') loading = 'Nahrávám...';
else if ( lang == 'hu') loading = 'Betöltés...';
else if ( lang == 'ja') loading = '読み込み中...';
else if ( lang == 'ko') loading = '로드 중...';
else if ( lang == 'lv') loading = 'Ieladēšana ...';
else if ( lang == 'nl') loading = 'Laden...';
else if ( lang == 'pl') loading = 'Ładowanie...';
else if ( lang == 'sk') loading = 'Nahrávam...';
else if ( lang == 'uk') loading = 'Завантаження...';
else if ( lang == 'vi') loading = 'Đang tải...';
else if ( lang == 'zh') loading = '加载中...';
document.write(
'<div id="loading-mask" class="loadmask">' +
'<div class="loader-page" style="margin-bottom: ' + margin + 'px;' + ((logo!==null) ? 'height: auto;' : '') + '">' +
((logo!==null) ? logo :
'<div class="loader-page-romb">' +
'<div class="romb" id="blue"></div>' +
'<div class="romb" id="green"></div>' +
'<div class="romb" id="red"></div>' +
'</div>') +
'</div>' +
'<div class="loader-page-text">' + customer +
'<div class="loader-page-text-loading">' + loading + '</div>' +
'</div>' +
'</div>');
</script>
<script type="text/javascript" src="../../../vendor/jquery/jquery.min.js"></script>
<script type="text/javascript" src="../../../vendor/xregexp/xregexp-all-min.js"></script>
<script type="text/javascript" src="../../../../sdkjs/develop/sdkjs/slide/scripts.js"></script>
<script>
var ua = navigator.userAgent;
if (/Sailfish/.test(ua) || /Jolla/.test(ua)) {
document.write('<script type="text/javascript" src="../../../vendor/iscroll/iscroll.min.js"><\/script>');
if (!/Android/.test(ua)) {
var ua = navigator.userAgent + ';Android 5.0;';
Object.defineProperty(navigator, 'userAgent', {
get: function () { return ua; }
});
}
}
window.sdk_scripts.forEach(function(item){
document.write('<script type="text/javascript" src="' + item + '"><\/script>');
});
window.requireTimeourError = function(){
var reqerr;
if ( lang == 'de') reqerr = 'Die Verbindung ist zu langsam, einige Komponenten konnten nicht geladen werden. Aktualisieren Sie bitte die Seite.';
else if ( lang == 'es') reqerr = 'La conexión es muy lenta, algunos de los componentes no han podido cargar. Por favor recargue la página.';
else if ( lang == 'fr') reqerr = 'La connexion est trop lente, certains des composants n\'ons pas pu être chargé. Veuillez recharger la page.';
else if ( lang == 'ru') reqerr = 'Слишком медленное соединение, не удается загрузить некоторые компоненты. Пожалуйста, обновите страницу.';
else reqerr = 'The connection is too slow, some of the components could not be loaded. Please reload the page.';
return reqerr;
};
</script>
<!-- application -->
<script data-main="app-dev" src="../../../vendor/requirejs/require.js"></script>
</body>
</html>

View file

@ -1,293 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="mobile-web-app-capable" content="yes">
<title>ONLYOFFICE Document Editor</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,300,500,700" rel="stylesheet" type="text/css">
<!-- splash -->
<style type="text/css">
.loadmask {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
overflow: hidden;
border: none;
background-color: #f4f4f4;
z-index: 10000;
}
.loader-page {
width: 100%;
height: 170px;
bottom: 42%;
position: absolute;
text-align: center;
line-height: 10px;
}
.loader-logo {
max-height: 160px;
margin-bottom: 10px;
}
.loader-page-romb {
width: 40px;
display: inline-block;
}
.loader-page-text {
width: 100%;
bottom: 42%;
position: absolute;
text-align: center;
color: #888;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
line-height: 20px;
}
.loader-page-text-loading {
font-size: 14px;
}
.loader-page-text-customer {
font-size: 16px;
margin-bottom: 5px;
}
.romb {
width: 40px;
height: 40px;
-webkit-transform: rotate(135deg) skew(20deg, 20deg);
-moz-transform: rotate(135deg) skew(20deg, 20deg);
-ms-transform: rotate(135deg) skew(20deg, 20deg);
-o-transform: rotate(135deg) skew(20deg, 20deg);
position: absolute;
background: red;
border-radius: 6px;
-webkit-animation: movedown 3s infinite ease;
-moz-animation: movedown 3s infinite ease;
-ms-animation: movedown 3s infinite ease;
-o-animation: movedown 3s infinite ease;
animation: movedown 3s infinite ease;
}
#blue {
z-index: 3;
background: #55bce6;
-webkit-animation-name: blue;
-moz-animation-name: blue;
-ms-animation-name: blue;
-o-animation-name: blue;
animation-name: blue;
}
#red {
z-index:1;
background: #de7a59;
-webkit-animation-name: red;
-moz-animation-name: red;
-ms-animation-name: red;
-o-animation-name: red;
animation-name: red;
}
#green {
z-index: 2;
background: #a1cb5c;
-webkit-animation-name: green;
-moz-animation-name: green;
-ms-animation-name: green;
-o-animation-name: green;
animation-name: green;
}
@-webkit-keyframes red {
0% { top:120px; background: #de7a59; }
10% { top:120px; background: #F2CBBF; }
14% { background: #f4f4f4; top:120px; }
15% { background: #f4f4f4; top:0;}
20% { background: #E6E4E4; }
30% { background: #D2D2D2; }
40% { top:120px; }
100% { top:120px; background: #de7a59; }
}
@keyframes red {
0% { top:120px; background: #de7a59; }
10% { top:120px; background: #F2CBBF; }
14% { background: #f4f4f4; top:120px; }
15% { background: #f4f4f4; top:0; }
20% { background: #E6E4E4; }
30% { background: #D2D2D2; }
40% { top:120px; }
100% { top:120px; background: #de7a59; }
}
@-webkit-keyframes green {
0% { top:110px; background: #a1cb5c; opacity:1; }
10% { top:110px; background: #CBE0AC; opacity:1; }
14% { background: #f4f4f4; top:110px; opacity:1; }
15% { background: #f4f4f4; top:0; opacity:1; }
20% { background: #f4f4f4; top:0; opacity:0; }
25% { background: #EFEFEF; top:0; opacity:1; }
30% { background:#E6E4E4; }
70% { top:110px; }
100% { top:110px; background: #a1cb5c; }
}
@keyframes green {
0% { top:110px; background: #a1cb5c; opacity:1; }
10% { top:110px; background: #CBE0AC; opacity:1; }
14% { background: #f4f4f4; top:110px; opacity:1; }
15% { background: #f4f4f4; top:0; opacity:1; }
20% { background: #f4f4f4; top:0; opacity:0; }
25% { background: #EFEFEF; top:0; opacity:1; }
30% { background:#E6E4E4; }
70% { top:110px; }
100% { top:110px; background: #a1cb5c; }
}
@-webkit-keyframes blue {
0% { top:100px; background: #55bce6; opacity:1; }
10% { top:100px; background: #BFE8F8; opacity:1; }
14% { background: #f4f4f4; top:100px; opacity:1; }
15% { background: #f4f4f4; top:0; opacity:1; }
20% { background: #f4f4f4; top:0; opacity:0; }
25% { background: #f4f4f4; top:0; opacity:0; }
45% { background: #EFEFEF; top:0; opacity:0.2; }
100% { top:100px; background: #55bce6; }
}
@keyframes blue {
0% { top:100px; background: #55bce6; opacity:1; }
10% { top:100px; background: #BFE8F8; opacity:1; }
14% { background: #f4f4f4; top:100px; opacity:1; }
15% { background: #f4f4f4; top:0; opacity:1; }
20% { background: #f4f4f4; top:0; opacity:0; }
25% { background: #fff; top:0; opacity:0; }
45% { background: #EFEFEF; top:0; opacity:0.2; }
100% { top:100px; background: #55bce6; }
}
</style>
</head>
<body>
<script type="text/javascript">
var ua = navigator.userAgent;
if (/Sailfish/.test(ua) || /Jolla/.test(ua)) {
document.write('<script type="text/javascript" src="../../../vendor/iscroll/iscroll.min.js"><\/script>');
if (!/Android/.test(ua)) {
var ua = navigator.userAgent + ';Android 5.0;';
Object.defineProperty(navigator, 'userAgent', {
get: function () { return ua; }
});
}
}
function getUrlParams() {
var e,
a = /\+/g, // Regex for replacing addition symbol with a space
r = /([^&=]+)=?([^&]*)/g,
d = function (s) { return decodeURIComponent(s.replace(a, " ")); },
q = window.location.search.substring(1),
urlParams = {};
while (e = r.exec(q))
urlParams[d(e[1])] = d(e[2]);
return urlParams;
}
function encodeUrlParam(str) {
return str.replace(/&/g, '&amp;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&#39;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;');
}
var params = getUrlParams(),
lang = (params["lang"] || 'en').split(/[\-\_]/)[0],
customer = params["customer"] ? ('<div class="loader-page-text-customer">' + encodeUrlParam(params["customer"]) + '</div>') : '',
margin = (customer !== '') ? 50 : 20,
loading = 'Loading...',
logo = params["logo"] ? ((params["logo"] !== 'none') ? ('<img src="' + encodeUrlParam(params["logo"]) + '" class="loader-logo" />') : '') : null;
window.frameEditorId = params["frameEditorId"];
window.parentOrigin = params["parentOrigin"];
if ( lang == 'de') loading = 'Ladevorgang...';
else if ( lang == 'es') loading = 'Cargando...';
else if ( lang == 'fr') loading = 'Chargement en cours...';
else if ( lang == 'it') loading = 'Caricamento in corso...';
else if ( lang == 'pt') loading = 'Carregando...';
else if ( lang == 'ru') loading = 'Загрузка...';
else if ( lang == 'sl') loading = 'Nalaganje...';
else if ( lang == 'tr') loading = 'Yükleniyor...';
else if ( lang == 'bg') loading = 'Зареждане...';
else if ( lang == 'cs') loading = 'Nahrávám...';
else if ( lang == 'hu') loading = 'Betöltés...';
else if ( lang == 'ja') loading = '読み込み中...';
else if ( lang == 'ko') loading = '로드 중...';
else if ( lang == 'lv') loading = 'Ieladēšana ...';
else if ( lang == 'nl') loading = 'Laden...';
else if ( lang == 'pl') loading = 'Ładowanie...';
else if ( lang == 'sk') loading = 'Nahrávam...';
else if ( lang == 'uk') loading = 'Завантаження...';
else if ( lang == 'vi') loading = 'Đang tải...';
else if ( lang == 'zh') loading = '加载中...';
document.write(
'<div id="loading-mask" class="loadmask">' +
'<div class="loader-page" style="margin-bottom: ' + margin + 'px;' + ((logo!==null) ? 'height: auto;' : '') + '">' +
((logo!==null) ? logo :
'<div class="loader-page-romb">' +
'<div class="romb" id="blue"></div>' +
'<div class="romb" id="green"></div>' +
'<div class="romb" id="red"></div>' +
'</div>') +
'</div>' +
'<div class="loader-page-text">' + customer +
'<div class="loader-page-text-loading">' + loading + '</div>' +
'</div>' +
'</div>');
window.requireTimeourError = function(){
var reqerr;
if ( lang == 'de') reqerr = 'Die Verbindung ist zu langsam, einige Komponenten konnten nicht geladen werden. Aktualisieren Sie bitte die Seite.';
else if ( lang == 'es') reqerr = 'La conexión es muy lenta, algunos de los componentes no han podido cargar. Por favor recargue la página.';
else if ( lang == 'fr') reqerr = 'La connexion est trop lente, certains des composants n\'ons pas pu être chargé. Veuillez recharger la page.';
else if ( lang == 'ru') reqerr = 'Слишком медленное соединение, не удается загрузить некоторые компоненты. Пожалуйста, обновите страницу.';
else reqerr = 'The connection is too slow, some of the components could not be loaded. Please reload the page.';
return reqerr;
};
var requireTimeoutID = setTimeout(function(){
window.alert(window.requireTimeourError());
window.location.reload();
}, 30000);
var require = {
waitSeconds: 30,
callback: function(){
clearTimeout(requireTimeoutID);
}
};
</script>
<script data-main="app" src="../../../vendor/requirejs/require.js"></script>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff