Commit c011cd54eb5e904c7edbcd50d6c8b16f0a96cafd
1 parent
04b21afb
selection controllet update
Showing
1 changed file
with
31 additions
and
2 deletions
controllets/data-sevc-controllet/data-sevc-controllet.html
| @@ -41,7 +41,8 @@ | @@ -41,7 +41,8 @@ | ||
| 41 | <link rel="import" href="../../bower_components/paper-menu/paper-menu.html"> | 41 | <link rel="import" href="../../bower_components/paper-menu/paper-menu.html"> |
| 42 | <link rel="import" href="../../bower_components/paper-item/paper-item.html"> | 42 | <link rel="import" href="../../bower_components/paper-item/paper-item.html"> |
| 43 | <link rel="import" href="../../bower_components/paper-toast/paper-toast.html"> | 43 | <link rel="import" href="../../bower_components/paper-toast/paper-toast.html"> |
| 44 | - | 44 | +<link rel="import" href="../../bower_components/paper-dialog/paper-dialog.html"> |
| 45 | +<link rel="import" href="../../bower_components/paper-dialog-scrollable/paper-dialog-scrollable.html"> | ||
| 45 | 46 | ||
| 46 | <link rel="import" href="../items-slider-controllet/items-slider-controllet.html"> | 47 | <link rel="import" href="../items-slider-controllet/items-slider-controllet.html"> |
| 47 | <link rel="import" href="../draggable-element-controllet/draggable-element-controllet.html"> | 48 | <link rel="import" href="../draggable-element-controllet/draggable-element-controllet.html"> |
| @@ -256,6 +257,15 @@ Example: | @@ -256,6 +257,15 @@ Example: | ||
| 256 | width: 100%; | 257 | width: 100%; |
| 257 | } | 258 | } |
| 258 | 259 | ||
| 260 | + paper-dialog { | ||
| 261 | + position: fixed; | ||
| 262 | + top: 16px; | ||
| 263 | + width: auto; | ||
| 264 | + height: auto; | ||
| 265 | + overflow: auto; | ||
| 266 | + padding : 30px; | ||
| 267 | + } | ||
| 268 | + | ||
| 259 | </style> | 269 | </style> |
| 260 | 270 | ||
| 261 | <iron-ajax | 271 | <iron-ajax |
| @@ -317,6 +327,7 @@ Example: | @@ -317,6 +327,7 @@ Example: | ||
| 317 | </template> | 327 | </template> |
| 318 | </paper-menu> | 328 | </paper-menu> |
| 319 | </paper-dropdown-menu> | 329 | </paper-dropdown-menu> |
| 330 | + <paper-icon-button id="infoButton" on-click="_onInfoClick" icon="info-outline" alt="Information about selected dataset" title="info-button" style="color:#9e9e9e;"></paper-icon-button> | ||
| 320 | </div> | 331 | </div> |
| 321 | 332 | ||
| 322 | <div><img src="static/images/or.png" style="position: relative;left: 50%;padding-top:20px"></div> | 333 | <div><img src="static/images/or.png" style="position: relative;left: 50%;padding-top:20px"></div> |
| @@ -416,6 +427,12 @@ Example: | @@ -416,6 +427,12 @@ Example: | ||
| 416 | 427 | ||
| 417 | <paper-toast id="message" text=""></paper-toast> | 428 | <paper-toast id="message" text=""></paper-toast> |
| 418 | 429 | ||
| 430 | + <paper-dialog id="infoDialog"> | ||
| 431 | + <h2 id="infoDialogTitle"></h2> | ||
| 432 | + <paper-dialog-scrollable id="infoDialogContent"> | ||
| 433 | + </paper-dialog-scrollable> | ||
| 434 | + </paper-dialog> | ||
| 435 | + | ||
| 419 | </content> | 436 | </content> |
| 420 | </template> | 437 | </template> |
| 421 | 438 | ||
| @@ -688,7 +705,7 @@ Example: | @@ -688,7 +705,7 @@ Example: | ||
| 688 | this.selected = this.selected === 0 ? 0 : (this.selected - 1); | 705 | this.selected = this.selected === 0 ? 0 : (this.selected - 1); |
| 689 | }, | 706 | }, |
| 690 | /** | 707 | /** |
| 691 | - * Callback for manage the next pass button | 708 | + * Callback to manage the next pass button |
| 692 | * | 709 | * |
| 693 | * @method _onNextClick | 710 | * @method _onNextClick |
| 694 | * | 711 | * |
| @@ -702,6 +719,15 @@ Example: | @@ -702,6 +719,15 @@ Example: | ||
| 702 | this.selected = this.selected === 2 ? 2 : (this.selected + 1); | 719 | this.selected = this.selected === 2 ? 2 : (this.selected + 1); |
| 703 | }, | 720 | }, |
| 704 | /** | 721 | /** |
| 722 | + * Callback to manage InfoButton click to give user information about the selected dataset | ||
| 723 | + * | ||
| 724 | + */ | ||
| 725 | + _onInfoClick : function(){ | ||
| 726 | + | ||
| 727 | + this.$.infoDialog.open(); | ||
| 728 | + | ||
| 729 | + }, | ||
| 730 | + /** | ||
| 705 | * Callback related to datasource selection from select menu | 731 | * Callback related to datasource selection from select menu |
| 706 | * | 732 | * |
| 707 | * @method _datasourceSelected | 733 | * @method _datasourceSelected |
| @@ -711,6 +737,9 @@ Example: | @@ -711,6 +737,9 @@ Example: | ||
| 711 | _datasourceSelected : function(e){ | 737 | _datasourceSelected : function(e){ |
| 712 | 738 | ||
| 713 | this.$.data_url.value = this.datasets[parseInt(e.target.id)].url; | 739 | this.$.data_url.value = this.datasets[parseInt(e.target.id)].url; |
| 740 | + this.$.infoDialogTitle.innerHTML = this.datasets[parseInt(e.target.id)].name; | ||
| 741 | + this.$.infoDialogContent.innerHTML = this.datasets[parseInt(e.target.id)].description; | ||
| 742 | + | ||
| 714 | }, | 743 | }, |
| 715 | /** | 744 | /** |
| 716 | * Callback related to data url change | 745 | * Callback related to data url change |