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},
|
$.post("embedphotos/album", {name: album},
|
||||||
function(data) {
|
function(data) {
|
||||||
if (data['status']) {
|
if (data['status']) {
|
||||||
$('#embedPhotoModalLabel').html('{{$modalchooseimages}}');
|
$('#embedPhotoModalLabel').html("{{$modalchooseimages}}");
|
||||||
$('#embedPhotoModalBodyAlbumDialog').html('\
|
$('#embedPhotoModalBodyAlbumDialog').html('\
|
||||||
<div><ul class="nav">\n\
|
<div><ul class="nav">\n\
|
||||||
<li><a href="#" onclick="initializeEmbedPhotoDialog();return false;">\n\
|
<li><a href="#" onclick="initializeEmbedPhotoDialog();return false;">\n\
|
||||||
@ -402,7 +402,7 @@
|
|||||||
$('#editor').val(currentContent + ddata['photolink']);
|
$('#editor').val(currentContent + ddata['photolink']);
|
||||||
{{/if}}
|
{{/if}}
|
||||||
} else {
|
} else {
|
||||||
window.console.log('{{$modalerrorlink}}' + ':' + ddata['errormsg']);
|
window.console.log("{{$modalerrorlink}}" + ':' + ddata['errormsg']);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
@ -413,7 +413,7 @@
|
|||||||
$('#embedPhotoModal').modal('hide');
|
$('#embedPhotoModal').modal('hide');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
window.console.log('{{$modalerroralbum}} ' + JSON.stringify(album) + ':' + data['errormsg']);
|
window.console.log("{{$modalerroralbum}} " + JSON.stringify(album) + ':' + data['errormsg']);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
@ -425,19 +425,19 @@
|
|||||||
function(data) {
|
function(data) {
|
||||||
if (data['status']) {
|
if (data['status']) {
|
||||||
var albums = data['albumlist']; //JSON.parse(data['albumlist']);
|
var albums = data['albumlist']; //JSON.parse(data['albumlist']);
|
||||||
$('#embedPhotoModalLabel').html('{{$modalchoosealbum}}');
|
$('#embedPhotoModalLabel').html("{{$modalchoosealbum}}");
|
||||||
$('#embedPhotoModalBodyAlbumList').html('<ul class="nav"></ul>');
|
$('#embedPhotoModalBodyAlbumList').html('<ul class="nav"></ul>');
|
||||||
for(var i=0; i<albums.length; i++) {
|
for(var i=0; i<albums.length; i++) {
|
||||||
var albumName = albums[i].text;
|
var albumName = albums[i].text;
|
||||||
var albumLink = '<li>';
|
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>';
|
albumLink += '</li>';
|
||||||
$('#embedPhotoModalBodyAlbumList').find('ul').append(albumLink);
|
$('#embedPhotoModalBodyAlbumList').find('ul').append(albumLink);
|
||||||
}
|
}
|
||||||
$('#embedPhotoModalBodyAlbumDialog').addClass('hide');
|
$('#embedPhotoModalBodyAlbumDialog').addClass('hide');
|
||||||
$('#embedPhotoModalBodyAlbumListDialog').removeClass('hide');
|
$('#embedPhotoModalBodyAlbumListDialog').removeClass('hide');
|
||||||
} else {
|
} else {
|
||||||
window.console.log('{{$modalerrorlist}}' + ':' + data['errormsg']);
|
window.console.log("{{$modalerrorlist}}" + ':' + data['errormsg']);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user