From 4f13f6a8381ed8da8e8b9be2b88d5ba63b08d7c8 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Thu, 18 Jan 2018 02:42:52 +0000 Subject: [PATCH] etc/profile --- etc/profile | 2 +- www/dbq/html/default.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/profile b/etc/profile index e4aa8e69..3c083c25 100755 --- a/etc/profile +++ b/etc/profile @@ -14,7 +14,7 @@ #-------------------------------------------------------------------------------- [ "$1" = "--nb-debug" ] && export NB_DEBUG="yes" && shift [ "$1" = "--nb-no-repos" ] && export NB_NO_REPOS="yes" && shift -[ "$NB_DEBUG" = "yes" ] || return 0 +#[ "$NB_DEBUG" = "yes" ] || return 0 nb_debug() { [ -n "$NB_DEBUG" -a "$NB_DEBUG" = "yes" ] || return 0 echo "DEBUG: $*" 1>&2 diff --git a/www/dbq/html/default.js b/www/dbq/html/default.js index 62a03c81..351d694e 100644 --- a/www/dbq/html/default.js +++ b/www/dbq/html/default.js @@ -138,10 +138,10 @@ document.addEventListener("DOMContentLoaded", function() { //if (base == '') base = '/'; var url = base + (base == '' ? '/ls' : '') + '.json'; console.log(url); - var id = e.className == 'db' ? 'id' : 'name'; + var fields = e.className == 'db' ? ['id','id'] : ['name','name']; dbqGet(url,function(o){ console.log(window._dbq['param.'+e.className]); - var s = o.select(id,id, window._dbq['param.'+e.className]); + var s = o.select(fields[0],fields[1], window._dbq['param.'+e.className]); s.onchange = function() { window.location = base + '/' + this.value + ext; //console.log(base + '/' + this.value + ext); -- 2.47.3