[DE SSE] Add jpg, png formats into Download as, Save/Copy as panels

This commit is contained in:
JuliaSvinareva 2022-11-24 18:23:55 +03:00
parent e22e8c7299
commit 33b358f931
5 changed files with 31 additions and 7 deletions

View file

@ -69,7 +69,10 @@ define([
{name: 'FB2', imgCls: 'fb2', type: Asc.c_oAscFileType.FB2}, {name: 'FB2', imgCls: 'fb2', type: Asc.c_oAscFileType.FB2},
{name: 'EPUB', imgCls: 'epub', type: Asc.c_oAscFileType.EPUB}, {name: 'EPUB', imgCls: 'epub', type: Asc.c_oAscFileType.EPUB},
{name: 'HTML (Zipped)', imgCls: 'html', type: Asc.c_oAscFileType.HTML} {name: 'HTML (Zipped)', imgCls: 'html', type: Asc.c_oAscFileType.HTML}
], [] ], ], [
{name: 'JPG', imgCls: 'jpg', type: Asc.c_oAscFileType.JPG},
{name: 'PNG', imgCls: 'png', type: Asc.c_oAscFileType.PNG}
]],
template: _.template([ template: _.template([
'<div class="content-container">', '<div class="content-container">',
@ -189,7 +192,10 @@ define([
{name: 'FB2', imgCls: 'fb2', type: Asc.c_oAscFileType.FB2}, {name: 'FB2', imgCls: 'fb2', type: Asc.c_oAscFileType.FB2},
{name: 'EPUB', imgCls: 'epub', type: Asc.c_oAscFileType.EPUB}, {name: 'EPUB', imgCls: 'epub', type: Asc.c_oAscFileType.EPUB},
{name: 'HTML (Zipped)', imgCls: 'html', type: Asc.c_oAscFileType.HTML} {name: 'HTML (Zipped)', imgCls: 'html', type: Asc.c_oAscFileType.HTML}
], [] ], ], [
{name: 'JPG', imgCls: 'jpg', type: Asc.c_oAscFileType.JPG},
{name: 'PNG', imgCls: 'png', type: Asc.c_oAscFileType.PNG}
]],
template: _.template([ template: _.template([
@ -233,7 +239,7 @@ define([
this.formats[0].splice(1, 1, {name: 'PDF', imgCls: 'pdf', type: '', ext: true}); // remove pdf this.formats[0].splice(1, 1, {name: 'PDF', imgCls: 'pdf', type: '', ext: true}); // remove pdf
this.formats[1].splice(2, 1); // remove pdfa this.formats[1].splice(2, 1); // remove pdfa
} else if (/^xps|oxps$/.test(this.fileType)) { } else if (/^xps|oxps$/.test(this.fileType)) {
this.formats[3].push({name: this.fileType.toUpperCase(), imgCls: this.fileType, type: '', ext: true}); // original xps/oxps this.formats[0].push({name: this.fileType.toUpperCase(), imgCls: this.fileType, type: '', ext: true}); // original xps/oxps
} else if (/^djvu$/.test(this.fileType)) { } else if (/^djvu$/.test(this.fileType)) {
this.formats = [[ this.formats = [[
{name: 'DJVU', imgCls: 'djvu', type: '', ext: true}, // original djvu {name: 'DJVU', imgCls: 'djvu', type: '', ext: true}, // original djvu

View file

@ -176,6 +176,12 @@
&djvu { &djvu {
background: ~"url('@{common-image-const-path}/doc-formats/djvu.svg') no-repeat center"; background: ~"url('@{common-image-const-path}/doc-formats/djvu.svg') no-repeat center";
} }
&png {
background: ~"url('@{common-image-const-path}/doc-formats/png.svg') no-repeat center";
}
&jpg {
background: ~"url('@{common-image-const-path}/doc-formats/jpg.svg') no-repeat center";
}
} }
div { div {

View file

@ -64,8 +64,8 @@ define([
{name: 'PDFA', imgCls: 'pdfa', type: Asc.c_oAscFileType.PDFA}, {name: 'PDFA', imgCls: 'pdfa', type: Asc.c_oAscFileType.PDFA},
{name: 'OTP', imgCls: 'otp', type: Asc.c_oAscFileType.OTP} {name: 'OTP', imgCls: 'otp', type: Asc.c_oAscFileType.OTP}
], [ ], [
{name: 'PNG', imgCls: 'png', type: Asc.c_oAscFileType.PNG}, {name: 'JPG', imgCls: 'jpg', type: Asc.c_oAscFileType.JPG},
{name: 'JPG', imgCls: 'jpg', type: Asc.c_oAscFileType.JPG} {name: 'PNG', imgCls: 'png', type: Asc.c_oAscFileType.PNG}
]], ]],
@ -164,8 +164,8 @@ define([
{name: 'PDFA', imgCls: 'pdfa', type: Asc.c_oAscFileType.PDFA}, {name: 'PDFA', imgCls: 'pdfa', type: Asc.c_oAscFileType.PDFA},
{name: 'OTP', imgCls: 'otp', type: Asc.c_oAscFileType.OTP} {name: 'OTP', imgCls: 'otp', type: Asc.c_oAscFileType.OTP}
], [ ], [
{name: 'PNG', imgCls: 'png', type: Asc.c_oAscFileType.PNG}, {name: 'JPG', imgCls: 'jpg', type: Asc.c_oAscFileType.JPG},
{name: 'JPG', imgCls: 'jpg', type: Asc.c_oAscFileType.JPG} {name: 'PNG', imgCls: 'png', type: Asc.c_oAscFileType.PNG}
]], ]],
template: _.template([ template: _.template([

View file

@ -52,6 +52,9 @@ define([
{name: 'OTS', imgCls: 'ots', type: Asc.c_oAscFileType.OTS}, {name: 'OTS', imgCls: 'ots', type: Asc.c_oAscFileType.OTS},
{name: 'XLSM', imgCls: 'xlsm', type: Asc.c_oAscFileType.XLSM}, {name: 'XLSM', imgCls: 'xlsm', type: Asc.c_oAscFileType.XLSM},
{name: 'PDFA', imgCls: 'pdfa', type: Asc.c_oAscFileType.PDFA} {name: 'PDFA', imgCls: 'pdfa', type: Asc.c_oAscFileType.PDFA}
], [
{name: 'JPG', imgCls: 'jpg', type: Asc.c_oAscFileType.JPG},
{name: 'PNG', imgCls: 'png', type: Asc.c_oAscFileType.PNG}
]], ]],
@ -149,6 +152,9 @@ define([
{name: 'OTS', imgCls: 'ots', type: Asc.c_oAscFileType.OTS}, {name: 'OTS', imgCls: 'ots', type: Asc.c_oAscFileType.OTS},
{name: 'XLSM', imgCls: 'xlsm', type: Asc.c_oAscFileType.XLSM}, {name: 'XLSM', imgCls: 'xlsm', type: Asc.c_oAscFileType.XLSM},
{name: 'PDFA', imgCls: 'pdfa', type: Asc.c_oAscFileType.PDFA} {name: 'PDFA', imgCls: 'pdfa', type: Asc.c_oAscFileType.PDFA}
], [
{name: 'JPG', imgCls: 'jpg', type: Asc.c_oAscFileType.JPG},
{name: 'PNG', imgCls: 'png', type: Asc.c_oAscFileType.PNG}
]], ]],
template: _.template([ template: _.template([

View file

@ -64,6 +64,12 @@
&xlsm { &xlsm {
background: ~"url('@{common-image-const-path}/doc-formats/xlsm.svg') no-repeat center"; background: ~"url('@{common-image-const-path}/doc-formats/xlsm.svg') no-repeat center";
} }
&png {
background: ~"url('@{common-image-const-path}/doc-formats/png.svg') no-repeat center";
}
&jpg {
background: ~"url('@{common-image-const-path}/doc-formats/jpg.svg') no-repeat center";
}
} }
div { div {