forked from hestiacp/hestiacp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfooter.html
More file actions
109 lines (85 loc) · 4.07 KB
/
Copy pathfooter.html
File metadata and controls
109 lines (85 loc) · 4.07 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
</div>
<script src="/js/jquery.finder.js"></script>
<script type="text/javascript">
lastScrollTop = 0;
$(document).ready(function() {
hover_menu();
$(window).scroll(function(){hover_menu()});
$('.l-sort-toolbar .sort-by').click(function(){
$('.context-menu.sort-order').toggle().css({left: $(this).position().left - 10});
});
// SORTING
V = {
sort_par: 'sort-name',
sort_direction: -1,
sort_as_int: 0
};
$('.sort-order span').click(function(){
$('.context-menu.sort-order').toggle();
if($(this).hasClass('active'))
return;
$('.sort-order span').removeClass('active');
$(this).addClass('active');
V.sort_par = $(this).parent('li').attr('entity');
V.sort_as_int = $(this).parent('li').attr('sort_as_int');
V.sort_direction = $(this).hasClass('up')*1 || -1;
$('.l-sort .sort-by span b').html($(this).parent('li').find('.name').html());
$('.l-sort .sort-by i').removeClass('l-icon-up-arrow l-icon-down-arrow');
$(this).hasClass('up') ? $('.l-sort .sort-by i').addClass('l-icon-up-arrow') : $('.l-sort .sort-by i').addClass('l-icon-down-arrow');
$('.l-unit').sort(function (a, b) {
if(V.sort_as_int)
return parseInt($(a).attr(V.sort_par)) >= parseInt($(b).attr(V.sort_par)) ? V.sort_direction : V.sort_direction * -1;
else
return $(a).attr(V.sort_par) <= $(b).attr(V.sort_par) ? V.sort_direction : V.sort_direction * -1;
}).appendTo(".l-center.units");
});
// STARS
$('.l-unit .l-icon-star').click(function(){
var l_unit = $(this).parents('.l-unit');
if(l_unit.hasClass('l-unit--starred')){
// removing star
$.removeCookie(l_unit.attr('uniq-id'));
l_unit.removeClass('l-unit--starred');
}
else{
$.cookie(l_unit.attr('uniq-id'), 1, {expires: 3650});
l_unit.addClass('l-unit--starred');
}
});
/*jQuery('.ch-toggle').bind('change', function(evt) {
evt.stopImmediatePropagation();
console.log(123);
});*/
VE.core.register();
if (location.href.search(/list/) != -1) {
var shift_select_ref = $('body').finderSelect({children: '.l-unit',
'onFinish': function(evt) {
/*var ref = $(evt.target);
$('.l-content').find('.l-unit .ch-toggle').attr('checked', false);
$('.l-content').find('.l-unit.selected .ch-toggle').attr('checked', true);
if ($('.l-content').find('.l-unit.selected').length == $('.l-content').find('.l-unit').length) {
$('.toggle-all').addClass('clicked-on');
}*/
},
'toggleAllHook': function() {
/*if ($('.l-unit').length == $('.ch-toggle:checked').length) {
$('.l-unit.selected').removeClass('selected');
$('.ch-toggle').attr('checked', false);
$('#toggle-all').attr('checked', false);
}
else {
$('.ch-toggle').attr('checked', true);
$('#toggle-all').attr('checked', true);
}*/
}
});
$('table').on('mousedown', 'td', function(e) {
if (e.ctrlKey) {
e.preventDefault();
}
});
}
});
</script>
</body>
</html>