Blame view

controllets/animated-button-container-controllet/animated-button-container-controllet.html 5.37 KB
f748e9cf   Luigi Serra   new controllet an...
1
  <link rel="import" href="../../bower_components/polymer/polymer.html">

2ab5559c   Renato De Donato   animated-button-c...
2
3
  

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

f748e9cf   Luigi Serra   new controllet an...
4
  <link rel="import" href="../../bower_components/iron-icons/iron-icons.html">

f748e9cf   Luigi Serra   new controllet an...
5
  <link rel="import" href="../../bower_components/paper-material/paper-material.html">

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

2ab5559c   Renato De Donato   animated-button-c...
7
  <link rel="import" href="../../bower_components/paper-fab/paper-fab.html">

f748e9cf   Luigi Serra   new controllet an...
8
  

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

f748e9cf   Luigi Serra   new controllet an...
10
11
12
13
14
  

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

  

      <style>

  

2ab5559c   Renato De Donato   animated-button-c...
15
16
17
18
19
20
21
          iron-icon.myspace {

              padding: 2px;

              margin: 0px;

              color: #FFFFFF;

              height: 32px;

              width: 32px;

              background-color: #00BCD4;

f748e9cf   Luigi Serra   new controllet an...
22
          }

2ab5559c   Renato De Donato   animated-button-c...
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
  

          .button-container {

              cursor: pointer;

              height: 36px;

              width: 36px;

              box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);

          }

  

          .button-container:hover {

              box-shadow: 0 5px 11px 0 rgba(0, 0, 0, 0.18), 0 4px 15px 0 rgba(0, 0, 0, 0.15);

              -webkit-transition: 0.2s ease-out;

              -moz-transition: 0.2s ease-out;

              -o-transition: 0.2s ease-out;

              -ms-transition: 0.2s ease-out;

              transition: 0.2s ease-out;

f748e9cf   Luigi Serra   new controllet an...
38
39
40
          }

  

          .window {

10349394   Renato De Donato   generic-card-cont...
41
42
              height: 620px;

              width: 760px;

6a138ebb   isisadmin   animated button c...
43
              display: none;

bde3a33f   Luigi Serra   containers layout...
44
              position: fixed;

c844388d   Renato De Donato   paper-card ln, bu...
45
              top: 100px;

de1fbec1   Luigi Serra   elements position...
46
47
              right: 0;

              left: 0;

de1fbec1   Luigi Serra   elements position...
48
49
              margin-right: auto;

              margin-left: auto;

f748e9cf   Luigi Serra   new controllet an...
50
51
52
              z-index: 1000;

          }

  

2ab5559c   Renato De Donato   animated-button-c...
53
54
55
56
57
58
59
          .transparent {

              position:fixed;

              top:0;

              left:0;

              width:100%;

              height:100%;

              background-color: rgba(0, 0, 0, 0.4);

f748e9cf   Luigi Serra   new controllet an...
60
61
          }

  

2ab5559c   Renato De Donato   animated-button-c...
62
63
64
          .toolbar {

              background: #2196F3;

              height: 48px;

a53fbbed   Renato De Donato   select-dataset ne...
65
              padding: 4px 0px 0px 0px;

f748e9cf   Luigi Serra   new controllet an...
66
67
          }

  

2ab5559c   Renato De Donato   animated-button-c...
68
69
70
71
72
73
74
75
          paper-fab.close {

              position: absolute;

              height: 32px;

              width: 32px;

              margin: 8px;

              top: 0px;

              right: 0px;

              --paper-fab-background:#B6B6B6;

67b280f4   Luigi Serra   search feature
76
77
          }

  

2ab5559c   Renato De Donato   animated-button-c...
78
          #search_from_animated_button_container {

11455f01   Luigi Serra   updates
79
80
              position: absolute;

              top: 0px;

ca7442b9   Luigi Serra   updates
81
              left: 0px;

67b280f4   Luigi Serra   search feature
82
83
          }

  

2ab5559c   Renato De Donato   animated-button-c...
84
          #container_content {

8a0bbd62   Luigi Serra   updates
85
              position: relative;

2ab5559c   Renato De Donato   animated-button-c...
86
              overflow: auto;

8a0bbd62   Luigi Serra   updates
87
              height: 100%;

2ab5559c   Renato De Donato   animated-button-c...
88
89
              background-color: #E8E8E8;

              z-index: 1000;

8a0bbd62   Luigi Serra   updates
90
91
          }

  

2ab5559c   Renato De Donato   animated-button-c...
92
      </style>

8a0bbd62   Luigi Serra   updates
93
  

2ab5559c   Renato De Donato   animated-button-c...
94
      <template>

67b280f4   Luigi Serra   search feature
95
  

2fc589e3   root   animated-button, ...
96
          <div class="button-container" style$="display: {{_display(pluginKey)}};" title$="{{tooltip}}">

