-
Notifications
You must be signed in to change notification settings - Fork 0
/
equip.html
89 lines (68 loc) · 1.97 KB
/
equip.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
78
79
80
81
82
83
84
85
86
87
88
89
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8">
<title>test</title>
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
<style type="text/css" media="all">
.controlBtns {
margin-left: 10px;
/*margin-bottom: 10px*/
}
.form-horizontal .equip-notes {
margin-left: 10px;
width: 95%;
height: 300px
}
</style>
<!--<script src="js/bootstrap.min.js"></script>-->
<script src="js/jquery.min.js"></script>
<script src="js/jquery.deserialize.js"></script>
<script>
function serializeForms(){
localStorage.setItem("eqipForm", $("#eqipForm").serialize())
}
function deserializeForms(){
$("#eqipForm").deserialize(localStorage.getItem("eqipForm"));
}
var time = 5000;
var activityTimer = setTimeout(inActive, time);
function inActive() {
serializeForms();
clearTimeout(activityTimer);
activityTimer = setTimeout(inActive, time);
}
function toMain(){
serializeForms();
document.location.replace('index.html');
}
$(document).ready(function(){
deserializeForms();
$("#saveBtn").click(function(){
serializeForms();
});
$("#loadBtn").click(function(){
deserializeForms();
});
});
</script>
</head>
<body>
<ul class="nav nav-tabs">
<li><a href="#" onclick="toMain()">Персонаж</a></li>
<li class="active">
<a href="#">Шмотник</a>
</li>
</ul>
<form class="form-horizontal" id="eqipForm">
<fieldset>
<div class="control-group">
<textarea class="equip-notes" name="textEquip"> </textarea>
</div>
<div class="controlBtns">
<button class="btn" type="button" id="saveBtn">Save</button>
<button class="btn" type="button" id="loadBtn">Load</button>
</div>
</fieldset>
</form>
</body></html>