Blame view

docs/docs.html 8.65 KB
5364cfa6   Luigi Serra   Documentation upload
1
2
3
4
5
  <!DOCTYPE html>

  <html lang="en">

  <head>

      <link rel="import"  href="../bower_components/iron-component-page/iron-component-page.html">

      <link rel="import"  href="../bower_components/paper-drawer-panel/paper-drawer-panel.html">

584d6ecd   Luigi Serra   Update components...
6
7
8
      <link rel="import"  href="../bower_components/paper-menu/paper-menu.html">

      <link rel="import"  href="../bower_components/paper-item/paper-item.html">

      <link rel="import"  href="../bower_components/paper-icon-button/paper-icon-button.html">

4e7eacf4   Luigi Serra   Controllets and d...
9
      <link rel="import"  href="../bower_components/paper-menu-button/paper-menu-button.html">

584d6ecd   Luigi Serra   Update components...
10
11
  

      <script type="text/javascript" src="../datalets/shared_js/jquery-1.11.2.min.js"></script>

e0d47c0d   Luigi Serra   added demo page
12
      <script type="text/javascript" src="js/editarea_0_8_2/edit_area/edit_area_full.js"></script>

4e7eacf4   Luigi Serra   Controllets and d...
13
14
15
      <script type="text/javascript" src="../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>

  

  

5364cfa6   Luigi Serra   Documentation upload
16
17
  

      <meta charset="UTF-8">

584d6ecd   Luigi Serra   Update components...
18
19
20
  

  

      <script type="text/javascript">

584d6ecd   Luigi Serra   Update components...
21
22
      </script>

      <style>

4e7eacf4   Luigi Serra   Controllets and d...
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
          body{

              font-family: 'Roboto', 'Noto', sans-serif;

              -webkit-font-smoothing: antialiased;

              text-rendering: optimizeLegibility;

              white-space: nowrap;

              overflow: hidden;

              text-overflow: ellipsis;

              font-size: 20px;

              /*font-weight: 500;*/

              line-height: 28px;

              -ms-flex: 1 1 0.000000001px;

              -webkit-flex: 1;

              flex: 1;

              -webkit-flex-basis: 0.000000001px;

              flex-basis: 0.000000001px;

          }

584d6ecd   Luigi Serra   Update components...
39
40
41
42
43
44
          .avatar

          {

              display: inline-block;

              height: 0.5em;

              width: 0.5em;

              border-radius: 50%;

4e7eacf4   Luigi Serra   Controllets and d...
45
              background: #2196F3;

584d6ecd   Luigi Serra   Update components...
46
47
48
49
50
51
              color: white;

              line-height: 2em;

              font-size: 1.87em;

              text-align: center;

              margin-right: 5px;

          }

4e7eacf4   Luigi Serra   Controllets and d...
52
53
54
55
  

          #toolbar{

              background: #2196F3 ;

          }

584d6ecd   Luigi Serra   Update components...
56
      </style>

5364cfa6   Luigi Serra   Documentation upload
57
58
59
  </head>

  <body>

  

4e7eacf4   Luigi Serra   Controllets and d...
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
  <template id="Doc" is="dom-bind">

  

      <paper-drawer-panel>

          <paper-header-panel drawer>

              <paper-toolbar id="toolbar">

                  <paper-menu-button>

                      <paper-icon-button icon="menu" class="dropdown-trigger"></paper-icon-button>

                      <paper-menu class="dropdown-content">

                          <paper-item><a href="http://routetopa.eu/" target="_blank">ROUTE-TO PA European Project</a></paper-item>

                          <paper-item><a href="../../index.html" target="_blank">DEEP Index</a></paper-item>

                      </paper-menu>

                  </paper-menu-button>

                  <div>Components</div>

              </paper-toolbar>

              <div style="margin: 20px;">

                  <div class="horizontal-section-container">

                      <div>

                          <paper-menu><paper-item  id="general-documentation" on-click="_onGeneralClick"><h4><span class="avatar"></span>General documentation</h4></paper-item></paper-menu>

                          <h4><span class="avatar"></span>Controllets</h4>

                          <div class="horizontal-section">

                              <paper-menu>

                                  <template is="dom-repeat" items="[[controllets]]" as="controllet">

                                      <paper-item class="controllet" on-click="_onItemClick">[[controllet]]</paper-item>

                                  </template>

                              </paper-menu>

                          </div>

5364cfa6   Luigi Serra   Documentation upload
86
                      </div>

4e7eacf4   Luigi Serra   Controllets and d...
87
88
89
90
91
92
93
94
95
96
97
                      <div>

                          <h4><span class="avatar"></span>Datalets</h4>

                          <div class="horizontal-section">

                              <paper-menu>

                                  <template is="dom-repeat" items="[[datalets]]" as="datalet">

                                      <paper-item class="datalet" on-click="_onItemClick">[[datalet]]</paper-item>

                                  </template>

                              </paper-menu>

                          </div>

                      </div>

                      <h4><span class="avatar"></span>Behaviors</h4>

5364cfa6   Luigi Serra   Documentation upload
98
99
                      <div class="horizontal-section">

                          <paper-menu>

