/
part-calendar.php
51 lines (41 loc) · 1.63 KB
/
part-calendar.php
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
47
48
49
50
51
<script type="text/javascript">
if(window.jQuery) {
jQuery( document ).ready(function() {
jQuery("ul.calendar li.day").find('.day-caption').mouseenter(function(){
//jQuery(this).find('.author-ranking').show();
//if(jQuery(this).find('.author-ranking').css('display') == 'none') {
jQuery(this).parent().find('.author-ranking').css('display', "block");
//}
//console.log("mouseenter day caption");
})
jQuery("ul.calendar li.day").find('.author-ranking').mouseleave(function(){
//jQuery(this).hide();
jQuery(this).css('display', "none");
//console.log("saiu author ranking");
})
jQuery("ul.calendar li.day").mouseleave(function(){
//jQuery(this).find('.author-ranking').show();
jQuery(this).find('.author-ranking').css('display', "none");
})
jQuery(".author-ranking").each(function(i) {
if(jQuery(this).find("ul").length) {
//Gold
jQuery(this).find("li:nth-child(1)").find(".aut_barra div").css('background-color', "#FFD700");
//Silver
jQuery(this).find("li:nth-child(2)").find(".aut_barra div").css('background-color', "#A8A8A8");
//Bronze
jQuery(this).find("li:nth-child(3)").find(".aut_barra div").css('background-color', "#965A38");
}
//jQuery.each(".aut_barra").css('background-color', "#964");
});
});
}//if window.jQuery
</script>
<div class="content_nosidebar">
<!--todo: chanve view to MENSAL and YEAR
todo:put button show only my records
todo:put on configuration optionS above
h2>Calenario mensal</h2>
<p>Visualizar <a>calendario anual</a></p-->
<?php echo do_shortcode("[ranking-calendar]"); ?>
</div><!-- #content -->