minor fix on Preview

This commit is contained in:
Xuan Sang LE 2020-05-22 17:19:10 +02:00
parent 73233e48f2
commit ff300c57cb
5 changed files with 12 additions and 12 deletions

View File

@ -203,13 +203,13 @@
return this.renderPDFPages(n + 1, scale, recursive).then(function() {
return resolve();
}).catch(function(e) {
return reject(e);
return reject(__e(e));
});
} else {
return resolve();
}
}).catch(function(e) {
return reject(e);
return reject(__e(e));
});
});
}
@ -226,13 +226,13 @@
$(this.txtpage).val("1");
return resolve();
}).catch(function(e) {
return reject(e);
return reject(__e(e));
});
}).catch(function(e) {
return reject(e);
return reject(__e(e));
});
}).catch(function(e) {
return reject(e);
return reject(__e(e));
});
})).catch((e) => {
return this.error(__("Unable to view file: {0}", this.currfile.path), e);

View File

@ -6,7 +6,7 @@
"author": "Xuan Sang LE",
"email": "xsang.le@gmail.com"
},
"version":"0.0.3-a",
"version":"0.0.4-a",
"category":"Utils",
"iconclass":"fa fa-eye",
"mimes":["[^\/]*/.*pdf", "image/.*"]

Binary file not shown.

View File

@ -154,10 +154,10 @@ class Preview extends this.OS.GUI.BaseApplication
if recursive
@renderPDFPages n + 1, scale, recursive
.then () -> resolve()
.catch (e) -> reject e
.catch (e) -> reject __e e
else
resolve()
.catch (e) -> reject e
.catch (e) -> reject __e e
renderPDF: () ->
@load new Promise (resolve, reject) =>
@ -170,9 +170,9 @@ class Preview extends this.OS.GUI.BaseApplication
.then () =>
$(@txtpage).val("1")
resolve()
.catch (e) -> reject e
.catch (e) -> reject e
.catch (e) -> reject e
.catch (e) -> reject __e e
.catch (e) -> reject __e e
.catch (e) -> reject __e e
.catch (e) => @error __("Unable to view file: {0}", @currfile.path), e
renderSVG: () ->

View File

@ -6,7 +6,7 @@
"author": "Xuan Sang LE",
"email": "xsang.le@gmail.com"
},
"version":"0.0.3-a",
"version":"0.0.4-a",
"category":"Utils",
"iconclass":"fa fa-eye",
"mimes":["[^\/]*/.*pdf", "image/.*"]