diff --git a/Readme.md b/Readme.md index ea3faf9c3..1c936b3db 100644 --- a/Readme.md +++ b/Readme.md @@ -16,9 +16,9 @@ Code repository: [https://github.com/ONLYOFFICE/web-apps](https://github.com/ONL ## User feedback and support -If you have any problems with or questions about [ONLYOFFICE Document Server][2], please visit our official forum: [dev.onlyoffice.org][1] or you can ask and answer ONLYOFFICE development questions on [Stack Overflow][3]. +If you have any problems with or questions about [ONLYOFFICE Document Server][2], please visit our official forum: [forum.onlyoffice.com][1] or you can ask and answer ONLYOFFICE development questions on [Stack Overflow][3]. - [1]: http://dev.onlyoffice.org + [1]: https://forum.onlyoffice.com [2]: https://github.com/ONLYOFFICE/DocumentServer [3]: http://stackoverflow.com/questions/tagged/onlyoffice diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index 6154a0c5e..9742962d3 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -55,7 +55,8 @@ view: ["Group1", ""] // current user can view comments made by users from Group1 and users without a group. edit: ["Group1", ""] // current user can edit comments made by users from Group1 and users without a group. remove: ["Group1", ""] // current user can remove comments made by users from Group1 and users without a group. - } + }, + protect: // default = true. show/hide protect tab or protect buttons } }, editorConfig: { @@ -104,7 +105,7 @@ customization: { logo: { image: url, - imageEmbedded: url, + imageEmbedded: url, // deprecated, use image instead url: http://... }, customer: { @@ -136,9 +137,10 @@ label: string (default: "Guest") // postfix for user name }, review: { - hideReviewDisplay: false // hide button Review mode, + hideReviewDisplay: false, // hide button Review mode + hoverMode: false, // true - show review balloons on mouse move, not on click on text showReviewChanges: false, - reviewDisplay: 'original', + reviewDisplay: 'original', // original for viewer, markup for editor trackChanges: undefined // true/false - open editor with track changes mode on/off, }, chat: true, @@ -417,7 +419,7 @@ if (typeof _config.document.fileType === 'string' && _config.document.fileType != '') { _config.document.fileType = _config.document.fileType.toLowerCase(); - var type = /^(?:(xls|xlsx|ods|csv|xlst|xlsy|gsheet|xlsm|xlt|xltm|xltx|fods|ots)|(pps|ppsx|ppt|pptx|odp|pptt|ppty|gslides|pot|potm|potx|ppsm|pptm|fodp|otp)|(doc|docx|doct|odt|gdoc|txt|rtf|pdf|mht|htm|html|epub|djvu|xps|docm|dot|dotm|dotx|fodt|ott|fb2|xml))$/ + var type = /^(?:(xls|xlsx|ods|csv|xlst|xlsy|gsheet|xlsm|xlt|xltm|xltx|fods|ots)|(pps|ppsx|ppt|pptx|odp|pptt|ppty|gslides|pot|potm|potx|ppsm|pptm|fodp|otp)|(doc|docx|doct|odt|gdoc|txt|rtf|pdf|mht|htm|html|epub|djvu|xps|oxps|docm|dot|dotm|dotx|fodt|ott|fb2|xml|oform))$/ .exec(_config.document.fileType); if (!type) { window.alert("The \"document.fileType\" parameter for the config object is invalid. Please correct it."); @@ -429,7 +431,7 @@ } } - var type = /^(?:(pdf|djvu|xps))$/.exec(_config.document.fileType); + var type = /^(?:(pdf|djvu|xps|oxps))$/.exec(_config.document.fileType); if (type && typeof type[1] === 'string') { _config.editorConfig.canUseHistory = false; } @@ -837,9 +839,24 @@ return extensionParams["url"] + "apps/"; } + + function getTestPath() { + var scripts = document.getElementsByTagName('script'), + match; + + for (var i = scripts.length - 1; i >= 0; i--) { + match = scripts[i].src.match(/(.*)apps\/api\/documents\/api.js/i); + if (match) { + return match[1] + "test/"; + } + } + + return ""; + } + function getAppPath(config) { var extensionPath = getExtensionPath(), - path = extensionPath ? extensionPath : getBasePath(), + path = extensionPath ? extensionPath : (config.type=="test" ? getTestPath() : getBasePath()), appMap = { 'text': 'documenteditor', 'text-pdf': 'documenteditor', @@ -867,23 +884,34 @@ check = function(regex){ return regex.test(userAgent); }, isIE = !check(/opera/) && (check(/msie/) || check(/trident/) || check(/edge/)), isChrome = !isIE && check(/\bchrome\b/), - isSafari_mobile = !isIE && !isChrome && check(/safari/) && (navigator.maxTouchPoints>0); + isSafari_mobile = !isIE && !isChrome && check(/safari/) && (navigator.maxTouchPoints>0), + path_type; path += app + "/"; - path += (config.type === "mobile" || isSafari_mobile) - ? "mobile" - : (config.type === "embedded" || (app=='documenteditor') && config.document && config.document.permissions && (config.document.permissions.fillForms===true) && - (config.document.permissions.edit === false) && (config.document.permissions.review !== true) && (config.editorConfig.mode !== 'view')) - ? "embed" - : "main"; + if (config.document && typeof config.document.fileType === 'string' && config.document.fileType.toLowerCase() === 'oform') { + if (config.document.permissions) { + (config.document.permissions.fillForms===undefined) && (config.document.permissions.fillForms = (config.document.permissions.edit !== false)); + config.document.permissions.edit = config.document.permissions.review = config.document.permissions.comment = false; + } + path_type = (config.type === "mobile" || isSafari_mobile) + ? "mobile" : config.document.permissions && (config.document.permissions.fillForms === true) && (config.editorConfig.mode !== 'view') + ? "forms" : "embed"; + } else { + path_type = (config.type === "mobile" || isSafari_mobile) + ? "mobile" : ((app==='documenteditor') && config.document && config.document.permissions && (config.document.permissions.fillForms===true) && + (config.document.permissions.edit === false) && (config.document.permissions.review !== true) && (config.editorConfig.mode !== 'view')) + ? "forms" : (config.type === "embedded") + ? "embed" : "main"; + } + path += path_type; var index = "/index.html"; - if (config.editorConfig) { + if (config.editorConfig && path_type!=="forms") { var customization = config.editorConfig.customization; if ( typeof(customization) == 'object' && ( customization.toolbarNoTabs || (config.editorConfig.targetApp!=='desktop') && (customization.loaderName || customization.loaderLogo))) { index = "/index_loader.html"; - } else if (config.editorConfig.mode == 'editdiagram' || config.editorConfig.mode == 'editmerge') + } else if (config.editorConfig.mode === 'editdiagram' || config.editorConfig.mode === 'editmerge') index = "/index_internal.html"; } @@ -905,8 +933,8 @@ if ( (typeof(config.editorConfig.customization) == 'object') && config.editorConfig.customization.loaderLogo) { if (config.editorConfig.customization.loaderLogo !== '') params += "&logo=" + encodeURIComponent(config.editorConfig.customization.loaderLogo); } else if ( (typeof(config.editorConfig.customization) == 'object') && config.editorConfig.customization.logo) { - if (config.type=='embedded' && config.editorConfig.customization.logo.imageEmbedded) - params += "&headerlogo=" + encodeURIComponent(config.editorConfig.customization.logo.imageEmbedded); + if (config.type=='embedded' && (config.editorConfig.customization.logo.image || config.editorConfig.customization.logo.imageEmbedded)) + params += "&headerlogo=" + encodeURIComponent(config.editorConfig.customization.logo.image || config.editorConfig.customization.logo.imageEmbedded); else if (config.type!='embedded' && config.editorConfig.customization.logo.image) params += "&headerlogo=" + encodeURIComponent(config.editorConfig.customization.logo.image); } diff --git a/apps/api/wopi/editor-wopi.ejs b/apps/api/wopi/editor-wopi.ejs index d7301abad..28b1860fd 100644 --- a/apps/api/wopi/editor-wopi.ejs +++ b/apps/api/wopi/editor-wopi.ejs @@ -91,7 +91,7 @@ div {
- + +
+ + + +
+ +
+ +
+ +
+
+
+ + + +
+
+ +
+
+
+
of 1 +
+
+ +
+
+ + + + + + + + + + + + + + + diff --git a/apps/documenteditor/forms/index.html.deploy b/apps/documenteditor/forms/index.html.deploy new file mode 100644 index 000000000..ddfc2d652 --- /dev/null +++ b/apps/documenteditor/forms/index.html.deploy @@ -0,0 +1,255 @@ + + + + + Documents + + + + + + + + + + + + + + + +
+ + + +
+ +
+ +
+ +
+
+
+ + + +
+
+ +
+
+
+
of 1 +
+
+ +
+
+ + + + + + + diff --git a/apps/documenteditor/forms/locale/be.json b/apps/documenteditor/forms/locale/be.json new file mode 100644 index 000000000..41d6ead30 --- /dev/null +++ b/apps/documenteditor/forms/locale/be.json @@ -0,0 +1,31 @@ +{ + "common.view.modals.txtCopy": "Скапіяваць у буфер абмену", + "common.view.modals.txtEmbed": "Убудаваць", + "common.view.modals.txtHeight": "Вышыня", + "common.view.modals.txtShare": "Падзяліцца спасылкай", + "common.view.modals.txtWidth": "Шырыня", + "DE.ApplicationController.convertationErrorText": "Пераўтварыць не атрымалася.", + "DE.ApplicationController.convertationTimeoutText": "Час чакання пераўтварэння сышоў.", + "DE.ApplicationController.criticalErrorTitle": "Памылка", + "DE.ApplicationController.downloadErrorText": "Не атрымалася спампаваць.", + "DE.ApplicationController.downloadTextText": "Спампоўванне дакумента...", + "DE.ApplicationController.errorAccessDeny": "Вы спрабуеце выканаць дзеянне, на якое не маеце правоў.
Калі ласка, звярніцеся да адміністратара сервера дакументаў.", + "DE.ApplicationController.errorDefaultMessage": "Код памылкі: %1", + "DE.ApplicationController.errorFilePassProtect": "Файл абаронены паролем, яго немагчыма адкрыць.", + "DE.ApplicationController.errorFileSizeExceed": "Памер файла перавышае ліміт, вызначаны для вашага сервера.
Звярніцеся да адміністратара сервера дакументаў за дадатковымі звесткамі.", + "DE.ApplicationController.errorUpdateVersionOnDisconnect": "Злучэнне з інтэрнэтам было адноўлена, і версія файла змянілася.
Перш чым працягнуць працу, неабходна спампаваць файл альбо скапіяваць яго змесціва, каб захаваць даныя, а пасля перазагрузіць старонку.", + "DE.ApplicationController.errorUserDrop": "На дадзены момант файл недаступны.", + "DE.ApplicationController.notcriticalErrorTitle": "Увага", + "DE.ApplicationController.scriptLoadError": "Занадта павольнае злучэнне, не ўсе кампаненты атрымалася загрузіць. Калі ласка, абнавіце старонку.", + "DE.ApplicationController.textLoadingDocument": "Загрузка дакумента", + "DE.ApplicationController.textOf": "з", + "DE.ApplicationController.txtClose": "Закрыць", + "DE.ApplicationController.unknownErrorText": "Невядомая памылка.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Ваш браўзер не падтрымліваецца.", + "DE.ApplicationController.waitText": "Калі ласка, пачакайце...", + "DE.ApplicationView.txtDownload": "Спампаваць", + "DE.ApplicationView.txtEmbed": "Убудаваць", + "DE.ApplicationView.txtFullScreen": "Поўнаэкранны рэжым", + "DE.ApplicationView.txtPrint": "Друк", + "DE.ApplicationView.txtShare": "Падзяліцца" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/locale/bg.json b/apps/documenteditor/forms/locale/bg.json new file mode 100644 index 000000000..72651eb8d --- /dev/null +++ b/apps/documenteditor/forms/locale/bg.json @@ -0,0 +1,30 @@ +{ + "common.view.modals.txtCopy": "Копиране в клипборда", + "common.view.modals.txtEmbed": "Вграждане", + "common.view.modals.txtHeight": "Височина", + "common.view.modals.txtShare": "Споделяне на връзка", + "common.view.modals.txtWidth": "Широчина", + "DE.ApplicationController.convertationErrorText": "Конвертирането е неуспешно.", + "DE.ApplicationController.convertationTimeoutText": "Превишава се времето на изтичане на реализациите.", + "DE.ApplicationController.criticalErrorTitle": "Грешка", + "DE.ApplicationController.downloadErrorText": "Изтеглянето се провали.", + "DE.ApplicationController.downloadTextText": "Документът се изтегли ...", + "DE.ApplicationController.errorAccessDeny": "Опитвате се да извършите действие, за което нямате права.
Моля, свържете се с администратора на сървъра за документи.", + "DE.ApplicationController.errorDefaultMessage": "Код на грешка: %1", + "DE.ApplicationController.errorFilePassProtect": "Файлът е защитен с парола и не може да бъде отворен.", + "DE.ApplicationController.errorFileSizeExceed": "Размерът на файла надвишава ограничението, зададено за вашия сървър.
Моля, свържете се с вашия администратор на Document Server за подробности.", + "DE.ApplicationController.errorUpdateVersionOnDisconnect": "Интернет връзката е възстановена и версията на файла е променена.
Преди да продължите да работите, трябва да изтеглите файла или да копирате съдържанието му, за да сте сигурни, че нищо не е загубено, и след това да презаредите тази страница.", + "DE.ApplicationController.errorUserDrop": "Файлът не може да бъде достъпен в момента.", + "DE.ApplicationController.notcriticalErrorTitle": "Внимание", + "DE.ApplicationController.scriptLoadError": "Връзката е твърде бавна, някои от компонентите не могат да бъдат заредени. Моля, презаредете страницата.", + "DE.ApplicationController.textLoadingDocument": "Зареждане на документ", + "DE.ApplicationController.textOf": "на", + "DE.ApplicationController.txtClose": "Затвори", + "DE.ApplicationController.unknownErrorText": "Неизвестна грешка.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Вашият браузър не се поддържа.", + "DE.ApplicationController.waitText": "Моля изчакай...", + "DE.ApplicationView.txtDownload": "Изтегли", + "DE.ApplicationView.txtEmbed": "Вграждане", + "DE.ApplicationView.txtFullScreen": "Цял екран", + "DE.ApplicationView.txtShare": "Дял" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/locale/ca.json b/apps/documenteditor/forms/locale/ca.json new file mode 100644 index 000000000..319f01d6f --- /dev/null +++ b/apps/documenteditor/forms/locale/ca.json @@ -0,0 +1,44 @@ +{ + "common.view.modals.txtCopy": "Copiat al porta-retalls", + "common.view.modals.txtEmbed": "Incrustar", + "common.view.modals.txtHeight": "Alçada", + "common.view.modals.txtShare": "Compartir Enllaç", + "common.view.modals.txtWidth": "Amplada", + "DE.ApplicationController.convertationErrorText": "Conversió Fallida", + "DE.ApplicationController.convertationTimeoutText": "Conversió fora de temps", + "DE.ApplicationController.criticalErrorTitle": "Error", + "DE.ApplicationController.downloadErrorText": "Descàrrega fallida.", + "DE.ApplicationController.downloadTextText": "Descarregant document...", + "DE.ApplicationController.errorAccessDeny": "Intenteu realitzar una acció per la qual no teniu drets.
Poseu-vos en contacte amb l'administrador del servidor de documents.", + "DE.ApplicationController.errorDefaultMessage": "Codi d'error:%1", + "DE.ApplicationController.errorEditingDownloadas": "S'ha produït un error durant el treball amb el document.
Utilitzeu l'opció \"Desar com a ...\" per desar la còpia de seguretat del fitxer al disc dur del vostre ordinador.", + "DE.ApplicationController.errorFilePassProtect": "El fitxer està protegit amb contrasenya i no es pot obrir.", + "DE.ApplicationController.errorFileSizeExceed": "La mida del fitxer excedeix la limitació establerta per al vostre servidor. Podeu contactar amb l'administrador del Document Server per obtenir més detalls.", + "DE.ApplicationController.errorSubmit": "Error en enviar", + "DE.ApplicationController.errorUpdateVersionOnDisconnect": "La connexió a Internet s'ha restaurat i la versió del fitxer s'ha canviat.
Abans de continuar treballant, heu de descarregar el fitxer o copiar-ne el contingut per assegurar-vos que no es perdi res i, després, tornar a carregar aquesta pàgina.", + "DE.ApplicationController.errorUserDrop": "Ara no es pot accedir al fitxer.", + "DE.ApplicationController.notcriticalErrorTitle": "Avis", + "DE.ApplicationController.scriptLoadError": "La connexió és massa lenta, alguns dels components no s’han pogut carregar. Torneu a carregar la pàgina.", + "DE.ApplicationController.textAnonymous": "Anònim", + "DE.ApplicationController.textClear": "Esborrar tots els camps", + "DE.ApplicationController.textGotIt": "Ho tinc", + "DE.ApplicationController.textGuest": "Convidat", + "DE.ApplicationController.textLoadingDocument": "Carregant document", + "DE.ApplicationController.textNext": "Següent camp", + "DE.ApplicationController.textOf": "de", + "DE.ApplicationController.textRequired": "Ompli tots els camps requerits per enviar el formulari.", + "DE.ApplicationController.textSubmit": "Enviar", + "DE.ApplicationController.textSubmited": "Formulari enviat amb èxit
Faci clic per a tancar el consell", + "DE.ApplicationController.txtClose": "Tancar", + "DE.ApplicationController.unknownErrorText": "Error Desconegut.", + "DE.ApplicationController.unsupportedBrowserErrorText": "El vostre navegador no és compatible.", + "DE.ApplicationController.waitText": "Si us plau, esperi...", + "DE.ApplicationView.txtDownload": "\nDescarregar", + "DE.ApplicationView.txtDownloadDocx": "Desar com a .docx", + "DE.ApplicationView.txtDownloadPdf": "Desar com a pdf", + "DE.ApplicationView.txtEmbed": "Incrustar", + "DE.ApplicationView.txtFileLocation": "Obrir ubicació del fitxer", + "DE.ApplicationView.txtFullScreen": "Pantalla Completa", + "DE.ApplicationView.txtPrint": "Imprimir", + "DE.ApplicationView.txtShare": "Compartir" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/locale/cs.json b/apps/documenteditor/forms/locale/cs.json new file mode 100644 index 000000000..09c23bf7a --- /dev/null +++ b/apps/documenteditor/forms/locale/cs.json @@ -0,0 +1,29 @@ +{ + "common.view.modals.txtCopy": "Zkopírovat do schránky", + "common.view.modals.txtHeight": "Výška", + "common.view.modals.txtShare": "Odkaz pro sdílení", + "common.view.modals.txtWidth": "Šířka", + "DE.ApplicationController.convertationErrorText": "Převod se nezdařil.", + "DE.ApplicationController.convertationTimeoutText": "Překročen časový limit pro provedení převodu.", + "DE.ApplicationController.criticalErrorTitle": "Chyba", + "DE.ApplicationController.downloadErrorText": "Stahování se nezdařilo.", + "DE.ApplicationController.downloadTextText": "Stahování dokumentu…", + "DE.ApplicationController.errorAccessDeny": "Pokoušíte se provést akci, na kterou nemáte oprávnění.
Obraťte se na správce vámi využívaného dokumentového serveru.", + "DE.ApplicationController.errorDefaultMessage": "Kód chyby: %1", + "DE.ApplicationController.errorFilePassProtect": "Soubor je chráněn heslem a bez něj ho nelze otevřít.", + "DE.ApplicationController.errorFileSizeExceed": "Velikost souboru překračuje omezení nastavená na serveru, který využíváte.
Ohledně podrobností se obraťte na správce dokumentového serveru.", + "DE.ApplicationController.errorUpdateVersionOnDisconnect": "Připojení k Internetu bylo obnoveno a verze souboru byla změněna.
Než budete moci pokračovat v práci, bude třeba si soubor stáhnout nebo si zkopírovat jeho obsah, abyste si zajistili, že se nic neztratí a až poté tuto stránku znovu načtěte.", + "DE.ApplicationController.errorUserDrop": "Tento soubor nyní není přístupný.", + "DE.ApplicationController.notcriticalErrorTitle": "Varování", + "DE.ApplicationController.scriptLoadError": "Připojení je příliš pomalé, některé součásti se nepodařilo načíst. Načtěte stránku znovu.", + "DE.ApplicationController.textLoadingDocument": "Načítání dokumentu", + "DE.ApplicationController.textOf": "z", + "DE.ApplicationController.txtClose": "Zavřít", + "DE.ApplicationController.unknownErrorText": "Neznámá chyba.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Vámi používaný webový prohlížeč není podporován.", + "DE.ApplicationController.waitText": "Čekejte prosím…", + "DE.ApplicationView.txtDownload": "Stáhnout", + "DE.ApplicationView.txtFullScreen": "Na celou obrazovku", + "DE.ApplicationView.txtPrint": "Tisk", + "DE.ApplicationView.txtShare": "Sdílet" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/locale/da.json b/apps/documenteditor/forms/locale/da.json new file mode 100644 index 000000000..037b749f5 --- /dev/null +++ b/apps/documenteditor/forms/locale/da.json @@ -0,0 +1,31 @@ +{ + "common.view.modals.txtCopy": "Kopier til udklipsholder", + "common.view.modals.txtEmbed": "Indlejre", + "common.view.modals.txtHeight": "Højde", + "common.view.modals.txtShare": "Del link", + "common.view.modals.txtWidth": "Bredde", + "DE.ApplicationController.convertationErrorText": "Konvertering fejlede.", + "DE.ApplicationController.convertationTimeoutText": "Konverteringstidsfrist er overskredet", + "DE.ApplicationController.criticalErrorTitle": "Fejl", + "DE.ApplicationController.downloadErrorText": "Download fejlet.", + "DE.ApplicationController.downloadTextText": "Hent dokument...", + "DE.ApplicationController.errorAccessDeny": "Du prøver at foretage en handling, som du ikke har rettighederne til.
venligst kontakt din administrator for hjælp.", + "DE.ApplicationController.errorDefaultMessage": "Fejlkode: %1", + "DE.ApplicationController.errorFilePassProtect": "Dokumentet er beskyttet af et kodeord og kunne ikke åbnes.", + "DE.ApplicationController.errorFileSizeExceed": "Filens størrelse overstiger grænsen, som er sat for din server.
Kontakt venligst din administrator for hjælp.", + "DE.ApplicationController.errorUpdateVersionOnDisconnect": "Internetforbindelsen er blevet genoprettet, og filversionen er blevet ændret.
Før du kan fortsætte arbejdet, skal du hente filen eller kopiere indholdet for at sikre, at intet vil blive tabt - og derefter genindlæse denne side.", + "DE.ApplicationController.errorUserDrop": "Der kan ikke opnås adgang til filen lige nu. ", + "DE.ApplicationController.notcriticalErrorTitle": "Advarsel", + "DE.ApplicationController.scriptLoadError": "Forbindelsen er for langsom, og nogle komponenter kunne ikke indlæses. Indlæs siden igen.", + "DE.ApplicationController.textLoadingDocument": "Indlæser dokument", + "DE.ApplicationController.textOf": "af", + "DE.ApplicationController.txtClose": "Luk", + "DE.ApplicationController.unknownErrorText": "Ukendt fejl.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Din browser understøttes ikke.", + "DE.ApplicationController.waitText": "Vent venligst...", + "DE.ApplicationView.txtDownload": "Hent", + "DE.ApplicationView.txtEmbed": "Indlejre", + "DE.ApplicationView.txtFullScreen": "Fuld skærm", + "DE.ApplicationView.txtPrint": "Udskriv", + "DE.ApplicationView.txtShare": "Del" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/locale/de.json b/apps/documenteditor/forms/locale/de.json new file mode 100644 index 000000000..09023d4de --- /dev/null +++ b/apps/documenteditor/forms/locale/de.json @@ -0,0 +1,44 @@ +{ + "common.view.modals.txtCopy": "In die Zwischenablage kopieren", + "common.view.modals.txtEmbed": "Einbetten", + "common.view.modals.txtHeight": "Höhe", + "common.view.modals.txtShare": "Link teilen", + "common.view.modals.txtWidth": "Breite", + "DE.ApplicationController.convertationErrorText": "Konvertierung ist fehlgeschlagen.", + "DE.ApplicationController.convertationTimeoutText": "Zeitüberschreitung bei der Konvertierung.", + "DE.ApplicationController.criticalErrorTitle": "Fehler", + "DE.ApplicationController.downloadErrorText": "Herunterladen ist fehlgeschlagen.", + "DE.ApplicationController.downloadTextText": "Dokument wird heruntergeladen...", + "DE.ApplicationController.errorAccessDeny": "Sie versuchen, eine Aktion durchzuführen, für die Sie keine Rechte haben.
Bitte wenden Sie sich an Ihren Document Serveradministrator.", + "DE.ApplicationController.errorDefaultMessage": "Fehlercode: %1", + "DE.ApplicationController.errorEditingDownloadas": "Fehler bei der Bearbeitung.
Speichern Sie eine Kopie dieser Datei auf Ihrem Computer, indem Sie auf \"Herunterladen als...\" klicken.", + "DE.ApplicationController.errorFilePassProtect": "Das Dokument ist kennwortgeschützt und kann nicht geöffnet werden.", + "DE.ApplicationController.errorFileSizeExceed": "Die Dateigröße überschreitet die für Ihren Server festgelegte Einschränkung.
Weitere Informationen können Sie von Ihrem Document Server-Administrator erhalten.", + "DE.ApplicationController.errorSubmit": "Fehler beim Senden.", + "DE.ApplicationController.errorUpdateVersionOnDisconnect": "Die Internetverbindung wurde wiederhergestellt und die Dateiversion wurde geändert.
Bevor Sie weiterarbeiten können, müssen Sie die Datei herunterladen oder den Inhalt kopieren, um sicherzustellen, dass nichts verloren geht, und diese Seite anschließend neu laden.", + "DE.ApplicationController.errorUserDrop": "Der Zugriff auf diese Datei ist nicht möglich.", + "DE.ApplicationController.notcriticalErrorTitle": "Warnung", + "DE.ApplicationController.scriptLoadError": "Die Verbindung ist zu langsam, einige der Komponenten konnten nicht geladen werden. Bitte laden Sie die Seite erneut.", + "DE.ApplicationController.textAnonymous": "Anonym", + "DE.ApplicationController.textClear": "Alle Felder löschen", + "DE.ApplicationController.textGotIt": "OK", + "DE.ApplicationController.textGuest": "Gast", + "DE.ApplicationController.textLoadingDocument": "Dokument wird geladen...", + "DE.ApplicationController.textNext": "Nächstes Feld", + "DE.ApplicationController.textOf": "von", + "DE.ApplicationController.textRequired": "Füllen Sie alle erforderlichen Felder aus, um das Formular zu senden.", + "DE.ApplicationController.textSubmit": "Senden", + "DE.ApplicationController.textSubmited": "Das Formular wurde erfolgreich abgesendet
Klicken Sie hier, um den Tipp auszublenden", + "DE.ApplicationController.txtClose": "Schließen", + "DE.ApplicationController.unknownErrorText": "Unbekannter Fehler.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Ihr Webbrowser wird nicht unterstützt.", + "DE.ApplicationController.waitText": "Bitte warten...", + "DE.ApplicationView.txtDownload": "Herunterladen", + "DE.ApplicationView.txtDownloadDocx": "Als DOCX herunterladen", + "DE.ApplicationView.txtDownloadPdf": "Als PDF herunterladen", + "DE.ApplicationView.txtEmbed": "Einbetten", + "DE.ApplicationView.txtFileLocation": "Dateispeicherort öffnen", + "DE.ApplicationView.txtFullScreen": "Vollbild-Modus", + "DE.ApplicationView.txtPrint": "Drucken", + "DE.ApplicationView.txtShare": "Freigeben" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/locale/el.json b/apps/documenteditor/forms/locale/el.json new file mode 100644 index 000000000..2a30fac8d --- /dev/null +++ b/apps/documenteditor/forms/locale/el.json @@ -0,0 +1,44 @@ +{ + "common.view.modals.txtCopy": "Αντιγραφή στο πρόχειρο", + "common.view.modals.txtEmbed": "Ενσωμάτωση", + "common.view.modals.txtHeight": "Ύψος", + "common.view.modals.txtShare": "Διαμοιρασμός συνδέσμου", + "common.view.modals.txtWidth": "Πλάτος", + "DE.ApplicationController.convertationErrorText": "Αποτυχία μετατροπής.", + "DE.ApplicationController.convertationTimeoutText": "Υπέρβαση χρονικού ορίου μετατροπής.", + "DE.ApplicationController.criticalErrorTitle": "Σφάλμα", + "DE.ApplicationController.downloadErrorText": "Αποτυχία λήψης.", + "DE.ApplicationController.downloadTextText": "Γίνεται λήψη εγγράφου...", + "DE.ApplicationController.errorAccessDeny": "Προσπαθείτε να εκτελέσετε μια ενέργεια για την οποία δεν έχετε δικαιώματα.
Παρακαλούμε να επικοινωνήστε με τον διαχειριστή του διακομιστή εγγράφων.", + "DE.ApplicationController.errorDefaultMessage": "Κωδικός σφάλματος: %1", + "DE.ApplicationController.errorEditingDownloadas": "Παρουσιάστηκε σφάλμα κατά την εργασία με το έγγραφο.
Χρησιμοποιήστε την επιλογή «Λήψη ως...» για να αποθηκεύσετε το αντίγραφο ασφαλείας στον σκληρό δίσκο του υπολογιστή σας.", + "DE.ApplicationController.errorFilePassProtect": "Το αρχείο προστατεύεται με συνθηματικό και δεν μπορεί να ανοίξει.", + "DE.ApplicationController.errorFileSizeExceed": "Το μέγεθος του αρχείου υπερβαίνει το όριο που έχει οριστεί για τον διακομιστή σας.
Παρακαλούμε επικοινωνήστε με τον διαχειριστή του διακομιστή εγγράφων για λεπτομέρειες.", + "DE.ApplicationController.errorSubmit": "Η υποβολή απέτυχε.", + "DE.ApplicationController.errorUpdateVersionOnDisconnect": "Η σύνδεση στο Διαδίκτυο έχει αποκατασταθεί και η έκδοση του αρχείου έχει αλλάξει.
Προτού συνεχίσετε να εργάζεστε, πρέπει να κατεβάσετε το αρχείο ή να αντιγράψετε το περιεχόμενό του για να βεβαιωθείτε ότι δεν έχει χαθεί τίποτα και, στη συνέχεια, φορτώστε ξανά αυτήν τη σελίδα.", + "DE.ApplicationController.errorUserDrop": "Δεν είναι δυνατή η πρόσβαση στο αρχείο αυτήν τη στιγμή.", + "DE.ApplicationController.notcriticalErrorTitle": "Προειδοποίηση", + "DE.ApplicationController.scriptLoadError": "Η σύνδεση είναι πολύ αργή, δεν ήταν δυνατή η φόρτωση ορισμένων στοιχείων. Φορτώστε ξανά τη σελίδα.", + "DE.ApplicationController.textAnonymous": "Ανώνυμος", + "DE.ApplicationController.textClear": "Εκκαθάριση Όλων των Πεδίων", + "DE.ApplicationController.textGotIt": "Ελήφθη", + "DE.ApplicationController.textGuest": "Επισκέπτης", + "DE.ApplicationController.textLoadingDocument": "Φόρτωση εγγράφου", + "DE.ApplicationController.textNext": "Επόμενο Πεδίο", + "DE.ApplicationController.textOf": "του", + "DE.ApplicationController.textRequired": "Συμπληρώστε όλα τα απαιτούμενα πεδία για την αποστολή της φόρμας.", + "DE.ApplicationController.textSubmit": "Υποβολή", + "DE.ApplicationController.textSubmited": "Η φόρμα υποβλήθηκε με επιτυχία
Κάντε κλικ για να κλείσετε τη συμβουλή ", + "DE.ApplicationController.txtClose": "Κλείσιμο", + "DE.ApplicationController.unknownErrorText": "Άγνωστο σφάλμα.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Ο περιηγητής σας δεν υποστηρίζεται.", + "DE.ApplicationController.waitText": "Παρακαλούμε, περιμένετε...", + "DE.ApplicationView.txtDownload": "Λήψη", + "DE.ApplicationView.txtDownloadDocx": "Λήψη ως docx", + "DE.ApplicationView.txtDownloadPdf": "Λήψη ως pdf", + "DE.ApplicationView.txtEmbed": "Ενσωμάτωση", + "DE.ApplicationView.txtFileLocation": "Άνοιγμα τοποθεσίας αρχείου", + "DE.ApplicationView.txtFullScreen": "Πλήρης οθόνη", + "DE.ApplicationView.txtPrint": "Εκτύπωση", + "DE.ApplicationView.txtShare": "Διαμοιρασμός" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/locale/en.json b/apps/documenteditor/forms/locale/en.json new file mode 100644 index 000000000..ad6982bcb --- /dev/null +++ b/apps/documenteditor/forms/locale/en.json @@ -0,0 +1,62 @@ +{ + "common.view.modals.txtCopy": "Copy to clipboard", + "common.view.modals.txtEmbed": "Embed", + "common.view.modals.txtHeight": "Height", + "common.view.modals.txtShare": "Share Link", + "common.view.modals.txtWidth": "Width", + "DE.ApplicationController.convertationErrorText": "Conversion failed.", + "DE.ApplicationController.convertationTimeoutText": "Conversion timeout exceeded.", + "DE.ApplicationController.criticalErrorTitle": "Error", + "DE.ApplicationController.downloadErrorText": "Download failed.", + "DE.ApplicationController.downloadTextText": "Downloading document...", + "DE.ApplicationController.errorAccessDeny": "You are trying to perform an action you do not have rights for.
Please contact your Document Server administrator.", + "DE.ApplicationController.errorDefaultMessage": "Error code: %1", + "DE.ApplicationController.errorEditingDownloadas": "An error occurred during the work with the document.
Use the 'Download as...' option to save the file backup copy to your computer hard drive.", + "DE.ApplicationController.errorFilePassProtect": "The file is password protected and cannot be opened.", + "DE.ApplicationController.errorFileSizeExceed": "The file size exceeds the limitation set for your server.
Please contact your Document Server administrator for details.", + "DE.ApplicationController.errorSubmit": "Submit failed.", + "DE.ApplicationController.errorUpdateVersionOnDisconnect": "Internet connection has been restored, and the file version has been changed.
Before you can continue working, you need to download the file or copy its content to make sure nothing is lost, and then reload this page.", + "DE.ApplicationController.errorUserDrop": "The file cannot be accessed right now.", + "DE.ApplicationController.errorForceSave": "An error occurred while saving the file. Please use the 'Download as' option to save the file to your computer hard drive or try again later.", + "DE.ApplicationController.notcriticalErrorTitle": "Warning", + "DE.ApplicationController.scriptLoadError": "The connection is too slow, some of the components could not be loaded. Please reload the page.", + "DE.ApplicationController.textAnonymous": "Anonymous", + "DE.ApplicationController.textGotIt": "Got it", + "DE.ApplicationController.textGuest": "Guest", + "DE.ApplicationController.textLoadingDocument": "Loading document", + "DE.ApplicationController.textOf": "of", + "DE.ApplicationController.textRequired": "Fill all required fields to send form.", + "DE.ApplicationController.textSubmited": "Form submitted successfully
Click to close the tip", + "DE.ApplicationController.txtClose": "Close", + "DE.ApplicationController.unknownErrorText": "Unknown error.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Your browser is not supported.", + "DE.ApplicationController.waitText": "Please, wait...", + "DE.ApplicationController.txtEmpty": "(Empty)", + "DE.ApplicationController.txtPressLink": "Press Ctrl and click link", + "DE.ApplicationController.textCloseTip": "Click to close the tip.", + "DE.ApplicationController.titleServerVersion": "Editor updated", + "DE.ApplicationController.errorServerVersion": "The editor version has been updated. The page will be reloaded to apply the changes.", + "DE.ApplicationController.titleUpdateVersion": "Version changed", + "DE.ApplicationController.errorUpdateVersion": "The file version has been changed. The page will be reloaded.", + "DE.ApplicationController.warnLicenseLimitedRenewed": "License needs to be renewed.
You have a limited access to document editing functionality.
Please contact your administrator to get full access", + "DE.ApplicationController.warnLicenseLimitedNoAccess": "License expired.
You have no access to document editing functionality.
Please contact your administrator.", + "DE.ApplicationController.warnLicenseExceeded": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.
Contact your administrator to learn more.", + "DE.ApplicationController.warnLicenseUsersExceeded": "You've reached the user limit for %1 editors. Contact your administrator to learn more.", + "DE.ApplicationController.warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.
Contact %1 sales team for personal upgrade terms.", + "DE.ApplicationController.warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.", + "DE.ApplicationController.textBuyNow": "Visit website", + "DE.ApplicationController.textNoLicenseTitle": "License limit reached", + "DE.ApplicationController.textContactUs": "Contact sales", + "DE.ApplicationView.txtDownload": "Download", + "DE.ApplicationView.txtDownloadDocx": "Download as docx", + "DE.ApplicationView.txtDownloadPdf": "Download as pdf", + "DE.ApplicationView.txtEmbed": "Embed", + "DE.ApplicationView.txtFileLocation": "Open file location", + "DE.ApplicationView.txtFullScreen": "Full Screen", + "DE.ApplicationView.txtPrint": "Print", + "DE.ApplicationView.txtShare": "Share", + "DE.ApplicationView.textSubmit": "Submit", + "DE.ApplicationView.textClear": "Clear All Fields", + "DE.ApplicationView.textNext": "Next Field", + "DE.ApplicationView.txtTheme": "Interface theme" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/locale/es.json b/apps/documenteditor/forms/locale/es.json new file mode 100644 index 000000000..de92ca281 --- /dev/null +++ b/apps/documenteditor/forms/locale/es.json @@ -0,0 +1,44 @@ +{ + "common.view.modals.txtCopy": "Copiar al portapapeles", + "common.view.modals.txtEmbed": "Incorporar", + "common.view.modals.txtHeight": "Altura", + "common.view.modals.txtShare": "Compartir enlace", + "common.view.modals.txtWidth": "Ancho", + "DE.ApplicationController.convertationErrorText": "Fallo de conversión.", + "DE.ApplicationController.convertationTimeoutText": "Se superó el tiempo de espera de conversión.", + "DE.ApplicationController.criticalErrorTitle": "Error", + "DE.ApplicationController.downloadErrorText": "Error en la descarga", + "DE.ApplicationController.downloadTextText": "Descargando documento...", + "DE.ApplicationController.errorAccessDeny": "Está tratando de realizar una acción para la cual no tiene permiso.
Por favor, contacte con su Administrador del Servidor de Documentos.", + "DE.ApplicationController.errorDefaultMessage": "Código de error: %1", + "DE.ApplicationController.errorEditingDownloadas": "Se produjo un error durante el trabajo con el documento.
Use la opción 'Descargar como...' para guardar la copia de seguridad de este archivo en el disco duro de su ordenador.", + "DE.ApplicationController.errorFilePassProtect": "El archivo está protegido por una contraseña y no puede ser abierto.", + "DE.ApplicationController.errorFileSizeExceed": "El tamaño del archivo excede el límite establecido para su servidor. Por favor póngase en contacto con el administrador del Servidor de Documentos para obtener más información.", + "DE.ApplicationController.errorSubmit": "Error al enviar.", + "DE.ApplicationController.errorUpdateVersionOnDisconnect": "La conexión a Internet ha sido restaurada, y la versión del archivo ha sido cambiada. Antes de poder seguir trabajando, es necesario descargar el archivo o copiar su contenido para asegurarse de que no se pierda nada, y luego recargar esta página.", + "DE.ApplicationController.errorUserDrop": "No se puede acceder al archivo en este momento.", + "DE.ApplicationController.notcriticalErrorTitle": "Aviso", + "DE.ApplicationController.scriptLoadError": "La conexión a Internet es demasiado lenta, algunos de los componentes no se han podido cargar. Por favor, recargue la página.", + "DE.ApplicationController.textAnonymous": "Anónimo", + "DE.ApplicationController.textClear": "Borrar todos los campos", + "DE.ApplicationController.textGotIt": "Entiendo", + "DE.ApplicationController.textGuest": "Invitado", + "DE.ApplicationController.textLoadingDocument": "Cargando documento", + "DE.ApplicationController.textNext": "Campo siguiente", + "DE.ApplicationController.textOf": "de", + "DE.ApplicationController.textRequired": "Rellene todos los campos obligatorios para enviar el formulario.", + "DE.ApplicationController.textSubmit": "Enviar", + "DE.ApplicationController.textSubmited": "Formulario enviado con éxito
Haga clic para cerrar el consejo", + "DE.ApplicationController.txtClose": "Cerrar", + "DE.ApplicationController.unknownErrorText": "Error desconocido.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Su navegador no es compatible.", + "DE.ApplicationController.waitText": "Por favor, espere...", + "DE.ApplicationView.txtDownload": "Descargar", + "DE.ApplicationView.txtDownloadDocx": "Descargar como docx", + "DE.ApplicationView.txtDownloadPdf": "Descargar como pdf", + "DE.ApplicationView.txtEmbed": "Incorporar", + "DE.ApplicationView.txtFileLocation": "Abrir ubicación del archivo", + "DE.ApplicationView.txtFullScreen": "Pantalla Completa", + "DE.ApplicationView.txtPrint": "Imprimir", + "DE.ApplicationView.txtShare": "Compartir" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/locale/fr.json b/apps/documenteditor/forms/locale/fr.json new file mode 100644 index 000000000..c56b67a2f --- /dev/null +++ b/apps/documenteditor/forms/locale/fr.json @@ -0,0 +1,44 @@ +{ + "common.view.modals.txtCopy": "Copier dans le Presse-papiers", + "common.view.modals.txtEmbed": "Incorporer", + "common.view.modals.txtHeight": "Hauteur", + "common.view.modals.txtShare": "Partager un lien", + "common.view.modals.txtWidth": "Largeur", + "DE.ApplicationController.convertationErrorText": "Échec de la conversion.", + "DE.ApplicationController.convertationTimeoutText": "Délai d'attente de la conversion dépassé ", + "DE.ApplicationController.criticalErrorTitle": "Erreur", + "DE.ApplicationController.downloadErrorText": "Échec du téléchargement.", + "DE.ApplicationController.downloadTextText": "Téléchargement du document...", + "DE.ApplicationController.errorAccessDeny": "Vous tentez d'exéсuter une action pour laquelle vous ne disposez pas des droits.
Veuillez contacter l'administrateur de Document Server.", + "DE.ApplicationController.errorDefaultMessage": "Code d'erreur: %1", + "DE.ApplicationController.errorEditingDownloadas": "Une erreur s'est produite lors du travail avec le document.
Utilisez l'option 'Télécharger comme...' pour enregistrer une copie de sauvegarde du fichier sur le disque dur de votre ordinateur.", + "DE.ApplicationController.errorFilePassProtect": "Le fichier est protégé par le mot de passe et ne peut pas être ouvert.", + "DE.ApplicationController.errorFileSizeExceed": "La taille du fichier dépasse les limites établies sur votre serveur.
Veuillez contacter votre administrateur de Document Server pour obtenir plus d'informations. ", + "DE.ApplicationController.errorSubmit": "Échec de soumission", + "DE.ApplicationController.errorUpdateVersionOnDisconnect": "La connexion internet a été rétablie, la version du fichier est modifiée.
Avant de continuer, téléchargez le fichier ou copiez le contenu pour vous assurer que tous les changements ont été enregistrés, et rechargez la page.", + "DE.ApplicationController.errorUserDrop": "Impossible d'accéder au fichier.", + "DE.ApplicationController.notcriticalErrorTitle": "Avertissement", + "DE.ApplicationController.scriptLoadError": "La connexion est trop lente, certains éléments ne peuvent pas être chargés. Veuillez recharger la page.", + "DE.ApplicationController.textAnonymous": "Anonyme", + "DE.ApplicationController.textClear": "Effacer tous les champs", + "DE.ApplicationController.textGotIt": "C'est compris", + "DE.ApplicationController.textGuest": "Invité", + "DE.ApplicationController.textLoadingDocument": "Chargement du document", + "DE.ApplicationController.textNext": "Champ suivant", + "DE.ApplicationController.textOf": "de", + "DE.ApplicationController.textRequired": "Veuillez remplir tous les champs obligatoires avant d'envoyer le formulaire.", + "DE.ApplicationController.textSubmit": "Soumettre ", + "DE.ApplicationController.textSubmited": "Le formulaire a été soumis avec succès
Cliquez ici pour fermer l'astuce", + "DE.ApplicationController.txtClose": "Fermer", + "DE.ApplicationController.unknownErrorText": "Erreur inconnue.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Votre navigateur n'est pas pris en charge.", + "DE.ApplicationController.waitText": "Veuillez patienter...", + "DE.ApplicationView.txtDownload": "Télécharger", + "DE.ApplicationView.txtDownloadDocx": "Télécharger en tant que docx", + "DE.ApplicationView.txtDownloadPdf": "Télécharger en tant que pdf", + "DE.ApplicationView.txtEmbed": "Incorporer", + "DE.ApplicationView.txtFileLocation": "Ouvrir l'emplacement du fichier", + "DE.ApplicationView.txtFullScreen": "Plein écran", + "DE.ApplicationView.txtPrint": "Imprimer", + "DE.ApplicationView.txtShare": "Partager" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/locale/hu.json b/apps/documenteditor/forms/locale/hu.json new file mode 100644 index 000000000..b11971151 --- /dev/null +++ b/apps/documenteditor/forms/locale/hu.json @@ -0,0 +1,31 @@ +{ + "common.view.modals.txtCopy": "Másolás vágólapra", + "common.view.modals.txtEmbed": "Beágyazás", + "common.view.modals.txtHeight": "Magasság", + "common.view.modals.txtShare": "Hivatkozás megosztása", + "common.view.modals.txtWidth": "Szélesség", + "DE.ApplicationController.convertationErrorText": "Az átalakítás nem sikerült.", + "DE.ApplicationController.convertationTimeoutText": "Időtúllépés az átalakítás során.", + "DE.ApplicationController.criticalErrorTitle": "Hiba", + "DE.ApplicationController.downloadErrorText": "Sikertelen letöltés.", + "DE.ApplicationController.downloadTextText": "Dokumentum letöltése...", + "DE.ApplicationController.errorAccessDeny": "Olyan műveletet próbál végrehajtani, melyre nincs jogosultsága.
Vegye fel a kapcsolatot a Document Server adminisztrátorával.", + "DE.ApplicationController.errorDefaultMessage": "Hibakód: %1", + "DE.ApplicationController.errorFilePassProtect": "A dokumentum jelszóval védett, és nem nyitható meg.", + "DE.ApplicationController.errorFileSizeExceed": "A fájlméret meghaladja a szerverre beállított korlátozást.
Kérjük, forduljon a Document Server rendszergazdájához a részletekért.", + "DE.ApplicationController.errorUpdateVersionOnDisconnect": "Az internet kapcsolat helyreállt, és a fájl verziója megváltozott.
Mielőtt folytatná a munkát, töltse le a fájlt, vagy másolja vágólapra annak tartalmát, hogy megbizonyosodjon arról, hogy semmi nem veszik el, majd töltse újra az oldalt.", + "DE.ApplicationController.errorUserDrop": "A dokumentum jelenleg nem elérhető.", + "DE.ApplicationController.notcriticalErrorTitle": "Figyelmeztetés", + "DE.ApplicationController.scriptLoadError": "A kapcsolat túl lassú, néhány komponens nem töltődött be. Frissítse az oldalt.", + "DE.ApplicationController.textLoadingDocument": "Dokumentum betöltése", + "DE.ApplicationController.textOf": "of", + "DE.ApplicationController.txtClose": "Bezárás", + "DE.ApplicationController.unknownErrorText": "Ismeretlen hiba.", + "DE.ApplicationController.unsupportedBrowserErrorText": "A böngészője nem támogatott.", + "DE.ApplicationController.waitText": "Kérjük, várjon...", + "DE.ApplicationView.txtDownload": "Letöltés", + "DE.ApplicationView.txtEmbed": "Beágyazás", + "DE.ApplicationView.txtFullScreen": "Teljes képernyő", + "DE.ApplicationView.txtPrint": "Nyomtatás", + "DE.ApplicationView.txtShare": "Megosztás" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/locale/it.json b/apps/documenteditor/forms/locale/it.json new file mode 100644 index 000000000..b18e037e0 --- /dev/null +++ b/apps/documenteditor/forms/locale/it.json @@ -0,0 +1,40 @@ +{ + "common.view.modals.txtCopy": "Copia negli appunti", + "common.view.modals.txtEmbed": "Incorpora", + "common.view.modals.txtHeight": "Altezza", + "common.view.modals.txtShare": "Condividi collegamento", + "common.view.modals.txtWidth": "Larghezza", + "DE.ApplicationController.convertationErrorText": "Conversione fallita.", + "DE.ApplicationController.convertationTimeoutText": "È stato superato il tempo limite della conversione.", + "DE.ApplicationController.criticalErrorTitle": "Errore", + "DE.ApplicationController.downloadErrorText": "Scaricamento fallito", + "DE.ApplicationController.downloadTextText": "Scaricamento del documento in corso...", + "DE.ApplicationController.errorAccessDeny": "Stai tentando di eseguire un'azione per la quale non disponi di permessi sufficienti.
Si prega di contattare l'amministratore del Server dei Documenti.", + "DE.ApplicationController.errorDefaultMessage": "Codice errore: %1", + "DE.ApplicationController.errorEditingDownloadas": "Si è verificato un errore durante il lavoro con il documento.
Utilizzare l'opzione 'Scarica come ...' per salvare la copia di backup del file sul disco rigido del computer.", + "DE.ApplicationController.errorFilePassProtect": "Il file è protetto da una password. Impossibile aprirlo.", + "DE.ApplicationController.errorFileSizeExceed": "La dimensione del file supera la limitazione impostata per il tuo server.
Per i dettagli, contatta l'amministratore del Document server.", + "DE.ApplicationController.errorSubmit": "Invio fallito.", + "DE.ApplicationController.errorUpdateVersionOnDisconnect": "La connessione Internet è stata ripristinata e la versione del file è stata modificata.
Prima di poter continuare a lavorare, è necessario scaricare il file o copiarne il contenuto per assicurarsi che non vada perso nulla, successivamente ricaricare questa pagina.", + "DE.ApplicationController.errorUserDrop": "Impossibile accedere al file subito.", + "DE.ApplicationController.notcriticalErrorTitle": "Avviso", + "DE.ApplicationController.scriptLoadError": "La connessione è troppo lenta, alcuni componenti non possono essere caricati. Si prega di ricaricare la pagina.", + "DE.ApplicationController.textClear": "‎Cancella tutti i campi‎", + "DE.ApplicationController.textLoadingDocument": "Caricamento del documento", + "DE.ApplicationController.textNext": "Campo successivo", + "DE.ApplicationController.textOf": "di", + "DE.ApplicationController.textSubmit": "‎Invia‎", + "DE.ApplicationController.textSubmited": "Modulo inviato con successo
Fare click per chiudere la notifica
", + "DE.ApplicationController.txtClose": "Chiudi", + "DE.ApplicationController.unknownErrorText": "Errore sconosciuto.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Il tuo browser non è supportato.", + "DE.ApplicationController.waitText": "Per favore, attendi...", + "DE.ApplicationView.txtDownload": "Scarica", + "DE.ApplicationView.txtDownloadDocx": "Scarica come .docx", + "DE.ApplicationView.txtDownloadPdf": "Scarica come .pdf", + "DE.ApplicationView.txtEmbed": "Incorpora", + "DE.ApplicationView.txtFileLocation": "Apri percorso file", + "DE.ApplicationView.txtFullScreen": "Schermo intero", + "DE.ApplicationView.txtPrint": "Stampa", + "DE.ApplicationView.txtShare": "Condividi" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/locale/ja.json b/apps/documenteditor/forms/locale/ja.json new file mode 100644 index 000000000..17e852b32 --- /dev/null +++ b/apps/documenteditor/forms/locale/ja.json @@ -0,0 +1,31 @@ +{ + "common.view.modals.txtCopy": "クリップボードにコピー", + "common.view.modals.txtEmbed": "埋め込み", + "common.view.modals.txtHeight": "高さ", + "common.view.modals.txtShare": "共有リンク", + "common.view.modals.txtWidth": "幅", + "DE.ApplicationController.convertationErrorText": "変換に失敗しました", + "DE.ApplicationController.convertationTimeoutText": "変換のタイムアウトを超過しました。", + "DE.ApplicationController.criticalErrorTitle": "エラー", + "DE.ApplicationController.downloadErrorText": "ダウンロードに失敗しました", + "DE.ApplicationController.downloadTextText": "ドキュメントのダウンロード中...", + "DE.ApplicationController.errorAccessDeny": "利用権限がない操作をしようとしました。
Documentサーバー管理者に連絡してください。", + "DE.ApplicationController.errorDefaultMessage": "エラー コード: %1", + "DE.ApplicationController.errorFilePassProtect": "ドキュメントがパスワードで保護されているため開くことができません", + "DE.ApplicationController.errorFileSizeExceed": "ファイルサイズがサーバーで設定された制限を超過しています。
Documentサーバー管理者に詳細をお問い合わせください。", + "DE.ApplicationController.errorUpdateVersionOnDisconnect": "インターネット接続が復旧し、ファイルのバージョンが更新されています。
作業を継続する前に、ファイルをダウンロードするか内容をコピーして、変更が消えてしまわないようにしてからページを再読み込みしてください。", + "DE.ApplicationController.errorUserDrop": "今、ファイルにアクセスすることはできません。", + "DE.ApplicationController.notcriticalErrorTitle": "警告", + "DE.ApplicationController.scriptLoadError": "接続が非常に遅いため、いくつかのコンポーネントはロードされませんでした。ページを再読み込みしてください。", + "DE.ApplicationController.textLoadingDocument": "ドキュメントを読み込んでいます", + "DE.ApplicationController.textOf": "から", + "DE.ApplicationController.txtClose": "閉じる", + "DE.ApplicationController.unknownErrorText": "不明なエラー", + "DE.ApplicationController.unsupportedBrowserErrorText": "お使いのブラウザがサポートされていません。", + "DE.ApplicationController.waitText": "少々お待ちください...", + "DE.ApplicationView.txtDownload": "ダウンロード", + "DE.ApplicationView.txtEmbed": "埋め込み", + "DE.ApplicationView.txtFullScreen": "全画面表示", + "DE.ApplicationView.txtPrint": "印刷する", + "DE.ApplicationView.txtShare": "シェア" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/locale/ko.json b/apps/documenteditor/forms/locale/ko.json new file mode 100644 index 000000000..4ba731456 --- /dev/null +++ b/apps/documenteditor/forms/locale/ko.json @@ -0,0 +1,30 @@ +{ + "common.view.modals.txtCopy": "클립보드로 복사", + "common.view.modals.txtEmbed": "개체 삽입", + "common.view.modals.txtHeight": "높이", + "common.view.modals.txtShare": "링크 공유", + "common.view.modals.txtWidth": "너비", + "DE.ApplicationController.convertationErrorText": "변환 실패 ", + "DE.ApplicationController.convertationTimeoutText": "변환 시간을 초과했습니다.", + "DE.ApplicationController.criticalErrorTitle": "오류", + "DE.ApplicationController.downloadErrorText": "다운로드 실패", + "DE.ApplicationController.downloadTextText": "문서 다운로드 중...", + "DE.ApplicationController.errorAccessDeny": "권한이없는 작업을 수행하려고합니다.
Document Server 관리자에게 문의하십시오.", + "DE.ApplicationController.errorDefaultMessage": "오류 코드: %1", + "DE.ApplicationController.errorFilePassProtect": "이 문서는 암호로 보호되어있어 열 수 없습니다.", + "DE.ApplicationController.errorFileSizeExceed": "파일의 크기가 서버에서 정해진 범위를 초과 했습니다. 문서 서버 관리자에게 해당 내용에 대한 자세한 안내를 받아 보시기 바랍니다.", + "DE.ApplicationController.errorUpdateVersionOnDisconnect": "인터넷 연결이 복구 되었으며 파일에 수정 사항이 발생되었습니다. 작업을 계속 하시기 전에 반드시 기존의 파일을 다운로드하거나 내용을 복사해서 작업 내용을 잃어 버리는 일이 없도록 한 후에 이 페이지를 새로 고침(reload) 해 주시기 바랍니다.", + "DE.ApplicationController.errorUserDrop": "파일에 지금 액세스 할 수 없습니다.", + "DE.ApplicationController.notcriticalErrorTitle": "경고", + "DE.ApplicationController.scriptLoadError": "연결 속도가 느려, 일부 요소들이 로드되지 않았습니다. 페이지를 다시 새로 고침해주세요.", + "DE.ApplicationController.textLoadingDocument": "문서 로드 중", + "DE.ApplicationController.textOf": "의", + "DE.ApplicationController.txtClose": "닫기", + "DE.ApplicationController.unknownErrorText": "알 수없는 오류.", + "DE.ApplicationController.unsupportedBrowserErrorText": "사용중인 브라우저가 지원되지 않습니다.", + "DE.ApplicationController.waitText": "잠시만 기달려주세요...", + "DE.ApplicationView.txtDownload": "다운로드 ", + "DE.ApplicationView.txtEmbed": "개체 삽입", + "DE.ApplicationView.txtFullScreen": "전체 화면", + "DE.ApplicationView.txtShare": "공유" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/locale/lo.json b/apps/documenteditor/forms/locale/lo.json new file mode 100644 index 000000000..d7975ae97 --- /dev/null +++ b/apps/documenteditor/forms/locale/lo.json @@ -0,0 +1,40 @@ +{ + "common.view.modals.txtCopy": "ເກັບໄວ້ໃນຄຣິບບອດ", + "common.view.modals.txtEmbed": "ຝັງໄວ້", + "common.view.modals.txtHeight": "ລວງສູງ", + "common.view.modals.txtShare": "ແບ່ງປັນລິ້ງ", + "common.view.modals.txtWidth": "ລວງກວ້າງ", + "DE.ApplicationController.convertationErrorText": " ການປ່ຽນແປງບໍ່ສຳເລັດ.", + "DE.ApplicationController.convertationTimeoutText": "ໝົດເວລາການປ່ຽນແປງ.", + "DE.ApplicationController.criticalErrorTitle": "ຂໍ້ຜິດພາດ", + "DE.ApplicationController.downloadErrorText": "ດາວໂຫຼດບໍ່ສຳເລັດ.", + "DE.ApplicationController.downloadTextText": "ກຳລັງດາວໂຫຼດເອກະສານ", + "DE.ApplicationController.errorAccessDeny": "ທ່ານບໍ່ມີສິດຈະດຳເນີນການອັນນີ້.
ກະລຸນະຕິດຕໍ່ຜູ້ຄຸ້ມຄອງລົບຂອງທ່ານ", + "DE.ApplicationController.errorDefaultMessage": "ລະຫັດຂໍ້ຜິດພາດ: %1", + "DE.ApplicationController.errorEditingDownloadas": "ເກີດຂໍ້ຜິດພາດໃນລະຫວ່າງການເຮັດວຽກກັບເອກກະສານ.
ໃຊ້ຕົວເລືອກ 'ດາວໂຫລດເປັນ ... ' ເພື່ອບັນທຶກເອກະສານເກັບໄວ້ໃນຮາດໄດຄອມພິວເຕີຂອງທ່ານ.", + "DE.ApplicationController.errorFilePassProtect": "ມີລະຫັດປົກປ້ອງຟາຍນີ້ຈຶ່ງບໍ່ສາມາດເປີດໄດ້", + "DE.ApplicationController.errorFileSizeExceed": "ຂະໜາດຂອງຟາຍໃຫຍ່ກວ່າທີ່ກຳນົດໄວ້ໃນລະບົບ.
ກະລຸນະຕິດຕໍ່ຜູ້ຄຸ້ມຄອງລົບຂອງທ່ານ", + "DE.ApplicationController.errorSubmit": "ສົ່ງອອກຜິດພາດ", + "DE.ApplicationController.errorUpdateVersionOnDisconnect": "ການເຊື່ອຕໍ່ອິນເຕີເນັດຫາກໍ່ກັບມາ, ແລະຟາຍເອກະສານໄດ້ມີການປ່ຽນແປງແລ້ວ. ກ່ອນທີ່ທ່ານຈະດຳເນີການຕໍ່ໄປ, ທ່ານຕ້ອງໄດ້ດາວໂຫຼດຟາຍ ຫຼືສຳເນົາເນື້ອຫາ ເພື່ອປ້ອງການການສູນເສຍ, ແລະກໍ່ທຳການໂຫຼດໜ້າຄືນອີກຄັ້ງ.", + "DE.ApplicationController.errorUserDrop": "ບໍ່ສາມາດເຂົ້າເຖິງຟາຍໄດ້", + "DE.ApplicationController.notcriticalErrorTitle": "ເຕືອນ", + "DE.ApplicationController.scriptLoadError": "ການເຊື່ອມຕໍ່ອິນເຕີເນັດຊ້າເກີນໄປ, ບາງອົງປະກອບບໍ່ສາມາດໂຫຼດໄດ້. ກະລຸນາໂຫຼດໜ້ານີ້ຄືນໃໝ່", + "DE.ApplicationController.textClear": "ລຶບລ້າງຟີລທັງໝົດ", + "DE.ApplicationController.textLoadingDocument": "ກຳລັງໂຫຼດເອກະສານ", + "DE.ApplicationController.textNext": "ຟີລທັດໄປ", + "DE.ApplicationController.textOf": "ຂອງ", + "DE.ApplicationController.textSubmit": "ສົ່ງອອກ", + "DE.ApplicationController.textSubmited": " ແບບຟອມທີ່ສົ່ງມາແລ້ວ", + "DE.ApplicationController.txtClose": " ປິດ", + "DE.ApplicationController.unknownErrorText": "ມີຂໍ້ຜິດພາດທີ່ບໍ່ຮູ້ສາເຫດ", + "DE.ApplicationController.unsupportedBrowserErrorText": "ບຣາວເຊີຂອງທ່ານບໍ່ສາມານຳໃຊ້ໄດ້", + "DE.ApplicationController.waitText": "ກະລຸນາລໍຖ້າ...", + "DE.ApplicationView.txtDownload": "ດາວໂຫຼດ", + "DE.ApplicationView.txtDownloadDocx": "ດາວໂຫລດເປັນເອກະສານ", + "DE.ApplicationView.txtDownloadPdf": "ດາວໂຫລດເປັນPDF", + "DE.ApplicationView.txtEmbed": "ຝັງໄວ້", + "DE.ApplicationView.txtFileLocation": "ເປີດບ່ອນຕຳແໜ່ງເອກະສານ", + "DE.ApplicationView.txtFullScreen": "ເຕັມຈໍ", + "DE.ApplicationView.txtPrint": "ພິມ", + "DE.ApplicationView.txtShare": "ແບ່ງປັນ" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/locale/lv.json b/apps/documenteditor/forms/locale/lv.json new file mode 100644 index 000000000..eab88f7f9 --- /dev/null +++ b/apps/documenteditor/forms/locale/lv.json @@ -0,0 +1,22 @@ +{ + "common.view.modals.txtCopy": "Nokopēts starpliktuvē", + "common.view.modals.txtHeight": "Augstums", + "common.view.modals.txtWidth": "Platums", + "DE.ApplicationController.convertationErrorText": "Konversija neizdevās.", + "DE.ApplicationController.convertationTimeoutText": "Konversijas taimauts pārsniegts.", + "DE.ApplicationController.criticalErrorTitle": "Kļūda", + "DE.ApplicationController.downloadErrorText": "Lejuplāde neizdevās.", + "DE.ApplicationController.downloadTextText": "Lejuplādē dokumentu...", + "DE.ApplicationController.errorAccessDeny": "Jūs mēģināt veikt darbību, kuru nedrīkstat veikt.
Lūdzu, sazinieties ar savu dokumentu servera administratoru.", + "DE.ApplicationController.errorDefaultMessage": "Kļūdas kods: %1", + "DE.ApplicationController.errorFilePassProtect": "Fails ir aizsargāts ar paroli un to nevar atvērt.", + "DE.ApplicationController.errorUserDrop": "Failam šobrīd nevar piekļūt.", + "DE.ApplicationController.notcriticalErrorTitle": "Brīdinājums", + "DE.ApplicationController.textLoadingDocument": "Ielādē dokumentu", + "DE.ApplicationController.textOf": "no", + "DE.ApplicationController.txtClose": "Aizvērt", + "DE.ApplicationController.unknownErrorText": "Nezināma kļūda.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Jūsu pārlūkprogramma nav atbalstīta.", + "DE.ApplicationView.txtDownload": "Lejupielādēt", + "DE.ApplicationView.txtShare": "Dalīties" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/locale/nb.json b/apps/documenteditor/forms/locale/nb.json new file mode 100644 index 000000000..cffee6416 --- /dev/null +++ b/apps/documenteditor/forms/locale/nb.json @@ -0,0 +1,19 @@ +{ + "common.view.modals.txtCopy": "Kopier til utklippstavle", + "common.view.modals.txtHeight": "Høyde", + "common.view.modals.txtShare": "Del link", + "common.view.modals.txtWidth": "Bredde", + "DE.ApplicationController.criticalErrorTitle": "Feil", + "DE.ApplicationController.downloadErrorText": "Nedlasting feilet.", + "DE.ApplicationController.errorDefaultMessage": "Feilkode: %1", + "DE.ApplicationController.notcriticalErrorTitle": "Advarsel", + "DE.ApplicationController.textLoadingDocument": "Laster dokument", + "DE.ApplicationController.textOf": "av", + "DE.ApplicationController.txtClose": "Lukk", + "DE.ApplicationController.unknownErrorText": "Ukjent feil.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Nettleseren din er ikke støttet.", + "DE.ApplicationController.waitText": "Vennligst vent...", + "DE.ApplicationView.txtDownload": "Last ned", + "DE.ApplicationView.txtFullScreen": "Fullskjerm", + "DE.ApplicationView.txtShare": "Del" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/locale/nl.json b/apps/documenteditor/forms/locale/nl.json new file mode 100644 index 000000000..424c279f0 --- /dev/null +++ b/apps/documenteditor/forms/locale/nl.json @@ -0,0 +1,44 @@ +{ + "common.view.modals.txtCopy": "Kopieer naar klembord", + "common.view.modals.txtEmbed": "Invoegen", + "common.view.modals.txtHeight": "Hoogte", + "common.view.modals.txtShare": "Link delen", + "common.view.modals.txtWidth": "Breedte", + "DE.ApplicationController.convertationErrorText": "Conversie is mislukt", + "DE.ApplicationController.convertationTimeoutText": "Time-out voor conversie overschreden.", + "DE.ApplicationController.criticalErrorTitle": "Fout", + "DE.ApplicationController.downloadErrorText": "Download mislukt.", + "DE.ApplicationController.downloadTextText": "Document wordt gedownload...", + "DE.ApplicationController.errorAccessDeny": "U probeert een actie uit te voeren waarvoor u geen rechten hebt.
Neem contact op met de beheerder van de documentserver.", + "DE.ApplicationController.errorDefaultMessage": "Foutcode: %1", + "DE.ApplicationController.errorEditingDownloadas": "Er is een fout ontstaan tijdens het werken met het document.
Gebruik de 'Opslaan als...' optie om het bestand als back-upkopie op te slaan op uw computer.", + "DE.ApplicationController.errorFilePassProtect": "Het bestand is beschermd met een wachtwoord en kan niet worden geopend.", + "DE.ApplicationController.errorFileSizeExceed": "De bestandsgrootte overschrijdt de limiet die is ingesteld voor uw server.
Neem contact op met uw Document Server-beheerder voor details.", + "DE.ApplicationController.errorSubmit": "Verzenden mislukt. ", + "DE.ApplicationController.errorUpdateVersionOnDisconnect": "De internetverbinding is hersteld en de bestandsversie is gewijzigd.
Voordat u verder kunt werken, moet u het bestand downloaden of de inhoud kopiëren om er zeker van te zijn dat er niets verloren gaat, en deze pagina vervolgens opnieuw laden.", + "DE.ApplicationController.errorUserDrop": "Toegang tot het bestand is op dit moment niet mogelijk.", + "DE.ApplicationController.notcriticalErrorTitle": "Waarschuwing", + "DE.ApplicationController.scriptLoadError": "De verbinding is te langzaam, sommige componenten konden niet geladen worden. Laad de pagina opnieuw.", + "DE.ApplicationController.textAnonymous": "Anoniem", + "DE.ApplicationController.textClear": "Wis Alle Velden", + "DE.ApplicationController.textGotIt": "OK", + "DE.ApplicationController.textGuest": "Gast", + "DE.ApplicationController.textLoadingDocument": "Document wordt geladen", + "DE.ApplicationController.textNext": "Volgend veld ", + "DE.ApplicationController.textOf": "van", + "DE.ApplicationController.textRequired": "Vul alle verplichte velden in om het formulier te verzenden.", + "DE.ApplicationController.textSubmit": "Verzenden ", + "DE.ApplicationController.textSubmited": "Formulier succesvol ingediend
Klik om de tip te sluiten", + "DE.ApplicationController.txtClose": "Sluiten", + "DE.ApplicationController.unknownErrorText": "Onbekende fout.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Uw browser wordt niet ondersteund.", + "DE.ApplicationController.waitText": "Een moment geduld", + "DE.ApplicationView.txtDownload": "Downloaden", + "DE.ApplicationView.txtDownloadDocx": "Downloaden als docx", + "DE.ApplicationView.txtDownloadPdf": "Downloaden als PDF", + "DE.ApplicationView.txtEmbed": "Invoegen", + "DE.ApplicationView.txtFileLocation": "Open bestandslocatie", + "DE.ApplicationView.txtFullScreen": "Volledig scherm", + "DE.ApplicationView.txtPrint": "Afdrukken", + "DE.ApplicationView.txtShare": "Delen" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/locale/pl.json b/apps/documenteditor/forms/locale/pl.json new file mode 100644 index 000000000..b7b983c42 --- /dev/null +++ b/apps/documenteditor/forms/locale/pl.json @@ -0,0 +1,31 @@ +{ + "common.view.modals.txtCopy": "Skopiuj do schowka", + "common.view.modals.txtEmbed": "Osadź", + "common.view.modals.txtHeight": "Wysokość", + "common.view.modals.txtShare": "Udostępnij link", + "common.view.modals.txtWidth": "Szerokość", + "DE.ApplicationController.convertationErrorText": "Konwertowanie nieudane.", + "DE.ApplicationController.convertationTimeoutText": "Przekroczono limit czasu konwersji.", + "DE.ApplicationController.criticalErrorTitle": "Błąd", + "DE.ApplicationController.downloadErrorText": "Pobieranie nieudane.", + "DE.ApplicationController.downloadTextText": "Pobieranie dokumentu...", + "DE.ApplicationController.errorAccessDeny": "Próbujesz wykonać działanie, na które nie masz uprawnień.
Proszę skontaktować się z administratorem serwera dokumentów.", + "DE.ApplicationController.errorDefaultMessage": "Kod błędu: %1", + "DE.ApplicationController.errorFilePassProtect": "Dokument jest chroniony hasłem i nie może być otwarty.", + "DE.ApplicationController.errorFileSizeExceed": "Rozmiar pliku przekracza dopuszczone limit dla twojego serwera.
Prosimy o kontakt z administratorem twojego serwera w celu uzyskania szczegółowych informacji.", + "DE.ApplicationController.errorUpdateVersionOnDisconnect": "Połączenie z internetem zostało odzyskane, a wersja pliku uległa zmianie.
Zanim będzie mógł kontynuować pracę, musisz pobrać plik albo skopiować jego zawartość, aby mieć pewność, że nic nie zostało utracone, a następnie odświeżyć stronę.", + "DE.ApplicationController.errorUserDrop": "Nie można uzyskać dostępu do tego pliku.", + "DE.ApplicationController.notcriticalErrorTitle": "Ostrzeżenie", + "DE.ApplicationController.scriptLoadError": "Połączenie jest zbyt wolne, niektóre komponenty mogą być niezaładowane. Prosimy odświeżyć stronę.", + "DE.ApplicationController.textLoadingDocument": "Ładowanie dokumentu", + "DE.ApplicationController.textOf": "z", + "DE.ApplicationController.txtClose": "Zamknij", + "DE.ApplicationController.unknownErrorText": "Nieznany błąd.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Twoja przeglądarka nie jest wspierana.", + "DE.ApplicationController.waitText": "Proszę czekać...", + "DE.ApplicationView.txtDownload": "Pobierz", + "DE.ApplicationView.txtEmbed": "Osadź", + "DE.ApplicationView.txtFullScreen": "Pełny ekran", + "DE.ApplicationView.txtPrint": "Drukuj", + "DE.ApplicationView.txtShare": "Udostępnij" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/locale/pt.json b/apps/documenteditor/forms/locale/pt.json new file mode 100644 index 000000000..ec784e55d --- /dev/null +++ b/apps/documenteditor/forms/locale/pt.json @@ -0,0 +1,44 @@ +{ + "common.view.modals.txtCopy": "Copiar para a área de transferência", + "common.view.modals.txtEmbed": "Incorporar", + "common.view.modals.txtHeight": "Altura", + "common.view.modals.txtShare": "Compartilhar link", + "common.view.modals.txtWidth": "Largura", + "DE.ApplicationController.convertationErrorText": "Conversão falhou.", + "DE.ApplicationController.convertationTimeoutText": "Tempo limite de conversão excedido.", + "DE.ApplicationController.criticalErrorTitle": "Erro", + "DE.ApplicationController.downloadErrorText": "Transferência falhou.", + "DE.ApplicationController.downloadTextText": "Transferindo documento...", + "DE.ApplicationController.errorAccessDeny": "Você está tentando executar uma ação para a qual não tem direitos.
Entre em contato com o administrador do Document Server.", + "DE.ApplicationController.errorDefaultMessage": "Código do erro: %1", + "DE.ApplicationController.errorEditingDownloadas": "Ocorreu um erro durante o trabalho com o documento.
Utilizar a opção 'Download as...' para salvar a cópia de backup do arquivo no disco rígido do seu computador.", + "DE.ApplicationController.errorFilePassProtect": "O documento é protegido por senha e não pode ser aberto.", + "DE.ApplicationController.errorFileSizeExceed": "O tamanho do arquivo excede o limite de seu servidor.
Por favor, contate seu administrador de Servidor de Documentos para detalhes.", + "DE.ApplicationController.errorSubmit": "Falha no envio.", + "DE.ApplicationController.errorUpdateVersionOnDisconnect": "A conexão à internet foi restabelecida, e a versão do arquivo foi alterada.
Antes de continuar seu trabalho, transfira o arquivo ou copie seu conteúdo para assegurar que nada seja perdido, e então, recarregue esta página.", + "DE.ApplicationController.errorUserDrop": "O arquivo não pode ser acessado agora.", + "DE.ApplicationController.notcriticalErrorTitle": "Aviso", + "DE.ApplicationController.scriptLoadError": "A conexão está muito lenta, e alguns dos componentes não puderam ser carregados. Por favor, recarregue a página.", + "DE.ApplicationController.textAnonymous": "Anônimo", + "DE.ApplicationController.textClear": "Limpar todos os campos", + "DE.ApplicationController.textGotIt": "Entendi", + "DE.ApplicationController.textGuest": "Convidado(a)", + "DE.ApplicationController.textLoadingDocument": "Carregando documento", + "DE.ApplicationController.textNext": "Próximo campo", + "DE.ApplicationController.textOf": "de", + "DE.ApplicationController.textRequired": "Preencha todos os campos obrigatórios para enviar o formulário.", + "DE.ApplicationController.textSubmit": "Enviar", + "DE.ApplicationController.textSubmited": "Formulário apresentado com sucesso>br>Click para fechar a ponta", + "DE.ApplicationController.txtClose": "Fechar", + "DE.ApplicationController.unknownErrorText": "Erro desconhecido.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Seu navegador não é suportado.", + "DE.ApplicationController.waitText": "Aguarde...", + "DE.ApplicationView.txtDownload": "Transferir", + "DE.ApplicationView.txtDownloadDocx": "Baixar como docx", + "DE.ApplicationView.txtDownloadPdf": "Baixar como pdf", + "DE.ApplicationView.txtEmbed": "Incorporar", + "DE.ApplicationView.txtFileLocation": "Local do arquivo aberto", + "DE.ApplicationView.txtFullScreen": "Tela cheia", + "DE.ApplicationView.txtPrint": "Imprimir", + "DE.ApplicationView.txtShare": "Compartilhar" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/locale/ro.json b/apps/documenteditor/forms/locale/ro.json new file mode 100644 index 000000000..2916153cc --- /dev/null +++ b/apps/documenteditor/forms/locale/ro.json @@ -0,0 +1,44 @@ +{ + "common.view.modals.txtCopy": "Copiere cu clipbiard", + "common.view.modals.txtEmbed": "Încorporare", + "common.view.modals.txtHeight": "Înălțime", + "common.view.modals.txtShare": "Partajare link", + "common.view.modals.txtWidth": "Lățime", + "DE.ApplicationController.convertationErrorText": "Conversia nu a reușit.", + "DE.ApplicationController.convertationTimeoutText": "Timpul de așteptare pentru conversie a expirat.", + "DE.ApplicationController.criticalErrorTitle": "Eroare", + "DE.ApplicationController.downloadErrorText": "Descărcare eșuată.", + "DE.ApplicationController.downloadTextText": "Descărcarea documentului...", + "DE.ApplicationController.errorAccessDeny": "Nu aveți dreptul să efectuați acțiunea pe care doriți.
Contactați administratorul dumneavoastră de Server Documente.", + "DE.ApplicationController.errorDefaultMessage": "Codul de eroare: %1", + "DE.ApplicationController.errorEditingDownloadas": "S-a produs o eroare în timpul editării documentului.
Pentru copierea de rezervă pe PC utilizați opțiunea Descărcare ca...", + "DE.ApplicationController.errorFilePassProtect": "Fișierul este protejat cu parolă și deaceea nu poate fi deschis.", + "DE.ApplicationController.errorFileSizeExceed": "Dimensiunea fișierului depășește limita permisă de serverul Dvs.
Pentru detalii, contactați administratorul dumneavoastră de Server Documente.", + "DE.ApplicationController.errorSubmit": "Remiterea eșuată.", + "DE.ApplicationController.errorUpdateVersionOnDisconnect": "Conexiunea la Internet s-a restabilit și versiunea fișierului s-a schimbat.
Înainte de a continua, fișierul trebuie descărcat sau conținutul fișierului copiat ca să vă asigurați că nimic nu e pierdut, apoi reîmprospătați această pagină.", + "DE.ApplicationController.errorUserDrop": "Fișierul nu poate fi accesat deocamdată.", + "DE.ApplicationController.notcriticalErrorTitle": "Avertisment", + "DE.ApplicationController.scriptLoadError": "Conexeunea e prea lentă și unele elemente nu se încarcă. Încercați să reîmprospătati pagina.", + "DE.ApplicationController.textAnonymous": "Anonim", + "DE.ApplicationController.textClear": "Goleşte toate câmpurile", + "DE.ApplicationController.textGotIt": "Am înțeles", + "DE.ApplicationController.textGuest": "Invitat", + "DE.ApplicationController.textLoadingDocument": "Încărcare document", + "DE.ApplicationController.textNext": "Câmpul următor", + "DE.ApplicationController.textOf": "din", + "DE.ApplicationController.textRequired": "Toate câmpurile din formular trebuie completate înainte de a-l trimite.", + "DE.ApplicationController.textSubmit": "Remitere", + "DE.ApplicationController.textSubmited": "Formularul a fost remis cu succes
Faceţi clic pentru a închide sfatul", + "DE.ApplicationController.txtClose": "Închidere", + "DE.ApplicationController.unknownErrorText": "Eroare necunoscută.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Browserul nu este compatibil.", + "DE.ApplicationController.waitText": "Vă rugăm să așteptați...", + "DE.ApplicationView.txtDownload": "Descărcare", + "DE.ApplicationView.txtDownloadDocx": "Descărcare ca docx", + "DE.ApplicationView.txtDownloadPdf": "Descărcare ca pdf", + "DE.ApplicationView.txtEmbed": "Încorporare", + "DE.ApplicationView.txtFileLocation": "Deschidere locația fișierului", + "DE.ApplicationView.txtFullScreen": "Ecran complet", + "DE.ApplicationView.txtPrint": "Imprimare", + "DE.ApplicationView.txtShare": "Partajează" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/locale/ru.json b/apps/documenteditor/forms/locale/ru.json new file mode 100644 index 000000000..29a785721 --- /dev/null +++ b/apps/documenteditor/forms/locale/ru.json @@ -0,0 +1,44 @@ +{ + "common.view.modals.txtCopy": "Скопировать в буфер", + "common.view.modals.txtEmbed": "Встроить", + "common.view.modals.txtHeight": "Высота", + "common.view.modals.txtShare": "Поделиться ссылкой", + "common.view.modals.txtWidth": "Ширина", + "DE.ApplicationController.convertationErrorText": "Конвертация не удалась.", + "DE.ApplicationController.convertationTimeoutText": "Превышено время ожидания конвертации.", + "DE.ApplicationController.criticalErrorTitle": "Ошибка", + "DE.ApplicationController.downloadErrorText": "Загрузка не удалась.", + "DE.ApplicationController.downloadTextText": "Загрузка документа...", + "DE.ApplicationController.errorAccessDeny": "Вы пытаетесь выполнить действие, на которое у вас нет прав.
Пожалуйста, обратитесь к администратору Сервера документов.", + "DE.ApplicationController.errorDefaultMessage": "Код ошибки: %1", + "DE.ApplicationController.errorEditingDownloadas": "В ходе работы с документом произошла ошибка.
Используйте опцию 'Скачать как...', чтобы сохранить резервную копию файла на жесткий диск компьютера.", + "DE.ApplicationController.errorFilePassProtect": "Файл защищен паролем и не может быть открыт.", + "DE.ApplicationController.errorFileSizeExceed": "Размер файла превышает ограничение, установленное для вашего сервера.
Обратитесь к администратору Сервера документов для получения дополнительной информации.", + "DE.ApplicationController.errorSubmit": "Не удалось отправить.", + "DE.ApplicationController.errorUpdateVersionOnDisconnect": "Подключение к Интернету было восстановлено, и версия файла изменилась.
Прежде чем продолжить работу, надо скачать файл или скопировать его содержимое, чтобы обеспечить сохранность данных, а затем перезагрузить страницу.", + "DE.ApplicationController.errorUserDrop": "В настоящий момент файл недоступен.", + "DE.ApplicationController.notcriticalErrorTitle": "Внимание", + "DE.ApplicationController.scriptLoadError": "Слишком медленное подключение, некоторые компоненты не удалось загрузить. Пожалуйста, обновите страницу.", + "DE.ApplicationController.textAnonymous": "Анонимный пользователь", + "DE.ApplicationController.textClear": "Очистить все поля", + "DE.ApplicationController.textGotIt": "ОК", + "DE.ApplicationController.textGuest": "Гость", + "DE.ApplicationController.textLoadingDocument": "Загрузка документа", + "DE.ApplicationController.textNext": "Следующее поле", + "DE.ApplicationController.textOf": "из", + "DE.ApplicationController.textRequired": "Заполните все обязательные поля для отправки формы.", + "DE.ApplicationController.textSubmit": "Отправить", + "DE.ApplicationController.textSubmited": "Форма успешно отправлена
Нажмите, чтобы закрыть подсказку", + "DE.ApplicationController.txtClose": "Закрыть", + "DE.ApplicationController.unknownErrorText": "Неизвестная ошибка.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Ваш браузер не поддерживается.", + "DE.ApplicationController.waitText": "Пожалуйста, подождите...", + "DE.ApplicationView.txtDownload": "Скачать файл", + "DE.ApplicationView.txtDownloadDocx": "Скачать как docx", + "DE.ApplicationView.txtDownloadPdf": "Скачать как pdf", + "DE.ApplicationView.txtEmbed": "Встроить", + "DE.ApplicationView.txtFileLocation": "Открыть расположение файла", + "DE.ApplicationView.txtFullScreen": "Во весь экран", + "DE.ApplicationView.txtPrint": "Печать", + "DE.ApplicationView.txtShare": "Поделиться" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/locale/sk.json b/apps/documenteditor/forms/locale/sk.json new file mode 100644 index 000000000..7a3eebfc1 --- /dev/null +++ b/apps/documenteditor/forms/locale/sk.json @@ -0,0 +1,31 @@ +{ + "common.view.modals.txtCopy": "Skopírovať do schránky", + "common.view.modals.txtEmbed": "Vložiť", + "common.view.modals.txtHeight": "Výška", + "common.view.modals.txtShare": "Zdieľať odkaz", + "common.view.modals.txtWidth": "Šírka", + "DE.ApplicationController.convertationErrorText": "Konverzia zlyhala.", + "DE.ApplicationController.convertationTimeoutText": "Prekročený čas konverzie.", + "DE.ApplicationController.criticalErrorTitle": "Chyba", + "DE.ApplicationController.downloadErrorText": "Sťahovanie zlyhalo.", + "DE.ApplicationController.downloadTextText": "Sťahovanie dokumentu...", + "DE.ApplicationController.errorAccessDeny": "Pokúšate sa vykonať akciu, na ktorú nemáte práva.
Prosím, kontaktujte svojho správcu dokumentového servera.", + "DE.ApplicationController.errorDefaultMessage": "Kód chyby: %1", + "DE.ApplicationController.errorFilePassProtect": "Dokument je chránený heslom a nie je možné ho otvoriť.", + "DE.ApplicationController.errorFileSizeExceed": "Veľkosť súboru prekračuje limity vášho servera.
Kontaktujte prosím vášho správcu dokumentového servera o ďalšie podrobnosti.", + "DE.ApplicationController.errorUpdateVersionOnDisconnect": "Internetové spojenie bolo obnovené a verzia súboru bola zmenená.
Predtým, než budete pokračovať v práci, potrebujete si stiahnuť súbor alebo kópiu jeho obsahu, aby sa nič nestratilo. Potom znovu načítajte stránku.", + "DE.ApplicationController.errorUserDrop": "K súboru nie je možné práve teraz získať prístup.", + "DE.ApplicationController.notcriticalErrorTitle": "Upozornenie", + "DE.ApplicationController.scriptLoadError": "Spojenie je príliš pomalé, niektoré komponenty nemožno nahrať. Obnovte prosím stránku.", + "DE.ApplicationController.textLoadingDocument": "Načítavanie dokumentu", + "DE.ApplicationController.textOf": "z", + "DE.ApplicationController.txtClose": "Zatvoriť", + "DE.ApplicationController.unknownErrorText": "Neznáma chyba.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Váš prehliadač nie je podporovaný.", + "DE.ApplicationController.waitText": "Prosím čakajte...", + "DE.ApplicationView.txtDownload": "Stiahnuť", + "DE.ApplicationView.txtEmbed": "Vložiť", + "DE.ApplicationView.txtFullScreen": "Celá obrazovka", + "DE.ApplicationView.txtPrint": "Tlačiť", + "DE.ApplicationView.txtShare": "Zdieľať" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/locale/sl.json b/apps/documenteditor/forms/locale/sl.json new file mode 100644 index 000000000..018e14331 --- /dev/null +++ b/apps/documenteditor/forms/locale/sl.json @@ -0,0 +1,40 @@ +{ + "common.view.modals.txtCopy": "Kopiraj v odložišče", + "common.view.modals.txtEmbed": "Vdelano", + "common.view.modals.txtHeight": "Višina", + "common.view.modals.txtShare": "Deli povezavo", + "common.view.modals.txtWidth": "Širina", + "DE.ApplicationController.convertationErrorText": "Pogovor ni uspel.", + "DE.ApplicationController.convertationTimeoutText": "Pretvorbena prekinitev presežena.", + "DE.ApplicationController.criticalErrorTitle": "Napaka", + "DE.ApplicationController.downloadErrorText": "Prenos ni uspel.", + "DE.ApplicationController.downloadTextText": "Prenašanje dokumenta ...", + "DE.ApplicationController.errorAccessDeny": "Poskušate izvesti dejanje, za katerega nimate pravic.
Obrnite se na skrbnika strežnika dokumentov.", + "DE.ApplicationController.errorDefaultMessage": "Koda napake: %1", + "DE.ApplicationController.errorEditingDownloadas": "Med delom z dokumentom je prišlo do napake.
S funkcijo »Prenesi kot ...« shranite varnostno kopijo datoteke na trdi disk računalnika.", + "DE.ApplicationController.errorFilePassProtect": "Dokument je zaščiten z geslom in ga ni mogoče odpreti.", + "DE.ApplicationController.errorFileSizeExceed": "Velikost datoteke presega omejitev, nastavljeno za vaš strežnik.
Za podrobnosti se obrnite na skrbnika strežnika dokumentov.", + "DE.ApplicationController.errorSubmit": "Pošiljanje je spodletelo", + "DE.ApplicationController.errorUpdateVersionOnDisconnect": "Povezava s spletom je bila obnovljena in spremenjena je različica datoteke.
Preden nadaljujete z delom, morate datoteko prenesti ali kopirati njeno vsebino, da se prepričate, da se nič ne izgubi, in nato znova naložite to stran.", + "DE.ApplicationController.errorUserDrop": "Do datoteke v tem trenutku ni možno dostopati.", + "DE.ApplicationController.notcriticalErrorTitle": "Opozorilo", + "DE.ApplicationController.scriptLoadError": "Povezava je počasna, nekatere komponente niso pravilno naložene.Prosimo osvežite stran.", + "DE.ApplicationController.textClear": "Počisti vsa polja", + "DE.ApplicationController.textLoadingDocument": "Nalaganje dokumenta", + "DE.ApplicationController.textNext": "Naslednje polje", + "DE.ApplicationController.textOf": "od", + "DE.ApplicationController.textSubmit": "Pošlji", + "DE.ApplicationController.textSubmited": "Obrazec poslan uspešno
Pritisnite tukaj za zaprtje obvestila", + "DE.ApplicationController.txtClose": "Zapri", + "DE.ApplicationController.unknownErrorText": "Neznana napaka.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Vaš brskalnik ni podprt.", + "DE.ApplicationController.waitText": "Prosimo počakajte ...", + "DE.ApplicationView.txtDownload": "Prenesi", + "DE.ApplicationView.txtDownloadDocx": "Prenesi kot DOCX", + "DE.ApplicationView.txtDownloadPdf": "Prenesi kot PDF", + "DE.ApplicationView.txtEmbed": "Vdelano", + "DE.ApplicationView.txtFileLocation": "Odpri lokacijo dokumenta", + "DE.ApplicationView.txtFullScreen": "Celozaslonski", + "DE.ApplicationView.txtPrint": "Natisni", + "DE.ApplicationView.txtShare": "Deli" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/locale/sv.json b/apps/documenteditor/forms/locale/sv.json new file mode 100644 index 000000000..6516afa10 --- /dev/null +++ b/apps/documenteditor/forms/locale/sv.json @@ -0,0 +1,31 @@ +{ + "common.view.modals.txtCopy": "Kopiera till klippbord", + "common.view.modals.txtEmbed": "Inbädda", + "common.view.modals.txtHeight": "Höjd", + "common.view.modals.txtShare": "Delningslänk", + "common.view.modals.txtWidth": "Bredd", + "DE.ApplicationController.convertationErrorText": "Fel vid konvertering", + "DE.ApplicationController.convertationTimeoutText": "Konverteringstiden har överskridits.", + "DE.ApplicationController.criticalErrorTitle": "Fel", + "DE.ApplicationController.downloadErrorText": "Nedladdning misslyckades", + "DE.ApplicationController.downloadTextText": "Laddar ner dokumentet...", + "DE.ApplicationController.errorAccessDeny": "Du försöker utföra en åtgärd som du inte har rättighet till.
Vänligen kontakta din systemadministratör.", + "DE.ApplicationController.errorDefaultMessage": "Felkod: %1", + "DE.ApplicationController.errorFilePassProtect": "Dokumentet är lösenordsskyddat och kunde inte öppnas. ", + "DE.ApplicationController.errorFileSizeExceed": "Filstorleken överskrider gränsen för din server.
Var snäll och kontakta administratören för dokumentservern för mer information.", + "DE.ApplicationController.errorUpdateVersionOnDisconnect": "Internetanslutningen har återställts och filversionen har ändrats.
Innan du fortsätter arbeta, ladda ner filen eller kopiera innehållet för att försäkra dig om att inte förlora något, ladda sedan om denna sida.", + "DE.ApplicationController.errorUserDrop": "Filen kan inte nås för tillfället. ", + "DE.ApplicationController.notcriticalErrorTitle": "Varning", + "DE.ApplicationController.scriptLoadError": "Anslutningen är för långsam, vissa av komponenterna kunde inte laddas. Vänligen ladda om sidan.", + "DE.ApplicationController.textLoadingDocument": "Laddar dokument", + "DE.ApplicationController.textOf": "av", + "DE.ApplicationController.txtClose": "Stäng", + "DE.ApplicationController.unknownErrorText": "Okänt fel.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Din webbläsare stöds ej.", + "DE.ApplicationController.waitText": "Var snäll och vänta...", + "DE.ApplicationView.txtDownload": "Ladda ner", + "DE.ApplicationView.txtEmbed": "Inbädda", + "DE.ApplicationView.txtFullScreen": "Fullskärm", + "DE.ApplicationView.txtPrint": "Skriva ut", + "DE.ApplicationView.txtShare": "Dela" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/locale/tr.json b/apps/documenteditor/forms/locale/tr.json new file mode 100644 index 000000000..6cc48ad89 --- /dev/null +++ b/apps/documenteditor/forms/locale/tr.json @@ -0,0 +1,38 @@ +{ + "common.view.modals.txtCopy": "Panoya kopyala", + "common.view.modals.txtEmbed": "Gömülü", + "common.view.modals.txtHeight": "Yükseklik", + "common.view.modals.txtShare": "Bağlantıyı Paylaş", + "common.view.modals.txtWidth": "Genişlik", + "DE.ApplicationController.convertationErrorText": "Değişim başarısız oldu.", + "DE.ApplicationController.convertationTimeoutText": "Değişim süresi aşıldı.", + "DE.ApplicationController.criticalErrorTitle": "Hata", + "DE.ApplicationController.downloadErrorText": "Yükleme başarısız oldu.", + "DE.ApplicationController.downloadTextText": "Döküman yükleniyor...", + "DE.ApplicationController.errorAccessDeny": "Hakkınız olmayan bir eylem gerçekleştirmeye çalışıyorsunuz.
Lütfen Belge Sunucu yöneticinize başvurun.", + "DE.ApplicationController.errorDefaultMessage": "Hata kodu: %1", + "DE.ApplicationController.errorFilePassProtect": "Döküman şifre korumalı ve açılamadı", + "DE.ApplicationController.errorSubmit": "Kaydetme başarısız oldu.", + "DE.ApplicationController.errorUpdateVersionOnDisconnect": "İnternet bağlantısı tekrar sağlandı, ve dosya versiyon değişti.
Çalışmanıza devam etmeden önce, veri kaybını önlemeniz için dosyasının bir kopyasını indirmeniz ya da dosya içeriğini kopyalamanız ve sonrasında sayfayı yenilemeniz gerekmektedir.", + "DE.ApplicationController.errorUserDrop": "Belgeye şu an erişilemiyor.", + "DE.ApplicationController.notcriticalErrorTitle": "Uyarı", + "DE.ApplicationController.scriptLoadError": "Bağlantı çok yavaş, bileşenlerin bazıları yüklenemedi. Lütfen sayfayı yenileyin.", + "DE.ApplicationController.textClear": "Tüm alanları temizle", + "DE.ApplicationController.textLoadingDocument": "Döküman yükleniyor", + "DE.ApplicationController.textNext": "Sonraki alan", + "DE.ApplicationController.textOf": "'in", + "DE.ApplicationController.textSubmit": "Kaydet", + "DE.ApplicationController.textSubmited": "Form başarılı bir şekilde kaydedildi
İpucunu kapatmak için tıklayın", + "DE.ApplicationController.txtClose": "Kapat", + "DE.ApplicationController.unknownErrorText": "Bilinmeyen hata.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Tarayıcınız desteklenmiyor.", + "DE.ApplicationController.waitText": "Lütfen bekleyin...", + "DE.ApplicationView.txtDownload": "İndir", + "DE.ApplicationView.txtDownloadDocx": "docx olarak indir", + "DE.ApplicationView.txtDownloadPdf": "Pdf olarak indir", + "DE.ApplicationView.txtEmbed": "Gömülü", + "DE.ApplicationView.txtFileLocation": "Dosya konumunu aç", + "DE.ApplicationView.txtFullScreen": "Tam Ekran", + "DE.ApplicationView.txtPrint": "Yazdır", + "DE.ApplicationView.txtShare": "Paylaş" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/locale/uk.json b/apps/documenteditor/forms/locale/uk.json new file mode 100644 index 000000000..9970b4f0c --- /dev/null +++ b/apps/documenteditor/forms/locale/uk.json @@ -0,0 +1,30 @@ +{ + "common.view.modals.txtCopy": "Копіювати в буфер обміну", + "common.view.modals.txtEmbed": "Вставити", + "common.view.modals.txtHeight": "Висота", + "common.view.modals.txtShare": "Поділитися посиланням", + "common.view.modals.txtWidth": "Ширина", + "DE.ApplicationController.convertationErrorText": "Не вдалося поспілкуватися.", + "DE.ApplicationController.convertationTimeoutText": "Термін переходу перевищено.", + "DE.ApplicationController.criticalErrorTitle": "Помилка", + "DE.ApplicationController.downloadErrorText": "Завантаження не вдалося", + "DE.ApplicationController.downloadTextText": "Завантаження документу...", + "DE.ApplicationController.errorAccessDeny": "Ви намагаєтеся виконати дію, на яку у вас немає прав.
Будь ласка, зв'яжіться з адміністратором вашого Сервера документів.", + "DE.ApplicationController.errorDefaultMessage": "Код помилки: %1", + "DE.ApplicationController.errorFilePassProtect": "Документ захищений паролем і його неможливо відкрити.", + "DE.ApplicationController.errorFileSizeExceed": "Розмір файлу перевищує обмеження, встановлені для вашого сервера.
Для детальної інформації зверніться до адміністратора сервера документів.", + "DE.ApplicationController.errorUpdateVersionOnDisconnect": "Підключення до Інтернету було відновлено, а версія файлу змінена.
Перш ніж продовжувати роботу, потрібно завантажити файл або скопіювати його вміст, щоб переконатися, що нічого не втрачено, а потім перезавантажити цю сторінку.", + "DE.ApplicationController.errorUserDrop": "На даний момент файл не доступний.", + "DE.ApplicationController.notcriticalErrorTitle": "Застереження", + "DE.ApplicationController.scriptLoadError": "З'єднання занадто повільне, деякі компоненти не вдалося завантажити. Перезавантажте сторінку.", + "DE.ApplicationController.textLoadingDocument": "Завантаження документа", + "DE.ApplicationController.textOf": "з", + "DE.ApplicationController.txtClose": "Закрити", + "DE.ApplicationController.unknownErrorText": "Невідома помилка.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Ваш браузер не підтримується", + "DE.ApplicationController.waitText": "Будь ласка, зачекайте...", + "DE.ApplicationView.txtDownload": "Завантажити", + "DE.ApplicationView.txtEmbed": "Вставити", + "DE.ApplicationView.txtFullScreen": "Повноекранний режим", + "DE.ApplicationView.txtShare": "Доступ" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/locale/vi.json b/apps/documenteditor/forms/locale/vi.json new file mode 100644 index 000000000..ad3225af9 --- /dev/null +++ b/apps/documenteditor/forms/locale/vi.json @@ -0,0 +1,22 @@ +{ + "common.view.modals.txtCopy": "Sao chép vào khay nhớ tạm", + "common.view.modals.txtHeight": "Chiều cao", + "common.view.modals.txtWidth": "Chiều rộng", + "DE.ApplicationController.convertationTimeoutText": "Đã quá thời gian chờ chuyển đổi.", + "DE.ApplicationController.criticalErrorTitle": "Lỗi", + "DE.ApplicationController.downloadErrorText": "Tải về không thành công.", + "DE.ApplicationController.downloadTextText": "Đang tải tài liệu...", + "DE.ApplicationController.errorAccessDeny": "Bạn đang cố gắng thực hiện hành động mà bạn không có quyền.
Vui lòng liên hệ với quản trị viên Server Tài liệu của bạn.", + "DE.ApplicationController.errorDefaultMessage": "Mã lỗi: %1", + "DE.ApplicationController.errorFilePassProtect": "Tài liệu được bảo vệ bằng mật khẩu và không thể mở được.", + "DE.ApplicationController.errorUserDrop": "Không thể truy cập file ngay lúc này.", + "DE.ApplicationController.notcriticalErrorTitle": "Cảnh báo", + "DE.ApplicationController.textLoadingDocument": "Đang tải tài liệu", + "DE.ApplicationController.textOf": "trên", + "DE.ApplicationController.txtClose": "Đóng", + "DE.ApplicationController.unknownErrorText": "Lỗi không xác định.", + "DE.ApplicationController.unsupportedBrowserErrorText": "Trình duyệt của bạn không được hỗ trợ.", + "DE.ApplicationView.txtDownload": "Tải về", + "DE.ApplicationView.txtFullScreen": "Toàn màn hình", + "DE.ApplicationView.txtShare": "Chia sẻ" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/locale/zh.json b/apps/documenteditor/forms/locale/zh.json new file mode 100644 index 000000000..24883a822 --- /dev/null +++ b/apps/documenteditor/forms/locale/zh.json @@ -0,0 +1,44 @@ +{ + "common.view.modals.txtCopy": "复制到剪贴板", + "common.view.modals.txtEmbed": "嵌入", + "common.view.modals.txtHeight": "高度", + "common.view.modals.txtShare": "分享链接", + "common.view.modals.txtWidth": "宽度", + "DE.ApplicationController.convertationErrorText": "转换失败", + "DE.ApplicationController.convertationTimeoutText": "转换超时", + "DE.ApplicationController.criticalErrorTitle": "错误", + "DE.ApplicationController.downloadErrorText": "下载失败", + "DE.ApplicationController.downloadTextText": "正在下载文件...", + "DE.ApplicationController.errorAccessDeny": "您正在尝试执行您没有权限的操作。
请联系您的文档服务器管理员.", + "DE.ApplicationController.errorDefaultMessage": "错误代码:%1", + "DE.ApplicationController.errorEditingDownloadas": "在处理文档期间发生错误。
使用“下载为…”选项将文件备份复制到您的计算机硬盘中。", + "DE.ApplicationController.errorFilePassProtect": "该文档受密码保护,无法被打开。", + "DE.ApplicationController.errorFileSizeExceed": "文件大小超出了为服务器设置的限制.
有关详细信息,请与文档服务器管理员联系。", + "DE.ApplicationController.errorSubmit": "提交失败", + "DE.ApplicationController.errorUpdateVersionOnDisconnect": "网络连接已恢复,文件版本已变更。
在继续工作之前,需要下载文件或复制其内容以避免丢失数据,然后刷新此页。", + "DE.ApplicationController.errorUserDrop": "该文件现在无法访问。", + "DE.ApplicationController.notcriticalErrorTitle": "警告", + "DE.ApplicationController.scriptLoadError": "连接速度过慢,部分组件无法被加载。请重新加载页面。", + "DE.ApplicationController.textAnonymous": "匿名", + "DE.ApplicationController.textClear": "清除所有字段", + "DE.ApplicationController.textGotIt": "知道了", + "DE.ApplicationController.textGuest": "访客", + "DE.ApplicationController.textLoadingDocument": "文件加载中…", + "DE.ApplicationController.textNext": "下一域", + "DE.ApplicationController.textOf": "的", + "DE.ApplicationController.textRequired": "要发送表单,请填写所有必填项目。", + "DE.ApplicationController.textSubmit": "提交", + "DE.ApplicationController.textSubmited": "表单成功地被提交了
点击以关闭贴士", + "DE.ApplicationController.txtClose": "关闭", + "DE.ApplicationController.unknownErrorText": "未知错误。", + "DE.ApplicationController.unsupportedBrowserErrorText": "您的浏览器不受支持", + "DE.ApplicationController.waitText": "请稍候...", + "DE.ApplicationView.txtDownload": "下载", + "DE.ApplicationView.txtDownloadDocx": "导出成docx格式", + "DE.ApplicationView.txtDownloadPdf": "导出成PDF格式", + "DE.ApplicationView.txtEmbed": "嵌入", + "DE.ApplicationView.txtFileLocation": "打开文件所在位置", + "DE.ApplicationView.txtFullScreen": "全屏", + "DE.ApplicationView.txtPrint": "打印", + "DE.ApplicationView.txtShare": "共享" +} \ No newline at end of file diff --git a/apps/documenteditor/forms/resources/less/application.less b/apps/documenteditor/forms/resources/less/application.less new file mode 100644 index 000000000..99de32a94 --- /dev/null +++ b/apps/documenteditor/forms/resources/less/application.less @@ -0,0 +1,6 @@ +// Common styles +@import "../../../../common/forms/resources/less/common.less"; + +@header-background-color-ie: @toolbar-header-document-ie; +@header-background-color: var(--toolbar-header-document); + diff --git a/apps/documenteditor/main/app/controller/FormsTab.js b/apps/documenteditor/main/app/controller/FormsTab.js index 9f39fe260..ffda935a8 100644 --- a/apps/documenteditor/main/app/controller/FormsTab.js +++ b/apps/documenteditor/main/app/controller/FormsTab.js @@ -95,7 +95,8 @@ define([ 'forms:select-color': this.onSelectControlsColor, 'forms:mode': this.onModeClick, 'forms:goto': this.onGoTo, - 'forms:submit': this.onSubmitClick + 'forms:submit': this.onSubmitClick, + 'forms:save': this.onSaveFormClick } }); }, @@ -245,6 +246,10 @@ define([ Common.NotificationCenter.trigger('edit:complete', this.toolbar); }, + onSaveFormClick: function() { + this.api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.OFORM)); + }, + disableEditing: function(disable) { if (this._state.DisabledEditing != disable) { this._state.DisabledEditing = disable; diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js index 7c9dcd308..40569cd96 100644 --- a/apps/documenteditor/main/app/controller/LeftMenu.js +++ b/apps/documenteditor/main/app/controller/LeftMenu.js @@ -519,7 +519,7 @@ define([ onCreateNew: function(menu, type) { if ( !Common.Controllers.Desktop.process('create:new') ) { - if (this.mode.canRequestCreateNew) + if (type == 'blank' && this.mode.canRequestCreateNew) Common.Gateway.requestCreateNew(); else { var newDocumentPage = window.open(type == 'blank' ? this.mode.createUrl : type, "_blank"); diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 743610f5d..0d5725386 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -373,7 +373,7 @@ define([ this.appOptions.user.anonymous && Common.localStorage.setItem("guest-id", this.appOptions.user.id); this.appOptions.isDesktopApp = this.editorConfig.targetApp == 'desktop'; - this.appOptions.canCreateNew = this.editorConfig.canRequestCreateNew || !_.isEmpty(this.editorConfig.createUrl); + this.appOptions.canCreateNew = this.editorConfig.canRequestCreateNew || !_.isEmpty(this.editorConfig.createUrl) || this.editorConfig.templates && this.editorConfig.templates.length; this.appOptions.canOpenRecent = this.editorConfig.recent !== undefined && !this.appOptions.isDesktopApp; this.appOptions.templates = this.editorConfig.templates; this.appOptions.recent = this.editorConfig.recent; @@ -458,6 +458,8 @@ define([ docInfo.put_Token(data.doc.token); docInfo.put_Permissions(_permissions); docInfo.put_EncryptedInfo(this.editorConfig.encryptionKeys); + docInfo.put_Lang(this.editorConfig.lang); + docInfo.put_Mode(this.editorConfig.mode); var enable = !this.editorConfig.customization || (this.editorConfig.customization.macros!==false); docInfo.asc_putIsEnabledMacroses(!!enable); @@ -465,7 +467,7 @@ define([ docInfo.asc_putIsEnabledPlugins(!!enable); // docInfo.put_Review(this.permissions.review); - var type = /^(?:(pdf|djvu|xps))$/.exec(data.doc.fileType); + var type = /^(?:(pdf|djvu|xps|oxps))$/.exec(data.doc.fileType); if (type && typeof type[1] === 'string') { this.permissions.edit = this.permissions.review = false; } @@ -528,7 +530,7 @@ define([ } this._state.isFromGatewayDownloadAs = true; - var type = /^(?:(pdf|djvu|xps))$/.exec(this.document.fileType); + var type = /^(?:(pdf|djvu|xps|oxps))$/.exec(this.document.fileType); if (type && typeof type[1] === 'string') this.api.asc_DownloadOrigin(true); else { @@ -765,7 +767,7 @@ define([ app.getController('Toolbar').DisableToolbar(disable, options.viewMode, options.reviewMode, options.fillFormwMode); } if (options.documentHolder) { - app.getController('DocumentHolder').getView().SetDisabled(disable, options.allowProtect); + app.getController('DocumentHolder').getView().SetDisabled(disable, options.allowProtect, options.fillFormwMode); } if (options.leftMenu) { if (options.leftMenu.disable) @@ -1410,12 +1412,12 @@ define([ this.appOptions.trialMode = params.asc_getLicenseMode(); this.appOptions.isBeta = params.asc_getIsBeta(); - this.appOptions.isSignatureSupport= this.appOptions.isEdit && this.appOptions.isDesktopApp && this.appOptions.isOffline && this.api.asc_isSignaturesSupport(); - this.appOptions.isPasswordSupport = this.appOptions.isEdit && this.api.asc_isProtectionSupport(); + this.appOptions.isSignatureSupport= this.appOptions.isEdit && this.appOptions.isDesktopApp && this.appOptions.isOffline && this.api.asc_isSignaturesSupport() && (this.permissions.protect!==false); + this.appOptions.isPasswordSupport = this.appOptions.isEdit && this.api.asc_isProtectionSupport() && (this.permissions.protect!==false); this.appOptions.canProtect = (this.appOptions.isSignatureSupport || this.appOptions.isPasswordSupport); this.appOptions.canEditContentControl = (this.permissions.modifyContentControl!==false); this.appOptions.canHelp = !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.help===false); - this.appOptions.canSubmitForms = this.appOptions.canLicense && (typeof (this.editorConfig.customization) == 'object') && !!this.editorConfig.customization.submitForm; + this.appOptions.canSubmitForms = false; // this.appOptions.canLicense && (typeof (this.editorConfig.customization) == 'object') && !!this.editorConfig.customization.submitForm; this.appOptions.canFillForms = this.appOptions.canLicense && ((this.permissions.fillForms===undefined) ? this.appOptions.isEdit : this.permissions.fillForms) && (this.editorConfig.mode !== 'view'); this.appOptions.isRestrictedEdit = !this.appOptions.isEdit && (this.appOptions.canComments || this.appOptions.canFillForms); if (this.appOptions.isRestrictedEdit && this.appOptions.canComments && this.appOptions.canFillForms) // must be one restricted mode, priority for filling forms @@ -1431,10 +1433,11 @@ define([ this.appOptions.canChat = false; } - var type = /^(?:(pdf|djvu|xps))$/.exec(this.document.fileType); + var type = /^(?:(pdf|djvu|xps|oxps))$/.exec(this.document.fileType); this.appOptions.canDownloadOrigin = this.permissions.download !== false && (type && typeof type[1] === 'string'); this.appOptions.canDownload = this.permissions.download !== false && (!type || typeof type[1] !== 'string'); this.appOptions.canUseThumbnails = this.appOptions.canUseViwerNavigation = /^(?:(pdf|djvu|xps))$/.test(this.document.fileType); + this.appOptions.canDownloadForms = this.appOptions.canLicense && this.appOptions.canDownload; this.appOptions.fileKey = this.document.key; @@ -1831,6 +1834,10 @@ define([ config.msg = this.errorSubmit; break; + case Asc.c_oAscError.ID.LoadingFontError: + config.msg = this.errorLoadingFont; + break; + default: config.msg = (typeof id == 'string') ? id : this.errorDefaultMessage.replace('%1', id); break; @@ -1852,7 +1859,7 @@ define([ Common.NotificationCenter.trigger('goback', true); } } - if (id == Asc.c_oAscError.ID.DataEncrypted) { + if (id == Asc.c_oAscError.ID.DataEncrypted || id == Asc.c_oAscError.ID.ConvertationOpenLimitError) { this.api.asc_coAuthoringDisconnect(); Common.NotificationCenter.trigger('api:disconnect'); } @@ -2602,6 +2609,14 @@ define([ value = Common.localStorage.getBool("de-settings-autoformat-fl-sentence", true); Common.Utils.InternalSettings.set("de-settings-autoformat-fl-sentence", value); me.api.asc_SetAutoCorrectFirstLetterOfSentences(value); + + value = Common.localStorage.getBool("de-settings-autoformat-hyperlink", true); + Common.Utils.InternalSettings.set("de-settings-autoformat-hyperlink", value); + me.api.asc_SetAutoCorrectHyperlinks(value); + + value = Common.localStorage.getBool("de-settings-autoformat-fl-cells", true); + Common.Utils.InternalSettings.set("de-settings-autoformat-fl-cells", value); + me.api.asc_SetAutoCorrectFirstLetterOfCells(value); }, showRenameUserDialog: function() { @@ -3027,7 +3042,8 @@ define([ txtStyle_endnote_text: 'Endnote Text', txtTOCHeading: 'TOC Heading', textDisconnect: 'Connection is lost', - errorLang: 'The interface language is not loaded.
Please contact your Document Server administrator.' + errorLang: 'The interface language is not loaded.
Please contact your Document Server administrator.', + errorLoadingFont: 'Fonts are not loaded.
Please contact your Document Server administrator.' } })(), DE.Controllers.Main || {})) }); \ No newline at end of file diff --git a/apps/documenteditor/main/app/controller/RightMenu.js b/apps/documenteditor/main/app/controller/RightMenu.js index baac421e7..d03610264 100644 --- a/apps/documenteditor/main/app/controller/RightMenu.js +++ b/apps/documenteditor/main/app/controller/RightMenu.js @@ -131,8 +131,8 @@ define([ this.rightmenu.fireEvent('editcomplete', this.rightmenu); }, - onFocusObject: function(SelectedObjects) { - if (!this.editMode) + onFocusObject: function(SelectedObjects, forceSignature) { + if (!this.editMode && !forceSignature) return; var open = this._initSettings ? !Common.localStorage.getBool("de-hide-right-settings", this.rightmenu.defaultHideRightMenu) : false; @@ -269,6 +269,7 @@ define([ if (priorityactive>-1) active = priorityactive; else if (lastactive>=0 && currentactive<0) active = lastactive; else if (currentactive>=0) active = currentactive; + else if (forceSignature && !this._settings[Common.Utils.documentSettingsType.Signature].hidden) active = Common.Utils.documentSettingsType.Signature; else if (!this._settings[Common.Utils.documentSettingsType.MailMerge].hidden) active = Common.Utils.documentSettingsType.MailMerge; if (active == undefined && open && lastactive>=0) @@ -321,6 +322,7 @@ define([ this.rightmenu.tableSettings.UpdateThemeColors(); this.rightmenu.shapeSettings.UpdateThemeColors(); this.rightmenu.textartSettings.UpdateThemeColors(); + this.rightmenu.formSettings && this.rightmenu.formSettings.UpdateThemeColors(); }, updateMetricUnit: function() { @@ -422,8 +424,9 @@ define([ } this.rightmenu.chartSettings.disableControls(disabled); - if (!allowSignature && this.rightmenu.signatureSettings) { - this.rightmenu.btnSignature.setDisabled(disabled); + if (this.rightmenu.signatureSettings) { + !allowSignature && this.rightmenu.btnSignature.setDisabled(disabled); + allowSignature && disabled && this.onFocusObject([], true); // force press signature button } if (disabled) { diff --git a/apps/documenteditor/main/app/controller/Statusbar.js b/apps/documenteditor/main/app/controller/Statusbar.js index db122880e..987e3619d 100644 --- a/apps/documenteditor/main/app/controller/Statusbar.js +++ b/apps/documenteditor/main/app/controller/Statusbar.js @@ -103,6 +103,7 @@ define([ if (cfg.canReview) { me.btnTurnReview = review.getButton('turn', 'statusbar'); me.btnTurnReview.render(me.statusbar.$layout.find('#btn-doc-review')); + me.statusbar.btnTurnReview = me.btnTurnReview; } else { me.statusbar.$el.find('.el-review').hide(); } diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index e03d1e1df..79f34a522 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -140,7 +140,7 @@ define([ var _file_type = _main.document.fileType, _format; if ( !!_file_type ) { - if ( /^pdf|xps|djvu/i.test(_file_type) ) { + if ( /^pdf|xps|oxps|djvu/i.test(_file_type) ) { _main.api.asc_DownloadOrigin(); return; } else { @@ -338,7 +338,7 @@ define([ toolbar.mnuPageSize.on('item:click', _.bind(this.onPageSizeClick, this)); toolbar.mnuColorSchema.on('item:click', _.bind(this.onColorSchemaClick, this)); toolbar.mnuColorSchema.on('show:after', _.bind(this.onColorSchemaShow, this)); - toolbar.btnMailRecepients.on('click', _.bind(this.onSelectRecepientsClick, this)); + toolbar.mnuMailRecepients.on('item:click', _.bind(this.onSelectRecepientsClick, this)); toolbar.mnuPageNumberPosPicker.on('item:click', _.bind(this.onInsertPageNumberClick, this)); toolbar.btnEditHeader.menu.on('item:click', _.bind(this.onEditHeaderFooterClick, this)); toolbar.btnInsDateTime.on('click', _.bind(this.onInsDateTimeClick, this)); @@ -357,8 +357,7 @@ define([ Common.Gateway.on('insertimage', _.bind(this.insertImage, this)); Common.Gateway.on('setmailmergerecipients', _.bind(this.setMailMergeRecipients, this)); $('#id-toolbar-menu-new-control-color').on('click', _.bind(this.onNewControlsColor, this)); - - $('#id-save-style-plus, #id-save-style-link', toolbar.$el).on('click', this.onMenuSaveStyle.bind(this)); + toolbar.listStylesAdditionalMenuItem.on('click', this.onMenuSaveStyle.bind(this)); this.onSetupCopyStyleButton(); this.onBtnChangeState('undo:disabled', toolbar.btnUndo, toolbar.btnUndo.isDisabled()); @@ -1584,7 +1583,7 @@ define([ var checkUrl = value.replace(/ /g, ''); if (!_.isEmpty(checkUrl)) { me.toolbar.fireEvent('insertimage', me.toolbar); - me.api.AddImageUrl(checkUrl); + me.api.AddImageUrl([checkUrl]); Common.component.Analytics.trackEvent('ToolBar', 'Image'); } else { @@ -1612,20 +1611,34 @@ define([ fileChoiceUrl: this.toolbar.mode.fileChoiceUrl.replace("{fileExt}", "").replace("{documentType}", "ImagesOnly") })).on('selectfile', function(obj, file){ file && (file.c = type); + !file.images && (file.images = [{fileType: file.fileType, url: file.url}]); // SelectFileDlg uses old format for inserting image + file.url = null; me.insertImage(file); }).show(); } }, insertImageFromStorage: function(data) { - if (data && data.url && (!data.c || data.c=='add')) { + if (data && data._urls && (!data.c || data.c=='add')) { this.toolbar.fireEvent('insertimage', this.toolbar); - this.api.AddImageUrl(data.url, undefined, data.token);// for loading from storage + (data._urls.length>0) && this.api.AddImageUrl(data._urls, undefined, data.token);// for loading from storage Common.component.Analytics.trackEvent('ToolBar', 'Image'); } }, insertImage: function(data) { // gateway + if (data && (data.url || data.images)) { + data.url && console.log("Obsolete: The 'url' parameter of the 'insertImage' method is deprecated. Please use 'images' parameter instead."); + + var arr = []; + if (data.images && data.images.length>0) { + for (var i=0; i parseFloat(section.get_W().toFixed(4))-12.7 ) - errmsg = this.txtMarginsW; - else if (item.value[0] + item.value[2] > parseFloat(section.get_H().toFixed(4))-2.6 ) - errmsg = this.txtMarginsH; - if (errmsg) { - Common.UI.warning({ - title: this.notcriticalErrorTitle, - msg : errmsg, - callback: function() { - Common.NotificationCenter.trigger('edit:complete', me.toolbar); - } - }); - this.onSectionProps(section); + if (this.checkPageSize(undefined, undefined, item.value[1], item.value[3], item.value[0], item.value[2])) { + this.onSectionProps(this.api.asc_GetSectionProps()); return; } else { var props = new Asc.CDocumentSectionProps(); @@ -1762,6 +1767,34 @@ define([ Common.NotificationCenter.trigger('edit:complete', this.toolbar); }, + checkPageSize: function(width, height, left, right, top, bottom) { + var section = this.api.asc_GetSectionProps(); + (width===undefined) && (width = parseFloat(section.get_W().toFixed(4))); + (height===undefined) && (height = parseFloat(section.get_H().toFixed(4))); + (left===undefined) && (left = parseFloat(section.get_LeftMargin().toFixed(4))); + (right===undefined) && (right = parseFloat(section.get_RightMargin().toFixed(4))); + (top===undefined) && (top = parseFloat(section.get_TopMargin().toFixed(4))); + (bottom===undefined) && (bottom = parseFloat(section.get_BottomMargin().toFixed(4))); + var gutterLeft = section.get_GutterAtTop() ? 0 : parseFloat(section.get_Gutter().toFixed(4)), + gutterTop = section.get_GutterAtTop() ? parseFloat(section.get_Gutter().toFixed(4)) : 0; + + var errmsg = null; + if (left + right + gutterLeft > width-12.7 ) + errmsg = this.txtMarginsW; + else if (top + bottom + gutterTop > height-2.6 ) + errmsg = this.txtMarginsH; + if (errmsg) { + Common.UI.warning({ + title: this.notcriticalErrorTitle, + msg : errmsg, + callback: function() { + Common.NotificationCenter.trigger('edit:complete', this.toolbar); + } + }); + return true; + } + }, + onLineNumbersSelect: function(menu, item) { if (_.isUndefined(item.value)) return; @@ -2168,10 +2201,13 @@ define([ } }, - onInsertPageNumberClick: function(picker, item, record) { + onInsertPageNumberClick: function(picker, item, record, e) { if (this.api) this.api.put_PageNum(record.get('data').type, record.get('data').subtype); + if (e.type !== 'click') + this.toolbar.btnEditHeader.menu.hide(); + Common.NotificationCenter.trigger('edit:complete', this.toolbar); Common.component.Analytics.trackEvent('ToolBar', 'Page Number'); }, @@ -2606,53 +2642,41 @@ define([ }, fillAutoShapes: function() { - var me = this, - shapesStore = this.getApplication().getCollection('ShapeGroups'); + var me = this; - var onShowAfter = function(menu) { - for (var i = 0; i < shapesStore.length; i++) { - var shapePicker = new Common.UI.DataViewSimple({ - el: $('#id-toolbar-menu-shapegroup' + i, menu.items[i].$el), - store: shapesStore.at(i).get('groupStore'), - parentMenu: menu.items[i].menu, - itemTemplate: _.template('
\">
') - }); - shapePicker.on('item:click', function(picker, item, record, e) { - if (me.api) { - if (record) { - me._addAutoshape(true, record.get('data').shapeType); - me._isAddingShape = true; - } + var menuitem = new Common.UI.MenuItem({ + template: _.template('') + }); + me.toolbar.btnInsertShape.menu.addItem(menuitem); - if (me.toolbar.btnInsertText.pressed) { - me.toolbar.btnInsertText.toggle(false, true); - } + var recents = Common.localStorage.getItem('de-recent-shapes'); - if (e.type !== 'click') - me.toolbar.btnInsertShape.menu.hide(); - Common.NotificationCenter.trigger('edit:complete', me.toolbar, me.toolbar.btnInsertShape); - Common.component.Analytics.trackEvent('ToolBar', 'Add Shape'); - } - }); + var shapePicker = new Common.UI.DataViewShape({ + el: $('#id-toolbar-menu-insertshape'), + itemTemplate: _.template('
\">
'), + groups: me.getApplication().getCollection('ShapeGroups'), + parentMenu: me.toolbar.btnInsertShape.menu, + restoreHeight: 640, + textRecentlyUsed: me.textRecentlyUsed, + recentShapes: recents ? JSON.parse(recents) : null + }); + shapePicker.on('item:click', function(picker, item, record, e) { + if (me.api) { + if (record) { + me._addAutoshape(true, record.get('data').shapeType); + me._isAddingShape = true; + } + + if (me.toolbar.btnInsertText.pressed) { + me.toolbar.btnInsertText.toggle(false, true); + } + + if (e.type !== 'click') + me.toolbar.btnInsertShape.menu.hide(); + Common.NotificationCenter.trigger('edit:complete', me.toolbar, me.toolbar.btnInsertShape); + Common.component.Analytics.trackEvent('ToolBar', 'Add Shape'); } - menu.off('show:after', onShowAfter); - }; - me.toolbar.btnInsertShape.menu.on('show:after', onShowAfter); - - for (var i = 0; i < shapesStore.length; i++) { - var shapeGroup = shapesStore.at(i); - - var menuItem = new Common.UI.MenuItem({ - caption: shapeGroup.get('groupName'), - menu: new Common.UI.Menu({ - menuAlign: 'tl-tr', - items: [ - { template: _.template('') } - ] - }) - }); - me.toolbar.btnInsertShape.menu.addItem(menuItem); - } + }); }, fillEquations: function() { @@ -2872,8 +2896,10 @@ define([ this.toolbar.btnRedo.setDisabled(this._state.can_redo!==true); this.toolbar.btnCopy.setDisabled(this._state.can_copycut!==true); this.toolbar.btnPrint.setDisabled(!this.toolbar.mode.canPrint); - if (!this._state.mmdisable && (this.toolbar.mode.fileChoiceUrl || this.toolbar.mode.canRequestMailMergeRecipients)) + if (!this._state.mmdisable) { this.toolbar.btnMailRecepients.setDisabled(false); + this.toolbar.mnuMailRecepients.items[2].setVisible(this.toolbar.mode.fileChoiceUrl || this.toolbar.mode.canRequestMailMergeRecipients); + } this._state.activated = true; var props = this.api.asc_GetSectionProps(); @@ -3089,22 +3115,45 @@ define([ disable ? Common.util.Shortcuts.suspendEvents('alt+h') : Common.util.Shortcuts.resumeEvents('alt+h'); }, - onSelectRecepientsClick: function() { + onSelectRecepientsClick: function(menu, item, e) { if (this._mailMergeDlg) return; - if (this.toolbar.mode.canRequestMailMergeRecipients) { - Common.Gateway.requestMailMergeRecipients(); - } else { - var me = this; - me._mailMergeDlg = new Common.Views.SelectFileDlg({ - fileChoiceUrl: this.toolbar.mode.fileChoiceUrl.replace("{fileExt}", "xlsx").replace("{documentType}", "") - }); - me._mailMergeDlg.on('selectfile', function(obj, recepients){ - me.setMailMergeRecipients(recepients); - }).on('close', function(obj){ - me._mailMergeDlg = undefined; - }); - me._mailMergeDlg.show(); + var me = this; + if (item.value === 'file') { + this.api && this.api.asc_StartMailMerge(); + } else if (item.value === 'url') { + (new Common.Views.ImageFromUrlDialog({ + handler: function(result, value) { + if (result == 'ok') { + if (me.api) { + var checkUrl = value.replace(/ /g, ''); + if (!_.isEmpty(checkUrl)) { + me.api.asc_StartMailMerge({ fileType: "csv", url: checkUrl }); + } else { + Common.UI.warning({ + msg: me.textEmptyMMergeUrl + }); + } + } + + Common.NotificationCenter.trigger('edit:complete', me.toolbar); + } + } + })).show(); + } else if (item.value === 'storage') { + if (this.toolbar.mode.canRequestMailMergeRecipients) { + Common.Gateway.requestMailMergeRecipients(); + } else { + me._mailMergeDlg = new Common.Views.SelectFileDlg({ + fileChoiceUrl: this.toolbar.mode.fileChoiceUrl.replace("{fileExt}", "xlsx").replace("{documentType}", "") + }); + me._mailMergeDlg.on('selectfile', function(obj, recepients){ + me.setMailMergeRecipients(recepients); + }).on('close', function(obj){ + me._mailMergeDlg = undefined; + }); + me._mailMergeDlg.show(); + } } }, @@ -3612,7 +3661,9 @@ define([ txtMarginsH: 'Top and bottom margins are too high for a given page height', textInsert: 'Insert', textTabForms: 'Forms', - textGroup: 'Group' + textGroup: 'Group', + textEmptyMMergeUrl: 'You need to specify URL.', + textRecentlyUsed: 'Recently Used' }, DE.Controllers.Toolbar || {})); }); diff --git a/apps/documenteditor/main/app/template/FormSettings.template b/apps/documenteditor/main/app/template/FormSettings.template index c63a68c60..19920e183 100644 --- a/apps/documenteditor/main/app/template/FormSettings.template +++ b/apps/documenteditor/main/app/template/FormSettings.template @@ -34,11 +34,44 @@
+ + + + + + + +
+ + +
+ + + + +
+ + +
+
+
+ +
+ + +
+ + + + +
+ +
@@ -56,24 +89,8 @@
- - - -
- - - - -
- - - - -
- - - +
@@ -105,28 +122,17 @@ - +
- - - - - - + -
- + + +
-
-
-
-
-
-
-
-
-
+ +
diff --git a/apps/documenteditor/main/app/template/StatusBar.template b/apps/documenteditor/main/app/template/StatusBar.template index bcf70b81d..92c6fbed7 100644 --- a/apps/documenteditor/main/app/template/StatusBar.template +++ b/apps/documenteditor/main/app/template/StatusBar.template @@ -12,12 +12,7 @@
-
- -
+
diff --git a/apps/documenteditor/main/app/view/AddNewCaptionLabelDialog.js b/apps/documenteditor/main/app/view/AddNewCaptionLabelDialog.js index 4ca86915e..9be42c8fe 100644 --- a/apps/documenteditor/main/app/view/AddNewCaptionLabelDialog.js +++ b/apps/documenteditor/main/app/view/AddNewCaptionLabelDialog.js @@ -84,7 +84,7 @@ define([ }); var $window = this.getChild(); - $window.find('.btn').on('click', _.bind(this.onBtnClick, this)); + $window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this)); }, show: function() { diff --git a/apps/documenteditor/main/app/view/ChartSettings.js b/apps/documenteditor/main/app/view/ChartSettings.js index 04d71b17a..1470e4092 100644 --- a/apps/documenteditor/main/app/view/ChartSettings.js +++ b/apps/documenteditor/main/app/view/ChartSettings.js @@ -235,7 +235,8 @@ define([ cls: 'combo-chart-style', dataHint: '1', dataHintDirection: 'bottom', - dataHintOffset: 'big' + dataHintOffset: 'big', + delayRenderTips: true }); this.cmbWrapType.menuPicker.itemTemplate = this.cmbWrapType.fieldPicker.itemTemplate = _.template([ '
', @@ -274,7 +275,8 @@ define([ restoreHeight: 465, groups: new Common.UI.DataViewGroupStore(Common.define.chartData.getChartGroupData()), store: new Common.UI.DataViewStore(Common.define.chartData.getChartData()), - itemTemplate: _.template('
\">
') + itemTemplate: _.template('
\">
'), + delayRenderTips: true }); }); this.btnChartType.render($('#chart-button-type')); @@ -444,7 +446,8 @@ define([ cls: 'combo-chart-style', dataHint: '1', dataHintDirection: 'bottom', - dataHintOffset: 'big' + dataHintOffset: 'big', + delayRenderTips: true }); this.cmbChartStyle.render($('#chart-combo-style')); this.cmbChartStyle.openButton.menu.cmpEl.css({ diff --git a/apps/documenteditor/main/app/view/DocumentHolder.js b/apps/documenteditor/main/app/view/DocumentHolder.js index de8dc19be..296401d4c 100644 --- a/apps/documenteditor/main/app/view/DocumentHolder.js +++ b/apps/documenteditor/main/app/view/DocumentHolder.js @@ -443,8 +443,18 @@ define([ }); var onHyperlinkClick = function(url) { - if (url /*&& me.api.asc_getUrlType(url)>0*/) { - window.open(url); + if (url) { + if (me.api.asc_getUrlType(url)>0) + window.open(url); + else + Common.UI.warning({ + msg: me.txtWarnUrl, + buttons: ['yes', 'no'], + primary: 'yes', + callback: function(btn) { + (btn == 'yes') && window.open(url); + } + }); } }; @@ -494,7 +504,8 @@ define([ var showPoint, ToolTip, type = moveData.get_Type(); - if (type==Asc.c_oAscMouseMoveDataTypes.Hyperlink || type==Asc.c_oAscMouseMoveDataTypes.Footnote || type==Asc.c_oAscMouseMoveDataTypes.Form) { // 1 - hyperlink, 3 - footnote + if (type==Asc.c_oAscMouseMoveDataTypes.Hyperlink || type==Asc.c_oAscMouseMoveDataTypes.Footnote || type==Asc.c_oAscMouseMoveDataTypes.Form || + type==Asc.c_oAscMouseMoveDataTypes.Review && me.mode.reviewHoverMode) { if (isTooltipHiding) { mouseMoveData = moveData; return; @@ -514,12 +525,22 @@ define([ ToolTip = moveData.get_FormHelpText(); if (ToolTip.length>1000) ToolTip = ToolTip.substr(0, 1000) + '...'; + } else if (type==Asc.c_oAscMouseMoveDataTypes.Review && moveData.get_ReviewChange()) { + var changes = DE.getController("Common.Controllers.ReviewChanges").readSDKChange([moveData.get_ReviewChange()]); + if (changes && changes.length>0) + changes = changes[0]; + if (changes) { + ToolTip = ''+ Common.Utils.String.htmlEncode(AscCommon.UserInfoParser.getParsedName(changes.get('username'))) +' '; + ToolTip += ''+ changes.get('date') +'
'; + ToolTip += changes.get('changetext'); + } } var recalc = false; screenTip.isHidden = false; - ToolTip = Common.Utils.String.htmlEncode(ToolTip); + if (type!==Asc.c_oAscMouseMoveDataTypes.Review) + ToolTip = Common.Utils.String.htmlEncode(ToolTip); if (screenTip.tipType !== type || screenTip.tipLength !== ToolTip.length || screenTip.strTip.indexOf(ToolTip)<0 ) { screenTip.toolTip.setTitle((type==Asc.c_oAscMouseMoveDataTypes.Hyperlink) ? (ToolTip + '
' + me.txtPressLink + '') : ToolTip); @@ -1578,6 +1599,7 @@ define([ : Common.util.Shortcuts.resumeEvents(hkComments); /** coauthoring end **/ this.editorConfig = {user: m.user}; + this._fillFormwMode = !this.mode.isEdit && this.mode.canFillForms; }; me.on('render:after', onAfterRender, me); @@ -1969,6 +1991,18 @@ define([ value: 'copy' }).on('click', _.bind(me.onCutCopyPaste, me)); + var menuViewPaste = new Common.UI.MenuItem({ + iconCls: 'menu__icon btn-paste', + caption : me.textPaste, + value : 'paste' + }).on('click', _.bind(me.onCutCopyPaste, me)); + + var menuViewCut = new Common.UI.MenuItem({ + iconCls: 'menu__icon btn-cut', + caption : me.textCut, + value : 'cut' + }).on('click', _.bind(me.onCutCopyPaste, me)); + var menuViewUndo = new Common.UI.MenuItem({ iconCls: 'menu__icon btn-undo', caption: me.textUndo @@ -2006,7 +2040,8 @@ define([ isInSign = !!signProps && me._canProtect, control_lock = (value.paraProps) ? (!value.paraProps.value.can_DeleteBlockContentControl() || !value.paraProps.value.can_EditBlockContentControl() || !value.paraProps.value.can_DeleteInlineContentControl() || !value.paraProps.value.can_EditInlineContentControl()) : false, - canComment = !isInChart && me.api.can_AddQuotedComment() !== false && me.mode.canCoAuthoring && me.mode.canComments && !me._isDisabled && !control_lock; + canComment = !isInChart && me.api.can_AddQuotedComment() !== false && me.mode.canCoAuthoring && me.mode.canComments && !me._isDisabled && !control_lock, + canEditControl = false; if (me.mode.compatibleFeatures) canComment = canComment && !isInShape; @@ -2015,6 +2050,8 @@ define([ spectype = control_props ? control_props.get_SpecificType() : Asc.c_oAscContentControlSpecificType.None; canComment = canComment && !(spectype==Asc.c_oAscContentControlSpecificType.CheckBox || spectype==Asc.c_oAscContentControlSpecificType.Picture || spectype==Asc.c_oAscContentControlSpecificType.ComboBox || spectype==Asc.c_oAscContentControlSpecificType.DropDownList || spectype==Asc.c_oAscContentControlSpecificType.DateTime); + + canEditControl = spectype !== undefined && (spectype === Asc.c_oAscContentControlSpecificType.None || spectype === Asc.c_oAscContentControlSpecificType.ComboBox) && !control_lock; } menuViewUndo.setVisible(me.mode.canCoAuthoring && me.mode.canComments && !me._isDisabled); @@ -2038,13 +2075,21 @@ define([ menuViewAddComment.setVisible(canComment); menuViewAddComment.setDisabled(value.paraProps && value.paraProps.locked === true); + var disabled = value.paraProps && value.paraProps.locked === true; var cancopy = me.api && me.api.can_CopyCut(); menuViewCopy.setDisabled(!cancopy); + menuViewCut.setVisible(me._fillFormwMode && canEditControl); + menuViewCut.setDisabled(disabled || !cancopy); + menuViewPaste.setVisible(me._fillFormwMode && canEditControl); + menuViewPaste.setDisabled(disabled); menuViewPrint.setVisible(me.mode.canPrint); menuViewPrint.setDisabled(!cancopy); + }, items: [ + menuViewCut, menuViewCopy, + menuViewPaste, menuViewUndo, menuViewPrint, menuViewCopySeparator, @@ -2371,6 +2416,10 @@ define([ caption : me.editChartText }).on('click', _.bind(me.editChartClick, me)); + var menuChartEditSeparator = new Common.UI.MenuItem({ + caption : '--' + }); + this.menuOriginalSize = new Common.UI.MenuItem({ caption : me.originalSizeText }).on('click', function(item, e) { @@ -2527,6 +2576,16 @@ define([ caption : '--' }); + var menuImgEditPoints = new Common.UI.MenuItem({ + caption: me.textEditPoints + }).on('click', function(item) { + me.api && me.api.asc_editPointsGeometry(); + }); + + var menuImgEditPointsSeparator = new Common.UI.MenuItem({ + caption : '--' + }); + this.pictureMenu = new Common.UI.Menu({ cls: 'shifted-right', initMenu: function(value){ @@ -2633,7 +2692,7 @@ define([ if (menuChartEdit.isVisible()) menuChartEdit.setDisabled(islocked || value.imgProps.value.get_SeveralCharts()); - me.pictureMenu.items[22].setVisible(menuChartEdit.isVisible()); + menuChartEditSeparator.setVisible(menuChartEdit.isVisible()); me.menuOriginalSize.setDisabled(islocked || value.imgProps.value.get_ImageUrl()===null || value.imgProps.value.get_ImageUrl()===undefined); menuImageAdvanced.setDisabled(islocked); @@ -2672,6 +2731,11 @@ define([ menuSignatureEditSign.cmpEl.attr('data-value', signGuid); // sign menuSignatureEditSetup.cmpEl.attr('data-value', signGuid); // edit signature settings } + + var canEditPoints = me.api && me.api.asc_canEditGeometry(); + menuImgEditPoints.setVisible(canEditPoints); + menuImgEditPointsSeparator.setVisible(canEditPoints); + canEditPoints && menuImgEditPoints.setDisabled(islocked); }, items: [ menuImgCut, @@ -2685,6 +2749,8 @@ define([ menuImgRemoveControl, menuImgControlSettings, menuImgControlSeparator, + menuImgEditPoints, + menuImgEditPointsSeparator, menuImageArrange, menuImageAlign, me.menuImageWrap, @@ -2696,7 +2762,7 @@ define([ me.menuOriginalSize, menuImgReplace, menuChartEdit, - { caption: '--' }, + menuChartEditSeparator, menuImageAdvanced ] }).on('hide:after', function(menu, e, isFromInputControl) { @@ -3954,6 +4020,7 @@ define([ var spectype = control_props ? control_props.get_SpecificType() : Asc.c_oAscContentControlSpecificType.None; control_lock = control_lock || spectype==Asc.c_oAscContentControlSpecificType.CheckBox || spectype==Asc.c_oAscContentControlSpecificType.Picture || spectype==Asc.c_oAscContentControlSpecificType.ComboBox || spectype==Asc.c_oAscContentControlSpecificType.DropDownList || spectype==Asc.c_oAscContentControlSpecificType.DateTime; + } menuParaTOCSettings.setVisible(in_toc); menuParaTOCRefresh.setVisible(in_toc); @@ -4149,7 +4216,18 @@ define([ Common.NotificationCenter.trigger('protect:signature', 'visible', this._isDisabled, datavalue);//guid, can edit settings for requested signature break; case 3: - this.api.asc_RemoveSignature(datavalue); //guid + var me = this; + Common.UI.warning({ + title: this.notcriticalErrorTitle, + msg: this.txtRemoveWarning, + buttons: ['ok', 'cancel'], + primary: 'ok', + callback: function(btn) { + if (btn == 'ok') { + me.api.asc_RemoveSignature(datavalue); + } + } + }); break; } }, @@ -4405,9 +4483,10 @@ define([ _.defer(function(){ me.cmpEl.focus(); }, 50); }, - SetDisabled: function(state, canProtect) { + SetDisabled: function(state, canProtect, fillFormwMode) { this._isDisabled = state; this._canProtect = canProtect; + this._fillFormwMode = state ? fillFormwMode : false; }, alignmentText : 'Alignment', @@ -4636,6 +4715,11 @@ define([ textRemComboBox: 'Remove Combo Box', textRemDropdown: 'Remove Dropdown', textRemPicture: 'Remove Image', - textRemField: 'Remove Text Field' + textRemField: 'Remove Text Field', + txtRemoveWarning: 'Do you want to remove this signature?
It can\'t be undone.', + notcriticalErrorTitle: 'Warning', + txtWarnUrl: 'Clicking this link can be harmful to your device and data.
Are you sure you want to continue?', + textEditPoints: 'Edit Points' + }, DE.Views.DocumentHolder || {})); }); \ No newline at end of file diff --git a/apps/documenteditor/main/app/view/DropcapSettingsAdvanced.js b/apps/documenteditor/main/app/view/DropcapSettingsAdvanced.js index 3eda0e8c5..26bcc3618 100644 --- a/apps/documenteditor/main/app/view/DropcapSettingsAdvanced.js +++ b/apps/documenteditor/main/app/view/DropcapSettingsAdvanced.js @@ -129,7 +129,7 @@ define([ strId : item[1], iconCls : item[2], style : 'margin-left: 5px; margin-bottom: 4px;', - cls : 'btn-options large' + cls : 'btn-options large border-off' }); _btn.on('click', function(btn) { diff --git a/apps/documenteditor/main/app/view/EditListItemDialog.js b/apps/documenteditor/main/app/view/EditListItemDialog.js index 852ce4cc8..bc01606f4 100644 --- a/apps/documenteditor/main/app/view/EditListItemDialog.js +++ b/apps/documenteditor/main/app/view/EditListItemDialog.js @@ -122,7 +122,7 @@ define([ }); var $window = this.getChild(); - $window.find('.btn').on('click', _.bind(this.onBtnClick, this)); + $window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this)); }, getFocusedComponents: function() { diff --git a/apps/documenteditor/main/app/view/FileMenu.js b/apps/documenteditor/main/app/view/FileMenu.js index 5d93afa5a..9345c5626 100644 --- a/apps/documenteditor/main/app/view/FileMenu.js +++ b/apps/documenteditor/main/app/view/FileMenu.js @@ -389,7 +389,7 @@ define([ if ( this.mode.canCreateNew ) { if (this.mode.templates && this.mode.templates.length) { $('a',this.miNew.$el).text(this.btnCreateNewCaption + '...'); - !this.panels['new'] && (this.panels['new'] = ((new DE.Views.FileMenuPanels.CreateNew({menu: this, docs: this.mode.templates})).render())); + !this.panels['new'] && (this.panels['new'] = ((new DE.Views.FileMenuPanels.CreateNew({menu: this, docs: this.mode.templates, blank: this.mode.canRequestCreateNew || !!this.mode.createUrl})).render())); } } diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index 9554354b6..979a3aefb 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -212,6 +212,10 @@ define([ '
', '','', /** coauthoring end **/ + '', + '', + '', + '','', '', '', '
', @@ -444,7 +448,7 @@ define([ var itemsTemplate = _.template([ '<% _.each(items, function(item) { %>', - '
  • style="border-top: 1px solid #e5e5e5;margin-top: 5px;" <% } %> > class="checked" <% } %> ><%= scope.getDisplayValue(item) %>
  • ', + '
  • class="border-top" style="margin-top: 5px;" <% } %> > class="checked" <% } %> ><%= scope.getDisplayValue(item) %>
  • ', '<% }); %>' ].join('')); this.cmbFontRender = new Common.UI.ComboBox({ @@ -522,6 +526,20 @@ define([ dataHintOffset: 'big' }); + this.cmbReviewHover = new Common.UI.ComboBox({ + el : $markup.findById('#fms-cmb-review-hover'), + style : 'width: 160px;', + editable : false, + cls : 'input-group-nr', + data : [ + { value: false, displayValue: this.txtChangesBalloons }, + { value: true, displayValue: this.txtChangesTip } + ], + dataHint: '2', + dataHintDirection: 'bottom', + dataHintOffset: 'big' + }); + $markup.find('.btn.primary').each(function(index, el){ (new Common.UI.Button({ el: $(el) @@ -587,6 +605,7 @@ define([ $('tr.coauth', this.el)[mode.isEdit && mode.canCoAuthoring ? 'show' : 'hide'](); $('tr.coauth.changes-mode', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring && mode.canChangeCoAuthoring ? 'show' : 'hide'](); $('tr.coauth.changes-show', this.el)[mode.isEdit && !mode.isOffline && mode.canCoAuthoring ? 'show' : 'hide'](); + $('tr.view-review', this.el)[mode.canViewReview ? 'show' : 'hide'](); $('tr.comments', this.el)[mode.canCoAuthoring ? 'show' : 'hide'](); /** coauthoring end **/ @@ -666,6 +685,12 @@ define([ item = this.cmbTheme.store.findWhere({value: Common.UI.Themes.currentThemeId()}); this.cmbTheme.setValue(item ? item.get('value') : Common.UI.Themes.defaultThemeId()); } + + if (this.mode.canViewReview) { + value = Common.Utils.InternalSettings.get("de-settings-review-hover-mode"); + item = this.cmbReviewHover.store.findWhere({value: value}); + this.cmbReviewHover.setValue(item ? item.get('value') : false); + } }, applySettings: function() { @@ -698,6 +723,13 @@ define([ Common.localStorage.setItem("de-macros-mode", this.cmbMacros.getValue()); Common.Utils.InternalSettings.set("de-macros-mode", this.cmbMacros.getValue()); + if (this.mode.canViewReview) { + var val = this.cmbReviewHover.getValue(); + Common.localStorage.setBool("de-settings-review-hover-mode", val); + Common.Utils.InternalSettings.set("de-settings-review-hover-mode", val); + this.mode.reviewHoverMode = val; + } + Common.localStorage.setItem("de-settings-paste-button", this.chPaste.isChecked() ? 1 : 0); Common.localStorage.save(); @@ -794,7 +826,10 @@ define([ strPasteButton: 'Show Paste Options button when content is pasted', txtProofing: 'Proofing', strTheme: 'Theme', - txtAutoCorrect: 'AutoCorrect options...' + txtAutoCorrect: 'AutoCorrect options...', + strReviewHover: 'Track Changes Display', + txtChangesTip: 'Show by hover in tooltips', + txtChangesBalloons: 'Show by click in balloons' }, DE.Views.FileMenuPanels.Settings || {})); DE.Views.FileMenuPanels.RecentFiles = Common.UI.BaseView.extend({ @@ -867,31 +902,27 @@ define([ }, template: _.template([ - '

    <%= scope.fromBlankText %>


    ', - '
    ', - '
    ', - '', - '', - '', - '
    ', - '
    ', - '

    <%= scope.newDocumentText %>

    ', - '<%= scope.newDescriptionText %>', - '
    ', - '
    ', - '

    <%= scope.fromTemplateText %>


    ', + '

    <%= scope.txtCreateNew %>

    ', '
    ', - '<% _.each(docs, function(item) { %>', - '
    ', - '
    ', - ' style="background-image: url(<%= item.image %>);">', - '<% } else { ' + - 'print(\">\")' + - ' } %>', - '
    ', - '
    <%= Common.Utils.String.htmlEncode(item.title || item.name || "") %>
    ', + '<% if (blank) { %> ', + '
    ', + '
    ', + '', '
    ', + '
    <%= scope.txtBlank %>
    ', + '
    ', + '<% } %>', + '<% _.each(docs, function(item, index) { %>', + '
    ', + '
    ', + ' style="background-image: url(<%= item.image %>);">', + ' <%} else {' + + 'print(\">\")' + + ' } %>', + '
    ', + '
    <%= Common.Utils.String.htmlEncode(item.title || item.name || "") %>
    ', + '
    ', '<% }) %>', '
    ' ].join('')), @@ -900,13 +931,24 @@ define([ Common.UI.BaseView.prototype.initialize.call(this,arguments); this.menu = options.menu; + this.docs = options.docs; + this.blank = !!options.blank; }, render: function() { this.$el.html(this.template({ scope: this, - docs: this.options[0].docs + docs: this.docs, + blank: this.blank })); + var docs = (this.blank ? [{title: this.txtBlank}] : []).concat(this.docs); + var thumbsElm= this.$el.find('.thumb-wrap, .blank-document'); + _.each(thumbsElm, function (tmb, index){ + $(tmb).find('.title').tooltip({ + title : docs[index].title, + placement : 'cursor' + }); + }); if (_.isUndefined(this.scroller)) { this.scroller = new Common.UI.Scroller({ @@ -934,11 +976,8 @@ define([ this.menu.fireEvent('create:new', [this.menu, e.currentTarget.attributes['template'].value]); }, - fromBlankText : 'From Blank', - newDocumentText : 'New Text Document', - newDescriptionText : 'Create a new blank text document which you will be able to style and format after it is created during the editing. Or choose one of the templates to start a document of a certain type or purpose where some styles have already been pre-applied.', - fromTemplateText : 'From Template', - noTemplatesText : 'There are no templates' + txtBlank: 'Blank document', + txtCreateNew: 'Create New' }, DE.Views.FileMenuPanels.CreateNew || {})); DE.Views.FileMenuPanels.DocumentInfo = Common.UI.BaseView.extend(_.extend({ diff --git a/apps/documenteditor/main/app/view/FormSettings.js b/apps/documenteditor/main/app/view/FormSettings.js index 17d39bd90..129e22246 100644 --- a/apps/documenteditor/main/app/view/FormSettings.js +++ b/apps/documenteditor/main/app/view/FormSettings.js @@ -711,8 +711,8 @@ define([ }, insertImageFromStorage: function(data) { - if (data && data.url && data.c=='control') { - this.setImageUrl(data.url, data.token); + if (data && data._urls && data.c=='control') { + this.setImageUrl(data._urls[0], data.token); } }, @@ -743,6 +743,26 @@ define([ } }, + onColorBGSelect: function(btn, color) { + this.BackgroundColor = color; + this._state.BackgroundColor = undefined; + + var props = this._originalProps || new AscCommon.CContentControlPr(); + var formPr = this._originalFormProps || new AscCommon.CSdtFormPr(); + + if (this.api) { + if (color === 'transparent') { + formPr.put_Shd(false); + } else { + formPr.put_Shd(true, Common.Utils.ThemeColor.getRgbColor(color)); + } + props.put_FormPr(formPr); + this.api.asc_SetContentControlProperties(props, this.internalId); + } + + this.fireEvent('editcomplete', this); + }, + onColorPickerSelect: function(btn, color) { this.BorderColor = color; this._state.BorderColor = undefined; @@ -831,9 +851,9 @@ define([ rec = (this._state.listValue!==undefined) ? this.list.store.findWhere({value: this._state.listValue}) : this.list.store.at(this._state.listIndex); } if (rec) { - this.list.selectRecord(rec); + this.list.selectRecord(rec, this.txtNewValue._input.is(':focus')); this.list.scrollToRecord(rec); - } else { + } else if (!this.txtNewValue._input.is(':focus')) { this.txtNewValue.setValue(''); this._state.listValue = this._state.listIndex = undefined; } @@ -947,6 +967,45 @@ define([ (this.BorderColor != 'transparent') && this.mnuColorPicker.selectByRGB(typeof(this.BorderColor) == 'object' ? this.BorderColor.color : this.BorderColor,true); this._state.BorderColor = this.BorderColor; } + + var shd = formPr.get_Shd(); + if (shd) { + var bgColor = shd.get_Color(); + if (bgColor) { + if (bgColor.get_type() === Asc.c_oAscColor.COLOR_TYPE_SCHEME) { + this.BackgroundColor = {color: Common.Utils.ThemeColor.getHexColor(bgColor.get_r(), bgColor.get_g(), bgColor.get_b()), effectValue: bgColor.get_value() }; + } else { + this.BackgroundColor = Common.Utils.ThemeColor.getHexColor(bgColor.get_r(), bgColor.get_g(), bgColor.get_b()); + } + } else + this.BackgroundColor = 'transparent'; + } else { + this.BackgroundColor = 'transparent'; + } + + type1 = typeof(this.BackgroundColor); + type2 = typeof(this._state.BackgroundColor); + if ( (type1 !== type2) || (type1 === 'object' && + (this.BackgroundColor.effectValue!==this._state.BackgroundColor.effectValue || this._state.BackgroundColor.color.indexOf(this.BackgroundColor.color)<0)) || + (type1 !== 'object' && this._state.BackgroundColor.indexOf(this.BackgroundColor)<0 )) { + + this.btnBGColor.setColor(this.BackgroundColor); + if ( typeof(this.BackgroundColor) == 'object' ) { + var isselected = false; + for (i=0; i<10; i++) { + if ( Common.Utils.ThemeColor.ThemeValues[i] === this.BackgroundColor.effectValue ) { + this.mnuBGColorPicker.select(this.BackgroundColor, true); + isselected = true; + break; + } + } + if (!isselected) this.mnuBGColorPicker.clearSelection(); + } else + this.mnuBGColorPicker.select(this.BackgroundColor,true); + + this._state.BackgroundColor = this.BackgroundColor; + } + } var pictPr = props.get_PictureFormPr(); @@ -1020,7 +1079,7 @@ define([ val = this.api.asc_GetTextFormAutoWidth(); if ( (this._state.WidthPlaceholder!==val) || Math.abs(this._state.WidthPlaceholder-val)>0.01) { - this.spnWidth.setDefaultValue(val!==undefined && val!==null ? Common.Utils.Metric.fnRecalcFromMM((val+1) * 25.4 / 20 / 72.0) : this.spnWidth.options.minValue); + this.spnWidth.setDefaultValue(val!==undefined && val!==null ? Common.Utils.Metric.fnRecalcFromMM((val+1) * 25.4 / 20 / 72.0) : this.spnWidth.getMinValue()); this._state.WidthPlaceholder=val; } @@ -1088,6 +1147,18 @@ define([ this.btnColor.setMenu(); this.mnuColorPicker = this.btnColor.getPicker(); } + if (!this.btnBGColor) { + this.btnBGColor = new Common.UI.ColorButton({ + parentEl: $('#form-background-color-btn'), + transparent: true, + menu: true + }); + this.lockedControls.push(this.btnBGColor); + this.btnBGColor.on('color:select', _.bind(this.onColorBGSelect, this)); + this.btnBGColor.setMenu(); + this.mnuBGColorPicker = this.btnBGColor.getPicker(); + } + this.mnuBGColorPicker.updateColors(Common.Utils.ThemeColor.getEffectColors(), Common.Utils.ThemeColor.getStandartColors()); }, onHideMenus: function(menu, e, isFromInputControl){ @@ -1253,7 +1324,8 @@ define([ textNever: 'Never', textTooBig: 'Image is Too Big', textTooSmall: 'Image is Too Small', - textScale: 'When to scale' + textScale: 'When to scale', + textBackgroundColor: 'Background Color' }, DE.Views.FormSettings || {})); }); \ No newline at end of file diff --git a/apps/documenteditor/main/app/view/FormsTab.js b/apps/documenteditor/main/app/view/FormsTab.js index 665c90c4b..b43f30aba 100644 --- a/apps/documenteditor/main/app/view/FormsTab.js +++ b/apps/documenteditor/main/app/view/FormsTab.js @@ -75,6 +75,7 @@ define([ '' + ''; @@ -124,6 +125,9 @@ define([ this.btnSubmit && this.btnSubmit.on('click', function (b, e) { me.fireEvent('forms:submit'); }); + this.btnSaveForm && this.btnSaveForm.on('click', function (b, e) { + me.fireEvent('forms:save'); + }); } return { @@ -292,6 +296,17 @@ define([ }); this.paragraphControls.push(this.btnSubmit); } + if (this.appConfig.canDownloadForms) { + this.btnSaveForm = new Common.UI.Button({ + cls: 'btn-toolbar x-huge icon-top', + iconCls: 'toolbar__icon save-form', + caption: this.capBtnSaveForm, + dataHint: '1', + dataHintDirection: 'bottom', + dataHintOffset: 'small' + }); + this.paragraphControls.push(this.btnSaveForm); + } this._state = {disabled: false}; Common.NotificationCenter.on('app:ready', this.onAppReady.bind(this)); @@ -331,6 +346,7 @@ define([ me.btnPrevForm.updateHint(me.tipPrevForm); me.btnNextForm.updateHint(me.tipNextForm); me.btnSubmit && me.btnSubmit.updateHint(me.tipSubmit); + me.btnSaveForm && me.btnSaveForm.updateHint(me.tipSaveForm); setEvents.call(me); }); @@ -340,13 +356,12 @@ define([ this.$el = $(_.template(template)( {} )); var $host = this.$el; - if (this.appConfig.canSubmitForms) { - this.btnSubmit.render($host.find('#slot-btn-form-submit')); - } + this.appConfig.canSubmitForms && this.btnSubmit.render($host.find('#slot-btn-form-submit')); + this.appConfig.canDownloadForms && this.btnSaveForm.render($host.find('#slot-btn-form-save')); if (this.appConfig.isRestrictedEdit && this.appConfig.canFillForms) { this.btnClear.render($host.find('#slot-btn-form-clear')); - this.btnSubmit && $host.find('.separator.submit').show().next('.group').show(); + (this.btnSubmit || this.btnSaveForm) && $host.find('.separator.submit').show().next('.group').show(); } else { this.btnTextField.render($host.find('#slot-btn-form-field')); this.btnComboBox.render($host.find('#slot-btn-form-combobox')); @@ -412,7 +427,9 @@ define([ tipNextForm: 'Go to the next field', tipSubmit: 'Submit form', textSubmited: 'Form submitted successfully', - textRequired: 'Fill all required fields to send form.' + textRequired: 'Fill all required fields to send form.', + capBtnSaveForm: 'Save as a Form', + tipSaveForm: 'Save a file as a fillable OFORM document' } }()), DE.Views.FormsTab || {})); }); \ No newline at end of file diff --git a/apps/documenteditor/main/app/view/ImageSettings.js b/apps/documenteditor/main/app/view/ImageSettings.js index 4b781e009..86e1bb314 100644 --- a/apps/documenteditor/main/app/view/ImageSettings.js +++ b/apps/documenteditor/main/app/view/ImageSettings.js @@ -139,7 +139,8 @@ define([ cls: 'combo-chart-style', dataHint: '1', dataHintDirection: 'bottom', - dataHintOffset: '-10, 0' + dataHintOffset: '-10, 0', + delayRenderTips: true }); this.cmbWrapType.menuPicker.itemTemplate = this.cmbWrapType.fieldPicker.itemTemplate = _.template([ '
    ', @@ -495,8 +496,8 @@ define([ }, insertImageFromStorage: function(data) { - if (data && data.url && data.c=='change') { - this.setImageUrl(data.url, data.token); + if (data && data._urls && data.c=='change') { + this.setImageUrl(data._urls[0], data.token); } }, diff --git a/apps/documenteditor/main/app/view/PageSizeDialog.js b/apps/documenteditor/main/app/view/PageSizeDialog.js index 4b080b633..44655c846 100644 --- a/apps/documenteditor/main/app/view/PageSizeDialog.js +++ b/apps/documenteditor/main/app/view/PageSizeDialog.js @@ -157,8 +157,12 @@ define([ this._noApply = true; if (record.value<0) { } else { - this.spnWidth.setValue(Common.Utils.Metric.fnRecalcFromMM(this.isOrientPortrait ? record.size[0] : record.size[1]), true); - this.spnHeight.setValue(Common.Utils.Metric.fnRecalcFromMM(this.isOrientPortrait ? record.size[1] : record.size[0]), true); + var w = Common.Utils.Metric.fnRecalcFromMM(this.isOrientPortrait ? record.size[0] : record.size[1]), + h = Common.Utils.Metric.fnRecalcFromMM(this.isOrientPortrait ? record.size[1] : record.size[0]); + if (w=0) - this.btnDirection.setIconCls('item-gradient ' + this._viewDataRadial[this.GradRadialDirectionIdx].iconcls); + this.typeGradient = this._viewDataRadial[this.GradRadialDirectionIdx].type; else - this.btnDirection.setIconCls(''); + this.typeGradient= -1; + this.numGradientAngle.setValue(0, true); this.numGradientAngle.setDisabled(true); } @@ -459,7 +461,9 @@ define([ } else { rawData = record; } - this.btnDirection.setIconCls('item-gradient ' + rawData.iconcls); + + this.typeGradient = rawData.type + 90; + (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) ? this.GradLinearDirectionType = rawData.type : this.GradRadialDirectionIdx = 0; if (this.api) { if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR) { @@ -719,8 +723,8 @@ define([ }, insertImageFromStorage: function(data) { - if (data && data.url && data.c=='fill') { - this.setImageUrl(data.url, data.token); + if (data && data._urls && data.c=='fill') { + this.setImageUrl(data._urls[0], data.token); } }, @@ -932,7 +936,6 @@ define([ } this._state.GradFillType = this.GradFillType; } - if (this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR ) { var value = Math.floor(fill.get_linear_angle()/60000); if (Math.abs(this.GradLinearDirectionType-value)>0.001) { @@ -940,9 +943,10 @@ define([ var record = this.mnuDirectionPicker.store.findWhere({type: value}); this.mnuDirectionPicker.selectRecord(record, true); if (record) - this.btnDirection.setIconCls('item-gradient ' + record.get('iconcls')); + this.typeGradient = value + 90; else - this.btnDirection.setIconCls(''); + this.typeGradient= -1; + this.numGradientAngle.setValue(value, true); } } else @@ -975,10 +979,15 @@ define([ me.GradColor.values[index] = position; } }); + var arrGrCollors=[]; + var scale=(this.GradFillType == Asc.c_oAscFillGradType.GRAD_LINEAR)?1:0.7; for (var index=0; index= this.GradColor.colors.length) { me.GradColor.currentIdx = 0; } @@ -1191,6 +1200,26 @@ define([ } }, + btnDirectionRedraw: function(slider, gradientColorsStr) { + this.gradientColorsStr = gradientColorsStr; + if (this.mnuDirectionPicker.dataViewItems.length == 1) + this.mnuDirectionPicker.dataViewItems[0].$el.children(0).css({'background': 'radial-gradient(' + gradientColorsStr + ')'}); + else + this.mnuDirectionPicker.dataViewItems.forEach(function (item) { + var type = item.model.get('type') + 90; + item.$el.children(0).css({'background': 'linear-gradient(' + type + 'deg, ' + gradientColorsStr + ')'}); + }); + + if (this.typeGradient == -1) + this.btnDirection.$icon.css({'background': 'none'}); + else if (this.typeGradient == 2) + this.btnDirection.$icon.css({'background': ('radial-gradient(' + gradientColorsStr + ')')}); + else + this.btnDirection.$icon.css({ + 'background': ('linear-gradient(' + this.typeGradient + 'deg, ' + gradientColorsStr + ')') + }); + }, + createDelayedControls: function() { var me = this; @@ -1336,23 +1365,23 @@ define([ this.fillControls.push(this.cmbGradType); this._viewDataLinear = [ - { offsetx: 0, offsety: 0, type:45, subtype:-1, iconcls:'gradient-left-top' }, - { offsetx: 50, offsety: 0, type:90, subtype:4, iconcls:'gradient-top'}, - { offsetx: 100, offsety: 0, type:135, subtype:5, iconcls:'gradient-right-top'}, - { offsetx: 0, offsety: 50, type:0, subtype:6, iconcls:'gradient-left', cls: 'item-gradient-separator', selected: true}, - { offsetx: 100, offsety: 50, type:180, subtype:1, iconcls:'gradient-right'}, - { offsetx: 0, offsety: 100, type:315, subtype:2, iconcls:'gradient-left-bottom'}, - { offsetx: 50, offsety: 100, type:270, subtype:3, iconcls:'gradient-bottom'}, - { offsetx: 100, offsety: 100, type:225, subtype:7, iconcls:'gradient-right-bottom'} + { type:45, subtype:-1}, + { type:90, subtype:4}, + { type:135, subtype:5}, + { type:0, subtype:6, cls: 'item-gradient-separator', selected: true}, + { type:180, subtype:1}, + { type:315, subtype:2}, + { type:270, subtype:3}, + { type:225, subtype:7} ]; this._viewDataRadial = [ - { offsetx: 100, offsety: 150, type:2, subtype:5, iconcls:'gradient-radial-center'} + { type:2, subtype:5} ]; this.btnDirection = new Common.UI.Button({ cls : 'btn-large-dataview', - iconCls : 'item-gradient gradient-left', + iconCls : 'item-gradient', menu : new Common.UI.Menu({ style: 'min-width: 60px;', menuAlign: 'tr-br', @@ -1371,7 +1400,9 @@ define([ restoreHeight: 174, allowScrollbar: false, store: new Common.UI.DataViewStore(me._viewDataLinear), - itemTemplate: _.template('
    ') + itemTemplate: _.template('
    ') }); }); this.btnDirection.render($('#shape-button-direction')); @@ -1586,7 +1617,8 @@ define([ cls: 'combo-chart-style', dataHint: '1', dataHintDirection: 'bottom', - dataHintOffset: 'big' + dataHintOffset: 'big', + delayRenderTips: true }); this.cmbWrapType.menuPicker.itemTemplate = this.cmbWrapType.fieldPicker.itemTemplate = _.template([ '
    ', @@ -1611,7 +1643,7 @@ define([ iconCls: 'btn-change-shape', menu : new Common.UI.Menu({ menuAlign: 'tr-br', - cls: 'menu-shapes', + cls: 'menu-shapes menu-change-shape', items: [] }), dataHint: '1', @@ -1785,47 +1817,33 @@ define([ fillAutoShapes: function() { var me = this, - shapesStore = this.application.getCollection('ShapeGroups'), - count = shapesStore.length; + recents = Common.localStorage.getItem('de-recent-shapes'); - var onShowAfter = function(menu) { - for (var i=-1; i0; i++) { - var store = shapesStore.at(i > -1 ? i : 0).get('groupStore'); - if (i<0) { - store = store.clone(); - store.shift(); - } - var shapePicker = new Common.UI.DataViewSimple({ - el: $('#id-shape-menu-shapegroup' + (i+1), menu.items[i+1].$el), - store: store, - parentMenu: menu.items[i+1].menu, - itemTemplate: _.template('
    \">
    ') - }); - shapePicker.on('item:click', function(picker, item, record, e) { - if (me.api) { - me.api.ChangeShapeType(record.get('data').shapeType); - me.fireEvent('editcomplete', me); - } - if (e.type !== 'click') - me.btnChangeShape.menu.hide(); - }); - } - menu.off('show:after', onShowAfter); - }; - me.btnChangeShape.menu.on('show:after', onShowAfter); - - for (var i=-1; i0; i++) { - var shapeGroup = shapesStore.at(i > -1 ? i : i + 1); - var menuItem = new Common.UI.MenuItem({ - caption: shapeGroup.get('groupName'), - menu: new Common.UI.Menu({ - menuAlign: 'tr-tl', - items: [ - {template: _.template('')} - ] - }) + for (var i = 0; i < 2; i++) { + var menuitem = new Common.UI.MenuItem({ + template: _.template(''), + index: i + }); + me.btnChangeShape.menu.addItem(menuitem); + + var shapePicker = new Common.UI.DataViewShape({ + el: $('#id-change-shape-menu-' + i), + itemTemplate: _.template('
    \">
    '), + groups: me.application.getCollection('ShapeGroups'), + parentMenu: me.btnChangeShape.menu, + restoreHeight: 640, + textRecentlyUsed: me.textRecentlyUsed, + recentShapes: recents ? JSON.parse(recents) : null, + isFromImage: i === 0 + }); + shapePicker.on('item:click', function(picker, item, record, e) { + if (me.api) { + me.api.ChangeShapeType(record.get('data').shapeType); + me.fireEvent('editcomplete', me); + } + if (e.type !== 'click') + me.btnChangeShape.menu.hide(); }); - me.btnChangeShape.menu.addItem(menuItem); } me.btnChangeShape.menu.items[0].setVisible(me._state.isFromImage); me.btnChangeShape.menu.items[1].setVisible(!me._state.isFromImage); @@ -2093,6 +2111,7 @@ define([ textPosition: 'Position', tipAddGradientPoint: 'Add gradient point', tipRemoveGradientPoint: 'Remove gradient point', - textAngle: 'Angle' + textAngle: 'Angle', + textRecentlyUsed: 'Recently Used' }, DE.Views.ShapeSettings || {})); }); diff --git a/apps/documenteditor/main/app/view/SignatureSettings.js b/apps/documenteditor/main/app/view/SignatureSettings.js index c489c8e13..88c7ede7a 100644 --- a/apps/documenteditor/main/app/view/SignatureSettings.js +++ b/apps/documenteditor/main/app/view/SignatureSettings.js @@ -100,7 +100,7 @@ define([ enableKeyEvents: false, itemTemplate: _.template([ '
    ', - '
    ' + 'nomargin' + '<% } %>">
    ', + '
    ' + 'nomargin' + '<% } %>">
    ', '
    <%= Common.Utils.String.htmlEncode(name) %>
    ', '
    <%= Common.Utils.String.htmlEncode(date) %>
    ', '
    ' @@ -400,7 +400,7 @@ define([ allowMerge: false, allowSignature: true, allowProtect: true, - rightMenu: {clear: disable && (DE.getController('RightMenu').rightmenu.GetActivePane() !== 'id-signature-settings'), disable: true}, + rightMenu: {clear: false, disable: true}, statusBar: true, leftMenu: {disable: false, previewMode: true}, fileMenu: false, diff --git a/apps/documenteditor/main/app/view/Statusbar.js b/apps/documenteditor/main/app/view/Statusbar.js index 55b69d8c3..d3731cf1c 100644 --- a/apps/documenteditor/main/app/view/Statusbar.js +++ b/apps/documenteditor/main/app/view/Statusbar.js @@ -67,10 +67,8 @@ define([ } function _clickLanguage(menu, item) { - var $parent = menu.$el.parent(); - $parent.find('#status-label-lang').text(item.caption); this.langMenu.prevTip = item.value.value; - + this.btnLanguage.setCaption(item.caption); this.fireEvent('langchanged', [this, item.value.code, item.caption]); } @@ -83,23 +81,6 @@ define([ if (me.btnLanguage && me.btnLanguage.cmpEl) { me.btnLanguage.updateHint(me.tipSetLang); - me.btnLanguage.cmpEl.on({ - 'show.bs.dropdown': function () { - _.defer(function () { - me.btnLanguage.cmpEl.find('ul').focus(); - }, 100); - }, - 'hide.bs.dropdown': function () { - _.defer(function () { - me.api.asc_enableKeyEvents(true); - }, 100); - }, - 'click': function (e) { - if (me.btnLanguage.isDisabled()) { - return false; - } - } - }); me.langMenu.on('item:click', _.bind(_clickLanguage, this)); } @@ -223,9 +204,14 @@ define([ }); this.btnLanguage = new Common.UI.Button({ - // el: panelLang, - hintAnchor: 'top-left', - disabled: true + cls : 'btn-toolbar', + caption : 'English (United States)', + hintAnchor : 'top-left', + style : 'margin-left: 6px;', + disabled: true, + dataHint : '0', + dataHintDirection: 'top', + menu: true }); this.langMenu = new Common.UI.MenuSimple({ @@ -299,11 +285,8 @@ define([ _btn_render(me.txtGoToPage, $('#status-goto-page', me.$layout)); if ( !config || config.isEdit ) { - var panelLang = $('.cnt-lang', me.$layout); - _btn_render(me.btnLanguage, panelLang); - - me.langMenu.render(panelLang); - me.langMenu.cmpEl.attr({tabindex: -1}); + me.btnLanguage.render($('#btn-cnt-lang', me.$layout)); + me.btnLanguage.setMenu(me.langMenu); me.langMenu.prevTip = 'en'; } @@ -360,9 +343,7 @@ define([ setLanguage: function(info) { if (this.langMenu.prevTip != info.value && info.code !== undefined) { - var $parent = $(this.langMenu.el.parentNode, this.$el); - $parent.find('#status-label-lang').text(info.displayValue); - + this.btnLanguage.setCaption(info.displayValue); this.langMenu.prevTip = info.value; var lang = _.find(this.langMenu.items, function(item) { return item.caption == info.displayValue; }); @@ -384,8 +365,8 @@ define([ }, SetDisabled: function(disable) { - var langs = this.langMenu.items.length>0; - this.btnLanguage.setDisabled(disable || !langs); + this.btnLanguage.setDisabled(disable || this.langMenu.items.length<1); + this.btnTurnReview && this.btnTurnReview.setDisabled(disable); }, onApiCoAuthoringDisconnect: function() { diff --git a/apps/documenteditor/main/app/view/TableOfContentsSettings.js b/apps/documenteditor/main/app/view/TableOfContentsSettings.js index ba74998dd..a417d0e7c 100644 --- a/apps/documenteditor/main/app/view/TableOfContentsSettings.js +++ b/apps/documenteditor/main/app/view/TableOfContentsSettings.js @@ -319,8 +319,8 @@ define([ if (newValue) { this.levelsContainer.toggleClass('hidden', !newValue); this.stylesContainer.toggleClass('hidden', newValue); - if (this._needUpdateOutlineLevels) - this.synchronizeLevelsFromStyles(); + if (this._needUpdateOutlineLevels || this._forceUpdateOutlineLevels) + this.synchronizeLevelsFromStyles(true); } }, this)); @@ -354,19 +354,7 @@ define([ allowDecimal: false, maskExp: /[1-9]/ }); - this.spnLevels.on('change', _.bind(function(field, newValue, oldValue, eOpts){ - this._needUpdateStyles = true; - this.startLevel = 1; - this.endLevel = field.getNumberValue(); - - if (this.api && !this._noApply) { - var properties = (this._originalProps) ? this._originalProps : new Asc.CTableOfContentsPr(); - properties.clear_Styles(); - properties.put_OutlineRange(this.startLevel, this.endLevel); - this.api.SetDrawImagePlaceContents('tableofcontents-img', properties); - this.scrollerY.update(); - } - }, this)); + this.spnLevels.on('change', _.bind(this.onLevelsChange, this)); this.stylesLevels = new Common.UI.DataViewStore(); @@ -629,6 +617,7 @@ define([ }); this.stylesLevels.reset(styles); if (checkStyles) { + this._forceUpdateOutlineLevels = true; this.radioStyles.setValue(true); this.stylesList.scroller.update({alwaysVisibleY: true}); var rec = this.stylesLevels.findWhere({checked: true}); @@ -715,7 +704,7 @@ define([ this._needUpdateStyles = false; }, - synchronizeLevelsFromStyles: function() { + synchronizeLevelsFromStyles: function(reset) { var new_start = -1, new_end = -1, empty_index = -1, disable_outlines = false; @@ -756,8 +745,10 @@ define([ this.startLevel = new_start; this.endLevel = new_end; - this.spnLevels.setValue(new_end>0 ? new_end : '', true); + this.spnLevels.setValue(new_end>0 ? new_end : (reset ? 9 : ''), true); + reset && (new_end<=0) && this.onLevelsChange(this.spnLevels); this._needUpdateOutlineLevels = false; + this._forceUpdateOutlineLevels = false; }, getSettings: function () { @@ -862,6 +853,20 @@ define([ } }, + onLevelsChange: function(field, newValue, oldValue, eOpts){ + this._needUpdateStyles = true; + this.startLevel = 1; + this.endLevel = field.getNumberValue(); + + if (this.api && !this._noApply) { + var properties = (this._originalProps) ? this._originalProps : new Asc.CTableOfContentsPr(); + properties.clear_Styles(); + properties.put_OutlineRange(this.startLevel, this.endLevel); + this.api.SetDrawImagePlaceContents('tableofcontents-img', properties); + this.scrollerY.update(); + } + }, + disableButtons: function() { this.type && this.btnOk.setDisabled(this.radioCaption.getValue() && this.cmbCaptions.getValue()===null || this.radioStyle.getValue() && this.cmbTOFStyles.length<1); }, diff --git a/apps/documenteditor/main/app/view/TableSettings.js b/apps/documenteditor/main/app/view/TableSettings.js index fe1547585..bf31a827b 100644 --- a/apps/documenteditor/main/app/view/TableSettings.js +++ b/apps/documenteditor/main/app/view/TableSettings.js @@ -240,6 +240,8 @@ define([ createDelayedControls: function() { var me = this; + this._tableTemplates && this._onInitTemplates(this._tableTemplates); + this.chHeader = new Common.UI.CheckBox({ el: $('#table-checkbox-header'), labelText: this.textHeader, @@ -522,7 +524,7 @@ define([ this.mnuTableTemplatePicker.selectRecord(rec, true); this.btnTableTemplate.resumeEvents(); - this.$el.find('.icon-template-table').css({'background-image': 'url(' + rec.get("imageUrl") + ')', 'height': '52px', 'width': '72px', 'background-position': 'center', 'background-size': 'auto 50px'}); + this.$el.find('.icon-template-table').css({'background-image': 'url(' + rec.get("imageUrl") + ')', 'height': '52px', 'width': '72px', 'background-position': 'center', 'background-size': 'auto 52px'}); this._state.TemplateId = value; } @@ -729,6 +731,11 @@ define([ }, _onInitTemplates: function(Templates){ + if (this._initSettings) { + this._tableTemplates = Templates; + return; + } + var self = this; this._isTemplatesChanged = true; @@ -737,7 +744,7 @@ define([ cls : 'btn-large-dataview template-table', iconCls : 'icon-template-table', menu : new Common.UI.Menu({ - style: 'width: 575px;', + style: 'width: 588px;', items: [ { template: _.template('') } ] @@ -753,8 +760,9 @@ define([ restoreHeight: 350, groups: new Common.UI.DataViewGroupStore(), store: new Common.UI.DataViewStore(), - itemTemplate: _.template('
    '), - style: 'max-height: 350px;' + itemTemplate: _.template('
    '), + style: 'max-height: 350px;', + delayRenderTips: true }); }); this.btnTableTemplate.render($('#table-btn-template')); diff --git a/apps/documenteditor/main/app/view/TableSettingsAdvanced.js b/apps/documenteditor/main/app/view/TableSettingsAdvanced.js index 1030478cc..fb5306e99 100644 --- a/apps/documenteditor/main/app/view/TableSettingsAdvanced.js +++ b/apps/documenteditor/main/app/view/TableSettingsAdvanced.js @@ -949,7 +949,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat var _btn = new Common.UI.Button({ parentEl: $('#'+item[2]), style: 'margin-left: 5px; margin-bottom: 4px;', - cls: 'btn-options large', + cls: 'btn-options large border-off', iconCls: item[1], strId :item[0], hint: item[3] @@ -975,7 +975,7 @@ define([ 'text!documenteditor/main/app/template/TableSettingsAdvanced.templat var _btn = new Common.UI.Button({ parentEl: $('#'+item[3]), style: 'margin-left: 5px; margin-bottom: 4px;', - cls: 'btn-options large', + cls: 'btn-options large border-off', iconCls: item[2], strCellId :item[0], strTableId :item[1], diff --git a/apps/documenteditor/main/app/view/TableToTextDialog.js b/apps/documenteditor/main/app/view/TableToTextDialog.js index 40ac3fa2a..cd573cbaa 100644 --- a/apps/documenteditor/main/app/view/TableToTextDialog.js +++ b/apps/documenteditor/main/app/view/TableToTextDialog.js @@ -46,7 +46,7 @@ define([ DE.Views.TableToTextDialog = Common.UI.Window.extend(_.extend({ options: { - width: 240, + width: 300, height: 254, header: true, style: 'min-width: 240px;', diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js index d0adfc37a..c47061055 100644 --- a/apps/documenteditor/main/app/view/Toolbar.js +++ b/apps/documenteditor/main/app/view/Toolbar.js @@ -619,7 +619,7 @@ define([ iconCls: 'toolbar__icon btn-insertshape', caption: me.capBtnInsShape, enableToggle: true, - menu: new Common.UI.Menu({cls: 'menu-shapes'}), + menu: new Common.UI.Menu({cls: 'menu-shapes menu-insert-shape'}), dataHint: '1', dataHintDirection: 'bottom', dataHintOffset: 'small' @@ -750,7 +750,7 @@ define([ { caption: this.mniHighlightControls, value: 'highlight', - menu: new Common.UI.Menu({ + menu: this.mnuHighlightControls = new Common.UI.Menu({ menuAlign : 'tl-tr', items: [ this.mnuNoControlsColor = new Common.UI.MenuItem({ @@ -760,7 +760,10 @@ define([ }), {caption: '--'}, {template: _.template('
    ')}, - {template: _.template('' + this.textNewColor + '')} + { + id: 'id-toolbar-menu-new-control-color', + template: _.template('' + this.textNewColor + '') + } ] }) } @@ -1146,7 +1149,14 @@ define([ cls: 'btn-toolbar', iconCls: 'toolbar__icon btn-mailmerge', dataHint: '1', - dataHintDirection: 'bottom' + dataHintDirection: 'bottom', + menu: new Common.UI.Menu({ + items: [ + {caption: this.mniFromFile, value: 'file'}, + {caption: this.mniFromUrl, value: 'url'}, + {caption: this.mniFromStorage, value: 'storage'} + ] + }) }); me.btnImgAlign = new Common.UI.Button({ @@ -1234,6 +1244,7 @@ define([ this.mnuPageSize = this.btnPageSize.menu; this.mnuColorSchema = this.btnColorSchemas.menu; this.mnuChangeCase = this.btnChangeCase.menu; + this.mnuMailRecepients = this.btnMailRecepients.menu; this.cmbFontSize = new Common.UI.ComboBox({ cls: 'input-group-nr', @@ -1275,21 +1286,19 @@ define([ this.paragraphControls.push(this.cmbFontName); this.listStylesAdditionalMenuItem = new Common.UI.MenuItem({ - template: _.template( - '
    ' + - '' + - '' + - '
    ') + cls: 'save-style-container', + iconCls: 'menu__icon btn-zoomup', + caption: me.textStyleMenuNew }); this.listStyles = new Common.UI.ComboDataView({ cls: 'combo-styles', itemWidth: 104, - itemHeight: 38, + itemHeight: 40, // hint : this.tipParagraphStyle, dataHint: '1', dataHintDirection: 'bottom', - dataHintOffset: '-16, 0', + dataHintOffset: '-16, -4', enableKeyEvents: true, additionalMenuItems: [this.listStylesAdditionalMenuItem], beforeOpenHandler: function (e) { @@ -1833,9 +1842,9 @@ define([ this.btnMarkers.setMenu( new Common.UI.Menu({ cls: 'shifted-left', - style: 'min-width: 139px', + style: 'min-width: 145px', items: [ - {template: _.template('')}, + {template: _.template('')}, {caption: '--'}, this.mnuMarkerChangeLevel = new Common.UI.MenuItem({ caption: this.textChangeLevel, @@ -2003,66 +2012,77 @@ define([ this.mnuMarkersPicker = new Common.UI.DataView({ el: $('#id-toolbar-menu-markers'), parentMenu: this.btnMarkers.menu, + outerMenu: {menu: this.btnMarkers.menu, index: 0}, restoreHeight: 138, allowScrollbar: false, + delayRenderTips: true, store: new Common.UI.DataViewStore([ - {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: -1}, skipRenderOnChange: true}, - {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 1}, skipRenderOnChange: true}, - {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 2}, skipRenderOnChange: true}, - {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 3}, skipRenderOnChange: true}, - {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 4}, skipRenderOnChange: true}, - {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 5}, skipRenderOnChange: true}, - {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 6}, skipRenderOnChange: true}, - {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 7}, skipRenderOnChange: true}, - {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 8}, skipRenderOnChange: true} + {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: -1}, skipRenderOnChange: true, tip: this.textNone}, + {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 1}, skipRenderOnChange: true, tip: this.tipMarkersFRound}, + {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 2}, skipRenderOnChange: true, tip: this.tipMarkersHRound}, + {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 3}, skipRenderOnChange: true, tip: this.tipMarkersFSquare}, + {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 4}, skipRenderOnChange: true, tip: this.tipMarkersStar}, + {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 5}, skipRenderOnChange: true, tip: this.tipMarkersArrow}, + {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 6}, skipRenderOnChange: true, tip: this.tipMarkersCheckmark}, + {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 7}, skipRenderOnChange: true, tip: this.tipMarkersFRhombus}, + {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 8}, skipRenderOnChange: true, tip: this.tipMarkersDash} ]), itemTemplate: _.template('
    ') }); + this.btnMarkers.menu.setInnerMenu([{menu: this.mnuMarkersPicker, index: 0}]); _conf && this.mnuMarkersPicker.selectByIndex(_conf.index, true); _conf = this.mnuNumbersPicker.conf; this.mnuNumbersPicker = new Common.UI.DataView({ el: $('#id-toolbar-menu-numbering'), parentMenu: this.btnNumbers.menu, + outerMenu: {menu: this.btnNumbers.menu, index: 0}, restoreHeight: 92, allowScrollbar: false, + delayRenderTips: true, store: new Common.UI.DataViewStore([ - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: -1}, skipRenderOnChange: true}, - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 4}, skipRenderOnChange: true}, - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 5}, skipRenderOnChange: true}, - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 6}, skipRenderOnChange: true}, - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 1}, skipRenderOnChange: true}, - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 2}, skipRenderOnChange: true}, - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 3}, skipRenderOnChange: true}, - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 7}, skipRenderOnChange: true} + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: -1}, skipRenderOnChange: true, tip: this.textNone}, + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 4}, skipRenderOnChange: true, tip: this.tipNumCapitalLetters}, + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 5}, skipRenderOnChange: true, tip: this.tipNumLettersParentheses}, + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 6}, skipRenderOnChange: true, tip: this.tipNumLettersPoints}, + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 1}, skipRenderOnChange: true, tip: this.tipNumNumbersPoint}, + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 2}, skipRenderOnChange: true, tip: this.tipNumNumbersParentheses}, + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 3}, skipRenderOnChange: true, tip: this.tipNumRoman}, + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 7}, skipRenderOnChange: true, tip: this.tipNumRomanSmall} ]), itemTemplate: _.template('
    ') }); + this.btnNumbers.menu.setInnerMenu([{menu: this.mnuNumbersPicker, index: 0}]); _conf && this.mnuNumbersPicker.selectByIndex(_conf.index, true); _conf = this.mnuMultilevelPicker.conf; this.mnuMultilevelPicker = new Common.UI.DataView({ el: $('#id-toolbar-menu-multilevels'), parentMenu: this.btnMultilevels.menu, + outerMenu: {menu: this.btnMultilevels.menu, index: 0}, restoreHeight: 92, allowScrollbar: false, + delayRenderTips: true, store: new Common.UI.DataViewStore([ - {id: 'id-multilevels-' + Common.UI.getId(), data: {type: 2, subtype: -1}, skipRenderOnChange: true}, - {id: 'id-multilevels-' + Common.UI.getId(), data: {type: 2, subtype: 1}, skipRenderOnChange: true}, - {id: 'id-multilevels-' + Common.UI.getId(), data: {type: 2, subtype: 2}, skipRenderOnChange: true}, - {id: 'id-multilevels-' + Common.UI.getId(), data: {type: 2, subtype: 3}, skipRenderOnChange: true} + {id: 'id-multilevels-' + Common.UI.getId(), data: {type: 2, subtype: -1}, skipRenderOnChange: true, tip: this.textNone}, + {id: 'id-multilevels-' + Common.UI.getId(), data: {type: 2, subtype: 1}, skipRenderOnChange: true, tip: this.tipMultiLevelVarious}, + {id: 'id-multilevels-' + Common.UI.getId(), data: {type: 2, subtype: 2}, skipRenderOnChange: true, tip: this.tipMultiLevelNumbered}, + {id: 'id-multilevels-' + Common.UI.getId(), data: {type: 2, subtype: 3}, skipRenderOnChange: true, tip: this.tipMultiLevelSymbols} ]), itemTemplate: _.template('
    ') }); + this.btnMultilevels.menu.setInnerMenu([{menu: this.mnuMultilevelPicker, index: 0}]); _conf && this.mnuMultilevelPicker.selectByIndex(_conf.index, true); _conf = this.mnuPageNumberPosPicker ? this.mnuPageNumberPosPicker.conf : undefined; this.mnuPageNumberPosPicker = new Common.UI.DataView({ el: $('#id-toolbar-menu-pageposition'), allowScrollbar: false, + parentMenu: this.mnuInsertPageNum.menu, + outerMenu: {menu: this.mnuInsertPageNum.menu, index: 0}, + showLast: false, store: new Common.UI.DataViewStore([ { - allowSelected: false, iconname: 'page-number-top-left', data: { type: c_pageNumPosition.PAGE_NUM_POSITION_TOP, @@ -2070,7 +2090,6 @@ define([ } }, { - allowSelected: false, iconname: 'page-number-top-center', data: { type: c_pageNumPosition.PAGE_NUM_POSITION_TOP, @@ -2078,7 +2097,6 @@ define([ } }, { - allowSelected: false, iconname: 'page-number-top-right', data: { type: c_pageNumPosition.PAGE_NUM_POSITION_TOP, @@ -2086,7 +2104,6 @@ define([ } }, { - allowSelected: false, iconname: 'page-number-bottom-left', data: { type: c_pageNumPosition.PAGE_NUM_POSITION_BOTTOM, @@ -2094,7 +2111,6 @@ define([ } }, { - allowSelected: false, iconname: 'page-number-bottom-center', data: { type: c_pageNumPosition.PAGE_NUM_POSITION_BOTTOM, @@ -2102,7 +2118,6 @@ define([ } }, { - allowSelected: false, iconname: 'page-number-bottom-right', data: { type: c_pageNumPosition.PAGE_NUM_POSITION_BOTTOM, @@ -2113,6 +2128,7 @@ define([ itemTemplate: _.template('
    ') }); _conf && this.mnuPageNumberPosPicker.setDisabled(_conf.disabled); + this.mnuInsertPageNum.menu.setInnerMenu([{menu: this.mnuPageNumberPosPicker, index: 0}]); this.mnuTablePicker = new Common.UI.DimensionPicker({ el: $('#id-toolbar-menu-tablepicker'), @@ -2160,8 +2176,10 @@ define([ '808000', '00FF00', '008080', '0000FF', '666699', '808080', 'FF0000', 'FF9900', '99CC00', '339966', '33CCCC', '3366FF', '800080', '999999', 'FF00FF', 'FFCC00', 'FFFF00', '00FF00', '00FFFF', '00CCFF', '993366', 'C0C0C0', 'FF99CC', 'FFCC99', 'FFFF99', 'CCFFCC', 'CCFFFF', 'C9C8FF', 'CC99FF', 'FFFFFF' - ] + ], + outerMenu: {menu: this.mnuHighlightControls, index: 2} }); + this.mnuHighlightControls.setInnerMenu([{menu: this.mnuControlsColorPicker, index: 2}]); } }, @@ -2602,7 +2620,28 @@ define([ mniToggleCase: 'tOGGLE cASE', textChangeLevel: 'Change List Level', mniTextToTable: 'Convert Text to Table', - txtScheme22: 'New Office' + txtScheme22: 'New Office', + mniFromFile: 'From File', + mniFromUrl: 'From URL', + mniFromStorage: 'From Storage', + tipNumCapitalLetters: 'A. B. C.', + tipNumLettersParentheses: 'a) b) c)', + tipNumLettersPoints: 'a. b. c.', + tipNumNumbersPoint: '1. 2. 3.', + tipNumNumbersParentheses: '1) 2) 3)', + tipNumRoman: 'I. II. III.', + tipNumRomanSmall: 'i. ii. iii.', + tipMultiLevelVarious: 'Multi-level various numbered bullets', + tipMultiLevelNumbered: 'Multi-level numbered bullets', + tipMultiLevelSymbols: 'Multi-level symbols bullets', + tipMarkersFRound: 'Filled round bullets', + tipMarkersHRound: 'Hollow round bullets', + tipMarkersFSquare: 'Filled square bullets', + tipMarkersStar: 'Star bullets', + tipMarkersArrow: 'Arrow bullets', + tipMarkersCheckmark: 'Checkmark bullets', + tipMarkersFRhombus: 'Filled rhombus bullets', + tipMarkersDash: 'Dash bullets' } })(), DE.Views.Toolbar || {})); }); diff --git a/apps/documenteditor/main/app/view/WatermarkSettingsDialog.js b/apps/documenteditor/main/app/view/WatermarkSettingsDialog.js index 072deeb48..ee81ac628 100644 --- a/apps/documenteditor/main/app/view/WatermarkSettingsDialog.js +++ b/apps/documenteditor/main/app/view/WatermarkSettingsDialog.js @@ -411,8 +411,8 @@ define(['text!documenteditor/main/app/template/WatermarkSettings.template', this.api.asc_registerCallback('asc_onWatermarkImageLoaded', onApiWMLoaded); var insertImageFromStorage = function(data) { - if (data && data.url && data.c=='watermark') { - me.props.put_ImageUrl(data.url, data.token); + if (data && data._urls && data.c=='watermark') { + me.props.put_ImageUrl(data._urls[0], data.token); } }; Common.NotificationCenter.on('storage:image-insert', insertImageFromStorage); diff --git a/apps/documenteditor/main/index_loader.html b/apps/documenteditor/main/index_loader.html index cc8559683..1c9047bde 100644 --- a/apps/documenteditor/main/index_loader.html +++ b/apps/documenteditor/main/index_loader.html @@ -10,6 +10,10 @@ + <% } %> + +
    +
    +
    +
    +
    +
    +
    +
    diff --git a/apps/presentationeditor/main/index_loader.html.deploy b/apps/presentationeditor/main/index_loader.html.deploy index 694fe75cd..d646c3c95 100644 --- a/apps/presentationeditor/main/index_loader.html.deploy +++ b/apps/presentationeditor/main/index_loader.html.deploy @@ -11,6 +11,10 @@ + <% } %> + +
    +
    +
    diff --git a/apps/spreadsheeteditor/main/index_loader.html.deploy b/apps/spreadsheeteditor/main/index_loader.html.deploy index fe84ec2ad..767a90f05 100644 --- a/apps/spreadsheeteditor/main/index_loader.html.deploy +++ b/apps/spreadsheeteditor/main/index_loader.html.deploy @@ -10,6 +10,10 @@ + <% } %> + +
    +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/documenteditor/main/js/ApplicationController.js b/test/documenteditor/main/js/ApplicationController.js new file mode 100644 index 000000000..d704f28d8 --- /dev/null +++ b/test/documenteditor/main/js/ApplicationController.js @@ -0,0 +1,342 @@ +/* + * + * (c) Copyright Ascensio System SIA 2010-2019 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * +*/ +DE.ApplicationController = new(function(){ + var me, + api, + config = {}, + docConfig = {}, + permissions = {}, + created = false, + appOptions = {}, + bodyWidth = 0; + + var LoadingDocument = -256; + + // Check browser + // ------------------------- + + if (typeof isBrowserSupported !== 'undefined' && !isBrowserSupported()){ + console.error(this.unsupportedBrowserErrorText); + return; + } + + common.localStorage.setId('text'); + common.localStorage.setKeysFilter('de-,asc.text'); + common.localStorage.sync(); + + // Handlers + // ------------------------- + + function loadConfig(data) { + config = $.extend(config, data.config); + } + + function loadDocument(data) { + docConfig = data.doc; + + if (docConfig) { + permissions = $.extend(permissions, docConfig.permissions); + + var _permissions = $.extend({}, docConfig.permissions), + docInfo = new Asc.asc_CDocInfo(), + _user = new Asc.asc_CUserInfo(); + + var canRenameAnonymous = !((typeof (config.customization) == 'object') && (typeof (config.customization.anonymous) == 'object') && (config.customization.anonymous.request===false)), + guestName = (typeof (config.customization) == 'object') && (typeof (config.customization.anonymous) == 'object') && + (typeof (config.customization.anonymous.label) == 'string') && config.customization.anonymous.label.trim()!=='' ? + common.utils.htmlEncode(config.customization.anonymous.label) : me.textGuest, + value = canRenameAnonymous ? common.localStorage.getItem("guest-username") : null;//, + user = common.utils.fillUserInfo(config.user, config.lang, value ? (value + ' (' + guestName + ')' ) : me.textAnonymous, + common.localStorage.getItem("guest-id") || ('uid-' + Date.now())); + user.anonymous && common.localStorage.setItem("guest-id", user.id); + + _user.put_Id(user.id); + _user.put_FullName(user.fullname); + _user.put_IsAnonymousUser(user.anonymous); + + docInfo.put_Id(docConfig.key); + docInfo.put_Url(docConfig.url); + docInfo.put_Title(docConfig.title); + docInfo.put_Format(docConfig.fileType); + docInfo.put_VKey(docConfig.vkey); + docInfo.put_UserInfo(_user); + docInfo.put_Token(docConfig.token); + docInfo.put_Permissions(_permissions); + docInfo.put_EncryptedInfo(config.encryptionKeys); + + docInfo.asc_putIsEnabledMacroses(true); + docInfo.asc_putIsEnabledPlugins(true); + + + var type = /^(?:(pdf|djvu|xps))$/.exec(docConfig.fileType); + if (type && typeof type[1] === 'string') { + permissions.edit = permissions.review = false; + } + + if (api) { + api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions); + //api.asc_registerCallback('asc_onRunAutostartMacroses', onRunAutostartMacroses); + api.asc_setDocInfo(docInfo); + api.asc_getEditorPermissions(config.licenseUrl, config.customerId); + api.asc_enableKeyEvents(true); + } + } + } + + function onLongActionBegin(type, id) { + + if (type == Asc.c_oAscAsyncActionType['BlockInteraction']) { + console.log('Action begin'); + } + } + + function onLongActionEnd(type, id){ + console.log('Action end'); + } + + function onDocumentContentReady() { + onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); + + var zf = (config.customization && config.customization.zoom ? parseInt(config.customization.zoom) : -2); + (zf == -1) ? api.zoomFitToPage() : ((zf == -2) ? api.zoomFitToWidth() : api.zoom(zf>0 ? zf : 100)); + + api.asc_registerCallback('asc_onStartAction', onLongActionBegin); + api.asc_registerCallback('asc_onEndAction', onLongActionEnd); + + Common.Gateway.on('processmouse', onProcessMouse); + Common.Gateway.on('downloadas', onDownloadAs); + Common.Gateway.on('requestclose', onRequestClose); + + + // TODO: add asc_hasRequiredFields to sdk + Common.Gateway.documentReady(); + } + + function onEditorPermissions(params) { + + var licType = params.asc_getLicenseType(); + appOptions.canLicense = (licType === Asc.c_oLicenseResult.Success || licType === Asc.c_oLicenseResult.SuccessLimit); + appOptions.canFillForms = appOptions.canLicense && (permissions.fillForms===true) && (config.mode !== 'view'); + appOptions.canSubmitForms = appOptions.canLicense && (typeof (config.customization) == 'object') && !!config.customization.submitForm; + + api.asc_SetFastCollaborative(true); + api.asc_setAutoSaveGap(1); + + onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); + + api.asc_LoadDocument(); + api.Resize(); + } + + function onError(id, level, errData) { + if (id == Asc.c_oAscError.ID.LoadingScriptError) { + console.error(me.criticalErrorTitle,me.scriptLoadError); + return; + } + + onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); + + var message; + + switch (id) + { + case Asc.c_oAscError.ID.Unknown: + message = me.unknownErrorText; + break; + + case Asc.c_oAscError.ID.ConvertationTimeout: + message = me.convertationTimeoutText; + break; + + case Asc.c_oAscError.ID.ConvertationError: + message = me.convertationErrorText; + break; + + case Asc.c_oAscError.ID.DownloadError: + message = me.downloadErrorText; + break; + + case Asc.c_oAscError.ID.ConvertationPassword: + message = me.errorFilePassProtect; + break; + + case Asc.c_oAscError.ID.UserDrop: + message = me.errorUserDrop; + break; + + case Asc.c_oAscError.ID.ConvertationOpenLimitError: + message = me.errorFileSizeExceed; + break; + + case Asc.c_oAscError.ID.UpdateVersion: + message = me.errorUpdateVersionOnDisconnect; + break; + + case Asc.c_oAscError.ID.AccessDeny: + message = me.errorAccessDeny; + break; + + case Asc.c_oAscError.ID.Submit: + message = me.errorSubmit; + break; + + case Asc.c_oAscError.ID.EditingError: + message = me.errorEditingDownloadas; + break; + + case Asc.c_oAscError.ID.ForceSaveButton: + case Asc.c_oAscError.ID.ForceSaveTimeout: + message = me.errorForceSave; + break; + + case Asc.c_oAscError.ID.LoadingFontError: + message = me.errorLoadingFont; + break; + + default: + message = me.errorDefaultMessage.replace('%1', id); + break; + } + + if (level == Asc.c_oAscError.Level.Critical) { + console.error(id,message); + } + else { + console.warn(id, message); + + } + } + + function onExternalMessage(error) { + if (error) { + console.error(error.msg); + } + } + + + function onProcessMouse(data) { + if (data.type == 'mouseup') { + var e = document.getElementById('editor_sdk'); + if (e) { + var r = e.getBoundingClientRect(); + api.OnMouseUp( + data.x - r.left, + data.y - r.top + ); + } + } + } + + function onRequestClose() { + Common.Gateway.requestClose(); + } + + function onDownloadAs() { + if ( permissions.download === false) { + //Common.Gateway.reportError(Asc.c_oAscError.ID.AccessDeny, me.errorAccessDeny); + console.error(Asc.c_oAscError.ID.AccessDeny, me.errorAccessDeny); + return; + } + if (api) api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.DOCX, false)); + } + + function onBeforeUnload () { + common.localStorage.save(); + } + + function onDocumentResize() { + api && api.Resize(); + bodyWidth = $('body').width(); + } + + function createController(){ + if (created) + return me; + + me = this; + created = true; + + $(window).resize(function(){ + onDocumentResize(); + }); + window.onbeforeunload = onBeforeUnload; + + $('#editor_sdk').on('click', function(e) { + if ( e.target.localName == 'canvas' ) { + e.currentTarget.focus(); + } + }); + + window["flat_desine"] = true; + api = new Asc.asc_docs_api({ + 'id-view' : 'editor_sdk', + 'embedded' : true + }); + + if (api){ + api.asc_registerCallback('asc_onError', onError); + api.asc_registerCallback('asc_onDocumentContentReady', onDocumentContentReady); + + // Initialize api gateway + Common.Gateway.on('init', loadConfig); + Common.Gateway.on('opendocument', loadDocument); + Common.Gateway.on('showmessage', onExternalMessage); + Common.Gateway.appReady(); + } + + return me; + } + + return { + create : createController, + errorDefaultMessage : 'Error code: %1', + unknownErrorText : 'Unknown error.', + convertationTimeoutText : 'Conversion timeout exceeded.', + convertationErrorText : 'Conversion failed.', + downloadErrorText : 'Download failed.', + criticalErrorTitle : 'Error', + scriptLoadError: 'The connection is too slow, some of the components could not be loaded. Please reload the page.', + errorFilePassProtect: 'The file is password protected and cannot be opened.', + errorAccessDeny: 'You are trying to perform an action you do not have rights for.
    Please contact your Document Server administrator.', + errorUserDrop: 'The file cannot be accessed right now.', + unsupportedBrowserErrorText: 'Your browser is not supported.', + errorFileSizeExceed: 'The file size exceeds the limitation set for your server.
    Please contact your Document Server administrator for details.', + errorUpdateVersionOnDisconnect: 'Internet connection has been restored, and the file version has been changed.
    Before you can continue working, you need to download the file or copy its content to make sure nothing is lost, and then reload this page.', + errorSubmit: 'Submit failed.', + errorEditingDownloadas: 'An error occurred during the work with the document.
    Use the \'Download as...\' option to save the file backup copy to your computer hard drive.', + textGuest: 'Guest', + textAnonymous: 'Anonymous', + errorForceSave: "An error occurred while saving the file. Please use the 'Download as' option to save the file to your computer hard drive or try again later.", + errorLoadingFont: 'Fonts are not loaded.
    Please contact your Document Server administrator.' + } +})(); \ No newline at end of file diff --git a/test/documenteditor/main/js/ApplicationView.js b/test/documenteditor/main/js/ApplicationView.js new file mode 100644 index 000000000..9285bd802 --- /dev/null +++ b/test/documenteditor/main/js/ApplicationView.js @@ -0,0 +1,50 @@ +/* + * + * (c) Copyright Ascensio System SIA 2010-2019 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * +*/ +if (DE === undefined) { + var DE = {}; +} + +DE.ApplicationView = new(function(){ + + + // Initialize view + + function createView(){ + + } + + return { + create: createView + + } +})(); diff --git a/test/documenteditor/main/js/application.js b/test/documenteditor/main/js/application.js new file mode 100644 index 000000000..f6102359b --- /dev/null +++ b/test/documenteditor/main/js/application.js @@ -0,0 +1,37 @@ +/* + * + * (c) Copyright Ascensio System SIA 2010-2019 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * +*/ ++function ($) { + DE.ApplicationView.create(); + DE.ApplicationController.create(); + +}(); diff --git a/test/documenteditor/main/resources/less/application.less b/test/documenteditor/main/resources/less/application.less new file mode 100644 index 000000000..95cba0a92 --- /dev/null +++ b/test/documenteditor/main/resources/less/application.less @@ -0,0 +1,2 @@ +// Common styles +@import "../../../../common/main/resources/less/common.less"; \ No newline at end of file diff --git a/test/presentationeditor/main/index.html b/test/presentationeditor/main/index.html new file mode 100644 index 000000000..4ee99595f --- /dev/null +++ b/test/presentationeditor/main/index.html @@ -0,0 +1,195 @@ + + + + + Documents + + + + + + + + + + + +
    + +
    + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/presentationeditor/main/js/ApplicationController.js b/test/presentationeditor/main/js/ApplicationController.js new file mode 100644 index 000000000..bcd50030c --- /dev/null +++ b/test/presentationeditor/main/js/ApplicationController.js @@ -0,0 +1,325 @@ +/* + * + * (c) Copyright Ascensio System SIA 2010-2019 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * +*/ +PE.ApplicationController = new(function(){ + var me, + api, + config = {}, + docConfig = {}, + permissions = {}, + created = false; + + var LoadingDocument = -256; + + // Check browser + // ------------------------- + + if (typeof isBrowserSupported !== 'undefined' && !isBrowserSupported()){ + console.error(this.unsupportedBrowserErrorText); + return; + } + + common.localStorage.setId('text'); + common.localStorage.setKeysFilter('pe-,asc.presentation'); + common.localStorage.sync(); + + // Handlers + // ------------------------- + + function loadConfig(data) { + config = $.extend(config, data.config); + } + + function loadDocument(data) { + docConfig = data.doc; + + if (docConfig) { + permissions = $.extend(permissions, docConfig.permissions); + + var _permissions = $.extend({}, docConfig.permissions), + docInfo = new Asc.asc_CDocInfo(), + _user = new Asc.asc_CUserInfo(); + + var canRenameAnonymous = !((typeof (config.customization) == 'object') && (typeof (config.customization.anonymous) == 'object') && (config.customization.anonymous.request===false)), + guestName = (typeof (config.customization) == 'object') && (typeof (config.customization.anonymous) == 'object') && + (typeof (config.customization.anonymous.label) == 'string') && config.customization.anonymous.label.trim()!=='' ? + common.utils.htmlEncode(config.customization.anonymous.label) : me.textGuest, + value = canRenameAnonymous ? common.localStorage.getItem("guest-username") : null, + user = common.utils.fillUserInfo(config.user, config.lang, value ? (value + ' (' + guestName + ')' ) : me.textAnonymous, + common.localStorage.getItem("guest-id") || ('uid-' + Date.now())); + user.anonymous && common.localStorage.setItem("guest-id", user.id); + + _user.put_Id(user.id); + _user.put_FullName(user.fullname); + _user.put_IsAnonymousUser(user.anonymous); + + docInfo.put_Id(docConfig.key); + docInfo.put_Url(docConfig.url); + docInfo.put_Title(docConfig.title); + docInfo.put_Format(docConfig.fileType); + docInfo.put_VKey(docConfig.vkey); + docInfo.put_UserInfo(_user); + docInfo.put_Token(docConfig.token); + docInfo.put_Permissions(_permissions); + docInfo.put_EncryptedInfo(config.encryptionKeys); + + docInfo.asc_putIsEnabledMacroses(true); + docInfo.asc_putIsEnabledPlugins(true); + + if (api) { + api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions); + api.asc_setDocInfo(docInfo); + api.asc_getEditorPermissions(config.licenseUrl, config.customerId); + api.asc_enableKeyEvents(true); + + } + } + } + + function onLongActionBegin(type, id) { + + if (type == Asc.c_oAscAsyncActionType['BlockInteraction']) { + + console.log('Action begin'); + } + } + + function onLongActionEnd(){ + console.log('Action end'); + } + + function onDocumentContentReady() { + api.ShowThumbnails(true); + + onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); + + api.asc_registerCallback('asc_onStartAction', onLongActionBegin); + api.asc_registerCallback('asc_onEndAction', onLongActionEnd); + + Common.Gateway.on('processmouse', onProcessMouse); + Common.Gateway.on('downloadas', onDownloadAs); + Common.Gateway.on('requestclose', onRequestClose); + + $('#editor_sdk').on('click', function(e) { + if ( e.target.localName == 'canvas' ) { + e.currentTarget.focus(); + } + }); + Common.Gateway.documentReady(); + } + + function onEditorPermissions(params) { + onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); + api.asc_setViewMode(false); + + api.asc_LoadDocument(); + api.Resize(); + } + + function onError(id, level, errData) { + if (id == Asc.c_oAscError.ID.LoadingScriptError) { + console.error(me.scriptLoadError); + return; + } + + onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); + + var message; + + switch (id) + { + case Asc.c_oAscError.ID.Unknown: + message = me.unknownErrorText; + break; + + case Asc.c_oAscError.ID.ConvertationTimeout: + message = me.convertationTimeoutText; + break; + + case Asc.c_oAscError.ID.ConvertationError: + message = me.convertationErrorText; + break; + + case Asc.c_oAscError.ID.DownloadError: + message = me.downloadErrorText; + break; + + case Asc.c_oAscError.ID.ConvertationPassword: + message = me.errorFilePassProtect; + break; + + case Asc.c_oAscError.ID.UserDrop: + message = me.errorUserDrop; + break; + + case Asc.c_oAscError.ID.ConvertationOpenLimitError: + message = me.errorFileSizeExceed; + break; + + case Asc.c_oAscError.ID.UpdateVersion: + message = me.errorUpdateVersionOnDisconnect; + break; + + case Asc.c_oAscError.ID.AccessDeny: + message = me.errorAccessDeny; + break; + + case Asc.c_oAscError.ID.ForceSaveButton: + case Asc.c_oAscError.ID.ForceSaveTimeout: + message = me.errorForceSave; + break; + + case Asc.c_oAscError.ID.LoadingFontError: + message = me.errorLoadingFont; + break; + + default: + message = me.errorDefaultMessage.replace('%1', id); + break; + } + + if (level == Asc.c_oAscError.Level.Critical) { + + // report only critical errors + console.error(id,message); + } + else { + console.warn(id,message); + } + +} + + function onExternalMessage(error) { + if (error) { + console.error(error.msg); + } + } + + function onProcessMouse(data) { + if (data.type == 'mouseup') { + var e = document.getElementById('editor_sdk'); + if (e) { + var r = e.getBoundingClientRect(); + api.OnMouseUp( + data.x - r.left, + data.y - r.top + ); + } + } + } + + function onRequestClose() { + Common.Gateway.requestClose(); + } + + function onDownloadAs() { + if ( permissions.download === false) { + console.error(Asc.c_oAscError.ID.AccessDeny, me.errorAccessDeny); + return; + } + if (api) api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.PPTX, false)); + } + + function onBeforeUnload () { + common.localStorage.save(); + } + + // Helpers + // ------------------------- + + function onDocumentResize() { + if (api) { + api.Resize(); + } + } + + function createController(){ + if (created) return me; + + me = this; + created = true; + + // popover ui handlers + + $(window).resize(function(){ + onDocumentResize(); + }); + window.onbeforeunload = onBeforeUnload; + + api = new Asc.asc_docs_api({ + 'id-view' : 'editor_sdk', + 'embedded' : true + }); + + if (api){ + api.SetThemesPath("../../../../sdkjs/slide/themes/"); + + api.asc_registerCallback('asc_onError', onError); + api.asc_registerCallback('asc_onDocumentContentReady', onDocumentContentReady); + + // Initialize api gateway + Common.Gateway.on('init', loadConfig); + Common.Gateway.on('opendocument', loadDocument); + Common.Gateway.on('showmessage', onExternalMessage); + Common.Gateway.appReady(); + + } + + return me; + } + + return { + create : createController, + errorDefaultMessage : 'Error code: %1', + unknownErrorText : 'Unknown error.', + convertationTimeoutText : 'Conversion timeout exceeded.', + convertationErrorText : 'Conversion failed.', + downloadErrorText : 'Download failed.', + criticalErrorTitle : 'Error', + notcriticalErrorTitle : 'Warning', + scriptLoadError: 'The connection is too slow, some of the components could not be loaded. Please reload the page.', + errorFilePassProtect: 'The file is password protected and cannot be opened.', + errorAccessDeny: 'You are trying to perform an action you do not have rights for.
    Please contact your Document Server administrator.', + errorUserDrop: 'The file cannot be accessed right now.', + unsupportedBrowserErrorText: 'Your browser is not supported.', + downloadTextText: 'Downloading presentation...', + waitText: 'Please, wait...', + textLoadingDocument: 'Loading presentation', + txtClose: 'Close', + errorFileSizeExceed: 'The file size exceeds the limitation set for your server.
    Please contact your Document Server administrator for details.', + errorUpdateVersionOnDisconnect: 'Internet connection has been restored, and the file version has been changed.
    Before you can continue working, you need to download the file or copy its content to make sure nothing is lost, and then reload this page.', + textGuest: 'Guest', + textAnonymous: 'Anonymous', + errorForceSave: "An error occurred while saving the file. Please use the 'Download as' option to save the file to your computer hard drive or try again later.", + errorLoadingFont: 'Fonts are not loaded.
    Please contact your Document Server administrator.' + } +})(); diff --git a/test/presentationeditor/main/js/ApplicationView.js b/test/presentationeditor/main/js/ApplicationView.js new file mode 100644 index 000000000..16b97ea83 --- /dev/null +++ b/test/presentationeditor/main/js/ApplicationView.js @@ -0,0 +1,46 @@ +/* + * + * (c) Copyright Ascensio System SIA 2010-2019 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * +*/ +if (PE === undefined) { + var PE = {}; +} + +PE.ApplicationView = new(function(){ + // Initialize view + + function createView(){ + } + + return { + create: createView + } +})(); diff --git a/test/presentationeditor/main/js/application.js b/test/presentationeditor/main/js/application.js new file mode 100644 index 000000000..65e765ec1 --- /dev/null +++ b/test/presentationeditor/main/js/application.js @@ -0,0 +1,36 @@ +/* + * + * (c) Copyright Ascensio System SIA 2010-2019 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * +*/ +(function ($) { + PE.ApplicationView.create(); + PE.ApplicationController.create(); +})(window.jQuery); diff --git a/test/presentationeditor/main/resources/less/application.less b/test/presentationeditor/main/resources/less/application.less new file mode 100644 index 000000000..ddb4760a3 --- /dev/null +++ b/test/presentationeditor/main/resources/less/application.less @@ -0,0 +1,34 @@ +// Bootstrap core variables and mixins +@import "../../../../common/main/resources/less/common.less"; + +.overlay-controls { + /*bottom: 15px;*/ +} + +.overlay-icon-move-left { background-position: -64px -120px; } +.overlay-icon-move-right { background-position: -96px -120px; } + +#box-preview { + position:absolute; + left: 0; + top: 0; + display:none; + width:100%; + height:100%; + z-index: 10; + padding: 48px 0 0 0; +} + +#id-preview { + width:100%; + height:100%; + position: relative; +} + +.svg-icon { + &.play { + &.pause { + background-position: -20px*10 -20px; + } + } +} diff --git a/test/spreadsheeteditor/main/index.html b/test/spreadsheeteditor/main/index.html new file mode 100644 index 000000000..f36a0cf78 --- /dev/null +++ b/test/spreadsheeteditor/main/index.html @@ -0,0 +1,167 @@ + + + + + Documents + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    +
      +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/spreadsheeteditor/main/js/ApplicationController.js b/test/spreadsheeteditor/main/js/ApplicationController.js new file mode 100644 index 000000000..dca9bf116 --- /dev/null +++ b/test/spreadsheeteditor/main/js/ApplicationController.js @@ -0,0 +1,386 @@ +/* + * + * (c) Copyright Ascensio System SIA 2010-2019 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * +*/ +SSE.ApplicationController = new(function(){ + var me, + api, + config = {}, + docConfig = {}, + permissions = {}, + maxPages = 0, + created = false; + + var LoadingDocument = -256; + + // Check browser + // ------------------------- + + if (typeof isBrowserSupported !== 'undefined' && !isBrowserSupported()){ + console.error( this.unsupportedBrowserErrorText); + return; + } + + common.localStorage.setId('text'); + common.localStorage.setKeysFilter('sse-,asc.table'); + common.localStorage.sync(); + + // Handlers + // ------------------------- + + function loadConfig(data) { + config = $.extend(config, data.config); + } + + function loadDocument(data) { + docConfig = data.doc; + + if (docConfig) { + permissions = $.extend(permissions, docConfig.permissions); + + var _permissions = $.extend({}, docConfig.permissions), + docInfo = new Asc.asc_CDocInfo(), + _user = new Asc.asc_CUserInfo(); + + var canRenameAnonymous = !((typeof (config.customization) == 'object') && (typeof (config.customization.anonymous) == 'object') && (config.customization.anonymous.request===false)), + guestName = (typeof (config.customization) == 'object') && (typeof (config.customization.anonymous) == 'object') && + (typeof (config.customization.anonymous.label) == 'string') && config.customization.anonymous.label.trim()!=='' ? + common.utils.htmlEncode(config.customization.anonymous.label) : me.textGuest, + value = canRenameAnonymous ? common.localStorage.getItem("guest-username") : null, + user = common.utils.fillUserInfo(config.user, config.lang, value ? (value + ' (' + guestName + ')' ) : me.textAnonymous, + common.localStorage.getItem("guest-id") || ('uid-' + Date.now())); + user.anonymous && common.localStorage.setItem("guest-id", user.id); + + _user.put_Id(user.id); + _user.put_FullName(user.fullname); + _user.put_IsAnonymousUser(user.anonymous); + + docInfo.put_Id(docConfig.key); + docInfo.put_Url(docConfig.url); + docInfo.put_Title(docConfig.title); + docInfo.put_Format(docConfig.fileType); + docInfo.put_VKey(docConfig.vkey); + docInfo.put_UserInfo(_user); + docInfo.put_Token(docConfig.token); + docInfo.put_Permissions(_permissions); + docInfo.put_EncryptedInfo(config.encryptionKeys); + docInfo.put_Lang(config.lang); + docInfo.put_Mode(config.mode); + + docInfo.asc_putIsEnabledMacroses(true); + docInfo.asc_putIsEnabledPlugins(true); + + if (api) { + api.asc_registerCallback('asc_onGetEditorPermissions', onEditorPermissions); + api.asc_setDocInfo(docInfo); + api.asc_getEditorPermissions(config.licenseUrl, config.customerId); + api.asc_enableKeyEvents(false); + } + } + } + + function setActiveWorkSheet(index) { + var $box = $('#worksheets'); + $box.find('> li').removeClass('active'); + $box.find('#worksheet' + index).addClass('active'); + + api.asc_showWorksheet(index); + } + + function onSheetsChanged(){ + maxPages = api.asc_getWorksheetsCount(); + + var handleWorksheet = function(e){ + var $worksheet = $(this); + var index = $worksheet.attr('id').match(/\d+$/); + + if (index.length > 0) { + index = parseInt(index[0]); + + if (index > -1 && index < maxPages) + setActiveWorkSheet(index); + } + }; + + var $box = $('#worksheets'); + $box.find('li').off(); + $box.empty(); + + var tpl = '
    • {title}
    • '; + for (var i = 0; i < maxPages; i++) { + var item = tpl.replace(/\{index}/, i).replace(/\{title}/,api.asc_getWorksheetName(i).replace(/\s/g,' ')); + $(item).appendTo($box).on('click', handleWorksheet); + } + + setActiveWorkSheet(api.asc_getActiveWorksheetIndex()); + } + + function onDocumentContentReady() { + onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); + api.asc_registerCallback('asc_onStartAction', onLongActionBegin); + + Common.Gateway.on('processmouse', onProcessMouse); + Common.Gateway.on('downloadas', onDownloadAs); + Common.Gateway.on('requestclose', onRequestClose); + + + $('#editor_sdk').on('click', function(e) { + if ( e.target.localName == 'canvas' ) { + e.currentTarget.focus(); + } + }); + + $(document).on('mousewheel', function (e) { + if ((e.ctrlKey || e.metaKey) && !e.altKey) { + e.preventDefault(); + e.stopPropagation(); + } + }); + + Common.Gateway.documentReady(); + } + + function onEditorPermissions(params) { + api.asc_SetFastCollaborative(true); + api.asc_setAutoSaveGap(1); + + onLongActionBegin(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); + api.asc_LoadDocument(); + } + + function onLongActionBegin(type, id){ + if (type == Asc.c_oAscAsyncActionType['BlockInteraction']) { + console.log('Action begin'); + } + } + + function onLongActionEnd(type, id){ + if (type === Asc.c_oAscAsyncActionType.BlockInteraction) { + switch (id) { + case Asc.c_oAscAsyncAction.Open: + if (api) { + api.asc_Resize(); + var zf = (config.customization && config.customization.zoom ? parseInt(config.customization.zoom)/100 : 1); + api.asc_setZoom(zf>0 ? zf : 1); + } + + onDocumentContentReady(); + onSheetsChanged(); + break; + } + + console.log('Action end'); + } + } + + function onError(id, level, errData) { + if (id == Asc.c_oAscError.ID.LoadingScriptError) { + console.error(id,me.scriptLoadError); + return; + } + + onLongActionEnd(Asc.c_oAscAsyncActionType['BlockInteraction'], LoadingDocument); + + var message; + + switch (id) + { + case Asc.c_oAscError.ID.Unknown: + message = me.unknownErrorText; + break; + + case Asc.c_oAscError.ID.ConvertationTimeout: + message = me.convertationTimeoutText; + break; + + case Asc.c_oAscError.ID.ConvertationError: + message = me.convertationErrorText; + break; + + case Asc.c_oAscError.ID.DownloadError: + message = me.downloadErrorText; + break; + + case Asc.c_oAscError.ID.ConvertationPassword: + message = me.errorFilePassProtect; + break; + + case Asc.c_oAscError.ID.UserDrop: + message = me.errorUserDrop; + break; + + case Asc.c_oAscError.ID.ConvertationOpenLimitError: + message = me.errorFileSizeExceed; + break; + + case Asc.c_oAscError.ID.UpdateVersion: + message = me.errorUpdateVersionOnDisconnect; + break; + + case Asc.c_oAscError.ID.AccessDeny: + message = me.errorAccessDeny; + break; + + case Asc.c_oAscError.ID.ForceSaveButton: + case Asc.c_oAscError.ID.ForceSaveTimeout: + message = me.errorForceSave; + break; + + case Asc.c_oAscError.ID.LoadingFontError: + message = me.errorLoadingFont; + break; + + default: + message = me.errorDefaultMessage.replace('%1', id); + break; + } + + if (level == Asc.c_oAscError.Level.Critical) { + console.error(id,message); + } + else { + console.warn(id,message); + } + } + + function onExternalMessage(error) { + if (error) { + $('#id-error-mask-title').text(me.criticalErrorTitle); + $('#id-error-mask-text').text(error.msg); + $('#id-error-mask').css('display', 'block'); + } + } + + function onProcessMouse(data) { + if (data.type == 'mouseup') { + var editor = document.getElementById('editor_sdk'); + if (editor) { + var rect = editor.getBoundingClientRect(); + var event = window.event || arguments.callee.caller.arguments[0]; + api.asc_onMouseUp(event, data.x - rect.left, data.y - rect.top); + } + } + } + + function onDownloadAs() { + if ( permissions.download === false) { + console.error(Asc.c_oAscError.ID.AccessDeny, me.errorAccessDeny); + return; + } + api.asc_DownloadAs(new Asc.asc_CDownloadOptions(Asc.c_oAscFileType.XLSX, true)); + } + + function onRequestClose() { + Common.Gateway.requestClose(); + } + + function onBeforeUnload () { + common.localStorage.save(); + } + + function onDocumentResize() { + if (api) api.asc_Resize(); + } + + function createController(){ + if (created) + return me; + + me = this; + created = true; + + // popover ui handlers + + $(window).resize(function(){ + onDocumentResize(); + }); + window.onbeforeunload = onBeforeUnload; + + api = new Asc.spreadsheet_api({ + 'id-view': 'editor_sdk', + 'id-input' : 'ce-cell-content', + 'embedded' : true + }); + + if (api){ + api.asc_registerCallback('asc_onEndAction', onLongActionEnd); + api.asc_registerCallback('asc_onError', onError); + api.asc_registerCallback('asc_onSheetsChanged', onSheetsChanged); + api.asc_registerCallback('asc_onActiveSheetChanged', setActiveWorkSheet); + + if(SSE.CellEditorController ) { + SSE.CellEditorController.create(); + SSE.CellEditorController.setApi(api); + } + // Initialize api gateway + Common.Gateway.on('init', loadConfig); + Common.Gateway.on('opendocument', loadDocument); + Common.Gateway.on('showmessage', onExternalMessage); + Common.Gateway.appReady(); + } + + api.asc_enableKeyEvents(true); + var ismodalshown = false; + $(document.body).on('blur', 'input, textarea', + function(e) { + if ( !ismodalshown ) { + if (!/area_id/.test(e.target.id) ) { + api.asc_enableKeyEvents(true); + } + } + } + ); + + return me; + } + + return { + create : createController, + errorDefaultMessage : 'Error code: %1', + unknownErrorText : 'Unknown error.', + convertationTimeoutText : 'Conversion timeout exceeded.', + convertationErrorText : 'Conversion failed.', + downloadErrorText : 'Download failed.', + criticalErrorTitle : 'Error', + notcriticalErrorTitle : 'Warning', + scriptLoadError: 'The connection is too slow, some of the components could not be loaded. Please reload the page.', + errorFilePassProtect: 'The file is password protected and cannot be opened.', + errorAccessDeny: 'You are trying to perform an action you do not have rights for.
      Please contact your Document Server administrator.', + errorUserDrop: 'The file cannot be accessed right now.', + unsupportedBrowserErrorText: 'Your browser is not supported.', + errorFileSizeExceed: 'The file size exceeds the limitation set for your server.
      Please contact your Document Server administrator for details.', + errorUpdateVersionOnDisconnect: 'Internet connection has been restored, and the file version has been changed.
      Before you can continue working, you need to download the file or copy its content to make sure nothing is lost, and then reload this page.', + textGuest: 'Guest', + textAnonymous: 'Anonymous', + errorForceSave: "An error occurred while saving the file. Please use the 'Download as' option to save the file to your computer hard drive or try again later.", + errorLoadingFont: 'Fonts are not loaded.
      Please contact your Document Server administrator.' + } +})(); \ No newline at end of file diff --git a/test/spreadsheeteditor/main/js/ApplicationView.js b/test/spreadsheeteditor/main/js/ApplicationView.js new file mode 100644 index 000000000..5be014e3a --- /dev/null +++ b/test/spreadsheeteditor/main/js/ApplicationView.js @@ -0,0 +1,45 @@ +/* + * + * (c) Copyright Ascensio System SIA 2010-2019 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * +*/ + +if (SSE === undefined) { + var SSE = {}; +} + +SSE.ApplicationView = new(function(){ + function createView(){ + } + + return { + create: createView + } +})(); diff --git a/test/spreadsheeteditor/main/js/CellEditorController.js b/test/spreadsheeteditor/main/js/CellEditorController.js new file mode 100644 index 000000000..ee7f806a9 --- /dev/null +++ b/test/spreadsheeteditor/main/js/CellEditorController.js @@ -0,0 +1,100 @@ +!window.common && (window.common = {}); +!common.controller && (common.controller = {}); +if (SSE === undefined) { + var SSE = {}; +} +SSE.Keys={RETURN: 13}; + +SSE.CellEditorController = new(function(){ + var me, + api, + editor, + created=false; + + function onCellName(e){ + if (e.keyCode == SSE.Keys.RETURN){ + var name = editor.$cellname.val(); + if (name && name.length) { + api.asc_findCell(name); + } + } + } + + function onKeyupCellEditor(e) { + if(e.keyCode == SSE.Keys.RETURN && !e.altKey){ + api.isCEditorFocused = 'clear'; + } + } + + function onBlurCellEditor() { + if (api.isCEditorFocused == 'clear') + api.isCEditorFocused = undefined; + else if (api.isCellEdited) + api.isCEditorFocused = true; + } + + + + function events() { + editor.$el.find('#ce-cell-name').on( 'keyup', onCellName); + editor.$el.find('textarea#ce-cell-content').on( 'keyup', onKeyupCellEditor); + editor.$el.find('textarea#ce-cell-content').on('blur', onBlurCellEditor); + } + + function onLaunch(){ + SSE.CellEditorView.create(); + editor = SSE.CellEditorView; + events(); + + editor.$el.parent().find('.after').css({zIndex: '4'}); // for spreadsheets - bug 23127 + + var val = common.localStorage.getItem('sse-celleditor-height'); + editor.keep_height = 19;//(val!==null && parseInt(val)>0) ? parseInt(val) : 19; + if (common.localStorage.getBool('sse-celleditor-expand')) { + editor.$el.height(editor.keep_height); + } + this.namedrange_locked = false; + } + + function createController() { + me = this; + if (created) return me; + + created = true; + onLaunch(); + return me; + } + + function onApiCellSelection(info){ + editor.cell.updateInfo(info); + } + + function onApiEditCell(state) { + if (state == Asc.c_oAscCellEditorState.editStart){ + api.isCellEdited = true; + editor.cell.nameDisabled(true); + } else if (state == Asc.c_oAscCellEditorState.editInCell) { + api.isCEditorFocused = 'clear'; + } else if (state == Asc.c_oAscCellEditorState.editEnd) { + api.isCellEdited = false; + api.isCEditorFocused = false; + editor.cell.nameDisabled(false); + } + } + + function setApi(apiF){ + api=apiF; + + api.isCEditorFocused = false; + api.asc_registerCallback('asc_onSelectionNameChanged', onApiCellSelection); + api.asc_registerCallback('asc_onEditCell', onApiEditCell); + } + + + + return { + create: createController, + setApi: setApi + } + +})(); \ No newline at end of file diff --git a/test/spreadsheeteditor/main/js/CellEditorView.js b/test/spreadsheeteditor/main/js/CellEditorView.js new file mode 100644 index 000000000..9ee6e016e --- /dev/null +++ b/test/spreadsheeteditor/main/js/CellEditorView.js @@ -0,0 +1,72 @@ +/* + * + * (c) Copyright Ascensio System SIA 2010-2021 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * + */ +if (SSE === undefined) { + var SSE = {}; +} + +SSE.CellEditorView = new(function (){ + var me; + + function createView() + { + me=this; + me.$el = $('#cell-editing-box'); + me.$cellcontent=$('#ce-cell-content'); + me.$cellname = $('#ce-cell-name'); + + me.$cellname.on('focus', function(e){ + var txt = me.$cellname[0]; + txt.selectionStart = 0; + txt.selectionEnd = txt.value.length; + txt.scrollLeft = txt.scrollWidth; + }); + } + + function updateCellInfo(info) { + if (info) { + me.$cellname.val(typeof(info)=='string' ? info : info.asc_getName()); + } + } + + function cellNameDisabled(disabled){ + (disabled) ? me.$cellname.attr('disabled', 'disabled') : me.$cellname.removeAttr('disabled'); + } + + return { + create: createView, + cell: { + updateInfo: updateCellInfo, + nameDisabled: cellNameDisabled + } + } +})(); \ No newline at end of file diff --git a/test/spreadsheeteditor/main/js/application.js b/test/spreadsheeteditor/main/js/application.js new file mode 100644 index 000000000..00e21c9f8 --- /dev/null +++ b/test/spreadsheeteditor/main/js/application.js @@ -0,0 +1,40 @@ +/* + * + * (c) Copyright Ascensio System SIA 2010-2019 + * + * This program is a free software product. You can redistribute it and/or + * modify it under the terms of the GNU Affero General Public License (AGPL) + * version 3 as published by the Free Software Foundation. In accordance with + * Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect + * that Ascensio System SIA expressly excludes the warranty of non-infringement + * of any third-party rights. + * + * This program is distributed WITHOUT ANY WARRANTY; without even the implied + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For + * details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html + * + * You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha + * street, Riga, Latvia, EU, LV-1050. + * + * The interactive user interfaces in modified source and object code versions + * of the Program must display Appropriate Legal Notices, as required under + * Section 5 of the GNU AGPL version 3. + * + * Pursuant to Section 7(b) of the License you must retain the original Product + * logo when distributing the program. Pursuant to Section 7(e) we decline to + * grant you any rights under trademark law for use of our trademarks. + * + * All the Product's GUI elements, including illustrations and icon sets, as + * well as technical writing content are licensed under the terms of the + * Creative Commons Attribution-ShareAlike 4.0 International. See the License + * terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode + * +*/ +(function ($) { + + $(function(){ + SSE.ApplicationView.create(); + SSE.ApplicationController.create(); + }) + +})(window.jQuery); diff --git a/test/spreadsheeteditor/main/resources/less/application.less b/test/spreadsheeteditor/main/resources/less/application.less new file mode 100644 index 000000000..35840c55e --- /dev/null +++ b/test/spreadsheeteditor/main/resources/less/application.less @@ -0,0 +1,56 @@ +// Common styles +@import "../../../../common/main/resources/less/common.less"; + +// Worksheets +// ------------------------- +.viewer { + display: flex; + flex-direction: column; + + .sdk-view { + position: relative; + flex-grow: 1; + } + + ul.worksheet-list { + flex-grow: 0; + flex-shrink: 0; + margin: 0; + padding: 0 9px; + border-top: 1px solid #5A5A5A; + border-bottom: 1px solid #BABABA; + #gradient > .vertical(#B6B6B6, #CACACA); + box-shadow: 0 4px 4px -4px #333 inset; + + + li { + float: left; + cursor: pointer; + list-style: none; + margin: 0 2px 2px 3px; + padding: 0 13px; + color: #FFFFFF; + #gradient > .vertical(#9A9A9A, #828282); + box-shadow: 0 4px 4px -4px #333 inset; + -webkit-border-bottom-right-radius: 4px; +// -moz-border-radius-bottomright: 4px; + border-bottom-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; +// -moz-border-radius-bottomleft: 4px; + border-bottom-left-radius: 4px; + + border-bottom: 1px solid #929292; + border-top-color: transparent; + + &.active { + margin-top: -1px; + padding: 0 12px; + border: 1px solid #929292; + border-top-color: transparent; + background: #DDDDDD; + color: #000; + box-shadow: none; + } + } + } +} \ No newline at end of file diff --git a/test/spreadsheeteditor/main/resources/less/asc-mixins.less b/test/spreadsheeteditor/main/resources/less/asc-mixins.less new file mode 100644 index 000000000..e6e8a3d7b --- /dev/null +++ b/test/spreadsheeteditor/main/resources/less/asc-mixins.less @@ -0,0 +1,373 @@ +*, *:before, *:after { + -moz-user-select: none; +} + +:focus { + outline: none; +} + +.gradient(@color: #F5F5F5, @start: #EEE, @stop: #FFF) { + background: @color; + background: -webkit-gradient(linear, left bottom,left top, color-stop(0, @start), color-stop(1, @stop)); + background: -moz-linear-gradient(center bottom, @start 0%, @stop 100%); + background: -o-linear-gradient(@stop, @start); + background: linear-gradient(bottom, @start, @stop); +} + +.box-shadow(@arguments) { + -webkit-box-shadow: @arguments; + box-shadow: @arguments; +} + +.box-inner-shadow(@arguments) { + -webkit-box-shadow: inset @arguments; + box-shadow: inset @arguments; +} + +.border-radius(@radius: 2px) { + border-radius: @radius; +} + +.position(@type: absolute, @left: 0, @top: 0, @right: 0, @bottom: 0) { + position: @type; + left: @left; + top: @top; + right: @right; + bottom: @bottom; +} + +.fontsize(@value) { + font-size: @value; +} + +// User select +.user-select(@select: none) { + -webkit-user-select: @select; + -moz-user-select: @select; + -ms-user-select: @select; +// -o-user-select: @select; + user-select: @select; +} + +.toolbar-btn-icon(@icon-class, @index, @icon-size, @offset-x: 0, @offset-y: 0) { + .@{icon-class} {background-position: 0 -(@index * @icon-size - @offset-y);} + .btn.active > .@{icon-class}, + .btn:active > .@{icon-class} {background-position: (-1 * @icon-size - @offset-x) -(@index * @icon-size - @offset-y);} + .btn.disabled > .@{icon-class} {background-position: (-2 * @icon-size - @offset-x) -(@index * @icon-size - @offset-y);} +} + +.toolbar-group-btn-icon(@icon-class, @index, @icon-size, @offset-x: 0, @offset-y: 0) { + .@{icon-class} {background-position: 0 -(@index * @icon-size - @offset-y);} + .btn-group.open > .@{icon-class}, + .btn.active > .@{icon-class}, + .btn:active > .@{icon-class} {background-position: (-1 * @icon-size - @offset-x) -(@index * @icon-size - @offset-y);} + .btn.disabled > .@{icon-class} {background-position: (-2 * @icon-size - @offset-x) -(@index * @icon-size - @offset-y);} +} + +.menu-btn-icon(@icon-class, @index, @icon-size) { + .menu-item-icon.@{icon-class} {background-position: 0 -@index*@icon-size;} + li > a.checked > .menu-item-icon.@{icon-class} {background-position: -1*@icon-size -@index*@icon-size;} +} + +.options-btn-icon(@icon-class, @index, @icon-size) { + .@{icon-class} {background-position: 0 -@index*@icon-size;} + button.over > .@{icon-class} {background-position: -1*@icon-size -@index*@icon-size;} +// .btn-group.open > .@{icon-class}, + button.active > .@{icon-class}, + button:active > .@{icon-class} {background-position: -2*@icon-size -@index*@icon-size;} + button.disabled > .@{icon-class} {background-position: -3*@icon-size -@index*@icon-size;} +} + +/** +*/ +:root { + --bgX: 0px; + + --pixel-ratio-factor: 1; + + .pixel-ratio__1_5 { + @ratio: 1.5; + @one-px: 1px / @ratio; + @two-px: 2px / @ratio; + + --pixel-ratio-factor: @ratio; + --scaled-one-pixel: @one-px; + --scaled-two-pixel: @two-px; + } + + .pixel-ratio__2 { + } + + .pixel-ratio__1_25 { + @ratio: 1.25; + @one-px: 1px / @ratio; + @two-px: 2px / @ratio; + + --pixel-ratio-factor: @ratio; + --scaled-one-pixel: @one-px; + --scaled-two-pixel: @two-px; + } + + .pixel-ratio__1_75 { + @ratio: 1.75; + @one-px: 1px / @ratio; + @two-px: 2px / @ratio; + + --pixel-ratio-factor: @ratio; + --scaled-one-pixel: @one-px; + --scaled-two-pixel: @two-px; + } +} + +.button-normal-icon(@icon-class, @index, @icon-size, @normal-h-offset: 0px) { + .@{icon-class} { + background-position: -0*@icon-size -@index*@icon-size; + background-position: @normal-h-offset -@index*@icon-size; + } +} + +.button-otherstates-icon(@icon-class, @icon-size) { + .btn { + &:active, &.active { + &:not(:disabled):not(.disabled) { + > .@{icon-class} { + @iconsize: -1*@icon-size; + + background-position-x: @iconsize; + --bgX: @iconsize; + } + } + } + } +} + +.mx-button-otherstates-icon2(@offset) { + &.active, &:active{ + &:not(:disabled):not(.disabled) { + .icon { + background-position-x: @offset; + } + } + } +} + +.button-otherstates-icon2(@icon-class, @icon-size) { + button.@{icon-class} { + .mx-button-otherstates-icon2(@icon-size); + } +} + +.menu-icon-normal(@icon-class, @index, @icon-size) { + .menu-item-icon.@{icon-class} { + background-position: 0 -@index*@icon-size; + background-position: var(--bgX) -@index*@icon-size; + } +} + +.menu-otherstates-icon(@menu-class, @icon-size) { + .@{menu-class} li > a.checked > .menu-item-icon {background-position-x: -1*@icon-size; --bgX: calc(-1*@icon-size);} + .@{menu-class} li.disabled .menu-item-icon {background-position-x: -2*@icon-size; --bgX: calc(-2*@icon-size);} +} + +/**/ + +.background-ximage(@image, @image2x, @w: auto, @h: auto, @repeat: no-repeat) { + background-image: data-uri(%("%s",@image)); + background-repeat: @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: data-uri(%("%s",@image2x)); + background-size: @w @h; + } +} + +.choose-image-path(@fromcommon) when (@fromcommon = false) { + @path: if(@icon-src-base64, @app-image-path, @app-image-const-path); +}; + +.choose-image-path(@fromcommon) when (@fromcommon = true) { + @path: if(@icon-src-base64, @common-image-path, @common-image-const-path); +} + +.background-ximage-v2(@image, @w: auto, @h: auto, @repeat: no-repeat, @commonimage: true) { + .choose-image-path(@commonimage); + @imagepath: '@{path}/@{image}'; + + background-image: if(@icon-src-base64, data-uri(%("%s", '@{imagepath}')), ~"url(@{imagepath})"); + background-repeat: @repeat; + + @1d5ximage: replace(@imagepath, '\.png$', '@1.5x.png'); + @1d75ximage: replace(@imagepath, '\.png$', '@1.75x.png'); + @1d25ximage: replace(@imagepath, '\.png$', '@1.25x.png'); + @2ximage: replace(@imagepath, '\.png$', '@2x.png'); + + @media only screen { + @media (-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 1.9), + (min-resolution: 1.5dppx) and (max-resolution: 1.9dppx), + (min-resolution: 144dpi) and (max-resolution: 191dpi) + { + background-image: ~"url(@{1d5ximage})"; + background-size: @w @h; + } + + @media (-webkit-min-device-pixel-ratio: 2), + (min-resolution: 2dppx), + (min-resolution: 192dpi) + { + background-image: ~"url(@{2ximage})"; + background-size: @w @h; + } + } +} + +.background-ximage-all(@image, @w: auto, @h: auto, @repeat: no-repeat, @commonimage: true) { + .choose-image-path(@commonimage); + @imagepath: '@{path}/@{image}'; + + background-image: if(@icon-src-base64, data-uri(%("%s", '@{imagepath}')), ~"url(@{imagepath})"); + background-repeat: @repeat; + + @1d5ximage: replace(@imagepath, '\.png$', '@1.5x.png'); + @1d75ximage: replace(@imagepath, '\.png$', '@1.75x.png'); + @1d25ximage: replace(@imagepath, '\.png$', '@1.25x.png'); + @2ximage: replace(@imagepath, '\.png$', '@2x.png'); + + @media only screen { + @media (-webkit-min-device-pixel-ratio: 1.25) and (-webkit-max-device-pixel-ratio: 1.49), + (min-resolution: 1.25dppx) and (max-resolution: 1.49dppx), + (min-resolution: 120dpi) and (max-resolution: 143dpi) + { + background-image: ~"url(@{1d25ximage})"; + background-size: @w @h; + } + + @media (-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 1.74), + (min-resolution: 1.5dppx) and (max-resolution: 1.74dppx), + (min-resolution: 144dpi) and (max-resolution: 167dpi) + { + background-image: ~"url(@{1d5ximage})"; + background-size: @w @h; + } + + @media (-webkit-min-device-pixel-ratio: 1.75) and (-webkit-max-device-pixel-ratio: 1.9), + (min-resolution: 1.75dppx) and (max-resolution: 1.9dppx), + (min-resolution: 168dpi) and (max-resolution: 191dpi) + { + background-image: ~"url(@{1d75ximage})"; + background-size: @w @h; + } + + @media (-webkit-min-device-pixel-ratio: 2), + (min-resolution: 2dppx), + (min-resolution: 192dpi) + { + background-image: ~"url(@{2ximage})"; + background-size: @w @h; + } + } +} + +.img-commonctrl { + &.img-colored { + filter: none; + } +} + +@common-controls-width: 100px; +.img-commonctrl, + .dropdown-menu li .checked:before, .input-error:before, .input-warning:before, + .btn-toolbar .icon.img-commonctrl, .list-item div.checked:before +{ + background-image: if(@icon-src-base64, data-uri(%("%s",'@{common-image-path}/@{common-controls}')), ~"url(@{common-image-const-path}/@{common-controls})"); + background-repeat: no-repeat; + filter: @component-normal-icon-filter; + + @1d25ximage: replace(@common-controls, '\.png$', '@1.25x.png'); + @1d5ximage: replace(@common-controls, '\.png$', '@1.5x.png'); + @1d75ximage: replace(@common-controls, '\.png$', '@1.75x.png'); + @2ximage: replace(@common-controls, '\.png$', '@2x.png'); + + @media only screen { + @media (-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 1.9), + (min-resolution: 1.5dppx) and (max-resolution: 1.9dppx), + (min-resolution: 144dpi) and (max-resolution: 191dpi) + { + background-image: ~"url(@{common-image-const-path}/@{1d5ximage})"; + background-size: @common-controls-width auto; + } + + @media (-webkit-min-device-pixel-ratio: 2), + (min-resolution: 2dppx), + (min-resolution: 192dpi) + { + background-image: ~"url(@{common-image-const-path}/@{2ximage})"; + background-size: @common-controls-width auto; + } + } + + .pixel-ratio__1_25 & { + background-image: ~"url(@{common-image-const-path}/@{1d25ximage})"; + background-size: @common-controls-width auto; + } + + .pixel-ratio__1_75 & { + background-image: ~"url(@{common-image-const-path}/@{1d75ximage})"; + background-size: @common-controls-width auto; + } +} + +@img-colorpicker-width: 205px; +.img-colorpicker, .hsb-colorpicker .empty-color:before +{ + background-image: if(@icon-src-base64, data-uri(%("%s",'@{common-image-path}/hsbcolorpicker/hsb-colorpicker.png')), ~"url(@{common-image-const-path}/hsbcolorpicker/hsb-colorpicker.png)"); + background-repeat: no-repeat; + + @media only screen { + @media (-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 1.9), + (min-resolution: 1.5dppx) and (max-resolution: 1.9dppx), + (min-resolution: 144dpi) and (max-resolution: 191dpi) + { + background-image: ~"url(@{common-image-const-path}/hsbcolorpicker/hsb-colorpicker@1.5x.png)"; + background-size: @img-colorpicker-width auto; + } + + @media (-webkit-min-device-pixel-ratio: 2), + (min-resolution: 2dppx), + (min-resolution: 192dpi) + { + background-image: ~"url(@{common-image-const-path}/hsbcolorpicker/hsb-colorpicker@2x.png)"; + background-size: @img-colorpicker-width auto; + } + } +} + +.icon.lang-flag { + @img-flags-width: 48px; + + width: 16px; + height: 12px; + + background-image: if(@icon-src-base64, data-uri(%("%s",'@{common-image-path}/controls/flags.png')), ~"url(@{common-image-const-path}/controls/flags.png)"); + background-repeat: no-repeat; + + @media only screen { + @media (-webkit-min-device-pixel-ratio: 1.5) and (-webkit-max-device-pixel-ratio: 1.9), + (min-resolution: 1.5dppx) and (max-resolution: 1.9dppx), + (min-resolution: 144dpi) and (max-resolution: 191dpi) + { + background-image: ~"url(@{common-image-const-path}/controls/flags@1.5x.png)"; + background-size: @img-flags-width auto; + } + + @media (-webkit-min-device-pixel-ratio: 2), + (min-resolution: 2dppx), + (min-resolution: 192dpi) + { + background-image: ~"url(@{common-image-const-path}/controls/flags@2x.png)"; + background-size: @img-flags-width auto; + } + } +} \ No newline at end of file diff --git a/test/spreadsheeteditor/main/resources/less/celleditor.less b/test/spreadsheeteditor/main/resources/less/celleditor.less new file mode 100644 index 000000000..f278663c8 --- /dev/null +++ b/test/spreadsheeteditor/main/resources/less/celleditor.less @@ -0,0 +1,167 @@ +// Common styles +@import "colors-table-ie-fix.less"; +@import "variables.less"; +@import "colors-table.less"; +@import "asc-mixins.less"; +#cell-editing-box { + border-bottom: solid @scaled-one-px-value-ie @border-toolbar-ie; + border-bottom: solid @scaled-one-px-value @border-toolbar; + border-left: solid @scaled-one-px-value-ie @border-toolbar-ie; + border-left: solid @scaled-one-px-value @border-toolbar; + min-height: 20px; + background-color: @background-toolbar-ie; + background-color: @background-toolbar; + + .ce-group-name { + float: left; + height: 20px; + background-color: @background-toolbar-ie; + background-color: @background-toolbar; + + #ce-cell-name { + width: 100px; + height: 19px; + //height: calc(19px + (1px - 1px/var(--pixel-ratio-factor,1))); + padding: 0px 19px 0 4px; + vertical-align: top; + display: inline-block; + border: 0 none; + border-right: @scaled-one-px-value-ie solid @border-toolbar-ie; + border-right: @scaled-one-px-value solid @border-toolbar; + transition: none; + -webkit-transition: none; + box-shadow: 0 @scaled-one-px-value-ie 0 0 @border-toolbar-ie; + box-shadow: 0 @scaled-one-px-value 0 0 @border-toolbar; + + &[disabled] { + color: @border-preview-select-ie; + color: @border-preview-select; + opacity: 0.5; + } + } + + #ce-cell-name-menu { + display: inline-block; + position: absolute; + left: 80px; + background-color: @background-toolbar-ie; + background-color: @background-toolbar; + + button { + background-color: @background-normal-ie; + background-color: @background-normal; + height: 19px; + + &.disabled { + opacity: 0.5; + } + + &:active:not(.disabled), + &.active:not(.disabled){ + .caret { + border-color: @icon-normal; + } + } + } + + .dropdown-menu a { + overflow: hidden; + text-overflow: ellipsis; + } + } + + #ce-func-label { + height: 20px; + margin-left: -3px; + .border-radius(0); + + &.disabled { + opacity: 0.4; + } + } + } + + &:not(.expanded) { + #ce-func-label { + border-bottom: @scaled-one-px-value-ie solid @border-toolbar-ie; + border-bottom: @scaled-one-px-value solid @border-toolbar; + } + } + + .ce-group-expand { + float: right; + //height: 20px; + height: 100%; + background-color: @background-normal-ie; + background-color: @background-normal; + } + + .ce-group-content { + margin: 0 2px 0 120px; + height: 100%; + border-left: @scaled-one-px-value-ie solid @border-toolbar-ie; + border-left: @scaled-one-px-value solid @border-toolbar; + #ce-cell-content { + height: 100%; + resize: none; + min-height: 19px; + border: 0 none; + font-size: 12px; + line-height: 18px; + padding-bottom: 0; + padding-top: 0; + &[disabled] { + color: @border-preview-select-ie; + color: @border-preview-select; + opacity: 0.5; + } + } + } + + #ce-cell-name, #ce-cell-content { + border-radius: 0; + } + + &+.layout-resizer { + border-top: 0 none; + border-bottom: 0 none; + + &.move { + border-top: @scaled-one-px-value-ie solid @border-toolbar-ie; + border-top: @scaled-one-px-value solid @border-toolbar; + border-bottom: @scaled-one-px-value-ie solid @border-toolbar-ie; + border-bottom: @scaled-one-px-value solid @border-toolbar; + opacity: 0.4; + } + } +} + +#ce-btn-expand { + width: 16px; + height: 18px; + .border-radius(0); + background: transparent; + padding: 0 2px 0; + + .caret { + transition: transform .2s; + border-color: @icon-normal; + } + + &.btn-collapse { + .caret { + transform: rotate(45deg); + } + } +} + +.layout-resizer { + z-index: @zindex-dropdown - 10; + background: @background-toolbar-ie; + background: @background-toolbar; + border: 0 none; + + &.move { + opacity: 0.4; + } +} diff --git a/test/spreadsheeteditor/main/resources/less/colors-table-ie-fix.less b/test/spreadsheeteditor/main/resources/less/colors-table-ie-fix.less new file mode 100644 index 000000000..442ff10da --- /dev/null +++ b/test/spreadsheeteditor/main/resources/less/colors-table-ie-fix.less @@ -0,0 +1,70 @@ + +@toolbar-header-document-ie: #446995; +@toolbar-header-spreadsheet-ie: #40865c; +@toolbar-header-presentation-ie: #aa5252; + +@background-normal-ie: #fff; +@background-toolbar-ie: #f1f1f1; +@background-toolbar-additional-ie: #f1f1f1; +@background-primary-dialog-button-ie: #7d858c; +@background-tab-underline-ie: #444; +@background-notification-popover-ie: #fcfed7; +@background-notification-badge-ie: #ffd112; +@background-scrim-ie: fade(#000, 20%); +@background-loader-ie: fade(#000, 65%); +@background-alt-key-hint-ie: #FFD938; + +@highlight-button-hover-ie: #d8dadc; +@highlight-button-pressed-ie: #7d858c; +@highlight-button-pressed-hover-ie: #7d858c; +@highlight-primary-dialog-button-hover-ie: #666d73; +@highlight-header-button-hover-ie: fade(#fff, 20%); +@highlight-header-button-pressed-ie: fade(#000, 20%); +@highlight-toolbar-tab-underline-ie: #444; +@highlight-text-select-ie: #3494fb; + +@border-toolbar-ie: #cbcbcb; +@border-divider-ie: #cbcbcb; +@border-regular-control-ie: #cfcfcf; +@border-toolbar-button-hover-ie: #d8dadc; +@border-preview-hover-ie: #cfcfcf; +@border-preview-select-ie: #848484; +@border-control-focus-ie: #848484; +@border-color-shading-ie: fade(#000, 20%); +@border-error-ie: #d9534f; + +@text-normal-ie: #444; +@text-normal-pressed-ie: #fff; +@text-secondary-ie: #a5a5a5; +@text-tertiary-ie: #a5a5a5; +@text-link-ie: #acbfff; +@text-inverse-ie: #fff; +@text-toolbar-header-ie: #fff; +@text-contrast-background-ie: #fff; + +@icon-normal-ie: #444; +@icon-normal-pressed-ie: #fff; +@icon-inverse-ie: #444; +@icon-toolbar-header-ie: fade(#fff, 80%); +@icon-notification-badge-ie: #000; +@icon-contrast-popover-ie: #fff; +@icon-success-ie: #5b9f27; + +@canvas-scroll-thumb-hover-ie: #c0c0c0; +@canvas-scroll-thumb-border-hover-ie: #cbcbcb; + +@button-header-normal-icon-offset-x-ie: -20px; +@button-header-active-icon-offset-x-ie: -20px; +@scaled-one-px-value-ie: 1px; + +@component-disabled-opacity-ie: .4; + +/*.ie { + .toolbar__icon.toolbar__icon-big { + @big-icon-background-image-ie: ~"url(@{app-image-const-path}/iconsbig.png)"; + background-image: @big-icon-background-image-ie; + } +}*/ + +//@huge-icon-background-image-ie: ~"url(@{app-image-const-path}/iconshuge.png)"; + diff --git a/test/spreadsheeteditor/main/resources/less/colors-table.less b/test/spreadsheeteditor/main/resources/less/colors-table.less new file mode 100644 index 000000000..7c0c7e4d4 --- /dev/null +++ b/test/spreadsheeteditor/main/resources/less/colors-table.less @@ -0,0 +1,239 @@ +@import "colors-table-ie-fix.less"; + +// Brand colors +// ------------------------- + +@brand-primary: #428bca; +@brand-success: #5cb85c; +@brand-warning: #f0ad4e; +@brand-danger: #d9534f; +@brand-info: #5bc0de; + + +:root { + --toolbar-header-document: #446995; + --toolbar-header-spreadsheet: #40865c; + --toolbar-header-presentation: #aa5252; + + --background-normal: #fff; + --background-toolbar: #f7f7f7; + --background-toolbar-additional: #efefef; + --background-primary-dialog-button: #444; + --background-tab-underline: #444; + --background-notification-popover: #fcfed7; + --background-notification-badge: #ffd112; + --background-scrim: fade(#000, 20%); + --background-loader: fade(#181818, 90%); + --background-alt-key-hint: #FFD938; + + --highlight-button-hover: #e0e0e0; + --highlight-button-pressed: #cbcbcb; + --highlight-button-pressed-hover: #bababa; + --highlight-primary-dialog-button-hover: #1c1c1c; + --highlight-header-button-hover: fade(#fff, 15%); + --highlight-header-button-pressed: fade(#fff, 25%); + --highlight-toolbar-tab-underline: #444; + --highlight-text-select: #3494fb; + + --border-toolbar: #cbcbcb; + --border-divider: #dfdfdf; + --border-regular-control: #c0c0c0; + --border-toolbar-button-hover: #e0e0e0; + --border-preview-hover: #bababa; + --border-preview-select: #888; + --border-control-focus: #848484; + --border-color-shading: fade(#000, 15%); + --border-error: #f62211; + + --text-normal: fade(#000, 80%); + --text-normal-pressed: fade(#000, 80%); + --text-secondary: fade(#000, 60%); + --text-tertiary: fade(#000, 40%); + --text-link: #445799; + --text-link-hover: #445799; + --text-link-active: #445799; + --text-link-visited: #445799; + --text-inverse: #fff; + --text-toolbar-header: #fff; + --text-contrast-background: #fff; + + --icon-normal: #444; + --icon-normal-pressed: #444; + --icon-inverse: #fff; + --icon-toolbar-header: #fff; + --icon-notification-badge: #000; + --icon-contrast-popover: #fff; + --icon-success: #090; + + // Canvas + + --canvas-background: #eee; + --canvas-content-background: #fff; + --canvas-page-border: #ccc; + + --canvas-ruler-background: #fff; + --canvas-ruler-margins-background: #d9d9d9; + --canvas-ruler-mark: #555; + --canvas-ruler-handle-border: #555; + --canvas-ruler-handle-border-disabled: #aaa; + + --canvas-high-contrast: #000; + --canvas-high-contrast-disabled: #666; + + --canvas-cell-border: fade(#000, 10%); + --canvas-cell-title-hover: #dfdfdf; + --canvas-cell-title-selected: #cfcfcf; + --canvas-cell-title-border: #d8d8d8; + --canvas-cell-title-border-hover: #c9c9c9; + --canvas-cell-title-border-selected: #bbb; + + --canvas-dark-cell-title: #444; + --canvas-dark-cell-title-hover: #666 ; + --canvas-dark-cell-title-selected: #111; + --canvas-dark-cell-title-border: #3d3d3d; + --canvas-dark-cell-title-border-hover: #5c5c5c; + --canvas-dark-cell-title-border-selected: #0f0f0f; + + --canvas-scroll-thumb: #f7f7f7; + --canvas-scroll-thumb-hover: #c0c0c0; + --canvas-scroll-thumb-pressed: #adadad; + --canvas-scroll-thumb-border: #cbcbcb; + --canvas-scroll-thumb-border-hover: #cbcbcb; + --canvas-scroll-thumb-border-pressed: #adadad; + --canvas-scroll-arrow: #adadad; + --canvas-scroll-arrow-hover: #f7f7f7; + --canvas-scroll-arrow-pressed: #f7f7f7; + --canvas-scroll-thumb-target: #c0c0c0; + --canvas-scroll-thumb-target-hover: #f7f7f7; + --canvas-scroll-thumb-target-pressed: #f7f7f7; + + // Others + + //--button-small-normal-icon-offset-x: 0; + //--button-small-active-icon-offset-x: 0; + //--button-large-normal-icon-offset-x: 0; + //--button-large-active-icon-offset-x: 0; + //--button-huge-normal-icon-offset-x: 0; + //--button-huge-active-icon-offset-x: 0; + //--button-xhuge-normal-icon-offset-x: 0; + //--button-xhuge-active-icon-offset-x: 0; + --button-header-normal-icon-offset-x: -20px; + --button-header-active-icon-offset-x: -20px; + //--menu-icon-item-checked-offset-x: 0; + + --modal-window-mask-opacity: 0.2; + --image-border-types-filter: none; + --image-border-types-filter-selected: none; + --component-normal-icon-filter: none; + + --component-normal-icon-opacity: .8; + --component-hover-icon-opacity: .8; + --component-active-icon-opacity: 1; + --component-active-hover-icon-opacity: 1; + --component-disabled-opacity: .4; + + --header-component-normal-icon-opacity: 1; + --header-component-hover-icon-opacity: 1; + --header-component-active-icon-opacity: 1; + --header-component-active-hover-icon-opacity: 1; + //--button-icon-opacity: 1; +} + +// Background +// ------------------------- +@background-normal: var(--background-normal); +@background-toolbar: var(--background-toolbar); +@background-toolbar-additional: var(--background-toolbar-additional); +@background-primary-dialog-button: var(--background-primary-dialog-button); +@background-tab-underline: var(--background-tab-underline); +@background-notification-popover: var(--background-notification-popover); +@background-notification-badge: var(--background-notification-badge); +@background-scrim: var(--background-scrim); +@background-loader: var(--background-loader); +@background-alt-key-hint: var(--background-alt-key-hint); + +// Highlight +// ------------------------- +@highlight-button-hover: var(--highlight-button-hover); +@highlight-button-pressed: var(--highlight-button-pressed); +@highlight-button-pressed-hover: var(--highlight-button-pressed-hover); +@highlight-primary-dialog-button-hover: var(--highlight-primary-dialog-button-hover); +@highlight-header-button-hover: var(--highlight-header-button-hover); +@highlight-header-button-pressed: var(--highlight-header-button-pressed); +@highlight-toolbar-tab-underline: var(--highlight-toolbar-tab-underline); +@highlight-text-select: var(--highlight-text-select); + +// Border +// ------------------------- +@border-toolbar: var(--border-toolbar); +@border-divider: var(--border-divider); +@border-regular-control: var(--border-regular-control); +@border-toolbar-button-hover: var(--border-toolbar-button-hover); +@border-preview-hover: var(--border-preview-hover); +@border-preview-select: var(--border-preview-select); +@border-control-focus: var(--border-control-focus); +@border-color-shading: var(--border-color-shading); +@border-error: var(--border-error); + +// Text +// ------------------------- +@text-normal: var(--text-normal); +@text-normal-pressed: var(--text-normal-pressed); +@text-secondary: var(--text-secondary); +@text-tertiary: var(--text-tertiary); +@text-link: var(--text-link); +@text-link-hover: var(--text-link-hover); +@text-link-active: var(--text-link-active); +@text-link-visited: var(--text-link-visited); +@text-inverse: var(--text-inverse); +@text-toolbar-header: var(--text-toolbar-header); +@text-contrast-background: var(--text-contrast-background); +@text-alt-key-hint: var(--text-alt-key-hint); + +// Icon +// ------------------------- +@icon-normal: var(--icon-normal); +@icon-normal-pressed: var(--icon-normal-pressed); +@icon-inverse: var(--icon-inverse); +@icon-toolbar-header: var(--icon-toolbar-header); +@icon-contrast-popover: var(--icon-contrast-popover); +@icon-notification-badge: var(--icon-notification-badge); +@icon-success: var(--icon-success); + +@button-small-normal-icon-offset-x: var(--button-small-normal-icon-offset-x,0); +@button-small-active-icon-offset-x: var(--button-small-active-icon-offset-x,0); +@button-large-normal-icon-offset-x: var(--button-large-normal-icon-offset-x, 0); +@button-large-active-icon-offset-x: var(--button-large-active-icon-offset-x, 0); +@button-huge-normal-icon-offset-x: var(--button-huge-normal-icon-offset-x, 0); +@button-xhuge-normal-icon-offset-x: var(--button-xhuge-normal-icon-offset-x, 0); +@button-xhuge-active-icon-offset-x: var(--button-xhuge-active-icon-offset-x, 0); +//@button-huge-normal-icon-offset-x: var(--button-huge-normal-icon-offset-x, 0); +//@button-huge-active-icon-offset-x: var(--button-huge-active-icon-offset-x, 0); + +@button-header-normal-icon-offset-x: var(--button-header-normal-icon-offset-x, -20px); +@button-header-active-icon-offset-x: var(--button-header-active-icon-offset-x, -20px); + +@component-normal-icon-filter: var(--component-normal-icon-filter); +@component-normal-icon-opacity: var(--component-normal-icon-opacity, .8); +@component-hover-icon-opacity: var(--component-hover-icon-opacity, .8); +@component-active-icon-opacity: var(--component-active-icon-opacity, .8); +@component-active-hover-icon-opacity: var(--component-active-hover-icon-opacity, .8); +@component-disabled-opacity: var(--component-disabled-opacity, .4); +//@button-icon-opacity: var(--button-icon-opacity, 1); + +@header-component-normal-icon-opacity: var(--header-component-normal-icon-opacity, 1); +@header-component-hover-icon-opacity: var(--header-component-hover-icon-opacity, 1); +@header-component-active-icon-opacity: var(--header-component-active-icon-opacity, 1); +@header-component-active-hover-icon-opacity: var(--header-component-active-hover-icon-opacity, 1); + +@menu-icon-item-checked-offset-x: var(--menu-icon-item-checked-offset-x, 0); +@img-border-type-filter: var(--image-border-types-filter, none); +@img-border-type-filter-selected: var(--image-border-types-filter-selected, none); + +// Canvas +// --------------------------- +@canvas-background: var(--canvas-background); +@canvas-content-background: var(--canvas-content-background); +@canvas-page-border: var(--canvas-page-border); +@canvas-scroll-thumb-hover: var(--canvas-scroll-thumb-hover); +@canvas-scroll-thumb-border-hover: var(--canvas-scroll-thumb-border-hover); diff --git a/test/spreadsheeteditor/main/resources/less/variables.less b/test/spreadsheeteditor/main/resources/less/variables.less new file mode 100644 index 000000000..42eac33a7 --- /dev/null +++ b/test/spreadsheeteditor/main/resources/less/variables.less @@ -0,0 +1,799 @@ +// +// Global values +// -------------------------------------------------- +@pixel-ratio-factor: var(--pixel-ratio-factor, 1); +@scaled-one-px-value: var(--scaled-one-pixel, 1px); +@scaled-two-px-value: var(--scaled-two-pixel, 2px); + +// Paths +// ------------------------- + +@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 +// ------------------------- + +//@gray-deep: #444444; //rgb(68, 68, 68) +//@gray-darker: #848484; //rgb(132, 132, 132) +//@gray-dark: #cbcbcb; //rgb(203, 203, 203) +//@gray: #cfcfcf; //rgb(207, 207, 207) +//@gray-light: #f1f1f1; //rgb(241, 241, 241) +//@gray-lighter: #ededed; //rgb(237, 237, 237) +//@gray-soft: #adadad; //rgb(173, 173, 173) + +//@primary: #7d858c; //rgb(125, 133, 140) +//@primary-hover: #666d73; //rgb(102, 109, 115) +//@secondary: #d8dadc; //rgb(216, 218, 220) +//@secondary-hover: #cbced1; //rgb(203, 206, 209) + +//@black: #000000; + +// Brand colors +// ------------------------- + +@brand-primary: #428bca; +@brand-success: #5cb85c; +@brand-warning: #f0ad4e; +@brand-danger: #d9534f; +@brand-info: #5bc0de; + +// Scaffolding +// ------------------------- + +@body-bg: #fff; +@text-color: #cbcbcb; // @gray-dark + +// Links +// ------------------------- + +@link-color: @brand-primary; +@link-hover-color: darken(@link-color, 15%); +@link-hover-decoration: underline; + +// Typography +// ------------------------- + +@font-family-sans-serif: Arial, Helvetica, "Helvetica Neue", sans-serif; +@font-family-serif: Georgia, "Times New Roman", Times, serif; +@font-family-monospace: Menlo, Monaco, Consolas, "Courier New", monospace; +@font-family-tahoma: tahoma, arial, verdana, sans-serif; +@font-family-base: @font-family-sans-serif; + +@font-size-base: 11px; +@font-size-large: 13px; +@font-size-small: 9px; + +@font-size-h1: floor(@font-size-base * 2.6); +@font-size-h2: floor(@font-size-base * 2.15); +@font-size-h3: ceil(@font-size-base * 1.7); +@font-size-h4: ceil(@font-size-base * 1.25); +@font-size-h5: @font-size-base; +@font-size-h6: ceil(@font-size-base * 0.85); + +@line-height-base: 1.428571429; // 20/14 +@line-height-computed: floor(@font-size-base * @line-height-base); + +@headings-font-family: @font-family-base; +@headings-font-weight: 500; +@headings-line-height: 1.1; +@headings-color: inherit; + + +// Iconography +// ------------------------- + +@icon-font-path: "../fonts/"; +@icon-font-name: "glyphicons-halflings-regular"; +@icon-font-svg-id: "glyphicons_halflingsregular"; + +@icon-src-base64: false; +@huge-icon-size: 37px; +@x-huge-icon-size: 45px; + +// Components +// ------------------------- +// Based on 14px font-size and 1.428 line-height (~20px to start) + +@padding-base-vertical: 1px; +@padding-base-horizontal: 3px; + +@padding-large-vertical: 10px; +@padding-large-horizontal: 16px; + +@padding-small-vertical: 1px; +@padding-small-horizontal: 3px; + +@padding-xs-vertical: 1px; +@padding-xs-horizontal: 5px; + +@line-height-large: 1.33; +@line-height-small: 1.5; + +@border-radius-base: 4px; +@border-radius-large: 6px; +@border-radius-small: 2px; + +@component-active-color: #fff; +@component-active-bg: #7d858c; // @primary; + +@caret-width-base: 4px; +@caret-width-large: 5px; + +// Tables +// ------------------------- + +@table-cell-padding: 8px; +@table-condensed-cell-padding: 5px; + +@table-bg: transparent; // overall background-color +@table-bg-accent: #f9f9f9; // for striping +@table-bg-hover: #f5f5f5; +@table-bg-active: @table-bg-hover; + +@table-border-color: #ddd; // table and cell border + + +// Buttons +// ------------------------- + +@btn-font-weight: normal; + +@btn-default-color: #333; +@btn-default-bg: #fff; +@btn-default-border: #ccc; + +@btn-primary-color: #fff; +@btn-primary-bg: @brand-primary; +@btn-primary-border: darken(@btn-primary-bg, 5%); + +@btn-success-color: #fff; +@btn-success-bg: @brand-success; +@btn-success-border: darken(@btn-success-bg, 5%); + +@btn-warning-color: #fff; +@btn-warning-bg: @brand-warning; +@btn-warning-border: darken(@btn-warning-bg, 5%); + +@btn-danger-color: #fff; +@btn-danger-bg: @brand-danger; +@btn-danger-border: darken(@btn-danger-bg, 5%); + +@btn-info-color: #fff; +@btn-info-bg: @brand-info; +@btn-info-border: darken(@btn-info-bg, 5%); + +@btn-link-disabled-color: #f1f1f1; // @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 +// ------------------------- + +@input-bg: #fff; +@input-bg-disabled: #ededed; // @gray-lighter; + +@input-color: #000; +@input-border: #cfcfcf; // @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 ``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: #cfcfcf; // @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: #cbcbcb; // @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 +// ------------------------- + +@dropdown-bg: #fff; +@dropdown-border: rgba(0,0,0,.15); +@dropdown-fallback-border: #ccc; +@dropdown-divider-bg: #e5e5e5; + +@dropdown-link-color: #444; // @gray-deep; +@dropdown-link-hover-color: darken(#444, 5%); // darken(@gray-deep, 5%); +@dropdown-link-hover-bg: #d8dadc; // @secondary; + +@dropdown-link-active-color: @component-active-color; +@dropdown-link-active-bg: @component-active-bg; + +@dropdown-link-disabled-color: #cfcfcf; // @gray; + +@dropdown-header-color: #cfcfcf; // @gray; + + +// COMPONENT VARIABLES +// -------------------------------------------------- + + +// Z-index master list +// ------------------------- +// Used for a bird's eye view of components dependent on the z-axis +// Try to avoid customizing these :) + +@zindex-navbar: 1000; +@zindex-dropdown: 1000; +@zindex-popover: 1010; +@zindex-tooltip: 1030; +@zindex-navbar-fixed: 1030; +@zindex-modal-background: 1040; +@zindex-modal: 1050; + +// Media queries breakpoints +// -------------------------------------------------- + +// Extra small screen / phone +// Note: Deprecated @screen-xs and @screen-phone as of v3.0.1 +@screen-xs: 480px; +@screen-xs-min: @screen-xs; +@screen-phone: @screen-xs-min; + +// Small screen / tablet +// Note: Deprecated @screen-sm and @screen-tablet as of v3.0.1 +@screen-sm: 768px; +@screen-sm-min: @screen-sm; +@screen-tablet: @screen-sm-min; + +// Medium screen / desktop +// Note: Deprecated @screen-md and @screen-desktop as of v3.0.1 +@screen-md: 992px; +@screen-md-min: @screen-md; +@screen-desktop: @screen-md-min; + +// Large screen / wide desktop +// Note: Deprecated @screen-lg and @screen-lg-desktop as of v3.0.1 +@screen-lg: 1200px; +@screen-lg-min: @screen-lg; +@screen-lg-desktop: @screen-lg-min; + +// So media queries don't overlap when required, provide a maximum +@screen-xs-max: (@screen-sm-min - 1); +@screen-sm-max: (@screen-md-min - 1); +@screen-md-max: (@screen-lg-min - 1); + + +// Grid system +// -------------------------------------------------- + +// Number of columns in the grid system +@grid-columns: 12; +// Padding, to be divided by two and applied to the left and right of all columns +@grid-gutter-width: 30px; + +// Navbar collapse + +// Point at which the navbar becomes uncollapsed +@grid-float-breakpoint: @screen-sm-min; +// Point at which the navbar begins collapsing +@grid-float-breakpoint-max: (@grid-float-breakpoint - 1); + + +// Navbar +// ------------------------- + +// Basics of a navbar +@navbar-height: 50px; +@navbar-margin-bottom: @line-height-computed; +@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; +@navbar-default-border: darken(@navbar-default-bg, 6.5%); + +// Navbar links +@navbar-default-link-color: #777; +@navbar-default-link-hover-color: #333; +@navbar-default-link-hover-bg: transparent; +@navbar-default-link-active-color: #555; +@navbar-default-link-active-bg: darken(@navbar-default-bg, 6.5%); +@navbar-default-link-disabled-color: #ccc; +@navbar-default-link-disabled-bg: transparent; + +// Navbar brand label +@navbar-default-brand-color: @navbar-default-link-color; +@navbar-default-brand-hover-color: darken(@navbar-default-brand-color, 10%); +@navbar-default-brand-hover-bg: transparent; + +// Navbar toggle +@navbar-default-toggle-hover-bg: #ddd; +@navbar-default-toggle-icon-bar-bg: #ccc; +@navbar-default-toggle-border-color: #ddd; + + +// Inverted navbar +// +// Reset inverted navbar basics +@navbar-inverse-color: #f1f1f1; // @gray-light; +@navbar-inverse-bg: #222; +@navbar-inverse-border: darken(@navbar-inverse-bg, 10%); + +// Inverted navbar links +@navbar-inverse-link-color: #f1f1f1; // @gray-light; +@navbar-inverse-link-hover-color: #fff; +@navbar-inverse-link-hover-bg: transparent; +@navbar-inverse-link-active-color: @navbar-inverse-link-hover-color; +@navbar-inverse-link-active-bg: darken(@navbar-inverse-bg, 10%); +@navbar-inverse-link-disabled-color: #444; +@navbar-inverse-link-disabled-bg: transparent; + +// Inverted navbar brand label +@navbar-inverse-brand-color: @navbar-inverse-link-color; +@navbar-inverse-brand-hover-color: #fff; +@navbar-inverse-brand-hover-bg: transparent; + +// Inverted navbar toggle +@navbar-inverse-toggle-hover-bg: #333; +@navbar-inverse-toggle-icon-bar-bg: #fff; +@navbar-inverse-toggle-border-color: #333; + + +// Navs +// ------------------------- + +@nav-link-padding: 10px 15px; +@nav-link-hover-bg: #ededed; // @gray-lighter; + +@nav-disabled-link-color: #f1f1f1; // @gray-light; +@nav-disabled-link-hover-color: #f1f1f1; // @gray-light; + +@nav-open-link-hover-color: #fff; + +// Tabs +@nav-tabs-border-color: #ddd; + +@nav-tabs-link-hover-border-color: #ededed; // @gray-lighter; + +@nav-tabs-active-link-hover-bg: @body-bg; +@nav-tabs-active-link-hover-color: #cfcfcf; // @gray; +@nav-tabs-active-link-hover-border-color: #ddd; + +@nav-tabs-justified-link-border-color: #ddd; +@nav-tabs-justified-active-link-border-color: @body-bg; + +// Pills +@nav-pills-border-radius: @border-radius-base; +@nav-pills-active-link-hover-bg: @component-active-bg; +@nav-pills-active-link-hover-color: @component-active-color; + + +// Pagination +// ------------------------- +@pagination-color: @link-color; +@pagination-bg: #fff; +@pagination-border: #ddd; + +@pagination-hover-color: @link-hover-color; +@pagination-hover-bg: #ededed; // @gray-lighter; +@pagination-hover-border: #ddd; + +@pagination-active-bg: @brand-primary; +@pagination-active-color: #fff; +@pagination-active-border: @brand-primary; + +@pagination-disabled-color: #f1f1f1; // @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: #f1f1f1; // @gray-light; + + +// Jumbotron +// ------------------------- + +@jumbotron-padding: 30px; +@jumbotron-color: inherit; +@jumbotron-bg: #ededed; // @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 +// ------------------------- + +@state-success-text: #3c763d; +@state-success-bg: #dff0d8; +@state-success-border: darken(spin(@state-success-bg, -10), 5%); + +@state-info-text: #31708f; +@state-info-bg: #d9edf7; +@state-info-border: darken(spin(@state-info-bg, -10), 7%); + +@state-warning-text: #8a6d3b; +@state-warning-bg: #fcf8e3; +@state-warning-border: darken(spin(@state-warning-bg, -10), 5%); + +@state-danger-text: #a94442; +@state-danger-bg: #f2dede; +@state-danger-border: darken(spin(@state-danger-bg, -10), 5%); + + +// Tooltips +// ------------------------- +@tooltip-max-width: 200px; +@tooltip-color: #fff; +@tooltip-bg: #000; +@tooltip-opacity: .9; + +@tooltip-arrow-width: 5px; +@tooltip-arrow-color: @tooltip-bg; + + +// Popovers +// ------------------------- +@popover-bg: #fff; +@popover-max-width: 276px; +@popover-border-color: rgba(0,0,0,.2); +@popover-fallback-border-color: #ccc; + +@popover-title-bg: darken(@popover-bg, 3%); + +@popover-arrow-width: 10px; +@popover-arrow-color: #fff; + +@popover-arrow-outer-width: (@popover-arrow-width + 1); +@popover-arrow-outer-color: rgba(0,0,0,.25); +@popover-arrow-outer-fallback-color: #999; + + +// Labels +// ------------------------- + +@label-default-bg: #f1f1f1; // @gray-light; +@label-primary-bg: @brand-primary; +@label-success-bg: @brand-success; +@label-info-bg: @brand-info; +@label-warning-bg: @brand-warning; +@label-danger-bg: @brand-danger; + +@label-color: #fff; +@label-link-hover-color: #fff; + + +// Modals +// ------------------------- +@modal-inner-padding: 20px; + +@modal-title-padding: 15px; +@modal-title-line-height: @line-height-base; + +@modal-content-bg: #fff; +@modal-content-border-color: rgba(0,0,0,.2); +@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 +// ------------------------- +@alert-padding: 15px; +@alert-border-radius: @border-radius-base; +@alert-link-font-weight: bold; + +@alert-success-bg: @state-success-bg; +@alert-success-text: @state-success-text; +@alert-success-border: @state-success-border; + +@alert-info-bg: @state-info-bg; +@alert-info-text: @state-info-text; +@alert-info-border: @state-info-border; + +@alert-warning-bg: @state-warning-bg; +@alert-warning-text: @state-warning-text; +@alert-warning-border: @state-warning-border; + +@alert-danger-bg: @state-danger-bg; +@alert-danger-text: @state-danger-text; +@alert-danger-border: @state-danger-border; + + +// Progress bars +// ------------------------- +@progress-bg: #f5f5f5; +@progress-bar-color: #fff; +@progress-border-radius: @border-radius-base; + +@progress-bar-bg: @brand-primary; +@progress-bar-success-bg: @brand-success; +@progress-bar-warning-bg: @brand-warning; +@progress-bar-danger-bg: @brand-danger; +@progress-bar-info-bg: @brand-info; + + +// List group +// ------------------------- +@list-group-bg: #fff; +@list-group-border: #ddd; +@list-group-border-radius: @border-radius-base; + +@list-group-hover-bg: #f5f5f5; +@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: #f1f1f1; // @gray-light; +@list-group-disabled-bg: #ededed; // @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; + +//@panel-default-text: @gray-dark; +@panel-default-border: #ddd; +@panel-default-heading-bg: #f5f5f5; + +@panel-primary-text: #fff; +@panel-primary-border: @brand-primary; +@panel-primary-heading-bg: @brand-primary; + +@panel-success-text: @state-success-text; +@panel-success-border: @state-success-border; +@panel-success-heading-bg: @state-success-bg; + +@panel-warning-text: @state-warning-text; +@panel-warning-border: @state-warning-border; +@panel-warning-heading-bg: @state-warning-bg; + +@panel-danger-text: @state-danger-text; +@panel-danger-border: @state-danger-border; +@panel-danger-heading-bg: @state-danger-bg; + +@panel-info-text: @state-info-text; +@panel-info-border: @state-info-border; +@panel-info-heading-bg: @state-info-bg; + + +// Thumbnails +// ------------------------- +@thumbnail-padding: 4px; +@thumbnail-bg: @body-bg; +@thumbnail-border: #ddd; +@thumbnail-border-radius: @border-radius-base; + +//@thumbnail-caption-color: @text-color; +@thumbnail-caption-padding: 9px; + + +// Wells +// ------------------------- +@well-bg: #f5f5f5; +@well-border: darken(@well-bg, 7%); + +// Badges +// ------------------------- +@badge-color: #fff; +@badge-link-hover-color: #fff; +@badge-bg: #f1f1f1; // @gray-light; + +@badge-active-color: @link-color; +@badge-active-bg: #fff; + +@badge-font-weight: bold; +@badge-line-height: 1; +@badge-border-radius: 10px; + + +// Breadcrumbs +// ------------------------- +@breadcrumb-padding-vertical: 8px; +@breadcrumb-padding-horizontal: 15px; +@breadcrumb-bg: #f5f5f5; +@breadcrumb-color: #ccc; +@breadcrumb-active-color: #f1f1f1; // @gray-light; +@breadcrumb-separator: "/"; + + +// Carousel +// ------------------------ + +@carousel-text-shadow: 0 1px 2px rgba(0,0,0,.6); + +@carousel-control-color: #fff; +@carousel-control-width: 15%; +@carousel-control-opacity: .5; +@carousel-control-font-size: 20px; + +@carousel-indicator-active-bg: #fff; +@carousel-indicator-border-color: #fff; + +@carousel-caption-color: #fff; + + +// Close +// ------------------------ +@close-font-weight: bold; +@close-color: #000; +@close-text-shadow: 0 1px 0 #fff; + + +// Code +// ------------------------ +@code-color: #c7254e; +@code-bg: #f9f2f4; + +@kbd-color: #fff; +@kbd-bg: #333; + +@pre-bg: #f5f5f5; +//@pre-color: @gray-dark; +@pre-border-color: #ccc; +@pre-scrollable-max-height: 340px; + +// Type +// ------------------------ +@text-muted: #f1f1f1; // @gray-light; +@abbr-border-color: #f1f1f1; // @gray-light; +@headings-small-color: #f1f1f1; // @gray-light; +@blockquote-small-color: #f1f1f1; // @gray-light; +@blockquote-font-size: (@font-size-base * 1.25); +@blockquote-border-color: #ededed; // @gray-lighter; +@page-header-border-color: #ededed; // @gray-lighter; + +// Miscellaneous +// ------------------------- + +// Hr border color +@hr-border: #ededed; // @gray-lighter; + +// 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 +// -------------------------------------------------- + +// Small screen / tablet +@container-tablet: ((720px + @grid-gutter-width)); +@container-sm: @container-tablet; + +// Medium screen / desktop +@container-desktop: ((940px + @grid-gutter-width)); +@container-md: @container-desktop; + +// Large screen / wide desktop +@container-large-desktop: ((1140px + @grid-gutter-width)); +@container-lg: @container-large-desktop; + + +// Texture offsets +// -------------------------------------------------- + +// Common components texture +@common-controls: "controls/common-controls.png"; +@common-controls2x: "controls/common-controls@2x.png"; + +// Dialog alerts +@alerts-offset-x: 0; +@alerts-offset-y: 0; + +// Dialog close +@but-close-offset-x: -26px; +@but-close-offset-y: -151px; + +// Dropdown arrow +@arrow-small-offset-x: -85px; +@arrow-small-offset-y: -96px; + +// Dropdown arrow up +@arrow-up-small-offset-x: -85px; +@arrow-up-small-offset-y: -104px; + +// Dropdown arrow big +@arrow-big-offset-x: -41px; +@arrow-big-offset-y: -144px; + +// Checkbox +@checkbox-offset-x: -35px; +@checkbox-offset-y: 0px; + +// Radio button +@radio-offset-x: -35px; +@radio-offset-y: -65px; + +// Menu check +@menu-check-offset-x: -41px; +@menu-check-offset-y: -172px; + +// Multislider thumb +@slide-thumb-offset-x: -13px; +@slide-thumb-offset-y: -150px; + +// Slider thumb +@multislide-thumb-offset-x: 0px; +@multislide-thumb-offset-y: -150px; + +// Slider track +@slide-track-offset-x: 0px; +@slide-track-offset-y: -195px; + +// Input error +@input-error-offset-x: -73px; +@input-error-offset-y: -170px; + +// Input warning +@input-warning-offset-x: -57px; +@input-warning-offset-y: -170px; + +// Spinner +@spinner-offset-x: -41px; +@spinner-offset-y: -187px; + +// Search dialog +@search-dlg-offset-x: -36px; +@search-dlg-offset-y: -96px; + +// No color +@nocolor-offset-x: 0; +@nocolor-offset-y: -137px; + +// Plus +@plus-offset-x: -80px; +@plus-offset-y: -184px; + +@dl-horizontal-offset: @component-offset-horizontal; +// Point at which .dl-horizontal becomes horizontal +@dl-horizontal-breakpoint: @grid-float-breakpoint; \ No newline at end of file diff --git a/test/common.js b/test/unit-tests/common.js similarity index 100% rename from test/common.js rename to test/unit-tests/common.js diff --git a/test/common/index.html b/test/unit-tests/common/index.html similarity index 83% rename from test/common/index.html rename to test/unit-tests/common/index.html index ae925d513..71de33810 100644 --- a/test/common/index.html +++ b/test/unit-tests/common/index.html @@ -3,12 +3,12 @@ Unit Tests - +
      - - + + diff --git a/test/common/main/lib/component/Button.js b/test/unit-tests/common/main/lib/component/Button.js similarity index 97% rename from test/common/main/lib/component/Button.js rename to test/unit-tests/common/main/lib/component/Button.js index b50308ae8..69c06ed07 100644 --- a/test/common/main/lib/component/Button.js +++ b/test/unit-tests/common/main/lib/component/Button.js @@ -10,7 +10,7 @@ define([ 'backbone', - '../../../../../apps/common/main/lib/component/Button.js', + '../../../../../../../web-apps — копия/apps/common/main/lib/component/Button.js', '../../../../../apps/common/main/lib/component/Menu.js' ],function() { var chai = require('chai'), diff --git a/test/unit-tests/common/main/lib/util/utils.js b/test/unit-tests/common/main/lib/util/utils.js new file mode 100644 index 000000000..082a4536a --- /dev/null +++ b/test/unit-tests/common/main/lib/util/utils.js @@ -0,0 +1,33 @@ +/** + * utils.js + * + * Unit test + * + * Created by Alexander Yuzhin on 5/7/14 + * Copyright (c) 2018 Ascensio System SIA. All rights reserved. + * + */ + +define([ + '../../../../../../../web-apps — копия/apps/common/main/lib/util/utils.js' +],function() { + describe('Common.Utils.String', function(){ + it('Test format', function(){ + assert.equal('successively: first, second', Common.Utils.String.format('successively: {0}, {1}', 'first', 'second')); + assert.equal('revers: second, first', Common.Utils.String.format('revers: {1}, {0}', 'first', 'second')); + }); + + it('Test htmlEncode', function(){ + assert.equal('Curly, Larry & Moe', Common.Utils.String.htmlEncode('Curly, Larry & Moe')); + }); + + it('Test htmlDecode', function(){ + assert.equal('Curly, Larry & Moe', Common.Utils.String.htmlDecode('Curly, Larry & Moe')); + }); + + it('Test ellipsis', function(){ + assert.equal('Truncate a s...', Common.Utils.String.ellipsis('Truncate a string and add an ellipsis', 15)); + assert.equal('Truncate a string and add...', Common.Utils.String.ellipsis('Truncate a string and add an ellipsis', 30, true)); + }); + }); +}); \ No newline at end of file diff --git a/vendor/framework7-react/build/webpack.config.js b/vendor/framework7-react/build/webpack.config.js index 359731620..447c2d9ef 100644 --- a/vendor/framework7-react/build/webpack.config.js +++ b/vendor/framework7-react/build/webpack.config.js @@ -89,6 +89,7 @@ module.exports = { { test: /\.css$/, + exclude: [/skeleton\.css$/i], use: [ (env === 'development' ? 'style-loader' : { loader: MiniCssExtractPlugin.loader, @@ -188,6 +189,9 @@ module.exports = { // new webpack.NamedModulesPlugin(), ]), // new CleanWebpackPlugin(), + new MiniCssExtractPlugin({ + filename: 'css/[name].css', + }), new HtmlWebpackPlugin({ filename: `../../../apps/${editor}/mobile/index.html`, template: `../../apps/${editor}/mobile/src/index_dev.html`, @@ -200,9 +204,9 @@ module.exports = { removeStyleLinkTypeAttributes: true, useShortDoctype: true } : false, - }), - new MiniCssExtractPlugin({ - filename: 'css/[name].css', + skeleton: { + stylesheet: env === 'development' ? undefined : fs.readFileSync(`../../apps/common/mobile/resources/css/skeleton.css`), + }, }), new CopyWebpackPlugin({ patterns: [ diff --git a/vendor/framework7-react/package.json b/vendor/framework7-react/package.json index 2fa213be4..a19d70144 100644 --- a/vendor/framework7-react/package.json +++ b/vendor/framework7-react/package.json @@ -13,7 +13,7 @@ "deploy-word": "cross-env TARGET_EDITOR=word NODE_ENV=production node ./build/build.js", "deploy-cell": "cross-env TARGET_EDITOR=cell NODE_ENV=production node ./build/build.js", "deploy-slide": "cross-env TARGET_EDITOR=slide NODE_ENV=production node ./build/build.js", - "postinstall": "cpy ./node_modules/framework7-icons/fonts/*.* ./src/fonts/", + "postinstall1": "cpy ./node_modules/framework7-icons/fonts/*.* ./src/fonts/", "build-word": "cross-env NODE_ENV=development node ./build/build.js", "build-slide": "cross-env NODE_ENV=development TARGET_EDITOR=slide node ./build/build.js", "build-cell": "cross-env NODE_ENV=development TARGET_EDITOR=cell node ./build/build.js"