issue #636 - some localised (e.g. Italian) strings have single quotes which throw JS errors when used in single quoted template constructs.
This commit is contained in:
parent
7f60ab49b2
commit
1436b075bf
@ -368,7 +368,7 @@
|
||||
$.post("embedphotos/album", {name: album},
|
||||
function(data) {
|
||||
if (data['status']) {
|
||||
$('#embedPhotoModalLabel').html('{{$modalchooseimages}}');
|
||||
$('#embedPhotoModalLabel').html("{{$modalchooseimages}}");
|
||||
$('#embedPhotoModalBodyAlbumDialog').html('\
|
||||
<div><ul class="nav">\n\
|
||||
<li><a href="#" onclick="initializeEmbedPhotoDialog();return false;">\n\
|
||||
@ -402,7 +402,7 @@
|
||||
$('#editor').val(currentContent + ddata['photolink']);
|
||||
{{/if}}
|
||||
} else {
|
||||
window.console.log('{{$modalerrorlink}}' + ':' + ddata['errormsg']);
|
||||
window.console.log("{{$modalerrorlink}}" + ':' + ddata['errormsg']);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
@ -413,7 +413,7 @@
|
||||
$('#embedPhotoModal').modal('hide');
|
||||
});
|
||||
} else {
|
||||
window.console.log('{{$modalerroralbum}} ' + JSON.stringify(album) + ':' + data['errormsg']);
|
||||
window.console.log("{{$modalerroralbum}} " + JSON.stringify(album) + ':' + data['errormsg']);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
@ -425,19 +425,19 @@
|
||||
function(data) {
|
||||
if (data['status']) {
|
||||
var albums = data['albumlist']; //JSON.parse(data['albumlist']);
|
||||
$('#embedPhotoModalLabel').html('{{$modalchoosealbum}}');
|
||||
$('#embedPhotoModalLabel').html("{{$modalchoosealbum}}");
|
||||
$('#embedPhotoModalBodyAlbumList').html('<ul class="nav"></ul>');
|
||||
for(var i=0; i<albums.length; i++) {
|
||||
var albumName = albums[i].text;
|
||||
var albumLink = '<li>';
|
||||
albumLink += '<a href="#" onclick="choosePhotoFromAlbum(\'' + albumName + '\');return false;">' + albumName + '</a>';
|
||||
albumLink += '<a href="#" onclick="choosePhotoFromAlbum("' + albumName + '");return false;">' + albumName + '</a>';
|
||||
albumLink += '</li>';
|
||||
$('#embedPhotoModalBodyAlbumList').find('ul').append(albumLink);
|
||||
}
|
||||
$('#embedPhotoModalBodyAlbumDialog').addClass('hide');
|
||||
$('#embedPhotoModalBodyAlbumListDialog').removeClass('hide');
|
||||
} else {
|
||||
window.console.log('{{$modalerrorlist}}' + ':' + data['errormsg']);
|
||||
window.console.log("{{$modalerrorlist}}" + ':' + data['errormsg']);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
Reference in New Issue
Block a user