-
Notifications
You must be signed in to change notification settings - Fork 0
/
signature.js-test.html
97 lines (97 loc) · 2.85 KB
/
signature.js-test.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
90
91
92
93
94
95
96
97
<html>
<head>
<title>
signature.js test
</title>
<link rel="stylesheet" type="text/css" href="style/signature.js.css"></link>
<script type='text/javascript' src='lib/signature.js'></script>
</head>
<body>
<div id="display" class="signature-pad"></div>
<div id="display2" class="signature-pad"></div>
<div id="display3" class="signature-pad"></div>
<div id="display4" class="signature-pad"></div>
<div id="display5" class="signature-pad"></div>
<div id="display6" class="signature-pad"></div>
<script type='text/javascript'>
var signature = new Signature({
displayId: "display"
});
var signature2 = new Signature({
displayId: 'display2',
watermark: {
url: 'img/github.png',
position: Signature.CENTER,
alpha: 0.2,
width: 100,
height: 100
}
});
var signature3 = new Signature( {
displayId: 'display3',
explanation: {
text: "Signature signifies acceptace of aforementioned end user license agreement.",
font: "georgia",
color: "#aaa",
size: 12,
lineHeight: 13,
maxWidth: 250,
position: Signature.NORTH_EAST
}
});
var signature4 = new Signature( {
displayId: 'display4',
explanation: {
text: "This one saves.",
font: "georgia",
color: "#aaa",
size: 12,
lineHeight: 13,
maxWidth: 250,
position: Signature.NORTH_EAST
},
http: {
verb: "POST",
address: "http://localhost:3000/images",
dataParam: 'data',
onSave: function(response) { alert(response.status); }
}
});
var signature5 = new Signature( {
displayId: 'display5',
explanation: {
text: "This one saves the way I want it to.",
font: "georgia",
color: "#aaa",
size: 12,
lineHeight: 13,
maxWidth: 250,
position: Signature.NORTH_EAST
},
save: function() {
$.post('images', function(response) { alert(response); });
}
});
var signature6 = new Signature( {
displayId: 'display6',
watermark: {
url: 'img/github.png',
position: Signature.CENTER,
alpha: 0.2,
width: 100,
height: 100
},
explanation: {
text: "This one has custom accept/reject button classes AND a watermark.",
font: "georgia",
color: "#aaa",
size: 12,
lineHeight: 13,
maxWidth: 250,
position: Signature.NORTH_EAST
},
buttonClass: "my-button-class"
});
</script>
</body>
</html>