about summary refs log tree commit diff
path: root/bh20simplewebuploader/static
diff options
context:
space:
mode:
Diffstat (limited to 'bh20simplewebuploader/static')
-rw-r--r--bh20simplewebuploader/static/main.css6
-rw-r--r--bh20simplewebuploader/static/main.js31
2 files changed, 22 insertions, 15 deletions
diff --git a/bh20simplewebuploader/static/main.css b/bh20simplewebuploader/static/main.css
index c881253..1bb9c8e 100644
--- a/bh20simplewebuploader/static/main.css
+++ b/bh20simplewebuploader/static/main.css
@@ -10,7 +10,7 @@ body {
 
 h1, h2, h3, h4 {
     font-family: 'Inter', sans-serif;
-    color: #0ED1CD;
+    color: #008066;
 }
 
 h1 {
@@ -68,7 +68,7 @@ form h4 {
 
 .button {
     border-radius: 5px;
-    background: #0ED1CD;
+    background: #B2F8F8;
     margin: 0.3em auto;
     padding: 0.4em;
 }
@@ -125,7 +125,7 @@ span.dropt:hover {text-decoration: none; background: #ffffff; z-index: 6; }
 }
 
 a {
-    color: #40DBD8;
+    color: #008066;
     font-weight: 700;
 }
 
diff --git a/bh20simplewebuploader/static/main.js b/bh20simplewebuploader/static/main.js
index 56213fa..7084e1f 100644
--- a/bh20simplewebuploader/static/main.js
+++ b/bh20simplewebuploader/static/main.js
@@ -49,7 +49,7 @@ let fetchAllaccessions = () => {
 let uploadForm = document.getElementById('metadata_upload_form')
 let uploadFormSpot = document.getElementById('metadata_upload_form_spot')
 let fillForm = document.getElementById('metadata_fill_form')
-let fillFormSpot = document.getElementById('metadata_fill_form_spot') 
+let fillFormSpot = document.getElementById('metadata_fill_form_spot')
 
 function setUploadMode() {
   // Make the upload form the one in use.
@@ -91,20 +91,20 @@ setMode()
 function addField(e) {
   // Find our parent field-group div
   let fieldGroup = this.parentElement
-  
+
   // Get its keypath
   let keypath = fieldGroup.dataset.keypath
-  
+
   // Find its last field child
   let existingFields = fieldGroup.getElementsByClassName('field')
   let templateField = existingFields[existingFields.length - 1]
-  
+
   // Get its number
   let fieldNumber = templateField.dataset.number
-  
+
   // Duplicate it
   let newField = templateField.cloneNode(true)
-  
+
   // Increment the number and use the keypath and number to set IDs and cross
   // references.
   // TODO: Heavily dependent on the form field HTML. Maybe we want custom
@@ -117,13 +117,13 @@ function addField(e) {
   newControl.setAttribute('name', newID)
   let newLabel = newField.getElementsByTagName('label')[0]
   newLabel.setAttribute('for', newID)
-  
+
   // Find the minus button
   let minusButton = fieldGroup.getElementsByClassName('remove-field')[0]
-  
+
   // Put new field as a child before the minus button
   fieldGroup.insertBefore(newField, minusButton)
-  
+
   // Enable the minus button
   minusButton.classList.remove('invisible')
 }
@@ -134,16 +134,16 @@ function addField(e) {
 function removeField(e) {
   // Find our parent field-group div
   let fieldGroup = this.parentElement
-  
+
   // Find its field children
   let existingFields = fieldGroup.getElementsByClassName('field')
-  
+
   if (existingFields.length > 1) {
     // There is a last field we can safely remove.
     let lastField = existingFields[existingFields.length - 1]
     fieldGroup.removeChild(lastField)
   }
-  
+
   if (existingFields.length <= 1) {
     // Collection auto-updates. Now there's only one element. Don't let the
     // user remove it. If they don't want it, they can leave it empty.
@@ -159,3 +159,10 @@ for (let button of document.getElementsByClassName('remove-field')) {
   button.addEventListener('click', removeField)
 }
 
+// Change the submit button after hitting
+
+function on_submit_button() {
+    var elem = document.getElementById("submit");
+    elem.value = "Submitting...";
+    elem.disabled = true;
+}