Skip to content

Commit 182add1

Browse files
jquery better utilised and at text localised
1 parent 01d9ca0 commit 182add1

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

frontend/src/modules/editor/selectTheme/views/editorThemeItemView.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,12 @@ define(function(require){
2525

2626
postRender: function() {
2727
var previewUrl = '/api/theme/preview/' + this.model.attributes.name + '/' + this.model.attributes.version;
28-
var $previewLoc = this.$el.find('.theme-preview');
28+
var $previewLoc = this.$('.theme-preview');
2929

3030
$.ajax(previewUrl, {
3131
statusCode: {
32-
// if a preview image is found
3332
200: function() {
34-
$previewLoc.prepend('<img src="' + previewUrl + '"alt="Preview image"' + '/>');
33+
$previewLoc.prepend($('<img/>', { src: previewUrl, alt: Origin.l10n.t('app.themepreviewalt') }));
3534
}
3635
}
3736
});

routes/lang/en-application.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@
143143
"app.configurationsettings": "Configuration settings",
144144
"app.themesettings": "Theme settings",
145145
"app.themepicker": "Theme picker",
146+
"app.themepreviewalt": "Preview image",
146147
"app.lastupdated": "UPDATED",
147148
"app.recent": "Recent",
148149
"app.assettitle": "Asset title",

0 commit comments

Comments
 (0)