Merge branch 'release/v4.2.0'
This commit is contained in:
commit
5b71bd2f0e
|
@ -1,4 +1,4 @@
|
|||
[![License](https://img.shields.io/badge/License-GNU%20AGPL%20V3-green.svg?style=flat)](http://www.gnu.org/licenses/agpl-3.0.ru.html) ![Release](https://img.shields.io/badge/Release-v4.1.2-blue.svg?style=flat)
|
||||
[![License](https://img.shields.io/badge/License-GNU%20AGPL%20V3-green.svg?style=flat)](http://www.gnu.org/licenses/agpl-3.0.ru.html)
|
||||
|
||||
## web-apps
|
||||
|
||||
|
|
|
@ -37,10 +37,12 @@
|
|||
},
|
||||
permissions: {
|
||||
edit: <can edit>, // default = true
|
||||
download: <can download>,
|
||||
reader: <can view in readable mode>
|
||||
review: <can review> // default = edit,
|
||||
print: <can print> // default = true
|
||||
download: <can download>, // default = true
|
||||
reader: <can view in readable mode>,
|
||||
review: <can review>, // default = edit
|
||||
print: <can print>, // default = true
|
||||
rename: <can rename>, // default = false
|
||||
changeHistory: <can change history>, // default = false
|
||||
}
|
||||
},
|
||||
editorConfig: {
|
||||
|
@ -60,8 +62,7 @@
|
|||
|
||||
user: {
|
||||
id: 'user id',
|
||||
firstname: 'user first name',
|
||||
lastname: 'user last name'
|
||||
name: 'user name'
|
||||
},
|
||||
recent: [
|
||||
{
|
||||
|
@ -106,10 +107,13 @@
|
|||
},
|
||||
chat: false,
|
||||
comments: false,
|
||||
zoom: 100,
|
||||
compactToolbar: false,
|
||||
leftMenu: true,
|
||||
rightMenu: true,
|
||||
toolbar: true,
|
||||
header: true
|
||||
header: true,
|
||||
autosave: true
|
||||
},
|
||||
plugins: {
|
||||
autoStartGuid: 'asc.{FFE1F462-1EA2-4391-990D-4CC84940B754}',
|
||||
|
@ -147,6 +151,7 @@
|
|||
editorConfig: {
|
||||
licenseUrl: <url for license>,
|
||||
customerId: <customer id>,
|
||||
autostart: 'document', // action for app's autostart. for presentations default value is 'player'
|
||||
embedded: {
|
||||
embedUrl: 'url',
|
||||
fullscreenUrl: 'url',
|
||||
|
@ -172,6 +177,7 @@
|
|||
extend(_config, DocsAPI.DocEditor.defaultConfig);
|
||||
_config.editorConfig.canUseHistory = _config.events && !!_config.events.onRequestHistory;
|
||||
_config.editorConfig.canHistoryClose = _config.events && !!_config.events.onRequestHistoryClose;
|
||||
_config.editorConfig.canHistoryRestore = _config.events && !!_config.events.onRequestRestore;
|
||||
_config.editorConfig.canSendEmailAddresses = _config.events && !!_config.events.onRequestEmailAddresses;
|
||||
_config.editorConfig.canRequestEditRights = _config.events && !!_config.events.onRequestEditRights;
|
||||
|
||||
|
@ -326,7 +332,12 @@
|
|||
|
||||
if (!_config.document.key) {
|
||||
_config.document.key = 'xxxxxxxxxxxxxxxxxxxx'.replace(/[x]/g, function (c) {var r = Math.random() * 16 | 0; return r.toString(16);});
|
||||
} else if (typeof _config.document.key !== 'string') {
|
||||
window.alert("The \"document.key\" parameter for the config object must be string. Please correct it.");
|
||||
return false;
|
||||
}
|
||||
|
||||
_config.document.token = _config.token;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -546,7 +557,7 @@
|
|||
};
|
||||
|
||||
DocsAPI.DocEditor.version = function() {
|
||||
return '3.0b##BN#';
|
||||
return '4.2.0';
|
||||
};
|
||||
|
||||
MessageDispatcher = function(fn, scope) {
|
||||
|
@ -647,6 +658,9 @@
|
|||
if (config.editorConfig.customization.loaderName !== 'none') params += "&customer=" + config.editorConfig.customization.loaderName;
|
||||
} else
|
||||
params += "&customer=ONLYOFFICE";
|
||||
if ( (typeof(config.editorConfig.customization) == 'object') && config.editorConfig.customization.loaderLogo) {
|
||||
if (config.editorConfig.customization.loaderLogo !== '') params += "&logo=" + config.editorConfig.customization.loaderLogo;
|
||||
}
|
||||
}
|
||||
|
||||
return params;
|
||||
|
|
|
@ -162,6 +162,16 @@ Common.Gateway = new(function() {
|
|||
});
|
||||
},
|
||||
|
||||
requestRestore: function(version, url) {
|
||||
_postMessage({
|
||||
event: 'onRequestRestore',
|
||||
data: {
|
||||
version: version,
|
||||
url: url
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
requestEmailAddresses: function() {
|
||||
_postMessage({ event: 'onRequestEmailAddresses' });
|
||||
},
|
||||
|
@ -222,6 +232,14 @@ Common.Gateway = new(function() {
|
|||
collaborativeChanges: function() {
|
||||
_postMessage({event: 'onCollaborativeChanges'});
|
||||
},
|
||||
|
||||
requestRename: function(title) {
|
||||
_postMessage({event: 'onRequestRename', data: title});
|
||||
},
|
||||
|
||||
metaChange: function(meta) {
|
||||
_postMessage({event: 'onMetaChange', data: meta});
|
||||
},
|
||||
|
||||
on: function(event, handler){
|
||||
var localHandler = function(event, data){
|
||||
|
|
147
apps/common/embed/lib/controller/modals.js
Normal file
147
apps/common/embed/lib/controller/modals.js
Normal file
|
@ -0,0 +1,147 @@
|
|||
/*
|
||||
*
|
||||
* (c) Copyright Ascensio System Limited 2010-2016
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
|
||||
+function () {
|
||||
!window.common && (window.common = {});
|
||||
!common.controller && (common.controller = {});
|
||||
|
||||
common.controller.modals = new(function() {
|
||||
var $dlgShare, $dlgEmbed;
|
||||
var appConfig;
|
||||
var embedCode = '<iframe allowtransparency="true" frameborder="0" scrolling="no" src="{embed-url}" width="{width}" height="{height}"></iframe>',
|
||||
minEmbedWidth = 400,
|
||||
minEmbedHeight = 600;
|
||||
|
||||
function copytext(el, event) {
|
||||
el.select();
|
||||
if ( !document.execCommand('copy') ) {
|
||||
window.alert('Browser\'s error! Use keyboard shortcut [Ctrl] + [C]');
|
||||
}
|
||||
}
|
||||
|
||||
var createDlgShare = function () {
|
||||
$dlgShare = common.view.modals.create('share');
|
||||
|
||||
var _encoded = encodeURIComponent(appConfig.shareUrl);
|
||||
var _mailto = 'mailto:?subject=I have shared a document with you: ' + appConfig.docTitle + '&body=I have shared a document with you: ' + _encoded + '"';
|
||||
|
||||
$dlgShare.find('#btn-copyshort').on('click', copytext.bind(this, $dlgShare.find('#id-short-url')));
|
||||
$dlgShare.find('.share-buttons > span').on('click', function(e){
|
||||
var _url;
|
||||
switch ($(e.target).attr('data-name')) {
|
||||
case 'facebook':
|
||||
_url = 'https://www.facebook.com/sharer/sharer.php?u=' + appConfig.shareUrl + '&t=' + encodeURI(appConfig.docTitle);
|
||||
window.open(_url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');
|
||||
break;
|
||||
case 'twitter':
|
||||
_url = 'https://twitter.com/share?url='+ _encoded;
|
||||
!!appConfig.docTitle && (_url += encodeURIComponent('&text=' + appConfig.docTitle));
|
||||
window.open(_url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');
|
||||
break;
|
||||
case 'gplus':
|
||||
_url = 'https://plus.google.com/share?url=' + appConfig.shareUrl;
|
||||
window.open(_url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes');
|
||||
break;
|
||||
case 'email':
|
||||
window.open(_mailto, '_self');
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
$dlgShare.find('#id-short-url').val(appConfig.shareUrl);
|
||||
$dlgShare.find('.share-buttons > #email.autotest').attr('data-test', _mailto);
|
||||
};
|
||||
|
||||
var createDlgEmbed =function () {
|
||||
$dlgEmbed = common.view.modals.create('embed');
|
||||
|
||||
var txtembed = $dlgEmbed.find('#txt-embed-url');
|
||||
txtembed.text(embedCode.replace('{embed-url}', appConfig.embedUrl).replace('{width}', minEmbedWidth).replace('{height}', minEmbedHeight));
|
||||
$dlgEmbed.find('#btn-copyembed').on('click', copytext.bind(this, txtembed));
|
||||
$dlgEmbed.find('#txt-embed-width, #txt-embed-height').on({
|
||||
'keypress': function(e){
|
||||
if (e.keyCode == 13)
|
||||
updateEmbedCode();
|
||||
}
|
||||
, 'focusout': function(e){
|
||||
updateEmbedCode();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function updateEmbedCode(){
|
||||
var $txtwidth = $dlgEmbed.find('#txt-embed-width');
|
||||
var $txtheight = $dlgEmbed.find('#txt-embed-height');
|
||||
var newWidth = parseInt($txtwidth.val()),
|
||||
newHeight = parseInt($txtheight.val());
|
||||
|
||||
if (newWidth < minEmbedWidth)
|
||||
newWidth = minEmbedWidth;
|
||||
|
||||
if (newHeight < minEmbedHeight)
|
||||
newHeight = minEmbedHeight;
|
||||
|
||||
$dlgEmbed.find('#txt-embed-url').text(embedCode.replace('{embed-url}', appConfig.embedUrl).replace('{width}', newWidth).replace('{height}', newHeight));
|
||||
|
||||
$txtwidth.val(newWidth + 'px');
|
||||
$txtheight.val(newHeight + 'px');
|
||||
}
|
||||
|
||||
var attachToView = function(config) {
|
||||
if ( config.share && !!appConfig.shareUrl ) {
|
||||
if ( !$dlgShare ) {
|
||||
createDlgShare();
|
||||
}
|
||||
|
||||
$(config.share).on('click', function(e){
|
||||
$dlgShare.modal('show');
|
||||
});
|
||||
}
|
||||
|
||||
if ( config.embed && !!appConfig.embedUrl ) {
|
||||
if ( !$dlgEmbed ) {
|
||||
createDlgEmbed();
|
||||
}
|
||||
|
||||
$(config.embed).on('click', function(e) {
|
||||
$dlgEmbed.modal('show');
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
init: function(config) { appConfig = config; }
|
||||
, attach: attachToView
|
||||
};
|
||||
});
|
||||
}();
|
76
apps/common/embed/lib/util/utils.js
Normal file
76
apps/common/embed/lib/util/utils.js
Normal file
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
*
|
||||
* (c) Copyright Ascensio System Limited 2010-2016
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
|
||||
+function () {
|
||||
!window.common && (window.common = {});
|
||||
!common.utils && (common.utils = {});
|
||||
|
||||
common.utils = new(function(){
|
||||
return {
|
||||
openLink: function(url) {
|
||||
if (url) {
|
||||
var newDocumentPage = window.open(url, '_blank');
|
||||
if (newDocumentPage)
|
||||
newDocumentPage.focus();
|
||||
}
|
||||
}
|
||||
, dialogPrint: function(url) {
|
||||
$('#id-print-frame').remove();
|
||||
|
||||
if ( !!url ) {
|
||||
var iframePrint = document.createElement("iframe");
|
||||
|
||||
iframePrint.id = "id-print-frame";
|
||||
iframePrint.style.display = 'none';
|
||||
iframePrint.style.visibility = "hidden";
|
||||
iframePrint.style.position = "fixed";
|
||||
iframePrint.style.right = "0";
|
||||
iframePrint.style.bottom = "0";
|
||||
document.body.appendChild(iframePrint);
|
||||
|
||||
iframePrint.onload = function () {
|
||||
iframePrint.contentWindow.focus();
|
||||
iframePrint.contentWindow.print();
|
||||
iframePrint.contentWindow.blur();
|
||||
window.focus();
|
||||
};
|
||||
|
||||
iframePrint.src = url;
|
||||
}
|
||||
},
|
||||
htmlEncode: function(value) {
|
||||
return $('<div/>').text(value).html();
|
||||
}
|
||||
};
|
||||
})();
|
||||
}();
|
96
apps/common/embed/lib/view/modals.js
Normal file
96
apps/common/embed/lib/view/modals.js
Normal file
|
@ -0,0 +1,96 @@
|
|||
/*
|
||||
*
|
||||
* (c) Copyright Ascensio System Limited 2010-2016
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
|
||||
!window.common && (window.common = {});
|
||||
!common.view && (common.view = {});
|
||||
common.view.modals = new(function() {
|
||||
var tplDialog = '<div class="modal fade" tabindex="-1" role="dialog" aria-labelledby="idm-title" aria-hidden="true">' +
|
||||
'<div class="modal-dialog" role="document">' +
|
||||
'<div class="modal-content">' +
|
||||
'<div class="modal-header">' +
|
||||
'<button type="button" class="close" data-dismiss="modal" aria-label="Close">' +
|
||||
'<span aria-hidden="true">×</span>' +
|
||||
'</button>' +
|
||||
'<h4 id="idm-title" class="modal-title">{title}</h4>'+
|
||||
'</div>'+
|
||||
'<div class="modal-body">{body}</div>'+
|
||||
'<div class="modal-footer">{footer}</div>'+
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
|
||||
var _tplbody_share = '<div class="share-link">' +
|
||||
'<input id="id-short-url" class="form-control" type="text" readonly/>' +
|
||||
'</div>' +
|
||||
'<div class="share-buttons">' +
|
||||
'<span class="svg big-facebook" data-name="facebook"></span>' +
|
||||
'<span class="svg big-twitter" data-name="twitter"></span>' +
|
||||
'<span class="svg big-gplus" data-name="gplus"></span>' +
|
||||
'<span class="svg big-email" data-name="email"></span>' +
|
||||
'<div class="autotest" id="email" style="display: none"></div>' +
|
||||
'</div>';
|
||||
|
||||
var _tplbody_embed = '<div class="size-manual">' +
|
||||
'<span class="caption">Width:</span>' +
|
||||
'<input id="txt-embed-width" class="form-control input-xs" type="text" value="400px">' +
|
||||
'<input id="txt-embed-height" class="form-control input-xs right" type="text" value="600px">' +
|
||||
'<span class="right caption">Height:</span>' +
|
||||
'</div>' +
|
||||
'<textarea id="txt-embed-url" rows="4" class="form-control" readonly></textarea>';
|
||||
|
||||
return {
|
||||
create: function(name, parent) {
|
||||
!parent && (parent = 'body');
|
||||
|
||||
var _$dlg;
|
||||
if (name == 'share') {
|
||||
_$dlg = $(tplDialog
|
||||
.replace(/\{title}/, 'Share Link')
|
||||
.replace(/\{body}/, _tplbody_share)
|
||||
.replace(/\{footer}/, '<button id="btn-copyshort" type="button" class="btn">Copy to clipboard</button>'))
|
||||
.appendTo(parent)
|
||||
.attr('id', 'dlg-share');
|
||||
} else
|
||||
if (name == 'embed') {
|
||||
_$dlg = $(tplDialog
|
||||
.replace(/\{title}/, 'Embed')
|
||||
.replace(/\{body}/, _tplbody_embed)
|
||||
.replace(/\{footer}/, '<button id="btn-copyembed" type="button" class="btn">Copy to clipboard</button>'))
|
||||
.appendTo(parent)
|
||||
.attr('id', 'dlg-embed');
|
||||
}
|
||||
|
||||
return _$dlg;
|
||||
}
|
||||
};
|
||||
})();
|
Binary file not shown.
Before Width: | Height: | Size: 8.8 KiB |
1
apps/common/embed/resources/img/icon-menu-sprite.svg
Normal file
1
apps/common/embed/resources/img/icon-menu-sprite.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="88 -11 242 44"><style>.st0{fill:#fff;} .st2{fill-rule:evenodd;clip-rule:evenodd;}</style><g id="XMLID_7_"><path id="XMLID_9_" d="M128 6h-14c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1z"/><path id="XMLID_8_" d="M120.1 3.6c.1.1.2.2.4.2.1.1.3.1.5.1s.3-.1.5-.1c.1 0 .3-.1.4-.2l3.5-3.5c.4-.4.4-1 0-1.4s-1-.4-1.4 0l-2 2V-7c0-.6-.4-1-1-1s-1 .4-1 1V.7l-2-2c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4l3.5 3.5z"/></g><path id="XMLID_14_" d="M147.3 3c-.8 0-1.5.3-2.1.8l-4.7-2.7c.1-.3.2-.7.2-1.1s-.1-.8-.2-1.1l4.7-2.7c.6.5 1.3.8 2.1.8 1.7 0 3.1-1.4 3.1-3.1s-1.4-3.1-3.1-3.1-3.1 1.4-3.1 3.1c0 .3 0 .5.1.8l-4.9 2.8c-.5-.4-1.1-.6-1.8-.6-1.7 0-3.1 1.4-3.1 3.1s1.4 3.1 3.1 3.1c.7 0 1.3-.2 1.8-.6l4.8 2.8c-.1.3-.1.5-.1.8 0 1.7 1.4 3.1 3.1 3.1 1.7 0 3.1-1.4 3.1-3.1.1-1.7-1.3-3.1-3-3.1z"/><path d="M159.3 0l4-4c.5-.5.5-1.2 0-1.7s-1.2-.5-1.7 0l-4.4 4.4c-.2 0-.4.1-.6.3-.3.3-.4.7-.3 1 0 .3.1.7.3 1 .2.2.4.3.6.3l4.4 4.4c.5.5 1.2.5 1.7 0s.5-1.2 0-1.7l-4-4zm14.1-1c-.2-.2-.4-.3-.6-.3l-4.4-4.4c-.5-.5-1.2-.5-1.7 0s-.5 1.2 0 1.7l4 4-4 4c-.5.5-.5 1.2 0 1.7s1.2.5 1.7 0l4.4-4.4c.2 0 .4-.1.6-.3.3-.3.4-.7.3-1 .1-.3 0-.7-.3-1z"/><g id="XMLID_4_"><path id="XMLID_21_" d="M194.9-7.3c0-.1-.1-.2-.2-.3-.1-.1-.2-.2-.3-.2-.2-.2-.3-.2-.4-.2h-4.2c-.5 0-.8.4-.8.8 0 .5 1 1.2 1 1.2l.8.8-2.6 2.6c-.4.4-.4 1 0 1.4s1 .4 1.4 0l2.6-2.6 1.3 1.4c.1.2.4.4.7.4.5 0 .8-.4.8-.8V-7c0-.1 0-.2-.1-.3z"/><path id="XMLID_22_" d="M184.4 1.2l-2.6 2.6-1.3-1.4c-.1-.2-.4-.4-.7-.4-.5 0-.8.4-.8.8V7c0 .1 0 .3.1.4 0 .1.1.2.2.3.1.1.2.2.3.2.2.1.3.1.4.1h4.2c.5 0 .8-.4.8-.8S184 6 184 6l-.8-.8 2.6-2.6c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0z"/></g><path id="imgtools" d="M90-6v2h18v-2H90zm0 7h18v-2H90v2zm0 5h18V4H90v2z"/><path id="imgplus" d="M210-8h-2v7h-7v2h7v7h2V1h7v-2h-7v-7z"/><path id="imgminus" d="M223-1h16v2h-16z"/><path id="play" d="M305 0l-16-7V6.9L305 0z"/><path id="rmove" class="st2" d="M279.9-.2L272.1-8 270-5.9l5.8 5.8-5.8 5.9 2.1 2.1 7.8-7.8.1-.2z"/><path id="lmove" class="st2" d="M258-5.8l-2.1-2.1-7.8 7.8-.1.2.1.1 7.8 7.8 2.1-2.1-5.8-5.8z"/><path d="M313-7h4V7h-4zm8 0h4V7h-4z" id="pause"/><use xlink:href="#imgtools" class="st0" y="22"/><use xlink:href="#imgplus" class="st0" y="22"/><use xlink:href="#imgminus" class="st0" y="22"/><use xlink:href="#play" class="st0" y="22" x="2"/><use xlink:href="#pause" class="st0" y="22"/><use xlink:href="#rmove" class="st0" x="1" y="22"/><use xlink:href="#lmove" class="st0" x="-1" y="22"/></svg>
|
After Width: | Height: | Size: 2.4 KiB |
1
apps/common/embed/resources/img/icon-social-sprite.svg
Normal file
1
apps/common/embed/resources/img/icon-social-sprite.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 152 76"><defs><path id="a" d="M144.9 0h-23.8c-3.9 0-7.1 3.2-7.1 7.1v23.7c0 3.9 3.2 7.1 7.1 7.1h23.8c3.9 0 7.1-3.2 7.1-7.1V7.1c0-3.9-3.2-7.1-7.1-7.1zm1.8 28.3c0 1.3-1.1 2.4-2.4 2.4h-22.4c-1.3 0-2.4-1.1-2.4-2.4V9.7c0-1.3 1.1-2.4 2.4-2.4h22.4c1.3 0 2.4 1.1 2.4 2.4v18.6zM68.9 0H45.1C41.2 0 38 3.2 38 7.1v23.7c0 3.9 3.2 7.1 7.1 7.1h23.7c3.9 0 7.1-3.2 7.1-7.1V7.1c.1-3.9-3.1-7.1-7-7.1zm-1.8 14.6v.7c0 6.9-5.2 14.8-14.8 14.8-2.9 0-5.7-.9-8-2.3.4 0 .8.1 1.2.1 2.4 0 4.7-.8 6.5-2.2-2.3 0-4.2-1.6-4.8-3.6.3 0 .6.1 1 .1.5 0 .8-.1 1.3-.2-2.4-.5-4.3-2.6-4.3-5.1.8.4 1.6.6 2.5.6-1.4-.9-2.3-2.5-2.3-4.3 0-.9.3-1.9.7-2.6 2.6 3.2 6.4 5.2 10.7 5.4-.1-.4-.1-.8-.1-1.2 0-2.9 2.3-5.2 5.2-5.2 1.5 0 2.8.6 3.8 1.6 1.2-.2 2.3-.7 3.3-1.3-.4 1.2-1.2 2.3-2.3 2.9 1.1-.1 2.1-.4 3-.8-.7 1-1.6 1.9-2.6 2.6zM30.9 0H7.1C3.2 0 0 3.2 0 7.1v23.7c0 4 3.2 7.2 7.1 7.2h11.7V26.8h-5.3v-5.7h5.3V17c0-4.8 3.2-7.5 7.9-7.5 2.2 0 4.2.1 4.7.2v5.1h-3.2c-2.6 0-3.1 1.1-3.1 2.7v3.6h6.1l-.8 5.7h-5.3V38h5.7c3.9 0 7.1-3.2 7.1-7.1V7.1c.1-3.9-3.1-7.1-7-7.1zm105.9 20.6c-1.1.9-2.4 2-3.8 2-1.5 0-2.8-1.1-3.8-2l-6-4.8c-.4-.3-.7-.6-1-.9v12.6c0 .2.2.5.4.5h20.7c.2 0 .4-.2.4-.5V14.9c-.3.3-.6.6-1 .9-1.9 1.6-3.9 3.2-5.9 4.8zM106.9 0H83.1C79.2 0 76 3.2 76 7.1v23.7c0 3.9 3.2 7.1 7.1 7.1h23.8c3.9 0 7.1-3.2 7.1-7.1V7.1c0-3.9-3.2-7.1-7.1-7.1zM89.6 28.5c-5.3 0-9.5-4.3-9.5-9.5s4.2-9.5 9.5-9.5c2.5 0 4.7.9 6.4 2.5l-2.6 2.5c-.7-.7-2-1.5-3.8-1.5-3.3 0-5.9 2.7-5.9 6s2.6 6 5.9 6c3.8 0 5.2-2.7 5.4-4.1h-5.4v-3.3h9c.1.5.1 1 .1 1.6 0 5.4-3.7 9.3-9.1 9.3zm20.3-8.1h-2.7v2.7h-2.7v-2.7h-2.7v-2.7h2.7V15h2.7v2.7h2.7v2.7zM143.3 10h-20.7c-.2 0-.4.2-.4.5 0 1.6.8 3 2.1 4 1.9 1.5 3.8 3 5.6 4.5.7.6 2.1 1.9 3.1 1.9s2.3-1.3 3.1-1.9c1.9-1.5 3.7-3 5.6-4.5.9-.7 2.1-2.3 2.1-3.5 0-.4.1-1-.5-1z"/></defs><use xlink:href="#a" fill="#999"/><use xlink:href="#a" fill="#666" y="38"/></svg>
|
After Width: | Height: | Size: 1.9 KiB |
1
apps/common/embed/resources/img/logo.svg
Normal file
1
apps/common/embed/resources/img/logo.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg id="Layer_2" xmlns="http://www.w3.org/2000/svg" viewBox="-4 23 100 24"><style>.st0{fill:#5B5B5B;} .st1{fill:#3A3A3A;} .st2{opacity:0.42;fill:#8C8C8C;enable-background:new ;} .st3{opacity:0.72;fill:#9B9B9B;enable-background:new ;} .st4{fill:#9B9B9B;}</style><path class="st0" d="M21.3 35.5c0-1.5.4-2.7 1.3-3.5.9-.8 1.9-1.2 3.1-1.2 1.2 0 2.2.4 3.1 1.2.9.8 1.3 1.9 1.3 3.5 0 1.5-.4 2.7-1.3 3.5-.9.8-1.9 1.2-3.1 1.2-1.2 0-2.2-.4-3.1-1.2-.8-.8-1.3-2-1.3-3.5zm1.9 0c0 1.1.2 1.8.6 2.3.4.5.8.8 1.3.9.1 0 .2 0 .3.1h.6c.1 0 .2 0 .3-.1.5-.1.9-.4 1.3-.9s.6-1.3.6-2.3c0-1-.2-1.8-.6-2.3-.4-.5-.8-.8-1.3-.9-.1 0-.2-.1-.3-.1h-.6c-.1 0-.2 0-.3.1-.5.1-.9.4-1.3.9s-.6 1.2-.6 2.3zm7.8-4.4h2.4l3.1 5.6.5 1.2v-6.8h1.8V40h-2.3l-3.2-5.9-.4-1h-.1l.1 1.6V40H31zm9.3 0h1.9v7.4h3.6V40h-5.5zm4.4 0h2.1l1.8 3 .2.7h.1l.3-.7 1.8-3h2l-3.3 5.2V40H48v-3.7z"/><path class="st1" d="M53.1 35.5c0-1.5.4-2.7 1.3-3.5.9-.8 1.9-1.2 3.1-1.2s2.2.4 3.1 1.2c.9.8 1.3 1.9 1.3 3.5 0 1.5-.4 2.7-1.3 3.5-.9.8-1.9 1.2-3.1 1.2-1.2 0-2.2-.4-3.1-1.2-.9-.8-1.3-2-1.3-3.5zm1.9 0c0 1.1.2 1.8.6 2.3.4.5.8.8 1.3.9.1 0 .2 0 .3.1h.6c.1 0 .2 0 .3-.1.5-.1.9-.4 1.3-.9s.6-1.3.6-2.3c0-1-.2-1.8-.6-2.3s-.8-.8-1.3-.9c-.1 0-.2-.1-.3-.1h-.6s-.2 0-.3.1c-.5.1-.9.4-1.3.9s-.6 1.2-.6 2.3zm7.8-4.4h5v1.5h-3.2v2.1h3.1v1.5h-3.1V40h-1.8zm6.1 0h5v1.5h-3.2v2.1h3v1.5h-3V40h-1.8zm6 8.9v-8.9h1.9V40zM85 31.3v1.6c-.3-.1-.6-.2-1-.3s-.7-.1-1.1-.1c-1 0-1.7.3-2.2.9-.5.6-.8 1.3-.8 2.2s.2 1.6.7 2.2c.5.6 1.2.9 2.1.9.3 0 .7 0 1-.1.4 0 .8-.2 1.2-.3l.1 1.5c-.1 0-.1.1-.2.1s-.2.1-.4.1h-.8c-.3 0-.7.1-1.1.1h-.4c-1-.1-2-.5-2.9-1.2-.9-.7-1.3-1.8-1.3-3.4 0-1.5.4-2.6 1.3-3.5.9-.8 2-1.2 3.4-1.2h1c.3 0 .6.1.9.2.1 0 .1 0 .2.1s.2.1.3.2zm1.1-.2h5.5v1.4H88v2.1h3.2V36H88v2.6h3.6V40h-5.5z"/><path class="st2" d="M7.4 43.1l-7.7-3.7c-.7-.3-.7-.8 0-1.1L2.3 37l5.1 2.4c.7.3 1.7.3 2.4 0l5.1-2.4 2.7 1.3c.7.3.7.8 0 1.1l-7.7 3.7c-.7.3-1.8.3-2.5 0z"/><path class="st3" d="M7.4 38.7L-.3 35c-.7-.3-.7-.8 0-1.1l2.7-1.3L7.5 35c.7.3 1.7.3 2.4 0l5.2-2.4 2.7 1.2c.7.3.7.8 0 1.1L10 38.6c-.8.4-1.9.4-2.6.1z"/><path class="st4" d="M7.4 34.3l-7.7-3.7c-.7-.3-.7-.8 0-1.1l7.7-3.7c.7-.3 1.7-.3 2.4 0l7.7 3.7c.7.3.7.8 0 1.1l-7.7 3.7c-.6.3-1.7.3-2.4 0z"/></svg>
|
After Width: | Height: | Size: 2.1 KiB |
|
@ -20,7 +20,7 @@
|
|||
|
||||
// Components
|
||||
@import "../../../../../vendor/bootstrap/less/component-animations.less";
|
||||
@import "../../../../../vendor/bootstrap/less/glyphicons.less";
|
||||
//@import "../../../../../vendor/bootstrap/less/glyphicons.less";
|
||||
//@import "dropdowns.less";
|
||||
//@import "button-groups.less";
|
||||
//@import "input-groups.less";
|
||||
|
@ -39,12 +39,13 @@
|
|||
//@import "list-group.less";
|
||||
//@import "panels.less";
|
||||
//@import "wells.less";
|
||||
//@import "close.less";
|
||||
@import "../../../../../vendor/bootstrap/less/close.less";
|
||||
|
||||
// Components w/ JavaScript
|
||||
@import "../../../../../vendor/bootstrap/less/modals.less";
|
||||
@import "../../../../../vendor/bootstrap/less/tooltip.less";
|
||||
@import "../../../../../vendor/bootstrap/less/popovers.less";
|
||||
//@import "../../../../../vendor/bootstrap/less/popovers.less";
|
||||
@import "../../../../../vendor/bootstrap/less/dropdowns.less";
|
||||
//@import "carousel.less";
|
||||
|
||||
// Utility classes
|
||||
|
@ -52,7 +53,7 @@
|
|||
@import "../../../../../vendor/bootstrap/less/responsive-utilities.less";
|
||||
|
||||
|
||||
@toolbarBorderColor: #929292;
|
||||
@toolbarBorderColor: #dbdbdb;
|
||||
@toolbarBorderShadowColor: #FAFAFA;
|
||||
@toolbarTopColor: #EBEBEB;
|
||||
@toolbarBottomColor: #CCCCCC;
|
||||
|
@ -60,7 +61,10 @@
|
|||
@toolbarFontSize: 12px;
|
||||
@controlBtnHoverTopColor: #6180C4;
|
||||
@controlBtnHoverBottomColor: #8AACF1;
|
||||
@btnColor: #d8dadc;
|
||||
@btnActiveColor: #7d858c;
|
||||
@iconSpriteCommonPath: "../../../../common/embed/resources/img/glyphicons.png";
|
||||
@icon-socnet-size: 40px;
|
||||
|
||||
.input-xs {
|
||||
.input-size(@input-height-small - 8px; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);
|
||||
|
@ -104,7 +108,7 @@
|
|||
font-size: @toolbarFontSize;
|
||||
min-width: 340px;
|
||||
z-index: 100;
|
||||
#gradient > .vertical(@toolbarTopColor, @toolbarBottomColor);
|
||||
background-color: @toolbarTopColor;
|
||||
|
||||
&.top {
|
||||
top: 0;
|
||||
|
@ -128,20 +132,21 @@
|
|||
box-shadow: inset 0 1px 0 @toolbarBorderColor, inset 0 2px 0 @toolbarBorderShadowColor;
|
||||
}
|
||||
|
||||
ul {
|
||||
.group {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
li {
|
||||
.item {
|
||||
input {
|
||||
display: inline-block;
|
||||
width: 25px;
|
||||
width: 35px;
|
||||
padding: 0;
|
||||
height: 25px;
|
||||
margin: 3px;
|
||||
text-align: center;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.text {
|
||||
|
@ -151,99 +156,72 @@
|
|||
|
||||
&.left {
|
||||
left: 0;
|
||||
padding-left: 10px;
|
||||
|
||||
li {
|
||||
.item {
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
|
||||
&.right {
|
||||
right: 0;
|
||||
padding-right: 10px;
|
||||
|
||||
li {
|
||||
.item {
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
|
||||
&.center {
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.separator {
|
||||
height: 24px;
|
||||
margin: 4px 9px;
|
||||
height: 22px;
|
||||
margin: 0 9px;
|
||||
border-right: 1px solid @toolbarBorderShadowColor;
|
||||
border-left: 1px solid @toolbarBorderColor;
|
||||
}
|
||||
}
|
||||
|
||||
.close {
|
||||
font-size: 28px;
|
||||
color: #666666;
|
||||
opacity: 0.8;
|
||||
display: block;
|
||||
line-height: 22px;
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Logo
|
||||
// -------------------------
|
||||
a.brand-logo {
|
||||
.brand-logo {
|
||||
display: block;
|
||||
background-image: url("@{iconSpriteCommonPath}");
|
||||
width: 124px;
|
||||
height: 20px;
|
||||
margin: 5px 0 0 10px;
|
||||
background-position: 0 -100px;
|
||||
width: 100px;
|
||||
height: 24px;
|
||||
background: data-uri('../../../../common/embed/resources/img/logo.svg') no-repeat;
|
||||
}
|
||||
|
||||
// Sprite icons path
|
||||
// -------------------------
|
||||
[class^="control-icon-"],
|
||||
[class*=" control-icon-"] {
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
vertical-align: text-top;
|
||||
background-image: url("@{iconSpriteCommonPath}");
|
||||
background-repeat: no-repeat;
|
||||
margin-top: -2px;
|
||||
}
|
||||
|
||||
[class^="overlay-icon-"],
|
||||
[class*=" overlay-icon-"] {
|
||||
display: inline-block;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
vertical-align: text-top;
|
||||
background-image: url("@{iconSpriteCommonPath}");
|
||||
background-repeat: no-repeat;
|
||||
opacity: .3;
|
||||
}
|
||||
|
||||
.control-icon-share { background-position: 0 0; }
|
||||
.control-icon-embed { background-position: 0 -20px; }
|
||||
.control-icon-fullscreen { background-position: 0 -40px; }
|
||||
.control-icon-close { background-position: 0 -60px; }
|
||||
.control-icon-save { background-position: 0 -80px; }
|
||||
|
||||
.overlay-icon-zoom-in { background-position: 0 -120px; }
|
||||
.overlay-icon-zoom-out { background-position: -32px -120px; }
|
||||
|
||||
// Control buttons
|
||||
// -------------------------
|
||||
.control-btn {
|
||||
display: inline-block;
|
||||
padding: 1px 5px;
|
||||
font-size: @toolbarFontSize;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
background-color: transparent;
|
||||
background-image: none;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 2px;
|
||||
margin: 4px 5px 0 0;
|
||||
|
||||
i {
|
||||
margin-right: 5px;
|
||||
}
|
||||
//margin: 0;
|
||||
|
||||
&.no-caption {
|
||||
padding: 1px 2px;
|
||||
|
||||
i {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Hover state
|
||||
|
@ -251,12 +229,6 @@ a.brand-logo {
|
|||
color: @toolbarHoverColor;
|
||||
text-decoration: none;
|
||||
text-shadow: 0 1px 0 @toolbarBorderShadowColor;
|
||||
|
||||
.control-icon-share { background-position: -20px 0; }
|
||||
.control-icon-embed { background-position: -20px -20px; }
|
||||
.control-icon-fullscreen { background-position: -20px -40px; }
|
||||
.control-icon-close { background-position: -20px -60px; }
|
||||
.control-icon-save { background-position: -20px -80px; }
|
||||
}
|
||||
|
||||
// Focus state for keyboard and accessibility
|
||||
|
@ -268,17 +240,9 @@ a.brand-logo {
|
|||
// Active state
|
||||
&.active,
|
||||
&:active {
|
||||
color: #ffffff;
|
||||
outline: none;
|
||||
border: 1px solid darken(@controlBtnHoverTopColor, 5%);
|
||||
#gradient > .vertical(@controlBtnHoverTopColor, @controlBtnHoverBottomColor);
|
||||
text-shadow: 0 1px 0 darken(@toolbarBorderColor, 20%);
|
||||
|
||||
.control-icon-share { background-position: -40px 0; }
|
||||
.control-icon-embed { background-position: -40px -20px; }
|
||||
.control-icon-fullscreen { background-position: -40px -40px; }
|
||||
.control-icon-close { background-position: -40px -60px; }
|
||||
.control-icon-save { background-position: -40px -80px; }
|
||||
border: 1px solid @btnActiveColor;
|
||||
background-color: @btnActiveColor;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -313,32 +277,26 @@ a.brand-logo {
|
|||
height: 32px;
|
||||
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
background-color: transparent;
|
||||
background-image: none;
|
||||
border: none;
|
||||
padding: 0;
|
||||
line-height: 0;
|
||||
background-color: black;
|
||||
border: 5px solid black;
|
||||
border-radius: 50%;
|
||||
outline: none;
|
||||
opacity: 0.3;
|
||||
|
||||
-webkit-box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
|
||||
-moz-box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
|
||||
box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
|
||||
|
||||
&:hover {
|
||||
[class^="overlay-icon-"],
|
||||
[class*=" overlay-icon-"] {
|
||||
opacity: .6;
|
||||
}
|
||||
}
|
||||
opacity: .6;
|
||||
}
|
||||
|
||||
&.active,
|
||||
&:active {
|
||||
[class^="overlay-icon-"],
|
||||
[class*=" overlay-icon-"] {
|
||||
opacity: .8;
|
||||
&.active, &:active {
|
||||
opacity: .8;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Error mask
|
||||
// -------------------------
|
||||
|
@ -370,152 +328,282 @@ a.brand-logo {
|
|||
}
|
||||
}
|
||||
|
||||
// Share popover
|
||||
// -------------------------
|
||||
.popover{
|
||||
.popover-content {
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
&.hyperlink {
|
||||
.popover-content {
|
||||
padding: 5px 10px;
|
||||
|
||||
p {
|
||||
display: block;
|
||||
word-wrap: break-word;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.share {
|
||||
width: 280px;
|
||||
|
||||
.share-link {
|
||||
margin-bottom: 5px;
|
||||
|
||||
.caption {
|
||||
margin-top: 3px;
|
||||
margin-right: 8px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
input[readonly] {
|
||||
display: inline-block;
|
||||
font-size: 1em;
|
||||
padding: 0 4px;
|
||||
margin-right: 5px;
|
||||
border-radius: 0;
|
||||
cursor: text;
|
||||
background-color: #fff;
|
||||
-moz-user-select: text;
|
||||
-khtml-user-select: text;
|
||||
-webkit-user-select: text;
|
||||
-ms-user-select: text;
|
||||
user-select: text;
|
||||
}
|
||||
|
||||
.input-xs {
|
||||
width: 130px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
.share-buttons {
|
||||
ul {
|
||||
width: 244px;
|
||||
height: 25px;
|
||||
list-style-type: none;
|
||||
margin: 5px 0 0;
|
||||
overflow: hidden;
|
||||
|
||||
li {
|
||||
display: inline-block;
|
||||
float: left;
|
||||
margin: 1px 5px 0 0;
|
||||
vertical-align: middle;
|
||||
|
||||
&.share-mail {
|
||||
float: right;
|
||||
padding-right: 1px;
|
||||
margin: 0;
|
||||
|
||||
a {
|
||||
min-width: 64px;
|
||||
}
|
||||
|
||||
.glyphicon {
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
&.share-twitter {
|
||||
max-width: 93px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.embed {
|
||||
width: 270px;
|
||||
|
||||
.size-manual {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.caption {
|
||||
margin-top: 2px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
input {
|
||||
display: inline-block;
|
||||
font-size: 1em;
|
||||
padding: 0 4px;
|
||||
border-radius: 0;
|
||||
margin: 0;
|
||||
margin-top: -1px;
|
||||
|
||||
&.input-xs {
|
||||
width: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
textarea {
|
||||
width: 238px;
|
||||
resize: none;
|
||||
cursor: auto;
|
||||
font-size: 1em;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
button {
|
||||
float: right;
|
||||
margin: 10px 0 15px;
|
||||
width: 86px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Modals
|
||||
// -------------------------
|
||||
.modal {
|
||||
.modal-header {
|
||||
padding: 5px 15px;
|
||||
//padding: 5px 15px;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
border-top: none;
|
||||
//border-top: none;
|
||||
}
|
||||
|
||||
//&.in .modal-dialog { .translate(0, 100%)}
|
||||
}
|
||||
|
||||
.share-buttons {
|
||||
ul {
|
||||
width: 244px;
|
||||
//height: 25px;
|
||||
list-style-type: none;
|
||||
margin: 5px 0 0;
|
||||
overflow: hidden;
|
||||
|
||||
li {
|
||||
display: inline-block;
|
||||
float: left;
|
||||
margin: 1px 5px 0 0;
|
||||
vertical-align: middle;
|
||||
|
||||
&.share-mail {
|
||||
float: right;
|
||||
padding-right: 1px;
|
||||
margin: 0;
|
||||
|
||||
a {
|
||||
min-width: 64px;
|
||||
}
|
||||
|
||||
.glyphicon {
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
&.share-twitter {
|
||||
max-width: 93px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.size-manual {
|
||||
margin-bottom: 10px;
|
||||
|
||||
.right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.caption {
|
||||
margin-top: 2px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
input {
|
||||
display: inline-block;
|
||||
font-size: 1em;
|
||||
padding: 0 4px;
|
||||
//border-radius: 0;
|
||||
margin: 0;
|
||||
margin-top: -1px;
|
||||
|
||||
&.input-xs {
|
||||
width: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.socnet-btn(@index) {
|
||||
background-position: -@icon-socnet-size*@index 0;
|
||||
|
||||
&:hover {
|
||||
background-position: -@icon-socnet-size*@index -@icon-socnet-size;
|
||||
}
|
||||
}
|
||||
|
||||
.svg {
|
||||
background: data-uri('../../../../common/embed/resources/img/icon-social-sprite.svg');
|
||||
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background-size: @icon-socnet-size*4 @icon-socnet-size*2;
|
||||
|
||||
&.big-facebook:hover {
|
||||
background-position: 0 -@icon-socnet-size;
|
||||
}
|
||||
|
||||
&.big-twitter { .socnet-btn(1); }
|
||||
&.big-gplus { .socnet-btn(2); }
|
||||
&.big-email { .socnet-btn(3); }
|
||||
}
|
||||
|
||||
.svg-icon {
|
||||
background: data-uri('../../../../common/embed/resources/img/icon-menu-sprite.svg') no-repeat;
|
||||
background-size: 22px*11 22px*2;
|
||||
|
||||
&.download {
|
||||
background-position: -22px 0;
|
||||
}
|
||||
&.share {
|
||||
background-position: -22px*2 0;
|
||||
}
|
||||
&.embed {
|
||||
background-position: -22px*3 0;
|
||||
}
|
||||
&.fullscr {
|
||||
background-position: -22px*4 0;
|
||||
}
|
||||
&.zoom-up {
|
||||
background-position: -22px*5 -22px;
|
||||
}
|
||||
&.zoom-down {
|
||||
background-position: -22px*6 -22px;
|
||||
}
|
||||
&.slide-prev {
|
||||
background-position: -22px*7 -22px;
|
||||
}
|
||||
&.slide-next {
|
||||
background-position: -22px*8 -22px;
|
||||
}
|
||||
|
||||
&.play {
|
||||
background-position: -22px*9 -22px;
|
||||
}
|
||||
|
||||
&.pause {
|
||||
background-position: -22px*10 -22px;
|
||||
}
|
||||
}
|
||||
|
||||
.mi-icon {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
//display: inline-block;
|
||||
float: left;
|
||||
margin: -1px 15px 0 -15px;
|
||||
}
|
||||
|
||||
.btn, button {
|
||||
&:focus, &:active:focus {
|
||||
outline: 0 none;
|
||||
}
|
||||
|
||||
background-color: @btnColor;
|
||||
}
|
||||
|
||||
.modal-dialog {
|
||||
margin-top: 100px;
|
||||
.share-buttons {
|
||||
height: 40px;
|
||||
text-align: center;
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
margin: 0 7px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.share-link {
|
||||
margin: 0 0 15px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
padding-bottom: 10px;
|
||||
text-align: center;
|
||||
|
||||
.close {
|
||||
margin-top: 0;
|
||||
opacity: 0.5;
|
||||
|
||||
&:hover {
|
||||
opacity: 0.7;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#dlg-share, #dlg-embed {
|
||||
.modal-dialog {
|
||||
width: 330px;
|
||||
}
|
||||
|
||||
textarea {
|
||||
width: 288px;
|
||||
resize: none;
|
||||
cursor: auto;
|
||||
font-size: 1em;
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
> li > a {
|
||||
padding: 8px 20px 8px 31px;
|
||||
&:hover, &:focus {
|
||||
background-color: @btnColor;
|
||||
outline: 0 none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
&.open {
|
||||
> button {
|
||||
background-color: @btnActiveColor;
|
||||
background-position: 0 -22px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#box-tools {
|
||||
button {
|
||||
width: 24px;
|
||||
height: 22px;
|
||||
|
||||
&:active {
|
||||
background-position: 0 -22px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.masked {
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#pages {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
line-height: 22px;
|
||||
padding: 0 0 0 3px;
|
||||
}
|
||||
|
||||
#page-number {
|
||||
&.masked {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
.tooltip-inner {
|
||||
background-color: #fff;
|
||||
border: 1px solid rgba(0,0,0,0.15);
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
line-height: 26px;
|
||||
font-size: 11px;
|
||||
box-shadow: 0 6px 12px rgba(0,0,0,0.175);
|
||||
}
|
||||
|
||||
.tooltip-arrow {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.form-control {
|
||||
&:focus {
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
|
@ -57,6 +57,14 @@ define([
|
|||
|
||||
findRevisions: function(revision) {
|
||||
return this.where({revision: revision});
|
||||
},
|
||||
|
||||
hasChanges: function() {
|
||||
return !!this.findWhere({isRevision: false});
|
||||
},
|
||||
|
||||
hasCollapsed: function() {
|
||||
return !!this.findWhere({isRevision: true, hasChanges: true, isExpanded: false});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -496,7 +496,8 @@ define([
|
|||
setMenu: function (m) {
|
||||
if (m && _.isObject(m) && _.isFunction(m.render)){
|
||||
this.menu = m;
|
||||
this.menu.render(this.cmpEl);
|
||||
if (this.rendered)
|
||||
this.menu.render(this.cmpEl);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -94,13 +94,8 @@ define([
|
|||
].join('')),
|
||||
|
||||
initialize : function(options) {
|
||||
var txtPt = Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt);
|
||||
|
||||
Common.UI.ComboBox.prototype.initialize.call(this, _.extend({
|
||||
editable: false,
|
||||
store: new Common.UI.BordersStore(),
|
||||
data: [
|
||||
{displayValue: this.txtNoBorders, value: 0, pxValue: 0 },
|
||||
var txtPt = Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt),
|
||||
data = [
|
||||
{displayValue: '0.5 ' + txtPt, value: 0.5, pxValue: 0.5, offsety: 0},
|
||||
{displayValue: '1 ' + txtPt, value: 1, pxValue: 1, offsety: 20},
|
||||
{displayValue: '1.5 ' + txtPt, value: 1.5, pxValue: 2, offsety: 40},
|
||||
|
@ -108,7 +103,14 @@ define([
|
|||
{displayValue: '3 ' + txtPt, value: 3, pxValue: 4, offsety: 80},
|
||||
{displayValue: '4.5 ' + txtPt, value: 4.5, pxValue: 5, offsety: 100},
|
||||
{displayValue: '6 ' + txtPt, value: 6, pxValue: 6, offsety: 120}
|
||||
],
|
||||
];
|
||||
if (options.allowNoBorders !== false)
|
||||
data.unshift({displayValue: this.txtNoBorders, value: 0, pxValue: 0 });
|
||||
|
||||
Common.UI.ComboBox.prototype.initialize.call(this, _.extend({
|
||||
editable: false,
|
||||
store: new Common.UI.BordersStore(),
|
||||
data: data,
|
||||
menuStyle: 'min-width: 150px;'
|
||||
}, options));
|
||||
},
|
||||
|
@ -189,13 +191,8 @@ define([
|
|||
|
||||
initialize : function(options) {
|
||||
this.txtNoBorders = options.txtNoBorders || this.txtNoBorders;
|
||||
var txtPt = Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt);
|
||||
|
||||
Common.UI.ComboBox.prototype.initialize.call(this, _.extend({
|
||||
editable: true,
|
||||
store: new Common.UI.BordersStore(),
|
||||
data: [
|
||||
{displayValue: this.txtNoBorders, value: 0, pxValue: 0 },
|
||||
var txtPt = Common.Utils.Metric.getMetricName(Common.Utils.Metric.c_MetricUnits.pt),
|
||||
data = [
|
||||
{displayValue: '0.5 ' + txtPt, value: 0.5, pxValue: 0.5, offsety: 0},
|
||||
{displayValue: '1 ' + txtPt, value: 1, pxValue: 1, offsety: 20},
|
||||
{displayValue: '1.5 ' + txtPt, value: 1.5, pxValue: 2, offsety: 40},
|
||||
|
@ -203,7 +200,15 @@ define([
|
|||
{displayValue: '3 ' + txtPt, value: 3, pxValue: 4, offsety: 80},
|
||||
{displayValue: '4.5 ' + txtPt, value: 4.5, pxValue: 5, offsety: 100},
|
||||
{displayValue: '6 ' + txtPt, value: 6, pxValue: 6, offsety: 120}
|
||||
],
|
||||
];
|
||||
|
||||
if (options.allowNoBorders !== false)
|
||||
data.unshift({displayValue: this.txtNoBorders, value: 0, pxValue: 0 });
|
||||
|
||||
Common.UI.ComboBox.prototype.initialize.call(this, _.extend({
|
||||
editable: true,
|
||||
store: new Common.UI.BordersStore(),
|
||||
data: data,
|
||||
menuStyle: 'min-width: 150px;'
|
||||
}, options));
|
||||
},
|
||||
|
|
|
@ -84,7 +84,8 @@ define([
|
|||
menuCls : '',
|
||||
menuStyle : '',
|
||||
displayField: 'displayValue',
|
||||
valueField : 'value'
|
||||
valueField : 'value',
|
||||
scrollAlwaysVisible: false
|
||||
},
|
||||
|
||||
template: _.template([
|
||||
|
@ -117,6 +118,7 @@ define([
|
|||
this.store = me.options.store || new Common.UI.ComboBoxStore();
|
||||
this.displayField = me.options.displayField;
|
||||
this.valueField = me.options.valueField;
|
||||
this.scrollAlwaysVisible = me.options.scrollAlwaysVisible;
|
||||
me.rendered = me.options.rendered || false;
|
||||
|
||||
this.lastValue = null;
|
||||
|
@ -216,7 +218,8 @@ define([
|
|||
el: $('.dropdown-menu', this.cmpEl),
|
||||
minScrollbarLength: 40,
|
||||
scrollYMarginOffset: 30,
|
||||
includePadding: true
|
||||
includePadding: true,
|
||||
alwaysVisibleY: this.scrollAlwaysVisible
|
||||
}, this.options.scroller));
|
||||
}
|
||||
|
||||
|
@ -239,7 +242,8 @@ define([
|
|||
el: $('.dropdown-menu', this.cmpEl),
|
||||
minScrollbarLength: 40,
|
||||
scrollYMarginOffset: 30,
|
||||
includePadding: true
|
||||
includePadding: true,
|
||||
alwaysVisibleY: this.scrollAlwaysVisible
|
||||
}, this.options.scroller));
|
||||
}
|
||||
|
||||
|
@ -542,7 +546,8 @@ define([
|
|||
el: $('.dropdown-menu', this.cmpEl),
|
||||
minScrollbarLength : 40,
|
||||
scrollYMarginOffset: 30,
|
||||
includePadding : true
|
||||
includePadding : true,
|
||||
alwaysVisibleY: this.scrollAlwaysVisible
|
||||
}, this.options.scroller));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -453,7 +453,7 @@ define([
|
|||
if (!me.tiles) me.tiles = [];
|
||||
if (storeCount !== me.tiles.length) {
|
||||
for (j = me.tiles.length; j < storeCount; ++j) {
|
||||
me.tiles.push(null);
|
||||
me.tiles.unshift(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -336,6 +336,14 @@ define([
|
|||
if (!me.menu.isOver)
|
||||
me.cmpEl.removeClass('over');
|
||||
}, 200);
|
||||
|
||||
if (e && e.type !== 'focusout') { // when mouseleave from clicked menu item with submenu
|
||||
var focused = me.cmpEl.children(':focus');
|
||||
if (focused.length>0) {
|
||||
focused.blur();
|
||||
me.cmpEl.closest('ul').focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -396,7 +396,7 @@ define([
|
|||
'</div>',
|
||||
'</div>',
|
||||
'<div style="position: absolute; left: <%=scope.tablePadding%>px; top: <%=scope.tablePadding%>px; right: <%=scope.tablePadding%>px; bottom: <%=scope.tablePadding%>px;">',
|
||||
'<table cols="<%=scope.columns%>" width="100%" height="100%" style="border-collapse: inherit; border-spacing: <%= scope.spacingMode ? scope.cellPadding : 0 %>px;">',
|
||||
'<table id="<%=scope.id%>-table-content" cols="<%=scope.columns%>" width="100%" height="100%" style="border-collapse: inherit; border-spacing: <%= scope.spacingMode ? scope.cellPadding : 0 %>px;">',
|
||||
'<% for (var row = 0; row < scope.rows; row++) { %>',
|
||||
'<tr>',
|
||||
'<% for (var col = 0; col < scope.columns; col++) { %>',
|
||||
|
@ -441,7 +441,8 @@ define([
|
|||
topBorder, rightBorder, bottomBorder, leftBorder,
|
||||
topBorderSelector, rightBorderSelector, bottomBorderSelector,
|
||||
leftBorderSelector,
|
||||
virtualBorderSize, virtualBorderColor;
|
||||
virtualBorderSize, virtualBorderColor,
|
||||
table_content, cells_content;
|
||||
|
||||
me.id = me.options.id || Common.UI.getId();
|
||||
me.width = me.options.width;
|
||||
|
@ -501,6 +502,10 @@ define([
|
|||
rightBorderSelector = $('#' + meId + '-table-right-border-selector');
|
||||
bottomBorderSelector = $('#' + meId + '-table-bottom-border-selector');
|
||||
leftBorderSelector = $('#' + meId + '-table-left-border-selector');
|
||||
table_content = $('#' + meId + '-table-content');
|
||||
cells_content = table_content.find('.cell-content');
|
||||
|
||||
table_content.find('.content-box').css('height', (me.rows>1) ? '50%' : 'auto');
|
||||
|
||||
topBorderSelector.on('click', function(e){
|
||||
if (me.overwriteStyle){
|
||||
|
@ -671,6 +676,14 @@ define([
|
|||
return null;
|
||||
};
|
||||
|
||||
me.setTableColor = function(color) {
|
||||
table_content.css('background-color', (color == 'transparent' ) ? color : ('#'+color));
|
||||
};
|
||||
|
||||
me.setCellsColor = function(color) {
|
||||
cells_content.css('background-color', (color == 'transparent' ) ? color : ('#'+color));
|
||||
};
|
||||
|
||||
if (me.options.el) {
|
||||
me.render(null, {
|
||||
borderSize: borderSize,
|
||||
|
|
|
@ -309,7 +309,7 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
updateColors: function(effectcolors, standartcolors) {
|
||||
updateColors: function(effectcolors, standartcolors, value) {
|
||||
if (effectcolors===undefined || standartcolors===undefined) return;
|
||||
|
||||
var me = this,
|
||||
|
@ -366,11 +366,14 @@ define([
|
|||
}
|
||||
}
|
||||
|
||||
var selected = $(this.el).find('a.' + this.selectedCls);
|
||||
if (selected.length && selected.hasClass('palette-color-effect')) {
|
||||
this.value = selected[0].className.match(this.colorRe)[1].toUpperCase();
|
||||
if (value)
|
||||
this.select(value, true);
|
||||
else {
|
||||
var selected = $(this.el).find('a.' + this.selectedCls);
|
||||
if (selected.length && selected.hasClass('palette-color-effect')) {
|
||||
this.value = selected[0].className.match(this.colorRe)[1].toUpperCase();
|
||||
}
|
||||
}
|
||||
|
||||
this.options.updateColorsArr = undefined;
|
||||
},
|
||||
|
||||
|
|
|
@ -641,6 +641,11 @@ define([
|
|||
$(document).on('keydown.' + this.cid, this.binding.keydown);
|
||||
|
||||
var me = this;
|
||||
|
||||
setTimeout(function () {
|
||||
me.fireEvent('animate:before', me);
|
||||
}, 10);
|
||||
|
||||
if (this.options.animate !== false) {
|
||||
this.$window.css({
|
||||
'-webkit-transform': 'scale(0.8)',
|
||||
|
|
|
@ -1222,12 +1222,14 @@ define([
|
|||
|
||||
for (i = 0; i < comments.length; ++i) {
|
||||
comment = this.findComment(comments[i].asc_getId());
|
||||
comment.set('editTextInPopover', true);
|
||||
comment.set('hint', false);
|
||||
this.popoverComments.push(comment);
|
||||
if (comment) {
|
||||
comment.set('editTextInPopover', true);
|
||||
comment.set('hint', false);
|
||||
this.popoverComments.push(comment);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.getPopover()) {
|
||||
if (this.getPopover() && this.popoverComments.length>0) {
|
||||
if (this.getPopover().isVisible()) {
|
||||
this.getPopover().hide();
|
||||
}
|
||||
|
|
|
@ -94,7 +94,7 @@ define([
|
|||
'Common.Views.ExternalDiagramEditor': {
|
||||
'setchartdata': _.bind(this.setChartData, this),
|
||||
'drag': _.bind(function(o, state){
|
||||
externalEditor.serviceCommand('window:drag', state == 'start');
|
||||
externalEditor && externalEditor.serviceCommand('window:drag', state == 'start');
|
||||
},this),
|
||||
'show': _.bind(function(cmp){
|
||||
var h = this.diagramEditorView.getHeight(),
|
||||
|
@ -138,7 +138,7 @@ define([
|
|||
},
|
||||
|
||||
handler: function(result, value) {
|
||||
externalEditor.serviceCommand('queryClose',{mr:result});
|
||||
externalEditor && externalEditor.serviceCommand('queryClose',{mr:result});
|
||||
return true;
|
||||
},
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ define([
|
|||
'Common.Views.ExternalMergeEditor': {
|
||||
'setmergedata': _.bind(this.setMergeData, this),
|
||||
'drag': _.bind(function(o, state){
|
||||
externalEditor.serviceCommand('window:drag', state == 'start');
|
||||
externalEditor && externalEditor.serviceCommand('window:drag', state == 'start');
|
||||
},this),
|
||||
'show': _.bind(function(cmp){
|
||||
var h = this.mergeEditorView.getHeight(),
|
||||
|
@ -138,7 +138,7 @@ define([
|
|||
},
|
||||
|
||||
handler: function(result, value) {
|
||||
externalEditor.serviceCommand('queryClose',{mr:result});
|
||||
externalEditor && externalEditor.serviceCommand('queryClose',{mr:result});
|
||||
return true;
|
||||
},
|
||||
|
||||
|
|
|
@ -66,12 +66,14 @@ define([
|
|||
this.panelHistory= this.createView('Common.Views.History', {
|
||||
storeHistory: this.getApplication().getCollection('Common.Collections.HistoryVersions')
|
||||
});
|
||||
this.panelHistory.storeHistory.on('reset', _.bind(this.onResetStore, this));
|
||||
this.panelHistory.on('render:after', _.bind(this.onAfterRender, this));
|
||||
Common.Gateway.on('sethistorydata', _.bind(this.onSetHistoryData, this));
|
||||
},
|
||||
|
||||
setApi: function(api) {
|
||||
this.api = api;
|
||||
this.api.asc_registerCallback('asc_onDownloadUrl', _.bind(this.onDownloadUrl, this));
|
||||
return this;
|
||||
},
|
||||
|
||||
|
@ -85,9 +87,38 @@ define([
|
|||
onAfterRender: function(historyView) {
|
||||
historyView.viewHistoryList.on('item:click', _.bind(this.onSelectRevision, this));
|
||||
historyView.btnBackToDocument.on('click', _.bind(this.onClickBackToDocument, this));
|
||||
historyView.btnExpand.on('click', _.bind(this.onClickExpand, this));
|
||||
},
|
||||
|
||||
onSelectRevision: function(picker, item, record) {
|
||||
onResetStore: function() {
|
||||
var hasChanges = this.panelHistory.storeHistory.hasChanges();
|
||||
this.panelHistory.$el.find('#history-expand-changes')[hasChanges ? 'show' : 'hide']();
|
||||
this.panelHistory.$el.find('#history-list').css('padding-bottom', hasChanges ? '45px' : 0);
|
||||
},
|
||||
|
||||
onDownloadUrl: function(url) {
|
||||
if (this.isFromSelectRevision !== undefined)
|
||||
Common.Gateway.requestRestore(this.isFromSelectRevision, url);
|
||||
this.isFromSelectRevision = undefined;
|
||||
},
|
||||
|
||||
onSelectRevision: function(picker, item, record, e) {
|
||||
if (e) {
|
||||
var btn = $(e.target);
|
||||
if (btn && btn.hasClass('revision-restore')) {
|
||||
if (record.get('isRevision'))
|
||||
Common.Gateway.requestRestore(record.get('revision'));
|
||||
else {
|
||||
this.isFromSelectRevision = record.get('revision');
|
||||
this.api.asc_DownloadAs(Asc.c_oAscFileType.DOCX, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!picker && record)
|
||||
this.panelHistory.viewHistoryList.scrollToRecord(record);
|
||||
|
||||
var url = record.get('url'),
|
||||
rev = record.get('revision'),
|
||||
urlGetTime = new Date();
|
||||
|
@ -132,19 +163,27 @@ define([
|
|||
if (historyStore && data!==null) {
|
||||
var rev, revisions = historyStore.findRevisions(data.version),
|
||||
urlGetTime = new Date();
|
||||
var diff = opts.data.urlDiff || opts.data.changesUrl;
|
||||
var diff = (this.currentChangeId===undefined) ? null : opts.data.changesUrl, // if revision has changes, but serverVersion !== app.buildVersion -> hide revision changes
|
||||
url = (!_.isEmpty(diff) && opts.data.previous) ? opts.data.previous.url : opts.data.url,
|
||||
docId = opts.data.key ? opts.data.key : this.currentDocId,
|
||||
docIdPrev = opts.data.previous && opts.data.previous.key ? opts.data.previous.key : this.currentDocIdPrev;
|
||||
|
||||
if (revisions && revisions.length>0) {
|
||||
for(var i=0; i<revisions.length; i++) {
|
||||
rev = revisions[i];
|
||||
rev.set('url', opts.data.url, {silent: true});
|
||||
rev.set('url', url, {silent: true});
|
||||
rev.set('urlDiff', diff, {silent: true});
|
||||
rev.set('urlGetTime', urlGetTime, {silent: true});
|
||||
if (opts.data.key) {
|
||||
rev.set('docId', docId, {silent: true});
|
||||
rev.set('docIdPrev', docIdPrev, {silent: true});
|
||||
}
|
||||
}
|
||||
}
|
||||
var hist = new Asc.asc_CVersionHistory();
|
||||
hist.asc_setUrl(opts.data.url);
|
||||
hist.asc_setUrl(url);
|
||||
hist.asc_setUrlChanges(diff);
|
||||
hist.asc_setDocId(_.isEmpty(diff) ? this.currentDocId : this.currentDocIdPrev);
|
||||
hist.asc_setDocId(_.isEmpty(diff) ? docId : docIdPrev);
|
||||
hist.asc_setCurrentChangeId(this.currentChangeId);
|
||||
hist.asc_setArrColors(this.currentArrColors);
|
||||
this.api.asc_showRevision(hist);
|
||||
|
@ -160,6 +199,20 @@ define([
|
|||
Common.Gateway.requestHistoryClose();
|
||||
},
|
||||
|
||||
onClickExpand: function () {
|
||||
var store = this.panelHistory.storeHistory,
|
||||
needExpand = store.hasCollapsed();
|
||||
|
||||
store.where({isRevision: true, hasChanges: true, isExpanded: !needExpand}).forEach(function(item){
|
||||
item.set('isExpanded', needExpand);
|
||||
});
|
||||
store.where({isRevision: false}).forEach(function(item){
|
||||
item.set('isVisible', needExpand);
|
||||
});
|
||||
this.panelHistory.viewHistoryList.scroller.update({minScrollbarLength: 40});
|
||||
this.panelHistory.btnExpand.cmpEl.text(needExpand ? this.panelHistory.textHideAll : this.panelHistory.textShowAll);
|
||||
},
|
||||
|
||||
notcriticalErrorTitle: 'Warning'
|
||||
|
||||
}, Common.Controllers.History || {}));
|
||||
|
|
|
@ -99,8 +99,6 @@ define([
|
|||
this.setApi(api);
|
||||
|
||||
if (data) {
|
||||
this.currentUserId = data.config.user.id;
|
||||
this.currentUserName = data.config.user.name;
|
||||
this.sdkViewName = data['sdkviewname'] || this.sdkViewName;
|
||||
}
|
||||
},
|
||||
|
|
|
@ -186,6 +186,16 @@ function getParent($this) {
|
|||
return $parent && $parent.length ? $parent : $this.parent();
|
||||
}
|
||||
|
||||
function clearMenus() {
|
||||
$('.dropdown-toggle').each(function (e) {
|
||||
var $parent = ($(this)).parent();
|
||||
if (!$parent.hasClass('open')) return;
|
||||
$parent.trigger(e = $.Event('hide.bs.dropdown'));
|
||||
if (e.isDefaultPrevented()) return;
|
||||
$parent.removeClass('open').trigger('hidden.bs.dropdown');
|
||||
})
|
||||
}
|
||||
|
||||
$(document)
|
||||
.off('keydown.bs.dropdown.data-api')
|
||||
.on('keydown.bs.dropdown.data-api', '[data-toggle=dropdown], [role=menu]' , onDropDownKeyDown);
|
||||
|
@ -206,9 +216,8 @@ $(document)
|
|||
}
|
||||
|
||||
function onDropDownClick(e) {
|
||||
if ((e.which == 1 || e.which == undefined) && !!clickDefHandler) {
|
||||
clickDefHandler(e);
|
||||
}
|
||||
if (e.which == 1 || e.which == undefined)
|
||||
clearMenus();
|
||||
}
|
||||
|
||||
if (!!clickDefHandler) {
|
||||
|
|
|
@ -65,7 +65,14 @@ define([
|
|||
docId: '',
|
||||
docIdPrev: '',
|
||||
arrColors: [], // array of user colors for all changes of current version
|
||||
markedAsVersion: false
|
||||
markedAsVersion: false,
|
||||
canRestore: false,
|
||||
isRevision: true,
|
||||
hasChanges: false,
|
||||
isExpanded: true,
|
||||
isVisible: true,
|
||||
allowSelected: true,
|
||||
selected: false
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
<div id="header-logo"></div>
|
||||
<div id="header-caption"><div><%= headerCaption %></div></div>
|
||||
<div id="header-developer" class="hidden"><div><%= headerDeveloper %></div></div>
|
||||
<div id="header-documentcaption"><%= documentCaption %></div>
|
||||
<div id="header-documentcaption"><div><%= documentCaption %></div></div>
|
||||
<div id="header-back" style="display: <%= canBack ? 'table-cell' : 'none' %>;"><div><%= textBack %></div></div>
|
||||
</div>
|
|
@ -31,11 +31,15 @@
|
|||
*
|
||||
*/
|
||||
|
||||
if (Common === undefined) {
|
||||
var Common = {};
|
||||
}
|
||||
|
||||
define(function(){ 'use strict';
|
||||
|
||||
DE.define = {};
|
||||
Common.define = {};
|
||||
|
||||
DE.define.c_oAscMathMainType = {
|
||||
Common.define.c_oAscMathMainType = {
|
||||
Symbol : 0x00,
|
||||
Fraction : 0x01,
|
||||
Script : 0x02,
|
||||
|
@ -56,7 +60,7 @@ define(function(){ 'use strict';
|
|||
|
||||
// equations types
|
||||
|
||||
DE.define.c_oAscMathType = {
|
||||
Common.define.c_oAscMathType = {
|
||||
Symbol_pm : 0x00000000,
|
||||
Symbol_infinity : 0x00000001,
|
||||
Symbol_equals : 0x00000002,
|
|
@ -96,18 +96,64 @@ Common.Utils = _.extend(new(function() {
|
|||
Table : 1,
|
||||
Image : 2,
|
||||
Header : 3,
|
||||
Shape : 4,
|
||||
Slide : 5,
|
||||
Chart : 6,
|
||||
MailMerge : 7,
|
||||
TextArt : 8
|
||||
TextArt : 4,
|
||||
Shape : 5,
|
||||
Slide : 6,
|
||||
Chart : 7,
|
||||
MailMerge : 8
|
||||
},
|
||||
me = this,
|
||||
checkSize = function() {
|
||||
if (isChrome && !isOpera && document && document.firstElementChild && document.body) {
|
||||
document.firstElementChild.style.zoom = "reset";
|
||||
me.zoom = document.body.clientWidth / window.innerWidth;
|
||||
}
|
||||
me.zoom = 1;
|
||||
if (isChrome && !isOpera && document && document.firstElementChild && document.body)
|
||||
{
|
||||
if (false)
|
||||
{
|
||||
// этот код - рабочий, но только если этот ифрейм открыт на весь размер браузера
|
||||
// (window.outerWidth и window.innerWidth зависимы)
|
||||
if (window.innerWidth > 300)
|
||||
me.zoom = window.outerWidth / window.innerWidth;
|
||||
|
||||
if (Math.abs(me.zoom - 1) < 0.1)
|
||||
me.zoom = 1;
|
||||
|
||||
me.zoom = window.outerWidth / window.innerWidth;
|
||||
|
||||
var _devicePixelRatio = window.devicePixelRatio / me.zoom;
|
||||
|
||||
// device pixel ratio: кратно 0.5
|
||||
_devicePixelRatio = (5 * (((2.5 + 10 * _devicePixelRatio) / 5) >> 0)) / 10;
|
||||
me.zoom = window.devicePixelRatio / _devicePixelRatio;
|
||||
|
||||
// chrome 54.x: zoom = "reset" - clear retina zoom (windows)
|
||||
//document.firstElementChild.style.zoom = "reset";
|
||||
document.firstElementChild.style.zoom = 1.0 / me.zoom;
|
||||
}
|
||||
else
|
||||
{
|
||||
// делаем простую проверку
|
||||
// считаем: 0 < window.devicePixelRatio < 2 => _devicePixelRatio = 1; zoom = window.devicePixelRatio / _devicePixelRatio;
|
||||
// считаем: window.devicePixelRatio >= 2 => _devicePixelRatio = 2; zoom = window.devicePixelRatio / _devicePixelRatio;
|
||||
if (window.devicePixelRatio > 0.1)
|
||||
{
|
||||
if (window.devicePixelRatio < 1.99)
|
||||
{
|
||||
var _devicePixelRatio = 1;
|
||||
me.zoom = window.devicePixelRatio / _devicePixelRatio;
|
||||
}
|
||||
else
|
||||
{
|
||||
var _devicePixelRatio = 2;
|
||||
me.zoom = window.devicePixelRatio / _devicePixelRatio;
|
||||
}
|
||||
// chrome 54.x: zoom = "reset" - clear retina zoom (windows)
|
||||
//document.firstElementChild.style.zoom = "reset";
|
||||
document.firstElementChild.style.zoom = 1.0 / me.zoom;
|
||||
}
|
||||
else
|
||||
document.firstElementChild.style.zoom = "normal";
|
||||
}
|
||||
}
|
||||
me.innerWidth = window.innerWidth * me.zoom;
|
||||
me.innerHeight = window.innerHeight * me.zoom;
|
||||
};
|
||||
|
@ -605,14 +651,16 @@ Common.Utils.applyCustomization = function(config, elmap) {
|
|||
Common.Utils.fillUserInfo = function(info, lang, defname) {
|
||||
var _user = info || {};
|
||||
!_user.id && (_user.id = ('uid-' + Date.now()));
|
||||
_.isEmpty(_user.firstname) && _.isEmpty(_user.lastname) && (_user.firstname = defname);
|
||||
if (_.isEmpty(_user.firstname))
|
||||
_user.fullname = _user.lastname;
|
||||
else if (_.isEmpty(_user.lastname))
|
||||
_user.fullname = _user.firstname;
|
||||
else
|
||||
_user.fullname = /^ru/.test(lang) ? _user.lastname + ' ' + _user.firstname : _user.firstname + ' ' + _user.lastname;
|
||||
|
||||
if (_.isEmpty(_user.name)) {
|
||||
_.isEmpty(_user.firstname) && _.isEmpty(_user.lastname) && (_user.firstname = defname);
|
||||
if (_.isEmpty(_user.firstname))
|
||||
_user.fullname = _user.lastname;
|
||||
else if (_.isEmpty(_user.lastname))
|
||||
_user.fullname = _user.firstname;
|
||||
else
|
||||
_user.fullname = /^ru/.test(lang) ? _user.lastname + ' ' + _user.firstname : _user.firstname + ' ' + _user.lastname;
|
||||
} else
|
||||
_user.fullname = _user.name;
|
||||
return _user;
|
||||
};
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ define([
|
|||
initialize: function(options) {
|
||||
Common.UI.BaseView.prototype.initialize.call(this,arguments);
|
||||
|
||||
this.txtVersionNum = '4.1';
|
||||
this.txtVersionNum = '4.2';
|
||||
this.txtAscMail = 'support@onlyoffice.com';
|
||||
this.txtAscTelNum = '+371 660-16425';
|
||||
this.txtAscUrl = 'www.onlyoffice.com';
|
||||
|
|
|
@ -104,7 +104,7 @@ define([
|
|||
});
|
||||
var cnt_panel = $window.find('.content-panel');
|
||||
cnt_panel.width(this.contentWidth);
|
||||
$window.width($window.find('.menu-panel').width() + cnt_panel.outerWidth() + 1);
|
||||
$window.width($window.find('.menu-panel').width() + cnt_panel.outerWidth() + 2);
|
||||
|
||||
this.content_panels = $window.find('.settings-panel');
|
||||
if (this.btnsCategory.length>0)
|
||||
|
|
|
@ -473,19 +473,17 @@ define([
|
|||
});
|
||||
me.on({
|
||||
'show': function () {
|
||||
|
||||
// me.calculateSizeOfContent();
|
||||
me.commentsView.autoHeightTextBox();
|
||||
|
||||
var text = me.$window.find('textarea');
|
||||
if (text && text.length)
|
||||
text.focus();
|
||||
|
||||
text.keydown(function (event) {
|
||||
me.$window.find('textarea').keydown(function (event) {
|
||||
if (event.keyCode == Common.UI.Keys.ESC) {
|
||||
me.hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
'animate:before': function () {
|
||||
var text = me.$window.find('textarea');
|
||||
if (text && text.length)
|
||||
text.focus();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -46,7 +46,8 @@ Common.Views = Common.Views || {};
|
|||
define([
|
||||
'backbone',
|
||||
'text!common/main/lib/template/Header.template',
|
||||
'core'
|
||||
'core',
|
||||
'common/main/lib/view/RenameDialog'
|
||||
], function (Backbone, headerTemplate) { 'use strict';
|
||||
|
||||
Common.Views.Header = Backbone.View.extend(_.extend({
|
||||
|
@ -165,7 +166,7 @@ define([
|
|||
if (!value)
|
||||
value = '';
|
||||
|
||||
var dc = $('#header-documentcaption');
|
||||
var dc = $('#header-documentcaption div');
|
||||
if (dc)
|
||||
dc.html(Common.Utils.String.htmlEncode(value));
|
||||
|
||||
|
@ -226,8 +227,37 @@ define([
|
|||
$('#header-developer').toggleClass('hidden', !mode);
|
||||
},
|
||||
|
||||
setCanRename: function(rename) {
|
||||
var dc = $('#header-documentcaption div');
|
||||
if (rename) {
|
||||
var me = this;
|
||||
dc.tooltip({title: me.txtRename, placement: 'cursor'});
|
||||
dc.on('click', function(e) {
|
||||
(new Common.Views.RenameDialog({
|
||||
filename: me.documentCaption,
|
||||
handler: function(result, value) {
|
||||
if (result == 'ok' && !_.isEmpty(value.trim()) && me.documentCaption !== value.trim()) {
|
||||
Common.Gateway.requestRename(value);
|
||||
}
|
||||
Common.NotificationCenter.trigger('edit:complete', me);
|
||||
}
|
||||
})).show(dc.position().left-1, 20);
|
||||
});
|
||||
} else {
|
||||
var tip = dc.data('bs.tooltip');
|
||||
if (tip) {
|
||||
tip.options.title = '';
|
||||
tip.setContent();
|
||||
}
|
||||
dc.off('click');
|
||||
}
|
||||
dc.css('cursor', rename ? 'pointer' : 'default');
|
||||
dc.toggleClass('renamed', rename);
|
||||
},
|
||||
|
||||
textBack: 'Go to Documents',
|
||||
openNewTabText: 'Open in New Tab',
|
||||
txtHeaderDeveloper: 'DEVELOPER MODE'
|
||||
txtHeaderDeveloper: 'DEVELOPER MODE',
|
||||
txtRename: 'Rename'
|
||||
}, Common.Views.Header || {}))
|
||||
});
|
||||
|
|
|
@ -55,10 +55,13 @@ define([
|
|||
template: _.template([
|
||||
'<div id="history-box" class="layout-ct vbox">',
|
||||
'<div id="history-header" class="">',
|
||||
'<div id="history-btn-back"><%=scope.textHistoryHeader%></div>',
|
||||
'<div id="history-btn-back"><%=scope.textCloseHistory%></div>',
|
||||
'</div>',
|
||||
'<div id="history-list" class="">',
|
||||
'</div>',
|
||||
'<div id="history-expand-changes" class="">',
|
||||
'<div id="history-btn-expand"><%=scope.textHideAll%></div>',
|
||||
'</div>',
|
||||
'</div>'
|
||||
].join('')),
|
||||
|
||||
|
@ -76,29 +79,78 @@ define([
|
|||
store: this.storeHistory,
|
||||
enableKeyEvents: false,
|
||||
itemTemplate: _.template([
|
||||
'<div id="<%= id %>" class="history-item-wrap" style="display: block;">',
|
||||
'<div id="<%= id %>" class="history-item-wrap ' + '<% if (!isVisible) { %>' + 'hidden' + '<% } %>' + '" ',
|
||||
'style="display: block; ' + '<% if (!isRevision) { %>' + 'padding-left: 40px;' + '<% } %>' + '<% if (canRestore && selected) { %>' + 'padding-bottom: 6px;' + '<% } %>' +'">',
|
||||
'<div class="user-date"><%= created %></div>',
|
||||
'<% if (markedAsVersion) { %>',
|
||||
'<div class="user-version">ver.<%=version%></div>',
|
||||
'<% } %>',
|
||||
'<% if (isRevision && hasChanges) { %>',
|
||||
'<div class="revision-expand img-commonctrl ' + '<% if (isExpanded) { %>' + 'up' + '<% } %>' + '"></div>',
|
||||
'<% } %>',
|
||||
'<div class="user-name">',
|
||||
'<div class="color" style="display: inline-block; background-color:' + '<%=usercolor%>;' + '" >',
|
||||
'</div><%= Common.Utils.String.htmlEncode(username) %>',
|
||||
'</div>',
|
||||
'<% if (canRestore && selected) { %>',
|
||||
'<label class="revision-restore" role="presentation" tabindex="-1">' + this.textRestore + '</label>',
|
||||
'<% } %>',
|
||||
'</div>'
|
||||
].join(''))
|
||||
});
|
||||
|
||||
var me = this;
|
||||
this.viewHistoryList.onClickItem = function(view, record, e) {
|
||||
var btn = $(e.target);
|
||||
if (btn && btn.hasClass('revision-expand')) {
|
||||
var isExpanded = !record.get('isExpanded');
|
||||
record.set('isExpanded', isExpanded);
|
||||
var rev, revisions = me.storeHistory.findRevisions(record.get('revision'));
|
||||
if (revisions && revisions.length>1) {
|
||||
for(var i=1; i<revisions.length; i++)
|
||||
revisions[i].set('isVisible', isExpanded);
|
||||
}
|
||||
this.scroller.update({minScrollbarLength: 40});
|
||||
} else
|
||||
Common.UI.DataView.prototype.onClickItem.call(this, view, record, e);
|
||||
me.btnExpand.cmpEl.text(me.storeHistory.hasCollapsed() ? me.textShowAll : me.textHideAll);
|
||||
};
|
||||
|
||||
var changetooltip = function (dataview, view, record) {
|
||||
if (record.get('isRevision')) {
|
||||
if (view.btnTip) {
|
||||
view.btnTip.dontShow = true;
|
||||
view.btnTip.tip().remove();
|
||||
view.btnTip = null;
|
||||
}
|
||||
var btns = $(view.el).find('.revision-expand').tooltip({title: (record.get('isExpanded')) ? me.textHide : me.textShow, placement: 'cursor'});
|
||||
if (btns.length>0)
|
||||
view.btnTip = btns.data('bs.tooltip');
|
||||
}
|
||||
};
|
||||
this.viewHistoryList.on('item:add', changetooltip);
|
||||
this.viewHistoryList.on('item:change', changetooltip);
|
||||
|
||||
this.btnBackToDocument = new Common.UI.Button({
|
||||
el: $('#history-btn-back'),
|
||||
enableToggle: false
|
||||
});
|
||||
|
||||
|
||||
this.btnExpand = new Common.UI.Button({
|
||||
el: $('#history-btn-expand'),
|
||||
enableToggle: false
|
||||
});
|
||||
|
||||
this.trigger('render:after', this);
|
||||
return this;
|
||||
},
|
||||
|
||||
textHistoryHeader: 'Back to Document'
|
||||
|
||||
textRestore: 'Restore',
|
||||
textShow: 'Expand',
|
||||
textHide: 'Collapse',
|
||||
textCloseHistory: 'Close History',
|
||||
textHideAll: 'Hide detailed changes',
|
||||
textShowAll: 'Show detailed changes'
|
||||
|
||||
}, Common.Views.History || {}))
|
||||
});
|
134
apps/common/main/lib/view/RenameDialog.js
Normal file
134
apps/common/main/lib/view/RenameDialog.js
Normal file
|
@ -0,0 +1,134 @@
|
|||
/*
|
||||
*
|
||||
* (c) Copyright Ascensio System Limited 2010-2016
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* RenameDialog.js
|
||||
*
|
||||
* Created by Julia Radzhabova on 9/23/16
|
||||
* Copyright (c) 2014 Ascensio System SIA. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
define([
|
||||
'common/main/lib/component/Window'
|
||||
], function () { 'use strict';
|
||||
|
||||
Common.Views.RenameDialog = Common.UI.Window.extend(_.extend({
|
||||
options: {
|
||||
width: 330,
|
||||
header: false,
|
||||
cls: 'modal-dlg',
|
||||
filename: ''
|
||||
},
|
||||
|
||||
initialize : function(options) {
|
||||
_.extend(this.options, options || {});
|
||||
|
||||
this.template = [
|
||||
'<div class="box">',
|
||||
'<div class="input-row">',
|
||||
'<label>' + this.textName + '</label>',
|
||||
'</div>',
|
||||
'<div id="id-dlg-newname" class="input-row"></div>',
|
||||
'</div>',
|
||||
'<div class="footer right">',
|
||||
'<button class="btn normal dlg-btn primary" result="ok" style="margin-right: 10px;">' + this.okButtonText + '</button>',
|
||||
'<button class="btn normal dlg-btn" result="cancel">' + this.cancelButtonText + '</button>',
|
||||
'</div>'
|
||||
].join('');
|
||||
|
||||
this.options.tpl = _.template(this.template, this.options);
|
||||
|
||||
Common.UI.Window.prototype.initialize.call(this, this.options);
|
||||
},
|
||||
|
||||
render: function() {
|
||||
Common.UI.Window.prototype.render.call(this);
|
||||
|
||||
var me = this;
|
||||
me.inputName = new Common.UI.InputField({
|
||||
el : $('#id-dlg-newname'),
|
||||
style : 'width: 100%;',
|
||||
validateOnBlur: false,
|
||||
validation : function(value) {
|
||||
return (/[\t*\+:\"<>?|\\\\/]/gim.test(value)) ? me.txtInvalidName + "*+:\"<>?|\/" : true;
|
||||
}
|
||||
});
|
||||
|
||||
var $window = this.getChild();
|
||||
$window.find('.btn').on('click', _.bind(this.onBtnClick, this));
|
||||
|
||||
me.inputNameEl = $window.find('input');
|
||||
me.inputNameEl.on('keypress', _.bind(this.onKeyPress, this));
|
||||
},
|
||||
|
||||
show: function() {
|
||||
Common.UI.Window.prototype.show.apply(this, arguments);
|
||||
|
||||
var me = this;
|
||||
_.delay(function(){
|
||||
me.inputName.setValue(me.options.filename);
|
||||
me.inputNameEl.focus().select();
|
||||
},100);
|
||||
},
|
||||
|
||||
onKeyPress: function(event) {
|
||||
if (event.keyCode == Common.UI.Keys.RETURN) {
|
||||
this._handleInput('ok');
|
||||
}
|
||||
},
|
||||
|
||||
onBtnClick: function(event) {
|
||||
this._handleInput(event.currentTarget.attributes['result'].value);
|
||||
},
|
||||
|
||||
_handleInput: function(state) {
|
||||
if (this.options.handler) {
|
||||
if (state == 'ok') {
|
||||
if (this.inputName.checkValidate() !== true) {
|
||||
this.inputNameEl.focus();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
this.options.handler.call(this, state, this.inputName.getValue());
|
||||
}
|
||||
|
||||
this.close();
|
||||
},
|
||||
|
||||
textName : 'File name',
|
||||
cancelButtonText: 'Cancel',
|
||||
okButtonText : 'Ok',
|
||||
txtInvalidName : 'The file name cannot contain any of the following characters: '
|
||||
}, Common.Views.RenameDialog || {}));
|
||||
});
|
|
@ -447,7 +447,7 @@ define([
|
|||
|
||||
this.btnPrev = new Common.UI.Button({
|
||||
cls: 'btn-toolbar',
|
||||
iconCls: 'review-prev',
|
||||
iconCls: 'img-commonctrl review-prev',
|
||||
value: 1,
|
||||
hint: this.txtPrev,
|
||||
hintAnchor: 'top'
|
||||
|
@ -456,7 +456,7 @@ define([
|
|||
|
||||
this.btnNext = new Common.UI.Button({
|
||||
cls: 'btn-toolbar',
|
||||
iconCls: 'review-next',
|
||||
iconCls: 'img-commonctrl review-next',
|
||||
value: 2,
|
||||
hint: this.txtNext,
|
||||
hintAnchor: 'top'
|
||||
|
@ -507,7 +507,7 @@ define([
|
|||
|
||||
this.btnClose = new Common.UI.Button({
|
||||
cls: 'btn-toolbar',
|
||||
iconCls: 'review-close',
|
||||
iconCls: 'img-commonctrl review-close',
|
||||
hint: this.txtClose,
|
||||
hintAnchor: 'top'
|
||||
});
|
||||
|
|
|
@ -171,6 +171,8 @@
|
|||
this.txtSearch.on('keydown', null, 'search', _.bind(this.onKeyPress, this));
|
||||
this.txtReplace.on('keydown', null, 'replace', _.bind(this.onKeyPress, this));
|
||||
|
||||
this.on('animate:before', _.bind(this.focus, this));
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
|
@ -189,10 +191,10 @@
|
|||
|
||||
focus: function() {
|
||||
var me = this;
|
||||
_.delay(function(){
|
||||
setTimeout(function(){
|
||||
me.txtSearch.focus();
|
||||
me.txtSearch.select();
|
||||
}, 300);
|
||||
}, 10);
|
||||
},
|
||||
|
||||
onKeyPress: function(event) {
|
||||
|
|
|
@ -99,8 +99,8 @@
|
|||
.button-otherstates-icon(@icon-class, @icon-size) {
|
||||
button.over > .@{icon-class} {background-position-x: -1*@icon-size; --bgX: -(1*@icon-size);}
|
||||
button.active > .@{icon-class},
|
||||
button:active > .@{icon-class} {background-position-x: -2*@icon-size; --bgX: -(2*@icon-size);}
|
||||
button.disabled > .@{icon-class} {background-position-x: -3*@icon-size; --bgX: -(3*@icon-size);}
|
||||
button:active > .@{icon-class} {background-position-x: -2*@icon-size !important; --bgX: -(2*@icon-size);}
|
||||
button.disabled > .@{icon-class} {background-position-x: -3*@icon-size !important; --bgX: -(3*@icon-size);}
|
||||
}
|
||||
|
||||
.button-otherstates-icon2(@icon-class, @icon-size) {
|
||||
|
@ -125,27 +125,29 @@
|
|||
/**/
|
||||
|
||||
.background-ximage(@image, @image2x, @w: auto, @h: auto) {
|
||||
background-image: e(%("url(%s)",@image));
|
||||
background-image: data-uri(%("%s",@image));
|
||||
|
||||
@media
|
||||
only screen and (-webkit-min-device-pixel-ratio: 2),
|
||||
only screen and (min-resolution: 2dppx),
|
||||
only screen and (min-resolution: 192dpi) {
|
||||
background-image: e(%("url(%s)",@image2x));
|
||||
background-image: data-uri(%("%s",@image2x));
|
||||
background-size: @w @h;
|
||||
}
|
||||
}
|
||||
|
||||
@common-controls-width: 100px;
|
||||
.img-commonctrl,
|
||||
.theme-colorpalette .color-transparent, .palette-color-ext .color-transparent, .dropdown-menu li .checked:before, .input-error:before {
|
||||
background: e(%("url(%s)",'@{common-image-path}/@{common-controls}')) no-repeat;
|
||||
.img-commonctrl,
|
||||
.theme-colorpalette .color-transparent, .palette-color-ext .color-transparent, .dropdown-menu li .checked:before, .input-error:before,
|
||||
.btn-toolbar .btn-icon.img-commonctrl {
|
||||
background-image: data-uri(%("%s",'@{common-image-path}/@{common-controls}'));
|
||||
background-repeat: no-repeat;
|
||||
|
||||
@media
|
||||
only screen and (-webkit-min-device-pixel-ratio: 2),
|
||||
only screen and (min-resolution: 2dppx),
|
||||
only screen and (min-resolution: 192dpi) {
|
||||
background-image: e(%("url(%s)",'@{common-image-path}/@{common-controls2x}'));
|
||||
background-image: data-uri(%("%s",'@{common-image-path}/@{common-controls2x}'));
|
||||
background-size: @common-controls-width auto;
|
||||
}
|
||||
}
|
||||
|
@ -153,13 +155,13 @@
|
|||
@img-toolbarmenu-width: 60px;
|
||||
.img-toolbarmenu
|
||||
{
|
||||
background: e(%("url(%s)",'@{app-image-path}/toolbar-menu.png')) no-repeat;
|
||||
background: data-uri(%("%s",'@{app-image-path}/toolbar-menu.png')) no-repeat;
|
||||
|
||||
@media
|
||||
only screen and (-webkit-min-device-pixel-ratio: 2),
|
||||
only screen and (min-resolution: 2dppx),
|
||||
only screen and (min-resolution: 192dpi) {
|
||||
background-image: e(%("url(%s)",'@{app-image-path}/toolbar-menu@2x.png'));
|
||||
background-image: data-uri(%("%s",'@{app-image-path}/toolbar-menu@2x.png'));
|
||||
background-size: @img-toolbarmenu-width auto;
|
||||
}
|
||||
}
|
||||
|
@ -167,13 +169,13 @@
|
|||
@img-colorpicker-width: 205px;
|
||||
.img-colorpicker,
|
||||
.color-transparent, .hsb-colorpicker .empty-color:before {
|
||||
background: e(%("url(%s)",'@{common-image-path}/hsbcolorpicker/hsb-colorpicker.png')) no-repeat;
|
||||
background: data-uri(%("%s",'@{common-image-path}/hsbcolorpicker/hsb-colorpicker.png')) no-repeat;
|
||||
|
||||
@media
|
||||
only screen and (-webkit-min-device-pixel-ratio: 2),
|
||||
only screen and (min-resolution: 2dppx),
|
||||
only screen and (min-resolution: 192dpi) {
|
||||
background-image: e(%("url(%s)",'@{common-image-path}/hsbcolorpicker/hsb-colorpicker@2x.png'));
|
||||
background-image: data-uri(%("%s",'@{common-image-path}/hsbcolorpicker/hsb-colorpicker@2x.png'));
|
||||
background-size: @img-colorpicker-width auto;
|
||||
}
|
||||
}
|
|
@ -60,6 +60,14 @@
|
|||
background-position: @arrow-small-offset-x - 7px @arrow-small-offset-y;
|
||||
}
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.active {
|
||||
&:focus,
|
||||
&.focus {
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-toolbar {
|
||||
|
@ -79,8 +87,8 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
.over {
|
||||
&:hover:not(.disabled),
|
||||
.over:not(.disabled) {
|
||||
background-color: @secondary;
|
||||
}
|
||||
|
||||
|
@ -141,8 +149,8 @@
|
|||
background-color: transparent;
|
||||
font-weight: bold;
|
||||
|
||||
&:hover,
|
||||
.over {
|
||||
&:hover:not(.disabled),
|
||||
.over:not(.disabled) {
|
||||
background-color: @secondary;
|
||||
}
|
||||
|
||||
|
@ -312,13 +320,13 @@
|
|||
border: 1px solid @input-border;
|
||||
.border-radius(@border-radius-small);
|
||||
|
||||
&:hover,
|
||||
.over {
|
||||
&:hover:not(.disabled),
|
||||
.over:not(.disabled) {
|
||||
background-color: @secondary !important;
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.active {
|
||||
&:active:not(.disabled),
|
||||
&.active:not(.disabled) {
|
||||
background-color: @primary !important;
|
||||
color: white;
|
||||
}
|
||||
|
@ -346,13 +354,13 @@
|
|||
margin-top: 5px;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
.over {
|
||||
&:hover:not(.disabled),
|
||||
.over:not(.disabled) {
|
||||
background-color: @secondary !important;
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.active {
|
||||
&:active:not(.disabled),
|
||||
&.active:not(.disabled) {
|
||||
background-color: @primary !important;
|
||||
color: white;
|
||||
}
|
||||
|
@ -379,13 +387,13 @@
|
|||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
.over {
|
||||
&:hover:not(.disabled),
|
||||
.over:not(.disabled) {
|
||||
background-color: @secondary !important;
|
||||
}
|
||||
|
||||
&:active,
|
||||
&.active {
|
||||
&:active:not(.disabled),
|
||||
&.active:not(.disabled) {
|
||||
background-color: @primary !important;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,6 @@
|
|||
}
|
||||
|
||||
img, .image {
|
||||
background: ~"url(@{common-image-path}/combo-border-size/BorderSize.png) no-repeat 0 0 #fff";
|
||||
background: ~"url(@{common-image-const-path}/combo-border-size/BorderSize.png) no-repeat 0 0 #fff";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -199,9 +199,8 @@
|
|||
.combo-template(64px);
|
||||
}
|
||||
|
||||
.combo-pattern {
|
||||
.combo-textart(@combo-dataview-height: 62px, @combo-dataview-item-margins: 4px) {
|
||||
@combo-dataview-button-width: 15px;
|
||||
@combo-dataview-height: 40px;
|
||||
|
||||
height: @combo-dataview-height;
|
||||
|
||||
|
@ -216,16 +215,8 @@
|
|||
}
|
||||
|
||||
.item {
|
||||
margin: 4px 0 4px 4px;
|
||||
margin: @combo-dataview-item-margins 0 @combo-dataview-item-margins @combo-dataview-item-margins;
|
||||
.box-shadow(none);
|
||||
|
||||
&:hover {
|
||||
.box-shadow(0 0 0 1px @gray);
|
||||
}
|
||||
|
||||
// &.selected {
|
||||
// .box-shadow(0 0 0 2px @primary);
|
||||
// }
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
|
@ -235,6 +226,16 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
.combo-pattern {
|
||||
.combo-textart(40px);
|
||||
|
||||
.item {
|
||||
&:hover {
|
||||
.box-shadow(0 0 0 1px @gray);
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
padding-right: 2px;
|
||||
|
@ -247,31 +248,26 @@
|
|||
};
|
||||
|
||||
.combo-textart {
|
||||
@combo-dataview-button-width: 15px;
|
||||
@combo-dataview-height: 62px;
|
||||
.combo-textart();
|
||||
}
|
||||
|
||||
height: @combo-dataview-height;
|
||||
.combo-spark-style {
|
||||
.combo-textart(58px, 2px);
|
||||
}
|
||||
|
||||
.view {
|
||||
margin-right: -@combo-dataview-button-width;
|
||||
padding-right: @combo-dataview-button-width;
|
||||
}
|
||||
|
||||
.button {
|
||||
width: @combo-dataview-button-width;
|
||||
height: @combo-dataview-height;
|
||||
}
|
||||
.combo-chart-style {
|
||||
.combo-textart(58px, 2px);
|
||||
|
||||
.item {
|
||||
margin: 4px 0 4px 4px;
|
||||
.box-shadow(none);
|
||||
margin-left: 4px;
|
||||
.box-shadow(0 0 0 1px @gray);
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
.item {
|
||||
&:hover:not(.selected) {
|
||||
.box-shadow(none);
|
||||
.box-shadow(0 0 0 1px @gray);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
|
@ -36,9 +36,14 @@
|
|||
.form-control {
|
||||
.border-right-radius(0);
|
||||
border-right: 0;
|
||||
position: static;
|
||||
z-index: auto;
|
||||
float: none;
|
||||
}
|
||||
|
||||
.btn {
|
||||
.btn,
|
||||
.btn:hover,
|
||||
.btn:focus {
|
||||
.border-left-radius(0);
|
||||
border-left: 0;
|
||||
border-color: @input-border;
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
.dropdown-menu > .disabled > a {
|
||||
&:hover,
|
||||
&:focus {
|
||||
cursor: default;
|
||||
}
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
|
|
|
@ -80,8 +80,17 @@
|
|||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
background-color: @app-header-bg-color;
|
||||
padding: 0 15px + @app-header-height / 3;
|
||||
padding: 0 7px + @app-header-height / 3;
|
||||
cursor: default;
|
||||
|
||||
div {
|
||||
display: inline-block;
|
||||
padding: 2px 8px;
|
||||
|
||||
&.renamed:hover {
|
||||
background-color: @app-header-bg-color-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#header-back {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#history-header {
|
||||
position: absolute;
|
||||
height: 45px;
|
||||
height: 53px;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
|
@ -13,6 +13,29 @@
|
|||
border-bottom: 1px solid @gray-dark;
|
||||
|
||||
#history-btn-back {
|
||||
height: 27px;
|
||||
margin-top: 15px;
|
||||
padding-top: 4px;
|
||||
padding-left: 20px;
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background-color: @secondary;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#history-expand-changes {
|
||||
position: absolute;
|
||||
height: 45px;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
overflow: hidden;
|
||||
border-top: 1px solid @gray-dark;
|
||||
|
||||
#history-btn-expand {
|
||||
height: 27px;
|
||||
margin-top: 8px;
|
||||
padding-top: 4px;
|
||||
|
@ -29,7 +52,7 @@
|
|||
#history-list {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
padding-top: 45px;
|
||||
padding: 53px 0 45px 0;
|
||||
|
||||
.item {
|
||||
display: block;
|
||||
|
@ -56,6 +79,10 @@
|
|||
.user-date {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.revision-expand {
|
||||
background-position: -70px -145px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -75,7 +102,7 @@
|
|||
|
||||
.user-version {
|
||||
display: inline-block;
|
||||
width: 36px;
|
||||
max-width: 60px;
|
||||
height: 18px;
|
||||
color: @primary;
|
||||
font-size: 10px;
|
||||
|
@ -83,7 +110,7 @@
|
|||
overflow: hidden;
|
||||
background-color: #e6e6e6;
|
||||
text-align: center;
|
||||
padding: 1px 0;
|
||||
padding: 1px 5px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
|
@ -93,6 +120,9 @@
|
|||
overflow: hidden;
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
color: @gray-darker;
|
||||
max-width: 210px;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.color {
|
||||
|
@ -102,5 +132,29 @@
|
|||
margin: 0 5px 3px 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.revision-expand {
|
||||
width: 23px;
|
||||
height: 23px;
|
||||
background-position: -43px -145px;
|
||||
margin: 10px 10px;
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
|
||||
&.up {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
|
||||
.revision-restore {
|
||||
color: #fff;
|
||||
border-bottom: 1px dotted #fff;
|
||||
height: 16px;
|
||||
margin-top: 5px;
|
||||
white-space: pre-wrap;
|
||||
width: auto;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
}
|
||||
|
||||
.asc-loadmask-image {
|
||||
background-image: ~"url(@{common-image-path}/load-mask/loading.gif)";
|
||||
background-image: ~"url(@{common-image-const-path}/load-mask/loading.gif)";
|
||||
height: 33px;
|
||||
width: 33px;
|
||||
float: left;
|
||||
|
@ -46,6 +46,7 @@
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #f4f4f4;
|
||||
z-index: 10;
|
||||
|
||||
.message-block {
|
||||
display: inline-block;
|
||||
|
|
|
@ -41,11 +41,6 @@
|
|||
height: 19px;
|
||||
}
|
||||
|
||||
.btn-toolbar {
|
||||
span.btn-icon {
|
||||
.background-ximage('@{common-image-path}/@{common-controls}', '@{common-image-path}/@{common-controls2x}', 100px);
|
||||
}
|
||||
}
|
||||
.review-prev {background-position: -40px -250px;}
|
||||
button.active > .review-prev,
|
||||
button:active > .review-prev {background-position: -60px -250px !important;}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
.tablestyler-cell .cell-content .content-text {
|
||||
display: block;
|
||||
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAAECAAAAACBhLHlAAAAEUlEQVR42mM4cIABiP7/ByIAJwAG/emrCjYAAAAASUVORK5CYII=') repeat 0 0 scroll;
|
||||
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAAECAQAAAAO5iayAAAAAXNSR0IArs4c6QAAAAJiS0dEAP+Hj8y/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AkeChACzh0FVAAAABFJREFUCNdjPPCfgYGJAQUAACB0AcMrPC7hAAAAAElFTkSuQmCC') repeat 0 0 scroll;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
|
@ -5,8 +5,10 @@
|
|||
// Paths
|
||||
// -------------------------
|
||||
|
||||
@app-image-path: "resources/img";
|
||||
@common-image-path: "../../common/main/resources/img";
|
||||
@app-image-path: "../../resources/img"; // use for data-uri(...)
|
||||
@common-image-path: "../../../../common/main/resources/img"; // use for data-uri(...)
|
||||
@app-image-const-path: "resources/img"; // use for url(...)
|
||||
@common-image-const-path: "../../common/main/resources/img"; // use for url(...)
|
||||
|
||||
// Grays
|
||||
// -------------------------
|
||||
|
@ -46,6 +48,7 @@
|
|||
|
||||
@link-color: @brand-primary;
|
||||
@link-hover-color: darken(@link-color, 15%);
|
||||
@link-hover-decoration: underline;
|
||||
|
||||
// Typography
|
||||
// -------------------------
|
||||
|
@ -81,7 +84,7 @@
|
|||
|
||||
@icon-font-path: "../fonts/";
|
||||
@icon-font-name: "glyphicons-halflings-regular";
|
||||
|
||||
@icon-font-svg-id: "glyphicons_halflingsregular";
|
||||
|
||||
// Components
|
||||
// -------------------------
|
||||
|
@ -157,6 +160,10 @@
|
|||
|
||||
@btn-link-disabled-color: @gray-light;
|
||||
|
||||
// Allows for customizing button radius independently from global border radius
|
||||
@btn-border-radius-base: @border-radius-base;
|
||||
@btn-border-radius-large: @border-radius-large;
|
||||
@btn-border-radius-small: @border-radius-small;
|
||||
|
||||
// Forms
|
||||
// -------------------------
|
||||
|
@ -167,20 +174,35 @@
|
|||
@input-color: #000;
|
||||
@input-border: @gray;
|
||||
@input-border-radius: @border-radius-base;
|
||||
@input-border-radius-large: @border-radius-large;
|
||||
@input-border-radius-small: @border-radius-small;
|
||||
@input-border-focus: #66afe9;
|
||||
|
||||
// TODO: Rename `@input-border-radius` to `@input-border-radius-base` in v4
|
||||
//** Default `.form-control` border radius
|
||||
// This has no effect on `<select>`s in some browsers, due to the limited stylability of `<select>`s in CSS.
|
||||
@input-border-radius: @border-radius-base;
|
||||
//** Large `.form-control` border radius
|
||||
@input-border-radius-large: @border-radius-large;
|
||||
//** Small `.form-control` border radius
|
||||
@input-border-radius-small: @border-radius-small;
|
||||
|
||||
@input-color-placeholder: @gray;
|
||||
|
||||
@input-height-base: (floor(@font-size-base * @line-height-base) + (@padding-base-vertical * 2) + 5);
|
||||
@input-height-large: (ceil(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2);
|
||||
@input-height-small: (floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 2);
|
||||
|
||||
@form-group-margin-bottom: 15px;
|
||||
|
||||
@legend-color: @gray-dark;
|
||||
@legend-border-color: #e5e5e5;
|
||||
|
||||
@input-group-addon-bg: @input-bg;
|
||||
@input-group-addon-border-color: @input-border;
|
||||
|
||||
// Disabled cursor for form controls and buttons.
|
||||
@cursor-disabled: default;
|
||||
|
||||
// Dropdowns
|
||||
// -------------------------
|
||||
|
@ -277,6 +299,7 @@
|
|||
@navbar-border-radius: @border-radius-base;
|
||||
@navbar-padding-horizontal: floor(@grid-gutter-width / 2);
|
||||
@navbar-padding-vertical: ((@navbar-height - @line-height-computed) / 2);
|
||||
@navbar-collapse-max-height: 340px;
|
||||
|
||||
@navbar-default-color: #777;
|
||||
@navbar-default-bg: #f8f8f8;
|
||||
|
@ -360,22 +383,33 @@
|
|||
|
||||
// Pagination
|
||||
// -------------------------
|
||||
|
||||
@pagination-color: @link-color;
|
||||
@pagination-bg: #fff;
|
||||
@pagination-border: #ddd;
|
||||
|
||||
@pagination-hover-color: @link-hover-color;
|
||||
@pagination-hover-bg: @gray-lighter;
|
||||
@pagination-hover-border: #ddd;
|
||||
|
||||
@pagination-active-bg: @brand-primary;
|
||||
@pagination-active-color: #fff;
|
||||
@pagination-active-border: @brand-primary;
|
||||
|
||||
@pagination-disabled-color: @gray-light;
|
||||
|
||||
@pagination-disabled-bg: #fff;
|
||||
@pagination-disabled-border: #ddd;
|
||||
|
||||
// Pager
|
||||
// -------------------------
|
||||
|
||||
@pager-bg: @pagination-bg;
|
||||
@pager-border: @pagination-border;
|
||||
@pager-border-radius: 15px;
|
||||
|
||||
@pager-hover-bg: @pagination-hover-bg;
|
||||
|
||||
@pager-active-bg: @pagination-active-bg;
|
||||
@pager-active-color: @pagination-active-color;
|
||||
|
||||
@pager-disabled-color: @gray-light;
|
||||
|
||||
|
||||
|
@ -387,7 +421,7 @@
|
|||
@jumbotron-bg: @gray-lighter;
|
||||
@jumbotron-heading-color: inherit;
|
||||
@jumbotron-font-size: ceil(@font-size-base * 1.5);
|
||||
|
||||
@jumbotron-heading-font-size: ceil((@font-size-base * 4.5));
|
||||
|
||||
// Form states and alerts
|
||||
// -------------------------
|
||||
|
@ -414,6 +448,7 @@
|
|||
@tooltip-max-width: 200px;
|
||||
@tooltip-color: #fff;
|
||||
@tooltip-bg: #000;
|
||||
@tooltip-opacity: .9;
|
||||
|
||||
@tooltip-arrow-width: 5px;
|
||||
@tooltip-arrow-color: @tooltip-bg;
|
||||
|
@ -462,9 +497,13 @@
|
|||
@modal-content-fallback-border-color: #999;
|
||||
|
||||
@modal-backdrop-bg: #000;
|
||||
@modal-backdrop-opacity: .5;
|
||||
@modal-header-border-color: #e5e5e5;
|
||||
@modal-footer-border-color: @modal-header-border-color;
|
||||
|
||||
@modal-lg: 900px;
|
||||
@modal-md: 600px;
|
||||
@modal-sm: 300px;
|
||||
|
||||
// Alerts
|
||||
// -------------------------
|
||||
|
@ -493,6 +532,7 @@
|
|||
// -------------------------
|
||||
@progress-bg: #f5f5f5;
|
||||
@progress-bar-color: #fff;
|
||||
@progress-border-radius: @border-radius-base;
|
||||
|
||||
@progress-bar-bg: @brand-primary;
|
||||
@progress-bar-success-bg: @brand-success;
|
||||
|
@ -511,14 +551,23 @@
|
|||
@list-group-active-color: @component-active-color;
|
||||
@list-group-active-bg: @component-active-bg;
|
||||
@list-group-active-border: @list-group-active-bg;
|
||||
@list-group-active-text-color: lighten(@list-group-active-bg, 40%);
|
||||
|
||||
@list-group-disabled-color: @gray-light;
|
||||
@list-group-disabled-bg: @gray-lighter;
|
||||
@list-group-disabled-text-color: @list-group-disabled-color;
|
||||
|
||||
@list-group-link-color: #555;
|
||||
@list-group-link-hover-color: @list-group-link-color;
|
||||
@list-group-link-heading-color: #333;
|
||||
|
||||
|
||||
// Panels
|
||||
// -------------------------
|
||||
@panel-bg: #fff;
|
||||
@panel-body-padding: 15px;
|
||||
@panel-heading-padding: 10px 15px;
|
||||
@panel-footer-padding: @panel-heading-padding;
|
||||
@panel-inner-border: #ddd;
|
||||
@panel-border-radius: @border-radius-base;
|
||||
@panel-footer-bg: #f5f5f5;
|
||||
|
@ -562,7 +611,7 @@
|
|||
// Wells
|
||||
// -------------------------
|
||||
@well-bg: #f5f5f5;
|
||||
|
||||
@well-border: darken(@well-bg, 7%);
|
||||
|
||||
// Badges
|
||||
// -------------------------
|
||||
|
@ -580,6 +629,8 @@
|
|||
|
||||
// Breadcrumbs
|
||||
// -------------------------
|
||||
@breadcrumb-padding-vertical: 8px;
|
||||
@breadcrumb-padding-horizontal: 15px;
|
||||
@breadcrumb-bg: #f5f5f5;
|
||||
@breadcrumb-color: #ccc;
|
||||
@breadcrumb-active-color: @gray-light;
|
||||
|
@ -614,6 +665,9 @@
|
|||
@code-color: #c7254e;
|
||||
@code-bg: #f9f2f4;
|
||||
|
||||
@kbd-color: #fff;
|
||||
@kbd-bg: #333;
|
||||
|
||||
@pre-bg: #f5f5f5;
|
||||
@pre-color: @gray-dark;
|
||||
@pre-border-color: #ccc;
|
||||
|
@ -625,6 +679,7 @@
|
|||
@abbr-border-color: @gray-light;
|
||||
@headings-small-color: @gray-light;
|
||||
@blockquote-small-color: @gray-light;
|
||||
@blockquote-font-size: (@font-size-base * 1.25);
|
||||
@blockquote-border-color: @gray-lighter;
|
||||
@page-header-border-color: @gray-lighter;
|
||||
|
||||
|
@ -636,6 +691,9 @@
|
|||
|
||||
// Horizontal forms & lists
|
||||
@component-offset-horizontal: 180px;
|
||||
@blockquote-font-size: (@font-size-base * 1.25);
|
||||
@dl-horizontal-offset: @component-offset-horizontal;
|
||||
@dl-horizontal-breakpoint: @grid-float-breakpoint;
|
||||
|
||||
|
||||
// Container sizes
|
||||
|
@ -724,3 +782,7 @@
|
|||
// Plus
|
||||
@plus-offset-x: -81px;
|
||||
@plus-offset-y: -184px;
|
||||
|
||||
@dl-horizontal-offset: @component-offset-horizontal;
|
||||
// Point at which .dl-horizontal becomes horizontal
|
||||
@dl-horizontal-breakpoint: @grid-float-breakpoint;
|
|
@ -32,6 +32,12 @@
|
|||
bottom: 42%;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
line-height: 10px;
|
||||
}
|
||||
|
||||
.loader-logo {
|
||||
max-height: 160px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.loader-page-romb {
|
||||
|
@ -176,7 +182,7 @@
|
|||
</style>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
|
@ -187,12 +193,23 @@
|
|||
<script src="../../../vendor/less/dist/less-1.5.1.js" type="text/javascript"></script>
|
||||
<!-- debug end -->
|
||||
|
||||
<!--facebook button-->
|
||||
<div id="fb-root"></div>
|
||||
|
||||
<!--twitter button-->
|
||||
|
||||
<script>
|
||||
var userAgent = navigator.userAgent.toLowerCase(),
|
||||
check = function(regex){ return regex.test(userAgent); };
|
||||
if (!check(/opera/) && (check(/msie/) || check(/trident/))) {
|
||||
var m = /msie (\d+\.\d+)/.exec(userAgent);
|
||||
if (m && parseFloat(m[1]) < 9.0) {
|
||||
document.write(
|
||||
'<div id="id-error-mask" class="errormask">',
|
||||
'<div class="error-body" align="center">',
|
||||
'<div id="id-error-mask-title" class="title">Your browser is not supported.</div>',
|
||||
'<div id="id-error-mask-text">Sorry, ONLYOFFICE Document is currently only supported in the latest versions of the Chrome, Firefox, Safari or Internet Explorer web browsers.</div>',
|
||||
'</div>',
|
||||
'</div>'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function getUrlParams() {
|
||||
var e,
|
||||
a = /\+/g, // Regex for replacing addition symbol with a space
|
||||
|
@ -219,7 +236,8 @@
|
|||
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...';
|
||||
loading = 'Loading...',
|
||||
logo = params["logo"] ? ((params["logo"] !== 'none') ? ('<img src="' + encodeUrlParam(params["logo"]) + '" class="loader-logo" />') : '') : null;
|
||||
|
||||
if ( lang == 'de') loading = 'Ladevorgang...';
|
||||
else if ( lang == 'es') loading = 'Cargando...';
|
||||
|
@ -232,41 +250,43 @@
|
|||
|
||||
document.write(
|
||||
'<div id="loading-mask" class="loadmask">' +
|
||||
'<div class="loader-page" style="margin-bottom: ' + margin + 'px;">' +
|
||||
'<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" 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>
|
||||
|
||||
<div id="editor_sdk" class="viewer" style="overflow: hidden;"></div>
|
||||
<div id="editor_sdk" class="viewer" style="overflow: hidden;" tabindex="-1"></div>
|
||||
|
||||
<div class="overlay-controls" style="margin-left: -32px">
|
||||
<ul class="left">
|
||||
<li id="id-btn-zoom-in"><button class="overlay"><i class="overlay-icon-zoom-in"></i></button></li>
|
||||
<li id="id-btn-zoom-out"><button class="overlay"><i class="overlay-icon-zoom-out"></i></button></li>
|
||||
<li id="id-btn-zoom-in"><button class="overlay svg-icon zoom-up"></button></li>
|
||||
<li id="id-btn-zoom-out"><button class="overlay svg-icon zoom-down"></button></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="toolbar" id="toolbar">
|
||||
<ul class="left">
|
||||
<li><a id="header-logo" class="brand-logo" href="http://www.onlyoffice.com/" target="_blank"></a></li>
|
||||
<li class="separator"></li>
|
||||
<li id="id-btn-copy"><button class="control-btn"><i class="control-icon-save"></i><span>Save Copy</span></button></li>
|
||||
<li id="id-btn-share"><button class="control-btn"><i class="control-icon-share"></i><span>Share</span></button></li>
|
||||
<li id="id-btn-embed"><button class="control-btn"><i class="control-icon-embed"></i><span>Embed</span></button></li>
|
||||
</ul>
|
||||
<ul class="right">
|
||||
<li><input id="page-number" class="form-control input-sm" style="width: 25px;" type="text" value="0"><span class="text" id="pages">of 0</span></li>
|
||||
<li class="separator"></li>
|
||||
<li><button id="id-btn-fullscreen" class="control-btn no-caption"><i class="control-icon-fullscreen"></i></button></li>
|
||||
<li><button id="id-btn-close" class="control-btn no-caption"><i class="control-icon-close"></i></button></li>
|
||||
</ul>
|
||||
<div class="group left">
|
||||
<div id="box-tools" class="dropdown">
|
||||
<button class="control-btn svg-icon tools"></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group center">
|
||||
<span><a id="header-logo" class="brand-logo" href="http://www.onlyoffice.com/" target="_blank"></a></span>
|
||||
</div>
|
||||
<div class="group right">
|
||||
<div class="item"><input id="page-number" class="form-control input-xs masked" type="text" value="0"><span class="text" id="pages" tabindex="-1">of 0</span></div>
|
||||
<div class="item separator"></div>
|
||||
<div class="item"><button id="id-btn-close" class="control-btn close"><span aria-hidden="true">×</span></button></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade error" id="id-critical-error-dialog" tabindex="-1" role="dialog">
|
||||
|
@ -290,11 +310,13 @@
|
|||
<div class="cmd-loader-title">Please wait...</div>
|
||||
</div>
|
||||
|
||||
<div class="hyperlink-tooltip" data-toggle="tooltip" title="Press Ctrl and click the link" style="display:none;"></div>
|
||||
|
||||
<!--vendor-->
|
||||
<script type="text/javascript" src="../../../vendor/jquery/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/jquery.browser/dist/jquery.browser.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/bootstrap/dist/js/bootstrap.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/ZeroClipboard/ZeroClipboard.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../../../vendor/sockjs/sockjs.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/xregexp/xregexp-all-min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/jszip/jszip.min.js"></script>
|
||||
|
@ -311,6 +333,9 @@
|
|||
<!--application-->
|
||||
<script type="text/javascript" src="../../common/Gateway.js"></script>
|
||||
<script type="text/javascript" src="../../common/Analytics.js"></script>
|
||||
<script type="text/javascript" src="../../common/embed/lib/util/utils.js"></script>
|
||||
<script type="text/javascript" src="../../common/embed/lib/view/modals.js"></script>
|
||||
<script type="text/javascript" src="../../common/embed/lib/controller/modals.js"></script>
|
||||
<script type="text/javascript" src="js/ApplicationView.js"></script>
|
||||
<script type="text/javascript" src="js/ApplicationController.js"></script>
|
||||
<script type="text/javascript" src="js/application.js"></script>
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<link href="../../../apps/documenteditor/embed/resources/css/app-all.css" rel="stylesheet">
|
||||
|
||||
<!-- splash -->
|
||||
|
||||
<style type="text/css">
|
||||
|
@ -28,6 +30,12 @@
|
|||
bottom: 42%;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
line-height: 10px;
|
||||
}
|
||||
|
||||
.loader-logo {
|
||||
max-height: 160px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.loader-page-romb {
|
||||
|
@ -171,18 +179,29 @@
|
|||
</style>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
<body class="embed-body">
|
||||
|
||||
<!--facebook button-->
|
||||
<div id="fb-root"></div>
|
||||
|
||||
<!--twitter button-->
|
||||
|
||||
<script>
|
||||
var userAgent = navigator.userAgent.toLowerCase(),
|
||||
check = function(regex){ return regex.test(userAgent); };
|
||||
if (!check(/opera/) && (check(/msie/) || check(/trident/))) {
|
||||
var m = /msie (\d+\.\d+)/.exec(userAgent);
|
||||
if (m && parseFloat(m[1]) < 9.0) {
|
||||
document.write(
|
||||
'<div id="id-error-mask" class="errormask">',
|
||||
'<div class="error-body" align="center">',
|
||||
'<div id="id-error-mask-title" class="title">Your browser is not supported.</div>',
|
||||
'<div id="id-error-mask-text">Sorry, ONLYOFFICE Document is currently only supported in the latest versions of the Chrome, Firefox, Safari or Internet Explorer web browsers.</div>',
|
||||
'</div>',
|
||||
'</div>'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function getUrlParams() {
|
||||
var e,
|
||||
a = /\+/g, // Regex for replacing addition symbol with a space
|
||||
|
@ -209,7 +228,8 @@
|
|||
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...';
|
||||
loading = 'Loading...',
|
||||
logo = params["logo"] ? ((params["logo"] !== 'none') ? ('<img src="' + encodeUrlParam(params["logo"]) + '" class="loader-logo" />') : '') : null;
|
||||
|
||||
if ( lang == 'de') loading = 'Ladevorgang...';
|
||||
else if ( lang == 'es') loading = 'Cargando...';
|
||||
|
@ -222,41 +242,43 @@
|
|||
|
||||
document.write(
|
||||
'<div id="loading-mask" class="loadmask">' +
|
||||
'<div class="loader-page" style="margin-bottom: ' + margin + 'px;">' +
|
||||
'<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" 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>
|
||||
|
||||
<div id="editor_sdk" class="viewer" style="overflow: hidden;"></div>
|
||||
<div id="editor_sdk" class="viewer" style="overflow: hidden;" tabindex="-1"></div>
|
||||
|
||||
<div class="overlay-controls" style="margin-left: -32px">
|
||||
<ul class="left">
|
||||
<li id="id-btn-zoom-in"><button class="overlay"><i class="overlay-icon-zoom-in"></i></button></li>
|
||||
<li id="id-btn-zoom-out"><button class="overlay"><i class="overlay-icon-zoom-out"></i></button></li>
|
||||
<li id="id-btn-zoom-in"><button class="overlay svg-icon zoom-up"></button></li>
|
||||
<li id="id-btn-zoom-out"><button class="overlay svg-icon zoom-down"></button></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="toolbar" id="toolbar">
|
||||
<ul class="left">
|
||||
<li><a id="header-logo" class="brand-logo" href="http://www.onlyoffice.com/" target="_blank"></a></li>
|
||||
<li class="separator"></li>
|
||||
<li id="id-btn-copy"><button class="control-btn"><i class="control-icon-save"></i><span>Save Copy</span></button></li>
|
||||
<li id="id-btn-share"><button class="control-btn"><i class="control-icon-share"></i><span>Share</span></button></li>
|
||||
<li id="id-btn-embed"><button class="control-btn"><i class="control-icon-embed"></i><span>Embed</span></button></li>
|
||||
</ul>
|
||||
<ul class="right">
|
||||
<li><input id="page-number" class="form-control input-sm" style="width: 25px;" type="text" value="0"><span class="text" id="pages">of 0</span></li>
|
||||
<li class="separator"></li>
|
||||
<li><button id="id-btn-fullscreen" class="control-btn no-caption"><i class="control-icon-fullscreen"></i></button></li>
|
||||
<li><button id="id-btn-close" class="control-btn no-caption"><i class="control-icon-close"></i></button></li>
|
||||
</ul>
|
||||
<div class="group left">
|
||||
<div id="box-tools" class="dropdown">
|
||||
<button class="control-btn svg-icon tools"></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group center">
|
||||
<span><a id="header-logo" class="brand-logo" href="http://www.onlyoffice.com/" target="_blank"></a></span>
|
||||
</div>
|
||||
<div class="group right">
|
||||
<div class="item"><input id="page-number" class="form-control input-xs masked" type="text" value="0"><span class="text" id="pages" tabindex="-1">of 0</span></div>
|
||||
<div class="item separator"></div>
|
||||
<div class="item"><button id="id-btn-close" class="control-btn close"><span aria-hidden="true">×</span></button></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade error" id="id-critical-error-dialog" tabindex="-1" role="dialog">
|
||||
|
@ -280,11 +302,12 @@
|
|||
<div class="cmd-loader-title">Please wait...</div>
|
||||
</div>
|
||||
|
||||
<div class="hyperlink-tooltip" data-toggle="tooltip" title="Press Ctrl and click the link" style="display:none;"></div>
|
||||
|
||||
<!--vendor-->
|
||||
<script type="text/javascript" src="../../../vendor/jquery/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/jquery/jquery.browser.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/ZeroClipboard/ZeroClipboard.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/sockjs/sockjs.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/xregexp/xregexp-all-min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/jszip/jszip.min.js"></script>
|
||||
|
@ -296,7 +319,6 @@
|
|||
<script type="text/javascript" src="../../../../sdkjs/word/sdk-all-min.js"></script>
|
||||
|
||||
<!--application-->
|
||||
<link href="../../../apps/documenteditor/embed/resources/css/app-all.css" rel="stylesheet">
|
||||
<script type="text/javascript" src="../../../apps/documenteditor/embed/app-all.js"></script>
|
||||
<script type="text/javascript">
|
||||
var isBrowserSupported = function() {
|
||||
|
|
|
@ -38,13 +38,8 @@ var ApplicationController = new(function(){
|
|||
embedConfig = {},
|
||||
permissions = {},
|
||||
maxPages = 0,
|
||||
minToolbarWidth = 550,
|
||||
minEmbedWidth = 400,
|
||||
minEmbedHeight = 600,
|
||||
embedCode = '<iframe allowtransparency="true" frameborder="0" scrolling="no" src="{embed-url}" width="{width}" height="{height}"></iframe>',
|
||||
maxZIndex = 9090,
|
||||
created = false,
|
||||
iframePrint = null;
|
||||
ttOffset = [0, -10];
|
||||
|
||||
// Initialize analytics
|
||||
// -------------------------
|
||||
|
@ -60,56 +55,6 @@ var ApplicationController = new(function(){
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
// Initialize ZeroClipboard
|
||||
// -------------------------
|
||||
|
||||
ZeroClipboard.setMoviePath('../../../vendor/ZeroClipboard/ZeroClipboard10.swf');
|
||||
var clipShortUrl = new ZeroClipboard.Client();
|
||||
var clipEmbedObj = new ZeroClipboard.Client();
|
||||
clipShortUrl.zIndex = maxZIndex;
|
||||
clipEmbedObj.zIndex = maxZIndex;
|
||||
|
||||
|
||||
// Utils
|
||||
// -------------------------
|
||||
|
||||
function emptyFn(){}
|
||||
|
||||
function htmlEncode(value){
|
||||
return $('<div/>').text(value).html();
|
||||
}
|
||||
|
||||
function createBuffered(fn, buffer, scope, args) {
|
||||
return function(){
|
||||
var timerId;
|
||||
return function() {
|
||||
var me = this;
|
||||
if (timerId) {
|
||||
clearTimeout(timerId);
|
||||
timerId = null;
|
||||
}
|
||||
timerId = setTimeout(function(){
|
||||
fn.apply(scope || me, args || arguments);
|
||||
}, buffer);
|
||||
};
|
||||
}();
|
||||
}
|
||||
|
||||
function updateSocial() {
|
||||
var $socialPanel = $('#id-popover-social-container');
|
||||
|
||||
if ($socialPanel.length > 0) {
|
||||
if ($socialPanel.attr('data-loaded') == 'false') {
|
||||
typeof FB !== 'undefined' && FB.XFBML && FB.XFBML.parse();
|
||||
typeof twttr !== 'undefined' && twttr.widgets && twttr.widgets.load();
|
||||
|
||||
$socialPanel.attr('data-loaded', 'true');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Handlers
|
||||
// -------------------------
|
||||
|
||||
|
@ -117,37 +62,7 @@ var ApplicationController = new(function(){
|
|||
config = $.extend(config, data.config);
|
||||
embedConfig = $.extend(embedConfig, data.config.embedded);
|
||||
|
||||
$('#id-short-url').val(embedConfig.shareUrl || 'Unavailable');
|
||||
$('#id-textarea-embed').text(embedCode.replace('{embed-url}', embedConfig.embedUrl).replace('{width}', minEmbedWidth).replace('{height}', minEmbedHeight));
|
||||
|
||||
if (typeof embedConfig.shareUrl !== 'undefined' && embedConfig.shareUrl != ''){
|
||||
(function(d, s, id) {
|
||||
var js, fjs = d.getElementsByTagName(s)[0];
|
||||
if (d.getElementById(id)) return;
|
||||
js = d.createElement(s); js.id = id;
|
||||
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}(document, 'script', 'facebook-jssdk'));
|
||||
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
|
||||
|
||||
if ($('#id-popover-social-container ul')){
|
||||
$('#id-popover-social-container ul').append('<li><div class="fb-like" data-href="' + embedConfig.shareUrl + '" data-send="false" data-layout="button_count" data-width="450" data-show-faces="false"></div></li>');
|
||||
$('#id-popover-social-container ul').append('<li class="share-twitter"><a href="https://twitter.com/share" class="twitter-share-button" data-url="' + embedConfig.shareUrl + '">Tweet</a></li>'); //data-count="none"
|
||||
$('#id-popover-social-container ul').append('<li class="share-mail"><a class="btn btn-xs btn-default" href="mailto:?subject=I have shared a document with you: ' + embedConfig.docTitle + '&body=I have shared a document with you: ' + embedConfig.shareUrl + '"><span class="glyphicon glyphicon-envelope"></span>Email</a></li>');
|
||||
}
|
||||
}
|
||||
if (typeof embedConfig.shareUrl === 'undefined')
|
||||
$('#id-btn-share').hide();
|
||||
|
||||
if (typeof embedConfig.embedUrl === 'undefined')
|
||||
$('#id-btn-embed').hide();
|
||||
|
||||
if (typeof embedConfig.fullscreenUrl === 'undefined')
|
||||
$('#id-btn-fullscreen').hide();
|
||||
|
||||
if (config.canBackToFolder === false || !(config.customization && config.customization.goback && config.customization.goback.url))
|
||||
$('#id-btn-close').hide();
|
||||
|
||||
common.controller.modals.init(embedConfig);
|
||||
|
||||
// Docked toolbar
|
||||
if (embedConfig.toolbarDocked === 'top') {
|
||||
|
@ -156,10 +71,14 @@ var ApplicationController = new(function(){
|
|||
} else {
|
||||
$('#toolbar').addClass('bottom');
|
||||
$('#editor_sdk').addClass('bottom');
|
||||
$('#box-tools').removeClass('dropdown').addClass('dropup');
|
||||
ttOffset[1] = -40;
|
||||
}
|
||||
|
||||
// Hide last separator
|
||||
if (!$('#id-btn-fullscreen').is(":visible") && !$('#id-btn-close').is(":visible")) {
|
||||
if (config.canBackToFolder === false || !(config.customization && config.customization.goback && config.customization.goback.url)) {
|
||||
$('#id-btn-close').hide();
|
||||
|
||||
// Hide last separator
|
||||
$('#toolbar .right .separator').hide();
|
||||
$('#pages').css('margin-right', '12px');
|
||||
}
|
||||
|
@ -177,6 +96,7 @@ var ApplicationController = new(function(){
|
|||
docInfo.put_Title(docConfig.title);
|
||||
docInfo.put_Format(docConfig.fileType);
|
||||
docInfo.put_VKey(docConfig.vkey);
|
||||
docInfo.put_Token(docConfig.token);
|
||||
|
||||
if (api) {
|
||||
api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions);
|
||||
|
@ -187,11 +107,9 @@ var ApplicationController = new(function(){
|
|||
Common.Analytics.trackEvent('Load', 'Start');
|
||||
}
|
||||
|
||||
if (typeof embedConfig.saveUrl === 'undefined' && permissions.print === false)
|
||||
$('#id-btn-copy').hide();
|
||||
|
||||
if (!$('#id-btn-copy').is(":visible") && !$('#id-btn-share').is(":visible") && !$('#id-btn-embed').is(":visible") )
|
||||
$('#toolbar .left .separator').hide();
|
||||
embedConfig.docTitle = docConfig.title;
|
||||
if ( !embedConfig.saveUrl && permissions.print === false)
|
||||
$('#idt-copy').hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -204,14 +122,6 @@ var ApplicationController = new(function(){
|
|||
$('#page-number').val(number + 1);
|
||||
}
|
||||
|
||||
function onHyperlinkClick(url) {
|
||||
if (url) {
|
||||
var newDocumentPage = window.open(url, '_blank');
|
||||
if (newDocumentPage)
|
||||
newDocumentPage.focus();
|
||||
}
|
||||
}
|
||||
|
||||
function onLongActionBegin(type, id) {
|
||||
var text = '';
|
||||
switch (id)
|
||||
|
@ -240,32 +150,43 @@ var ApplicationController = new(function(){
|
|||
|
||||
function onDocMouseMoveEnd() {
|
||||
if (me.isHideBodyTip) {
|
||||
var $tipHyperlink = $('#id-tip-hyperlink');
|
||||
|
||||
if ($tipHyperlink.length > 0) {
|
||||
$tipHyperlink.hide();
|
||||
if ( $tooltip ) {
|
||||
$tooltip.tooltip('hide');
|
||||
$tooltip = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var $ttEl, $tooltip;
|
||||
function onDocMouseMove(data) {
|
||||
if (data) {
|
||||
if (data.get_Type() == 1) { // hyperlink
|
||||
me.isHideBodyTip = false;
|
||||
|
||||
var $tipHyperlink = $('#id-tip-hyperlink'),
|
||||
hyperProps = data.get_Hyperlink(),
|
||||
toolTip = (hyperProps.get_ToolTip()) ? hyperProps.get_ToolTip() : hyperProps.get_Value();
|
||||
if ( !$ttEl ) {
|
||||
$ttEl = $('.hyperlink-tooltip');
|
||||
$ttEl.tooltip({'container':'body', 'trigger':'manual'});
|
||||
$ttEl.on('shown.bs.tooltip', function(e) {
|
||||
$tooltip = $ttEl.data('bs.tooltip').tip();
|
||||
|
||||
if ($tipHyperlink.length > 0) {
|
||||
$tipHyperlink.find('.popover-content p').html(htmlEncode(toolTip) + '<br><b>Press Ctrl and click link</b>');
|
||||
$tipHyperlink.show();
|
||||
$tooltip.css({
|
||||
left: $ttEl.ttpos[0] + ttOffset[0],
|
||||
top: $ttEl.ttpos[1] + ttOffset[1]
|
||||
});
|
||||
|
||||
$tooltip.find('.tooltip-arrow').css({left: 10});
|
||||
});
|
||||
}
|
||||
|
||||
$tipHyperlink.css({
|
||||
left: data.get_X() - 10,
|
||||
top : data.get_Y() - 25
|
||||
})
|
||||
if ( !$tooltip ) {
|
||||
$ttEl.ttpos = [data.get_X(), data.get_Y()];
|
||||
$ttEl.tooltip('show');
|
||||
} else {
|
||||
$tooltip.css({
|
||||
left:data.get_X() + ttOffset[0],
|
||||
top:data.get_Y() + ttOffset[1]
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -275,32 +196,12 @@ var ApplicationController = new(function(){
|
|||
}
|
||||
|
||||
function onPrint() {
|
||||
if (api && permissions.print!==false)
|
||||
if ( permissions.print!==false )
|
||||
api.asc_Print($.browser.chrome || $.browser.safari || $.browser.opera);
|
||||
}
|
||||
|
||||
function onPrintUrl(url) {
|
||||
if (iframePrint) {
|
||||
iframePrint.parentNode.removeChild(iframePrint);
|
||||
iframePrint = null;
|
||||
}
|
||||
if (!iframePrint) {
|
||||
iframePrint = document.createElement("iframe");
|
||||
iframePrint.id = "id-print-frame";
|
||||
iframePrint.style.display = 'none';
|
||||
iframePrint.style.visibility = "hidden";
|
||||
iframePrint.style.position = "fixed";
|
||||
iframePrint.style.right = "0";
|
||||
iframePrint.style.bottom = "0";
|
||||
document.body.appendChild(iframePrint);
|
||||
iframePrint.onload = function() {
|
||||
iframePrint.contentWindow.focus();
|
||||
iframePrint.contentWindow.print();
|
||||
iframePrint.contentWindow.blur();
|
||||
window.focus();
|
||||
};
|
||||
}
|
||||
if (url) iframePrint.src = url;
|
||||
common.utils.dialogPrint(url);
|
||||
}
|
||||
|
||||
function hidePreloader() {
|
||||
|
@ -308,13 +209,106 @@ var ApplicationController = new(function(){
|
|||
}
|
||||
|
||||
function onDocumentContentReady() {
|
||||
setVisiblePopover($('#id-popover-share'), false);
|
||||
setVisiblePopover($('#id-popover-embed'), false);
|
||||
$('#id-tip-hyperlink').hide();
|
||||
|
||||
handlerToolbarSize();
|
||||
hidePreloader();
|
||||
|
||||
if ( !embedConfig.shareUrl )
|
||||
$('#idt-share').hide();
|
||||
|
||||
if ( !embedConfig.embedUrl )
|
||||
$('#idt-embed').hide();
|
||||
|
||||
if ( !embedConfig.fullscreenUrl )
|
||||
$('#idt-fullscreen').hide();
|
||||
|
||||
common.controller.modals.attach({
|
||||
share: '#idt-share',
|
||||
embed: '#idt-embed'
|
||||
});
|
||||
|
||||
api.asc_registerCallback('asc_onStartAction', onLongActionBegin);
|
||||
api.asc_registerCallback('asc_onEndAction', onLongActionEnd);
|
||||
api.asc_registerCallback('asc_onMouseMoveStart', onDocMouseMoveStart);
|
||||
api.asc_registerCallback('asc_onMouseMoveEnd', onDocMouseMoveEnd);
|
||||
api.asc_registerCallback('asc_onMouseMove', onDocMouseMove);
|
||||
api.asc_registerCallback('asc_onHyperlinkClick', common.utils.openLink);
|
||||
api.asc_registerCallback('asc_onDownloadUrl', onDownloadUrl);
|
||||
api.asc_registerCallback('asc_onPrint', onPrint);
|
||||
api.asc_registerCallback('asc_onPrintUrl', onPrintUrl);
|
||||
|
||||
Common.Gateway.on('processmouse', onProcessMouse);
|
||||
Common.Gateway.on('downloadas', onDownloadAs);
|
||||
|
||||
ApplicationView.tools.get('#idt-fullscreen')
|
||||
.on('click', function(){
|
||||
common.utils.openLink(embedConfig.fullscreenUrl);
|
||||
});
|
||||
|
||||
ApplicationView.tools.get('#idt-download')
|
||||
.on('click', function(){
|
||||
if ( !!embedConfig.saveUrl ){
|
||||
common.utils.openLink(embedConfig.saveUrl);
|
||||
} else
|
||||
if (api && permissions.print!==false){
|
||||
api.asc_Print($.browser.chrome || $.browser.safari || $.browser.opera);
|
||||
}
|
||||
|
||||
Common.Analytics.trackEvent('Save');
|
||||
});
|
||||
|
||||
$('#id-btn-close').on('click', function(){
|
||||
if (config.customization && config.customization.goback && config.customization.goback.url)
|
||||
window.parent.location.href = config.customization.goback.url;
|
||||
});
|
||||
|
||||
$('#id-btn-zoom-in').on('click', api.zoomIn.bind(this));
|
||||
$('#id-btn-zoom-out').on('click', api.zoomOut.bind(this));
|
||||
|
||||
var $pagenum = $('#page-number');
|
||||
$pagenum.on({
|
||||
'keyup': function(e){
|
||||
if ( e.keyCode == 13 ){
|
||||
var newPage = parseInt($('#page-number').val());
|
||||
|
||||
if ( newPage > maxPages ) newPage = maxPages;
|
||||
if (newPage < 2 || isNaN(newPage)) newPage = 1;
|
||||
|
||||
api.goToPage(newPage-1);
|
||||
$pagenum.blur();
|
||||
}
|
||||
}
|
||||
, 'focusin' : function(e) {
|
||||
$pagenum.removeClass('masked');
|
||||
}
|
||||
, 'focusout': function(e){
|
||||
!$pagenum.hasClass('masked') && $pagenum.addClass('masked');
|
||||
}
|
||||
});
|
||||
|
||||
$('#pages').on('click', function(e) {
|
||||
$pagenum.focus();
|
||||
});
|
||||
|
||||
var documentMoveTimer;
|
||||
var ismoved = false;
|
||||
$(document).mousemove(function(event){
|
||||
$('#id-btn-zoom-in').fadeIn();
|
||||
$('#id-btn-zoom-out').fadeIn();
|
||||
|
||||
ismoved = true;
|
||||
if ( !documentMoveTimer ) {
|
||||
documentMoveTimer = setInterval(function(){
|
||||
if ( !ismoved ) {
|
||||
$('#id-btn-zoom-in').fadeOut();
|
||||
$('#id-btn-zoom-out').fadeOut();
|
||||
clearInterval(documentMoveTimer);
|
||||
documentMoveTimer = undefined;
|
||||
}
|
||||
|
||||
ismoved = false;
|
||||
}, 2000);
|
||||
}
|
||||
});
|
||||
|
||||
Common.Analytics.trackEvent('Load', 'Complete');
|
||||
}
|
||||
|
||||
|
@ -439,112 +433,8 @@ var ApplicationController = new(function(){
|
|||
// Helpers
|
||||
// -------------------------
|
||||
|
||||
var handlerToolbarSize = createBuffered(function(size){
|
||||
var visibleCaption = function(btn, visible){
|
||||
if (visible){
|
||||
$(btn + ' button').addClass('no-caption');
|
||||
$(btn + ' button span').css('display', 'none');
|
||||
} else {
|
||||
$(btn + ' button').removeClass('no-caption');
|
||||
$(btn + ' button span').css('display', 'inline');
|
||||
}
|
||||
};
|
||||
|
||||
var isMinimize = $('#toolbar').width() < minToolbarWidth;
|
||||
|
||||
visibleCaption('#id-btn-copy', isMinimize);
|
||||
visibleCaption('#id-btn-share', isMinimize);
|
||||
visibleCaption('#id-btn-embed', isMinimize);
|
||||
}, 10);
|
||||
|
||||
function onDocumentResize() {
|
||||
if (api)
|
||||
api.Resize();
|
||||
|
||||
handlerToolbarSize();
|
||||
}
|
||||
|
||||
function isVisiblePopover(popover){
|
||||
return popover.hasClass('in');
|
||||
}
|
||||
|
||||
function setVisiblePopover(popover, visible, owner){
|
||||
api && api.asc_enableKeyEvents(!visible);
|
||||
|
||||
if (visible){
|
||||
if (owner){
|
||||
popover.css('display', 'block');
|
||||
|
||||
var popoverData = owner.data('bs.popover'),
|
||||
$tip = popoverData.tip(),
|
||||
pos = popoverData.getPosition(false),
|
||||
actualHeight = $tip[0].offsetHeight,
|
||||
placement = (embedConfig.toolbarDocked === 'top') ? 'bottom' : 'top',
|
||||
tp;
|
||||
|
||||
$tip.removeClass('fade in top bottom left right');
|
||||
|
||||
switch (placement) {
|
||||
case 'bottom':
|
||||
tp = {
|
||||
top : pos.top + pos.height,
|
||||
left: owner.position().left + (owner.width() - popover.width()) * 0.5
|
||||
};
|
||||
break;
|
||||
|
||||
default:
|
||||
case 'top':
|
||||
tp = {
|
||||
top : pos.top - actualHeight,
|
||||
left: owner.position().left + (owner.width() - popover.width()) * 0.5
|
||||
};
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
$tip
|
||||
.css(tp)
|
||||
.addClass(placement)
|
||||
.addClass('in')
|
||||
}
|
||||
|
||||
if (popover.hasClass('embed')) {
|
||||
clipEmbedObj.show();
|
||||
}
|
||||
|
||||
if (popover.hasClass('share')) {
|
||||
clipShortUrl.show();
|
||||
updateSocial();
|
||||
}
|
||||
} else {
|
||||
popover.removeClass('in');
|
||||
popover.css('display', 'none');
|
||||
|
||||
popover.hasClass('embed') && clipEmbedObj.hide();
|
||||
popover.hasClass('share') && clipShortUrl.hide();
|
||||
}
|
||||
}
|
||||
|
||||
function updateEmbedCode(){
|
||||
var newWidth = parseInt($('#id-input-embed-width').val()),
|
||||
newHeight = parseInt($('#id-input-embed-height').val());
|
||||
|
||||
if (newWidth < minEmbedWidth)
|
||||
newWidth = minEmbedWidth;
|
||||
|
||||
if (newHeight < minEmbedHeight)
|
||||
newHeight = minEmbedHeight;
|
||||
|
||||
$('#id-textarea-embed').text(embedCode.replace('{embed-url}', embedConfig.embedUrl).replace('{width}', newWidth).replace('{height}', newHeight));
|
||||
|
||||
$('#id-input-embed-width').val(newWidth + 'px');
|
||||
$('#id-input-embed-height').val(newHeight + 'px');
|
||||
}
|
||||
|
||||
function openLink(url){
|
||||
var newDocumentPage = window.open(url);
|
||||
if (newDocumentPage)
|
||||
newDocumentPage.focus();
|
||||
api && api.Resize();
|
||||
}
|
||||
|
||||
function createController(){
|
||||
|
@ -554,159 +444,40 @@ var ApplicationController = new(function(){
|
|||
me = this;
|
||||
created = true;
|
||||
|
||||
var documentMoveTimer;
|
||||
|
||||
// Initialize clipboard objects
|
||||
|
||||
clipShortUrl.addEventListener('mousedown', function() {
|
||||
if ($('#id-btn-copy-short').hasClass('copied'))
|
||||
return;
|
||||
|
||||
$('#id-btn-copy-short').button('copied');
|
||||
$('#id-btn-copy-short').addClass('copied');
|
||||
|
||||
clipShortUrl.setText($('#id-short-url').val());
|
||||
|
||||
setTimeout(function(){
|
||||
$('#id-btn-copy-short').button('reset');
|
||||
$('#id-btn-copy-short').removeClass('copied');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
clipEmbedObj.addEventListener('mousedown', function(){
|
||||
if ($('#id-btn-copy-embed').hasClass('copied'))
|
||||
return;
|
||||
|
||||
$('#id-btn-copy-embed').button('copied');
|
||||
$('#id-btn-copy-embed').addClass('copied');
|
||||
|
||||
clipEmbedObj.setText($('#id-textarea-embed').text());
|
||||
|
||||
setTimeout(function(){
|
||||
$('#id-btn-copy-embed').button('reset');
|
||||
$('#id-btn-copy-embed').removeClass('copied');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
clipShortUrl.glue('id-btn-copy-short');
|
||||
clipEmbedObj.glue('id-btn-copy-embed');
|
||||
|
||||
|
||||
// popover ui handlers
|
||||
|
||||
$('#id-btn-copy').on('click', function(){
|
||||
var saveUrl = embedConfig.saveUrl;
|
||||
if (typeof saveUrl !== 'undefined' && saveUrl.length > 0){
|
||||
openLink(saveUrl);
|
||||
} else if (api && permissions.print!==false){
|
||||
api.asc_Print($.browser.chrome || $.browser.safari || $.browser.opera);
|
||||
}
|
||||
|
||||
Common.Analytics.trackEvent('Save');
|
||||
});
|
||||
|
||||
$('#id-btn-share').on('click', function(event){
|
||||
setVisiblePopover($('#id-popover-share'), !isVisiblePopover($('#id-popover-share')), $('#id-btn-share'));
|
||||
setVisiblePopover($('#id-popover-embed'), false);
|
||||
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
});
|
||||
|
||||
$('#id-btn-embed').on('click', function(event){
|
||||
setVisiblePopover($('#id-popover-embed'), !isVisiblePopover($('#id-popover-embed')), $('#id-btn-embed'));
|
||||
setVisiblePopover($('#id-popover-share'), false);
|
||||
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
});
|
||||
|
||||
$('#id-input-embed-width').on('keypress', function(e){
|
||||
if (e.keyCode == 13)
|
||||
updateEmbedCode();
|
||||
});
|
||||
|
||||
$('#id-input-embed-height').on('keypress', function(e){
|
||||
if (e.keyCode == 13)
|
||||
updateEmbedCode();
|
||||
});
|
||||
|
||||
$('#id-input-embed-width').on('focusin', function(e){
|
||||
api && api.asc_enableKeyEvents(false);
|
||||
});
|
||||
|
||||
$('#id-input-embed-height').on('focusin', function(e){
|
||||
api && api.asc_enableKeyEvents(false);
|
||||
});
|
||||
|
||||
$('#id-input-embed-width').on('focusout', function(e){
|
||||
updateEmbedCode();
|
||||
api && api.asc_enableKeyEvents(true);
|
||||
});
|
||||
|
||||
$('#id-input-embed-height').on('focusout', function(e){
|
||||
updateEmbedCode();
|
||||
api && api.asc_enableKeyEvents(true);
|
||||
});
|
||||
|
||||
$('#page-number').on('keyup', function(e){
|
||||
if (e.keyCode == 13){
|
||||
var newPage = parseInt($('#page-number').val());
|
||||
|
||||
if (newPage > maxPages)
|
||||
newPage = maxPages;
|
||||
if (newPage < 2 || isNaN(newPage))
|
||||
newPage = 1;
|
||||
|
||||
if (api)
|
||||
api.goToPage(newPage-1);
|
||||
}
|
||||
});
|
||||
|
||||
$('#page-number').on('focusout', function(e){
|
||||
api && api.asc_enableKeyEvents(true);
|
||||
});
|
||||
|
||||
$('#id-btn-fullscreen').on('click', function(){
|
||||
openLink(embedConfig.fullscreenUrl);
|
||||
});
|
||||
|
||||
$('#id-btn-close').on('click', function(){
|
||||
if (config.customization && config.customization.goback && config.customization.goback.url)
|
||||
window.parent.location.href = config.customization.goback.url;
|
||||
});
|
||||
|
||||
$('#id-btn-zoom-in').on('click', function(){
|
||||
if (api)
|
||||
api.zoomIn();
|
||||
});
|
||||
|
||||
$('#id-btn-zoom-out').on('click', function(){
|
||||
if (api)
|
||||
api.zoomOut();
|
||||
});
|
||||
|
||||
$(window).resize(function(){
|
||||
onDocumentResize();
|
||||
});
|
||||
|
||||
$(document).click(function(event){
|
||||
if (event && event.target && $(event.target).closest('.popover').length > 0)
|
||||
return;
|
||||
var ismodalshown = false;
|
||||
$(document.body).on('show.bs.modal', '.modal',
|
||||
function(e) {
|
||||
ismodalshown = true;
|
||||
api.asc_enableKeyEvents(false);
|
||||
}
|
||||
).on('hidden.bs.modal', '.modal',
|
||||
function(e) {
|
||||
ismodalshown = false;
|
||||
api.asc_enableKeyEvents(true);
|
||||
}
|
||||
).on('hidden.bs.dropdown', '.dropdown',
|
||||
function(e) {
|
||||
if ( !ismodalshown )
|
||||
api.asc_enableKeyEvents(true);
|
||||
}
|
||||
).on('blur', 'input, textarea',
|
||||
function(e) {
|
||||
if ( !ismodalshown ) {
|
||||
if (!/area_id/.test(e.target.id) ) {
|
||||
api.asc_enableKeyEvents(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
setVisiblePopover($('#id-popover-share'), false);
|
||||
setVisiblePopover($('#id-popover-embed'), false);
|
||||
});
|
||||
|
||||
$(document).mousemove(function(event){
|
||||
$('#id-btn-zoom-in').fadeIn();
|
||||
$('#id-btn-zoom-out').fadeIn();
|
||||
|
||||
clearTimeout(documentMoveTimer);
|
||||
documentMoveTimer = setTimeout(function(){
|
||||
$('#id-btn-zoom-in').fadeOut();
|
||||
$('#id-btn-zoom-out').fadeOut();
|
||||
}, 2000);
|
||||
$('#editor_sdk').on('click', function(e) {
|
||||
if ( e.target.localName == 'canvas' ) {
|
||||
e.currentTarget.focus();
|
||||
}
|
||||
});
|
||||
|
||||
window["flat_desine"] = true;
|
||||
|
@ -718,27 +489,15 @@ var ApplicationController = new(function(){
|
|||
api.asc_registerCallback('asc_onError', onError);
|
||||
api.asc_registerCallback('asc_onDocumentContentReady', onDocumentContentReady);
|
||||
api.asc_registerCallback('asc_onOpenDocumentProgress', onOpenDocument);
|
||||
|
||||
api.asc_registerCallback('asc_onCountPages', onCountPages);
|
||||
// api.asc_registerCallback('OnCurrentVisiblePage', onCurrentPage);
|
||||
api.asc_registerCallback('asc_onCurrentPage', onCurrentPage);
|
||||
api.asc_registerCallback('asc_onHyperlinkClick', onHyperlinkClick);
|
||||
api.asc_registerCallback('asc_onStartAction', onLongActionBegin);
|
||||
api.asc_registerCallback('asc_onEndAction', onLongActionEnd);
|
||||
|
||||
api.asc_registerCallback('asc_onMouseMoveStart', onDocMouseMoveStart);
|
||||
api.asc_registerCallback('asc_onMouseMoveEnd', onDocMouseMoveEnd);
|
||||
api.asc_registerCallback('asc_onMouseMove', onDocMouseMove);
|
||||
|
||||
api.asc_registerCallback('asc_onDownloadUrl', onDownloadUrl);
|
||||
api.asc_registerCallback('asc_onPrint', onPrint);
|
||||
api.asc_registerCallback('asc_onPrintUrl', onPrintUrl);
|
||||
|
||||
// Initialize api gateway
|
||||
Common.Gateway.on('init', loadConfig);
|
||||
Common.Gateway.on('opendocument', loadDocument);
|
||||
Common.Gateway.on('showerror', onExternalError);
|
||||
Common.Gateway.on('processmouse', onProcessMouse);
|
||||
Common.Gateway.on('downloadas', onDownloadAs);
|
||||
Common.Gateway.ready();
|
||||
}
|
||||
|
||||
|
|
|
@ -31,50 +31,31 @@
|
|||
*
|
||||
*/
|
||||
var ApplicationView = new(function(){
|
||||
var $btnTools;
|
||||
|
||||
// Initialize view
|
||||
|
||||
function createView(){
|
||||
$('#id-btn-share').popover({
|
||||
trigger : 'manual',
|
||||
html : true,
|
||||
template : '<div class="popover share" id="id-popover-share"><div class="arrow"></div><div class="popover-inner"><div class="popover-content"><p></p></div></div></div>',
|
||||
content : '<div class="share-link">' +
|
||||
'<span class="caption">Link:</span>' +
|
||||
'<input id="id-short-url" class="input-xs form-control" readonly/>' +
|
||||
'<button id="id-btn-copy-short" type="button" class="btn btn-xs btn-primary" style="width: 65px;" data-copied-text="Copied">Copy</button>' +
|
||||
'</div> ' +
|
||||
'<div class="share-buttons" style="height: 25px" id="id-popover-social-container" data-loaded="false">' +
|
||||
'<ul></ul>' +
|
||||
'</div>'
|
||||
}).popover('show');
|
||||
$btnTools = $('#box-tools button');
|
||||
|
||||
$('#id-btn-embed').popover({
|
||||
trigger : 'manual',
|
||||
html : true,
|
||||
template : '<div class="popover embed" id="id-popover-embed"><div class="arrow"></div><div class="popover-inner"><div class="popover-content"><p></p></div></div></div>',
|
||||
content : '<div class="size-manual">' +
|
||||
'<span class="caption">Width:</span>' +
|
||||
'<input id="id-input-embed-width" class="form-control input-xs" type="text" value="400px">' +
|
||||
'<input id="id-input-embed-height" class="form-control input-xs right" type="text" value="600px">' +
|
||||
'<span class="right caption">Height:</span>' +
|
||||
'</div>' +
|
||||
'<textarea id="id-textarea-embed" rows="4" class="form-control" readonly></textarea>' +
|
||||
'<button id="id-btn-copy-embed" type="button" class="btn btn-xs btn-primary" data-copied-text="Copied">Copy</button>'
|
||||
$btnTools.addClass('dropdown-toggle').attr('data-toggle', 'dropdown').attr('aria-expanded', 'true');
|
||||
$btnTools.parent().append(
|
||||
'<ul class="dropdown-menu">' +
|
||||
'<li><a id="idt-download" href="#"><span class="mi-icon svg-icon download"></span>Download</a></li>' +
|
||||
'<li><a id="idt-share" href="#" data-toggle="modal"><span class="mi-icon svg-icon share"></span>Share</a></li>' +
|
||||
'<li><a id="idt-embed" href="#" data-toggle="modal"><span class="mi-icon svg-icon embed"></span>Embed</a></li>' +
|
||||
'<li><a id="idt-fullscreen" href="#"><span class="mi-icon svg-icon fullscr"></span>Full Screen</a></li>' +
|
||||
'</ul>');
|
||||
}
|
||||
|
||||
|
||||
}).popover('show');
|
||||
|
||||
$('body').popover({
|
||||
trigger : 'manual',
|
||||
html : true,
|
||||
animation : false,
|
||||
template : '<div class="popover hyperlink" id="id-tip-hyperlink"><div class="popover-inner"><div class="popover-content"><p></p></div></div></div>',
|
||||
content : '<br><b>Press Ctrl and click link</b>'
|
||||
}).popover('show');
|
||||
function getTools(name) {
|
||||
return $btnTools.parent().find(name);
|
||||
}
|
||||
|
||||
return {
|
||||
create: createView
|
||||
, tools: {
|
||||
get: getTools
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
|
|
@ -30,11 +30,7 @@
|
|||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
(function ($) {
|
||||
|
||||
$(function(){
|
||||
ApplicationView.create();
|
||||
ApplicationController.create();
|
||||
})
|
||||
|
||||
})(window.jQuery);
|
||||
+function ($) {
|
||||
ApplicationView.create();
|
||||
ApplicationController.create();
|
||||
}();
|
||||
|
|
|
@ -122,7 +122,7 @@ define([
|
|||
setApi: function(api) {
|
||||
this.api = api;
|
||||
this.api.asc_registerCallback('asc_onReplaceAll', _.bind(this.onApiTextReplaced, this));
|
||||
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onApiServerDisconnect, this));
|
||||
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(this.onApiServerDisconnect, this, true));
|
||||
Common.NotificationCenter.on('api:disconnect', _.bind(this.onApiServerDisconnect, this));
|
||||
/** coauthoring begin **/
|
||||
if (this.mode.canCoAuthoring) {
|
||||
|
@ -190,10 +190,6 @@ define([
|
|||
var close_menu = true;
|
||||
switch (action) {
|
||||
case 'back':
|
||||
if (this.mode.canUseHistory && this.leftMenu.panelHistory.isVisible()) {
|
||||
// reload editor
|
||||
Common.Gateway.requestHistoryClose();
|
||||
}
|
||||
break;
|
||||
case 'save': this.api.asc_Save(); break;
|
||||
case 'save-desktop': this.api.asc_DownloadAs(); break;
|
||||
|
@ -235,6 +231,19 @@ define([
|
|||
this.showHistory();
|
||||
}
|
||||
break;
|
||||
case 'rename':
|
||||
var me = this,
|
||||
documentCaption = me.api.asc_getDocumentName();
|
||||
(new Common.Views.RenameDialog({
|
||||
filename: documentCaption,
|
||||
handler: function(result, value) {
|
||||
if (result == 'ok' && !_.isEmpty(value.trim()) && documentCaption !== value.trim()) {
|
||||
Common.Gateway.requestRename(value);
|
||||
}
|
||||
Common.NotificationCenter.trigger('edit:complete', me);
|
||||
}
|
||||
})).show();
|
||||
break;
|
||||
default: close_menu = false;
|
||||
}
|
||||
|
||||
|
@ -437,7 +446,7 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
onApiServerDisconnect: function() {
|
||||
onApiServerDisconnect: function(disableDownload) {
|
||||
this.mode.isEdit = false;
|
||||
this.leftMenu.close();
|
||||
|
||||
|
@ -447,7 +456,7 @@ define([
|
|||
/** coauthoring end **/
|
||||
this.leftMenu.btnPlugins.setDisabled(true);
|
||||
|
||||
this.leftMenu.getMenu('file').setMode({isDisconnected: true});
|
||||
this.leftMenu.getMenu('file').setMode({isDisconnected: true, disableDownload: !!disableDownload});
|
||||
if ( this.dlgSearch ) {
|
||||
this.leftMenu.btnSearch.toggle(false, true);
|
||||
this.dlgSearch['hide']();
|
||||
|
|
|
@ -137,6 +137,7 @@ define([
|
|||
this.api.asc_registerCallback('asc_onAdvancedOptions', _.bind(this.onAdvancedOptions, this));
|
||||
this.api.asc_registerCallback('asc_onDocumentName', _.bind(this.onDocumentName, this));
|
||||
this.api.asc_registerCallback('asc_onPrintUrl', _.bind(this.onPrintUrl, this));
|
||||
this.api.asc_registerCallback('asc_onMeta', _.bind(this.onMeta, this));
|
||||
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
|
||||
Common.NotificationCenter.on('goback', _.bind(this.goBack, this));
|
||||
|
||||
|
@ -169,8 +170,10 @@ define([
|
|||
|
||||
$(document.body).on('blur', 'input, textarea', function(e) {
|
||||
if (!me.isModalShowed) {
|
||||
if (!/area_id/.test(e.target.id) && $(e.target).parent().find(e.relatedTarget).length<1 /* When focus in combobox goes from input to it's menu button or menu items */
|
||||
|| !e.relatedTarget) {
|
||||
if (!e.relatedTarget ||
|
||||
!/area_id/.test(e.target.id) && $(e.target).parent().find(e.relatedTarget).length<1 /* Check if focus in combobox goes from input to it's menu button or menu items */
|
||||
&& (e.relatedTarget.localName != 'input' || !/form-control/.test(e.relatedTarget.className)) /* Check if focus goes to text input with class "form-control" */
|
||||
&& (e.relatedTarget.localName != 'textarea' || /area_id/.test(e.relatedTarget.id))) /* Check if focus goes to textarea, but not to "area_id" */ {
|
||||
me.api.asc_enableKeyEvents(true);
|
||||
if (/msg-reply/.test(e.target.className))
|
||||
me.dontCloseDummyComment = false;
|
||||
|
@ -271,8 +274,6 @@ define([
|
|||
|
||||
var _user = new Asc.asc_CUserInfo();
|
||||
_user.put_Id(this.appOptions.user.id);
|
||||
_user.put_FirstName(this.appOptions.user.firstname);
|
||||
_user.put_LastName(this.appOptions.user.lastname);
|
||||
_user.put_FullName(this.appOptions.user.fullname);
|
||||
|
||||
docInfo = new Asc.asc_CDocInfo();
|
||||
|
@ -284,6 +285,7 @@ define([
|
|||
docInfo.put_Options(data.doc.options);
|
||||
docInfo.put_UserInfo(_user);
|
||||
docInfo.put_CallbackUrl(this.editorConfig.callbackUrl);
|
||||
docInfo.put_Token(data.doc.token);
|
||||
// docInfo.put_Review(this.permissions.review);
|
||||
// docInfo.put_OfflineApp(this.editorConfig.nativeApp === true); // used in sdk for testing
|
||||
}
|
||||
|
@ -317,6 +319,7 @@ define([
|
|||
this._state.lostEditingRights = !this._state.lostEditingRights;
|
||||
this.api.asc_coAuthoringDisconnect();
|
||||
this.getApplication().getController('LeftMenu').leftMenu.getMenu('file').panels['rights'].onLostEditRights();
|
||||
Common.NotificationCenter.trigger('api:disconnect');
|
||||
if (!old_rights)
|
||||
Common.UI.warning({
|
||||
title: this.notcriticalErrorTitle,
|
||||
|
@ -331,6 +334,7 @@ define([
|
|||
},
|
||||
|
||||
onDownloadAs: function() {
|
||||
this._state.isFromGatewayDownloadAs = true;
|
||||
var type = /^(?:(pdf|djvu|xps))$/.exec(this.document.fileType);
|
||||
(type && typeof type[1] === 'string') ? this.api.asc_DownloadOrigin(true) : this.api.asc_DownloadAs(Asc.c_oAscFileType.DOCX, true);
|
||||
},
|
||||
|
@ -351,7 +355,13 @@ define([
|
|||
onRefreshHistory: function(opts) {
|
||||
this.loadMask && this.loadMask.hide();
|
||||
if (opts.data.error || !opts.data.history) {
|
||||
var config = {
|
||||
var historyStore = this.getApplication().getCollection('Common.Collections.HistoryVersions');
|
||||
if (historyStore && historyStore.size()>0) {
|
||||
historyStore.each(function(item){
|
||||
item.set('canRestore', false);
|
||||
});
|
||||
}
|
||||
Common.UI.alert({
|
||||
closable: false,
|
||||
title: this.notcriticalErrorTitle,
|
||||
msg: (opts.data.error) ? opts.data.error : this.txtErrorLoadHistory,
|
||||
|
@ -360,10 +370,10 @@ define([
|
|||
callback: _.bind(function(btn){
|
||||
this.onEditComplete();
|
||||
}, this)
|
||||
};
|
||||
Common.UI.alert(config);
|
||||
});
|
||||
} else {
|
||||
this.api.asc_coAuthoringDisconnect();
|
||||
this.getApplication().getController('Viewport').getView('Common.Views.Header').setCanRename(false);
|
||||
this.getApplication().getController('LeftMenu').getView('LeftMenu').showHistory();
|
||||
this.disableEditing(true);
|
||||
var versions = opts.data.history,
|
||||
|
@ -400,7 +410,9 @@ define([
|
|||
created: version.created,
|
||||
docId: version.key,
|
||||
markedAsVersion: (group!==version.versionGroup),
|
||||
selected: (opts.data.currentVersion == version.version)
|
||||
selected: (opts.data.currentVersion == version.version),
|
||||
canRestore: this.appOptions.canHistoryRestore && (ver < versions.length-1),
|
||||
isExpanded: true
|
||||
}));
|
||||
if (opts.data.currentVersion == version.version) {
|
||||
currentVersion = arrVersions[arrVersions.length-1];
|
||||
|
@ -418,35 +430,41 @@ define([
|
|||
|
||||
var changes = version.changes, change, i;
|
||||
if (changes && changes.length>0) {
|
||||
arrVersions[arrVersions.length-1].set('changeid', changes.length-1);
|
||||
arrVersions[arrVersions.length-1].set('docIdPrev', docIdPrev);
|
||||
for (i=changes.length-2; i>=0; i--) {
|
||||
change = changes[i];
|
||||
if (!_.isEmpty(version.serverVersion) && version.serverVersion == this.appOptions.buildVersion) {
|
||||
arrVersions[arrVersions.length-1].set('changeid', changes.length-1);
|
||||
arrVersions[arrVersions.length-1].set('hasChanges', changes.length>1);
|
||||
for (i=changes.length-2; i>=0; i--) {
|
||||
change = changes[i];
|
||||
|
||||
user = usersStore.findUser(change.user.id);
|
||||
if (!user) {
|
||||
user = new Common.Models.User({
|
||||
id : change.user.id,
|
||||
username : change.user.name,
|
||||
colorval : Asc.c_oAscArrUserColors[usersCnt],
|
||||
color : this.generateUserColor(Asc.c_oAscArrUserColors[usersCnt++])
|
||||
});
|
||||
usersStore.add(user);
|
||||
user = usersStore.findUser(change.user.id);
|
||||
if (!user) {
|
||||
user = new Common.Models.User({
|
||||
id : change.user.id,
|
||||
username : change.user.name,
|
||||
colorval : Asc.c_oAscArrUserColors[usersCnt],
|
||||
color : this.generateUserColor(Asc.c_oAscArrUserColors[usersCnt++])
|
||||
});
|
||||
usersStore.add(user);
|
||||
}
|
||||
|
||||
arrVersions.push(new Common.Models.HistoryVersion({
|
||||
version: version.versionGroup,
|
||||
revision: version.version,
|
||||
changeid: i,
|
||||
userid : change.user.id,
|
||||
username : change.user.name,
|
||||
usercolor: user.get('color'),
|
||||
created: change.created,
|
||||
docId: version.key,
|
||||
docIdPrev: docIdPrev,
|
||||
selected: false,
|
||||
canRestore: this.appOptions.canHistoryRestore,
|
||||
isRevision: false,
|
||||
isVisible: true
|
||||
}));
|
||||
arrColors.push(user.get('colorval'));
|
||||
}
|
||||
|
||||
arrVersions.push(new Common.Models.HistoryVersion({
|
||||
version: version.versionGroup,
|
||||
revision: version.version,
|
||||
changeid: i,
|
||||
userid : change.user.id,
|
||||
username : change.user.name,
|
||||
usercolor: user.get('color'),
|
||||
created: change.created,
|
||||
docId: version.key,
|
||||
docIdPrev: docIdPrev,
|
||||
selected: false
|
||||
}));
|
||||
arrColors.push(user.get('colorval'));
|
||||
}
|
||||
} else if (ver==0 && versions.length==1) {
|
||||
arrVersions[arrVersions.length-1].set('docId', version.key + '1');
|
||||
|
@ -460,7 +478,7 @@ define([
|
|||
}
|
||||
arrColors = [];
|
||||
}
|
||||
historyStore[historyStore.size() > 0 ? 'add' : 'reset'](arrVersions);
|
||||
historyStore.reset(arrVersions);
|
||||
if (currentVersion===null && historyStore.size()>0) {
|
||||
currentVersion = historyStore.at(0);
|
||||
currentVersion.set('selected', true);
|
||||
|
@ -513,7 +531,11 @@ define([
|
|||
toolbarView.btnInsertShape.toggle(false, false);
|
||||
toolbarView.btnInsertText.toggle(false, false);
|
||||
}
|
||||
|
||||
if (this.appOptions.isEdit && toolbarView && toolbarView.btnHighlightColor.pressed &&
|
||||
( !_.isObject(arguments[1]) || arguments[1].id !== 'id-toolbar-btn-highlight')) {
|
||||
this.api.SetMarkerFormat(false);
|
||||
toolbarView.btnHighlightColor.toggle(false, false);
|
||||
}
|
||||
application.getController('DocumentHolder').getView('DocumentHolder').focus();
|
||||
|
||||
if (this.api) {
|
||||
|
@ -755,7 +777,8 @@ define([
|
|||
/** coauthoring end **/
|
||||
|
||||
value = Common.localStorage.getItem("de-settings-zoom");
|
||||
this.api.zoom((value!==null) ? parseInt(value) : 100);
|
||||
var zf = (value!==null) ? parseInt(value) : (this.appOptions.customization && this.appOptions.customization.zoom ? parseInt(this.appOptions.customization.zoom) : 100);
|
||||
(zf == -1) ? this.api.zoomFitToPage() : ((zf == -2) ? this.api.zoomFitToWidth() : this.api.zoom(zf>0 ? zf : 100));
|
||||
|
||||
value = Common.localStorage.getItem("de-show-hiddenchars");
|
||||
me.api.put_ShowParaMarks((value!==null) ? eval(value) : false);
|
||||
|
@ -800,6 +823,10 @@ define([
|
|||
/** coauthoring begin **/
|
||||
if (me.appOptions.isEdit && me.appOptions.canLicense && !me.appOptions.isOffline && me.appOptions.canCoAuthoring) {
|
||||
value = Common.localStorage.getItem("de-settings-coauthmode");
|
||||
if (value===null && Common.localStorage.getItem("de-settings-autosave")===null &&
|
||||
me.appOptions.customization && me.appOptions.customization.autosave===false) {
|
||||
value = 0; // use customization.autosave only when de-settings-coauthmode and de-settings-autosave are null
|
||||
}
|
||||
me._state.fastCoauth = (value===null || parseInt(value) == 1);
|
||||
me.api.asc_SetFastCollaborative(me._state.fastCoauth);
|
||||
|
||||
|
@ -849,6 +876,8 @@ define([
|
|||
|
||||
if (me.appOptions.isEdit) {
|
||||
value = Common.localStorage.getItem("de-settings-autosave");
|
||||
if (value===null && me.appOptions.customization && me.appOptions.customization.autosave===false)
|
||||
value = 0;
|
||||
value = (!me._state.fastCoauth && value!==null) ? parseInt(value) : (me.appOptions.canCoAuthoring ? 1 : 0);
|
||||
|
||||
me.api.asc_setAutoSaveGap(value);
|
||||
|
@ -864,12 +893,12 @@ define([
|
|||
documentHolderController.getView('DocumentHolder').createDelayedElements();
|
||||
me.loadLanguages();
|
||||
|
||||
rightmenuController.createDelayedElements();
|
||||
|
||||
var shapes = me.api.asc_getPropertyEditorShapes();
|
||||
if (shapes)
|
||||
me.fillAutoShapes(shapes[0], shapes[1]);
|
||||
|
||||
rightmenuController.createDelayedElements();
|
||||
|
||||
me.updateThemeColors();
|
||||
toolbarController.activateControls();
|
||||
if (me.needToUpdateVersion)
|
||||
|
@ -940,6 +969,10 @@ define([
|
|||
}
|
||||
|
||||
this.permissions.review = (this.permissions.review === undefined) ? (this.permissions.edit !== false) : this.permissions.review;
|
||||
|
||||
if (params.asc_getRights() !== Asc.c_oRights.Edit)
|
||||
this.permissions.edit = this.permissions.review = false;
|
||||
|
||||
this.appOptions.canAnalytics = params.asc_getIsAnalyticsEnable();
|
||||
this.appOptions.canLicense = (licType === Asc.c_oLicenseResult.Success);
|
||||
this.appOptions.isLightVersion = params.asc_getIsLight();
|
||||
|
@ -954,14 +987,17 @@ define([
|
|||
(!this.appOptions.isReviewOnly || this.appOptions.canLicense); // if isReviewOnly==true -> canLicense must be true
|
||||
this.appOptions.isEdit = this.appOptions.canLicense && this.appOptions.canEdit && this.editorConfig.mode !== 'view';
|
||||
this.appOptions.canReview = this.appOptions.canLicense && this.appOptions.isEdit && (this.permissions.review===true);
|
||||
this.appOptions.canUseHistory = this.appOptions.canLicense && !this.appOptions.isLightVersion && this.editorConfig.canUseHistory && (this.permissions.edit !== false) && this.appOptions.canCoAuthoring && !this.appOptions.isDesktopApp;
|
||||
this.appOptions.canUseHistory = this.appOptions.canLicense && !this.appOptions.isLightVersion && this.editorConfig.canUseHistory && this.appOptions.canCoAuthoring && !this.appOptions.isDesktopApp;
|
||||
this.appOptions.canHistoryClose = this.editorConfig.canHistoryClose;
|
||||
this.appOptions.canHistoryRestore= this.editorConfig.canHistoryRestore && !!this.permissions.changeHistory;
|
||||
this.appOptions.canUseMailMerge= this.appOptions.canLicense && this.appOptions.canEdit && !this.appOptions.isDesktopApp;
|
||||
this.appOptions.canSendEmailAddresses = this.appOptions.canLicense && this.editorConfig.canSendEmailAddresses && this.appOptions.canEdit && this.appOptions.canCoAuthoring;
|
||||
this.appOptions.canComments = this.appOptions.canLicense && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.comments===false);
|
||||
this.appOptions.canChat = this.appOptions.canLicense && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false);
|
||||
this.appOptions.canEditStyles = this.appOptions.canLicense && this.appOptions.canEdit;
|
||||
this.appOptions.canPrint = (this.permissions.print !== false);
|
||||
this.appOptions.canRename = !!this.permissions.rename;
|
||||
this.appOptions.buildVersion = params.asc_getBuildVersion();
|
||||
|
||||
var type = /^(?:(pdf|djvu|xps))$/.exec(this.document.fileType);
|
||||
this.appOptions.canDownloadOrigin = !this.appOptions.nativeApp && this.permissions.download !== false && (type && typeof type[1] === 'string');
|
||||
|
@ -969,11 +1005,13 @@ define([
|
|||
|
||||
this._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) && this.appOptions.canEdit && this.editorConfig.mode !== 'view';
|
||||
|
||||
var headerView = this.getApplication().getController('Viewport').getView('Common.Views.Header');
|
||||
this.appOptions.canBranding = (licType!==Asc.c_oLicenseResult.Error) && (typeof this.editorConfig.customization == 'object');
|
||||
if (this.appOptions.canBranding)
|
||||
this.getApplication().getController('Viewport').getView('Common.Views.Header').setBranding(this.editorConfig.customization);
|
||||
headerView.setBranding(this.editorConfig.customization);
|
||||
|
||||
params.asc_getTrial() && this.getApplication().getController('Viewport').getView('Common.Views.Header').setDeveloperMode(true);
|
||||
params.asc_getTrial() && headerView.setDeveloperMode(true);
|
||||
this.appOptions.canRename && headerView.setCanRename(true);
|
||||
|
||||
this.appOptions.canBrandingExt = params.asc_getCanBranding() && (typeof this.editorConfig.customization == 'object');
|
||||
|
||||
|
@ -1136,8 +1174,12 @@ define([
|
|||
config.msg = this.convertationTimeoutText;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.ConvertationError:
|
||||
config.msg = this.convertationErrorText;
|
||||
case Asc.c_oAscError.ID.ConvertationOpenError:
|
||||
config.msg = this.openErrorText;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.ConvertationSaveError:
|
||||
config.msg = this.saveErrorText;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.DownloadError:
|
||||
|
@ -1169,11 +1211,11 @@ define([
|
|||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.VKeyEncrypt:
|
||||
config.msg = this.errorKeyEncrypt;
|
||||
config.msg = this.errorToken;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.KeyExpire:
|
||||
config.msg = this.errorKeyExpire;
|
||||
config.msg = this.errorTokenExpire;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.UserCountExceed:
|
||||
|
@ -1181,7 +1223,7 @@ define([
|
|||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.CoAuthoringDisconnect:
|
||||
config.msg = (this.appOptions.isEdit) ? this.errorCoAuthoringDisconnect : this.errorViewerDisconnect;
|
||||
config.msg = this.errorViewerDisconnect;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.ConvertationPassword:
|
||||
|
@ -1221,6 +1263,22 @@ define([
|
|||
config.msg = this.errorConnectToServer;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.SessionAbsolute:
|
||||
config.msg = this.errorSessionAbsolute;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.SessionIdle:
|
||||
config.msg = this.errorSessionIdle;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.SessionToken:
|
||||
config.msg = this.errorSessionToken;
|
||||
break;
|
||||
|
||||
case Asc.c_oAscError.ID.AccessDeny:
|
||||
config.msg = this.errorAccessDeny;
|
||||
break;
|
||||
|
||||
default:
|
||||
config.msg = this.errorDefaultMessage.replace('%1', id);
|
||||
break;
|
||||
|
@ -1267,6 +1325,8 @@ define([
|
|||
|
||||
onCoAuthoringDisconnect: function() {
|
||||
this.getApplication().getController('Viewport').getView('Viewport').setMode({isDisconnected:true});
|
||||
this.getApplication().getController('Viewport').getView('Common.Views.Header').setCanRename(false);
|
||||
this.appOptions.canRename = false;
|
||||
this._state.isDisconnected = true;
|
||||
},
|
||||
|
||||
|
@ -1278,7 +1338,7 @@ define([
|
|||
function showNextTip() {
|
||||
var str_tip = strings.shift();
|
||||
if (str_tip) {
|
||||
str_tip += me.textCloseTip;
|
||||
str_tip += '\n' + me.textCloseTip;
|
||||
tooltip.setTitle(str_tip);
|
||||
tooltip.show();
|
||||
}
|
||||
|
@ -1422,7 +1482,9 @@ define([
|
|||
},
|
||||
|
||||
onDownloadUrl: function(url) {
|
||||
Common.Gateway.downloadAs(url);
|
||||
if (this._state.isFromGatewayDownloadAs)
|
||||
Common.Gateway.downloadAs(url);
|
||||
this._state.isFromGatewayDownloadAs = false;
|
||||
},
|
||||
|
||||
onUpdateVersion: function(callback) {
|
||||
|
@ -1697,6 +1759,17 @@ define([
|
|||
this.updateWindowTitle(true);
|
||||
},
|
||||
|
||||
onMeta: function(meta) {
|
||||
var app = this.getApplication(),
|
||||
filemenu = app.getController('LeftMenu').getView('LeftMenu').getMenu('file');
|
||||
app.getController('Viewport').getView('Common.Views.Header').setDocumentCaption(meta.title);
|
||||
this.updateWindowTitle(true);
|
||||
this.document.title = meta.title;
|
||||
filemenu.loadDocument({doc:this.document});
|
||||
filemenu.panels['info'].updateInfo(this.document);
|
||||
Common.Gateway.metaChange(meta);
|
||||
},
|
||||
|
||||
onPrint: function() {
|
||||
if (!this.appOptions.canPrint) return;
|
||||
|
||||
|
@ -1878,7 +1951,6 @@ define([
|
|||
reloadButtonText: 'Reload Page',
|
||||
unknownErrorText: 'Unknown error.',
|
||||
convertationTimeoutText: 'Convertation timeout exceeded.',
|
||||
convertationErrorText: 'Convertation failed.',
|
||||
downloadErrorText: 'Download failed.',
|
||||
unsupportedBrowserErrorText : 'Your browser is not supported.',
|
||||
splitMaxRowsErrorText: 'The number of rows must be less than %1',
|
||||
|
@ -1912,7 +1984,7 @@ define([
|
|||
loadingDocumentTextText: 'Loading document...',
|
||||
warnProcessRightsChange: 'You have been denied the right to edit the file.',
|
||||
errorProcessSaveResult: 'Saving is failed.',
|
||||
textCloseTip: '\nClick to close the tip.',
|
||||
textCloseTip: 'Click to close the tip.',
|
||||
textShape: 'Shape',
|
||||
errorStockChart: 'Incorrect row order. To build a stock chart place the data on the sheet in the following order:<br> opening price, max price, min price, closing price.',
|
||||
errorDataRange: 'Incorrect data range.',
|
||||
|
@ -1942,9 +2014,17 @@ define([
|
|||
textNoLicenseTitle: 'ONLYOFFICE open source version',
|
||||
warnNoLicense: 'You are using an open source version of ONLYOFFICE. The version has limitations for concurrent connections to the document server (20 connections at a time).<br>If you need more please consider purchasing a commercial license.',
|
||||
textContactUs: 'Contact sales',
|
||||
errorViewerDisconnect: 'Connection is lost. You can still view the document,<br>but will not be able to download until the connection is restored.',
|
||||
errorViewerDisconnect: 'Connection is lost. You can still view the document,<br>but will not be able to download or print until the connection is restored.',
|
||||
warnLicenseExp: 'Your license has expired.<br>Please update your license and refresh the page.',
|
||||
titleLicenseExp: 'License expired'
|
||||
titleLicenseExp: 'License expired',
|
||||
openErrorText: 'An error has occurred while opening the file',
|
||||
saveErrorText: 'An error has occurred while saving the file',
|
||||
errorToken: 'The document security token is not correctly formed.<br>Please contact your Document Server administrator.',
|
||||
errorTokenExpire: 'The document security token has expired.<br>Please contact your Document Server administrator.',
|
||||
errorSessionAbsolute: 'The document editing session has expired. Please reload the page.',
|
||||
errorSessionIdle: 'The document has not been edited for quite a long time. Please reload the page.',
|
||||
errorSessionToken: 'The connection to the server has been interrupted. Please reload the page.',
|
||||
errorAccessDeny: 'You are trying to perform an action you do not have rights for.<br>Please contact your Document Server administrator.'
|
||||
}
|
||||
})(), DE.Controllers.Main || {}))
|
||||
});
|
|
@ -167,14 +167,15 @@ define([
|
|||
this._settings[Common.Utils.documentSettingsType.MailMerge].locked = !can_add_table || in_equation;
|
||||
}
|
||||
|
||||
var lastactive = -1, currentactive, priorityactive = -1;
|
||||
var lastactive = -1, currentactive, priorityactive = -1,
|
||||
activePane = this.rightmenu.GetActivePane();
|
||||
for (i=0; i<this._settings.length; i++) {
|
||||
var pnl = this._settings[i];
|
||||
if (pnl===undefined || pnl.btn===undefined || pnl.panel===undefined) continue;
|
||||
|
||||
if ( pnl.hidden ) {
|
||||
if (!pnl.btn.isDisabled()) pnl.btn.setDisabled(true);
|
||||
if (this.rightmenu.GetActivePane() == pnl.panelId)
|
||||
if (activePane == pnl.panelId)
|
||||
currentactive = -1;
|
||||
} else {
|
||||
if (pnl.btn.isDisabled()) pnl.btn.setDisabled(false);
|
||||
|
@ -182,7 +183,7 @@ define([
|
|||
if ( pnl.needShow ) {
|
||||
pnl.needShow = false;
|
||||
priorityactive = i;
|
||||
} else if (this.rightmenu.GetActivePane() == pnl.panelId)
|
||||
} else if (activePane == pnl.panelId)
|
||||
currentactive = i;
|
||||
pnl.panel.setLocked(pnl.locked);
|
||||
}
|
||||
|
@ -212,8 +213,6 @@ define([
|
|||
|
||||
this._settings[Common.Utils.documentSettingsType.Image].needShow = false;
|
||||
this._settings[Common.Utils.documentSettingsType.Chart].needShow = false;
|
||||
this._settings[Common.Utils.documentSettingsType.Shape].needShow = false;
|
||||
this._settings[Common.Utils.documentSettingsType.TextArt].needShow = false;
|
||||
},
|
||||
|
||||
onCoAuthoringDisconnect: function() {
|
||||
|
@ -271,6 +270,7 @@ define([
|
|||
}
|
||||
|
||||
if (this.editMode && this.api) {
|
||||
this.rightmenu.shapeSettings.createDelayedElements();
|
||||
var selectedElements = this.api.getSelectedElements();
|
||||
if (selectedElements.length>0) {
|
||||
var open = Common.localStorage.getItem("de-hide-right-settings");
|
||||
|
|
|
@ -46,8 +46,8 @@ define([
|
|||
'common/main/lib/view/CopyWarningDialog',
|
||||
'common/main/lib/view/ImageFromUrlDialog',
|
||||
'common/main/lib/view/InsertTableDialog',
|
||||
'common/main/lib/util/define',
|
||||
'documenteditor/main/app/view/Toolbar',
|
||||
'documenteditor/main/app/util/define',
|
||||
'documenteditor/main/app/view/HyperlinkSettingsDialog',
|
||||
'documenteditor/main/app/view/DropcapSettingsAdvanced',
|
||||
'documenteditor/main/app/view/MailMergeRecepients',
|
||||
|
@ -252,6 +252,7 @@ define([
|
|||
toolbar.mnuPageNumberPosPicker.on('item:click', _.bind(this.onInsertPageNumberClick, this));
|
||||
toolbar.btnEditHeader.menu.on('item:click', _.bind(this.onEditHeaderFooterClick, this));
|
||||
toolbar.mnuPageNumCurrentPos.on('click', _.bind(this.onPageNumCurrentPosClick, this));
|
||||
toolbar.mnuInsertPageCount.on('click', _.bind(this.onInsertPageCountClick, this));
|
||||
toolbar.listStyles.on('click', _.bind(this.onListStyleSelect, this));
|
||||
toolbar.listStyles.on('contextmenu', _.bind(this.onListStyleContextMenu, this));
|
||||
toolbar.styleMenu.on('hide:before', _.bind(this.onListStyleBeforeHide, this));
|
||||
|
@ -303,7 +304,7 @@ define([
|
|||
this.api.asc_registerCallback('asc_onMarkerFormatChanged', _.bind(this.onApiStartHighlight, this));
|
||||
this.api.asc_registerCallback('asc_onTextHighLight', _.bind(this.onApiHighlightColor, this));
|
||||
this.api.asc_registerCallback('asc_onInitEditorStyles', _.bind(this.onApiInitEditorStyles, this));
|
||||
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect',_.bind(this.onApiCoAuthoringDisconnect, this));
|
||||
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect',_.bind(this.onApiCoAuthoringDisconnect, this, true));
|
||||
Common.NotificationCenter.on('api:disconnect', _.bind(this.onApiCoAuthoringDisconnect, this));
|
||||
this.api.asc_registerCallback('asc_onCanCopyCut', _.bind(this.onApiCanCopyCut, this));
|
||||
this.api.asc_registerCallback('asc_onMathTypes', _.bind(this.onMathTypes, this));
|
||||
|
@ -1698,6 +1699,14 @@ define([
|
|||
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
|
||||
Common.component.Analytics.trackEvent('ToolBar', 'Page Number');
|
||||
},
|
||||
|
||||
onInsertPageCountClick: function(item, e) {
|
||||
if (this.api)
|
||||
this.api.asc_AddPageCount();
|
||||
|
||||
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
|
||||
Common.component.Analytics.trackEvent('ToolBar', 'Pages Count');
|
||||
},
|
||||
|
||||
onEditHeaderFooterClick: function(menu, item) {
|
||||
if (this.api) {
|
||||
|
@ -2189,7 +2198,7 @@ define([
|
|||
},
|
||||
|
||||
fillEquations: function() {
|
||||
if (!this.toolbar.btnInsertEquation.rendered) return;
|
||||
if (!this.toolbar.btnInsertEquation.rendered || this.toolbar.btnInsertEquation.menu.items.length>0) return;
|
||||
|
||||
var me = this, equationsStore = this.getApplication().getCollection('EquationGroups');
|
||||
|
||||
|
@ -2282,32 +2291,32 @@ define([
|
|||
|
||||
// [translate, count cells, scroll]
|
||||
|
||||
c_oAscMathMainTypeStrings[DE.define.c_oAscMathMainType.Symbol ] = [this.textSymbols, 11];
|
||||
c_oAscMathMainTypeStrings[DE.define.c_oAscMathMainType.Fraction ] = [this.textFraction, 4];
|
||||
c_oAscMathMainTypeStrings[DE.define.c_oAscMathMainType.Script ] = [this.textScript, 4];
|
||||
c_oAscMathMainTypeStrings[DE.define.c_oAscMathMainType.Radical ] = [this.textRadical, 4];
|
||||
c_oAscMathMainTypeStrings[DE.define.c_oAscMathMainType.Integral ] = [this.textIntegral, 3, true];
|
||||
c_oAscMathMainTypeStrings[DE.define.c_oAscMathMainType.LargeOperator] = [this.textLargeOperator, 5, true];
|
||||
c_oAscMathMainTypeStrings[DE.define.c_oAscMathMainType.Bracket ] = [this.textBracket, 4, true];
|
||||
c_oAscMathMainTypeStrings[DE.define.c_oAscMathMainType.Function ] = [this.textFunction, 3, true];
|
||||
c_oAscMathMainTypeStrings[DE.define.c_oAscMathMainType.Accent ] = [this.textAccent, 4];
|
||||
c_oAscMathMainTypeStrings[DE.define.c_oAscMathMainType.LimitLog ] = [this.textLimitAndLog, 3];
|
||||
c_oAscMathMainTypeStrings[DE.define.c_oAscMathMainType.Operator ] = [this.textOperator, 4];
|
||||
c_oAscMathMainTypeStrings[DE.define.c_oAscMathMainType.Matrix ] = [this.textMatrix, 4, true];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Symbol ] = [this.textSymbols, 11];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Fraction ] = [this.textFraction, 4];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Script ] = [this.textScript, 4];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Radical ] = [this.textRadical, 4];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Integral ] = [this.textIntegral, 3, true];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.LargeOperator] = [this.textLargeOperator, 5, true];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Bracket ] = [this.textBracket, 4, true];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Function ] = [this.textFunction, 3, true];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Accent ] = [this.textAccent, 4];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.LimitLog ] = [this.textLimitAndLog, 3];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Operator ] = [this.textOperator, 4];
|
||||
c_oAscMathMainTypeStrings[Common.define.c_oAscMathMainType.Matrix ] = [this.textMatrix, 4, true];
|
||||
|
||||
// equations sub groups
|
||||
|
||||
// equations types
|
||||
|
||||
var translationTable = {}, name = '', translate = '';
|
||||
for (name in DE.define.c_oAscMathType) {
|
||||
if (DE.define.c_oAscMathType.hasOwnProperty(name)) {
|
||||
for (name in Common.define.c_oAscMathType) {
|
||||
if (Common.define.c_oAscMathType.hasOwnProperty(name)) {
|
||||
var arr = name.split('_');
|
||||
if (arr.length==2 && arr[0]=='Symbol') {
|
||||
translate = 'txt' + arr[0] + '_' + arr[1].toLocaleLowerCase();
|
||||
} else
|
||||
translate = 'txt' + name;
|
||||
translationTable[DE.define.c_oAscMathType[name]] = this[translate];
|
||||
translationTable[Common.define.c_oAscMathType[name]] = this[translate];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2545,7 +2554,7 @@ define([
|
|||
me.api.SetMarkerFormat(true, true, parseInt(r, 16), parseInt(g, 16), parseInt(b, 16));
|
||||
}
|
||||
|
||||
Common.NotificationCenter.trigger('edit:complete', me.toolbar);
|
||||
Common.NotificationCenter.trigger('edit:complete', me.toolbar, me.toolbar.btnHighlightColor);
|
||||
Common.component.Analytics.trackEvent('ToolBar', 'Highlight Color');
|
||||
},
|
||||
|
||||
|
@ -2583,8 +2592,8 @@ define([
|
|||
});
|
||||
},
|
||||
|
||||
onApiCoAuthoringDisconnect: function() {
|
||||
this.toolbar.setMode({isDisconnected:true});
|
||||
onApiCoAuthoringDisconnect: function(disableDownload) {
|
||||
this.toolbar.setMode({isDisconnected:true, disableDownload: !!disableDownload});
|
||||
this.editMode = false;
|
||||
},
|
||||
|
||||
|
|
|
@ -38,11 +38,13 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="padding-small">
|
||||
<td class="padding-small" colspan=2>
|
||||
<div id="chart-button-type" style=""></div>
|
||||
</td>
|
||||
<td class="padding-small">
|
||||
<div id="chart-button-style" style=""></div>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="padding-small" colspan=2>
|
||||
<div class="" id="chart-combo-style" style="width: 100%;"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<li id="fm-btn-download" class="fm-btn" />
|
||||
<li id="fm-btn-save-desktop" class="fm-btn" />
|
||||
<li id="fm-btn-print" class="fm-btn" />
|
||||
<li id="fm-btn-rename" class="fm-btn" />
|
||||
<li class="devider" />
|
||||
<li id="fm-btn-recent" class="fm-btn" />
|
||||
<li id="fm-btn-create" class="fm-btn" />
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
<div class="statusbar" style="display:table;">
|
||||
<div class="status-group dropup">
|
||||
<label id="label-pages" class="status-label" style="margin-left: 40px;" data-toggle="dropdown"><%= Common.Utils.String.format(scope.pageIndexText, 1, 1) %></label>
|
||||
<label id="label-pages" class="status-label dropdown-toggle" style="margin-left: 40px;" data-toggle="dropdown"><%= Common.Utils.String.format(scope.pageIndexText, 1, 1) %></label>
|
||||
<div id="status-goto-box" class="dropdown-menu">
|
||||
<label style="float:left;line-height:22px;"><%= scope.goToPageText %></label>
|
||||
<div id="status-goto-page" style="display:inline-block;"></div>
|
||||
|
|
|
@ -44,6 +44,7 @@ define([
|
|||
'underscore',
|
||||
'backbone',
|
||||
'common/main/lib/component/Button',
|
||||
'common/main/lib/component/ComboDataView',
|
||||
'documenteditor/main/app/view/ImageSettingsAdvanced'
|
||||
], function (menuTemplate, $, _, Backbone) {
|
||||
'use strict';
|
||||
|
@ -105,10 +106,8 @@ define([
|
|||
},
|
||||
|
||||
ChangeSettings: function(props) {
|
||||
if (this._initSettings) {
|
||||
if (this._initSettings)
|
||||
this.createDelayedElements();
|
||||
this._initSettings = false;
|
||||
}
|
||||
|
||||
this.disableControls(this._locked);
|
||||
|
||||
|
@ -154,22 +153,27 @@ define([
|
|||
|
||||
value = props.get_SeveralChartStyles();
|
||||
if (this._state.SeveralCharts && value) {
|
||||
var btnIconEl = this.btnChartStyle.cmpEl.find('span.btn-icon');
|
||||
btnIconEl.css('background-image', 'none');
|
||||
this.mnuChartStylePicker.selectRecord(null, true);
|
||||
this.cmbChartStyle.fieldPicker.deselectAll();
|
||||
this.cmbChartStyle.menuPicker.deselectAll();
|
||||
this._state.ChartStyle = null;
|
||||
} else {
|
||||
value = this.chartProps.getStyle();
|
||||
if (this._state.ChartStyle!==value) {
|
||||
var record = this.mnuChartStylePicker.store.findWhere({data: value});
|
||||
this.mnuChartStylePicker.selectRecord(record, true);
|
||||
if (record) {
|
||||
var btnIconEl = this.btnChartStyle.cmpEl.find('span.btn-icon');
|
||||
btnIconEl.css('background-image', 'url(' + record.get('imageUrl') + ')');
|
||||
if (this._state.ChartStyle!==value || this._isChartStylesChanged) {
|
||||
this.cmbChartStyle.suspendEvents();
|
||||
var rec = this.cmbChartStyle.menuPicker.store.findWhere({data: value});
|
||||
this.cmbChartStyle.menuPicker.selectRecord(rec);
|
||||
this.cmbChartStyle.resumeEvents();
|
||||
|
||||
if (this._isChartStylesChanged) {
|
||||
if (rec)
|
||||
this.cmbChartStyle.fillComboView(this.cmbChartStyle.menuPicker.getSelectedRec(),true);
|
||||
else
|
||||
this.cmbChartStyle.fillComboView(this.cmbChartStyle.menuPicker.store.at(0), true);
|
||||
}
|
||||
this._state.ChartStyle=value;
|
||||
}
|
||||
}
|
||||
this._isChartStylesChanged = false;
|
||||
|
||||
this._noApply = false;
|
||||
|
||||
|
@ -307,6 +311,7 @@ define([
|
|||
createDelayedElements: function() {
|
||||
this.createDelayedControls();
|
||||
this.updateMetricUnit();
|
||||
this._initSettings = false;
|
||||
},
|
||||
|
||||
_ChartWrapStyleChanged: function(style) {
|
||||
|
@ -444,34 +449,15 @@ define([
|
|||
this.fireEvent('editcomplete', this);
|
||||
},
|
||||
|
||||
onSelectStyle: function(btn, picker, itemView, record) {
|
||||
onSelectStyle: function(combo, record) {
|
||||
if (this._noApply) return;
|
||||
|
||||
var rawData = {},
|
||||
isPickerSelect = _.isFunction(record.toJSON);
|
||||
|
||||
if (isPickerSelect){
|
||||
if (record.get('selected')) {
|
||||
rawData = record.toJSON();
|
||||
} else {
|
||||
// record deselected
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
rawData = record;
|
||||
}
|
||||
|
||||
var style = 'url(' + rawData.imageUrl + ')';
|
||||
var btnIconEl = this.btnChartStyle.cmpEl.find('span.btn-icon');
|
||||
btnIconEl.css('background-image', style);
|
||||
|
||||
if (this.api && !this._noApply && this.chartProps) {
|
||||
var props = new Asc.asc_CImgProperty();
|
||||
this.chartProps.putStyle(rawData.data);
|
||||
this.chartProps.putStyle(record.get('data'));
|
||||
props.put_ChartProperties(this.chartProps);
|
||||
this.api.ImgApply(props);
|
||||
}
|
||||
|
||||
this.fireEvent('editcomplete', this);
|
||||
},
|
||||
|
||||
|
@ -482,64 +468,51 @@ define([
|
|||
|
||||
updateChartStyles: function(styles) {
|
||||
var me = this;
|
||||
this._isChartStylesChanged = true;
|
||||
|
||||
if (!this.btnChartStyle) {
|
||||
this.btnChartStyle = new Common.UI.Button({
|
||||
cls : 'btn-large-dataview',
|
||||
iconCls : 'item-wrap',
|
||||
menu : new Common.UI.Menu({
|
||||
menuAlign: 'tr-br',
|
||||
items: [
|
||||
{ template: _.template('<div id="id-chart-menu-style" style="width: 245px; margin: 0 5px;"></div>') }
|
||||
]
|
||||
})
|
||||
if (!this.cmbChartStyle) {
|
||||
this.cmbChartStyle = new Common.UI.ComboDataView({
|
||||
itemWidth: 50,
|
||||
itemHeight: 50,
|
||||
menuMaxHeight: 270,
|
||||
enableKeyEvents: true,
|
||||
cls: 'combo-chart-style'
|
||||
});
|
||||
this.btnChartStyle.render($('#chart-button-style'));
|
||||
this.lockedControls.push(this.btnChartStyle);
|
||||
this.mnuChartStylePicker = new Common.UI.DataView({
|
||||
el: $('#id-chart-menu-style'),
|
||||
style: 'max-height: 411px;',
|
||||
parentMenu: this.btnChartStyle.menu,
|
||||
store: new Common.UI.DataViewStore(),
|
||||
itemTemplate: _.template('<div id="<%= id %>" class="item-wrap" style="background-image: url(<%= imageUrl %>); background-position: 0 0;"></div>')
|
||||
this.cmbChartStyle.render($('#chart-combo-style'));
|
||||
this.cmbChartStyle.openButton.menu.cmpEl.css({
|
||||
'min-width': 178,
|
||||
'max-width': 178
|
||||
});
|
||||
|
||||
if (this.btnChartStyle.menu) {
|
||||
this.btnChartStyle.menu.on('show:after', function () {
|
||||
me.mnuChartStylePicker.scroller.update({alwaysVisibleY: true});
|
||||
});
|
||||
}
|
||||
this.mnuChartStylePicker.on('item:click', _.bind(this.onSelectStyle, this, this.btnChartStyle));
|
||||
this.cmbChartStyle.on('click', _.bind(this.onSelectStyle, this));
|
||||
this.cmbChartStyle.openButton.menu.on('show:after', function () {
|
||||
me.cmbChartStyle.menuPicker.scroller.update({alwaysVisibleY: true});
|
||||
});
|
||||
this.lockedControls.push(this.cmbChartStyle);
|
||||
}
|
||||
|
||||
if (styles && styles.length>0){
|
||||
var stylesStore = this.mnuChartStylePicker.store;
|
||||
var stylesStore = this.cmbChartStyle.menuPicker.store;
|
||||
if (stylesStore) {
|
||||
var stylearray = [],
|
||||
selectedIdx = -1,
|
||||
selectedUrl;
|
||||
_.each(styles, function(item, index){
|
||||
stylearray.push({
|
||||
imageUrl: item.asc_getImageUrl(),
|
||||
data : item.asc_getStyle(),
|
||||
tip : me.textStyle + ' ' + item.asc_getStyle()
|
||||
var count = stylesStore.length;
|
||||
if (count>0 && count==styles.length) {
|
||||
var data = stylesStore.models;
|
||||
_.each(styles, function(style, index){
|
||||
data[index].set('imageUrl', style.asc_getImageUrl());
|
||||
});
|
||||
if (me._state.ChartStyle == item.asc_getStyle()) {
|
||||
selectedIdx = index;
|
||||
selectedUrl = item.asc_getImageUrl();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
stylesStore.reset(stylearray, {silent: false});
|
||||
} else {
|
||||
var stylearray = [],
|
||||
selectedIdx = -1;
|
||||
_.each(styles, function(item, index){
|
||||
stylearray.push({
|
||||
imageUrl: item.asc_getImageUrl(),
|
||||
data : item.asc_getStyle(),
|
||||
tip : me.textStyle + ' ' + item.asc_getStyle()
|
||||
});
|
||||
});
|
||||
stylesStore.reset(stylearray, {silent: false});
|
||||
}
|
||||
}
|
||||
}
|
||||
this.mnuChartStylePicker.selectByIndex(selectedIdx, true);
|
||||
if (selectedIdx>=0 && this.btnChartStyle.cmpEl) {
|
||||
var style = 'url(' + selectedUrl + ')';
|
||||
var btnIconEl = this.btnChartStyle.cmpEl.find('span.btn-icon');
|
||||
btnIconEl.css('background-image', style);
|
||||
}
|
||||
},
|
||||
|
||||
setLocked: function (locked) {
|
||||
|
|
|
@ -2696,21 +2696,21 @@ define([
|
|||
checkable : true,
|
||||
checked : false,
|
||||
toggleGroup : 'popupparagraphvalign',
|
||||
valign : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_TOP
|
||||
valign : Asc.c_oAscVAlign.Top
|
||||
}).on('click', _.bind(paragraphVAlign, me)),
|
||||
me.menuParagraphCenter = new Common.UI.MenuItem({
|
||||
caption : me.centerCellText,
|
||||
checkable : true,
|
||||
checked : false,
|
||||
toggleGroup : 'popupparagraphvalign',
|
||||
valign : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_CTR
|
||||
valign : Asc.c_oAscVAlign.Center
|
||||
}).on('click', _.bind(paragraphVAlign, me)),
|
||||
me.menuParagraphBottom = new Common.UI.MenuItem({
|
||||
caption : me.bottomCellText,
|
||||
checkable : true,
|
||||
checked : false,
|
||||
toggleGroup : 'popupparagraphvalign',
|
||||
valign : Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM
|
||||
valign : Asc.c_oAscVAlign.Bottom
|
||||
}).on('click', _.bind(paragraphVAlign, me))
|
||||
]
|
||||
})
|
||||
|
@ -2915,9 +2915,9 @@ define([
|
|||
menuParagraphDirection.setVisible(isInShape && !isInChart && !isEquation); // после того, как заголовок можно будет растягивать по вертикали, вернуть "|| isInChart" !!
|
||||
if ( isInShape || isInChart ) {
|
||||
var align = value.imgProps.value.get_VerticalTextAlign();
|
||||
me.menuParagraphTop.setChecked(align == Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_TOP);
|
||||
me.menuParagraphCenter.setChecked(align == Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_CTR);
|
||||
me.menuParagraphBottom.setChecked(align == Asc.c_oAscVerticalTextAlign.TEXT_ALIGN_BOTTOM);
|
||||
me.menuParagraphTop.setChecked(align == Asc.c_oAscVAlign.Top);
|
||||
me.menuParagraphCenter.setChecked(align == Asc.c_oAscVAlign.Center);
|
||||
me.menuParagraphBottom.setChecked(align == Asc.c_oAscVAlign.Bottom);
|
||||
|
||||
var dir = value.imgProps.value.get_Vert();
|
||||
me.menuParagraphDirectH.setChecked(dir == Asc.c_oAscVertDrawingText.normal);
|
||||
|
|
|
@ -163,7 +163,7 @@ define([
|
|||
style: "width:45px;",
|
||||
menu : new Common.UI.Menu({
|
||||
items: [
|
||||
{ template: _.template('<div id="drop-advanced-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<div id="drop-advanced-border-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<a id="drop-advanced-border-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
||||
]
|
||||
})
|
||||
|
@ -188,7 +188,7 @@ define([
|
|||
style: "width:45px;",
|
||||
menu : new Common.UI.Menu({
|
||||
items: [
|
||||
{ template: _.template('<div id="drop-advanced-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<div id="drop-advanced-back-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<a id="drop-advanced-back-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
||||
]
|
||||
})
|
||||
|
@ -217,6 +217,8 @@ define([
|
|||
me._changedProps.get_Shade().put_Color(Common.Utils.ThemeColor.getRgbColor(color));
|
||||
}
|
||||
}
|
||||
var colorstr = (typeof(color) == 'object') ? color.color : color;
|
||||
me.tableStyler.setCellsColor(colorstr);
|
||||
}, me));
|
||||
});
|
||||
this.btnBackColor.render( $('#drop-advanced-button-color'));
|
||||
|
@ -706,6 +708,9 @@ define([
|
|||
this._UpdateTableBordersStyle(ct, border, size, color, this.Borders);
|
||||
}, this);
|
||||
|
||||
var colorstr = (typeof(this.paragraphShade) == 'object') ? this.paragraphShade.color : this.paragraphShade;
|
||||
this.tableStyler.setCellsColor(colorstr);
|
||||
|
||||
if (this.isFrame)
|
||||
this.setHeight(500);
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ define([
|
|||
new Common.UI.MenuItem({
|
||||
el : $('#fm-btn-return',this.el),
|
||||
action : 'back',
|
||||
caption : this.btnReturnCaption,
|
||||
caption : this.btnCloseMenuCaption,
|
||||
canFocused: false
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
|
@ -121,6 +121,12 @@ define([
|
|||
caption : this.btnPrintCaption,
|
||||
canFocused: false
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
el : $('#fm-btn-rename',this.el),
|
||||
action : 'rename',
|
||||
caption : this.btnRenameCaption,
|
||||
canFocused: false
|
||||
}),
|
||||
new Common.UI.MenuItem({
|
||||
el : $('#fm-btn-recent',this.el),
|
||||
action : 'recent',
|
||||
|
@ -208,9 +214,11 @@ define([
|
|||
|
||||
applyMode: function() {
|
||||
this.items[5][this.mode.canPrint?'show':'hide']();
|
||||
this.items[6][this.mode.canOpenRecent?'show':'hide']();
|
||||
this.items[7][this.mode.canCreateNew?'show':'hide']();
|
||||
this.items[7].$el.find('+.devider')[this.mode.canCreateNew?'show':'hide']();
|
||||
this.items[6][(this.mode.canRename && !this.mode.isDesktopApp) ?'show':'hide']();
|
||||
this.items[6].$el.find('+.devider')[!this.mode.isDisconnected?'show':'hide']();
|
||||
this.items[7][this.mode.canOpenRecent?'show':'hide']();
|
||||
this.items[8][this.mode.canCreateNew?'show':'hide']();
|
||||
this.items[8].$el.find('+.devider')[this.mode.canCreateNew?'show':'hide']();
|
||||
|
||||
this.items[3][((this.mode.canDownload || this.mode.canDownloadOrigin) && (!this.mode.isDesktopApp || !this.mode.isOffline))?'show':'hide']();
|
||||
this.items[4][((this.mode.canDownload || this.mode.canDownloadOrigin) && this.mode.isDesktopApp && this.mode.isOffline)?'show':'hide']();
|
||||
|
@ -219,7 +227,7 @@ define([
|
|||
this.items[1][this.mode.isEdit?'show':'hide']();
|
||||
this.items[2][!this.mode.isEdit && this.mode.canEdit && this.mode.canRequestEditRights ?'show':'hide']();
|
||||
|
||||
this.items[9][(!this.mode.isOffline && !this.mode.isReviewOnly && this.document&&this.document.info &&
|
||||
this.items[10][(!this.mode.isOffline && !this.mode.isReviewOnly && this.document&&this.document.info &&
|
||||
(this.document.info.sharingSettings&&this.document.info.sharingSettings.length>0 ||
|
||||
this.mode.sharingSettingsUrl&&this.mode.sharingSettingsUrl.length))?'show':'hide']();
|
||||
|
||||
|
@ -232,7 +240,7 @@ define([
|
|||
|
||||
if ( this.mode.canCreateNew ) {
|
||||
if (this.mode.templates && this.mode.templates.length) {
|
||||
$('a',this.items[7].$el).text(this.btnCreateNewCaption + '...');
|
||||
$('a',this.items[8].$el).text(this.btnCreateNewCaption + '...');
|
||||
this.panels['new'] = ((new DE.Views.FileMenuPanels.CreateNew({menu: this, docs: this.mode.templates})).render());
|
||||
}
|
||||
}
|
||||
|
@ -254,8 +262,7 @@ define([
|
|||
|
||||
this.panels['help'].setLangConfig(this.mode.lang);
|
||||
|
||||
this.items[10][this.mode.canUseHistory?'show':'hide']();
|
||||
this.items[10].setDisabled(this.mode.isDisconnected);
|
||||
this.items[11][this.mode.canUseHistory&&!this.mode.isDisconnected?'show':'hide']();
|
||||
},
|
||||
|
||||
setMode: function(mode, delay) {
|
||||
|
@ -263,6 +270,9 @@ define([
|
|||
this.mode.canEdit = this.mode.isEdit = false;
|
||||
this.mode.canOpenRecent = this.mode.canCreateNew = false;
|
||||
this.mode.isDisconnected = mode.isDisconnected;
|
||||
this.mode.canRename = false;
|
||||
this.mode.canPrint = false;
|
||||
this.mode.canDownload = this.mode.canDownloadOrigin = false;
|
||||
} else {
|
||||
this.mode = mode;
|
||||
}
|
||||
|
@ -303,6 +313,7 @@ define([
|
|||
|
||||
SetDisabled: function(disable) {
|
||||
this.items[1][(disable || !this.mode.isEdit)?'hide':'show']();
|
||||
this.items[6][(disable || !this.mode.canRename || this.mode.isDesktopApp) ?'hide':'show']();
|
||||
},
|
||||
|
||||
btnSaveCaption : 'Save',
|
||||
|
@ -319,6 +330,8 @@ define([
|
|||
btnSettingsCaption : 'Advanced Settings...',
|
||||
btnHistoryCaption : 'Versions History',
|
||||
btnSaveAsCaption : 'Save as',
|
||||
textDownload : 'Download'
|
||||
textDownload : 'Download',
|
||||
btnRenameCaption : 'Rename...',
|
||||
btnCloseMenuCaption : 'Close Menu'
|
||||
}, DE.Views.FileMenu || {}));
|
||||
});
|
||||
|
|
|
@ -210,7 +210,10 @@ define([
|
|||
style : 'width: 160px;',
|
||||
editable : false,
|
||||
cls : 'input-group-nr',
|
||||
menuStyle : 'max-height: 210px;',
|
||||
data : [
|
||||
{ value: -1, displayValue: this.txtFitPage },
|
||||
{ value: -2, displayValue: this.txtFitWidth },
|
||||
{ value: 50, displayValue: "50%" },
|
||||
{ value: 60, displayValue: "60%" },
|
||||
{ value: 70, displayValue: "70%" },
|
||||
|
@ -321,14 +324,18 @@ define([
|
|||
this.chInputMode.setValue(value!==null && parseInt(value) == 1);
|
||||
|
||||
value = Common.localStorage.getItem("de-settings-zoom");
|
||||
var item = this.cmbZoom.store.findWhere({value: parseInt(value)});
|
||||
this.cmbZoom.setValue(item ? parseInt(item.get('value')) : 100);
|
||||
value = (value!==null) ? parseInt(value) : (this.mode.customization && this.mode.customization.zoom ? parseInt(this.mode.customization.zoom) : 100);
|
||||
var item = this.cmbZoom.store.findWhere({value: value});
|
||||
this.cmbZoom.setValue(item ? parseInt(item.get('value')) : (value>0 ? value+'%' : 100));
|
||||
|
||||
/** coauthoring begin **/
|
||||
value = Common.localStorage.getItem("de-settings-livecomment");
|
||||
this.chLiveComment.setValue(!(value!==null && parseInt(value) == 0));
|
||||
|
||||
value = Common.localStorage.getItem("de-settings-coauthmode");
|
||||
if (value===null && Common.localStorage.getItem("de-settings-autosave")===null &&
|
||||
this.mode.customization && this.mode.customization.autosave===false)
|
||||
value = 0; // use customization.autosave only when de-settings-coauthmode and de-settings-autosave are null
|
||||
var fast_coauth = (value===null || parseInt(value) == 1) && !(this.mode.isDesktopApp && this.mode.isOffline) && this.mode.canCoAuthoring;
|
||||
|
||||
item = this.cmbCoAuthMode.store.findWhere({value: parseInt(value)});
|
||||
|
@ -352,6 +359,8 @@ define([
|
|||
this._oldUnits = this.cmbUnit.getValue();
|
||||
|
||||
value = Common.localStorage.getItem("de-settings-autosave");
|
||||
if (value===null && this.mode.customization && this.mode.customization.autosave===false)
|
||||
value = 0;
|
||||
this.chAutosave.setValue(fast_coauth || (value===null ? this.mode.canCoAuthoring : parseInt(value) == 1));
|
||||
|
||||
value = Common.localStorage.getItem("de-settings-spellcheck");
|
||||
|
@ -432,7 +441,9 @@ define([
|
|||
strStrict: 'Strict',
|
||||
textAutoRecover: 'Autorecover',
|
||||
strAutoRecover: 'Turn on autorecover',
|
||||
txtInch: 'Inch'
|
||||
txtInch: 'Inch',
|
||||
txtFitPage: 'Fit to Page',
|
||||
txtFitWidth: 'Fit to Width'
|
||||
}, DE.Views.FileMenuPanels.Settings || {}));
|
||||
|
||||
DE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({
|
||||
|
|
|
@ -94,10 +94,8 @@ define([
|
|||
},
|
||||
|
||||
ChangeSettings: function(prop) {
|
||||
if (this._initSettings) {
|
||||
if (this._initSettings)
|
||||
this.createDelayedElements();
|
||||
this._initSettings = false;
|
||||
}
|
||||
|
||||
this.disableControls(this._locked);
|
||||
|
||||
|
@ -244,6 +242,7 @@ define([
|
|||
createDelayedElements: function() {
|
||||
this.createDelayedControls();
|
||||
this.updateMetricUnit();
|
||||
this._initSettings = false;
|
||||
},
|
||||
|
||||
setLocked: function (locked) {
|
||||
|
|
|
@ -170,7 +170,7 @@ define([
|
|||
}, this));
|
||||
this.btnInsertFromUrl.on('click', _.bind(this.insertFromUrl, this));
|
||||
this.btnEditObject.on('click', _.bind(function(btn){
|
||||
if (this.api) this.api.asc_pluginRun(this._originalProps.asc_getPluginGuid(), 0, this._originalProps.asc_getPluginData());
|
||||
if (this.api) this.api.asc_startEditCurrentOleObject();
|
||||
this.fireEvent('editcomplete', this);
|
||||
}, this));
|
||||
|
||||
|
@ -182,13 +182,12 @@ define([
|
|||
createDelayedElements: function() {
|
||||
this.createDelayedControls();
|
||||
this.updateMetricUnit();
|
||||
this._initSettings = false;
|
||||
},
|
||||
|
||||
ChangeSettings: function(props) {
|
||||
if (this._initSettings) {
|
||||
if (this._initSettings)
|
||||
this.createDelayedElements();
|
||||
this._initSettings = false;
|
||||
}
|
||||
|
||||
this.disableControls(this._locked);
|
||||
|
||||
|
|
|
@ -380,13 +380,13 @@ define([
|
|||
this.cmbMergeTo.setValue(this._arrMergeSrc[0].value);
|
||||
}
|
||||
}
|
||||
|
||||
this._initSettings = false;
|
||||
},
|
||||
|
||||
ChangeSettings: function(props) {
|
||||
if (this._initSettings) {
|
||||
if (this._initSettings)
|
||||
this.createDelayedControls();
|
||||
this._initSettings = false;
|
||||
}
|
||||
|
||||
this.disableInsertControls(this._locked);
|
||||
|
||||
|
|
|
@ -276,10 +276,8 @@ define([
|
|||
},
|
||||
|
||||
ChangeSettings: function(prop) {
|
||||
if (this._initSettings) {
|
||||
if (this._initSettings)
|
||||
this.createDelayedElements();
|
||||
this._initSettings = false;
|
||||
}
|
||||
|
||||
this.disableControls(this._locked);
|
||||
this.hideTextOnlySettings(this.isChart);
|
||||
|
@ -397,6 +395,7 @@ define([
|
|||
createDelayedElements: function() {
|
||||
this.UpdateThemeColors();
|
||||
this.updateMetricUnit();
|
||||
this._initSettings = false;
|
||||
},
|
||||
|
||||
openAdvancedSettings: function(e) {
|
||||
|
@ -445,7 +444,7 @@ define([
|
|||
if (!this.mnuColorPicker) {
|
||||
this.btnColor.setMenu( new Common.UI.Menu({
|
||||
items: [
|
||||
{ template: _.template('<div id="paragraph-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<div id="paragraph-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<a id="paragraph-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||
]
|
||||
}));
|
||||
|
|
|
@ -212,7 +212,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
|
|||
style: "width:45px;",
|
||||
menu : new Common.UI.Menu({
|
||||
items: [
|
||||
{ template: _.template('<div id="paragraphadv-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<div id="paragraphadv-border-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<a id="paragraphadv-border-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
||||
]
|
||||
})
|
||||
|
@ -266,7 +266,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
|
|||
style: "width:45px;",
|
||||
menu : new Common.UI.Menu({
|
||||
items: [
|
||||
{ template: _.template('<div id="paragraphadv-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<div id="paragraphadv-back-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<a id="paragraphadv-back-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
||||
]
|
||||
})
|
||||
|
@ -733,6 +733,9 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
|
|||
this._UpdateTableBordersStyle(ct, border, size, color, this.Borders);
|
||||
}, this);
|
||||
|
||||
var colorstr = (typeof(this.paragraphShade) == 'object') ? this.paragraphShade.color : this.paragraphShade;
|
||||
this.BordersImage.setCellsColor(colorstr);
|
||||
|
||||
if (this.storageName) {
|
||||
var value = Common.localStorage.getItem(this.storageName);
|
||||
this.setActiveCategory((value!==null) ? parseInt(value) : 0);
|
||||
|
@ -888,6 +891,8 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
|
|||
this._changedProps.get_Shade().put_Color(Common.Utils.ThemeColor.getRgbColor(this.paragraphShade));
|
||||
}
|
||||
}
|
||||
var colorstr = (typeof(color) == 'object') ? color.color : color;
|
||||
this.BordersImage.setCellsColor(colorstr);
|
||||
},
|
||||
|
||||
|
||||
|
|
|
@ -258,7 +258,7 @@ define([
|
|||
this._settings[type].btn.toggle(true, false);
|
||||
this._settings[type].btn.trigger('click', this._settings[type].btn);
|
||||
} else {
|
||||
var target_pane = $("#" + this._settings[type].panel );
|
||||
var target_pane = this.$el.find("#" + this._settings[type].panel );
|
||||
if ( !target_pane.hasClass('active') ) {
|
||||
target_pane.parent().find('> .active').removeClass('active');
|
||||
target_pane.addClass("active");
|
||||
|
@ -271,7 +271,7 @@ define([
|
|||
},
|
||||
|
||||
GetActivePane: function() {
|
||||
return (this.minimizedMode) ? null : $(".settings-panel.active")[0].id;
|
||||
return (this.minimizedMode) ? null : this.$el.find(".settings-panel.active")[0].id;
|
||||
},
|
||||
|
||||
clearSelection: function() {
|
||||
|
|
|
@ -764,7 +764,6 @@ define([
|
|||
|
||||
if (this._initSettings)
|
||||
this.createDelayedElements();
|
||||
this._initSettings = false;
|
||||
|
||||
if (props && props.get_ShapeProperties())
|
||||
{
|
||||
|
@ -1450,6 +1449,7 @@ define([
|
|||
|
||||
this.fillAutoShapes();
|
||||
this.UpdateThemeColors();
|
||||
this._initSettings = false;
|
||||
},
|
||||
|
||||
onInitStandartTextures: function(texture) {
|
||||
|
@ -1561,7 +1561,7 @@ define([
|
|||
style: "width:45px;",
|
||||
menu : new Common.UI.Menu({
|
||||
items: [
|
||||
{ template: _.template('<div id="shape-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<div id="shape-back-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<a id="shape-back-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||
]
|
||||
})
|
||||
|
@ -1581,7 +1581,7 @@ define([
|
|||
style: "width:45px;",
|
||||
menu : new Common.UI.Menu({
|
||||
items: [
|
||||
{ template: _.template('<div id="shape-foreground-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<div id="shape-foreground-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<a id="shape-foreground-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||
]
|
||||
})
|
||||
|
@ -1600,7 +1600,7 @@ define([
|
|||
style: "width:45px;",
|
||||
menu : new Common.UI.Menu({
|
||||
items: [
|
||||
{ template: _.template('<div id="shape-background-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<div id="shape-background-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<a id="shape-background-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||
]
|
||||
})
|
||||
|
@ -1619,7 +1619,7 @@ define([
|
|||
style: "width:45px;",
|
||||
menu : new Common.UI.Menu({
|
||||
items: [
|
||||
{ template: _.template('<div id="shape-gradient-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<div id="shape-gradient-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<a id="shape-gradient-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||
]
|
||||
})
|
||||
|
@ -1638,7 +1638,7 @@ define([
|
|||
style: "width:45px;",
|
||||
menu : new Common.UI.Menu({
|
||||
items: [
|
||||
{ template: _.template('<div id="shape-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<div id="shape-border-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<a id="shape-border-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||
]
|
||||
})
|
||||
|
|
|
@ -150,7 +150,8 @@ define([
|
|||
this.btnDocLanguage = new Common.UI.Button({
|
||||
el: $('#btn-doc-lang',this.el),
|
||||
hint: this.tipSetDocLang,
|
||||
hintAnchor: 'top'
|
||||
hintAnchor: 'top',
|
||||
disabled: true
|
||||
});
|
||||
|
||||
this.btnSetSpelling = new Common.UI.Button({
|
||||
|
@ -203,7 +204,8 @@ define([
|
|||
this.btnLanguage = new Common.UI.Button({
|
||||
el: panelLang,
|
||||
hint: this.tipSetLang,
|
||||
hintAnchor: 'top-left'
|
||||
hintAnchor: 'top-left',
|
||||
disabled: true
|
||||
});
|
||||
this.btnLanguage.cmpEl.on({
|
||||
'show.bs.dropdown': function () {
|
||||
|
@ -312,9 +314,9 @@ define([
|
|||
return me.txtPageNumInvalid;
|
||||
}
|
||||
}).on('keypress:after', function(input, e) {
|
||||
var box = me.$el.find('#status-goto-box');
|
||||
if (e.keyCode === Common.UI.Keys.RETURN) {
|
||||
var edit = box.find('input[type=text]'), page = parseInt(edit.val());
|
||||
var box = me.$el.find('#status-goto-box'),
|
||||
edit = box.find('input[type=text]'), page = parseInt(edit.val());
|
||||
if (!page || page-- > me.pages.get('count') || page < 0) {
|
||||
edit.select();
|
||||
return false;
|
||||
|
@ -326,6 +328,15 @@ define([
|
|||
me.api.goToPage(page);
|
||||
me.api.asc_enableKeyEvents(true);
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
).on('keyup:after', function(input, e) {
|
||||
if (e.keyCode === Common.UI.Keys.ESC) {
|
||||
var box = me.$el.find('#status-goto-box');
|
||||
box.focus(); // for IE
|
||||
box.parent().removeClass('open');
|
||||
me.api.asc_enableKeyEvents(true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -417,6 +428,7 @@ define([
|
|||
usertip.setContent();
|
||||
}
|
||||
(length > 1) ? this.panelUsersBlock.attr('data-toggle', 'dropdown') : this.panelUsersBlock.removeAttr('data-toggle');
|
||||
this.panelUsersBlock.toggleClass('dropdown-toggle', length > 1);
|
||||
(length > 1) ? this.panelUsersBlock.off('click') : this.panelUsersBlock.on('click', _.bind(this.onUsersClick, this));
|
||||
},
|
||||
|
||||
|
@ -464,6 +476,10 @@ define([
|
|||
}, this);
|
||||
|
||||
this.langMenu.doLayout();
|
||||
if (this.langMenu.items.length>0) {
|
||||
this.btnLanguage.setDisabled(false);
|
||||
this.btnDocLanguage.setDisabled(false);
|
||||
}
|
||||
},
|
||||
|
||||
setLanguage: function(info) {
|
||||
|
@ -492,8 +508,9 @@ define([
|
|||
},
|
||||
|
||||
SetDisabled: function(disable) {
|
||||
this.btnLanguage.setDisabled(disable);
|
||||
this.btnDocLanguage.setDisabled(disable);
|
||||
var langs = this.langMenu.items.length>0;
|
||||
this.btnLanguage.setDisabled(disable || !langs);
|
||||
this.btnDocLanguage.setDisabled(disable || !langs);
|
||||
if (disable) {
|
||||
this.state.changespanel = this.mnuChangesPanel.checked;
|
||||
}
|
||||
|
@ -506,8 +523,8 @@ define([
|
|||
tipUsers : 'Document is currently being edited by several users.',
|
||||
tipMoreUsers : 'and %1 users.',
|
||||
tipShowUsers : 'To see all users click the icon below.',
|
||||
tipFitPage : 'Fit Page',
|
||||
tipFitWidth : 'Fit Width',
|
||||
tipFitPage : 'Fit to Page',
|
||||
tipFitWidth : 'Fit to Width',
|
||||
tipZoomIn : 'Zoom In',
|
||||
tipZoomOut : 'Zoom Out',
|
||||
tipZoomFactor : 'Magnification',
|
||||
|
|
|
@ -423,12 +423,12 @@ define([
|
|||
createDelayedElements: function() {
|
||||
this.createDelayedControls();
|
||||
this.UpdateThemeColors();
|
||||
this._initSettings = false;
|
||||
},
|
||||
|
||||
ChangeSettings: function(props) {
|
||||
if (this._initSettings)
|
||||
this.createDelayedElements();
|
||||
this._initSettings = false;
|
||||
|
||||
this.disableControls(this._locked);
|
||||
|
||||
|
@ -642,7 +642,7 @@ define([
|
|||
style: "width:45px;",
|
||||
menu : new Common.UI.Menu({
|
||||
items: [
|
||||
{ template: _.template('<div id="table-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<div id="table-border-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<a id="table-border-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||
]
|
||||
})
|
||||
|
@ -660,7 +660,7 @@ define([
|
|||
style: "width:45px;",
|
||||
menu : new Common.UI.Menu({
|
||||
items: [
|
||||
{ template: _.template('<div id="table-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<div id="table-back-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<a id="table-back-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||
]
|
||||
})
|
||||
|
|
|
@ -881,7 +881,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
|
|||
style: "width:45px;",
|
||||
menu : new Common.UI.Menu({
|
||||
items: [
|
||||
{ template: _.template('<div id="tableadv-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<div id="tableadv-border-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<a id="tableadv-border-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
||||
]
|
||||
})
|
||||
|
@ -901,7 +901,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
|
|||
style: "width:45px;",
|
||||
menu : new Common.UI.Menu({
|
||||
items: [
|
||||
{ template: _.template('<div id="tableadv-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<div id="tableadv-back-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<a id="tableadv-back-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
||||
]
|
||||
})
|
||||
|
@ -921,7 +921,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
|
|||
style: "width:45px;",
|
||||
menu : new Common.UI.Menu({
|
||||
items: [
|
||||
{ template: _.template('<div id="tableadv-table-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<div id="tableadv-table-back-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<a id="tableadv-table-back-color-new" style="padding-left:12px;">' + me.textNewColor + '</a>') }
|
||||
]
|
||||
})
|
||||
|
@ -1083,6 +1083,13 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
|
|||
this._UpdateTableBordersStyle(ct, border, size, color, (this._allTable) ? this.TableBorders : this.CellBorders, (this._allTable) ? this.ChangedTableBorders : this.ChangedCellBorders);
|
||||
}, this);
|
||||
|
||||
var cellcolorstr = (typeof(this.CellColor.Color) == 'object') ? this.CellColor.Color.color : this.CellColor.Color,
|
||||
tablecolorstr = (typeof(this.TableColor.Color) == 'object') ? this.TableColor.Color.color : this.TableColor.Color;
|
||||
this.tableBordersImageSpacing.setTableColor(tablecolorstr);
|
||||
this.tableBordersImage.setTableColor(tablecolorstr);
|
||||
this.tableBordersImageSpacing.setCellsColor(cellcolorstr);
|
||||
this.tableBordersImage.setCellsColor((this._allTable) ? tablecolorstr : cellcolorstr);
|
||||
|
||||
if (this.storageName) {
|
||||
var value = Common.localStorage.getItem(this.storageName);
|
||||
this.setActiveCategory((value!==null) ? parseInt(value) : 0);
|
||||
|
@ -1379,6 +1386,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
|
|||
|
||||
}
|
||||
this._changedProps = new Asc.CTableProp();
|
||||
this._changedProps.put_CellSelect(!this._allTable);
|
||||
this._cellBackground = null;
|
||||
this.ChangedTableBorders = undefined;
|
||||
this.ChangedCellBorders = undefined;
|
||||
|
@ -1673,6 +1681,10 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
|
|||
this._cellBackground.put_Value(0);
|
||||
this._cellBackground.put_Color(Common.Utils.ThemeColor.getRgbColor(this.CellColor.Color));
|
||||
}
|
||||
var colorstr = (typeof(color) == 'object') ? color.color : color;
|
||||
this.tableBordersImageSpacing.setCellsColor(colorstr);
|
||||
if (!this._allTable)
|
||||
this.tableBordersImage.setCellsColor(colorstr);
|
||||
},
|
||||
|
||||
onColorsTableBackSelect: function(picker, color) {
|
||||
|
@ -1693,6 +1705,11 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat
|
|||
background.put_Color(Common.Utils.ThemeColor.getRgbColor(this.TableColor.Color));
|
||||
}
|
||||
}
|
||||
var colorstr = (typeof(color) == 'object') ? color.color : color;
|
||||
this.tableBordersImageSpacing.setTableColor(colorstr);
|
||||
this.tableBordersImage.setTableColor(colorstr);
|
||||
if (this._allTable)
|
||||
this.tableBordersImage.setCellsColor(colorstr);
|
||||
},
|
||||
|
||||
_UpdateBordersSpacing_: function (){
|
||||
|
|
|
@ -515,7 +515,6 @@ define([
|
|||
|
||||
if (this._initSettings)
|
||||
this.createDelayedElements();
|
||||
this._initSettings = false;
|
||||
|
||||
if (props && props.get_ShapeProperties() && props.get_ShapeProperties().get_TextArtProperties())
|
||||
{
|
||||
|
@ -965,6 +964,7 @@ define([
|
|||
this.createDelayedControls();
|
||||
this.UpdateThemeColors();
|
||||
this.fillTransform(this.api.asc_getPropertyEditorTextArts());
|
||||
this._initSettings = false;
|
||||
},
|
||||
|
||||
fillTextArt: function() {
|
||||
|
@ -1054,7 +1054,7 @@ define([
|
|||
style: "width:45px;",
|
||||
menu : new Common.UI.Menu({
|
||||
items: [
|
||||
{ template: _.template('<div id="textart-border-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<div id="textart-border-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<a id="textart-border-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||
]
|
||||
})
|
||||
|
@ -1073,7 +1073,7 @@ define([
|
|||
style: "width:45px;",
|
||||
menu : new Common.UI.Menu({
|
||||
items: [
|
||||
{ template: _.template('<div id="textart-gradient-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<div id="textart-gradient-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<a id="textart-gradient-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||
]
|
||||
})
|
||||
|
@ -1092,7 +1092,7 @@ define([
|
|||
style: "width:45px;",
|
||||
menu : new Common.UI.Menu({
|
||||
items: [
|
||||
{ template: _.template('<div id="textart-back-color-menu" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<div id="textart-back-color-menu" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<a id="textart-back-color-new" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||
]
|
||||
})
|
||||
|
|
|
@ -253,7 +253,7 @@ define([
|
|||
template : _.template('<a tabindex="-1" type="menuitem"><span class="menu-item-icon" style="background-image: none; width: 12px; height: 12px; margin: 1px 7px 0 -7px; background-color: #000;"></span><%= caption %></a>')
|
||||
},
|
||||
{caption:'--'},
|
||||
{ template: _.template('<div id="id-toolbar-menu-fontcolor" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<div id="id-toolbar-menu-fontcolor" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<a id="id-toolbar-menu-new-fontcolor" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||
]
|
||||
})
|
||||
|
@ -267,7 +267,7 @@ define([
|
|||
split : true,
|
||||
menu : new Common.UI.Menu({
|
||||
items: [
|
||||
{ template: _.template('<div id="id-toolbar-menu-paracolor" style="width: 165px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<div id="id-toolbar-menu-paracolor" style="width: 169px; height: 220px; margin: 10px;"></div>') },
|
||||
{ template: _.template('<a id="id-toolbar-menu-new-paracolor" style="padding-left:12px;">' + this.textNewColor + '</a>') }
|
||||
]
|
||||
})
|
||||
|
@ -555,7 +555,9 @@ define([
|
|||
};
|
||||
this.mnuPageNumCurrentPos = clone(this.mnuPageNumberPosPicker);
|
||||
this.mnuInsertPageNum = clone(this.mnuPageNumberPosPicker);
|
||||
this.mnuInsertPageCount = clone(this.mnuPageNumberPosPicker);
|
||||
this.paragraphControls.push(this.mnuPageNumCurrentPos);
|
||||
this.paragraphControls.push(this.mnuInsertPageCount);
|
||||
this.toolbarControls.push(this.btnEditHeader);
|
||||
|
||||
this.btnInsertShape = new Common.UI.Button({
|
||||
|
@ -983,7 +985,7 @@ define([
|
|||
this.btnPageMargins.menu.items[0].setVisible(false);
|
||||
|
||||
var value = Common.localStorage.getItem("de-compact-toolbar");
|
||||
var valueCompact = (value !== null && parseInt(value) == 1);
|
||||
var valueCompact = !!(value !== null && parseInt(value) == 1 || value === null && mode.customization && mode.customization.compactToolbar);
|
||||
|
||||
me.$el.html(this.template({
|
||||
isCompactView: valueCompact
|
||||
|
@ -1262,11 +1264,16 @@ define([
|
|||
})
|
||||
]
|
||||
})
|
||||
}),
|
||||
this.mnuInsertPageCount = new Common.UI.MenuItem({
|
||||
caption: this.textInsertPageCount,
|
||||
disabled: this.mnuInsertPageCount.isDisabled()
|
||||
})
|
||||
]
|
||||
})
|
||||
);
|
||||
this.paragraphControls.push(this.mnuPageNumCurrentPos);
|
||||
this.paragraphControls.push(this.mnuInsertPageCount);
|
||||
|
||||
this.mnuZoomOut = new Common.UI.Button({
|
||||
el : $('#id-menu-zoom-out'),
|
||||
|
@ -1406,7 +1413,7 @@ define([
|
|||
/**/
|
||||
var mode = this.mode;
|
||||
var value = Common.localStorage.getItem("de-compact-toolbar");
|
||||
var valueCompact = (value !== null && parseInt(value) == 1);
|
||||
var valueCompact = !!(value !== null && parseInt(value) == 1 || value === null && this.mode.customization && this.mode.customization.compactToolbar);
|
||||
|
||||
value = Common.localStorage.getItem("de-hidden-title");
|
||||
var valueTitle = (value !== null && parseInt(value) == 1);
|
||||
|
@ -1510,6 +1517,8 @@ define([
|
|||
this.cmbFontName.setDisabled(true);
|
||||
this.cmbFontSize.setDisabled(true);
|
||||
this.listStyles.setDisabled(true);
|
||||
if (mode.disableDownload)
|
||||
this.btnPrint.setDisabled(true);
|
||||
}
|
||||
|
||||
this.mode = mode;
|
||||
|
@ -1834,8 +1843,8 @@ define([
|
|||
textHideTitleBar: 'Hide Title Bar',
|
||||
textHideStatusBar: 'Hide Status Bar',
|
||||
textHideLines: 'Hide Rulers',
|
||||
textFitPage: 'Fit Page',
|
||||
textFitWidth: 'Fit Width',
|
||||
textFitPage: 'Fit to Page',
|
||||
textFitWidth: 'Fit to Width',
|
||||
textZoom: 'Zoom',
|
||||
mniEditDropCap: 'Drop Cap Settings',
|
||||
textNone: 'None',
|
||||
|
@ -1900,7 +1909,8 @@ define([
|
|||
textRight: 'Right: ',
|
||||
textPageSizeCustom: 'Custom Page Size',
|
||||
textPortrait: 'Portrait',
|
||||
textLandscape: 'Landscape'
|
||||
textLandscape: 'Landscape',
|
||||
textInsertPageCount: 'Insert number of pages'
|
||||
|
||||
}, DE.Views.Toolbar || {}));
|
||||
});
|
||||
|
|
|
@ -31,6 +31,12 @@
|
|||
bottom: 42%;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
line-height: 10px;
|
||||
}
|
||||
|
||||
.loader-logo {
|
||||
max-height: 160px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.loader-page-romb {
|
||||
|
@ -175,6 +181,23 @@
|
|||
</head>
|
||||
<body>
|
||||
<script>
|
||||
var userAgent = navigator.userAgent.toLowerCase(),
|
||||
check = function(regex){ return regex.test(userAgent); },
|
||||
stopLoading = false;
|
||||
if (!check(/opera/) && (check(/msie/) || check(/trident/))) {
|
||||
var m = /msie (\d+\.\d+)/.exec(userAgent);
|
||||
if (m && parseFloat(m[1]) < 9.0) {
|
||||
document.write('<div class="app-error-panel">' +
|
||||
'<div class="message-block">' +
|
||||
'<div class="message-inner">' +
|
||||
'<div class="title">Your browser is not supported.</div>' +
|
||||
'<div class="text">Sorry, Document Editor is currently only supported in the latest versions of the Chrome, Firefox, Safari or Internet Explorer web browsers.</div>' +
|
||||
'</div>' +
|
||||
'</div></div>');
|
||||
stopLoading = true;
|
||||
}
|
||||
}
|
||||
|
||||
function getUrlParams() {
|
||||
var e,
|
||||
a = /\+/g, // Regex for replacing addition symbol with a space
|
||||
|
@ -201,8 +224,9 @@
|
|||
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...';
|
||||
|
||||
loading = 'Loading...',
|
||||
logo = params["logo"] ? ((params["logo"] !== 'none') ? ('<img src="' + encodeUrlParam(params["logo"]) + '" class="loader-logo" />') : '') : null;
|
||||
|
||||
if ( lang == 'de') loading = 'Ladevorgang...';
|
||||
else if ( lang == 'es') loading = 'Cargando...';
|
||||
else if ( lang == 'fr') loading = 'Chargement en cours...';
|
||||
|
@ -212,14 +236,17 @@
|
|||
else if ( lang == 'sl') loading = 'Nalaganje...';
|
||||
else if ( lang == 'tr') loading = 'Yükleniyor...';
|
||||
|
||||
if (!stopLoading)
|
||||
document.write(
|
||||
'<div id="loading-mask" class="loadmask">' +
|
||||
'<div class="loader-page" style="margin-bottom: ' + margin + 'px;">' +
|
||||
'<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" 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>' +
|
||||
|
@ -230,7 +257,7 @@
|
|||
|
||||
<!-- debug begin -->
|
||||
<script type="text/javascript">var less=less||{};less.env='development';</script>
|
||||
<script src="../../../vendor/less/dist/less-1.5.1.js" type="text/javascript"></script>
|
||||
<script src="../../../vendor/less/dist/less-2.7.1.js" type="text/javascript"></script>
|
||||
<!-- debug end -->
|
||||
|
||||
<script type="text/javascript" src="../../../vendor/jquery/jquery.min.js"></script>
|
||||
|
|
|
@ -30,6 +30,12 @@
|
|||
bottom: 42%;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
line-height: 10px;
|
||||
}
|
||||
|
||||
.loader-logo {
|
||||
max-height: 160px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.loader-page-romb {
|
||||
|
@ -175,6 +181,23 @@
|
|||
<body>
|
||||
|
||||
<script>
|
||||
var userAgent = navigator.userAgent.toLowerCase(),
|
||||
check = function(regex){ return regex.test(userAgent); },
|
||||
stopLoading = false;
|
||||
if (!check(/opera/) && (check(/msie/) || check(/trident/))) {
|
||||
var m = /msie (\d+\.\d+)/.exec(userAgent);
|
||||
if (m && parseFloat(m[1]) < 9.0) {
|
||||
document.write('<div class="app-error-panel">' +
|
||||
'<div class="message-block">' +
|
||||
'<div class="message-inner">' +
|
||||
'<div class="title">Your browser is not supported.</div>' +
|
||||
'<div class="text">Sorry, Document Editor is currently only supported in the latest versions of the Chrome, Firefox, Safari or Internet Explorer web browsers.</div>' +
|
||||
'</div>' +
|
||||
'</div></div>');
|
||||
stopLoading = true;
|
||||
}
|
||||
}
|
||||
|
||||
function getUrlParams() {
|
||||
var e,
|
||||
a = /\+/g, // Regex for replacing addition symbol with a space
|
||||
|
@ -201,7 +224,8 @@
|
|||
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...';
|
||||
loading = 'Loading...',
|
||||
logo = params["logo"] ? ((params["logo"] !== 'none') ? ('<img src="' + encodeUrlParam(params["logo"]) + '" class="loader-logo" />') : '') : null;
|
||||
|
||||
if ( lang == 'de') loading = 'Ladevorgang...';
|
||||
else if ( lang == 'es') loading = 'Cargando...';
|
||||
|
@ -212,14 +236,17 @@
|
|||
else if ( lang == 'sl') loading = 'Nalaganje...';
|
||||
else if ( lang == 'tr') loading = 'Yükleniyor...';
|
||||
|
||||
if (!stopLoading)
|
||||
document.write(
|
||||
'<div id="loading-mask" class="loadmask">' +
|
||||
'<div class="loader-page" style="margin-bottom: ' + margin + 'px;">' +
|
||||
'<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" 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>' +
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
"Common.Views.AdvancedSettingsWindow.okButtonText": "OK",
|
||||
"Common.Views.Chat.textSend": "Poslat",
|
||||
"Common.Views.Comments.textAdd": "Přidat",
|
||||
"Common.Views.Comments.textAddComment": "Přidat komentář",
|
||||
"Common.Views.Comments.textAddComment": "Přidat",
|
||||
"Common.Views.Comments.textAddCommentToDoc": "Přidat komentář k dokumentu",
|
||||
"Common.Views.Comments.textAddReply": "Přidat odpověď",
|
||||
"Common.Views.Comments.textAnonym": "Návštěvník",
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
"Common.Views.AdvancedSettingsWindow.okButtonText": "OK",
|
||||
"Common.Views.Chat.textSend": "Senden",
|
||||
"Common.Views.Comments.textAdd": "Hinzufügen",
|
||||
"Common.Views.Comments.textAddComment": "Kommentar hinzufügen",
|
||||
"Common.Views.Comments.textAddComment": "Hinzufügen",
|
||||
"Common.Views.Comments.textAddCommentToDoc": "Kommentar zum Dokument hinzufügen",
|
||||
"Common.Views.Comments.textAddReply": "Antwort hinzufügen",
|
||||
"Common.Views.Comments.textAnonym": "Gast",
|
||||
|
@ -210,7 +210,7 @@
|
|||
"DE.Controllers.Main.errorUpdateVersion": "Die Dateiversion wurde geändert. Die Seite wird neu geladen.",
|
||||
"DE.Controllers.Main.errorUserDrop": "Kein Zugriff auf diese Datei ist möglich.",
|
||||
"DE.Controllers.Main.errorUsersExceed": "Die nach dem Zahlungsplan erlaubte Anzahl der Benutzer ist überschritten",
|
||||
"DE.Controllers.Main.errorViewerDisconnect": "Connection is lost. You can still view the document,<br>but will not be able to download until the connection is restored.",
|
||||
"DE.Controllers.Main.errorViewerDisconnect": "Connection is lost. You can still view the document,<br>but will not be able to download or print until the connection is restored.",
|
||||
"DE.Controllers.Main.leavePageText": "Dieses Dokument enthält ungespeicherte Änderungen. Klicken Sie auf \"Auf dieser Seite bleiben\" und dann auf \"Speichern\", um sie zu speichern. Klicken Sie auf \"Diese Seite verlassen\", um alle nicht gespeicherten Änderungen zu verwerfen.\n",
|
||||
"DE.Controllers.Main.loadFontsTextText": "Daten werden geladen...",
|
||||
"DE.Controllers.Main.loadFontsTitleText": "Daten werden geladen",
|
||||
|
|
|
@ -142,7 +142,13 @@
|
|||
"Common.Views.Header.openNewTabText": "Open in New Tab",
|
||||
"Common.Views.Header.textBack": "Go to Documents",
|
||||
"Common.Views.Header.txtHeaderDeveloper": "DEVELOPER MODE",
|
||||
"Common.Views.History.textHistoryHeader": "Back to Document",
|
||||
"Common.Views.Header.txtRename": "Rename",
|
||||
"Common.Views.History.textCloseHistory": "Close History",
|
||||
"Common.Views.History.textHide": "Collapse",
|
||||
"Common.Views.History.textHideAll": "Hide detailed changes",
|
||||
"Common.Views.History.textRestore": "Restore",
|
||||
"Common.Views.History.textShow": "Expand",
|
||||
"Common.Views.History.textShowAll": "Show detailed changes",
|
||||
"Common.Views.ImageFromUrlDialog.cancelButtonText": "Cancel",
|
||||
"Common.Views.ImageFromUrlDialog.okButtonText": "OK",
|
||||
"Common.Views.ImageFromUrlDialog.textUrl": "Paste an image URL:",
|
||||
|
@ -166,6 +172,10 @@
|
|||
"Common.Views.Plugins.strPlugins": "Plugins",
|
||||
"Common.Views.Plugins.textLoading": "Loading",
|
||||
"Common.Views.Plugins.textStart": "Start",
|
||||
"Common.Views.RenameDialog.cancelButtonText": "Cancel",
|
||||
"Common.Views.RenameDialog.okButtonText": "Ok",
|
||||
"Common.Views.RenameDialog.textName": "File name",
|
||||
"Common.Views.RenameDialog.txtInvalidName": "The file name cannot contain any of the following characters: ",
|
||||
"Common.Views.ReviewChanges.txtAccept": "Accept",
|
||||
"Common.Views.ReviewChanges.txtAcceptAll": "Accept All Changes",
|
||||
"Common.Views.ReviewChanges.txtAcceptCurrent": "Accept Current Change",
|
||||
|
@ -186,7 +196,6 @@
|
|||
"DE.Controllers.LeftMenu.warnDownloadAs": "If you continue saving in this format all features except the text will be lost.<br>Are you sure you want to continue?",
|
||||
"DE.Controllers.Main.applyChangesTextText": "Loading the changes...",
|
||||
"DE.Controllers.Main.applyChangesTitleText": "Loading the Changes",
|
||||
"DE.Controllers.Main.convertationErrorText": "Conversion failed.",
|
||||
"DE.Controllers.Main.convertationTimeoutText": "Conversion timeout exceeded.",
|
||||
"DE.Controllers.Main.criticalErrorExtText": "Press \"OK\" to return to document list.",
|
||||
"DE.Controllers.Main.criticalErrorTitle": "Error",
|
||||
|
@ -211,7 +220,13 @@
|
|||
"DE.Controllers.Main.errorUpdateVersion": "The file version has been changed. The page will be reloaded.",
|
||||
"DE.Controllers.Main.errorUserDrop": "The file cannot be accessed right now.",
|
||||
"DE.Controllers.Main.errorUsersExceed": "The number of users allowed by the pricing plan was exceeded",
|
||||
"DE.Controllers.Main.errorViewerDisconnect": "Connection is lost. You can still view the document,<br>but will not be able to download until the connection is restored.",
|
||||
"DE.Controllers.Main.errorViewerDisconnect": "Connection is lost. You can still view the document,<br>but will not be able to download or print until the connection is restored.",
|
||||
"DE.Controllers.Main.errorToken": "The document security token is not correctly formed.<br>Please contact your Document Server administrator.",
|
||||
"DE.Controllers.Main.errorTokenExpire": "The document security token has expired.<br>Please contact your Document Server administrator.",
|
||||
"DE.Controllers.Main.errorSessionAbsolute": "The document editing session has expired. Please reload the page.",
|
||||
"DE.Controllers.Main.errorSessionIdle": "The document has not been edited for quite a long time. Please reload the page.",
|
||||
"DE.Controllers.Main.errorSessionToken": "The connection to the server has been interrupted. Please reload the page.",
|
||||
"DE.Controllers.Main.errorAccessDeny": "You are trying to perform an action you do not have rights for.<br>Please contact your Document Server administrator.",
|
||||
"DE.Controllers.Main.leavePageText": "You have unsaved changes in this document. Click \"Stay on This Page\", then \"Save\" to save them. Click \"Leave This Page\" to discard all the unsaved changes.",
|
||||
"DE.Controllers.Main.loadFontsTextText": "Loading data...",
|
||||
"DE.Controllers.Main.loadFontsTitleText": "Loading Data",
|
||||
|
@ -246,7 +261,7 @@
|
|||
"DE.Controllers.Main.splitMaxRowsErrorText": "The number of rows must be less than %1.",
|
||||
"DE.Controllers.Main.textAnonymous": "Anonymous",
|
||||
"DE.Controllers.Main.textBuyNow": "Visit website",
|
||||
"DE.Controllers.Main.textCloseTip": "\nClick to close the tip",
|
||||
"DE.Controllers.Main.textCloseTip": "Click to close the tip",
|
||||
"DE.Controllers.Main.textContactUs": "Contact sales",
|
||||
"DE.Controllers.Main.textLoadingDocument": "Loading document",
|
||||
"DE.Controllers.Main.textNoLicenseTitle": "ONLYOFFICE open source version",
|
||||
|
@ -860,6 +875,7 @@
|
|||
"DE.Views.DropcapSettingsAdvanced.tipFontName": "Font Name",
|
||||
"DE.Views.DropcapSettingsAdvanced.txtNoBorders": "No borders",
|
||||
"DE.Views.FileMenu.btnBackCaption": "Go to Documents",
|
||||
"DE.Views.FileMenu.btnCloseMenuCaption": "Close Menu",
|
||||
"DE.Views.FileMenu.btnCreateNewCaption": "Create New",
|
||||
"DE.Views.FileMenu.btnDownloadCaption": "Download as...",
|
||||
"DE.Views.FileMenu.btnHelpCaption": "Help...",
|
||||
|
@ -867,6 +883,7 @@
|
|||
"DE.Views.FileMenu.btnInfoCaption": "Document Info...",
|
||||
"DE.Views.FileMenu.btnPrintCaption": "Print",
|
||||
"DE.Views.FileMenu.btnRecentFilesCaption": "Open Recent...",
|
||||
"DE.Views.FileMenu.btnRenameCaption": "Rename...",
|
||||
"DE.Views.FileMenu.btnReturnCaption": "Back to Document",
|
||||
"DE.Views.FileMenu.btnRightsCaption": "Access Rights...",
|
||||
"DE.Views.FileMenu.btnSaveAsCaption": "Save as",
|
||||
|
@ -1434,6 +1451,7 @@
|
|||
"DE.Views.Toolbar.textHideTitleBar": "Hide Title Bar",
|
||||
"DE.Views.Toolbar.textInMargin": "In Margin",
|
||||
"DE.Views.Toolbar.textInsColumnBreak": "Insert Column Break",
|
||||
"DE.Views.Toolbar.textInsertPageCount": "Insert number of pages",
|
||||
"DE.Views.Toolbar.textInsertPageNumber": "Insert page number",
|
||||
"DE.Views.Toolbar.textInsPageBreak": "Insert Page Break",
|
||||
"DE.Views.Toolbar.textInsSectionBreak": "Insert Section Break",
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
"Common.Views.AdvancedSettingsWindow.okButtonText": "Aceptar",
|
||||
"Common.Views.Chat.textSend": "Enviar",
|
||||
"Common.Views.Comments.textAdd": "Añadir",
|
||||
"Common.Views.Comments.textAddComment": "Añadir comentario",
|
||||
"Common.Views.Comments.textAddComment": "Añadir",
|
||||
"Common.Views.Comments.textAddCommentToDoc": "Añadir comentario a documento",
|
||||
"Common.Views.Comments.textAddReply": "Añadir respuesta",
|
||||
"Common.Views.Comments.textAnonym": "Visitante",
|
||||
|
@ -210,7 +210,7 @@
|
|||
"DE.Controllers.Main.errorUpdateVersion": "Se ha cambiado la versión del archivo. La página será actualizada.",
|
||||
"DE.Controllers.Main.errorUserDrop": "No se puede acceder al archivo ahora.",
|
||||
"DE.Controllers.Main.errorUsersExceed": "El número de usuarios permitido según su plan de precios fue excedido",
|
||||
"DE.Controllers.Main.errorViewerDisconnect": "Connection is lost. You can still view the document,<br>but will not be able to download until the connection is restored.",
|
||||
"DE.Controllers.Main.errorViewerDisconnect": "Connection is lost. You can still view the document,<br>but will not be able to download or print until the connection is restored.",
|
||||
"DE.Controllers.Main.leavePageText": "Hay cambios no guardados en este documento. Haga clic en 'Permanecer en esta página', después 'Guardar' para guardarlos. Haga clic en 'Abandonar esta página' para descartar todos los cambios no guardados.",
|
||||
"DE.Controllers.Main.loadFontsTextText": "Cargando datos...",
|
||||
"DE.Controllers.Main.loadFontsTitleText": "Cargando datos",
|
||||
|
@ -245,7 +245,7 @@
|
|||
"DE.Controllers.Main.splitMaxRowsErrorText": "El número de filas debe ser menos que %1.",
|
||||
"DE.Controllers.Main.textAnonymous": "Anónimo",
|
||||
"DE.Controllers.Main.textBuyNow": "Visit website",
|
||||
"DE.Controllers.Main.textCloseTip": "\nPulse para cerrar el consejo",
|
||||
"DE.Controllers.Main.textCloseTip": "Pulse para cerrar el consejo",
|
||||
"DE.Controllers.Main.textContactUs": "Contact sales",
|
||||
"DE.Controllers.Main.textLoadingDocument": "Cargando documento",
|
||||
"DE.Controllers.Main.textNoLicenseTitle": "ONLYOFFICE open source version",
|
||||
|
|
|
@ -69,9 +69,9 @@
|
|||
"Common.UI.ComboDataView.emptyComboText": "Aucun style",
|
||||
"Common.UI.ExtendedColorDialog.addButtonText": "Ajouter",
|
||||
"Common.UI.ExtendedColorDialog.cancelButtonText": "Annuler",
|
||||
"Common.UI.ExtendedColorDialog.textCurrent": "Actuel",
|
||||
"Common.UI.ExtendedColorDialog.textCurrent": "Actuelle",
|
||||
"Common.UI.ExtendedColorDialog.textHexErr": "La valeur saisie est incorrecte. <br>Entrez une valeur de 000000 à FFFFFF.",
|
||||
"Common.UI.ExtendedColorDialog.textNew": "Nouveau",
|
||||
"Common.UI.ExtendedColorDialog.textNew": "Nouvelle",
|
||||
"Common.UI.ExtendedColorDialog.textRGBErr": "La valeur saisie est incorrecte. <br>Entrez une valeur numérique de 0 à 255.",
|
||||
"Common.UI.HSBColorPicker.textNoColor": "Pas de couleur",
|
||||
"Common.UI.SearchDialog.textHighlight": "Surligner les résultats",
|
||||
|
@ -112,8 +112,8 @@
|
|||
"Common.Views.AdvancedSettingsWindow.okButtonText": "OK",
|
||||
"Common.Views.Chat.textSend": "Envoyer",
|
||||
"Common.Views.Comments.textAdd": "Ajouter",
|
||||
"Common.Views.Comments.textAddComment": "Ajouter un commentaire",
|
||||
"Common.Views.Comments.textAddCommentToDoc": "Ajouter un commentaire au Document",
|
||||
"Common.Views.Comments.textAddComment": "Ajouter",
|
||||
"Common.Views.Comments.textAddCommentToDoc": "Ajouter un commentaire au document",
|
||||
"Common.Views.Comments.textAddReply": "Ajouter une réponse",
|
||||
"Common.Views.Comments.textAnonym": "Invité",
|
||||
"Common.Views.Comments.textCancel": "Annuler",
|
||||
|
@ -141,7 +141,14 @@
|
|||
"Common.Views.ExternalMergeEditor.textTitle": "Destinataires de fusion et publipostage",
|
||||
"Common.Views.Header.openNewTabText": "Ouvrir dans un nouvel onglet",
|
||||
"Common.Views.Header.textBack": "Aller aux Documents",
|
||||
"Common.Views.History.textHistoryHeader": "Retour au Document",
|
||||
"Common.Views.Header.txtHeaderDeveloper": "MODE DEVELOPPEUR",
|
||||
"Common.Views.Header.txtRename": "Renommer",
|
||||
"Common.Views.History.textCloseHistory": "Fermer l'historique",
|
||||
"Common.Views.History.textHide": "Réduire",
|
||||
"Common.Views.History.textHideAll": "Masquer les modifications détaillées",
|
||||
"Common.Views.History.textRestore": "Restaurer",
|
||||
"Common.Views.History.textShow": "Développer",
|
||||
"Common.Views.History.textShowAll": "Afficher les modifications détaillées",
|
||||
"Common.Views.ImageFromUrlDialog.cancelButtonText": "Annuler",
|
||||
"Common.Views.ImageFromUrlDialog.okButtonText": "OK",
|
||||
"Common.Views.ImageFromUrlDialog.textUrl": "Coller URL d'image",
|
||||
|
@ -158,13 +165,17 @@
|
|||
"Common.Views.OpenDialog.cancelButtonText": "Annuler",
|
||||
"Common.Views.OpenDialog.okButtonText": "OK",
|
||||
"Common.Views.OpenDialog.txtEncoding": "Codage ",
|
||||
"Common.Views.OpenDialog.txtPassword": "Password",
|
||||
"Common.Views.OpenDialog.txtPassword": "Mot de passe",
|
||||
"Common.Views.OpenDialog.txtTitle": "Choisir %1 des options ",
|
||||
"Common.Views.OpenDialog.txtTitleProtected": "Protected File",
|
||||
"Common.Views.PluginDlg.textLoading": "Loading",
|
||||
"Common.Views.OpenDialog.txtTitleProtected": "Fichier protégé",
|
||||
"Common.Views.PluginDlg.textLoading": "Chargement",
|
||||
"Common.Views.Plugins.strPlugins": "Plugins",
|
||||
"Common.Views.Plugins.textLoading": "Loading",
|
||||
"Common.Views.Plugins.textStart": "Start",
|
||||
"Common.Views.Plugins.textLoading": "Chargement",
|
||||
"Common.Views.Plugins.textStart": "Démarrer",
|
||||
"Common.Views.RenameDialog.cancelButtonText": "Annuler",
|
||||
"Common.Views.RenameDialog.okButtonText": "Ok",
|
||||
"Common.Views.RenameDialog.textName": "Nom de fichier",
|
||||
"Common.Views.RenameDialog.txtInvalidName": "Un nom de fichier ne peut pas contenir les caractères suivants :",
|
||||
"Common.Views.ReviewChanges.txtAccept": "Accepter",
|
||||
"Common.Views.ReviewChanges.txtAcceptAll": "Accepter toutes les modifications",
|
||||
"Common.Views.ReviewChanges.txtAcceptCurrent": "Accepter la modification actuelle",
|
||||
|
@ -185,7 +196,6 @@
|
|||
"DE.Controllers.LeftMenu.warnDownloadAs": "Si vous continuez à enregistrer dans ce format toutes les fonctions sauf le texte seront perdues.<br>Êtes-vous sûr de vouloir continuer ?",
|
||||
"DE.Controllers.Main.applyChangesTextText": "Chargement des changemets...",
|
||||
"DE.Controllers.Main.applyChangesTitleText": "Chargement des changemets",
|
||||
"DE.Controllers.Main.convertationErrorText": "Échec de la conversion.",
|
||||
"DE.Controllers.Main.convertationTimeoutText": "Expiration du délai de conversion.",
|
||||
"DE.Controllers.Main.criticalErrorExtText": "Cliquez sur \"OK\" pour revenir à la liste des documents.",
|
||||
"DE.Controllers.Main.criticalErrorTitle": "Erreur",
|
||||
|
@ -210,7 +220,7 @@
|
|||
"DE.Controllers.Main.errorUpdateVersion": "La version du fichier a été changée. La page sera rechargée.",
|
||||
"DE.Controllers.Main.errorUserDrop": "Impossible d'accéder au fichier",
|
||||
"DE.Controllers.Main.errorUsersExceed": "Le nombre d'utilisateurs autorisés par le plan tarifaire a été dépassé",
|
||||
"DE.Controllers.Main.errorViewerDisconnect": "Connection is lost. You can still view the document,<br>but will not be able to download until the connection is restored.",
|
||||
"DE.Controllers.Main.errorViewerDisconnect": "La connexion a été perdue. Vous pouvez toujours afficher le document,<br>mais ne pouvez pas le télécharger ou l'imprimer jusqu'à ce que la connexion soit rétablie.",
|
||||
"DE.Controllers.Main.leavePageText": "Vous avez des modifications non enregistrées dans ce document. Cliquez sur 'Rester sur cette page', ensuite sur 'Enregistrer' pour enregistrer les modifications. Cliquez sur 'Quitter cette page' pour annuler toutes les modifications non enregistrées.",
|
||||
"DE.Controllers.Main.loadFontsTextText": "Chargement des données...",
|
||||
"DE.Controllers.Main.loadFontsTitleText": "Chargement des données",
|
||||
|
@ -225,7 +235,7 @@
|
|||
"DE.Controllers.Main.mailMergeLoadFileText": "Chargement de la source des données...",
|
||||
"DE.Controllers.Main.mailMergeLoadFileTitle": "Chargement de la source des données",
|
||||
"DE.Controllers.Main.notcriticalErrorTitle": "Avertissement",
|
||||
"DE.Controllers.Main.openErrorText": "An error has occurred while opening the file",
|
||||
"DE.Controllers.Main.openErrorText": "Une erreur s’est produite lors de l’ouverture du fichier",
|
||||
"DE.Controllers.Main.openTextText": "Ouverture du document...",
|
||||
"DE.Controllers.Main.openTitleText": "Ouverture du document",
|
||||
"DE.Controllers.Main.printTextText": "Impression d'un document...",
|
||||
|
@ -233,7 +243,7 @@
|
|||
"DE.Controllers.Main.reloadButtonText": "Recharger la page",
|
||||
"DE.Controllers.Main.requestEditFailedMessageText": "Quelqu'un est en train de modifier ce document. Veuillez réessayer plus tard.",
|
||||
"DE.Controllers.Main.requestEditFailedTitleText": "Accès refusé",
|
||||
"DE.Controllers.Main.saveErrorText": "An error has occurred while saving the file",
|
||||
"DE.Controllers.Main.saveErrorText": "Une erreur s'est produite lors de l'enregistrement du fichier",
|
||||
"DE.Controllers.Main.savePreparingText": "Préparation à l'enregistrement ",
|
||||
"DE.Controllers.Main.savePreparingTitle": "Préparation à l'enregistrement en cours. Veuillez patienter...",
|
||||
"DE.Controllers.Main.saveTextText": "Enregistrement du document...",
|
||||
|
@ -244,14 +254,14 @@
|
|||
"DE.Controllers.Main.splitMaxColsErrorText": "Le nombre de colonnes doivent être inférieure à %1.",
|
||||
"DE.Controllers.Main.splitMaxRowsErrorText": "Le nombre de lignes doit être inférieure à %1.",
|
||||
"DE.Controllers.Main.textAnonymous": "Anonyme",
|
||||
"DE.Controllers.Main.textBuyNow": "Visit website",
|
||||
"DE.Controllers.Main.textBuyNow": "Visiter le site web",
|
||||
"DE.Controllers.Main.textCloseTip": "Cliquez pour fermer le conseil",
|
||||
"DE.Controllers.Main.textContactUs": "Contact sales",
|
||||
"DE.Controllers.Main.textContactUs": "Contacter l'équipe de ventes",
|
||||
"DE.Controllers.Main.textLoadingDocument": "Chargement du document",
|
||||
"DE.Controllers.Main.textNoLicenseTitle": "ONLYOFFICE open source version",
|
||||
"DE.Controllers.Main.textNoLicenseTitle": "La version open source de ONLYOFFICE",
|
||||
"DE.Controllers.Main.textStrict": "Mode strict",
|
||||
"DE.Controllers.Main.textTryUndoRedo": "Les fonctions annuler/rétablir sont désactivées pour le mode de co-édition rapide.<br>Cliquez sur le bouton \"Mode strict\" pour passer au mode de la co-édition stricte pour modifier le fichier sans interférence d'autres utilisateurs et envoyer vos modifications seulement après que vous les enregistrez. Vous pouvez basculer entre les modes de co-édition à l'aide de paramètres avancés d'éditeur.",
|
||||
"DE.Controllers.Main.titleLicenseExp": "License expired",
|
||||
"DE.Controllers.Main.titleLicenseExp": "Licence expirée",
|
||||
"DE.Controllers.Main.titleUpdateVersion": "Version a été modifiée",
|
||||
"DE.Controllers.Main.txtArt": "Votre texte ici",
|
||||
"DE.Controllers.Main.txtBasicShapes": "Formes de base",
|
||||
|
@ -279,8 +289,8 @@
|
|||
"DE.Controllers.Main.uploadImageTitleText": "Chargement d'une image",
|
||||
"DE.Controllers.Main.warnBrowserIE9": "L'application est peu compatible avec IE9. Utilisez IE10 ou version plus récente",
|
||||
"DE.Controllers.Main.warnBrowserZoom": "Le paramètre actuel de zoom de votre navigateur n'est pas accepté. Veuillez rétablir le niveau de zoom par défaut en appuyant sur Ctrl+0.",
|
||||
"DE.Controllers.Main.warnLicenseExp": "Your license has expired.<br>Please update your license and refresh the page.",
|
||||
"DE.Controllers.Main.warnNoLicense": "You are using an open source version of ONLYOFFICE. The version has limitations for concurrent connections to the document server (20 connections at a time).<br>If you need more please consider purchasing a commercial license.",
|
||||
"DE.Controllers.Main.warnLicenseExp": "Votre licence a expiré.<br>Veuillez mettre à jour votre licence et actualisez la page.",
|
||||
"DE.Controllers.Main.warnNoLicense": "Vous utilisez la version open source de ONLYOFFICE. La version a des limitations en connexions simultanées au serveur de documents (20 connexions à la fois).<br>Pour en avoir plus, veuillez envisager l'achat d'une licence commerciale.",
|
||||
"DE.Controllers.Main.warnProcessRightsChange": "Le droit d'édition du fichier vous a été refusé.",
|
||||
"DE.Controllers.Statusbar.textHasChanges": "Nouveaux changements ont été suivis",
|
||||
"DE.Controllers.Statusbar.textTrackChanges": "Le document est ouvert avec le mode Suivi des modifications activé",
|
||||
|
@ -750,7 +760,7 @@
|
|||
"DE.Views.DocumentHolder.txtDeleteArg": "Supprimer l'argument",
|
||||
"DE.Views.DocumentHolder.txtDeleteBreak": "Supprimer un saut manuel",
|
||||
"DE.Views.DocumentHolder.txtDeleteChars": "Supprimer caractères enserrant",
|
||||
"DE.Views.DocumentHolder.txtDeleteCharsAndSeparators": "Supprimer renfermant des caractères et des séparateurs",
|
||||
"DE.Views.DocumentHolder.txtDeleteCharsAndSeparators": "Supprimer caractères et séparateurs qui entourent",
|
||||
"DE.Views.DocumentHolder.txtDeleteEq": "Supprimer l'équation",
|
||||
"DE.Views.DocumentHolder.txtDeleteGroupChar": "Supprimer caractère d'imprimerie",
|
||||
"DE.Views.DocumentHolder.txtDeleteRadical": "Supprimer radical",
|
||||
|
@ -859,6 +869,7 @@
|
|||
"DE.Views.DropcapSettingsAdvanced.tipFontName": "Nom de la police",
|
||||
"DE.Views.DropcapSettingsAdvanced.txtNoBorders": "Pas de bordures",
|
||||
"DE.Views.FileMenu.btnBackCaption": "Aller aux Documents",
|
||||
"DE.Views.FileMenu.btnCloseMenuCaption": "Fermer le menu",
|
||||
"DE.Views.FileMenu.btnCreateNewCaption": "Créer un nouveau",
|
||||
"DE.Views.FileMenu.btnDownloadCaption": "Télécharger comme...",
|
||||
"DE.Views.FileMenu.btnHelpCaption": "Aide...",
|
||||
|
@ -866,6 +877,7 @@
|
|||
"DE.Views.FileMenu.btnInfoCaption": "Descriptif du document...",
|
||||
"DE.Views.FileMenu.btnPrintCaption": "Imprimer",
|
||||
"DE.Views.FileMenu.btnRecentFilesCaption": "Ouvrir récent...",
|
||||
"DE.Views.FileMenu.btnRenameCaption": "Renommer...",
|
||||
"DE.Views.FileMenu.btnReturnCaption": "Retour au Document",
|
||||
"DE.Views.FileMenu.btnRightsCaption": "Droits d'accès...",
|
||||
"DE.Views.FileMenu.btnSaveAsCaption": "Enregistrer sous",
|
||||
|
@ -920,8 +932,8 @@
|
|||
"DE.Views.FileMenuPanels.Settings.textMinute": "Chaque minute",
|
||||
"DE.Views.FileMenuPanels.Settings.txtAll": "Voir tout",
|
||||
"DE.Views.FileMenuPanels.Settings.txtCm": "Centimètre",
|
||||
"DE.Views.FileMenuPanels.Settings.txtFitPage": "Fit to Page",
|
||||
"DE.Views.FileMenuPanels.Settings.txtFitWidth": "Fit to Width",
|
||||
"DE.Views.FileMenuPanels.Settings.txtFitPage": "Ajuster à la page",
|
||||
"DE.Views.FileMenuPanels.Settings.txtFitWidth": "Ajuster à la largeur",
|
||||
"DE.Views.FileMenuPanels.Settings.txtInch": "Pouce",
|
||||
"DE.Views.FileMenuPanels.Settings.txtInput": "Entrée alternative",
|
||||
"DE.Views.FileMenuPanels.Settings.txtLast": "Voir le dernier",
|
||||
|
@ -956,8 +968,8 @@
|
|||
"DE.Views.HyperlinkSettingsDialog.txtEmpty": "Ce champ est obligatoire",
|
||||
"DE.Views.HyperlinkSettingsDialog.txtNotUrl": "Ce champ doit être une URL au format \"http://www.example.com\"",
|
||||
"DE.Views.ImageSettings.textAdvanced": "Afficher les paramètres avancés",
|
||||
"DE.Views.ImageSettings.textEdit": "Edit",
|
||||
"DE.Views.ImageSettings.textEditObject": "Edit Object",
|
||||
"DE.Views.ImageSettings.textEdit": "Modifier",
|
||||
"DE.Views.ImageSettings.textEditObject": "Modifier l'objet",
|
||||
"DE.Views.ImageSettings.textFromFile": "Depuis un fichier",
|
||||
"DE.Views.ImageSettings.textFromUrl": "D'une URL",
|
||||
"DE.Views.ImageSettings.textHeight": "Hauteur",
|
||||
|
@ -1385,7 +1397,7 @@
|
|||
"DE.Views.TableSettingsAdvanced.txtPt": "Point",
|
||||
"DE.Views.TextArtSettings.strColor": "Couleur",
|
||||
"DE.Views.TextArtSettings.strFill": "Remplissage",
|
||||
"DE.Views.TextArtSettings.strSize": "Size",
|
||||
"DE.Views.TextArtSettings.strSize": "Taille",
|
||||
"DE.Views.TextArtSettings.strStroke": "Trait",
|
||||
"DE.Views.TextArtSettings.strTransparency": "Opacité",
|
||||
"DE.Views.TextArtSettings.strType": "Type",
|
||||
|
@ -1433,6 +1445,7 @@
|
|||
"DE.Views.Toolbar.textHideTitleBar": "Masquer la barre de titres",
|
||||
"DE.Views.Toolbar.textInMargin": "Dans la Marge",
|
||||
"DE.Views.Toolbar.textInsColumnBreak": "Insérer une écart de colonne",
|
||||
"DE.Views.Toolbar.textInsertPageCount": "Insérer le nombre de pages",
|
||||
"DE.Views.Toolbar.textInsertPageNumber": "Insérer le numéro de page",
|
||||
"DE.Views.Toolbar.textInsPageBreak": "Insérer un saut de page",
|
||||
"DE.Views.Toolbar.textInsSectionBreak": "Insérer un saut de section",
|
||||
|
@ -1440,7 +1453,7 @@
|
|||
"DE.Views.Toolbar.textInsTextArt": "Insérer le texte Art",
|
||||
"DE.Views.Toolbar.textInText": "Dans le Texte",
|
||||
"DE.Views.Toolbar.textItalic": "Italique",
|
||||
"DE.Views.Toolbar.textLandscape": "Landscape",
|
||||
"DE.Views.Toolbar.textLandscape": "Paysage",
|
||||
"DE.Views.Toolbar.textLeft": "À gauche:",
|
||||
"DE.Views.Toolbar.textLine": "Graphique en ligne",
|
||||
"DE.Views.Toolbar.textMarginsLast": "Dernière mesure",
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
"Common.Views.AdvancedSettingsWindow.okButtonText": "OK",
|
||||
"Common.Views.Chat.textSend": "Enviar",
|
||||
"Common.Views.Comments.textAdd": "Adicionar",
|
||||
"Common.Views.Comments.textAddComment": "Adicionar comentário",
|
||||
"Common.Views.Comments.textAddComment": "Adicionar",
|
||||
"Common.Views.Comments.textAddCommentToDoc": "Adicionar comentário ao documento",
|
||||
"Common.Views.Comments.textAddReply": "Adicionar resposta",
|
||||
"Common.Views.Comments.textAnonym": "Visitante",
|
||||
|
@ -230,7 +230,7 @@
|
|||
"DE.Controllers.Main.splitMaxColsErrorText": "O número de colunas deve ser inferior a %1.",
|
||||
"DE.Controllers.Main.splitMaxRowsErrorText": "O número de linhas deve ser inferior a %1.",
|
||||
"DE.Controllers.Main.textAnonymous": "Anônimo",
|
||||
"DE.Controllers.Main.textCloseTip": "\nClique para fechar a dica",
|
||||
"DE.Controllers.Main.textCloseTip": "Clique para fechar a dica",
|
||||
"DE.Controllers.Main.textLoadingDocument": "Carregando documento",
|
||||
"DE.Controllers.Main.textStrict": "Strict mode",
|
||||
"DE.Controllers.Main.textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.<br>Click the 'Strict mode' button to switch to the Strict co-editing mode to edit the file without other users interference and send your changes only after you save them. You can switch between the co-editing modes using the editor Advanced settings.",
|
||||
|
|
|
@ -141,7 +141,14 @@
|
|||
"Common.Views.ExternalMergeEditor.textTitle": "Получатели слияния",
|
||||
"Common.Views.Header.openNewTabText": "Открыть в новой вкладке",
|
||||
"Common.Views.Header.textBack": "Перейти к Документам",
|
||||
"Common.Views.History.textHistoryHeader": "Вернуться к документу",
|
||||
"Common.Views.Header.txtHeaderDeveloper": "РЕЖИМ РАЗРАБОТЧИКА",
|
||||
"Common.Views.Header.txtRename": "Переименовать",
|
||||
"Common.Views.History.textCloseHistory": "Закрыть историю",
|
||||
"Common.Views.History.textHide": "Свернуть",
|
||||
"Common.Views.History.textHideAll": "Скрыть подробные изменения",
|
||||
"Common.Views.History.textRestore": "Восстановить",
|
||||
"Common.Views.History.textShow": "Развернуть",
|
||||
"Common.Views.History.textShowAll": "Показать подробные изменения",
|
||||
"Common.Views.ImageFromUrlDialog.cancelButtonText": "Отмена",
|
||||
"Common.Views.ImageFromUrlDialog.okButtonText": "OK",
|
||||
"Common.Views.ImageFromUrlDialog.textUrl": "Вставьте URL изображения:",
|
||||
|
@ -158,10 +165,17 @@
|
|||
"Common.Views.OpenDialog.cancelButtonText": "Отмена",
|
||||
"Common.Views.OpenDialog.okButtonText": "OK",
|
||||
"Common.Views.OpenDialog.txtEncoding": "Кодировка",
|
||||
"Common.Views.OpenDialog.txtPassword": "Пароль",
|
||||
"Common.Views.OpenDialog.txtTitle": "Выбрать параметры %1",
|
||||
"Common.Views.OpenDialog.txtTitleProtected": "Защищенный файл",
|
||||
"Common.Views.PluginDlg.textLoading": "Загрузка",
|
||||
"Common.Views.Plugins.strPlugins": "Дополнения",
|
||||
"Common.Views.Plugins.textLoading": "Загрузка",
|
||||
"Common.Views.Plugins.textStart": "Запустить",
|
||||
"Common.Views.RenameDialog.cancelButtonText": "Отмена",
|
||||
"Common.Views.RenameDialog.okButtonText": "Ok",
|
||||
"Common.Views.RenameDialog.textName": "Имя файла",
|
||||
"Common.Views.RenameDialog.txtInvalidName": "Имя файла не должно содержать следующих символов: ",
|
||||
"Common.Views.ReviewChanges.txtAccept": "Принять",
|
||||
"Common.Views.ReviewChanges.txtAcceptAll": "Принять все изменения",
|
||||
"Common.Views.ReviewChanges.txtAcceptCurrent": "Принять текущее изменение",
|
||||
|
@ -182,7 +196,6 @@
|
|||
"DE.Controllers.LeftMenu.warnDownloadAs": "Если Вы продолжите сохранение в этот формат, весь функционал, кроме текста, будет потерян.<br>Вы действительно хотите продолжить?",
|
||||
"DE.Controllers.Main.applyChangesTextText": "Загрузка изменений...",
|
||||
"DE.Controllers.Main.applyChangesTitleText": "Загрузка изменений",
|
||||
"DE.Controllers.Main.convertationErrorText": "Конвертация не удалась.",
|
||||
"DE.Controllers.Main.convertationTimeoutText": "Превышено время ожидания конвертации.",
|
||||
"DE.Controllers.Main.criticalErrorExtText": "Нажмите \"OK\", чтобы вернуться к списку документов.",
|
||||
"DE.Controllers.Main.criticalErrorTitle": "Ошибка",
|
||||
|
@ -207,7 +220,7 @@
|
|||
"DE.Controllers.Main.errorUpdateVersion": "Версия файла была изменена. Страница будет перезагружена.",
|
||||
"DE.Controllers.Main.errorUserDrop": "В настоящий момент файл недоступен.",
|
||||
"DE.Controllers.Main.errorUsersExceed": "Превышено количество пользователей, разрешенных согласно тарифному плану",
|
||||
"DE.Controllers.Main.errorViewerDisconnect": "Подключение прервано. Вы по-прежнему можете просматривать документ,<br>но не сможете скачать его до восстановления подключения.",
|
||||
"DE.Controllers.Main.errorViewerDisconnect": "Подключение прервано. Вы по-прежнему можете просматривать документ,<br>но не сможете скачать или напечатать его до восстановления подключения.",
|
||||
"DE.Controllers.Main.leavePageText": "Документ содержит несохраненные изменения. Чтобы сохранить их, нажмите \"Остаться на этой странице\", затем \"Сохранить\". Нажмите \"Покинуть эту страницу\", чтобы сбросить все несохраненные изменения.",
|
||||
"DE.Controllers.Main.loadFontsTextText": "Загрузка данных...",
|
||||
"DE.Controllers.Main.loadFontsTitleText": "Загрузка данных",
|
||||
|
@ -222,6 +235,7 @@
|
|||
"DE.Controllers.Main.mailMergeLoadFileText": "Загрузка источника данных...",
|
||||
"DE.Controllers.Main.mailMergeLoadFileTitle": "Загрузка источника данных",
|
||||
"DE.Controllers.Main.notcriticalErrorTitle": "Предупреждение",
|
||||
"DE.Controllers.Main.openErrorText": "При открытии файла произошла ошибка",
|
||||
"DE.Controllers.Main.openTextText": "Открытие документа...",
|
||||
"DE.Controllers.Main.openTitleText": "Открытие документа",
|
||||
"DE.Controllers.Main.printTextText": "Печать документа...",
|
||||
|
@ -229,6 +243,7 @@
|
|||
"DE.Controllers.Main.reloadButtonText": "Обновить страницу",
|
||||
"DE.Controllers.Main.requestEditFailedMessageText": "В настоящее время документ редактируется. Пожалуйста, попробуйте позже.",
|
||||
"DE.Controllers.Main.requestEditFailedTitleText": "Доступ запрещён",
|
||||
"DE.Controllers.Main.saveErrorText": "При сохранении файла произошла ошибка",
|
||||
"DE.Controllers.Main.savePreparingText": "Подготовка к сохранению",
|
||||
"DE.Controllers.Main.savePreparingTitle": "Подготовка к сохранению. Пожалуйста, подождите...",
|
||||
"DE.Controllers.Main.saveTextText": "Сохранение документа...",
|
||||
|
@ -240,12 +255,13 @@
|
|||
"DE.Controllers.Main.splitMaxRowsErrorText": "Число строк должно быть меньше, чем %1.",
|
||||
"DE.Controllers.Main.textAnonymous": "Аноним",
|
||||
"DE.Controllers.Main.textBuyNow": "Перейти на сайт",
|
||||
"DE.Controllers.Main.textCloseTip": "\nЩелкните, чтобы закрыть эту подсказку",
|
||||
"DE.Controllers.Main.textCloseTip": "Щелкните, чтобы закрыть эту подсказку",
|
||||
"DE.Controllers.Main.textContactUs": "Связаться с отделом продаж",
|
||||
"DE.Controllers.Main.textLoadingDocument": "Загрузка документа",
|
||||
"DE.Controllers.Main.textNoLicenseTitle": "Open source версия ONLYOFFICE",
|
||||
"DE.Controllers.Main.textStrict": "Строгий режим",
|
||||
"DE.Controllers.Main.textTryUndoRedo": "Функции отмены и повтора действий отключены в Быстром режиме совместного редактирования.<br>Нажмите на кнопку 'Строгий режим' для переключения в Строгий режим совместного редактирования, чтобы редактировать файл без вмешательства других пользователей и отправлять изменения только после того, как вы их сохраните. Переключаться между режимами совместного редактирования можно с помощью Дополнительных параметров редактора.",
|
||||
"DE.Controllers.Main.titleLicenseExp": "Истек срок действия лицензии",
|
||||
"DE.Controllers.Main.titleUpdateVersion": "Версия изменилась",
|
||||
"DE.Controllers.Main.txtArt": "Введите ваш текст",
|
||||
"DE.Controllers.Main.txtBasicShapes": "Основные фигуры",
|
||||
|
@ -273,6 +289,7 @@
|
|||
"DE.Controllers.Main.uploadImageTitleText": "Загрузка изображения",
|
||||
"DE.Controllers.Main.warnBrowserIE9": "В IE9 приложение имеет низкую производительность. Используйте IE10 или более позднюю версию.",
|
||||
"DE.Controllers.Main.warnBrowserZoom": "Текущее значение масштаба страницы в браузере поддерживается не полностью. Вернитесь к масштабу по умолчанию, нажав Ctrl+0.",
|
||||
"DE.Controllers.Main.warnLicenseExp": "Истек срок действия лицензии.<br>Обновите лицензию, а затем обновите страницу.",
|
||||
"DE.Controllers.Main.warnNoLicense": "Вы используете open source версию ONLYOFFICE. Эта версия имеет ограничения по количеству одновременных подключений к серверу документов (20 подключений одновременно).<br>Если требуется больше, рассмотрите вопрос о покупке коммерческой лицензии.",
|
||||
"DE.Controllers.Main.warnProcessRightsChange": "Вам было отказано в праве на редактирование этого файла.",
|
||||
"DE.Controllers.Statusbar.textHasChanges": "Отслежены новые изменения",
|
||||
|
@ -852,6 +869,7 @@
|
|||
"DE.Views.DropcapSettingsAdvanced.tipFontName": "Название шрифта",
|
||||
"DE.Views.DropcapSettingsAdvanced.txtNoBorders": "Без границ",
|
||||
"DE.Views.FileMenu.btnBackCaption": "Перейти к Документам",
|
||||
"DE.Views.FileMenu.btnCloseMenuCaption": "Закрыть меню",
|
||||
"DE.Views.FileMenu.btnCreateNewCaption": "Создать новый",
|
||||
"DE.Views.FileMenu.btnDownloadCaption": "Скачать как...",
|
||||
"DE.Views.FileMenu.btnHelpCaption": "Справка...",
|
||||
|
@ -859,6 +877,7 @@
|
|||
"DE.Views.FileMenu.btnInfoCaption": "Сведения о документе...",
|
||||
"DE.Views.FileMenu.btnPrintCaption": "Печать",
|
||||
"DE.Views.FileMenu.btnRecentFilesCaption": "Открыть последние...",
|
||||
"DE.Views.FileMenu.btnRenameCaption": "Переименовать...",
|
||||
"DE.Views.FileMenu.btnReturnCaption": "Вернуться к документу",
|
||||
"DE.Views.FileMenu.btnRightsCaption": "Права доступа...",
|
||||
"DE.Views.FileMenu.btnSaveAsCaption": "Сохранить как",
|
||||
|
@ -913,6 +932,8 @@
|
|||
"DE.Views.FileMenuPanels.Settings.textMinute": "Каждую минуту",
|
||||
"DE.Views.FileMenuPanels.Settings.txtAll": "Все",
|
||||
"DE.Views.FileMenuPanels.Settings.txtCm": "Сантиметр",
|
||||
"DE.Views.FileMenuPanels.Settings.txtFitPage": "По размеру страницы",
|
||||
"DE.Views.FileMenuPanels.Settings.txtFitWidth": "По ширине",
|
||||
"DE.Views.FileMenuPanels.Settings.txtInch": "Дюйм",
|
||||
"DE.Views.FileMenuPanels.Settings.txtInput": "Альтернативный ввод",
|
||||
"DE.Views.FileMenuPanels.Settings.txtLast": "Последние",
|
||||
|
@ -1424,6 +1445,7 @@
|
|||
"DE.Views.Toolbar.textHideTitleBar": "Скрыть строку заголовка",
|
||||
"DE.Views.Toolbar.textInMargin": "На поле",
|
||||
"DE.Views.Toolbar.textInsColumnBreak": "Вставить разрыв колонки",
|
||||
"DE.Views.Toolbar.textInsertPageCount": "Вставить число страниц",
|
||||
"DE.Views.Toolbar.textInsertPageNumber": "Вставить номер страницы",
|
||||
"DE.Views.Toolbar.textInsPageBreak": "Вставить разрыв страницы",
|
||||
"DE.Views.Toolbar.textInsSectionBreak": "Вставить разрыв раздела",
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
"Common.Views.AdvancedSettingsWindow.okButtonText": "OK",
|
||||
"Common.Views.Chat.textSend": "Pošlji",
|
||||
"Common.Views.Comments.textAdd": "Dodaj",
|
||||
"Common.Views.Comments.textAddComment": "Dodaj komentar",
|
||||
"Common.Views.Comments.textAddComment": "Dodaj",
|
||||
"Common.Views.Comments.textAddCommentToDoc": "K dokumentu dodaj komentar",
|
||||
"Common.Views.Comments.textAddReply": "Dodaj odgovor",
|
||||
"Common.Views.Comments.textAnonym": "Gost",
|
||||
|
@ -230,7 +230,7 @@
|
|||
"DE.Controllers.Main.splitMaxColsErrorText": "Število stolpcev mora biti manj kot 1%.",
|
||||
"DE.Controllers.Main.splitMaxRowsErrorText": "Število vrstic mora biti manj kot %1.",
|
||||
"DE.Controllers.Main.textAnonymous": "Anonimno",
|
||||
"DE.Controllers.Main.textCloseTip": "\nPritisni za zapiranje namiga",
|
||||
"DE.Controllers.Main.textCloseTip": "Pritisni za zapiranje namiga",
|
||||
"DE.Controllers.Main.textLoadingDocument": "Nalaganje dokumenta",
|
||||
"DE.Controllers.Main.textStrict": "Strict mode",
|
||||
"DE.Controllers.Main.textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.<br>Click the 'Strict mode' button to switch to the Strict co-editing mode to edit the file without other users interference and send your changes only after you save them. You can switch between the co-editing modes using the editor Advanced settings.",
|
||||
|
|
|
@ -230,7 +230,7 @@
|
|||
"DE.Controllers.Main.splitMaxColsErrorText": "Sütun sayısı %1'den az olmalıdır.",
|
||||
"DE.Controllers.Main.splitMaxRowsErrorText": "Satır sayısı %1'den az olmalıdır.",
|
||||
"DE.Controllers.Main.textAnonymous": "Anonim",
|
||||
"DE.Controllers.Main.textCloseTip": "\nUcu kapamak için tıklayın",
|
||||
"DE.Controllers.Main.textCloseTip": "Ucu kapamak için tıklayın",
|
||||
"DE.Controllers.Main.textLoadingDocument": "Döküman yükleniyor",
|
||||
"DE.Controllers.Main.textStrict": "Strict mode",
|
||||
"DE.Controllers.Main.textTryUndoRedo": "The Undo/Redo functions are disabled for the Fast co-editing mode.<br>Click the 'Strict mode' button to switch to the Strict co-editing mode to edit the file without other users interference and send your changes only after you save them. You can switch between the co-editing modes using the editor Advanced settings.",
|
||||
|
|
|
@ -194,14 +194,14 @@
|
|||
.btn-edit-table {background-position: 0 0;}
|
||||
button.over .btn-edit-table {background-position: -28px 0;}
|
||||
.btn-group.open .btn-edit-table,
|
||||
button.active .btn-edit-table,
|
||||
button:active .btn-edit-table {background-position: -56px 0;}
|
||||
button.active:not(.disabled) .btn-edit-table,
|
||||
button:active:not(.disabled) .btn-edit-table {background-position: -56px 0;}
|
||||
|
||||
.btn-change-shape {background-position: 0 -16px;}
|
||||
button.over .btn-change-shape {background-position: -28px -16px;}
|
||||
.btn-group.open .btn-change-shape,
|
||||
button.active .btn-change-shape,
|
||||
button:active .btn-change-shape {background-position: -56px -16px;}
|
||||
button.active:not(.disabled) .btn-change-shape,
|
||||
button:active:not(.disabled) .btn-change-shape {background-position: -56px -16px;}
|
||||
|
||||
.combo-pattern-item {
|
||||
.background-ximage('@{app-image-path}/right-panels/patterns.png', '@{app-image-path}/right-panels/patterns@2x.png', 112px);
|
||||
|
|
|
@ -58,6 +58,9 @@
|
|||
white-space: nowrap;
|
||||
padding-top: 3px;
|
||||
vertical-align: top;
|
||||
&.dropup {
|
||||
position: static;
|
||||
}
|
||||
}
|
||||
|
||||
.separator {
|
||||
|
@ -169,7 +172,7 @@
|
|||
font-size: 12px;
|
||||
|
||||
> label {
|
||||
white-space: initial;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
#status-users-list {
|
||||
|
|
|
@ -104,13 +104,13 @@ Ext.define('DE.controller.Main', {
|
|||
},
|
||||
|
||||
loadDocument: function(data) {
|
||||
this.permissions = {};
|
||||
|
||||
if ( data.doc ) {
|
||||
this.permissions = data.doc.permissions;
|
||||
|
||||
var _user = new Asc.asc_CUserInfo();
|
||||
_user.put_Id(this.editorConfig.user.id);
|
||||
_user.put_FirstName(this.editorConfig.user.firstname);
|
||||
_user.put_LastName(this.editorConfig.user.lastname);
|
||||
_user.put_FullName(this.editorConfig.user.fullname);
|
||||
|
||||
var docInfo = new Asc.asc_CDocInfo();
|
||||
|
@ -373,11 +373,16 @@ Ext.define('DE.controller.Main', {
|
|||
_fillUserInfo: function(info, lang, defname) {
|
||||
var _user = info || {};
|
||||
!_user.id && (_user.id = ('uid-' + Date.now()));
|
||||
_.isEmpty(_user.firstname) && _.isEmpty(_user.lastname)
|
||||
&& (_user.firstname = defname);
|
||||
|
||||
_user.fullname = /^ru/.test(lang) ?
|
||||
_user.lastname + ' ' + _user.firstname : _user.firstname + ' ' + _user.lastname;
|
||||
if (_.isEmpty(_user.name)) {
|
||||
_.isEmpty(_user.firstname) && _.isEmpty(_user.lastname) && (_user.firstname = defname);
|
||||
if (_.isEmpty(_user.firstname))
|
||||
_user.fullname = _user.lastname;
|
||||
else if (_.isEmpty(_user.lastname))
|
||||
_user.fullname = _user.firstname;
|
||||
else
|
||||
_user.fullname = /^ru/.test(lang) ? _user.lastname + ' ' + _user.firstname : _user.firstname + ' ' + _user.lastname;
|
||||
} else
|
||||
_user.fullname = _user.name;
|
||||
|
||||
return _user;
|
||||
},
|
||||
|
|
|
@ -27,6 +27,12 @@
|
|||
bottom: 42%;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
line-height: 10px;
|
||||
}
|
||||
|
||||
.loader-logo {
|
||||
max-height: 160px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.loader-page-romb {
|
||||
|
@ -255,7 +261,8 @@
|
|||
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...';
|
||||
loading = 'Loading...',
|
||||
logo = params["logo"] ? ((params["logo"] !== 'none') ? ('<img src="' + encodeUrlParam(params["logo"]) + '" class="loader-logo" />') : '') : null;
|
||||
|
||||
if ( lang == 'de') loading = 'Ladevorgang...';
|
||||
else if ( lang == 'es') loading = 'Cargando...';
|
||||
|
@ -268,12 +275,14 @@
|
|||
|
||||
document.write(
|
||||
'<div id="loading-mask" class="loadmask">' +
|
||||
'<div class="loader-page" style="margin-bottom: ' + margin + 'px;">' +
|
||||
'<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" 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>' +
|
||||
|
|
|
@ -27,6 +27,12 @@
|
|||
bottom: 42%;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
line-height: 10px;
|
||||
}
|
||||
|
||||
.loader-logo {
|
||||
max-height: 160px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.loader-page-romb {
|
||||
|
@ -246,7 +252,8 @@
|
|||
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...';
|
||||
loading = 'Loading...',
|
||||
logo = params["logo"] ? ((params["logo"] !== 'none') ? ('<img src="' + encodeUrlParam(params["logo"]) + '" class="loader-logo" />') : '') : null;
|
||||
|
||||
if ( lang == 'de') loading = 'Ladevorgang...';
|
||||
else if ( lang == 'es') loading = 'Cargando...';
|
||||
|
@ -259,12 +266,14 @@
|
|||
|
||||
document.write(
|
||||
'<div id="loading-mask" class="loadmask">' +
|
||||
'<div class="loader-page" style="margin-bottom: ' + margin + 'px;">' +
|
||||
'<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" 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>' +
|
||||
|
|
|
@ -32,6 +32,12 @@
|
|||
bottom: 42%;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
line-height: 10px;
|
||||
}
|
||||
|
||||
.loader-logo {
|
||||
max-height: 160px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.loader-page-romb {
|
||||
|
@ -175,7 +181,7 @@
|
|||
</style>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
|
@ -186,12 +192,23 @@
|
|||
<script src="../../../vendor/less/dist/less-1.5.1.js" type="text/javascript"></script>
|
||||
<!-- debug end -->
|
||||
|
||||
<!--facebook button-->
|
||||
<div id="fb-root"></div>
|
||||
|
||||
<!--twitter button-->
|
||||
|
||||
<script>
|
||||
var userAgent = navigator.userAgent.toLowerCase(),
|
||||
check = function(regex){ return regex.test(userAgent); };
|
||||
if (!check(/opera/) && (check(/msie/) || check(/trident/))) {
|
||||
var m = /msie (\d+\.\d+)/.exec(userAgent);
|
||||
if (m && parseFloat(m[1]) < 9.0) {
|
||||
document.write(
|
||||
'<div id="id-error-mask" class="errormask">',
|
||||
'<div class="error-body" align="center">',
|
||||
'<div id="id-error-mask-title" class="title">Your browser is not supported.</div>',
|
||||
'<div id="id-error-mask-text">Sorry, ONLYOFFICE Document is currently only supported in the latest versions of the Chrome, Firefox, Safari or Internet Explorer web browsers.</div>',
|
||||
'</div>',
|
||||
'</div>'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function getUrlParams() {
|
||||
var e,
|
||||
a = /\+/g, // Regex for replacing addition symbol with a space
|
||||
|
@ -218,7 +235,8 @@
|
|||
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...';
|
||||
loading = 'Loading...',
|
||||
logo = params["logo"] ? ((params["logo"] !== 'none') ? ('<img src="' + encodeUrlParam(params["logo"]) + '" class="loader-logo" />') : '') : null;
|
||||
|
||||
if ( lang == 'de') loading = 'Ladevorgang...';
|
||||
else if ( lang == 'es') loading = 'Cargando...';
|
||||
|
@ -231,41 +249,47 @@
|
|||
|
||||
document.write(
|
||||
'<div id="loading-mask" class="loadmask">' +
|
||||
'<div class="loader-page" style="margin-bottom: ' + margin + 'px;">' +
|
||||
'<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" 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>
|
||||
|
||||
<div id="editor_sdk" class="viewer" style="overflow: hidden;"></div>
|
||||
<div id="box-preview">
|
||||
<div id="id-preview" tabindex="-1"></div>
|
||||
</div>
|
||||
<div id="editor_sdk" class="viewer" style="overflow: hidden;" tabindex="-1"></div>
|
||||
|
||||
<div class="overlay-controls" style="margin-left: -32px">
|
||||
<ul class="left">
|
||||
<li id="id-btn-move-left"><button class="overlay"><i class="overlay-icon-move-left"></i></button></li>
|
||||
<li id="id-btn-move-right"><button class="overlay"><i class="overlay-icon-move-right"></i></button></li>
|
||||
<li id="btn-left"><button class="overlay svg-icon slide-prev"></button></li>
|
||||
<li id="btn-play"><button class="overlay svg-icon play"></button></li>
|
||||
<li id="btn-right"><button class="overlay svg-icon slide-next"></button></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="toolbar" id="toolbar">
|
||||
<ul class="left">
|
||||
<li><a id="header-logo" class="brand-logo" href="http://www.onlyoffice.com/" target="_blank"></a></li>
|
||||
<li class="separator"></li>
|
||||
<li id="id-btn-copy"><button class="control-btn"><i class="control-icon-save"></i><span>Save Copy</span></button></li>
|
||||
<li id="id-btn-share"><button class="control-btn"><i class="control-icon-share"></i><span>Share</span></button></li>
|
||||
<li id="id-btn-embed"><button class="control-btn"><i class="control-icon-embed"></i><span>Embed</span></button></li>
|
||||
</ul>
|
||||
<ul class="right">
|
||||
<li><input id="page-number" class="form-control input-sm" style="width: 25px;" type="text" value="0"><span class="text" id="pages">of 0</span></li>
|
||||
<li class="separator"></li>
|
||||
<li><button id="id-btn-fullscreen" class="control-btn no-caption"><i class="control-icon-fullscreen"></i></button></li>
|
||||
<li><button id="id-btn-close" class="control-btn no-caption"><i class="control-icon-close"></i></button></li>
|
||||
</ul>
|
||||
<div class="group left">
|
||||
<div id="box-tools" class="dropdown">
|
||||
<button class="control-btn svg-icon tools"></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group center">
|
||||
<span><a id="header-logo" class="brand-logo" href="http://www.onlyoffice.com/" target="_blank"></a></span>
|
||||
</div>
|
||||
<div class="group right">
|
||||
<div class="item"><input id="page-number" class="form-control input-xs masked" type="text" value="0"><span class="text" id="pages" tabindex="-1">of 0</span></div>
|
||||
<div class="item separator"></div>
|
||||
<div class="item"><button id="id-btn-close" class="control-btn close"><span aria-hidden="true">×</span></button></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="error modal fade" id="id-critical-error-dialog" tabindex="-1" role="dialog">
|
||||
|
@ -289,11 +313,12 @@
|
|||
<div class="cmd-loader-title">Please wait...</div>
|
||||
</div>
|
||||
|
||||
<div class="hyperlink-tooltip" data-toggle="tooltip" title="Press Ctrl and click the link" style="display:none;"></div>
|
||||
|
||||
<!--vendor-->
|
||||
<script type="text/javascript" src="../../../vendor/jquery/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/jquery.browser/dist/jquery.browser.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/bootstrap/dist/js/bootstrap.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/ZeroClipboard/ZeroClipboard.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/sockjs/sockjs.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/xregexp/xregexp-all-min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/jszip/jszip.min.js"></script>
|
||||
|
@ -310,6 +335,9 @@
|
|||
<!--application-->
|
||||
<script type="text/javascript" src="../../common/Gateway.js"></script>
|
||||
<script type="text/javascript" src="../../common/Analytics.js"></script>
|
||||
<script type="text/javascript" src="../../common/embed/lib/util/utils.js"></script>
|
||||
<script type="text/javascript" src="../../common/embed/lib/view/modals.js"></script>
|
||||
<script type="text/javascript" src="../../common/embed/lib/controller/modals.js"></script>
|
||||
<script type="text/javascript" src="js/ApplicationView.js"></script>
|
||||
<script type="text/javascript" src="js/ApplicationController.js"></script>
|
||||
<script type="text/javascript" src="js/application.js"></script>
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<link href="../../../apps/presentationeditor/embed/resources/css/app-all.css" rel="stylesheet">
|
||||
|
||||
<!-- splash -->
|
||||
|
||||
<style type="text/css">
|
||||
|
@ -28,6 +30,12 @@
|
|||
bottom: 42%;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
line-height: 10px;
|
||||
}
|
||||
|
||||
.loader-logo {
|
||||
max-height: 160px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.loader-page-romb {
|
||||
|
@ -171,18 +179,29 @@
|
|||
</style>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
<body class="embed-body">
|
||||
|
||||
<!--facebook button-->
|
||||
<div id="fb-root"></div>
|
||||
|
||||
<!--twitter button-->
|
||||
|
||||
<script>
|
||||
var userAgent = navigator.userAgent.toLowerCase(),
|
||||
check = function(regex){ return regex.test(userAgent); };
|
||||
if (!check(/opera/) && (check(/msie/) || check(/trident/))) {
|
||||
var m = /msie (\d+\.\d+)/.exec(userAgent);
|
||||
if (m && parseFloat(m[1]) < 9.0) {
|
||||
document.write(
|
||||
'<div id="id-error-mask" class="errormask">',
|
||||
'<div class="error-body" align="center">',
|
||||
'<div id="id-error-mask-title" class="title">Your browser is not supported.</div>',
|
||||
'<div id="id-error-mask-text">Sorry, ONLYOFFICE Document is currently only supported in the latest versions of the Chrome, Firefox, Safari or Internet Explorer web browsers.</div>',
|
||||
'</div>',
|
||||
'</div>'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function getUrlParams() {
|
||||
var e,
|
||||
a = /\+/g, // Regex for replacing addition symbol with a space
|
||||
|
@ -209,7 +228,8 @@
|
|||
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...';
|
||||
loading = 'Loading...',
|
||||
logo = params["logo"] ? ((params["logo"] !== 'none') ? ('<img src="' + encodeUrlParam(params["logo"]) + '" class="loader-logo" />') : '') : null;
|
||||
|
||||
if ( lang == 'de') loading = 'Ladevorgang...';
|
||||
else if ( lang == 'es') loading = 'Cargando...';
|
||||
|
@ -222,41 +242,47 @@
|
|||
|
||||
document.write(
|
||||
'<div id="loading-mask" class="loadmask">' +
|
||||
'<div class="loader-page" style="margin-bottom: ' + margin + 'px;">' +
|
||||
'<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" 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>
|
||||
|
||||
<div id="editor_sdk" class="viewer" style="overflow: hidden;"></div>
|
||||
<div id="box-preview">
|
||||
<div id="id-preview" tabindex="-1"></div>
|
||||
</div>
|
||||
<div id="editor_sdk" class="viewer" style="overflow: hidden;" tabindex="-1"></div>
|
||||
|
||||
<div class="overlay-controls" style="margin-left: -32px">
|
||||
<ul class="left">
|
||||
<li id="id-btn-move-left"><button class="overlay"><i class="overlay-icon-move-left"></i></button></li>
|
||||
<li id="id-btn-move-right"><button class="overlay"><i class="overlay-icon-move-right"></i></button></li>
|
||||
<li id="btn-left"><button class="overlay svg-icon slide-prev"></button></li>
|
||||
<li id="btn-play"><button class="overlay svg-icon play"></button></li>
|
||||
<li id="btn-right"><button class="overlay svg-icon slide-next"></button></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="toolbar" id="toolbar">
|
||||
<ul class="left">
|
||||
<li><a id="header-logo" class="brand-logo" href="http://www.onlyoffice.com/" target="_blank"></a></li>
|
||||
<li class="separator"></li>
|
||||
<li id="id-btn-copy"><button class="control-btn"><i class="control-icon-save"></i><span>Save Copy</span></button></li>
|
||||
<li id="id-btn-share"><button class="control-btn"><i class="control-icon-share"></i><span>Share</span></button></li>
|
||||
<li id="id-btn-embed"><button class="control-btn"><i class="control-icon-embed"></i><span>Embed</span></button></li>
|
||||
</ul>
|
||||
<ul class="right">
|
||||
<li><input id="page-number" class="form-control input-sm" style="width: 25px;" type="text" value="0"><span class="text" id="pages">of 0</span></li>
|
||||
<li class="separator"></li>
|
||||
<li><button id="id-btn-fullscreen" class="control-btn no-caption"><i class="control-icon-fullscreen"></i></button></li>
|
||||
<li><button id="id-btn-close" class="control-btn no-caption"><i class="control-icon-close"></i></button></li>
|
||||
</ul>
|
||||
<div class="group left">
|
||||
<div id="box-tools" class="dropdown">
|
||||
<button class="control-btn svg-icon tools"></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group center">
|
||||
<span><a id="header-logo" class="brand-logo" href="http://www.onlyoffice.com/" target="_blank"></a></span>
|
||||
</div>
|
||||
<div class="group right">
|
||||
<div class="item"><input id="page-number" class="form-control input-xs masked" type="text" value="0"><span class="text" id="pages" tabindex="-1">of 0</span></div>
|
||||
<div class="item separator"></div>
|
||||
<div class="item"><button id="id-btn-close" class="control-btn close"><span aria-hidden="true">×</span></button></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="error modal fade" id="id-critical-error-dialog" tabindex="-1" role="dialog">
|
||||
|
@ -280,11 +306,12 @@
|
|||
<div class="cmd-loader-title">Please wait...</div>
|
||||
</div>
|
||||
|
||||
<div class="hyperlink-tooltip" data-toggle="tooltip" title="Press Ctrl and click the link" style="display:none;"></div>
|
||||
|
||||
<!--vendor-->
|
||||
<script type="text/javascript" src="../../../vendor/jquery/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/jquery/jquery.browser.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/ZeroClipboard/ZeroClipboard.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/sockjs/sockjs.min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/xregexp/xregexp-all-min.js"></script>
|
||||
<script type="text/javascript" src="../../../vendor/jszip/jszip.min.js"></script>
|
||||
|
@ -296,7 +323,6 @@
|
|||
<script type="text/javascript" src="../../../../sdkjs/slide/sdk-all-min.js"></script>
|
||||
|
||||
<!--application-->
|
||||
<link href="../../../apps/presentationeditor/embed/resources/css/app-all.css" rel="stylesheet">
|
||||
<script type="text/javascript" src="../../../apps/presentationeditor/embed/app-all.js"></script>
|
||||
<script type="text/javascript">
|
||||
var isBrowserSupported = function() {
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<link href="resources/css/application.css" rel="stylesheet">
|
||||
|
||||
<!-- splash -->
|
||||
|
||||
<style type="text/css">
|
||||
|
@ -40,46 +42,45 @@
|
|||
<link href="../../../3rdparty/bootstrap/css/bootstrap.css" rel="stylesheet">
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
<body class="embed-body">
|
||||
|
||||
<!--facebook button-->
|
||||
<div id="fb-root"></div>
|
||||
|
||||
<!--twitter button-->
|
||||
|
||||
<div id="loading-mask" class="loadmask">
|
||||
<div class="loadmask-body" align="center">
|
||||
<div class="loadmask-logo"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="editor_sdk" class="viewer" style="overflow: hidden;"></div>
|
||||
<div id="box-preview">
|
||||
<div id="id-preview" tabindex="-1"></div>
|
||||
</div>
|
||||
<div id="editor_sdk" class="viewer" style="overflow: hidden;" tabindex="-1"></div>
|
||||
|
||||
<div class="overlay-controls" style="margin-left: -32px">
|
||||
<ul class="left" style="width: 90px;">
|
||||
<li id="id-btn-move-left"><button class="overlay"><i class="overlay-icon-move-left"></i></button></li>
|
||||
<li id="id-btn-move-right"><button class="overlay"><i class="overlay-icon-move-right"></i></button></li>
|
||||
<li id="btn-left"><button class="overlay svg-icon slide-prev"></button></li>
|
||||
<li id="btn-play"><button class="overlay svg-icon play"></button></li>
|
||||
<li id="btn-right"><button class="overlay svg-icon slide-next"></button></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="toolbar" id="toolbar">
|
||||
<ul class="left">
|
||||
<li><a class="brand-logo" href="http://www.onlyoffice.com/" target="_blank"></a></li>
|
||||
<li class="separator"></li>
|
||||
<li id="id-btn-copy"><button class="control-btn"><i class="control-icon-save"></i><span>Save Copy</span></button></li>
|
||||
<li id="id-btn-share"><button class="control-btn"><i class="control-icon-share"></i><span>Share</span></button></li>
|
||||
<li id="id-btn-embed"><button class="control-btn"><i class="control-icon-embed"></i><span>Embed</span></button></li>
|
||||
</ul>
|
||||
<ul class="right">
|
||||
<li><input id="page-number" style="width: 25px" type="text" value="0"><span class="text" id="pages">of 0</span></li>
|
||||
<li class="separator"></li>
|
||||
<li><button id="id-btn-fullscreen" class="control-btn no-caption"><i class="control-icon-fullscreen"></i></button></li>
|
||||
<li><button id="id-btn-close" class="control-btn no-caption"><i class="control-icon-close"></i></button></li>
|
||||
</ul>
|
||||
<div class="group left">
|
||||
<div id="box-tools" class="dropdown">
|
||||
<button class="control-btn svg-icon tools"></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group center">
|
||||
<span><a id="header-logo" class="brand-logo" href="http://www.onlyoffice.com/" target="_blank"></a></span>
|
||||
</div>
|
||||
<div class="group right">
|
||||
<div class="item"><input id="page-number" class="form-control input-xs masked" type="text" value="0"><span class="text" id="pages" tabindex="-1">of 0</span></div>
|
||||
<div class="item separator"></div>
|
||||
<div class="item"><button id="id-btn-close" class="control-btn close"><span aria-hidden="true">×</span></button></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="error modal hide" id="id-critical-error-dialog" tabindex="-1" role="dialog">
|
||||
|
@ -99,10 +100,11 @@
|
|||
<div class="cmd-loader-title">Please wait...</div>
|
||||
</div>
|
||||
|
||||
<div class="hyperlink-tooltip" data-toggle="tooltip" title="Press Ctrl and click the link" style="display:none;"></div>
|
||||
|
||||
<!--3td party-->
|
||||
<script type="text/javascript" src="../../../3rdparty/jquery/jquery-1.8.1.min.js"></script>
|
||||
<script type="text/javascript" src="../../../3rdparty/bootstrap/js/bootstrap.js"></script>
|
||||
<script type="text/javascript" src="../../../3rdparty/ZeroClipboard/ZeroClipboard.min.js"></script>
|
||||
<script type="text/javascript" src="../../../3rdparty/sockjs/sockjs-0.3.min.js"></script>
|
||||
<script type="text/javascript" src="../../../3rdparty/xregexp/xregexp-all-min.js"></script>
|
||||
|
||||
|
@ -203,9 +205,11 @@
|
|||
<script type="text/javascript" src="../../../sdk/PowerPoint/themes/Themes.js"></script>
|
||||
|
||||
<!--application-->
|
||||
<link href="resources/css/application.css" rel="stylesheet">
|
||||
<script type="text/javascript" src="../../common/Gateway.js"></script>
|
||||
<script type="text/javascript" src="../../common/Analytics.js"></script>
|
||||
<script type="text/javascript" src="../../common/embed/lib/util/utils.js"></script>
|
||||
<script type="text/javascript" src="../../common/embed/lib/view/modals.js"></script>
|
||||
<script type="text/javascript" src="../../common/embed/lib/controller/modals.js"></script>
|
||||
<script type="text/javascript" src="js/ApplicationView.js"></script>
|
||||
<script type="text/javascript" src="js/ApplicationController.js"></script>
|
||||
<script type="text/javascript" src="js/application.js"></script>
|
||||
|
|
|
@ -38,14 +38,9 @@ var ApplicationController = new(function(){
|
|||
embedConfig = {},
|
||||
permissions = {},
|
||||
maxPages = 0,
|
||||
minToolbarWidth = 550,
|
||||
minEmbedWidth = 400,
|
||||
minEmbedHeight = 600,
|
||||
embedCode = '<iframe allowtransparency="true" frameborder="0" scrolling="no" src="{embed-url}" width="{width}" height="{height}"></iframe>',
|
||||
maxZIndex = 9090,
|
||||
created = false,
|
||||
currentPage = 0,
|
||||
iframePrint = null;
|
||||
ttOffset = [0, -10];
|
||||
|
||||
// Initialize analytics
|
||||
// -------------------------
|
||||
|
@ -61,52 +56,6 @@ var ApplicationController = new(function(){
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
// Initialize ZeroClipboard
|
||||
// -------------------------
|
||||
|
||||
ZeroClipboard.setMoviePath('../../../vendor/ZeroClipboard/ZeroClipboard10.swf');
|
||||
var clipShortUrl = new ZeroClipboard.Client();
|
||||
var clipEmbedObj = new ZeroClipboard.Client();
|
||||
clipShortUrl.zIndex = maxZIndex;
|
||||
clipEmbedObj.zIndex = maxZIndex;
|
||||
|
||||
|
||||
// Utils
|
||||
// -------------------------
|
||||
|
||||
function emptyFn(){}
|
||||
|
||||
function createBuffered(fn, buffer, scope, args) {
|
||||
return function(){
|
||||
var timerId;
|
||||
return function() {
|
||||
var me = this;
|
||||
if (timerId) {
|
||||
clearTimeout(timerId);
|
||||
timerId = null;
|
||||
}
|
||||
timerId = setTimeout(function(){
|
||||
fn.apply(scope || me, args || arguments);
|
||||
}, buffer);
|
||||
};
|
||||
}();
|
||||
}
|
||||
|
||||
function updateSocial() {
|
||||
var $socialPanel = $('#id-popover-social-container');
|
||||
|
||||
if ($socialPanel.length > 0) {
|
||||
if ($socialPanel.attr('data-loaded') == 'false') {
|
||||
typeof FB !== 'undefined' && FB.XFBML && FB.XFBML.parse();
|
||||
typeof twttr !== 'undefined' && twttr.widgets && twttr.widgets.load();
|
||||
|
||||
$socialPanel.attr('data-loaded', 'true');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Handlers
|
||||
// -------------------------
|
||||
|
||||
|
@ -114,37 +63,7 @@ var ApplicationController = new(function(){
|
|||
config = $.extend(config, data.config);
|
||||
embedConfig = $.extend(embedConfig, data.config.embedded);
|
||||
|
||||
$('#id-short-url').val(embedConfig.shareUrl || 'Unavailable');
|
||||
$('#id-textarea-embed').text(embedCode.replace('{embed-url}', embedConfig.embedUrl).replace('{width}', minEmbedWidth).replace('{height}', minEmbedHeight));
|
||||
|
||||
if (typeof embedConfig.shareUrl !== 'undefined' && embedConfig.shareUrl != ''){
|
||||
(function(d, s, id) {
|
||||
var js, fjs = d.getElementsByTagName(s)[0];
|
||||
if (d.getElementById(id)) return;
|
||||
js = d.createElement(s); js.id = id;
|
||||
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
|
||||
fjs.parentNode.insertBefore(js, fjs);
|
||||
}(document, 'script', 'facebook-jssdk'));
|
||||
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
|
||||
|
||||
if ($('#id-popover-social-container ul')){
|
||||
$('#id-popover-social-container ul').append('<li><div class="fb-like" data-href="' + embedConfig.shareUrl + '" data-send="false" data-layout="button_count" data-width="450" data-show-faces="false"></div></li>');
|
||||
$('#id-popover-social-container ul').append('<li class="share-twitter"><a href="https://twitter.com/share" class="twitter-share-button" data-url="' + embedConfig.shareUrl + '">Tweet</a></li>'); //data-count="none"
|
||||
$('#id-popover-social-container ul').append('<li class="share-mail"><a class="btn btn-xs btn-default" href="mailto:?subject=I have shared a document with you: ' + embedConfig.docTitle + '&body=I have shared a document with you: ' + embedConfig.shareUrl + '"><span class="glyphicon glyphicon-envelope"></span>Email</a></li>');
|
||||
}
|
||||
}
|
||||
if (typeof embedConfig.shareUrl === 'undefined')
|
||||
$('#id-btn-share').hide();
|
||||
|
||||
if (typeof embedConfig.embedUrl === 'undefined')
|
||||
$('#id-btn-embed').hide();
|
||||
|
||||
if (typeof embedConfig.fullscreenUrl === 'undefined')
|
||||
$('#id-btn-fullscreen').hide();
|
||||
|
||||
if (config.canBackToFolder === false || !(config.customization && config.customization.goback && config.customization.goback.url))
|
||||
$('#id-btn-close').hide();
|
||||
|
||||
common.controller.modals.init(embedConfig);
|
||||
|
||||
// Docked toolbar
|
||||
if (embedConfig.toolbarDocked === 'top') {
|
||||
|
@ -153,10 +72,14 @@ var ApplicationController = new(function(){
|
|||
} else {
|
||||
$('#toolbar').addClass('bottom');
|
||||
$('#editor_sdk').addClass('bottom');
|
||||
$('#box-tools').removeClass('dropdown').addClass('dropup');
|
||||
ttOffset[1] = -40;
|
||||
}
|
||||
|
||||
// Hide last separator
|
||||
if (!$('#id-btn-fullscreen').is(":visible") && !$('#id-btn-close').is(":visible")) {
|
||||
if (config.canBackToFolder === false || !(config.customization && config.customization.goback && config.customization.goback.url)) {
|
||||
$('#id-btn-close').hide();
|
||||
|
||||
// Hide last separator
|
||||
$('#toolbar .right .separator').hide();
|
||||
$('#pages').css('margin-right', '12px');
|
||||
}
|
||||
|
@ -174,6 +97,7 @@ var ApplicationController = new(function(){
|
|||
docInfo.put_Title(docConfig.title);
|
||||
docInfo.put_Format(docConfig.fileType);
|
||||
docInfo.put_VKey(docConfig.vkey);
|
||||
docInfo.put_Token(docConfig.token);
|
||||
|
||||
if (api) {
|
||||
api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions);
|
||||
|
@ -184,11 +108,9 @@ var ApplicationController = new(function(){
|
|||
Common.Analytics.trackEvent('Load', 'Start');
|
||||
}
|
||||
|
||||
if (typeof embedConfig.saveUrl === 'undefined' && permissions.print === false)
|
||||
$('#id-btn-copy').hide();
|
||||
|
||||
if (!$('#id-btn-copy').is(":visible") && !$('#id-btn-share').is(":visible") && !$('#id-btn-embed').is(":visible") )
|
||||
$('#toolbar .left .separator').hide();
|
||||
embedConfig.docTitle = docConfig.title;
|
||||
if (!embedConfig.saveUrl && permissions.print === false)
|
||||
$('#idt-copy').hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -202,14 +124,6 @@ var ApplicationController = new(function(){
|
|||
currentPage = number;
|
||||
}
|
||||
|
||||
function onHyperlinkClick(url) {
|
||||
if (url) {
|
||||
var newDocumentPage = window.open(url, '_blank');
|
||||
if (newDocumentPage)
|
||||
newDocumentPage.focus();
|
||||
}
|
||||
}
|
||||
|
||||
function onLongActionBegin(type, id) {
|
||||
var text = '';
|
||||
switch (id)
|
||||
|
@ -236,12 +150,12 @@ var ApplicationController = new(function(){
|
|||
me.isHideBodyTip = true;
|
||||
}
|
||||
|
||||
var $ttEl, $tooltip;
|
||||
function onDocMouseMoveEnd() {
|
||||
if (me.isHideBodyTip) {
|
||||
var $tipHyperlink = $('#id-tip-hyperlink');
|
||||
|
||||
if ($tipHyperlink.length > 0) {
|
||||
$tipHyperlink.hide();
|
||||
if ( $tooltip ) {
|
||||
$tooltip.tooltip('hide');
|
||||
$tooltip = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -251,19 +165,30 @@ var ApplicationController = new(function(){
|
|||
if (data.get_Type() == 1) { // hyperlink
|
||||
me.isHideBodyTip = false;
|
||||
|
||||
var $tipHyperlink = $('#id-tip-hyperlink'),
|
||||
hyperProps = data.get_Hyperlink(),
|
||||
toolTip = (hyperProps.get_ToolTip()) ? hyperProps.get_ToolTip() : hyperProps.get_Value();
|
||||
if ( !$ttEl ) {
|
||||
$ttEl = $('.hyperlink-tooltip');
|
||||
$ttEl.tooltip({'container':'body', 'trigger':'manual'});
|
||||
$ttEl.on('shown.bs.tooltip', function(e) {
|
||||
$tooltip = $ttEl.data('bs.tooltip').tip();
|
||||
|
||||
if ($tipHyperlink.length > 0) {
|
||||
$tipHyperlink.find('.popover-content p').html(htmlEncode(toolTip) + '<br><b>Press Ctrl and click link</b>');
|
||||
$tipHyperlink.show();
|
||||
$tooltip.css({
|
||||
left: $ttEl.ttpos[0] + ttOffset[0],
|
||||
top: $ttEl.ttpos[1] + ttOffset[1]
|
||||
});
|
||||
|
||||
$tooltip.find('.tooltip-arrow').css({left: 10});
|
||||
});
|
||||
}
|
||||
|
||||
$tipHyperlink.css({
|
||||
left: data.get_X() - 10,
|
||||
top : data.get_Y() - 25
|
||||
})
|
||||
if ( !$tooltip ) {
|
||||
$ttEl.ttpos = [data.get_X(), data.get_Y()];
|
||||
$ttEl.tooltip('show');
|
||||
} else {
|
||||
$tooltip.css({
|
||||
left:data.get_X() + ttOffset[0],
|
||||
top:data.get_Y() + ttOffset[1]
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -273,32 +198,12 @@ var ApplicationController = new(function(){
|
|||
}
|
||||
|
||||
function onPrint() {
|
||||
if (api && permissions.print!==false)
|
||||
if (permissions.print!==false)
|
||||
api.asc_Print($.browser.chrome || $.browser.safari || $.browser.opera);
|
||||
}
|
||||
|
||||
function onPrintUrl(url) {
|
||||
if (iframePrint) {
|
||||
iframePrint.parentNode.removeChild(iframePrint);
|
||||
iframePrint = null;
|
||||
}
|
||||
if (!iframePrint) {
|
||||
iframePrint = document.createElement("iframe");
|
||||
iframePrint.id = "id-print-frame";
|
||||
iframePrint.style.display = 'none';
|
||||
iframePrint.style.visibility = "hidden";
|
||||
iframePrint.style.position = "fixed";
|
||||
iframePrint.style.right = "0";
|
||||
iframePrint.style.bottom = "0";
|
||||
document.body.appendChild(iframePrint);
|
||||
iframePrint.onload = function() {
|
||||
iframePrint.contentWindow.focus();
|
||||
iframePrint.contentWindow.print();
|
||||
iframePrint.contentWindow.blur();
|
||||
window.focus();
|
||||
};
|
||||
}
|
||||
if (url) iframePrint.src = url;
|
||||
common.utils.dialogPrint(url);
|
||||
}
|
||||
|
||||
function hidePreloader() {
|
||||
|
@ -306,19 +211,174 @@ var ApplicationController = new(function(){
|
|||
}
|
||||
|
||||
function onDocumentContentReady() {
|
||||
setVisiblePopover($('#id-popover-share'), false);
|
||||
setVisiblePopover($('#id-popover-embed'), false);
|
||||
$('#id-tip-hyperlink').hide();
|
||||
api.ShowThumbnails(false);
|
||||
api.asc_DeleteVerticalScroll();
|
||||
|
||||
handlerToolbarSize();
|
||||
|
||||
if (api) {
|
||||
api.ShowThumbnails(false);
|
||||
api.asc_DeleteVerticalScroll();
|
||||
if (!embedConfig.autostart || embedConfig.autostart == 'player') {
|
||||
api.SetDemonstrationModeOnly();
|
||||
onPlayStart();
|
||||
}
|
||||
|
||||
hidePreloader();
|
||||
|
||||
if ( !embedConfig.shareUrl )
|
||||
$('#idt-share').hide();
|
||||
|
||||
if ( !embedConfig.embedUrl )
|
||||
$('#idt-embed').hide();
|
||||
|
||||
if ( !embedConfig.fullscreenUrl )
|
||||
$('#idt-fullscreen').hide();
|
||||
|
||||
common.controller.modals.attach({
|
||||
share: '#idt-share',
|
||||
embed: '#idt-embed'
|
||||
});
|
||||
|
||||
api.asc_registerCallback('asc_onMouseMoveStart', onDocMouseMoveStart);
|
||||
api.asc_registerCallback('asc_onMouseMoveEnd', onDocMouseMoveEnd);
|
||||
api.asc_registerCallback('asc_onMouseMove', onDocMouseMove);
|
||||
|
||||
api.asc_registerCallback('asc_onDownloadUrl', onDownloadUrl);
|
||||
api.asc_registerCallback('asc_onPrint', onPrint);
|
||||
api.asc_registerCallback('asc_onPrintUrl', onPrintUrl);
|
||||
api.asc_registerCallback('asc_onHyperlinkClick', common.utils.openLink);
|
||||
api.asc_registerCallback('asc_onStartAction', onLongActionBegin);
|
||||
api.asc_registerCallback('asc_onEndAction', onLongActionEnd);
|
||||
|
||||
api.asc_registerCallback('asc_onEndDemonstration', onPlayStop);
|
||||
api.asc_registerCallback('asc_onDemonstrationSlideChanged', onPlaySlideChanged);
|
||||
|
||||
Common.Gateway.on('processmouse', onProcessMouse);
|
||||
Common.Gateway.on('downloadas', onDownloadAs);
|
||||
|
||||
ApplicationView.tools.get('#idt-fullscreen')
|
||||
.on('click', function(){
|
||||
common.utils.openLink(embedConfig.fullscreenUrl);
|
||||
});
|
||||
|
||||
ApplicationView.tools.get('#idt-download')
|
||||
.on('click', function(){
|
||||
if ( !!embedConfig.saveUrl ){
|
||||
common.utils.openLink(embedConfig.saveUrl);
|
||||
} else
|
||||
if (api && permissions.print!==false){
|
||||
api.asc_Print($.browser.chrome || $.browser.safari || $.browser.opera);
|
||||
}
|
||||
|
||||
Common.Analytics.trackEvent('Save');
|
||||
});
|
||||
|
||||
var $pagenum = $('#page-number');
|
||||
$pagenum.on({
|
||||
'keyup': function(e){
|
||||
if ( e.keyCode == 13 ){
|
||||
var newPage = parseInt($('#page-number').val());
|
||||
|
||||
if ( newPage > maxPages ) newPage = maxPages; else
|
||||
if ( newPage < 2 || isNaN(newPage) ) newPage = 1;
|
||||
|
||||
if ( isplaymode )
|
||||
api.DemonstrationGoToSlide(newPage-1); else
|
||||
api.goToPage(newPage-1);
|
||||
|
||||
$pagenum.blur();
|
||||
}
|
||||
}
|
||||
, 'focusin' : function(e) {
|
||||
$pagenum.removeClass('masked');
|
||||
}
|
||||
, 'focusout': function(e){
|
||||
!$pagenum.hasClass('masked') && $pagenum.addClass('masked');
|
||||
}
|
||||
});
|
||||
|
||||
$('#pages').on('click', function(e) {
|
||||
$pagenum.focus();
|
||||
});
|
||||
|
||||
$('#id-btn-close').on('click', function(){
|
||||
if (config.customization && config.customization.goback && config.customization.goback.url)
|
||||
window.parent.location.href = config.customization.goback.url;
|
||||
});
|
||||
|
||||
$('#btn-left').on('click', function(){
|
||||
if ( isplaymode ) {
|
||||
api.DemonstrationPrevSlide();
|
||||
} else
|
||||
if (currentPage > 0) {
|
||||
api.goToPage(currentPage - 1);
|
||||
}
|
||||
});
|
||||
|
||||
$('#btn-right').on('click', function(){
|
||||
if ( isplaymode ) {
|
||||
api.DemonstrationNextSlide();
|
||||
} else
|
||||
if (currentPage < maxPages - 1) {
|
||||
api.goToPage(currentPage + 1);
|
||||
}
|
||||
});
|
||||
|
||||
var documentMoveTimer;
|
||||
var ismoved = false;
|
||||
$(document).on({
|
||||
'click': function(e) {
|
||||
clearTimeout(documentMoveTimer);
|
||||
documentMoveTimer = undefined;
|
||||
},
|
||||
'mousemove': function (e) {
|
||||
$('#btn-left').fadeIn();
|
||||
$('#btn-right').fadeIn();
|
||||
|
||||
ismoved = true;
|
||||
if ( !documentMoveTimer ) {
|
||||
documentMoveTimer = setInterval(function(){
|
||||
if ( !ismoved ) {
|
||||
// $('#btn-left').fadeOut();
|
||||
// $('#btn-right').fadeOut();
|
||||
clearInterval(documentMoveTimer);
|
||||
documentMoveTimer = undefined;
|
||||
}
|
||||
|
||||
ismoved = false;
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var ismodalshown = false;
|
||||
$(document.body).on('show.bs.modal', '.modal',
|
||||
function(e) {
|
||||
ismodalshown = true;
|
||||
api.asc_enableKeyEvents(false);
|
||||
}
|
||||
).on('hidden.bs.modal', '.modal',
|
||||
function(e) {
|
||||
ismodalshown = false;
|
||||
api.asc_enableKeyEvents(true);
|
||||
}
|
||||
).on('hidden.bs.dropdown', '.dropdown',
|
||||
function(e) {
|
||||
if ( !ismodalshown )
|
||||
api.asc_enableKeyEvents(true);
|
||||
}
|
||||
).on('blur', 'input, textarea',
|
||||
function(e) {
|
||||
if ( !ismodalshown ) {
|
||||
if (!/area_id/.test(e.target.id) ) {
|
||||
api.asc_enableKeyEvents(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
$('#editor_sdk').on('click', function(e) {
|
||||
if ( e.target.localName == 'canvas' ) {
|
||||
e.currentTarget.focus();
|
||||
}
|
||||
});
|
||||
|
||||
$('#btn-play').on('click', onPlayStart);
|
||||
Common.Analytics.trackEvent('Load', 'Complete');
|
||||
}
|
||||
|
||||
|
@ -342,6 +402,37 @@ var ApplicationController = new(function(){
|
|||
api.zoomFitToPage();
|
||||
}
|
||||
|
||||
function onOpenDocument(progress) {
|
||||
var proc = (progress.asc_getCurrentFont() + progress.asc_getCurrentImage())/(progress.asc_getFontsCount() + progress.asc_getImagesCount());
|
||||
$('#loadmask-text').html('Loading document: ' + Math.min(Math.round(proc * 100), 100) + '%');
|
||||
}
|
||||
|
||||
var isplaymode;
|
||||
function onPlayStart(e) {
|
||||
if ( !isplaymode ) {
|
||||
$('#box-preview').show();
|
||||
api.StartDemonstration('id-preview', currentPage);
|
||||
} else {
|
||||
isplaymode == 'play' ?
|
||||
api.DemonstrationPause() : api.DemonstrationPlay();
|
||||
}
|
||||
|
||||
isplaymode != 'play' ? ($('#btn-play button').addClass('pause'), isplaymode = 'play') :
|
||||
($('#btn-play button').removeClass('pause'), isplaymode = 'pause');
|
||||
}
|
||||
|
||||
function onPlayStop() {
|
||||
isplaymode = undefined;
|
||||
$('#page-number').val(currentPage + 1);
|
||||
$('#btn-play button').removeClass('pause');
|
||||
$('#box-preview').hide();
|
||||
}
|
||||
|
||||
function onPlaySlideChanged(number) {
|
||||
if ( number++ < maxPages)
|
||||
$('#page-number').val(number);
|
||||
}
|
||||
|
||||
function showMask() {
|
||||
$('#id-loadmask').modal({
|
||||
backdrop: 'static',
|
||||
|
@ -353,11 +444,6 @@ var ApplicationController = new(function(){
|
|||
$('#id-loadmask').modal('hide');
|
||||
}
|
||||
|
||||
function onOpenDocument(progress) {
|
||||
var proc = (progress.asc_getCurrentFont() + progress.asc_getCurrentImage())/(progress.asc_getFontsCount() + progress.asc_getImagesCount());
|
||||
$('#loadmask-text').html('Loading document: ' + Math.min(Math.round(proc * 100), 100) + '%');
|
||||
}
|
||||
|
||||
function onError(id, level, errData) {
|
||||
hidePreloader();
|
||||
|
||||
|
@ -442,114 +528,11 @@ var ApplicationController = new(function(){
|
|||
// Helpers
|
||||
// -------------------------
|
||||
|
||||
var handlerToolbarSize = createBuffered(function(size){
|
||||
var visibleCaption = function(btn, visible){
|
||||
if (visible){
|
||||
$(btn + ' button').addClass('no-caption');
|
||||
$(btn + ' button span').css('display', 'none');
|
||||
} else {
|
||||
$(btn + ' button').removeClass('no-caption');
|
||||
$(btn + ' button span').css('display', 'inline');
|
||||
}
|
||||
};
|
||||
|
||||
var isMinimize = $('#toolbar').width() < minToolbarWidth;
|
||||
|
||||
visibleCaption('#id-btn-copy', isMinimize);
|
||||
visibleCaption('#id-btn-share', isMinimize);
|
||||
visibleCaption('#id-btn-embed', isMinimize);
|
||||
}, 10);
|
||||
|
||||
function onDocumentResize() {
|
||||
if (api) {
|
||||
api.Resize();
|
||||
api.zoomFitToPage();
|
||||
}
|
||||
|
||||
handlerToolbarSize();
|
||||
}
|
||||
|
||||
function isVisiblePopover(popover){
|
||||
return popover.hasClass('in');
|
||||
}
|
||||
|
||||
function setVisiblePopover(popover, visible, owner){
|
||||
api && api.asc_enableKeyEvents(!visible);
|
||||
|
||||
if (visible){
|
||||
if (owner){
|
||||
popover.css('display', 'block');
|
||||
|
||||
var popoverData = owner.data('bs.popover'),
|
||||
$tip = popoverData.tip(),
|
||||
pos = popoverData.getPosition(false),
|
||||
actualHeight = $tip[0].offsetHeight,
|
||||
placement = (embedConfig.toolbarDocked === 'top') ? 'bottom' : 'top',
|
||||
tp;
|
||||
|
||||
$tip.removeClass('fade in top bottom left right');
|
||||
|
||||
switch (placement) {
|
||||
case 'bottom':
|
||||
tp = {
|
||||
top : pos.top + pos.height,
|
||||
left: owner.position().left + (owner.width() - popover.width()) * 0.5
|
||||
};
|
||||
break;
|
||||
|
||||
default:
|
||||
case 'top':
|
||||
tp = {
|
||||
top : pos.top - actualHeight,
|
||||
left: owner.position().left + (owner.width() - popover.width()) * 0.5
|
||||
};
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
$tip
|
||||
.css(tp)
|
||||
.addClass(placement)
|
||||
.addClass('in')
|
||||
}
|
||||
|
||||
if (popover.hasClass('embed')) {
|
||||
clipEmbedObj.show();
|
||||
}
|
||||
|
||||
if (popover.hasClass('share')) {
|
||||
clipShortUrl.show();
|
||||
updateSocial();
|
||||
}
|
||||
} else {
|
||||
popover.removeClass('in');
|
||||
popover.css('display', 'none');
|
||||
|
||||
popover.hasClass('embed') && clipEmbedObj.hide();
|
||||
popover.hasClass('share') && clipShortUrl.hide();
|
||||
}
|
||||
}
|
||||
|
||||
function updateEmbedCode(){
|
||||
var newWidth = parseInt($('#id-input-embed-width').val()),
|
||||
newHeight = parseInt($('#id-input-embed-height').val());
|
||||
|
||||
if (newWidth < minEmbedWidth)
|
||||
newWidth = minEmbedWidth;
|
||||
|
||||
if (newHeight < minEmbedHeight)
|
||||
newHeight = minEmbedHeight;
|
||||
|
||||
$('#id-textarea-embed').text(embedCode.replace('{embed-url}', embedConfig.embedUrl).replace('{width}', newWidth).replace('{height}', newHeight));
|
||||
|
||||
$('#id-input-embed-width').val(newWidth + 'px');
|
||||
$('#id-input-embed-height').val(newHeight + 'px');
|
||||
}
|
||||
|
||||
function openLink(url){
|
||||
var newDocumentPage = window.open(url);
|
||||
if (newDocumentPage)
|
||||
newDocumentPage.focus();
|
||||
}
|
||||
|
||||
function createController(){
|
||||
|
@ -559,167 +542,15 @@ var ApplicationController = new(function(){
|
|||
me = this;
|
||||
created = true;
|
||||
|
||||
var documentMoveTimer;
|
||||
|
||||
// Initialize clipboard objects
|
||||
|
||||
clipShortUrl.addEventListener('mousedown', function() {
|
||||
if ($('#id-btn-copy-short').hasClass('copied'))
|
||||
return;
|
||||
|
||||
$('#id-btn-copy-short').button('copied');
|
||||
$('#id-btn-copy-short').addClass('copied');
|
||||
|
||||
clipShortUrl.setText($('#id-short-url').val());
|
||||
|
||||
setTimeout(function(){
|
||||
$('#id-btn-copy-short').button('reset');
|
||||
$('#id-btn-copy-short').removeClass('copied');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
clipEmbedObj.addEventListener('mousedown', function(){
|
||||
if ($('#id-btn-copy-embed').hasClass('copied'))
|
||||
return;
|
||||
|
||||
$('#id-btn-copy-embed').button('copied');
|
||||
$('#id-btn-copy-embed').addClass('copied');
|
||||
|
||||
clipEmbedObj.setText($('#id-textarea-embed').text());
|
||||
|
||||
setTimeout(function(){
|
||||
$('#id-btn-copy-embed').button('reset');
|
||||
$('#id-btn-copy-embed').removeClass('copied');
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
clipShortUrl.glue('id-btn-copy-short');
|
||||
clipEmbedObj.glue('id-btn-copy-embed');
|
||||
|
||||
|
||||
// popover ui handlers
|
||||
|
||||
$('#id-btn-copy').on('click', function(){
|
||||
var saveUrl = embedConfig.saveUrl;
|
||||
if (typeof saveUrl !== 'undefined' && saveUrl.length > 0){
|
||||
openLink(saveUrl);
|
||||
} else if (api && permissions.print!==false){
|
||||
api.asc_Print($.browser.chrome || $.browser.safari || $.browser.opera);
|
||||
}
|
||||
|
||||
Common.Analytics.trackEvent('Save');
|
||||
});
|
||||
|
||||
$('#id-btn-share').on('click', function(event){
|
||||
setVisiblePopover($('#id-popover-share'), !isVisiblePopover($('#id-popover-share')), $('#id-btn-share'));
|
||||
setVisiblePopover($('#id-popover-embed'), false);
|
||||
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
});
|
||||
|
||||
$('#id-btn-embed').on('click', function(event){
|
||||
setVisiblePopover($('#id-popover-embed'), !isVisiblePopover($('#id-popover-embed')), $('#id-btn-embed'));
|
||||
setVisiblePopover($('#id-popover-share'), false);
|
||||
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
});
|
||||
|
||||
$('#id-input-embed-width').on('keypress', function(e){
|
||||
if (e.keyCode == 13)
|
||||
updateEmbedCode();
|
||||
});
|
||||
|
||||
$('#id-input-embed-height').on('keypress', function(e){
|
||||
if (e.keyCode == 13)
|
||||
updateEmbedCode();
|
||||
});
|
||||
|
||||
$('#id-input-embed-width').on('focusin', function(e){
|
||||
api && api.asc_enableKeyEvents(false);
|
||||
});
|
||||
|
||||
$('#id-input-embed-height').on('focusin', function(e){
|
||||
api && api.asc_enableKeyEvents(false);
|
||||
});
|
||||
|
||||
$('#id-input-embed-width').on('focusout', function(e){
|
||||
updateEmbedCode();
|
||||
api && api.asc_enableKeyEvents(true);
|
||||
});
|
||||
|
||||
$('#id-input-embed-height').on('focusout', function(e){
|
||||
updateEmbedCode();
|
||||
api && api.asc_enableKeyEvents(true);
|
||||
});
|
||||
|
||||
$('#page-number').on('keypress', function(e){
|
||||
if (e.keyCode == 13){
|
||||
var newPage = parseInt($('#page-number').val());
|
||||
|
||||
if (newPage > maxPages)
|
||||
newPage = maxPages;
|
||||
if (newPage < 2 || isNaN(newPage))
|
||||
newPage = 1;
|
||||
|
||||
if (api)
|
||||
api.goToPage(newPage-1);
|
||||
}
|
||||
});
|
||||
|
||||
$('#id-btn-fullscreen').on('click', function(){
|
||||
openLink(embedConfig.fullscreenUrl);
|
||||
});
|
||||
|
||||
$('#id-btn-close').on('click', function(){
|
||||
if (config.customization && config.customization.goback && config.customization.goback.url)
|
||||
window.parent.location.href = config.customization.goback.url;
|
||||
});
|
||||
|
||||
$('#id-btn-move-left').on('click', function(){
|
||||
if (api) {
|
||||
if (currentPage > 0) {
|
||||
api.goToPage(currentPage - 1);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('#id-btn-move-right').on('click', function(){
|
||||
if (api) {
|
||||
if (currentPage < maxPages - 1) {
|
||||
api.goToPage(currentPage + 1);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(window).resize(function(){
|
||||
onDocumentResize();
|
||||
});
|
||||
|
||||
$(document).click(function(event){
|
||||
if (event && event.target && $(event.target).closest('.popover').length > 0)
|
||||
return;
|
||||
|
||||
setVisiblePopover($('#id-popover-share'), false);
|
||||
setVisiblePopover($('#id-popover-embed'), false);
|
||||
|
||||
clearTimeout(documentMoveTimer);
|
||||
});
|
||||
|
||||
$(document).mousemove(function(event){
|
||||
$('#id-btn-move-left').fadeIn();
|
||||
$('#id-btn-move-right').fadeIn();
|
||||
|
||||
clearTimeout(documentMoveTimer);
|
||||
documentMoveTimer = setTimeout(function(){
|
||||
$('#id-btn-move-left').fadeOut();
|
||||
$('#id-btn-move-right').fadeOut();
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
api = new Asc.asc_docs_api({
|
||||
'id-view' : 'editor_sdk'
|
||||
'id-view' : 'editor_sdk',
|
||||
'embedded' : true
|
||||
});
|
||||
|
||||
if (api){
|
||||
|
@ -729,26 +560,12 @@ var ApplicationController = new(function(){
|
|||
api.asc_registerCallback('asc_onDocumentContentReady', onDocumentContentReady);
|
||||
api.asc_registerCallback('asc_onOpenDocumentProgress', onOpenDocument);
|
||||
api.asc_registerCallback('asc_onCountPages', onCountPages);
|
||||
// api.asc_registerCallback('OnCurrentVisiblePage', onCurrentPage);
|
||||
api.asc_registerCallback('asc_onCurrentPage', onCurrentPage);
|
||||
api.asc_registerCallback('asc_onHyperlinkClick', onHyperlinkClick);
|
||||
api.asc_registerCallback('asc_onStartAction', onLongActionBegin);
|
||||
api.asc_registerCallback('asc_onEndAction', onLongActionEnd);
|
||||
|
||||
api.asc_registerCallback('asc_onMouseMoveStart', onDocMouseMoveStart);
|
||||
api.asc_registerCallback('asc_onMouseMoveEnd', onDocMouseMoveEnd);
|
||||
api.asc_registerCallback('asc_onMouseMove', onDocMouseMove);
|
||||
|
||||
api.asc_registerCallback('asc_onDownloadUrl', onDownloadUrl);
|
||||
api.asc_registerCallback('asc_onPrint', onPrint);
|
||||
api.asc_registerCallback('asc_onPrintUrl', onPrintUrl);
|
||||
|
||||
// Initialize api gateway
|
||||
Common.Gateway.on('init', loadConfig);
|
||||
Common.Gateway.on('opendocument', loadDocument);
|
||||
Common.Gateway.on('showerror', onExternalError);
|
||||
Common.Gateway.on('processmouse', onProcessMouse);
|
||||
Common.Gateway.on('downloadas', onDownloadAs);
|
||||
Common.Gateway.ready();
|
||||
}
|
||||
|
||||
|
|
|
@ -31,50 +31,31 @@
|
|||
*
|
||||
*/
|
||||
var ApplicationView = new(function(){
|
||||
var $btnTools;
|
||||
|
||||
// Initialize view
|
||||
|
||||
function createView(){
|
||||
$('#id-btn-share').popover({
|
||||
trigger : 'manual',
|
||||
html : true,
|
||||
template : '<div class="popover share" id="id-popover-share"><div class="arrow"></div><div class="popover-inner"><div class="popover-content"><p></p></div></div></div>',
|
||||
content : '<div class="share-link">' +
|
||||
'<span class="caption">Link:</span>' +
|
||||
'<input id="id-short-url" class="input-xs form-control" readonly/>' +
|
||||
'<button id="id-btn-copy-short" type="button" class="btn btn-xs btn-primary" style="width: 65px;" data-copied-text="Copied">Copy</button>' +
|
||||
'</div> ' +
|
||||
'<div class="share-buttons" style="height: 25px" id="id-popover-social-container" data-loaded="false">' +
|
||||
'<ul></ul>' +
|
||||
'</div>'
|
||||
}).popover('show');
|
||||
$btnTools = $('#box-tools button');
|
||||
|
||||
$('#id-btn-embed').popover({
|
||||
trigger : 'manual',
|
||||
html : true,
|
||||
template : '<div class="popover embed" id="id-popover-embed"><div class="arrow"></div><div class="popover-inner"><div class="popover-content"><p></p></div></div></div>',
|
||||
content : '<div class="size-manual">' +
|
||||
'<span class="caption">Width:</span>' +
|
||||
'<input id="id-input-embed-width" class="form-control input-xs" type="text" value="400px">' +
|
||||
'<input id="id-input-embed-height" class="form-control input-xs right" type="text" value="600px">' +
|
||||
'<span class="right caption">Height:</span>' +
|
||||
'</div>' +
|
||||
'<textarea id="id-textarea-embed" rows="4" class="form-control" readonly></textarea>' +
|
||||
'<button id="id-btn-copy-embed" type="button" class="btn btn-xs btn-primary" data-copied-text="Copied">Copy</button>'
|
||||
$btnTools.addClass('dropdown-toggle').attr('data-toggle', 'dropdown').attr('aria-expanded', 'true');
|
||||
$btnTools.parent().append(
|
||||
'<ul class="dropdown-menu">' +
|
||||
'<li><a id="idt-download" href="#"><span class="mi-icon svg-icon download"></span>Download</a></li>' +
|
||||
'<li><a id="idt-share" href="#" data-toggle="modal"><span class="mi-icon svg-icon share"></span>Share</a></li>' +
|
||||
'<li><a id="idt-embed" href="#" data-toggle="modal"><span class="mi-icon svg-icon embed"></span>Embed</a></li>' +
|
||||
'<li><a id="idt-fullscreen" href="#"><span class="mi-icon svg-icon fullscr"></span>Full Screen</a></li>' +
|
||||
'</ul>');
|
||||
}
|
||||
|
||||
|
||||
}).popover('show');
|
||||
|
||||
$('body').popover({
|
||||
trigger : 'manual',
|
||||
html : true,
|
||||
animation : false,
|
||||
template : '<div class="popover hyperlink" id="id-tip-hyperlink"><div class="popover-inner"><div class="popover-content"><p></p></div></div></div>',
|
||||
content : '<br><b>Press Ctrl and click link</b>'
|
||||
}).popover('show');
|
||||
function getTools(name) {
|
||||
return $btnTools.parent().find(name);
|
||||
}
|
||||
|
||||
return {
|
||||
create: createView
|
||||
, tools: {
|
||||
get: getTools
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue