*** empty log message ***
authorgc <gc>
Sat, 24 May 2008 13:47:38 +0000 (13:47 +0000)
committergc <gc>
Sat, 24 May 2008 13:47:38 +0000 (13:47 +0000)
data/booh/themes/cardu/root/booh.js

index 9005cbb..73aa5c8 100644 (file)
@@ -175,20 +175,32 @@ function change_basename(input, newend) {
 }
 
 function update_sensibilities() {
+    var img_first = document.getElementById("img_first");
+    var img_previous = document.getElementById("img_previous");
     if (current == 0) {
-        document.getElementById("img_first").src = change_basename(document.getElementById("img_first").src, 'first_dark.gif');
-        document.getElementById("img_previous").src = change_basename(document.getElementById("img_previous").src, 'previous_dark.gif');
+        img_first.src = change_basename(img_first.src, 'first_dark.gif');
+        img_previous.src = change_basename(img_previous.src, 'previous_dark.gif');
+        img_first.setAttribute("style", "cursor: default;");
+        img_previous.setAttribute("style", "cursor: default;");
     } else {
-        document.getElementById("img_first").src = change_basename(document.getElementById("img_first").src, 'first_light.gif');
-        document.getElementById("img_previous").src = change_basename(document.getElementById("img_previous").src, 'previous_light.gif');
+        img_first.src = change_basename(img_first.src, 'first_light.gif');
+        img_previous.src = change_basename(img_previous.src, 'previous_light.gif');
+        img_first.setAttribute("style", "cursor: pointer; cursor: hand;");  // for IE + FF work, but warns on FF :/
+        img_previous.setAttribute("style", "cursor: pointer; cursor: hand;");
     }
 
+    var img_next = document.getElementById("img_next");
+    var img_last = document.getElementById("img_last");
     if (current == images.length - 1) {
-        document.getElementById("img_next").src = change_basename(document.getElementById("img_next").src, 'next_dark.gif');
-        document.getElementById("img_last").src = change_basename(document.getElementById("img_last").src, 'last_dark.gif');
+        img_next.src = change_basename(img_next.src, 'next_dark.gif');
+        img_last.src = change_basename(img_last.src, 'last_dark.gif');
+        img_next.setAttribute("style", "cursor: default;");
+        img_last.setAttribute("style", "cursor: default;");
     } else {
-        document.getElementById("img_next").src = change_basename(document.getElementById("img_next").src, 'next_light.gif');
-        document.getElementById("img_last").src = change_basename(document.getElementById("img_last").src, 'last_light.gif');
+        img_next.src = change_basename(img_next.src, 'next_light.gif');
+        img_last.src = change_basename(img_last.src, 'last_light.gif');
+        img_next.setAttribute("style", "cursor: pointer; cursor: hand;");
+        img_last.setAttribute("style", "cursor: pointer; cursor: hand;");
     }
 }