Add download as docm/pptm/xlsm
This commit is contained in:
parent
04020debcb
commit
148bc3e179
10
apps/common/main/resources/img/doc-formats/docm.svg
Normal file
10
apps/common/main/resources/img/doc-formats/docm.svg
Normal file
|
@ -0,0 +1,10 @@
|
|||
<svg width="90" height="117" viewBox="0 0 90 117" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<symbol id="svg-format-docm">
|
||||
<path d="M90 18V114C90 114.796 89.6839 115.559 89.1213 116.121C88.5587 116.684 87.7956 117 87 117H3C2.20435 117 1.44129 116.684 0.87868 116.121C0.316071 115.559 0 114.796 0 114V3C0 2.20435 0.316071 1.44129 0.87868 0.87868C1.44129 0.316071 2.20435 0 3 0H72L90 18Z" fill="#214479"/>
|
||||
<path opacity="0.2" d="M90 18H75C74.2044 18 73.4413 17.6839 72.8787 17.1213C72.3161 16.5587 72 15.7956 72 15V0L90 18Z" fill="black"/>
|
||||
<path d="M34.4824 104.635C34.4824 106.045 34.0801 107.125 33.2754 107.875C32.4746 108.625 31.3164 109 29.8008 109H27.375V100.434H30.0645C31.4629 100.434 32.5488 100.803 33.3223 101.541C34.0957 102.279 34.4824 103.311 34.4824 104.635ZM32.5957 104.682C32.5957 102.842 31.7832 101.922 30.1582 101.922H29.1914V107.5H29.9707C31.7207 107.5 32.5957 106.561 32.5957 104.682ZM44.0332 104.705C44.0332 106.123 43.6816 107.213 42.9785 107.975C42.2754 108.736 41.2676 109.117 39.9551 109.117C38.6426 109.117 37.6348 108.736 36.9316 107.975C36.2285 107.213 35.877 106.119 35.877 104.693C35.877 103.268 36.2285 102.18 36.9316 101.43C37.6387 100.676 38.6504 100.299 39.9668 100.299C41.2832 100.299 42.2891 100.678 42.9844 101.436C43.6836 102.193 44.0332 103.283 44.0332 104.705ZM37.7812 104.705C37.7812 105.662 37.9629 106.383 38.3262 106.867C38.6895 107.352 39.2324 107.594 39.9551 107.594C41.4043 107.594 42.1289 106.631 42.1289 104.705C42.1289 102.775 41.4082 101.811 39.9668 101.811C39.2441 101.811 38.6992 102.055 38.332 102.543C37.9648 103.027 37.7812 103.748 37.7812 104.705ZM49.4473 101.822C48.7637 101.822 48.2344 102.08 47.8594 102.596C47.4844 103.107 47.2969 103.822 47.2969 104.74C47.2969 106.65 48.0137 107.605 49.4473 107.605C50.0488 107.605 50.7773 107.455 51.6328 107.154V108.678C50.9297 108.971 50.1445 109.117 49.2773 109.117C48.0312 109.117 47.0781 108.74 46.418 107.986C45.7578 107.229 45.4277 106.143 45.4277 104.729C45.4277 103.838 45.5898 103.059 45.9141 102.391C46.2383 101.719 46.7031 101.205 47.3086 100.85C47.918 100.49 48.6309 100.311 49.4473 100.311C50.2793 100.311 51.1152 100.512 51.9551 100.914L51.3691 102.391C51.0488 102.238 50.7266 102.105 50.4023 101.992C50.0781 101.879 49.7598 101.822 49.4473 101.822ZM57.0879 109L55.0254 102.279H54.9727C55.0469 103.646 55.084 104.559 55.084 105.016V109H53.4609V100.434H55.9336L57.9609 106.984H57.9961L60.1465 100.434H62.6191V109H60.9258V104.945C60.9258 104.754 60.9277 104.533 60.9316 104.283C60.9395 104.033 60.9668 103.369 61.0137 102.291H60.9609L58.752 109H57.0879Z" fill="white"/>
|
||||
<path d="M62.8 43L56.5 70L49.5 43H46.5H43.5L36.5 70L30.2 43H24.4L32.9 77H39.3L46.5 49.1L53.7 77H60.1L68.6 43H62.8Z" fill="white"/>
|
||||
<path d="M10 12C10 10.8954 10.8954 10 12 10H24C25.1046 10 26 10.8954 26 12V21C26 22.1046 25.1046 23 24 23H12C10.8954 23 10 22.1046 10 21V12Z" fill="white"/>
|
||||
<path d="M17.2969 21L14.8125 13.8457H14.7656C14.832 14.9082 14.8652 15.9043 14.8652 16.834V21H13.5938V12.4336H15.5684L17.9473 19.248H17.9824L20.4316 12.4336H22.4121V21H21.0645V16.7637C21.0645 16.3379 21.0742 15.7832 21.0938 15.0996C21.1172 14.416 21.1367 14.002 21.1523 13.8574H21.1055L18.5332 21H17.2969Z" fill="#214479"/>
|
||||
</symbol>
|
||||
</svg>
|
After Width: | Height: | Size: 3.1 KiB |
14
apps/common/main/resources/img/doc-formats/pptm.svg
Normal file
14
apps/common/main/resources/img/doc-formats/pptm.svg
Normal file
|
@ -0,0 +1,14 @@
|
|||
<svg width="90" height="117" viewBox="0 0 90 117" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<symbol id="svg-format-pptm">
|
||||
<path d="M90 18V114C90 114.796 89.6839 115.559 89.1213 116.121C88.5587 116.684 87.7956 117 87 117H3C2.20435 117 1.44129 116.684 0.87868 116.121C0.316071 115.559 0 114.796 0 114V3C0 2.20435 0.316071 1.44129 0.87868 0.87868C1.44129 0.316071 2.20435 0 3 0H72L90 18Z" fill="#DD682B"/>
|
||||
<path opacity="0.2" d="M90 18H75C74.2044 18 73.4413 17.6839 72.8787 17.1213C72.3161 16.5587 72 15.7956 72 15V0L90 18Z" fill="black"/>
|
||||
<path d="M32.2146 104.465H32.8123C33.3708 104.465 33.7888 104.355 34.0662 104.137C34.3435 103.914 34.4822 103.592 34.4822 103.17C34.4822 102.744 34.365 102.43 34.1306 102.227C33.9001 102.023 33.5369 101.922 33.0408 101.922H32.2146V104.465ZM36.3162 103.105C36.3162 104.027 36.0271 104.732 35.449 105.221C34.8748 105.709 34.0564 105.953 32.9939 105.953H32.2146V109H30.3982V100.434H33.1345C34.1736 100.434 34.9626 100.658 35.5017 101.107C36.0447 101.553 36.3162 102.219 36.3162 103.105ZM39.7498 104.465H40.3474C40.906 104.465 41.324 104.355 41.6013 104.137C41.8787 103.914 42.0173 103.592 42.0173 103.17C42.0173 102.744 41.9001 102.43 41.6658 102.227C41.4353 102.023 41.072 101.922 40.5759 101.922H39.7498V104.465ZM43.8513 103.105C43.8513 104.027 43.5623 104.732 42.9841 105.221C42.4099 105.709 41.5916 105.953 40.5291 105.953H39.7498V109H37.9333V100.434H40.6697C41.7087 100.434 42.4978 100.658 43.0369 101.107C43.5798 101.553 43.8513 102.219 43.8513 103.105ZM48.7732 109H46.9568V101.945H44.6306V100.434H51.0994V101.945H48.7732V109ZM56.0447 109L53.9822 102.279H53.9294C54.0037 103.646 54.0408 104.559 54.0408 105.016V109H52.4177V100.434H54.8904L56.9177 106.984H56.9529L59.1033 100.434H61.5759V109H59.8826V104.945C59.8826 104.754 59.8845 104.533 59.8884 104.283C59.8962 104.033 59.9236 103.369 59.9705 102.291H59.9177L57.7087 109H56.0447Z" fill="white"/>
|
||||
<path d="M45 64C49.2435 64 53.3131 62.3143 56.3137 59.3137C59.3143 56.3131 61 52.2435 61 48H45V32C40.7565 32 36.6869 33.6857 33.6863 36.6863C30.6857 39.6869 29 43.7565 29 48C29 52.2435 30.6857 56.3131 33.6863 59.3137C36.6869 62.3143 40.7565 64 45 64Z" fill="white"/>
|
||||
<path d="M48 29V45H64C64 40.7565 62.3143 36.6869 59.3137 33.6863C56.3131 30.6857 52.2435 29 48 29Z" fill="white"/>
|
||||
<path d="M70 84H20V86H70V84Z" fill="white"/>
|
||||
<path d="M70 78H20V80H70V78Z" fill="white"/>
|
||||
<path d="M70 72H20V74H70V72Z" fill="white"/>
|
||||
<path d="M10 12C10 10.8954 10.8954 10 12 10H24C25.1046 10 26 10.8954 26 12V21C26 22.1046 25.1046 23 24 23H12C10.8954 23 10 22.1046 10 21V12Z" fill="white"/>
|
||||
<path d="M17.2969 21L14.8125 13.8457H14.7656C14.832 14.9082 14.8652 15.9043 14.8652 16.834V21H13.5938V12.4336H15.5684L17.9473 19.248H17.9824L20.4316 12.4336H22.4121V21H21.0645V16.7637C21.0645 16.3379 21.0742 15.7832 21.0938 15.0996C21.1172 14.416 21.1367 14.002 21.1523 13.8574H21.1055L18.5332 21H17.2969Z" fill="#DD682B"/>
|
||||
</symbol>
|
||||
</svg>
|
After Width: | Height: | Size: 2.8 KiB |
10
apps/common/main/resources/img/doc-formats/xlsm.svg
Normal file
10
apps/common/main/resources/img/doc-formats/xlsm.svg
Normal file
|
@ -0,0 +1,10 @@
|
|||
<svg width="90" height="117" viewBox="0 0 90 117" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<symbol id="svg-format-xlsm">
|
||||
<path d="M90 18V114C90 114.796 89.6839 115.559 89.1213 116.121C88.5587 116.684 87.7956 117 87 117H3C2.20435 117 1.44129 116.684 0.87868 116.121C0.316071 115.559 0 114.796 0 114V3C0 2.20435 0.316071 1.44129 0.87868 0.87868C1.44129 0.316071 2.20435 0 3 0H72L90 18Z" fill="#1F7244"/>
|
||||
<path opacity="0.2" d="M90 18H75C74.2044 18 73.4413 17.6839 72.8787 17.1213C72.3161 16.5587 72 15.7956 72 15V0L90 18Z" fill="black"/>
|
||||
<path d="M37.4446 109H35.3704L33.3782 105.76L31.386 109H29.4407L32.2825 104.582L29.6223 100.434H31.6262L33.4719 103.516L35.2825 100.434H37.2395L34.55 104.682L37.4446 109ZM38.5227 109V100.434H40.3391V107.5H43.8137V109H38.5227ZM50.3645 106.621C50.3645 107.395 50.0852 108.004 49.5266 108.449C48.9719 108.895 48.1985 109.117 47.2063 109.117C46.2922 109.117 45.4836 108.945 44.7805 108.602V106.914C45.3586 107.172 45.8469 107.354 46.2454 107.459C46.6477 107.564 47.0149 107.617 47.3469 107.617C47.7454 107.617 48.05 107.541 48.261 107.389C48.4758 107.236 48.5833 107.01 48.5833 106.709C48.5833 106.541 48.5364 106.393 48.4426 106.264C48.3489 106.131 48.2102 106.004 48.0266 105.883C47.8469 105.762 47.4778 105.568 46.9192 105.303C46.3958 105.057 46.0032 104.82 45.7415 104.594C45.4797 104.367 45.2708 104.104 45.1145 103.803C44.9583 103.502 44.8801 103.15 44.8801 102.748C44.8801 101.99 45.136 101.395 45.6477 100.961C46.1633 100.527 46.8743 100.311 47.7805 100.311C48.2258 100.311 48.6497 100.363 49.052 100.469C49.4583 100.574 49.8821 100.723 50.3235 100.914L49.7375 102.326C49.2805 102.139 48.9016 102.008 48.6008 101.934C48.304 101.859 48.011 101.822 47.7219 101.822C47.3782 101.822 47.1145 101.902 46.9309 102.062C46.7473 102.223 46.6555 102.432 46.6555 102.689C46.6555 102.85 46.6926 102.99 46.7668 103.111C46.8411 103.229 46.9583 103.344 47.1184 103.457C47.2825 103.566 47.6672 103.766 48.2727 104.055C49.0735 104.438 49.6223 104.822 49.9192 105.209C50.2161 105.592 50.3645 106.062 50.3645 106.621ZM55.5442 109L53.4817 102.279H53.429C53.5032 103.646 53.5403 104.559 53.5403 105.016V109H51.9172V100.434H54.3899L56.4172 106.984H56.4524L58.6028 100.434H61.0754V109H59.3821V104.945C59.3821 104.754 59.384 104.533 59.3879 104.283C59.3958 104.033 59.4231 103.369 59.47 102.291H59.4172L57.2083 109H55.5442Z" fill="white"/>
|
||||
<path d="M47.75 56.63L59 40H53.5L45 52.56L36.5 40H31L42.25 56.63L30.5 74H36L45 60.7L54 74H59.5L47.75 56.63Z" fill="white"/>
|
||||
<path d="M10 10C10 8.89543 10.8954 8 12 8H24C25.1046 8 26 8.89543 26 10V19C26 20.1046 25.1046 21 24 21H12C10.8954 21 10 20.1046 10 19V10Z" fill="white"/>
|
||||
<path d="M17.2969 19L14.8125 11.8457H14.7656C14.832 12.9082 14.8652 13.9043 14.8652 14.834V19H13.5938V10.4336H15.5684L17.9473 17.248H17.9824L20.4316 10.4336H22.4121V19H21.0645V14.7637C21.0645 14.3379 21.0742 13.7832 21.0938 13.0996C21.1172 12.416 21.1367 12.002 21.1523 11.8574H21.1055L18.5332 19H17.2969Z" fill="#1F7244"/>
|
||||
</symbol>
|
||||
</svg>
|
After Width: | Height: | Size: 2.9 KiB |
|
@ -403,12 +403,12 @@ define([
|
|||
}
|
||||
|
||||
if (this.mode.canDownload) {
|
||||
!this.panels['saveas'] && (this.panels['saveas'] = ((new DE.Views.FileMenuPanels.ViewSaveAs({menu: this})).render()));
|
||||
!this.panels['saveas'] && (this.panels['saveas'] = ((new DE.Views.FileMenuPanels.ViewSaveAs({menu: this, fileType: this.document.fileType})).render()));
|
||||
} else if (this.mode.canDownloadOrigin)
|
||||
$('a',this.miDownload.$el).text(this.textDownload);
|
||||
|
||||
if (this.mode.canDownload && (this.mode.canRequestSaveAs || this.mode.saveAsUrl)) {
|
||||
!this.panels['save-copy'] && (this.panels['save-copy'] = ((new DE.Views.FileMenuPanels.ViewSaveCopy({menu: this})).render()));
|
||||
!this.panels['save-copy'] && (this.panels['save-copy'] = ((new DE.Views.FileMenuPanels.ViewSaveCopy({menu: this, fileType: this.document.fileType})).render()));
|
||||
}
|
||||
|
||||
if (this.mode.canHelp && !this.panels['help']) {
|
||||
|
|
|
@ -63,6 +63,7 @@ define([
|
|||
{name: 'OTT', imgCls: 'ott', type: Asc.c_oAscFileType.OTT},
|
||||
{name: 'RTF', imgCls: 'rtf', type: Asc.c_oAscFileType.RTF}
|
||||
],[
|
||||
{name: 'DOCM', imgCls: 'docm', type: Asc.c_oAscFileType.DOCM},
|
||||
{name: 'HTML (Zipped)', imgCls: 'html', type: Asc.c_oAscFileType.HTML},
|
||||
{name: 'FB2', imgCls: 'fb2', type: Asc.c_oAscFileType.FB2},
|
||||
{name: 'EPUB', imgCls: 'epub', type: Asc.c_oAscFileType.EPUB}
|
||||
|
@ -74,9 +75,11 @@ define([
|
|||
'<% _.each(rows, function(row) { %>',
|
||||
'<tr>',
|
||||
'<% _.each(row, function(item) { %>',
|
||||
'<% if (item.type!==Asc.c_oAscFileType.DOCM || fileType=="docm") { %>',
|
||||
'<td><div><svg class="btn-doc-format" format="<%= item.type %>" data-hint="2" data-hint-direction="left-top" data-hint-offset="4, 4">',
|
||||
'<use xlink:href="#svg-format-<%= item.imgCls %>"></use>',
|
||||
'</svg></div></td>',
|
||||
'<% } %>',
|
||||
'<% }) %>',
|
||||
'</tr>',
|
||||
'<% }) %>',
|
||||
|
@ -87,10 +90,11 @@ define([
|
|||
Common.UI.BaseView.prototype.initialize.call(this,arguments);
|
||||
|
||||
this.menu = options.menu;
|
||||
this.fileType = options.fileType;
|
||||
},
|
||||
|
||||
render: function() {
|
||||
this.$el.html(this.template({rows:this.formats}));
|
||||
this.$el.html(this.template({rows:this.formats, fileType: (this.fileType || 'docx').toLowerCase()}));
|
||||
$('.btn-doc-format',this.el).on('click', _.bind(this.onFormatClick,this));
|
||||
|
||||
if (_.isUndefined(this.scroller)) {
|
||||
|
@ -132,6 +136,7 @@ define([
|
|||
{name: 'OTT', imgCls: 'ott', type: Asc.c_oAscFileType.OTT, ext: '.ott'},
|
||||
{name: 'RTF', imgCls: 'rtf', type: Asc.c_oAscFileType.RTF, ext: '.rtf'}
|
||||
],[
|
||||
{name: 'DOCM', imgCls: 'docm', type: Asc.c_oAscFileType.DOCM, ext: '.docm'},
|
||||
{name: 'HTML (Zipped)', imgCls: 'html', type: Asc.c_oAscFileType.HTML, ext: '.html'},
|
||||
{name: 'FB2', imgCls: 'fb2', type: Asc.c_oAscFileType.FB2, ext: '.fb2'},
|
||||
{name: 'EPUB', imgCls: 'epub', type: Asc.c_oAscFileType.EPUB, ext: '.epub'}
|
||||
|
@ -143,9 +148,11 @@ define([
|
|||
'<% _.each(rows, function(row) { %>',
|
||||
'<tr>',
|
||||
'<% _.each(row, function(item) { %>',
|
||||
'<% if (item.type!==Asc.c_oAscFileType.DOCM || fileType=="docm") { %>',
|
||||
'<td><div><svg class="btn-doc-format" format="<%= item.type %>", format-ext="<%= item.ext %>">',
|
||||
'<use xlink:href="#svg-format-<%= item.imgCls %>"></use>',
|
||||
'</svg></div></td>',
|
||||
'<% } %>',
|
||||
'<% }) %>',
|
||||
'</tr>',
|
||||
'<% }) %>',
|
||||
|
@ -156,10 +163,11 @@ define([
|
|||
Common.UI.BaseView.prototype.initialize.call(this,arguments);
|
||||
|
||||
this.menu = options.menu;
|
||||
this.fileType = options.fileType;
|
||||
},
|
||||
|
||||
render: function() {
|
||||
this.$el.html(this.template({rows:this.formats}));
|
||||
this.$el.html(this.template({rows:this.formats, fileType: (this.fileType || 'docx').toLowerCase()}));
|
||||
$('.btn-doc-format',this.el).on('click', _.bind(this.onFormatClick,this));
|
||||
|
||||
if (_.isUndefined(this.scroller)) {
|
||||
|
|
|
@ -315,6 +315,7 @@
|
|||
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/html.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/fb2.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/epub.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/docm.svg">
|
||||
<img class="inline-svg" src="resources/img/blank.svg">
|
||||
<img class="inline-svg" src="resources/img/recent-file.svg">
|
||||
<img class="inline-svg" src="resources/img/file-template.svg">
|
||||
|
|
|
@ -309,6 +309,7 @@
|
|||
<inline src="resources/img/doc-formats/html.svg" />
|
||||
<inline src="resources/img/doc-formats/fb2.svg" />
|
||||
<inline src="resources/img/doc-formats/epub.svg" />
|
||||
<inline src="resources/img/doc-formats/docm.svg" />
|
||||
<inline src="resources/img/toolbar/shapetypes.svg" />
|
||||
<inline src="resources/img/toolbar/charttypes.svg" />
|
||||
<inline src="resources/img/recent-file.svg" />
|
||||
|
|
|
@ -272,6 +272,7 @@
|
|||
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/html.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/fb2.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/epub.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/docm.svg">
|
||||
<img class="inline-svg" src="resources/img/blank.svg">
|
||||
<img class="inline-svg" src="resources/img/recent-file.svg">
|
||||
<img class="inline-svg" src="resources/img/file-template.svg">
|
||||
|
|
|
@ -315,6 +315,7 @@
|
|||
<inline src="resources/img/doc-formats/html.svg" />
|
||||
<inline src="resources/img/doc-formats/fb2.svg" />
|
||||
<inline src="resources/img/doc-formats/epub.svg" />
|
||||
<inline src="resources/img/doc-formats/docm.svg" />
|
||||
<inline src="resources/img/toolbar/shapetypes.svg" />
|
||||
<inline src="resources/img/toolbar/charttypes.svg" />
|
||||
<inline src="resources/img/recent-file.svg" />
|
||||
|
|
|
@ -402,11 +402,11 @@ define([
|
|||
}
|
||||
|
||||
if (this.mode.canDownload) {
|
||||
!this.panels['saveas'] && (this.panels['saveas'] = ((new PE.Views.FileMenuPanels.ViewSaveAs({menu: this})).render()));
|
||||
!this.panels['saveas'] && (this.panels['saveas'] = ((new PE.Views.FileMenuPanels.ViewSaveAs({menu: this, fileType: this.document.fileType})).render()));
|
||||
}
|
||||
|
||||
if (this.mode.canDownload && (this.mode.canRequestSaveAs || this.mode.saveAsUrl)) {
|
||||
!this.panels['save-copy'] && (this.panels['save-copy'] = ((new PE.Views.FileMenuPanels.ViewSaveCopy({menu: this})).render()));
|
||||
!this.panels['save-copy'] && (this.panels['save-copy'] = ((new PE.Views.FileMenuPanels.ViewSaveCopy({menu: this, fileType: this.document.fileType})).render()));
|
||||
}
|
||||
|
||||
if (this.mode.canHelp && !this.panels['help']) {
|
||||
|
|
|
@ -61,6 +61,8 @@ define([
|
|||
{name: 'POTX', imgCls: 'potx', type: Asc.c_oAscFileType.POTX},
|
||||
{name: 'PDFA', imgCls: 'pdfa', type: Asc.c_oAscFileType.PDFA},
|
||||
{name: 'OTP', imgCls: 'otp', type: Asc.c_oAscFileType.OTP}
|
||||
], [
|
||||
{name: 'PPTM', imgCls: 'pptm', type: Asc.c_oAscFileType.PPTM}
|
||||
]],
|
||||
|
||||
|
||||
|
@ -69,9 +71,11 @@ define([
|
|||
'<% _.each(rows, function(row) { %>',
|
||||
'<tr>',
|
||||
'<% _.each(row, function(item) { %>',
|
||||
'<% if (item.type!==Asc.c_oAscFileType.PPTM || fileType=="pptm") { %>',
|
||||
'<td><div><svg class="btn-doc-format" format="<%= item.type %>" data-hint="2" data-hint-direction="left-top" data-hint-offset="4, 4">',
|
||||
'<use xlink:href="#svg-format-<%= item.imgCls %>"></use>',
|
||||
'</svg></div></td>',
|
||||
'<% } %>',
|
||||
'<% }) %>',
|
||||
'</tr>',
|
||||
'<% }) %>',
|
||||
|
@ -82,10 +86,11 @@ define([
|
|||
Common.UI.BaseView.prototype.initialize.call(this,arguments);
|
||||
|
||||
this.menu = options.menu;
|
||||
this.fileType = options.fileType;
|
||||
},
|
||||
|
||||
render: function() {
|
||||
this.$el.html(this.template({rows:this.formats}));
|
||||
this.$el.html(this.template({rows:this.formats, fileType: (this.fileType || 'pptx').toLowerCase()}));
|
||||
$('.btn-doc-format',this.el).on('click', _.bind(this.onFormatClick,this));
|
||||
|
||||
if (_.isUndefined(this.scroller)) {
|
||||
|
@ -124,6 +129,8 @@ define([
|
|||
{name: 'POTX', imgCls: 'potx', type: Asc.c_oAscFileType.POTX, ext: '.potx'},
|
||||
{name: 'PDFA', imgCls: 'pdfa', type: Asc.c_oAscFileType.PDFA, ext: '.pdf'},
|
||||
{name: 'OTP', imgCls: 'otp', type: Asc.c_oAscFileType.OTP, ext: '.otp'}
|
||||
], [
|
||||
{name: 'PPTM', imgCls: 'pptm', type: Asc.c_oAscFileType.PPTM, ext: '.pptm'}
|
||||
]],
|
||||
|
||||
template: _.template([
|
||||
|
@ -131,9 +138,11 @@ define([
|
|||
'<% _.each(rows, function(row) { %>',
|
||||
'<tr>',
|
||||
'<% _.each(row, function(item) { %>',
|
||||
'<% if (item.type!==Asc.c_oAscFileType.PPTM || fileType=="pptm") { %>',
|
||||
'<td><div><svg class="btn-doc-format" format="<%= item.type %>", format-ext="<%= item.ext %>">',
|
||||
'<use xlink:href="#svg-format-<%= item.imgCls %>"></use>',
|
||||
'</svg></div></td>',
|
||||
'<% } %>',
|
||||
'<% }) %>',
|
||||
'</tr>',
|
||||
'<% }) %>',
|
||||
|
@ -144,10 +153,11 @@ define([
|
|||
Common.UI.BaseView.prototype.initialize.call(this,arguments);
|
||||
|
||||
this.menu = options.menu;
|
||||
this.fileType = options.fileType;
|
||||
},
|
||||
|
||||
render: function() {
|
||||
this.$el.html(this.template({rows:this.formats}));
|
||||
this.$el.html(this.template({rows:this.formats, fileType: (this.fileType || 'pptx').toLowerCase()}));
|
||||
$('.btn-doc-format',this.el).on('click', _.bind(this.onFormatClick,this));
|
||||
|
||||
if (_.isUndefined(this.scroller)) {
|
||||
|
|
|
@ -333,6 +333,7 @@
|
|||
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/pdfa.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/odp.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/otp.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/pptm.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/blank.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/toolbar/shapetypes.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/toolbar/charttypes.svg">
|
||||
|
|
|
@ -355,6 +355,7 @@
|
|||
<inline src="resources/img/doc-formats/pdfa.svg" />
|
||||
<inline src="resources/img/doc-formats/odp.svg" />
|
||||
<inline src="resources/img/doc-formats/otp.svg" />
|
||||
<inline src="resources/img/doc-formats/pptm.svg" />
|
||||
<inline src="resources/img/doc-formats/blank.svg" />
|
||||
<inline src="resources/img/toolbar/shapetypes.svg" />
|
||||
<inline src="resources/img/toolbar/charttypes.svg" />
|
||||
|
|
|
@ -256,6 +256,7 @@
|
|||
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/pdfa.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/odp.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/otp.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/pptm.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/blank.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/toolbar/shapetypes.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/toolbar/charttypes.svg">
|
||||
|
|
|
@ -310,6 +310,7 @@
|
|||
<inline src="resources/img/doc-formats/pdfa.svg" />
|
||||
<inline src="resources/img/doc-formats/odp.svg" />
|
||||
<inline src="resources/img/doc-formats/otp.svg" />
|
||||
<inline src="resources/img/doc-formats/pptm.svg" />
|
||||
<inline src="resources/img/doc-formats/blank.svg" />
|
||||
<inline src="resources/img/toolbar/shapetypes.svg" />
|
||||
<inline src="resources/img/toolbar/charttypes.svg" />
|
||||
|
|
|
@ -377,11 +377,11 @@ define([
|
|||
}
|
||||
|
||||
if (this.mode.canDownload) {
|
||||
!this.panels['saveas'] && (this.panels['saveas'] = (new SSE.Views.FileMenuPanels.ViewSaveAs({menu: this})).render());
|
||||
!this.panels['saveas'] && (this.panels['saveas'] = (new SSE.Views.FileMenuPanels.ViewSaveAs({menu: this, fileType: this.document.fileType})).render());
|
||||
}
|
||||
|
||||
if (this.mode.canDownload && (this.mode.canRequestSaveAs || this.mode.saveAsUrl)) {
|
||||
!this.panels['save-copy'] && (this.panels['save-copy'] = (new SSE.Views.FileMenuPanels.ViewSaveCopy({menu: this})).render());
|
||||
!this.panels['save-copy'] && (this.panels['save-copy'] = (new SSE.Views.FileMenuPanels.ViewSaveCopy({menu: this, fileType: this.document.fileType})).render());
|
||||
}
|
||||
|
||||
if (this.mode.canHelp && !this.panels['help']) {
|
||||
|
|
|
@ -50,7 +50,8 @@ define([
|
|||
],[
|
||||
{name: 'XLTX', imgCls: 'xltx', type: Asc.c_oAscFileType.XLTX},
|
||||
{name: 'PDFA', imgCls: 'pdfa', type: Asc.c_oAscFileType.PDFA},
|
||||
{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: 'HTML', imgCls: 'html', type: Asc.c_oAscFileType.HTML}
|
||||
|
@ -63,9 +64,11 @@ define([
|
|||
'<% _.each(rows, function(row) { %>',
|
||||
'<tr>',
|
||||
'<% _.each(row, function(item) { %>',
|
||||
'<% if (item.type!==Asc.c_oAscFileType.XLSM || fileType=="xlsm") { %>',
|
||||
'<td><div><svg class="btn-doc-format" format="<%= item.type %>" data-hint="2" data-hint-direction="left-top" data-hint-offset="4, 4">',
|
||||
'<use xlink:href="#svg-format-<%= item.imgCls %>"></use>',
|
||||
'</svg></div></td>',
|
||||
'<% } %>',
|
||||
'<% }) %>',
|
||||
'</tr>',
|
||||
'<% }) %>',
|
||||
|
@ -76,10 +79,11 @@ define([
|
|||
Common.UI.BaseView.prototype.initialize.call(this,arguments);
|
||||
|
||||
this.menu = options.menu;
|
||||
this.fileType = options.fileType;
|
||||
},
|
||||
|
||||
render: function() {
|
||||
this.$el.html(this.template({rows:this.formats}));
|
||||
this.$el.html(this.template({rows:this.formats, fileType: (this.fileType || 'xlsx').toLowerCase()}));
|
||||
$('.btn-doc-format',this.el).on('click', _.bind(this.onFormatClick,this));
|
||||
|
||||
if (_.isUndefined(this.scroller)) {
|
||||
|
@ -118,7 +122,8 @@ define([
|
|||
],[
|
||||
{name: 'XLTX', imgCls: 'xltx', type: Asc.c_oAscFileType.XLTX, ext: '.xltx'},
|
||||
{name: 'PDFA', imgCls: 'pdfa', type: Asc.c_oAscFileType.PDFA, ext: '.pdf'},
|
||||
{name: 'OTS', imgCls: 'ots', type: Asc.c_oAscFileType.OTS, ext: '.ots'}
|
||||
{name: 'OTS', imgCls: 'ots', type: Asc.c_oAscFileType.OTS, ext: '.ots'},
|
||||
{name: 'XLSM', imgCls: 'xlsm', type: Asc.c_oAscFileType.XLSM, ext: '.xlsm'}
|
||||
]
|
||||
// ,[
|
||||
// {name: 'HTML', imgCls: 'html', type: Asc.c_oAscFileType.HTML, ext: '.html'}
|
||||
|
@ -130,9 +135,11 @@ define([
|
|||
'<% _.each(rows, function(row) { %>',
|
||||
'<tr>',
|
||||
'<% _.each(row, function(item) { %>',
|
||||
'<% if (item.type!==Asc.c_oAscFileType.XLSM || fileType=="xlsm") { %>',
|
||||
'<td><div><svg class="btn-doc-format" format="<%= item.type %>", format-ext="<%= item.ext %>">',
|
||||
'<use xlink:href="#svg-format-<%= item.imgCls %>"></use>',
|
||||
'</svg></div></td>',
|
||||
'<% } %>',
|
||||
'<% }) %>',
|
||||
'</tr>',
|
||||
'<% }) %>',
|
||||
|
@ -143,10 +150,11 @@ define([
|
|||
Common.UI.BaseView.prototype.initialize.call(this,arguments);
|
||||
|
||||
this.menu = options.menu;
|
||||
this.fileType = options.fileType;
|
||||
},
|
||||
|
||||
render: function() {
|
||||
this.$el.html(this.template({rows:this.formats}));
|
||||
this.$el.html(this.template({rows:this.formats, fileType: (this.fileType || 'xlsx').toLowerCase()}));
|
||||
$('.btn-doc-format',this.el).on('click', _.bind(this.onFormatClick,this));
|
||||
|
||||
if (_.isUndefined(this.scroller)) {
|
||||
|
|
|
@ -350,6 +350,7 @@
|
|||
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/ods.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/ots.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/csv.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/xlsm.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/blank.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/toolbar/shapetypes.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/toolbar/charttypes.svg">
|
||||
|
|
|
@ -369,6 +369,7 @@
|
|||
<inline src="resources/img/doc-formats/ods.svg" />
|
||||
<inline src="resources/img/doc-formats/ots.svg" />
|
||||
<inline src="resources/img/doc-formats/csv.svg" />
|
||||
<inline src="resources/img/doc-formats/xlsm.svg" />
|
||||
<inline src="resources/img/doc-formats/blank.svg" />
|
||||
<inline src="resources/img/toolbar/shapetypes.svg" />
|
||||
<inline src="resources/img/toolbar/charttypes.svg" />
|
||||
|
|
|
@ -259,6 +259,7 @@
|
|||
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/ods.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/ots.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/csv.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/xlsm.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/doc-formats/blank.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/toolbar/shapetypes.svg">
|
||||
<img class="inline-svg" src="../../common/main/resources/img/toolbar/charttypes.svg">
|
||||
|
|
|
@ -310,6 +310,7 @@
|
|||
<inline src="resources/img/doc-formats/ods.svg" />
|
||||
<inline src="resources/img/doc-formats/ots.svg" />
|
||||
<inline src="resources/img/doc-formats/csv.svg" />
|
||||
<inline src="resources/img/doc-formats/xlsm.svg" />
|
||||
<inline src="resources/img/doc-formats/blank.svg" />
|
||||
<inline src="resources/img/toolbar/shapetypes.svg" />
|
||||
<inline src="resources/img/toolbar/charttypes.svg" />
|
||||
|
|
Loading…
Reference in a new issue