Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Poirier <theeth@yahoo.com>2009-12-21 21:14:39 +0300
committerMartin Poirier <theeth@yahoo.com>2009-12-21 21:14:39 +0300
commitfc1ede345d7796249c79f030ef09d6457cd6fcb0 (patch)
tree940b581c89a2035ee092a6f72f8150f2624fdb95 /release/scripts
parent90e9aee9b8cd7349fd4458c3f7d0141073958dc4 (diff)
netrender: visibility toggle for full list of fluid and cache files in the job web page
Diffstat (limited to 'release/scripts')
-rw-r--r--release/scripts/io/netrender/master_html.py25
-rw-r--r--release/scripts/io/netrender/netrender.css17
-rw-r--r--release/scripts/io/netrender/netrender.js37
3 files changed, 71 insertions, 8 deletions
diff --git a/release/scripts/io/netrender/master_html.py b/release/scripts/io/netrender/master_html.py
index d4458ff4669..99d74b64019 100644
--- a/release/scripts/io/netrender/master_html.py
+++ b/release/scripts/io/netrender/master_html.py
@@ -51,8 +51,19 @@ def get(handler):
output("</tr></thead>")
- def rowTable(*data):
- output("<tr>")
+ def rowTable(*data, id = None, class_style = None, extra = None):
+ output("<tr")
+
+ if id:
+ output(" id='%s'" % id)
+
+ if class_style:
+ output(" class='%s'" % class_style)
+
+ if extra:
+ output(" %s" % extra)
+
+ output(">")
for c in data:
output("<td>" + str(c) + "</td>")
@@ -172,10 +183,16 @@ def get(handler):
rowTable(file.filepath)
if tot_cache > 0:
- rowTable("%i physic cache files" % tot_cache)
+ rowTable("%i physic cache files" % tot_cache, class_style = "toggle", extra = "onclick='toggleDisplay(&quot;.cache&quot;, &quot;none&quot;, &quot;table-row&quot;)'")
+ for file in job.files:
+ if file.filepath.endswith(".bphys"):
+ rowTable(os.path.split(file.filepath)[1], class_style = "cache")
if tot_fluid > 0:
- rowTable("%i fluid bake files" % tot_fluid)
+ rowTable("%i fluid bake files" % tot_fluid, class_style = "toggle", extra = "onclick='toggleDisplay(&quot;.fluid&quot;, &quot;none&quot;, &quot;table-row&quot;)'")
+ for file in job.files:
+ if file.filepath.endswith(".bobj.gz") or file.filepath.endswith(".bvel.gz"):
+ rowTable(os.path.split(file.filepath)[1], class_style = "fluid")
endTable()
diff --git a/release/scripts/io/netrender/netrender.css b/release/scripts/io/netrender/netrender.css
index ac47b36861a..20a64ff984a 100644
--- a/release/scripts/io/netrender/netrender.css
+++ b/release/scripts/io/netrender/netrender.css
@@ -13,7 +13,7 @@ a:hover {
}
h2 {
background-color:#ddd;
- font-size:120%
+ font-size:120%;
padding:5px;
}
@@ -34,7 +34,7 @@ td {
padding:2px;
padding-left:10px;
padding-right:10px;
- margin-left:20px
+ margin-left:20px;
background-color:#ddd;
}
td:hover {
@@ -49,3 +49,16 @@ button {
height: auto;
}
+.toggle {
+ text-decoration: underline;
+ cursor: pointer;
+}
+
+
+.cache {
+ display: none;
+}
+
+.fluid {
+ display: none;
+}
diff --git a/release/scripts/io/netrender/netrender.js b/release/scripts/io/netrender/netrender.js
index 50d7042cf74..23f9f25c763 100644
--- a/release/scripts/io/netrender/netrender.js
+++ b/release/scripts/io/netrender/netrender.js
@@ -1,10 +1,43 @@
-function request(url, data) {
+function request(url, data)
+{
xmlhttp = new XMLHttpRequest();
xmlhttp.open("POST", url, false);
xmlhttp.send(data);
window.location.reload()
}
-function edit(id, info) {
+function edit(id, info)
+{
request("/edit_" + id, info)
+}
+
+function returnObjById( id )
+{
+ if (document.getElementById)
+ var returnVar = document.getElementById(id);
+ else if (document.all)
+ var returnVar = document.all[id];
+ else if (document.layers)
+ var returnVar = document.layers[id];
+ return returnVar;
+}
+
+function toggleDisplay( className, value1, value2 )
+{
+ style = getStyle(className)
+
+ if (style.style["display"] == value1) {
+ style.style["display"] = value2;
+ } else {
+ style.style["display"] = value1;
+ }
+}
+
+function getStyle(className) {
+ var classes = document.styleSheets[0].rules || document.styleSheets[0].cssRules
+ for(var x=0;x<classes.length;x++) {
+ if(classes[x].selectorText==className) {
+ return classes[x];
+ }
+ }
} \ No newline at end of file