[Pcsclite-git-commit] [website] 01/01: Reader selection: add features support
Ludovic Rousseau
rousseau at moszumanska.debian.org
Wed Sep 2 13:28:02 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 875d30a2aa34a92dfecea89d69cfa2387f85f4d4
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date: Wed Sep 2 15:23:20 2015 +0200
Reader selection: add features support
It is now possible to match a reader using the features field.
---
select_readers/js/main.js | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/select_readers/js/main.js b/select_readers/js/main.js
index 7b1c9b2..1724cff 100644
--- a/select_readers/js/main.js
+++ b/select_readers/js/main.js
@@ -110,8 +110,17 @@ function match(filters, reader) {
switch (relation[0]) {
case "=":
- if (reader[field] !== value) {
- return false;
+ if ('features' == field)
+ {
+ if (reader[field].indexOf(value) == -1) {
+ return false;
+ }
+ }
+ else
+ {
+ if (reader[field] !== value) {
+ return false;
+ }
}
break;
case '~':
@@ -250,7 +259,11 @@ function update_filters_ihm() {
if (Filter[f][0] === 'features') {
// features: une liste prédéfinie
html += '<div class="input-group-btn">';
- html += '<button type="button" class="btn btn-default" aria-expanded="false" id="relation_' + f + '">= </button>';
+ html += '<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false" id="relation_' + f + '">AAA</button>';
+ html += '<ul class="dropdown-menu" role="menu">';
+ html += ' <li><a href="#">= </a></li>';
+ html += ' <li class="divider"></li>';
+ html += ' <li><a href="#">disabled</a></li>';
html += '</div>';
html += '<select class="form-control update-ihm" id="value_' + f + '">';
--
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