From 7cda33b1571bdd611191503961b6477d1769c908 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 13 Feb 2019 15:21:31 +0300 Subject: [PATCH] [Mobile] FIx Bug 40561 --- apps/documenteditor/mobile/app/controller/Main.js | 2 +- .../documenteditor/mobile/app/controller/Settings.js | 10 ++++++++++ .../mobile/app/template/Settings.template | 12 ++++++++++++ apps/documenteditor/mobile/app/view/Settings.js | 8 ++++++-- apps/documenteditor/mobile/locale/en.json | 1 + apps/documenteditor/mobile/resources/css/app-ios.css | 5 +++++ .../mobile/resources/css/app-material.css | 5 +++++ .../mobile/resources/less/ios/_icons.less | 5 +++++ .../mobile/resources/less/material/_icons.less | 5 +++++ .../presentationeditor/mobile/app/controller/Main.js | 2 +- .../mobile/app/controller/Settings.js | 10 ++++++++++ .../mobile/app/template/Settings.template | 12 ++++++++++++ apps/presentationeditor/mobile/app/view/Settings.js | 8 ++++++-- apps/presentationeditor/mobile/locale/en.json | 1 + .../mobile/resources/css/app-ios.css | 5 +++++ .../mobile/resources/css/app-material.css | 5 +++++ .../mobile/resources/less/ios/_icons.less | 5 +++++ .../mobile/resources/less/material/_icons.less | 5 +++++ apps/spreadsheeteditor/mobile/app/controller/Main.js | 2 +- .../mobile/app/controller/Settings.js | 10 ++++++++++ .../mobile/app/template/Settings.template | 12 ++++++++++++ apps/spreadsheeteditor/mobile/app/view/Settings.js | 8 ++++++-- apps/spreadsheeteditor/mobile/locale/en.json | 1 + .../mobile/resources/css/app-ios.css | 5 +++++ .../mobile/resources/css/app-material.css | 5 +++++ .../mobile/resources/less/ios/_icons.less | 5 +++++ .../mobile/resources/less/material/_icons.less | 5 +++++ 27 files changed, 150 insertions(+), 9 deletions(-) diff --git a/apps/documenteditor/mobile/app/controller/Main.js b/apps/documenteditor/mobile/app/controller/Main.js index e00f6c5a6..67764cd4e 100644 --- a/apps/documenteditor/mobile/app/controller/Main.js +++ b/apps/documenteditor/mobile/app/controller/Main.js @@ -1199,7 +1199,7 @@ define([ if (!this.appOptions.canPrint) return; if (this.api) - this.api.asc_Print(Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event + this.api.asc_Print(); Common.component.Analytics.trackEvent('Print'); }, diff --git a/apps/documenteditor/mobile/app/controller/Settings.js b/apps/documenteditor/mobile/app/controller/Settings.js index cd8e2e989..75fe52c80 100644 --- a/apps/documenteditor/mobile/app/controller/Settings.js +++ b/apps/documenteditor/mobile/app/controller/Settings.js @@ -201,6 +201,7 @@ define([ $('#settings-spellcheck input:checkbox').single('change', _.bind(me.onSpellcheck, me)); $('#settings-help').single('click', _.bind(me.onShowHelp, me)); $('#settings-download').single('click', _.bind(me.onDownloadOrigin, me)); + $('#settings-print').single('click', _.bind(me.onPrint, me)); } }, @@ -344,6 +345,15 @@ define([ me.hideModal(); }, + onPrint: function(e) { + var me = this; + + _.defer(function () { + me.api.asc_Print(); + }); + me.hideModal(); + }, + onFormatChange: function (e) { var me = this, rawValue = $(e.currentTarget).val(), diff --git a/apps/documenteditor/mobile/app/template/Settings.template b/apps/documenteditor/mobile/app/template/Settings.template index 4249bc6f6..cb9a715dc 100644 --- a/apps/documenteditor/mobile/app/template/Settings.template +++ b/apps/documenteditor/mobile/app/template/Settings.template @@ -93,6 +93,18 @@ +
  • + +
    +
    + +
    +
    +
    <%= scope.textPrint %>
    +
    +
    +
    +
  • diff --git a/apps/documenteditor/mobile/app/view/Settings.js b/apps/documenteditor/mobile/app/view/Settings.js index 56b197ef4..f120a87b4 100644 --- a/apps/documenteditor/mobile/app/view/Settings.js +++ b/apps/documenteditor/mobile/app/view/Settings.js @@ -56,7 +56,8 @@ define([ _canDownloadOrigin = false, _canReader = false, _canAbout = true, - _canHelp = true; + _canHelp = true, + _canPrint = false; return { // el: '.view-main', @@ -97,6 +98,7 @@ define([ _canDownload = mode.canDownload; _canDownloadOrigin = mode.canDownloadOrigin; _canReader = !mode.isEdit && mode.canReader; + _canPrint = mode.canPrint; if (mode.customization && mode.canBrandingExt) { _canAbout = (mode.customization.about!==false); @@ -128,6 +130,7 @@ define([ if (!_canDownloadOrigin) $layour.find('#settings-download').hide(); if (!_canAbout) $layour.find('#settings-about').hide(); if (!_canHelp) $layour.find('#settings-help').hide(); + if (!_canPrint) $layour.find('#settings-print').hide(); return $layour.html(); } @@ -257,7 +260,8 @@ define([ textDocumentFormats: 'Document Formats', textOrientation: 'Orientation', textPoweredBy: 'Powered by', - textSpellcheck: 'Spell Checking' + textSpellcheck: 'Spell Checking', + textPrint: 'Print' } })(), DE.Views.Settings || {})) diff --git a/apps/documenteditor/mobile/locale/en.json b/apps/documenteditor/mobile/locale/en.json index 90a1066cd..c7f5bafa2 100644 --- a/apps/documenteditor/mobile/locale/en.json +++ b/apps/documenteditor/mobile/locale/en.json @@ -386,5 +386,6 @@ "DE.Views.Settings.textWords": "Words", "DE.Views.Settings.unknownText": "Unknown", "DE.Views.Settings.textSpellcheck": "Spell Checking", + "DE.Views.Settings.textPrint": "Print", "DE.Views.Toolbar.textBack": "Back" } \ No newline at end of file diff --git a/apps/documenteditor/mobile/resources/css/app-ios.css b/apps/documenteditor/mobile/resources/css/app-ios.css index 492cba929..341d33629 100644 --- a/apps/documenteditor/mobile/resources/css/app-ios.css +++ b/apps/documenteditor/mobile/resources/css/app-ios.css @@ -6351,6 +6351,11 @@ i.icon.icon-download { height: 28px; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20viewBox%3D%220%200%2022%2022%22%20y%3D%220px%22%20x%3D%220px%22%20fill%3D%22%23446995%22%3E%3Cpath%20d%3D%22M12%200H11L11%2014L7.39999%2010.3L6.69999%2011.1L11.5%2016L16.3%2011.1L15.6%2010.3L12%2014L12%200Z%22%2F%3E%3Cpath%20d%3D%22M14%205V6H19V20H4V6H9V5H3V21H20V5H14Z%22%2F%3E%3C%2Fsvg%3E"); } +i.icon.icon-print { + width: 22px; + height: 28px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20viewBox%3D%22-0%200%2022%2022%22%20y%3D%220px%22%20x%3D%220px%22%20fill%3D%22%23446995%22%20%20stroke%3D%22%23446995%22%3E%3Cg%3E%3Cpath%20d%3D%22M5.5%2016.5H1.5V12.5M5.5%2016.5V20.5H16.5V16.5M5.5%2016.5V12.5M16.5%2016.5H20.5V12.5M16.5%2016.5V12.5M5.5%206.5H1.5V12.5M5.5%206.5V1.5H16.5V6.5M5.5%206.5H16.5M16.5%206.5H20.5V12.5M1.5%2012.5H5.5M20.5%2012.5H16.5M5.5%2012.5H16.5M8%2015.5H14M8%2017.5H14%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} i.icon.icon-spellcheck { width: 22px; height: 22px; diff --git a/apps/documenteditor/mobile/resources/css/app-material.css b/apps/documenteditor/mobile/resources/css/app-material.css index c39e482b8..111314452 100644 --- a/apps/documenteditor/mobile/resources/css/app-material.css +++ b/apps/documenteditor/mobile/resources/css/app-material.css @@ -5940,6 +5940,11 @@ i.icon.icon-download { height: 28px; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20viewBox%3D%22-0%200%2022%2022%22%20y%3D%220px%22%20x%3D%220px%22%20fill%3D%22%23446995%22%3E%3Cg%3E%3Cpath%20d%3D%22M12%200H11L11%2014L7.39999%2010.3L6.69999%2011.1L11.5%2016L16.3%2011.1L15.6%2010.3L12%2014L12%200Z%22%2F%3E%3Cpath%20d%3D%22M14%205V6H19V20H4V6H9V5H3V21H20V5H14Z%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); } +i.icon.icon-print { + width: 22px; + height: 28px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20viewBox%3D%220%200%2022%2022%22%20y%3D%220px%22%20x%3D%220px%22%20fill%3D%22%23446995%22%20%20stroke%3D%22%23446995%22%3E%3Cg%3E%3Cpath%20d%3D%22M5.5%2016.5H1.5V12.5M5.5%2016.5V20.5H16.5V16.5M5.5%2016.5V12.5M16.5%2016.5H20.5V12.5M16.5%2016.5V12.5M5.5%206.5H1.5V12.5M5.5%206.5V1.5H16.5V6.5M5.5%206.5H16.5M16.5%206.5H20.5V12.5M1.5%2012.5H5.5M20.5%2012.5H16.5M5.5%2012.5H16.5M8%2015.5H14M8%2017.5H14%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} i.icon.icon-spellcheck { width: 22px; height: 22px; diff --git a/apps/documenteditor/mobile/resources/less/ios/_icons.less b/apps/documenteditor/mobile/resources/less/ios/_icons.less index 9219d3c4d..f2fb0b092 100644 --- a/apps/documenteditor/mobile/resources/less/ios/_icons.less +++ b/apps/documenteditor/mobile/resources/less/ios/_icons.less @@ -40,6 +40,11 @@ i.icon { height: 28px; .encoded-svg-background(''); } + &.icon-print { + width: 22px; + height: 28px; + .encoded-svg-background(''); + } &.icon-spellcheck { width: 22px; height: 22px; diff --git a/apps/documenteditor/mobile/resources/less/material/_icons.less b/apps/documenteditor/mobile/resources/less/material/_icons.less index 3ffe1c059..1b39c29e6 100644 --- a/apps/documenteditor/mobile/resources/less/material/_icons.less +++ b/apps/documenteditor/mobile/resources/less/material/_icons.less @@ -35,6 +35,11 @@ i.icon { height: 28px; .encoded-svg-background(''); } + &.icon-print { + width: 22px; + height: 28px; + .encoded-svg-background(''); + } &.icon-spellcheck { width: 22px; height: 22px; diff --git a/apps/presentationeditor/mobile/app/controller/Main.js b/apps/presentationeditor/mobile/app/controller/Main.js index 822a1bef9..aa82f3511 100644 --- a/apps/presentationeditor/mobile/app/controller/Main.js +++ b/apps/presentationeditor/mobile/app/controller/Main.js @@ -1144,7 +1144,7 @@ define([ if (!this.appOptions.canPrint) return; if (this.api) - this.api.asc_Print(Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event + this.api.asc_Print(); Common.component.Analytics.trackEvent('Print'); }, diff --git a/apps/presentationeditor/mobile/app/controller/Settings.js b/apps/presentationeditor/mobile/app/controller/Settings.js index d5627d20c..53ba46997 100644 --- a/apps/presentationeditor/mobile/app/controller/Settings.js +++ b/apps/presentationeditor/mobile/app/controller/Settings.js @@ -159,6 +159,7 @@ define([ $('#settings-spellcheck input:checkbox').single('change', _.bind(me._onSpellcheck, me)); $(modalView).find('.formats a').single('click', _.bind(me._onSaveFormat, me)); $('#page-settings-setup-view li').single('click', _.bind(me._onSlideSize, me)); + $('#settings-print').single('click', _.bind(me._onPrint, me)); me.initSettings(pageId); }, @@ -235,6 +236,15 @@ define([ this.hideModal(); }, + _onPrint: function(e) { + var me = this; + + _.defer(function () { + me.api.asc_Print(); + }); + me.hideModal(); + }, + _onSpellcheck: function (e) { var $checkbox = $(e.currentTarget), state = $checkbox.is(':checked'); diff --git a/apps/presentationeditor/mobile/app/template/Settings.template b/apps/presentationeditor/mobile/app/template/Settings.template index 0e96b8c2b..462b3f29a 100644 --- a/apps/presentationeditor/mobile/app/template/Settings.template +++ b/apps/presentationeditor/mobile/app/template/Settings.template @@ -65,6 +65,18 @@
  • +
  • + +
    +
    + +
    +
    +
    <%= scope.textPrint %>
    +
    +
    +
    +
  • diff --git a/apps/presentationeditor/mobile/app/view/Settings.js b/apps/presentationeditor/mobile/app/view/Settings.js index 05b18c5a1..5f2d32da8 100644 --- a/apps/presentationeditor/mobile/app/view/Settings.js +++ b/apps/presentationeditor/mobile/app/view/Settings.js @@ -54,7 +54,8 @@ define([ canEdit = false, canDownload = false, canAbout = true, - canHelp = true; + canHelp = true, + canPrint = false; return { // el: '.view-main', @@ -98,6 +99,7 @@ define([ isEdit = mode.isEdit; canEdit = !mode.isEdit && mode.canEdit && mode.canRequestEditRights; canDownload = mode.canDownload || mode.canDownloadOrigin; + canPrint = mode.canPrint; if (mode.customization && mode.canBrandingExt) { canAbout = (mode.customization.about!==false); @@ -126,6 +128,7 @@ define([ if (!canDownload) $layour.find('#settings-download').hide(); if (!canAbout) $layour.find('#settings-about').hide(); if (!canHelp) $layour.find('#settings-help').hide(); + if (!canPrint) $layour.find('#settings-print').hide(); return $layour.html(); } @@ -224,7 +227,8 @@ define([ mniSlideWide: 'Widescreen (16:9)', textPoweredBy: 'Powered by', textFindAndReplace: 'Find and Replace', - textSpellcheck: 'Spell Checking' + textSpellcheck: 'Spell Checking', + textPrint: 'Print' } })(), 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 e2ceb0ec6..c0bc3a00a 100644 --- a/apps/presentationeditor/mobile/locale/en.json +++ b/apps/presentationeditor/mobile/locale/en.json @@ -457,5 +457,6 @@ "PE.Views.Settings.textVersion": "Version", "PE.Views.Settings.unknownText": "Unknown", "PE.Views.Settings.textSpellcheck": "Spell Checking", + "PE.Views.Settings.textPrint": "Print", "PE.Views.Toolbar.textBack": "Back" } \ No newline at end of file diff --git a/apps/presentationeditor/mobile/resources/css/app-ios.css b/apps/presentationeditor/mobile/resources/css/app-ios.css index 75b56b5e3..bd80f428c 100644 --- a/apps/presentationeditor/mobile/resources/css/app-ios.css +++ b/apps/presentationeditor/mobile/resources/css/app-ios.css @@ -6352,6 +6352,11 @@ i.icon.icon-download { height: 28px; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20viewBox%3D%220%200%2022%2022%22%20y%3D%220px%22%20x%3D%220px%22%20fill%3D%22%23aa5252%22%3E%3Cpath%20d%3D%22M12%200H11L11%2014L7.39999%2010.3L6.69999%2011.1L11.5%2016L16.3%2011.1L15.6%2010.3L12%2014L12%200Z%22%2F%3E%3Cpath%20d%3D%22M14%205V6H19V20H4V6H9V5H3V21H20V5H14Z%22%2F%3E%3C%2Fsvg%3E"); } +i.icon.icon-print { + width: 22px; + height: 28px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20viewBox%3D%22-0%200%2022%2022%22%20y%3D%220px%22%20x%3D%220px%22%20fill%3D%22%23aa5252%22%20%20stroke%3D%22%23aa5252%22%3E%3Cg%3E%3Cpath%20d%3D%22M5.5%2016.5H1.5V12.5M5.5%2016.5V20.5H16.5V16.5M5.5%2016.5V12.5M16.5%2016.5H20.5V12.5M16.5%2016.5V12.5M5.5%206.5H1.5V12.5M5.5%206.5V1.5H16.5V6.5M5.5%206.5H16.5M16.5%206.5H20.5V12.5M1.5%2012.5H5.5M20.5%2012.5H16.5M5.5%2012.5H16.5M8%2015.5H14M8%2017.5H14%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} i.icon.icon-spellcheck { width: 22px; height: 22px; diff --git a/apps/presentationeditor/mobile/resources/css/app-material.css b/apps/presentationeditor/mobile/resources/css/app-material.css index 570339b79..fa66d5af4 100644 --- a/apps/presentationeditor/mobile/resources/css/app-material.css +++ b/apps/presentationeditor/mobile/resources/css/app-material.css @@ -5945,6 +5945,11 @@ i.icon.icon-download { height: 28px; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20viewBox%3D%220%200%2022%2022%22%20y%3D%220px%22%20x%3D%220px%22%20fill%3D%22%23aa5252%22%3E%3Cpath%20d%3D%22M12%200H11L11%2014L7.39999%2010.3L6.69999%2011.1L11.5%2016L16.3%2011.1L15.6%2010.3L12%2014L12%200Z%22%2F%3E%3Cpath%20d%3D%22M14%205V6H19V20H4V6H9V5H3V21H20V5H14Z%22%2F%3E%3C%2Fsvg%3E"); } +i.icon.icon-print { + width: 22px; + height: 28px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20viewBox%3D%22-0%200%2022%2022%22%20y%3D%220px%22%20x%3D%220px%22%20fill%3D%22%23aa5252%22%20%20stroke%3D%22%23aa5252%22%3E%3Cg%3E%3Cpath%20d%3D%22M5.5%2016.5H1.5V12.5M5.5%2016.5V20.5H16.5V16.5M5.5%2016.5V12.5M16.5%2016.5H20.5V12.5M16.5%2016.5V12.5M5.5%206.5H1.5V12.5M5.5%206.5V1.5H16.5V6.5M5.5%206.5H16.5M16.5%206.5H20.5V12.5M1.5%2012.5H5.5M20.5%2012.5H16.5M5.5%2012.5H16.5M8%2015.5H14M8%2017.5H14%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} i.icon.icon-spellcheck { width: 22px; height: 22px; diff --git a/apps/presentationeditor/mobile/resources/less/ios/_icons.less b/apps/presentationeditor/mobile/resources/less/ios/_icons.less index a8c33545a..7aa280a16 100644 --- a/apps/presentationeditor/mobile/resources/less/ios/_icons.less +++ b/apps/presentationeditor/mobile/resources/less/ios/_icons.less @@ -45,6 +45,11 @@ i.icon { height: 28px; .encoded-svg-background(''); } + &.icon-print { + width: 22px; + height: 28px; + .encoded-svg-background(''); + } &.icon-spellcheck { width: 22px; height: 22px; diff --git a/apps/presentationeditor/mobile/resources/less/material/_icons.less b/apps/presentationeditor/mobile/resources/less/material/_icons.less index 462374274..48d4acdb1 100644 --- a/apps/presentationeditor/mobile/resources/less/material/_icons.less +++ b/apps/presentationeditor/mobile/resources/less/material/_icons.less @@ -40,6 +40,11 @@ i.icon { height: 28px; .encoded-svg-background(''); } + &.icon-print { + width: 22px; + height: 28px; + .encoded-svg-background(''); + } &.icon-spellcheck { width: 22px; height: 22px; diff --git a/apps/spreadsheeteditor/mobile/app/controller/Main.js b/apps/spreadsheeteditor/mobile/app/controller/Main.js index 484c2ba53..cd21ce1a2 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Main.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Main.js @@ -1319,7 +1319,7 @@ define([ if (!this.appOptions.canPrint) return; if (this.api) - this.api.asc_Print(Common.Utils.isChrome || Common.Utils.isSafari || Common.Utils.isOpera); // if isChrome or isSafari or isOpera == true use asc_onPrintUrl event + this.api.asc_Print(); Common.component.Analytics.trackEvent('Print'); }, diff --git a/apps/spreadsheeteditor/mobile/app/controller/Settings.js b/apps/spreadsheeteditor/mobile/app/controller/Settings.js index 32ad08db5..625a048a7 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Settings.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Settings.js @@ -149,6 +149,7 @@ define([ var me = this; $('#settings-search').single('click', _.bind(me._onSearch, me)); $(modalView).find('.formats a').single('click', _.bind(me._onSaveFormat, me)); + $('#settings-print').single('click', _.bind(me._onPrint, me)); me.initSettings(pageId); }, @@ -209,6 +210,15 @@ define([ this.hideModal(); }, + _onPrint: function(e) { + var me = this; + + _.defer(function () { + me.api.asc_Print(); + }); + me.hideModal(); + }, + _onSaveFormat: function(e) { var me = this, format = $(e.currentTarget).data('format'); diff --git a/apps/spreadsheeteditor/mobile/app/template/Settings.template b/apps/spreadsheeteditor/mobile/app/template/Settings.template index 3151b3e9a..2ceead895 100644 --- a/apps/spreadsheeteditor/mobile/app/template/Settings.template +++ b/apps/spreadsheeteditor/mobile/app/template/Settings.template @@ -37,6 +37,18 @@
  • +
  • + +
    +
    + +
    +
    +
    <%= scope.textPrint %>
    +
    +
    +
    +
  • diff --git a/apps/spreadsheeteditor/mobile/app/view/Settings.js b/apps/spreadsheeteditor/mobile/app/view/Settings.js index cc56f09d4..1c04182a0 100644 --- a/apps/spreadsheeteditor/mobile/app/view/Settings.js +++ b/apps/spreadsheeteditor/mobile/app/view/Settings.js @@ -53,7 +53,8 @@ define([ canEdit = false, canDownload = false, canAbout = true, - canHelp = true; + canHelp = true, + canPrint = false; return { // el: '.view-main', @@ -103,6 +104,7 @@ define([ isEdit = mode.isEdit; canEdit = !mode.isEdit && mode.canEdit && mode.canRequestEditRights; canDownload = mode.canDownload || mode.canDownloadOrigin; + canPrint = mode.canPrint; if (mode.customization && mode.canBrandingExt) { canAbout = (mode.customization.about!==false); @@ -125,6 +127,7 @@ define([ if (!canDownload) $layout.find('#settings-download').hide(); if (!canAbout) $layout.find('#settings-about').hide(); if (!canHelp) $layout.find('#settings-help').hide(); + if (!canPrint) $layout.find('#settings-print').hide(); return $layout.html(); } @@ -213,7 +216,8 @@ define([ textAddress: 'address', textEmail: 'email', textTel: 'tel', - textPoweredBy: 'Powered by' + textPoweredBy: 'Powered by', + textPrint: 'Print' } })(), 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 1cffe0f34..7edf620a0 100644 --- a/apps/spreadsheeteditor/mobile/locale/en.json +++ b/apps/spreadsheeteditor/mobile/locale/en.json @@ -501,5 +501,6 @@ "SSE.Views.Settings.textTel": "tel", "SSE.Views.Settings.textVersion": "Version", "SSE.Views.Settings.unknownText": "Unknown", + "SSE.Views.Settings.textPrint": "Print", "SSE.Views.Toolbar.textBack": "Back" } \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/resources/css/app-ios.css b/apps/spreadsheeteditor/mobile/resources/css/app-ios.css index 6e8be09fd..3784c0146 100644 --- a/apps/spreadsheeteditor/mobile/resources/css/app-ios.css +++ b/apps/spreadsheeteditor/mobile/resources/css/app-ios.css @@ -6274,6 +6274,11 @@ i.icon.icon-download { height: 28px; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20viewBox%3D%220%200%2022%2022%22%20y%3D%220px%22%20x%3D%220px%22%20fill%3D%22%2340865c%22%3E%3Cpath%20d%3D%22M12%200H11L11%2014L7.39999%2010.3L6.69999%2011.1L11.5%2016L16.3%2011.1L15.6%2010.3L12%2014L12%200Z%22%2F%3E%3Cpath%20d%3D%22M14%205V6H19V20H4V6H9V5H3V21H20V5H14Z%22%2F%3E%3C%2Fsvg%3E"); } +i.icon.icon-print { + width: 22px; + height: 28px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20viewBox%3D%22-0%200%2022%2022%22%20y%3D%220px%22%20x%3D%220px%22%20fill%3D%22%2340865c%22%20%20stroke%3D%22%2340865c%22%3E%3Cg%3E%3Cpath%20d%3D%22M5.5%2016.5H1.5V12.5M5.5%2016.5V20.5H16.5V16.5M5.5%2016.5V12.5M16.5%2016.5H20.5V12.5M16.5%2016.5V12.5M5.5%206.5H1.5V12.5M5.5%206.5V1.5H16.5V6.5M5.5%206.5H16.5M16.5%206.5H20.5V12.5M1.5%2012.5H5.5M20.5%2012.5H16.5M5.5%2012.5H16.5M8%2015.5H14M8%2017.5H14%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} i.icon.icon-info { width: 22px; height: 22px; diff --git a/apps/spreadsheeteditor/mobile/resources/css/app-material.css b/apps/spreadsheeteditor/mobile/resources/css/app-material.css index 96d247f5f..956962694 100644 --- a/apps/spreadsheeteditor/mobile/resources/css/app-material.css +++ b/apps/spreadsheeteditor/mobile/resources/css/app-material.css @@ -5950,6 +5950,11 @@ i.icon.icon-download { height: 28px; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20viewBox%3D%220%200%2022%2022%22%20y%3D%220px%22%20x%3D%220px%22%20fill%3D%22%2340865c%22%3E%3Cpath%20d%3D%22M12%200H11L11%2014L7.39999%2010.3L6.69999%2011.1L11.5%2016L16.3%2011.1L15.6%2010.3L12%2014L12%200Z%22%2F%3E%3Cpath%20d%3D%22M14%205V6H19V20H4V6H9V5H3V21H20V5H14Z%22%2F%3E%3C%2Fsvg%3E"); } +i.icon.icon-print { + width: 22px; + height: 28px; + background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20viewBox%3D%22-0%200%2022%2022%22%20y%3D%220px%22%20x%3D%220px%22%20fill%3D%22%2340865c%22%20%20stroke%3D%22%2340865c%22%3E%3Cg%3E%3Cpath%20d%3D%22M5.5%2016.5H1.5V12.5M5.5%2016.5V20.5H16.5V16.5M5.5%2016.5V12.5M16.5%2016.5H20.5V12.5M16.5%2016.5V12.5M5.5%206.5H1.5V12.5M5.5%206.5V1.5H16.5V6.5M5.5%206.5H16.5M16.5%206.5H20.5V12.5M1.5%2012.5H5.5M20.5%2012.5H16.5M5.5%2012.5H16.5M8%2015.5H14M8%2017.5H14%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E"); +} i.icon.icon-info { width: 22px; height: 22px; diff --git a/apps/spreadsheeteditor/mobile/resources/less/ios/_icons.less b/apps/spreadsheeteditor/mobile/resources/less/ios/_icons.less index fe4ebf4d0..e2ea9a856 100644 --- a/apps/spreadsheeteditor/mobile/resources/less/ios/_icons.less +++ b/apps/spreadsheeteditor/mobile/resources/less/ios/_icons.less @@ -35,6 +35,11 @@ i.icon { height: 28px; .encoded-svg-background(''); } + &.icon-print { + width: 22px; + height: 28px; + .encoded-svg-background(''); + } &.icon-info { width: 22px; height: 22px; diff --git a/apps/spreadsheeteditor/mobile/resources/less/material/_icons.less b/apps/spreadsheeteditor/mobile/resources/less/material/_icons.less index 26ec0798e..1cc7fc844 100644 --- a/apps/spreadsheeteditor/mobile/resources/less/material/_icons.less +++ b/apps/spreadsheeteditor/mobile/resources/less/material/_icons.less @@ -35,6 +35,11 @@ i.icon { height: 28px; .encoded-svg-background(''); } + &.icon-print { + width: 22px; + height: 28px; + .encoded-svg-background(''); + } &.icon-info { width: 22px; height: 22px;