Blame view

controllets/tree-view-controllet/demo/index.html 2.84 KB
24be6abb   Luigi Serra   selection control...
1
2
3
  <html>
  
  <head>
9d4a34db   Luigi Serra   selection control...
4
      <script src="../../shared_js/jquery-1.11.2.min.js"></script>
24be6abb   Luigi Serra   selection control...
5
  
9d4a34db   Luigi Serra   selection control...
6
      <script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
24be6abb   Luigi Serra   selection control...
7
8
9
10
11
12
13
  
      <link rel="import" href="../tree-view-controllet.html" />
  </head>
  
  <body>
  
      <style>
9d4a34db   Luigi Serra   selection control...
14
15
16
17
18
          .container {
              display: flex;
              flex-direction: row;
          }
          #tree_container {
24be6abb   Luigi Serra   selection control...
19
              width: 300px;
24be6abb   Luigi Serra   selection control...
20
          }
9d4a34db   Luigi Serra   selection control...
21
22
          #fields_container {
              margin-left: 100px;
24be6abb   Luigi Serra   selection control...
23
24
25
          }
      </style>
  
9d4a34db   Luigi Serra   selection control...
26
27
28
29
      <div class="container">
  
          <div id="tree_container">
  
98d9d8a5   Renato De Donato   filters+groupby
30
31
              <!--<tree-view-controllet id="tree" root-name="data" opened-path="records,geometry" preselected-fields='["records,datasetid", "records,recordid", "nhits"]'></tree-view-controllet>-->
              <tree-view-controllet id="tree" root-name="create-datalet-controllet"></tree-view-controllet>
24be6abb   Luigi Serra   selection control...
32
  
9d4a34db   Luigi Serra   selection control...
33
          </div>
24be6abb   Luigi Serra   selection control...
34
  
9d4a34db   Luigi Serra   selection control...
35
36
37
38
          <div id="fields_container">
              <h3>Selected fields:</h3>
              <p id="fields">&nbsp;</p>
          </div>
24be6abb   Luigi Serra   selection control...
39
40
41
  
      </div>
  
98d9d8a5   Renato De Donato   filters+groupby
42
  
24be6abb   Luigi Serra   selection control...
43
      <script>
98d9d8a5   Renato De Donato   filters+groupby
44
45
  
          var json = {"select-dataset-controllet": "s", "select-data-controllet": {"tree-view-controllet": "", "multi-table-controllet": "", "filters-controllet": ""}, "select-visualization-controllet": {"items-vslider-controllet": ""}};
24be6abb   Luigi Serra   selection control...
46
          var tree = document.getElementById('tree');
98d9d8a5   Renato De Donato   filters+groupby
47
48
          tree.setAttribute("json-data", JSON.stringify(json));
          tree.ready();
24be6abb   Luigi Serra   selection control...
49
  
98d9d8a5   Renato De Donato   filters+groupby
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
  //        var tree = document.getElementById('tree');
          var fields = document.getElementById('fields');
  //
  //        $.ajax({
  //            url: 'http://ckan.routetopa.eu/api/action/datastore_search?resource_id=c3b52992-ba61-4a73-a637-0f2e1ca26aab',
  //            dataType: "json",
  //            success: function(data){
  //                tree.setAttribute("json-data", JSON.stringify(data));
  //                tree.ready();//chrome
  //            }
  //        });
  //
  //        tree.addEventListener("tree-view-controllet_selected-fields", function (e) {
  //            fields.innerHTML = e.detail.fields;
  ////            console.log(tree.getFlatFields());
  ////            console.log(tree.getFields());//firefox console.log does not recognize associative array?
  //        });
24be6abb   Luigi Serra   selection control...
67
68
69
70
71
72
73
74
  
      </script>
  
  </body>
  
  </html>
  
  <!--urls:-->
a31f0660   root   sevc-controllet i...
75
  <!--https://yperdiavgeia.gr/analytics/counts/source:Decision/query:linux/method:count_organization.json-->
5054a06e   Renato De Donato   tree-view update
76
  <!--http://dati.lazio.it/catalog/api/action/datastore_search?resource_id=114baf3d-6d4f-42ff-b4af-481beef59ae1-->
24be6abb   Luigi Serra   selection control...
77
78
  <!--url: 'http://ckan.routetopa.eu/api/action/datastore_search?resource_id=73e02092-85a1-434e-85fe-0c9a43aa9a52&limit=5',-->
  <!--url: 'https://data.issy.com/api/records/1.0/search?dataset=liste-des-restaurants-a-issy-les-moulineaux&sort=type&facet=type&facet=terrasse',-->
94601c1f   Renato De Donato   trevieww multitable
79
  <!--url: 'https://data.issy.com/api/records/1.0/search?dataset=flux-rss-des-offres-demplois-a-issy-les-moulineaux&sort=published&facet=published&refine.published=2015',-->