]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
allow entering negative values in base 10
authorJan Michel <j.michel@gsi.de>
Mon, 28 Jan 2019 16:48:09 +0000 (17:48 +0100)
committerJan Michel <j.michel@gsi.de>
Mon, 28 Jan 2019 16:48:09 +0000 (17:48 +0100)
web/htdocs/scripts/xmlpage.js
xml-db/put.pl

index 5977a55349fdfb3c9e77fca44baa979211088d4c..0b397d55913a2abad410a645fba92765e33f81b8 100644 (file)
@@ -13,6 +13,7 @@
           text += "\nCurrent Value: "+curr+" ("+e.target.parentNode.getAttribute("raw")+")\n ";
       var newval = prompt(text,e.target.parentNode.getAttribute("raw"));
       if (newval != null) {
+        if (newval < 0) { newval = 'm'+(-newval);}
         getdataprint('../xml-db/put.pl?'+e.target.parentNode.getAttribute("cstr")+'-'+newval,'returntext',false,-1,refresh);
         }
       }
     document.cookie = cname + "=" + cvalue + "; " + expires + ";path= " + path;
     } 
     
-    
\ No newline at end of file
+    
index 2950c74e8013b69f53cb52bfa7cae39198e25b02..b16e8ec7186aa4e6cbe282258bac181baa394f92 100755 (executable)
@@ -59,6 +59,7 @@ foreach my $req (@request) {
       my $RealBin = ".";
       $isbrowser = 1;
       ($entity,$netaddr,$name,$value) = split("-",$req);
+      
       $file = "$RealBin/cache/$entity.entity";
       }
     }
@@ -78,6 +79,8 @@ foreach my $req (@request) {
     $value   = $ARGV[3] || "";
     }
 
+  $value =~ s/m/\-/; #encoded negative values
+
 
   
 ###############################