Blame view

controllets/animated-button-container-controllet/animated-button-container-controllet.html 5.81 KB
f748e9cf   Luigi Serra   new controllet an...
1
2
3
4
5
6
  

  <link rel="import" href="../../bower_components/polymer/polymer.html">

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

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

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

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

67b280f4   Luigi Serra   search feature
7
  <link rel="import" href="../../bower_components/paper-toolbar/paper-toolbar.html">

f748e9cf   Luigi Serra   new controllet an...
8
9
10
11
12
  <link rel="import" href="../../bower_components/neon-animation/neon-animatable.html">

  <link rel="import" href="../../bower_components/neon-animation/neon-animated-pages.html">

  <link rel="import" href="../../bower_components/neon-animation/neon-animations.html">

  

  <link rel="import" href="../../controllets/items-list-controllet/item-list-controllet.html">

67b280f4   Luigi Serra   search feature
13
  <link rel="import" href="../../controllets/search-panel-controllet/search-panel-controllet.html">

f748e9cf   Luigi Serra   new controllet an...
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
  

  <dom-module id="animated-button-container-controllet">

  

      <style>

  

          :host {

          @apply(--layout-horizontal);

          @apply(--layout-center-center);

          }

          #pages{

              position: absolute;

              top: -38px;

              left: 113px;

          }

  

          .window {

              width: 30vw;

              height: 50vh;

              background: #e8e8e8;

              position: absolute;

              top: 64px;

              left: 0px;

              z-index: 1000;

          }

  

          .hidden{

              display: none;

          }

  

          #close{

              position: absolute;

67b280f4   Luigi Serra   search feature
45
              top: 8px;

f748e9cf   Luigi Serra   new controllet an...
46
47
48
49
50
              left: 28.5vw;

              --iron-icon-height: 24px;

              --iron-icon-width: 24px;

              width: 32px;

              height: 32px;

67b280f4   Luigi Serra   search feature
51
              --paper-fab-background:#9e9e9e;

f748e9cf   Luigi Serra   new controllet an...
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
              z-index: 1001;

          }

  

          #open{

              --iron-icon-height: 48px;

              --iron-icon-width: 48px;

              width: 64px;

              height: 64px;

              --paper-fab-background:#2196f3;

          }

  

          #selected_item{

              margin-left: 25px;

              padding: 0;

              ms-transform: scale(0.60);

              -moz-transform: scale(0.60);

              -o-transform: scale(0.60);

              -webkit-transform: scale(0.60);

              transform: scale(0.60);

              -ms-transform-origin: 0 0;

              -moz-transform-origin: 0 0;

              -o-transform-origin: 0 0;

              -webkit-transform-origin: 0 0;

              transform-origin: 0 0;"

          }

  

          #container_content{

              z-index: 1000;

          }

67b280f4   Luigi Serra   search feature
81
82
83
84
85
86
87
88
89
90
91
92
          #toolbar{

              background: #2196F3 ;

              height: 45px;

          }

  

          search-panel-controllet{

              position: relative;

              top: -5px;

              left: 80px;

          }

  

  

f748e9cf   Luigi Serra   new controllet an...
93
94
95
96
97
98
99
100
101
  

      </style>

  

      <template>

          <neon-animated-pages id="pages" selected="[[selected]]" entry-animation="[[entryAnimation]]" exit-animation="[[exitAnimation]]">

              <neon-animatable><div id="hidden"></div></neon-animatable>

              <neon-animatable>

                  <paper-material elevation="3" id="window" class="window">

                     <paper-fab id="close" mini icon="close" on-click="_onCloseClick"></paper-fab>

67b280f4   Luigi Serra   search feature
102
103
104
                      <paper-toolbar id="toolbar">

                          <search-panel-controllet></search-panel-controllet>

                      </paper-toolbar>

f748e9cf   Luigi Serra   new controllet an...
105
106
107
108
109
110
111
                     <div id="container_content"><content></content></div>

                  </paper-material>

              </neon-animatable>

          </neon-animated-pages>

  

          <div class="horizontal layout" style="height: 64px;">

             <paper-fab mini icon="assessment" id="open" on-click="_onOpenClick"></paper-fab>

67b280f4   Luigi Serra   search feature
112
             <div id="selected_item"></div>

f748e9cf   Luigi Serra   new controllet an...
113
114
115
116
          </div>

  

      </template>

  

67b280f4   Luigi Serra   search feature
117
      <script>

f748e9cf   Luigi Serra   new controllet an...
118
  

67b280f4   Luigi Serra   search feature
119
          Polymer({

f748e9cf   Luigi Serra   new controllet an...
120
  

67b280f4   Luigi Serra   search feature
121
              is: 'animated-button-container-controllet',

f748e9cf   Luigi Serra   new controllet an...
122
  

67b280f4   Luigi Serra   search feature
123
124
125
126
              listeners:{

                  'items-list-controllet_item-selected' : '_elementSelected',

                  'search-panel-controllet_content-changed' : '_handleSearch'

              },

f748e9cf   Luigi Serra   new controllet an...
127
  

67b280f4   Luigi Serra   search feature
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
              properties: {

                  selected : {

                      type  : Number,

                      value : 0

                  },

                  height:{

                      type: String,

                      value: "30vh"

                  },

                  width:{

                      type: String,

                      value: "30vh"

                  },

                  entryAnimation : {

                      type  : String,

                      value : ""

                  },

  

                  exitAnimation  : {

                      type  : String,

                      value : ""

                  }

              },

f748e9cf   Luigi Serra   new controllet an...
151
  

67b280f4   Luigi Serra   search feature
152
153
154
155
              ready: function(){

                  this.$.window.style.height = this.height + "vh";

                  this.$.window.style.width  = (this.width - 0.5) + "vw";

                  this.$.close.style.left    = (this.width - 3.5) + "vw";

f748e9cf   Luigi Serra   new controllet an...
156
              },

67b280f4   Luigi Serra   search feature
157
158
159
160
161
  

              _onOpenClick: function() {

                  this.entryAnimation = 'fade-in-animation';

                  this.exitAnimation  = 'fade-out-animation';

                  this.selected = 1;

f748e9cf   Luigi Serra   new controllet an...
162
              },

67b280f4   Luigi Serra   search feature
163
164
165
166
167
  

              _onCloseClick: function(){

                  /*this.entryAnimation = 'fade-out-animation';

                  this.exitAnimation  = 'fade-in-animation';*/

                  this.selected = 0;

f748e9cf   Luigi Serra   new controllet an...
168
              },

67b280f4   Luigi Serra   search feature
169
170
171
172
  

              _elementSelected: function(e){

                  this.$.selected_item.innerHTML = "";

                  this.$.selected_item.appendChild(e.detail.selectedElement);

f748e9cf   Luigi Serra   new controllet an...
173
              },

67b280f4   Luigi Serra   search feature
174
175
176
              _handleSearch: function(e){

                  if(this.$.container_content.children[0]._handleSearch != undefined)

                     this.$.container_content.children[0]._handleSearch(e);

f748e9cf   Luigi Serra   new controllet an...
177
  

f748e9cf   Luigi Serra   new controllet an...
178
              }

f748e9cf   Luigi Serra   new controllet an...
179
  

67b280f4   Luigi Serra   search feature
180
          });

f748e9cf   Luigi Serra   new controllet an...
181
  

67b280f4   Luigi Serra   search feature
182
183
      </script>

  </dom-module>