From 9999c6cd9ab120e7aa107638ce5d2924b1c48756 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Sun, 14 Mar 2021 12:49:43 +0530 Subject: changed fixed value to dynamic --- assets/src/index.html | 2 +- assets/src/js/main.js | 26 ++++++++++++++++++++++---- assets/src/template/analyse.html | 30 +++++++----------------------- assets/src/template/drug-form.html | 6 +++--- assets/src/template/navbar.html | 2 +- 5 files changed, 34 insertions(+), 32 deletions(-) (limited to 'assets') diff --git a/assets/src/index.html b/assets/src/index.html index af730f4..b8d3a67 100644 --- a/assets/src/index.html +++ b/assets/src/index.html @@ -9,7 +9,7 @@
-

Doge420

+

Doge420

My teacher said to my I'm a failure, that I'll never amount to anything. I scoffed at him. Shocked, my teacher asked what's so funny, my future is on the line. "Well...you see professor" I say as the teacher prepares to laugh at my answer, rebuttal at hand. "I watch Rick and Morty." The class is shocked, they merely watch pleb shows like the big bang theory to feign intelligence, not grasping the humor. "...how? I can't even understand it's sheer nuance and subtlety." "Well you see...WUBBA LUBBA DUB DUB!" One line student laughs in the back, I turn to see a who this fellow genius is. It's none other than Albert Einstein.

Do Nothing diff --git a/assets/src/js/main.js b/assets/src/js/main.js index 936215e..dbcc4a6 100644 --- a/assets/src/js/main.js +++ b/assets/src/js/main.js @@ -44,10 +44,28 @@ function draw_me_like_one_of_your_french_girls(mol){ function calculate_and_disperse(mol){ - var descrs = JSON.parse(mol.get_descriptors()); - document.getElementById('exactmw').textContent = descrs["exactmw"]; - document.getElementById('CrippenMR').textContent = descrs["CrippenMR"]; - document.getElementById('CrippenClogP').textContent = descrs["CrippenClogP"]; + try { + var descrs = JSON.parse(mol.get_descriptors()); + } catch(err) { + alert("oo wee, failed to calculate descriptors senpai") + } + //document.getElementById('exactmw').textContent = descrs["exactmw"]; + //document.getElementById('CrippenMR').textContent = descrs["CrippenMR"]; + //document.getElementById('CrippenClogP').textContent = descrs["CrippenClogP"]; + let tableRef = document.getElementById("analyse_table"); + const keys = Object.keys(descrs); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + console.log(key, descrs[key]); + var newRow = tableRef.insertRow(-1); + var newCell_label = newRow.insertCell(0); + var newCell_value = newRow.insertCell(-1); + var newText_label = document.createTextNode(key); + var newText_value = document.createTextNode(descrs[key]); + newCell_label.appendChild(newText_label); + newCell_value.appendChild(newText_value); + } + } diff --git a/assets/src/template/analyse.html b/assets/src/template/analyse.html index ce8d097..00f2aea 100644 --- a/assets/src/template/analyse.html +++ b/assets/src/template/analyse.html @@ -1,5 +1,6 @@ +

-

Workbench

+

Workbench

@@ -8,33 +9,16 @@ - - - - - - - - - - - - - - - - - - - - - + +
# Property ValueReference
1Exact M.W.--
2CrippenMR--
3CrippenClogP--
-
\ No newline at end of file +
\ No newline at end of file diff --git a/assets/src/template/drug-form.html b/assets/src/template/drug-form.html index 454ec09..f3ecc0a 100644 --- a/assets/src/template/drug-form.html +++ b/assets/src/template/drug-form.html @@ -1,7 +1,7 @@ -
+
-

Drug

+

Analyse Compound

*Snorts Cocoa Cola*

Ok so people can’t have opinions, the people on this sub are the reason there are instructions on toothpaste. Everyone here are cancerous sheep who have been mind controlled to upvoting if they see a 69, 420, Instagram Fortnite and TikTok bad Minecraft good. I’m not saying I like any of these more than Minecraft but people are allowed to have opinions. So next time you call someone a normie realize who the real normie is🤡

@@ -19,4 +19,4 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/assets/src/template/navbar.html b/assets/src/template/navbar.html index 8bfaa00..f8a8341 100644 --- a/assets/src/template/navbar.html +++ b/assets/src/template/navbar.html @@ -1,6 +1,6 @@