Use anchor element to export the selected hanging protocol instead of using saveAs function of jszip library
This commit is contained in:
parent
77182d1916
commit
dfbd63fcb7
@ -120,6 +120,7 @@
|
||||
<p class="lastSavedText">Last saved {{jsDateFromNow modifiedDate}}</p>
|
||||
{{/if}}
|
||||
</div>
|
||||
<a id="downloadElement" style="display:none;"></a>
|
||||
{{/with}}
|
||||
</div>
|
||||
</template>
|
||||
@ -321,7 +321,10 @@ Template.protocolEditor.events({
|
||||
filename = selectedProtocol.name + '-' + (currentDate.getTime().toString()) + '.json',
|
||||
protocolBlob = new Blob([protocolJSON], { type: 'application/json' });
|
||||
|
||||
saveAs(protocolBlob, filename);
|
||||
var downloadElement = document.getElementById('downloadElement');
|
||||
downloadElement.href = URL.createObjectURL(protocolBlob);
|
||||
downloadElement.download = filename;
|
||||
downloadElement.click();
|
||||
},
|
||||
/**
|
||||
* Delete the currently selected Protocol
|
||||
|
||||
Loading…
Reference in New Issue
Block a user