summaryrefslogtreecommitdiffstats
path: root/webui_content
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2007-10-12 15:55:00 -0400
committerMichael DeHaan <mdehaan@redhat.com>2007-10-12 15:55:00 -0400
commit427514b86d143d0c12766a9a6fb683a69d997e29 (patch)
tree613a3167bb9ba1d23759526a5c4f49191d28d873 /webui_content
parented637d1920d8bba36032612ff0847de627a66222 (diff)
downloadthird_party-cobbler-427514b86d143d0c12766a9a6fb683a69d997e29.tar.gz
third_party-cobbler-427514b86d143d0c12766a9a6fb683a69d997e29.tar.xz
third_party-cobbler-427514b86d143d0c12766a9a6fb683a69d997e29.zip
Working on WebUI, still some work to do in regards to hiding MACs and so forth...
Diffstat (limited to 'webui_content')
-rw-r--r--webui_content/cobbler.js (renamed from webui_content/showhide.js)32
-rw-r--r--webui_content/list-collapse.pngbin0 -> 215 bytes
-rw-r--r--webui_content/list-expand.pngbin0 -> 400 bytes
-rw-r--r--webui_content/list-parent.pngbin0 -> 923 bytes
4 files changed, 24 insertions, 8 deletions
diff --git a/webui_content/showhide.js b/webui_content/cobbler.js
index d2f39e1..0680576 100644
--- a/webui_content/showhide.js
+++ b/webui_content/cobbler.js
@@ -1,9 +1,13 @@
-// Javascript code by Máirín Duffy <duffy@redhat.com>
+function global_onload() {
+ if (page_onload) {
+ page_onload();
+ }
+}
-IMAGE_COLLAPSED_PATH = '/img/list-expand.gif';
-IMAGE_EXPANDED_PATH = '/img/list-collapse.gif';
-IMAGE_CHILDLESS_PATH = '/img/rhn-bullet-parentchannel.gif';
+IMAGE_COLLAPSED_PATH = '/cobbler/webui/list-expand.png';
+IMAGE_EXPANDED_PATH = '/cobbler/webui/list-collapse.png';
+IMAGE_CHILDLESS_PATH = '/cobbler/webui/list-parent.png';
var rowHash = new Array();
var browserType;
@@ -26,7 +30,10 @@ function onLoadStuff(columns) {
function iconifyChildlessParents(rowHash) {
for (var i in rowHash) {
- if (!rowHash[i].hasChildren && rowHash[i].image) { rowHash[i].image.src = IMAGE_CHILDLESS_PATH; }
+ if (!rowHash[i].hasChildren && rowHash[i].image) {
+ // FIXME: not needed in this implementation
+ // rowHash[i].image.src = IMAGE_CHILDLESS_PATH;
+ }
}
}
@@ -78,7 +85,8 @@ function Row(cells, image) {
this.image.src = IMAGE_COLLAPSED_PATH;
// we start with columnsPerRow, because we want to skip the td cells of the parent tr.
for (var i = columnsPerRow; i < this.cells.length; i++) {
- this.cells[i].parentNode.style.display = 'none';
+ // FIXME: this looks suspicious
+ // this.cells[i].parentNode.style.display = 'none';
this.cells[i].style.display = 'none';
}
this.isHidden = 1;
@@ -91,7 +99,8 @@ function Row(cells, image) {
for (var i = 0; i < this.cells.length; i++) {
this.cells[i].style.display = displayType;
- this.cells[i].parentNode.style.display = displayType;
+ // FIXME: also suspicious
+ // this.cells[i].parentNode.style.display = displayType;
}
this.isHidden = 0;
return;
@@ -146,11 +155,17 @@ function getNodeTagName(node) {
return tagName.toLowerCase();
}
+// note: parent detection seems to work fine
+// all items are parents if they have an id except if they start with child
function isParentRowNode(node) {
var nodeInLowercase = getNodeTagName(node);
if (nodeInLowercase != 'tr') { return 0; }
nodeId = node.id;
- if ((nodeId.indexOf('id')) && !(nodeId.indexOf('child'))) { return 0; }
+ if ((nodeId.indexOf('id')) && !(nodeId.indexOf('child'))) {
+ //alert("row id: " + nodeId + " is not a parent");
+ return 0;
+ }
+ //alert("row id: " + nodeId + "IS A PARENT");
return 1;
}
@@ -189,3 +204,4 @@ function findRowImageFromCells(cells, id) {
}
return null;
}
+
diff --git a/webui_content/list-collapse.png b/webui_content/list-collapse.png
new file mode 100644
index 0000000..6b8361e
--- /dev/null
+++ b/webui_content/list-collapse.png
Binary files differ
diff --git a/webui_content/list-expand.png b/webui_content/list-expand.png
new file mode 100644
index 0000000..c541e6e
--- /dev/null
+++ b/webui_content/list-expand.png
Binary files differ
diff --git a/webui_content/list-parent.png b/webui_content/list-parent.png
new file mode 100644
index 0000000..46ad8a0
--- /dev/null
+++ b/webui_content/list-parent.png
Binary files differ