annotate query_builder/ismi.html @ 27:ed8b4e3f2a73

ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
author arussell
date Wed, 02 Dec 2015 00:53:02 -0500
parents 22be4ea663a7
children 5384b71df52a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
1 <!DOCTYPE html>
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
2 <html>
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
3 <head>
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
4 <meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
5 <title>Query Builder</title>
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
6 <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
27
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
7 <link rel="stylesheet" href="select2-4.0.1/dist/css/select2.min.css">
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
8
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
9 <script type="text/javascript" src="js/d3.min.js"></script>
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
10 <script type="text/javascript" src="select2-4.0.1/vendor/jquery-2.1.0.js"></script>
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
11 <script type="text/javascript" src="select2-4.0.1/dist/js/select2.full.min.js"></script>
26
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
12
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
13
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
14 </head>
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
15 <body style="background:none;">
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
16 <div role="navigation" class="navbar navbar-default navbar-static-top">
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
17 <div class="container">
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
18 <div class="row">
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
19 <div class="col-sm-6 col-md-6">
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
20 <ul class="nav navbar-nav">
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
21 </ul>
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
22 </div>
27
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
23 <div class="navbar-header col-sm-6 col-md-6" style="height: 105px;">
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
24 <div class="col-md-6">
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
25 <div class="navbar-brand">
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
26 <div class="brand">ISMI Query Builder</div>
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
27 </div>
26
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
28 </div>
27
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
29 <div class="col-md-offset-6">
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
30 <div class="logo-well" style="height: 60%; width: 60%;">
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
31 <a href="//neo4j.com/developer-resources">
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
32 <img src="//neo4j-contrib.github.io/developer-resources/language-guides/assets/img/logo-white.svg" alt="Neo4j World's Leading Graph Database" id="logo" style="max-height: 50%; width: 50%">
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
33 </a>
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
34 </div>
26
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
35 </div>
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
36 </div>
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
37 </div>
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
38 </div>
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
39 </div>
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
40 <div class="container">
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
41 <div class="row" style="width: 95%">
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
42 <div class="col-md-12">
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
43 <div class="panel panel-default">
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
44 <div class="panel-heading" id="title">Query Builder</div>
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
45
27
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
46 <section>
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
47 <div class="s2-example">
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
48 <div class="row">
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
49 <div class="col-sm-4 col-md-4">
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
50 <select class="js-example-data-array form-control"></select>
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
51 </div>
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
52 <div class="col-sm-4 col-md-4">
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
53 <select class="js-example-data-array2 form-control"></select>
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
54 </div>
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
55 <div class="col-sm-4 col-md-4">
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
56 <select class="js-example-data-array3 form-control">
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
57 <option value="" disabled selected>Loading...</option>
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
58 </select>
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
59 </div>
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
60 </div>
26
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
61 </div>
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
62
27
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
63 <!-- <pre data-fill-from=".js-code-data-array"></pre> -->
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
64 </section>
26
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
65
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
66 </div>
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
67 </div>
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
68 </div>
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
69 </div>
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
70
27
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
71 <script type="text/javascript" class="js-code-data-array">
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
72 // Code to interrupt ajax calls if object box switched, currently doesnt work...
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
73 (function($) {
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
74 var xhrPool = [];
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
75 $(document).ajaxSend(function(e, jqXHR, options){
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
76 xhrPool.push(jqXHR);
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
77 });
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
78 $(document).ajaxComplete(function(e, jqXHR, options) {
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
79 xhrPool = $.grep(xhrPool, function(x){return x!=jqXHR});
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
80 });
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
81 var abort = function() {
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
82 $.each(xhrPool, function(idx, jqXHR) {
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
83 jqXHR.abort();
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
84 console.log("aborted");
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
85 });
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
86 };
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
87
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
88 var oldbeforeunload = window.onbeforeunload;
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
89 window.onbeforeunload = function() {
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
90 var r = oldbeforeunload ? oldbeforeunload() : undefined;
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
91 if (r == undefined) {
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
92 // only cancel requests if there is no prompt to stay on the page
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
93 // if there is a prompt, it will likely give the requests enough time to finish
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
94 abort();
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
95 console.log("aborted");
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
96 }
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
97 return r;
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
98 }
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
99 })(jQuery);
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
100
26
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
101
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
102
27
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
103 var queryData = [];
26
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
104
27
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
105 var data = [{ id: 0, text: 'TEXT' }, { id: 1, text: 'CODEX' }, { id: 2, text: 'WITNESS' }, { id: 3, text: 'COLLECTION' }, { id: 4, text: 'PERSON' }];
26
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
106
27
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
107 var relations = [{ id: 0, text: 'equal' }, { id: 1, text: 'in' }];
26
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
108
27
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
109 $(".js-example-data-array").select2({
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
110 data: data
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
111 });
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
112 ajax1("TEXT");
26
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
113
27
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
114 $(".js-example-data-array2").select2({
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
115 data: relations
26
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
116 });
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
117
27
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
118 // Ajax request function
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
119 function ajax1(q) {
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
120 var combinedQuery = "match (n:TEXT) return n";
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
121 if (q !== undefined) combinedQuery = "match (n:" + q + ") return n";
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
122 console.log(combinedQuery);
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
123 return $.ajax({
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
124 type: "POST",
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
125 url: "https://ismi-dev.mpiwg-berlin.mpg.de/neo4j-ismi/db/data/cypher",
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
126 accepts: "application/json",
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
127 dataType: "json",
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
128 data: {
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
129 "query": combinedQuery,
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
130 "params": {}
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
131 },
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
132 beforeSend: function (xhr) {
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
133 xhr.setRequestHeader ("Authorization", "Basic " + btoa('neo4j' + ":" + 'neo5j'));
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
134 },
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
135 processResults: function (data, params) {
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
136 // parse the results into the format expected by Select2
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
137 // since we are using custom formatting functions we do not need to
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
138 // alter the remote JSON data, except to indicate that infinite
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
139 // scrolling can be used
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
140 params.page = params.page || 1;
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
141 console.log(data.length);
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
142 return {
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
143 pagination: {
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
144 more: (params.page * 30) < data.length
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
145 }
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
146 };
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
147 },
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
148 success: function (res, textStatus, jqXHR) {
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
149 console.log(textStatus);
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
150 ajaxCheck(res, textStatus);
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
151 },
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
152 error: function (jqXHR, textStatus, errorThrown) {
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
153 console.log(textStatus);
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
154 }
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
155 });
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
156 }
26
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
157
27
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
158 // Check if request was successful
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
159 function ajaxCheck(a1, status){
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
160 if (status === 'error') console.log("error: bad ajax request");
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
161 else dataGen(a1);
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
162 }
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
163
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
164 // On success, generate new data
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
165 function dataGen(a1){
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
166 console.log("next started");
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
167 var d = a1.data;
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
168 // Consider implementing localStorage to avoid reloading every time
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
169 queryData = [];
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
170 for (var i= 0; i<d.length; i++) {
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
171 var j = d[i][0].data.ismi_id;
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
172 queryData.push({ id: j, text: d[i][0].data.label });
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
173 }
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
174 // Now that queryData array has been defined we will sort it by its label value and initialize the option.
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
175 queryData.sort(function(a,b){
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
176 return a.text.localeCompare(b.text);
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
177 });
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
178 console.log(queryData);
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
179
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
180 // TODO: currently the queryData is being added onto the previous query data, need to remove old.
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
181
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
182
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
183 $(".js-example-data-array3").select2({
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
184 data: queryData
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
185 });
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
186 $(".js-example-data-array3").select2('val', "Select an option");
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
187 }
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
188
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
189 // If first box is changed generates new queryData with updated query
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
190 $('body').on('change', ".js-example-data-array", function(e){
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
191 var query = '' + data[$(this).val()].text;
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
192 //for(var i=0, n=queryData.length; i<n; i++) {
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
193 // FIXME: Trying to get the data in the drop down menu to be erased when first menu changed. Not quite working...
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
194 $(".js-example-data-array3").select2('data',[]);
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
195 //}
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
196 ajax1(query);
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
197 });
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
198
ed8b4e3f2a73 ISMI.HTML -- Better implementation of query boxes using Select2 on ismi.html, however when the first drop down is changed the ccorresponding one doesn't delete old data. select2('data', null) and similar methods of deleting has been unsuccessful so far
arussell
parents: 26
diff changeset
199 // TODO: ^^^^^ extend this to make a listener that will build the query dynamically
26
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
200
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
201
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
202 </script>
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
203
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
204 </body>
22be4ea663a7 Trying to work out having json request from neo4j display properly in drop down selectize box
arussell
parents:
diff changeset
205 </html>