Updated application.

This commit is contained in:
agolybev
2015-08-17 17:19:04 +03:00
parent cd34405d7e
commit a7b9b3a979
330 changed files with 81139 additions and 172701 deletions

View File

@@ -213,12 +213,18 @@
Common.Analytics.trackEvent("Load", "Complete");
}
function onEditorPermissions(params) {
if (params.asc_getCanBranding() && (typeof config.customization == "object") && config.customization && config.customization.logoUrlEmbedded) {
$("#header-logo").css({
"background-image": 'url("' + config.customization.logoUrlEmbedded + '")',
"background-position": "0 center",
"background-repeat": "no-repeat"
});
if (params.asc_getCanBranding() && (typeof config.customization == "object") && config.customization && config.customization.logo) {
var logo = $("#header-logo");
if (config.customization.logo.imageEmbedded) {
logo.css({
"background-image": 'url("' + config.customization.logo.imageEmbedded + '")',
"background-position": "0 center",
"background-repeat": "no-repeat"
});
}
if (config.customization.logo.url) {
logo.attr("href", config.customization.logo.url);
}
}
}
function showMask() {
@@ -450,7 +456,7 @@
updateEmbedCode();
api && api.asc_enableKeyEvents(true);
});
$("#page-number").on("keypress", function (e) {
$("#page-number").on("keyup", function (e) {
if (e.keyCode == 13) {
var newPage = parseInt($("#page-number").val());
if (newPage > maxPages) {
@@ -464,6 +470,9 @@
}
}
});
$("#page-number").on("focusout", function (e) {
api && api.asc_enableKeyEvents(true);
});
$("#id-btn-fullscreen").on("click", function () {
openLink(embedConfig.fullscreenUrl);
});

View File

@@ -95,6 +95,9 @@
if (this.mode.canCoAuthoring && this.mode.canChat) {
this.api.asc_registerCallback("asc_onCoAuthoringChatReceiveMessage", _.bind(this.onApiChatMessage, this));
}
if (!this.mode.canLicense) {
this.api.SetCollaborativeMarksShowType(c_oAscCollaborativeMarksShowType.None);
}
this.leftMenu.getMenu("file").setApi(api);
if (this.mode.canUseHistory) {
this.getApplication().getController("Common.Controllers.History").setApi(this.api);
@@ -202,7 +205,7 @@
default:
value = c_oAscCollaborativeMarksShowType.LastChanges;
}
this.api.SetCollaborativeMarksShowType(value);
this.api.SetCollaborativeMarksShowType(this.mode.canLicense ? value : c_oAscCollaborativeMarksShowType.None);
value = window.localStorage.getItem("de-settings-livecomment");
(!(value !== null && parseInt(value) == 0)) ? this.api.asc_showComments() : this.api.asc_hideComments();
value = window.localStorage.getItem("de-settings-fontrender");

View File

@@ -307,11 +307,9 @@
arrColors.push(user.get("colorval"));
var changes = version.changes,
change, i;
if (changes) {
if (changes.length > 0) {
arrVersions[arrVersions.length - 1].set("changeid", changes.length - 1);
arrVersions[arrVersions.length - 1].set("docIdPrev", docIdPrev);
}
if (changes && changes.length > 0) {
arrVersions[arrVersions.length - 1].set("changeid", changes.length - 1);
arrVersions[arrVersions.length - 1].set("docIdPrev", docIdPrev);
for (i = changes.length - 2; i >= 0; i--) {
change = changes[i];
user = usersStore.findUser(change.user.id);
@@ -338,6 +336,10 @@
}));
arrColors.push(user.get("colorval"));
}
} else {
if (ver == 0 && versions.length == 1) {
arrVersions[arrVersions.length - 1].set("docId", version.key + "1");
}
}
}
}

View File

