Use anchor element to export the selected hanging protocol instead of using saveAs function of jszip library
This commit is contained in:
1 parent
77182d1916
commit
dfbd63fcb7
2 files changed
+5
-1
No files matched your search
@@ -120,6 +120,7 @@
|
|||||||
<p class="lastSavedText">Last saved {{jsDateFromNow modifiedDate}}</p>
|
<p class="lastSavedText">Last saved {{jsDateFromNow modifiedDate}}</p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
<a id="downloadElement" style="display:none;"></a>
|
||||||
{{/with}}
|
{{/with}}
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -321,7 +321,10 @@ Template.protocolEditor.events({
|
|||||||
filename = selectedProtocol.name + '-' + (currentDate.getTime().toString()) + '.json',
|
filename = selectedProtocol.name + '-' + (currentDate.getTime().toString()) + '.json',
|
||||||
protocolBlob = new Blob([protocolJSON], { type: 'application/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
|
* Delete the currently selected Protocol
|
||||||
|
|||||||
Reference in new issue
Block a user