Blame view

controllets/animated-button-container-controllet/animated-button-container-controllet.html 4.89 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 {

2ab5559c   Renato De Donato   animated-button-c...
41
42
              height: 600px;

              width: 484px;

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

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

2ab5559c   Renato De Donato   animated-button-c...
45
              top: 20%;

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;

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

  

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

              position: absolute;

              height: 32px;

              width: 32px;

              margin: 8px;

              top: 0px;

              right: 0px;

              --paper-fab-background:#B6B6B6;

67b280f4   Luigi Serra   search feature
75
76
          }

  

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

11455f01   Luigi Serra   updates
78
79
              position: absolute;

              top: 0px;

ca7442b9   Luigi Serra   updates
80
              left: 0px;

67b280f4   Luigi Serra   search feature
81
82
          }

  

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

8a0bbd62   Luigi Serra   updates
84
              position: relative;

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

8a0bbd62   Luigi Serra   updates
86
              height: 100%;

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

              z-index: 1000;

8a0bbd62   Luigi Serra   updates
89
90
          }

  

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

8a0bbd62   Luigi Serra   updates
92
  

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

67b280f4   Luigi Serra   search feature
94
  

2ab5559c   Renato De Donato   animated-button-c...
95
96
97
98
99
100
          <div class="button-container">

             <span on-click="_onOpenClick">

                <iron-icon class="myspace" icon="icons:folder-open"></iron-icon>

                 <!--create-new-folder-->

             </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

67b280f4   Luigi Serra   search feature
139
140
                  }

              },

f748e9cf   Luigi Serra   new controllet an...
141
  

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

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

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

67b280f4   Luigi Serra   search feature
145
146
  

              _onOpenClick: function() {

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

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

67b280f4   Luigi Serra   search feature
149
150
  

              _onCloseClick: function(){

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

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

67b280f4   Luigi Serra   search feature
153
  

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

31d9a4f6   Luigi Serra   updates
155
156
157
158
159
160
161
162
                  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);

                      }

                  }

f748e9cf   Luigi Serra   new controllet an...
163
              }

f748e9cf   Luigi Serra   new controllet an...
164
  

67b280f4   Luigi Serra   search feature
165
          });

f748e9cf   Luigi Serra   new controllet an...
166
  

67b280f4   Luigi Serra   search feature
167
168
      </script>

  </dom-module>