@@ -92,7 +92,7 @@
DE.Views.FileMenuPanels.Settings = Common.UI.BaseView.extend(_.extend({
el: "#panel-settings",
menu: undefined,
template: _.template(["<table><tbody>", '<tr class="edit">', '<td class="left"><label><%= scope.txtInput %></label></td>', '<td class="right"><div id="fms-chb-input-mode"/></td>', "</tr>", '<tr class="divider edit"></tr>', '<tr class="coauth">', '<td class="left"><label><%= scope.txtLiveComment %></label></td>', '<td class="right"><div id="fms-chb-live-comment"/></td>', "</tr>", '<tr class="divider coauth"></tr>', '<tr class="edit">', '<td class="left"><label><%= scope.txtSpellCheck %></label></td>', '<td class="right"><div id="fms-chb-spell-check"/></td>', "</tr>", '<tr class="divider edit"></tr>', '<tr class="autosave">', '<td class="left"><label><%= scope.textAutoSave %></label></td>', '<td class="right"><span id="fms-chb-autosave" /></td>', "</tr>", '<tr class="divider autosave"></tr>', "<tr>", '<td class="left"><label><%= scope.textAlignGuides %></label></td>', '<td class="right"><span id="fms-chb-align-guides" /></td>', "</tr>", '<tr class="divider"></tr>', "<tr>", '<td class="left"><label><%= scope.strZoom %></label></td>', '<td class="right"><div id="fms-cmb-zoom" class="input-group-nr" /></td>', "</tr>", '<tr class="divider"></tr>', '<tr class="coauth">', '<td class="left"><label><%= scope.strShowChanges %></label></td>', '<td class="right"><span id="fms-cmb-show-changes" /></td>', "</tr>", '<tr class="divider coauth"></tr>', "<tr>", '<td class="left"><label><%= scope.strFontRender %></label></td>', '<td class="right"><span id="fms-cmb-font-render" /></td>', "</tr>", '<tr class="divider"></tr>', '<tr class="edit">', '<td class="left"><label><%= scope.strUnit %></label></td>', '<td class="right"><span id="fms-cmb-unit" /></td>', "</tr>", '<tr class="divider edit"></tr>', "<tr>", '<td class="left"></td>', '<td class="right"><button id="fms-btn-apply" class="btn normal dlg-btn primary"><%= scope.okButtonText %></button></td>', "</tr>", "</tbody></table>"].join("")),
template: _.template(["<table><tbody>", '<tr class="edit">', '<td class="left"><label><%= scope.txtInput %></label></td>', '<td class="right"><div id="fms-chb-input-mode"/></td>', "</tr>", '<tr class="divider edit"></tr>', '<tr class="coauth">', '<td class="left"><label><%= scope.txtLiveComment %></label></td>', '<td class="right"><div id="fms-chb-live-comment"/></td>', "</tr>", '<tr class="divider coauth"></tr>', '<tr class="edit">', '<td class="left"><label><%= scope.txtSpellCheck %></label></td>', '<td class="right"><div id="fms-chb-spell-check"/></td>', "</tr>", '<tr class="divider edit"></tr>', '<tr class="autosave">', '<td class="left"><label><%= scope.textAutoSave %></label></td>', '<td class="right"><span id="fms-chb-autosave" /></td>', "</tr>", '<tr class="divider autosave"></tr>', "<tr>", '<td class="left"><label><%= scope.textAlignGuides %></label></td>', '<td class="right"><span id="fms-chb-align-guides" /></td>', "</tr>", '<tr class="divider"></tr>', "<tr>", '<td class="left"><label><%= scope.strZoom %></label></td>', '<td class="right"><div id="fms-cmb-zoom" class="input-group-nr" /></td>', "</tr>", '<tr class="divider"></tr>', '<tr class="coauth changes">', '<td class="left"><label><%= scope.strShowChanges %></label></td>', '<td class="right"><span id="fms-cmb-show-changes" /></td>', "</tr>", '<tr class="divider coauth changes"></tr>', "<tr>", '<td class="left"><label><%= scope.strFontRender %></label></td>', '<td class="right"><span id="fms-cmb-font-render" /></td>', "</tr>", '<tr class="divider"></tr>', '<tr class="edit">', '<td class="left"><label><%= scope.strUnit %></label></td>', '<td class="right"><span id="fms-cmb-unit" /></td>', "</tr>", '<tr class="divider edit"></tr>', "<tr>", '<td class="left"></td>', '<td class="right"><button id="fms-btn-apply" class="btn normal dlg-btn primary"><%= scope.okButtonText %></button></td>', "</tr>", "</tbody></table>"].join("")),
initialize: function (options) {
Common.UI.BaseView.prototype.initialize.call(this, arguments);
this.menu = options.menu;
@@ -240,7 +240,8 @@
setMode: function (mode) {
$("tr.edit", this.el)[mode.isEdit ? "show" : "hide"]();
$("tr.autosave", this.el)[mode.isEdit && mode.canAutosave ? "show" : "hide"]();
$("tr.coauth", this.el)[mode.canCoAuthoring && mode.isEdit ? "show" : "hide"]();
$("tr.coauth", this.el)[mode.isEdit && mode.canCoAuthoring ? "show" : "hide"]();
$("tr.coauth.changes", this.el)[mode.isEdit && mode.canLicense ? "show" : "hide"]();
},
updateSettings: function () {
var value = window.localStorage.getItem("de-settings-inputmode");

View File

@@ -37,11 +37,12 @@
template: _.template(menuTemplate),
events: function () {
return {
"click #left-btn-support": function () {
window.open("http://feedback.onlyoffice.com/");
},
"click #left-btn-comments": _.bind(this.onCoauthOptions, this),
"click #left-btn-chat": _.bind(this.onCoauthOptions, this)
"click #left-btn-chat": _.bind(this.onCoauthOptions, this),
"click #left-btn-support": function () {
var config = this.mode.customization;
config && !!config.feedback && !!config.feedback.url ? window.open(config.feedback.url) : window.open("http://feedback.onlyoffice.com/");
}
};
},
initialize: function () {

View File

@@ -101,7 +101,7 @@
"DE.Controllers.LeftMenu.newDocumentTitle": "Unbetiteltes Dokument",
"DE.Controllers.LeftMenu.notcriticalErrorTitle": "Warning",
"DE.Controllers.LeftMenu.requestEditRightsText": "Anfrage betreffend die Bearbeitungsberechtigung...",
"DE.Controllers.LeftMenu.textLoadHistory": "Loading versions history...",
"DE.Controllers.LeftMenu.textLoadHistory": "Versionen-Historie wird geladen...",
"DE.Controllers.LeftMenu.textNoTextFound": "Die Daten, nach denen Sie gesucht haben, können nicht gefunden werden. Bitte ändern Sie die Suchparameter.",
"DE.Controllers.LeftMenu.textReplaceSkipped": "Der Ersatzvorgang wurde durchgeführt. {0} Vorkommen wurden ausgelassen.",
"DE.Controllers.LeftMenu.textReplaceSuccess": "Der Suchvorgang wurde durchgeführt. Vorkommen wurden ersetzt:{0}",
@@ -699,7 +699,7 @@
"DE.Views.FileMenu.btnPrintCaption": "Drucken",
"DE.Views.FileMenu.btnRecentFilesCaption": "Zuletzt benutztes öffnen...",
"DE.Views.FileMenu.btnReturnCaption": "Zurück zum Dokument",
"DE.Views.FileMenu.btnRightsCaption": "Access Rights...",
"DE.Views.FileMenu.btnRightsCaption": "Zugriffsrechte...",
"DE.Views.FileMenu.btnSaveCaption": "Speichern",
"DE.Views.FileMenu.btnSettingsCaption": "Erweiterte Einstellungen...",
"DE.Views.FileMenu.btnToEditCaption": "Dokument bearbeiten",

View File

@@ -101,7 +101,7 @@
"DE.Controllers.LeftMenu.newDocumentTitle": "Document sans nom",
"DE.Controllers.LeftMenu.notcriticalErrorTitle": "Warning",
"DE.Controllers.LeftMenu.requestEditRightsText": "Demande des droits de modification...",
"DE.Controllers.LeftMenu.textLoadHistory": "Loading versions history...",
"DE.Controllers.LeftMenu.textLoadHistory": "Chargement de l'histoire des versions...",
"DE.Controllers.LeftMenu.textNoTextFound": "Votre recherche n'a donné aucun résultat.S'il vous plaît, modifiez vos critères de recherche.",
"DE.Controllers.LeftMenu.textReplaceSkipped": "Le remplacement est fait. {0} occurrences ont été ignorées.",
"DE.Controllers.LeftMenu.textReplaceSuccess": "La recherche est effectuée. Occurrences ont été remplacées:{0}",
@@ -694,12 +694,12 @@
"DE.Views.FileMenu.btnCreateNewCaption": "Nouvel objet",
"DE.Views.FileMenu.btnDownloadCaption": "Télécharger comme...",
"DE.Views.FileMenu.btnHelpCaption": "Aide...",
"DE.Views.FileMenu.btnHistoryCaption": "Version History",
"DE.Views.FileMenu.btnHistoryCaption": "Historique des versions",
"DE.Views.FileMenu.btnInfoCaption": "Descriptif du document...",
"DE.Views.FileMenu.btnPrintCaption": "Imprimer",
"DE.Views.FileMenu.btnRecentFilesCaption": "Ouvrir récent...",
"DE.Views.FileMenu.btnReturnCaption": "Retour au Document",
"DE.Views.FileMenu.btnRightsCaption": "Access Rights...",
"DE.Views.FileMenu.btnRightsCaption": "Droits d'accès...",
"DE.Views.FileMenu.btnSaveCaption": "Enregistrer",
"DE.Views.FileMenu.btnSettingsCaption": "Paramètres avancés...",
"DE.Views.FileMenu.btnToEditCaption": "Modifier le document",
@@ -874,7 +874,7 @@
"DE.Views.MailMergeEmailDlg.textTo": "To",
"DE.Views.MailMergeEmailDlg.textWarning": "Warning!",
"DE.Views.MailMergeEmailDlg.textWarningMsg": "Please note that mailing cannot be stopped once your click the 'Send' button.",
"DE.Views.MailMergeRecepients.textLoading": "Loading",
"DE.Views.MailMergeRecepients.textLoading": "Chargement",
"DE.Views.MailMergeRecepients.textTitle": "Select Data Source",
"DE.Views.MailMergeSaveDlg.textLoading": "Loading",
"DE.Views.MailMergeSaveDlg.textTitle": "Folder for save",

View File

@@ -83,7 +83,7 @@
"Common.Views.ExternalMergeEditor.textTitle": "Mail Merge Recipients",
"Common.Views.Header.openNewTabText": "Open in New Tab",
"Common.Views.Header.textBack": "Va' ai Documenti",
"Common.Views.History.textHistoryHeader": "Back to Document",
"Common.Views.History.textHistoryHeader": "Torna al documento",
"Common.Views.ImageFromUrlDialog.cancelButtonText": "Annulla",
"Common.Views.ImageFromUrlDialog.okButtonText": "OK",
"Common.Views.ImageFromUrlDialog.textUrl": "Incolla URL immagine:",
@@ -694,12 +694,12 @@
"DE.Views.FileMenu.btnCreateNewCaption": "Crea nuovo oggetto",
"DE.Views.FileMenu.btnDownloadCaption": "Scarica in...",
"DE.Views.FileMenu.btnHelpCaption": "Guida...",
"DE.Views.FileMenu.btnHistoryCaption": "Version History",
"DE.Views.FileMenu.btnHistoryCaption": "Cronologia delle versioni",
"DE.Views.FileMenu.btnInfoCaption": "Informazioni documento...",
"DE.Views.FileMenu.btnPrintCaption": "Stampa",
"DE.Views.FileMenu.btnRecentFilesCaption": "Apri recenti...",
"DE.Views.FileMenu.btnReturnCaption": "Torna al documento",
"DE.Views.FileMenu.btnRightsCaption": "Access Rights...",
"DE.Views.FileMenu.btnRightsCaption": "Diritti di accesso...",
"DE.Views.FileMenu.btnSaveCaption": "Salva",
"DE.Views.FileMenu.btnSettingsCaption": "Impostazioni avanzate...",
"DE.Views.FileMenu.btnToEditCaption": "Modifica documento",

View File

@@ -699,7 +699,7 @@
"DE.Views.FileMenu.btnPrintCaption": "Imprimir",
"DE.Views.FileMenu.btnRecentFilesCaption": "Abrir recente...",
"DE.Views.FileMenu.btnReturnCaption": "Voltar para documento",
"DE.Views.FileMenu.btnRightsCaption": "Access Rights...",
"DE.Views.FileMenu.btnRightsCaption": "Direitos de Acesso...",
"DE.Views.FileMenu.btnSaveCaption": "Salvar",
"DE.Views.FileMenu.btnSettingsCaption": "Configurações avançadas...",
"DE.Views.FileMenu.btnToEditCaption": "Editar documento",

View File

@@ -699,7 +699,7 @@
"DE.Views.FileMenu.btnPrintCaption": "Natisni",
"DE.Views.FileMenu.btnRecentFilesCaption": "Odpri nedavno...",
"DE.Views.FileMenu.btnReturnCaption": "Nazaj v dokument",
"DE.Views.FileMenu.btnRightsCaption": "Access Rights...",
"DE.Views.FileMenu.btnRightsCaption": "Uporabniške pravice...",
"DE.Views.FileMenu.btnSaveCaption": "Shrani",
"DE.Views.FileMenu.btnSettingsCaption": "Napredne nastavitve...",
"DE.Views.FileMenu.btnToEditCaption": "Uredi dokument",