2ab5559c   Renato De Donato   animated-button-c...
97
             <span on-click="_onOpenClick">

2fc589e3   root   animated-button, ...
98
                <iron-icon class="myspace" icon="icons:create-new-folder"></iron-icon>

2ab5559c   Renato De Donato   animated-button-c...
99
100
             </span>

          </div>

de298649   Luigi Serra   controllets and b...
101
  

2ab5559c   Renato De Donato   animated-button-c...
102
          <paper-material id="window" class="window" elevation="5">

f748e9cf   Luigi Serra   new controllet an...
103
  

563db87f   isisadmin   bug fix
104
              <div class="transparent"></div>

2ab5559c   Renato De Donato   animated-button-c...
105
106
  

              <paper-toolbar class="toolbar">

563db87f   isisadmin   bug fix
107
                  <search-panel-controllet id="search_from_animated_button_container" left-direction="true"></search-panel-controllet>

563db87f   isisadmin   bug fix
108
              </paper-toolbar>

f748e9cf   Luigi Serra   new controllet an...
109
  

2ab5559c   Renato De Donato   animated-button-c...
110
111
112
113
114
115
116
              <paper-fab class="close" mini icon="close" on-click="_onCloseClick"></paper-fab>

  

              <div id="container_content">

                  <content></content>

              </div>

  

          </paper-material>

f748e9cf   Luigi Serra   new controllet an...
117
118
119
  

      </template>

  

31d9a4f6   Luigi Serra   updates
120
121
      <script type="text/javascript" src="../shared_js/perfect-scrollbar/js/perfect-scrollbar.jquery.js"></script>

  

67b280f4   Luigi Serra   search feature
122
      <script>

f748e9cf   Luigi Serra   new controllet an...
123
  

67b280f4   Luigi Serra   search feature
124
          Polymer({

f748e9cf   Luigi Serra   new controllet an...
125
  

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

f748e9cf   Luigi Serra   new controllet an...
127
  

67b280f4   Luigi Serra   search feature
128
              listeners:{

f4f24b9d   Luigi Serra   containers layout...
129
                  'search-panel-controllet_content-changed' : '_handleSearch',

11de877b   Luigi Serra   controllets and b...
130
                  'animated-button-container-controllet_close' : '_onCloseClick',

89ddd164   root   windows-open event
131
                  'animated-button-container-controllet_open-window' : '_onOpenClick'

67b280f4   Luigi Serra   search feature
132
              },

f748e9cf   Luigi Serra   new controllet an...
133
  

67b280f4   Luigi Serra   search feature
134
              properties: {

8a0bbd62   Luigi Serra   updates
135
  

31d9a4f6   Luigi Serra   updates
136
137
138
                  searchFunction: {

                      type: String,

                      notify: true

c844388d   Renato De Donato   paper-card ln, bu...
139
140
                  },

  

2fc589e3   root   animated-button, ...
141
                  pluginKey: {

c844388d   Renato De Donato   paper-card ln, bu...
142
                      type: String,

2fc589e3   root   animated-button, ...
143
144
145
146
147
148
                      value: ""

                  },

  

                  tooltip: {

                      type: String,

                      value: ""

67b280f4   Luigi Serra   search feature
149
150
                  }

              },

f748e9cf   Luigi Serra   new controllet an...
151
  

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

31d9a4f6   Luigi Serra   updates
153
                  $(this.$.container_content).perfectScrollbar();

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

67b280f4   Luigi Serra   search feature
155
156
  

              _onOpenClick: function() {

6a138ebb   isisadmin   animated button c...
157
                  $(this.$.window).show();

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

67b280f4   Luigi Serra   search feature
159
160
  

              _onCloseClick: function(){

6a138ebb   isisadmin   animated button c...
161
                  $(this.$.window).hide();

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

67b280f4   Luigi Serra   search feature
163
  

67b280f4   Luigi Serra   search feature
164
              _handleSearch: function(e){

31d9a4f6   Luigi Serra   updates
165
166
167
168
169
170
171
172
                  if(this.$.container_content.children[0]._handleSearch != undefined) {

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

                  }else{

                      if(this.searchFunction != undefined){

                          this.searchFunction = new Function('e','return '+ this.searchFunction);

                          this.searchFunction(e);

                      }

                  }

2fc589e3   root   animated-button, ...
173
174
175
176
177
178
              },

  

              _display: function(pluginKey){

                  if (pluginKey == "public-room")

                      return "none";

                  return "inline";

f748e9cf   Luigi Serra   new controllet an...
179
              }

f748e9cf   Luigi Serra   new controllet an...
180
  

67b280f4   Luigi Serra   search feature
181
          });

f748e9cf   Luigi Serra   new controllet an...
182
  

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

  </dom-module>