-rw-r--r-- | frontend/gamma/js/Bootstrap/bootstrap-affix.js | 140 | ||||
-rw-r--r-- | frontend/gamma/js/Bootstrap/bootstrap-alert.js | 122 | ||||
-rw-r--r-- | frontend/gamma/js/Bootstrap/bootstrap-button.js | 128 | ||||
-rw-r--r-- | frontend/gamma/js/Bootstrap/bootstrap-carousel.js | 208 | ||||
-rw-r--r-- | frontend/gamma/js/Bootstrap/bootstrap-collapse.js | 190 | ||||
-rw-r--r-- | frontend/gamma/js/Bootstrap/bootstrap-dropdown.js | 184 | ||||
-rw-r--r-- | frontend/gamma/js/Bootstrap/bootstrap-modal.js | 268 | ||||
-rw-r--r-- | frontend/gamma/js/Bootstrap/bootstrap-popover.js | 137 | ||||
-rw-r--r-- | frontend/gamma/js/Bootstrap/bootstrap-scrollspy.js | 185 | ||||
-rw-r--r-- | frontend/gamma/js/Bootstrap/bootstrap-tab.js | 167 | ||||
-rw-r--r-- | frontend/gamma/js/Bootstrap/bootstrap-tooltip.js | 310 | ||||
-rw-r--r-- | frontend/gamma/js/Bootstrap/bootstrap-transition.js | 83 | ||||
-rw-r--r-- | frontend/gamma/js/Bootstrap/bootstrap-typeahead.js | 346 |
13 files changed, 0 insertions, 2468 deletions
diff --git a/frontend/gamma/js/Bootstrap/bootstrap-affix.js b/frontend/gamma/js/Bootstrap/bootstrap-affix.js deleted file mode 100644 index 052ecad..0000000 --- a/frontend/gamma/js/Bootstrap/bootstrap-affix.js +++ b/dev/null | |||
@@ -1,140 +0,0 @@ | |||
1 | /* | ||
2 | |||
3 | Copyright 2008-2013 Clipperz Srl | ||
4 | |||
5 | This file is part of Clipperz, the online password manager. | ||
6 | For further information about its features and functionalities please | ||
7 | refer to http://www.clipperz.com. | ||
8 | |||
9 | * Clipperz is free software: you can redistribute it and/or modify it | ||
10 | under the terms of the GNU Affero General Public License as published | ||
11 | by the Free Software Foundation, either version 3 of the License, or | ||
12 | (at your option) any later version. | ||
13 | |||
14 | * Clipperz is distributed in the hope that it will be useful, but | ||
15 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
17 | See the GNU Affero General Public License for more details. | ||
18 | |||
19 | * You should have received a copy of the GNU Affero General Public | ||
20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. | ||
21 | |||
22 | */ | ||
23 | |||
24 | /* ========================================================== | ||
25 | * bootstrap-affix.js v2.2.2 | ||
26 | * http://twitter.github.com/bootstrap/javascript.html#affix | ||
27 | * ========================================================== | ||
28 | * Copyright 2012 Twitter, Inc. | ||
29 | * | ||
30 | * Licensed under the Apache License, Version 2.0 (the "License"); | ||
31 | * you may not use this file except in compliance with the License. | ||
32 | * You may obtain a copy of the License at | ||
33 | * | ||
34 | * http://www.apache.org/licenses/LICENSE-2.0 | ||
35 | * | ||
36 | * Unless required by applicable law or agreed to in writing, software | ||
37 | * distributed under the License is distributed on an "AS IS" BASIS, | ||
38 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
39 | * See the License for the specific language governing permissions and | ||
40 | * limitations under the License. | ||
41 | * ========================================================== */ | ||
42 | |||
43 | |||
44 | !function ($) { | ||
45 | |||
46 | "use strict"; // jshint ;_; | ||
47 | |||
48 | |||
49 | /* AFFIX CLASS DEFINITION | ||
50 | * ====================== */ | ||
51 | |||
52 | var Affix = function (element, options) { | ||
53 | this.options = $.extend({}, $.fn.affix.defaults, options) | ||
54 | this.$window = $(window) | ||
55 | .on('scroll.affix.data-api', $.proxy(this.checkPosition, this)) | ||
56 | .on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this)) | ||
57 | this.$element = $(element) | ||
58 | this.checkPosition() | ||
59 | } | ||
60 | |||
61 | Affix.prototype.checkPosition = function () { | ||
62 | if (!this.$element.is(':visible')) return | ||
63 | |||
64 | var scrollHeight = $(document).height() | ||
65 | , scrollTop = this.$window.scrollTop() | ||
66 | , position = this.$element.offset() | ||
67 | , offset = this.options.offset | ||
68 | , offsetBottom = offset.bottom | ||
69 | , offsetTop = offset.top | ||
70 | , reset = 'affix affix-top affix-bottom' | ||
71 | , affix | ||
72 | |||
73 | if (typeof offset != 'object') offsetBottom = offsetTop = offset | ||
74 | if (typeof offsetTop == 'function') offsetTop = offset.top() | ||
75 | if (typeof offsetBottom == 'function') offsetBottom = offset.bottom() | ||
76 | |||
77 | affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? | ||
78 | false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? | ||
79 | 'bottom' : offsetTop != null && scrollTop <= offsetTop ? | ||
80 | 'top' : false | ||
81 | |||
82 | if (this.affixed === affix) return | ||
83 | |||
84 | this.affixed = affix | ||
85 | this.unpin = affix == 'bottom' ? position.top - scrollTop : null | ||
86 | |||
87 | this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : '')) | ||
88 | } | ||
89 | |||
90 | |||
91 | /* AFFIX PLUGIN DEFINITION | ||
92 | * ======================= */ | ||
93 | |||
94 | var old = $.fn.affix | ||
95 | |||
96 | $.fn.affix = function (option) { | ||
97 | return this.each(function () { | ||
98 | var $this = $(this) | ||
99 | , data = $this.data('affix') | ||
100 | , options = typeof option == 'object' && option | ||
101 | if (!data) $this.data('affix', (data = new Affix(this, options))) | ||
102 | if (typeof option == 'string') data[option]() | ||
103 | }) | ||
104 | } | ||
105 | |||
106 | $.fn.affix.Constructor = Affix | ||
107 | |||
108 | $.fn.affix.defaults = { | ||
109 | offset: 0 | ||
110 | } | ||
111 | |||
112 | |||
113 | /* AFFIX NO CONFLICT | ||
114 | * ================= */ | ||
115 | |||
116 | $.fn.affix.noConflict = function () { | ||
117 | $.fn.affix = old | ||
118 | return this | ||
119 | } | ||
120 | |||
121 | |||
122 | /* AFFIX DATA-API | ||
123 | * ============== */ | ||
124 | |||
125 | $(window).on('load', function () { | ||
126 | $('[data-spy="affix"]').each(function () { | ||
127 | var $spy = $(this) | ||
128 | , data = $spy.data() | ||
129 | |||
130 | data.offset = data.offset || {} | ||
131 | |||
132 | data.offsetBottom && (data.offset.bottom = data.offsetBottom) | ||
133 | data.offsetTop && (data.offset.top = data.offsetTop) | ||
134 | |||
135 | $spy.affix(data) | ||
136 | }) | ||
137 | }) | ||
138 | |||
139 | |||
140 | }(window.jQuery); \ No newline at end of file | ||
diff --git a/frontend/gamma/js/Bootstrap/bootstrap-alert.js b/frontend/gamma/js/Bootstrap/bootstrap-alert.js deleted file mode 100644 index 63028f2..0000000 --- a/frontend/gamma/js/Bootstrap/bootstrap-alert.js +++ b/dev/null | |||
@@ -1,122 +0,0 @@ | |||
1 | /* | ||
2 | |||
3 | Copyright 2008-2013 Clipperz Srl | ||
4 | |||
5 | This file is part of Clipperz, the online password manager. | ||
6 | For further information about its features and functionalities please | ||
7 | refer to http://www.clipperz.com. | ||
8 | |||
9 | * Clipperz is free software: you can redistribute it and/or modify it | ||
10 | under the terms of the GNU Affero General Public License as published | ||
11 | by the Free Software Foundation, either version 3 of the License, or | ||
12 | (at your option) any later version. | ||
13 | |||
14 | * Clipperz is distributed in the hope that it will be useful, but | ||
15 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
17 | See the GNU Affero General Public License for more details. | ||
18 | |||
19 | * You should have received a copy of the GNU Affero General Public | ||
20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. | ||
21 | |||
22 | */ | ||
23 | |||
24 | /* ========================================================== | ||
25 | * bootstrap-alert.js v2.2.2 | ||
26 | * http://twitter.github.com/bootstrap/javascript.html#alerts | ||
27 | * ========================================================== | ||
28 | * Copyright 2012 Twitter, Inc. | ||
29 | * | ||
30 | * Licensed under the Apache License, Version 2.0 (the "License"); | ||
31 | * you may not use this file except in compliance with the License. | ||
32 | * You may obtain a copy of the License at | ||
33 | * | ||
34 | * http://www.apache.org/licenses/LICENSE-2.0 | ||
35 | * | ||
36 | * Unless required by applicable law or agreed to in writing, software | ||
37 | * distributed under the License is distributed on an "AS IS" BASIS, | ||
38 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
39 | * See the License for the specific language governing permissions and | ||
40 | * limitations under the License. | ||
41 | * ========================================================== */ | ||
42 | |||
43 | |||
44 | !function ($) { | ||
45 | |||
46 | "use strict"; // jshint ;_; | ||
47 | |||
48 | |||
49 | /* ALERT CLASS DEFINITION | ||
50 | * ====================== */ | ||
51 | |||
52 | var dismiss = '[data-dismiss="alert"]' | ||
53 | , Alert = function (el) { | ||
54 | $(el).on('click', dismiss, this.close) | ||
55 | } | ||
56 | |||
57 | Alert.prototype.close = function (e) { | ||
58 | var $this = $(this) | ||
59 | , selector = $this.attr('data-target') | ||
60 | , $parent | ||
61 | |||
62 | if (!selector) { | ||
63 | selector = $this.attr('href') | ||
64 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 | ||
65 | } | ||
66 | |||
67 | $parent = $(selector) | ||
68 | |||
69 | e && e.preventDefault() | ||
70 | |||
71 | $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent()) | ||
72 | |||
73 | $parent.trigger(e = $.Event('close')) | ||
74 | |||
75 | if (e.isDefaultPrevented()) return | ||
76 | |||
77 | $parent.removeClass('in') | ||
78 | |||
79 | function removeElement() { | ||
80 | $parent | ||
81 | .trigger('closed') | ||
82 | .remove() | ||
83 | } | ||
84 | |||
85 | $.support.transition && $parent.hasClass('fade') ? | ||
86 | $parent.on($.support.transition.end, removeElement) : | ||
87 | removeElement() | ||
88 | } | ||
89 | |||
90 | |||
91 | /* ALERT PLUGIN DEFINITION | ||
92 | * ======================= */ | ||
93 | |||
94 | var old = $.fn.alert | ||
95 | |||
96 | $.fn.alert = function (option) { | ||
97 | return this.each(function () { | ||
98 | var $this = $(this) | ||
99 | , data = $this.data('alert') | ||
100 | if (!data) $this.data('alert', (data = new Alert(this))) | ||
101 | if (typeof option == 'string') data[option].call($this) | ||
102 | }) | ||
103 | } | ||
104 | |||
105 | $.fn.alert.Constructor = Alert | ||
106 | |||
107 | |||
108 | /* ALERT NO CONFLICT | ||
109 | * ================= */ | ||
110 | |||
111 | $.fn.alert.noConflict = function () { | ||
112 | $.fn.alert = old | ||
113 | return this | ||
114 | } | ||
115 | |||
116 | |||
117 | /* ALERT DATA-API | ||
118 | * ============== */ | ||
119 | |||
120 | $(document).on('click.alert.data-api', dismiss, Alert.prototype.close) | ||
121 | |||
122 | }(window.jQuery); \ No newline at end of file | ||
diff --git a/frontend/gamma/js/Bootstrap/bootstrap-button.js b/frontend/gamma/js/Bootstrap/bootstrap-button.js deleted file mode 100644 index 2c1226e..0000000 --- a/frontend/gamma/js/Bootstrap/bootstrap-button.js +++ b/dev/null | |||
@@ -1,128 +0,0 @@ | |||
1 | /* | ||
2 | |||
3 | Copyright 2008-2013 Clipperz Srl | ||
4 | |||
5 | This file is part of Clipperz, the online password manager. | ||
6 | For further information about its features and functionalities please | ||
7 | refer to http://www.clipperz.com. | ||
8 | |||
9 | * Clipperz is free software: you can redistribute it and/or modify it | ||
10 | under the terms of the GNU Affero General Public License as published | ||
11 | by the Free Software Foundation, either version 3 of the License, or | ||
12 | (at your option) any later version. | ||
13 | |||
14 | * Clipperz is distributed in the hope that it will be useful, but | ||
15 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
17 | See the GNU Affero General Public License for more details. | ||
18 | |||
19 | * You should have received a copy of the GNU Affero General Public | ||
20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. | ||
21 | |||
22 | */ | ||
23 | |||
24 | /* ============================================================ | ||
25 | * bootstrap-button.js v2.2.2 | ||
26 | * http://twitter.github.com/bootstrap/javascript.html#buttons | ||
27 | * ============================================================ | ||
28 | * Copyright 2012 Twitter, Inc. | ||
29 | * | ||
30 | * Licensed under the Apache License, Version 2.0 (the "License"); | ||
31 | * you may not use this file except in compliance with the License. | ||
32 | * You may obtain a copy of the License at | ||
33 | * | ||
34 | * http://www.apache.org/licenses/LICENSE-2.0 | ||
35 | * | ||
36 | * Unless required by applicable law or agreed to in writing, software | ||
37 | * distributed under the License is distributed on an "AS IS" BASIS, | ||
38 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
39 | * See the License for the specific language governing permissions and | ||
40 | * limitations under the License. | ||
41 | * ============================================================ */ | ||
42 | |||
43 | |||
44 | !function ($) { | ||
45 | |||
46 | "use strict"; // jshint ;_; | ||
47 | |||
48 | |||
49 | /* BUTTON PUBLIC CLASS DEFINITION | ||
50 | * ============================== */ | ||
51 | |||
52 | var Button = function (element, options) { | ||
53 | this.$element = $(element) | ||
54 | this.options = $.extend({}, $.fn.button.defaults, options) | ||
55 | } | ||
56 | |||
57 | Button.prototype.setState = function (state) { | ||
58 | var d = 'disabled' | ||
59 | , $el = this.$element | ||
60 | , data = $el.data() | ||
61 | , val = $el.is('input') ? 'val' : 'html' | ||
62 | |||
63 | state = state + 'Text' | ||
64 | data.resetText || $el.data('resetText', $el[val]()) | ||
65 | |||
66 | $el[val](data[state] || this.options[state]) | ||
67 | |||
68 | // push to event loop to allow forms to submit | ||
69 | setTimeout(function () { | ||
70 | state == 'loadingText' ? | ||
71 | $el.addClass(d).attr(d, d) : | ||
72 | $el.removeClass(d).removeAttr(d) | ||
73 | }, 0) | ||
74 | } | ||
75 | |||
76 | Button.prototype.toggle = function () { | ||
77 | var $parent = this.$element.closest('[data-toggle="buttons-radio"]') | ||
78 | |||
79 | $parent && $parent | ||
80 | .find('.active') | ||
81 | .removeClass('active') | ||
82 | |||
83 | this.$element.toggleClass('active') | ||
84 | } | ||
85 | |||
86 | |||
87 | /* BUTTON PLUGIN DEFINITION | ||
88 | * ======================== */ | ||
89 | |||
90 | var old = $.fn.button | ||
91 | |||
92 | $.fn.button = function (option) { | ||
93 | return this.each(function () { | ||
94 | var $this = $(this) | ||
95 | , data = $this.data('button') | ||
96 | , options = typeof option == 'object' && option | ||
97 | if (!data) $this.data('button', (data = new Button(this, options))) | ||
98 | if (option == 'toggle') data.toggle() | ||
99 | else if (option) data.setState(option) | ||
100 | }) | ||
101 | } | ||
102 | |||
103 | $.fn.button.defaults = { | ||
104 | loadingText: 'loading...' | ||
105 | } | ||
106 | |||
107 | $.fn.button.Constructor = Button | ||
108 | |||
109 | |||
110 | /* BUTTON NO CONFLICT | ||
111 | * ================== */ | ||
112 | |||
113 | $.fn.button.noConflict = function () { | ||
114 | $.fn.button = old | ||
115 | return this | ||
116 | } | ||
117 | |||
118 | |||
119 | /* BUTTON DATA-API | ||
120 | * =============== */ | ||
121 | |||
122 | $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) { | ||
123 | var $btn = $(e.target) | ||
124 | if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') | ||
125 | $btn.button('toggle') | ||
126 | }) | ||
127 | |||
128 | }(window.jQuery); \ No newline at end of file | ||
diff --git a/frontend/gamma/js/Bootstrap/bootstrap-carousel.js b/frontend/gamma/js/Bootstrap/bootstrap-carousel.js deleted file mode 100644 index e127bc7..0000000 --- a/frontend/gamma/js/Bootstrap/bootstrap-carousel.js +++ b/dev/null | |||
@@ -1,208 +0,0 @@ | |||
1 | /* | ||
2 | |||
3 | Copyright 2008-2013 Clipperz Srl | ||
4 | |||
5 | This file is part of Clipperz, the online password manager. | ||
6 | For further information about its features and functionalities please | ||
7 | refer to http://www.clipperz.com. | ||
8 | |||
9 | * Clipperz is free software: you can redistribute it and/or modify it | ||
10 | under the terms of the GNU Affero General Public License as published | ||
11 | by the Free Software Foundation, either version 3 of the License, or | ||
12 | (at your option) any later version. | ||
13 | |||
14 | * Clipperz is distributed in the hope that it will be useful, but | ||
15 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
17 | See the GNU Affero General Public License for more details. | ||
18 | |||
19 | * You should have received a copy of the GNU Affero General Public | ||
20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. | ||
21 | |||
22 | */ | ||
23 | |||
24 | /* ========================================================== | ||
25 | * bootstrap-carousel.js v2.2.2 | ||
26 | * http://twitter.github.com/bootstrap/javascript.html#carousel | ||
27 | * ========================================================== | ||
28 | * Copyright 2012 Twitter, Inc. | ||
29 | * | ||
30 | * Licensed under the Apache License, Version 2.0 (the "License"); | ||
31 | * you may not use this file except in compliance with the License. | ||
32 | * You may obtain a copy of the License at | ||
33 | * | ||
34 | * http://www.apache.org/licenses/LICENSE-2.0 | ||
35 | * | ||
36 | * Unless required by applicable law or agreed to in writing, software | ||
37 | * distributed under the License is distributed on an "AS IS" BASIS, | ||
38 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
39 | * See the License for the specific language governing permissions and | ||
40 | * limitations under the License. | ||
41 | * ========================================================== */ | ||
42 | |||
43 | |||
44 | !function ($) { | ||
45 | |||
46 | "use strict"; // jshint ;_; | ||
47 | |||
48 | |||
49 | /* CAROUSEL CLASS DEFINITION | ||
50 | * ========================= */ | ||
51 | |||
52 | var Carousel = function (element, options) { | ||
53 | this.$element = $(element) | ||
54 | this.options = options | ||
55 | this.options.pause == 'hover' && this.$element | ||
56 | .on('mouseenter', $.proxy(this.pause, this)) | ||
57 | .on('mouseleave', $.proxy(this.cycle, this)) | ||
58 | } | ||
59 | |||
60 | Carousel.prototype = { | ||
61 | |||
62 | cycle: function (e) { | ||
63 | if (!e) this.paused = false | ||
64 | this.options.interval | ||
65 | && !this.paused | ||
66 | && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) | ||
67 | return this | ||
68 | } | ||
69 | |||
70 | , to: function (pos) { | ||
71 | var $active = this.$element.find('.item.active') | ||
72 | , children = $active.parent().children() | ||
73 | , activePos = children.index($active) | ||
74 | , that = this | ||
75 | |||
76 | if (pos > (children.length - 1) || pos < 0) return | ||
77 | |||
78 | if (this.sliding) { | ||
79 | return this.$element.one('slid', function () { | ||
80 | that.to(pos) | ||
81 | }) | ||
82 | } | ||
83 | |||
84 | if (activePos == pos) { | ||
85 | return this.pause().cycle() | ||
86 | } | ||
87 | |||
88 | return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos])) | ||
89 | } | ||
90 | |||
91 | , pause: function (e) { | ||
92 | if (!e) this.paused = true | ||
93 | if (this.$element.find('.next, .prev').length && $.support.transition.end) { | ||
94 | this.$element.trigger($.support.transition.end) | ||
95 | this.cycle() | ||
96 | } | ||
97 | clearInterval(this.interval) | ||
98 | this.interval = null | ||
99 | return this | ||
100 | } | ||
101 | |||
102 | , next: function () { | ||
103 | if (this.sliding) return | ||
104 | return this.slide('next') | ||
105 | } | ||
106 | |||
107 | , prev: function () { | ||
108 | if (this.sliding) return | ||
109 | return this.slide('prev') | ||
110 | } | ||
111 | |||
112 | , slide: function (type, next) { | ||
113 | var $active = this.$element.find('.item.active') | ||
114 | , $next = next || $active[type]() | ||
115 | , isCycling = this.interval | ||
116 | , direction = type == 'next' ? 'left' : 'right' | ||
117 | , fallback = type == 'next' ? 'first' : 'last' | ||
118 | , that = this | ||
119 | , e | ||
120 | |||
121 | this.sliding = true | ||
122 | |||
123 | isCycling && this.pause() | ||
124 | |||
125 | $next = $next.length ? $next : this.$element.find('.item')[fallback]() | ||
126 | |||
127 | e = $.Event('slide', { | ||
128 | relatedTarget: $next[0] | ||
129 | }) | ||
130 | |||
131 | if ($next.hasClass('active')) return | ||
132 | |||
133 | if ($.support.transition && this.$element.hasClass('slide')) { | ||
134 | this.$element.trigger(e) | ||
135 | if (e.isDefaultPrevented()) return | ||
136 | $next.addClass(type) | ||
137 | $next[0].offsetWidth // force reflow | ||
138 | $active.addClass(direction) | ||
139 | $next.addClass(direction) | ||
140 | this.$element.one($.support.transition.end, function () { | ||
141 | $next.removeClass([type, direction].join(' ')).addClass('active') | ||
142 | $active.removeClass(['active', direction].join(' ')) | ||
143 | that.sliding = false | ||
144 | setTimeout(function () { that.$element.trigger('slid') }, 0) | ||
145 | }) | ||
146 | } else { | ||
147 | this.$element.trigger(e) | ||
148 | if (e.isDefaultPrevented()) return | ||
149 | $active.removeClass('active') | ||
150 | $next.addClass('active') | ||
151 | this.sliding = false | ||
152 | this.$element.trigger('slid') | ||
153 | } | ||
154 | |||
155 | isCycling && this.cycle() | ||
156 | |||
157 | return this | ||
158 | } | ||
159 | |||
160 | } | ||
161 | |||
162 | |||
163 | /* CAROUSEL PLUGIN DEFINITION | ||
164 | * ========================== */ | ||
165 | |||
166 | var old = $.fn.carousel | ||
167 | |||
168 | $.fn.carousel = function (option) { | ||
169 | return this.each(function () { | ||
170 | var $this = $(this) | ||
171 | , data = $this.data('carousel') | ||
172 | , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option) | ||
173 | , action = typeof option == 'string' ? option : options.slide | ||
174 | if (!data) $this.data('carousel', (data = new Carousel(this, options))) | ||
175 | if (typeof option == 'number') data.to(option) | ||
176 | else if (action) data[action]() | ||
177 | else if (options.interval) data.cycle() | ||
178 | }) | ||
179 | } | ||
180 | |||
181 | $.fn.carousel.defaults = { | ||
182 | interval: 5000 | ||
183 | , pause: 'hover' | ||
184 | } | ||
185 | |||
186 | $.fn.carousel.Constructor = Carousel | ||
187 | |||
188 | |||
189 | /* CAROUSEL NO CONFLICT | ||
190 | * ==================== */ | ||
191 | |||
192 | $.fn.carousel.noConflict = function () { | ||
193 | $.fn.carousel = old | ||
194 | return this | ||
195 | } | ||
196 | |||
197 | /* CAROUSEL DATA-API | ||
198 | * ================= */ | ||
199 | |||
200 | $(document).on('click.carousel.data-api', '[data-slide]', function (e) { | ||
201 | var $this = $(this), href | ||
202 | , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 | ||
203 | , options = $.extend({}, $target.data(), $this.data()) | ||
204 | $target.carousel(options) | ||
205 | e.preventDefault() | ||
206 | }) | ||
207 | |||
208 | }(window.jQuery); \ No newline at end of file | ||
diff --git a/frontend/gamma/js/Bootstrap/bootstrap-collapse.js b/frontend/gamma/js/Bootstrap/bootstrap-collapse.js deleted file mode 100644 index 31b7168..0000000 --- a/frontend/gamma/js/Bootstrap/bootstrap-collapse.js +++ b/dev/null | |||
@@ -1,190 +0,0 @@ | |||
1 | /* | ||
2 | |||
3 | Copyright 2008-2013 Clipperz Srl | ||
4 | |||
5 | This file is part of Clipperz, the online password manager. | ||
6 | For further information about its features and functionalities please | ||
7 | refer to http://www.clipperz.com. | ||
8 | |||
9 | * Clipperz is free software: you can redistribute it and/or modify it | ||
10 | under the terms of the GNU Affero General Public License as published | ||
11 | by the Free Software Foundation, either version 3 of the License, or | ||
12 | (at your option) any later version. | ||
13 | |||
14 | * Clipperz is distributed in the hope that it will be useful, but | ||
15 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
17 | See the GNU Affero General Public License for more details. | ||
18 | |||
19 | * You should have received a copy of the GNU Affero General Public | ||
20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. | ||
21 | |||
22 | */ | ||
23 | |||
24 | /* ============================================================= | ||
25 | * bootstrap-collapse.js v2.2.2 | ||
26 | * http://twitter.github.com/bootstrap/javascript.html#collapse | ||
27 | * ============================================================= | ||
28 | * Copyright 2012 Twitter, Inc. | ||
29 | * | ||
30 | * Licensed under the Apache License, Version 2.0 (the "License"); | ||
31 | * you may not use this file except in compliance with the License. | ||
32 | * You may obtain a copy of the License at | ||
33 | * | ||
34 | * http://www.apache.org/licenses/LICENSE-2.0 | ||
35 | * | ||
36 | * Unless required by applicable law or agreed to in writing, software | ||
37 | * distributed under the License is distributed on an "AS IS" BASIS, | ||
38 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
39 | * See the License for the specific language governing permissions and | ||
40 | * limitations under the License. | ||
41 | * ============================================================ */ | ||
42 | |||
43 | |||
44 | !function ($) { | ||
45 | |||
46 | "use strict"; // jshint ;_; | ||
47 | |||
48 | |||
49 | /* COLLAPSE PUBLIC CLASS DEFINITION | ||
50 | * ================================ */ | ||
51 | |||
52 | var Collapse = function (element, options) { | ||
53 | this.$element = $(element) | ||
54 | this.options = $.extend({}, $.fn.collapse.defaults, options) | ||
55 | |||
56 | if (this.options.parent) { | ||
57 | this.$parent = $(this.options.parent) | ||
58 | } | ||
59 | |||
60 | this.options.toggle && this.toggle() | ||
61 | } | ||
62 | |||
63 | Collapse.prototype = { | ||
64 | |||
65 | constructor: Collapse | ||
66 | |||
67 | , dimension: function () { | ||
68 | var hasWidth = this.$element.hasClass('width') | ||
69 | return hasWidth ? 'width' : 'height' | ||
70 | } | ||
71 | |||
72 | , show: function () { | ||
73 | var dimension | ||
74 | , scroll | ||
75 | , actives | ||
76 | , hasData | ||
77 | |||
78 | if (this.transitioning) return | ||
79 | |||
80 | dimension = this.dimension() | ||
81 | scroll = $.camelCase(['scroll', dimension].join('-')) | ||
82 | actives = this.$parent && this.$parent.find('> .accordion-group > .in') | ||
83 | |||
84 | if (actives && actives.length) { | ||
85 | hasData = actives.data('collapse') | ||
86 | if (hasData && hasData.transitioning) return | ||
87 | actives.collapse('hide') | ||
88 | hasData || actives.data('collapse', null) | ||
89 | } | ||
90 | |||
91 | this.$element[dimension](0) | ||
92 | this.transition('addClass', $.Event('show'), 'shown') | ||
93 | $.support.transition && this.$element[dimension](this.$element[0][scroll]) | ||
94 | } | ||
95 | |||
96 | , hide: function () { | ||
97 | var dimension | ||
98 | if (this.transitioning) return | ||
99 | dimension = this.dimension() | ||
100 | this.reset(this.$element[dimension]()) | ||
101 | this.transition('removeClass', $.Event('hide'), 'hidden') | ||
102 | this.$element[dimension](0) | ||
103 | } | ||
104 | |||
105 | , reset: function (size) { | ||
106 | var dimension = this.dimension() | ||
107 | |||
108 | this.$element | ||
109 | .removeClass('collapse') | ||
110 | [dimension](size || 'auto') | ||
111 | [0].offsetWidth | ||
112 | |||
113 | this.$element[size !== null ? 'addClass' : 'removeClass']('collapse') | ||
114 | |||
115 | return this | ||
116 | } | ||
117 | |||
118 | , transition: function (method, startEvent, completeEvent) { | ||
119 | var that = this | ||
120 | , complete = function () { | ||
121 | if (startEvent.type == 'show') that.reset() | ||
122 | that.transitioning = 0 | ||
123 | that.$element.trigger(completeEvent) | ||
124 | } | ||
125 | |||
126 | this.$element.trigger(startEvent) | ||
127 | |||
128 | if (startEvent.isDefaultPrevented()) return | ||
129 | |||
130 | this.transitioning = 1 | ||
131 | |||
132 | this.$element[method]('in') | ||
133 | |||
134 | $.support.transition && this.$element.hasClass('collapse') ? | ||
135 | this.$element.one($.support.transition.end, complete) : | ||
136 | complete() | ||
137 | } | ||
138 | |||
139 | , toggle: function () { | ||
140 | this[this.$element.hasClass('in') ? 'hide' : 'show']() | ||
141 | } | ||
142 | |||
143 | } | ||
144 | |||
145 | |||
146 | /* COLLAPSE PLUGIN DEFINITION | ||
147 | * ========================== */ | ||
148 | |||
149 | var old = $.fn.collapse | ||
150 | |||
151 | $.fn.collapse = function (option) { | ||
152 | return this.each(function () { | ||
153 | var $this = $(this) | ||
154 | , data = $this.data('collapse') | ||
155 | , options = typeof option == 'object' && option | ||
156 | if (!data) $this.data('collapse', (data = new Collapse(this, options))) | ||
157 | if (typeof option == 'string') data[option]() | ||
158 | }) | ||
159 | } | ||
160 | |||
161 | $.fn.collapse.defaults = { | ||
162 | toggle: true | ||
163 | } | ||
164 | |||
165 | $.fn.collapse.Constructor = Collapse | ||
166 | |||
167 | |||
168 | /* COLLAPSE NO CONFLICT | ||
169 | * ==================== */ | ||
170 | |||
171 | $.fn.collapse.noConflict = function () { | ||
172 | $.fn.collapse = old | ||
173 | return this | ||
174 | } | ||
175 | |||
176 | |||
177 | /* COLLAPSE DATA-API | ||
178 | * ================= */ | ||
179 | |||
180 | $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) { | ||
181 | var $this = $(this), href | ||
182 | , target = $this.attr('data-target') | ||
183 | || e.preventDefault() | ||
184 | || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 | ||
185 | , option = $(target).data('collapse') ? 'toggle' : $this.data() | ||
186 | $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed') | ||
187 | $(target).collapse(option) | ||
188 | }) | ||
189 | |||
190 | }(window.jQuery); \ No newline at end of file | ||
diff --git a/frontend/gamma/js/Bootstrap/bootstrap-dropdown.js b/frontend/gamma/js/Bootstrap/bootstrap-dropdown.js deleted file mode 100644 index 3b77bb3..0000000 --- a/frontend/gamma/js/Bootstrap/bootstrap-dropdown.js +++ b/dev/null | |||
@@ -1,184 +0,0 @@ | |||
1 | /* | ||
2 | |||
3 | Copyright 2008-2013 Clipperz Srl | ||
4 | |||
5 | This file is part of Clipperz, the online password manager. | ||
6 | For further information about its features and functionalities please | ||
7 | refer to http://www.clipperz.com. | ||
8 | |||
9 | * Clipperz is free software: you can redistribute it and/or modify it | ||
10 | under the terms of the GNU Affero General Public License as published | ||
11 | by the Free Software Foundation, either version 3 of the License, or | ||
12 | (at your option) any later version. | ||
13 | |||
14 | * Clipperz is distributed in the hope that it will be useful, but | ||
15 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
17 | See the GNU Affero General Public License for more details. | ||
18 | |||
19 | * You should have received a copy of the GNU Affero General Public | ||
20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. | ||
21 | |||
22 | */ | ||
23 | |||
24 | /* ============================================================ | ||
25 | * bootstrap-dropdown.js v2.2.2 | ||
26 | * http://twitter.github.com/bootstrap/javascript.html#dropdowns | ||
27 | * ============================================================ | ||
28 | * Copyright 2012 Twitter, Inc. | ||
29 | * | ||
30 | * Licensed under the Apache License, Version 2.0 (the "License"); | ||
31 | * you may not use this file except in compliance with the License. | ||
32 | * You may obtain a copy of the License at | ||
33 | * | ||
34 | * http://www.apache.org/licenses/LICENSE-2.0 | ||
35 | * | ||
36 | * Unless required by applicable law or agreed to in writing, software | ||
37 | * distributed under the License is distributed on an "AS IS" BASIS, | ||
38 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
39 | * See the License for the specific language governing permissions and | ||
40 | * limitations under the License. | ||
41 | * ============================================================ */ | ||
42 | |||
43 | |||
44 | !function ($) { | ||
45 | |||
46 | "use strict"; // jshint ;_; | ||
47 | |||
48 | |||
49 | /* DROPDOWN CLASS DEFINITION | ||
50 | * ========================= */ | ||
51 | |||
52 | var toggle = '[data-toggle=dropdown]' | ||
53 | , Dropdown = function (element) { | ||
54 | var $el = $(element).on('click.dropdown.data-api', this.toggle) | ||
55 | $('html').on('click.dropdown.data-api', function () { | ||
56 | $el.parent().removeClass('open') | ||
57 | }) | ||
58 | } | ||
59 | |||
60 | Dropdown.prototype = { | ||
61 | |||
62 | constructor: Dropdown | ||
63 | |||
64 | , toggle: function (e) { | ||
65 | var $this = $(this) | ||
66 | , $parent | ||
67 | , isActive | ||
68 | |||
69 | if ($this.is('.disabled, :disabled')) return | ||
70 | |||
71 | $parent = getParent($this) | ||
72 | |||
73 | isActive = $parent.hasClass('open') | ||
74 | |||
75 | clearMenus() | ||
76 | |||
77 | if (!isActive) { | ||
78 | $parent.toggleClass('open') | ||
79 | } | ||
80 | |||
81 | $this.focus() | ||
82 | |||
83 | return false | ||
84 | } | ||
85 | |||
86 | , keydown: function (e) { | ||
87 | var $this | ||
88 | , $items | ||
89 | , $active | ||
90 | , $parent | ||
91 | , isActive | ||
92 | , index | ||
93 | |||
94 | if (!/(38|40|27)/.test(e.keyCode)) return | ||
95 | |||
96 | $this = $(this) | ||
97 | |||
98 | e.preventDefault() | ||
99 | e.stopPropagation() | ||
100 | |||
101 | if ($this.is('.disabled, :disabled')) return | ||
102 | |||
103 | $parent = getParent($this) | ||
104 | |||
105 | isActive = $parent.hasClass('open') | ||
106 | |||
107 | if (!isActive || (isActive && e.keyCode == 27)) return $this.click() | ||
108 | |||
109 | $items = $('[role=menu] li:not(.divider):visible a', $parent) | ||
110 | |||
111 | if (!$items.length) return | ||
112 | |||
113 | index = $items.index($items.filter(':focus')) | ||
114 | |||
115 | if (e.keyCode == 38 && index > 0) index-- // up | ||
116 | if (e.keyCode == 40 && index < $items.length - 1) index++ // down | ||
117 | if (!~index) index = 0 | ||
118 | |||
119 | $items | ||
120 | .eq(index) | ||
121 | .focus() | ||
122 | } | ||
123 | |||
124 | } | ||
125 | |||
126 | function clearMenus() { | ||
127 | $(toggle).each(function () { | ||
128 | getParent($(this)).removeClass('open') | ||
129 | }) | ||
130 | } | ||
131 | |||
132 | function getParent($this) { | ||
133 | var selector = $this.attr('data-target') | ||
134 | , $parent | ||
135 | |||
136 | if (!selector) { | ||
137 | selector = $this.attr('href') | ||
138 | selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 | ||
139 | } | ||
140 | |||
141 | $parent = $(selector) | ||
142 | $parent.length || ($parent = $this.parent()) | ||
143 | |||
144 | return $parent | ||
145 | } | ||
146 | |||
147 | |||
148 | /* DROPDOWN PLUGIN DEFINITION | ||
149 | * ========================== */ | ||
150 | |||
151 | var old = $.fn.dropdown | ||
152 | |||
153 | $.fn.dropdown = function (option) { | ||
154 | return this.each(function () { | ||
155 | var $this = $(this) | ||
156 | , data = $this.data('dropdown') | ||
157 | if (!data) $this.data('dropdown', (data = new Dropdown(this))) | ||
158 | if (typeof option == 'string') data[option].call($this) | ||
159 | }) | ||
160 | } | ||
161 | |||
162 | $.fn.dropdown.Constructor = Dropdown | ||
163 | |||
164 | |||
165 | /* DROPDOWN NO CONFLICT | ||
166 | * ==================== */ | ||
167 | |||
168 | $.fn.dropdown.noConflict = function () { | ||
169 | $.fn.dropdown = old | ||
170 | return this | ||
171 | } | ||
172 | |||
173 | |||
174 | /* APPLY TO STANDARD DROPDOWN ELEMENTS | ||
175 | * =================================== */ | ||
176 | |||
177 | $(document) | ||
178 | .on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus) | ||
179 | .on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) | ||
180 | .on('touchstart.dropdown.data-api', '.dropdown-menu', function (e) { e.stopPropagation() }) | ||
181 | .on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle) | ||
182 | .on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown) | ||
183 | |||
184 | }(window.jQuery); \ No newline at end of file | ||
diff --git a/frontend/gamma/js/Bootstrap/bootstrap-modal.js b/frontend/gamma/js/Bootstrap/bootstrap-modal.js deleted file mode 100644 index fd7e337..0000000 --- a/frontend/gamma/js/Bootstrap/bootstrap-modal.js +++ b/dev/null | |||
@@ -1,268 +0,0 @@ | |||
1 | /* | ||
2 | |||
3 | Copyright 2008-2013 Clipperz Srl | ||
4 | |||
5 | This file is part of Clipperz, the online password manager. | ||
6 | For further information about its features and functionalities please | ||
7 | refer to http://www.clipperz.com. | ||
8 | |||
9 | * Clipperz is free software: you can redistribute it and/or modify it | ||
10 | under the terms of the GNU Affero General Public License as published | ||
11 | by the Free Software Foundation, either version 3 of the License, or | ||
12 | (at your option) any later version. | ||
13 | |||
14 | * Clipperz is distributed in the hope that it will be useful, but | ||
15 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
17 | See the GNU Affero General Public License for more details. | ||
18 | |||
19 | * You should have received a copy of the GNU Affero General Public | ||
20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. | ||
21 | |||
22 | */ | ||
23 | |||
24 | /* ========================================================= | ||
25 | * bootstrap-modal.js v2.2.2 | ||
26 | * http://twitter.github.com/bootstrap/javascript.html#modals | ||
27 | * ========================================================= | ||
28 | * Copyright 2012 Twitter, Inc. | ||
29 | * | ||
30 | * Licensed under the Apache License, Version 2.0 (the "License"); | ||
31 | * you may not use this file except in compliance with the License. | ||
32 | * You may obtain a copy of the License at | ||
33 | * | ||
34 | * http://www.apache.org/licenses/LICENSE-2.0 | ||
35 | * | ||
36 | * Unless required by applicable law or agreed to in writing, software | ||
37 | * distributed under the License is distributed on an "AS IS" BASIS, | ||
38 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
39 | * See the License for the specific language governing permissions and | ||
40 | * limitations under the License. | ||
41 | * ========================================================= */ | ||
42 | |||
43 | |||
44 | !function ($) { | ||
45 | |||
46 | "use strict"; // jshint ;_; | ||
47 | |||
48 | |||
49 | /* MODAL CLASS DEFINITION | ||
50 | * ====================== */ | ||
51 | |||
52 | var Modal = function (element, options) { | ||
53 | this.options = options | ||
54 | this.$element = $(element) | ||
55 | .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this)) | ||
56 | this.options.remote && this.$element.find('.modal-body').load(this.options.remote) | ||
57 | } | ||
58 | |||
59 | Modal.prototype = { | ||
60 | |||
61 | constructor: Modal | ||
62 | |||
63 | , toggle: function () { | ||
64 | return this[!this.isShown ? 'show' : 'hide']() | ||
65 | } | ||
66 | |||
67 | , show: function () { | ||
68 | var that = this | ||
69 | , e = $.Event('show') | ||
70 | |||
71 | this.$element.trigger(e) | ||
72 | |||
73 | if (this.isShown || e.isDefaultPrevented()) return | ||
74 | |||
75 | this.isShown = true | ||
76 | |||
77 | this.escape() | ||
78 | |||
79 | this.backdrop(function () { | ||
80 | var transition = $.support.transition && that.$element.hasClass('fade') | ||
81 | |||
82 | if (!that.$element.parent().length) { | ||
83 | that.$element.appendTo(document.body) //don't move modals dom position | ||
84 | } | ||
85 | |||
86 | that.$element | ||
87 | .show() | ||
88 | |||
89 | if (transition) { | ||
90 | that.$element[0].offsetWidth // force reflow | ||
91 | } | ||
92 | |||
93 | that.$element | ||
94 | .addClass('in') | ||
95 | .attr('aria-hidden', false) | ||
96 | |||
97 | that.enforceFocus() | ||
98 | |||
99 | transition ? | ||
100 | that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) : | ||
101 | that.$element.focus().trigger('shown') | ||
102 | |||
103 | }) | ||
104 | } | ||
105 | |||
106 | , hide: function (e) { | ||
107 | e && e.preventDefault() | ||
108 | |||
109 | var that = this | ||
110 | |||
111 | e = $.Event('hide') | ||
112 | |||
113 | this.$element.trigger(e) | ||
114 | |||
115 | if (!this.isShown || e.isDefaultPrevented()) return | ||
116 | |||
117 | this.isShown = false | ||
118 | |||
119 | this.escape() | ||
120 | |||
121 | $(document).off('focusin.modal') | ||
122 | |||
123 | this.$element | ||
124 | .removeClass('in') | ||
125 | .attr('aria-hidden', true) | ||
126 | |||
127 | $.support.transition && this.$element.hasClass('fade') ? | ||
128 | this.hideWithTransition() : | ||
129 | this.hideModal() | ||
130 | } | ||
131 | |||
132 | , enforceFocus: function () { | ||
133 | var that = this | ||
134 | $(document).on('focusin.modal', function (e) { | ||
135 | if (that.$element[0] !== e.target && !that.$element.has(e.target).length) { | ||
136 | that.$element.focus() | ||
137 | } | ||
138 | }) | ||
139 | } | ||
140 | |||
141 | , escape: function () { | ||
142 | var that = this | ||
143 | if (this.isShown && this.options.keyboard) { | ||
144 | this.$element.on('keyup.dismiss.modal', function ( e ) { | ||
145 | e.which == 27 && that.hide() | ||
146 | }) | ||
147 | } else if (!this.isShown) { | ||
148 | this.$element.off('keyup.dismiss.modal') | ||
149 | } | ||
150 | } | ||
151 | |||
152 | , hideWithTransition: function () { | ||
153 | var that = this | ||
154 | , timeout = setTimeout(function () { | ||
155 | that.$element.off($.support.transition.end) | ||
156 | that.hideModal() | ||
157 | }, 500) | ||
158 | |||
159 | this.$element.one($.support.transition.end, function () { | ||
160 | clearTimeout(timeout) | ||
161 | that.hideModal() | ||
162 | }) | ||
163 | } | ||
164 | |||
165 | , hideModal: function (that) { | ||
166 | this.$element | ||
167 | .hide() | ||
168 | .trigger('hidden') | ||
169 | |||
170 | this.backdrop() | ||
171 | } | ||
172 | |||
173 | , removeBackdrop: function () { | ||
174 | this.$backdrop.remove() | ||
175 | this.$backdrop = null | ||
176 | } | ||
177 | |||
178 | , backdrop: function (callback) { | ||
179 | var that = this | ||
180 | , animate = this.$element.hasClass('fade') ? 'fade' : '' | ||
181 | |||
182 | if (this.isShown && this.options.backdrop) { | ||
183 | var doAnimate = $.support.transition && animate | ||
184 | |||
185 | this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />') | ||
186 | .appendTo(document.body) | ||
187 | |||
188 | this.$backdrop.click( | ||
189 | this.options.backdrop == 'static' ? | ||
190 | $.proxy(this.$element[0].focus, this.$element[0]) | ||
191 | : $.proxy(this.hide, this) | ||
192 | ) | ||
193 | |||
194 | if (doAnimate) this.$backdrop[0].offsetWidth // force reflow | ||
195 | |||
196 | this.$backdrop.addClass('in') | ||
197 | |||
198 | doAnimate ? | ||
199 | this.$backdrop.one($.support.transition.end, callback) : | ||
200 | callback() | ||
201 | |||
202 | } else if (!this.isShown && this.$backdrop) { | ||
203 | this.$backdrop.removeClass('in') | ||
204 | |||
205 | $.support.transition && this.$element.hasClass('fade')? | ||
206 | this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) : | ||
207 | this.removeBackdrop() | ||
208 | |||
209 | } else if (callback) { | ||
210 | callback() | ||
211 | } | ||
212 | } | ||
213 | } | ||
214 | |||
215 | |||
216 | /* MODAL PLUGIN DEFINITION | ||
217 | * ======================= */ | ||
218 | |||
219 | var old = $.fn.modal | ||
220 | |||
221 | $.fn.modal = function (option) { | ||
222 | return this.each(function () { | ||
223 | var $this = $(this) | ||
224 | , data = $this.data('modal') | ||
225 | , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option) | ||
226 | if (!data) $this.data('modal', (data = new Modal(this, options))) | ||
227 | if (typeof option == 'string') data[option]() | ||
228 | else if (options.show) data.show() | ||
229 | }) | ||
230 | } | ||
231 | |||
232 | $.fn.modal.defaults = { | ||
233 | backdrop: true | ||
234 | , keyboard: true | ||
235 | , show: true | ||
236 | } | ||
237 | |||
238 | $.fn.modal.Constructor = Modal | ||
239 | |||
240 | |||
241 | /* MODAL NO CONFLICT | ||
242 | * ================= */ | ||
243 | |||
244 | $.fn.modal.noConflict = function () { | ||
245 | $.fn.modal = old | ||
246 | return this | ||
247 | } | ||
248 | |||
249 | |||
250 | /* MODAL DATA-API | ||
251 | * ============== */ | ||
252 | |||
253 | $(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) { | ||
254 | var $this = $(this) | ||
255 | , href = $this.attr('href') | ||
256 | , $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7 | ||
257 | , option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data()) | ||
258 | |||
259 | e.preventDefault() | ||
260 | |||
261 | $target | ||
262 | .modal(option) | ||
263 | .one('hide', function () { | ||
264 | $this.focus() | ||
265 | }) | ||
266 | }) | ||
267 | |||
268 | }(window.jQuery); | ||
diff --git a/frontend/gamma/js/Bootstrap/bootstrap-popover.js b/frontend/gamma/js/Bootstrap/bootstrap-popover.js deleted file mode 100644 index 89e1edb..0000000 --- a/frontend/gamma/js/Bootstrap/bootstrap-popover.js +++ b/dev/null | |||
@@ -1,137 +0,0 @@ | |||
1 | /* | ||
2 | |||
3 | Copyright 2008-2013 Clipperz Srl | ||
4 | |||
5 | This file is part of Clipperz, the online password manager. | ||
6 | For further information about its features and functionalities please | ||
7 | refer to http://www.clipperz.com. | ||
8 | |||
9 | * Clipperz is free software: you can redistribute it and/or modify it | ||
10 | under the terms of the GNU Affero General Public License as published | ||
11 | by the Free Software Foundation, either version 3 of the License, or | ||
12 | (at your option) any later version. | ||
13 | |||
14 | * Clipperz is distributed in the hope that it will be useful, but | ||
15 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
17 | See the GNU Affero General Public License for more details. | ||
18 | |||
19 | * You should have received a copy of the GNU Affero General Public | ||
20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. | ||
21 | |||
22 | */ | ||
23 | |||
24 | /* =========================================================== | ||
25 | * bootstrap-popover.js v2.2.2 | ||
26 | * http://twitter.github.com/bootstrap/javascript.html#popovers | ||
27 | * =========================================================== | ||
28 | * Copyright 2012 Twitter, Inc. | ||
29 | * | ||
30 | * Licensed under the Apache License, Version 2.0 (the "License"); | ||
31 | * you may not use this file except in compliance with the License. | ||
32 | * You may obtain a copy of the License at | ||
33 | * | ||
34 | * http://www.apache.org/licenses/LICENSE-2.0 | ||
35 | * | ||
36 | * Unless required by applicable law or agreed to in writing, software | ||
37 | * distributed under the License is distributed on an "AS IS" BASIS, | ||
38 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
39 | * See the License for the specific language governing permissions and | ||
40 | * limitations under the License. | ||
41 | * =========================================================== */ | ||
42 | |||
43 | |||
44 | !function ($) { | ||
45 | |||
46 | "use strict"; // jshint ;_; | ||
47 | |||
48 | |||
49 | /* POPOVER PUBLIC CLASS DEFINITION | ||
50 | * =============================== */ | ||
51 | |||
52 | var Popover = function (element, options) { | ||
53 | this.init('popover', element, options) | ||
54 | } | ||
55 | |||
56 | |||
57 | /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js | ||
58 | ========================================== */ | ||
59 | |||
60 | Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, { | ||
61 | |||
62 | constructor: Popover | ||
63 | |||
64 | , setContent: function () { | ||
65 | var $tip = this.tip() | ||
66 | , title = this.getTitle() | ||
67 | , content = this.getContent() | ||
68 | |||
69 | $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title) | ||
70 | $tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content) | ||
71 | |||
72 | $tip.removeClass('fade top bottom left right in') | ||
73 | } | ||
74 | |||
75 | , hasContent: function () { | ||
76 | return this.getTitle() || this.getContent() | ||
77 | } | ||
78 | |||
79 | , getContent: function () { | ||
80 | var content | ||
81 | , $e = this.$element | ||
82 | , o = this.options | ||
83 | |||
84 | content = $e.attr('data-content') | ||
85 | || (typeof o.content == 'function' ? o.content.call($e[0]) : o.content) | ||
86 | |||
87 | return content | ||
88 | } | ||
89 | |||
90 | , tip: function () { | ||
91 | if (!this.$tip) { | ||
92 | this.$tip = $(this.options.template) | ||
93 | } | ||
94 | return this.$tip | ||
95 | } | ||
96 | |||
97 | , destroy: function () { | ||
98 | this.hide().$element.off('.' + this.type).removeData(this.type) | ||
99 | } | ||
100 | |||
101 | }) | ||
102 | |||
103 | |||
104 | /* POPOVER PLUGIN DEFINITION | ||
105 | * ======================= */ | ||
106 | |||
107 | var old = $.fn.popover | ||
108 | |||
109 | $.fn.popover = function (option) { | ||
110 | return this.each(function () { | ||
111 | var $this = $(this) | ||
112 | , data = $this.data('popover') | ||
113 | , options = typeof option == 'object' && option | ||
114 | if (!data) $this.data('popover', (data = new Popover(this, options))) | ||
115 | if (typeof option == 'string') data[option]() | ||
116 | }) | ||
117 | } | ||
118 | |||
119 | $.fn.popover.Constructor = Popover | ||
120 | |||
121 | $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, { | ||
122 | placement: 'right' | ||
123 | , trigger: 'click' | ||
124 | , content: '' | ||
125 | , template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"></div></div></div>' | ||
126 | }) | ||
127 | |||
128 | |||
129 | /* POPOVER NO CONFLICT | ||
130 | * =================== */ | ||
131 | |||
132 | $.fn.popover.noConflict = function () { | ||
133 | $.fn.popover = old | ||
134 | return this | ||
135 | } | ||
136 | |||
137 | }(window.jQuery); \ No newline at end of file | ||
diff --git a/frontend/gamma/js/Bootstrap/bootstrap-scrollspy.js b/frontend/gamma/js/Bootstrap/bootstrap-scrollspy.js deleted file mode 100644 index 4366f26..0000000 --- a/frontend/gamma/js/Bootstrap/bootstrap-scrollspy.js +++ b/dev/null | |||
@@ -1,185 +0,0 @@ | |||
1 | /* | ||
2 | |||
3 | Copyright 2008-2013 Clipperz Srl | ||
4 | |||
5 | This file is part of Clipperz, the online password manager. | ||
6 | For further information about its features and functionalities please | ||
7 | refer to http://www.clipperz.com. | ||
8 | |||
9 | * Clipperz is free software: you can redistribute it and/or modify it | ||
10 | under the terms of the GNU Affero General Public License as published | ||
11 | by the Free Software Foundation, either version 3 of the License, or | ||
12 | (at your option) any later version. | ||
13 | |||
14 | * Clipperz is distributed in the hope that it will be useful, but | ||
15 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
17 | See the GNU Affero General Public License for more details. | ||
18 | |||
19 | * You should have received a copy of the GNU Affero General Public | ||
20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. | ||
21 | |||
22 | */ | ||
23 | |||
24 | /* ============================================================= | ||
25 | * bootstrap-scrollspy.js v2.2.2 | ||
26 | * http://twitter.github.com/bootstrap/javascript.html#scrollspy | ||
27 | * ============================================================= | ||
28 | * Copyright 2012 Twitter, Inc. | ||
29 | * | ||
30 | * Licensed under the Apache License, Version 2.0 (the "License"); | ||
31 | * you may not use this file except in compliance with the License. | ||
32 | * You may obtain a copy of the License at | ||
33 | * | ||
34 | * http://www.apache.org/licenses/LICENSE-2.0 | ||
35 | * | ||
36 | * Unless required by applicable law or agreed to in writing, software | ||
37 | * distributed under the License is distributed on an "AS IS" BASIS, | ||
38 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
39 | * See the License for the specific language governing permissions and | ||
40 | * limitations under the License. | ||
41 | * ============================================================== */ | ||
42 | |||
43 | |||
44 | !function ($) { | ||
45 | |||
46 | "use strict"; // jshint ;_; | ||
47 | |||
48 | |||
49 | /* SCROLLSPY CLASS DEFINITION | ||
50 | * ========================== */ | ||
51 | |||
52 | function ScrollSpy(element, options) { | ||
53 | var process = $.proxy(this.process, this) | ||
54 | , $element = $(element).is('body') ? $(window) : $(element) | ||
55 | , href | ||
56 | this.options = $.extend({}, $.fn.scrollspy.defaults, options) | ||
57 | this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process) | ||
58 | this.selector = (this.options.target | ||
59 | || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 | ||
60 | || '') + ' .nav li > a' | ||
61 | this.$body = $('body') | ||
62 | this.refresh() | ||
63 | this.process() | ||
64 | } | ||
65 | |||
66 | ScrollSpy.prototype = { | ||
67 | |||
68 | constructor: ScrollSpy | ||
69 | |||
70 | , refresh: function () { | ||
71 | var self = this | ||
72 | , $targets | ||
73 | |||
74 | this.offsets = $([]) | ||
75 | this.targets = $([]) | ||
76 | |||
77 | $targets = this.$body | ||
78 | .find(this.selector) | ||
79 | .map(function () { | ||
80 | var $el = $(this) | ||
81 | , href = $el.data('target') || $el.attr('href') | ||
82 | , $href = /^#\w/.test(href) && $(href) | ||
83 | return ( $href | ||
84 | && $href.length | ||
85 | && [[ $href.position().top + self.$scrollElement.scrollTop(), href ]] ) || null | ||
86 | }) | ||
87 | .sort(function (a, b) { return a[0] - b[0] }) | ||
88 | .each(function () { | ||
89 | self.offsets.push(this[0]) | ||
90 | self.targets.push(this[1]) | ||
91 | }) | ||
92 | } | ||
93 | |||
94 | , process: function () { | ||
95 | var scrollTop = this.$scrollElement.scrollTop() + this.options.offset | ||
96 | , scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight | ||
97 | , maxScroll = scrollHeight - this.$scrollElement.height() | ||
98 | , offsets = this.offsets | ||
99 | , targets = this.targets | ||
100 | , activeTarget = this.activeTarget | ||
101 | , i | ||
102 | |||
103 | if (scrollTop >= maxScroll) { | ||
104 | return activeTarget != (i = targets.last()[0]) | ||
105 | && this.activate ( i ) | ||
106 | } | ||
107 | |||
108 | for (i = offsets.length; i--;) { | ||
109 | activeTarget != targets[i] | ||
110 | && scrollTop >= offsets[i] | ||
111 | && (!offsets[i + 1] || scrollTop <= offsets[i + 1]) | ||
112 | && this.activate( targets[i] ) | ||
113 | } | ||
114 | } | ||
115 | |||
116 | , activate: function (target) { | ||
117 | var active | ||
118 | , selector | ||
119 | |||
120 | this.activeTarget = target | ||
121 | |||
122 | $(this.selector) | ||
123 | .parent('.active') | ||
124 | .removeClass('active') | ||
125 | |||
126 | selector = this.selector | ||
127 | + '[data-target="' + target + '"],' | ||
128 | + this.selector + '[href="' + target + '"]' | ||
129 | |||
130 | active = $(selector) | ||
131 | .parent('li') | ||
132 | .addClass('active') | ||
133 | |||
134 | if (active.parent('.dropdown-menu').length) { | ||
135 | active = active.closest('li.dropdown').addClass('active') | ||
136 | } | ||
137 | |||
138 | active.trigger('activate') | ||
139 | } | ||
140 | |||
141 | } | ||
142 | |||
143 | |||
144 | /* SCROLLSPY PLUGIN DEFINITION | ||
145 | * =========================== */ | ||
146 | |||
147 | var old = $.fn.scrollspy | ||
148 | |||
149 | $.fn.scrollspy = function (option) { | ||
150 | return this.each(function () { | ||
151 | var $this = $(this) | ||
152 | , data = $this.data('scrollspy') | ||
153 | , options = typeof option == 'object' && option | ||
154 | if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options))) | ||
155 | if (typeof option == 'string') data[option]() | ||
156 | }) | ||
157 | } | ||
158 | |||
159 | $.fn.scrollspy.Constructor = ScrollSpy | ||
160 | |||
161 | $.fn.scrollspy.defaults = { | ||
162 | offset: 10 | ||
163 | } | ||
164 | |||
165 | |||
166 | /* SCROLLSPY NO CONFLICT | ||
167 | * ===================== */ | ||
168 | |||
169 | $.fn.scrollspy.noConflict = function () { | ||
170 | $.fn.scrollspy = old | ||
171 | return this | ||
172 | } | ||
173 | |||
174 | |||
175 | /* SCROLLSPY DATA-API | ||
176 | * ================== */ | ||
177 | |||
178 | $(window).on('load', function () { | ||
179 | $('[data-spy="scroll"]').each(function () { | ||
180 | var $spy = $(this) | ||
181 | $spy.scrollspy($spy.data()) | ||
182 | }) | ||
183 | }) | ||
184 | |||
185 | }(window.jQuery); \ No newline at end of file | ||
diff --git a/frontend/gamma/js/Bootstrap/bootstrap-tab.js b/frontend/gamma/js/Bootstrap/bootstrap-tab.js deleted file mode 100644 index d7c7fc7..0000000 --- a/frontend/gamma/js/Bootstrap/bootstrap-tab.js +++ b/dev/null | |||
@@ -1,167 +0,0 @@ | |||
1 | /* | ||
2 | |||
3 | Copyright 2008-2013 Clipperz Srl | ||
4 | |||
5 | This file is part of Clipperz, the online password manager. | ||
6 | For further information about its features and functionalities please | ||
7 | refer to http://www.clipperz.com. | ||
8 | |||
9 | * Clipperz is free software: you can redistribute it and/or modify it | ||
10 | under the terms of the GNU Affero General Public License as published | ||
11 | by the Free Software Foundation, either version 3 of the License, or | ||
12 | (at your option) any later version. | ||
13 | |||
14 | * Clipperz is distributed in the hope that it will be useful, but | ||
15 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
17 | See the GNU Affero General Public License for more details. | ||
18 | |||
19 | * You should have received a copy of the GNU Affero General Public | ||
20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. | ||
21 | |||
22 | */ | ||
23 | |||
24 | /* ======================================================== | ||
25 | * bootstrap-tab.js v2.2.2 | ||
26 | * http://twitter.github.com/bootstrap/javascript.html#tabs | ||
27 | * ======================================================== | ||
28 | * Copyright 2012 Twitter, Inc. | ||
29 | * | ||
30 | * Licensed under the Apache License, Version 2.0 (the "License"); | ||
31 | * you may not use this file except in compliance with the License. | ||
32 | * You may obtain a copy of the License at | ||
33 | * | ||
34 | * http://www.apache.org/licenses/LICENSE-2.0 | ||
35 | * | ||
36 | * Unless required by applicable law or agreed to in writing, software | ||
37 | * distributed under the License is distributed on an "AS IS" BASIS, | ||
38 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
39 | * See the License for the specific language governing permissions and | ||
40 | * limitations under the License. | ||
41 | * ======================================================== */ | ||
42 | |||
43 | |||
44 | !function ($) { | ||
45 | |||
46 | "use strict"; // jshint ;_; | ||
47 | |||
48 | |||
49 | /* TAB CLASS DEFINITION | ||
50 | * ==================== */ | ||
51 | |||
52 | var Tab = function (element) { | ||
53 | this.element = $(element) | ||
54 | } | ||
55 | |||
56 | Tab.prototype = { | ||
57 | |||
58 | constructor: Tab | ||
59 | |||
60 | , show: function () { | ||
61 | var $this = this.element | ||
62 | , $ul = $this.closest('ul:not(.dropdown-menu)') | ||
63 | , selector = $this.attr('data-target') | ||
64 | , previous | ||
65 | , $target | ||
66 | , e | ||
67 | |||
68 | if (!selector) { | ||
69 | selector = $this.attr('href') | ||
70 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 | ||
71 | } | ||
72 | |||
73 | if ( $this.parent('li').hasClass('active') ) return | ||
74 | |||
75 | previous = $ul.find('.active:last a')[0] | ||
76 | |||
77 | e = $.Event('show', { | ||
78 | relatedTarget: previous | ||
79 | }) | ||
80 | |||
81 | $this.trigger(e) | ||
82 | |||
83 | if (e.isDefaultPrevented()) return | ||
84 | |||
85 | $target = $(selector) | ||
86 | |||
87 | this.activate($this.parent('li'), $ul) | ||
88 | this.activate($target, $target.parent(), function () { | ||
89 | $this.trigger({ | ||
90 | type: 'shown' | ||
91 | , relatedTarget: previous | ||
92 | }) | ||
93 | }) | ||
94 | } | ||
95 | |||
96 | , activate: function ( element, container, callback) { | ||
97 | var $active = container.find('> .active') | ||
98 | , transition = callback | ||
99 | && $.support.transition | ||
100 | && $active.hasClass('fade') | ||
101 | |||
102 | function next() { | ||
103 | $active | ||
104 | .removeClass('active') | ||
105 | .find('> .dropdown-menu > .active') | ||
106 | .removeClass('active') | ||
107 | |||
108 | element.addClass('active') | ||
109 | |||
110 | if (transition) { | ||
111 | element[0].offsetWidth // reflow for transition | ||
112 | element.addClass('in') | ||
113 | } else { | ||
114 | element.removeClass('fade') | ||
115 | } | ||
116 | |||
117 | if ( element.parent('.dropdown-menu') ) { | ||
118 | element.closest('li.dropdown').addClass('active') | ||
119 | } | ||
120 | |||
121 | callback && callback() | ||
122 | } | ||
123 | |||
124 | transition ? | ||
125 | $active.one($.support.transition.end, next) : | ||
126 | next() | ||
127 | |||
128 | $active.removeClass('in') | ||
129 | } | ||
130 | } | ||
131 | |||
132 | |||
133 | /* TAB PLUGIN DEFINITION | ||
134 | * ===================== */ | ||
135 | |||
136 | var old = $.fn.tab | ||
137 | |||
138 | $.fn.tab = function ( option ) { | ||
139 | return this.each(function () { | ||
140 | var $this = $(this) | ||
141 | , data = $this.data('tab') | ||
142 | if (!data) $this.data('tab', (data = new Tab(this))) | ||
143 | if (typeof option == 'string') data[option]() | ||
144 | }) | ||
145 | } | ||
146 | |||
147 | $.fn.tab.Constructor = Tab | ||
148 | |||
149 | |||
150 | /* TAB NO CONFLICT | ||
151 | * =============== */ | ||
152 | |||
153 | $.fn.tab.noConflict = function () { | ||
154 | $.fn.tab = old | ||
155 | return this | ||
156 | } | ||
157 | |||
158 | |||
159 | /* TAB DATA-API | ||
160 | * ============ */ | ||
161 | |||
162 | $(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) { | ||
163 | e.preventDefault() | ||
164 | $(this).tab('show') | ||
165 | }) | ||
166 | |||
167 | }(window.jQuery); \ No newline at end of file | ||
diff --git a/frontend/gamma/js/Bootstrap/bootstrap-tooltip.js b/frontend/gamma/js/Bootstrap/bootstrap-tooltip.js deleted file mode 100644 index bdcff7d..0000000 --- a/frontend/gamma/js/Bootstrap/bootstrap-tooltip.js +++ b/dev/null | |||
@@ -1,310 +0,0 @@ | |||
1 | /* | ||
2 | |||
3 | Copyright 2008-2013 Clipperz Srl | ||
4 | |||
5 | This file is part of Clipperz, the online password manager. | ||
6 | For further information about its features and functionalities please | ||
7 | refer to http://www.clipperz.com. | ||
8 | |||
9 | * Clipperz is free software: you can redistribute it and/or modify it | ||
10 | under the terms of the GNU Affero General Public License as published | ||
11 | by the Free Software Foundation, either version 3 of the License, or | ||
12 | (at your option) any later version. | ||
13 | |||
14 | * Clipperz is distributed in the hope that it will be useful, but | ||
15 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
17 | See the GNU Affero General Public License for more details. | ||
18 | |||
19 | * You should have received a copy of the GNU Affero General Public | ||
20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. | ||
21 | |||
22 | */ | ||
23 | |||
24 | /* =========================================================== | ||
25 | * bootstrap-tooltip.js v2.2.2 | ||
26 | * http://twitter.github.com/bootstrap/javascript.html#tooltips | ||
27 | * Inspired by the original jQuery.tipsy by Jason Frame | ||
28 | * =========================================================== | ||
29 | * Copyright 2012 Twitter, Inc. | ||
30 | * | ||
31 | * Licensed under the Apache License, Version 2.0 (the "License"); | ||
32 | * you may not use this file except in compliance with the License. | ||
33 | * You may obtain a copy of the License at | ||
34 | * | ||
35 | * http://www.apache.org/licenses/LICENSE-2.0 | ||
36 | * | ||
37 | * Unless required by applicable law or agreed to in writing, software | ||
38 | * distributed under the License is distributed on an "AS IS" BASIS, | ||
39 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
40 | * See the License for the specific language governing permissions and | ||
41 | * limitations under the License. | ||
42 | * ========================================================== */ | ||
43 | |||
44 | |||
45 | !function ($) { | ||
46 | |||
47 | "use strict"; // jshint ;_; | ||
48 | |||
49 | |||
50 | /* TOOLTIP PUBLIC CLASS DEFINITION | ||
51 | * =============================== */ | ||
52 | |||
53 | var Tooltip = function (element, options) { | ||
54 | this.init('tooltip', element, options) | ||
55 | } | ||
56 | |||
57 | Tooltip.prototype = { | ||
58 | |||
59 | constructor: Tooltip | ||
60 | |||
61 | , init: function (type, element, options) { | ||
62 | var eventIn | ||
63 | , eventOut | ||
64 | |||
65 | this.type = type | ||
66 | this.$element = $(element) | ||
67 | this.options = this.getOptions(options) | ||
68 | this.enabled = true | ||
69 | |||
70 | if (this.options.trigger == 'click') { | ||
71 | this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) | ||
72 | } else if (this.options.trigger != 'manual') { | ||
73 | eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus' | ||
74 | eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur' | ||
75 | this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) | ||
76 | this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) | ||
77 | } | ||
78 | |||
79 | this.options.selector ? | ||
80 | (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : | ||
81 | this.fixTitle() | ||
82 | } | ||
83 | |||
84 | , getOptions: function (options) { | ||
85 | options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data()) | ||
86 | |||
87 | if (options.delay && typeof options.delay == 'number') { | ||
88 | options.delay = { | ||
89 | show: options.delay | ||
90 | , hide: options.delay | ||
91 | } | ||
92 | } | ||
93 | |||
94 | return options | ||
95 | } | ||
96 | |||
97 | , enter: function (e) { | ||
98 | var self = $(e.currentTarget)[this.type](this._options).data(this.type) | ||
99 | |||
100 | if (!self.options.delay || !self.options.delay.show) return self.show() | ||
101 | |||
102 | clearTimeout(this.timeout) | ||
103 | self.hoverState = 'in' | ||
104 | this.timeout = setTimeout(function() { | ||
105 | if (self.hoverState == 'in') self.show() | ||
106 | }, self.options.delay.show) | ||
107 | } | ||
108 | |||
109 | , leave: function (e) { | ||
110 | var self = $(e.currentTarget)[this.type](this._options).data(this.type) | ||
111 | |||
112 | if (this.timeout) clearTimeout(this.timeout) | ||
113 | if (!self.options.delay || !self.options.delay.hide) return self.hide() | ||
114 | |||
115 | self.hoverState = 'out' | ||
116 | this.timeout = setTimeout(function() { | ||
117 | if (self.hoverState == 'out') self.hide() | ||
118 | }, self.options.delay.hide) | ||
119 | } | ||
120 | |||
121 | , show: function () { | ||
122 | var $tip | ||
123 | , inside | ||
124 | , pos | ||
125 | , actualWidth | ||
126 | , actualHeight | ||
127 | , placement | ||
128 | , tp | ||
129 | |||
130 | if (this.hasContent() && this.enabled) { | ||
131 | $tip = this.tip() | ||
132 | this.setContent() | ||
133 | |||
134 | if (this.options.animation) { | ||
135 | $tip.addClass('fade') | ||
136 | } | ||
137 | |||
138 | placement = typeof this.options.placement == 'function' ? | ||
139 | this.options.placement.call(this, $tip[0], this.$element[0]) : | ||
140 | this.options.placement | ||
141 | |||
142 | inside = /in/.test(placement) | ||
143 | |||
144 | $tip | ||
145 | .detach() | ||
146 | .css({ top: 0, left: 0, display: 'block' }) | ||
147 | .insertAfter(this.$element) | ||
148 | |||
149 | pos = this.getPosition(inside) | ||
150 | |||
151 | actualWidth = $tip[0].offsetWidth | ||
152 | actualHeight = $tip[0].offsetHeight | ||
153 | |||
154 | switch (inside ? placement.split(' ')[1] : placement) { | ||
155 | case 'bottom': | ||
156 | tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2} | ||
157 | break | ||
158 | case 'top': | ||
159 | tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2} | ||
160 | break | ||
161 | case 'left': | ||
162 | tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth} | ||
163 | break | ||
164 | case 'right': | ||
165 | tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width} | ||
166 | break | ||
167 | } | ||
168 | |||
169 | $tip | ||
170 | .offset(tp) | ||
171 | .addClass(placement) | ||
172 | .addClass('in') | ||
173 | } | ||
174 | } | ||
175 | |||
176 | , setContent: function () { | ||
177 | var $tip = this.tip() | ||
178 | , title = this.getTitle() | ||
179 | |||
180 | $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) | ||
181 | $tip.removeClass('fade in top bottom left right') | ||
182 | } | ||
183 | |||
184 | , hide: function () { | ||
185 | var that = this | ||
186 | , $tip = this.tip() | ||
187 | |||
188 | $tip.removeClass('in') | ||
189 | |||
190 | function removeWithAnimation() { | ||
191 | var timeout = setTimeout(function () { | ||
192 | $tip.off($.support.transition.end).detach() | ||
193 | }, 500) | ||
194 | |||
195 | $tip.one($.support.transition.end, function () { | ||
196 | clearTimeout(timeout) | ||
197 | $tip.detach() | ||
198 | }) | ||
199 | } | ||
200 | |||
201 | $.support.transition && this.$tip.hasClass('fade') ? | ||
202 | removeWithAnimation() : | ||
203 | $tip.detach() | ||
204 | |||
205 | return this | ||
206 | } | ||
207 | |||
208 | , fixTitle: function () { | ||
209 | var $e = this.$element | ||
210 | if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') { | ||
211 | $e.attr('data-original-title', $e.attr('title') || '').removeAttr('title') | ||
212 | } | ||
213 | } | ||
214 | |||
215 | , hasContent: function () { | ||
216 | return this.getTitle() | ||
217 | } | ||
218 | |||
219 | , getPosition: function (inside) { | ||
220 | return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), { | ||
221 | width: this.$element[0].offsetWidth | ||
222 | , height: this.$element[0].offsetHeight | ||
223 | }) | ||
224 | } | ||
225 | |||
226 | , getTitle: function () { | ||
227 | var title | ||
228 | , $e = this.$element | ||
229 | , o = this.options | ||
230 | |||
231 | title = $e.attr('data-original-title') | ||
232 | || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) | ||
233 | |||
234 | return title | ||
235 | } | ||
236 | |||
237 | , tip: function () { | ||
238 | return this.$tip = this.$tip || $(this.options.template) | ||
239 | } | ||
240 | |||
241 | , validate: function () { | ||
242 | if (!this.$element[0].parentNode) { | ||
243 | this.hide() | ||
244 | this.$element = null | ||
245 | this.options = null | ||
246 | } | ||
247 | } | ||
248 | |||
249 | , enable: function () { | ||
250 | this.enabled = true | ||
251 | } | ||
252 | |||
253 | , disable: function () { | ||
254 | this.enabled = false | ||
255 | } | ||
256 | |||
257 | , toggleEnabled: function () { | ||
258 | this.enabled = !this.enabled | ||
259 | } | ||
260 | |||
261 | , toggle: function (e) { | ||
262 | var self = $(e.currentTarget)[this.type](this._options).data(this.type) | ||
263 | self[self.tip().hasClass('in') ? 'hide' : 'show']() | ||
264 | } | ||
265 | |||
266 | , destroy: function () { | ||
267 | this.hide().$element.off('.' + this.type).removeData(this.type) | ||
268 | } | ||
269 | |||
270 | } | ||
271 | |||
272 | |||
273 | /* TOOLTIP PLUGIN DEFINITION | ||
274 | * ========================= */ | ||
275 | |||
276 | var old = $.fn.tooltip | ||
277 | |||
278 | $.fn.tooltip = function ( option ) { | ||
279 | return this.each(function () { | ||
280 | var $this = $(this) | ||
281 | , data = $this.data('tooltip') | ||
282 | , options = typeof option == 'object' && option | ||
283 | if (!data) $this.data('tooltip', (data = new Tooltip(this, options))) | ||
284 | if (typeof option == 'string') data[option]() | ||
285 | }) | ||
286 | } | ||
287 | |||
288 | $.fn.tooltip.Constructor = Tooltip | ||
289 | |||
290 | $.fn.tooltip.defaults = { | ||
291 | animation: true | ||
292 | , placement: 'top' | ||
293 | , selector: false | ||
294 | , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>' | ||
295 | , trigger: 'hover' | ||
296 | , title: '' | ||
297 | , delay: 0 | ||
298 | , html: false | ||
299 | } | ||
300 | |||
301 | |||
302 | /* TOOLTIP NO CONFLICT | ||
303 | * =================== */ | ||
304 | |||
305 | $.fn.tooltip.noConflict = function () { | ||
306 | $.fn.tooltip = old | ||
307 | return this | ||
308 | } | ||
309 | |||
310 | }(window.jQuery); \ No newline at end of file | ||
diff --git a/frontend/gamma/js/Bootstrap/bootstrap-transition.js b/frontend/gamma/js/Bootstrap/bootstrap-transition.js deleted file mode 100644 index 820d232..0000000 --- a/frontend/gamma/js/Bootstrap/bootstrap-transition.js +++ b/dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | /* | ||
2 | |||
3 | Copyright 2008-2013 Clipperz Srl | ||
4 | |||
5 | This file is part of Clipperz, the online password manager. | ||
6 | For further information about its features and functionalities please | ||
7 | refer to http://www.clipperz.com. | ||
8 | |||
9 | * Clipperz is free software: you can redistribute it and/or modify it | ||
10 | under the terms of the GNU Affero General Public License as published | ||
11 | by the Free Software Foundation, either version 3 of the License, or | ||
12 | (at your option) any later version. | ||
13 | |||
14 | * Clipperz is distributed in the hope that it will be useful, but | ||
15 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
17 | See the GNU Affero General Public License for more details. | ||
18 | |||
19 | * You should have received a copy of the GNU Affero General Public | ||
20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. | ||
21 | |||
22 | */ | ||
23 | |||
24 | /* =================================================== | ||
25 | * bootstrap-transition.js v2.2.2 | ||
26 | * http://twitter.github.com/bootstrap/javascript.html#transitions | ||
27 | * =================================================== | ||
28 | * Copyright 2012 Twitter, Inc. | ||
29 | * | ||
30 | * Licensed under the Apache License, Version 2.0 (the "License"); | ||
31 | * you may not use this file except in compliance with the License. | ||
32 | * You may obtain a copy of the License at | ||
33 | * | ||
34 | * http://www.apache.org/licenses/LICENSE-2.0 | ||
35 | * | ||
36 | * Unless required by applicable law or agreed to in writing, software | ||
37 | * distributed under the License is distributed on an "AS IS" BASIS, | ||
38 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
39 | * See the License for the specific language governing permissions and | ||
40 | * limitations under the License. | ||
41 | * ========================================================== */ | ||
42 | |||
43 | |||
44 | !function ($) { | ||
45 | |||
46 | "use strict"; // jshint ;_; | ||
47 | |||
48 | |||
49 | /* CSS TRANSITION SUPPORT (http://www.modernizr.com/) | ||
50 | * ======================================================= */ | ||
51 | |||
52 | $(function () { | ||
53 | |||
54 | $.support.transition = (function () { | ||
55 | |||
56 | var transitionEnd = (function () { | ||
57 | |||
58 | var el = document.createElement('bootstrap') | ||
59 | , transEndEventNames = { | ||
60 | 'WebkitTransition' : 'webkitTransitionEnd' | ||
61 | , 'MozTransition' : 'transitionend' | ||
62 | , 'OTransition' : 'oTransitionEnd otransitionend' | ||
63 | , 'transition' : 'transitionend' | ||
64 | } | ||
65 | , name | ||
66 | |||
67 | for (name in transEndEventNames){ | ||
68 | if (el.style[name] !== undefined) { | ||
69 | return transEndEventNames[name] | ||
70 | } | ||
71 | } | ||
72 | |||
73 | }()) | ||
74 | |||
75 | return transitionEnd && { | ||
76 | end: transitionEnd | ||
77 | } | ||
78 | |||
79 | })() | ||
80 | |||
81 | }) | ||
82 | |||
83 | }(window.jQuery); \ No newline at end of file | ||
diff --git a/frontend/gamma/js/Bootstrap/bootstrap-typeahead.js b/frontend/gamma/js/Bootstrap/bootstrap-typeahead.js deleted file mode 100644 index d3d8d32..0000000 --- a/frontend/gamma/js/Bootstrap/bootstrap-typeahead.js +++ b/dev/null | |||
@@ -1,346 +0,0 @@ | |||
1 | /* | ||
2 | |||
3 | Copyright 2008-2013 Clipperz Srl | ||
4 | |||
5 | This file is part of Clipperz, the online password manager. | ||
6 | For further information about its features and functionalities please | ||
7 | refer to http://www.clipperz.com. | ||
8 | |||
9 | * Clipperz is free software: you can redistribute it and/or modify it | ||
10 | under the terms of the GNU Affero General Public License as published | ||
11 | by the Free Software Foundation, either version 3 of the License, or | ||
12 | (at your option) any later version. | ||
13 | |||
14 | * Clipperz is distributed in the hope that it will be useful, but | ||
15 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
17 | See the GNU Affero General Public License for more details. | ||
18 | |||
19 | * You should have received a copy of the GNU Affero General Public | ||
20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. | ||
21 | |||
22 | */ | ||
23 | |||
24 | /* ============================================================= | ||
25 | * bootstrap-typeahead.js v2.2.2 | ||
26 | * http://twitter.github.com/bootstrap/javascript.html#typeahead | ||
27 | * ============================================================= | ||
28 | * Copyright 2012 Twitter, Inc. | ||
29 | * | ||
30 | * Licensed under the Apache License, Version 2.0 (the "License"); | ||
31 | * you may not use this file except in compliance with the License. | ||
32 | * You may obtain a copy of the License at | ||
33 | * | ||
34 | * http://www.apache.org/licenses/LICENSE-2.0 | ||
35 | * | ||
36 | * Unless required by applicable law or agreed to in writing, software | ||
37 | * distributed under the License is distributed on an "AS IS" BASIS, | ||
38 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
39 | * See the License for the specific language governing permissions and | ||
40 | * limitations under the License. | ||
41 | * ============================================================ */ | ||
42 | |||
43 | |||
44 | !function($){ | ||
45 | |||
46 | "use strict"; // jshint ;_; | ||
47 | |||
48 | |||
49 | /* TYPEAHEAD PUBLIC CLASS DEFINITION | ||
50 | * ================================= */ | ||
51 | |||
52 | var Typeahead = function (element, options) { | ||
53 | this.$element = $(element) | ||
54 | this.options = $.extend({}, $.fn.typeahead.defaults, options) | ||
55 | this.matcher = this.options.matcher || this.matcher | ||
56 | this.sorter = this.options.sorter || this.sorter | ||
57 | this.highlighter = this.options.highlighter || this.highlighter | ||
58 | this.updater = this.options.updater || this.updater | ||
59 | this.source = this.options.source | ||
60 | this.$menu = $(this.options.menu) | ||
61 | this.shown = false | ||
62 | this.listen() | ||
63 | } | ||
64 | |||
65 | Typeahead.prototype = { | ||
66 | |||
67 | constructor: Typeahead | ||
68 | |||
69 | , select: function () { | ||
70 | var val = this.$menu.find('.active').attr('data-value') | ||
71 | this.$element | ||
72 | .val(this.updater(val)) | ||
73 | .change() | ||
74 | return this.hide() | ||
75 | } | ||
76 | |||
77 | , updater: function (item) { | ||
78 | return item | ||
79 | } | ||
80 | |||
81 | , show: function () { | ||
82 | var pos = $.extend({}, this.$element.position(), { | ||
83 | height: this.$element[0].offsetHeight | ||
84 | }) | ||
85 | |||
86 | this.$menu | ||
87 | .insertAfter(this.$element) | ||
88 | .css({ | ||
89 | top: pos.top + pos.height | ||
90 | , left: pos.left | ||
91 | }) | ||
92 | .show() | ||
93 | |||
94 | this.shown = true | ||
95 | return this | ||
96 | } | ||
97 | |||
98 | , hide: function () { | ||
99 | this.$menu.hide() | ||
100 | this.shown = false | ||
101 | return this | ||
102 | } | ||
103 | |||
104 | , lookup: function (event) { | ||
105 | var items | ||
106 | |||
107 | this.query = this.$element.val() | ||
108 | |||
109 | if (!this.query || this.query.length < this.options.minLength) { | ||
110 | return this.shown ? this.hide() : this | ||
111 | } | ||
112 | |||
113 | items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source | ||
114 | |||
115 | return items ? this.process(items) : this | ||
116 | } | ||
117 | |||
118 | , process: function (items) { | ||
119 | var that = this | ||
120 | |||
121 | items = $.grep(items, function (item) { | ||
122 | return that.matcher(item) | ||
123 | }) | ||
124 | |||
125 | items = this.sorter(items) | ||
126 | |||
127 | if (!items.length) { | ||
128 | return this.shown ? this.hide() : this | ||
129 | } | ||
130 | |||
131 | return this.render(items.slice(0, this.options.items)).show() | ||
132 | } | ||
133 | |||
134 | , matcher: function (item) { | ||
135 | return ~item.toLowerCase().indexOf(this.query.toLowerCase()) | ||
136 | } | ||
137 | |||
138 | , sorter: function (items) { | ||
139 | var beginswith = [] | ||
140 | , caseSensitive = [] | ||
141 | , caseInsensitive = [] | ||
142 | , item | ||
143 | |||
144 | while (item = items.shift()) { | ||
145 | if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item) | ||
146 | else if (~item.indexOf(this.query)) caseSensitive.push(item) | ||
147 | else caseInsensitive.push(item) | ||
148 | } | ||
149 | |||
150 | return beginswith.concat(caseSensitive, caseInsensitive) | ||
151 | } | ||
152 | |||
153 | , highlighter: function (item) { | ||
154 | var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&') | ||
155 | return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) { | ||
156 | return '<strong>' + match + '</strong>' | ||
157 | }) | ||
158 | } | ||
159 | |||
160 | , render: function (items) { | ||
161 | var that = this | ||
162 | |||
163 | items = $(items).map(function (i, item) { | ||
164 | i = $(that.options.item).attr('data-value', item) | ||
165 | i.find('a').html(that.highlighter(item)) | ||
166 | return i[0] | ||
167 | }) | ||
168 | |||
169 | items.first().addClass('active') | ||
170 | this.$menu.html(items) | ||
171 | return this | ||
172 | } | ||
173 | |||
174 | , next: function (event) { | ||
175 | var active = this.$menu.find('.active').removeClass('active') | ||
176 | , next = active.next() | ||
177 | |||
178 | if (!next.length) { | ||
179 | next = $(this.$menu.find('li')[0]) | ||
180 | } | ||
181 | |||
182 | next.addClass('active') | ||
183 | } | ||
184 | |||
185 | , prev: function (event) { | ||
186 | var active = this.$menu.find('.active').removeClass('active') | ||
187 | , prev = active.prev() | ||
188 | |||
189 | if (!prev.length) { | ||
190 | prev = this.$menu.find('li').last() | ||
191 | } | ||
192 | |||
193 | prev.addClass('active') | ||
194 | } | ||
195 | |||
196 | , listen: function () { | ||
197 | this.$element | ||
198 | .on('blur', $.proxy(this.blur, this)) | ||
199 | .on('keypress', $.proxy(this.keypress, this)) | ||
200 | .on('keyup', $.proxy(this.keyup, this)) | ||
201 | |||
202 | if (this.eventSupported('keydown')) { | ||
203 | this.$element.on('keydown', $.proxy(this.keydown, this)) | ||
204 | } | ||
205 | |||
206 | this.$menu | ||
207 | .on('click', $.proxy(this.click, this)) | ||
208 | .on('mouseenter', 'li', $.proxy(this.mouseenter, this)) | ||
209 | } | ||
210 | |||
211 | , eventSupported: function(eventName) { | ||
212 | var isSupported = eventName in this.$element | ||
213 | if (!isSupported) { | ||
214 | this.$element.setAttribute(eventName, 'return;') | ||
215 | isSupported = typeof this.$element[eventName] === 'function' | ||
216 | } | ||
217 | return isSupported | ||
218 | } | ||
219 | |||
220 | , move: function (e) { | ||
221 | if (!this.shown) return | ||
222 | |||
223 | switch(e.keyCode) { | ||
224 | case 9: // tab | ||
225 | case 13: // enter | ||
226 | case 27: // escape | ||
227 | e.preventDefault() | ||
228 | break | ||
229 | |||
230 | case 38: // up arrow | ||
231 | e.preventDefault() | ||
232 | this.prev() | ||
233 | break | ||
234 | |||
235 | case 40: // down arrow | ||
236 | e.preventDefault() | ||
237 | this.next() | ||
238 | break | ||
239 | } | ||
240 | |||
241 | e.stopPropagation() | ||
242 | } | ||
243 | |||
244 | , keydown: function (e) { | ||
245 | this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27]) | ||
246 | this.move(e) | ||
247 | } | ||
248 | |||
249 | , keypress: function (e) { | ||
250 | if (this.suppressKeyPressRepeat) return | ||
251 | this.move(e) | ||
252 | } | ||
253 | |||
254 | , keyup: function (e) { | ||
255 | switch(e.keyCode) { | ||
256 | case 40: // down arrow | ||
257 | case 38: // up arrow | ||
258 | case 16: // shift | ||
259 | case 17: // ctrl | ||
260 | case 18: // alt | ||
261 | break | ||
262 | |||
263 | case 9: // tab | ||
264 | case 13: // enter | ||
265 | if (!this.shown) return | ||
266 | this.select() | ||
267 | break | ||
268 | |||
269 | case 27: // escape | ||
270 | if (!this.shown) return | ||
271 | this.hide() | ||
272 | break | ||
273 | |||
274 | default: | ||
275 | this.lookup() | ||
276 | } | ||
277 | |||
278 | e.stopPropagation() | ||
279 | e.preventDefault() | ||
280 | } | ||
281 | |||
282 | , blur: function (e) { | ||
283 | var that = this | ||
284 | setTimeout(function () { that.hide() }, 150) | ||
285 | } | ||
286 | |||
287 | , click: function (e) { | ||
288 | e.stopPropagation() | ||
289 | e.preventDefault() | ||
290 | this.select() | ||
291 | } | ||
292 | |||
293 | , mouseenter: function (e) { | ||
294 | this.$menu.find('.active').removeClass('active') | ||
295 | $(e.currentTarget).addClass('active') | ||
296 | } | ||
297 | |||
298 | } | ||
299 | |||
300 | |||
301 | /* TYPEAHEAD PLUGIN DEFINITION | ||
302 | * =========================== */ | ||
303 | |||
304 | var old = $.fn.typeahead | ||
305 | |||
306 | $.fn.typeahead = function (option) { | ||
307 | return this.each(function () { | ||
308 | var $this = $(this) | ||
309 | , data = $this.data('typeahead') | ||
310 | , options = typeof option == 'object' && option | ||
311 | if (!data) $this.data('typeahead', (data = new Typeahead(this, options))) | ||
312 | if (typeof option == 'string') data[option]() | ||
313 | }) | ||
314 | } | ||
315 | |||
316 | $.fn.typeahead.defaults = { | ||
317 | source: [] | ||
318 | , items: 8 | ||
319 | , menu: '<ul class="typeahead dropdown-menu"></ul>' | ||
320 | , item: '<li><a href="#"></a></li>' | ||
321 | , minLength: 1 | ||
322 | } | ||
323 | |||
324 | $.fn.typeahead.Constructor = Typeahead | ||
325 | |||
326 | |||
327 | /* TYPEAHEAD NO CONFLICT | ||
328 | * =================== */ | ||
329 | |||
330 | $.fn.typeahead.noConflict = function () { | ||
331 | $.fn.typeahead = old | ||
332 | return this | ||
333 | } | ||
334 | |||
335 | |||
336 | /* TYPEAHEAD DATA-API | ||
337 | * ================== */ | ||
338 | |||
339 | $(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) { | ||
340 | var $this = $(this) | ||
341 | if ($this.data('typeahead')) return | ||
342 | e.preventDefault() | ||
343 | $this.typeahead($this.data()) | ||
344 | }) | ||
345 | |||
346 | }(window.jQuery); | ||