-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfooter.php
executable file
·83 lines (73 loc) · 2.71 KB
/
footer.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
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
<!-- jQuery first, then Tether, then Bootstrap JS. -->
<script src="/libraries/jquery-3.2.1.min.js"></script>
<!--<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.2.1.min.js"></script>-->
<script src="/libraries/tether-1.3.3/dist/js/tether.min.js"></script>
<script src="/libraries/bootstrap-4.0.0-alpha.6-dist/js/bootstrap.min.js"></script>
<script type="text/javascript">
// меняет формы входа и регистрации
$(".toggleForms").click(function () {
$("#signUpForm").toggle();
$("#logInForm").toggle();
});
// автосохранение
$("#diary").keyup(function () {
$.ajax({
method: "POST",
url: "updatedatabase.php",
data: {content: this.value}
});
// .done(function(msg) {
// alert("Data Saved: " + msg);
// })
// .error(function(err){
// console.log(err.statusText)
// })
});
$("#title").keyup(function () {
$.ajax({
method: "POST",
url: "updatedatabase.php",
data: {title: this.value}
});
});
//Share bar
Share = {
vkontakte: function (purl, ptitle, pimg, text) {
var url = 'http://vkontakte.ru/share.php?';
url += 'url=' + encodeURIComponent(purl);
url += '&title=' + encodeURIComponent(ptitle);
url += '&description=' + encodeURIComponent(text);
url += '&image=' + encodeURIComponent(pimg);
url += '&noparse=true';
Share.popup(url);
},
popup: function (url) {
window.open(url, '', 'toolbar=0,status=0,width=626,height=436');
}
};
//todo: toggle delete button
$(".noteButton").mouseover(function () {
var id = $(this)[0].id;
var buttonId = id.substring(10);
// document.getElementById("deleteNoteButton"+buttonId).style.visibility = "visible";
$("#deleteNoteButton" + buttonId).show();
});
$(".noteButton").mouseout(function () {
var id = $(this)[0].id;
var buttonId = id.substring(10);
// document.getElementById("deleteNoteButton"+buttonId).style.visibility = "hidden";
$("#deleteNoteButton" + buttonId).hide();
});
$(".deleteNoteButton").hover(function () {
var id = $(this)[0].id;
var buttonId = id.substring(10);
if ( $("#deleteNoteButton"+buttonId).css("display") === "none"){
$("#deleteNoteButton"+buttonId).show();
}else {
$("#deleteNoteButton"+buttonId).hide();
}
// $("#deleteNoteButton"+buttonId).toggle();
});
</script>
</body>
</html>