This repository was archived by the owner on Sep 13, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.html
More file actions
254 lines (222 loc) · 6.64 KB
/
example.html
File metadata and controls
254 lines (222 loc) · 6.64 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"><!-- , user-scalable=no -->
<link rel="stylesheet" href="dist/tinyNotice-theme.css">
<style>
body {
font-family: tahoma;
}
small {
color: darkorange;
margin-right: 10px;
}
button {
cursor: pointer;
}
</style>
</head>
<body>
<!--
<div class="tinyNoticeWrap">
<span>X</span>
<strong>status Title</strong>
<p>
status Text
</p>
<button data-action="confirm">ok</button>
<button data-action="cancel">cancel</button>
</div>
-->
<h1>OPTIONS</h1>
<!-- --------------------------------------------- -->
<h3>statusTitle : "status title"</h3>
<h3>statusText : "status sub text"</h3>
default tinyNotice statusTitle and statusText
<small>[default] {statusTitle:"",statusText:""}</small>
<button id="btn2" type="button">try it!</button>
<br><br>
only statusTitle
<small>{statusTitle:"your title"}</small>
<button id="btn3" type="button">try it!</button>
<br><br>
only statusText
<small>{statusText:"your notice text"}</small>
<button id="btn4" type="button">try it!</button>
<br><br>
define statusTitle and statusText
<small>{statusTitle:"your title" , statusText:"your notice text"}</small>
<button id="btn5" type="button">try it!</button>
<br><br><br><br><!-- --------------------------------------------- -->
<h3>status : "note || success || warning || error || info"</h3>
tinyNotice success status
<small>[default] {status : "note"}</small>
<button id="btn6" type="button">try it!</button>
<br><br>
tinyNotice success status
<small>{status : "success"}</small>
<button id="btn7" type="button">try it!</button>
<br><br>
tinyNotice warning status
<small>{status : "warning"}</small>
<button id="btn8" type="button">try it!</button>
<br><br>
tinyNotice error status
<small>{status : "error"}</small>
<button id="btn9" type="button">try it!</button>
<br><br>
tinyNotice info status
<small>{status : "info"}</small>
<button id="btn10" type="button">try it!</button>
<br><br><br><br><!-- --------------------------------------------- -->
<h3>lifeTime : 0 || (number per ms)</h3>
<h3>close [event]</h3>
tinyNotice with default lifeTime
<small>[default] {lifeTime : 1000}</small>
<button id="btn11" type="button">try it!</button>
<br><br>
tinyNotice with 1 second lifeTime
<small>{lifeTime : 1000}</small>
<button id="btn12" type="button">try it!</button>
<br><br>
tinyNotice with unlimited lifeTime
<small>{lifeTime : 0}</small>
<button id="btn13" type="button">try it!</button>
<br><br>
close tinyNotice
<small>$.tinyNotice("close")</small>
<button id="btn14" type="button">try it!</button>
<br><br><br><br><!-- --------------------------------------------- -->
<h3>{setConfirm: true || "en" || "fa" || {ok:"..",cancel:".."} }</h3>
with default persian button title
<small>{setConfirm:"fa"}</small>
<button id="btn15" type="button">try it!</button>
<br><br>
with default English button title
<small>{setConfirm:true} OR {setConfirm:"en"}</small>
<button id="btn16" type="button">try it!</button>
<br><br>
show confirm button with custom topics
<small>{setConfirm:{ok:"ok,i'm ready",cancel:"no,tanks"}}</small>
<button id="btn17" type="button">try it!</button>
<br><br>
seted callback functions
<small>{ accept:function(){alert("ok");} , cancel:function(){alert("cancel");} }</small>
<button id="btn18" type="button">try it!</button>
<br><br><br><br><!-- --------------------------------------------- -->
<!-- scripts -->
<script src="lib/jquery-1.11.3.min.js"></script>
<script src="dist/tinyNotice.js"></script>
<script>
$("#btn2").click(function () {
$.tinyNotice({});
});
$("#btn3").click(function () {
$.tinyNotice({statusTitle: "your title"});
});
$("#btn4").click(function () {
$.tinyNotice({statusText: "your notice text"});
});
$("#btn5").click(function () {
$.tinyNotice({
statusTitle: "your title",
statusText: "your notice text"
});
});
$("#btn6").click(function () {
$.tinyNotice({
statusTitle: "note",
statusText: "this is a note message!"
});
});
$("#btn7").click(function () {
$.tinyNotice({
status: "success",
statusTitle: "success",
statusText: "this is a success message!"
});
});
$("#btn8").click(function () {
$.tinyNotice({
status: "warning",
statusTitle: "warning",
statusText: "this is a warning message!"
});
});
$("#btn9").click(function () {
$.tinyNotice({
status: "error",
statusTitle: "error",
statusText: "this is a error message!"
});
});
$("#btn10").click(function () {
$.tinyNotice({
status: "info",
statusTitle: "info",
statusText: "this is a info message!"
});
});
$("#btn11").click(function () {
$.tinyNotice({
statusTitle: "lifeTime",
statusText: "default life time!"
});
});
$("#btn12").click(function () {
$.tinyNotice({
lifeTime: 1000,
statusTitle: "lifeTime",
statusText: "1 second life time!"
});
});
$("#btn13").click(function () {
$.tinyNotice({
lifeTime: 0,
statusTitle: "lifeTime",
statusText: "unlimited life time!"
});
});
$("#btn14").click(function () {
$.tinyNotice("close");
});
$("#btn15").click(function () {
$.tinyNotice({
setConfirm: "fa",
statusTitle: "عنوان",
statusText: "داده های جدید ثبت شوند ؟"
});
});
$("#btn16").click(function () {
$.tinyNotice({
setConfirm: "en",
statusTitle: "Confirm mod",
statusText: "default button topic!"
});
});
$("#btn17").click(function () {
$.tinyNotice({
setConfirm: {ok: "ok,i'm ready", cancel: "no,tanks"},
statusTitle: "Confirm mod",
statusText: "custom button topic!"
});
});
$("#btn18").click(function () {
$.tinyNotice({
setConfirm: "en",
statusTitle: "Confirm mod",
statusText: "default button topic!",
accept: function () {
alert("ok");
},
cancel: function () {
alert("cancel");
}
});
});
</script>
<!-- /scripts -->
</body>
</html>