Permalink
Browse files

Merge pull request #5 from wilbur-shi/gh-pages

Change to loading icon when uploading ZIP
  • Loading branch information...
2 parents 7bcf6a5 + 97c6ea1 commit aed43e8f219a1edc3a16329cbfebc2e4aefd9299 @jmkao jmkao committed Aug 24, 2016
Showing with 3 additions and 1 deletion.
  1. +3 −1 js/photonic3d.js
View
@@ -75,6 +75,7 @@ function initializeValues() {
}
function makeZip() {
+ $('#uploadzip-icon').prop('class', 'glyphicon glyphicon-refresh glyphicon-spin');
if (zipFile === null || zipFile === undefined) {
alert("You must first slice images to generate a zip file.");
} else {
@@ -96,6 +97,7 @@ function uploadZip(zipFile, fileName) {
request.onreadystatechange = function () {
if (request.readyState == 4 && request.status == 200) {
// window.open('/printablesPage', '_self');
+ $('#uploadzip-icon').prop('class', 'glyphicon glyphicon-upload');
alert("Upload successful! Refresh printables page on Photonic3D to see the file.");
}
}
@@ -119,7 +121,7 @@ function makeButton() {
newbtn.id = "new-zip-button";
newbtn.className = "btn btn-primary";
newbtn.disabled = true;
- newbtn.innerHTML = '<span class="glyphicon glyphicon-upload"></span> Upload ZIP To Photonic3D';
+ newbtn.innerHTML = '<i class="glyphicon glyphicon-upload" id="uploadzip-icon"></i> Upload ZIP To Photonic3D';
}
var oldEndSlicing = endSlicing;

0 comments on commit aed43e8

Please sign in to comment.