Commit 26e5b8bd authored by Alexander Yuzhin's avatar Alexander Yuzhin

[DE mobile] Localization EditImage.

parent 6584fa1f
......@@ -46,7 +46,7 @@ define([
], function (core) {
'use strict';
DE.Controllers.EditImage = Backbone.Controller.extend((function() {
DE.Controllers.EditImage = Backbone.Controller.extend(_.extend((function() {
// Private
var _stack = [],
_imageObject = undefined,
......@@ -303,20 +303,20 @@ define([
if ($input) {
var value = ($input.val()).replace(/ /g, '');
_.delay(function () {
if (!_.isEmpty(value)) {
if ((/((^https?)|(^ftp)):\/\/.+/i.test(value))) {
if (!_.isEmpty(value)) {
if ((/((^https?)|(^ftp)):\/\/.+/i.test(value))) {
DE.getController('EditContainer').hideModal();
_.defer(function () {
var image = new Asc.asc_CImgProperty();
image.put_ImageUrl(value);
me.api.ImgApply(image);
DE.getController('EditContainer').hideModal();
} else {
uiApp.alert(me.txtNotUrl);
}
});
} else {
uiApp.alert(me.textEmptyImgUrl);
uiApp.alert(me.txtNotUrl);
}
}, 300);
} else {
uiApp.alert(me.textEmptyImgUrl);
}
}
},
......@@ -393,8 +393,8 @@ define([
return imageExist;
},
textEmptyImgUrl : 'You need to specify image URL.',
txtNotUrl : 'This field should be a URL in the format \"http://www.example.com\"'
};
})());
textEmptyImgUrl: 'You need to specify image URL.',
txtNotUrl: 'This field should be a URL in the format \"http://www.example.com\"'
}
})(), DE.Controllers.EditImage || {}))
});
\ No newline at end of file
......@@ -48,7 +48,7 @@ define([
], function (editTemplate, $, _, Backbone) {
'use strict';
DE.Views.EditImage = Backbone.View.extend((function() {
DE.Views.EditImage = Backbone.View.extend(_.extend((function() {
// private
return {
......@@ -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;
......@@ -149,7 +150,35 @@ define([
_.delay(function () {
$('.edit-image-url-link input[type="url"]').focus();
}, 1000);
}
},
textWrap: 'Wrap',
textReplace: 'Replace',
textReorder: 'Reorder',
textDefault: 'Default Size',
textRemove: 'Remove Image',
textBack: 'Back',
textToForeground: 'Bring to Foreground',
textToBackground: 'Send to Background',
textForward: 'Move Forward',
textBackward: 'Move Backward',
textInline: 'Inline',
textSquare: 'Square',
textTight: 'Tight',
textThrough: 'Through',
textTopBottom: 'Top and Bottom',
textInFront: 'In Front',
textBehind: 'Behind',
textAlign: 'Align',
textMoveText: 'Move with Text',
textOverlap: 'Allow Overlap',
textDistanceText: 'Distance from Text',
textFromLibrary: 'Picture from Library',
textFromURL: 'Picture from URL',
textLinkSettings: 'Link Settings',
textAddress: 'Address',
textImageURL: 'Image URL',
textReplaceImg: 'Replace Image'
}
})());
})(), DE.Views.EditImage || {}))
});
\ No newline at end of file
......@@ -220,7 +220,35 @@
"DE.Views.EditHyperlink.textDisplay": "Display",
"DE.Views.EditHyperlink.textTip": "Screen Tip",
"DE.Views.EditHyperlink.textEdit": "Edit Link",
"DE.Views.EditHyperlink.textRemove": "Remove Link"
"DE.Views.EditHyperlink.textRemove": "Remove Link",
"DE.Controllers.EditImage.textEmptyImgUrl": "You need to specify image URL.",
"DE.Controllers.EditImage.txtNotUrl": "This field should be a URL in the format 'http://www.example.com",
"DE.Views.EditImage.textWrap": "Wrap",
"DE.Views.EditImage.textReplace": "Replace",
"DE.Views.EditImage.textReorder": "Reorder",
"DE.Views.EditImage.textDefault": "Default Size",
"DE.Views.EditImage.textRemove": "Remove Image",
"DE.Views.EditImage.textBack": "Back",
"DE.Views.EditImage.textToForeground": "Bring to Foreground",
"DE.Views.EditImage.textToBackground": "Send to Background",
"DE.Views.EditImage.textForward": "Move Forward",
"DE.Views.EditImage.textBackward": "Move Backward",
"DE.Views.EditImage.textInline": "Inline",
"DE.Views.EditImage.textSquare": "Square",
"DE.Views.EditImage.textTight": "Tight",
"DE.Views.EditImage.textThrough": "Through",
"DE.Views.EditImage.textTopBottom": "Top and Bottom",
"DE.Views.EditImage.textInFront": "In Front",
"DE.Views.EditImage.textBehind": "Behind",
"DE.Views.EditImage.textAlign": "Align",
"DE.Views.EditImage.textMoveText": "Move with Text",
"DE.Views.EditImage.textOverlap": "Allow Overlap",
"DE.Views.EditImage.textDistanceText": "Distance from Text",
"DE.Views.EditImage.textFromLibrary": "Picture from Library",
"DE.Views.EditImage.textFromURL": "Picture from URL",
"DE.Views.EditImage.textLinkSettings": "Link Settings",
"DE.Views.EditImage.textAddress": "Address",
"DE.Views.EditImage.textImageURL": "Image URL",
"DE.Views.EditImage.textReplaceImg": "Replace Image"
}
\ 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