@@ -110,6 +110,7 @@ export default {
110110 if (this .isEditable ) {
111111 this .$nextTick (() => {
112112 this .getDownloadElement ().removeAttribute (' hidden' )
113+ this .getSecondaryDownloadElement ().removeAttribute (' hidden' )
113114 })
114115 }
115116 },
@@ -124,6 +125,10 @@ export default {
124125 return this .getIframeDocument ().getElementById (' download' )
125126 },
126127
128+ getSecondaryDownloadElement () {
129+ return this .getIframeDocument ().getElementById (' secondaryDownload' )
130+ },
131+
127132 getViewerTemplateParameter (parameterName ) {
128133 // templates/viewer.php provides the PDF viewer parameters in the
129134 // data attributes of the head element.
@@ -195,6 +200,7 @@ export default {
195200 onSetModifiedOriginal .apply (null , arguments )
196201
197202 this .getDownloadElement ().removeAttribute (' disabled' )
203+ this .getSecondaryDownloadElement ().removeAttribute (' disabled' )
198204 }
199205 })
200206
@@ -261,6 +267,10 @@ export default {
261267 downloadElement .setAttribute (' disabled' , ' disabled' )
262268 downloadElement .classList .add (' icon-loading-small' )
263269
270+ const secondaryDownloadElement = this .getSecondaryDownloadElement ()
271+ secondaryDownloadElement .setAttribute (' disabled' , ' disabled' )
272+ secondaryDownloadElement .classList .add (' icon-loading-small' )
273+
264274 logger .info (' PDF Document with annotation is being saved' )
265275
266276 this .PDFViewerApplication .pdfDocument .saveDocument ().then ((data ) => {
@@ -276,8 +286,10 @@ export default {
276286 // successful it will be enabled again when a new annotation is
277287 // added.
278288 downloadElement .removeAttribute (' disabled' )
289+ secondaryDownloadElement .removeAttribute (' disabled' )
279290 }).finally (() => {
280291 downloadElement .classList .remove (' icon-loading-small' )
292+ secondaryDownloadElement .classList .remove (' icon-loading-small' )
281293 })
282294 },
283295 },
0 commit comments