reload text panel after uploading pdf

This commit is contained in:
j 2013-09-08 17:03:22 +00:00
parent 7012b8724a
commit 41a1a1f94f
2 changed files with 2 additions and 19 deletions

View file

@ -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;

View file

@ -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);