From 85062e68e167875c1a9f4c160b151afd17e39fca Mon Sep 17 00:00:00 2001
From: Chiara Cotroneo <10923004+selenocysteine@users.noreply.github.com>
Date: Fri, 7 Sep 2018 10:59:27 +0100
Subject: [PATCH] Proposed fix for the node highlighter in the demo.
---
README.md | 19 +++++
demo/ete.css | 218 +++++++++++++++++++++++++--------------------------
demo/ete.js | 116 +++++++++++++--------------
3 files changed, 184 insertions(+), 169 deletions(-)
create mode 100644 README.md
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..8fbcd98
--- /dev/null
+++ b/README.md
@@ -0,0 +1,19 @@
+### Dependencies
+
+- ete3 from github (master branch)
+
+```
+pip install https://github.com/etetoolkit/ete/archive/master.zip
+pip install bottle cherrypy
+```
+
+### Demo
+- To run the demo:
+
+```
+python test_phylotastic.py
+```
+
+- open ``demo/webplugin_example.html` in a browser running in the machine as the test script.
+
+
diff --git a/demo/ete.css b/demo/ete.css
index 1eabd45..0bcb4d2 100644
--- a/demo/ete.css
+++ b/demo/ete.css
@@ -1,125 +1,121 @@
-#popup
-{
- font-family: Arial;
- font-size: 10pt;
- border: 1px solid #777;
- margin: 0px;
- padding: 0px;
- z-index:100;
- }
-
-#popup ul
-{
- margin: 0px;
- padding: 0px;
- }
-
-#popup li
-{
- font-size: 10pt;
- margin: 0px;
- margin-left: 4px;
- padding: 0px;
- list-style-type: none;
- padding-left: 2px;
- padding-right: 2px;
- border-bottom: 1px solid #ccc;
- background-image: none;
- }
-
-#popup a
-{
- color: #565B53;
- text-decoration:none;
-}
-
-#popup a:hover
-{
- color: #000000;
- text-decoration:none;
-}
-
-#ete_popup_header_text
-{
- margin-right: 10px;
- margin-left: 6px;
- font-size: 12pt;
- color: #565B53;
-}
-
-.ete_popup_item
-{
- color: #565B53;
- border-bottom: 1px solid #ccc;
- }
-
-#ete_popup_header{
- cursor: move;
- margin-bottom: 4px;
- padding-right: 2px;
- padding-left: 2px;
- background-color:#EEE;
- border-bottom: 1px solid #ccc;
- padding: 0px;
- font-size: 10pt;
- font-weight:bold;
- border-bottom:6px solid #565B53;
- }
-
-#ete_close_popup{
- background-image:url('/TreeViewer/close.png');
- width:16px;
- height:16px;
- cursor:auto;
- float:right;
-}
-
-#ete_popup_header span{
-cursor: auto;
-}
-
-#ete_tree_buttons{
+#popup {
+ font-family: Arial;
+ font-size: 10pt;
+ border: 1px solid #777;
+ margin: 0px;
+ padding: 0px;
+ z-index: 100;
+}
+
+#popup ul {
+ margin: 0px;
+ padding: 0px;
+}
+
+#popup li {
+ font-size: 10pt;
+ margin: 0px;
+ margin-left: 4px;
+ padding: 0px;
+ list-style-type: none;
+ padding-left: 2px;
+ padding-right: 2px;
+ border-bottom: 1px solid #ccc;
+ background-image: none;
+}
+
+#popup a {
+ color: #565B53;
+ text-decoration: none;
+}
+
+#popup a:hover {
+ color: #000000;
+ text-decoration: none;
+}
+
+#ete_popup_header_text {
+ margin-right: 10px;
+ margin-left: 6px;
+ font-size: 12pt;
+ color: #565B53;
+}
+
+.ete_popup_item {
+ color: #565B53;
border-bottom: 1px solid #ccc;
}
-#ete_tree_buttons li{
+#ete_popup_header {
+ cursor: move;
+ margin-bottom: 4px;
+ padding-right: 2px;
+ padding-left: 2px;
+ background-color: #EEE;
+ border-bottom: 1px solid #ccc;
+ padding: 0px;
+ font-size: 10pt;
+ font-weight: bold;
+ border-bottom: 6px solid #565B53;
+}
+
+#ete_close_popup {
+ background-image: url('/TreeViewer/close.png');
+ width: 16px;
+ height: 16px;
+ cursor: auto;
+ float: right;
+}
+
+#ete_popup_header span {
+ cursor: auto;
+}
+
+#ete_tree_buttons {
+ border-bottom: 1px solid #ccc;
+}
+
+#ete_tree_buttons li {
display: inline;
}
-.tree_box_header{
- padding-right:4px;
- background-color:#eee;
- border-bottom:4px solid #555;
- font-weight:bold;
- cursor:move;
+.tree_box_header {
+ padding-right: 4px;
+ background-color: #eee;
+ border-bottom: 4px solid #555;
+ font-weight: bold;
+ cursor: move;
}
-.tree_box_header img{
- float:right;
- cursor: auto;
+.tree_box_header img {
+ float: right;
+ cursor: auto;
}
-#tree_features_box{
-display:none;
-z-index:100;
-border: 1px dotted #555;
-text-align:left;
-background-color: #fff;
+#tree_features_box {
+ display: none;
+ z-index: 100;
+ border: 1px dotted #555;
+ text-align: left;
+ background-color: #fff;
}
-#search_in_tree_box{
-display:none;
-z-index:100;
-border: 1px dotted #555;
-text-align:center;
-background-color: #fff;
+
+#search_in_tree_box {
+ display: none;
+ z-index: 100;
+ border: 1px dotted #555;
+ text-align: center;
+ background-color: #fff;
}
#highlighter {
- position: absolute;
- visibility: visible;
- z-index:100;
- top:0;
- left:0;
- width: 70px; height: 70px;
- border: 1px solid indianred;
- }
+ position: absolute;
+ visibility: visible;
+ z-index: -1;
+ top: 0;
+ left: 0;
+ width: 70px;
+ height: 70px;
+ border: 1px solid indianred;
+ background: indianred;
+}
diff --git a/demo/ete.js b/demo/ete.js
index d62fe5e..700d288 100644
--- a/demo/ete.js
+++ b/demo/ete.js
@@ -2,89 +2,89 @@
var ete_webplugin_URL = "http://localhost:8989";
var loading_img = '
';
-function update_server_status(){
- console.log('updating');
- $('#server_status').load(ete_webplugin_URL+"/status");
+function update_server_status() {
+ $('#server_status').load(ete_webplugin_URL + "/status");
}
-function get_tree_image(newick, recipient){
- var treeid = makeid();
- $(recipient).html('