encodeURI -> encodeURIComponent

This commit is contained in:
rolux 2013-08-14 19:41:31 +00:00
parent 356a4b4505
commit e8d2280466
6 changed files with 10 additions and 10 deletions

View file

@ -15,7 +15,7 @@ pandora.ui.folderBrowserList = function(id, section) {
clickable: true,
format: function(value) {
return $('<img>').attr({
src: '/list/' + encodeURI(value) + '/icon.jpg'
src: '/list/' + encodeURIComponent(value) + '/icon.jpg'
}).css({
width: '14px',
height: '14px',

View file

@ -18,7 +18,7 @@ pandora.ui.folderList = function(id, section) {
},
format: function(value, data) {
return $('<img>').attr({
src: '/' + folderItem.toLowerCase() + '/' + encodeURI(data.id) + '/icon.jpg?' + data.modified
src: '/' + folderItem.toLowerCase() + '/' + encodeURIComponent(data.id) + '/icon.jpg?' + data.modified
}).css({
width: '14px',
height: '14px',

View file

@ -589,7 +589,7 @@ pandora.ui.home = function() {
function getImageURL(item) {
return '/' + item.type + '/' + item.user
+ ':' + encodeURI(item.name) + '/icon256.jpg?' + item.modified;
+ ':' + encodeURIComponent(item.name) + '/icon256.jpg?' + item.modified;
}
function getTooltip(item) {

View file

@ -561,7 +561,7 @@ pandora.ui.home = function() {
function getImageURL(item) {
return '/' + item.type + '/' + item.user
+ ':' + encodeURI(item.name) + '/icon256.jpg?' + item.modified;
+ ':' + encodeURIComponent(item.name) + '/icon256.jpg?' + item.modified;
}
function getTooltip(item) {

View file

@ -183,7 +183,7 @@ pandora.ui.listInfo = function() {
$icon = Ox.Element('<img>')
.attr({
src: list
? '/' + folderItem.toLowerCase() + '/' + encodeURI(list) + '/icon256.jpg?' + Ox.uid()
? '/' + folderItem.toLowerCase() + '/' + encodeURIComponent(list) + '/icon256.jpg?' + Ox.uid()
: '/static/png/icon.png'
})
.css(getIconCSS())

View file

@ -168,7 +168,7 @@ pandora.ui.listGeneralPanel = function(listData) {
tooltip: Ox._('Doubleclick to edit icon')
})
.attr({
src: '/' + folderItem.toLowerCase() + '/' + encodeURI(listData.id) + '/icon256.jpg?' + Ox.uid()
src: '/' + folderItem.toLowerCase() + '/' + encodeURIComponent(listData.id) + '/icon256.jpg?' + Ox.uid()
})
.css({
position: 'absolute',
@ -358,7 +358,7 @@ pandora.ui.listIconPanel = function(listData) {
$iconPanel = Ox.Element(),
$icon = $('<img>')
.attr({src: '/' + folderItem.toLowerCase() + '/' + encodeURI(listData.id) + '/icon256.jpg?' + Ox.uid()})
.attr({src: '/' + folderItem.toLowerCase() + '/' + encodeURIComponent(listData.id) + '/icon256.jpg?' + Ox.uid()})
.css({position: 'absolute', borderRadius: '64px', margin: '16px'})
.appendTo($iconPanel),
@ -544,12 +544,12 @@ pandora.ui.listIconPanel = function(listData) {
posterFrames: posterFrames
}, function() {
$icon.attr({
src: '/' + folderItem.toLowerCase() + '/' + encodeURI(listData.id) + '/icon256.jpg?' + Ox.uid()
src: '/' + folderItem.toLowerCase() + '/' + encodeURIComponent(listData.id) + '/icon256.jpg?' + Ox.uid()
});
pandora.$ui.folderList[listData.folder].$element
.find('img[src*="/' + encodeURI(listData.id) + '/"]')
.find('img[src*="/' + encodeURIComponent(listData.id) + '/"]')
.attr({
src: '/' + folderItem.toLowerCase() + '/' + encodeURI(listData.id) + '/icon.jpg?' + Ox.uid()
src: '/' + folderItem.toLowerCase() + '/' + encodeURIComponent(listData.id) + '/icon.jpg?' + Ox.uid()
});
pandora.$ui.info.updateListInfo();
});