]> git.nbdom.net Git - nb.git/commitdiff
dbq
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 23 Dec 2016 13:52:05 +0000 (13:52 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 23 Dec 2016 13:52:05 +0000 (13:52 +0000)
lib/php/db.php
www/dbq/html/default.js

index 2f12ed4cbf989ac6b1d4ccf6e7a80477ec3f8a1d..1d7287407397a73fa3471eb63c1db06a89f095a2 100644 (file)
@@ -120,7 +120,7 @@ class Db extends nb {
   public $sort;
   public $extras;
   public $format = 'json';
-  public $formats = [ 'table','div','csv','xml','json','yaml','sh','sql' ];
+  public $formats = [ 'table','div','csv','xml','json','yaml','sh','sql','php' ];
   public $limits = ['20','50','100','500','1000'];
   public $limit;
 
index 7b46542a8306f1d9c0272fd9fa841375c6a8d255..4125e1aa810a5ce47b9e86bd42055b18f0745f26 100644 (file)
@@ -49,14 +49,14 @@ document.addEventListener("DOMContentLoaded", function() {
       var format = document.getElementById("format").value;
       if (format == window._dbq["HTML_FORMAT"]) format = "html";
       window.location =  "./" + document.getElementById("table").value + "." + format;
-      return false;
+      return true;
     };
   }
 
   for (var e of document.querySelectorAll(".menu select.limit")) {
     e.onchange = function() {
       this.form.submit();
-      return false;
+      return true;
     };
   }