[pe mobile] added color schemes in presentation settings and spellcheck moved to application settings
This commit is contained in:
parent
7f2342feef
commit
9d9afccc11
|
@ -56,7 +56,8 @@ define([
|
|||
inProgress,
|
||||
infoObj,
|
||||
modalView,
|
||||
_licInfo;
|
||||
_licInfo,
|
||||
templateInsert;
|
||||
|
||||
var _slideSizeArr = [
|
||||
[254, 190.5], [254, 143]
|
||||
|
@ -84,6 +85,7 @@ define([
|
|||
this.api = api;
|
||||
|
||||
this.api.asc_registerCallback('asc_onPresentationSize', _.bind(this.onApiPageSize, this));
|
||||
this.api.asc_registerCallback('asc_onSendThemeColorSchemes', _.bind(this.onSendThemeColorSchemes, this));
|
||||
},
|
||||
|
||||
onLaunch: function () {
|
||||
|
@ -158,7 +160,7 @@ define([
|
|||
$('#settings-readermode input:checkbox').single('change', _.bind(me._onReaderMode, me));
|
||||
$('#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));
|
||||
$('#page-settings-setup-view #slide-size-block li').single('click', _.bind(me._onSlideSize, me));
|
||||
$('#settings-print').single('click', _.bind(me._onPrint, me));
|
||||
|
||||
Common.Utils.addScrollIfNeed('.page[data-page=settings-download-view]', '.page[data-page=settings-download-view] .page-content');
|
||||
|
@ -177,6 +179,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 + "<a class='color-schemes-menu item-link no-indicator'><input type='hidden' value='" + index + "'><div class='item-content'><div class='item-inner'><span class='color-schema-block'>";
|
||||
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 + "<span class='color' style='background: " + clr + ";'></span>"
|
||||
}
|
||||
templateInsert = templateInsert + "</span><span class='text'>" + schema.get_name() + "</span></div></div></a>";
|
||||
}, this);
|
||||
},
|
||||
|
||||
onColorSchemaClick: function () {
|
||||
if (this.api) {
|
||||
var ind = $(event.currentTarget).children('input').val();
|
||||
this.api.ChangeColorScheme(ind);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -25,22 +25,6 @@
|
|||
</a>
|
||||
</li>
|
||||
<% } %>
|
||||
<li>
|
||||
<div id="settings-spellcheck" class="item-content">
|
||||
<div class="item-media">
|
||||
<i class="icon icon-spellcheck"></i>
|
||||
</div>
|
||||
<div class="item-inner">
|
||||
<div class="item-title"><%= scope.textSpellcheck %></div>
|
||||
<div class="item-after">
|
||||
<label class="label-switch">
|
||||
<input type="checkbox">
|
||||
<div class="checkbox"></div>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a id="settings-presentation-setup" class="item-link">
|
||||
<div class="item-content">
|
||||
|
@ -48,7 +32,7 @@
|
|||
<i class="icon icon-setup"></i>
|
||||
</div>
|
||||
<div class="item-inner">
|
||||
<div class="item-title"><%= scope.textPresentSetup %></div>
|
||||
<div class="item-title"><%= scope.textPresentSettings %></div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
@ -325,12 +309,13 @@
|
|||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<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"><%= scope.textSlideSize %></div>
|
||||
<div class="center sliding"><%= scope.textPresentSettings %></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page" id="page-settings-setup-view" data-page="settings-setup-view">
|
||||
<div class="page-content">
|
||||
<div class="list-block">
|
||||
<div class="content-block-title"><%= scope.textSlideSize %></div>
|
||||
<div class="list-block" id="slide-size-block">
|
||||
<ul>
|
||||
<li>
|
||||
<label class="label-radio item-content">
|
||||
|
@ -352,6 +337,21 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="list-block media-list">
|
||||
<ul>
|
||||
<li>
|
||||
<a id="color-schemes" class="item-link item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title-row">
|
||||
<div class="item-title"><%= scope.textColorSchemes %></div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -404,6 +404,41 @@
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="list-block">
|
||||
<ul>
|
||||
<div id="settings-spellcheck" class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title"><%= scope.textSpellcheck %></div>
|
||||
<div class="item-after">
|
||||
<label class="label-switch">
|
||||
<input type="checkbox">
|
||||
<div class="checkbox"></div>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Color schemes view -->
|
||||
<div id="color-schemes-view">
|
||||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<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"><%= scope.textColorSchemes %></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pages">
|
||||
<div class="page" data-page="color-schemes-view">
|
||||
<div class="page-content">
|
||||
<div id="color-schemes-content" class="list-block">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -161,6 +161,10 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
showColorSchemes: function () {
|
||||
this.showPage('#color-schemes-view');
|
||||
},
|
||||
|
||||
showInfo: function () {
|
||||
this.showPage('#settings-info-view');
|
||||
|
||||
|
@ -191,6 +195,7 @@ define([
|
|||
|
||||
showSetup: function () {
|
||||
this.showPage('#settings-setup-view');
|
||||
$('#color-schemes').single('click', _.bind(this.showColorSchemes, this));
|
||||
},
|
||||
|
||||
showSetApp: function () {
|
||||
|
@ -214,6 +219,7 @@ define([
|
|||
textDone: 'Done',
|
||||
textEditPresent: 'Edit Presentation',
|
||||
textPresentSetup: 'Presentation Setup',
|
||||
textPresentSettings: 'Presentation Settings',
|
||||
textDownload: 'Download',
|
||||
textPresentInfo: 'Presentation Info',
|
||||
textHelp: 'Help',
|
||||
|
@ -239,7 +245,8 @@ define([
|
|||
textUnitOfMeasurement: 'Unit of Measurement',
|
||||
textCentimeter: 'Centimeter',
|
||||
textPoint: 'Point',
|
||||
textInch: 'Inch'
|
||||
textInch: 'Inch',
|
||||
textColorSchemes: 'Color Schemes'
|
||||
}
|
||||
})(), PE.Views.Settings || {}))
|
||||
});
|
|
@ -470,6 +470,8 @@
|
|||
"PE.Views.Settings.textCentimeter": "Centimeter",
|
||||
"PE.Views.Settings.textPoint": "Point",
|
||||
"PE.Views.Settings.textInch": "Inch",
|
||||
"PE.Views.Settings.textPresentSettings": "Presentation Settings",
|
||||
"PE.Views.Settings.textColorSchemes": "Color Schemes",
|
||||
"PE.Views.Settings.unknownText": "Unknown",
|
||||
"PE.Views.Toolbar.textBack": "Back"
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
.tablet .searchbar.document.replace .center .searchbar:first-child {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
|
|
@ -5838,6 +5838,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;
|
||||
}
|
||||
|
|
|
@ -71,6 +71,7 @@ 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/_search.less');
|
||||
@import url('ios/_icons.less');
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
@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');
|
||||
|
|
Loading…
Reference in a new issue