forked from 0x2620/pandora
show import error instaed of 100 existing items
This commit is contained in:
parent
c3a3d1df1c
commit
8b92756595
1 changed files with 26 additions and 1 deletions
|
@ -107,7 +107,32 @@ pandora.ui.addItemDialog = function(options) {
|
|||
pandora.api.getMediaUrlInfo({
|
||||
url: input
|
||||
}, function(result) {
|
||||
if (requslt.data.items.length) {
|
||||
onInfo(result.data.items.map(getVideoInfo));
|
||||
} else {
|
||||
$screen.stop();
|
||||
that.close();
|
||||
var error = Ox.Dialog({
|
||||
buttons: [
|
||||
{},
|
||||
Ox.Button({
|
||||
id: 'close',
|
||||
title: Ox._('Close')
|
||||
}).bindEvent({
|
||||
click: function() {
|
||||
error.close();
|
||||
}
|
||||
})
|
||||
],
|
||||
closeButton: true,
|
||||
content: Ox.Element().css({padding: '32px'}).html('Import failed'),
|
||||
height: 96,
|
||||
keys: {escape: 'close'},
|
||||
removeOnClose: true,
|
||||
title: Ox._('Import Error'),
|
||||
width: 192
|
||||
}).open()
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue