[Pcsclite-git-commit] [website] 03/07: Reader selection: add support of hex values

Ludovic Rousseau rousseau at moszumanska.debian.org
Sat Oct 17 17:42:25 UTC 2015


This is an automated email from the git hooks/post-receive script.

rousseau pushed a commit to branch master
in repository website.

commit 9386607e4de6007fe233c28eb1b8ffc98aaa8fe0
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date:   Fri Oct 16 18:35:47 2015 +0200

    Reader selection: add support of hex values
    
    It is now possible to enter numeric values in hexadecimal.
    For example your can filter with "idVendor = 0x04E6"
---
 select_readers/js/main.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/select_readers/js/main.js b/select_readers/js/main.js
index bfcfa73..1f04b30 100644
--- a/select_readers/js/main.js
+++ b/select_readers/js/main.js
@@ -200,7 +200,11 @@ function function_filter() {
                 }
             }
         } else if (typeof reader[field] === 'number') {
-            value = parseInt(value, 10);
+            if (value.indexOf("0x") === 0) {
+                value = parseInt(value, 16);
+            } else {
+                value = parseInt(value, 10);
+            }
 //            console.log(value);
 
             if (Filter[f][1][0] === "~") {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/website.git



More information about the Pcsclite-cvs-commit mailing list