diff --git a/apps/spreadsheeteditor/mobile/app/controller/Settings.js b/apps/spreadsheeteditor/mobile/app/controller/Settings.js index 10a0f72d9..058b99a28 100644 --- a/apps/spreadsheeteditor/mobile/app/controller/Settings.js +++ b/apps/spreadsheeteditor/mobile/app/controller/Settings.js @@ -52,7 +52,8 @@ define([ inProgress, infoObj, modalView, - _licInfo; + _licInfo, + templateInsert; return { models: [], @@ -78,6 +79,7 @@ define([ setApi: function (api) { var me = this; me.api = api; + me.api.asc_registerCallback('asc_onSendThemeColorSchemes', _.bind(me.onSendThemeColorSchemes, me)); }, onLaunch: function () { @@ -160,6 +162,33 @@ define([ me.setLicInfo(_licInfo); } else if ('#settings-application-view' == pageId) { me.initPageApplicationSettings(); + } else if ('#color-schemes-view' == pageId) { + me.initPageColorSchemes(); + } + }, + + initPageColorSchemes: function() { + $('#color-schemes-content').html(templateInsert); + $('.color-schemes-menu').on('click', _.bind(this.onColorSchemaClick, this)); + }, + + onSendThemeColorSchemes: function (schemas) { + templateInsert = ""; + _.each(schemas, function (schema, index) { + var colors = schema.get_colors();//schema.colors; + templateInsert = templateInsert + "
"; + for (var j = 2; j < 7; j++) { + var clr = '#' + Common.Utils.ThemeColor.getHexColor(colors[j].get_r(), colors[j].get_g(), colors[j].get_b()); + templateInsert = templateInsert + "" + } + templateInsert = templateInsert + "" + schema.get_name() + "
"; + }, this); + }, + + onColorSchemaClick: function(event) { + if (this.api) { + var ind = $(event.currentTarget).children('input').val(); + this.api.asc_ChangeColorScheme(ind); } }, diff --git a/apps/spreadsheeteditor/mobile/app/template/Settings.template b/apps/spreadsheeteditor/mobile/app/template/Settings.template index bc36e9f8e..301c15201 100644 --- a/apps/spreadsheeteditor/mobile/app/template/Settings.template +++ b/apps/spreadsheeteditor/mobile/app/template/Settings.template @@ -49,6 +49,18 @@ +
  • + +
    +
    + +
    +
    +
    <%= scope.textSpreadsheetSettings %>
    +
    +
    +
    +
  • @@ -394,4 +406,52 @@
    + + +
    + + +
    + + +
    + +
    +
    +
    +
    + +
    + +
    +
    +
    \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/app/view/Settings.js b/apps/spreadsheeteditor/mobile/app/view/Settings.js index 35de971fe..ee9cf3606 100644 --- a/apps/spreadsheeteditor/mobile/app/view/Settings.js +++ b/apps/spreadsheeteditor/mobile/app/view/Settings.js @@ -80,6 +80,7 @@ define([ $('#settings-help').single('click', _.bind(me.showHelp, me)); $('#settings-about').single('click', _.bind(me.showAbout, me)); $('#settings-application').single('click', _.bind(me.showSetApp, me)); + $('#settings-spreadsheet').single('click', _.bind(me.showSetSpreadsheet, me)); Common.Utils.addScrollIfNeed('.view[data-page=settings-root-view] .pages', '.view[data-page=settings-root-view] .page'); me.initControls(); @@ -167,6 +168,15 @@ define([ this.showPage('#settings-application-view'); }, + showColorSchemes: function () { + this.showPage('#color-schemes-view'); + }, + + showSetSpreadsheet: function () { + this.showPage('#settings-spreadsheet-view'); + $('#color-schemes').single('click', _.bind(this.showColorSchemes, this)); + }, + showDocumentInfo: function() { this.showPage('#settings-info-view'); @@ -235,7 +245,9 @@ define([ textUnitOfMeasurement: 'Unit of Measurement', textCentimeter: 'Centimeter', textPoint: 'Point', - textInch: 'Inch' + textInch: 'Inch', + textSpreadsheetSettings: 'Spreadsheet Settings', + textColorSchemes: 'Color Schemes' } })(), 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 7656c8304..993c4f851 100644 --- a/apps/spreadsheeteditor/mobile/locale/en.json +++ b/apps/spreadsheeteditor/mobile/locale/en.json @@ -512,11 +512,13 @@ "SSE.Views.Settings.textSettings": "Settings", "SSE.Views.Settings.textTel": "tel", "SSE.Views.Settings.textVersion": "Version", - "DE.Views.Settings.textApplicationSettings": "Application Settings", - "DE.Views.Settings.textUnitOfMeasurement": "Unit of Measurement", - "DE.Views.Settings.textCentimeter": "Centimeter", - "DE.Views.Settings.textPoint": "Point", - "DE.Views.Settings.textInch": "Inch", + "SSE.Views.Settings.textApplicationSettings": "Application Settings", + "SSE.Views.Settings.textUnitOfMeasurement": "Unit of Measurement", + "SSE.Views.Settings.textCentimeter": "Centimeter", + "SSE.Views.Settings.textPoint": "Point", + "SSE.Views.Settings.textInch": "Inch", + "SSE.Views.Settings.textColorSchemes": "Color Schemes", + "SSE.Views.Settings.textSpreadsheetSettings": "Spreadsheet Settings", "SSE.Views.Settings.unknownText": "Unknown", "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 26d61f96e..8b212bfe8 100644 --- a/apps/spreadsheeteditor/mobile/resources/css/app-ios.css +++ b/apps/spreadsheeteditor/mobile/resources/css/app-ios.css @@ -6239,6 +6239,31 @@ html.pixel-ratio-3 .document-menu .list-block li:last-child li .item-inner:after background: url('../../../../common/mobile/resources/img/about/logo.svg') no-repeat center; margin-top: 20px; } +.color-schemes-menu { + cursor: pointer; + display: block; + background-color: #fff; +} +.color-schemes-menu .item-content { + padding-left: 0; +} +.color-schemes-menu .item-inner { + justify-content: flex-start; + padding-left: 16px; +} +.color-schemes-menu .color-schema-block { + display: flex; +} +.color-schemes-menu .color { + min-width: 26px; + min-height: 26px; + margin: 0 2px 0 0; + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15) inset; +} +.color-schemes-menu .text { + margin-left: 20px; + color: #212121; +} i.icon.icon-search { width: 24px; height: 24px; diff --git a/apps/spreadsheeteditor/mobile/resources/css/app-material.css b/apps/spreadsheeteditor/mobile/resources/css/app-material.css index 6ca2422bd..c62e83d46 100644 --- a/apps/spreadsheeteditor/mobile/resources/css/app-material.css +++ b/apps/spreadsheeteditor/mobile/resources/css/app-material.css @@ -5848,6 +5848,31 @@ html.phone .document-menu .list-block .item-link { .about .logo { background: url('../../../../common/mobile/resources/img/about/logo.svg') no-repeat center; } +.color-schemes-menu { + cursor: pointer; + display: block; + background-color: #fff; +} +.color-schemes-menu .item-content { + padding-left: 0; +} +.color-schemes-menu .item-inner { + justify-content: flex-start; + padding-left: 16px; +} +.color-schemes-menu .color-schema-block { + display: flex; +} +.color-schemes-menu .color { + min-width: 26px; + min-height: 26px; + margin: 0 2px 0 0; + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15) inset; +} +.color-schemes-menu .text { + margin-left: 20px; + color: #212121; +} .tablet .searchbar.document.replace .center > .replace { display: flex; } diff --git a/apps/spreadsheeteditor/mobile/resources/less/app-ios.less b/apps/spreadsheeteditor/mobile/resources/less/app-ios.less index 82301d8b0..2d43c3aab 100644 --- a/apps/spreadsheeteditor/mobile/resources/less/app-ios.less +++ b/apps/spreadsheeteditor/mobile/resources/less/app-ios.less @@ -73,6 +73,8 @@ input, textarea { @import url('../../../../common/mobile/resources/less/ios/_contextmenu.less'); @import url('../../../../common/mobile/resources/less/ios/_color-palette.less'); @import url('../../../../common/mobile/resources/less/ios/_about.less'); +@import url('../../../../common/mobile/resources/less/ios/_color-schema.less'); + @import url('ios/_icons.less'); @import url('app-common'); diff --git a/apps/spreadsheeteditor/mobile/resources/less/app-material.less b/apps/spreadsheeteditor/mobile/resources/less/app-material.less index 251d35960..33b93927d 100644 --- a/apps/spreadsheeteditor/mobile/resources/less/app-material.less +++ b/apps/spreadsheeteditor/mobile/resources/less/app-material.less @@ -66,6 +66,7 @@ input, textarea { @import url('../../../../common/mobile/resources/less/material/_contextmenu.less'); @import url('../../../../common/mobile/resources/less/material/_color-palette.less'); @import url('../../../../common/mobile/resources/less/material/_about.less'); +@import url('../../../../common/mobile/resources/less/material/_color-schema.less'); @import url('material/_search.less'); @import url('material/_icons.less');