-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfooter.html
77 lines (75 loc) · 3.48 KB
/
footer.html
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
<div class="footer-text">
<div id="downloadframe" style="display: none;"></div>
<br />
<?php echo $CFG->sitefooter; ?>
</div>
<?php
$code = <<<EOT
$(".accordioncontent").each(function() {
$(this).accordion({
header: "h3",
collapsible: true,
heightStyle: "content",
navigation: true
});
});
adjustStyle($(window).width());
setTimeout(function() {
$("#carousel").flickity();
}, 500);
$(".pagesort1, .pagesort2" ).sortable({
connectWith: ".connectedSortable",
items: ".box",
handle: ".pagesorthandle",
tolerance: "pointer",
helper: function(){ return $('<div class="portable_box"><i class="fa-solid fa-dolly fa-bounce" style="font-size: 4em"></i></div>') },
placeholder: "inner_drop_zone",
cursor: "move",
cursorAt: { top: 0, left: 0 },
zIndex: 9999,
sort: function(event, ui) {
ui.helper.css({
"top": ui.position.top + "px",
"left": ui.position.left + $(window).scrollLeft() + "px",
});
},
stop: function(event, ui) {
var from = ui.item.parent()[0];
var to = this;
$.ajax({
url: WWW_ROOT + (dirfromroot == '' ? '' : '/' + dirfromroot) + "/ajax/site_ajax.php",
data: { "action":"drop_move_feature",
"pageid": $PAGE->id,
"col1": $(".pagesort1").sortable("toArray"),
"col2": $(".pagesort2").sortable("toArray"),
"moved": $(ui.item).attr("id")},
cache: false
}).done(function(html) {
if (to !== from) {
location.reload();
}
});
},
update: function(event, ui) {
}
});
$(window).resize(function() {
setTimeout(function() {
adjustStyle($(window).width());
}, 100);
});
$(window).on('focus', function() {
$("#carousel").flickity();
window.dispatchEvent(new Event('resize'));
});
setTimeout(function() {
$("#carousel").flickity();
window.dispatchEvent(new Event('resize'));
$("#main-content").show();
}, 500);
EOT;
echo js_code_wrap($code, "defer", true);
?>
</div>
</body>
</html>