changeset 438:06f6b72dc8ac

bug fixes
author hertzhaft
date Tue, 10 Jan 2006 12:26:41 +0100
parents b02e72a680e0
children 65219f4fcf6b
files client/digitallibrary/greyskin/baselib.js
diffstat 1 files changed, 10 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/client/digitallibrary/greyskin/baselib.js	Tue Jan 10 12:25:44 2006 +0100
+++ b/client/digitallibrary/greyskin/baselib.js	Tue Jan 10 12:26:41 2006 +0100
@@ -23,7 +23,7 @@
 */
 
 // was: function base_init() {
-baseLibVersion = "2.006";
+baseLibVersion = "2.007";
 browserType = getBrowserType();
 
 
@@ -495,7 +495,7 @@
         x = elem.pageX;
         y = elem.pageY;
     } else {
-        alert("unable to get position of "+elem+" (id:"+elem.id+")");
+        alert("unable to get position of " + elem + " (id:" + elem.id + ")");
     }
     return new Position(getInt(x), getInt(y));
 }
@@ -514,7 +514,7 @@
         width = elem.clip.width;
         height = elem.clip.height;
     } else {
-        alert("unable to get size of "+elem+" (id:"+elem.id+")");
+        alert("unable to get size of " + elem + " (id:" + elem.id + ")");
     }
     return new Size(getInt(width), getInt(height));
 }
@@ -548,7 +548,7 @@
             elem.clip.height = getInt(rect.height);
         }
     } else {
-        alert("moveelement: no style nor layer property!");
+        alert("moveElement(): element has no style or layer property!");
         return false;
     }
     return true;
@@ -558,9 +558,9 @@
     // shows or hides the element
     if (elem.style)
         elem.style.visibility = show ? "visible" : "hidden";
-    } else if (defined(elem.visibility))
+    else if (defined(elem.visibility))
         elem.visibility = show ? "show" : "hide";
-    } else
+    else
         alert("showElement(): element has no style or layer property!");
     return true;
 }
@@ -598,7 +598,7 @@
         if (Event) { 
             t = type.toUpperCase();
             elem.captureEvents(Event[t]);
-            elem[ "on" + t ] = handler;
+            elem[ "on" + type ] = handler;
             }
         }
     else {
@@ -614,13 +614,13 @@
         elem.removeEventListener(type, handler, false);
             }
     else if (elem.detachEvent) {
-        elem.detachEvent('on' + type, handler);
+        elem.detachEvent("on" + type, handler);
         }
     else if (elem.releaseEvents) {
         if (Event) { 
             t = type.toUpperCase();
             elem.releaseEvents(Event[t]);
-            elem[ "on" + t ] = null;
+            elem[ "on" + type ] = null;
             }
         }
     else {
@@ -742,6 +742,7 @@
 	}
 
 Cookie.prototype.add = function(key, value) {
+    value = value.toString();
     if (value.indexOf(",") == -1) 
             this[key] = value;  // single value
         else