4e7eacf4   Luigi Serra   Controllets and d...
100
101
102
                              <paper-item class="behaviour base-datalet" on-click="_onItemClick">BaseDataletBehavior</paper-item>

                              <paper-item class="behaviour base-datalet" on-click="_onItemClick">WorkcycleBehavior</paper-item>

                              <paper-item class="behaviour base-ajax-json-jsonpath-datalet" on-click="_onItemClick">AjaxJsonJsonPathBehavior</paper-item>

5364cfa6   Luigi Serra   Documentation upload
103
104
105
                          </paper-menu>

                      </div>

                  </div>

4e7eacf4   Luigi Serra   Controllets and d...
106
                   </div>

584d6ecd   Luigi Serra   Update components...
107
              </div>

4e7eacf4   Luigi Serra   Controllets and d...
108
109
110
111
112
113
          </paper-header-panel>

          <paper-header-panel main>

              <paper-toolbar id="toolbar">

                  <div>Documentation</div>

                  <div style="position: absolute;right:30px; top:10px;"><paper-icon-button style="background-color: white; border-radius: 50%;" src="images/source-code.png" on-click="_onSourceClick"></paper-icon-button></div>

              </paper-toolbar>

ae17a8dc   Luigi Serra   Controllet and da...
114
              <div id="main_content" style="height: 100%; width: 100%"><iframe src="ROUTETOPADataletDeveloperGuidev0.1.html" style="position: absolute;top: 0;bottom: 0;left: 0;right: 0;height: 100%;width: 100%;"></iframe></div>

4e7eacf4   Luigi Serra   Controllets and d...
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
          </paper-header-panel>

      </paper-drawer-panel>

  </template>

  

  <script>

      Doc.controllets = [

         "data-sevc-controllet",

         "draggable-element-controllet",

         "items-slider-controllet",

         "treeview-controllet",

         "text-element-controllet"

      ];

  

      Doc.datalets = [

          "base-datalet",

          "base-ajax-json-jsonpath-datalet",

          "highcharts-datalet",

          "column3Dchart-datalet",

          "columnchart-datalet",

          "barchart-datalet",

          "linechart-datalet",

          "datatable-datalet",

          "treemap-datalet",

          "leafletjs-datalet"

      ];

  

      Doc.selectedSource = "";

  

      /*Doc.behaviours = [

            { name : "BaseDataletBehavior", refcomp : "base-datalet" },

            { name : "WorkcycleBehavior", refcomp : "base-datalet" },

            { name : "AjaxJsonJsonPathBehavior", refcomp : "base-ajax-json-jsonpath-datalet"},

      ];*/

  

      Doc._onItemClick = function(event){

  

          switch(event.target.className.split(" ")[0]) {

              case 'datalet':

                  Doc.selectedSource = '../datalets/' + event.target.innerHTML.trim() + '/' + event.target.innerHTML.trim() + '.html';

                  Doc.$.main_content.innerHTML = '<iframe src="../datalets/' + event.target.innerHTML.trim() + '/docs.html" style="position: absolute;top: 0;bottom: 0;left: 0;right: 0;height: 100%;width: 100%;"></iframe>';

                  break;

              case 'controllet':

                  Doc.selectedSource = '../controllets/' + event.target.innerHTML.trim() + '/' + event.target.innerHTML.trim() + '.html';

c6d8e1a1   Luigi Serra   fix
158
159
                  //Doc.$.main_content.innerHTML = '<iron-component-page src="' + Doc.selectedSource + '"></iron-component-page>';

                  Doc.$.main_content.innerHTML = '<iframe src="../controllets/' + event.target.innerHTML.trim() + '/docs.html" style="position: absolute;top: 0;bottom: 0;left: 0;right: 0;height: 100%;width: 100%;"></iframe>';

4e7eacf4   Luigi Serra   Controllets and d...
160
161
162
163
164
165
166
167
168
                  break;

              case 'behaviour':

                  Doc.selectedSource = '../datalets/' + event.target.className.split(" ")[1] + '/static/js/' + event.target.innerHTML.trim() + '.js';

                  Doc.$.main_content.innerHTML = '<iron-component-page doc-src="../datalets/' + event.target.className.split(" ")[1] + '/static/js/' + event.target.innerHTML.trim() + '.json"></iron-component-page>';

                  break;

          }

      };

  

      Doc._onGeneralClick = function(event){

ae17a8dc   Luigi Serra   Controllet and da...
169
          Doc.$.main_content.innerHTML = '<iframe src="ROUTETOPADataletDeveloperGuidev0.1.html" style="position: absolute;top: 0;bottom: 0;left: 0;right: 0;height: 100%;width: 100%;"></iframe>';

4e7eacf4   Luigi Serra   Controllets and d...
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
      };

  

      Doc._onSourceClick = function(event){

  

          Doc.$.main_content.innerHTML = '<textarea id="code" style="position:relative;width: 100%;height: 80vh;" style="" rows="4" cols="50"></textarea>';

          $.get(Doc.selectedSource, function(data) {

              $("#code").val(data);

  

              editAreaLoader.init({

                  id : "code"       // textarea id

                  ,syntax: "html"          // syntax to be uses for highgliting

                  ,start_highlight: true      // to display with highlight mode on start-up

                  ,replace_tab_by_spaces: 4,

                  isEditable : false

              });

  

          });

  

      };

5364cfa6   Luigi Serra   Documentation upload
189
  

4e7eacf4   Luigi Serra   Controllets and d...
190
  </script>

5364cfa6   Luigi Serra   Documentation upload
191
192
193
  

  </body>

  </html>