forked from 0x2620/pandora
reload text panel after uploading pdf
This commit is contained in:
parent
7012b8724a
commit
41a1a1f94f
2 changed files with 2 additions and 19 deletions
|
@ -373,7 +373,7 @@ pandora.ui.textPDF = function(text) {
|
|||
$iframe && $iframe.postMessage('page', {page: page});
|
||||
}
|
||||
} else {
|
||||
that.html('UPLOADED: ' + text.uploaded);
|
||||
that.html('Please upload PDF');
|
||||
}
|
||||
return that;
|
||||
|
||||
|
|
|
@ -43,10 +43,6 @@ pandora.ui.uploadPDFDialog = function(options) {
|
|||
})
|
||||
.bindEvent({
|
||||
close: function(data) {
|
||||
if (pandora.firefogg) {
|
||||
pandora.firefogg.cancel();
|
||||
delete pandora.firefogg;
|
||||
}
|
||||
that.close();
|
||||
}
|
||||
});
|
||||
|
@ -73,19 +69,6 @@ pandora.ui.uploadPDFDialog = function(options) {
|
|||
name: file.name,
|
||||
id: options.id
|
||||
},
|
||||
progress: function(data) {
|
||||
var progress = data.progress || 0;
|
||||
$progress.options({progress: progress});
|
||||
},
|
||||
callback: function(result) {
|
||||
if (result.progress == 1) {
|
||||
Ox.Request.clearCache();
|
||||
// fixme reload text view here
|
||||
that.close();
|
||||
} else {
|
||||
$content.html("failed: " + result.responseText);
|
||||
}
|
||||
}
|
||||
}).bindEvent({
|
||||
progress: function(data) {
|
||||
$progress.options({progress: data.progress || 0});
|
||||
|
@ -93,7 +76,7 @@ pandora.ui.uploadPDFDialog = function(options) {
|
|||
done: function(data) {
|
||||
if (data.progress == 1) {
|
||||
Ox.Request.clearCache();
|
||||
pandora.$ui.mainPanel.replaceElement(1, pandora.$ui.rightPanel = pandora.ui.rightPanel());
|
||||
pandora.$ui.mainPanel.replaceElement(1, pandora.$ui.textPanel = pandora.ui.textPanel());
|
||||
that.close();
|
||||
} else {
|
||||
$content.html("failed: " + data.responseText);
|
||||
|
|
Loading…
Reference in a new issue