Commit 9ffb20727de0c4231d871cd0ca666bbb8e034891

Authored by Andrea Petta
2 parents 7c272bb3 b778770c

Merge branch 'master' of http://service.routetopa.eu:7480/WebCompDev/COMPONENTS

controllets/data-sevc-controllet/co-datalets-creator-controllet.html renamed to controllets/co-datalets-creator-controllet/co-datalets-creator-controllet.html 100755 → 100644
1 -<script src="../shared_js/perfect-scrollbar/js/min/perfect-scrollbar.jquery.min.js"></script>  
2 -<link rel="stylesheet" href="../shared_js/perfect-scrollbar/css/perfect-scrollbar.min.css">  
3 -  
4 -<script src="../../locales/controllet_ln.js"></script>  
5 -  
6 -<link rel="import" href="../../bower_components/polymer/polymer.html">  
7 -  
8 -<link rel="import" href="../page-slider-controllet/page-slider-controllet.html">  
9 -  
10 -<link rel="import" href="../select-data-controllet/select-data-controllet.html" />  
11 -<link rel="import" href="../select-visualization-controllet/select-visualization-controllet.html" />  
12 -  
13 -<dom-module id="co-datalets-creator-controllet">  
14 -  
15 - <template>  
16 -  
17 - <page-slider-controllet id="slider">  
18 -  
19 - <neon-animatable>  
20 -  
21 - <select-data-controllet id="select_data"></select-data-controllet>  
22 -  
23 - </neon-animatable>  
24 -  
25 - <neon-animatable>  
26 -  
27 - <select-visualization-controllet id="select_visualization" deep-url={{deepUrl}} datalets-list-url={{dataletsListUrl}}></select-visualization-controllet>  
28 -  
29 - </neon-animatable>  
30 -  
31 - </page-slider-controllet>  
32 -  
33 - </template>  
34 -  
35 - <script>  
36 -  
37 - Polymer({  
38 -  
39 - is : 'co-datalets-creator-controllet',  
40 -  
41 - listeners : {  
42 - 'page-slider-controllet_selected' : '_updateSlider',  
43 - 'select-fields-controllet_selected-fields' : '_allowThirdStep',  
44 - 'filters-controllet_filters': '_allowThirdStep',  
45 - 'aggregators-controllet_aggregators': '_allowThirdStep'  
46 - },  
47 -  
48 - properties : {  
49 -  
50 - dataUrl : {  
51 - type : String,  
52 - value : undefined  
53 - },  
54 -  
55 - data : {  
56 - type : Array,  
57 - value : []  
58 - },  
59 -  
60 - deepUrl : {  
61 - type : String,  
62 - value : undefined  
63 - },  
64 -  
65 - dataletsListUrl : {  
66 - type : String ,  
67 - value : undefined  
68 - },  
69 -  
70 - localization : {  
71 - type : String,  
72 - value : "en"  
73 - }  
74 -  
75 - },  
76 -  
77 - ready : function(){  
78 - ln["localization"] = this.localization;  
79 -  
80 - this.$.select_data.data = this.data;  
81 - this.$.select_data.dataUrl = this.dataUrl;  
82 - this.$.select_data.init();  
83 - this.$.select_visualization.dataUrl = this.dataUrl;  
84 - this.$.select_visualization.init();  
85 - },  
86 -  
87 - _updateSlider : function(e){  
88 - switch (e.detail.selected) {  
89 - case 0:  
90 - this.$.slider.setTitle(ln["slide2Title_" + this.localization], ln["slide2Subtitle_" + this.localization]);  
91 -  
92 - this.$.slider.chevronLeft("invisible");  
93 - this.$.slider.chevronRight(false);  
94 -  
95 - if(this.$.slider.getPrevSelected() == 1)  
96 - this.$.slider.chevronRight(true);  
97 - break;  
98 - case 1:  
99 - this.$.slider.setTitle(ln["slide3Title_" + this.localization], ln["slide3Subtitle_" + this.localization]);  
100 -  
101 - this.$.slider.chevronLeft(true);  
102 - this.$.slider.chevronRight("invisible");  
103 - }  
104 - },  
105 -  
106 - _allowThirdStep : function(){  
107 - this.$.slider.chevronRight(false);  
108 - var selectedFields = this.$.select_data.getSelectedFields();  
109 - var filters = this.$.select_data.getFilters();  
110 - var aggregators = this.$.select_data.getAggregators();  
111 - var data = this.$.select_data.getData();  
112 - if(selectedFields.length > 0) {  
113 - this.$.select_visualization.init();  
114 - this.$.select_visualization.setSelectedFields(selectedFields);  
115 - this.$.select_visualization.setFilters(filters);  
116 - this.$.select_visualization.setAggregators(aggregators);  
117 - this.$.select_visualization.setData(data);  
118 - this.$.slider.chevronRight(true);  
119 - }  
120 - }  
121 -  
122 - });  
123 -  
124 - </script>  
125 - 1 +<script src="../shared_js/perfect-scrollbar/js/min/perfect-scrollbar.jquery.min.js"></script>
  2 +<link rel="stylesheet" href="../shared_js/perfect-scrollbar/css/perfect-scrollbar.min.css">
  3 +
  4 +<script src="../../locales/controllet_ln.js"></script>
  5 +
  6 +<link rel="import" href="../../bower_components/polymer/polymer.html">
  7 +
  8 +<link rel="import" href="../page-slider-controllet/page-slider-controllet.html">
  9 +
  10 +<link rel="import" href="../select-data-controllet/select-data-controllet.html" />
  11 +<link rel="import" href="../select-visualization-controllet/select-visualization-controllet.html" />
  12 +
  13 +<dom-module id="co-datalets-creator-controllet">
  14 +
  15 + <template>
  16 +
  17 + <page-slider-controllet id="slider">
  18 +
  19 + <neon-animatable>
  20 +
  21 + <select-data-controllet id="select_data"></select-data-controllet>
  22 +
  23 + </neon-animatable>
  24 +
  25 + <neon-animatable>
  26 +
  27 + <select-visualization-controllet id="select_visualization" deep-url={{deepUrl}} datalets-list-url={{dataletsListUrl}}></select-visualization-controllet>
  28 +
  29 + </neon-animatable>
  30 +
  31 + </page-slider-controllet>
  32 +
  33 + </template>
  34 +
  35 + <script>
  36 +
  37 + Polymer({
  38 +
  39 + is : 'co-datalets-creator-controllet',
  40 +
  41 + listeners : {
  42 + 'page-slider-controllet_selected' : '_updateSlider',
  43 + 'select-fields-controllet_selected-fields' : '_allowThirdStep',
  44 + 'filters-controllet_filters': '_allowThirdStep',
  45 + 'aggregators-controllet_aggregators': '_allowThirdStep'
  46 + },
  47 +
  48 + properties : {
  49 +
  50 + dataUrl : {
  51 + type : String,
  52 + value : undefined
  53 + },
  54 +
  55 + data : {
  56 + type : Array,
  57 + value : []
  58 + },
  59 +
  60 + deepUrl : {
  61 + type : String,
  62 + value : undefined
  63 + },
  64 +
  65 + dataletsListUrl : {
  66 + type : String ,
  67 + value : undefined
  68 + },
  69 +
  70 + localization : {
  71 + type : String,
  72 + value : "en"
  73 + }
  74 +
  75 + },
  76 +
  77 + ready : function(){
  78 + ln["localization"] = this.localization;
  79 +
  80 + this.$.select_data.data = this.data;
  81 + this.$.select_data.dataUrl = this.dataUrl;
  82 + this.$.select_data.init();
  83 + this.$.select_visualization.dataUrl = this.dataUrl;
  84 + this.$.select_visualization.init();
  85 + },
  86 +
  87 + _updateSlider : function(e){
  88 + switch (e.detail.selected) {
  89 + case 0:
  90 + this.$.slider.setTitle(ln["slide2Title_" + this.localization], ln["slide2Subtitle_" + this.localization]);
  91 +
  92 + this.$.slider.chevronLeft("invisible");
  93 + this.$.slider.chevronRight(false);
  94 +
  95 + if(this.$.slider.getPrevSelected() == 1)
  96 + this.$.slider.chevronRight(true);
  97 + break;
  98 + case 1:
  99 + this.$.slider.setTitle(ln["slide3Title_" + this.localization], ln["slide3Subtitle_" + this.localization]);
  100 +
  101 + this.$.slider.chevronLeft(true);
  102 + this.$.slider.chevronRight("invisible");
  103 + }
  104 + },
  105 +
  106 + _allowThirdStep : function(){
  107 + this.$.slider.chevronRight(false);
  108 + var selectedFields = this.$.select_data.getSelectedFields();
  109 + var filters = this.$.select_data.getFilters();
  110 + var aggregators = this.$.select_data.getAggregators();
  111 + var data = this.$.select_data.getData();
  112 + if(selectedFields.length > 0) {
  113 + this.$.select_visualization.init();
  114 + this.$.select_visualization.setSelectedFields(selectedFields);
  115 + this.$.select_visualization.setFilters(filters);
  116 + this.$.select_visualization.setAggregators(aggregators);
  117 + this.$.select_visualization.setData(data);
  118 + this.$.slider.chevronRight(true);
  119 + }
  120 + }
  121 +
  122 + });
  123 +
  124 + </script>
  125 +
126 </dom-module> 126 </dom-module>
127 \ No newline at end of file 127 \ No newline at end of file