[DE] Preparing check of orthography
This commit is contained in:
parent
0b69912592
commit
0038b71370
|
@ -66,6 +66,11 @@ define([
|
|||
(/MSIE 10/.test(ua) && /; Touch/.test(ua)));
|
||||
}
|
||||
|
||||
function isSailfish() {
|
||||
var ua = navigator.userAgent;
|
||||
return /Sailfish/.test(ua) || /Jolla/.test(ua);
|
||||
}
|
||||
|
||||
return {
|
||||
// Specifying a EditorController model
|
||||
models: [],
|
||||
|
@ -95,6 +100,7 @@ define([
|
|||
|
||||
Common.SharedSettings.set('android', Framework7.prototype.device.android);
|
||||
Common.SharedSettings.set('phone', phone);
|
||||
Common.SharedSettings.set('sailfish', isSailfish());
|
||||
|
||||
$('html').addClass(phone ? 'phone' : 'tablet');
|
||||
|
||||
|
|
|
@ -223,6 +223,7 @@ define([
|
|||
$('#settings-search').single('click', _.bind(me.onSearch, 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-help').single('click', _.bind(me.onShowHelp, me));
|
||||
$('#settings-download').single('click', _.bind(me.onDownloadOrigin, me));
|
||||
|
@ -372,6 +373,12 @@ define([
|
|||
this.api && this.api.asc_setSpellCheck(state);
|
||||
},
|
||||
|
||||
onOrthographyCheck: function (e) {
|
||||
this.hideModal();
|
||||
|
||||
// TODO: Do check of orthography
|
||||
},
|
||||
|
||||
onTrackChanges: function(e) {
|
||||
var $checkbox = $(e.currentTarget),
|
||||
state = $checkbox.is(':checked');
|
||||
|
|
|
@ -57,6 +57,20 @@
|
|||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<% if (orthography) { %>
|
||||
<li>
|
||||
<a id="settings-orthography" class="item-link no-indicator">
|
||||
<div class="item-content">
|
||||
<div class="item-media">
|
||||
<i class="icon icon-spellcheck"></i>
|
||||
</div>
|
||||
<div class="item-inner">
|
||||
<div class="item-title">Проверка правописания</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<% } %>
|
||||
<li>
|
||||
<div id="settings-review" class="item-content">
|
||||
<div class="item-media">
|
||||
|
|
|
@ -88,6 +88,7 @@ define([
|
|||
this.layout = $('<div/>').append(this.template({
|
||||
android : Common.SharedSettings.get('android'),
|
||||
phone : Common.SharedSettings.get('phone'),
|
||||
orthography: Common.SharedSettings.get('sailfish'),
|
||||
scope : this
|
||||
}));
|
||||
|
||||
|
@ -123,6 +124,7 @@ define([
|
|||
} else {
|
||||
$layour.find('#settings-document').hide();
|
||||
$layour.find('#settings-spellcheck').hide();
|
||||
$layour.find('#settings-orthography').hide();
|
||||
}
|
||||
if (!_canReader)
|
||||
$layour.find('#settings-readermode').hide();
|
||||
|
|
Loading…
Reference in a new issue