[de mobile] transfer color schemes to document settings and transfer spellcheck to application settings
This commit is contained in:
parent
1ae45b6f2a
commit
42667a48bf
|
@ -225,18 +225,18 @@ define([
|
||||||
Common.Utils.addScrollIfNeed('.page[data-page=settings-about-view]', '.page[data-page=settings-about-view] .page-content');
|
Common.Utils.addScrollIfNeed('.page[data-page=settings-about-view]', '.page[data-page=settings-about-view] .page-content');
|
||||||
} else if ('#settings-advanced-view' == pageId) {
|
} else if ('#settings-advanced-view' == pageId) {
|
||||||
me.initPageAdvancedSettings();
|
me.initPageAdvancedSettings();
|
||||||
|
$('#settings-spellcheck input:checkbox').attr('checked', Common.localStorage.getBool("de-mobile-spellcheck", false));
|
||||||
|
$('#settings-spellcheck input:checkbox').single('change', _.bind(me.onSpellcheck, me));
|
||||||
|
$('#settings-orthography').single('click', _.bind(me.onOrthographyCheck, me));
|
||||||
Common.Utils.addScrollIfNeed('.page[data-page=settings-advanced-view]', '.page[data-page=settings-advanced-view] .page-content');
|
Common.Utils.addScrollIfNeed('.page[data-page=settings-advanced-view]', '.page[data-page=settings-advanced-view] .page-content');
|
||||||
} else if ('#color-schemes-view' == pageId) {
|
} else if ('#color-schemes-view' == pageId) {
|
||||||
me.initPageColorSchemes();
|
me.initPageColorSchemes();
|
||||||
Common.Utils.addScrollIfNeed('.page[data-page=color-schemes-view]', '.page[data-page=color-schemes-view] .page-content');
|
Common.Utils.addScrollIfNeed('.page[data-page=color-schemes-view]', '.page[data-page=color-schemes-view] .page-content');
|
||||||
} else {
|
} else {
|
||||||
$('#settings-readermode input:checkbox').attr('checked', Common.SharedSettings.get('readerMode'));
|
$('#settings-readermode input:checkbox').attr('checked', Common.SharedSettings.get('readerMode'));
|
||||||
$('#settings-spellcheck input:checkbox').attr('checked', Common.localStorage.getBool("de-mobile-spellcheck", false));
|
|
||||||
$('#settings-review input:checkbox').attr('checked', _isReviewOnly || Common.localStorage.getBool("de-mobile-track-changes-" + (_fileKey || '')));
|
$('#settings-review input:checkbox').attr('checked', _isReviewOnly || Common.localStorage.getBool("de-mobile-track-changes-" + (_fileKey || '')));
|
||||||
$('#settings-search').single('click', _.bind(me.onSearch, me));
|
$('#settings-search').single('click', _.bind(me.onSearch, me));
|
||||||
$('#settings-readermode input:checkbox').single('change', _.bind(me.onReaderMode, me));
|
$('#settings-readermode input:checkbox').single('change', _.bind(me.onReaderMode, me));
|
||||||
$('#settings-spellcheck input:checkbox').single('change', _.bind(me.onSpellcheck, me));
|
|
||||||
$('#settings-orthography').single('click', _.bind(me.onOrthographyCheck, me));
|
|
||||||
$('#settings-review input:checkbox').single('change', _.bind(me.onTrackChanges, me));
|
$('#settings-review input:checkbox').single('change', _.bind(me.onTrackChanges, me));
|
||||||
$('#settings-help').single('click', _.bind(me.onShowHelp, me));
|
$('#settings-help').single('click', _.bind(me.onShowHelp, me));
|
||||||
$('#settings-download').single('click', _.bind(me.onDownloadOrigin, me));
|
$('#settings-download').single('click', _.bind(me.onDownloadOrigin, me));
|
||||||
|
@ -253,7 +253,7 @@ define([
|
||||||
templateInsert = "";
|
templateInsert = "";
|
||||||
_.each(schemas, function (schema, index) {
|
_.each(schemas, function (schema, index) {
|
||||||
var colors = schema.get_colors();//schema.colors;
|
var colors = schema.get_colors();//schema.colors;
|
||||||
templateInsert = templateInsert + "<a class='color-schemes-menu'><input type='hidden' value='" + index + "'><div class='item-content'><div class='item-inner'><span class='color-schema-block'>";
|
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++) {
|
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());
|
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 class='color' style='background: " + clr + ";'></span>"
|
||||||
|
|
|
@ -41,22 +41,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</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>
|
|
||||||
<% if (orthography) { %>
|
<% if (orthography) { %>
|
||||||
<li>
|
<li>
|
||||||
<a id="settings-orthography" class="item-link no-indicator">
|
<a id="settings-orthography" class="item-link no-indicator">
|
||||||
|
@ -111,18 +95,6 @@
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
|
||||||
<a id="color-schemes" class="item-link" data-page="#color-schemes-view">
|
|
||||||
<div class="item-content">
|
|
||||||
<div class="item-media">
|
|
||||||
<i class="icon icon-doc-setup"></i>
|
|
||||||
</div>
|
|
||||||
<div class="item-inner">
|
|
||||||
<div class="item-title"><%= scope.textColorSchemes %></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
<li>
|
||||||
<a id="settings-download-as" class="item-link" data-page="#settings-download-view">
|
<a id="settings-download-as" class="item-link" data-page="#settings-download-view">
|
||||||
<div class="item-content">
|
<div class="item-content">
|
||||||
|
@ -328,6 +300,19 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="list-block media-list">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a id="color-schemes" class="item-link item-content" data-page="#color-schemes-view">
|
||||||
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -637,6 +622,7 @@
|
||||||
<div class="pages">
|
<div class="pages">
|
||||||
<div class="page" data-page="settings-advanced-view">
|
<div class="page" data-page="settings-advanced-view">
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
|
|
||||||
<div class="content-block-title"><%= scope.textUnitOfMeasurement %></div>
|
<div class="content-block-title"><%= scope.textUnitOfMeasurement %></div>
|
||||||
<div class="list-block">
|
<div class="list-block">
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -670,6 +656,22 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue