Parcourir la source

Pulling out JS in options setup. Paul, did you want to fix this so that it
is browser/user safe... ie, make it work when the user has js off? Here is
what happens when they don't support js:

http://dhruba.codewordt.co.uk/sqm.png

jangliss il y a 22 ans
Parent
commit
28274da12d
1 fichiers modifiés avec 10 ajouts et 0 suppressions
  1. 10 0
      functions/options.php

+ 10 - 0
functions/options.php

@@ -274,6 +274,10 @@ class SquirrelOption {
     }
 
     function createWidget_Integer() {
+        return ($this->createWidget_String());
+
+        /*  FIXME: Paul, weren't you going to make this browser safe
+                   ie, if JS was off, or browser didn't support it?
 
         // add onChange javascript handler to a regular string widget
         // which will strip out all non-numeric chars
@@ -281,10 +285,15 @@ class SquirrelOption {
                     . 'for (i=0;i<a.length;i++) { if (a.charAt(i)>=\'0\' '
                     . '&& a.charAt(i)<=\'9\') b += a.charAt(i); } '
                     . 'this.value=b;">', $this->createWidget_String());
+        */
     }
 
     function createWidget_Float() {
+        return ($this->createWidget_String());
         
+        /*  FIXME: Paul, weren't you going to make this browser safe
+                   ie, if JS was off, or browser didn't support it?
+
         // add onChange javascript handler to a regular string widget
         // which will strip out all non-numeric (period also OK) chars 
         return preg_replace('/>/', ' onChange="a=this.value; b=\'\'; '
@@ -292,6 +301,7 @@ class SquirrelOption {
                     . '&& a.charAt(i)<=\'9\') || a.charAt(i)==\'.\') '
                     . 'b += a.charAt(i); } this.value=b;">'
                 , $this->createWidget_String());
+        */
     }
 
     function createWidget_Boolean() {