diff --git a/apps/documenteditor/mobile/app/controller/edit/EditChart.js b/apps/documenteditor/mobile/app/controller/edit/EditChart.js index bd77c5b00..c34531ded 100644 --- a/apps/documenteditor/mobile/app/controller/edit/EditChart.js +++ b/apps/documenteditor/mobile/app/controller/edit/EditChart.js @@ -42,8 +42,11 @@ define([ 'core', - 'documenteditor/mobile/app/view/edit/EditChart' -], function (core) { + 'documenteditor/mobile/app/view/edit/EditChart', + 'jquery', + 'underscore', + 'backbone' +], function (core, view, $, _, Backbone) { 'use strict'; DE.Controllers.EditChart = Backbone.Controller.extend(_.extend((function() { @@ -564,7 +567,7 @@ define([ Common.SharedSettings.set('chartstyles', styles); Common.NotificationCenter.trigger('chartstyles:load', styles); - $('#tab-chart-style .dataview .row div').single('click', _.bind(this.onStyle, this)); + $('#tab-chart-style li').single('click', _.bind(this.onStyle, this)); }, _uiTransformByWrap: function(type) { diff --git a/apps/documenteditor/mobile/app/template/EditChart.template b/apps/documenteditor/mobile/app/template/EditChart.template index a8b27fdbd..c5929f02d 100644 --- a/apps/documenteditor/mobile/app/template/EditChart.template +++ b/apps/documenteditor/mobile/app/template/EditChart.template @@ -317,16 +317,8 @@ <% }); %> -
-
- -
+
+
diff --git a/apps/documenteditor/mobile/app/view/edit/EditChart.js b/apps/documenteditor/mobile/app/view/edit/EditChart.js index c1d646e37..1222535f4 100644 --- a/apps/documenteditor/mobile/app/view/edit/EditChart.js +++ b/apps/documenteditor/mobile/app/view/edit/EditChart.js @@ -178,10 +178,10 @@ define([ }, renderStyles: function() { - var $styleContainer = $('#edit-chart-styles .item-inner'); + var $styleContainer = $('#tab-chart-style'); if ($styleContainer.length > 0) { - var columns = parseInt($styleContainer.width() / 60), // magic + var columns = parseInt($styleContainer.width() / 70), // magic row = -1, styles = []; @@ -194,17 +194,15 @@ define([ }); var template = _.template([ - '
', - '<% _.each(styles, function(row) { %>', - '
', - '<% _.each(row, function(style) { %>', - '
', - '', - '
', - '<% }); %>', - '
', + '<% _.each(styles, function(row) { %>', + '
    ', + '<% _.each(row, function(style) { %>', + '
  • ', + '', + '
  • ', '<% }); %>', - '
' + '', + '<% }); %>' ].join(''), { styles: styles }); diff --git a/apps/documenteditor/mobile/resources/css/app-ios.css b/apps/documenteditor/mobile/resources/css/app-ios.css index 91b5da975..8b9d7e20d 100644 --- a/apps/documenteditor/mobile/resources/css/app-ios.css +++ b/apps/documenteditor/mobile/resources/css/app-ios.css @@ -6619,6 +6619,15 @@ i.icon.icon-wrap-behind { width: 70px; height: 50px; } +.chart-styles .row, +.chart-styles .row li { + margin-bottom: 12px; +} +.chart-styles li, +.chart-styles .row div { + margin: 0; + padding: 1px; +} .shapes li { width: 70px; height: 70px; diff --git a/apps/documenteditor/mobile/resources/css/app-material.css b/apps/documenteditor/mobile/resources/css/app-material.css index f06cb06de..bbf0aca07 100644 --- a/apps/documenteditor/mobile/resources/css/app-material.css +++ b/apps/documenteditor/mobile/resources/css/app-material.css @@ -6182,6 +6182,15 @@ textarea { width: 70px; height: 50px; } +.chart-styles .row, +.chart-styles .row li { + margin-bottom: 12px; +} +.chart-styles li, +.chart-styles .row div { + margin: 0; + padding: 1px; +} .shapes li { width: 70px; height: 70px; diff --git a/apps/documenteditor/mobile/resources/less/app-ios.less b/apps/documenteditor/mobile/resources/less/app-ios.less index 8ed4742b1..c56a266ed 100644 --- a/apps/documenteditor/mobile/resources/less/app-ios.less +++ b/apps/documenteditor/mobile/resources/less/app-ios.less @@ -117,6 +117,22 @@ input, textarea { } } +// Chart styles + +.chart-styles { + .row { + &, li { + margin-bottom: 12px; + } + } + + li, + .row div { + margin: 0; + padding: 1px; + } +} + // Shapes .shapes { diff --git a/apps/documenteditor/mobile/resources/less/app-material.less b/apps/documenteditor/mobile/resources/less/app-material.less index 2d36bdaf9..0a1ee0273 100644 --- a/apps/documenteditor/mobile/resources/less/app-material.less +++ b/apps/documenteditor/mobile/resources/less/app-material.less @@ -110,6 +110,22 @@ input, textarea { } } +// Chart styles + +.chart-styles { + .row { + &, li { + margin-bottom: 12px; + } + } + + li, + .row div { + margin: 0; + padding: 1px; + } +} + // Shapes .shapes {