[SE mobile] Layout styles of Chart settings.
|
@ -3,7 +3,7 @@
|
||||||
<div class="list-block">
|
<div class="list-block">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<a id="chart-style" class="item-link">
|
<a id="chart-style" class="item-link" data-page="#edit-chart-style">
|
||||||
<div class="item-content">
|
<div class="item-content">
|
||||||
<div class="item-inner">
|
<div class="item-inner">
|
||||||
<div class="item-title">Style</div>
|
<div class="item-title">Style</div>
|
||||||
|
@ -119,4 +119,89 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Styles view -->
|
||||||
|
<div id="edit-chart-style">
|
||||||
|
<div class="navbar">
|
||||||
|
<div class="navbar-inner edit-chart-style" data-page="edit-chart-style">
|
||||||
|
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span><%= scope.textBack %></span><% } %></a></div>
|
||||||
|
<div class="center sliding">Style</div>
|
||||||
|
<div class="right"><% if (phone) { %><a href="#" class="link icon-only close-picker"><i class="icon icon-expand-down"></i></a><% } %></div>
|
||||||
|
<% if (!android) { %>
|
||||||
|
<div class="subnavbar categories">
|
||||||
|
<div class="buttons-row">
|
||||||
|
<a href="#tab-chart-type" class="button tab-link active">Type</a>
|
||||||
|
<a href="#tab-chart-style" class="button tab-link">Style</a>
|
||||||
|
<a href="#tab-chart-fill" class="button tab-link">Fill</a>
|
||||||
|
<a href="#tab-chart-border" class="button tab-link">Border</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% } %>
|
||||||
|
</div>
|
||||||
|
<% if (android) { %>
|
||||||
|
<div class="subnavbar categories" style="padding: 0;">
|
||||||
|
<div class="toolbar tabbar" style="top: 0;">
|
||||||
|
<div data-page="index" class="toolbar-inner">
|
||||||
|
<a href="#tab-chart-type" class="tab-link active">Type</a>
|
||||||
|
<a href="#tab-chart-style" class="tab-link">Style</a>
|
||||||
|
<a href="#tab-chart-fill" class="tab-link">Fill</a>
|
||||||
|
<a href="#tab-chart-border" class="tab-link">Border</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% } %>
|
||||||
|
</div>
|
||||||
|
<div class="page with-subnavbar" data-page="edit-chart-style">
|
||||||
|
<div class="tabs-animated-wrap">
|
||||||
|
<div class="tabs">
|
||||||
|
<div id="tab-chart-type" class="page-content tab dataview chart-types active">
|
||||||
|
<% _.each(types, function(row) { %>
|
||||||
|
<ul class="row">
|
||||||
|
<% _.each(row, function(type) { %>
|
||||||
|
<li data-type="<%= type.type %>">
|
||||||
|
<div class="thumb" style="background-image:url('../mobile/resources/img/charts/<%= type.thumb %>')"></div>
|
||||||
|
</li>
|
||||||
|
<% }); %>
|
||||||
|
</ul>
|
||||||
|
<% }); %>
|
||||||
|
</div>
|
||||||
|
<div id="tab-chart-style" class="page-content tab dataview chart-styles">
|
||||||
|
<!--Style-->
|
||||||
|
</div>
|
||||||
|
<div id="tab-chart-fill" class="page-content tab">
|
||||||
|
<!--Fill-->
|
||||||
|
</div>
|
||||||
|
<div id="tab-chart-border" class="page-content tab">
|
||||||
|
<div class="list-block">
|
||||||
|
<ul>
|
||||||
|
<li id="edit-chart-bordersize">
|
||||||
|
<div style="padding: 15px 0 0 15px;">Size</div>
|
||||||
|
<div class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-input">
|
||||||
|
<div class="range-slider">
|
||||||
|
<input type="range" min="0" max="7" value="0" step="1">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="item-after value">0 pt</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a id="edit-chart-bordercolor" class="item-link">
|
||||||
|
<div class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title">Color</div>
|
||||||
|
<div class="item-after"><div class="color-preview"></div></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -51,7 +51,36 @@ define([
|
||||||
|
|
||||||
SSE.Views.EditChart = Backbone.View.extend(_.extend((function() {
|
SSE.Views.EditChart = Backbone.View.extend(_.extend((function() {
|
||||||
// private
|
// private
|
||||||
var _editTextController;
|
var _editTextController,
|
||||||
|
_styles = [],
|
||||||
|
_types = [
|
||||||
|
{ type: Asc.c_oAscChartTypeSettings.barNormal, thumb: 'chart-03.png'},
|
||||||
|
{ type: Asc.c_oAscChartTypeSettings.barStacked, thumb: 'chart-02.png'},
|
||||||
|
{ type: Asc.c_oAscChartTypeSettings.barStackedPer, thumb: 'chart-01.png'},
|
||||||
|
{ type: Asc.c_oAscChartTypeSettings.lineNormal, thumb: 'chart-06.png'},
|
||||||
|
{ type: Asc.c_oAscChartTypeSettings.lineStacked, thumb: 'chart-05.png'},
|
||||||
|
{ type: Asc.c_oAscChartTypeSettings.lineStackedPer, thumb: 'chart-04.png'},
|
||||||
|
{ type: Asc.c_oAscChartTypeSettings.hBarNormal, thumb: 'chart-09.png'},
|
||||||
|
{ type: Asc.c_oAscChartTypeSettings.hBarStacked, thumb: 'chart-08.png'},
|
||||||
|
{ type: Asc.c_oAscChartTypeSettings.hBarStackedPer, thumb: 'chart-07.png'},
|
||||||
|
{ type: Asc.c_oAscChartTypeSettings.areaNormal, thumb: 'chart-12.png'},
|
||||||
|
{ type: Asc.c_oAscChartTypeSettings.areaStacked, thumb: 'chart-11.png'},
|
||||||
|
{ type: Asc.c_oAscChartTypeSettings.areaStackedPer, thumb: 'chart-10.png'},
|
||||||
|
{ type: Asc.c_oAscChartTypeSettings.pie, thumb: 'chart-13.png'},
|
||||||
|
{ type: Asc.c_oAscChartTypeSettings.doughnut, thumb: 'chart-14.png'},
|
||||||
|
{ type: Asc.c_oAscChartTypeSettings.pie3d, thumb: 'chart-22.png'},
|
||||||
|
{ type: Asc.c_oAscChartTypeSettings.scatter, thumb: 'chart-15.png'},
|
||||||
|
{ type: Asc.c_oAscChartTypeSettings.stock, thumb: 'chart-16.png'},
|
||||||
|
{ type: Asc.c_oAscChartTypeSettings.line3d, thumb: 'chart-21.png'},
|
||||||
|
{ type: Asc.c_oAscChartTypeSettings.barNormal3d, thumb: 'chart-17.png'},
|
||||||
|
{ type: Asc.c_oAscChartTypeSettings.barStacked3d, thumb: 'chart-18.png'},
|
||||||
|
{ type: Asc.c_oAscChartTypeSettings.barStackedPer3d, thumb: 'chart-19.png'},
|
||||||
|
{ type: Asc.c_oAscChartTypeSettings.hBarNormal3d, thumb: 'chart-25.png'},
|
||||||
|
{ type: Asc.c_oAscChartTypeSettings.hBarStacked3d, thumb: 'chart-24.png'},
|
||||||
|
{ type: Asc.c_oAscChartTypeSettings.hBarStackedPer3d, thumb: 'chart-23.png'},
|
||||||
|
{ type: Asc.c_oAscChartTypeSettings.barNormal3dPerspective, thumb: 'chart-20.png'}
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
// el: '.view-main',
|
// el: '.view-main',
|
||||||
|
@ -77,9 +106,15 @@ define([
|
||||||
|
|
||||||
// Render layout
|
// Render layout
|
||||||
render: function () {
|
render: function () {
|
||||||
|
var elementsInRow = 3;
|
||||||
|
var groupsOfTypes = _.chain(_types).groupBy(function(element, index){
|
||||||
|
return Math.floor(index/elementsInRow);
|
||||||
|
}).toArray().value();
|
||||||
|
|
||||||
this.layout = $('<div/>').append(this.template({
|
this.layout = $('<div/>').append(this.template({
|
||||||
android : Common.SharedSettings.get('android'),
|
android : Common.SharedSettings.get('android'),
|
||||||
phone : Common.SharedSettings.get('phone'),
|
phone : Common.SharedSettings.get('phone'),
|
||||||
|
types : groupsOfTypes,
|
||||||
scope : this
|
scope : this
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -136,6 +171,9 @@ define([
|
||||||
|
|
||||||
updateItemHandlers: function () {
|
updateItemHandlers: function () {
|
||||||
$('.container-edit a.item-link[data-page]').single('click', _.bind(this.onItemClick, this));
|
$('.container-edit a.item-link[data-page]').single('click', _.bind(this.onItemClick, this));
|
||||||
|
$('.subnavbar.categories a').single('click', function () {
|
||||||
|
$('.page[data-page=edit-chart-style]').find('.list-block.inputs-list').removeClass('inputs-list');
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
showPage: function (templateId, suspendEvent) {
|
showPage: function (templateId, suspendEvent) {
|
||||||
|
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 4 KiB After Width: | Height: | Size: 4 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
@ -2,7 +2,7 @@
|
||||||
@import url('../../../../../vendor/framework7/src/less/ios/_colors-vars.less');
|
@import url('../../../../../vendor/framework7/src/less/ios/_colors-vars.less');
|
||||||
|
|
||||||
// Colors
|
// Colors
|
||||||
@themeColor: #8ca946; // (140,169,70)
|
@themeColor: #4F9E4F; // (79,158,79)
|
||||||
|
|
||||||
@appToolbarHeight: @toolbarSize;
|
@appToolbarHeight: @toolbarSize;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
@import url('../../../../../vendor/framework7/src/less/material/_colors-vars.less');
|
@import url('../../../../../vendor/framework7/src/less/material/_colors-vars.less');
|
||||||
|
|
||||||
// Colors
|
// Colors
|
||||||
@themeColor: #8ca946; // (140,169,70)
|
@themeColor: #4F9E4F; // (79,158,79)
|
||||||
@navBarIconColor: #fff;
|
@navBarIconColor: #fff;
|
||||||
|
|
||||||
@appToolbarHeight: @navbarSize;
|
@appToolbarHeight: @navbarSize;
|
||||||
|
|