Version Description
- Activation Bug Fix
Download this release
Release Info
Developer | raptor235 |
Plugin | Sidekick |
Version | 1.2.1 |
Comparing to | |
See all releases |
Code changes from version 1.1 to 1.2.1
- css/sidekick_wordpress.css +412 -160
- images/sprides_v11.png +0 -0
- images/sprides_v11_retna.png +0 -0
- js/sk.source.js +3492 -2810
- readme.txt +79 -46
- sidekick.php +366 -384
- sk_init.php +2 -2
- wpu_init.php +0 -14
css/sidekick_wordpress.css
CHANGED
@@ -1,3 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
@-moz-keyframes pulse {
|
2 |
0% {
|
3 |
opacity: 0;
|
@@ -36,16 +42,15 @@ div.sk_hotspot {
|
|
36 |
opacity: 0.0;
|
37 |
margin-left: -20px;
|
38 |
margin-top: -10px;
|
39 |
-
|
40 |
-
|
41 |
}
|
42 |
div.sk_hotspot.visible {
|
43 |
opacity: 0.8;
|
44 |
-
-webkit-animation:
|
45 |
-
-moz-animation:
|
46 |
-
-o-animation:
|
47 |
}
|
48 |
-
@-webkit-keyframes
|
49 |
from {
|
50 |
-webkit-transform: rotate(49deg) scale(0.5) translate(20px);
|
51 |
}
|
@@ -53,7 +58,7 @@ div.sk_hotspot.visible {
|
|
53 |
-webkit-transform: rotate(0deg) scale(3);
|
54 |
}
|
55 |
}
|
56 |
-
@-moz-keyframes
|
57 |
from {
|
58 |
-moz-transform: rotate(49deg) scale(0.5) translate(20px);
|
59 |
}
|
@@ -61,7 +66,7 @@ div.sk_hotspot.visible {
|
|
61 |
-moz-transform: rotate(0deg) scale(3);
|
62 |
}
|
63 |
}
|
64 |
-
@-o-keyframes
|
65 |
from {
|
66 |
-o-transform: rotate(49deg) scale(0.5) translate(20px);
|
67 |
}
|
@@ -76,13 +81,9 @@ div.sk_hotspot:hover {
|
|
76 |
-o-transition: all 0.1s ease-in-out;
|
77 |
transition: all 0.1s ease-in-out;
|
78 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
79 |
-
|
80 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
81 |
-
|
82 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
83 |
-
|
84 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
85 |
-
|
86 |
opacity: 1;
|
87 |
transform: scale(1.2, 1.2);
|
88 |
-ms-transform: scale(1.2, 1.2);
|
@@ -91,59 +92,41 @@ div.sk_hotspot:hover {
|
|
91 |
-moz-transform: scale(1.2, 1.2);
|
92 |
}
|
93 |
body.branch-3-8 div#sidekick {
|
94 |
-
width:
|
95 |
}
|
96 |
body.branch-3-8 div#sidekick.open {
|
97 |
width: 100%;
|
98 |
}
|
99 |
body.branch-3-8 div#sidekick.open div#sk_taskbar div#logo {
|
100 |
-
width:
|
101 |
}
|
102 |
body.branch-3-8 div#sidekick.playing {
|
103 |
width: 100%;
|
104 |
}
|
105 |
body.branch-3-8 div#sidekick.playing div#sk_taskbar div#logo {
|
106 |
-
width:
|
107 |
}
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
body.branch-3-8 div#sidekick div#sk_taskbar button.sk_toggle {
|
120 |
-
width: 5px;
|
121 |
-
border: none;
|
122 |
-
min-width: 17px;
|
123 |
-
background-position: -9px -358px;
|
124 |
-
}
|
125 |
-
body div#sidekick.open button.sk_toggle,
|
126 |
-
body.branch-3-8 div#sidekick.open button.sk_toggle,
|
127 |
-
body div#sidekick.playing button.sk_toggle,
|
128 |
-
body.branch-3-8 div#sidekick.playing button.sk_toggle {
|
129 |
-
-webkit-transform: rotate(180deg);
|
130 |
-
-moz-transform: rotate(180deg);
|
131 |
-
-ms-transform: rotate(180deg);
|
132 |
-
-o-transform: rotate(180deg);
|
133 |
-
transform: rotate(180deg);
|
134 |
-
}
|
135 |
}
|
136 |
div#sidekick {
|
137 |
position: fixed;
|
138 |
bottom: 0px;
|
139 |
left: 0px;
|
140 |
height: 40px;
|
141 |
-
width:
|
142 |
/*overflow: hidden;*/
|
143 |
-
|
144 |
-
z-index: 1000001;
|
145 |
/*.animate_reg;*/
|
146 |
-
|
147 |
}
|
148 |
div#sidekick.sidekick_player {
|
149 |
left: 0px;
|
@@ -168,6 +151,20 @@ div#sidekick.open div#sk_taskbar div.sk_toggle,
|
|
168 |
div#sidekick.open div#sk_taskbar div.sk_toggles {
|
169 |
display: block;
|
170 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
div#sidekick.playing {
|
172 |
width: 100%;
|
173 |
}
|
@@ -187,6 +184,7 @@ div#sidekick.playing div#sk_taskbar div.sk_info {
|
|
187 |
div#sidekick.playing div#sk_taskbar div.sk_info div.sk_time,
|
188 |
div#sidekick.playing div#sk_taskbar div.sk_info div.sk_title {
|
189 |
opacity: 1;
|
|
|
190 |
}
|
191 |
div#sidekick.playing div#sk_taskbar button.sk_toggle {
|
192 |
background: url('../images/sprides_v11.png') -6px -394px;
|
@@ -200,13 +198,9 @@ div#sidekick.playing div#sk_taskbar div.sk_toggles {
|
|
200 |
-o-transition: all 0.3s ease-out;
|
201 |
transition: all 0.3s ease-out;
|
202 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
203 |
-
|
204 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
205 |
-
|
206 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
207 |
-
|
208 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
209 |
-
|
210 |
}
|
211 |
div#sidekick.playing div#sk_taskbar div.sk_toggles #toggle_drawer {
|
212 |
display: none;
|
@@ -223,31 +217,22 @@ div#sidekick div#sk_taskbar {
|
|
223 |
position: relative;
|
224 |
background: #ff712b;
|
225 |
/* Old browsers */
|
226 |
-
|
227 |
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
|
228 |
-
|
229 |
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmNzEyYiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNlZDVmMTkiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
|
230 |
background: -moz-linear-gradient(top, #ff712b 0%, #ed5f19 100%);
|
231 |
/* FF3.6+ */
|
232 |
-
|
233 |
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ff712b), color-stop(100%, #ed5f19));
|
234 |
/* Chrome,Safari4+ */
|
235 |
-
|
236 |
background: -webkit-linear-gradient(top, #ff712b 0%, #ed5f19 100%);
|
237 |
/* Chrome10+,Safari5.1+ */
|
238 |
-
|
239 |
background: -o-linear-gradient(top, #ff712b 0%, #ed5f19 100%);
|
240 |
/* Opera 11.10+ */
|
241 |
-
|
242 |
background: -ms-linear-gradient(top, #ff712b 0%, #ed5f19 100%);
|
243 |
/* IE10+ */
|
244 |
-
|
245 |
background: linear-gradient(to bottom, #ff712b 0%, #ed5f19 100%);
|
246 |
/* W3C */
|
247 |
-
|
248 |
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff712b', endColorstr='#ed5f19', GradientType=0);
|
249 |
/* IE6-8 */
|
250 |
-
|
251 |
}
|
252 |
div#sidekick div#sk_taskbar button {
|
253 |
border: none;
|
@@ -258,21 +243,41 @@ div#sidekick div#sk_taskbar button {
|
|
258 |
div#sidekick div#sk_taskbar div#logo {
|
259 |
float: left;
|
260 |
height: 100%;
|
261 |
-
width:
|
262 |
/*width: 124px; wp 3.8+ */
|
263 |
-
|
264 |
-
background: url('../images/sprides_v11.png') 8px 9px no-repeat;
|
265 |
cursor: pointer;
|
266 |
}
|
267 |
div#sidekick div#sk_taskbar button.sk_toggle {
|
268 |
float: left;
|
269 |
height: 100%;
|
270 |
-
width:
|
|
|
271 |
background: url('../images/sprides_v11.png') 0px -358px;
|
272 |
border: none;
|
273 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
274 |
div#sidekick div#sk_taskbar div.sk_info {
|
275 |
display: none;
|
|
|
276 |
height: 100%;
|
277 |
}
|
278 |
div#sidekick div#sk_taskbar div.sk_info .sk_time {
|
@@ -281,15 +286,17 @@ div#sidekick div#sk_taskbar div.sk_info .sk_time {
|
|
281 |
font-size: 16px;
|
282 |
color: white;
|
283 |
margin: 13px 30px;
|
284 |
-
opacity: 0.3
|
|
|
285 |
}
|
286 |
div#sidekick div#sk_taskbar div.sk_info .sk_title {
|
|
|
287 |
float: left;
|
288 |
height: 100%;
|
289 |
font-size: 16px;
|
290 |
color: white;
|
291 |
-
border-left: solid 1px white;
|
292 |
opacity: 0.3;
|
|
|
293 |
}
|
294 |
div#sidekick div#sk_taskbar div.sk_info .sk_title label {
|
295 |
font-size: 10px;
|
@@ -305,39 +312,35 @@ div#sidekick div#sk_taskbar div.sk_controls {
|
|
305 |
border-right: solid 1px white;
|
306 |
border-left: solid 1px white;
|
307 |
display: none;
|
|
|
|
|
308 |
background: #fb985f;
|
309 |
/* Old browsers */
|
310 |
-
|
311 |
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
|
312 |
-
|
313 |
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZiOTg1ZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNlZDZjMjAiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
|
314 |
background: -moz-linear-gradient(top, #fb985f 0%, #ed6c20 100%);
|
315 |
/* FF3.6+ */
|
316 |
-
|
317 |
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fb985f), color-stop(100%, #ed6c20));
|
318 |
/* Chrome,Safari4+ */
|
319 |
-
|
320 |
background: -webkit-linear-gradient(top, #fb985f 0%, #ed6c20 100%);
|
321 |
/* Chrome10+,Safari5.1+ */
|
322 |
-
|
323 |
background: -o-linear-gradient(top, #fb985f 0%, #ed6c20 100%);
|
324 |
/* Opera 11.10+ */
|
325 |
-
|
326 |
background: -ms-linear-gradient(top, #fb985f 0%, #ed6c20 100%);
|
327 |
/* IE10+ */
|
328 |
-
|
329 |
background: linear-gradient(to bottom, #fb985f 0%, #ed6c20 100%);
|
330 |
/* W3C */
|
331 |
-
|
332 |
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fb985f', endColorstr='#ed6c20', GradientType=0);
|
333 |
/* IE6-8 */
|
334 |
-
|
335 |
}
|
336 |
div#sidekick div#sk_taskbar div.sk_controls button {
|
337 |
width: 70px;
|
338 |
opacity: 0.3;
|
|
|
|
|
339 |
}
|
340 |
div#sidekick div#sk_taskbar div.sk_controls button.sidekick_restart {
|
|
|
341 |
background: url('../images/sprides_v11.png') 17px -140px;
|
342 |
}
|
343 |
div#sidekick div#sk_taskbar div.sk_controls button.sidekick_restart:hover {
|
@@ -345,23 +348,81 @@ div#sidekick div#sk_taskbar div.sk_controls button.sidekick_restart:hover {
|
|
345 |
}
|
346 |
div#sidekick div#sk_taskbar div.sk_controls button.sidekick_play_pause {
|
347 |
background: url('../images/sprides_v11.png') 17px -178px;
|
|
|
|
|
|
|
348 |
}
|
349 |
div#sidekick div#sk_taskbar div.sk_controls button.sidekick_play_pause.playing {
|
350 |
background: url('../images/sprides_v11.png') 17px -718px;
|
351 |
-
/*-moz-animation: pulse 1s infinite linear;*/
|
352 |
-
|
353 |
-
/*-webkit-animation: pulse 1s infinite linear;*/
|
354 |
-
|
355 |
}
|
356 |
div#sidekick div#sk_taskbar div.sk_controls button.sidekick_play_pause:hover {
|
357 |
background: #d9763b url('../images/sprides_v11.png') 17px -178px;
|
358 |
}
|
359 |
div#sidekick div#sk_taskbar div.sk_controls button.sidekick_stop {
|
360 |
background: url('../images/sprides_v11.png') 17px -210px;
|
|
|
361 |
}
|
362 |
div#sidekick div#sk_taskbar div.sk_controls button.sidekick_stop:hover {
|
363 |
background: #d9763b url('../images/sprides_v11.png') 17px -210px;
|
364 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
365 |
div#sidekick div#sk_taskbar div.sk_toggle {
|
366 |
float: left;
|
367 |
height: 100%;
|
@@ -375,25 +436,22 @@ div#sidekick div#sk_taskbar div.sk_toggles {
|
|
375 |
-o-transition: all 0.3s ease-out;
|
376 |
transition: all 0.3s ease-out;
|
377 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
378 |
-
|
379 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
380 |
-
|
381 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
382 |
-
|
383 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
384 |
-
|
385 |
margin-top: 0px;
|
386 |
-
display:
|
387 |
float: right;
|
388 |
height: 100%;
|
389 |
}
|
390 |
div#sidekick div#sk_taskbar div.sk_toggles button {
|
391 |
-
height:
|
392 |
width: 70px;
|
|
|
|
|
393 |
}
|
394 |
div#sidekick div#sk_taskbar div.sk_toggles button#toggle_hotspots {
|
395 |
/*display: none;*/
|
396 |
-
|
397 |
border-left: solid 1px white;
|
398 |
background: #f1631d url('../images/sprides_v11.png') 10px -248px;
|
399 |
padding-left: 24px;
|
@@ -411,17 +469,13 @@ div#sidekick div#sk_taskbar div.sk_toggles button#toggle_hotspots:hover {
|
|
411 |
-o-transition: all 0.3s ease-out;
|
412 |
transition: all 0.3s ease-out;
|
413 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
414 |
-
|
415 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
416 |
-
|
417 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
418 |
-
|
419 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
420 |
-
|
421 |
}
|
422 |
div#sidekick div#sk_taskbar div.sk_toggles button#toggle_feedback {
|
423 |
background: #f1631d url('../images/sprides_v11.png') 17px -287px;
|
424 |
-
border-right: solid 1px white
|
425 |
border-left: solid 1px white;
|
426 |
width: 74px;
|
427 |
}
|
@@ -433,13 +487,9 @@ div#sidekick div#sk_taskbar div.sk_toggles button#toggle_feedback:hover {
|
|
433 |
-o-transition: all 0.3s ease-out;
|
434 |
transition: all 0.3s ease-out;
|
435 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
436 |
-
|
437 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
438 |
-
|
439 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
440 |
-
|
441 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
442 |
-
|
443 |
}
|
444 |
div#sidekick div#sk_taskbar div.sk_toggles button#toggle_preferences {
|
445 |
background: #f1631d url('../images/sprides_v11.png') 17px -33px;
|
@@ -455,13 +505,9 @@ div#sidekick div#sk_taskbar div.sk_toggles button#toggle_preferences:hover {
|
|
455 |
-o-transition: all 0.3s ease-out;
|
456 |
transition: all 0.3s ease-out;
|
457 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
458 |
-
|
459 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
460 |
-
|
461 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
462 |
-
|
463 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
464 |
-
|
465 |
}
|
466 |
div#sidekick div#sk_taskbar div.sk_toggles button#toggle_drawer {
|
467 |
background: #f1631d url('../images/sprides_v11.png') 17px -431px;
|
@@ -475,13 +521,9 @@ div#sidekick div#sk_taskbar div.sk_toggles button#toggle_drawer:hover {
|
|
475 |
-o-transition: all 0.3s ease-out;
|
476 |
transition: all 0.3s ease-out;
|
477 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
478 |
-
|
479 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
480 |
-
|
481 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
482 |
-
|
483 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
484 |
-
|
485 |
}
|
486 |
div#sidekick div#sk_taskbar div.sk_toggles button#toggle_drawer.on {
|
487 |
background-color: #FA8C00;
|
@@ -525,11 +567,17 @@ div#sidekick #sk_drawer h2 button {
|
|
525 |
}
|
526 |
div#sidekick #sk_drawer div.warning {
|
527 |
background-color: white;
|
528 |
-
padding: 20px 10px 100px;
|
529 |
text-align: center;
|
530 |
font-weight: bold;
|
531 |
font-size: 24px;
|
532 |
-
line-height:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
533 |
}
|
534 |
div#sidekick #sk_drawer ul.sk_bucketContainer {
|
535 |
position: relative;
|
@@ -539,26 +587,218 @@ div#sidekick #sk_drawer ul.sk_bucketContainer {
|
|
539 |
div#sidekick #sk_drawer ul.sk_bucketContainer .heading.goprev {
|
540 |
background-color: white;
|
541 |
}
|
542 |
-
div#sidekick #sk_drawer ul.sk_bucketContainer .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
543 |
position: absolute;
|
|
|
544 |
transform: translate3d(0, 0, 0);
|
545 |
-webkit-transition: all 0.3s ease-out;
|
546 |
-moz-transition: all 0.3s ease-out;
|
547 |
-o-transition: all 0.3s ease-out;
|
548 |
transition: all 0.3s ease-out;
|
549 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
550 |
-
|
551 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
552 |
-
|
553 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
554 |
-
|
555 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
556 |
-
|
557 |
}
|
558 |
-
div#sidekick #sk_drawer ul.sk_bucketContainer .
|
559 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
560 |
}
|
561 |
-
div#sidekick #sk_drawer ul.sk_bucketContainer .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
562 |
left: -300px;
|
563 |
transform: translate3d(0, 0, 0);
|
564 |
-webkit-transition: all 0.3s ease-out;
|
@@ -566,13 +806,25 @@ div#sidekick #sk_drawer ul.sk_bucketContainer .buckets.hide {
|
|
566 |
-o-transition: all 0.3s ease-out;
|
567 |
transition: all 0.3s ease-out;
|
568 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
569 |
-
|
570 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
571 |
-
|
572 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
573 |
-
|
574 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
575 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
576 |
}
|
577 |
div#sidekick #sk_drawer ul.sk_bucketContainer .buckets .bucket_heading i {
|
578 |
-webkit-transform: rotate(90deg);
|
@@ -581,9 +833,14 @@ div#sidekick #sk_drawer ul.sk_bucketContainer .buckets .bucket_heading i {
|
|
581 |
-o-transform: rotate(90deg);
|
582 |
transform: rotate(90deg);
|
583 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
584 |
div#sidekick #sk_drawer ul.sk_bucketContainer .sub_bucket {
|
585 |
/*display: none;*/
|
586 |
-
|
587 |
left: 300px;
|
588 |
position: absolute;
|
589 |
top: 0px;
|
@@ -595,17 +852,12 @@ div#sidekick #sk_drawer ul.sk_bucketContainer .sub_bucket {
|
|
595 |
-o-transition: all 0.3s ease-out;
|
596 |
transition: all 0.3s ease-out;
|
597 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
598 |
-
|
599 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
600 |
-
|
601 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
602 |
-
|
603 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
604 |
-
|
605 |
}
|
606 |
div#sidekick #sk_drawer ul.sk_bucketContainer .sub_bucket.show {
|
607 |
/*display: block;*/
|
608 |
-
|
609 |
left: 0px;
|
610 |
transform: translate3d(0, 0, 0);
|
611 |
-webkit-transition: all 0.3s ease-out;
|
@@ -613,13 +865,9 @@ div#sidekick #sk_drawer ul.sk_bucketContainer .sub_bucket.show {
|
|
613 |
-o-transition: all 0.3s ease-out;
|
614 |
transition: all 0.3s ease-out;
|
615 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
616 |
-
|
617 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
618 |
-
|
619 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
620 |
-
|
621 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
622 |
-
|
623 |
}
|
624 |
div#sidekick #sk_drawer ul.sk_bucketContainer .sub_bucket.hide {
|
625 |
left: -300px;
|
@@ -629,13 +877,9 @@ div#sidekick #sk_drawer ul.sk_bucketContainer .sub_bucket.hide {
|
|
629 |
-o-transition: all 0.3s ease-out;
|
630 |
transition: all 0.3s ease-out;
|
631 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
632 |
-
|
633 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
634 |
-
|
635 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
636 |
-
|
637 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
638 |
-
|
639 |
}
|
640 |
div#sidekick #sk_drawer ul.sk_bucketContainer .sub_bucket li.heading {
|
641 |
text-align: center;
|
@@ -651,30 +895,52 @@ div#sidekick #sk_drawer ul.sk_bucketContainer .sub_bucket li.sub_bucket_heading
|
|
651 |
transform: rotate(90deg);
|
652 |
}
|
653 |
div#sidekick #sk_drawer ul.sk_bucketContainer .walkthroughs {
|
654 |
-
/*min-height: 150px;*/
|
655 |
-
|
656 |
-
/*background-color: white;*/
|
657 |
-
|
658 |
transform: translate3d(0, 0, 0);
|
659 |
-webkit-transition: all 0.3s ease-out;
|
660 |
-moz-transition: all 0.3s ease-out;
|
661 |
-o-transition: all 0.3s ease-out;
|
662 |
transition: all 0.3s ease-out;
|
663 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
664 |
-
|
665 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
666 |
-
|
667 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
668 |
-
|
669 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
670 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
671 |
}
|
672 |
div#sidekick #sk_drawer ul.sk_bucketContainer .walkthroughs .overview {
|
673 |
-
font-weight: bold
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
674 |
}
|
675 |
div#sidekick #sk_drawer ul.sk_bucketContainer .walkthroughs .walkthrough {
|
676 |
-
/*display: none;*/
|
677 |
-
|
678 |
left: 300px;
|
679 |
position: absolute;
|
680 |
top: 0px;
|
@@ -685,13 +951,9 @@ div#sidekick #sk_drawer ul.sk_bucketContainer .walkthroughs .walkthrough {
|
|
685 |
-o-transition: all 0.3s ease-out;
|
686 |
transition: all 0.3s ease-out;
|
687 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
688 |
-
|
689 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
690 |
-
|
691 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
692 |
-
|
693 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
694 |
-
|
695 |
}
|
696 |
div#sidekick #sk_drawer ul.sk_bucketContainer .walkthroughs .walkthrough .heading {
|
697 |
margin-bottom: 10px;
|
@@ -713,13 +975,9 @@ div#sidekick #sk_drawer ul.sk_bucketContainer .walkthroughs .walkthrough a li {
|
|
713 |
-o-transition: all 0.3s ease-out;
|
714 |
transition: all 0.3s ease-out;
|
715 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
716 |
-
|
717 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
718 |
-
|
719 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
720 |
-
|
721 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
722 |
-
|
723 |
}
|
724 |
div#sidekick #sk_drawer ul.sk_bucketContainer .walkthroughs .walkthrough a:hover li {
|
725 |
color: #17909B;
|
@@ -730,17 +988,11 @@ div#sidekick #sk_drawer ul.sk_bucketContainer .walkthroughs .walkthrough a:hover
|
|
730 |
-o-transition: all 0.3s ease-out;
|
731 |
transition: all 0.3s ease-out;
|
732 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
733 |
-
|
734 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
735 |
-
|
736 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
737 |
-
|
738 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
739 |
-
|
740 |
}
|
741 |
div#sidekick #sk_drawer ul.sk_bucketContainer .walkthroughs .walkthrough.show {
|
742 |
-
/*display: block;*/
|
743 |
-
|
744 |
left: 0px;
|
745 |
transform: translate3d(0, 0, 0);
|
746 |
-webkit-transition: all 0.3s ease-out;
|
@@ -748,13 +1000,13 @@ div#sidekick #sk_drawer ul.sk_bucketContainer .walkthroughs .walkthrough.show {
|
|
748 |
-o-transition: all 0.3s ease-out;
|
749 |
transition: all 0.3s ease-out;
|
750 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
751 |
-
|
752 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
753 |
-
|
754 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
755 |
-
|
756 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
757 |
-
|
|
|
|
|
|
|
758 |
}
|
759 |
div#sidekick #sk_drawer ul.sk_bucketContainer li {
|
760 |
width: 300px;
|
@@ -793,7 +1045,7 @@ div#sidekick #sk_drawer ul.sk_bucketContainer li.heading i {
|
|
793 |
width: 20px;
|
794 |
height: 20px;
|
795 |
position: absolute;
|
796 |
-
right:
|
797 |
top: 17px;
|
798 |
background: url('../images/sprides_v11.png') -7px -80px no-repeat;
|
799 |
}
|
1 |
+
@media screen and (max-width: 782px) {
|
2 |
+
body div#sidekick,
|
3 |
+
body div#sidekick.sidekick_player {
|
4 |
+
display: none;
|
5 |
+
}
|
6 |
+
}
|
7 |
@-moz-keyframes pulse {
|
8 |
0% {
|
9 |
opacity: 0;
|
42 |
opacity: 0.0;
|
43 |
margin-left: -20px;
|
44 |
margin-top: -10px;
|
45 |
+
z-index: 1000000;
|
|
|
46 |
}
|
47 |
div.sk_hotspot.visible {
|
48 |
opacity: 0.8;
|
49 |
+
-webkit-animation: sk_player_cssAnimation 0.3s 1 ease;
|
50 |
+
-moz-animation: sk_player_cssAnimation 0.3s 1 ease;
|
51 |
+
-o-animation: sk_player_cssAnimation 0.3s 1 ease;
|
52 |
}
|
53 |
+
@-webkit-keyframes sk_player_cssAnimation {
|
54 |
from {
|
55 |
-webkit-transform: rotate(49deg) scale(0.5) translate(20px);
|
56 |
}
|
58 |
-webkit-transform: rotate(0deg) scale(3);
|
59 |
}
|
60 |
}
|
61 |
+
@-moz-keyframes sk_player_cssAnimation {
|
62 |
from {
|
63 |
-moz-transform: rotate(49deg) scale(0.5) translate(20px);
|
64 |
}
|
66 |
-moz-transform: rotate(0deg) scale(3);
|
67 |
}
|
68 |
}
|
69 |
+
@-o-keyframes sk_player_cssAnimation {
|
70 |
from {
|
71 |
-o-transform: rotate(49deg) scale(0.5) translate(20px);
|
72 |
}
|
81 |
-o-transition: all 0.1s ease-in-out;
|
82 |
transition: all 0.1s ease-in-out;
|
83 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
|
|
84 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
|
|
85 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
|
|
86 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
|
|
87 |
opacity: 1;
|
88 |
transform: scale(1.2, 1.2);
|
89 |
-ms-transform: scale(1.2, 1.2);
|
92 |
-moz-transform: scale(1.2, 1.2);
|
93 |
}
|
94 |
body.branch-3-8 div#sidekick {
|
95 |
+
width: 160px;
|
96 |
}
|
97 |
body.branch-3-8 div#sidekick.open {
|
98 |
width: 100%;
|
99 |
}
|
100 |
body.branch-3-8 div#sidekick.open div#sk_taskbar div#logo {
|
101 |
+
width: 134px;
|
102 |
}
|
103 |
body.branch-3-8 div#sidekick.playing {
|
104 |
width: 100%;
|
105 |
}
|
106 |
body.branch-3-8 div#sidekick.playing div#sk_taskbar div#logo {
|
107 |
+
width: 134px;
|
108 |
}
|
109 |
+
body.wp-customizer #sk_drawer,
|
110 |
+
body.full-overlay-active #sk_drawer {
|
111 |
+
display: none;
|
112 |
+
}
|
113 |
+
body.wp-customizer div#sidekick.sidekick_player,
|
114 |
+
body.full-overlay-active div#sidekick.sidekick_player {
|
115 |
+
display: none;
|
116 |
+
}
|
117 |
+
body.wp-customizer div#sidekick.playing.sidekick_player,
|
118 |
+
body.full-overlay-active div#sidekick.playing.sidekick_player {
|
119 |
+
display: block;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
}
|
121 |
div#sidekick {
|
122 |
position: fixed;
|
123 |
bottom: 0px;
|
124 |
left: 0px;
|
125 |
height: 40px;
|
126 |
+
width: 160px;
|
127 |
/*overflow: hidden;*/
|
128 |
+
z-index: 10000003;
|
|
|
129 |
/*.animate_reg;*/
|
|
|
130 |
}
|
131 |
div#sidekick.sidekick_player {
|
132 |
left: 0px;
|
151 |
div#sidekick.open div#sk_taskbar div.sk_toggles {
|
152 |
display: block;
|
153 |
}
|
154 |
+
div#sidekick.drawer_open #sk_drawer ul.sk_bucketContainer ul#sk_upgrade {
|
155 |
+
-webkit-transition: all 0.5s ease-out;
|
156 |
+
-moz-transition: all 0.5s ease-out;
|
157 |
+
-o-transition: all 0.5s ease-out;
|
158 |
+
transition: all 0.5s ease-out;
|
159 |
+
bottom: 39px;
|
160 |
+
}
|
161 |
+
div#sidekick.drawer_closed #sk_drawer ul.sk_bucketContainer ul#sk_upgrade {
|
162 |
+
-webkit-transition: all 0.5s ease-out;
|
163 |
+
-moz-transition: all 0.5s ease-out;
|
164 |
+
-o-transition: all 0.5s ease-out;
|
165 |
+
transition: all 0.5s ease-out;
|
166 |
+
bottom: -200px;
|
167 |
+
}
|
168 |
div#sidekick.playing {
|
169 |
width: 100%;
|
170 |
}
|
184 |
div#sidekick.playing div#sk_taskbar div.sk_info div.sk_time,
|
185 |
div#sidekick.playing div#sk_taskbar div.sk_info div.sk_title {
|
186 |
opacity: 1;
|
187 |
+
display: block;
|
188 |
}
|
189 |
div#sidekick.playing div#sk_taskbar button.sk_toggle {
|
190 |
background: url('../images/sprides_v11.png') -6px -394px;
|
198 |
-o-transition: all 0.3s ease-out;
|
199 |
transition: all 0.3s ease-out;
|
200 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
|
|
201 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
|
|
202 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
|
|
203 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
|
|
204 |
}
|
205 |
div#sidekick.playing div#sk_taskbar div.sk_toggles #toggle_drawer {
|
206 |
display: none;
|
217 |
position: relative;
|
218 |
background: #ff712b;
|
219 |
/* Old browsers */
|
|
|
220 |
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
|
|
|
221 |
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmNzEyYiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNlZDVmMTkiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
|
222 |
background: -moz-linear-gradient(top, #ff712b 0%, #ed5f19 100%);
|
223 |
/* FF3.6+ */
|
|
|
224 |
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ff712b), color-stop(100%, #ed5f19));
|
225 |
/* Chrome,Safari4+ */
|
|
|
226 |
background: -webkit-linear-gradient(top, #ff712b 0%, #ed5f19 100%);
|
227 |
/* Chrome10+,Safari5.1+ */
|
|
|
228 |
background: -o-linear-gradient(top, #ff712b 0%, #ed5f19 100%);
|
229 |
/* Opera 11.10+ */
|
|
|
230 |
background: -ms-linear-gradient(top, #ff712b 0%, #ed5f19 100%);
|
231 |
/* IE10+ */
|
|
|
232 |
background: linear-gradient(to bottom, #ff712b 0%, #ed5f19 100%);
|
233 |
/* W3C */
|
|
|
234 |
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff712b', endColorstr='#ed5f19', GradientType=0);
|
235 |
/* IE6-8 */
|
|
|
236 |
}
|
237 |
div#sidekick div#sk_taskbar button {
|
238 |
border: none;
|
243 |
div#sidekick div#sk_taskbar div#logo {
|
244 |
float: left;
|
245 |
height: 100%;
|
246 |
+
width: 125px;
|
247 |
/*width: 124px; wp 3.8+ */
|
248 |
+
background: url('../images/sprides_v11.png') 5px 0px no-repeat;
|
|
|
249 |
cursor: pointer;
|
250 |
}
|
251 |
div#sidekick div#sk_taskbar button.sk_toggle {
|
252 |
float: left;
|
253 |
height: 100%;
|
254 |
+
width: 32px;
|
255 |
+
margin-left: 3px;
|
256 |
background: url('../images/sprides_v11.png') 0px -358px;
|
257 |
border: none;
|
258 |
}
|
259 |
+
div#sidekick div#sk_taskbar div.sk_debug {
|
260 |
+
display: block;
|
261 |
+
float: right;
|
262 |
+
height: 100%;
|
263 |
+
display: none;
|
264 |
+
}
|
265 |
+
div#sidekick div#sk_taskbar div.sk_debug div.step_count {
|
266 |
+
padding: 11px;
|
267 |
+
}
|
268 |
+
div#sidekick div#sk_taskbar div.sk_debug input {
|
269 |
+
margin: 7px;
|
270 |
+
width: 86px;
|
271 |
+
float: left;
|
272 |
+
}
|
273 |
+
div#sidekick div#sk_taskbar div.sk_debug div {
|
274 |
+
float: left;
|
275 |
+
color: white;
|
276 |
+
padding: 0px;
|
277 |
+
}
|
278 |
div#sidekick div#sk_taskbar div.sk_info {
|
279 |
display: none;
|
280 |
+
float: left;
|
281 |
height: 100%;
|
282 |
}
|
283 |
div#sidekick div#sk_taskbar div.sk_info .sk_time {
|
286 |
font-size: 16px;
|
287 |
color: white;
|
288 |
margin: 13px 30px;
|
289 |
+
/*opacity: 0.3;*/
|
290 |
+
display: none;
|
291 |
}
|
292 |
div#sidekick div#sk_taskbar div.sk_info .sk_title {
|
293 |
+
border-right: solid 1px white;
|
294 |
float: left;
|
295 |
height: 100%;
|
296 |
font-size: 16px;
|
297 |
color: white;
|
|
|
298 |
opacity: 0.3;
|
299 |
+
display: none;
|
300 |
}
|
301 |
div#sidekick div#sk_taskbar div.sk_info .sk_title label {
|
302 |
font-size: 10px;
|
312 |
border-right: solid 1px white;
|
313 |
border-left: solid 1px white;
|
314 |
display: none;
|
315 |
+
position: relative;
|
316 |
+
width: 210px;
|
317 |
background: #fb985f;
|
318 |
/* Old browsers */
|
|
|
319 |
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
|
|
|
320 |
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZiOTg1ZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNlZDZjMjAiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
|
321 |
background: -moz-linear-gradient(top, #fb985f 0%, #ed6c20 100%);
|
322 |
/* FF3.6+ */
|
|
|
323 |
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fb985f), color-stop(100%, #ed6c20));
|
324 |
/* Chrome,Safari4+ */
|
|
|
325 |
background: -webkit-linear-gradient(top, #fb985f 0%, #ed6c20 100%);
|
326 |
/* Chrome10+,Safari5.1+ */
|
|
|
327 |
background: -o-linear-gradient(top, #fb985f 0%, #ed6c20 100%);
|
328 |
/* Opera 11.10+ */
|
|
|
329 |
background: -ms-linear-gradient(top, #fb985f 0%, #ed6c20 100%);
|
330 |
/* IE10+ */
|
|
|
331 |
background: linear-gradient(to bottom, #fb985f 0%, #ed6c20 100%);
|
332 |
/* W3C */
|
|
|
333 |
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fb985f', endColorstr='#ed6c20', GradientType=0);
|
334 |
/* IE6-8 */
|
|
|
335 |
}
|
336 |
div#sidekick div#sk_taskbar div.sk_controls button {
|
337 |
width: 70px;
|
338 |
opacity: 0.3;
|
339 |
+
position: absolute;
|
340 |
+
top: 0px;
|
341 |
}
|
342 |
div#sidekick div#sk_taskbar div.sk_controls button.sidekick_restart {
|
343 |
+
left: 0px;
|
344 |
background: url('../images/sprides_v11.png') 17px -140px;
|
345 |
}
|
346 |
div#sidekick div#sk_taskbar div.sk_controls button.sidekick_restart:hover {
|
348 |
}
|
349 |
div#sidekick div#sk_taskbar div.sk_controls button.sidekick_play_pause {
|
350 |
background: url('../images/sprides_v11.png') 17px -178px;
|
351 |
+
left: 70px;
|
352 |
+
border-right: solid 1px white;
|
353 |
+
border-left: solid 1px white;
|
354 |
}
|
355 |
div#sidekick div#sk_taskbar div.sk_controls button.sidekick_play_pause.playing {
|
356 |
background: url('../images/sprides_v11.png') 17px -718px;
|
|
|
|
|
|
|
|
|
357 |
}
|
358 |
div#sidekick div#sk_taskbar div.sk_controls button.sidekick_play_pause:hover {
|
359 |
background: #d9763b url('../images/sprides_v11.png') 17px -178px;
|
360 |
}
|
361 |
div#sidekick div#sk_taskbar div.sk_controls button.sidekick_stop {
|
362 |
background: url('../images/sprides_v11.png') 17px -210px;
|
363 |
+
left: 140px;
|
364 |
}
|
365 |
div#sidekick div#sk_taskbar div.sk_controls button.sidekick_stop:hover {
|
366 |
background: #d9763b url('../images/sprides_v11.png') 17px -210px;
|
367 |
}
|
368 |
+
div#sidekick div#sk_taskbar div.sk_caption {
|
369 |
+
position: absolute;
|
370 |
+
width: 100%;
|
371 |
+
left: 0px;
|
372 |
+
bottom: -100px;
|
373 |
+
transform: translate3d(0, 0, 0);
|
374 |
+
-webkit-transition: all 0.3s ease-out;
|
375 |
+
-moz-transition: all 0.3s ease-out;
|
376 |
+
-o-transition: all 0.3s ease-out;
|
377 |
+
transition: all 0.3s ease-out;
|
378 |
+
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
379 |
+
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
380 |
+
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
381 |
+
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
382 |
+
}
|
383 |
+
div#sidekick div#sk_taskbar div.sk_caption.show {
|
384 |
+
bottom: 40px;
|
385 |
+
}
|
386 |
+
div#sidekick div#sk_taskbar div.sk_caption .text {
|
387 |
+
background: #582c16;
|
388 |
+
/* Old browsers */
|
389 |
+
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
|
390 |
+
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzU4MmMxNiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiM0NzI2MTIiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
|
391 |
+
background: -moz-linear-gradient(top, #582c16 0%, #472612 100%);
|
392 |
+
/* FF3.6+ */
|
393 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #582c16), color-stop(100%, #472612));
|
394 |
+
/* Chrome,Safari4+ */
|
395 |
+
background: -webkit-linear-gradient(top, #582c16 0%, #472612 100%);
|
396 |
+
/* Chrome10+,Safari5.1+ */
|
397 |
+
background: -o-linear-gradient(top, #582c16 0%, #472612 100%);
|
398 |
+
/* Opera 11.10+ */
|
399 |
+
background: -ms-linear-gradient(top, #582c16 0%, #472612 100%);
|
400 |
+
/* IE10+ */
|
401 |
+
background: linear-gradient(to bottom, #582c16 0%, #472612 100%);
|
402 |
+
/* W3C */
|
403 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#582c16', endColorstr='#472612', GradientType=0);
|
404 |
+
/* IE6-8 */
|
405 |
+
text-align: center;
|
406 |
+
color: white;
|
407 |
+
width: 60%;
|
408 |
+
margin: 0 auto;
|
409 |
+
padding: 10px 10px;
|
410 |
+
font-size: 20px;
|
411 |
+
line-height: 26px;
|
412 |
+
-webkit-border-top-left-radius: 10px;
|
413 |
+
-moz-border-top-left-radius: 10px;
|
414 |
+
-ms-border-top-left-radius: 10px;
|
415 |
+
-o-border-top-left-radius: 10px;
|
416 |
+
border-top-left-radius: 10px;
|
417 |
+
-webkit-border-top-right-radius: 10px;
|
418 |
+
-moz-border-top-right-radius: 10px;
|
419 |
+
-ms-border-top-right-radius: 10px;
|
420 |
+
-o-border-top-right-radius: 10px;
|
421 |
+
border-top-right-radius: 10px;
|
422 |
+
}
|
423 |
+
div#sidekick div#sk_taskbar div.sk_caption .text b {
|
424 |
+
color: yellow;
|
425 |
+
}
|
426 |
div#sidekick div#sk_taskbar div.sk_toggle {
|
427 |
float: left;
|
428 |
height: 100%;
|
436 |
-o-transition: all 0.3s ease-out;
|
437 |
transition: all 0.3s ease-out;
|
438 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
|
|
439 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
|
|
440 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
|
|
441 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
|
|
442 |
margin-top: 0px;
|
443 |
+
/*display: none;*/
|
444 |
float: right;
|
445 |
height: 100%;
|
446 |
}
|
447 |
div#sidekick div#sk_taskbar div.sk_toggles button {
|
448 |
+
height: 40px;
|
449 |
width: 70px;
|
450 |
+
display: block;
|
451 |
+
float: left;
|
452 |
}
|
453 |
div#sidekick div#sk_taskbar div.sk_toggles button#toggle_hotspots {
|
454 |
/*display: none;*/
|
|
|
455 |
border-left: solid 1px white;
|
456 |
background: #f1631d url('../images/sprides_v11.png') 10px -248px;
|
457 |
padding-left: 24px;
|
469 |
-o-transition: all 0.3s ease-out;
|
470 |
transition: all 0.3s ease-out;
|
471 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
|
|
472 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
|
|
473 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
|
|
474 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
|
|
475 |
}
|
476 |
div#sidekick div#sk_taskbar div.sk_toggles button#toggle_feedback {
|
477 |
background: #f1631d url('../images/sprides_v11.png') 17px -287px;
|
478 |
+
/*border-right: solid 1px white;*/
|
479 |
border-left: solid 1px white;
|
480 |
width: 74px;
|
481 |
}
|
487 |
-o-transition: all 0.3s ease-out;
|
488 |
transition: all 0.3s ease-out;
|
489 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
|
|
490 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
|
|
491 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
|
|
492 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
|
|
493 |
}
|
494 |
div#sidekick div#sk_taskbar div.sk_toggles button#toggle_preferences {
|
495 |
background: #f1631d url('../images/sprides_v11.png') 17px -33px;
|
505 |
-o-transition: all 0.3s ease-out;
|
506 |
transition: all 0.3s ease-out;
|
507 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
|
|
508 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
|
|
509 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
|
|
510 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
|
|
511 |
}
|
512 |
div#sidekick div#sk_taskbar div.sk_toggles button#toggle_drawer {
|
513 |
background: #f1631d url('../images/sprides_v11.png') 17px -431px;
|
521 |
-o-transition: all 0.3s ease-out;
|
522 |
transition: all 0.3s ease-out;
|
523 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
|
|
524 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
|
|
525 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
|
|
526 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
|
|
527 |
}
|
528 |
div#sidekick div#sk_taskbar div.sk_toggles button#toggle_drawer.on {
|
529 |
background-color: #FA8C00;
|
567 |
}
|
568 |
div#sidekick #sk_drawer div.warning {
|
569 |
background-color: white;
|
|
|
570 |
text-align: center;
|
571 |
font-weight: bold;
|
572 |
font-size: 24px;
|
573 |
+
line-height: 34px;
|
574 |
+
}
|
575 |
+
div#sidekick #sk_drawer div.warning div.padder {
|
576 |
+
padding: 20px 10px 100px;
|
577 |
+
}
|
578 |
+
div#sidekick #sk_drawer input.error {
|
579 |
+
border: solid 2px red;
|
580 |
+
background-color: #fae3de;
|
581 |
}
|
582 |
div#sidekick #sk_drawer ul.sk_bucketContainer {
|
583 |
position: relative;
|
587 |
div#sidekick #sk_drawer ul.sk_bucketContainer .heading.goprev {
|
588 |
background-color: white;
|
589 |
}
|
590 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer .heading.goprev span {
|
591 |
+
padding: 0px;
|
592 |
+
}
|
593 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer .heading.goprev i {
|
594 |
+
left: 6px;
|
595 |
+
}
|
596 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul li {
|
597 |
+
padding: 0px;
|
598 |
+
}
|
599 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul#sk_upgrade {
|
600 |
+
bottom: -1000px;
|
601 |
+
position: fixed;
|
602 |
+
text-align: center;
|
603 |
+
-webkit-transition: all 0.5s ease-out;
|
604 |
+
-moz-transition: all 0.5s ease-out;
|
605 |
+
-o-transition: all 0.5s ease-out;
|
606 |
+
transition: all 0.5s ease-out;
|
607 |
+
}
|
608 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul#sk_upgrade li {
|
609 |
+
background-color: #dddddd;
|
610 |
+
border-bottom: solid 1px #cbcbcb;
|
611 |
+
border-top: solid 1px #fff;
|
612 |
+
color: #353939;
|
613 |
+
overflow: hidden;
|
614 |
+
color: black;
|
615 |
+
background: #F3F3F3;
|
616 |
+
max-height: none;
|
617 |
+
}
|
618 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul#sk_upgrade li button {
|
619 |
+
margin: 20px;
|
620 |
+
}
|
621 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer input[type="button"],
|
622 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer input[type="submit"],
|
623 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer button {
|
624 |
+
border: none;
|
625 |
+
padding: 10px;
|
626 |
+
margin-left: 5px;
|
627 |
+
color: white;
|
628 |
+
font-size: 16px;
|
629 |
+
border: solid 2px white;
|
630 |
+
border-radius: 5px;
|
631 |
+
background-color: #fa6c26;
|
632 |
+
cursor: pointer;
|
633 |
+
}
|
634 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer input[type="button"]:hover,
|
635 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer input[type="submit"]:hover,
|
636 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer button:hover {
|
637 |
+
background-color: #fb7d3f;
|
638 |
+
}
|
639 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.login {
|
640 |
position: absolute;
|
641 |
+
left: 0px;
|
642 |
transform: translate3d(0, 0, 0);
|
643 |
-webkit-transition: all 0.3s ease-out;
|
644 |
-moz-transition: all 0.3s ease-out;
|
645 |
-o-transition: all 0.3s ease-out;
|
646 |
transition: all 0.3s ease-out;
|
647 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
|
|
648 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
|
|
649 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
|
|
650 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
|
|
651 |
}
|
652 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.login.hide {
|
653 |
+
position: absolute;
|
654 |
+
left: 300px;
|
655 |
+
transform: translate3d(0, 0, 0);
|
656 |
+
-webkit-transition: all 0.3s ease-out;
|
657 |
+
-moz-transition: all 0.3s ease-out;
|
658 |
+
-o-transition: all 0.3s ease-out;
|
659 |
+
transition: all 0.3s ease-out;
|
660 |
+
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
661 |
+
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
662 |
+
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
663 |
+
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
664 |
+
}
|
665 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.login li.heading {
|
666 |
+
margin: 0;
|
667 |
+
}
|
668 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.login a {
|
669 |
+
font-size: 14px;
|
670 |
+
}
|
671 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.activate div#advanced {
|
672 |
+
display: none ;
|
673 |
+
}
|
674 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.activate li.heading {
|
675 |
+
margin: 0;
|
676 |
+
}
|
677 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.activate li {
|
678 |
+
cursor: default;
|
679 |
+
}
|
680 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.activate ul#progress {
|
681 |
+
list-style: none;
|
682 |
+
width: 125px;
|
683 |
+
margin: 0 auto;
|
684 |
+
padding-top: 50px;
|
685 |
+
padding-bottom: 50px;
|
686 |
+
}
|
687 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.activate div#content {
|
688 |
+
font-weight: 400;
|
689 |
+
background: #fff;
|
690 |
+
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.13);
|
691 |
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.13);
|
692 |
+
padding-bottom: 10px;
|
693 |
+
margin: 0px;
|
694 |
+
width: 100%;
|
695 |
+
background: -webkit-radial-gradient(center, ellipse cover, #1c848f 0%, #156d79 100%);
|
696 |
+
background: -o-radial-gradient(center, ellipse cover, #1c848f 0%, #156d79 100%);
|
697 |
+
background: -ms-radial-gradient(center, ellipse cover, #1c848f 0%, #156d79 100%);
|
698 |
+
background: radial-gradient(ellipse at center, #1c848f 0%, #156d79 100%);
|
699 |
+
}
|
700 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.activate div#content div#buttons {
|
701 |
+
clear: both;
|
702 |
+
/*margin: 10px 0;*/
|
703 |
+
height: 40px;
|
704 |
+
}
|
705 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.activate div#content div#buttons input[type="button"],
|
706 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.activate div#content div#buttons input[type="submit"],
|
707 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.activate div#content div#buttons button {
|
708 |
+
float: right;
|
709 |
+
}
|
710 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.activate div#content input[name="activation_id"] {
|
711 |
+
font-size: 15px;
|
712 |
+
text-align: center;
|
713 |
+
padding-top: 6px;
|
714 |
+
}
|
715 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.activate div#content .padder {
|
716 |
+
padding: 10px;
|
717 |
+
text-align: center;
|
718 |
+
}
|
719 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.activate div#content .padder h3 {
|
720 |
+
margin: 10px 0px 20px 0;
|
721 |
+
color: white;
|
722 |
+
line-height: 26px;
|
723 |
+
text-transform: uppercase;
|
724 |
+
text-shadow: 2px 2px #000;
|
725 |
+
}
|
726 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.activate div#content .padder button {
|
727 |
+
font-weight: bold;
|
728 |
+
font-size: 32px;
|
729 |
+
background-color: #E84B17;
|
730 |
+
padding: 5px 60px;
|
731 |
+
margin-bottom: 20px;
|
732 |
+
cursor: pointer;
|
733 |
+
}
|
734 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.activate div#content .padder button span {
|
735 |
+
font-weight: normal;
|
736 |
+
font-size: 16px;
|
737 |
+
margin: 0px;
|
738 |
+
padding: 0px;
|
739 |
+
}
|
740 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.activate div#content .padder button:hover {
|
741 |
+
background-color: #fa5119;
|
742 |
+
}
|
743 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.activate div#content .padder label {
|
744 |
+
color: white;
|
745 |
+
font-size: 20px;
|
746 |
+
margin-bottom: 6px;
|
747 |
+
display: block;
|
748 |
+
text-shadow: 2px 2px #000;
|
749 |
}
|
750 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.activate div#content .padder input {
|
751 |
+
border-radius: 5px;
|
752 |
+
}
|
753 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.activate div#content #benefits h3 {
|
754 |
+
background-color: #EBEBEB;
|
755 |
+
color: #535a5a;
|
756 |
+
text-transform: uppercase;
|
757 |
+
padding: 10px;
|
758 |
+
font-weight: normal;
|
759 |
+
margin-bottom: 0px;
|
760 |
+
}
|
761 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.activate div#content #benefits ul {
|
762 |
+
background-color: #F6F6F6;
|
763 |
+
}
|
764 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.activate div#content #benefits ul li {
|
765 |
+
padding-top: 10px;
|
766 |
+
padding-left: 70px;
|
767 |
+
color: #535a5a;
|
768 |
+
min-height: 70px;
|
769 |
+
width: 224px;
|
770 |
+
}
|
771 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.activate div#content #benefits ul li h4 {
|
772 |
+
color: black;
|
773 |
+
margin: 0px;
|
774 |
+
margin-bottom: 5px;
|
775 |
+
}
|
776 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.activate div#content #benefits ul li p {
|
777 |
+
padding: 0px;
|
778 |
+
margin: 0px;
|
779 |
+
}
|
780 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.activate div#content #benefits ul li#more {
|
781 |
+
background: #f6f6f6 url('../images/sprides_v11.png') -294px -107px;
|
782 |
+
}
|
783 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.activate div#content #benefits ul li#types {
|
784 |
+
background: #f6f6f6 url('../images/sprides_v11.png') -294px -177px;
|
785 |
+
}
|
786 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer input[type='text'],
|
787 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer input[type='password'] {
|
788 |
+
font-size: 24px;
|
789 |
+
line-height: 1;
|
790 |
+
width: 100%;
|
791 |
+
padding: 3px;
|
792 |
+
margin: 2px 6px 16px 0;
|
793 |
+
}
|
794 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer label {
|
795 |
+
color: #777;
|
796 |
+
font-size: 14px;
|
797 |
+
vertical-align: middle;
|
798 |
+
font-weight: 400;
|
799 |
+
}
|
800 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer div > ul.hide {
|
801 |
+
position: absolute;
|
802 |
left: -300px;
|
803 |
transform: translate3d(0, 0, 0);
|
804 |
-webkit-transition: all 0.3s ease-out;
|
806 |
-o-transition: all 0.3s ease-out;
|
807 |
transition: all 0.3s ease-out;
|
808 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
|
|
809 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
|
|
810 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
|
|
811 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
812 |
+
}
|
813 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer .buckets {
|
814 |
+
position: absolute;
|
815 |
+
left: 0px;
|
816 |
+
transform: translate3d(0, 0, 0);
|
817 |
+
-webkit-transition: all 0.3s ease-out;
|
818 |
+
-moz-transition: all 0.3s ease-out;
|
819 |
+
-o-transition: all 0.3s ease-out;
|
820 |
+
transition: all 0.3s ease-out;
|
821 |
+
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
822 |
+
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
823 |
+
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
824 |
+
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
825 |
+
}
|
826 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer .buckets a {
|
827 |
+
text-decoration: none;
|
828 |
}
|
829 |
div#sidekick #sk_drawer ul.sk_bucketContainer .buckets .bucket_heading i {
|
830 |
-webkit-transform: rotate(90deg);
|
833 |
-o-transform: rotate(90deg);
|
834 |
transform: rotate(90deg);
|
835 |
}
|
836 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer ul.sub_bucket_inner {
|
837 |
+
height: 100px;
|
838 |
+
overflow-y: auto;
|
839 |
+
overflow-x: hidden;
|
840 |
+
position: relative;
|
841 |
+
}
|
842 |
div#sidekick #sk_drawer ul.sk_bucketContainer .sub_bucket {
|
843 |
/*display: none;*/
|
|
|
844 |
left: 300px;
|
845 |
position: absolute;
|
846 |
top: 0px;
|
852 |
-o-transition: all 0.3s ease-out;
|
853 |
transition: all 0.3s ease-out;
|
854 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
|
|
855 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
|
|
856 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
|
|
857 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
|
|
858 |
}
|
859 |
div#sidekick #sk_drawer ul.sk_bucketContainer .sub_bucket.show {
|
860 |
/*display: block;*/
|
|
|
861 |
left: 0px;
|
862 |
transform: translate3d(0, 0, 0);
|
863 |
-webkit-transition: all 0.3s ease-out;
|
865 |
-o-transition: all 0.3s ease-out;
|
866 |
transition: all 0.3s ease-out;
|
867 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
|
|
868 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
|
|
869 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
|
|
870 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
|
|
871 |
}
|
872 |
div#sidekick #sk_drawer ul.sk_bucketContainer .sub_bucket.hide {
|
873 |
left: -300px;
|
877 |
-o-transition: all 0.3s ease-out;
|
878 |
transition: all 0.3s ease-out;
|
879 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
|
|
880 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
|
|
881 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
|
|
882 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
|
|
883 |
}
|
884 |
div#sidekick #sk_drawer ul.sk_bucketContainer .sub_bucket li.heading {
|
885 |
text-align: center;
|
895 |
transform: rotate(90deg);
|
896 |
}
|
897 |
div#sidekick #sk_drawer ul.sk_bucketContainer .walkthroughs {
|
|
|
|
|
|
|
|
|
898 |
transform: translate3d(0, 0, 0);
|
899 |
-webkit-transition: all 0.3s ease-out;
|
900 |
-moz-transition: all 0.3s ease-out;
|
901 |
-o-transition: all 0.3s ease-out;
|
902 |
transition: all 0.3s ease-out;
|
903 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
|
|
904 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
|
|
905 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
|
|
906 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
907 |
+
}
|
908 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer .walkthroughs li.sub_heading {
|
909 |
+
border-bottom: solid 1px #17909b;
|
910 |
+
margin-bottom: 10px;
|
911 |
+
}
|
912 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer .walkthroughs li.sub_heading span {
|
913 |
+
display: inline;
|
914 |
+
font-size: 12px;
|
915 |
+
color: white;
|
916 |
+
background-color: #17909b;
|
917 |
+
text-align: center;
|
918 |
+
margin-left: 10px;
|
919 |
+
top: 1px;
|
920 |
+
position: relative;
|
921 |
+
padding: 1px 4px;
|
922 |
+
text-transform: uppercase;
|
923 |
+
height: 20px;
|
924 |
}
|
925 |
div#sidekick #sk_drawer ul.sk_bucketContainer .walkthroughs .overview {
|
926 |
+
/*font-weight: bold;*/
|
927 |
+
/*position: relative;*/
|
928 |
+
/*span.{
|
929 |
+
display: inline;
|
930 |
+
font-size: 10px;
|
931 |
+
color: white;
|
932 |
+
background-color: @brand_blue;
|
933 |
+
text-align: center;
|
934 |
+
margin-right: 5px;
|
935 |
+
top: -1px;
|
936 |
+
position: relative;
|
937 |
+
padding: 1px 2px;
|
938 |
+
text-transform: uppercase;
|
939 |
+
height: 20px;
|
940 |
+
.rounded-corners(5px);
|
941 |
+
}*/
|
942 |
}
|
943 |
div#sidekick #sk_drawer ul.sk_bucketContainer .walkthroughs .walkthrough {
|
|
|
|
|
944 |
left: 300px;
|
945 |
position: absolute;
|
946 |
top: 0px;
|
951 |
-o-transition: all 0.3s ease-out;
|
952 |
transition: all 0.3s ease-out;
|
953 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
|
|
954 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
|
|
955 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
|
|
956 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
|
|
957 |
}
|
958 |
div#sidekick #sk_drawer ul.sk_bucketContainer .walkthroughs .walkthrough .heading {
|
959 |
margin-bottom: 10px;
|
975 |
-o-transition: all 0.3s ease-out;
|
976 |
transition: all 0.3s ease-out;
|
977 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
|
|
978 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
|
|
979 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
|
|
980 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
|
|
981 |
}
|
982 |
div#sidekick #sk_drawer ul.sk_bucketContainer .walkthroughs .walkthrough a:hover li {
|
983 |
color: #17909B;
|
988 |
-o-transition: all 0.3s ease-out;
|
989 |
transition: all 0.3s ease-out;
|
990 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
|
|
991 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
|
|
992 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
|
|
993 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
|
|
994 |
}
|
995 |
div#sidekick #sk_drawer ul.sk_bucketContainer .walkthroughs .walkthrough.show {
|
|
|
|
|
996 |
left: 0px;
|
997 |
transform: translate3d(0, 0, 0);
|
998 |
-webkit-transition: all 0.3s ease-out;
|
1000 |
-o-transition: all 0.3s ease-out;
|
1001 |
transition: all 0.3s ease-out;
|
1002 |
/*-moz-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -moz-transform 0.3s ease-out;*/
|
|
|
1003 |
/*-webkit-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -webkit-transform 0.3s ease-out;*/
|
|
|
1004 |
/*-o-transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, -o-transform 0.3s ease-out;*/
|
|
|
1005 |
/*transition: width 0.3s ease-out, max-height 0.3s ease-out, background-color 0.3s ease-out, transform 0.3s ease-out;*/
|
1006 |
+
}
|
1007 |
+
div#sidekick #sk_drawer ul.sk_bucketContainer .user .heading {
|
1008 |
+
margin-bottom: 10px;
|
1009 |
+
text-align: center;
|
1010 |
}
|
1011 |
div#sidekick #sk_drawer ul.sk_bucketContainer li {
|
1012 |
width: 300px;
|
1045 |
width: 20px;
|
1046 |
height: 20px;
|
1047 |
position: absolute;
|
1048 |
+
right: 15px;
|
1049 |
top: 17px;
|
1050 |
background: url('../images/sprides_v11.png') -7px -80px no-repeat;
|
1051 |
}
|
images/sprides_v11.png
CHANGED
Binary file
|
images/sprides_v11_retna.png
CHANGED
Binary file
|
js/sk.source.js
CHANGED
@@ -1,2811 +1,3493 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
;
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
;
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
/* 34 */ SidekickWP.Events.trigger('show_msg',{title: "No Walkthroughs", msg: "We're sorry but it looks like there are no walkthroughs compatible with your version of software."},this.model);
|
693 |
-
/* 35 */ }
|
694 |
-
/* 36 */
|
695 |
-
/* 37 */ var template = _.template( SidekickWP.Templates.App, {
|
696 |
-
/* 38 */ BucketContainer: BucketContainer,
|
697 |
-
/* 39 */ hotspots: $.cookie('sidekick_hotspots')
|
698 |
-
/* 40 */ });
|
699 |
-
/* 41 */ this.$el.append( template );
|
700 |
-
/* 42 */
|
701 |
-
/* 43 */ // this.remove_empty_buckets();
|
702 |
-
/* 44 */
|
703 |
-
/* 45 */ if (!this.model.get('show_toggle_feedback'))
|
704 |
-
/* 46 */ $('#sk_taskbar #toggle_feedback').hide();
|
705 |
-
/* 47 */
|
706 |
-
/* 48 */ SidekickWP.Events.trigger('rendered');
|
707 |
-
/* 49 */ Sidekick.Events.trigger('bind_controls');
|
708 |
-
/* 50 */
|
709 |
-
|
710 |
-
/* appView.js */
|
711 |
-
|
712 |
-
/* 51 */ // this.toggle_sidekick_window();
|
713 |
-
/* 52 */ this.show_hotspots();
|
714 |
-
/* 53 */
|
715 |
-
/* 54 */ $(window).resize(_.debounce(function(){
|
716 |
-
/* 55 */ SidekickWP.Events.trigger('resize_sidekick_drawer');
|
717 |
-
/* 56 */ },500));
|
718 |
-
/* 57 */
|
719 |
-
/* 58 */ console.groupEnd();
|
720 |
-
/* 59 */ return this;
|
721 |
-
/* 60 */ },
|
722 |
-
/* 61 */
|
723 |
-
/* 62 */ events: {
|
724 |
-
/* 63 */ "click #logo,.sk_toggle": "toggle_sidekick_window",
|
725 |
-
/* 64 */ "click #toggle_drawer": "toggle_sidekick_drawer",
|
726 |
-
/* 65 */ "click #toggle_hotspots": "toggle_hotspots",
|
727 |
-
/* 66 */ "click #toggle_preferences": "toggle_preferences",
|
728 |
-
/* 67 */ "click #toggle_feedback": "show_feedback",
|
729 |
-
/* 68 */ "click #close_sidekick": "close_sidekick_window"
|
730 |
-
/* 69 */ },
|
731 |
-
/* 70 */
|
732 |
-
/* 71 */ goto_config: function(){
|
733 |
-
/* 72 */ // console.log('goto_config');
|
734 |
-
/* 73 */ window.open('/wp-admin/admin.php?page=sidekick','_self');
|
735 |
-
/* 74 */ },
|
736 |
-
/* 75 */
|
737 |
-
/* 76 */ show_feedback: function(){
|
738 |
-
/* 77 */ console.log('show_feedback');
|
739 |
-
/* 78 */ Sidekick.Events.trigger('show_modal',{title:'Feedback',message: 'Send us some feedback!',primary_button_message: 'Send',secondary_button_message:'Cancel',email:sk_user_email});
|
740 |
-
/* 79 */ },
|
741 |
-
/* 80 */
|
742 |
-
/* 81 */ resize_sidekick_drawer: function(){
|
743 |
-
/* 82 */ console.log('resize_sidekick_drawer %o', $('#sk_drawer').height());
|
744 |
-
/* 83 */
|
745 |
-
/* 84 */ if ($('#sidekick').hasClass('open')) {
|
746 |
-
/* 85 */ if ($('#sk_drawer').height() > 0) {
|
747 |
-
/* 86 */ $('div#sidekick #toggle_drawer').addClass('on');
|
748 |
-
/* 87 */ $('#sk_drawer').css({
|
749 |
-
/* 88 */ height: $('body').height() - 80,
|
750 |
-
/* 89 */ transition: 'all 0.3s ease-in-out'
|
751 |
-
/* 90 */ });
|
752 |
-
/* 91 */ $('#sk_drawer .sk_bucketContainer').css({
|
753 |
-
/* 92 */ height: $('body').height() - 56 - 40,
|
754 |
-
/* 93 */ transition: 'all 0.3s ease-in-out'
|
755 |
-
/* 94 */ });
|
756 |
-
/* 95 */ $('#sk_drawer .sub_bucket').css({
|
757 |
-
/* 96 */ maxHeight: $('body').height() - 137,
|
758 |
-
/* 97 */ transition: 'all 0.3s ease-in-out'
|
759 |
-
/* 98 */ });
|
760 |
-
/* 99 */ }
|
761 |
-
/* 100 */ } else {
|
762 |
-
|
763 |
-
/* appView.js */
|
764 |
-
|
765 |
-
/* 101 */ $('#sk_drawer').height(0);
|
766 |
-
/* 102 */ }
|
767 |
-
/* 103 */ },
|
768 |
-
/* 104 */
|
769 |
-
/* 105 */ show_sidekick_drawer: function(){
|
770 |
-
/* 106 */ $('div#sidekick').addClass('open');
|
771 |
-
/* 107 */ if ($('#sk_drawer').height() === 0) {
|
772 |
-
/* 108 */ $('div#sidekick #toggle_drawer').addClass('on');
|
773 |
-
/* 109 */ $('#sk_drawer').css({
|
774 |
-
/* 110 */ height: $('body').height() - 80,
|
775 |
-
/* 111 */ transition: 'all 0.3s ease-in-out'
|
776 |
-
/* 112 */ });
|
777 |
-
/* 113 */ $('#sk_drawer .sk_bucketContainer').css({
|
778 |
-
/* 114 */ height: $('body').height() - 56 - 40,
|
779 |
-
/* 115 */ transition: 'all 0.3s ease-in-out'
|
780 |
-
/* 116 */ });
|
781 |
-
/* 117 */ $('#sk_drawer .sub_bucket').css({
|
782 |
-
/* 118 */ maxHeight: $('body').height() - 137,
|
783 |
-
/* 119 */ transition: 'all 0.3s ease-in-out'
|
784 |
-
/* 120 */ });
|
785 |
-
/* 121 */ }
|
786 |
-
/* 122 */ },
|
787 |
-
/* 123 */
|
788 |
-
/* 124 */ toggle_preferences: function(){
|
789 |
-
/* 125 */ window.open(sk_plugin_url,'_self');
|
790 |
-
/* 126 */ },
|
791 |
-
/* 127 */
|
792 |
-
/* 128 */ toggle_sidekick_drawer: function(force){
|
793 |
-
/* 129 */ console.log('toggle_sidekick_drawer %o | %o | %o', force,$('#sk_drawer').height(),$('#sidekick').hasClass('open'));
|
794 |
-
/* 130 */
|
795 |
-
/* 131 */ if ($('#sk_drawer').height() > 0 || force == 'hide' || !$('#sidekick').hasClass('open')) {
|
796 |
-
/* 132 */ SidekickWP.Events.trigger('close_sidekick_drawer');
|
797 |
-
/* 133 */ } else {
|
798 |
-
/* 134 */ SidekickWP.Events.trigger('open_sidekick_drawer');
|
799 |
-
/* 135 */ }
|
800 |
-
/* 136 */ },
|
801 |
-
/* 137 */
|
802 |
-
/* 138 */ close_sidekick_drawer: function(){
|
803 |
-
/* 139 */ console.log('Closing Drawer');
|
804 |
-
/* 140 */ $('div#sidekick #toggle_drawer').removeClass('on');
|
805 |
-
/* 141 */ $('#sk_drawer').css({
|
806 |
-
/* 142 */ height: 0,
|
807 |
-
/* 143 */ transition: 'height 0.3s ease-in-out'
|
808 |
-
/* 144 */ });
|
809 |
-
/* 145 */ $('#sk_drawer .sk_bucketContainer').css({
|
810 |
-
/* 146 */ height: 0,
|
811 |
-
/* 147 */ transition: 'height 0.3s ease-in-out'
|
812 |
-
/* 148 */ });
|
813 |
-
/* 149 */ },
|
814 |
-
/* 150 */
|
815 |
-
|
816 |
-
/* appView.js */
|
817 |
-
|
818 |
-
/* 151 */ open_sidekick_drawer: function(){
|
819 |
-
/* 152 */ console.log('Showing Drawer');
|
820 |
-
/* 153 */ $('div#sidekick #toggle_drawer').addClass('on');
|
821 |
-
/* 154 */ $('#sk_drawer').css({
|
822 |
-
/* 155 */ height: $('body').height() - 80,
|
823 |
-
/* 156 */ transition: 'height 0.3s ease-in-out'
|
824 |
-
/* 157 */ });
|
825 |
-
/* 158 */ $('#sk_drawer .sk_bucketContainer').css({
|
826 |
-
/* 159 */ height: $('body').height() - 56 - 40,
|
827 |
-
/* 160 */ transition: 'height 0.3s ease-in-out'
|
828 |
-
/* 161 */ });
|
829 |
-
/* 162 */ },
|
830 |
-
/* 163 */
|
831 |
-
/* 164 */ toggle_sidekick_window: function(e){
|
832 |
-
/* 165 */ console.log('toggle_sidekick_window');
|
833 |
-
/* 166 */
|
834 |
-
/* 167 */ SidekickWP.Events.trigger('track_toggle_sidekick_window');
|
835 |
-
/* 168 */
|
836 |
-
/* 169 */ if ($('div#sidekick').hasClass('open')) {
|
837 |
-
/* 170 */ console.log('Closing Sidekick Window');
|
838 |
-
/* 171 */ SidekickWP.Events.trigger('close_sidekick_drawer');
|
839 |
-
/* 172 */ $('div#sidekick').wait(500).removeClass('open');
|
840 |
-
/* 173 */ } else {
|
841 |
-
/* 174 */ console.log('Showing Sidekick Window');
|
842 |
-
/* 175 */ $('div#sidekick').addClass('open').wait(500,function(e){
|
843 |
-
/* 176 */ SidekickWP.Events.trigger('open_sidekick_drawer');
|
844 |
-
/* 177 */ });
|
845 |
-
/* 178 */ }
|
846 |
-
/* 179 */ },
|
847 |
-
/* 180 */
|
848 |
-
/* 181 */ close_sidekick_window: function(e){
|
849 |
-
/* 182 */ console.log('close_sidekick_window');
|
850 |
-
/* 183 */ if ($('div#sidekick').hasClass('open')) {
|
851 |
-
/* 184 */ SidekickWP.Events.trigger('toggle_sidekick_drawer');
|
852 |
-
/* 185 */ $('div#sidekick').wait(500).removeClass('open');
|
853 |
-
/* 186 */ }
|
854 |
-
/* 187 */ },
|
855 |
-
/* 188 */
|
856 |
-
/* 189 */ toggle_hotspots: function(){
|
857 |
-
/* 190 */ console.log('toggle_hotspots');
|
858 |
-
/* 191 */ if ($('#toggle_hotspots').hasClass('on')) {
|
859 |
-
/* 192 */ console.log('Turning off hotspots');
|
860 |
-
/* 193 */ $('#toggle_hotspots').removeClass('on');
|
861 |
-
/* 194 */ $.cookie('sidekick_hotspots', 0, { expires: 365, path: '/' });
|
862 |
-
/* 195 */ $('.sk_hotspot').parent().remove();
|
863 |
-
/* 196 */ } else {
|
864 |
-
/* 197 */ console.log('Turning on hotspots');
|
865 |
-
/* 198 */ $('#toggle_hotspots').addClass('on');
|
866 |
-
/* 199 */ $.cookie('sidekick_hotspots', 1, { expires: 365, path: '/' });
|
867 |
-
/* 200 */ this.show_hotspots();
|
868 |
-
|
869 |
-
/* appView.js */
|
870 |
-
|
871 |
-
/* 201 */ }
|
872 |
-
/* 202 */ },
|
873 |
-
/* 203 */
|
874 |
-
/* 204 */ show_hotspots: function(){
|
875 |
-
/* 205 */ var hotspots = this.model.get('library_filtered_hotspots');
|
876 |
-
/* 206 */ var url = window.location.toString();
|
877 |
-
/* 207 */ var show_hotspots = $.cookie('sidekick_hotspots');
|
878 |
-
/* 208 */ // console.log('show_hotspots %o', show_hotspots);
|
879 |
-
/* 209 */ // console.log('show_hotspots === true %o', show_hotspots === true);
|
880 |
-
/* 210 */
|
881 |
-
/* 211 */ var count = 0;
|
882 |
-
/* 212 */ for(var hotspot in hotspots){
|
883 |
-
/* 213 */ var hotspot_data = hotspots[hotspot];
|
884 |
-
/* 214 */
|
885 |
-
/* 215 */ if (url.indexOf(hotspot_data.url) > -1) {
|
886 |
-
/* 216 */ var selectors = hotspot_data.selector;
|
887 |
-
/* 217 */
|
888 |
-
/* 218 */ if ($(selectors).length == 1 && $(selectors).is(':visible')) {
|
889 |
-
/* 219 */ // console.log('hotspot selectors-1 %o', selectors);
|
890 |
-
/* 220 */ count++;
|
891 |
-
/* 221 */ } else if ($(selectors).length > 1){
|
892 |
-
/* 222 */ _.each($(selectors),function(item,key){
|
893 |
-
/* 223 */ if ($(item).length && $(item).is(':visible')) {
|
894 |
-
/* 224 */ // console.log('hotspot selectors-2 %o', item);
|
895 |
-
/* 225 */ count++;
|
896 |
-
/* 226 */ }
|
897 |
-
/* 227 */ });
|
898 |
-
/* 228 */ }
|
899 |
-
/* 229 */ }
|
900 |
-
/* 230 */ }
|
901 |
-
/* 231 */
|
902 |
-
/* 232 */ if (count > 0) {
|
903 |
-
/* 233 */ $('#sidekick #toggle_hotspots').html(count).show();
|
904 |
-
/* 234 */ } else {
|
905 |
-
/* 235 */ $('#sidekick #toggle_hotspots').html(count).hide();
|
906 |
-
/* 236 */ }
|
907 |
-
/* 237 */
|
908 |
-
/* 238 */ if (show_hotspots === '1' || typeof show_hotspots === 'undefined') { // User unspecified default is on
|
909 |
-
/* 239 */ var selector_x = 'left';
|
910 |
-
/* 240 */ var selector_y = 'top';
|
911 |
-
/* 241 */ var hotspot_x = 'right';
|
912 |
-
/* 242 */ var hotspot_y = 'top';
|
913 |
-
/* 243 */ var hotspot_y_padding = '0';
|
914 |
-
/* 244 */ var hotspot_x_padding = '0';
|
915 |
-
/* 245 */
|
916 |
-
/* 246 */
|
917 |
-
/* 247 */ for(var hotspot in hotspots){
|
918 |
-
/* 248 */ var hotspot_data = hotspots[hotspot];
|
919 |
-
/* 249 */
|
920 |
-
/* 250 */ if (url.indexOf(hotspot_data.url) > -1) {
|
921 |
-
|
922 |
-
/* appView.js */
|
923 |
-
|
924 |
-
/* 251 */ var selectors = hotspot_data.selector;
|
925 |
-
/* 252 */ if ($(selectors).length == 1) {
|
926 |
-
/* 253 */ console.log('%cAttaching Single Hotspot %o -> (%o)','color: #64c541','sk_hotspot_' + hotspot, selectors);
|
927 |
-
/* 254 */ $('body').append('<a href="javascript: sidekick.play(' + hotspot_data.id + ')"><div class="sk_hotspot sk_hotspot_' + hotspot + '" data-target="' + selectors + '"></div></a>');
|
928 |
-
/* 255 */
|
929 |
-
/* 256 */ console.log('selector_x + " " + selector_y %o', selector_x + " " + selector_y);
|
930 |
-
/* 257 */ console.log('hotspot_x + hotspot_x_padding + " " + hotspot_y + hotspot_y_padding %o', hotspot_x + hotspot_x_padding + " " + hotspot_y + hotspot_y_padding);
|
931 |
-
/* 258 */
|
932 |
-
/* 259 */
|
933 |
-
/* 260 */ $('.sk_hotspot_' + hotspot).position({
|
934 |
-
/* 261 */ at: selector_x + " " + selector_y,
|
935 |
-
/* 262 */ my: hotspot_x + hotspot_x_padding + " " + hotspot_y + hotspot_y_padding,
|
936 |
-
/* 263 */ of: $(selectors)
|
937 |
-
/* 264 */ });
|
938 |
-
/* 265 */ $('.sk_hotspot').wait(200*count).addClass('visible');
|
939 |
-
/* 266 */ } else if ($(selectors).length > 1){
|
940 |
-
/* 267 */ _.each($(selectors),function(item,key){
|
941 |
-
/* 268 */ $('body').append('<a href="javascript: sidekick.play(' + hotspot_data.id + ')"><div class="sk_hotspot sk_hotspot_' + hotspot + '_' + key + '" data-target="' + item + '"></div></a>');
|
942 |
-
/* 269 */ console.log('%cAttaching Hotspot #o %o (%o)','color: #64c541',key,'sk_hotspot_' + hotspot + '_' + key, $('.sk_hotspot_' + hotspot + '_' + key));
|
943 |
-
/* 270 */
|
944 |
-
/* 271 */ $('.sk_hotspot_' + hotspot + '_' + key).position({
|
945 |
-
/* 272 */ at: selector_x + " " + selector_y,
|
946 |
-
/* 273 */ my: hotspot_x + hotspot_x_padding + " " + hotspot_y + hotspot_y_padding,
|
947 |
-
/* 274 */ // my: hotspot_x + " " + hotspot_y,
|
948 |
-
/* 275 */ of: item
|
949 |
-
/* 276 */ });
|
950 |
-
/* 277 */ $('.sk_hotspot').wait(200*count).addClass('visible');
|
951 |
-
/* 278 */ });
|
952 |
-
/* 279 */ } else {
|
953 |
-
/* 280 */ msg = "Couldn't attach a hotspot to selector (" + selectors + ")";
|
954 |
-
/* 281 */ Sidekick.Events.trigger('track_error',{model: this, msg: msg});
|
955 |
-
/* 282 */ console.error(msg);
|
956 |
-
/* 283 */ }
|
957 |
-
/* 284 */ }
|
958 |
-
/* 285 */ }
|
959 |
-
/* 286 */
|
960 |
-
/* 287 */ };
|
961 |
-
/* 288 */
|
962 |
-
/* 289 */
|
963 |
-
/* 290 */ }
|
964 |
-
/* 291 */ });
|
965 |
-
/* 292 */
|
966 |
-
/* 293 */ }(jQuery));
|
967 |
-
/* 294 */
|
968 |
-
/* 295 */
|
969 |
-
/* 296 */
|
970 |
-
/* 297 */
|
971 |
-
|
972 |
-
;
|
973 |
-
/* bucketContainerView.js */
|
974 |
-
|
975 |
-
/* 1 */ (function($) {
|
976 |
-
/* 2 */ SidekickWP.Views.BucketContainer = Backbone.View.extend({
|
977 |
-
/* 3 */
|
978 |
-
/* 4 */ initialize: function(models,options){
|
979 |
-
/* 5 */ SidekickWP.Events.on('rendered', this.setup_events, this);
|
980 |
-
/* 6 */ return this;
|
981 |
-
/* 7 */ },
|
982 |
-
/* 8 */
|
983 |
-
/* 9 */ render: function(){
|
984 |
-
/* 10 */ console.group('%crender: render: bucketContainerView %o', 'color:#8fa2ff', this);
|
985 |
-
/* 11 */
|
986 |
-
/* 12 */ SidekickWP.Events.trigger('track_explore',{what:'Bucket - ' + this.model.get('title') });
|
987 |
-
/* 13 */
|
988 |
-
/* 14 */ this.bucket = new SidekickWP.Models.Bucket({
|
989 |
-
/* 15 */ title: this.model.get('title'),
|
990 |
-
/* 16 */ full_library: this.model.get('full_library'),
|
991 |
-
/* 17 */ library_filtered_walkthroughs: this.model.get('library_filtered_walkthroughs'),
|
992 |
-
/* 18 */ library_filtered_buckets: this.model.get('library_filtered_buckets'),
|
993 |
-
/* 19 */ library_filtered_sub_buckets: this.model.get('library_filtered_sub_buckets'),
|
994 |
-
/* 20 */ library_filtered_walkthroughs_by_bucket: this.model.get('library_filtered_walkthroughs_by_bucket'),
|
995 |
-
/* 21 */ bucket_counts: this.model.get('bucket_counts')
|
996 |
-
/* 22 */ });
|
997 |
-
/* 23 */ this.$el.append(this.bucket.view.render().el);
|
998 |
-
/* 24 */ console.groupEnd();
|
999 |
-
/* 25 */ return this;
|
1000 |
-
/* 26 */ },
|
1001 |
-
/* 27 */
|
1002 |
-
/* 28 */ clicked_bucket: function(e){
|
1003 |
-
/* 29 */ console.log('clicked_bucket',e);
|
1004 |
-
/* 30 */
|
1005 |
-
/* 31 */ var navigation_history = this.model.get('navigation_history');
|
1006 |
-
/* 32 */
|
1007 |
-
/* 33 */ if ($(e).hasClass('goprev')) {
|
1008 |
-
/* 34 */ $('.show').removeClass('show');
|
1009 |
-
/* 35 */ navigation_history.pop();
|
1010 |
-
/* 36 */ var goto_bucket = navigation_history[navigation_history.length-1];
|
1011 |
-
/* 37 */ if (goto_bucket == 'buckets') {
|
1012 |
-
/* 38 */ $('[data-bucket_id="' + goto_bucket + '"]').removeClass('hide').addClass('show');
|
1013 |
-
/* 39 */ } else {
|
1014 |
-
/* 40 */ $('ul.sub_bucket[data-bucket_id="' + goto_bucket + '"]').removeClass('hide').addClass('show');
|
1015 |
-
/* 41 */ }
|
1016 |
-
/* 42 */
|
1017 |
-
/* 43 */ } else if ($(e).data('open_bucket')){
|
1018 |
-
/* 44 */ console.log('Showing Bucket %o',$(e).data('open_bucket'));
|
1019 |
-
/* 45 */ $(e).parent().removeClass('show').addClass('hide');
|
1020 |
-
/* 46 */ $('ul.sub_bucket[data-bucket_id="' + $(e).data('open_bucket') + '"]').addClass('show');
|
1021 |
-
/* 47 */ navigation_history.push($(e).data('open_bucket'));
|
1022 |
-
/* 48 */ } else {
|
1023 |
-
/* 49 */ console.log('Showing Walkthroughs %o',$(e).data('open_walkthroughs'));
|
1024 |
-
/* 50 */ $(e).parent().removeClass('show').addClass('hide');
|
1025 |
-
|
1026 |
-
/* bucketContainerView.js */
|
1027 |
-
|
1028 |
-
/* 51 */ $('ul.walkthrough[data-bucket_id="' + $(e).data('open_walkthroughs') + '"]').addClass('show');
|
1029 |
-
/* 52 */ navigation_history.push($(e).data('open_bucket'));
|
1030 |
-
/* 53 */ }
|
1031 |
-
/* 54 */ console.log('navigation_history %o', navigation_history);
|
1032 |
-
/* 55 */ this.model.set('navigation_history',navigation_history);
|
1033 |
-
/* 56 */ },
|
1034 |
-
/* 57 */
|
1035 |
-
/* 58 */ setup_events: function(){
|
1036 |
-
/* 59 */ $('.heading').unbind('click').click({context:this},function(e){
|
1037 |
-
/* 60 */ console.log('click');
|
1038 |
-
/* 61 */ e.data.context.clicked_bucket(this);
|
1039 |
-
/* 62 */ });
|
1040 |
-
/* 63 */
|
1041 |
-
/* 64 */ $('a.sidekick_play_walkthrough').unbind('click').click({context:this},function(e){
|
1042 |
-
/* 65 */ SidekickWP.Events.trigger('close_sidekick_window');
|
1043 |
-
/* 66 */ });
|
1044 |
-
/* 67 */ // SidekickWP.Helpers.preventScrolling();
|
1045 |
-
/* 68 */ }
|
1046 |
-
/* 69 */ });
|
1047 |
-
/* 70 */
|
1048 |
-
/* 71 */ }(jQuery));
|
1049 |
-
/* 72 */
|
1050 |
-
/* 73 */
|
1051 |
-
|
1052 |
-
;
|
1053 |
-
/* bucketView.js */
|
1054 |
-
|
1055 |
-
/* 1 */ (function($) {
|
1056 |
-
/* 2 */ SidekickWP.Views.Bucket = Backbone.View.extend({
|
1057 |
-
/* 3 */
|
1058 |
-
/* 4 */ initialize: function(models,options){
|
1059 |
-
/* 5 */ return this;
|
1060 |
-
/* 6 */ },
|
1061 |
-
/* 7 */
|
1062 |
-
/* 8 */ render: function(){
|
1063 |
-
/* 9 */ console.group('%crender: render: bucketView %o', 'color:#8fa2ff', this);
|
1064 |
-
/* 10 */
|
1065 |
-
/* 11 */ SidekickWP.Events.trigger('track_explore',{what:'Bucket' });
|
1066 |
-
/* 12 */
|
1067 |
-
/* 13 */ var variables = {
|
1068 |
-
/* 14 */ full_library: this.model.get('full_library'),
|
1069 |
-
/* 15 */ library_filtered_buckets: this.model.get('library_filtered_buckets'),
|
1070 |
-
/* 16 */ library_filtered_walkthroughs: this.model.get('library_filtered_walkthroughs'),
|
1071 |
-
/* 17 */ library_filtered_sub_buckets: this.model.get('library_filtered_sub_buckets'),
|
1072 |
-
/* 18 */ library_filtered_walkthroughs_by_bucket: this.model.get('library_filtered_walkthroughs_by_bucket'),
|
1073 |
-
/* 19 */ bucket_counts: this.model.get('bucket_counts'),
|
1074 |
-
/* 20 */ sk_plugin_url: sk_plugin_url
|
1075 |
-
/* 21 */ };
|
1076 |
-
/* 22 */
|
1077 |
-
/* 23 */ console.log('variables %o', variables);
|
1078 |
-
/* 24 */
|
1079 |
-
/* 25 */ var template = _.template( SidekickWP.Templates.Bucket, variables );
|
1080 |
-
/* 26 */ this.$el.append(template);
|
1081 |
-
/* 27 */ console.groupEnd();
|
1082 |
-
/* 28 */ return this;
|
1083 |
-
/* 29 */ }
|
1084 |
-
/* 30 */ });
|
1085 |
-
/* 31 */
|
1086 |
-
/* 32 */ }(jQuery));
|
1087 |
-
|
1088 |
-
;
|
1089 |
-
/* messageView.js */
|
1090 |
-
|
1091 |
-
/* 1 */ (function($) {
|
1092 |
-
/* 2 */ SidekickWP.Views.Message = Backbone.View.extend({
|
1093 |
-
/* 3 */
|
1094 |
-
/* 4 */ initialize: function(models,options){
|
1095 |
-
/* 5 */ console.group('%crender: render: messageView %o', 'color:#8fa2ff', this);
|
1096 |
-
/* 6 */ this.render();
|
1097 |
-
/* 7 */ console.groupEnd();
|
1098 |
-
/* 8 */ return this;
|
1099 |
-
/* 9 */ },
|
1100 |
-
/* 10 */
|
1101 |
-
/* 11 */ render: function(){
|
1102 |
-
/* 12 */
|
1103 |
-
/* 13 */ var variables = {
|
1104 |
-
/* 14 */ title: this.model.get('title'),
|
1105 |
-
/* 15 */ message: this.model.get('message')
|
1106 |
-
/* 16 */ };
|
1107 |
-
/* 17 */
|
1108 |
-
/* 18 */ var template = _.template( SidekickWP.Templates.Message, variables );
|
1109 |
-
/* 19 */
|
1110 |
-
/* 20 */ this.$el.append( template );
|
1111 |
-
/* 21 */ // SidekickWP.Helpers.preventScrolling();
|
1112 |
-
/* 22 */ // SidekickWP.Events.trigger('show_next_pane');
|
1113 |
-
/* 23 */
|
1114 |
-
/* 24 */ // $('div#sidekick .prev_window').removeClass('prev_window');
|
1115 |
-
/* 25 */ // $('div#sidekick #main_menu').addClass('prev_window');
|
1116 |
-
/* 26 */ // $('div#sidekick ul.main>li').not('#main_menu,#review').remove();
|
1117 |
-
/* 27 */
|
1118 |
-
/* 28 */ return this;
|
1119 |
-
/* 29 */ }
|
1120 |
-
/* 30 */
|
1121 |
-
/* 31 */ });
|
1122 |
-
/* 32 */
|
1123 |
-
/* 33 */ }(jQuery));
|
1124 |
-
|
1125 |
-
;
|
1126 |
-
/* reviewView.js */
|
1127 |
-
|
1128 |
-
/* 1 */ (function($) {
|
1129 |
-
/* 2 */ SidekickWP.Views.Review = Backbone.View.extend({
|
1130 |
-
/* 3 */
|
1131 |
-
/* 4 */ initialize: function(models,options){
|
1132 |
-
/* 5 */ console.group('%cinitialize: Core View %o', 'color:#3b4580', arguments);
|
1133 |
-
/* 6 */ this.render();
|
1134 |
-
/* 7 */ this.setup_events();
|
1135 |
-
/* 8 */ console.groupEnd();
|
1136 |
-
/* 9 */ return this;
|
1137 |
-
/* 10 */ },
|
1138 |
-
/* 11 */
|
1139 |
-
/* 12 */ render: function(){
|
1140 |
-
/* 13 */ console.group('%crender: render: renderView %o', 'color:#8fa2ff', this);
|
1141 |
-
/* 14 */ console.log('SidekickWP.Templates.Review %o', SidekickWP.Templates.Review);
|
1142 |
-
/* 15 */
|
1143 |
-
/* 16 */ var variables = {
|
1144 |
-
/* 17 */ title: 'How did we do?'
|
1145 |
-
/* 18 */ };
|
1146 |
-
/* 19 */
|
1147 |
-
/* 20 */ var template = _.template( SidekickWP.Templates.Review, variables );
|
1148 |
-
/* 21 */ console.log('template %o', template);
|
1149 |
-
/* 22 */
|
1150 |
-
/* 23 */ this.$el.append( template );
|
1151 |
-
/* 24 */ // SidekickWP.Helpers.preventScrolling();
|
1152 |
-
/* 25 */ // SidekickWP.Events.trigger('show_next_pane');
|
1153 |
-
/* 26 */
|
1154 |
-
/* 27 */ // $('div#sidekick .prev_window').removeClass('prev_window');
|
1155 |
-
/* 28 */ // $('div#sidekick #main_menu').addClass('prev_window');
|
1156 |
-
/* 29 */ // $('div#sidekick ul.main>li').not('#main_menu,#review').remove();
|
1157 |
-
/* 30 */
|
1158 |
-
/* 31 */ return this;
|
1159 |
-
/* 32 */ },
|
1160 |
-
/* 33 */
|
1161 |
-
/* 34 */ events: {
|
1162 |
-
/* 35 */ "click input[type='submit']": "submit",
|
1163 |
-
/* 36 */ "click div.rate span": "rate"
|
1164 |
-
/* 37 */ },
|
1165 |
-
/* 38 */
|
1166 |
-
/* 39 */ setup_events: function(){
|
1167 |
-
/* 40 */ var group_id = this.model.get('id');
|
1168 |
-
/* 41 */
|
1169 |
-
/* 42 */ $('div#sidekick .review h2 button.goback, #sidekick .review input[type="button"]').unbind('click').click({context:this},function(e){
|
1170 |
-
/* 43 */ console.log('click goback/button');
|
1171 |
-
/* 44 */ SidekickWP.Events.trigger('show_main_pane');
|
1172 |
-
/* 45 */ });
|
1173 |
-
/* 46 */
|
1174 |
-
/* 47 */ $('div#sidekick .review .rate span').unbind('hover').hover(function(){
|
1175 |
-
/* 48 */ $(this).addClass('hover')
|
1176 |
-
/* 49 */ .prevAll().addClass('hover');
|
1177 |
-
/* 50 */ },function(){
|
1178 |
-
|
1179 |
-
/* reviewView.js */
|
1180 |
-
|
1181 |
-
/* 51 */ $('div#sidekick .review .rate span').removeClass('hover');
|
1182 |
-
/* 52 */ });
|
1183 |
-
/* 53 */
|
1184 |
-
/* 54 */ $('div#sidekick .review .rate span').unbind('click').click = this.rate;
|
1185 |
-
/* 55 */
|
1186 |
-
/* 56 */ $('div#sidekick .review textarea').unbind('click').click(function(){
|
1187 |
-
/* 57 */ if(!$(this).hasClass('clicked')){
|
1188 |
-
/* 58 */ $(this).addClass('clicked')
|
1189 |
-
/* 59 */ .val('');
|
1190 |
-
/* 60 */ }
|
1191 |
-
/* 61 */ });
|
1192 |
-
/* 62 */ },
|
1193 |
-
/* 63 */
|
1194 |
-
/* 64 */ submit: function(){
|
1195 |
-
/* 65 */ var data = {
|
1196 |
-
/* 66 */ walkthrough_title: this.model.get('walkthrough_title'),
|
1197 |
-
/* 67 */ value: $('div#sidekick textarea[name="comment"]').val(),
|
1198 |
-
/* 68 */ license: sk_license_key
|
1199 |
-
/* 69 */ };
|
1200 |
-
/* 70 */
|
1201 |
-
/* 71 */ $.ajax({
|
1202 |
-
/* 72 */ url: 'http://www.wpuniversity.com/wp-admin/admin-ajax.php?action=wpu_add_comment',
|
1203 |
-
/* 73 */ context: this,
|
1204 |
-
/* 74 */ data: data,
|
1205 |
-
/* 75 */ dataType: 'json'
|
1206 |
-
/* 76 */ }).done(function(data,e){
|
1207 |
-
/* 77 */ console.log('Saved Comment');
|
1208 |
-
/* 78 */ $('div#sidekick textarea').html('Thank You!');
|
1209 |
-
/* 79 */ $('div#sidekick .review input[type="submit"]').val('Sent!');
|
1210 |
-
/* 80 */ setTimeout(SidekickWP.Events.trigger('show_main_pane'),3000);
|
1211 |
-
/* 81 */ }).error(function(e){
|
1212 |
-
/* 82 */ console.error('Comment Save error (%o)',e);
|
1213 |
-
/* 83 */ });
|
1214 |
-
/* 84 */ },
|
1215 |
-
/* 85 */
|
1216 |
-
/* 86 */ rate: function(e){
|
1217 |
-
/* 87 */ var data = {
|
1218 |
-
/* 88 */ walkthrough_title: this.model.get('walkthrough_title'),
|
1219 |
-
/* 89 */ rating: $(e.currentTarget).data('val'),
|
1220 |
-
/* 90 */ license: sk_license_key
|
1221 |
-
/* 91 */ };
|
1222 |
-
/* 92 */
|
1223 |
-
/* 93 */ $(e.currentTarget).addClass('saved')
|
1224 |
-
/* 94 */ .prevAll().addClass('saved');
|
1225 |
-
/* 95 */
|
1226 |
-
/* 96 */ $('div#sidekick .rate span').unbind('mouseenter mouseleave click').css({cursor: 'default'});
|
1227 |
-
/* 97 */
|
1228 |
-
/* 98 */ $.ajax({
|
1229 |
-
/* 99 */ url: 'http://www.wpuniversity.com/wp-admin/admin-ajax.php?action=wpu_add_rating',
|
1230 |
-
/* 100 */ context: this,
|
1231 |
-
|
1232 |
-
/* reviewView.js */
|
1233 |
-
|
1234 |
-
/* 101 */ data: data,
|
1235 |
-
/* 102 */ dataType: 'json'
|
1236 |
-
/* 103 */ }).done(function(data,e){
|
1237 |
-
/* 104 */ console.log('Saved Rating');
|
1238 |
-
/* 105 */ $('div#sidekick .hover').addClass('saved');
|
1239 |
-
/* 106 */
|
1240 |
-
/* 107 */ }).error(function(e){
|
1241 |
-
/* 108 */ console.error('Rating Save error (%o)',e);
|
1242 |
-
/* 109 */ });
|
1243 |
-
/* 110 */
|
1244 |
-
/* 111 */ }
|
1245 |
-
/* 112 */
|
1246 |
-
/* 113 */ });
|
1247 |
-
/* 114 */
|
1248 |
-
/* 115 */ }(jQuery));
|
1249 |
-
|
1250 |
-
;
|
1251 |
-
/* templates.js */
|
1252 |
-
|
1253 |
-
/* 1 */ _.templateSettings.interpolate = /\{\{(.*?)\}\}/;
|
1254 |
-
/* 2 */
|
1255 |
-
/* 3 */ SidekickWP.Templates.App = [
|
1256 |
-
/* 4 */ "<div id='sidekick' class='sidekick_player'>",
|
1257 |
-
/* 5 */ "<div id='sk_taskbar'>",
|
1258 |
-
/* 6 */ "<div id='logo'></div>",
|
1259 |
-
/* 7 */ "<button class='sk_toggle'></button>",
|
1260 |
-
/* 8 */ "<div class='sk_controls'>",
|
1261 |
-
/* 9 */ "<button class='sidekick_restart'></button>",
|
1262 |
-
/* 10 */ "<button class='sidekick_play_pause'></button>",
|
1263 |
-
/* 11 */ "<button class='sidekick_stop'></button>",
|
1264 |
-
/* 12 */ "</div>",
|
1265 |
-
/* 13 */ "<div class='sk_toggles'>",
|
1266 |
-
/* 14 */ // "<% console.log('hotspots %o',hotspots);%>",
|
1267 |
-
/* 15 */ "<button id='toggle_hotspots' <% if (hotspots === '1' || typeof hotspots === 'undefined'){%>class='on'<% } %> alt='Number of hotspots'>0</button>",
|
1268 |
-
/* 16 */ "<button id='toggle_feedback'></button>",
|
1269 |
-
/* 17 */ "<button id='toggle_preferences'></button>",
|
1270 |
-
/* 18 */ "<button id='toggle_drawer'><i></i></button>",
|
1271 |
-
/* 19 */ "</div>",
|
1272 |
-
/* 20 */ "<div class='sk_info'>",
|
1273 |
-
/* 21 */ "<div class='sk_time'>0:00/0:00</div>",
|
1274 |
-
/* 22 */ "<div class='sk_title'><label>Now Playing</label><span class='sk_walkthrough_title'></span></div>",
|
1275 |
-
/* 23 */ "</div>",
|
1276 |
-
/* 24 */ "</div>",
|
1277 |
-
/* 25 */ "<div id='sk_drawer'>",
|
1278 |
-
/* 26 */ "<h2>Walkthroughs<button id='close_sidekick'></button></h2>",
|
1279 |
-
/* 27 */ "<ul class='sk_bucketContainer'>",
|
1280 |
-
/* 28 */ "<% print(BucketContainer) %>",
|
1281 |
-
/* 29 */ "</ul>",
|
1282 |
-
/* 30 */ "</div>",
|
1283 |
-
/* 31 */ "</div>"
|
1284 |
-
/* 32 */ ].join("");
|
1285 |
-
/* 33 */
|
1286 |
-
/* 34 */ SidekickWP.Templates.Bucket = [
|
1287 |
-
/* 35 */ "<ul class='buckets' data-bucket_id='buckets'>",
|
1288 |
-
/* 36 */ "<% _.each(full_library.buckets, function(bucket_data, bucket_title){ %>",
|
1289 |
-
/* 37 */ // "<% console.log('primary bucket %o(%o) %o',bucket_title,bucket_data.id,bucket_data);%>",
|
1290 |
-
/* 38 */ "<li class='heading bucket_heading' <% if (bucket_data.sub_buckets){ %> data-open_bucket='<% print(bucket_data.id) %>' <% } else { %> data-open_walkthroughs='<% print(bucket_data.id) %>' <% } %> ><span><% print(bucket_title) %></span><i></i></li>",
|
1291 |
-
/* 39 */ "<% }); %>",
|
1292 |
-
/* 40 */ "</ul>",
|
1293 |
-
/* 41 */
|
1294 |
-
/* 42 */ "<% var already_done = []; %>",
|
1295 |
-
/* 43 */
|
1296 |
-
/* 44 */ "<ul class='sub_buckets'>",
|
1297 |
-
/* 45 */ "<% _.each(full_library.buckets, function(bucket_data,bucket_title){ %>",
|
1298 |
-
/* 46 */ // "<% console.log('level-1(%s) %o %o',bucket_data.id,bucket_title,bucket_data);%>",
|
1299 |
-
/* 47 */ "<ul class='sub_bucket' data-bucket_id='<% print(bucket_data.id) %>'>",
|
1300 |
-
/* 48 */ "<% already_done[bucket_data.id] = true; %>",
|
1301 |
-
/* 49 */ "<li class='heading goprev'><span><% print(bucket_title) %></span><i></i></li>",
|
1302 |
-
/* 50 */ "<% _.each(bucket_data.sub_buckets, function(sub_bucket_data){ %>",
|
1303 |
-
|
1304 |
-
/* templates.js */
|
1305 |
-
|
1306 |
-
/* 51 */ // "<% console.log('sub-bucket(%s) %o %o',sub_bucket_data.id,full_library.all_buckets_by_id[sub_bucket_data.id],sub_bucket_data);%>",
|
1307 |
-
/* 52 */ "<li class='heading sub_bucket_heading level1a' <% if (sub_bucket_data.sub_buckets){ %> data-open_bucket='<% print(sub_bucket_data.id) %>' <% } else { %> data-open_walkthroughs='<% print(sub_bucket_data.id) %>' <% } %>><span><% print(full_library.all_buckets_by_id[sub_bucket_data.id]) %></span><i></i></li>",
|
1308 |
-
/* 53 */ "<% }); %>",
|
1309 |
-
/* 54 */ "</ul>",
|
1310 |
-
/* 55 */ "<% }); %>",
|
1311 |
-
/* 56 */
|
1312 |
-
/* 57 */ "<% _.each(full_library.buckets, function(bucket_data,bucket_title){ %>",
|
1313 |
-
/* 58 */ "<% _.each(bucket_data.sub_buckets, function(sub_bucket_data){ %>",
|
1314 |
-
/* 59 */ "<% if (sub_bucket_data.sub_buckets && !already_done[sub_bucket_data.id]) { %>",
|
1315 |
-
/* 60 */ // "<% console.log('level-2(%s) %o %o',sub_bucket_data.id,full_library.all_buckets_by_id[sub_bucket_data.id],sub_bucket_data);%>",
|
1316 |
-
/* 61 */ "<% already_done[sub_bucket_data.id] = true; %>",
|
1317 |
-
/* 62 */ "<ul class='sub_bucket sub_sub_bucket' data-bucket_id='<% print(sub_bucket_data.id) %>'>",
|
1318 |
-
/* 63 */ "<li class='heading goprev'><span><% print(full_library.all_buckets_by_id[sub_bucket_data.id]) %></span><i></i></li>",
|
1319 |
-
/* 64 */ "<% _.each(sub_bucket_data.sub_buckets, function(sub_sub_bucket_data){ %>",
|
1320 |
-
/* 65 */ // "<% console.log('sub-bucket-2(%s) %o %o',sub_sub_bucket_data.id,full_library.all_buckets_by_id[sub_sub_bucket_data.id],sub_sub_bucket_data);%>",
|
1321 |
-
/* 66 */ "<li class='heading sub_bucket_heading level1b' <% if (sub_sub_bucket_data.sub_buckets){ %> data-open_bucket='<% print(sub_sub_bucket_data.id) %>' <% } else { %> data-open_walkthroughs='<% print(sub_sub_bucket_data.id) %>' <% } %> ><span><% print(full_library.all_buckets_by_id[sub_sub_bucket_data.id]) %></span><i></i></li>",
|
1322 |
-
/* 67 */ "<% }); %>",
|
1323 |
-
/* 68 */ "</ul>",
|
1324 |
-
/* 69 */ "<% } %>",
|
1325 |
-
/* 70 */ "<% }); %>",
|
1326 |
-
/* 71 */ "<% }); %>",
|
1327 |
-
/* 72 */
|
1328 |
-
/* 73 */ "<% _.each(full_library.buckets, function(bucket_data,bucket_title){ %>",
|
1329 |
-
/* 74 */ "<% _.each(bucket_data.sub_buckets, function(sub_bucket_data){ %>",
|
1330 |
-
/* 75 */ "<% _.each(sub_bucket_data.sub_buckets, function(sub_sub_bucket_data){ %>",
|
1331 |
-
/* 76 */ "<% if (sub_sub_bucket_data.sub_buckets && !already_done[sub_sub_bucket_data.id]) { %>",
|
1332 |
-
/* 77 */ // "<% console.log('level-3(%s) %o %o',sub_sub_bucket_data.id,full_library.all_buckets_by_id[sub_sub_bucket_data.id],sub_sub_bucket_data);%>",
|
1333 |
-
/* 78 */ "<ul class='sub_bucket sub_sub_bucket' data-bucket_id='<% print(sub_sub_bucket_data.id) %>'>",
|
1334 |
-
/* 79 */ "<li class='heading goprev'><span><% print(full_library.all_buckets_by_id[sub_sub_bucket_data.id]) %></span><i></i></li>",
|
1335 |
-
/* 80 */ "<% _.each(sub_sub_bucket_data.sub_buckets, function(sub_sub_sub_bucket_data){ %>",
|
1336 |
-
/* 81 */ // "<% console.log('sub-bucket-3(%s) %o %o',sub_sub_sub_bucket_data.id,full_library.all_buckets_by_id[sub_sub_sub_bucket_data.id],sub_sub_sub_bucket_data);%>",
|
1337 |
-
/* 82 */ "<li class='heading sub_bucket_heading level1b' <% if (sub_sub_sub_bucket_data.sub_buckets){ %> data-open_bucket='<% print(sub_sub_sub_bucket_data.id) %>' <% } else { %> data-open_walkthroughs='<% print(sub_sub_sub_bucket_data.id) %>' <% } %> ><span><% print(full_library.all_buckets_by_id[sub_sub_sub_bucket_data.id]) %></span><i></i></li>",
|
1338 |
-
/* 83 */ "<% }); %>",
|
1339 |
-
/* 84 */ "</ul>",
|
1340 |
-
/* 85 */ "<% } %>",
|
1341 |
-
/* 86 */ "<% }); %>",
|
1342 |
-
/* 87 */ "<% }); %>",
|
1343 |
-
/* 88 */ "<% }); %>",
|
1344 |
-
/* 89 */ "</ul>",
|
1345 |
-
/* 90 */
|
1346 |
-
/* 91 */ "<ul class='walkthroughs'>",
|
1347 |
-
/* 92 */ "<% _.each(library_filtered_walkthroughs_by_bucket, function(bucket_data, bucket_id){ %>",
|
1348 |
-
/* 93 */ // "<% console.log('bucket_data %o',bucket_data);%>",
|
1349 |
-
/* 94 */ // "<% console.log('bucket_id %o',bucket_id);%>",
|
1350 |
-
/* 95 */ "<ul class='walkthrough' data-bucket_id='<% print(bucket_id) %>'>",
|
1351 |
-
/* 96 */ "<li class='heading goprev'><span><% print(full_library.all_buckets_by_id[bucket_id]) %></span><i></i></li>",
|
1352 |
-
/* 97 */ "<ul class='walkthroughs_inner' data-bucket_id='<% print(bucket_id) %>'>",
|
1353 |
-
/* 98 */ "<% _.each(bucket_data.overview, function(walkthrough, walkthrough_key){ %>",
|
1354 |
-
/* 99 */ "<a href='javascript: sidekick.play(<% print(walkthrough.id) %>)'><li class='overview'><% print(walkthrough.title) %></li></a>",
|
1355 |
-
/* 100 */ "<% }); %>",
|
1356 |
-
|
1357 |
-
/* templates.js */
|
1358 |
-
|
1359 |
-
/* 101 */ "<% _.each(bucket_data.how, function(walkthrough, walkthrough_key){ %>",
|
1360 |
-
/* 102 */ "<a href='javascript: sidekick.play(<% print(walkthrough.id) %>)'><li class='how'><% print(walkthrough.title) %></li></a>",
|
1361 |
-
/* 103 */ "<% }); %>",
|
1362 |
-
/* 104 */ "</ul>",
|
1363 |
-
/* 105 */ "</ul>",
|
1364 |
-
/* 106 */ "<% }); %>",
|
1365 |
-
/* 107 */ "</ul>"
|
1366 |
-
/* 108 */ ].join("");
|
1367 |
-
/* 109 */
|
1368 |
-
/* 110 */ SidekickWP.Templates.Review = [
|
1369 |
-
/* 111 */ "<ul class='new_window review' data-title='<% print(title) %>'>",
|
1370 |
-
/* 112 */ "<li>",
|
1371 |
-
/* 113 */ "<div><div class='rate'><span data-val='1' class='rate1'></span><span data-val='2' class='rate2'></span><span data-val='3' class='rate3'></span><span data-val='4' class='rate4'></span><span data-val='5' class='rate5'></span></div>",
|
1372 |
-
/* 114 */ "<textarea name='comment'>Let us know if you found the Walkthrough helpful or if we can improve something.</textarea>",
|
1373 |
-
/* 115 */ "<br/><input type='button' value='Skip'></input><input type='submit' value='Submit'></input>",
|
1374 |
-
/* 116 */ "</li>",
|
1375 |
-
/* 117 */ "</ul>"
|
1376 |
-
/* 118 */ ].join("");
|
1377 |
-
/* 119 */
|
1378 |
-
/* 120 */
|
1379 |
-
/* 121 */ SidekickWP.Templates.Message = [
|
1380 |
-
/* 122 */ "<ul class='new_window message' data-title='<% print(title) %>'>",
|
1381 |
-
/* 123 */ "<li>",
|
1382 |
-
/* 124 */ "<div><% print(message) %></div>",
|
1383 |
-
/* 125 */ "</li>",
|
1384 |
-
/* 126 */ "</ul>"
|
1385 |
-
/* 127 */ ].join("");
|
1386 |
-
/* 128 */
|
1387 |
-
/* 129 */
|
1388 |
-
|
1389 |
-
;
|
1390 |
-
/* jquery.lightbox_me.js */
|
1391 |
-
|
1392 |
-
/* 1 */ /*
|
1393 |
-
/* 2 *| * $ lightbox_me
|
1394 |
-
/* 3 *| * By: Buck Wilson
|
1395 |
-
/* 4 *| * Version : 2.3
|
1396 |
-
/* 5 *| *
|
1397 |
-
/* 6 *| * Licensed under the Apache License, Version 2.0 (the "License");
|
1398 |
-
/* 7 *| * you may not use this file except in compliance with the License.
|
1399 |
-
/* 8 *| * You may obtain a copy of the License at
|
1400 |
-
/* 9 *| *
|
1401 |
-
/* 10 *| * http://www.apache.org/licenses/LICENSE-2.0
|
1402 |
-
/* 11 *| *
|
1403 |
-
/* 12 *| * Unless required by applicable law or agreed to in writing, software
|
1404 |
-
/* 13 *| * distributed under the License is distributed on an "AS IS" BASIS,
|
1405 |
-
/* 14 *| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
1406 |
-
/* 15 *| * See the License for the specific language governing permissions and
|
1407 |
-
/* 16 *| * limitations under the License.
|
1408 |
-
/* 17 *| */
|
1409 |
-
/* 18 */
|
1410 |
-
/* 19 */
|
1411 |
-
/* 20 */ (function($) {
|
1412 |
-
/* 21 */
|
1413 |
-
/* 22 */ $.fn.lightbox_me = function(options) {
|
1414 |
-
/* 23 */
|
1415 |
-
/* 24 */ return this.each(function() {
|
1416 |
-
/* 25 */
|
1417 |
-
/* 26 */ var
|
1418 |
-
/* 27 */ opts = $.extend({}, $.fn.lightbox_me.defaults, options),
|
1419 |
-
/* 28 */ $overlay = $(),
|
1420 |
-
/* 29 */ $self = $(this),
|
1421 |
-
/* 30 */ $iframe = $('<iframe id="foo" style="z-index: ' + (opts.zIndex + 1) + ';border: none; margin: 0; padding: 0; position: absolute; width: 100%; height: 100%; top: 0; left: 0; filter: mask();"/>'),
|
1422 |
-
/* 31 */ ie6 = ($.browser.msie && $.browser.version < 7);
|
1423 |
-
/* 32 */
|
1424 |
-
/* 33 */ if (opts.showOverlay) {
|
1425 |
-
/* 34 */ //check if there's an existing overlay, if so, make subequent ones clear
|
1426 |
-
/* 35 */ var $currentOverlays = $(".js_lb_overlay:visible");
|
1427 |
-
/* 36 */ if ($currentOverlays.length > 0){
|
1428 |
-
/* 37 */ $overlay = $('<div class="lb_overlay_clear js_lb_overlay"/>');
|
1429 |
-
/* 38 */ } else {
|
1430 |
-
/* 39 */ $overlay = $('<div class="' + opts.classPrefix + '_overlay js_lb_overlay"/>');
|
1431 |
-
/* 40 */ }
|
1432 |
-
/* 41 */ }
|
1433 |
-
/* 42 */
|
1434 |
-
/* 43 */ /*----------------------------------------------------
|
1435 |
-
/* 44 *| DOM Building
|
1436 |
-
/* 45 *| ---------------------------------------------------- */
|
1437 |
-
/* 46 */ if (ie6) {
|
1438 |
-
/* 47 */ var src = /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank';
|
1439 |
-
/* 48 */ $iframe.attr('src', src);
|
1440 |
-
/* 49 */ $('body').append($iframe);
|
1441 |
-
/* 50 */ } // iframe shim for ie6, to hide select elements
|
1442 |
-
|
1443 |
-
/* jquery.lightbox_me.js */
|
1444 |
-
|
1445 |
-
/* 51 */ $('body').append($self.hide()).append($overlay);
|
1446 |
-
/* 52 */
|
1447 |
-
/* 53 */
|
1448 |
-
/* 54 */ /*----------------------------------------------------
|
1449 |
-
/* 55 *| Overlay CSS stuffs
|
1450 |
-
/* 56 *| ---------------------------------------------------- */
|
1451 |
-
/* 57 */
|
1452 |
-
/* 58 */ // set css of the overlay
|
1453 |
-
/* 59 */ if (opts.showOverlay) {
|
1454 |
-
/* 60 */ setOverlayHeight(); // pulled this into a function because it is called on window resize.
|
1455 |
-
/* 61 */ $overlay.css({ position: 'absolute', width: '100%', top: 0, left: 0, right: 0, bottom: 0, zIndex: (opts.zIndex + 2), display: 'none' });
|
1456 |
-
/* 62 */ if (!$overlay.hasClass('lb_overlay_clear')){
|
1457 |
-
/* 63 */ $overlay.css(opts.overlayCSS);
|
1458 |
-
/* 64 */ }
|
1459 |
-
/* 65 */ }
|
1460 |
-
/* 66 */
|
1461 |
-
/* 67 */ /*----------------------------------------------------
|
1462 |
-
/* 68 *| Animate it in.
|
1463 |
-
/* 69 *| ---------------------------------------------------- */
|
1464 |
-
/* 70 */ //
|
1465 |
-
/* 71 */ if (opts.showOverlay) {
|
1466 |
-
/* 72 */ $overlay.fadeIn(opts.overlaySpeed, function() {
|
1467 |
-
/* 73 */ setSelfPosition();
|
1468 |
-
/* 74 */ $self[opts.appearEffect](opts.lightboxSpeed, function() { setOverlayHeight(); setSelfPosition(); opts.onLoad()});
|
1469 |
-
/* 75 */ });
|
1470 |
-
/* 76 */ } else {
|
1471 |
-
/* 77 */ setSelfPosition();
|
1472 |
-
/* 78 */ $self[opts.appearEffect](opts.lightboxSpeed, function() { opts.onLoad()});
|
1473 |
-
/* 79 */ }
|
1474 |
-
/* 80 */
|
1475 |
-
/* 81 */ /*----------------------------------------------------
|
1476 |
-
/* 82 *| Hide parent if parent specified (parentLightbox should be jquery reference to any parent lightbox)
|
1477 |
-
/* 83 *| ---------------------------------------------------- */
|
1478 |
-
/* 84 */ if (opts.parentLightbox) {
|
1479 |
-
/* 85 */ opts.parentLightbox.fadeOut(200);
|
1480 |
-
/* 86 */ }
|
1481 |
-
/* 87 */
|
1482 |
-
/* 88 */
|
1483 |
-
/* 89 */ /*----------------------------------------------------
|
1484 |
-
/* 90 *| Bind Events
|
1485 |
-
/* 91 *| ---------------------------------------------------- */
|
1486 |
-
/* 92 */
|
1487 |
-
/* 93 */ $(window).resize(setOverlayHeight)
|
1488 |
-
/* 94 */ .resize(setSelfPosition)
|
1489 |
-
/* 95 */ .scroll(setSelfPosition);
|
1490 |
-
/* 96 */
|
1491 |
-
/* 97 */ $(window).bind('keyup.lightbox_me', observeKeyPress);
|
1492 |
-
/* 98 */
|
1493 |
-
/* 99 */ if (opts.closeClick) {
|
1494 |
-
/* 100 */ $overlay.click(function(e) { closeLightbox(); e.preventDefault; });
|
1495 |
-
|
1496 |
-
/* jquery.lightbox_me.js */
|
1497 |
-
|
1498 |
-
/* 101 */ }
|
1499 |
-
/* 102 */ $self.delegate(opts.closeSelector, "click", function(e) {
|
1500 |
-
/* 103 */ closeLightbox(); e.preventDefault();
|
1501 |
-
/* 104 */ });
|
1502 |
-
/* 105 */ $self.bind('close', closeLightbox);
|
1503 |
-
/* 106 */ $self.bind('reposition', setSelfPosition);
|
1504 |
-
/* 107 */
|
1505 |
-
/* 108 */
|
1506 |
-
/* 109 */
|
1507 |
-
/* 110 */ /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
1508 |
-
/* 111 *| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
|
1509 |
-
/* 112 */
|
1510 |
-
/* 113 */
|
1511 |
-
/* 114 */ /*----------------------------------------------------
|
1512 |
-
/* 115 *| Private Functions
|
1513 |
-
/* 116 *| ---------------------------------------------------- */
|
1514 |
-
/* 117 */
|
1515 |
-
/* 118 */ /* Remove or hide all elements */
|
1516 |
-
/* 119 */ function closeLightbox() {
|
1517 |
-
/* 120 */ var s = $self[0].style;
|
1518 |
-
/* 121 */ if (opts.destroyOnClose) {
|
1519 |
-
/* 122 */ $self.add($overlay).remove();
|
1520 |
-
/* 123 */ } else {
|
1521 |
-
/* 124 */ $self.add($overlay).hide();
|
1522 |
-
/* 125 */ }
|
1523 |
-
/* 126 */
|
1524 |
-
/* 127 */ //show the hidden parent lightbox
|
1525 |
-
/* 128 */ if (opts.parentLightbox) {
|
1526 |
-
/* 129 */ opts.parentLightbox.fadeIn(200);
|
1527 |
-
/* 130 */ }
|
1528 |
-
/* 131 */
|
1529 |
-
/* 132 */ $iframe.remove();
|
1530 |
-
/* 133 */
|
1531 |
-
/* 134 */ // clean up events.
|
1532 |
-
/* 135 */ $self.undelegate(opts.closeSelector, "click");
|
1533 |
-
/* 136 */
|
1534 |
-
/* 137 */ $(window).unbind('reposition', setOverlayHeight);
|
1535 |
-
/* 138 */ $(window).unbind('reposition', setSelfPosition);
|
1536 |
-
/* 139 */ $(window).unbind('scroll', setSelfPosition);
|
1537 |
-
/* 140 */ $(window).unbind('keyup.lightbox_me');
|
1538 |
-
/* 141 */ if (ie6)
|
1539 |
-
/* 142 */ s.removeExpression('top');
|
1540 |
-
/* 143 */ opts.onClose();
|
1541 |
-
/* 144 */ }
|
1542 |
-
/* 145 */
|
1543 |
-
/* 146 */
|
1544 |
-
/* 147 */ /* Function to bind to the window to observe the escape/enter key press */
|
1545 |
-
/* 148 */ function observeKeyPress(e) {
|
1546 |
-
/* 149 */ if((e.keyCode == 27 || (e.DOM_VK_ESCAPE == 27 && e.which==0)) && opts.closeEsc) closeLightbox();
|
1547 |
-
/* 150 */ }
|
1548 |
-
|
1549 |
-
/* jquery.lightbox_me.js */
|
1550 |
-
|
1551 |
-
/* 151 */
|
1552 |
-
/* 152 */
|
1553 |
-
/* 153 */ /* Set the height of the overlay
|
1554 |
-
/* 154 *| : if the document height is taller than the window, then set the overlay height to the document height.
|
1555 |
-
/* 155 *| : otherwise, just set overlay height: 100%
|
1556 |
-
/* 156 *| */
|
1557 |
-
/* 157 */ function setOverlayHeight() {
|
1558 |
-
/* 158 */ if ($(window).height() < $(document).height()) {
|
1559 |
-
/* 159 */ $overlay.css({height: $(document).height() + 'px'});
|
1560 |
-
/* 160 */ $iframe.css({height: $(document).height() + 'px'});
|
1561 |
-
/* 161 */ } else {
|
1562 |
-
/* 162 */ $overlay.css({height: '100%'});
|
1563 |
-
/* 163 */ if (ie6) {
|
1564 |
-
/* 164 */ $('html,body').css('height','100%');
|
1565 |
-
/* 165 */ $iframe.css('height', '100%');
|
1566 |
-
/* 166 */ } // ie6 hack for height: 100%; TODO: handle this in IE7
|
1567 |
-
/* 167 */ }
|
1568 |
-
/* 168 */ }
|
1569 |
-
/* 169 */
|
1570 |
-
/* 170 */
|
1571 |
-
/* 171 */ /* Set the position of the modal'd window ($self)
|
1572 |
-
/* 172 *| : if $self is taller than the window, then make it absolutely positioned
|
1573 |
-
/* 173 *| : otherwise fixed
|
1574 |
-
/* 174 *| */
|
1575 |
-
/* 175 */ function setSelfPosition() {
|
1576 |
-
/* 176 */ var s = $self[0].style;
|
1577 |
-
/* 177 */
|
1578 |
-
/* 178 */ // reset CSS so width is re-calculated for margin-left CSS
|
1579 |
-
/* 179 */ $self.css({left: '50%', marginLeft: ($self.outerWidth() / 2) * -1, zIndex: (opts.zIndex + 3) });
|
1580 |
-
/* 180 */
|
1581 |
-
/* 181 */
|
1582 |
-
/* 182 */ /* we have to get a little fancy when dealing with height, because lightbox_me
|
1583 |
-
/* 183 *| is just so fancy.
|
1584 |
-
/* 184 *| */
|
1585 |
-
/* 185 */
|
1586 |
-
/* 186 */ // if the height of $self is bigger than the window and self isn't already position absolute
|
1587 |
-
/* 187 */ if (($self.height() + 80 >= $(window).height()) && ($self.css('position') != 'absolute' || ie6)) {
|
1588 |
-
/* 188 */
|
1589 |
-
/* 189 */ // we are going to make it positioned where the user can see it, but they can still scroll
|
1590 |
-
/* 190 */ // so the top offset is based on the user's scroll position.
|
1591 |
-
/* 191 */ var topOffset = $(document).scrollTop() + 40;
|
1592 |
-
/* 192 */ $self.css({position: 'absolute', top: topOffset + 'px', marginTop: 0})
|
1593 |
-
/* 193 */ if (ie6) {
|
1594 |
-
/* 194 */ s.removeExpression('top');
|
1595 |
-
/* 195 */ }
|
1596 |
-
/* 196 */ } else if ($self.height()+ 80 < $(window).height()) {
|
1597 |
-
/* 197 */ //if the height is less than the window height, then we're gonna make this thing position: fixed.
|
1598 |
-
/* 198 */ // in ie6 we're gonna fake it.
|
1599 |
-
/* 199 */ if (ie6) {
|
1600 |
-
/* 200 */ s.position = 'absolute';
|
1601 |
-
|
1602 |
-
/* jquery.lightbox_me.js */
|
1603 |
-
|
1604 |
-
/* 201 */ if (opts.centered) {
|
1605 |
-
/* 202 */ s.setExpression('top', '(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"')
|
1606 |
-
/* 203 */ s.marginTop = 0;
|
1607 |
-
/* 204 */ } else {
|
1608 |
-
/* 205 */ var top = (opts.modalCSS && opts.modalCSS.top) ? parseInt(opts.modalCSS.top) : 0;
|
1609 |
-
/* 206 */ s.setExpression('top', '((blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"')
|
1610 |
-
/* 207 */ }
|
1611 |
-
/* 208 */ } else {
|
1612 |
-
/* 209 */ if (opts.centered) {
|
1613 |
-
/* 210 */ $self.css({ position: 'fixed', top: '50%', marginTop: ($self.outerHeight() / 2) * -1})
|
1614 |
-
/* 211 */ } else {
|
1615 |
-
/* 212 */ $self.css({ position: 'fixed'}).css(opts.modalCSS);
|
1616 |
-
/* 213 */ }
|
1617 |
-
/* 214 */
|
1618 |
-
/* 215 */ }
|
1619 |
-
/* 216 */ }
|
1620 |
-
/* 217 */ }
|
1621 |
-
/* 218 */
|
1622 |
-
/* 219 */ });
|
1623 |
-
/* 220 */
|
1624 |
-
/* 221 */
|
1625 |
-
/* 222 */
|
1626 |
-
/* 223 */ };
|
1627 |
-
/* 224 */
|
1628 |
-
/* 225 */ $.fn.lightbox_me.defaults = {
|
1629 |
-
/* 226 */
|
1630 |
-
/* 227 */ // animation
|
1631 |
-
/* 228 */ appearEffect: "fadeIn",
|
1632 |
-
/* 229 */ appearEase: "",
|
1633 |
-
/* 230 */ overlaySpeed: 250,
|
1634 |
-
/* 231 */ lightboxSpeed: 300,
|
1635 |
-
/* 232 */
|
1636 |
-
/* 233 */ // close
|
1637 |
-
/* 234 */ closeSelector: ".close",
|
1638 |
-
/* 235 */ closeClick: true,
|
1639 |
-
/* 236 */ closeEsc: true,
|
1640 |
-
/* 237 */
|
1641 |
-
/* 238 */ // behavior
|
1642 |
-
/* 239 */ destroyOnClose: false,
|
1643 |
-
/* 240 */ showOverlay: true,
|
1644 |
-
/* 241 */ parentLightbox: false,
|
1645 |
-
/* 242 */
|
1646 |
-
/* 243 */ // callbacks
|
1647 |
-
/* 244 */ onLoad: function() {},
|
1648 |
-
/* 245 */ onClose: function() {},
|
1649 |
-
/* 246 */
|
1650 |
-
/* 247 */ // style
|
1651 |
-
/* 248 */ classPrefix: 'lb',
|
1652 |
-
/* 249 */ zIndex: 999,
|
1653 |
-
/* 250 */ centered: false,
|
1654 |
-
|
1655 |
-
/* jquery.lightbox_me.js */
|
1656 |
-
|
1657 |
-
/* 251 */ modalCSS: {top: '40px'},
|
1658 |
-
/* 252 */ overlayCSS: {background: 'black', opacity: .3}
|
1659 |
-
/* 253 */ }
|
1660 |
-
/* 254 */ })(jQuery);
|
1661 |
-
|
1662 |
-
;
|
1663 |
-
/* jquery.easing.1.3.js */
|
1664 |
-
|
1665 |
-
/* 1 */ /*
|
1666 |
-
/* 2 *| * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
|
1667 |
-
/* 3 *| *
|
1668 |
-
/* 4 *| * Uses the built in easing capabilities added In jQuery 1.1
|
1669 |
-
/* 5 *| * to offer multiple easing options
|
1670 |
-
/* 6 *| *
|
1671 |
-
/* 7 *| * TERMS OF USE - jQuery Easing
|
1672 |
-
/* 8 *| *
|
1673 |
-
/* 9 *| * Open source under the BSD License.
|
1674 |
-
/* 10 *| *
|
1675 |
-
/* 11 *| * Copyright © 2008 George McGinley Smith
|
1676 |
-
/* 12 *| * All rights reserved.
|
1677 |
-
/* 13 *| *
|
1678 |
-
/* 14 *| * Redistribution and use in source and binary forms, with or without modification,
|
1679 |
-
/* 15 *| * are permitted provided that the following conditions are met:
|
1680 |
-
/* 16 *| *
|
1681 |
-
/* 17 *| * Redistributions of source code must retain the above copyright notice, this list of
|
1682 |
-
/* 18 *| * conditions and the following disclaimer.
|
1683 |
-
/* 19 *| * Redistributions in binary form must reproduce the above copyright notice, this list
|
1684 |
-
/* 20 *| * of conditions and the following disclaimer in the documentation and/or other materials
|
1685 |
-
/* 21 *| * provided with the distribution.
|
1686 |
-
/* 22 *| *
|
1687 |
-
/* 23 *| * Neither the name of the author nor the names of contributors may be used to endorse
|
1688 |
-
/* 24 *| * or promote products derived from this software without specific prior written permission.
|
1689 |
-
/* 25 *| *
|
1690 |
-
/* 26 *| * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
1691 |
-
/* 27 *| * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
1692 |
-
/* 28 *| * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
1693 |
-
/* 29 *| * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
1694 |
-
/* 30 *| * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
1695 |
-
/* 31 *| * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
1696 |
-
/* 32 *| * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
1697 |
-
/* 33 *| * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
1698 |
-
/* 34 *| * OF THE POSSIBILITY OF SUCH DAMAGE.
|
1699 |
-
/* 35 *| *
|
1700 |
-
/* 36 *| */
|
1701 |
-
/* 37 */
|
1702 |
-
/* 38 */ // t: current time, b: begInnIng value, c: change In value, d: duration
|
1703 |
-
/* 39 */ jQuery.easing['jswing'] = jQuery.easing['swing'];
|
1704 |
-
/* 40 */
|
1705 |
-
/* 41 */ jQuery.extend( jQuery.easing,
|
1706 |
-
/* 42 */ {
|
1707 |
-
/* 43 */ def: 'easeOutQuad',
|
1708 |
-
/* 44 */ swing: function (x, t, b, c, d) {
|
1709 |
-
/* 45 */ //alert(jQuery.easing.default);
|
1710 |
-
/* 46 */ return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
|
1711 |
-
/* 47 */ },
|
1712 |
-
/* 48 */ easeInQuad: function (x, t, b, c, d) {
|
1713 |
-
/* 49 */ return c*(t/=d)*t + b;
|
1714 |
-
/* 50 */ },
|
1715 |
-
|
1716 |
-
/* jquery.easing.1.3.js */
|
1717 |
-
|
1718 |
-
/* 51 */ easeOutQuad: function (x, t, b, c, d) {
|
1719 |
-
/* 52 */ return -c *(t/=d)*(t-2) + b;
|
1720 |
-
/* 53 */ },
|
1721 |
-
/* 54 */ easeInOutQuad: function (x, t, b, c, d) {
|
1722 |
-
/* 55 */ if ((t/=d/2) < 1) return c/2*t*t + b;
|
1723 |
-
/* 56 */ return -c/2 * ((--t)*(t-2) - 1) + b;
|
1724 |
-
/* 57 */ },
|
1725 |
-
/* 58 */ easeInCubic: function (x, t, b, c, d) {
|
1726 |
-
/* 59 */ return c*(t/=d)*t*t + b;
|
1727 |
-
/* 60 */ },
|
1728 |
-
/* 61 */ easeOutCubic: function (x, t, b, c, d) {
|
1729 |
-
/* 62 */ return c*((t=t/d-1)*t*t + 1) + b;
|
1730 |
-
/* 63 */ },
|
1731 |
-
/* 64 */ easeInOutCubic: function (x, t, b, c, d) {
|
1732 |
-
/* 65 */ if ((t/=d/2) < 1) return c/2*t*t*t + b;
|
1733 |
-
/* 66 */ return c/2*((t-=2)*t*t + 2) + b;
|
1734 |
-
/* 67 */ },
|
1735 |
-
/* 68 */ easeInQuart: function (x, t, b, c, d) {
|
1736 |
-
/* 69 */ return c*(t/=d)*t*t*t + b;
|
1737 |
-
/* 70 */ },
|
1738 |
-
/* 71 */ easeOutQuart: function (x, t, b, c, d) {
|
1739 |
-
/* 72 */ return -c * ((t=t/d-1)*t*t*t - 1) + b;
|
1740 |
-
/* 73 */ },
|
1741 |
-
/* 74 */ easeInOutQuart: function (x, t, b, c, d) {
|
1742 |
-
/* 75 */ if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
|
1743 |
-
/* 76 */ return -c/2 * ((t-=2)*t*t*t - 2) + b;
|
1744 |
-
/* 77 */ },
|
1745 |
-
/* 78 */ easeInQuint: function (x, t, b, c, d) {
|
1746 |
-
/* 79 */ return c*(t/=d)*t*t*t*t + b;
|
1747 |
-
/* 80 */ },
|
1748 |
-
/* 81 */ easeOutQuint: function (x, t, b, c, d) {
|
1749 |
-
/* 82 */ return c*((t=t/d-1)*t*t*t*t + 1) + b;
|
1750 |
-
/* 83 */ },
|
1751 |
-
/* 84 */ easeInOutQuint: function (x, t, b, c, d) {
|
1752 |
-
/* 85 */ if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
|
1753 |
-
/* 86 */ return c/2*((t-=2)*t*t*t*t + 2) + b;
|
1754 |
-
/* 87 */ },
|
1755 |
-
/* 88 */ easeInSine: function (x, t, b, c, d) {
|
1756 |
-
/* 89 */ return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
|
1757 |
-
/* 90 */ },
|
1758 |
-
/* 91 */ easeOutSine: function (x, t, b, c, d) {
|
1759 |
-
/* 92 */ return c * Math.sin(t/d * (Math.PI/2)) + b;
|
1760 |
-
/* 93 */ },
|
1761 |
-
/* 94 */ easeInOutSine: function (x, t, b, c, d) {
|
1762 |
-
/* 95 */ return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
|
1763 |
-
/* 96 */ },
|
1764 |
-
/* 97 */ easeInExpo: function (x, t, b, c, d) {
|
1765 |
-
/* 98 */ return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
|
1766 |
-
/* 99 */ },
|
1767 |
-
/* 100 */ easeOutExpo: function (x, t, b, c, d) {
|
1768 |
-
|
1769 |
-
/* jquery.easing.1.3.js */
|
1770 |
-
|
1771 |
-
/* 101 */ return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
|
1772 |
-
/* 102 */ },
|
1773 |
-
/* 103 */ easeInOutExpo: function (x, t, b, c, d) {
|
1774 |
-
/* 104 */ if (t==0) return b;
|
1775 |
-
/* 105 */ if (t==d) return b+c;
|
1776 |
-
/* 106 */ if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
|
1777 |
-
/* 107 */ return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
|
1778 |
-
/* 108 */ },
|
1779 |
-
/* 109 */ easeInCirc: function (x, t, b, c, d) {
|
1780 |
-
/* 110 */ return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
|
1781 |
-
/* 111 */ },
|
1782 |
-
/* 112 */ easeOutCirc: function (x, t, b, c, d) {
|
1783 |
-
/* 113 */ return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
|
1784 |
-
/* 114 */ },
|
1785 |
-
/* 115 */ easeInOutCirc: function (x, t, b, c, d) {
|
1786 |
-
/* 116 */ if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
|
1787 |
-
/* 117 */ return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
|
1788 |
-
/* 118 */ },
|
1789 |
-
/* 119 */ easeInElastic: function (x, t, b, c, d) {
|
1790 |
-
/* 120 */ var s=1.70158;var p=0;var a=c;
|
1791 |
-
/* 121 */ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
1792 |
-
/* 122 */ if (a < Math.abs(c)) { a=c; var s=p/4; }
|
1793 |
-
/* 123 */ else var s = p/(2*Math.PI) * Math.asin (c/a);
|
1794 |
-
/* 124 */ return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
1795 |
-
/* 125 */ },
|
1796 |
-
/* 126 */ easeOutElastic: function (x, t, b, c, d) {
|
1797 |
-
/* 127 */ var s=1.70158;var p=0;var a=c;
|
1798 |
-
/* 128 */ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
1799 |
-
/* 129 */ if (a < Math.abs(c)) { a=c; var s=p/4; }
|
1800 |
-
/* 130 */ else var s = p/(2*Math.PI) * Math.asin (c/a);
|
1801 |
-
/* 131 */ return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
|
1802 |
-
/* 132 */ },
|
1803 |
-
/* 133 */ easeInOutElastic: function (x, t, b, c, d) {
|
1804 |
-
/* 134 */ var s=1.70158;var p=0;var a=c;
|
1805 |
-
/* 135 */ if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
|
1806 |
-
/* 136 */ if (a < Math.abs(c)) { a=c; var s=p/4; }
|
1807 |
-
/* 137 */ else var s = p/(2*Math.PI) * Math.asin (c/a);
|
1808 |
-
/* 138 */ if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
1809 |
-
/* 139 */ return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
|
1810 |
-
/* 140 */ },
|
1811 |
-
/* 141 */ easeInBack: function (x, t, b, c, d, s) {
|
1812 |
-
/* 142 */ if (s == undefined) s = 1.70158;
|
1813 |
-
/* 143 */ return c*(t/=d)*t*((s+1)*t - s) + b;
|
1814 |
-
/* 144 */ },
|
1815 |
-
/* 145 */ easeOutBack: function (x, t, b, c, d, s) {
|
1816 |
-
/* 146 */ if (s == undefined) s = 1.70158;
|
1817 |
-
/* 147 */ return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
|
1818 |
-
/* 148 */ },
|
1819 |
-
/* 149 */ easeInOutBack: function (x, t, b, c, d, s) {
|
1820 |
-
/* 150 */ if (s == undefined) s = 1.70158;
|
1821 |
-
|
1822 |
-
/* jquery.easing.1.3.js */
|
1823 |
-
|
1824 |
-
/* 151 */ if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
|
1825 |
-
/* 152 */ return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
|
1826 |
-
/* 153 */ },
|
1827 |
-
/* 154 */ easeInBounce: function (x, t, b, c, d) {
|
1828 |
-
/* 155 */ return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
|
1829 |
-
/* 156 */ },
|
1830 |
-
/* 157 */ easeOutBounce: function (x, t, b, c, d) {
|
1831 |
-
/* 158 */ if ((t/=d) < (1/2.75)) {
|
1832 |
-
/* 159 */ return c*(7.5625*t*t) + b;
|
1833 |
-
/* 160 */ } else if (t < (2/2.75)) {
|
1834 |
-
/* 161 */ return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
|
1835 |
-
/* 162 */ } else if (t < (2.5/2.75)) {
|
1836 |
-
/* 163 */ return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
|
1837 |
-
/* 164 */ } else {
|
1838 |
-
/* 165 */ return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
|
1839 |
-
/* 166 */ }
|
1840 |
-
/* 167 */ },
|
1841 |
-
/* 168 */ easeInOutBounce: function (x, t, b, c, d) {
|
1842 |
-
/* 169 */ if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
|
1843 |
-
/* 170 */ return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
|
1844 |
-
/* 171 */ }
|
1845 |
-
/* 172 */ });
|
1846 |
-
/* 173 */
|
1847 |
-
/* 174 */ /*
|
1848 |
-
/* 175 *| *
|
1849 |
-
/* 176 *| * TERMS OF USE - EASING EQUATIONS
|
1850 |
-
/* 177 *| *
|
1851 |
-
/* 178 *| * Open source under the BSD License.
|
1852 |
-
/* 179 *| *
|
1853 |
-
/* 180 *| * Copyright © 2001 Robert Penner
|
1854 |
-
/* 181 *| * All rights reserved.
|
1855 |
-
/* 182 *| *
|
1856 |
-
/* 183 *| * Redistribution and use in source and binary forms, with or without modification,
|
1857 |
-
/* 184 *| * are permitted provided that the following conditions are met:
|
1858 |
-
/* 185 *| *
|
1859 |
-
/* 186 *| * Redistributions of source code must retain the above copyright notice, this list of
|
1860 |
-
/* 187 *| * conditions and the following disclaimer.
|
1861 |
-
/* 188 *| * Redistributions in binary form must reproduce the above copyright notice, this list
|
1862 |
-
/* 189 *| * of conditions and the following disclaimer in the documentation and/or other materials
|
1863 |
-
/* 190 *| * provided with the distribution.
|
1864 |
-
/* 191 *| *
|
1865 |
-
/* 192 *| * Neither the name of the author nor the names of contributors may be used to endorse
|
1866 |
-
/* 193 *| * or promote products derived from this software without specific prior written permission.
|
1867 |
-
/* 194 *| *
|
1868 |
-
/* 195 *| * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
1869 |
-
/* 196 *| * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
1870 |
-
/* 197 *| * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
1871 |
-
/* 198 *| * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
1872 |
-
/* 199 *| * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
1873 |
-
/* 200 *| * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
1874 |
-
|
1875 |
-
/* jquery.easing.1.3.js */
|
1876 |
-
|
1877 |
-
/* 201 *| * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
1878 |
-
/* 202 *| * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
1879 |
-
/* 203 *| * OF THE POSSIBILITY OF SUCH DAMAGE.
|
1880 |
-
/* 204 *| *
|
1881 |
-
/* 205 *| */
|
1882 |
-
|
1883 |
-
;
|
1884 |
-
/* jquery-timing.min.js */
|
1885 |
-
|
1886 |
-
/* 1 */ /**
|
1887 |
-
/* 2 *|
|
1888 |
-
/* 3 *| * timing.jquery.js
|
1889 |
-
/* 4 *| *
|
1890 |
-
/* 5 *| * JavaScript functions for waiting / repeating / stopping jQuery actions.
|
1891 |
-
/* 6 *| *
|
1892 |
-
/* 7 *| * This code is published under the MIT License (MIT).
|
1893 |
-
/* 8 *| * http://www.opensource.org/licenses/mit-license.php
|
1894 |
-
/* 9 *| *
|
1895 |
-
/* 10 *| * For examples, reference, and other information see
|
1896 |
-
/* 11 *| * http://creativecouple.github.com/jquery-timing/
|
1897 |
-
/* 12 *| *
|
1898 |
-
/* 13 *| * @author CreativeCouple
|
1899 |
-
/* 14 *| * @author Peter Liske
|
1900 |
-
/* 15 *| * @copyright (c) 2011 by CreativeCouple
|
1901 |
-
/* 16 *| * @see http://creativecouple.github.com/jquery-timing/
|
1902 |
-
/* 17 *| */
|
1903 |
-
/* 18 */
|
1904 |
-
/* 19 */ (function(jQuery, window){
|
1905 |
-
/* 20 */ /**
|
1906 |
-
/* 21 *| * object to store statically invoked threads
|
1907 |
-
/* 22 *| */
|
1908 |
-
/* 23 */ var THREAD_GROUPS = {},
|
1909 |
-
/* 24 */
|
1910 |
-
/* 25 */ /**
|
1911 |
-
/* 26 *| * unique timing identifier for different purposes
|
1912 |
-
/* 27 *| */
|
1913 |
-
/* 28 */ tuid = 1,
|
1914 |
-
/* 29 */
|
1915 |
-
/* 30 */ /**
|
1916 |
-
/* 31 *| * remember original core function $.each()
|
1917 |
-
/* 32 *| */
|
1918 |
-
/* 33 */ originalEach = jQuery.fn.each,
|
1919 |
-
/* 34 */
|
1920 |
-
/* 35 */ /**
|
1921 |
-
/* 36 *| * remember original core function $.on() (or $.bind())
|
1922 |
-
/* 37 *| */
|
1923 |
-
/* 38 */ originalOn = jQuery.fn.on || jQuery.fn.bind,
|
1924 |
-
/* 39 */
|
1925 |
-
/* 40 */ /**
|
1926 |
-
/* 41 *| * remember original core function $.off() (or $.unbind())
|
1927 |
-
/* 42 *| */
|
1928 |
-
/* 43 */ originalOff = jQuery.fn.off || jQuery.fn.unbind,
|
1929 |
-
/* 44 */
|
1930 |
-
/* 45 */ /**
|
1931 |
-
/* 46 *| * .until() and .all() have special meanings
|
1932 |
-
/* 47 *| */
|
1933 |
-
/* 48 */ loopEndMethods = {};
|
1934 |
-
/* 49 */
|
1935 |
-
/* 50 */ function sameOrNextJQuery(before, after) {
|
1936 |
-
|
1937 |
-
/* jquery-timing.min.js */
|
1938 |
-
|
1939 |
-
/* 51 */ after = jQuery(after);
|
1940 |
-
/* 52 */ after.prevObject = before;
|
1941 |
-
/* 53 */ var i = before.length;
|
1942 |
-
/* 54 */ if (i !== after.length) {
|
1943 |
-
/* 55 */ return after;
|
1944 |
-
/* 56 */ }
|
1945 |
-
/* 57 */ while (i--) {
|
1946 |
-
/* 58 */ if (before[i] !== after[i]) {
|
1947 |
-
/* 59 */ return after;
|
1948 |
-
/* 60 */ }
|
1949 |
-
/* 61 */ }
|
1950 |
-
/* 62 */ return before;
|
1951 |
-
/* 63 */ }
|
1952 |
-
/* 64 */
|
1953 |
-
/* 65 */ function loopCounts(loops) {
|
1954 |
-
/* 66 */ var ret = [], i = loops.length;
|
1955 |
-
/* 67 */ while (i--) {
|
1956 |
-
/* 68 */ ret[i] = loops[i]._count;
|
1957 |
-
/* 69 */ }
|
1958 |
-
/* 70 */ return ret;
|
1959 |
-
/* 71 */ }
|
1960 |
-
/* 72 */
|
1961 |
-
/* 73 */ /**
|
1962 |
-
/* 74 *| * Initialize a new timed invocation chain.
|
1963 |
-
/* 75 *| *
|
1964 |
-
/* 76 *| * @author CreativeCouple
|
1965 |
-
/* 77 *| * @author Peter Liske
|
1966 |
-
/* 78 *| *
|
1967 |
-
/* 79 *| * @param context initial context
|
1968 |
-
/* 80 *| * @param methodStack linked list of methods that has been or will be filled by someone else
|
1969 |
-
/* 81 *| * @param ongoingLoops optional arguments for callback parameters
|
1970 |
-
/* 82 *| * @param onStepCallback function to call on each step
|
1971 |
-
/* 83 *| * @returns the timed invocation chain method
|
1972 |
-
/* 84 *| */
|
1973 |
-
/* 85 */ function createTimedInvocationChain(context, methodStack, ongoingLoops, onStepCallback) {
|
1974 |
-
/* 86 */ ongoingLoops = ongoingLoops || [];
|
1975 |
-
/* 87 */ var executionState = {
|
1976 |
-
/* 88 */ _context: context,
|
1977 |
-
/* 89 */ _method: methodStack
|
1978 |
-
/* 90 */ },
|
1979 |
-
/* 91 */ preventRecursion = false,
|
1980 |
-
/* 92 */ method, otherExecutionState, deferred;
|
1981 |
-
/* 93 */
|
1982 |
-
/* 94 */ function hookupToProxy(state, mockup){
|
1983 |
-
/* 95 */ state._canContinue = false;
|
1984 |
-
/* 96 */ function fire(){
|
1985 |
-
/* 97 */ state._next = sameOrNextJQuery(state._context, state._next);
|
1986 |
-
/* 98 */ state._canContinue = true;
|
1987 |
-
/* 99 */ timedInvocationChain();
|
1988 |
-
/* 100 */ }
|
1989 |
-
|
1990 |
-
/* jquery-timing.min.js */
|
1991 |
-
|
1992 |
-
/* 101 */ return typeof mockup.promise == "function" ? mockup.promise().then(fire) : mockup.then(fire, true);
|
1993 |
-
/* 102 */ }
|
1994 |
-
/* 103 */
|
1995 |
-
/* 104 */ /**
|
1996 |
-
/* 105 *| * Invoke all the methods currently in the timed invocation chain.
|
1997 |
-
/* 106 *| *
|
1998 |
-
/* 107 *| * @author CreativeCouple
|
1999 |
-
/* 108 *| * @author Peter Liske
|
2000 |
-
/* 109 *| */
|
2001 |
-
/* 110 */ function timedInvocationChain(deferredReturnValue) {
|
2002 |
-
/* 111 */ while (!preventRecursion) try {
|
2003 |
-
/* 112 */ // keep recursive calls away
|
2004 |
-
/* 113 */ preventRecursion = !preventRecursion;
|
2005 |
-
/* 114 */ // save current context state
|
2006 |
-
/* 115 */ if (typeof onStepCallback == "function") {
|
2007 |
-
/* 116 */ onStepCallback(jQuery.makeArray(executionState._next || executionState._context));
|
2008 |
-
/* 117 */ }
|
2009 |
-
/* 118 */ // leave the chain when waiting for a trigger
|
2010 |
-
/* 119 */ if (executionState._canContinue == false) {
|
2011 |
-
/* 120 */ break;
|
2012 |
-
/* 121 */ }
|
2013 |
-
/* 122 */ // check end of chain
|
2014 |
-
/* 123 */ if (!executionState._method._name) {
|
2015 |
-
/* 124 */ if (deferred && (!ongoingLoops.length || ongoingLoops[0]._allowPromise)) {
|
2016 |
-
/* 125 */ // resolve any waiting promise
|
2017 |
-
/* 126 */ if (executionState._context && typeof executionState._context.promise == "function") {
|
2018 |
-
/* 127 */ executionState._context.promise().then(deferred.resolve);
|
2019 |
-
/* 128 */ } else {
|
2020 |
-
/* 129 */ deferred.resolveWith(executionState._context);
|
2021 |
-
/* 130 */ }
|
2022 |
-
/* 131 */ deferred = null;
|
2023 |
-
/* 132 */ }
|
2024 |
-
/* 133 */ if (!ongoingLoops.length) {
|
2025 |
-
/* 134 */ /*
|
2026 |
-
/* 135 *| * We've reached the end of our TIC
|
2027 |
-
/* 136 *| * and there is nothing left to wait for.
|
2028 |
-
/* 137 *| * So we can safely return the original jQuery object
|
2029 |
-
/* 138 *| * hence enabling instant invocation.
|
2030 |
-
/* 139 *| */
|
2031 |
-
/* 140 */ return executionState._context;
|
2032 |
-
/* 141 */ }
|
2033 |
-
/* 142 */ /*
|
2034 |
-
/* 143 *| * Now we have ongoing loops but reached the chain's end.
|
2035 |
-
/* 144 *| */
|
2036 |
-
/* 145 */ otherExecutionState = ongoingLoops[0]._openEndAction && ongoingLoops[0]._openEndAction(timedInvocationChain, executionState, ongoingLoops);
|
2037 |
-
/* 146 */ if (!otherExecutionState) {
|
2038 |
-
/* 147 */ // if innermost loop can't help us, just leave the chain
|
2039 |
-
/* 148 */ break;
|
2040 |
-
/* 149 */ }
|
2041 |
-
/* 150 */ executionState = otherExecutionState;
|
2042 |
-
|
2043 |
-
/* jquery-timing.min.js */
|
2044 |
-
|
2045 |
-
/* 151 */ continue;
|
2046 |
-
/* 152 */ }
|
2047 |
-
/* 153 */ // check if user tries to use a non-existing function call
|
2048 |
-
/* 154 */ method = executionState._context && executionState._context[executionState._method._name] || loopEndMethods[executionState._method._name];
|
2049 |
-
/* 155 */ if (!method) {
|
2050 |
-
/* 156 */ throw 'no such method "'+executionState._method._name+'" on object ('+executionState._context+')';
|
2051 |
-
/* 157 */ }
|
2052 |
-
/* 158 */ // check whether we came here triggered or not
|
2053 |
-
/* 159 */ if (method.timing && !executionState._canContinue) {
|
2054 |
-
/* 160 */ // prevent automatic re-trigger in case of loops
|
2055 |
-
/* 161 */ executionState._canContinue = false;
|
2056 |
-
/* 162 */ // handle timing method
|
2057 |
-
/* 163 */ executionState = method.timing(timedInvocationChain, executionState, ongoingLoops, onStepCallback) || executionState;
|
2058 |
-
/* 164 */ } else {
|
2059 |
-
/* 165 */ if (!method.timing && !executionState._canContinue) {
|
2060 |
-
/* 166 */ // prevent automatic re-trigger in case of loops
|
2061 |
-
/* 167 */ executionState._next = executionState._context[executionState._method._name].apply(executionState._context, executionState._method._arguments);
|
2062 |
-
/* 168 */ if (ongoingLoops.length && executionState._next && executionState._next instanceof PredictingProxy) {
|
2063 |
-
/* 169 */ hookupToProxy(executionState, executionState._next);
|
2064 |
-
/* 170 */ continue;
|
2065 |
-
/* 171 */ }
|
2066 |
-
/* 172 */ }
|
2067 |
-
/* 173 */ // go to next step
|
2068 |
-
/* 174 */ otherExecutionState = {
|
2069 |
-
/* 175 */ _context: executionState._next,
|
2070 |
-
/* 176 */ _method: executionState._method._next
|
2071 |
-
/* 177 */ };
|
2072 |
-
/* 178 */ // prevent automatic re-trigger in case of loops
|
2073 |
-
/* 179 */ executionState._canContinue = false;
|
2074 |
-
/* 180 */ // invoke callback method with given arguments
|
2075 |
-
/* 181 */ if (typeof executionState._callback == "function") {
|
2076 |
-
/* 182 */ executionState._callback.apply(executionState._context, loopCounts(ongoingLoops));
|
2077 |
-
/* 183 */ }
|
2078 |
-
/* 184 */ executionState = otherExecutionState;
|
2079 |
-
/* 185 */ }
|
2080 |
-
/* 186 */ } catch(e) {
|
2081 |
-
/* 187 */ /*
|
2082 |
-
/* 188 *| * We had a runtime exception.
|
2083 |
-
/* 189 *| * In plain JavaScript live the chain would break now.
|
2084 |
-
/* 190 *| * So we do, too.
|
2085 |
-
/* 191 *| */
|
2086 |
-
/* 192 */ preventRecursion = !preventRecursion;
|
2087 |
-
/* 193 */ throw e;
|
2088 |
-
/* 194 */ } finally {
|
2089 |
-
/* 195 */ preventRecursion = !preventRecursion;
|
2090 |
-
/* 196 */ }
|
2091 |
-
/* 197 */ return deferredReturnValue;
|
2092 |
-
/* 198 */ };
|
2093 |
-
/* 199 */ if (jQuery.Deferred) {
|
2094 |
-
/* 200 */ // add .promise() method to tic
|
2095 |
-
|
2096 |
-
/* jquery-timing.min.js */
|
2097 |
-
|
2098 |
-
/* 201 */ timedInvocationChain.promise = function(type, target){
|
2099 |
-
/* 202 */ var ret = (deferred = deferred || jQuery.Deferred()).promise(target);
|
2100 |
-
/* 203 */ timedInvocationChain();
|
2101 |
-
/* 204 */ return ret;
|
2102 |
-
/* 205 */ };
|
2103 |
-
/* 206 */ }
|
2104 |
-
/* 207 */ return timedInvocationChain;
|
2105 |
-
/* 208 */ }
|
2106 |
-
/* 209 */
|
2107 |
-
/* 210 */ /**
|
2108 |
-
/* 211 *| * Create a placeholder object to collect chained method calls.
|
2109 |
-
/* 212 *| *
|
2110 |
-
/* 213 *| * @author CreativeCouple
|
2111 |
-
/* 214 *| * @author Peter Liske
|
2112 |
-
/* 215 *| *
|
2113 |
-
/* 216 *| * @param context initial context
|
2114 |
-
/* 217 *| * @param methodStack a linked list that this placeholder will fill with call parameters
|
2115 |
-
/* 218 *| * @return the placeholder object
|
2116 |
-
/* 219 *| */
|
2117 |
-
/* 220 */ function PredictingProxy(context, methodStack, onStepCallback) {
|
2118 |
-
/* 221 */ this['.methods'] = methodStack;
|
2119 |
-
/* 222 */ this['.callback'] = onStepCallback;
|
2120 |
-
/* 223 */ this.length = 0;
|
2121 |
-
/* 224 */ Array.prototype.push.apply(this, jQuery.makeArray(this._ = context._ = context));
|
2122 |
-
/* 225 */
|
2123 |
-
/* 226 */ for (var key in context) {
|
2124 |
-
/* 227 */ if (!(key in PredictingProxy.prototype) && typeof context[key] == "function") {
|
2125 |
-
/* 228 */ this[key] = extendMockupPrototype(key);
|
2126 |
-
/* 229 */ }
|
2127 |
-
/* 230 */ }
|
2128 |
-
/* 231 */ }
|
2129 |
-
/* 232 */
|
2130 |
-
/* 233 */ // enabling jQuery.when(tic);
|
2131 |
-
/* 234 */ if (jQuery.Deferred) {
|
2132 |
-
/* 235 */ PredictingProxy.prototype.promise = function(type, target) {
|
2133 |
-
/* 236 */ if (typeof type == "object") {
|
2134 |
-
/* 237 */ target = type;
|
2135 |
-
/* 238 */ type = null;
|
2136 |
-
/* 239 */ }
|
2137 |
-
/* 240 */ return (this['.callback'] && typeof this['.callback'].promise == "function") ? this['.callback'].promise(type, target) : jQuery.Deferred().resolveWith(this).promise(target);
|
2138 |
-
/* 241 */ };
|
2139 |
-
/* 242 */ }
|
2140 |
-
/* 243 */
|
2141 |
-
/* 244 */ /**
|
2142 |
-
/* 245 *| * Create and return a new placeholder function on the prototype of PredictingProxy.
|
2143 |
-
/* 246 *| */
|
2144 |
-
/* 247 */ function extendMockupPrototype(name){
|
2145 |
-
/* 248 */ return PredictingProxy.prototype[name] = function(){
|
2146 |
-
/* 249 */ this['.methods']._name = name;
|
2147 |
-
/* 250 */ this['.methods']._arguments = arguments;
|
2148 |
-
|
2149 |
-
/* jquery-timing.min.js */
|
2150 |
-
|
2151 |
-
/* 251 */ this['.methods'] = this['.methods']._next = {};
|
2152 |
-
/* 252 */ return this['.callback'] ? this['.callback'](this, name, arguments) : this;
|
2153 |
-
/* 253 */ };
|
2154 |
-
/* 254 */ }
|
2155 |
-
/* 255 */
|
2156 |
-
/* 256 */
|
2157 |
-
/* 257 */ /**
|
2158 |
-
/* 258 *| * Create replacement methods for .bind(), .on(), .one(), .live(), and .delegate()
|
2159 |
-
/* 259 *| * that support chaining instead of giving a callback function.
|
2160 |
-
/* 260 *| */
|
2161 |
-
/* 261 */ jQuery.each(['bind','on','one','live','delegate'], function(index, name){
|
2162 |
-
/* 262 */ if (jQuery.fn[name]) {
|
2163 |
-
/* 263 */ var original = jQuery.fn[name];
|
2164 |
-
/* 264 */ jQuery.fn[name] = function(){
|
2165 |
-
/* 265 */ var i, methodStack, placeholder, timedInvocationChain, deferred, context = this;
|
2166 |
-
/* 266 */ for(i=0; i<arguments.length; i++) {
|
2167 |
-
/* 267 */ if (typeof arguments[i] == "function" || (arguments[i] && typeof arguments[i] == "object") || arguments[i] === false) {
|
2168 |
-
/* 268 */ if (arguments[i] !== jQuery) {
|
2169 |
-
/* 269 */ // fix for jQuery 1.6 .one() + .unbind()
|
2170 |
-
/* 270 */ if (typeof arguments[i] == "function" && jQuery.guid) {
|
2171 |
-
/* 271 */ arguments[i].guid = arguments[i].guid || jQuery.guid++;
|
2172 |
-
/* 272 */ }
|
2173 |
-
/* 273 */ return original.apply(context, arguments);
|
2174 |
-
/* 274 */ }
|
2175 |
-
/* 275 */ break;
|
2176 |
-
/* 276 */ }
|
2177 |
-
/* 277 */ }
|
2178 |
-
/* 278 */ Array.prototype.splice.call(arguments, i, 1, function(){
|
2179 |
-
/* 279 */ timedInvocationChain = createTimedInvocationChain(context.$(this), methodStack, [{
|
2180 |
-
/* 280 */ _count: jQuery.extend(Array.prototype.shift.apply(arguments), arguments),
|
2181 |
-
/* 281 */ _allowPromise: true
|
2182 |
-
/* 282 */ }], function(elements){
|
2183 |
-
/* 283 */ placeholder.length = 0;
|
2184 |
-
/* 284 */ Array.prototype.push.apply(placeholder, elements);
|
2185 |
-
/* 285 */ });
|
2186 |
-
/* 286 */ if (deferred) {
|
2187 |
-
/* 287 */ timedInvocationChain.promise().then(deferred.resolve);
|
2188 |
-
/* 288 */ deferred = null;
|
2189 |
-
/* 289 */ }
|
2190 |
-
/* 290 */ return timedInvocationChain();
|
2191 |
-
/* 291 */ });
|
2192 |
-
/* 292 */ function fire(){
|
2193 |
-
/* 293 */ return timedInvocationChain ? timedInvocationChain(placeholder) : placeholder;
|
2194 |
-
/* 294 */ }
|
2195 |
-
/* 295 */ if (jQuery.Deferred) {
|
2196 |
-
/* 296 */ fire.promise = function(type, target){
|
2197 |
-
/* 297 */ if (typeof type == "object") {
|
2198 |
-
/* 298 */ target = type;
|
2199 |
-
/* 299 */ type = null;
|
2200 |
-
/* 300 */ }
|
2201 |
-
|
2202 |
-
/* jquery-timing.min.js */
|
2203 |
-
|
2204 |
-
/* 301 */ return (timedInvocationChain && !type) ? timedInvocationChain.promise(type, target) : (deferred = deferred || jQuery.Deferred()).promise(target);
|
2205 |
-
/* 302 */ };
|
2206 |
-
/* 303 */ }
|
2207 |
-
/* 304 */ return placeholder = new PredictingProxy(original.apply(context, arguments), methodStack = {}, fire);
|
2208 |
-
/* 305 */ };
|
2209 |
-
/* 306 */ }
|
2210 |
-
/* 307 */ });
|
2211 |
-
/* 308 */
|
2212 |
-
/* 309 */ /**
|
2213 |
-
/* 310 *| * Create replacement method for .animate() and .load()
|
2214 |
-
/* 311 *| * that support chaining if $ is given as callback function.
|
2215 |
-
/* 312 *| */
|
2216 |
-
/* 313 */ jQuery.each(['animate','load'], function(index, name){
|
2217 |
-
/* 314 */ if (jQuery.fn[name]) {
|
2218 |
-
/* 315 */ var original = jQuery.fn[name];
|
2219 |
-
/* 316 */ jQuery.fn[name] = function(){
|
2220 |
-
/* 317 */ while (arguments.length && arguments[arguments.length-1] == null) {
|
2221 |
-
/* 318 */ Array.prototype.pop.apply(arguments);
|
2222 |
-
/* 319 */ }
|
2223 |
-
/* 320 */ if (this.length && arguments.length > 1 && arguments[arguments.length-1] === jQuery) {
|
2224 |
-
/* 321 */ var event = '_timing'+tuid++;
|
2225 |
-
/* 322 */ arguments[arguments.length-1] = function(){
|
2226 |
-
/* 323 */ jQuery(this).trigger(event);
|
2227 |
-
/* 324 */ };
|
2228 |
-
/* 325 */ return this.each().one(event).all(original.apply(this, arguments));
|
2229 |
-
/* 326 */ }
|
2230 |
-
/* 327 */ return original.apply(this, arguments);
|
2231 |
-
/* 328 */ };
|
2232 |
-
/* 329 */ }
|
2233 |
-
/* 330 */ });
|
2234 |
-
/* 331 */
|
2235 |
-
/* 332 */ /**
|
2236 |
-
/* 333 *| * Define new methods .wait(), .repeat(), .join(), .then()
|
2237 |
-
/* 334 *| * which will always start a new TIC if invoked outside of a TIC.
|
2238 |
-
/* 335 *| */
|
2239 |
-
/* 336 */ jQuery.each(['wait','repeat','join','then'], function(index, name){
|
2240 |
-
/* 337 */ jQuery.fn[name] = function(){
|
2241 |
-
/* 338 */ var methodStack = {},
|
2242 |
-
/* 339 */ placeholder = new PredictingProxy(this, methodStack, createTimedInvocationChain(this, methodStack, [], function(elements){
|
2243 |
-
/* 340 */ placeholder.length = 0;
|
2244 |
-
/* 341 */ Array.prototype.push.apply(placeholder, elements);
|
2245 |
-
/* 342 */ }));
|
2246 |
-
/* 343 */ return placeholder[name].apply(placeholder, arguments);
|
2247 |
-
/* 344 */ };
|
2248 |
-
/* 345 */ });
|
2249 |
-
/* 346 */
|
2250 |
-
/* 347 */ /**
|
2251 |
-
/* 348 *| * Define to wait for joining all animation queues.
|
2252 |
-
/* 349 *| *
|
2253 |
-
/* 350 *| * @param timedInvocationChain
|
2254 |
-
|
2255 |
-
/* jquery-timing.min.js */
|
2256 |
-
|
2257 |
-
/* 351 *| * @param executionState
|
2258 |
-
/* 352 *| */
|
2259 |
-
/* 353 */ jQuery.fn.join.timing = function(timedInvocationChain, executionState) {
|
2260 |
-
/* 354 */ var queueName,
|
2261 |
-
/* 355 */ promising,
|
2262 |
-
/* 356 */ waitingElements = executionState._context.length;
|
2263 |
-
/* 357 */
|
2264 |
-
/* 358 */ if (typeof executionState._method._arguments[0] == "string") {
|
2265 |
-
/* 359 */ queueName = executionState._method._arguments[0];
|
2266 |
-
/* 360 */ if (typeof executionState._method._arguments[1] == "function") {
|
2267 |
-
/* 361 */ executionState._callback = executionState._method._arguments[1];
|
2268 |
-
/* 362 */ } else {
|
2269 |
-
/* 363 */ promising = executionState._method._arguments[1];
|
2270 |
-
/* 364 */ executionState._callback = executionState._method._arguments[2];
|
2271 |
-
/* 365 */ }
|
2272 |
-
/* 366 */ } else {
|
2273 |
-
/* 367 */ if (typeof executionState._method._arguments[0] == "function") {
|
2274 |
-
/* 368 */ executionState._callback = executionState._method._arguments[0];
|
2275 |
-
/* 369 */ } else {
|
2276 |
-
/* 370 */ promising = executionState._method._arguments[0];
|
2277 |
-
/* 371 */ executionState._callback = executionState._method._arguments[1];
|
2278 |
-
/* 372 */ }
|
2279 |
-
/* 373 */ }
|
2280 |
-
/* 374 */
|
2281 |
-
/* 375 */ executionState._next = executionState._context;
|
2282 |
-
/* 376 */ executionState._canContinue = !waitingElements;
|
2283 |
-
/* 377 */
|
2284 |
-
/* 378 */ // wait for each element to reach the current end of its queue
|
2285 |
-
/* 379 */ if (promising) {
|
2286 |
-
/* 380 */ executionState._context.promise(queueName == null ? 'fx' : queueName).then(function(){
|
2287 |
-
/* 381 */ executionState._canContinue = true;
|
2288 |
-
/* 382 */ timedInvocationChain();
|
2289 |
-
/* 383 */ });
|
2290 |
-
/* 384 */ } else {
|
2291 |
-
/* 385 */ executionState._context.queue(queueName == null ? 'fx' : queueName, function(next){
|
2292 |
-
/* 386 */ executionState._canContinue = !--waitingElements;
|
2293 |
-
/* 387 */ timedInvocationChain();
|
2294 |
-
/* 388 */ next();
|
2295 |
-
/* 389 */ });
|
2296 |
-
/* 390 */ }
|
2297 |
-
/* 391 */ };
|
2298 |
-
/* 392 */
|
2299 |
-
/* 393 */ /**
|
2300 |
-
/* 394 *| * Define to simply run callback method for .then()
|
2301 |
-
/* 395 *| *
|
2302 |
-
/* 396 *| * @param timedInvocationChain
|
2303 |
-
/* 397 *| * @param executionState
|
2304 |
-
/* 398 *| */
|
2305 |
-
/* 399 */ jQuery.fn.then.timing = function(timedInvocationChain, executionState){
|
2306 |
-
/* 400 */ executionState._callback = executionState._method._arguments[0];
|
2307 |
-
|
2308 |
-
/* jquery-timing.min.js */
|
2309 |
-
|
2310 |
-
/* 401 */ executionState._next = executionState._context;
|
2311 |
-
/* 402 */ executionState._canContinue = true;
|
2312 |
-
/* 403 */ if (executionState._method._arguments[1]) {
|
2313 |
-
/* 404 */ Array.prototype.shift.apply(executionState._method._arguments);
|
2314 |
-
/* 405 */ }
|
2315 |
-
/* 406 */ };
|
2316 |
-
/* 407 */
|
2317 |
-
/* 408 */ /**
|
2318 |
-
/* 409 *| * Define timeout or binding to wait for.
|
2319 |
-
/* 410 *| *
|
2320 |
-
/* 411 *| * @param timedInvocationChain
|
2321 |
-
/* 412 *| * @param executionState
|
2322 |
-
/* 413 *| */
|
2323 |
-
/* 414 */ jQuery.fn.wait.timing = function(timedInvocationChain, executionState, ongoingLoops) {
|
2324 |
-
/* 415 */ var trigger, event, timeout, context = executionState._context;
|
2325 |
-
/* 416 */
|
2326 |
-
/* 417 */ trigger = executionState._method._arguments[0];
|
2327 |
-
/* 418 */ executionState._callback = executionState._method._arguments[1];
|
2328 |
-
/* 419 */
|
2329 |
-
/* 420 */ function triggerAction() {
|
2330 |
-
/* 421 */ originalOff.call(event ? originalOff.call(context, event, triggerAction) : context, 'unwait', unwaitAction);
|
2331 |
-
/* 422 */ executionState._canContinue = true;
|
2332 |
-
/* 423 */ executionState._next = sameOrNextJQuery(executionState._context, executionState._next);
|
2333 |
-
/* 424 */ timedInvocationChain();
|
2334 |
-
/* 425 */ }
|
2335 |
-
/* 426 */
|
2336 |
-
/* 427 */ function unwaitAction(evt, skipWait){
|
2337 |
-
/* 428 */ originalOff.call(event ? originalOff.call(jQuery(this), event, triggerAction) : jQuery(this), 'unwait', unwaitAction);
|
2338 |
-
/* 429 */ context = context.not(this);
|
2339 |
-
/* 430 */ if (!skipWait) {
|
2340 |
-
/* 431 */ executionState._next = executionState._next.not(this);
|
2341 |
-
/* 432 */ }
|
2342 |
-
/* 433 */ if (!context.length) {
|
2343 |
-
/* 434 */ executionState._canContinue = executionState._next.length;
|
2344 |
-
/* 435 */ executionState._next = sameOrNextJQuery(executionState._context, executionState._next);
|
2345 |
-
/* 436 */ window.clearTimeout(timeout);
|
2346 |
-
/* 437 */ executionState = { _context: context };
|
2347 |
-
/* 438 */ }
|
2348 |
-
/* 439 */ // just update the snapshot info
|
2349 |
-
/* 440 */ timedInvocationChain();
|
2350 |
-
/* 441 */ }
|
2351 |
-
/* 442 */
|
2352 |
-
/* 443 */ originalOn.call(context, 'unwait', unwaitAction);
|
2353 |
-
/* 444 */ executionState._next = context;
|
2354 |
-
/* 445 */
|
2355 |
-
/* 446 */ if (trigger == null || trigger == jQuery) {
|
2356 |
-
/* 447 */ trigger = context;
|
2357 |
-
/* 448 */ }
|
2358 |
-
/* 449 */ if (typeof trigger == "function") {
|
2359 |
-
/* 450 */ trigger = trigger.apply(context, loopCounts(ongoingLoops));
|
2360 |
-
|
2361 |
-
/* jquery-timing.min.js */
|
2362 |
-
|
2363 |
-
/* 451 */ }
|
2364 |
-
/* 452 */ if (typeof trigger == "string") {
|
2365 |
-
/* 453 */
|
2366 |
-
/* 454 */ originalOn.call(context, event = trigger, triggerAction);
|
2367 |
-
/* 455 */
|
2368 |
-
/* 456 */ } else if (trigger && typeof trigger.promise == "function") {
|
2369 |
-
/* 457 */
|
2370 |
-
/* 458 */ trigger.promise().then(triggerAction);
|
2371 |
-
/* 459 */
|
2372 |
-
/* 460 */ } else if (trigger && typeof trigger.then == "function") {
|
2373 |
-
/* 461 */
|
2374 |
-
/* 462 */ trigger.then(triggerAction, true);
|
2375 |
-
/* 463 */
|
2376 |
-
/* 464 */ } else {
|
2377 |
-
/* 465 */
|
2378 |
-
/* 466 */ timeout = window.setTimeout(triggerAction, Math.max(0,trigger));
|
2379 |
-
/* 467 */
|
2380 |
-
/* 468 */ }
|
2381 |
-
/* 469 */ };
|
2382 |
-
/* 470 */
|
2383 |
-
/* 471 */ /**
|
2384 |
-
/* 472 *| * Define to simply run callback method for .then()
|
2385 |
-
/* 473 *| *
|
2386 |
-
/* 474 *| * @param timedInvocationChain
|
2387 |
-
/* 475 *| * @param executionState
|
2388 |
-
/* 476 *| */
|
2389 |
-
/* 477 */ jQuery.fn.each = function(callback){
|
2390 |
-
/* 478 */ if (!callback || callback === jQuery) {
|
2391 |
-
/* 479 */ var methodStack = {},
|
2392 |
-
/* 480 */ placeholder = new PredictingProxy(this, methodStack, createTimedInvocationChain(this, methodStack, [], function(elements){
|
2393 |
-
/* 481 */ placeholder.length = 0;
|
2394 |
-
/* 482 */ Array.prototype.push.apply(placeholder, elements);
|
2395 |
-
/* 483 */ }));
|
2396 |
-
/* 484 */ return placeholder.each(callback);
|
2397 |
-
/* 485 */ }
|
2398 |
-
/* 486 */ return originalEach.apply(this, arguments);
|
2399 |
-
/* 487 */ };
|
2400 |
-
/* 488 */
|
2401 |
-
/* 489 */ /**
|
2402 |
-
/* 490 *| * Define interval or binding to repeat.
|
2403 |
-
/* 491 *| *
|
2404 |
-
/* 492 *| * @param timedInvocationChain
|
2405 |
-
/* 493 *| * @param executionState
|
2406 |
-
/* 494 *| */
|
2407 |
-
/* 495 */ jQuery.fn.each.timing = function(timedInvocationChain, executionState, ongoingLoops, onStepCallback) {
|
2408 |
-
/* 496 */ if (executionState._method._arguments[0] && executionState._method._arguments[0] !== jQuery) {
|
2409 |
-
/* 497 */ executionState._canContinue = true;
|
2410 |
-
/* 498 */ executionState._next = originalEach.apply(executionState._context, executionState._method._arguments);
|
2411 |
-
/* 499 */ return;
|
2412 |
-
/* 500 */ }
|
2413 |
-
|
2414 |
-
/* jquery-timing.min.js */
|
2415 |
-
|
2416 |
-
/* 501 */
|
2417 |
-
/* 502 */ var size = Math.max(executionState._context.length, 1),
|
2418 |
-
/* 503 */ finished = 0,
|
2419 |
-
/* 504 */ key, methodToGoOn, openLoopTimeout,
|
2420 |
-
/* 505 */ innerTICs = [],
|
2421 |
-
/* 506 */ innerElements = [],
|
2422 |
-
/* 507 */ proxyPlaceholder = jQuery.extend({}, executionState._context),
|
2423 |
-
/* 508 */ stepByStep = executionState._method._arguments[0] === jQuery;
|
2424 |
-
/* 509 */
|
2425 |
-
/* 510 */ if (stepByStep) {
|
2426 |
-
/* 511 */ window.setTimeout(function(){
|
2427 |
-
/* 512 */ openLoopTimeout = true;
|
2428 |
-
/* 513 */ timedInvocationChain();
|
2429 |
-
/* 514 */ },0);
|
2430 |
-
/* 515 */ }
|
2431 |
-
/* 516 */
|
2432 |
-
/* 517 */ function spreadAction(){
|
2433 |
-
/* 518 */ if (stepByStep) {
|
2434 |
-
/* 519 */ if (finished < size) {
|
2435 |
-
/* 520 */ (innerTICs[finished])();
|
2436 |
-
/* 521 */ }
|
2437 |
-
/* 522 */ } else {
|
2438 |
-
/* 523 */ for (var i=0; i<size; i++) {
|
2439 |
-
/* 524 */ (innerTICs[i])();
|
2440 |
-
/* 525 */ }
|
2441 |
-
/* 526 */ }
|
2442 |
-
/* 527 */ return proxyPlaceholder;
|
2443 |
-
/* 528 */ }
|
2444 |
-
/* 529 */
|
2445 |
-
/* 530 */ for (key in PredictingProxy.prototype) {
|
2446 |
-
/* 531 */ proxyPlaceholder[key] = spreadAction;
|
2447 |
-
/* 532 */ }
|
2448 |
-
/* 533 */ proxyPlaceholder.length = size;
|
2449 |
-
/* 534 */ for(key=0; key<size; key++) (function(index){
|
2450 |
-
/* 535 */ var innerLoops = ongoingLoops.slice(),
|
2451 |
-
/* 536 */ context = executionState._context.eq(index);
|
2452 |
-
/* 537 */ innerElements[index] = context.get();
|
2453 |
-
/* 538 */ innerLoops.unshift({
|
2454 |
-
/* 539 */ _count: index,
|
2455 |
-
/* 540 */ _allAction: function(state){
|
2456 |
-
/* 541 */ finished++;
|
2457 |
-
/* 542 */ if (finished == size) {
|
2458 |
-
/* 543 */ methodToGoOn = state._method._next;
|
2459 |
-
/* 544 */ }
|
2460 |
-
/* 545 */ timedInvocationChain();
|
2461 |
-
/* 546 */ },
|
2462 |
-
/* 547 */ _fixOpenLoop: loopEndMethods.all,
|
2463 |
-
/* 548 */ _openEndAction: function(tic, state){
|
2464 |
-
/* 549 */ if (openLoopTimeout) {
|
2465 |
-
/* 550 */ finished++;
|
2466 |
-
|
2467 |
-
/* jquery-timing.min.js */
|
2468 |
-
|
2469 |
-
/* 551 */ if (finished == size) {
|
2470 |
-
/* 552 */ methodToGoOn = state._method;
|
2471 |
-
/* 553 */ }
|
2472 |
-
/* 554 */ timedInvocationChain();
|
2473 |
-
/* 555 */ }
|
2474 |
-
/* 556 */ }
|
2475 |
-
/* 557 */ });
|
2476 |
-
/* 558 */ innerTICs[index] = createTimedInvocationChain(context, executionState._method._next, innerLoops, function(elements){
|
2477 |
-
/* 559 */ innerElements[index] = elements;
|
2478 |
-
/* 560 */ proxyPlaceholder.length = 0;
|
2479 |
-
/* 561 */ for (var i=0; i<size; i++) {
|
2480 |
-
/* 562 */ Array.prototype.push.apply(proxyPlaceholder, innerElements[i]);
|
2481 |
-
/* 563 */ }
|
2482 |
-
/* 564 */ if (onStepCallback)
|
2483 |
-
/* 565 */ onStepCallback(jQuery.makeArray(proxyPlaceholder));
|
2484 |
-
/* 566 */ });
|
2485 |
-
/* 567 */ })(key);
|
2486 |
-
/* 568 */
|
2487 |
-
/* 569 */ executionState._next = proxyPlaceholder;
|
2488 |
-
/* 570 */ executionState._canContinue = true;
|
2489 |
-
/* 571 */ executionState._openEndAction = function(tic, state){
|
2490 |
-
/* 572 */ if (finished == size) {
|
2491 |
-
/* 573 */ ongoingLoops.shift();
|
2492 |
-
/* 574 */ return {
|
2493 |
-
/* 575 */ _context: sameOrNextJQuery(executionState._context, proxyPlaceholder),
|
2494 |
-
/* 576 */ _method: methodToGoOn
|
2495 |
-
/* 577 */ };
|
2496 |
-
/* 578 */ }
|
2497 |
-
/* 579 */ var finishedBefore = finished;
|
2498 |
-
/* 580 */ spreadAction();
|
2499 |
-
/* 581 */ if (finished != finishedBefore) {
|
2500 |
-
/* 582 */ return state;
|
2501 |
-
/* 583 */ }
|
2502 |
-
/* 584 */ };
|
2503 |
-
/* 585 */ executionState._count = size;
|
2504 |
-
/* 586 */
|
2505 |
-
/* 587 */ ongoingLoops.unshift(executionState);
|
2506 |
-
/* 588 */ };
|
2507 |
-
/* 589 */
|
2508 |
-
/* 590 */ loopEndMethods.all = function(executionState){
|
2509 |
-
/* 591 */ jQuery.extend(executionState._method, {
|
2510 |
-
/* 592 */ _next: jQuery.extend({}, executionState._method),
|
2511 |
-
/* 593 */ _name: 'all',
|
2512 |
-
/* 594 */ _arguments: []
|
2513 |
-
/* 595 */ });
|
2514 |
-
/* 596 */ executionState._canContinue = null;
|
2515 |
-
/* 597 */ };
|
2516 |
-
/* 598 */ loopEndMethods.all.timing = function(timedInvocationChain, executionState, ongoingLoops) {
|
2517 |
-
/* 599 */ if (!ongoingLoops.length || !ongoingLoops[0]._fixOpenLoop) {
|
2518 |
-
/* 600 */ throw '.all() method must be used after .each() only';
|
2519 |
-
|
2520 |
-
/* jquery-timing.min.js */
|
2521 |
-
|
2522 |
-
/* 601 */ }
|
2523 |
-
/* 602 */ if (!ongoingLoops[0]._allAction) {
|
2524 |
-
/* 603 */ ongoingLoops[0]._fixOpenLoop(executionState);
|
2525 |
-
/* 604 */ return;
|
2526 |
-
/* 605 */ }
|
2527 |
-
/* 606 */
|
2528 |
-
/* 607 */ ongoingLoops[0]._allAction(executionState);
|
2529 |
-
/* 608 */ };
|
2530 |
-
/* 609 */
|
2531 |
-
/* 610 */ /**
|
2532 |
-
/* 611 *| * Define interval or binding to repeat.
|
2533 |
-
/* 612 *| *
|
2534 |
-
/* 613 *| * @param timedInvocationChain
|
2535 |
-
/* 614 *| * @param executionState
|
2536 |
-
/* 615 *| */
|
2537 |
-
/* 616 */ jQuery.fn.repeat.timing = function(timedInvocationChain, executionState, ongoingLoops) {
|
2538 |
-
/* 617 */ var trigger,
|
2539 |
-
/* 618 */ firstRunNow,
|
2540 |
-
/* 619 */ openLoopTimeout,
|
2541 |
-
/* 620 */ event,
|
2542 |
-
/* 621 */ interval;
|
2543 |
-
/* 622 */
|
2544 |
-
/* 623 */ if (typeof executionState._method._arguments[0] == "function") {
|
2545 |
-
/* 624 */ executionState._callback = executionState._method._arguments[0];
|
2546 |
-
/* 625 */ } else if (typeof executionState._method._arguments[1] == "function") {
|
2547 |
-
/* 626 */ trigger = executionState._method._arguments[0];
|
2548 |
-
/* 627 */ executionState._callback = executionState._method._arguments[1];
|
2549 |
-
/* 628 */ } else {
|
2550 |
-
/* 629 */ trigger = executionState._method._arguments[0];
|
2551 |
-
/* 630 */ firstRunNow = executionState._method._arguments[1];
|
2552 |
-
/* 631 */ executionState._callback = executionState._method._arguments[2];
|
2553 |
-
/* 632 */ }
|
2554 |
-
/* 633 */
|
2555 |
-
/* 634 */ function triggerAction() {
|
2556 |
-
/* 635 */ executionState._next = executionState._next || executionState._context;
|
2557 |
-
/* 636 */ executionState._canContinue = true;
|
2558 |
-
/* 637 */ timedInvocationChain();
|
2559 |
-
/* 638 */ }
|
2560 |
-
/* 639 */
|
2561 |
-
/* 640 */ function unrepeatAction(){
|
2562 |
-
/* 641 */ originalOff.call(event ? originalOff.call(jQuery(this), event, triggerAction) : jQuery(this), 'unrepeat', unrepeatAction);
|
2563 |
-
/* 642 */ var context = executionState._context.not(this);
|
2564 |
-
/* 643 */ executionState._next = (executionState._next == executionState._context) ? context : executionState._next;
|
2565 |
-
/* 644 */ executionState._context = context;
|
2566 |
-
/* 645 */ executionState._canContinue = executionState._context.length && executionState._canContinue;
|
2567 |
-
/* 646 */ trigger = executionState._context.length && trigger;
|
2568 |
-
/* 647 */ window.clearInterval(!executionState._context.length && interval);
|
2569 |
-
/* 648 */ // just update the snapshot info
|
2570 |
-
/* 649 */ timedInvocationChain();
|
2571 |
-
/* 650 */ }
|
2572 |
-
|
2573 |
-
/* jquery-timing.min.js */
|
2574 |
-
|
2575 |
-
/* 651 */
|
2576 |
-
/* 652 */ executionState._openEndAction = function(tic, state){
|
2577 |
-
/* 653 */ if (executionState._canContinue || openLoopTimeout) {
|
2578 |
-
/* 654 */ executionState._count++;
|
2579 |
-
/* 655 */ executionState._next = executionState._next || executionState._context;
|
2580 |
-
/* 656 */ executionState._canContinue = executionState._canContinue || (trigger && state._context && state._context.length);
|
2581 |
-
/* 657 */ return executionState;
|
2582 |
-
/* 658 */ }
|
2583 |
-
/* 659 */ };
|
2584 |
-
/* 660 */
|
2585 |
-
/* 661 */ if (trigger == null) {
|
2586 |
-
/* 662 */
|
2587 |
-
/* 663 */ firstRunNow = trigger = true;
|
2588 |
-
/* 664 */ window.setTimeout(function(){
|
2589 |
-
/* 665 */ openLoopTimeout = true;
|
2590 |
-
/* 666 */ timedInvocationChain();
|
2591 |
-
/* 667 */ },0);
|
2592 |
-
/* 668 */
|
2593 |
-
/* 669 */ } else {
|
2594 |
-
/* 670 */ if (typeof trigger == "string") {
|
2595 |
-
/* 671 */ originalOn.call(executionState._context, event = trigger, triggerAction);
|
2596 |
-
/* 672 */ } else {
|
2597 |
-
/* 673 */ interval = window.setInterval(triggerAction, Math.max(0, trigger));
|
2598 |
-
/* 674 */ }
|
2599 |
-
/* 675 */ trigger = false;
|
2600 |
-
/* 676 */ }
|
2601 |
-
/* 677 */
|
2602 |
-
/* 678 */ originalOn.call(executionState._context, 'unrepeat', unrepeatAction);
|
2603 |
-
/* 679 */
|
2604 |
-
/* 680 */ executionState._next = executionState._context;
|
2605 |
-
/* 681 */ executionState._count = 0;
|
2606 |
-
/* 682 */ executionState._untilAction = function(end){
|
2607 |
-
/* 683 */ if (end) {
|
2608 |
-
/* 684 */ unrepeatAction.apply(executionState._context);
|
2609 |
-
/* 685 */ }
|
2610 |
-
/* 686 */ if (trigger) {
|
2611 |
-
/* 687 */ triggerAction();
|
2612 |
-
/* 688 */ }
|
2613 |
-
/* 689 */ };
|
2614 |
-
/* 690 */ executionState._fixOpenLoop = loopEndMethods.until;
|
2615 |
-
/* 691 */
|
2616 |
-
/* 692 */ if (firstRunNow) {
|
2617 |
-
/* 693 */ triggerAction();
|
2618 |
-
/* 694 */ }
|
2619 |
-
/* 695 */
|
2620 |
-
/* 696 */ ongoingLoops.unshift(executionState);
|
2621 |
-
/* 697 */ };
|
2622 |
-
/* 698 */
|
2623 |
-
/* 699 */ /**
|
2624 |
-
/* 700 *| * Defined to evaluate condition when calling .until()
|
2625 |
-
|
2626 |
-
/* jquery-timing.min.js */
|
2627 |
-
|
2628 |
-
/* 701 *| */
|
2629 |
-
/* 702 */ loopEndMethods.until = function(executionState){
|
2630 |
-
/* 703 */ jQuery.extend(executionState._method, {
|
2631 |
-
/* 704 */ _next: jQuery.extend({}, executionState._method),
|
2632 |
-
/* 705 */ _name: 'until',
|
2633 |
-
/* 706 */ _arguments: []
|
2634 |
-
/* 707 */ });
|
2635 |
-
/* 708 */ executionState._canContinue = null;
|
2636 |
-
/* 709 */ };
|
2637 |
-
/* 710 */ loopEndMethods.until.timing = function(timedInvocationChain, executionState, ongoingLoops) {
|
2638 |
-
/* 711 */ if (!ongoingLoops.length || !ongoingLoops[0]._fixOpenLoop) {
|
2639 |
-
/* 712 */ throw '.until() method must be used after .repeat() only';
|
2640 |
-
/* 713 */ }
|
2641 |
-
/* 714 */ if (!ongoingLoops[0]._untilAction) {
|
2642 |
-
/* 715 */ ongoingLoops[0]._fixOpenLoop(executionState);
|
2643 |
-
/* 716 */ return;
|
2644 |
-
/* 717 */ }
|
2645 |
-
/* 718 */
|
2646 |
-
/* 719 */ var condition = executionState._method._arguments[0],
|
2647 |
-
/* 720 */ loopContext = executionState._method._arguments[1];
|
2648 |
-
/* 721 */ if (condition === jQuery) {
|
2649 |
-
/* 722 */ condition = null;
|
2650 |
-
/* 723 */ loopContext = executionState._method._arguments.length <= 1 || loopContext;
|
2651 |
-
/* 724 */ }
|
2652 |
-
/* 725 */ if (typeof condition == "function") {
|
2653 |
-
/* 726 */ condition = condition.apply(executionState._context, loopCounts(ongoingLoops));
|
2654 |
-
/* 727 */ }
|
2655 |
-
/* 728 */ if (condition == null) {
|
2656 |
-
/* 729 */ condition = !executionState._context.size();
|
2657 |
-
/* 730 */ }
|
2658 |
-
/* 731 */ if (typeof condition == "object") {
|
2659 |
-
/* 732 */ condition = condition.toString();
|
2660 |
-
/* 733 */ }
|
2661 |
-
/* 734 */ if (typeof condition == "number") {
|
2662 |
-
/* 735 */ condition = ongoingLoops[0]._count >= condition-1;
|
2663 |
-
/* 736 */ }
|
2664 |
-
/* 737 */ if (condition) {
|
2665 |
-
/* 738 */ executionState._canContinue = true;
|
2666 |
-
/* 739 */ executionState._next = executionState._context;
|
2667 |
-
/* 740 */ ongoingLoops.shift()._untilAction(condition);
|
2668 |
-
/* 741 */ } else {
|
2669 |
-
/* 742 */ if (loopContext) {
|
2670 |
-
/* 743 */ ongoingLoops[0]._next = executionState._context;
|
2671 |
-
/* 744 */ }
|
2672 |
-
/* 745 */ executionState = ongoingLoops[0];
|
2673 |
-
/* 746 */ executionState._count++;
|
2674 |
-
/* 747 */ executionState._untilAction(condition);
|
2675 |
-
/* 748 */ return executionState;
|
2676 |
-
/* 749 */ }
|
2677 |
-
/* 750 */ };
|
2678 |
-
|
2679 |
-
/* jquery-timing.min.js */
|
2680 |
-
|
2681 |
-
/* 751 */
|
2682 |
-
/* 752 */ // support .until() and .all()
|
2683 |
-
/* 753 */ new PredictingProxy(loopEndMethods);
|
2684 |
-
/* 754 */
|
2685 |
-
/* 755 */ /**
|
2686 |
-
/* 756 *| * Define unwait and unrepeat methods.
|
2687 |
-
/* 757 *| */
|
2688 |
-
/* 758 */ jQuery.each(['unwait','unrepeat'], function(index, name){
|
2689 |
-
/* 759 */ jQuery.fn[name] = function(){
|
2690 |
-
/* 760 */ return this.trigger(name, arguments);
|
2691 |
-
/* 761 */ };
|
2692 |
-
/* 762 */ });
|
2693 |
-
/* 763 */
|
2694 |
-
/* 764 */ /**
|
2695 |
-
/* 765 *| * define all static timing methods:
|
2696 |
-
/* 766 *| * $.wait, $.repeat ,$.join, $.then, $.unwait, $.unrepeat
|
2697 |
-
/* 767 *| */
|
2698 |
-
/* 768 */ jQuery.each(['wait','repeat','join','then','unwait','unrepeat'], function(index, name){
|
2699 |
-
/* 769 */ jQuery[name] = function(){
|
2700 |
-
/* 770 */ var group = typeof arguments[0] == "string" ? Array.prototype.shift.apply(arguments) : '';
|
2701 |
-
/* 771 */ return jQuery.fn[name].apply(THREAD_GROUPS[group] = (THREAD_GROUPS[group] || jQuery('<div>').text(group)), arguments);
|
2702 |
-
/* 772 */ };
|
2703 |
-
/* 773 */ });
|
2704 |
-
/* 774 */
|
2705 |
-
/* 775 */ /**
|
2706 |
-
/* 776 *| * X defines deferred variables that can be used in timed invocation chains
|
2707 |
-
/* 777 *| *
|
2708 |
-
/* 778 *| * @author CreativeCouple
|
2709 |
-
/* 779 *| * @author Peter Liske
|
2710 |
-
/* 780 *| */
|
2711 |
-
/* 781 */ function X(compute, Var, calculation){
|
2712 |
-
/* 782 */ if (typeof compute == "string") {
|
2713 |
-
/* 783 */ calculation = new Function('x','return ['+compute+'\n,x]');
|
2714 |
-
/* 784 */ compute = function(x, result){
|
2715 |
-
/* 785 */ result = calculation(x);
|
2716 |
-
/* 786 */ callbackVariable.x = result[1];
|
2717 |
-
/* 787 */ return result[0];
|
2718 |
-
/* 788 */ };
|
2719 |
-
/* 789 */ }
|
2720 |
-
/* 790 */ var hasRelatedVariable = typeof Var == "function",
|
2721 |
-
/* 791 */ hasComputation = typeof compute == "function",
|
2722 |
-
/* 792 */
|
2723 |
-
/* 793 */ callbackVariable = function(value) {
|
2724 |
-
/* 794 */ if (arguments.length == 1) {
|
2725 |
-
/* 795 */ callbackVariable.x = value;
|
2726 |
-
/* 796 */ if (hasRelatedVariable) {
|
2727 |
-
/* 797 */ Var(value);
|
2728 |
-
/* 798 */ }
|
2729 |
-
/* 799 */ } else {
|
2730 |
-
/* 800 */ return evaluate();
|
2731 |
-
|
2732 |
-
/* jquery-timing.min.js */
|
2733 |
-
|
2734 |
-
/* 801 */ }
|
2735 |
-
/* 802 */ };
|
2736 |
-
/* 803 */ function evaluate(value){
|
2737 |
-
/* 804 */ value = hasRelatedVariable ? Var() : callbackVariable.x;
|
2738 |
-
/* 805 */ return hasComputation ? compute(value) : value;
|
2739 |
-
/* 806 */ }
|
2740 |
-
/* 807 */
|
2741 |
-
/* 808 */ callbackVariable.x = 0;
|
2742 |
-
/* 809 */ callbackVariable._ = { toString: callbackVariable.$ = callbackVariable.toString = evaluate.toString = evaluate };
|
2743 |
-
/* 810 */ callbackVariable.mod = function(val){
|
2744 |
-
/* 811 */ return X(function(x){
|
2745 |
-
/* 812 */ return x % val;
|
2746 |
-
/* 813 */ }, callbackVariable);
|
2747 |
-
/* 814 */ };
|
2748 |
-
/* 815 */ callbackVariable.add = function(val){
|
2749 |
-
/* 816 */ return X(function(x){
|
2750 |
-
/* 817 */ return x + val;
|
2751 |
-
/* 818 */ }, callbackVariable);
|
2752 |
-
/* 819 */ };
|
2753 |
-
/* 820 */ callbackVariable.neg = function(){
|
2754 |
-
/* 821 */ return X('-x', callbackVariable);
|
2755 |
-
/* 822 */ };
|
2756 |
-
/* 823 */ // $$ only for backward compatibility
|
2757 |
-
/* 824 */ callbackVariable.$$ = callbackVariable.X = function(compute){
|
2758 |
-
/* 825 */ return X(compute, callbackVariable);
|
2759 |
-
/* 826 */ };
|
2760 |
-
/* 827 */ jQuery.each('abcdefghij', function(index, character){
|
2761 |
-
/* 828 */ callbackVariable[index] = callbackVariable[character] = function(){
|
2762 |
-
/* 829 */ callbackVariable(arguments[index]);
|
2763 |
-
/* 830 */ };
|
2764 |
-
/* 831 */ });
|
2765 |
-
/* 832 */
|
2766 |
-
/* 833 */ return callbackVariable;
|
2767 |
-
/* 834 */ };
|
2768 |
-
/* 835 */
|
2769 |
-
/* 836 */ // $$ only for backward compatibility
|
2770 |
-
/* 837 */ window.$$ = jQuery.$$ = jQuery.X = X;
|
2771 |
-
/* 838 */
|
2772 |
-
/* 839 */ /**
|
2773 |
-
/* 840 *| * Define chained version of $().
|
2774 |
-
/* 841 *| * This allows to use .end() to come back to previous jQuery selection.
|
2775 |
-
/* 842 *| */
|
2776 |
-
/* 843 */ jQuery.fn.$ = function(){
|
2777 |
-
/* 844 */ var ret = jQuery.apply(window, arguments);
|
2778 |
-
/* 845 */ ret.prevObject = this;
|
2779 |
-
/* 846 */ return ret;
|
2780 |
-
/* 847 */ };
|
2781 |
-
/* 848 */
|
2782 |
-
/* 849 */ })(jQuery, window);
|
2783 |
-
|
2784 |
-
;
|
2785 |
-
/* jquery-center.js */
|
2786 |
-
|
2787 |
-
/* 1 */ (function(jQuery, window){
|
2788 |
-
/* 2 */
|
2789 |
-
/* 3 */ jQuery.fn.center = function () {
|
2790 |
-
/* 4 */ this.css("position","absolute");
|
2791 |
-
/* 5 */ this.css("top", Math.max(0, ((jQuery(window).height() - jQuery(this).outerHeight()) / 2) +
|
2792 |
-
/* 6 */ jQuery(window).scrollTop()) + "px");
|
2793 |
-
/* 7 */ this.css("left", Math.max(0, ((jQuery(window).width() - jQuery(this).outerWidth()) / 2) +
|
2794 |
-
/* 8 */ jQuery(window).scrollLeft()) + "px");
|
2795 |
-
/* 9 */ return this;
|
2796 |
-
/* 10 */ }
|
2797 |
-
/* 11 */
|
2798 |
-
/* 12 */ })(jQuery, window);
|
2799 |
-
|
2800 |
-
;
|
2801 |
-
/* sk_wp.js */
|
2802 |
-
|
2803 |
-
/* 1 */
|
2804 |
-
/* 2 */ jQuery(document).ready(function($) {
|
2805 |
-
/* 3 */ window.sidekickWP = new SidekickWP.Models.App({
|
2806 |
-
/* 4 */ show_toggle_feedback: true
|
2807 |
-
/* 5 */ });
|
2808 |
-
/* 6 */ console.log('window.sidekickWP %o', window.sidekickWP);
|
2809 |
-
/* 7 */ // jQuery('#logo').trigger('click');
|
2810 |
-
/* 8 */ });
|
2811 |
-
/* 9 */
|
1 |
+
/*! sidekick - v1.2 - 2014-04-29 */(function(jQuery, window){
|
2 |
+
|
3 |
+
jQuery.fn.center = function () {
|
4 |
+
this.css("position","absolute");
|
5 |
+
this.css("top", Math.max(0, ((jQuery(window).height() - jQuery(this).outerHeight()) / 2) +
|
6 |
+
jQuery(window).scrollTop()) + "px");
|
7 |
+
this.css("left", Math.max(0, ((jQuery(window).width() - jQuery(this).outerWidth()) / 2) +
|
8 |
+
jQuery(window).scrollLeft()) + "px");
|
9 |
+
return this;
|
10 |
+
}
|
11 |
+
|
12 |
+
})(jQuery, window);;// http://stackoverflow.com/questions/1225102/jquery-event-to-trigger-action-when-a-div-is-made-visible
|
13 |
+
|
14 |
+
(function ($, document, undefined) {
|
15 |
+
|
16 |
+
|
17 |
+
|
18 |
+
var _oldShow = $.fn.show;
|
19 |
+
|
20 |
+
$.fn.show = function(speed, oldCallback) {
|
21 |
+
return $(this).each(function() {
|
22 |
+
var obj = $(this),
|
23 |
+
newCallback = function() {
|
24 |
+
if ($.isFunction(oldCallback)) {
|
25 |
+
oldCallback.apply(obj);
|
26 |
+
}
|
27 |
+
obj.trigger('afterShow');
|
28 |
+
};
|
29 |
+
|
30 |
+
// you can trigger a before show if you want
|
31 |
+
obj.trigger('beforeShow');
|
32 |
+
|
33 |
+
// now use the old function to show the element passing the new callback
|
34 |
+
_oldShow.apply(obj, [speed, newCallback]);
|
35 |
+
});
|
36 |
+
};
|
37 |
+
|
38 |
+
})(jQuery, document);;/**
|
39 |
+
|
40 |
+
* timing.jquery.js
|
41 |
+
*
|
42 |
+
* JavaScript functions for waiting / repeating / stopping jQuery actions.
|
43 |
+
*
|
44 |
+
* This code is published under the MIT License (MIT).
|
45 |
+
* http://www.opensource.org/licenses/mit-license.php
|
46 |
+
*
|
47 |
+
* For examples, reference, and other information see
|
48 |
+
* http://creativecouple.github.com/jquery-timing/
|
49 |
+
*
|
50 |
+
* @author CreativeCouple
|
51 |
+
* @author Peter Liske
|
52 |
+
* @copyright (c) 2011 by CreativeCouple
|
53 |
+
* @see http://creativecouple.github.com/jquery-timing/
|
54 |
+
*/
|
55 |
+
|
56 |
+
(function(jQuery, window){
|
57 |
+
/**
|
58 |
+
* object to store statically invoked threads
|
59 |
+
*/
|
60 |
+
var THREAD_GROUPS = {},
|
61 |
+
|
62 |
+
/**
|
63 |
+
* unique timing identifier for different purposes
|
64 |
+
*/
|
65 |
+
tuid = 1,
|
66 |
+
|
67 |
+
/**
|
68 |
+
* remember original core function $.each()
|
69 |
+
*/
|
70 |
+
originalEach = jQuery.fn.each,
|
71 |
+
|
72 |
+
/**
|
73 |
+
* remember original core function $.on() (or $.bind())
|
74 |
+
*/
|
75 |
+
originalOn = jQuery.fn.on || jQuery.fn.bind,
|
76 |
+
|
77 |
+
/**
|
78 |
+
* remember original core function $.off() (or $.unbind())
|
79 |
+
*/
|
80 |
+
originalOff = jQuery.fn.off || jQuery.fn.unbind,
|
81 |
+
|
82 |
+
/**
|
83 |
+
* .until() and .all() have special meanings
|
84 |
+
*/
|
85 |
+
loopEndMethods = {};
|
86 |
+
|
87 |
+
function sameOrNextJQuery(before, after) {
|
88 |
+
after = jQuery(after);
|
89 |
+
after.prevObject = before;
|
90 |
+
var i = before.length;
|
91 |
+
if (i !== after.length) {
|
92 |
+
return after;
|
93 |
+
}
|
94 |
+
while (i--) {
|
95 |
+
if (before[i] !== after[i]) {
|
96 |
+
return after;
|
97 |
+
}
|
98 |
+
}
|
99 |
+
return before;
|
100 |
+
}
|
101 |
+
|
102 |
+
function loopCounts(loops) {
|
103 |
+
var ret = [], i = loops.length;
|
104 |
+
while (i--) {
|
105 |
+
ret[i] = loops[i]._count;
|
106 |
+
}
|
107 |
+
return ret;
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Initialize a new timed invocation chain.
|
112 |
+
*
|
113 |
+
* @author CreativeCouple
|
114 |
+
* @author Peter Liske
|
115 |
+
*
|
116 |
+
* @param context initial context
|
117 |
+
* @param methodStack linked list of methods that has been or will be filled by someone else
|
118 |
+
* @param ongoingLoops optional arguments for callback parameters
|
119 |
+
* @param onStepCallback function to call on each step
|
120 |
+
* @returns the timed invocation chain method
|
121 |
+
*/
|
122 |
+
function createTimedInvocationChain(context, methodStack, ongoingLoops, onStepCallback) {
|
123 |
+
ongoingLoops = ongoingLoops || [];
|
124 |
+
var executionState = {
|
125 |
+
_context: context,
|
126 |
+
_method: methodStack
|
127 |
+
},
|
128 |
+
preventRecursion = false,
|
129 |
+
method, otherExecutionState, deferred;
|
130 |
+
|
131 |
+
function hookupToProxy(state, mockup){
|
132 |
+
state._canContinue = false;
|
133 |
+
function fire(){
|
134 |
+
state._next = sameOrNextJQuery(state._context, state._next);
|
135 |
+
state._canContinue = true;
|
136 |
+
timedInvocationChain();
|
137 |
+
}
|
138 |
+
return typeof mockup.promise == "function" ? mockup.promise().then(fire) : mockup.then(fire, true);
|
139 |
+
}
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Invoke all the methods currently in the timed invocation chain.
|
143 |
+
*
|
144 |
+
* @author CreativeCouple
|
145 |
+
* @author Peter Liske
|
146 |
+
*/
|
147 |
+
function timedInvocationChain(deferredReturnValue) {
|
148 |
+
while (!preventRecursion) try {
|
149 |
+
// keep recursive calls away
|
150 |
+
preventRecursion = !preventRecursion;
|
151 |
+
// save current context state
|
152 |
+
if (typeof onStepCallback == "function") {
|
153 |
+
onStepCallback(jQuery.makeArray(executionState._next || executionState._context));
|
154 |
+
}
|
155 |
+
// leave the chain when waiting for a trigger
|
156 |
+
if (executionState._canContinue == false) {
|
157 |
+
break;
|
158 |
+
}
|
159 |
+
// check end of chain
|
160 |
+
if (!executionState._method._name) {
|
161 |
+
if (deferred && (!ongoingLoops.length || ongoingLoops[0]._allowPromise)) {
|
162 |
+
// resolve any waiting promise
|
163 |
+
if (executionState._context && typeof executionState._context.promise == "function") {
|
164 |
+
executionState._context.promise().then(deferred.resolve);
|
165 |
+
} else {
|
166 |
+
deferred.resolveWith(executionState._context);
|
167 |
+
}
|
168 |
+
deferred = null;
|
169 |
+
}
|
170 |
+
if (!ongoingLoops.length) {
|
171 |
+
/*
|
172 |
+
* We've reached the end of our TIC
|
173 |
+
* and there is nothing left to wait for.
|
174 |
+
* So we can safely return the original jQuery object
|
175 |
+
* hence enabling instant invocation.
|
176 |
+
*/
|
177 |
+
return executionState._context;
|
178 |
+
}
|
179 |
+
/*
|
180 |
+
* Now we have ongoing loops but reached the chain's end.
|
181 |
+
*/
|
182 |
+
otherExecutionState = ongoingLoops[0]._openEndAction && ongoingLoops[0]._openEndAction(timedInvocationChain, executionState, ongoingLoops);
|
183 |
+
if (!otherExecutionState) {
|
184 |
+
// if innermost loop can't help us, just leave the chain
|
185 |
+
break;
|
186 |
+
}
|
187 |
+
executionState = otherExecutionState;
|
188 |
+
continue;
|
189 |
+
}
|
190 |
+
// check if user tries to use a non-existing function call
|
191 |
+
method = executionState._context && executionState._context[executionState._method._name] || loopEndMethods[executionState._method._name];
|
192 |
+
if (!method) {
|
193 |
+
throw 'no such method "'+executionState._method._name+'" on object ('+executionState._context+')';
|
194 |
+
}
|
195 |
+
// check whether we came here triggered or not
|
196 |
+
if (method.timing && !executionState._canContinue) {
|
197 |
+
// prevent automatic re-trigger in case of loops
|
198 |
+
executionState._canContinue = false;
|
199 |
+
// handle timing method
|
200 |
+
executionState = method.timing(timedInvocationChain, executionState, ongoingLoops, onStepCallback) || executionState;
|
201 |
+
} else {
|
202 |
+
if (!method.timing && !executionState._canContinue) {
|
203 |
+
// prevent automatic re-trigger in case of loops
|
204 |
+
executionState._next = executionState._context[executionState._method._name].apply(executionState._context, executionState._method._arguments);
|
205 |
+
if (ongoingLoops.length && executionState._next && executionState._next instanceof PredictingProxy) {
|
206 |
+
hookupToProxy(executionState, executionState._next);
|
207 |
+
continue;
|
208 |
+
}
|
209 |
+
}
|
210 |
+
// go to next step
|
211 |
+
otherExecutionState = {
|
212 |
+
_context: executionState._next,
|
213 |
+
_method: executionState._method._next
|
214 |
+
};
|
215 |
+
// prevent automatic re-trigger in case of loops
|
216 |
+
executionState._canContinue = false;
|
217 |
+
// invoke callback method with given arguments
|
218 |
+
if (typeof executionState._callback == "function") {
|
219 |
+
executionState._callback.apply(executionState._context, loopCounts(ongoingLoops));
|
220 |
+
}
|
221 |
+
executionState = otherExecutionState;
|
222 |
+
}
|
223 |
+
} catch(e) {
|
224 |
+
/*
|
225 |
+
* We had a runtime exception.
|
226 |
+
* In plain JavaScript live the chain would break now.
|
227 |
+
* So we do, too.
|
228 |
+
*/
|
229 |
+
preventRecursion = !preventRecursion;
|
230 |
+
throw e;
|
231 |
+
} finally {
|
232 |
+
preventRecursion = !preventRecursion;
|
233 |
+
}
|
234 |
+
return deferredReturnValue;
|
235 |
+
};
|
236 |
+
if (jQuery.Deferred) {
|
237 |
+
// add .promise() method to tic
|
238 |
+
timedInvocationChain.promise = function(type, target){
|
239 |
+
var ret = (deferred = deferred || jQuery.Deferred()).promise(target);
|
240 |
+
timedInvocationChain();
|
241 |
+
return ret;
|
242 |
+
};
|
243 |
+
}
|
244 |
+
return timedInvocationChain;
|
245 |
+
}
|
246 |
+
|
247 |
+
/**
|
248 |
+
* Create a placeholder object to collect chained method calls.
|
249 |
+
*
|
250 |
+
* @author CreativeCouple
|
251 |
+
* @author Peter Liske
|
252 |
+
*
|
253 |
+
* @param context initial context
|
254 |
+
* @param methodStack a linked list that this placeholder will fill with call parameters
|
255 |
+
* @return the placeholder object
|
256 |
+
*/
|
257 |
+
function PredictingProxy(context, methodStack, onStepCallback) {
|
258 |
+
this['.methods'] = methodStack;
|
259 |
+
this['.callback'] = onStepCallback;
|
260 |
+
this.length = 0;
|
261 |
+
Array.prototype.push.apply(this, jQuery.makeArray(this._ = context._ = context));
|
262 |
+
|
263 |
+
for (var key in context) {
|
264 |
+
if (!(key in PredictingProxy.prototype) && typeof context[key] == "function") {
|
265 |
+
this[key] = extendMockupPrototype(key);
|
266 |
+
}
|
267 |
+
}
|
268 |
+
}
|
269 |
+
|
270 |
+
// enabling jQuery.when(tic);
|
271 |
+
if (jQuery.Deferred) {
|
272 |
+
PredictingProxy.prototype.promise = function(type, target) {
|
273 |
+
if (typeof type == "object") {
|
274 |
+
target = type;
|
275 |
+
type = null;
|
276 |
+
}
|
277 |
+
return (this['.callback'] && typeof this['.callback'].promise == "function") ? this['.callback'].promise(type, target) : jQuery.Deferred().resolveWith(this).promise(target);
|
278 |
+
};
|
279 |
+
}
|
280 |
+
|
281 |
+
/**
|
282 |
+
* Create and return a new placeholder function on the prototype of PredictingProxy.
|
283 |
+
*/
|
284 |
+
function extendMockupPrototype(name){
|
285 |
+
return PredictingProxy.prototype[name] = function(){
|
286 |
+
this['.methods']._name = name;
|
287 |
+
this['.methods']._arguments = arguments;
|
288 |
+
this['.methods'] = this['.methods']._next = {};
|
289 |
+
return this['.callback'] ? this['.callback'](this, name, arguments) : this;
|
290 |
+
};
|
291 |
+
}
|
292 |
+
|
293 |
+
|
294 |
+
/**
|
295 |
+
* Create replacement methods for .bind(), .on(), .one(), .live(), and .delegate()
|
296 |
+
* that support chaining instead of giving a callback function.
|
297 |
+
*/
|
298 |
+
jQuery.each(['bind','on','one','live','delegate'], function(index, name){
|
299 |
+
if (jQuery.fn[name]) {
|
300 |
+
var original = jQuery.fn[name];
|
301 |
+
jQuery.fn[name] = function(){
|
302 |
+
var i, methodStack, placeholder, timedInvocationChain, deferred, context = this;
|
303 |
+
for(i=0; i<arguments.length; i++) {
|
304 |
+
if (typeof arguments[i] == "function" || (arguments[i] && typeof arguments[i] == "object") || arguments[i] === false) {
|
305 |
+
if (arguments[i] !== jQuery) {
|
306 |
+
// fix for jQuery 1.6 .one() + .unbind()
|
307 |
+
if (typeof arguments[i] == "function" && jQuery.guid) {
|
308 |
+
arguments[i].guid = arguments[i].guid || jQuery.guid++;
|
309 |
+
}
|
310 |
+
return original.apply(context, arguments);
|
311 |
+
}
|
312 |
+
break;
|
313 |
+
}
|
314 |
+
}
|
315 |
+
Array.prototype.splice.call(arguments, i, 1, function(){
|
316 |
+
timedInvocationChain = createTimedInvocationChain(context.$(this), methodStack, [{
|
317 |
+
_count: jQuery.extend(Array.prototype.shift.apply(arguments), arguments),
|
318 |
+
_allowPromise: true
|
319 |
+
}], function(elements){
|
320 |
+
placeholder.length = 0;
|
321 |
+
Array.prototype.push.apply(placeholder, elements);
|
322 |
+
});
|
323 |
+
if (deferred) {
|
324 |
+
timedInvocationChain.promise().then(deferred.resolve);
|
325 |
+
deferred = null;
|
326 |
+
}
|
327 |
+
return timedInvocationChain();
|
328 |
+
});
|
329 |
+
function fire(){
|
330 |
+
return timedInvocationChain ? timedInvocationChain(placeholder) : placeholder;
|
331 |
+
}
|
332 |
+
if (jQuery.Deferred) {
|
333 |
+
fire.promise = function(type, target){
|
334 |
+
if (typeof type == "object") {
|
335 |
+
target = type;
|
336 |
+
type = null;
|
337 |
+
}
|
338 |
+
return (timedInvocationChain && !type) ? timedInvocationChain.promise(type, target) : (deferred = deferred || jQuery.Deferred()).promise(target);
|
339 |
+
};
|
340 |
+
}
|
341 |
+
return placeholder = new PredictingProxy(original.apply(context, arguments), methodStack = {}, fire);
|
342 |
+
};
|
343 |
+
}
|
344 |
+
});
|
345 |
+
|
346 |
+
/**
|
347 |
+
* Create replacement method for .animate() and .load()
|
348 |
+
* that support chaining if $ is given as callback function.
|
349 |
+
*/
|
350 |
+
jQuery.each(['animate','load'], function(index, name){
|
351 |
+
if (jQuery.fn[name]) {
|
352 |
+
var original = jQuery.fn[name];
|
353 |
+
jQuery.fn[name] = function(){
|
354 |
+
while (arguments.length && arguments[arguments.length-1] == null) {
|
355 |
+
Array.prototype.pop.apply(arguments);
|
356 |
+
}
|
357 |
+
if (this.length && arguments.length > 1 && arguments[arguments.length-1] === jQuery) {
|
358 |
+
var event = '_timing'+tuid++;
|
359 |
+
arguments[arguments.length-1] = function(){
|
360 |
+
jQuery(this).trigger(event);
|
361 |
+
};
|
362 |
+
return this.each().one(event).all(original.apply(this, arguments));
|
363 |
+
}
|
364 |
+
return original.apply(this, arguments);
|
365 |
+
};
|
366 |
+
}
|
367 |
+
});
|
368 |
+
|
369 |
+
/**
|
370 |
+
* Define new methods .wait(), .repeat(), .join(), .then()
|
371 |
+
* which will always start a new TIC if invoked outside of a TIC.
|
372 |
+
*/
|
373 |
+
jQuery.each(['wait','repeat','join','then'], function(index, name){
|
374 |
+
jQuery.fn[name] = function(){
|
375 |
+
var methodStack = {},
|
376 |
+
placeholder = new PredictingProxy(this, methodStack, createTimedInvocationChain(this, methodStack, [], function(elements){
|
377 |
+
placeholder.length = 0;
|
378 |
+
Array.prototype.push.apply(placeholder, elements);
|
379 |
+
}));
|
380 |
+
return placeholder[name].apply(placeholder, arguments);
|
381 |
+
};
|
382 |
+
});
|
383 |
+
|
384 |
+
/**
|
385 |
+
* Define to wait for joining all animation queues.
|
386 |
+
*
|
387 |
+
* @param timedInvocationChain
|
388 |
+
* @param executionState
|
389 |
+
*/
|
390 |
+
jQuery.fn.join.timing = function(timedInvocationChain, executionState) {
|
391 |
+
var queueName,
|
392 |
+
promising,
|
393 |
+
waitingElements = executionState._context.length;
|
394 |
+
|
395 |
+
if (typeof executionState._method._arguments[0] == "string") {
|
396 |
+
queueName = executionState._method._arguments[0];
|
397 |
+
if (typeof executionState._method._arguments[1] == "function") {
|
398 |
+
executionState._callback = executionState._method._arguments[1];
|
399 |
+
} else {
|
400 |
+
promising = executionState._method._arguments[1];
|
401 |
+
executionState._callback = executionState._method._arguments[2];
|
402 |
+
}
|
403 |
+
} else {
|
404 |
+
if (typeof executionState._method._arguments[0] == "function") {
|
405 |
+
executionState._callback = executionState._method._arguments[0];
|
406 |
+
} else {
|
407 |
+
promising = executionState._method._arguments[0];
|
408 |
+
executionState._callback = executionState._method._arguments[1];
|
409 |
+
}
|
410 |
+
}
|
411 |
+
|
412 |
+
executionState._next = executionState._context;
|
413 |
+
executionState._canContinue = !waitingElements;
|
414 |
+
|
415 |
+
// wait for each element to reach the current end of its queue
|
416 |
+
if (promising) {
|
417 |
+
executionState._context.promise(queueName == null ? 'fx' : queueName).then(function(){
|
418 |
+
executionState._canContinue = true;
|
419 |
+
timedInvocationChain();
|
420 |
+
});
|
421 |
+
} else {
|
422 |
+
executionState._context.queue(queueName == null ? 'fx' : queueName, function(next){
|
423 |
+
executionState._canContinue = !--waitingElements;
|
424 |
+
timedInvocationChain();
|
425 |
+
next();
|
426 |
+
});
|
427 |
+
}
|
428 |
+
};
|
429 |
+
|
430 |
+
/**
|
431 |
+
* Define to simply run callback method for .then()
|
432 |
+
*
|
433 |
+
* @param timedInvocationChain
|
434 |
+
* @param executionState
|
435 |
+
*/
|
436 |
+
jQuery.fn.then.timing = function(timedInvocationChain, executionState){
|
437 |
+
executionState._callback = executionState._method._arguments[0];
|
438 |
+
executionState._next = executionState._context;
|
439 |
+
executionState._canContinue = true;
|
440 |
+
if (executionState._method._arguments[1]) {
|
441 |
+
Array.prototype.shift.apply(executionState._method._arguments);
|
442 |
+
}
|
443 |
+
};
|
444 |
+
|
445 |
+
/**
|
446 |
+
* Define timeout or binding to wait for.
|
447 |
+
*
|
448 |
+
* @param timedInvocationChain
|
449 |
+
* @param executionState
|
450 |
+
*/
|
451 |
+
jQuery.fn.wait.timing = function(timedInvocationChain, executionState, ongoingLoops) {
|
452 |
+
var trigger, event, timeout, context = executionState._context;
|
453 |
+
|
454 |
+
trigger = executionState._method._arguments[0];
|
455 |
+
executionState._callback = executionState._method._arguments[1];
|
456 |
+
|
457 |
+
function triggerAction() {
|
458 |
+
originalOff.call(event ? originalOff.call(context, event, triggerAction) : context, 'unwait', unwaitAction);
|
459 |
+
executionState._canContinue = true;
|
460 |
+
executionState._next = sameOrNextJQuery(executionState._context, executionState._next);
|
461 |
+
timedInvocationChain();
|
462 |
+
}
|
463 |
+
|
464 |
+
function unwaitAction(evt, skipWait){
|
465 |
+
originalOff.call(event ? originalOff.call(jQuery(this), event, triggerAction) : jQuery(this), 'unwait', unwaitAction);
|
466 |
+
context = context.not(this);
|
467 |
+
if (!skipWait) {
|
468 |
+
executionState._next = executionState._next.not(this);
|
469 |
+
}
|
470 |
+
if (!context.length) {
|
471 |
+
executionState._canContinue = executionState._next.length;
|
472 |
+
executionState._next = sameOrNextJQuery(executionState._context, executionState._next);
|
473 |
+
window.clearTimeout(timeout);
|
474 |
+
executionState = { _context: context };
|
475 |
+
}
|
476 |
+
// just update the snapshot info
|
477 |
+
timedInvocationChain();
|
478 |
+
}
|
479 |
+
|
480 |
+
originalOn.call(context, 'unwait', unwaitAction);
|
481 |
+
executionState._next = context;
|
482 |
+
|
483 |
+
if (trigger == null || trigger == jQuery) {
|
484 |
+
trigger = context;
|
485 |
+
}
|
486 |
+
if (typeof trigger == "function") {
|
487 |
+
trigger = trigger.apply(context, loopCounts(ongoingLoops));
|
488 |
+
}
|
489 |
+
if (typeof trigger == "string") {
|
490 |
+
|
491 |
+
originalOn.call(context, event = trigger, triggerAction);
|
492 |
+
|
493 |
+
} else if (trigger && typeof trigger.promise == "function") {
|
494 |
+
|
495 |
+
trigger.promise().then(triggerAction);
|
496 |
+
|
497 |
+
} else if (trigger && typeof trigger.then == "function") {
|
498 |
+
|
499 |
+
trigger.then(triggerAction, true);
|
500 |
+
|
501 |
+
} else {
|
502 |
+
|
503 |
+
timeout = window.setTimeout(triggerAction, Math.max(0,trigger));
|
504 |
+
|
505 |
+
}
|
506 |
+
};
|
507 |
+
|
508 |
+
/**
|
509 |
+
* Define to simply run callback method for .then()
|
510 |
+
*
|
511 |
+
* @param timedInvocationChain
|
512 |
+
* @param executionState
|
513 |
+
*/
|
514 |
+
jQuery.fn.each = function(callback){
|
515 |
+
if (!callback || callback === jQuery) {
|
516 |
+
var methodStack = {},
|
517 |
+
placeholder = new PredictingProxy(this, methodStack, createTimedInvocationChain(this, methodStack, [], function(elements){
|
518 |
+
placeholder.length = 0;
|
519 |
+
Array.prototype.push.apply(placeholder, elements);
|
520 |
+
}));
|
521 |
+
return placeholder.each(callback);
|
522 |
+
}
|
523 |
+
return originalEach.apply(this, arguments);
|
524 |
+
};
|
525 |
+
|
526 |
+
/**
|
527 |
+
* Define interval or binding to repeat.
|
528 |
+
*
|
529 |
+
* @param timedInvocationChain
|
530 |
+
* @param executionState
|
531 |
+
*/
|
532 |
+
jQuery.fn.each.timing = function(timedInvocationChain, executionState, ongoingLoops, onStepCallback) {
|
533 |
+
if (executionState._method._arguments[0] && executionState._method._arguments[0] !== jQuery) {
|
534 |
+
executionState._canContinue = true;
|
535 |
+
executionState._next = originalEach.apply(executionState._context, executionState._method._arguments);
|
536 |
+
return;
|
537 |
+
}
|
538 |
+
|
539 |
+
var size = Math.max(executionState._context.length, 1),
|
540 |
+
finished = 0,
|
541 |
+
key, methodToGoOn, openLoopTimeout,
|
542 |
+
innerTICs = [],
|
543 |
+
innerElements = [],
|
544 |
+
proxyPlaceholder = jQuery.extend({}, executionState._context),
|
545 |
+
stepByStep = executionState._method._arguments[0] === jQuery;
|
546 |
+
|
547 |
+
if (stepByStep) {
|
548 |
+
window.setTimeout(function(){
|
549 |
+
openLoopTimeout = true;
|
550 |
+
timedInvocationChain();
|
551 |
+
},0);
|
552 |
+
}
|
553 |
+
|
554 |
+
function spreadAction(){
|
555 |
+
if (stepByStep) {
|
556 |
+
if (finished < size) {
|
557 |
+
(innerTICs[finished])();
|
558 |
+
}
|
559 |
+
} else {
|
560 |
+
for (var i=0; i<size; i++) {
|
561 |
+
(innerTICs[i])();
|
562 |
+
}
|
563 |
+
}
|
564 |
+
return proxyPlaceholder;
|
565 |
+
}
|
566 |
+
|
567 |
+
for (key in PredictingProxy.prototype) {
|
568 |
+
proxyPlaceholder[key] = spreadAction;
|
569 |
+
}
|
570 |
+
proxyPlaceholder.length = size;
|
571 |
+
for(key=0; key<size; key++) (function(index){
|
572 |
+
var innerLoops = ongoingLoops.slice(),
|
573 |
+
context = executionState._context.eq(index);
|
574 |
+
innerElements[index] = context.get();
|
575 |
+
innerLoops.unshift({
|
576 |
+
_count: index,
|
577 |
+
_allAction: function(state){
|
578 |
+
finished++;
|
579 |
+
if (finished == size) {
|
580 |
+
methodToGoOn = state._method._next;
|
581 |
+
}
|
582 |
+
timedInvocationChain();
|
583 |
+
},
|
584 |
+
_fixOpenLoop: loopEndMethods.all,
|
585 |
+
_openEndAction: function(tic, state){
|
586 |
+
if (openLoopTimeout) {
|
587 |
+
finished++;
|
588 |
+
if (finished == size) {
|
589 |
+
methodToGoOn = state._method;
|
590 |
+
}
|
591 |
+
timedInvocationChain();
|
592 |
+
}
|
593 |
+
}
|
594 |
+
});
|
595 |
+
innerTICs[index] = createTimedInvocationChain(context, executionState._method._next, innerLoops, function(elements){
|
596 |
+
innerElements[index] = elements;
|
597 |
+
proxyPlaceholder.length = 0;
|
598 |
+
for (var i=0; i<size; i++) {
|
599 |
+
Array.prototype.push.apply(proxyPlaceholder, innerElements[i]);
|
600 |
+
}
|
601 |
+
if (onStepCallback)
|
602 |
+
onStepCallback(jQuery.makeArray(proxyPlaceholder));
|
603 |
+
});
|
604 |
+
})(key);
|
605 |
+
|
606 |
+
executionState._next = proxyPlaceholder;
|
607 |
+
executionState._canContinue = true;
|
608 |
+
executionState._openEndAction = function(tic, state){
|
609 |
+
if (finished == size) {
|
610 |
+
ongoingLoops.shift();
|
611 |
+
return {
|
612 |
+
_context: sameOrNextJQuery(executionState._context, proxyPlaceholder),
|
613 |
+
_method: methodToGoOn
|
614 |
+
};
|
615 |
+
}
|
616 |
+
var finishedBefore = finished;
|
617 |
+
spreadAction();
|
618 |
+
if (finished != finishedBefore) {
|
619 |
+
return state;
|
620 |
+
}
|
621 |
+
};
|
622 |
+
executionState._count = size;
|
623 |
+
|
624 |
+
ongoingLoops.unshift(executionState);
|
625 |
+
};
|
626 |
+
|
627 |
+
loopEndMethods.all = function(executionState){
|
628 |
+
jQuery.extend(executionState._method, {
|
629 |
+
_next: jQuery.extend({}, executionState._method),
|
630 |
+
_name: 'all',
|
631 |
+
_arguments: []
|
632 |
+
});
|
633 |
+
executionState._canContinue = null;
|
634 |
+
};
|
635 |
+
loopEndMethods.all.timing = function(timedInvocationChain, executionState, ongoingLoops) {
|
636 |
+
if (!ongoingLoops.length || !ongoingLoops[0]._fixOpenLoop) {
|
637 |
+
throw '.all() method must be used after .each() only';
|
638 |
+
}
|
639 |
+
if (!ongoingLoops[0]._allAction) {
|
640 |
+
ongoingLoops[0]._fixOpenLoop(executionState);
|
641 |
+
return;
|
642 |
+
}
|
643 |
+
|
644 |
+
ongoingLoops[0]._allAction(executionState);
|
645 |
+
};
|
646 |
+
|
647 |
+
/**
|
648 |
+
* Define interval or binding to repeat.
|
649 |
+
*
|
650 |
+
* @param timedInvocationChain
|
651 |
+
* @param executionState
|
652 |
+
*/
|
653 |
+
jQuery.fn.repeat.timing = function(timedInvocationChain, executionState, ongoingLoops) {
|
654 |
+
var trigger,
|
655 |
+
firstRunNow,
|
656 |
+
openLoopTimeout,
|
657 |
+
event,
|
658 |
+
interval;
|
659 |
+
|
660 |
+
if (typeof executionState._method._arguments[0] == "function") {
|
661 |
+
executionState._callback = executionState._method._arguments[0];
|
662 |
+
} else if (typeof executionState._method._arguments[1] == "function") {
|
663 |
+
trigger = executionState._method._arguments[0];
|
664 |
+
executionState._callback = executionState._method._arguments[1];
|
665 |
+
} else {
|
666 |
+
trigger = executionState._method._arguments[0];
|
667 |
+
firstRunNow = executionState._method._arguments[1];
|
668 |
+
executionState._callback = executionState._method._arguments[2];
|
669 |
+
}
|
670 |
+
|
671 |
+
function triggerAction() {
|
672 |
+
executionState._next = executionState._next || executionState._context;
|
673 |
+
executionState._canContinue = true;
|
674 |
+
timedInvocationChain();
|
675 |
+
}
|
676 |
+
|
677 |
+
function unrepeatAction(){
|
678 |
+
originalOff.call(event ? originalOff.call(jQuery(this), event, triggerAction) : jQuery(this), 'unrepeat', unrepeatAction);
|
679 |
+
var context = executionState._context.not(this);
|
680 |
+
executionState._next = (executionState._next == executionState._context) ? context : executionState._next;
|
681 |
+
executionState._context = context;
|
682 |
+
executionState._canContinue = executionState._context.length && executionState._canContinue;
|
683 |
+
trigger = executionState._context.length && trigger;
|
684 |
+
window.clearInterval(!executionState._context.length && interval);
|
685 |
+
// just update the snapshot info
|
686 |
+
timedInvocationChain();
|
687 |
+
}
|
688 |
+
|
689 |
+
executionState._openEndAction = function(tic, state){
|
690 |
+
if (executionState._canContinue || openLoopTimeout) {
|
691 |
+
executionState._count++;
|
692 |
+
executionState._next = executionState._next || executionState._context;
|
693 |
+
executionState._canContinue = executionState._canContinue || (trigger && state._context && state._context.length);
|
694 |
+
return executionState;
|
695 |
+
}
|
696 |
+
};
|
697 |
+
|
698 |
+
if (trigger == null) {
|
699 |
+
|
700 |
+
firstRunNow = trigger = true;
|
701 |
+
window.setTimeout(function(){
|
702 |
+
openLoopTimeout = true;
|
703 |
+
timedInvocationChain();
|
704 |
+
},0);
|
705 |
+
|
706 |
+
} else {
|
707 |
+
if (typeof trigger == "string") {
|
708 |
+
originalOn.call(executionState._context, event = trigger, triggerAction);
|
709 |
+
} else {
|
710 |
+
interval = window.setInterval(triggerAction, Math.max(0, trigger));
|
711 |
+
}
|
712 |
+
trigger = false;
|
713 |
+
}
|
714 |
+
|
715 |
+
originalOn.call(executionState._context, 'unrepeat', unrepeatAction);
|
716 |
+
|
717 |
+
executionState._next = executionState._context;
|
718 |
+
executionState._count = 0;
|
719 |
+
executionState._untilAction = function(end){
|
720 |
+
if (end) {
|
721 |
+
unrepeatAction.apply(executionState._context);
|
722 |
+
}
|
723 |
+
if (trigger) {
|
724 |
+
triggerAction();
|
725 |
+
}
|
726 |
+
};
|
727 |
+
executionState._fixOpenLoop = loopEndMethods.until;
|
728 |
+
|
729 |
+
if (firstRunNow) {
|
730 |
+
triggerAction();
|
731 |
+
}
|
732 |
+
|
733 |
+
ongoingLoops.unshift(executionState);
|
734 |
+
};
|
735 |
+
|
736 |
+
/**
|
737 |
+
* Defined to evaluate condition when calling .until()
|
738 |
+
*/
|
739 |
+
loopEndMethods.until = function(executionState){
|
740 |
+
jQuery.extend(executionState._method, {
|
741 |
+
_next: jQuery.extend({}, executionState._method),
|
742 |
+
_name: 'until',
|
743 |
+
_arguments: []
|
744 |
+
});
|
745 |
+
executionState._canContinue = null;
|
746 |
+
};
|
747 |
+
loopEndMethods.until.timing = function(timedInvocationChain, executionState, ongoingLoops) {
|
748 |
+
if (!ongoingLoops.length || !ongoingLoops[0]._fixOpenLoop) {
|
749 |
+
throw '.until() method must be used after .repeat() only';
|
750 |
+
}
|
751 |
+
if (!ongoingLoops[0]._untilAction) {
|
752 |
+
ongoingLoops[0]._fixOpenLoop(executionState);
|
753 |
+
return;
|
754 |
+
}
|
755 |
+
|
756 |
+
var condition = executionState._method._arguments[0],
|
757 |
+
loopContext = executionState._method._arguments[1];
|
758 |
+
if (condition === jQuery) {
|
759 |
+
condition = null;
|
760 |
+
loopContext = executionState._method._arguments.length <= 1 || loopContext;
|
761 |
+
}
|
762 |
+
if (typeof condition == "function") {
|
763 |
+
condition = condition.apply(executionState._context, loopCounts(ongoingLoops));
|
764 |
+
}
|
765 |
+
if (condition == null) {
|
766 |
+
condition = !executionState._context.size();
|
767 |
+
}
|
768 |
+
if (typeof condition == "object") {
|
769 |
+
condition = condition.toString();
|
770 |
+
}
|
771 |
+
if (typeof condition == "number") {
|
772 |
+
condition = ongoingLoops[0]._count >= condition-1;
|
773 |
+
}
|
774 |
+
if (condition) {
|
775 |
+
executionState._canContinue = true;
|
776 |
+
executionState._next = executionState._context;
|
777 |
+
ongoingLoops.shift()._untilAction(condition);
|
778 |
+
} else {
|
779 |
+
if (loopContext) {
|
780 |
+
ongoingLoops[0]._next = executionState._context;
|
781 |
+
}
|
782 |
+
executionState = ongoingLoops[0];
|
783 |
+
executionState._count++;
|
784 |
+
executionState._untilAction(condition);
|
785 |
+
return executionState;
|
786 |
+
}
|
787 |
+
};
|
788 |
+
|
789 |
+
// support .until() and .all()
|
790 |
+
new PredictingProxy(loopEndMethods);
|
791 |
+
|
792 |
+
/**
|
793 |
+
* Define unwait and unrepeat methods.
|
794 |
+
*/
|
795 |
+
jQuery.each(['unwait','unrepeat'], function(index, name){
|
796 |
+
jQuery.fn[name] = function(){
|
797 |
+
return this.trigger(name, arguments);
|
798 |
+
};
|
799 |
+
});
|
800 |
+
|
801 |
+
/**
|
802 |
+
* define all static timing methods:
|
803 |
+
* $.wait, $.repeat ,$.join, $.then, $.unwait, $.unrepeat
|
804 |
+
*/
|
805 |
+
jQuery.each(['wait','repeat','join','then','unwait','unrepeat'], function(index, name){
|
806 |
+
jQuery[name] = function(){
|
807 |
+
var group = typeof arguments[0] == "string" ? Array.prototype.shift.apply(arguments) : '';
|
808 |
+
return jQuery.fn[name].apply(THREAD_GROUPS[group] = (THREAD_GROUPS[group] || jQuery('<div>').text(group)), arguments);
|
809 |
+
};
|
810 |
+
});
|
811 |
+
|
812 |
+
/**
|
813 |
+
* X defines deferred variables that can be used in timed invocation chains
|
814 |
+
*
|
815 |
+
* @author CreativeCouple
|
816 |
+
* @author Peter Liske
|
817 |
+
*/
|
818 |
+
function X(compute, Var, calculation){
|
819 |
+
if (typeof compute == "string") {
|
820 |
+
calculation = new Function('x','return ['+compute+'\n,x]');
|
821 |
+
compute = function(x, result){
|
822 |
+
result = calculation(x);
|
823 |
+
callbackVariable.x = result[1];
|
824 |
+
return result[0];
|
825 |
+
};
|
826 |
+
}
|
827 |
+
var hasRelatedVariable = typeof Var == "function",
|
828 |
+
hasComputation = typeof compute == "function",
|
829 |
+
|
830 |
+
callbackVariable = function(value) {
|
831 |
+
if (arguments.length == 1) {
|
832 |
+
callbackVariable.x = value;
|
833 |
+
if (hasRelatedVariable) {
|
834 |
+
Var(value);
|
835 |
+
}
|
836 |
+
} else {
|
837 |
+
return evaluate();
|
838 |
+
}
|
839 |
+
};
|
840 |
+
function evaluate(value){
|
841 |
+
value = hasRelatedVariable ? Var() : callbackVariable.x;
|
842 |
+
return hasComputation ? compute(value) : value;
|
843 |
+
}
|
844 |
+
|
845 |
+
callbackVariable.x = 0;
|
846 |
+
callbackVariable._ = { toString: callbackVariable.$ = callbackVariable.toString = evaluate.toString = evaluate };
|
847 |
+
callbackVariable.mod = function(val){
|
848 |
+
return X(function(x){
|
849 |
+
return x % val;
|
850 |
+
}, callbackVariable);
|
851 |
+
};
|
852 |
+
callbackVariable.add = function(val){
|
853 |
+
return X(function(x){
|
854 |
+
return x + val;
|
855 |
+
}, callbackVariable);
|
856 |
+
};
|
857 |
+
callbackVariable.neg = function(){
|
858 |
+
return X('-x', callbackVariable);
|
859 |
+
};
|
860 |
+
// $$ only for backward compatibility
|
861 |
+
callbackVariable.$$ = callbackVariable.X = function(compute){
|
862 |
+
return X(compute, callbackVariable);
|
863 |
+
};
|
864 |
+
jQuery.each('abcdefghij', function(index, character){
|
865 |
+
callbackVariable[index] = callbackVariable[character] = function(){
|
866 |
+
callbackVariable(arguments[index]);
|
867 |
+
};
|
868 |
+
});
|
869 |
+
|
870 |
+
return callbackVariable;
|
871 |
+
};
|
872 |
+
|
873 |
+
// $$ only for backward compatibility
|
874 |
+
window.$$ = jQuery.$$ = jQuery.X = X;
|
875 |
+
|
876 |
+
/**
|
877 |
+
* Define chained version of $().
|
878 |
+
* This allows to use .end() to come back to previous jQuery selection.
|
879 |
+
*/
|
880 |
+
jQuery.fn.$ = function(){
|
881 |
+
var ret = jQuery.apply(window, arguments);
|
882 |
+
ret.prevObject = this;
|
883 |
+
return ret;
|
884 |
+
};
|
885 |
+
|
886 |
+
})(jQuery, window);;/*!
|
887 |
+
* jQuery Cookie Plugin v1.3.0
|
888 |
+
* https://github.com/carhartl/jquery-cookie
|
889 |
+
*
|
890 |
+
* Copyright 2013 Klaus Hartl
|
891 |
+
* Released under the MIT license
|
892 |
+
*/
|
893 |
+
(function ($, document, undefined) {
|
894 |
+
|
895 |
+
var pluses = /\+/g;
|
896 |
+
|
897 |
+
function raw(s) {
|
898 |
+
return s;
|
899 |
+
}
|
900 |
+
|
901 |
+
function decoded(s) {
|
902 |
+
return decodeURIComponent(s.replace(pluses, ' '));
|
903 |
+
}
|
904 |
+
|
905 |
+
var config = $.cookie = function (key, value, options) {
|
906 |
+
|
907 |
+
// write
|
908 |
+
if (value !== undefined) {
|
909 |
+
options = $.extend({}, config.defaults, options);
|
910 |
+
|
911 |
+
if (value === null) {
|
912 |
+
options.expires = -1;
|
913 |
+
}
|
914 |
+
|
915 |
+
if (typeof options.expires === 'number') {
|
916 |
+
var days = options.expires, t = options.expires = new Date();
|
917 |
+
t.setDate(t.getDate() + days);
|
918 |
+
}
|
919 |
+
|
920 |
+
value = config.json ? JSON.stringify(value) : String(value);
|
921 |
+
|
922 |
+
return (document.cookie = [
|
923 |
+
encodeURIComponent(key), '=', config.raw ? value : encodeURIComponent(value),
|
924 |
+
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
925 |
+
options.path ? '; path=' + options.path : '',
|
926 |
+
options.domain ? '; domain=' + options.domain : '',
|
927 |
+
options.secure ? '; secure' : ''
|
928 |
+
].join(''));
|
929 |
+
}
|
930 |
+
|
931 |
+
// read
|
932 |
+
var decode = config.raw ? raw : decoded;
|
933 |
+
var cookies = document.cookie.split('; ');
|
934 |
+
for (var i = 0, l = cookies.length; i < l; i++) {
|
935 |
+
var parts = cookies[i].split('=');
|
936 |
+
if (decode(parts.shift()) === key) {
|
937 |
+
var cookie = decode(parts.join('='));
|
938 |
+
return config.json ? JSON.parse(cookie) : cookie;
|
939 |
+
}
|
940 |
+
}
|
941 |
+
|
942 |
+
return null;
|
943 |
+
};
|
944 |
+
|
945 |
+
config.defaults = {};
|
946 |
+
|
947 |
+
$.removeCookie = function (key, options) {
|
948 |
+
if ($.cookie(key) !== null) {
|
949 |
+
$.cookie(key, null, options);
|
950 |
+
return true;
|
951 |
+
}
|
952 |
+
return false;
|
953 |
+
};
|
954 |
+
|
955 |
+
})(jQuery, document);
|
956 |
+
;// Generated by CoffeeScript 1.6.3
|
957 |
+
/*
|
958 |
+
jQuery css-watch event Coffeescript
|
959 |
+
http://github.com/leifcr/jquery-csswatch/
|
960 |
+
(c) 2012-2013 Leif Ringstad
|
961 |
+
|
962 |
+
@author Leif Ringstad
|
963 |
+
@version 1.2.1
|
964 |
+
@date 10/27/2013
|
965 |
+
|
966 |
+
Licensed under the freeBSD license
|
967 |
+
*/
|
968 |
+
|
969 |
+
|
970 |
+
(function() {
|
971 |
+
var ExecuteMethod,
|
972 |
+
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
|
973 |
+
|
974 |
+
(function($, window, document) {
|
975 |
+
/*
|
976 |
+
Plugin constructor
|
977 |
+
*/
|
978 |
+
|
979 |
+
var CssWatch;
|
980 |
+
CssWatch = function(elem, options) {
|
981 |
+
this.elem = elem;
|
982 |
+
this.$elem = $(elem);
|
983 |
+
this.options = options;
|
984 |
+
this.cb_timer_id = null;
|
985 |
+
this.stop_requested = false;
|
986 |
+
};
|
987 |
+
/*
|
988 |
+
Plugin prototype
|
989 |
+
*/
|
990 |
+
|
991 |
+
CssWatch.prototype = {
|
992 |
+
defaults: {
|
993 |
+
event_name: "css-change",
|
994 |
+
data_attr_name: "css-watch-data",
|
995 |
+
use_event: true,
|
996 |
+
callback: null,
|
997 |
+
props: "",
|
998 |
+
props_functions: {}
|
999 |
+
},
|
1000 |
+
/*
|
1001 |
+
Initializer
|
1002 |
+
*/
|
1003 |
+
|
1004 |
+
init: function() {
|
1005 |
+
this.config = $.extend({}, this.defaults, this.options, this.metadata);
|
1006 |
+
this.config.props = this.splitAndTrimProps(this.config.props);
|
1007 |
+
if (this.config.props.length > 0) {
|
1008 |
+
this.setInitialData();
|
1009 |
+
this.start();
|
1010 |
+
}
|
1011 |
+
return this;
|
1012 |
+
},
|
1013 |
+
/*
|
1014 |
+
split and trim properties
|
1015 |
+
*/
|
1016 |
+
|
1017 |
+
splitAndTrimProps: function(props) {
|
1018 |
+
var arr, i, ret;
|
1019 |
+
arr = props.split(",");
|
1020 |
+
ret = [];
|
1021 |
+
i = 0;
|
1022 |
+
while (i < arr.length) {
|
1023 |
+
ret.push(arr[i].trim());
|
1024 |
+
i++;
|
1025 |
+
}
|
1026 |
+
return ret;
|
1027 |
+
},
|
1028 |
+
/*
|
1029 |
+
set initial data
|
1030 |
+
*/
|
1031 |
+
|
1032 |
+
setInitialData: function() {
|
1033 |
+
var i;
|
1034 |
+
i = 0;
|
1035 |
+
while (i < this.config.props.length) {
|
1036 |
+
this.setData(this.config.props[i], this.getPropertyValue(this.config.props[i]));
|
1037 |
+
i++;
|
1038 |
+
}
|
1039 |
+
},
|
1040 |
+
/*
|
1041 |
+
set a data element for a css property on the current element
|
1042 |
+
*/
|
1043 |
+
|
1044 |
+
setData: function(property, value) {
|
1045 |
+
return this.$elem.data("" + this.config.data_attr_name + "-" + property, value);
|
1046 |
+
},
|
1047 |
+
/*
|
1048 |
+
update data attributes from changes
|
1049 |
+
*/
|
1050 |
+
|
1051 |
+
updateDataFromChanges: function(changes) {
|
1052 |
+
var property, value, _i, _len, _ref;
|
1053 |
+
_ref = Object.keys(changes);
|
1054 |
+
for (value = _i = 0, _len = _ref.length; _i < _len; value = ++_i) {
|
1055 |
+
property = _ref[value];
|
1056 |
+
this.setData(property, changes[property]);
|
1057 |
+
}
|
1058 |
+
},
|
1059 |
+
/*
|
1060 |
+
get the datavalue stored for a property
|
1061 |
+
*/
|
1062 |
+
|
1063 |
+
getDataValue: function(property) {
|
1064 |
+
return this.$elem.data("" + this.config.data_attr_name + "-" + property);
|
1065 |
+
},
|
1066 |
+
/*
|
1067 |
+
get css property value (from jquery css or from custom function if needed)
|
1068 |
+
*/
|
1069 |
+
|
1070 |
+
getPropertyValue: function(property) {
|
1071 |
+
var function_to_call;
|
1072 |
+
if (Object.keys(this.config.props_functions).length === 0) {
|
1073 |
+
return this.$elem.css(property);
|
1074 |
+
}
|
1075 |
+
function_to_call = null;
|
1076 |
+
if (__indexOf.call(Object.keys(this.config.props_functions), property) >= 0) {
|
1077 |
+
function_to_call = this.config.props_functions[property];
|
1078 |
+
} else {
|
1079 |
+
function_to_call === null;
|
1080 |
+
}
|
1081 |
+
if (function_to_call !== null) {
|
1082 |
+
if (window.ExecuteMethod) {
|
1083 |
+
return ExecuteMethod.executeMethodByFunctionName(function_to_call, this.$elem);
|
1084 |
+
} else {
|
1085 |
+
console.log("You are missing the ExecuteMethod library.");
|
1086 |
+
}
|
1087 |
+
}
|
1088 |
+
return this.$elem.css(property);
|
1089 |
+
},
|
1090 |
+
/*
|
1091 |
+
get object of changes
|
1092 |
+
*/
|
1093 |
+
|
1094 |
+
changedProperties: function() {
|
1095 |
+
var i, ret;
|
1096 |
+
i = 0;
|
1097 |
+
ret = {};
|
1098 |
+
while (i < this.config.props.length) {
|
1099 |
+
if (this.getPropertyValue(this.config.props[i]) !== this.getDataValue(this.config.props[i])) {
|
1100 |
+
ret[this.config.props[i]] = this.getPropertyValue(this.config.props[i]);
|
1101 |
+
}
|
1102 |
+
i++;
|
1103 |
+
}
|
1104 |
+
return ret;
|
1105 |
+
},
|
1106 |
+
/*
|
1107 |
+
stop csswatch / checking of css attributes
|
1108 |
+
*/
|
1109 |
+
|
1110 |
+
stop: function() {
|
1111 |
+
var stop_requested;
|
1112 |
+
if (typeof this.config === "undefined" || this.config === null) {
|
1113 |
+
return;
|
1114 |
+
}
|
1115 |
+
stop_requested = true;
|
1116 |
+
return window.cssWatchCancelAnimationFrame(this.cb_timer_id);
|
1117 |
+
},
|
1118 |
+
/*
|
1119 |
+
start csswatch / checking of css attributes
|
1120 |
+
*/
|
1121 |
+
|
1122 |
+
start: function() {
|
1123 |
+
var _this = this;
|
1124 |
+
if (typeof this.config === "undefined" || this.config === null) {
|
1125 |
+
return;
|
1126 |
+
}
|
1127 |
+
this.stop_requested = false;
|
1128 |
+
this.cb_timer_id = window.cssWatchRequestAnimationFrame(function() {
|
1129 |
+
_this.check();
|
1130 |
+
});
|
1131 |
+
},
|
1132 |
+
/*
|
1133 |
+
the actual checking of changes
|
1134 |
+
*/
|
1135 |
+
|
1136 |
+
check: function() {
|
1137 |
+
var changes,
|
1138 |
+
_this = this;
|
1139 |
+
if (typeof this.config === "undefined" || this.config === null) {
|
1140 |
+
return false;
|
1141 |
+
}
|
1142 |
+
if (this.stop_requested === true) {
|
1143 |
+
return false;
|
1144 |
+
}
|
1145 |
+
changes = this.changedProperties();
|
1146 |
+
if (Object.keys(changes).length > 0) {
|
1147 |
+
if (this.config.use_event) {
|
1148 |
+
this.$elem.trigger(this.config.event_name, changes);
|
1149 |
+
}
|
1150 |
+
if (this.config.callback !== null) {
|
1151 |
+
this.config.callback.apply(null, [changes]);
|
1152 |
+
}
|
1153 |
+
this.updateDataFromChanges(changes);
|
1154 |
+
}
|
1155 |
+
this.cb_timer_id = window.cssWatchRequestAnimationFrame(function() {
|
1156 |
+
_this.check();
|
1157 |
+
});
|
1158 |
+
return false;
|
1159 |
+
},
|
1160 |
+
/*
|
1161 |
+
destroy plugin (stop/remove data)
|
1162 |
+
*/
|
1163 |
+
|
1164 |
+
destroy: function() {
|
1165 |
+
this.stop();
|
1166 |
+
this.$elem.removeData("css-watch-object");
|
1167 |
+
this.$elem.removeData(this.config.data_attr_name);
|
1168 |
+
return null;
|
1169 |
+
}
|
1170 |
+
};
|
1171 |
+
/*
|
1172 |
+
Set defaults
|
1173 |
+
*/
|
1174 |
+
|
1175 |
+
CssWatch.defaults = CssWatch.prototype.defaults;
|
1176 |
+
/*
|
1177 |
+
Jquery extension for plugin
|
1178 |
+
Plugin funcitonality is in the class above
|
1179 |
+
*/
|
1180 |
+
|
1181 |
+
$.fn.csswatch = function(options) {
|
1182 |
+
return this.each(function() {
|
1183 |
+
var data, obj;
|
1184 |
+
if (typeof options === "object" || !options) {
|
1185 |
+
data = $(this).data("css-watch-object");
|
1186 |
+
if (!data) {
|
1187 |
+
obj = new CssWatch(this, options);
|
1188 |
+
$(this).data("css-watch-object", obj);
|
1189 |
+
obj.init();
|
1190 |
+
}
|
1191 |
+
} else if (typeof options === "string") {
|
1192 |
+
obj = $(this).data("css-watch-object");
|
1193 |
+
if (obj && obj[options]) {
|
1194 |
+
return obj[options].apply(this);
|
1195 |
+
}
|
1196 |
+
}
|
1197 |
+
});
|
1198 |
+
};
|
1199 |
+
})(jQuery, window, document);
|
1200 |
+
|
1201 |
+
/*
|
1202 |
+
#
|
1203 |
+
# Cross browser Object.keys implementation
|
1204 |
+
#
|
1205 |
+
# This is suggested implementation from Mozilla for supporting browser that do not implement Object.keys
|
1206 |
+
# if object doesn't have .keys function
|
1207 |
+
# if(!Object.keys) Object.keys = function(o){
|
1208 |
+
# if (o !== Object(o))
|
1209 |
+
# throw new TypeError('Object.keys called on non-object');
|
1210 |
+
# var ret=[],p;
|
1211 |
+
# for(p in o) if(Object.prototype.hasOwnProperty.call(o,p)) ret.push(p);
|
1212 |
+
# return ret;
|
1213 |
+
# }
|
1214 |
+
*/
|
1215 |
+
|
1216 |
+
|
1217 |
+
if (!Object.keys) {
|
1218 |
+
Object.keys = function(o) {
|
1219 |
+
var p, ret;
|
1220 |
+
if (o !== Object(o)) {
|
1221 |
+
throw new TypeError("Object.keys called on non-object");
|
1222 |
+
}
|
1223 |
+
ret = [];
|
1224 |
+
p = void 0;
|
1225 |
+
for (p in o) {
|
1226 |
+
if (Object.prototype.hasOwnProperty.call(o, p)) {
|
1227 |
+
ret.push(p);
|
1228 |
+
}
|
1229 |
+
}
|
1230 |
+
return ret;
|
1231 |
+
};
|
1232 |
+
}
|
1233 |
+
|
1234 |
+
/*
|
1235 |
+
Cross browser requestAnimationFrame
|
1236 |
+
Not including settimeout as it will have a static value for timeout
|
1237 |
+
*/
|
1238 |
+
|
1239 |
+
|
1240 |
+
if (!window.cssWatchRequestAnimationFrame) {
|
1241 |
+
window.cssWatchRequestAnimationFrame = (function() {
|
1242 |
+
return window.webkitAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || window.requestAnimationFrame || function(callback, element) {
|
1243 |
+
return window.setTimeout(callback, 1000 / 60);
|
1244 |
+
};
|
1245 |
+
})();
|
1246 |
+
}
|
1247 |
+
|
1248 |
+
/*
|
1249 |
+
Cross browser cancelAnimationFrame
|
1250 |
+
*/
|
1251 |
+
|
1252 |
+
|
1253 |
+
if (!window.cssWatchCancelAnimationFrame) {
|
1254 |
+
window.cssWatchCancelAnimationFrame = (function() {
|
1255 |
+
return window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelAnimationFrame || window.mozCancelRequestAnimationFrame || window.oCancelRequestAnimationFrame || window.msCancelRequestAnimationFrame || function(timeout_id) {
|
1256 |
+
return window.clearTimeout(timeout_id);
|
1257 |
+
};
|
1258 |
+
})();
|
1259 |
+
}
|
1260 |
+
|
1261 |
+
/*
|
1262 |
+
# Execute Method
|
1263 |
+
# (c) 2012 Leif Ringstad
|
1264 |
+
# Licensed under the freeBSD license (see LICENSE.txt for details)
|
1265 |
+
#
|
1266 |
+
# Source: http://github.com/leifcr/execute_method
|
1267 |
+
# v 1.0.0
|
1268 |
+
*/
|
1269 |
+
|
1270 |
+
|
1271 |
+
ExecuteMethod = {
|
1272 |
+
getFunctionsAndProperties: function(str) {
|
1273 |
+
var arr, i, ret;
|
1274 |
+
arr = str.split(".");
|
1275 |
+
i = 0;
|
1276 |
+
ret = [];
|
1277 |
+
while (i < arr.length) {
|
1278 |
+
ret.push(ExecuteMethod.getFunctionAndParameters(arr[i]));
|
1279 |
+
i++;
|
1280 |
+
}
|
1281 |
+
return ret;
|
1282 |
+
},
|
1283 |
+
getFunctionAndParameters: function(str) {
|
1284 |
+
var func, isfunc, params;
|
1285 |
+
if (ExecuteMethod.isFunction(str)) {
|
1286 |
+
params = str.substring(str.indexOf("(") + 1, str.indexOf(")"));
|
1287 |
+
if (params.length > 0) {
|
1288 |
+
params = ExecuteMethod.splitAndTypeCastParameters(params);
|
1289 |
+
} else {
|
1290 |
+
params = [];
|
1291 |
+
}
|
1292 |
+
func = str.substring(0, str.indexOf("\("));
|
1293 |
+
isfunc = true;
|
1294 |
+
} else {
|
1295 |
+
func = str;
|
1296 |
+
params = null;
|
1297 |
+
isfunc = false;
|
1298 |
+
}
|
1299 |
+
return {
|
1300 |
+
func: func,
|
1301 |
+
params: params,
|
1302 |
+
isfunc: isfunc
|
1303 |
+
};
|
1304 |
+
},
|
1305 |
+
splitAndTypeCastParameters: function(params) {
|
1306 |
+
var arr, i, ret;
|
1307 |
+
arr = params.split(",");
|
1308 |
+
ret = [];
|
1309 |
+
i = 0;
|
1310 |
+
ret = [];
|
1311 |
+
while (i < arr.length) {
|
1312 |
+
ret.push(ExecuteMethod.typecastParameter(arr[i]));
|
1313 |
+
i++;
|
1314 |
+
}
|
1315 |
+
return ret;
|
1316 |
+
},
|
1317 |
+
isFunction: function(str) {
|
1318 |
+
if (ExecuteMethod.regexIndexOf(str, /(\([\d|\D]+\))|(\(\))/, 0) !== -1) {
|
1319 |
+
return true;
|
1320 |
+
}
|
1321 |
+
return false;
|
1322 |
+
},
|
1323 |
+
regexIndexOf: function(string, regex, startpos) {
|
1324 |
+
var indexOf;
|
1325 |
+
indexOf = string.substring(startpos || 0).search(regex);
|
1326 |
+
if (indexOf >= 0) {
|
1327 |
+
return indexOf + (startpos || 0);
|
1328 |
+
} else {
|
1329 |
+
return indexOf;
|
1330 |
+
}
|
1331 |
+
},
|
1332 |
+
typecastParameter: function(param) {
|
1333 |
+
param = param.trim();
|
1334 |
+
param = param.replace(/^"/, "");
|
1335 |
+
param = param.replace(/"$/m, "");
|
1336 |
+
if (param.search(/^\d+$/) === 0) {
|
1337 |
+
return parseInt(param);
|
1338 |
+
} else if (param.search(/^\d+\.\d+$/) === 0) {
|
1339 |
+
return parseFloat(param);
|
1340 |
+
} else if (param === "false") {
|
1341 |
+
return false;
|
1342 |
+
} else if (param === "true") {
|
1343 |
+
return true;
|
1344 |
+
}
|
1345 |
+
return param;
|
1346 |
+
},
|
1347 |
+
executeSingleFunction: function(func, params, context, _that) {
|
1348 |
+
return context[func].apply(_that, params);
|
1349 |
+
},
|
1350 |
+
getSingleProperty: function(property, context) {
|
1351 |
+
return context[property];
|
1352 |
+
},
|
1353 |
+
/*
|
1354 |
+
# @param {String} Provide a string on what to execute (e.g. this.is.something(true).to_run() or myFunction().property or myFunction())
|
1355 |
+
# @param {Object} Provide a object to run the string provided on
|
1356 |
+
# @param {Object} Provide an object that points to the "this" pointer which
|
1357 |
+
*/
|
1358 |
+
|
1359 |
+
executeMethodByFunctionName: function(str, context) {
|
1360 |
+
var current_context, current_val, func_data, i;
|
1361 |
+
func_data = ExecuteMethod.getFunctionsAndProperties(str);
|
1362 |
+
i = 0;
|
1363 |
+
current_context = context;
|
1364 |
+
current_val = null;
|
1365 |
+
while (i < func_data.length) {
|
1366 |
+
if (func_data[i]["isfunc"] === true) {
|
1367 |
+
current_context = ExecuteMethod.executeSingleFunction(func_data[i]["func"], func_data[i]["params"], current_context, context);
|
1368 |
+
} else {
|
1369 |
+
current_context = ExecuteMethod.getSingleProperty(func_data[i]["func"], current_context);
|
1370 |
+
}
|
1371 |
+
i++;
|
1372 |
+
}
|
1373 |
+
return current_context;
|
1374 |
+
}
|
1375 |
+
};
|
1376 |
+
|
1377 |
+
if (!String.prototype.trim) {
|
1378 |
+
String.prototype.trim = function() {
|
1379 |
+
return this.replace(/^\s+|\s+$/g, '');
|
1380 |
+
};
|
1381 |
+
}
|
1382 |
+
|
1383 |
+
if (window.ExecuteMethod === "undefined" || window.ExecuteMethod === null || window.ExecuteMethod === void 0) {
|
1384 |
+
window.ExecuteMethod = ExecuteMethod;
|
1385 |
+
}
|
1386 |
+
|
1387 |
+
}).call(this);;/*
|
1388 |
+
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
|
1389 |
+
*
|
1390 |
+
* Uses the built in easing capabilities added In jQuery 1.1
|
1391 |
+
* to offer multiple easing options
|
1392 |
+
*
|
1393 |
+
* TERMS OF USE - jQuery Easing
|
1394 |
+
*
|
1395 |
+
* Open source under the BSD License.
|
1396 |
+
*
|
1397 |
+
* Copyright © 2008 George McGinley Smith
|
1398 |
+
* All rights reserved.
|
1399 |
+
*
|
1400 |
+
* Redistribution and use in source and binary forms, with or without modification,
|
1401 |
+
* are permitted provided that the following conditions are met:
|
1402 |
+
*
|
1403 |
+
* Redistributions of source code must retain the above copyright notice, this list of
|
1404 |
+
* conditions and the following disclaimer.
|
1405 |
+
* Redistributions in binary form must reproduce the above copyright notice, this list
|
1406 |
+
* of conditions and the following disclaimer in the documentation and/or other materials
|
1407 |
+
* provided with the distribution.
|
1408 |
+
*
|
1409 |
+
* Neither the name of the author nor the names of contributors may be used to endorse
|
1410 |
+
* or promote products derived from this software without specific prior written permission.
|
1411 |
+
*
|
1412 |
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
1413 |
+
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
1414 |
+
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
1415 |
+
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
1416 |
+
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
1417 |
+
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
1418 |
+
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
1419 |
+
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
1420 |
+
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
1421 |
+
*
|
1422 |
+
*/
|
1423 |
+
|
1424 |
+
// t: current time, b: begInnIng value, c: change In value, d: duration
|
1425 |
+
jQuery.easing['jswing'] = jQuery.easing['swing'];
|
1426 |
+
|
1427 |
+
jQuery.extend( jQuery.easing,
|
1428 |
+
{
|
1429 |
+
def: 'easeOutQuad',
|
1430 |
+
swing: function (x, t, b, c, d) {
|
1431 |
+
//alert(jQuery.easing.default);
|
1432 |
+
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
|
1433 |
+
},
|
1434 |
+
easeInQuad: function (x, t, b, c, d) {
|
1435 |
+
return c*(t/=d)*t + b;
|
1436 |
+
},
|
1437 |
+
easeOutQuad: function (x, t, b, c, d) {
|
1438 |
+
return -c *(t/=d)*(t-2) + b;
|
1439 |
+
},
|
1440 |
+
easeInOutQuad: function (x, t, b, c, d) {
|
1441 |
+
if ((t/=d/2) < 1) return c/2*t*t + b;
|
1442 |
+
return -c/2 * ((--t)*(t-2) - 1) + b;
|
1443 |
+
},
|
1444 |
+
easeInCubic: function (x, t, b, c, d) {
|
1445 |
+
return c*(t/=d)*t*t + b;
|
1446 |
+
},
|
1447 |
+
easeOutCubic: function (x, t, b, c, d) {
|
1448 |
+
return c*((t=t/d-1)*t*t + 1) + b;
|
1449 |
+
},
|
1450 |
+
easeInOutCubic: function (x, t, b, c, d) {
|
1451 |
+
if ((t/=d/2) < 1) return c/2*t*t*t + b;
|
1452 |
+
return c/2*((t-=2)*t*t + 2) + b;
|
1453 |
+
},
|
1454 |
+
easeInQuart: function (x, t, b, c, d) {
|
1455 |
+
return c*(t/=d)*t*t*t + b;
|
1456 |
+
},
|
1457 |
+
easeOutQuart: function (x, t, b, c, d) {
|
1458 |
+
return -c * ((t=t/d-1)*t*t*t - 1) + b;
|
1459 |
+
},
|
1460 |
+
easeInOutQuart: function (x, t, b, c, d) {
|
1461 |
+
if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
|
1462 |
+
return -c/2 * ((t-=2)*t*t*t - 2) + b;
|
1463 |
+
},
|
1464 |
+
easeInQuint: function (x, t, b, c, d) {
|
1465 |
+
return c*(t/=d)*t*t*t*t + b;
|
1466 |
+
},
|
1467 |
+
easeOutQuint: function (x, t, b, c, d) {
|
1468 |
+
return c*((t=t/d-1)*t*t*t*t + 1) + b;
|
1469 |
+
},
|
1470 |
+
easeInOutQuint: function (x, t, b, c, d) {
|
1471 |
+
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
|
1472 |
+
return c/2*((t-=2)*t*t*t*t + 2) + b;
|
1473 |
+
},
|
1474 |
+
easeInSine: function (x, t, b, c, d) {
|
1475 |
+
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
|
1476 |
+
},
|
1477 |
+
easeOutSine: function (x, t, b, c, d) {
|
1478 |
+
return c * Math.sin(t/d * (Math.PI/2)) + b;
|
1479 |
+
},
|
1480 |
+
easeInOutSine: function (x, t, b, c, d) {
|
1481 |
+
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
|
1482 |
+
},
|
1483 |
+
easeInExpo: function (x, t, b, c, d) {
|
1484 |
+
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
|
1485 |
+
},
|
1486 |
+
easeOutExpo: function (x, t, b, c, d) {
|
1487 |
+
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
|
1488 |
+
},
|
1489 |
+
easeInOutExpo: function (x, t, b, c, d) {
|
1490 |
+
if (t==0) return b;
|
1491 |
+
if (t==d) return b+c;
|
1492 |
+
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
|
1493 |
+
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
|
1494 |
+
},
|
1495 |
+
easeInCirc: function (x, t, b, c, d) {
|
1496 |
+
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
|
1497 |
+
},
|
1498 |
+
easeOutCirc: function (x, t, b, c, d) {
|
1499 |
+
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
|
1500 |
+
},
|
1501 |
+
easeInOutCirc: function (x, t, b, c, d) {
|
1502 |
+
if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
|
1503 |
+
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
|
1504 |
+
},
|
1505 |
+
easeInElastic: function (x, t, b, c, d) {
|
1506 |
+
var s=1.70158;var p=0;var a=c;
|
1507 |
+
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
1508 |
+
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
1509 |
+
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
1510 |
+
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
1511 |
+
},
|
1512 |
+
easeOutElastic: function (x, t, b, c, d) {
|
1513 |
+
var s=1.70158;var p=0;var a=c;
|
1514 |
+
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
|
1515 |
+
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
1516 |
+
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
1517 |
+
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
|
1518 |
+
},
|
1519 |
+
easeInOutElastic: function (x, t, b, c, d) {
|
1520 |
+
var s=1.70158;var p=0;var a=c;
|
1521 |
+
if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
|
1522 |
+
if (a < Math.abs(c)) { a=c; var s=p/4; }
|
1523 |
+
else var s = p/(2*Math.PI) * Math.asin (c/a);
|
1524 |
+
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
|
1525 |
+
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
|
1526 |
+
},
|
1527 |
+
easeInBack: function (x, t, b, c, d, s) {
|
1528 |
+
if (s == undefined) s = 1.70158;
|
1529 |
+
return c*(t/=d)*t*((s+1)*t - s) + b;
|
1530 |
+
},
|
1531 |
+
easeOutBack: function (x, t, b, c, d, s) {
|
1532 |
+
if (s == undefined) s = 1.70158;
|
1533 |
+
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
|
1534 |
+
},
|
1535 |
+
easeInOutBack: function (x, t, b, c, d, s) {
|
1536 |
+
if (s == undefined) s = 1.70158;
|
1537 |
+
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
|
1538 |
+
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
|
1539 |
+
},
|
1540 |
+
easeInBounce: function (x, t, b, c, d) {
|
1541 |
+
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
|
1542 |
+
},
|
1543 |
+
easeOutBounce: function (x, t, b, c, d) {
|
1544 |
+
if ((t/=d) < (1/2.75)) {
|
1545 |
+
return c*(7.5625*t*t) + b;
|
1546 |
+
} else if (t < (2/2.75)) {
|
1547 |
+
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
|
1548 |
+
} else if (t < (2.5/2.75)) {
|
1549 |
+
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
|
1550 |
+
} else {
|
1551 |
+
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
|
1552 |
+
}
|
1553 |
+
},
|
1554 |
+
easeInOutBounce: function (x, t, b, c, d) {
|
1555 |
+
if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
|
1556 |
+
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
|
1557 |
+
}
|
1558 |
+
});
|
1559 |
+
|
1560 |
+
/*
|
1561 |
+
*
|
1562 |
+
* TERMS OF USE - EASING EQUATIONS
|
1563 |
+
*
|
1564 |
+
* Open source under the BSD License.
|
1565 |
+
*
|
1566 |
+
* Copyright © 2001 Robert Penner
|
1567 |
+
* All rights reserved.
|
1568 |
+
*
|
1569 |
+
* Redistribution and use in source and binary forms, with or without modification,
|
1570 |
+
* are permitted provided that the following conditions are met:
|
1571 |
+
*
|
1572 |
+
* Redistributions of source code must retain the above copyright notice, this list of
|
1573 |
+
* conditions and the following disclaimer.
|
1574 |
+
* Redistributions in binary form must reproduce the above copyright notice, this list
|
1575 |
+
* of conditions and the following disclaimer in the documentation and/or other materials
|
1576 |
+
* provided with the distribution.
|
1577 |
+
*
|
1578 |
+
* Neither the name of the author nor the names of contributors may be used to endorse
|
1579 |
+
* or promote products derived from this software without specific prior written permission.
|
1580 |
+
*
|
1581 |
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
1582 |
+
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
1583 |
+
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
1584 |
+
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
1585 |
+
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
1586 |
+
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
1587 |
+
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
1588 |
+
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
1589 |
+
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
1590 |
+
*
|
1591 |
+
*/;/*
|
1592 |
+
* $ lightbox_me
|
1593 |
+
* By: Buck Wilson
|
1594 |
+
* Version : 2.3
|
1595 |
+
*
|
1596 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
1597 |
+
* you may not use this file except in compliance with the License.
|
1598 |
+
* You may obtain a copy of the License at
|
1599 |
+
*
|
1600 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
1601 |
+
*
|
1602 |
+
* Unless required by applicable law or agreed to in writing, software
|
1603 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
1604 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
1605 |
+
* See the License for the specific language governing permissions and
|
1606 |
+
* limitations under the License.
|
1607 |
+
*/
|
1608 |
+
|
1609 |
+
|
1610 |
+
(function($) {
|
1611 |
+
|
1612 |
+
$.fn.lightbox_me = function(options) {
|
1613 |
+
|
1614 |
+
return this.each(function() {
|
1615 |
+
|
1616 |
+
var
|
1617 |
+
opts = $.extend({}, $.fn.lightbox_me.defaults, options),
|
1618 |
+
$overlay = $(),
|
1619 |
+
$self = $(this),
|
1620 |
+
$iframe = $('<iframe id="foo" style="z-index: ' + (opts.zIndex + 1) + ';border: none; margin: 0; padding: 0; position: absolute; width: 100%; height: 100%; top: 0; left: 0; filter: mask();"/>'),
|
1621 |
+
ie6 = ($.browser.msie && $.browser.version < 7);
|
1622 |
+
|
1623 |
+
if (opts.showOverlay) {
|
1624 |
+
//check if there's an existing overlay, if so, make subequent ones clear
|
1625 |
+
var $currentOverlays = $(".js_lb_overlay:visible");
|
1626 |
+
if ($currentOverlays.length > 0){
|
1627 |
+
$overlay = $('<div class="lb_overlay_clear js_lb_overlay"/>');
|
1628 |
+
} else {
|
1629 |
+
$overlay = $('<div class="' + opts.classPrefix + '_overlay js_lb_overlay"/>');
|
1630 |
+
}
|
1631 |
+
}
|
1632 |
+
|
1633 |
+
/*----------------------------------------------------
|
1634 |
+
DOM Building
|
1635 |
+
---------------------------------------------------- */
|
1636 |
+
if (ie6) {
|
1637 |
+
var src = /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank';
|
1638 |
+
$iframe.attr('src', src);
|
1639 |
+
$('body').append($iframe);
|
1640 |
+
} // iframe shim for ie6, to hide select elements
|
1641 |
+
$('body').append($self.hide()).append($overlay);
|
1642 |
+
|
1643 |
+
|
1644 |
+
/*----------------------------------------------------
|
1645 |
+
Overlay CSS stuffs
|
1646 |
+
---------------------------------------------------- */
|
1647 |
+
|
1648 |
+
// set css of the overlay
|
1649 |
+
if (opts.showOverlay) {
|
1650 |
+
setOverlayHeight(); // pulled this into a function because it is called on window resize.
|
1651 |
+
$overlay.css({ position: 'absolute', width: '100%', top: 0, left: 0, right: 0, bottom: 0, zIndex: (opts.zIndex + 2), display: 'none' });
|
1652 |
+
if (!$overlay.hasClass('lb_overlay_clear')){
|
1653 |
+
$overlay.css(opts.overlayCSS);
|
1654 |
+
}
|
1655 |
+
}
|
1656 |
+
|
1657 |
+
/*----------------------------------------------------
|
1658 |
+
Animate it in.
|
1659 |
+
---------------------------------------------------- */
|
1660 |
+
//
|
1661 |
+
if (opts.showOverlay) {
|
1662 |
+
$overlay.fadeIn(opts.overlaySpeed, function() {
|
1663 |
+
setSelfPosition();
|
1664 |
+
$self[opts.appearEffect](opts.lightboxSpeed, function() { setOverlayHeight(); setSelfPosition(); opts.onLoad()});
|
1665 |
+
});
|
1666 |
+
} else {
|
1667 |
+
setSelfPosition();
|
1668 |
+
$self[opts.appearEffect](opts.lightboxSpeed, function() { opts.onLoad()});
|
1669 |
+
}
|
1670 |
+
|
1671 |
+
/*----------------------------------------------------
|
1672 |
+
Hide parent if parent specified (parentLightbox should be jquery reference to any parent lightbox)
|
1673 |
+
---------------------------------------------------- */
|
1674 |
+
if (opts.parentLightbox) {
|
1675 |
+
opts.parentLightbox.fadeOut(200);
|
1676 |
+
}
|
1677 |
+
|
1678 |
+
|
1679 |
+
/*----------------------------------------------------
|
1680 |
+
Bind Events
|
1681 |
+
---------------------------------------------------- */
|
1682 |
+
|
1683 |
+
$(window).resize(setOverlayHeight)
|
1684 |
+
.resize(setSelfPosition)
|
1685 |
+
.scroll(setSelfPosition);
|
1686 |
+
|
1687 |
+
$(window).bind('keyup.lightbox_me', observeKeyPress);
|
1688 |
+
|
1689 |
+
if (opts.closeClick) {
|
1690 |
+
$overlay.click(function(e) { closeLightbox(); e.preventDefault; });
|
1691 |
+
}
|
1692 |
+
$self.delegate(opts.closeSelector, "click", function(e) {
|
1693 |
+
closeLightbox(); e.preventDefault();
|
1694 |
+
});
|
1695 |
+
$self.bind('close', closeLightbox);
|
1696 |
+
$self.bind('reposition', setSelfPosition);
|
1697 |
+
|
1698 |
+
|
1699 |
+
|
1700 |
+
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
1701 |
+
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
|
1702 |
+
|
1703 |
+
|
1704 |
+
/*----------------------------------------------------
|
1705 |
+
Private Functions
|
1706 |
+
---------------------------------------------------- */
|
1707 |
+
|
1708 |
+
/* Remove or hide all elements */
|
1709 |
+
function closeLightbox() {
|
1710 |
+
var s = $self[0].style;
|
1711 |
+
if (opts.destroyOnClose) {
|
1712 |
+
$self.add($overlay).remove();
|
1713 |
+
} else {
|
1714 |
+
$self.add($overlay).hide();
|
1715 |
+
}
|
1716 |
+
|
1717 |
+
//show the hidden parent lightbox
|
1718 |
+
if (opts.parentLightbox) {
|
1719 |
+
opts.parentLightbox.fadeIn(200);
|
1720 |
+
}
|
1721 |
+
|
1722 |
+
$iframe.remove();
|
1723 |
+
|
1724 |
+
// clean up events.
|
1725 |
+
$self.undelegate(opts.closeSelector, "click");
|
1726 |
+
|
1727 |
+
$(window).unbind('reposition', setOverlayHeight);
|
1728 |
+
$(window).unbind('reposition', setSelfPosition);
|
1729 |
+
$(window).unbind('scroll', setSelfPosition);
|
1730 |
+
$(window).unbind('keyup.lightbox_me');
|
1731 |
+
if (ie6)
|
1732 |
+
s.removeExpression('top');
|
1733 |
+
opts.onClose();
|
1734 |
+
}
|
1735 |
+
|
1736 |
+
|
1737 |
+
/* Function to bind to the window to observe the escape/enter key press */
|
1738 |
+
function observeKeyPress(e) {
|
1739 |
+
if((e.keyCode == 27 || (e.DOM_VK_ESCAPE == 27 && e.which==0)) && opts.closeEsc) closeLightbox();
|
1740 |
+
}
|
1741 |
+
|
1742 |
+
|
1743 |
+
/* Set the height of the overlay
|
1744 |
+
: if the document height is taller than the window, then set the overlay height to the document height.
|
1745 |
+
: otherwise, just set overlay height: 100%
|
1746 |
+
*/
|
1747 |
+
function setOverlayHeight() {
|
1748 |
+
if ($(window).height() < $(document).height()) {
|
1749 |
+
$overlay.css({height: $(document).height() + 'px'});
|
1750 |
+
$iframe.css({height: $(document).height() + 'px'});
|
1751 |
+
} else {
|
1752 |
+
$overlay.css({height: '100%'});
|
1753 |
+
if (ie6) {
|
1754 |
+
$('html,body').css('height','100%');
|
1755 |
+
$iframe.css('height', '100%');
|
1756 |
+
} // ie6 hack for height: 100%; TODO: handle this in IE7
|
1757 |
+
}
|
1758 |
+
}
|
1759 |
+
|
1760 |
+
|
1761 |
+
/* Set the position of the modal'd window ($self)
|
1762 |
+
: if $self is taller than the window, then make it absolutely positioned
|
1763 |
+
: otherwise fixed
|
1764 |
+
*/
|
1765 |
+
function setSelfPosition() {
|
1766 |
+
var s = $self[0].style;
|
1767 |
+
|
1768 |
+
// reset CSS so width is re-calculated for margin-left CSS
|
1769 |
+
$self.css({left: '50%', marginLeft: ($self.outerWidth() / 2) * -1, zIndex: (opts.zIndex + 3) });
|
1770 |
+
|
1771 |
+
|
1772 |
+
/* we have to get a little fancy when dealing with height, because lightbox_me
|
1773 |
+
is just so fancy.
|
1774 |
+
*/
|
1775 |
+
|
1776 |
+
// if the height of $self is bigger than the window and self isn't already position absolute
|
1777 |
+
if (($self.height() + 80 >= $(window).height()) && ($self.css('position') != 'absolute' || ie6)) {
|
1778 |
+
|
1779 |
+
// we are going to make it positioned where the user can see it, but they can still scroll
|
1780 |
+
// so the top offset is based on the user's scroll position.
|
1781 |
+
var topOffset = $(document).scrollTop() + 40;
|
1782 |
+
$self.css({position: 'absolute', top: topOffset + 'px', marginTop: 0})
|
1783 |
+
if (ie6) {
|
1784 |
+
s.removeExpression('top');
|
1785 |
+
}
|
1786 |
+
} else if ($self.height()+ 80 < $(window).height()) {
|
1787 |
+
//if the height is less than the window height, then we're gonna make this thing position: fixed.
|
1788 |
+
// in ie6 we're gonna fake it.
|
1789 |
+
if (ie6) {
|
1790 |
+
s.position = 'absolute';
|
1791 |
+
if (opts.centered) {
|
1792 |
+
s.setExpression('top', '(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"')
|
1793 |
+
s.marginTop = 0;
|
1794 |
+
} else {
|
1795 |
+
var top = (opts.modalCSS && opts.modalCSS.top) ? parseInt(opts.modalCSS.top) : 0;
|
1796 |
+
s.setExpression('top', '((blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + '+top+') + "px"')
|
1797 |
+
}
|
1798 |
+
} else {
|
1799 |
+
if (opts.centered) {
|
1800 |
+
$self.css({ position: 'fixed', top: '50%', marginTop: ($self.outerHeight() / 2) * -1})
|
1801 |
+
} else {
|
1802 |
+
$self.css({ position: 'fixed'}).css(opts.modalCSS);
|
1803 |
+
}
|
1804 |
+
|
1805 |
+
}
|
1806 |
+
}
|
1807 |
+
}
|
1808 |
+
|
1809 |
+
});
|
1810 |
+
|
1811 |
+
|
1812 |
+
|
1813 |
+
};
|
1814 |
+
|
1815 |
+
$.fn.lightbox_me.defaults = {
|
1816 |
+
|
1817 |
+
// animation
|
1818 |
+
appearEffect: "fadeIn",
|
1819 |
+
appearEase: "",
|
1820 |
+
overlaySpeed: 250,
|
1821 |
+
lightboxSpeed: 300,
|
1822 |
+
|
1823 |
+
// close
|
1824 |
+
closeSelector: ".close",
|
1825 |
+
closeClick: true,
|
1826 |
+
closeEsc: true,
|
1827 |
+
|
1828 |
+
// behavior
|
1829 |
+
destroyOnClose: false,
|
1830 |
+
showOverlay: true,
|
1831 |
+
parentLightbox: false,
|
1832 |
+
|
1833 |
+
// callbacks
|
1834 |
+
onLoad: function() {},
|
1835 |
+
onClose: function() {},
|
1836 |
+
|
1837 |
+
// style
|
1838 |
+
classPrefix: 'lb',
|
1839 |
+
zIndex: 999,
|
1840 |
+
centered: false,
|
1841 |
+
modalCSS: {top: '40px'},
|
1842 |
+
overlayCSS: {background: 'black', opacity: .3}
|
1843 |
+
}
|
1844 |
+
})(jQuery);;(function($) {
|
1845 |
+
|
1846 |
+
window.SidekickWP = {
|
1847 |
+
Models: {},
|
1848 |
+
Collections: {},
|
1849 |
+
Views: {},
|
1850 |
+
Events: {},
|
1851 |
+
Templates: {},
|
1852 |
+
Helpers: {}
|
1853 |
+
};
|
1854 |
+
|
1855 |
+
if (!window.console) window.console = {log: function() {}};
|
1856 |
+
if (!window.console.clear) window.console.clear = function(){};
|
1857 |
+
if (!window.console.group) window.console.group = function(){};
|
1858 |
+
if (!window.console.groupEnd) window.console.groupEnd = function(){};
|
1859 |
+
if (!window.console.table) window.console.table = function(){};
|
1860 |
+
if (!window.console.error) window.console.error = function(){};
|
1861 |
+
if (!window.console.groupCollapsed) window.console.groupCollapsed = function(){};
|
1862 |
+
|
1863 |
+
if (window.console){
|
1864 |
+
window.console.info = function(msg,o1,o2,o3){if (!o1) o1 = '';if (!o2) o2 = '';if (!o3) o3 = '';console.log('%c' + msg,'color: blue;font-weight: bold',o1,o2,o3);};
|
1865 |
+
window.console.event = function(msg,o1,o2,o3){if (!o1) o1 = '';if (!o2) o2 = '';if (!o3) o3 = '';console.log('%c' + msg,'color: green;font-weight: bold',o1,o2,o3);};
|
1866 |
+
}
|
1867 |
+
|
1868 |
+
SidekickWP.Models.App = Backbone.Model.extend({
|
1869 |
+
defaults: {
|
1870 |
+
full_library: null,
|
1871 |
+
buckets: [],
|
1872 |
+
passed_walkthroughs: [],
|
1873 |
+
library_filtered_hotspots: [],
|
1874 |
+
paid_library: null,
|
1875 |
+
my_library: null,
|
1876 |
+
wp_version: null,
|
1877 |
+
installed_plugins: null,
|
1878 |
+
current_url: null,
|
1879 |
+
current_plugin: null,
|
1880 |
+
license_status: null,
|
1881 |
+
show_toggle_feedback: true,
|
1882 |
+
sk_debug: null,
|
1883 |
+
qa_mode: false,
|
1884 |
+
bucket_counts: []
|
1885 |
+
},
|
1886 |
+
|
1887 |
+
initialize: function(){
|
1888 |
+
// console.group('%cinitialize: App Model %o', 'color:#3b4580', this);
|
1889 |
+
|
1890 |
+
if ( $.browser.msie && $.browser.version < 9) {
|
1891 |
+
console.error('This browser is not supported');
|
1892 |
+
return false;
|
1893 |
+
}
|
1894 |
+
|
1895 |
+
_.extend(this, Backbone.Events);
|
1896 |
+
SidekickWP.Events = _.extend({}, Backbone.Events);
|
1897 |
+
|
1898 |
+
SidekickWP.Events.on("all", function(eventName){
|
1899 |
+
// console.log('%cPLREVENT: [ %c' + eventName + '%c ] was triggered!','background-color: #fa62bf;color: white','color: yellow; background-color: #fa4339','background-color: #fa4339;color: white');
|
1900 |
+
});
|
1901 |
+
|
1902 |
+
Sidekick.Events.on('loaded_walkthrough',this.loaded_walkthrough,this);
|
1903 |
+
// Sidekick.Events.on('stop',this.show_review,this);
|
1904 |
+
Sidekick.Events.on('stop',this.deactivate_controls,this);
|
1905 |
+
Sidekick.Events.on('track_play',this.activate_controls,this);
|
1906 |
+
|
1907 |
+
SidekickWP.Events.on('screen_activate',this.screen_activate,this);
|
1908 |
+
SidekickWP.Events.on('show_msg',this.show_msg,this);
|
1909 |
+
|
1910 |
+
this.trackingModel = new SidekickWP.Models.Tracking();
|
1911 |
+
|
1912 |
+
var matched_domain = false;
|
1913 |
+
|
1914 |
+
if (sk_config.plugin_url.indexOf('qa.sidekick.pro') > -1 || sk_config.plugin_url.indexOf('local.sidekick.pro') > -1) {
|
1915 |
+
this.set('qa_mode',true);
|
1916 |
+
}
|
1917 |
+
|
1918 |
+
if ((typeof sk_free_library == 'undefined' || !sk_config.library_free_file) && typeof sk_paid_library == 'undefined' || !sk_config.library_paid_file) {
|
1919 |
+
var msg = 'No Library Found!';
|
1920 |
+
SidekickWP.Events.trigger('track_error',{msg: msg});
|
1921 |
+
|
1922 |
+
console.error('Sidekick Library Not Found! -> %s',sk_config.library_file);
|
1923 |
+
return;
|
1924 |
+
} else {
|
1925 |
+
if(typeof sk_paid_library !== 'undefined' && _.size(sk_paid_library.buckets) > 0){
|
1926 |
+
console.groupCollapsed('%cFOUND sk_paid_library %o', 'background-color: #51fa3d; color black;',sk_paid_library);
|
1927 |
+
|
1928 |
+
|
1929 |
+
var paid_library_domain = sk_paid_library.domain_name;
|
1930 |
+
|
1931 |
+
if (paid_library_domain.indexOf(',') > -1) {
|
1932 |
+
var paid_library_domains = paid_library_domain.split(',');
|
1933 |
+
_.each(paid_library_domains,function(item){
|
1934 |
+
if (sk_config.site_url == item.trim()) {
|
1935 |
+
matched_domain = item;
|
1936 |
+
console.log('%cCHECK DOMAIN %o == %o', 'background-color: #51fa3d;color: white',sk_config.site_url,item);
|
1937 |
+
} else {
|
1938 |
+
console.log('%cCHECK DOMAIN %o == %o', 'background-color: #c12029;color: white',sk_config.site_url,item);
|
1939 |
+
}
|
1940 |
+
});
|
1941 |
+
} else {
|
1942 |
+
if (sk_config.site_url == paid_library_domain) {
|
1943 |
+
matched_domain = item;
|
1944 |
+
}
|
1945 |
+
}
|
1946 |
+
console.groupEnd();
|
1947 |
+
} else {
|
1948 |
+
console.log('%cNO paid library','background-color: #c12029;color: white');
|
1949 |
+
sk_config.activation_id = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxfree';
|
1950 |
+
if (typeof sk_free_library == 'undefined' || !sk_config.library_free_file){
|
1951 |
+
console.error('Paid Library didn\'t match domain and no free library');
|
1952 |
+
return false;
|
1953 |
+
}
|
1954 |
+
}
|
1955 |
+
}
|
1956 |
+
|
1957 |
+
if (matched_domain) {
|
1958 |
+
this.set('full_library',sk_paid_library);
|
1959 |
+
this.set('paid_library',sk_paid_library);
|
1960 |
+
console.info('%cPaid Library for %s -> ' + sk_config.library_paid_file + ' (%o)', 'background-color: #51fa3d; color black;',matched_domain,sk_paid_library);
|
1961 |
+
} else {
|
1962 |
+
this.set('full_library',sk_free_library);
|
1963 |
+
console.info('%cFree Library -> ' + sk_config.library_free_file + ' (%o)', 'background-color: #facf42; color black;',sk_free_library);
|
1964 |
+
}
|
1965 |
+
|
1966 |
+
if (typeof sk_config.just_activated != 'undefined')
|
1967 |
+
SidekickWP.Events.trigger('window_activate');
|
1968 |
+
|
1969 |
+
if (typeof sk_config.main_soft_version === 'undefined') {
|
1970 |
+
console.error('No WP Version?!?');
|
1971 |
+
return false;
|
1972 |
+
}
|
1973 |
+
|
1974 |
+
if (typeof sk_config.main_soft_version != 'undefined') this.set('main_soft_version',sk_config.main_soft_version);
|
1975 |
+
if (typeof sk_config.installed_plugins != 'undefined') this.set('installed_plugins',sk_config.installed_plugins);
|
1976 |
+
|
1977 |
+
if (sk_config.track_data === true) console.log("Can't Track User Data!");
|
1978 |
+
|
1979 |
+
this.set('current_url',window.location.toString());
|
1980 |
+
|
1981 |
+
var http = 'http';
|
1982 |
+
if (window.location.toString().indexOf('https') > -1) {
|
1983 |
+
http = 'https';
|
1984 |
+
}
|
1985 |
+
|
1986 |
+
this.views = {};
|
1987 |
+
this.check_library();
|
1988 |
+
this.filter_walkthroughs();
|
1989 |
+
|
1990 |
+
this.views.app = new SidekickWP.Views.App({model: this, el: $("body")});
|
1991 |
+
|
1992 |
+
if (sk_config.show_login === true) {
|
1993 |
+
SidekickWP.Events.trigger('open_sidekick_drawer');
|
1994 |
+
}
|
1995 |
+
// console.groupEnd();
|
1996 |
+
},
|
1997 |
+
|
1998 |
+
screen_activate: function(){
|
1999 |
+
SidekickWP.Events.trigger('open_sidekick_drawer');
|
2000 |
+
|
2001 |
+
var activation_id = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
|
2002 |
+
if (sk_config.activation_id) {
|
2003 |
+
activation_id = sk_config.activation_id;
|
2004 |
+
}
|
2005 |
+
|
2006 |
+
new SidekickWP.Models.User({
|
2007 |
+
'view': 'activate',
|
2008 |
+
'primary_domain': sk_config.domain,
|
2009 |
+
'activation_id': activation_id
|
2010 |
+
});
|
2011 |
+
},
|
2012 |
+
|
2013 |
+
filter_walkthroughs: function(){
|
2014 |
+
console.groupCollapsed('%cFilter Walkthroughs','color: orange');
|
2015 |
+
var library = this.get('full_library');
|
2016 |
+
_.each(library.buckets,function(item,key){
|
2017 |
+
this.filter_sub_bucket_recursive(item);
|
2018 |
+
},this);
|
2019 |
+
|
2020 |
+
_.each(library.buckets,function(item,key){
|
2021 |
+
// Delete root bucket if no sub buckets
|
2022 |
+
this.check_delete_empty_sub_buckets_recrusive(item);
|
2023 |
+
|
2024 |
+
if (_.size(library.buckets[key].sub_buckets) === 0 && _.size(library.buckets[key].walkthroughs) === 0) {
|
2025 |
+
// console.log('%cDELETE ROOT BUCKET -> %o(%o)','color: red',key,library.buckets[key]);
|
2026 |
+
delete(library.buckets[key]);
|
2027 |
+
}
|
2028 |
+
},this);
|
2029 |
+
console.groupEnd();
|
2030 |
+
},
|
2031 |
+
|
2032 |
+
check_delete_empty_sub_buckets_recrusive: function(sub_bucket){
|
2033 |
+
// console.group('%ccheck_delete_empty_sub_buckets_recrusive %o (%o)', 'color: #d2984c;',sub_bucket.post_title,sub_bucket);
|
2034 |
+
|
2035 |
+
if (_.size(sub_bucket.sub_buckets) > 0) {
|
2036 |
+
_.each(sub_bucket.sub_buckets,function(item,key){
|
2037 |
+
if (!this.check_delete_empty_sub_buckets_recrusive(item)) {
|
2038 |
+
// console.error('DELETE key %o', key);
|
2039 |
+
delete(sub_bucket.sub_buckets[key]);
|
2040 |
+
}
|
2041 |
+
},this);
|
2042 |
+
// console.groupEnd();
|
2043 |
+
return true;
|
2044 |
+
} else if (_.size(sub_bucket.sub_buckets) === 0 && _.size(sub_bucket.walkthroughs) === 0 ){
|
2045 |
+
// console.groupEnd();
|
2046 |
+
return false;
|
2047 |
+
}
|
2048 |
+
// console.groupEnd();
|
2049 |
+
return true;
|
2050 |
+
},
|
2051 |
+
|
2052 |
+
filter_sub_bucket_recursive: function(sub_bucket){
|
2053 |
+
console.group('%cfilter_sub_bucket_recursive %s (%o)', 'color: orange',sub_bucket.post_title, sub_bucket);
|
2054 |
+
|
2055 |
+
if (_.size(sub_bucket.sub_buckets) > 0) {
|
2056 |
+
console.log('AAA sub_bucket.sub_buckets %o', sub_bucket.sub_buckets);
|
2057 |
+
_.each(sub_bucket.sub_buckets,function(item,key){
|
2058 |
+
return this.filter_sub_bucket_recursive(item);
|
2059 |
+
},this);
|
2060 |
+
} else if (_.size(sub_bucket.walkthroughs)) {
|
2061 |
+
console.log('BBB Filter walkthrough %o', sub_bucket.walkthroughs);
|
2062 |
+
// Filter walkthrough
|
2063 |
+
sub_bucket.walkthroughs.reverse();
|
2064 |
+
var key = sub_bucket.walkthroughs.length;
|
2065 |
+
while (key--) {
|
2066 |
+
var walkthrough = sub_bucket.walkthroughs[key];
|
2067 |
+
if (!this.check_walkthrough_compatibility(walkthrough)) {
|
2068 |
+
console.error('DELETE sub_bucket.walkthroughs[key] %o', sub_bucket.walkthroughs[key]);
|
2069 |
+
sub_bucket.walkthroughs.splice(key, 1);
|
2070 |
+
continue;
|
2071 |
+
}
|
2072 |
+
|
2073 |
+
// Check if Hotspot, if so move out
|
2074 |
+
if (walkthrough.type == 'hotspot') {
|
2075 |
+
_.each(walkthrough.hotspots,function(item){
|
2076 |
+
console.info(' HOTSPOT %o', item);
|
2077 |
+
var library_filtered_hotspots = this.get('library_filtered_hotspots');
|
2078 |
+
library_filtered_hotspots.push({
|
2079 |
+
url:item.url,selector:
|
2080 |
+
item.selector,id:walkthrough.id
|
2081 |
+
});
|
2082 |
+
this.set('library_filtered_hotspots',library_filtered_hotspots);
|
2083 |
+
},this);
|
2084 |
+
console.error('DELETE2 sub_bucket.walkthroughs[key] %o %o', key,sub_bucket.walkthroughs[key]);
|
2085 |
+
sub_bucket.walkthroughs.splice(key, 1);
|
2086 |
+
continue;
|
2087 |
+
}
|
2088 |
+
}
|
2089 |
+
} else {
|
2090 |
+
// Sub_bucket has no walkthroughs
|
2091 |
+
console.log('CCC Sub_bucket has no walkthroughs');
|
2092 |
+
}
|
2093 |
+
console.groupEnd();
|
2094 |
+
return false;
|
2095 |
+
},
|
2096 |
+
|
2097 |
+
check_walkthrough_compatibility: function(walkthrough){
|
2098 |
+
var main_soft_version = this.get('main_soft_version');
|
2099 |
+
var pass_main_soft_version = false, pass_theme_version = false, pass_theme = false, pass_plugin = false, pass_plugin_version = false, pass_user_level = false;
|
2100 |
+
var bucket_counts = this.get('bucket_counts');
|
2101 |
+
var installed_plugins = this.get('installed_plugins') ;
|
2102 |
+
|
2103 |
+
// Checking Main Software Version Compatibility
|
2104 |
+
if (walkthrough.main_soft_version) {
|
2105 |
+
pass_main_soft_version = _.find(walkthrough.main_soft_version,function(val){
|
2106 |
+
if (val == main_soft_version)
|
2107 |
+
return true;
|
2108 |
+
});
|
2109 |
+
} else {
|
2110 |
+
// If no assigned main_soft_version assume not needed
|
2111 |
+
pass_main_soft_version = true;
|
2112 |
+
}
|
2113 |
+
|
2114 |
+
|
2115 |
+
if (!pass_main_soft_version){
|
2116 |
+
console.error('FAILED %o - SOFT_VER %o != %O',walkthrough.title, main_soft_version,walkthrough.main_soft_version);
|
2117 |
+
return false;
|
2118 |
+
}
|
2119 |
+
|
2120 |
+
// Checking Theme Compatibility
|
2121 |
+
if (typeof walkthrough.theme !== 'undefined') {
|
2122 |
+
if (walkthrough.theme === sk_config.installed_theme) {
|
2123 |
+
pass_theme = true;
|
2124 |
+
if (walkthrough.theme_version) {
|
2125 |
+
pass_theme_version = _.find(walkthrough.theme_version,function(val){
|
2126 |
+
if (val == sk_config.theme_version) {
|
2127 |
+
return true;
|
2128 |
+
}
|
2129 |
+
});
|
2130 |
+
} else {
|
2131 |
+
pass_theme_version = true;
|
2132 |
+
}
|
2133 |
+
}
|
2134 |
+
if (!pass_theme || !pass_theme_version){
|
2135 |
+
console.error('FAILED %o - THEME %s (%o) != %s (%o)',walkthrough.title,walkthrough.theme_version, walkthrough.theme, pass_theme, sk_config.theme_version);
|
2136 |
+
return false;
|
2137 |
+
}
|
2138 |
+
}
|
2139 |
+
|
2140 |
+
// Checking Plugin Compatibility
|
2141 |
+
if (typeof walkthrough.plugin !== 'undefined') {
|
2142 |
+
if (typeof sk_config.installed_plugins === 'undefined') return false;
|
2143 |
+
pass_plugin = _.find(sk_config.installed_plugins,function(plugin_data){
|
2144 |
+
for (var plugin in plugin_data) {
|
2145 |
+
var version = plugin_data[plugin];
|
2146 |
+
|
2147 |
+
if (plugin == walkthrough.plugin || _.escape(plugin) == walkthrough.plugin) {
|
2148 |
+
pass_plugin = true;
|
2149 |
+
|
2150 |
+
pass_plugin_version = _.find(walkthrough.plugin_version,function(version2){
|
2151 |
+
if (version == version2) {
|
2152 |
+
pass_plugin_version = true;
|
2153 |
+
return true;
|
2154 |
+
}
|
2155 |
+
});
|
2156 |
+
return true;
|
2157 |
+
}
|
2158 |
+
break;
|
2159 |
+
}
|
2160 |
+
});
|
2161 |
+
|
2162 |
+
if (!pass_plugin) {
|
2163 |
+
console.error('FAILED %o (%o) - PLUGIN %s (%o)',walkthrough.title, walkthrough, walkthrough.plugin, sk_config.installed_plugins);
|
2164 |
+
return false;
|
2165 |
+
}
|
2166 |
+
if (!pass_plugin_version){
|
2167 |
+
console.error('FAILED %o (%o) - PLUGIN %s VER %s (%o)',walkthrough.title, walkthrough, walkthrough.plugin, walkthrough.plugin_version, sk_config.installed_plugins);
|
2168 |
+
return false;
|
2169 |
+
}
|
2170 |
+
}
|
2171 |
+
|
2172 |
+
// Checking User Role/Level Compatibility
|
2173 |
+
if (walkthrough.role) {
|
2174 |
+
pass_user_level = _.find(walkthrough.role,function(val){
|
2175 |
+
if (val == sk_config.user_level) {
|
2176 |
+
return true;
|
2177 |
+
}
|
2178 |
+
});
|
2179 |
+
} else {
|
2180 |
+
// No User Level Defined so assume not needed
|
2181 |
+
pass_user_level = true;
|
2182 |
+
}
|
2183 |
+
|
2184 |
+
if (!pass_user_level){
|
2185 |
+
console.error('FAILED %o - User Level %s != %s',walkthrough.title, sk_config.user_level, walkthrough.role);
|
2186 |
+
return false;
|
2187 |
+
}
|
2188 |
+
|
2189 |
+
var passed_walkthroughs = this.get('passed_walkthroughs');
|
2190 |
+
passed_walkthroughs.push(walkthrough.id);
|
2191 |
+
this.set('passed_walkthroughs',passed_walkthroughs);
|
2192 |
+
|
2193 |
+
if (walkthrough.plugin) {
|
2194 |
+
console.log('%cPASSED! %o', 'color: #3ab00b',walkthrough.plugin + ': ' + walkthrough.title);
|
2195 |
+
} else {
|
2196 |
+
console.log('%cPASSED! %o', 'color: #3ab00b',walkthrough.title);
|
2197 |
+
}
|
2198 |
+
|
2199 |
+
return true;
|
2200 |
+
},
|
2201 |
+
|
2202 |
+
check_library: function(){
|
2203 |
+
if (!this.get('full_library')) {
|
2204 |
+
console.error("WPU Library Not Found!");
|
2205 |
+
return false;
|
2206 |
+
}
|
2207 |
+
if (!this.get('main_soft_version')){
|
2208 |
+
console.error("No WP Version Found!");
|
2209 |
+
return false;
|
2210 |
+
}
|
2211 |
+
},
|
2212 |
+
|
2213 |
+
loaded_walkthrough: function(walkthrough_model){
|
2214 |
+
// console.log('WPU:loaded_walkthrough');
|
2215 |
+
this.set('last_loaded_walkthrough',walkthrough_model);
|
2216 |
+
},
|
2217 |
+
|
2218 |
+
activate_controls: function(){
|
2219 |
+
console.log('activate_controls');
|
2220 |
+
$('div#sidekick').addClass('playing');
|
2221 |
+
},
|
2222 |
+
|
2223 |
+
deactivate_controls: function(){
|
2224 |
+
$('div#sidekick').removeClass('playing');
|
2225 |
+
},
|
2226 |
+
|
2227 |
+
show_msg: function(data,context){
|
2228 |
+
// console.log('show_msg %o',arguments);
|
2229 |
+
new SidekickWP.Models.Message({title: data.title, message: data.msg});
|
2230 |
+
},
|
2231 |
+
getParameterByName: function(name) {
|
2232 |
+
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
|
2233 |
+
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
|
2234 |
+
results = regex.exec(location.search);
|
2235 |
+
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
|
2236 |
+
}
|
2237 |
+
});
|
2238 |
+
}(jQuery));;(function($) {
|
2239 |
+
|
2240 |
+
SidekickWP.Models.BucketContainer = Backbone.Model.extend({
|
2241 |
+
defaults: {
|
2242 |
+
navigation_history: ['buckets']
|
2243 |
+
},
|
2244 |
+
|
2245 |
+
initialize: function(){
|
2246 |
+
this.view = new SidekickWP.Views.BucketContainer({model: this});
|
2247 |
+
return this;
|
2248 |
+
}
|
2249 |
+
});
|
2250 |
+
|
2251 |
+
}(jQuery));;(function($) {
|
2252 |
+
|
2253 |
+
SidekickWP.Models.Bucket = Backbone.Model.extend({
|
2254 |
+
defaults: {
|
2255 |
+
full_library: null
|
2256 |
+
},
|
2257 |
+
|
2258 |
+
initialize: function(){
|
2259 |
+
// console.log('initialize bucketModel %o', this.attributes);
|
2260 |
+
this.view = new SidekickWP.Views.Bucket({model: this});
|
2261 |
+
return this;
|
2262 |
+
}
|
2263 |
+
});
|
2264 |
+
|
2265 |
+
}(jQuery));;(function($) {
|
2266 |
+
|
2267 |
+
SidekickWP.Helpers = ({
|
2268 |
+
preventScrolling: function(){
|
2269 |
+
$('div#sidekick .bucketContainer>div>ul').on('DOMMouseScroll mousewheel', function(ev) {
|
2270 |
+
console.log('asd');
|
2271 |
+
var $this = $(this),
|
2272 |
+
scrollTop = this.scrollTop,
|
2273 |
+
scrollHeight = this.scrollHeight,
|
2274 |
+
height = $this.height(),
|
2275 |
+
delta = (ev.type == 'DOMMouseScroll' ?
|
2276 |
+
ev.originalEvent.detail * -40 :
|
2277 |
+
ev.originalEvent.wheelDelta),
|
2278 |
+
up = delta > 0;
|
2279 |
+
|
2280 |
+
var prevent = function() {
|
2281 |
+
ev.stopPropagation();
|
2282 |
+
ev.preventDefault();
|
2283 |
+
ev.returnValue = false;
|
2284 |
+
return false;
|
2285 |
+
};
|
2286 |
+
|
2287 |
+
if (!up && -delta > scrollHeight - height - scrollTop) {
|
2288 |
+
// Scrolling down, but this will take us past the bottom.
|
2289 |
+
$this.scrollTop(scrollHeight);
|
2290 |
+
return prevent();
|
2291 |
+
} else if (up && delta > scrollTop) {
|
2292 |
+
// Scrolling up, but this will take us past the top.
|
2293 |
+
$this.scrollTop(0);
|
2294 |
+
return prevent();
|
2295 |
+
}
|
2296 |
+
});
|
2297 |
+
}
|
2298 |
+
});
|
2299 |
+
}(jQuery));
|
2300 |
+
|
2301 |
+
;(function($) {
|
2302 |
+
|
2303 |
+
SidekickWP.Models.Message = Backbone.Model.extend({
|
2304 |
+
defaults: {
|
2305 |
+
title: null,
|
2306 |
+
message: null
|
2307 |
+
},
|
2308 |
+
|
2309 |
+
initialize: function(){
|
2310 |
+
this.view = new SidekickWP.Views.Message({model: this, el: $("#sidekick ul.bucketContainer div")});
|
2311 |
+
}
|
2312 |
+
});
|
2313 |
+
|
2314 |
+
}(jQuery));;(function($) {
|
2315 |
+
|
2316 |
+
SidekickWP.Models.Review = Backbone.Model.extend({
|
2317 |
+
defaults: {
|
2318 |
+
walkthrough_title: null
|
2319 |
+
},
|
2320 |
+
|
2321 |
+
initialize: function(){
|
2322 |
+
this.view = new SidekickWP.Views.Review({model: this, el: $("#sidekick .bucketContainer div")});
|
2323 |
+
}
|
2324 |
+
});
|
2325 |
+
|
2326 |
+
}(jQuery));;(function($) {
|
2327 |
+
|
2328 |
+
SidekickWP.Models.Tracking = Backbone.Model.extend({
|
2329 |
+
defaults : {
|
2330 |
+
gaAccountID : 'UA-39283622-1'
|
2331 |
+
},
|
2332 |
+
|
2333 |
+
initialize: function(){
|
2334 |
+
SidekickWP.Events.on('track_open_sidekick_window', this.track_open_sidekick_window, this);
|
2335 |
+
SidekickWP.Events.on('track_explore', this.track_explore, this);
|
2336 |
+
SidekickWP.Events.on('window_activate', this.window_activate, this);
|
2337 |
+
SidekickWP.Events.on('window_deactivate', this.window_deactivate, this);
|
2338 |
+
SidekickWP.Events.on('track_error', this.track_error, this);
|
2339 |
+
|
2340 |
+
window._gaq = window._gaq || [];
|
2341 |
+
window._gaq.push(['sidekickWP._setAccount', this.get('gaAccountID')]);
|
2342 |
+
|
2343 |
+
(function() {
|
2344 |
+
var ga_sk = document.createElement('script'); ga_sk.type = 'text/javascript'; ga_sk.async = true;
|
2345 |
+
ga_sk.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
2346 |
+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga_sk, s);
|
2347 |
+
})();
|
2348 |
+
},
|
2349 |
+
|
2350 |
+
send: function(data){
|
2351 |
+
if (typeof sk_config.tracking_off !== 'undefined' && sk_config.tracking_off === true) {
|
2352 |
+
console.log("Tracking is off!");
|
2353 |
+
return false;
|
2354 |
+
}
|
2355 |
+
|
2356 |
+
model = window.sidekickWP || {};
|
2357 |
+
|
2358 |
+
data = data || {};
|
2359 |
+
data.source = 'plugin';
|
2360 |
+
data.action = 'track';
|
2361 |
+
data.config = sk_config;
|
2362 |
+
|
2363 |
+
if (typeof sidekick !== 'undefined' && (typeof sk_config.track_data === 'undefined' || sk_config.track_data === true)) {
|
2364 |
+
data.user = sk_config.license_key;
|
2365 |
+
}
|
2366 |
+
|
2367 |
+
var http = 'http';
|
2368 |
+
if (window.location.toString().indexOf('https') > -1) {
|
2369 |
+
http = 'https';
|
2370 |
+
}
|
2371 |
+
|
2372 |
+
// console.log('WP: send tracking to WPU',data);
|
2373 |
+
$.post(http + "://library.sidekick.pro/wp-admin/admin-ajax.php", data);
|
2374 |
+
},
|
2375 |
+
|
2376 |
+
track_explore: function(data){
|
2377 |
+
window._gaq.push(['sidekickWP._trackEvent', 'Plugin - Explore', data.what, null, 0,true]);
|
2378 |
+
this.send({type: 'explore', label: data.what, data: data.id});
|
2379 |
+
},
|
2380 |
+
|
2381 |
+
track_open_sidekick_window: function(data){
|
2382 |
+
window._gaq.push(['sidekickWP._trackEvent', 'Plugin - Window', 'Open', null, 0,true]);
|
2383 |
+
this.send({type: 'open'});
|
2384 |
+
},
|
2385 |
+
|
2386 |
+
window_activate: function(data){
|
2387 |
+
window._gaq.push(['sidekickWP._trackEvent', 'Plugin - Activate', '', sk_config.wpu_plugin_version, 0,true]);
|
2388 |
+
this.send({type: 'activate'});
|
2389 |
+
},
|
2390 |
+
|
2391 |
+
window_deactivate: function(data){
|
2392 |
+
window._gaq.push(['sidekickWP._trackEvent', 'Plugin - Deactivate', '', sk_config.wpu_plugin_version, 0,true]);
|
2393 |
+
this.send({type: 'deactivate'});
|
2394 |
+
},
|
2395 |
+
|
2396 |
+
track_error: function(data){
|
2397 |
+
window._gaq.push(['sidekickWP._trackEvent', 'Plugin', 'Error', data.msg,null,true]);
|
2398 |
+
this.send({type: 'error', label: data.msg});
|
2399 |
+
}
|
2400 |
+
|
2401 |
+
});
|
2402 |
+
|
2403 |
+
}(jQuery));
|
2404 |
+
|
2405 |
+
|
2406 |
+
;(function($) {
|
2407 |
+
|
2408 |
+
SidekickWP.Models.User = Backbone.Model.extend({
|
2409 |
+
defaults: {
|
2410 |
+
view: null,
|
2411 |
+
http: 'http'
|
2412 |
+
},
|
2413 |
+
|
2414 |
+
initialize: function(){
|
2415 |
+
if (window.location.toString().indexOf('https') > -1) {
|
2416 |
+
this.set('http','https');
|
2417 |
+
}
|
2418 |
+
this.view = new SidekickWP.Views.User({model: this, el: $("#sidekick ul.sk_bucketContainer div")});
|
2419 |
+
}
|
2420 |
+
});
|
2421 |
+
|
2422 |
+
}(jQuery));;(function($) {
|
2423 |
+
SidekickWP.Views.App = Backbone.View.extend({
|
2424 |
+
initialize: function(){
|
2425 |
+
SidekickWP.Events.on('toggle_sidekick_drawer', this.toggle_sidekick_drawer, this);
|
2426 |
+
SidekickWP.Events.on('close_sidekick_drawer', this.close_sidekick_drawer, this);
|
2427 |
+
SidekickWP.Events.on('open_sidekick_drawer', this.open_sidekick_drawer, this);
|
2428 |
+
SidekickWP.Events.on('resize_sidekick_drawer', this.resize_sidekick_drawer, this);
|
2429 |
+
SidekickWP.Events.on('toggle_hotspots', this.toggle_hotspots, this);
|
2430 |
+
SidekickWP.Events.on('toggle_preferences', this.toggle_preferences, this);
|
2431 |
+
SidekickWP.Events.on('window_resize', this.check_sidebar_minifiy, this);
|
2432 |
+
SidekickWP.Events.on('size_drawer', this.size_drawer, this);
|
2433 |
+
|
2434 |
+
|
2435 |
+
Sidekick.Events.on('track_play', this.check_sidebar_minifiy, this);
|
2436 |
+
Sidekick.Events.on('track_play', this.toggle_sidekick_drawer,'hide');
|
2437 |
+
Sidekick.Events.on('track_stop', this.open_sidekick_drawer);
|
2438 |
+
|
2439 |
+
Sidekick.Events.on('track_play', this.remove_hotspots,this);
|
2440 |
+
Sidekick.Events.on('track_stop', this.draw_hotspots,this);
|
2441 |
+
|
2442 |
+
Sidekick.Events.on('nextStep', this.update_debugger);
|
2443 |
+
|
2444 |
+
return this.render();
|
2445 |
+
},
|
2446 |
+
|
2447 |
+
render: function(){
|
2448 |
+
console.groupEnd('%crender: SidekickWP: appView %o', 'color:#8fa2ff', this);
|
2449 |
+
|
2450 |
+
this.BucketContainer = new SidekickWP.Models.BucketContainer({
|
2451 |
+
full_library: this.model.get('full_library')
|
2452 |
+
});
|
2453 |
+
|
2454 |
+
if (_.size(this.model.get('full_library').buckets) > 0) {
|
2455 |
+
BucketContainer = this.BucketContainer.view.render().$el.html();
|
2456 |
+
} else {
|
2457 |
+
BucketContainer = '<div class="warning"><div class="padding">Sorry but there is no walkthroughs found for ' + sk_config.main_soft_name + ' ' + sk_config.main_soft_version + '</div></div>';
|
2458 |
+
SidekickWP.Events.trigger('show_msg',{title: "No Walkthroughs", msg: "We're sorry but it looks like there are no walkthroughs compatible with your version of software."},this.model);
|
2459 |
+
}
|
2460 |
+
|
2461 |
+
var template = _.template( SidekickWP.Templates.App, {
|
2462 |
+
sk_debug: this.model.get('sk_debug'),
|
2463 |
+
BucketContainer: BucketContainer,
|
2464 |
+
paid_library: this.model.get('paid_library'),
|
2465 |
+
hotspots: $.cookie('sidekick_hotspots')
|
2466 |
+
});
|
2467 |
+
this.$el.append( template );
|
2468 |
+
|
2469 |
+
if (!this.model.get('show_toggle_feedback'))
|
2470 |
+
$('#sk_taskbar #toggle_feedback').hide();
|
2471 |
+
|
2472 |
+
SidekickWP.Events.trigger('rendered');
|
2473 |
+
Sidekick.Events.trigger('bind_controls');
|
2474 |
+
|
2475 |
+
// this.toggle_sidekick_window();
|
2476 |
+
this.draw_hotspots();
|
2477 |
+
|
2478 |
+
var currentDebugMode = $.cookie('sidekick_debug_mode');
|
2479 |
+
|
2480 |
+
$(document).bind('keypress.sidekickwp',{context: this}, function(e){
|
2481 |
+
console.log('e %o', e);
|
2482 |
+
console.log('e.keyCode %o', e.keyCode);
|
2483 |
+
|
2484 |
+
if ((e.keyCode == 68 || e.charCode == 68) && e.shiftKey === true) { // shift D
|
2485 |
+
var currentDebugMode = $.cookie('sidekick_debug_mode');
|
2486 |
+
|
2487 |
+
if (currentDebugMode){
|
2488 |
+
console.log('DEBUG MODE ON');
|
2489 |
+
$('.sk_debug').hide();
|
2490 |
+
$.cookie('sidekick_debug_mode', 0, { expires: 0, path: '/' });
|
2491 |
+
$.cookie('sidekick_active_walkthrough_current_step_DEBUG', null, { expires: 0, path: '/' });
|
2492 |
+
} else {
|
2493 |
+
console.log('DEBUG MODE OFF');
|
2494 |
+
$('.sk_debug').show();
|
2495 |
+
$.cookie('sidekick_debug_mode', 1, { expires: 365, path: '/' });
|
2496 |
+
}
|
2497 |
+
}
|
2498 |
+
});
|
2499 |
+
|
2500 |
+
$('.sk_debug input').bind('keyup.sidekickwp',{context: this}, function(e){
|
2501 |
+
if ($.isNumeric($('.sk_debug input').val())) {
|
2502 |
+
console.log('Saving Debug Step');
|
2503 |
+
$.cookie('sidekick_active_walkthrough_current_step_DEBUG', parseInt($('.sk_debug input').val(),10), { expires: 1, path: '/' });
|
2504 |
+
} else {
|
2505 |
+
console.log('Clearing Debug Step');
|
2506 |
+
$.cookie('sidekick_active_walkthrough_current_step_DEBUG', null, { expires: 0, path: '/' });
|
2507 |
+
}
|
2508 |
+
});
|
2509 |
+
|
2510 |
+
if (currentDebugMode) {
|
2511 |
+
var activeStepDEBUG = $.cookie('sidekick_active_walkthrough_current_step_DEBUG');
|
2512 |
+
if (activeStepDEBUG) {
|
2513 |
+
$('.sk_debug input').val(activeStepDEBUG);
|
2514 |
+
}
|
2515 |
+
$('.sk_debug').show();
|
2516 |
+
}
|
2517 |
+
|
2518 |
+
// if (sk_config.open_bucket) {
|
2519 |
+
// SidekickWP.Events.trigger('open_sidekick_drawer');
|
2520 |
+
// $('[data-open_bucket="' + sk_config.open_bucket + '"],[data-open_walkthroughs="' + sk_config.open_bucket + '"]').trigger('click');
|
2521 |
+
// }
|
2522 |
+
|
2523 |
+
$(window).resize(_.debounce(function(){
|
2524 |
+
SidekickWP.Events.trigger('resize_sidekick_drawer');
|
2525 |
+
},500));
|
2526 |
+
|
2527 |
+
$(window).resize(_.debounce(function(){
|
2528 |
+
SidekickWP.Events.trigger('window_resize');
|
2529 |
+
},500));
|
2530 |
+
|
2531 |
+
console.groupEnd();
|
2532 |
+
return this;
|
2533 |
+
},
|
2534 |
+
|
2535 |
+
events: {
|
2536 |
+
"click #logo,.sk_toggle": "toggle_sidekick_window",
|
2537 |
+
"click #toggle_drawer": "toggle_sidekick_drawer",
|
2538 |
+
"click #toggle_hotspots": "toggle_hotspots",
|
2539 |
+
"click #toggle_preferences": "toggle_preferences",
|
2540 |
+
"click #toggle_feedback": "show_feedback",
|
2541 |
+
"click #close_sidekick": "close_sidekick_window",
|
2542 |
+
"click #sk_upgrade button": "screen_activate"
|
2543 |
+
},
|
2544 |
+
|
2545 |
+
update_debugger: function(){
|
2546 |
+
|
2547 |
+
$('#sidekick .step_count').html('Current Step: ' + sidekick.walkthroughModel.get('currentStep') + '/' + _.size(sidekick.walkthroughModel.get('steps')));
|
2548 |
+
},
|
2549 |
+
|
2550 |
+
screen_activate: function(){
|
2551 |
+
SidekickWP.Events.trigger('screen_activate');
|
2552 |
+
},
|
2553 |
+
|
2554 |
+
check_sidebar_minifiy: function(){
|
2555 |
+
var width = $( document ).width();
|
2556 |
+
var playing = $('#sidekick').hasClass('playing');
|
2557 |
+
if (width < 784 && playing) {
|
2558 |
+
$('.sidekick_stop').trigger('click');
|
2559 |
+
Sidekick.Events.trigger('show_modal',{error_id:1,msg: 'Sidekick requires a larger window to run properly.'});
|
2560 |
+
}
|
2561 |
+
|
2562 |
+
if ('body.sticky-menu') {
|
2563 |
+
$('body').removeClass('sticky-menu');
|
2564 |
+
$('body').removeClass('auto-fold');
|
2565 |
+
// $('li#collapse-menu').trigger('click');
|
2566 |
+
}
|
2567 |
+
},
|
2568 |
+
|
2569 |
+
goto_config: function(){
|
2570 |
+
// console.log('goto_config');
|
2571 |
+
window.open(sk_config.plugin_url,'_self');
|
2572 |
+
},
|
2573 |
+
|
2574 |
+
show_feedback: function(){
|
2575 |
+
// console.log('show_feedback');
|
2576 |
+
Sidekick.Events.trigger('show_modal',{title:'Feedback',message: 'Send us some feedback!',primary_button_message: 'Send',secondary_button_message:'Cancel',email:sk_config.user_email});
|
2577 |
+
},
|
2578 |
+
|
2579 |
+
resize_sidekick_drawer: function(){
|
2580 |
+
// console.log('resize_sidekick_drawer %o', $('#sk_drawer').height());
|
2581 |
+
// console.log('$(#sidekick).hasClass(open) %o', $('div#sidekick').hasClass('open'));
|
2582 |
+
|
2583 |
+
if ($('div#sidekick').hasClass('open')) {
|
2584 |
+
if ($('#sk_drawer').height() > 0) {
|
2585 |
+
SidekickWP.Events.trigger('size_drawer');
|
2586 |
+
}
|
2587 |
+
} else {
|
2588 |
+
$('#sk_drawer').height(0);
|
2589 |
+
}
|
2590 |
+
},
|
2591 |
+
|
2592 |
+
toggle_preferences: function(){
|
2593 |
+
window.open(sk_config.plugin_url,'_self');
|
2594 |
+
},
|
2595 |
+
|
2596 |
+
toggle_sidekick_drawer: function(force){
|
2597 |
+
// console.log('toggle_sidekick_drawer %o | %o | %o', force,$('#sk_drawer').height(),$('div#sidekick').hasClass('open'));
|
2598 |
+
|
2599 |
+
if ($('#sk_drawer').height() > 0 || force == 'hide' || !$('div#sidekick').hasClass('open')) {
|
2600 |
+
// $('.sk_hotspot').hide();
|
2601 |
+
SidekickWP.Events.trigger('close_sidekick_drawer');
|
2602 |
+
} else {
|
2603 |
+
SidekickWP.Events.trigger('open_sidekick_drawer');
|
2604 |
+
}
|
2605 |
+
},
|
2606 |
+
|
2607 |
+
close_sidekick_drawer: function(){
|
2608 |
+
console.log('Closing Drawer');
|
2609 |
+
$('div#sidekick').addClass('drawer_closed').removeClass('drawer_open');
|
2610 |
+
$('div#sidekick #toggle_drawer').removeClass('on');
|
2611 |
+
$('#sk_drawer .sk_bucketContainer,#sk_drawer').css({
|
2612 |
+
height: 0,
|
2613 |
+
transition: 'height 0.3s ease-in-out'
|
2614 |
+
});
|
2615 |
+
},
|
2616 |
+
|
2617 |
+
open_sidekick_drawer: function(){
|
2618 |
+
console.log('Open Drawer');
|
2619 |
+
|
2620 |
+
$('div#sidekick').addClass('drawer_open').removeClass('drawer_closed');
|
2621 |
+
$('.sk_hotspot').show();
|
2622 |
+
SidekickWP.Events.trigger('size_drawer');
|
2623 |
+
},
|
2624 |
+
|
2625 |
+
size_drawer: function(){
|
2626 |
+
var window_height = $(window).height();
|
2627 |
+
var sk_drawer_height = window_height - 80;
|
2628 |
+
var sk_bucketContainer_height = sk_drawer_height - 56;
|
2629 |
+
if ($('#sk_upgrade').length > 0) {
|
2630 |
+
sk_bucketContainer_height -= $('#sk_upgrade').height();
|
2631 |
+
}
|
2632 |
+
var sub_bucket_height = window_height - 137;
|
2633 |
+
var sub_bucket_inner_height = sub_bucket_height - $('#sk_upgrade').height() - 58;
|
2634 |
+
|
2635 |
+
$('div#sidekick').addClass('open');
|
2636 |
+
$('div#sidekick .sk_caption').removeClass('show');
|
2637 |
+
$('div#sidekick #toggle_drawer').addClass('on');
|
2638 |
+
$('#sk_drawer').css({
|
2639 |
+
height: sk_drawer_height,
|
2640 |
+
transition: 'height 0.3s ease-in-out'
|
2641 |
+
});
|
2642 |
+
$('#sk_drawer .sk_bucketContainer').css({
|
2643 |
+
height: sk_bucketContainer_height,
|
2644 |
+
transition: 'height 0.3s ease-in-out'
|
2645 |
+
});
|
2646 |
+
$('#sk_drawer .sub_bucket').css({
|
2647 |
+
maxHeight: sub_bucket_height,
|
2648 |
+
transition: 'all 0.3s ease-in-out'
|
2649 |
+
});
|
2650 |
+
$('#sk_drawer .sub_bucket_inner').css({
|
2651 |
+
height: sub_bucket_inner_height
|
2652 |
+
});
|
2653 |
+
},
|
2654 |
+
|
2655 |
+
toggle_sidekick_window: function(e){
|
2656 |
+
console.log('toggle_sidekick_window');
|
2657 |
+
|
2658 |
+
if ($('div#sidekick').hasClass('open')) {
|
2659 |
+
// console.log('Closing Sidekick Window');
|
2660 |
+
SidekickWP.Events.trigger('close_sidekick_drawer');
|
2661 |
+
$('div#sidekick').wait(500).removeClass('open');
|
2662 |
+
} else {
|
2663 |
+
SidekickWP.Events.trigger('track_explore',{what:'Sidekick - Open'});
|
2664 |
+
// console.log('Showing Sidekick Window');
|
2665 |
+
$('div#sidekick').addClass('open').wait(500,function(e){
|
2666 |
+
SidekickWP.Events.trigger('open_sidekick_drawer');
|
2667 |
+
});
|
2668 |
+
}
|
2669 |
+
},
|
2670 |
+
|
2671 |
+
close_sidekick_window: function(e){
|
2672 |
+
// console.log('close_sidekick_window');
|
2673 |
+
if ($('div#sidekick').hasClass('open')) {
|
2674 |
+
SidekickWP.Events.trigger('toggle_sidekick_drawer');
|
2675 |
+
$('div#sidekick').wait(500).removeClass('open');
|
2676 |
+
}
|
2677 |
+
},
|
2678 |
+
|
2679 |
+
toggle_hotspots: function(){
|
2680 |
+
console.log('toggle_hotspots');
|
2681 |
+
if ($('#toggle_hotspots').hasClass('on')) {
|
2682 |
+
// console.log('Turning off hotspots');
|
2683 |
+
$('#toggle_hotspots').removeClass('on');
|
2684 |
+
$.cookie('sidekick_hotspots', 0, { expires: 365, path: '/' });
|
2685 |
+
$('.sk_hotspot').parent().remove();
|
2686 |
+
} else {
|
2687 |
+
// console.log('Turning on hotspots');
|
2688 |
+
$('#toggle_hotspots').addClass('on');
|
2689 |
+
$.cookie('sidekick_hotspots', 1, { expires: 365, path: '/' });
|
2690 |
+
this.draw_hotspots();
|
2691 |
+
}
|
2692 |
+
},
|
2693 |
+
|
2694 |
+
remove_hotspots: function(){
|
2695 |
+
// console.log('remove_hotspots');
|
2696 |
+
|
2697 |
+
this.unbind_hotspot_targets();
|
2698 |
+
$('.sk_hotspot').parent().remove();
|
2699 |
+
},
|
2700 |
+
|
2701 |
+
unbind_hotspot_targets: function(){
|
2702 |
+
// console.log('unbind_hotspot_targets');
|
2703 |
+
var hotspots = this.model.get('library_filtered_hotspots');
|
2704 |
+
var url = window.location.toString();
|
2705 |
+
|
2706 |
+
for(var hotspot in hotspots){
|
2707 |
+
hotspot_data = hotspots[hotspot];
|
2708 |
+
|
2709 |
+
if (url.indexOf(hotspot_data.url) > -1) {
|
2710 |
+
selectors = hotspot_data.selector;
|
2711 |
+
$(selectors).off('css-change');
|
2712 |
+
}
|
2713 |
+
}
|
2714 |
+
},
|
2715 |
+
|
2716 |
+
draw_hotspots: function(){
|
2717 |
+
var hotspots = this.model.get('library_filtered_hotspots');
|
2718 |
+
console.groupCollapsed('Attaching Hotspots [%o]',hotspots.length);
|
2719 |
+
|
2720 |
+
var url = window.location.toString();
|
2721 |
+
var show_hotspots = $.cookie('sidekick_hotspots');
|
2722 |
+
var count = 0;
|
2723 |
+
var hotspot_data;
|
2724 |
+
var hotspot;
|
2725 |
+
var selectors;
|
2726 |
+
|
2727 |
+
console.log('show_hotspots %o', show_hotspots);
|
2728 |
+
console.log('show_hotspots === true %o', show_hotspots === true);
|
2729 |
+
|
2730 |
+
// Counting Hotspots
|
2731 |
+
for(hotspot in hotspots){
|
2732 |
+
hotspot_data = hotspots[hotspot];
|
2733 |
+
|
2734 |
+
if (url.indexOf(hotspot_data.url) > -1) {
|
2735 |
+
selectors = hotspot_data.selector;
|
2736 |
+
|
2737 |
+
if ($(selectors).length == 1 && $(selectors).is(':visible')) {
|
2738 |
+
console.log('hotspot selectors-1 %o', selectors);
|
2739 |
+
count++;
|
2740 |
+
} else if ($(selectors).length > 1){
|
2741 |
+
_.each($(selectors),function(item,key){
|
2742 |
+
if ($(item).length && $(item).is(':visible')) {
|
2743 |
+
console.log('hotspot selectors-2 %o', item);
|
2744 |
+
count++;
|
2745 |
+
}
|
2746 |
+
});
|
2747 |
+
}
|
2748 |
+
}
|
2749 |
+
}
|
2750 |
+
|
2751 |
+
if (count > 0) {
|
2752 |
+
$('div#sidekick #toggle_hotspots').html(count).show();
|
2753 |
+
} else {
|
2754 |
+
$('div#sidekick #toggle_hotspots').html(count).hide();
|
2755 |
+
}
|
2756 |
+
|
2757 |
+
if (show_hotspots === '1' || typeof show_hotspots === 'undefined') { // User unspecified default is on
|
2758 |
+
|
2759 |
+
for(hotspot in hotspots){
|
2760 |
+
|
2761 |
+
var selector_x = 'left';
|
2762 |
+
var selector_y = 'top';
|
2763 |
+
var hotspot_x = 'right';
|
2764 |
+
var hotspot_y = 'top';
|
2765 |
+
var hotspot_y_padding = '+0';
|
2766 |
+
var hotspot_x_padding = '+0';
|
2767 |
+
|
2768 |
+
hotspot_data = hotspots[hotspot];
|
2769 |
+
|
2770 |
+
if (url.indexOf(hotspot_data.url) > -1) {
|
2771 |
+
selectors = hotspot_data.selector;
|
2772 |
+
if ($(selectors).length == 1) {
|
2773 |
+
|
2774 |
+
var offset = $(selectors).offset();
|
2775 |
+
|
2776 |
+
// selectors = '.add-new-h2';
|
2777 |
+
$('body').append('<a href="javascript: sidekick.play(' + hotspot_data.id + ')"><div class="sk_hotspot sk_hotspot_' + hotspot + '" data-target="' + selectors + '"></div></a>');
|
2778 |
+
|
2779 |
+
console.log('%cAttaching Single Hotspot %o[%O] -> (%o [%O])','color: #64c541','sk_hotspot_' + hotspot,$('.sk_hotspot_' + hotspot), selectors,$(selectors));
|
2780 |
+
|
2781 |
+
console.log('at: selector_x + " " + selector_y %o', selector_x + " " + selector_y);
|
2782 |
+
console.log('my: hotspot_x + hotspot_x_padding + " " + hotspot_y + hotspot_y_padding %o', hotspot_x + hotspot_x_padding + " " + hotspot_y + hotspot_y_padding);
|
2783 |
+
|
2784 |
+
$('.sk_hotspot_' + hotspot).position({
|
2785 |
+
at: selector_x + " " + selector_y,
|
2786 |
+
my: hotspot_x + hotspot_x_padding + " " + hotspot_y + hotspot_y_padding,
|
2787 |
+
of: $(selectors)
|
2788 |
+
}).css({zIndex: $(selectors).css('zIndex')});
|
2789 |
+
|
2790 |
+
$(selectors).data('sk_hotspot','.sk_hotspot_' + hotspot);
|
2791 |
+
|
2792 |
+
$(selectors).csswatch({
|
2793 |
+
props: 'top,left',
|
2794 |
+
props_functions: {"top":"offset().top", "left":"offset().left"}
|
2795 |
+
});
|
2796 |
+
|
2797 |
+
console.log('selectors %o', selectors);
|
2798 |
+
|
2799 |
+
|
2800 |
+
$(selectors).on("css-change", function(event, change){
|
2801 |
+
console.log('css-change',arguments);
|
2802 |
+
console.log('this %o', this);
|
2803 |
|
2804 |
+
var selector_x = 'left';
|
2805 |
+
var selector_y = 'top';
|
2806 |
+
var hotspot_x = 'right';
|
2807 |
+
var hotspot_y = 'top';
|
2808 |
+
var hotspot_y_padding = '+0';
|
2809 |
+
var hotspot_x_padding = '+0';
|
2810 |
+
|
2811 |
+
|
2812 |
+
$($(this).data('sk_hotspot')).position({
|
2813 |
+
at: selector_x + " " + selector_y,
|
2814 |
+
my: hotspot_x + hotspot_x_padding + " " + hotspot_y + hotspot_y_padding,
|
2815 |
+
of: this
|
2816 |
+
});
|
2817 |
+
});
|
2818 |
+
|
2819 |
+
$('.sk_hotspot').wait(20*count).addClass('visible');
|
2820 |
+
} else if ($(selectors).length > 1){
|
2821 |
+
console.log('selectors %o', selectors);
|
2822 |
+
|
2823 |
+
_.each($(selectors),function(item,key){
|
2824 |
+
$('body').append('<a href="javascript: sidekick.play(' + hotspot_data.id + ')"><div class="sk_hotspot sk_hotspot_' + hotspot + '_' + key + '" data-target="' + item + '"></div></a>');
|
2825 |
+
// console.log('%cAttaching Hotspot #o %o (%o)','color: #64c541',key,'sk_hotspot_' + hotspot + '_' + key, $('.sk_hotspot_' + hotspot + '_' + key));
|
2826 |
+
|
2827 |
+
$('.sk_hotspot_' + hotspot + '_' + key).position({
|
2828 |
+
at: selector_x + " " + selector_y,
|
2829 |
+
my: hotspot_x + hotspot_x_padding + " " + hotspot_y + hotspot_y_padding,
|
2830 |
+
of: item
|
2831 |
+
}).css({zIndex: $(item).css('zIndex')});
|
2832 |
+
|
2833 |
+
$('.sk_hotspot').wait(20*count).addClass('visible');
|
2834 |
+
});
|
2835 |
+
} else {
|
2836 |
+
console.log("%cCouldn't attach a hotspot to selector (" + selectors + ")",'color: red');
|
2837 |
+
// Sidekick.Events.trigger('track_error',{model: this, msg: msg});
|
2838 |
+
// console.error(msg + ' %o',hotspot_data);
|
2839 |
+
}
|
2840 |
+
}
|
2841 |
+
}
|
2842 |
+
};
|
2843 |
+
console.groupEnd();
|
2844 |
+
}
|
2845 |
+
});
|
2846 |
+
|
2847 |
+
}(jQuery));
|
2848 |
+
|
2849 |
+
|
2850 |
+
|
2851 |
+
;(function($) {
|
2852 |
+
SidekickWP.Views.BucketContainer = Backbone.View.extend({
|
2853 |
+
|
2854 |
+
initialize: function(models,options){
|
2855 |
+
SidekickWP.Events.on('rendered', this.setup_events, this);
|
2856 |
+
return this;
|
2857 |
+
},
|
2858 |
+
|
2859 |
+
render: function(){
|
2860 |
+
// console.group('%crender: render: bucketContainerView %o', 'color:#8fa2ff', this);
|
2861 |
+
|
2862 |
+
this.bucket = new SidekickWP.Models.Bucket({
|
2863 |
+
title: this.model.get('title'),
|
2864 |
+
full_library: this.model.get('full_library')
|
2865 |
+
});
|
2866 |
+
this.$el.append(this.bucket.view.render().el);
|
2867 |
+
// console.groupEnd();
|
2868 |
+
return this;
|
2869 |
+
},
|
2870 |
+
|
2871 |
+
clicked_bucket: function(e){
|
2872 |
+
// console.log('clicked_bucket',e);
|
2873 |
+
|
2874 |
+
|
2875 |
+
var navigation_history = this.model.get('navigation_history');
|
2876 |
+
$('#sk_drawer>h2 span').html('Walkthroughs');
|
2877 |
+
|
2878 |
+
if ($(e).hasClass('goprev')) {
|
2879 |
+
// console.log('Go Back');
|
2880 |
+
$('.show').removeClass('show').wait(2000).parent().remove();
|
2881 |
+
navigation_history.pop();
|
2882 |
+
var goto_bucket = navigation_history[navigation_history.length-1];
|
2883 |
+
if (goto_bucket == 'buckets') {
|
2884 |
+
$('[data-bucket_id="' + goto_bucket + '"]').removeClass('hide').addClass('show');
|
2885 |
+
} else {
|
2886 |
+
$('ul.sub_bucket[data-bucket_id="' + goto_bucket + '"]').removeClass('hide').addClass('show');
|
2887 |
+
}
|
2888 |
+
|
2889 |
+
} else if ($(e).data('open_bucket')){
|
2890 |
+
// console.log('Showing Bucket %o',$(e).data('open_bucket'));
|
2891 |
+
// console.log('$(e).closest(.show) %o', $(e).closest('.show'));
|
2892 |
+
|
2893 |
+
SidekickWP.Events.trigger('track_explore',{what:'Bucket - ' + $('span',e).html(), id: $(e).data('open_bucket') });
|
2894 |
+
|
2895 |
+
$(e).closest('.show').removeClass('show').addClass('hide');
|
2896 |
+
|
2897 |
+
|
2898 |
+
this.draw_bucket($(e).data('open_bucket'));
|
2899 |
+
|
2900 |
+
|
2901 |
+
SidekickWP.Events.trigger('resize_sidekick_drawer');
|
2902 |
+
|
2903 |
+
|
2904 |
+
$('ul.sub_bucket[data-bucket_id="' + $(e).data('open_bucket') + '"]').wait(10).addClass('show');
|
2905 |
+
|
2906 |
+
navigation_history.push($(e).data('open_bucket'));
|
2907 |
+
} else {
|
2908 |
+
// console.log('Showing Walkthroughs %o',$(e).data('open_walkthroughs'));
|
2909 |
+
// console.log('$(e).parent() %o', $(e).parent());
|
2910 |
+
|
2911 |
+
SidekickWP.Events.trigger('track_explore',{what:'Bucket - ' + $('span',e).html(), id: $(e).data('open_walkthroughs') });
|
2912 |
+
|
2913 |
+
$('#sk_drawer>h2 span').html('How Do I...');
|
2914 |
+
|
2915 |
+
$(e).closest('.show').removeClass('show').addClass('hide');
|
2916 |
+
|
2917 |
+
this.draw_walkthroughs($(e).data('open_walkthroughs'));
|
2918 |
+
$('ul.walkthrough[data-bucket_id="' + $(e).data('open_walkthroughs') + '"]').wait(10).addClass('show');
|
2919 |
+
|
2920 |
+
navigation_history.push($(e).data('open_bucket'));
|
2921 |
+
}
|
2922 |
+
this.setup_events();
|
2923 |
+
this.model.set('navigation_history',navigation_history);
|
2924 |
+
},
|
2925 |
+
|
2926 |
+
find_bucket_by_id: function(data,key,match){
|
2927 |
+
if (data[key] == match) {
|
2928 |
+
// console.log('%cfound %o','color: green',data);
|
2929 |
+
return data;
|
2930 |
+
}
|
2931 |
+
|
2932 |
+
if (_.size(data.sub_buckets) > 0 ) {
|
2933 |
+
for (var sub_bucket in data.sub_buckets){
|
2934 |
+
var found = this.find_bucket_by_id(data.sub_buckets[sub_bucket],key,match);
|
2935 |
+
if (found) {
|
2936 |
+
return found;
|
2937 |
+
}
|
2938 |
+
}
|
2939 |
+
} else {
|
2940 |
+
// console.log('%cnot found','color: red');
|
2941 |
+
return;
|
2942 |
+
}
|
2943 |
+
},
|
2944 |
+
|
2945 |
+
find_bucket_by_id_rec: function(data,key,match){
|
2946 |
+
for (var sub_bucket in data){
|
2947 |
+
var result = this.find_bucket_by_id(data[sub_bucket],key,match);
|
2948 |
+
if (result) {
|
2949 |
+
return result;
|
2950 |
+
}
|
2951 |
+
}
|
2952 |
+
return false;
|
2953 |
+
},
|
2954 |
+
|
2955 |
+
draw_bucket: function(bucket_id){
|
2956 |
+
// console.info('draw_bucket %o', bucket_id);
|
2957 |
+
var full_library = this.model.get('full_library');
|
2958 |
+
var bucket_data = this.find_bucket_by_id_rec(full_library.buckets,'id',bucket_id);
|
2959 |
+
|
2960 |
+
var variables = {
|
2961 |
+
bucket_id: bucket_id,
|
2962 |
+
bucket_title: bucket_data.post_title,
|
2963 |
+
bucket_data: bucket_data,
|
2964 |
+
full_library: full_library
|
2965 |
+
};
|
2966 |
+
|
2967 |
+
var template = _.template( SidekickWP.Templates.SubBucket, variables );
|
2968 |
+
|
2969 |
+
// console.log('draw_bucket variables %o', variables);
|
2970 |
+
// console.log('template %o', template);
|
2971 |
+
|
2972 |
+
$('.sk_bucketContainer>div').append(template);
|
2973 |
+
},
|
2974 |
+
|
2975 |
+
draw_walkthroughs: function(bucket_id){
|
2976 |
+
// console.log('draw_walkthroughs %o', bucket_id);
|
2977 |
+
|
2978 |
+
var full_library = this.model.get('full_library');
|
2979 |
+
var bucket_data = this.find_bucket_by_id_rec(full_library.buckets,'id',bucket_id);
|
2980 |
+
|
2981 |
+
var variables = {
|
2982 |
+
bucket_id: bucket_id,
|
2983 |
+
bucket_data: bucket_data,
|
2984 |
+
full_library: full_library
|
2985 |
+
};
|
2986 |
+
|
2987 |
+
var template = _.template( SidekickWP.Templates.Walkthroughs, variables );
|
2988 |
+
// console.log('template %o', template);
|
2989 |
+
|
2990 |
+
$('.sk_bucketContainer>div').append(template);
|
2991 |
+
},
|
2992 |
+
|
2993 |
+
setup_events: function(){
|
2994 |
+
$('.heading').unbind('click').click({context:this},function(e){
|
2995 |
+
e.data.context.clicked_bucket(this);
|
2996 |
+
});
|
2997 |
+
|
2998 |
+
$('a.sidekick_play_walkthrough').unbind('click').click({context:this},function(e){
|
2999 |
+
SidekickWP.Events.trigger('close_sidekick_window');
|
3000 |
+
});
|
3001 |
+
// SidekickWP.Helpers.preventScrolling();
|
3002 |
+
}
|
3003 |
+
});
|
3004 |
+
|
3005 |
+
}(jQuery));
|
3006 |
+
|
3007 |
+
;(function($) {
|
3008 |
+
SidekickWP.Views.Bucket = Backbone.View.extend({
|
3009 |
+
|
3010 |
+
initialize: function(models,options){
|
3011 |
+
return this;
|
3012 |
+
},
|
3013 |
+
|
3014 |
+
render: function(){
|
3015 |
+
// console.group('%crender: render: bucketView %o', 'color:#8fa2ff', this);
|
3016 |
+
|
3017 |
+
var variables = {
|
3018 |
+
full_library: this.model.get('full_library')
|
3019 |
+
};
|
3020 |
+
|
3021 |
+
console.log('SidekickWP.Templates.Bucket variables %o', variables);
|
3022 |
+
|
3023 |
+
var template = _.template( SidekickWP.Templates.Bucket, variables );
|
3024 |
+
this.$el.append(template);
|
3025 |
+
// console.groupEnd();
|
3026 |
+
return this;
|
3027 |
+
}
|
3028 |
+
});
|
3029 |
+
|
3030 |
+
}(jQuery));;(function($) {
|
3031 |
+
SidekickWP.Views.Message = Backbone.View.extend({
|
3032 |
+
|
3033 |
+
initialize: function(models,options){
|
3034 |
+
console.group('%crender: render: messageView %o', 'color:#8fa2ff', this);
|
3035 |
+
this.render();
|
3036 |
+
console.groupEnd();
|
3037 |
+
return this;
|
3038 |
+
},
|
3039 |
+
|
3040 |
+
render: function(){
|
3041 |
+
|
3042 |
+
var variables = {
|
3043 |
+
title: this.model.get('title'),
|
3044 |
+
message: this.model.get('message')
|
3045 |
+
};
|
3046 |
+
|
3047 |
+
var template = _.template( SidekickWP.Templates.Message, variables );
|
3048 |
+
|
3049 |
+
this.$el.append( template );
|
3050 |
+
// SidekickWP.Helpers.preventScrolling();
|
3051 |
+
// SidekickWP.Events.trigger('show_next_pane');
|
3052 |
+
|
3053 |
+
// $('div#sidekick .prev_window').removeClass('prev_window');
|
3054 |
+
// $('div#sidekick #main_menu').addClass('prev_window');
|
3055 |
+
// $('div#sidekick ul.main>li').not('#main_menu,#review').remove();
|
3056 |
+
|
3057 |
+
return this;
|
3058 |
+
}
|
3059 |
+
|
3060 |
+
});
|
3061 |
+
|
3062 |
+
}(jQuery));;(function($) {
|
3063 |
+
SidekickWP.Views.Review = Backbone.View.extend({
|
3064 |
+
|
3065 |
+
initialize: function(models,options){
|
3066 |
+
console.group('%cinitialize: Core View %o', 'color:#3b4580', arguments);
|
3067 |
+
this.render();
|
3068 |
+
this.setup_events();
|
3069 |
+
console.groupEnd();
|
3070 |
+
return this;
|
3071 |
+
},
|
3072 |
+
|
3073 |
+
render: function(){
|
3074 |
+
console.group('%crender: render: renderView %o', 'color:#8fa2ff', this);
|
3075 |
+
console.log('SidekickWP.Templates.Review %o', SidekickWP.Templates.Review);
|
3076 |
+
|
3077 |
+
var variables = {
|
3078 |
+
title: 'How did we do?'
|
3079 |
+
};
|
3080 |
+
|
3081 |
+
var template = _.template( SidekickWP.Templates.Review, variables );
|
3082 |
+
console.log('template %o', template);
|
3083 |
+
|
3084 |
+
this.$el.append( template );
|
3085 |
+
// SidekickWP.Helpers.preventScrolling();
|
3086 |
+
// SidekickWP.Events.trigger('show_next_pane');
|
3087 |
+
|
3088 |
+
// $('div#sidekick .prev_window').removeClass('prev_window');
|
3089 |
+
// $('div#sidekick #main_menu').addClass('prev_window');
|
3090 |
+
// $('div#sidekick ul.main>li').not('#main_menu,#review').remove();
|
3091 |
+
|
3092 |
+
return this;
|
3093 |
+
},
|
3094 |
+
|
3095 |
+
events: {
|
3096 |
+
"click input[type='submit']": "submit",
|
3097 |
+
"click div.rate span": "rate"
|
3098 |
+
},
|
3099 |
+
|
3100 |
+
setup_events: function(){
|
3101 |
+
var group_id = this.model.get('id');
|
3102 |
+
|
3103 |
+
$('div#sidekick .review h2 button.goback, #sidekick .review input[type="button"]').unbind('click').click({context:this},function(e){
|
3104 |
+
console.log('click goback/button');
|
3105 |
+
SidekickWP.Events.trigger('show_main_pane');
|
3106 |
+
});
|
3107 |
+
|
3108 |
+
$('div#sidekick .review .rate span').unbind('hover').hover(function(){
|
3109 |
+
$(this).addClass('hover')
|
3110 |
+
.prevAll().addClass('hover');
|
3111 |
+
},function(){
|
3112 |
+
$('div#sidekick .review .rate span').removeClass('hover');
|
3113 |
+
});
|
3114 |
+
|
3115 |
+
$('div#sidekick .review .rate span').unbind('click').click = this.rate;
|
3116 |
+
|
3117 |
+
$('div#sidekick .review textarea').unbind('click').click(function(){
|
3118 |
+
if(!$(this).hasClass('clicked')){
|
3119 |
+
$(this).addClass('clicked')
|
3120 |
+
.val('');
|
3121 |
+
}
|
3122 |
+
});
|
3123 |
+
},
|
3124 |
+
|
3125 |
+
submit: function(){
|
3126 |
+
var data = {
|
3127 |
+
walkthrough_title: this.model.get('walkthrough_title'),
|
3128 |
+
value: $('div#sidekick textarea[name="comment"]').val(),
|
3129 |
+
license: sk_config.license_key
|
3130 |
+
};
|
3131 |
+
|
3132 |
+
var http = 'http';
|
3133 |
+
if (window.location.toString().indexOf('https') > -1) {
|
3134 |
+
http = 'https';
|
3135 |
+
}
|
3136 |
+
|
3137 |
+
$.ajax({
|
3138 |
+
url: http + '://library.sidekick.pro/wp-admin/admin-ajax.php?action=wpu_add_comment',
|
3139 |
+
context: this,
|
3140 |
+
data: data,
|
3141 |
+
dataType: 'json'
|
3142 |
+
}).done(function(data,e){
|
3143 |
+
console.log('Saved Comment');
|
3144 |
+
$('div#sidekick textarea').html('Thank You!');
|
3145 |
+
$('div#sidekick .review input[type="submit"]').val('Sent!');
|
3146 |
+
setTimeout(SidekickWP.Events.trigger('show_main_pane'),3000);
|
3147 |
+
}).error(function(e){
|
3148 |
+
console.error('Comment Save error (%o)',e);
|
3149 |
+
});
|
3150 |
+
},
|
3151 |
+
|
3152 |
+
rate: function(e){
|
3153 |
+
var data = {
|
3154 |
+
walkthrough_title: this.model.get('walkthrough_title'),
|
3155 |
+
rating: $(e.currentTarget).data('val'),
|
3156 |
+
license: sk_config.license_key
|
3157 |
+
};
|
3158 |
+
|
3159 |
+
$(e.currentTarget).addClass('saved')
|
3160 |
+
.prevAll().addClass('saved');
|
3161 |
+
|
3162 |
+
$('div#sidekick .rate span').unbind('mouseenter mouseleave click').css({cursor: 'default'});
|
3163 |
+
|
3164 |
+
var http = 'http';
|
3165 |
+
if (window.location.toString().indexOf('https') > -1) {
|
3166 |
+
http = 'https';
|
3167 |
+
}
|
3168 |
+
|
3169 |
+
$.ajax({
|
3170 |
+
url: http + '://library.sidekick.pro/wp-admin/admin-ajax.php?action=wpu_add_rating',
|
3171 |
+
context: this,
|
3172 |
+
data: data,
|
3173 |
+
dataType: 'json'
|
3174 |
+
}).done(function(data,e){
|
3175 |
+
console.log('Saved Rating');
|
3176 |
+
$('div#sidekick .hover').addClass('saved');
|
3177 |
+
|
3178 |
+
}).error(function(e){
|
3179 |
+
console.error('Rating Save error (%o)',e);
|
3180 |
+
});
|
3181 |
+
|
3182 |
+
}
|
3183 |
+
|
3184 |
+
});
|
3185 |
+
|
3186 |
+
}(jQuery));;_.templateSettings.interpolate = /\{\{(.*?)\}\}/;
|
3187 |
+
|
3188 |
+
SidekickWP.Templates.App = [
|
3189 |
+
"<div id='sidekick' class='sidekick_player'>",
|
3190 |
+
"<div id='sk_taskbar'>",
|
3191 |
+
"<div id='logo'></div>",
|
3192 |
+
"<button class='sk_toggle'></button>",
|
3193 |
+
"<div class='sk_controls'>",
|
3194 |
+
"<button class='sidekick_restart'></button>",
|
3195 |
+
"<button class='sidekick_play_pause'></button>",
|
3196 |
+
"<button class='sidekick_stop'></button>",
|
3197 |
+
"</div>",
|
3198 |
+
"<div class='sk_debug'>",
|
3199 |
+
"<div class='step_count'></div>",
|
3200 |
+
"<input type='text' name='step' placeholder='Force Step'></input>",
|
3201 |
+
"<div class=''>Skip Step <br/>Press ></div>",
|
3202 |
+
"</div>",
|
3203 |
+
"<div class='sk_toggles'>",
|
3204 |
+
// "<% console.log('hotspots %o',hotspots);%>",
|
3205 |
+
"<button id='toggle_hotspots' <% if (hotspots === '1' || typeof hotspots === 'undefined'){%>class='on'<% } %> alt='Number of hotspots'>0</button>",
|
3206 |
+
"<button id='toggle_feedback'></button>",
|
3207 |
+
"<button id='toggle_preferences'></button>",
|
3208 |
+
"<button id='toggle_drawer'><i></i></button>",
|
3209 |
+
"</div>",
|
3210 |
+
"<div class='sk_info'>",
|
3211 |
+
"<div class='sk_title'><label>Now Playing</label><span class='sk_walkthrough_title'></span></div>",
|
3212 |
+
"<div class='sk_time'>0:00/0:00</div>",
|
3213 |
+
"</div>",
|
3214 |
+
"<div class='sk_caption'>",
|
3215 |
+
"<div class='text'></div>",
|
3216 |
+
"</div>",
|
3217 |
+
"</div>",
|
3218 |
+
"<div id='sk_drawer'>",
|
3219 |
+
"<h2><span>Walkthroughs</span><button id='close_sidekick'></button></h2>",
|
3220 |
+
"<ul class='sk_bucketContainer'>",
|
3221 |
+
"<% print(BucketContainer) %>",
|
3222 |
+
"<% if(typeof paid_library === 'undefined' || paid_library == null || _.size(paid_library.buckets) == 0){ %>",
|
3223 |
+
"<ul id='sk_upgrade'><li><button>Upgrade SIDEKICK!</button></li></ul>",
|
3224 |
+
"<% } %>",
|
3225 |
+
"</ul>",
|
3226 |
+
"</div>",
|
3227 |
+
"</div>"
|
3228 |
+
].join("");
|
3229 |
+
|
3230 |
+
SidekickWP.Templates.Bucket = [
|
3231 |
+
"<ul class='buckets' data-bucket_id='buckets'>",
|
3232 |
+
"<% _.each(full_library.buckets, function(bucket_data, bucket_title){ %>",
|
3233 |
+
"<li class='heading bucket_heading' <% if (bucket_data.sub_buckets){ %> data-open_bucket='<% print(bucket_data.id) %>' <% } else { %> data-open_walkthroughs='<% print(bucket_data.id) %>' <% } %> ><span><% print(bucket_title) %></span><i></i></li>",
|
3234 |
+
"<% }); %>",
|
3235 |
+
"</ul>"
|
3236 |
+
].join("");
|
3237 |
+
|
3238 |
+
SidekickWP.Templates.SubBucket = [
|
3239 |
+
"<ul class='sub_buckets'>",
|
3240 |
+
"<ul class='sub_bucket' data-bucket_id='<% print(bucket_id) %>'>",
|
3241 |
+
"<li class='heading goprev'><span><% print(bucket_title) %></span><i></i></li>",
|
3242 |
+
"<ul class='sub_bucket_inner'>",
|
3243 |
+
"<% for (sub_bucket_data in bucket_data.sub_buckets){ %>",
|
3244 |
+
"<% sub_bucket_data = bucket_data.sub_buckets[sub_bucket_data] %>",
|
3245 |
+
"<% if (_.size(sub_bucket_data.sub_buckets) > 0){ %>",
|
3246 |
+
"<li class='heading sub_bucket_heading' data-open_bucket='<% print(sub_bucket_data.id) %>'><span><% print(sub_bucket_data.post_title) %></span><i></i></li>",
|
3247 |
+
"<% } else { %>",
|
3248 |
+
"<li class='heading sub_bucket_heading' data-open_walkthroughs='<% print(sub_bucket_data.id) %>' ><span><% print(sub_bucket_data.post_title) %></span><i></i></li>",
|
3249 |
+
"<% } %>",
|
3250 |
+
"<% }; %>",
|
3251 |
+
"</ul>",
|
3252 |
+
"</ul>",
|
3253 |
+
"</ul>"
|
3254 |
+
].join("");
|
3255 |
+
|
3256 |
+
SidekickWP.Templates.User = [
|
3257 |
+
"<% if (view == 'login') { %>",
|
3258 |
+
"<ul class='user login'>",
|
3259 |
+
"<li class='heading goprev'><span>Account</span><i></i></li>",
|
3260 |
+
"<li>",
|
3261 |
+
"<form id='login' action='<% print(http) %>://library.sidekick.pro/api/user/' method='GET'>",
|
3262 |
+
"<div>",
|
3263 |
+
"<label>E-Mail</label><input type='text' name='user_email'/>",
|
3264 |
+
"<label>Password</label><input type='password' name='password'/>",
|
3265 |
+
"<a target='_blank' href='/wp-login.php?action=lostpassword'>Forgot Password</a>",
|
3266 |
+
"<div id='buttons'>",
|
3267 |
+
"<input type='submit' value='Login'/>",
|
3268 |
+
"<input type='button' value='Register'/>",
|
3269 |
+
"</div>",
|
3270 |
+
"</div>",
|
3271 |
+
"</form>",
|
3272 |
+
"</li>",
|
3273 |
+
"</ul>",
|
3274 |
+
"<% } else if(view == 'activate') { %>",
|
3275 |
+
"<ul class='user activate'>",
|
3276 |
+
"<li class='heading goprev'><span>Activate</span><i></i></li>",
|
3277 |
+
"<li>",
|
3278 |
+
// "<form action='<% print(http) %>://library.sidekick.pro/api/user/' method='POST'>",
|
3279 |
+
"<div id='content'>",
|
3280 |
+
"<div class='padder'>",
|
3281 |
+
"<h3>SIDEKICK premium get's you all core walkthroughs</h3>",
|
3282 |
+
"<a href='<% print(http) %>://www.sidekick.pro/wordpress/modules/wordpress-core-module-premium/' target='_blank'><button>BUY<span>$10 Per Month</span></button></a>",
|
3283 |
+
// "<div>OR</div>",
|
3284 |
+
"<br/><label>Enter Activation ID</label><input placeholder='<% print(activation_id) %>' type='text' name='activation_id'/>",
|
3285 |
+
"<div id='buttons'>",
|
3286 |
+
"<input type='submit' name='Activate' value='Activate' />",
|
3287 |
+
"<input type='button' name='Cancel' value='Cancel' />",
|
3288 |
+
"</div>",
|
3289 |
+
"</div>",
|
3290 |
+
"<div id='benefits'>",
|
3291 |
+
"<h3>Benefits of premium</h3>",
|
3292 |
+
"<ul>",
|
3293 |
+
"<li id='more'>",
|
3294 |
+
"<h4>More Walkthroughs</h4><p>Get our full WordPress Core library of over 150 walkthroughs.</p>",
|
3295 |
+
"</li>",
|
3296 |
+
"<li id='types'>",
|
3297 |
+
"<h4>Hotspots & Overviews</h4><p>Gain in depth knowledge and quick hints.</p>",
|
3298 |
+
"</li>",
|
3299 |
+
"</ul>",
|
3300 |
+
"</div>",
|
3301 |
+
"</div>",
|
3302 |
+
// "</form>",
|
3303 |
+
"</li>",
|
3304 |
+
"</ul>",
|
3305 |
+
"<% } else if(view == 'register') { %>",
|
3306 |
+
"<ul class='user register'>",
|
3307 |
+
"<li class='heading goprev'><span>Register</span><i></i></li>",
|
3308 |
+
"<li>",
|
3309 |
+
"<form action='<% print(http) %>://library.sidekick.pro/api/user/' method='POST'>",
|
3310 |
+
"<label>First Name</label><input type='text' name='first_name'/>",
|
3311 |
+
"<label>E-Mail</label><input type='text' name='user_email'/>",
|
3312 |
+
"<label>Password</label><input type='password' name='password'/>",
|
3313 |
+
"<label>Confirm Password</label><input type='password' name='password2'/>",
|
3314 |
+
"<label>Coupon</label><input type='text' name='coupon'/>",
|
3315 |
+
"<input type='button' name='Cancel'/>",
|
3316 |
+
"<input type='submit' name='Register'/>",
|
3317 |
+
"</form>",
|
3318 |
+
"</li>",
|
3319 |
+
"</ul>",
|
3320 |
+
"<% } else if(view == 'profile') { %>",
|
3321 |
+
"<ul class='user profile'>",
|
3322 |
+
"<li class='heading goprev'><span>Profile</span><i></i></li>",
|
3323 |
+
"<li>",
|
3324 |
+
"<form action=''>",
|
3325 |
+
"<label>Coupon</label><input type='text' name='coupon'/>",
|
3326 |
+
"<input type='button' name='Cancel'/>",
|
3327 |
+
"<input type='submit' name='Register'/>",
|
3328 |
+
"</form>",
|
3329 |
+
"</li>",
|
3330 |
+
"</ul>",
|
3331 |
+
"<% } %>"
|
3332 |
+
].join("");
|
3333 |
+
|
3334 |
+
SidekickWP.Templates.Walkthroughs = [
|
3335 |
+
"<ul class='walkthroughs'>",
|
3336 |
+
"<ul class='walkthrough' data-bucket_id='<% print(bucket_id) %>'>",
|
3337 |
+
"<li class='heading goprev'><span><% print(bucket_data.post_title) %></span><i></i></li>",
|
3338 |
+
"<ul class='walkthroughs_inner' data-bucket_id='<% print(bucket_id) %>'>",
|
3339 |
+
"<% console.log('bucket_data %',bucket_data); %>",
|
3340 |
+
"<% var first_drawn = false; %>",
|
3341 |
+
"<% _.each(bucket_data.walkthroughs, function(walkthrough, walkthrough_key){ %>",
|
3342 |
+
"<% if (walkthrough.type == 'overview'){ %>",
|
3343 |
+
"<% if (!first_drawn){ %>",
|
3344 |
+
"<% if (_.size(bucket_data.walkthroughs) > 1){ %>",
|
3345 |
+
"<li class='sub_heading'><span>Overviews</span></li>",
|
3346 |
+
"<% } else{ %>",
|
3347 |
+
"<li class='sub_heading'><span>Overview</span></li>",
|
3348 |
+
"<% } %>",
|
3349 |
+
"<% first_drawn = true %>",
|
3350 |
+
"<% } %>",
|
3351 |
+
"<a href='javascript: sidekick.play(<% print(walkthrough.id) %>)'><li class='overview'><% print(walkthrough.title) %></li></a>",
|
3352 |
+
"<% } %>",
|
3353 |
+
"<% }); %>",
|
3354 |
+
"<% var first_drawn = false; %>",
|
3355 |
+
"<% _.each(bucket_data.walkthroughs, function(walkthrough, walkthrough_key){ %>",
|
3356 |
+
"<% if (walkthrough.type == 'how'){ %>",
|
3357 |
+
"<% if (!first_drawn){ %>",
|
3358 |
+
"<% if (_.size(bucket_data.walkthroughs) > 1){ %>",
|
3359 |
+
"<li class='sub_heading'><span>How-Tos</span></li>",
|
3360 |
+
"<% } else{ %>",
|
3361 |
+
"<li class='sub_heading'><span>How-To</span></li>",
|
3362 |
+
"<% } %>",
|
3363 |
+
"<% first_drawn = true %>",
|
3364 |
+
"<% } %>",
|
3365 |
+
"<a href='javascript: sidekick.play(<% print(walkthrough.id) %>)'><li class='how'><% print(walkthrough.title) %></li></a>",
|
3366 |
+
"<% } %>",
|
3367 |
+
"<% }); %>",
|
3368 |
+
"</ul>",
|
3369 |
+
"</ul>",
|
3370 |
+
"</ul>"
|
3371 |
+
].join("");
|
3372 |
+
|
3373 |
+
SidekickWP.Templates.Review = [
|
3374 |
+
"<ul class='new_window review' data-title='<% print(title) %>'>",
|
3375 |
+
"<li>",
|
3376 |
+
"<div><div class='rate'><span data-val='1' class='rate1'></span><span data-val='2' class='rate2'></span><span data-val='3' class='rate3'></span><span data-val='4' class='rate4'></span><span data-val='5' class='rate5'></span></div>",
|
3377 |
+
"<textarea name='comment'>Let us know if you found the Walkthrough helpful or if we can improve something.</textarea>",
|
3378 |
+
"<br/><input type='button' value='Skip'></input><input type='submit' value='Submit'></input>",
|
3379 |
+
"</li>",
|
3380 |
+
"</ul>"
|
3381 |
+
].join("");
|
3382 |
+
|
3383 |
+
|
3384 |
+
SidekickWP.Templates.Message = [
|
3385 |
+
"<ul class='new_window message' data-title='<% print(title) %>'>",
|
3386 |
+
"<li>",
|
3387 |
+
"<div><% print(message) %></div>",
|
3388 |
+
"</li>",
|
3389 |
+
"</ul>"
|
3390 |
+
].join("");
|
3391 |
+
|
3392 |
+
;(function($) {
|
3393 |
+
SidekickWP.Views.User = Backbone.View.extend({
|
3394 |
+
|
3395 |
+
initialize: function(models,options){
|
3396 |
+
console.group('%cinitialize: User View %o', 'color:#3b4580', arguments);
|
3397 |
+
this.render();
|
3398 |
+
this.setup_events();
|
3399 |
+
console.groupEnd();
|
3400 |
+
return this;
|
3401 |
+
},
|
3402 |
+
|
3403 |
+
render: function(){
|
3404 |
+
console.group('%crender: User View %o', 'color:#8fa2ff', this);
|
3405 |
+
|
3406 |
+
var template = _.template( SidekickWP.Templates.User, this.model.attributes );
|
3407 |
+
console.log('this.$el %o', this.$el);
|
3408 |
+
console.log('template %o', template);
|
3409 |
+
|
3410 |
+
$('> *',this.$el).addClass('hide');
|
3411 |
+
|
3412 |
+
this.$el.append( template );
|
3413 |
+
return this;
|
3414 |
+
},
|
3415 |
+
|
3416 |
+
events: {
|
3417 |
+
},
|
3418 |
+
|
3419 |
+
close_profile: function(){
|
3420 |
+
$('ul.sk_bucketContainer ul.user').addClass('hide').wait(1000).remove();
|
3421 |
+
$('ul.sk_bucketContainer ul.buckets').removeClass('hide');
|
3422 |
+
},
|
3423 |
+
|
3424 |
+
setup_events: function(){
|
3425 |
+
// this.setup_login();
|
3426 |
+
|
3427 |
+
$('.heading',$('ul.sk_bucketContainer ul.user')).unbind('click').click({context:this},function(e){
|
3428 |
+
e.data.context.close_profile(this);
|
3429 |
+
});
|
3430 |
+
|
3431 |
+
$('#sidekick ul.activate input[name="Cancel"]').unbind('click').click({context:this},function(e){
|
3432 |
+
console.log('click');
|
3433 |
+
e.data.context.close_profile(this);
|
3434 |
+
});
|
3435 |
+
|
3436 |
+
$('#sidekick ul.activate input[type="submit"]').click(function(){
|
3437 |
+
var input = $('ul.activate input[name="activation_id"]');
|
3438 |
+
|
3439 |
+
if ($(input).val() === '') {
|
3440 |
+
$(input).addClass('error');
|
3441 |
+
} else {
|
3442 |
+
$.post(ajaxurl, {action: 'sk_activate', activation_id: $(input).val()}, function(e){
|
3443 |
+
console.log('%cBack %o','background-color: yellow; color: black;',e);
|
3444 |
+
if (e.error == 404) {
|
3445 |
+
$(input).addClass('error').val("Activation ID Not Valid");
|
3446 |
+
} else if (e.success) {
|
3447 |
+
$(input).addClass('success').val("Successful... loading...");
|
3448 |
+
location.reload();
|
3449 |
+
}
|
3450 |
+
},'json');
|
3451 |
+
}
|
3452 |
+
});
|
3453 |
+
}
|
3454 |
+
|
3455 |
+
// setup_login: function(){
|
3456 |
+
// $('#sidekick .login form').data('view',this);
|
3457 |
+
// $('#sidekick .login form').submit(function(e){
|
3458 |
+
// e.preventDefault();
|
3459 |
+
|
3460 |
+
// var request = $.ajax({
|
3461 |
+
// // url: "http://library.sidekick.pro/api/login/",
|
3462 |
+
// url: "http://local.library.sidekick.pro/api/login/",
|
3463 |
+
// data: {
|
3464 |
+
// 'user_email' : $('#sidekick .login form input[name="user_email"]').val(),
|
3465 |
+
// 'password' : $('#sidekick .login form input[name="password"]').val()
|
3466 |
+
// },
|
3467 |
+
// dataType: "jsonp",
|
3468 |
+
// context: { view: $(this).data('view')}
|
3469 |
+
// },this).done(function(e){
|
3470 |
+
// this.view.login_callback(e,this.view);
|
3471 |
+
// });
|
3472 |
+
// });
|
3473 |
+
// },
|
3474 |
+
|
3475 |
+
// login_callback: function(result,view){
|
3476 |
+
// console.log('%clogin_callback','color: white;background-color: green');
|
3477 |
+
// console.log('result %o', result);
|
3478 |
+
// if (result.token) {
|
3479 |
+
// $.cookie('sk_token', result.token);
|
3480 |
+
// new SidekickWP.Models.User({
|
3481 |
+
// 'view' : 'activate'
|
3482 |
+
// });
|
3483 |
+
// }
|
3484 |
+
// }
|
3485 |
+
});
|
3486 |
+
}(jQuery));;
|
3487 |
+
jQuery(document).ready(function($) {
|
3488 |
+
window.sidekickWP = new SidekickWP.Models.App({
|
3489 |
+
show_toggle_feedback: true
|
3490 |
+
});
|
3491 |
+
// console.log('window.sidekickWP %o', window.sidekickWP);
|
3492 |
+
// jQuery('#logo').trigger('click');
|
3493 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -1,39 +1,74 @@
|
|
1 |
=== Sidekick ===
|
2 |
-
Contributors: raptor235,
|
3 |
Donate link: http://www.sidekick.pro
|
4 |
-
Tags: help, tutorial, training, learn, learning, sidekick,
|
5 |
-
Requires at least: 3.
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 1.
|
8 |
License: GNU Version 2 or Any Later Version
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
-
|
12 |
-
|
13 |
|
14 |
== Description ==
|
15 |
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
-
|
19 |
|
20 |
-
Sidekick
|
21 |
|
22 |
-
**
|
23 |
|
24 |
-
|
25 |
|
26 |
-
|
27 |
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
== Installation ==
|
31 |
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
-
1.
|
35 |
-
2.
|
36 |
-
3.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
== Upgrade Notice ==
|
39 |
|
@@ -41,63 +76,51 @@ Upgrade Notice
|
|
41 |
|
42 |
== Activation ==
|
43 |
|
44 |
-
After installation
|
45 |
-
|
46 |
-
If you choose to register an account by providing your name and email address, you will receive a free upgrade to access all 40+ of our WordPress Core Walkthroughs until the end of December 2013 (subject to change). Following the free period, there will be a monthly charge to access the entire library of Core Walkthroughs.
|
47 |
|
48 |
-
**
|
49 |
|
50 |
-
|
51 |
|
52 |
== Frequently Asked Questions ==
|
53 |
|
54 |
= What is Sidekick for WordPress? =
|
55 |
|
56 |
-
The Sidekick platform provides real-time, guided support and learning from within any html or PHP based web application or CMS. Support is provided through modules called “Walkthroughs
|
|
|
57 |
The Sidekick plugin for WordPress connects the Sidekick platform with any WordPress Dashboard allowing real-time guided walkthroughs of core and 3rd party WordPress features and functions.
|
58 |
|
59 |
If you’d like to learn more about Sidekick, go to [Sidekick.pro](http://Sidekick.pro/ "Sidekick")
|
60 |
|
61 |
-
= So is it Sidekick for WordPress or WPUniversity? =
|
62 |
-
|
63 |
-
Well. Both.
|
64 |
-
|
65 |
-
Sidekick is the web based platform that created the plugin code, stores walkthroughs and operates the library. WPUniversity writes and creates the Core WordPress Walkthroughs for the Sidekick for WordPress plugin.
|
66 |
-
|
67 |
= What is a Sidekick Walkthrough? =
|
68 |
|
69 |
A Sidekick for WordPress Walkthrough is a real-time, guided tutorial that walks you step by step through completing a task inside your WordPress Dashboard. It’s as if your site-builder or theme developer were standing right there with you, helping you get it done.
|
70 |
|
71 |
= What are Core and 3rd Party WordPress Walkthroughs? =
|
72 |
|
73 |
-
When we say “Core Walkthroughs” for WordPress, we are referring to any support and learning that has to do with features and functions provided by a fresh, default install of WordPress, downloaded from WordPress.org. Basically, if a walkthrough is
|
74 |
|
75 |
Plugin and theme specific Walkthroughs are called Third Party Walkthroughs and are created and maintained by the plugin or theme creator, unless otherwise mentioned.
|
76 |
|
77 |
= How do I create Walkthroughs for my Plugin(s) or Theme(s)? =
|
78 |
|
79 |
-
At the moment Sidekick Composer, the tool we use to create Walkthroughs, is for in-house use only but we plan for that to change by the end of
|
80 |
|
81 |
= What does Sidekick for WordPress cost? =
|
82 |
|
83 |
-
The Sidekick plugin for WordPress is and always will be free to download and use. Installing the plugin gives you instant and unlimited access to
|
84 |
-
If you would like access to the full library of Core WordPress Walkthroughs (40+) the cost is $20 per month per user. Price discounts start at just two licenses and go up from there.
|
85 |
|
86 |
-
|
87 |
|
88 |
= Ok, the plugin is installed and activated. How do I use it? =
|
89 |
|
90 |
-
Click on the
|
91 |
-
You will be presented with the Walkthrough menu. Select your
|
92 |
|
93 |
= Can I suggest a Walkthrough that I’d like to see or give you feedback on the Sidekick WordPress Plugin? =
|
94 |
|
95 |
Absolutely. In fact, we rely on users like you to tell us about things that need to be improved or that you’d like to see added to the plugin. Send your email to info@wpuniversity.com. We read and respond to every piece of feedback we get.
|
96 |
|
97 |
-
= Are Sidekick and WPUniversity the same company? =
|
98 |
-
|
99 |
-
[WPUniversity](http://wpuniversity.com/ "WPUniversity") and [Sidekick](http://Sidekick.pro/ "Sidekick") are created, owned and managed by [FlowPress Inc.](http://flowpress.ca/ "FlowPress"), a Toronto based Web Development Agency and startup.
|
100 |
-
|
101 |
== Screenshots ==
|
102 |
|
103 |
1. Sidekick in action, shows of the typical screen you will see while a Sidekick walkthrough is playing.
|
@@ -107,7 +130,17 @@ Absolutely. In fact, we rely on users like you to tell us about things that nee
|
|
107 |
|
108 |
== Changelog ==
|
109 |
|
110 |
-
= 1.1 =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
* Brand New User Interface
|
112 |
* Hotspot Support Added
|
113 |
* 3.8 Support Added
|
@@ -116,10 +149,10 @@ Absolutely. In fact, we rely on users like you to tell us about things that nee
|
|
116 |
* Known bug exists with HTTPs protocols
|
117 |
|
118 |
= 1.00 =
|
119 |
-
* Added support for buckets
|
120 |
|
121 |
-
=
|
122 |
-
*
|
123 |
|
124 |
= 0.76 =
|
125 |
* Fixed sizing issues when more walkthroughs were added
|
@@ -131,4 +164,4 @@ Absolutely. In fact, we rely on users like you to tell us about things that nee
|
|
131 |
* Fixed Activation Bug
|
132 |
|
133 |
= 0.70 =
|
134 |
-
* Initial Beta Release
|
1 |
=== Sidekick ===
|
2 |
+
Contributors: raptor235,benfox,andymci
|
3 |
Donate link: http://www.sidekick.pro
|
4 |
+
Tags: help, tutorial, training, learn, learning, sidekick, guide, teach, video, manual, videos, wphelp, support, instructions, question, questions, answers, answer, clippy, q&a, wpuniversity, helper, walkthrough
|
5 |
+
Requires at least: 3.5
|
6 |
+
Tested up to: 3.9
|
7 |
+
Stable tag: 1.2
|
8 |
License: GNU Version 2 or Any Later Version
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
+
Real-time, voice-guided WordPress training and support straight from your dashboard.
|
|
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
[youtube https://www.youtube.com/watch?v=5BHSqdU1Ssk]
|
16 |
+
|
17 |
+
**SIDEKICK is the fastest and easiest way to learn WordPress, Themes & Plugins!**
|
18 |
+
|
19 |
+
Sidekick provides interactive, real-time, narrated guides through the WordPress administration area. These guides (called Walkthroughs) come in three flavours:
|
20 |
+
|
21 |
+
- **Overviews**: Guided tours through admin screens and their features.
|
22 |
+
- **How-Tos**: Step-by-step instructions to help you complete a task.
|
23 |
+
- **Hotspots**: Useful reminders for on-screen elements, features and functions.
|
24 |
+
|
25 |
+
**Walkthroughs for other plugins and themes? You bet!**
|
26 |
+
|
27 |
+
If you're running a plugin or theme that’s supported by Sidekick, we’ll automatically serve up those Walkthroughs, as long as the Walkthroughs are active for your Sidekick account.
|
28 |
|
29 |
+
**A modern browser is all you need.**
|
30 |
|
31 |
+
Sidekick is built with JavaScript, so you don’t need to download any additional browser extensions or add-ons. Just install the SIDEKICK plugin for WordPress.
|
32 |
|
33 |
+
**SIDEKICK is perfect for you, if...**
|
34 |
|
35 |
+
*You're new to WordPress.* Instead of jumping back-and-forth between documentation, videos, and your own WordPress site, just follow the step-by-step SIDEKICK walkthroughs. Simple!
|
36 |
|
37 |
+
*You're helping someone learn WordPress.* Instead of repeatedly showing them the basics, let SIDEKICK do it for you - just install the plugin and tell them which walkthroughs to follow.
|
38 |
|
39 |
+
*You build WordPress sites for a living.* Reduce your training and support costs by installing Sidekick on client websites.
|
40 |
+
|
41 |
+
**Powered by the SIDEKICK platform.**
|
42 |
+
|
43 |
+
WordPress is just the tip of the iceberg! Sidekick can work with any web application, requiring no app or browser extension downloads for the user.
|
44 |
+
|
45 |
+
Walkthroughs are served directly from our servers, so you don't need to download or install additional files as new or updated walkthroughs are released.
|
46 |
+
|
47 |
+
With the user’s permission, Sidekick will collect anonymous data to track walkthrough and platform performance. This helps us improve the product and provide more useful support.
|
48 |
|
49 |
== Installation ==
|
50 |
|
51 |
+
**Plugin Search (Recommended)**
|
52 |
+
|
53 |
+
1. In /wp-admin/, go to Plugins > Add New.
|
54 |
+
2. Search for "Sidekick".
|
55 |
+
3. Look for "Sidekick” (should be the only result).
|
56 |
+
4. Click Install Now.
|
57 |
+
5. After installation has completed, click Activate Plugin.
|
58 |
+
|
59 |
+
**Manual Upload**
|
60 |
|
61 |
+
1. Download the plugin .zip file from wordpress.org/plugins/sidekick/
|
62 |
+
2. In /wp-admin/, go to Plugins > Add New. Click Upload.
|
63 |
+
3. Locate the .zip file on your computer. Click Install Now.
|
64 |
+
4. After installation has completed, click Activate Plugin.
|
65 |
+
|
66 |
+
**Manual FTP**
|
67 |
+
|
68 |
+
1. Download the plugin .zip file from wordpress.org/plugins/sidekick/
|
69 |
+
2. Extract the plugin folder contained in the .zip file.
|
70 |
+
3. Upload the plugin folder, via FTP, to your /wp-content/plugins/ directory.
|
71 |
+
4. On your Plugins screen, under Sidekick, click Activate.
|
72 |
|
73 |
== Upgrade Notice ==
|
74 |
|
76 |
|
77 |
== Activation ==
|
78 |
|
79 |
+
After installation you’ll have access to at least 5 Core WordPress Walkthroughs. Activating Sidekick will unlock 30+ free WordPress Core Walkthroughs.
|
|
|
|
|
80 |
|
81 |
+
**Why Upgrade?**
|
82 |
|
83 |
+
Purchase a Premium WordPress Core subscription to unlock access to
|
84 |
|
85 |
== Frequently Asked Questions ==
|
86 |
|
87 |
= What is Sidekick for WordPress? =
|
88 |
|
89 |
+
The Sidekick platform provides real-time, guided support and learning from within any html or PHP based web application or CMS. Support is provided through modules called “Walkthroughs” that guide users through everything from understanding simple aspects of an application to completing complicated tasks.
|
90 |
+
|
91 |
The Sidekick plugin for WordPress connects the Sidekick platform with any WordPress Dashboard allowing real-time guided walkthroughs of core and 3rd party WordPress features and functions.
|
92 |
|
93 |
If you’d like to learn more about Sidekick, go to [Sidekick.pro](http://Sidekick.pro/ "Sidekick")
|
94 |
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
= What is a Sidekick Walkthrough? =
|
96 |
|
97 |
A Sidekick for WordPress Walkthrough is a real-time, guided tutorial that walks you step by step through completing a task inside your WordPress Dashboard. It’s as if your site-builder or theme developer were standing right there with you, helping you get it done.
|
98 |
|
99 |
= What are Core and 3rd Party WordPress Walkthroughs? =
|
100 |
|
101 |
+
When we say “Core Walkthroughs” for WordPress, we are referring to any support and learning that has to do with features and functions provided by a fresh, default install of WordPress, downloaded from WordPress.org. Basically, if a walkthrough is helpng you complete a standard WordPress function like creating a post, it’s a Core Walkthrough and SIDEKICK created it.
|
102 |
|
103 |
Plugin and theme specific Walkthroughs are called Third Party Walkthroughs and are created and maintained by the plugin or theme creator, unless otherwise mentioned.
|
104 |
|
105 |
= How do I create Walkthroughs for my Plugin(s) or Theme(s)? =
|
106 |
|
107 |
+
At the moment Sidekick Composer, the tool we use to create Walkthroughs, is for in-house use only but we plan for that to change by the end of July 2014. If you’re interested in getting a head start, fill out the form [on this page](http://www.sidekick.pro/developer-program/) and we will send you details on how to join us a little earlier.
|
108 |
|
109 |
= What does Sidekick for WordPress cost? =
|
110 |
|
111 |
+
The Sidekick plugin for WordPress is and always will be free to download and use. Installing the plugin gives you instant and unlimited access to 30 Core WordPress How-To and Overview Walkthroughs.
|
|
|
112 |
|
113 |
+
If you would like access to the full library of [Core WordPress Walkthroughs (Over 150)](http://www.sidekick.pro/wordpress/modules/wordpress-core-module-premium/) including Hotspots, the cost is $10 a month per URL.
|
114 |
|
115 |
= Ok, the plugin is installed and activated. How do I use it? =
|
116 |
|
117 |
+
Click on the “Help Me” bottom left of your screen to open the Walkthrough menu.
|
118 |
+
You will be presented with the Walkthrough menu. Select your bucket then your walkthrough and away you go.
|
119 |
|
120 |
= Can I suggest a Walkthrough that I’d like to see or give you feedback on the Sidekick WordPress Plugin? =
|
121 |
|
122 |
Absolutely. In fact, we rely on users like you to tell us about things that need to be improved or that you’d like to see added to the plugin. Send your email to info@wpuniversity.com. We read and respond to every piece of feedback we get.
|
123 |
|
|
|
|
|
|
|
|
|
124 |
== Screenshots ==
|
125 |
|
126 |
1. Sidekick in action, shows of the typical screen you will see while a Sidekick walkthrough is playing.
|
130 |
|
131 |
== Changelog ==
|
132 |
|
133 |
+
= 1.2.1 =
|
134 |
+
* Activation Bug Fix
|
135 |
+
|
136 |
+
= 1.2 =
|
137 |
+
* 3.9 Support Added
|
138 |
+
* Suppport for Module Marketplace
|
139 |
+
* HTTPs Support Added
|
140 |
+
* Fixes to "safety layer"
|
141 |
+
* Fix issue with hotspots showing while playing a walkthrough
|
142 |
+
|
143 |
+
= 1.10 =
|
144 |
* Brand New User Interface
|
145 |
* Hotspot Support Added
|
146 |
* 3.8 Support Added
|
149 |
* Known bug exists with HTTPs protocols
|
150 |
|
151 |
= 1.00 =
|
152 |
+
* Added support for buckets
|
153 |
|
154 |
+
=0.78=
|
155 |
+
* plugin Compatibility issues resolved
|
156 |
|
157 |
= 0.76 =
|
158 |
* Fixed sizing issues when more walkthroughs were added
|
164 |
* Fixed Activation Bug
|
165 |
|
166 |
= 0.70 =
|
167 |
+
* Initial Beta Release
|
sidekick.php
CHANGED
@@ -2,469 +2,451 @@
|
|
2 |
|
3 |
/*
|
4 |
Plugin Name: Sidekick
|
5 |
-
Plugin URL: http://
|
6 |
Description: Adds a real-time WordPress training walkthroughs right in your Dashboard
|
7 |
Requires at least: 3.7
|
8 |
-
Tested up to: 3.
|
9 |
-
Version: 1.1
|
10 |
-
Author:
|
11 |
-
Author URI: http://www.
|
12 |
*/
|
13 |
|
14 |
-
define('
|
15 |
-
define('
|
16 |
-
define('
|
17 |
-
define('SK_PLATFORM_VERSION',5);
|
18 |
-
|
19 |
-
// this is the URL our updater / license checker pings. This should be the URL of the site with EDD installed
|
20 |
-
define( 'SK_STORE_URL', 'http://www.wpuniversity.com' ); // you should use your own CONSTANT name, and be sure to replace it throughout this file
|
21 |
-
|
22 |
-
// the name of your product. This should match the download name in EDD exactly
|
23 |
-
define( 'SK_ITEM_NAME', 'WPUniversity' ); // you should use your own CONSTANT name, and be sure to replace it throughout this file
|
24 |
|
25 |
if ( ! defined( 'SK_SL_PLUGIN_DIR' ) ) define( 'SK_SL_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
26 |
if ( ! defined( 'SK_SL_PLUGIN_URL' ) ) define( 'SK_SL_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
27 |
if ( ! defined( 'SK_SL_PLUGIN_FILE' ) ) define( 'SK_SL_PLUGIN_FILE', __FILE__ );
|
28 |
-
if ( !function_exists('mlog')) {
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
wp_enqueue_script('jquery-effects-scale' , null, array('jquery-ui-core') );
|
44 |
-
wp_enqueue_script('jquery-effects-highlight' , null, array('jquery-ui-core') );
|
45 |
-
}
|
46 |
-
|
47 |
-
function enqueue(){
|
48 |
-
mlog('PHP: enqueue');
|
49 |
-
if ($license = get_option("sk_license_key")){
|
50 |
-
define('SK_LIBRARY_FILE', "http://library.sidekick.pro/library/v" . SK_LIBRARY_VERSION . "/releases/{$license}/library.js?" . rand(1, 5000));
|
51 |
-
} else {
|
52 |
-
define('SK_LIBRARY_FILE', "http://library.sidekick.pro/library/v" . SK_LIBRARY_VERSION . "/sources/wpuniversity-free_library.js?" . rand(1, 5000));
|
53 |
}
|
54 |
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
wp_enqueue_style('sk-style' ,plugins_url( '/css/sidekick_wordpress.css' , __FILE__ ), null ,SK_PLUGIN_VERSION);
|
59 |
|
60 |
-
|
61 |
-
|
62 |
-
|
|
|
|
|
63 |
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
|
68 |
-
|
69 |
-
$license = get_option( 'sk_license_key' );
|
70 |
-
$status = get_option( 'sk_license_status' );
|
71 |
-
$email = get_option( 'sk_email' );
|
72 |
-
$first_name = get_option( 'sk_first_name' );
|
73 |
-
$track_data = get_option( 'sk_track_data' );
|
74 |
-
$error = null;
|
75 |
-
|
76 |
-
if (!$license) {
|
77 |
-
$license = get_option( 'wpu_license_key' );
|
78 |
-
if ($license) update_option( 'sk_license_key', $license );
|
79 |
-
$status = get_option( 'wpu_license_status' );
|
80 |
-
if ($status) update_option( 'sk_license_status', $status );
|
81 |
-
$email = get_option( 'wpu_email' );
|
82 |
-
if ($email) update_option( 'sk_email', $email );
|
83 |
-
$first_name = get_option( 'wpu_first_name' );
|
84 |
-
if ($first_name) update_option( 'sk_first_name', $first_name );
|
85 |
-
}
|
86 |
|
87 |
-
|
|
|
|
|
88 |
|
89 |
-
|
90 |
-
|
|
|
91 |
|
92 |
-
|
93 |
-
|
94 |
|
95 |
-
|
96 |
-
|
97 |
-
} else {
|
98 |
-
delete_option('sk_track_data');
|
99 |
-
}
|
100 |
|
101 |
-
|
102 |
-
|
103 |
-
$email = $_POST['email'];
|
104 |
-
$track_data = get_option( 'sk_track_data' );
|
105 |
-
$_POST['item_name'] = SK_ITEM_NAME;
|
106 |
-
|
107 |
-
$url = 'http://www.wpuniversity.com?action=remote_wpu_register';
|
108 |
-
|
109 |
-
$response = wp_remote_post( $url, array(
|
110 |
-
'method' => 'POST',
|
111 |
-
'timeout' => 45,
|
112 |
-
'redirection' => 5,
|
113 |
-
'httpversion' => '1.0',
|
114 |
-
'blocking' => true,
|
115 |
-
'headers' => array(),
|
116 |
-
'body' => $_POST,
|
117 |
-
'cookies' => array()
|
118 |
-
)
|
119 |
-
);
|
120 |
|
121 |
-
if (
|
122 |
-
$
|
123 |
} else {
|
124 |
-
|
125 |
-
|
126 |
-
$license = $response['body'];
|
127 |
-
$email = $_POST['email'];
|
128 |
-
$status = 'valid';
|
129 |
|
130 |
-
|
|
|
|
|
|
|
131 |
}
|
|
|
132 |
update_option( 'sk_activated', true );
|
133 |
-
die('<script>window.open("' . get_site_url() . '/wp-admin/
|
|
|
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 |
-
<?php endif ?>
|
169 |
-
|
170 |
-
<div class="wrap">
|
171 |
-
<div class="icon32" id="icon-tools"><br></div><h2>Sidekick</h2>
|
172 |
-
|
173 |
-
<?php if (isset($error_message)): ?>
|
174 |
-
<div class="error" style="padding:15px; position:relative;" id="gf_dashboard_message">
|
175 |
-
There was a problem activating your license. The following error occured <?php echo $error_message ?>
|
176 |
-
</div>
|
177 |
-
<?php elseif (isset($error)): ?>
|
178 |
-
<div class="error" style="padding:15px; position:relative;" id="gf_dashboard_message">
|
179 |
-
<?php echo $error ?>
|
180 |
-
</div>
|
181 |
-
<?php elseif (isset($warn)): ?>
|
182 |
-
<div class="updated" style="padding:15px; position:relative;" id="gf_dashboard_message">
|
183 |
-
<?php echo $warn ?>
|
184 |
-
</div>
|
185 |
-
<?php elseif (isset($success)): ?>
|
186 |
-
<div class="updated" style="padding:15px; position:relative;" id="gf_dashboard_message">
|
187 |
-
<?php echo $success ?>
|
188 |
-
</div>
|
189 |
<?php endif ?>
|
190 |
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
<?php
|
195 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
<?php endif ?>
|
197 |
|
198 |
-
|
199 |
-
|
200 |
-
<
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
<
|
205 |
-
<
|
206 |
-
|
|
|
207 |
<label class="description" for="first_name"><?php _e('Enter your first name'); ?></label>
|
208 |
-
|
209 |
-
</
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
<input id="email" name="email" type="text" class="regular-text" <?php if ($status == 'valid'): ?>DISABLED<?php endif ?> value="<?php echo $email ?>" />
|
216 |
-
<?php if ($status !== 'valid'): ?>
|
217 |
<label class="description" for="email"><?php _e('Enter your email address'); ?></label>
|
218 |
-
|
219 |
-
</
|
220 |
-
</tr>
|
221 |
|
222 |
-
<?php if ($license): ?>
|
223 |
<tr valign="top">
|
224 |
-
<th scope="row" valign="top">
|
225 |
-
<td><
|
226 |
</tr>
|
227 |
-
<?php endif ?>
|
228 |
|
229 |
-
<?php if ($status): ?>
|
230 |
<tr valign="top">
|
231 |
<th scope="row" valign="top">Status</th>
|
232 |
-
<td>
|
233 |
-
<?php if ($status == 'valid'): ?>
|
234 |
-
<span style='color: green'><?php echo ucfirst($status) ?></span>
|
235 |
-
<?php else: ?>
|
236 |
-
<span style='color: red'><?php echo ucfirst($status) ?></span>
|
237 |
-
<?php endif ?>
|
238 |
-
</td>
|
239 |
</tr>
|
240 |
-
|
241 |
<tr valign="top">
|
242 |
<th scope="row" valign="top">
|
243 |
-
|
244 |
</th>
|
245 |
-
|
246 |
<td>
|
247 |
-
<
|
|
|
|
|
248 |
</td>
|
249 |
</tr>
|
250 |
-
|
251 |
-
|
252 |
-
<tr valign="top">
|
253 |
-
<th scope="row" valign="top">
|
254 |
-
Data Tracking
|
255 |
-
</th>
|
256 |
-
<td>
|
257 |
-
<input id="sk_track_data" name="sk_track_data" type="checkbox" <?php if ($track_data): ?>CHECKED<?php endif ?> />
|
258 |
-
<input type='hidden' name='status' value='<?php echo $status ?>'/>
|
259 |
-
<label class="description" for="sk_track_data">Help Sidekick by providing tracking data which will help us build better help tools.</label>
|
260 |
-
</td>
|
261 |
-
</tr>
|
262 |
-
</tbody>
|
263 |
-
</table>
|
264 |
-
<?php if (defined('SK_PLUGIN_DEGBUG')): ?>
|
265 |
-
<?php submit_button('Activate Library (Debug)'); ?>
|
266 |
-
<?php elseif ($status !== 'valid'): ?>
|
267 |
-
<?php submit_button('Activate Library'); ?>
|
268 |
-
<?php else: ?>
|
269 |
<?php submit_button('Update'); ?>
|
270 |
-
|
271 |
-
|
272 |
-
<?php endif ?>
|
273 |
|
274 |
-
|
275 |
-
<p><b>WordPress is about to get a whole lot easier to learn and use!</b></p>
|
276 |
-
<p><b>We are very excited to introduce Sidekick for WordPress. Our team has been working ‘round the clock for months now preparing this latest iteration and we can’t wait to <a href='mailto:info@sidekick.pro'>hear</a> what you think! </b></p>
|
277 |
-
<p>Sidekick is currently avialable free of charge. To activate your free access, please enter your first name and email address here so we can keep you posted on what's new with the plugin and any upcoming changes that you should be aware of. </p>
|
278 |
-
<p><b>Here are a few other things you should know:</b></p>
|
279 |
-
<ul>
|
280 |
-
<li> 1. Clicking the check-box above will allow us to link your email address to the stats we collect so we can contact you if we have a question or notice an issue. It’s not mandatory, but it would help us out. </li>
|
281 |
-
<li> 2. Entering your email address is not a requirement to use the plugin, if you choose not to, you will have access to 5 WordPress core walkthroughs as well as any plugin or theme walkthroughs that are available for your install of WordPress. </li>
|
282 |
-
<li> 3. The Sidekick team adheres strictly to <a href='http://www.business.ftc.gov/documents/bus61-can-spam-act-compliance-guide-business'>CANSPAM</a> </li>
|
283 |
-
<li> 4. If you have any questions, bug reports or feedback, please send them to info@sidekick.pro</li>
|
284 |
-
<li> 5. <a href='http://www.wpuniversity.com'>WPUniversity</a> maintains our library of core WordPress Walkthroughs. 3rd party plugin and theme walkthroughs are created and maintained by their respective developers. </li>
|
285 |
-
<li> 6. WPUniversity sends out daily WordPress tips & tricks, WordPress community updates and the occasional special offer. If you'd like to receive these emails as well, please click <a href='http://wpuniversity.us4.list-manage.com/subscribe?u=59d2b3278da2364941b040f74&id=b1a91625c0'>here</a>.</li>
|
286 |
-
</ul>
|
287 |
-
<p>Thank you,</p><br/>
|
288 |
-
|
289 |
-
</div>
|
290 |
-
<?php
|
291 |
-
}
|
292 |
|
293 |
-
|
294 |
-
|
|
|
|
|
295 |
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
|
|
|
|
|
|
|
|
301 |
|
302 |
-
|
303 |
-
|
304 |
-
if (array_key_exists($role, $current_user->caps)){
|
305 |
-
$user_role = $role;
|
306 |
-
break;
|
307 |
-
}
|
308 |
}
|
309 |
|
310 |
-
|
311 |
-
$
|
|
|
|
|
|
|
|
|
|
|
312 |
}
|
313 |
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
<?php
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
|
|
|
|
|
|
|
|
358 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
359 |
</script>
|
360 |
-
<script>(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',intercomSettings);}else{var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://static.intercomcdn.com/intercom.v1.js';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}};})()</script>
|
361 |
<?php endif ?>
|
362 |
-
|
363 |
-
|
364 |
-
}
|
365 |
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
foreach ($active_plugins as $plugins_key => $plugin) {
|
370 |
-
$data = get_plugin_data( $plugin, false, false );
|
371 |
|
372 |
-
$
|
373 |
-
if ($plugins_key > 0) echo ',';
|
374 |
-
$data['Name'] = addslashes($data['Name']);
|
375 |
-
echo "{'{$data['Name']}' : '{$data['Version']}'}";
|
376 |
-
}
|
377 |
-
echo ']';
|
378 |
-
}
|
379 |
|
380 |
-
|
381 |
-
$r['timeout'] = 15;
|
382 |
-
return $r;
|
383 |
-
}
|
384 |
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
}
|
389 |
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
403 |
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
|
|
|
|
|
|
|
|
|
|
410 |
);
|
411 |
-
|
412 |
-
// $this->redirect();
|
413 |
-
}
|
414 |
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
421 |
}
|
422 |
-
}
|
423 |
|
424 |
-
|
425 |
-
|
426 |
-
if ($track_data) {
|
427 |
$data = array(
|
428 |
'source' => 'plugin',
|
429 |
'action' => 'track',
|
430 |
-
'type' => '
|
431 |
-
'user' => get_option( "sk_license_key" )
|
432 |
);
|
433 |
$this->track($data);
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
(
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
447 |
}
|
448 |
}
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
add_action('
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
|
|
|
|
469 |
|
470 |
|
2 |
|
3 |
/*
|
4 |
Plugin Name: Sidekick
|
5 |
+
Plugin URL: http://wordpress.org/plugins/sidekick/
|
6 |
Description: Adds a real-time WordPress training walkthroughs right in your Dashboard
|
7 |
Requires at least: 3.7
|
8 |
+
Tested up to: 3.9
|
9 |
+
Version: 1.2.1
|
10 |
+
Author: Sidekick.pro
|
11 |
+
Author URI: http://www.sidekick.pro
|
12 |
*/
|
13 |
|
14 |
+
define('SK_PLUGIN_VERSION',1.2);
|
15 |
+
define('SK_LIBRARY_VERSION',5);
|
16 |
+
define('SK_PLATFORM_VERSION',6);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
if ( ! defined( 'SK_SL_PLUGIN_DIR' ) ) define( 'SK_SL_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
19 |
if ( ! defined( 'SK_SL_PLUGIN_URL' ) ) define( 'SK_SL_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
20 |
if ( ! defined( 'SK_SL_PLUGIN_FILE' ) ) define( 'SK_SL_PLUGIN_FILE', __FILE__ );
|
21 |
+
if ( ! function_exists('mlog')) {function mlog(){}}
|
22 |
+
|
23 |
+
class Sidekick{
|
24 |
+
function enqueue_required(){
|
25 |
+
mlog('PHP: enqueue_required');
|
26 |
+
|
27 |
+
wp_enqueue_script('jquery' , null );
|
28 |
+
wp_enqueue_script('underscore' , null, array('underscore'));
|
29 |
+
wp_enqueue_script('backbone' , null, array('jquery','underscore'));
|
30 |
+
wp_enqueue_script('jquery-ui-core' , null, array('jquery') );
|
31 |
+
wp_enqueue_script('jquery-ui-position' , null, array('jquery-ui-core') );
|
32 |
+
wp_enqueue_script('jquery-ui-draggable' , null, array('jquery-ui-core') );
|
33 |
+
wp_enqueue_script('jquery-ui-droppable' , null, array('jquery-ui-core') );
|
34 |
+
wp_enqueue_script('jquery-effects-scale' , null, array('jquery-ui-core') );
|
35 |
+
wp_enqueue_script('jquery-effects-highlight' , null, array('jquery-ui-core') );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
}
|
37 |
|
38 |
+
function enqueue(){
|
39 |
+
mlog('PHP: enqueue');
|
40 |
+
$activation_id = get_option("sk_activation_id");
|
|
|
41 |
|
42 |
+
define('SK_FREE_LIBRARY_FILE', "http://library.sidekick.pro/library/v" . SK_LIBRARY_VERSION . "/releases/xxxxxxxx-xxxx-xxxx-xxxx-xxxxfree/library.js?" . date('m-d-y-G'));
|
43 |
+
if ($activation_id) {
|
44 |
+
define('SK_PAID_LIBRARY_FILE', "http://library.sidekick.pro/library/v" . SK_LIBRARY_VERSION . "/releases/{$activation_id}/library.js?" . date('m-d-y-G'));
|
45 |
+
wp_enqueue_script("sk_paid_library" , SK_PAID_LIBRARY_FILE , array("sk") ,null);
|
46 |
+
}
|
47 |
|
48 |
+
wp_enqueue_script('sidekick' ,'http://platform.sidekick.pro/v' . SK_PLATFORM_VERSION . '/sidekick.min.js', array('backbone','jquery','underscore','jquery-effects-highlight'), SK_PLUGIN_VERSION);
|
49 |
+
wp_enqueue_script('sk' ,plugins_url( '/js/sk.source.js' , __FILE__ ), array('sidekick') ,SK_PLUGIN_VERSION);
|
50 |
+
wp_enqueue_script("sk_free_library" , SK_FREE_LIBRARY_FILE , array("sk") ,null);
|
51 |
|
52 |
+
wp_enqueue_style('sk-style' ,plugins_url( '/css/sidekick_wordpress.css' , __FILE__ ), null ,SK_PLUGIN_VERSION);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
+
wp_enqueue_style('wp-pointer');
|
55 |
+
wp_enqueue_script('wp-pointer');
|
56 |
+
}
|
57 |
|
58 |
+
function setup_menu(){
|
59 |
+
add_submenu_page( 'options-general.php', 'Sidekick', 'Sidekick', 'activate_plugins','sidekick', array(&$this,'admin_page'));
|
60 |
+
}
|
61 |
|
62 |
+
function admin_page(){
|
63 |
+
if (isset($_POST['option_page']) && $_POST['option_page'] == 'sk_license') {
|
64 |
|
65 |
+
if (isset($_POST['first_name']) && $_POST['first_name'])
|
66 |
+
update_option('sk_first_name',$_POST['first_name']);
|
|
|
|
|
|
|
67 |
|
68 |
+
if (isset($_POST['email']) && $_POST['email'])
|
69 |
+
update_option('sk_email',$_POST['email']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
+
if (isset($_POST['activation_id']) && $_POST['activation_id']){
|
72 |
+
$result = $this->activate(true);
|
73 |
} else {
|
74 |
+
delete_option('sk_activation_id');
|
75 |
+
}
|
|
|
|
|
|
|
76 |
|
77 |
+
if (isset($_POST['sk_track_data'])) {
|
78 |
+
update_option( 'sk_track_data', true );
|
79 |
+
} else {
|
80 |
+
delete_option('sk_track_data');
|
81 |
}
|
82 |
+
|
83 |
update_option( 'sk_activated', true );
|
84 |
+
die('<script>window.open("' . get_site_url() . '/wp-admin/options-general.php?page=sidekick&firstuse","_self")</script>');
|
85 |
+
}
|
86 |
|
87 |
+
$activation_id = get_option( 'sk_activation_id' );
|
88 |
+
$email = get_option( 'sk_email' );
|
89 |
+
$first_name = get_option( 'sk_first_name' );
|
90 |
+
$sk_track_data = get_option( 'sk_track_data' );
|
91 |
+
$error = null;
|
92 |
+
|
93 |
+
if (SK_PAID_LIBRARY_FILE && $activation_id) {
|
94 |
+
$_POST['activation_id'] = $activation_id;
|
95 |
+
$check_activation = $this->activate(true);
|
96 |
+
if ($check_activation) {
|
97 |
+
$library = file_get_contents(SK_PAID_LIBRARY_FILE);
|
98 |
+
if (strlen($library) > 30) {
|
99 |
+
$site_url = $this->get_domain();
|
100 |
+
if (strpos($library, $site_url) !== false) {
|
101 |
+
$status = 'Active';
|
102 |
+
} else {
|
103 |
+
$status = 'Domain not authorized.';
|
104 |
+
}
|
105 |
+
} else {
|
106 |
+
$status = 'Expired';
|
107 |
+
}
|
108 |
+
} else {
|
109 |
+
$status = 'Invalid';
|
110 |
+
}
|
111 |
+
} else {
|
112 |
+
$status = 'Free';
|
113 |
}
|
|
|
114 |
|
115 |
+
$current_user = wp_get_current_user();
|
116 |
+
if (!$first_name)
|
117 |
+
$first_name = $current_user->user_firstname;
|
118 |
|
119 |
+
if (!$email)
|
120 |
+
$email = $current_user->user_email;
|
121 |
|
122 |
+
$sk_track_data = get_option( 'sk_track_data' );
|
123 |
|
124 |
+
global $wp_version;
|
125 |
+
if (version_compare($wp_version, '3.7', '<=')) {
|
126 |
+
$error = "Sorry, Sidekick requires WordPress 3.7 or higher to function.";
|
127 |
+
}
|
128 |
|
129 |
+
if (!$activation_id) {
|
130 |
+
$warn = "You're using the <b>Demo</b> version of Sidekick, to gain full access to the walkthrough library please fill out your name and email address below.";
|
131 |
+
}
|
132 |
|
133 |
+
if(preg_match('/(?i)msie [6-8]/',$_SERVER['HTTP_USER_AGENT'])){
|
134 |
+
$error = "Sorry, Sidekick requires Internet Explorer 9 or higher to function.";
|
135 |
+
}
|
136 |
|
137 |
+
?>
|
138 |
+
|
139 |
+
<?php if ($_SERVER['QUERY_STRING'] == 'page=sidekick&firstuse'): ?>
|
140 |
+
<script type="text/javascript">
|
141 |
+
jQuery(document).ready(function($) {
|
142 |
+
jQuery('#sidekick #logo').trigger('click');
|
143 |
+
});
|
144 |
+
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
<?php endif ?>
|
146 |
|
147 |
+
<div class="wrap">
|
148 |
+
<div class="icon32" id="icon-tools"><br></div><h2>Sidekick</h2>
|
149 |
+
|
150 |
+
<?php if (isset($error_message)): ?>
|
151 |
+
<div class="error" style="padding:15px; position:relative;" id="gf_dashboard_message">
|
152 |
+
There was a problem activating your license. The following error occured <?php echo $error_message ?>
|
153 |
+
</div>
|
154 |
+
<?php elseif (isset($error)): ?>
|
155 |
+
<div class="error" style="padding:15px; position:relative;" id="gf_dashboard_message">
|
156 |
+
<?php echo $error ?>
|
157 |
+
</div>
|
158 |
+
<?php elseif (isset($warn)): ?>
|
159 |
+
<div class="updated" style="padding:15px; position:relative;" id="gf_dashboard_message">
|
160 |
+
<?php echo $warn ?>
|
161 |
+
</div>
|
162 |
+
<?php elseif (isset($success)): ?>
|
163 |
+
<div class="updated" style="padding:15px; position:relative;" id="gf_dashboard_message">
|
164 |
+
<?php echo $success ?>
|
165 |
+
</div>
|
166 |
<?php endif ?>
|
167 |
|
168 |
+
<?php if (!$error): ?>
|
169 |
+
<h3>Your Sidekick Account</h3>
|
170 |
+
<form method="post">
|
171 |
+
<?php settings_fields('sk_license'); ?>
|
172 |
+
<table class="form-table">
|
173 |
+
<tbody>
|
174 |
+
<!-- <tr valign="top">
|
175 |
+
<th scope="row" valign="top">First Name</th>
|
176 |
+
<td>
|
177 |
+
<input id="first_name" name="first_name" type="text" class="regular-text" value="<?php echo $first_name ?>" />
|
178 |
<label class="description" for="first_name"><?php _e('Enter your first name'); ?></label>
|
179 |
+
</td>
|
180 |
+
</tr> -->
|
181 |
+
|
182 |
+
<!-- <tr valign="top">
|
183 |
+
<th scope="row" valign="top">E-Mail</th>
|
184 |
+
<td>
|
185 |
+
<input id="email" name="email" type="text" class="regular-text" value="<?php echo $email ?>" />
|
|
|
|
|
186 |
<label class="description" for="email"><?php _e('Enter your email address'); ?></label>
|
187 |
+
</td>
|
188 |
+
</tr> -->
|
|
|
189 |
|
|
|
190 |
<tr valign="top">
|
191 |
+
<th scope="row" valign="top">Activation ID</th>
|
192 |
+
<td><input class='regular-text' type='text' name='activation_id' value='<?php echo $activation_id ?>'></input></td>
|
193 |
</tr>
|
|
|
194 |
|
|
|
195 |
<tr valign="top">
|
196 |
<th scope="row" valign="top">Status</th>
|
197 |
+
<td><span style='color: green' class='<?php echo strtolower($status) ?>'><?php echo ucfirst($status) ?></span></td>
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
</tr>
|
199 |
+
|
200 |
<tr valign="top">
|
201 |
<th scope="row" valign="top">
|
202 |
+
Data Tracking
|
203 |
</th>
|
|
|
204 |
<td>
|
205 |
+
<input id="track_data" name="sk_track_data" type="checkbox" <?php if ($sk_track_data): ?>CHECKED<?php endif ?> />
|
206 |
+
<input type='hidden' name='status' value='<?php echo $status ?>'/>
|
207 |
+
<label class="description" for="track_data">Help Sidekick by providing tracking data which will help us build better help tools.</label>
|
208 |
</td>
|
209 |
</tr>
|
210 |
+
</tbody>
|
211 |
+
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
<?php submit_button('Update'); ?>
|
213 |
+
</form>
|
214 |
+
<?php endif ?>
|
|
|
215 |
|
216 |
+
<h3>Welcome to the fastest and easiest way to learn WordPress</h3>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
|
218 |
+
<p></p>
|
219 |
+
<p>Like SIDEKICK? Please leave us a 5 star rating on <a target='_blank' href='http://wordpress.org/plugins/sidekick/'>http://WordPress.org</a></p>
|
220 |
+
<br/>
|
221 |
+
<p>Here are a few things you should know:</p>
|
222 |
|
223 |
+
<ul>
|
224 |
+
<li> 1. Clicking the check-box above will allow us to link your email address to the stats we collect so we can contact you if we have a question or notice an issue. It’s not mandatory, but it would help us out. </li>
|
225 |
+
<li> 2. Your Activation ID is unique and locked to this URL. </li>
|
226 |
+
<li> 3. Want even more Walkthroughs for WordPress, WooCommerce and more? <a target='_blank' href='http://www.sidekick.pro/wordpress/modules?utm_source=plugin_settings'>UPGRADE Now!</a> </li>
|
227 |
+
<li> 4. The Sidekick team adheres strictly to CANSPAM. From time to time we may send critical updates (such as security notices) to the email address setup as the Administrator on this site. </li>
|
228 |
+
<li> 5. If you have any questions, bug reports or feedback, please send them to <a target='_blank' href='mailto:info@sidekick.pro'>us</a> </li>
|
229 |
+
<li> 6. You can find our terms of use <a target='_blank' href='http://www.sidekick.pro/terms-of-use/'>here</a></li>
|
230 |
+
</ul>
|
231 |
+
<p>Thank you,</p><br/>
|
232 |
|
233 |
+
</div>
|
234 |
+
<?php
|
|
|
|
|
|
|
|
|
235 |
}
|
236 |
|
237 |
+
function get_domain(){
|
238 |
+
$site_url = get_site_url();
|
239 |
+
if(substr($site_url, -1) == '/') {
|
240 |
+
$site_url = substr($site_url, 0, -1);
|
241 |
+
}
|
242 |
+
$site_url = str_replace(array("http://","https://"),array(""),$site_url);
|
243 |
+
return $site_url;
|
244 |
}
|
245 |
|
246 |
+
function footer(){
|
247 |
+
global $current_user, $wp_roles;
|
248 |
+
|
249 |
+
$current_user = wp_get_current_user();
|
250 |
+
$sk_just_activated = get_option( 'sk_just_activated' );
|
251 |
+
$sk_track_data = get_option( 'sk_track_data' );
|
252 |
+
$theme = wp_get_theme();
|
253 |
+
$not_supported_ie = false;
|
254 |
+
|
255 |
+
delete_option( 'sk_just_activated' );
|
256 |
+
foreach($wp_roles->role_names as $role => $Role) {
|
257 |
+
if (array_key_exists($role, $current_user->caps)){
|
258 |
+
$user_role = $role;
|
259 |
+
break;
|
260 |
+
}
|
261 |
+
}
|
262 |
+
|
263 |
+
if(preg_match('/(?i)msie [6-8]/',$_SERVER['HTTP_USER_AGENT'])){
|
264 |
+
$not_supported_ie = true;
|
265 |
+
}
|
266 |
+
|
267 |
+
$site_url = $this->get_domain();
|
268 |
+
|
269 |
+
?>
|
270 |
+
|
271 |
+
<?php if (!$not_supported_ie): ?>
|
272 |
+
|
273 |
+
<script type="text/javascript">
|
274 |
+
|
275 |
+
var sk_config = {
|
276 |
+
domain: '<?php echo str_replace("http://","",$_SERVER["SERVER_NAME"]) ?>',
|
277 |
+
installed_plugins: <?php echo $this->list_plugins() ?>,
|
278 |
+
installed_theme: '<?php echo $theme->Name ?>',
|
279 |
+
library_free_file: '<?php echo SK_FREE_LIBRARY_FILE ?>',
|
280 |
+
library_paid_file: '<?php echo SK_PAID_LIBRARY_FILE ?>',
|
281 |
+
library_version: <?php echo SK_LIBRARY_VERSION ?>,
|
282 |
+
main_soft_name: 'WordPress',
|
283 |
+
main_soft_version: '<?php echo get_bloginfo("version") ?>',
|
284 |
+
plugin_version: <?php echo SK_PLUGIN_VERSION ?>,
|
285 |
+
platform_version: <?php echo SK_PLATFORM_VERSION ?>,
|
286 |
+
plugin_url: '<?php echo admin_url("admin.php?page=sidekick") ?>',
|
287 |
+
theme_version: '<?php echo $theme->Version ?>',
|
288 |
+
site_url: '<?php echo $site_url ?>',
|
289 |
+
track_data: '<?php echo get_option( "track_data" ) ?>',
|
290 |
+
user_level: '<?php echo $user_role ?>',
|
291 |
+
user_email: '<?php echo $current_user->user_email ?>',
|
292 |
+
use_native_controls: false,
|
293 |
+
// open_bucket: 476
|
294 |
}
|
295 |
+
<?php if ($activation_id = get_option( "sk_activation_id" )){ ?>
|
296 |
+
sk_config.activation_id = '<?php echo $activation_id ?>';
|
297 |
+
<?php } ?>
|
298 |
+
<?php if ($sk_just_activated): ?>
|
299 |
+
sk_config.just_activated = true;
|
300 |
+
sk_config.show_login = true;
|
301 |
+
<?php endif; ?>
|
302 |
</script>
|
|
|
303 |
<?php endif ?>
|
304 |
+
<?php
|
305 |
+
}
|
|
|
306 |
|
307 |
+
function list_plugins(){
|
308 |
+
$active_plugins = wp_get_active_and_valid_plugins();
|
309 |
+
$mu_plugins = get_mu_plugins();
|
|
|
|
|
310 |
|
311 |
+
$printed = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
312 |
|
313 |
+
echo '[';
|
|
|
|
|
|
|
314 |
|
315 |
+
if (is_array($active_plugins)) {
|
316 |
+
foreach ($active_plugins as $plugins_key => $plugin) {
|
317 |
+
$data = get_plugin_data( $plugin, false, false );
|
|
|
318 |
|
319 |
+
$plugins[addslashes($data['Name'])] = $data['Version'];
|
320 |
+
if ($plugins_key > 0) echo ',';
|
321 |
+
$data['Name'] = addslashes($data['Name']);
|
322 |
+
echo "{'{$data['Name']}' : '{$data['Version']}'}";
|
323 |
+
$printed = true;
|
324 |
+
}
|
325 |
+
}
|
326 |
+
|
327 |
+
if (is_array($mu_plugins)) {
|
328 |
+
foreach ($mu_plugins as $plugins_key => $plugin) {
|
329 |
+
$plugins[addslashes($data['Name'])] = $plugin['Version'];
|
330 |
+
if ($printed) echo ',';
|
331 |
+
$plugin['Name'] = addslashes($plugin['Name']);
|
332 |
+
echo "{'{$plugin['Name']}' : '{$plugin['Version']}'}";
|
333 |
+
$printed = true;
|
334 |
+
}
|
335 |
+
}
|
336 |
+
echo ']';
|
337 |
+
}
|
338 |
|
339 |
+
function track($data){
|
340 |
+
$response = wp_remote_post( "http://www.wpuniversity.com/wp-admin/admin-ajax.php", array(
|
341 |
+
'method' => 'POST',
|
342 |
+
'timeout' => 45,
|
343 |
+
'redirection' => 5,
|
344 |
+
'httpversion' => '1.0',
|
345 |
+
'blocking' => true,
|
346 |
+
'headers' => array(),
|
347 |
+
'body' => $data,
|
348 |
+
'cookies' => array()
|
349 |
+
)
|
350 |
);
|
351 |
+
}
|
|
|
|
|
352 |
|
353 |
+
function activate($return = false){
|
354 |
+
mlog("activate");
|
355 |
+
if ($_POST['activation_id']) {
|
356 |
+
$library_file = "http://library.sidekick.pro/library/v" . SK_LIBRARY_VERSION . "/releases/{$_POST['activation_id']}/library.js";
|
357 |
+
$ch = curl_init($library_file);
|
358 |
+
curl_setopt($ch, CURLOPT_NOBODY, true);
|
359 |
+
curl_exec($ch);
|
360 |
+
$retcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
361 |
+
mlog('$retcode',$retcode);
|
362 |
+
curl_close($ch);
|
363 |
+
if ($retcode == 200) {
|
364 |
+
update_option('sk_activation_id',$_POST['activation_id']);
|
365 |
+
if ($return)
|
366 |
+
return 1;
|
367 |
+
die(json_encode(array('success' => 1)));
|
368 |
+
} else {
|
369 |
+
delete_option( 'sk_activation_id' );
|
370 |
+
if ($return)
|
371 |
+
return $retcode;
|
372 |
+
die(json_encode(array('error' => $retcode)));
|
373 |
+
}
|
374 |
+
} else {
|
375 |
+
die(json_encode(array('error' => 'No Activation ID')));
|
376 |
+
}
|
377 |
}
|
|
|
378 |
|
379 |
+
function activate_plugin(){
|
380 |
+
update_option( 'sk_do_activation_redirect', true );
|
|
|
381 |
$data = array(
|
382 |
'source' => 'plugin',
|
383 |
'action' => 'track',
|
384 |
+
'type' => 'activate'
|
|
|
385 |
);
|
386 |
$this->track($data);
|
387 |
+
// $this->redirect();
|
388 |
+
}
|
389 |
+
|
390 |
+
function redirect(){
|
391 |
+
if (get_option('sk_do_activation_redirect', false)) {
|
392 |
+
delete_option('sk_do_activation_redirect');
|
393 |
+
$siteurl = get_site_url();
|
394 |
+
wp_redirect($siteurl . "/wp-admin/options-general.php?page=sidekick&firstuse");
|
395 |
+
die();
|
396 |
+
}
|
397 |
+
}
|
398 |
+
|
399 |
+
function deactivate_plugin(){
|
400 |
+
$sk_track_data = get_option( 'sk_track_data' );
|
401 |
+
if ($sk_track_data) {
|
402 |
+
$data = array(
|
403 |
+
'source' => 'plugin',
|
404 |
+
'action' => 'track',
|
405 |
+
'type' => 'deactivate',
|
406 |
+
'user' => get_option( "activation_id" )
|
407 |
+
);
|
408 |
+
$this->track($data);
|
409 |
+
?>
|
410 |
+
<script type="text/javascript">
|
411 |
+
window._gaq = window._gaq || [];
|
412 |
+
window._gaq.push(['sk._setAccount', 'UA-39283622-1']);
|
413 |
+
|
414 |
+
(function() {
|
415 |
+
var ga_wpu = document.createElement('script'); ga_sk.type = 'text/javascript'; ga_sk.async = true;
|
416 |
+
ga_sk.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
417 |
+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga_wpu, s);
|
418 |
+
})();
|
419 |
+
window._gaq.push(['sk._trackEvent', 'Plugin - Deactivate', '', <?php echo plugin_version ?>, 0,true]);
|
420 |
+
</script>
|
421 |
+
<?php
|
422 |
+
}
|
423 |
+
delete_option( 'sk_activation_id' );
|
424 |
+
delete_option( 'sk_first_name' );
|
425 |
+
delete_option( 'sk_email' );
|
426 |
+
delete_option( 'sk_activated' );
|
427 |
}
|
428 |
}
|
429 |
+
|
430 |
+
$sidekick = new Sidekick;
|
431 |
+
if (!defined('SK_PLUGIN_DEGBUG')){
|
432 |
+
register_activation_hook( __FILE__, array($sidekick,'activate_plugin') );
|
433 |
+
register_deactivation_hook( __FILE__, array($sidekick,'deactivate_plugin') );
|
434 |
+
}
|
435 |
+
|
436 |
+
add_action('admin_menu', array($sidekick,'setup_menu'));
|
437 |
+
add_action('admin_init', array($sidekick,'redirect'));
|
438 |
+
add_action('wp_ajax_sk_activate', array($sidekick,'activate'));
|
439 |
+
|
440 |
+
if (!defined('SK_PLUGIN_DEGBUG'))
|
441 |
+
require_once('sk_init.php');
|
442 |
+
|
443 |
+
global $screen;
|
444 |
+
|
445 |
+
|
446 |
+
|
447 |
+
if (!(isset($_GET['tab']) && $_GET['tab'] == 'plugin-information') && !defined('IFRAME_REQUEST')) {
|
448 |
+
add_action('admin_footer', array($sidekick,'footer'));
|
449 |
+
add_action('customize_controls_print_footer_scripts', array($sidekick,'footer'));
|
450 |
+
}
|
451 |
|
452 |
|
sk_init.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<?php
|
2 |
|
3 |
if (defined('SK_PLUGIN_DEGBUG')) {
|
4 |
-
mlog('PHP: Sidekick run debug class');
|
5 |
$sidekick = new SidekickDev;
|
6 |
}
|
7 |
|
8 |
-
if (!(isset($_GET['tab']) && $_GET['tab'] == 'plugin-information')) {
|
9 |
add_action('admin_enqueue_scripts', array($sidekick,'enqueue'));
|
10 |
add_action('admin_enqueue_scripts', array($sidekick,'enqueue_required'));
|
11 |
add_action('customize_controls_enqueue_scripts', array($sidekick,'enqueue'));
|
1 |
<?php
|
2 |
|
3 |
if (defined('SK_PLUGIN_DEGBUG')) {
|
4 |
+
// mlog('PHP: Sidekick run debug class');
|
5 |
$sidekick = new SidekickDev;
|
6 |
}
|
7 |
|
8 |
+
if (!(isset($_GET['tab']) && $_GET['tab'] == 'plugin-information') && !defined('IFRAME_REQUEST')) {
|
9 |
add_action('admin_enqueue_scripts', array($sidekick,'enqueue'));
|
10 |
add_action('admin_enqueue_scripts', array($sidekick,'enqueue_required'));
|
11 |
add_action('customize_controls_enqueue_scripts', array($sidekick,'enqueue'));
|
wpu_init.php
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
mlog('WPU: PHP Init');
|
4 |
-
if (defined('WPU_PLUGIN_DEGBUG')) {
|
5 |
-
mlog('WPU: PHP Debug');
|
6 |
-
$wpu = new wpuDev;
|
7 |
-
}
|
8 |
-
|
9 |
-
if (!(isset($_GET['tab']) && $_GET['tab'] == 'plugin-information')) {
|
10 |
-
add_action('admin_enqueue_scripts', array($wpu,'enqueue'));
|
11 |
-
if (defined('WPU_PLUGIN_DEGBUG')) {
|
12 |
-
add_action('admin_footer', array($wpu,'footer_dev'));
|
13 |
-
}
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|