Search Bar - Beta
diff --git a/api.php b/api.php
index fc1b6af..756ee48 100644
--- a/api.php
+++ b/api.php
@@ -2,13 +2,13 @@
require_once("config.php");
class write {
- public static function do($json) {
+ public static function funct($json) {
print_r(json_encode($json));
exit();
}
public static function error($n, $msg) {
- self::do(["error" => $n, "msg" => $msg]);
+ self::funct(["error" => $n, "msg" => $msg]);
}
}
diff --git a/graf.php b/graf.php
index 14767d6..3696dc3 100644
--- a/graf.php
+++ b/graf.php
@@ -38,12 +38,10 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black">
</head>
<body>
- <button id="zoomin" class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-js-ripple-effect mdl-button--colored"><i class="material-icons">zoom_in</i></button>
+ <button id="searchButton"class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-js-ripple-effect mdl-button--colored"><i class="material-icons">search</i></button>
+ <button id="zoomin" class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-js-ripple-effect mdl-button--colored"><i class="material-icons">zoom_in</i></button>
<button id="zoomout" class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-js-ripple-effect mdl-button--colored"><i class="material-icons">zoom_out</i></button>
-
- <!-- Trigger/Open The Search Box -->
- <button id="searchButton"class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-js-ripple-effect mdl-button--colored">Busca</button>
-
+
<div id="backdrop-container" style="display: none;">
<div id="backdrop"></div>
</div>
@@ -93,17 +91,17 @@
<div id="graf"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/sigma.js/1.2.0/sigma.min.js"></script>
- <script src="js/script.js"></script>
-
+ <script>
+ // Initialize the graph and the sigma
+ var s, graf;
+ </script>
+
<!-- Search Bar JS files -->
<script src="./js/modal.js"></script>
<script src="./js/autocomplete.js" ></script>
- <script>
- /*initiate the autocomplete function on the "searchInput" element,
- and pass along the nodes' names array as possible autocomplete values:*/
- autocomplete(document.getElementById("searchInput"), graf.nodes);
- </script>
-
+
+ <script src="js/script.js"></script>
+
<script defer src="https://code.getmdl.io/1.3.0/material.min.js"></script>
<!--<script src="js/service-worker.js"></script>-->
</body>