[DE mobile] Localization AddImage.

This commit is contained in:
Alexander Yuzhin 2016-11-18 13:06:49 +03:00
parent a7cf60048e
commit 978fd8e1a9
4 changed files with 34 additions and 16 deletions

View file

@ -84,11 +84,10 @@ define([
var me = this; var me = this;
$('#addimage-insert a').single('click', _.buffered(me.onInsertByUrl, 100, me)); $('#addimage-insert a').single('click', _.buffered(me.onInsertByUrl, 100, me));
$('#addimage-url input[type=url]').single('input', _.bind(me.onUrlChange, me));
$('#addimage-url input[type="url"]').single('input', _.bind(me.onUrlChange, me));
_.delay(function () { _.delay(function () {
$('#addimage-link-url input[type="url"]').focus(); $('#addimage-link-url input[type=url]').focus();
}, 1000); }, 1000);
}, },

View file

@ -9,7 +9,7 @@
<i class="icon icon-search"></i> <i class="icon icon-search"></i>
</div> </div>
<div class="item-inner"> <div class="item-inner">
<div class="item-title">Picture from Library</div> <div class="item-title"><%= scope.textFromLibrary %></div>
</div> </div>
</div> </div>
</a> </a>
@ -21,7 +21,7 @@
<i class="icon icon-link"></i> <i class="icon icon-link"></i>
</div> </div>
<div class="item-inner"> <div class="item-inner">
<div class="item-title">Picture from URL</div> <div class="item-title"><%= scope.textFromURL %></div>
</div> </div>
</div> </div>
</a> </a>
@ -34,20 +34,20 @@
<div id="addimage-url-view"> <div id="addimage-url-view">
<div class="navbar"> <div class="navbar">
<div class="navbar-inner"> <div class="navbar-inner">
<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><% if (!android) { %><span>Back</span><% } %></a></div> <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">Link Settings</div> <div class="center sliding"><%= scope.textLinkSettings %></div>
</div> </div>
</div> </div>
<div class="page" id="addimage-url"> <div class="page" id="addimage-url">
<div class="page-content"> <div class="page-content">
<div class="content-block-title">Address</div> <div class="content-block-title"><%= scope.textAddress %></div>
<div class="list-block"> <div class="list-block">
<ul> <ul>
<li> <li>
<div id="addimage-link-url" class="item-content"> <div id="addimage-link-url" class="item-content">
<div class="item-inner"> <div class="item-inner">
<div class="item-input"> <div class="item-input">
<input type="url" placeholder="Image URL"> <input type="url" placeholder="<%= scope.textImageURL %>">
</div> </div>
</div> </div>
</div> </div>
@ -56,11 +56,11 @@
</div> </div>
<div class="list-block disabled" id="addimage-insert"> <div class="list-block disabled" id="addimage-insert">
<% if (android) { %> <% if (android) { %>
<a href="#" class="button button-fill button-raised" style="margin: 20px 16px;">Insert Image</a> <a href="#" class="button button-fill button-raised" style="margin: 20px 16px;"><%= scope.textInsertImage %></a>
<% } else { %> <% } else { %>
<ul> <ul>
<li> <li>
<a href="#" class="list-button item-link">Insert Image</a> <a href="#" class="list-button item-link"><%= scope.textInsertImage %></a>
</li> </li>
</ul> </ul>
<% } %> <% } %>

View file

@ -49,7 +49,7 @@ define([
], function (addTemplate, $, _, Backbone) { ], function (addTemplate, $, _, Backbone) {
'use strict'; 'use strict';
DE.Views.AddImage = Backbone.View.extend((function() { DE.Views.AddImage = Backbone.View.extend(_.extend((function() {
// private // private
return { return {
@ -76,7 +76,8 @@ define([
render: function () { render: function () {
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'),
scope : this
})); }));
return this; return this;
@ -117,7 +118,15 @@ define([
showImageUrl: function () { showImageUrl: function () {
this.showPage('#addimage-url-view'); this.showPage('#addimage-url-view');
},
textFromLibrary: 'Picture from Library',
textFromURL: 'Picture from URL',
textBack: 'Back',
textLinkSettings: 'Link Settings',
textAddress: 'Address',
textImageURL: 'Image URL',
textInsertImage: 'Insert Image'
} }
} })(), DE.Views.AddImage || {}))
})());
}); });

View file

@ -140,5 +140,15 @@
"DE.Controllers.AddContainer.textTable": "Table", "DE.Controllers.AddContainer.textTable": "Table",
"DE.Controllers.AddContainer.textShape": "Shape", "DE.Controllers.AddContainer.textShape": "Shape",
"DE.Controllers.AddContainer.textImage": "Image", "DE.Controllers.AddContainer.textImage": "Image",
"DE.Controllers.AddContainer.textOther": "Other" "DE.Controllers.AddContainer.textOther": "Other",
"DE.Controllers.AddImage.textEmptyImgUrl": "You need to specify image URL.",
"DE.Controllers.AddImage.txtNotUrl": "This field should be a URL in the format 'http://www.example.com'",
"DE.Views.AddImage.textFromLibrary": "Picture from Library",
"DE.Views.AddImage.textFromURL": "Picture from URL",
"DE.Views.AddImage.textBack": "Back",
"DE.Views.AddImage.textLinkSettings": "Link Settings",
"DE.Views.AddImage.textAddress": "Address",
"DE.Views.AddImage.textImageURL": "Image URL",
"DE.Views.AddImage.textInsertImage": "Insert Image"
} }