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

View File

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

Binary file not shown.

View File

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

View File

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