From a5a01c04713bb12bf64bead582554868eb1ddfc6 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Tue, 23 Jul 2019 14:40:18 +0300 Subject: [PATCH] [DE mobile] [PE mobile] [SSE mobile] Document Info --- .../mobile/app/controller/Settings.js | 12 +- .../mobile/app/template/Settings.template | 54 ++++++++- .../mobile/app/view/Settings.js | 8 +- apps/documenteditor/mobile/locale/en.json | 10 ++ .../mobile/app/controller/Settings.js | 2 +- .../mobile/app/template/Settings.template | 10 ++ .../mobile/app/view/Settings.js | 3 +- apps/presentationeditor/mobile/locale/en.json | 10 ++ .../mobile/app/controller/Settings.js | 42 +++++++ .../mobile/app/template/Settings.template | 108 ++++++++++++++++-- .../mobile/app/view/Settings.js | 21 ++-- apps/spreadsheeteditor/mobile/locale/en.json | 10 ++ 12 files changed, 264 insertions(+), 26 deletions(-) diff --git a/apps/documenteditor/mobile/app/controller/Settings.js b/apps/documenteditor/mobile/app/controller/Settings.js index 7a98f7512..ed2c91303 100644 --- a/apps/documenteditor/mobile/app/controller/Settings.js +++ b/apps/documenteditor/mobile/app/controller/Settings.js @@ -415,8 +415,10 @@ define([ var document = Common.SharedSettings.get('document') || {}, info = document.info || {}; - $('#settings-document-title').html(document.title ? document.title : me.unknownText); - $('#settings-document-owner').html(info.author ? info.author : me.unknownText); + document.title ? $('#settings-document-title').html(document.title) : $('.display-document-title').remove(); + info.author ? $('#settings-document-owner').html(info.author) : $('.display-owner').remove(); + info.uploaded ? $('#settings-doc-uploaded').html(info.uploaded.toLocaleString()) : $('.display-uploaded').remove(); + info.folder ? $('#settings-doc-location').html(info.folder) : $('.display-location').remove(); var appProps = (this.api) ? this.api.asc_getAppProps() : null; if (appProps) { @@ -432,6 +434,12 @@ define([ value ? $('#settings-doc-subject').html(value) : $('.display-subject').remove(); value = props.asc_getDescription(); value ? $('#settings-doc-comment').html(value) : $('.display-comment').remove(); + value = props.asc_getModified(); + value ? $('#settings-doc-last-mod').html(value.toLocaleString()) : $('.display-last-mode').remove(); + value = props.asc_getLastModifiedBy(); + value ? $('#settings-doc-mod-by').html(value) : $('.display-mode-by').remove(); + value = props.asc_getCreated(); + value ? $('#settings-doc-date').html(value.toLocaleString()) : $('.display-created-date').remove(); value = props.asc_getCreator(); var templateCreator = ""; value && value.split(/\s*[,;]\s*/).forEach(function(item) { diff --git a/apps/documenteditor/mobile/app/template/Settings.template b/apps/documenteditor/mobile/app/template/Settings.template index ff5505ebb..9fd27d6be 100644 --- a/apps/documenteditor/mobile/app/template/Settings.template +++ b/apps/documenteditor/mobile/app/template/Settings.template @@ -302,8 +302,8 @@ -
<%= scope.textOwner %>
-
+
<%= scope.textOwner %>
+
  • @@ -312,6 +312,26 @@
+
<%= scope.textLocation %>
+
+
    +
  • +
    +
    <%= scope.textLoading %>
    +
    +
  • +
+
+
<%= scope.textUploaded %>
+
+
    +
  • +
    +
    <%= scope.textLoading %>
    +
    +
  • +
+
<%= scope.textStatistic %>
    @@ -378,6 +398,36 @@
+
<%= scope.textLastModified %>
+
+
    +
  • +
    +
    <%= scope.textLoading %>
    +
    +
  • +
+
+
<%= scope.textLastModifiedBy %>
+
+
    +
  • +
    +
    <%= scope.textLoading %>
    +
    +
  • +
+
+
<%= scope.textCreated %>
+
+
    +
  • +
    +
    <%= scope.textLoading %>
    +
    +
  • +
+
<%= scope.textApplication %>
    diff --git a/apps/documenteditor/mobile/app/view/Settings.js b/apps/documenteditor/mobile/app/view/Settings.js index 9665fb8bd..f640eaecb 100644 --- a/apps/documenteditor/mobile/app/view/Settings.js +++ b/apps/documenteditor/mobile/app/view/Settings.js @@ -294,7 +294,13 @@ define([ textTitle: 'Title', textComment: 'Comment', textOwner: 'Owner', - textApplication : 'Application' + textApplication : 'Application', + textLocation: 'Location', + textUploaded: 'Uploaded', + textLastModified: 'Last Modified', + textLastModifiedBy: 'Last Modified By', + textCreated: 'Created' + } })(), DE.Views.Settings || {})) diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json index 3e5f76b8e..268d3347f 100644 --- a/apps/documenteditor/mobile/locale/en.json +++ b/apps/documenteditor/mobile/locale/en.json @@ -495,6 +495,16 @@ "DE.Views.Settings.textCommentingDisplay": "Commenting Display", "DE.Views.Settings.textDisplayComments": "Comments", "DE.Views.Settings.textDisplayResolvedComments": "Resolved Comments", + "DE.Views.Settings.textSubject": "Subject", + "DE.Views.Settings.textTitle": "Title", + "DE.Views.Settings.textComment": "Comment", + "DE.Views.Settings.textOwner": "Owner", + "DE.Views.Settings.textApplication": "Application", + "DE.Views.Settings.textLocation": "Location", + "DE.Views.Settings.textUploaded": "Uploaded", + "DE.Views.Settings.textLastModified": "Last Modified", + "DE.Views.Settings.textLastModifiedBy": "Last Modified By", + "DE.Views.Settings.textCreated": "Created", "DE.Views.Toolbar.textBack": "Back", "Common.Views.Collaboration.textCollaboration": "Collaboration", "Common.Views.Collaboration.textReviewing": "Review", diff --git a/apps/presentationeditor/mobile/app/controller/Settings.js b/apps/presentationeditor/mobile/app/controller/Settings.js index a7580e2a6..ba56d02d7 100644 --- a/apps/presentationeditor/mobile/app/controller/Settings.js +++ b/apps/presentationeditor/mobile/app/controller/Settings.js @@ -202,7 +202,7 @@ define([ document.title ? $('#settings-presentation-title').html(document.title) : $('.display-presentation-title').remove(); info.author ? $('#settings-pe-owner').html(info.author) : $('.display-owner').remove(); info.uploaded ? $('#settings-pe-uploaded').html(info.uploaded.toLocaleString()) : $('.display-uploaded').remove(); - /*info.created ? $('#settings-pe-date').html(info.created) : $('.display-created-date').remove();*/ + info.folder ? $('#settings-pe-location').html(info.folder) : $('.display-location').remove(); var appProps = (this.api) ? this.api.asc_getAppProps() : null; if (appProps) { diff --git a/apps/presentationeditor/mobile/app/template/Settings.template b/apps/presentationeditor/mobile/app/template/Settings.template index 7bae06462..eeb815f61 100644 --- a/apps/presentationeditor/mobile/app/template/Settings.template +++ b/apps/presentationeditor/mobile/app/template/Settings.template @@ -163,6 +163,16 @@
+
<%= scope.textLocation %>
+
+
    +
  • +
    +
    <%= scope.textLoading %>
    +
    +
  • +
+
<%= scope.textUploaded %>
    diff --git a/apps/presentationeditor/mobile/app/view/Settings.js b/apps/presentationeditor/mobile/app/view/Settings.js index e37e566f6..8663b54b5 100644 --- a/apps/presentationeditor/mobile/app/view/Settings.js +++ b/apps/presentationeditor/mobile/app/view/Settings.js @@ -250,7 +250,8 @@ define([ textCreated: 'Created', textLastModified: 'Last Modified', textLastModifiedBy: 'Last Modified By', - textUploaded: 'Uploaded' + textUploaded: 'Uploaded', + textLocation: 'Location' } })(), PE.Views.Settings || {})) }); \ No newline at end of file diff --git a/apps/presentationeditor/mobile/locale/en.json b/apps/presentationeditor/mobile/locale/en.json index 389a52701..b3b914dde 100644 --- a/apps/presentationeditor/mobile/locale/en.json +++ b/apps/presentationeditor/mobile/locale/en.json @@ -476,6 +476,16 @@ "PE.Views.Settings.textColorSchemes": "Color Schemes", "PE.Views.Settings.unknownText": "Unknown", "PE.Views.Settings.textCollaboration": "Collaboration", + "PE.Views.Settings.textSubject": "Subject", + "PE.Views.Settings.textTitle": "Title", + "PE.Views.Settings. textComment": "Comment", + "PE.Views.Settings.textOwner": "Owner", + "PE.Views.Settings.textApplication": "Application", + "PE.Views.Settings.textCreated": "Created", + "PE.Views.Settings.textLastModified": "Last Modified", + "PE.Views.Settings.textLastModifiedBy": "Last Modified By", + "PE.Views.Settings.textUploaded": "Uploaded", + "PE.Views.Settings.textLocation": "Location", "PE.Views.Toolbar.textBack": "Back", "Common.Views.Collaboration.textCollaboration": "Collaboration", "Common.Views.Collaboration.textСomments": "Сomments", diff --git a/apps/spreadsheeteditor/mobile/app/controller/Settings.js b/apps/spreadsheeteditor/mobile/app/controller/Settings.js index 126da3a34..15d9200c1 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Settings.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Settings.js @@ -244,6 +244,8 @@ define([ me.initFormulaLang(); } else if ('#regional-settings-view' == pageId) { me.initRegSettings(); + } else if ('#settings-info-view' == pageId) { + me.initPageInfo(); } else { var _userCount = SSE.getController('Main').returnUserCount(); if (_userCount > 0) { @@ -252,6 +254,46 @@ define([ } }, + initPageInfo: function() { + var document = Common.SharedSettings.get('document') || {}, + info = document.info || {}; + + document.title ? $('#settings-spreadsheet-title').html(document.title) : $('.display-spreadsheet-title').remove(); + info.author ? $('#settings-sse-owner').html(info.author) : $('.display-owner').remove(); + info.uploaded ? $('#settings-sse-uploaded').html(info.uploaded.toLocaleString()) : $('.display-uploaded').remove(); + info.folder ? $('#settings-sse-location').html(info.folder) : $('.display-location').remove(); + + var appProps = (this.api) ? this.api.asc_getAppProps() : null; + if (appProps) { + var appName = (appProps.asc_getApplication() || '') + ' ' + (appProps.asc_getAppVersion() || ''); + appName ? $('#settings-sse-application').html(appName) : $('.display-application').remove(); + } + + var props = (this.api) ? this.api.asc_getCoreProps() : null, + value; + if (props) { + value = props.asc_getTitle(); + value ? $('#settings-sse-title').html(value) : $('.display-title').remove(); + value = props.asc_getSubject(); + value ? $('#settings-sse-subject').html(value) : $('.display-subject').remove(); + value = props.asc_getDescription(); + value ? $('#settings-sse-comment').html(value) : $('.display-comment').remove(); + value = props.asc_getModified(); + value ? $('#settings-sse-last-mod').html(value.toLocaleString()) : $('.display-last-mode').remove(); + value = props.asc_getLastModifiedBy(); + value ? $('#settings-sse-mod-by').html(value) : $('.display-mode-by').remove(); + value = props.asc_getCreated(); + value ? $('#settings-sse-date').html(value.toLocaleString()) : $('.display-created-date').remove(); + value = props.asc_getCreator(); + var templateCreator = ""; + value && value.split(/\s*[,;]\s*/).forEach(function(item) { + templateCreator = templateCreator + "
  • " + item + "
  • "; + }); + templateCreator ? $('#list-creator').html(templateCreator) : $('.display-author').remove(); + } + + }, + initRegSettings: function() { var value = Number(Common.localStorage.getItem('sse-settings-regional')); this.getView('Settings').renderRegSettings(value ? value : 0x0409, _regdata); diff --git a/apps/spreadsheeteditor/mobile/app/template/Settings.template b/apps/spreadsheeteditor/mobile/app/template/Settings.template index a82e106f7..3eb255369 100644 --- a/apps/spreadsheeteditor/mobile/app/template/Settings.template +++ b/apps/spreadsheeteditor/mobile/app/template/Settings.template @@ -155,32 +155,122 @@
    -
    <%= scope.textDocTitle %>
    -
    +
    <%= scope.textDocTitle %>
    +
    • -
      <%= scope.textLoading %>
      +
      <%= scope.textLoading %>
    -
    <%= scope.textAuthor %>
    -
    +
    <%= scope.textOwner %>
    +
    • -
      <%= scope.textLoading %>
      +
      <%= scope.textLoading %>
    -
    <%= scope.textCreateDate %>
    -
    +
    <%= scope.textLocation %>
    +
    • -
      <%= scope.textLoading %>
      +
      <%= scope.textLoading %>
      +
      +
    • +
    +
    +
    <%= scope.textUploaded %>
    +
    +
      +
    • +
      +
      <%= scope.textLoading %>
      +
      +
    • +
    +
    +
    <%= scope.textSubject %>
    +
    +
      +
    • +
      +
      <%= scope.textLoading %>
      +
      +
    • +
    +
    +
    <%= scope.textTitle %>
    +
    +
      +
    • +
      +
      <%= scope.textLoading %>
      +
      +
    • +
    +
    +
    <%= scope.textComment %>
    +
    +
      +
    • +
      +
      <%= scope.textLoading %>
      +
      +
    • +
    +
    +
    <%= scope.textLastModified %>
    +
    +
      +
    • +
      +
      <%= scope.textLoading %>
      +
      +
    • +
    +
    +
    <%= scope.textLastModifiedBy %>
    +
    +
      +
    • +
      +
      <%= scope.textLoading %>
      +
      +
    • +
    +
    +
    <%= scope.textCreated %>
    +
    +
      +
    • +
      +
      <%= scope.textLoading %>
      +
      +
    • +
    +
    +
    <%= scope.textApplication %>
    +
    +
      +
    • +
      +
      <%= scope.textLoading %>
      +
      +
    • +
    +
    +
    <%= scope.textAuthor %>
    +
    +
      +
    • +
      +
      <%= scope.textLoading %>
    diff --git a/apps/spreadsheeteditor/mobile/app/view/Settings.js b/apps/spreadsheeteditor/mobile/app/view/Settings.js index 4c8f6a6d3..d64bd089b 100644 --- a/apps/spreadsheeteditor/mobile/app/view/Settings.js +++ b/apps/spreadsheeteditor/mobile/app/view/Settings.js @@ -203,15 +203,6 @@ define([ showDocumentInfo: function() { this.showPage('#settings-info-view'); - - var document = Common.SharedSettings.get('document') || {}, - info = document.info || {}; - - $('#settings-document-title').html(document.title ? document.title : this.unknownText); - $('#settings-document-autor').html(info.author ? info.author : this.unknownText); - $('#settings-document-date').html(info.created ? info.created : this.unknownText); - - Common.Utils.addScrollIfNeed('.page[data-page=settings-info-view]', '.page[data-page=settings-info-view] .page-content'); }, showDownload: function () { @@ -386,7 +377,17 @@ define([ textRegionalSettings: 'Regional Settings', textCommentingDisplay: 'Commenting Display', textDisplayComments: 'Comments', - textDisplayResolvedComments: 'Resolved Comments' + textDisplayResolvedComments: 'Resolved Comments', + textSubject: 'Subject', + textTitle: 'Title', + textComment: 'Comment', + textOwner: 'Owner', + textApplication : 'Application', + textCreated: 'Created', + textLastModified: 'Last Modified', + textLastModifiedBy: 'Last Modified By', + textUploaded: 'Uploaded', + textLocation: 'Location' } })(), SSE.Views.Settings || {})) }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/locale/en.json b/apps/spreadsheeteditor/mobile/locale/en.json index 92984012b..f77ee5d68 100644 --- a/apps/spreadsheeteditor/mobile/locale/en.json +++ b/apps/spreadsheeteditor/mobile/locale/en.json @@ -558,6 +558,16 @@ "SSE.Views.Settings.textCommentingDisplay": "Commenting Display", "SSE.Views.Settings.textDisplayComments": "Comments", "SSE.Views.Settings.textDisplayResolvedComments": "Resolved Comments", + "SSE.Views.Settings.textSubject": "Subject", + "SSE.Views.Settings.textTitle": "Title", + "SSE.Views.Settings.textComment": "Comment", + "SSE.Views.Settings.textOwner": "Owner", + "SSE.Views.Settings.textApplication": "Application", + "SSE.Views.Settings.textCreated": "Created", + "SSE.Views.Settings.textLastModified": "Last Modified", + "SSE.Views.Settings.textLastModifiedBy": "Last Modified By", + "SSE.Views.Settings.textUploaded": "Uploaded", + "SSE.Views.Settings. textLocation": "Location", "SSE.Views.Toolbar.textBack": "Back", "Common.Views.Collaboration.textCollaboration": "Collaboration", "Common.Views.Collaboration.textСomments": "Сomments",