gui/html: Finally implementing restore operation

+ modal jQueryUI-based dialogs for restore operation
+ fixing a small bug with NDN/REST API

Unrelated note: unless we do something with JSON compression, we can't request more
than 10 items at a time (I tried 20, and they already didn't fit).

Change-Id: I9206fa9ac6b02062915a6f6980ad9e69eaa8da3c
diff --git a/gui/html/chronoshare-navigation.js b/gui/html/chronoshare-navigation.js
index 7dafd71..8856ec0 100644
--- a/gui/html/chronoshare-navigation.js
+++ b/gui/html/chronoshare-navigation.js
@@ -20,24 +20,33 @@
             vars[hash[0]] = decodeURIComponent (decodeURIComponent (hash[1]));
         }
 
-        if (page != PAGE)
-        {
-            PAGE = page;
-            PARAMS = vars;
-            URIPARAMS = aurl[1];
+        // if (page != PAGE)
+        // {
+        //     PAGE = page;
+        //     PARAMS = vars;
+        //     URIPARAMS = aurl[1];
 
-            if (CHRONOSHARE) {
-                CHRONOSHARE.run ();
-            }
-        }
-        else if (aurl[1] != URIPARAMS)
-        {
-            PARAMS = vars;
-            URIPARAMS = aurl[1];
+        //     if (CHRONOSHARE) {
+        //         CHRONOSHARE.run ();
+        //     }
+        // }
+        // else if (aurl[1] != URIPARAMS)
+        // {
+        //     PARAMS = vars;
+        //     URIPARAMS = aurl[1];
 
-            if (CHRONOSHARE) {
-                CHRONOSHARE.run ();
-            }
+        //     if (CHRONOSHARE) {
+        //         CHRONOSHARE.run ();
+        //     }
+        // }
+
+        // this way we can reload by just clicking on the same link
+        PAGE = page;
+        PARAMS = vars;
+        URIPARAMS = aurl[1];
+
+        if (CHRONOSHARE) {
+            CHRONOSHARE.run ();
         }
     }
 }
@@ -66,5 +75,9 @@
     $(window).on('hashchange', function() {
         nav_anchor (window.location.href);
     });
+
+    $("#reload-button").click (function() {
+        nav_anchor (window.location.href);
+    });
 });