From bf6f074aed97b1c21537dbf78bc8552f5afe60a1 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Mon, 22 Jul 2019 14:32:38 +0300 Subject: [PATCH] [DE mobile] Added new options into Document Info --- .../mobile/app/controller/Settings.js | 25 ++++++- .../mobile/app/template/Settings.template | 65 +++++++++++++++---- .../mobile/app/view/Settings.js | 7 +- 3 files changed, 82 insertions(+), 15 deletions(-) diff --git a/apps/documenteditor/mobile/app/controller/Settings.js b/apps/documenteditor/mobile/app/controller/Settings.js index fed7658ed..7a98f7512 100644 --- a/apps/documenteditor/mobile/app/controller/Settings.js +++ b/apps/documenteditor/mobile/app/controller/Settings.js @@ -416,8 +416,29 @@ define([ info = document.info || {}; $('#settings-document-title').html(document.title ? document.title : me.unknownText); - $('#settings-document-autor').html(info.author ? info.author : me.unknownText); - $('#settings-document-date').html(info.created ? info.created : me.unknownText); + $('#settings-document-owner').html(info.author ? info.author : me.unknownText); + + var appProps = (this.api) ? this.api.asc_getAppProps() : null; + if (appProps) { + var appName = (appProps.asc_getApplication() || '') + ' ' + (appProps.asc_getAppVersion() || ''); + appName ? $('#settings-doc-application').html(appName) : $('.display-application').remove(); + } + var props = (this.api) ? this.api.asc_getCoreProps() : null, + value; + if (props) { + value = props.asc_getTitle(); + value ? $('#settings-doc-title').html(value) : $('.display-title').remove(); + value = props.asc_getSubject(); + 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_getCreator(); + var templateCreator = ""; + value && value.split(/\s*[,;]\s*/).forEach(function(item) { + templateCreator = templateCreator + "
  • " + item + "
  • "; + }); + templateCreator ? $('#list-creator').html(templateCreator) : $('.display-author').remove(); + } } }, diff --git a/apps/documenteditor/mobile/app/template/Settings.template b/apps/documenteditor/mobile/app/template/Settings.template index a75b245d8..ff5505ebb 100644 --- a/apps/documenteditor/mobile/app/template/Settings.template +++ b/apps/documenteditor/mobile/app/template/Settings.template @@ -302,22 +302,12 @@ -
    <%= scope.textAuthor %>
    +
    <%= scope.textOwner %>
    -
    -
    <%= scope.textCreateDate %>
    -
    - @@ -357,6 +347,57 @@
    + +
    <%= scope.textSubject %>
    +
    + +
    +
    <%= scope.textTitle %>
    +
    + +
    +
    <%= scope.textComment %>
    +
    + +
    +
    <%= scope.textApplication %>
    +
    + +
    +
    <%= scope.textAuthor %>
    +
    + +
    diff --git a/apps/documenteditor/mobile/app/view/Settings.js b/apps/documenteditor/mobile/app/view/Settings.js index cf4e30692..9665fb8bd 100644 --- a/apps/documenteditor/mobile/app/view/Settings.js +++ b/apps/documenteditor/mobile/app/view/Settings.js @@ -289,7 +289,12 @@ define([ textCollaboration: 'Collaboration', textCommentingDisplay: 'Commenting Display', textDisplayComments: 'Comments', - textDisplayResolvedComments: 'Resolved Comments' + textDisplayResolvedComments: 'Resolved Comments', + textSubject: 'Subject', + textTitle: 'Title', + textComment: 'Comment', + textOwner: 'Owner', + textApplication : 'Application' } })(), DE.Views.Settings || {}))