-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
315 lines (266 loc) · 14.9 KB
/
index.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
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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Smart Shortcut Key JavaScript Library</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css"
integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="//oss.maxcdn.com/jquery.trip.js/3.3.3/trip.min.css"/>
<style>
/* Bordered form */
form {
border: 3px solid #f1f1f1;
}
/* Full-width inputs */
input[type=text], input[type=password] {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
box-sizing: border-box;
}
/* Add a hover effect for buttons */
button:hover {
opacity: 0.8;
}
/* Extra style for the cancel button (red) */
.cancelbtn {
width: auto;
padding: 10px 18px;
background-color: #f44336;
}
/* Center the avatar image inside this container */
.imgcontainer {
text-align: center;
margin: 24px 0 12px 0;
}
/* Avatar image */
img.avatar {
width: 40%;
border-radius: 50%;
}
/* Add padding to containers */
.container {
padding: 16px;
}
/* The "Forgot password" text */
span.psw {
float: right;
padding-top: 16px;
}
/* Change styles for span and cancel button on extra small screens */
@media screen and (max-width: 300px) {
span.psw {
display: block;
float: none;
}
.cancelbtn {
width: 100%;
}
}
/* The Modal (background) */
.modal {
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 1; /* Sit on top */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
background-color: rgb(0, 0, 0); /* Fallback color */
background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
padding-top: 60px;
}
/* Modal Content/Box */
.modal-content {
background-color: #fefefe;
margin: 5px auto; /* 15% from the top and centered */
border: 1px solid #888;
width: 50%; /* Could be more or less, depending on screen size */
}
/* The Close Button */
.close {
/* Position it in the top right corner outside of the modal */
position: absolute;
right: 25px;
top: 0;
color: #000;
font-size: 35px;
font-weight: bold;
}
/* Close button on hover */
.close:hover,
.close:focus {
color: red;
cursor: pointer;
}
/* Add Zoom Animation */
.animate {
-webkit-animation: animatezoom 0.6s;
animation: animatezoom 0.6s
}
@-webkit-keyframes animatezoom {
from {
-webkit-transform: scale(0)
}
to {
-webkit-transform: scale(1)
}
}
@keyframes animatezoom {
from {
transform: scale(0)
}
to {
transform: scale(1)
}
}
</style>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="#">Smart Shortcut Key JavaScript Library</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li> </li>
</ul>
<div class="form-inline my-2 my-lg-0" style="width: 20%;display: flex;justify-content: space-between;">
<button class="btn btn-primary btn-sm" onclick="document.getElementById('id01').style.display='block'" id="loginbtn" style="height: 37px;">
Sign In
</button>
<a id="btngithublink" class="nav-link btn btn-primary btn-sm" href="https://github.com/merajcal/smart-shortcutkey-js-library" target="_blank" style="height: 37px;">
GitHub
<svg aria-hidden="true" class="octicon octicon-mark-github" height="20" version="1.1"
viewBox="0 0 16 16" width="20" fill="#fff">
<path fill-rule="evenodd"
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path>
</svg>
</a>
<a id="btnnpmlink" class="nav-link btn btn-primary btn-sm" href="https://www.npmjs.com/package/smart-shortcutkey-js-library" style="width: 80px; height: 37px;" target="_blank">
<svg viewBox="0 0 20 7">
<path fill="#CB3837" d="M0 0v6h5v1h4V6h9V0"></path>
<path fill="#FFF" d="M1 1v4h2V2h1v3h1V1h1v5h2V2h1v2H8v1h2V1h1v4h2V2h1v3h1V2h1v3h1V1"></path>
</svg>
</a>
</div>
</div>
</nav>
<div class="list-group">
<a href="#" class="list-group-item list-group-item-action flex-column align-items-start">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">Display List Of Shortcut Keys</h5>
<small class="text-muted"><h1><span class="badge badge-primary">1</span></h1></small>
</div>
<p class="mb-1">Press shift key for 2 seconds. A small popup will be display at bottom right corner. The popup
will display list fo already created shortcut keys</p>
</a>
<a href="#" class="list-group-item list-group-item-action flex-column align-items-start">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">Create New Shortcut Key</h5>
<small class="text-muted"><h1><span class="badge badge-primary">2</span></h1></small>
</div>
<p class="mb-1">
<ol>
<li>Press alt key (keep pressed) and click the element from page with mouse.</li>
<li>A modal pop will be opened. Enter a meaning full name to the shortcut key. By default name will be
populated with element label.
</li>
<li>Enter a letter from key board which will be the shortcut key for that action (suppose you enter l letter
for login)
</li>
<li>Click Save</li>
<li>Successful message will be displayed</li>
<li>Close the modal on click of Done button</li>
</ol>
</p>
</a>
<a href="#" class="list-group-item list-group-item-action flex-column align-items-start">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">Use the Shortcut Key to trigger the action</h5>
<small class="text-muted"><h1><span class="badge badge-primary">3</span></h1></small>
</div>
<p class="mb-1">Press Alt key + l (which you have created the at step 2). Login modal will be opened</p>
</a>
<a href="#" class="list-group-item list-group-item-action flex-column ">
<iframe width="854" height="480" src="https://www.youtube.com/embed/Yi9JOD6bXdk?rel=0;autoplay=1" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</a>
</div>
<!-- The Modal -->
<div id="id01" class="modal">
<span onclick="document.getElementById('id01').style.display='none'"
class="close" title="Close Modal">×</span>
<!-- Modal Content -->
<form class="modal-content animate" action="/action_page.php">
<div class="imgcontainer">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAAAXNSR0IArs4c6QAAAARnQU1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P5E59Da30Y3LkQB46riRzx59a6UO4zfW4g1OoPcWOYc70kUXOismEoXm4OoXZeLeLklrCkrLOuylsv/8q+iHUd98HYWA61x+KhtmAN1Kj8OdYWrAZjWRz3Wd3t+8yx0yFqT8xqdKEXauvVAJc+rrwfs9/xlegBV2KczBxA7bkXWDCwmh1vmeFryyOW3xgEicLijEmv/4DadA+w/JNOv01jnV7B4DPVVgcWlla3tjikx9ucWnzVyRLg6cTqvLPoKmlxLFJqd3bBnTBIk3zaPsIU4A3EooLbk1vO0Xg8+/b0rRFWYG/i4cr2EanSepjanh3EKIzvkLPkcM1/HzODehOrb4/iKnThZQi1P3NIMiwR+8qavXLvY3Fv6Q0n3uJQ+zMH6ZNaj159yAzmjSy50ocN9g1qf2bADZX0SCMmx7NXUt5KU/cEkJZmJDbDMvP/qCcu48zKPUevDbICeTOJ5wGSwOU0DdNHvNwiV9V1TrCCeDOzTHcmJLJZqMZJysZGvFVmBfFm4tcDSVmNFpqG6YPsBT34fQMriDcTv7eRZlq7aRqmD+zM9Z1jzCDeTMOdMewHnTQN00fst+axuAwzzEeid5qG13gNXuKNN/4Pg+/fsT1iA0UAAAAASUVORK5CYII=">
</div>
<div class="container">
<label for="uname"><b>Username</b></label>
<input type="text" placeholder="Enter Username" name="uname" required>
<label for="psw"><b>Password</b></label>
<input type="password" placeholder="Enter Password" name="psw" required>
<button type="submit" class="btn btn-primary" btn-lg> Login </button>
<label>
<input type="checkbox" checked="checked" name="remember"> Remember me
</label>
</div>
<div class="container" style="background-color:#f1f1f1">
<button type="button" onclick="document.getElementById('id01').style.display='none'" class="cancelbtn">
Cancel
</button>
<span class="psw">Forgot <a href="#">password?</a></span>
</div>
</form>
</div>
<script
src="https://code.jquery.com/jquery-2.2.4.min.js"
integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44="
crossorigin="anonymous"></script>
<script src="//oss.maxcdn.com/jquery.trip.js/3.3.3/trip.min.js"></script>
<script src="./build/main.js"></script>
<script>
// var ShortcutKeyForWebapp = new ShortcutKeyForWebApp({externalStyles: 'shortcutkey.css', triggerShortcutKeyCode: 'shiftKey'});
// Get the modal
var modal = document.getElementById('id01');
window.ssjs.setConfig({
triggerShortcutKeyCode: 'shiftKey', applicationDefinedKeys: [{
"keyCode": 83,
"letter": "s",
"actionName": "Sign In",
"element": {
"id": "loginbtn",
"className": "",
"label": "Sign In",
"tagName": "DIV"
}
}]
});
// When the user clicks anywhere outside of the modal, close it
window.onclick = function (event) {
if (event.target == modal) {
modal.style.display = "none";
}
}
var tripToShowNavigation = new Trip([
{ sel : $("#loginbtn"),
content : "Press <b>Shift Key + s to sign in</b> login. <br/> Please press shift for 2 seconds to open the shortcut key list popup",
position : "s" },
], {
showNavigation : false,
showCloseBox : true,
delay : -1
});
tripToShowNavigation.start();
// Initialize the tour
// tour.init();
// Start the tour
// tour.start();
</script>
</body>
</html>