Commit 90da47ad authored by Alexander Yuzhin's avatar Alexander Yuzhin

[DE mobile] Localization Search and Settings.

parent bd4da87e
......@@ -50,7 +50,7 @@ define([
], function (core, $, _, Backbone) {
'use strict';
DE.Controllers.Search = Backbone.Controller.extend((function() {
DE.Controllers.Search = Backbone.Controller.extend(_.extend((function() {
// private
var _isShow = false,
......@@ -305,7 +305,7 @@ define([
// API handlers
textNoTextFound : 'Text not found',
textNoTextFound : 'Text not found'
}
})());
})(), DE.Controllers.Search || {}))
});
\ No newline at end of file
......@@ -47,7 +47,7 @@ define([
], function (core) {
'use strict';
DE.Controllers.Settings = Backbone.Controller.extend((function() {
DE.Controllers.Settings = Backbone.Controller.extend(_.extend((function() {
// private
var rootView,
inProgress,
......@@ -92,12 +92,6 @@ define([
},
initEvents: function () {
// $('#font-bold').single('click', _.bind(me.onBold, me));
// $('#font-italic').single('click', _.bind(me.onItalic, me));
// $('#font-underline').single('click', _.bind(me.onUnderline, me));
// $('#font-strikethrough').single('click', _.bind(me.onStrikethrough, me));
},
rootView : function() {
......@@ -272,5 +266,5 @@ define([
notcriticalErrorTitle : 'Warning',
warnDownloadAs : 'If you continue saving in this format all features except the text will be lost.<br>Are you sure you want to continue?'
}
})());
});
})(), DE.Controllers.Settings || {}))
});
\ No newline at end of file
......@@ -24,11 +24,11 @@
<a href="#" class="link icon-only next disabled"><i class="icon icon-next"></i></a>
</p>
<p class="buttons-row replace">
<a href="#" class="link replace disabled">Replace</a>
<a href="#" class="link replace disabled"><%= scope.textReplace %></a>
</p>
<% } else { %>
<p class="buttons-row">
<a href="#" class="link replace disabled">Replace</a>
<a href="#" class="link replace disabled"><%= scope.textReplace %></a>
<a href="#" class="link icon-only prev disabled"><i class="icon icon-prev"></i></a>
<a href="#" class="link icon-only next disabled"><i class="icon icon-next"></i></a>
</p>
......@@ -42,8 +42,8 @@
<div id="search-settings-view">
<div class="navbar">
<div class="navbar-inner">
<div class="center sliding"><% if (isEdit) { %>Find and Replace<% } else { %>Find<% } %></div>
<div class="right"><% if (phone) { %><a href="#" class="link close-popup"><b>Done</b></a><% } %></div>
<div class="center sliding"><%= isEdit ? scope.textFindAndReplace : scope.textFind %></div>
<div class="right"><% if (phone) { %><a href="#" class="link close-popup"><b><%= scope.textDone %></b></a><% } %></div>
</div>
</div>
<div class="page" data-page="search-settings">
......@@ -56,7 +56,7 @@
<input type="radio" name="search-type" value="search">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title">Find</div>
<div class="item-title"><%= scope.textFind %></div>
</div>
</label>
</li>
......@@ -65,7 +65,7 @@
<input type="radio" name="search-type" value="replace">
<% if (android) { %><div class="item-media"><i class="icon icon-form-radio"></i></div><% } %>
<div class="item-inner">
<div class="item-title">Find and Replace</div>
<div class="item-title"><%= scope.textFindAndReplace %></div>
</div>
</label>
</li>
......@@ -77,7 +77,7 @@
<li>
<div id="search-case-sensitive" class="item-content">
<div class="item-inner">
<div class="item-title">Case sensitive</div>
<div class="item-title"><%= scope.textCase %></div>
<div class="item-after">
<label class="label-switch">
<input type="checkbox">
......@@ -90,7 +90,7 @@
<li>
<div id="search-highlight-results" class="item-content">
<div class="item-inner">
<div class="item-title">Highlight results</div>
<div class="item-title"><%= scope.textHighlight %></div>
<div class="item-after">
<label class="label-switch">
<input type="checkbox">
......
......@@ -67,14 +67,7 @@ define([
// Render layout
render: function() {
var el = $(this.el);
el.append(this.template({
//
}));
// this.f7View = uiApp.addView('.view-main', {
// // params
// });
el.append(this.template({}));
return this;
},
......
......@@ -48,7 +48,7 @@ define([
], function (searchTemplate, $, _, Backbone) {
'use strict';
DE.Views.Search = Backbone.View.extend((function() {
DE.Views.Search = Backbone.View.extend(_.extend((function() {
// private
var _isEdit = false,
_layout;
......@@ -76,7 +76,8 @@ define([
_layout = $('<div/>').append(this.template({
android : Common.SharedSettings.get('android'),
phone : Common.SharedSettings.get('phone'),
isEdit : _isEdit
isEdit : _isEdit,
scope : this
}));
return this;
......@@ -183,7 +184,14 @@ define([
uiApp.hideNavbar(searchBar);
}, 10);
}
}
},
textFind: 'Find',
textFindAndReplace: 'Find and Replace',
textDone: 'Done',
textReplace: 'Replace',
textCase: 'Case sensitive',
textHighlight: 'Highlight results'
}
})());
})(), DE.Views.Search || {}))
});
\ No newline at end of file
......@@ -48,7 +48,7 @@ define([
], function (settingsTemplate, $, _, Backbone) {
'use strict';
DE.Views.Settings = Backbone.View.extend((function() {
DE.Views.Settings = Backbone.View.extend(_.extend((function() {
// private
var isEdit;
......@@ -83,7 +83,8 @@ define([
render: function() {
this.layout = $('<div/>').append(this.template({
android : Common.SharedSettings.get('android'),
phone : Common.SharedSettings.get('phone')
phone : Common.SharedSettings.get('phone'),
scope : this
}));
return this;
......@@ -95,14 +96,13 @@ define([
rootLayout: function () {
if (this.layout) {
var $layour = this.layout
.find('#settings-root-view');
var isPhone = Common.SharedSettings.get('phone');
var $layour = this.layout.find('#settings-root-view'),
isPhone = Common.SharedSettings.get('phone');
if (isEdit) {
$layour.find('#settings-edit-document').hide();
$layour.find('#settings-readermode').hide();
$layour.find('#settings-search .item-title').text('Find and Replace')
$layour.find('#settings-search .item-title').text(this.textFindAndReplace)
} else {
$layour.find('#settings-readermode input:checkbox')
.attr('checked', Common.SharedSettings.get('readerMode'))
......@@ -183,7 +183,34 @@ define([
}
},
unknownText: 'Unknown'
}
})());
});
unknownText: 'Unknown',
textFindAndReplace: 'Find and Replace',
textSettings: 'Settings',
textDone: 'Done',
textFind: 'Find',
textEditDoc: 'Edit Document',
textReader: 'Reader Mode',
textDownload: 'Download',
textDocInfo: 'Document Info',
textHelp: 'Help',
textAbout: 'About',
textBack: 'Back',
textDocTitle: 'Document title',
textLoading: 'Loading...',
textAuthor: 'Author',
textCreateDate: 'Create date',
textStatistic: 'Statistic',
textPages: 'Pages',
textParagraphs: 'Paragraphs',
textWords: 'Words',
textSymbols: 'Symbols',
textSpaces: 'Spaces',
textDownloadAs: 'Download As...',
textVersion: 'Version',
textAddress: 'address',
textEmail: 'email',
textTel: 'tel'
}
})(), DE.Views.Settings || {}))
});
\ No newline at end of file
......@@ -83,11 +83,51 @@
"DE.Controllers.Main.advDRMOptions": "Protected File",
"DE.Controllers.Main.advDRMEnterPassword": "You password please:",
"DE.Controllers.Main.advDRMPassword": "Password",
"DE.Controllers.DocumentHolder.menuCut": "Cut",
"DE.Controllers.DocumentHolder.menuCopy": "Copy",
"DE.Controllers.DocumentHolder.menuPaste": "Paste",
"DE.Controllers.DocumentHolder.menuEdit": "Edit",
"DE.Controllers.DocumentHolder.menuDelete": "Delete",
"DE.Controllers.DocumentHolder.menuAddLink": "Add Link",
"DE.Controllers.DocumentHolder.menuOpenLink": "Open Link"
"DE.Controllers.DocumentHolder.menuOpenLink": "Open Link",
"DE.Controllers.Search.textNoTextFound": "Text not Found",
"DE.Views.Search.textFind": "Find",
"DE.Views.Search.textFindAndReplace": "Find and Replace",
"DE.Views.Search.textDone": "Done",
"DE.Views.Search.textReplace": "Replace",
"DE.Views.Search.textCase": "Case sensitive",
"DE.Views.Search.textHighlight": "Highlight results",
"DE.Controllers.Settings.txtLoading": "Loading...",
"DE.Controllers.Settings.notcriticalErrorTitle": "Warning",
"DE.Controllers.Settings.warnDownloadAs": "If you continue saving in this format all features except the text will be lost.<br>Are you sure you want to continue?",
"DE.Views.Settings.unknownText": "Unknown",
"DE.Views.Settings.textFindAndReplace": "Find and Replace",
"DE.Views.Settings.textSettings": "Settings",
"DE.Views.Settings.textDone": "Done",
"DE.Views.Settings.textFind": "Find",
"DE.Views.Settings.textEditDoc": "Edit Document",
"DE.Views.Settings.textReader": "Reader Mode",
"DE.Views.Settings.textDownload": "Download",
"DE.Views.Settings.textDocInfo": "Document Info",
"DE.Views.Settings.textHelp": "Help",
"DE.Views.Settings.textAbout": "About",
"DE.Views.Settings.textBack": "Back",
"DE.Views.Settings.textDocTitle": "Document title",
"DE.Views.Settings.textLoading": "Loading...",
"DE.Views.Settings.textAuthor": "Author",
"DE.Views.Settings.textCreateDate": "Create date",
"DE.Views.Settings.textStatistic": "Statistic",
"DE.Views.Settings.textPages": "Pages",
"DE.Views.Settings.textParagraphs": "Paragraphs",
"DE.Views.Settings.textWords": "Words",
"DE.Views.Settings.textSymbols": "Symbols",
"DE.Views.Settings.textSpaces": "Spaces",
"DE.Views.Settings.textDownloadAs": "Download As...",
"DE.Views.Settings.textVersion": "Version",
"DE.Views.Settings.textAddress": "address",
"DE.Views.Settings.textEmail": "email",
"DE.Views.Settings.textTel": "tel"
}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment