blob: 1c6c5971bdecfed1492cae6ee7fa5796bee2f3ff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
/*!
* Piwik - Web Analytics
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
$(document).ready(function () {
//period widget handler
var periodWidget = {
show: function () {
this.isOpen = 1;
$("#periodMore").show();
},
hide: function () {
this.isOpen = 0;
$("#periodMore").hide();
},
toggle: function (e) {
if (!this.isOpen) this.show();
else this.hide();
}
};
$("#periodString #date")
.hover(function () {
$(this).css({ cursor: "pointer"});
}, function () {
})
.click(function () {
periodWidget.toggle();
if ($("#periodMore").is(":visible")) {
$("#periodMore .ui-state-highlight").removeClass('ui-state-highlight');
}
});
//close periodString onClickOutside
$('body').on('mouseup', function (e) {
if (!$(e.target).parents('#periodString').length && !$(e.target).is('#periodString') && !$(e.target).is('option') && periodWidget.isOpen) {
periodWidget.hide();
}
});
});
|