Sidekick - Version 1.2

Version Description

  • 3.9 Support Added
  • Suppport for Module Marketplace
  • HTTPs Support Added
  • Fixes to "safety layer"
  • Fix issue with hotspots showing while playing a walkthrough
Download this release

Release Info

Developer raptor235
Plugin Icon 128x128 Sidekick
Version 1.2
Comparing to
See all releases

Code changes from version 1.1 to 1.2

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
- /*z-index: 10000000;*/
40
-
41
  }
42
  div.sk_hotspot.visible {
43
  opacity: 0.8;
44
- -webkit-animation: cssAnimation 0.3s 1 ease;
45
- -moz-animation: cssAnimation 0.3s 1 ease;
46
- -o-animation: cssAnimation 0.3s 1 ease;
47
  }
48
- @-webkit-keyframes cssAnimation {
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 cssAnimation {
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 cssAnimation {
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: 150px;
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: 124px;
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: 124px;
107
  }
108
- @media (max-width: 900px) {
109
- body div#sidekick,
110
- body.branch-3-8 div#sidekick {
111
- width: 36px;
112
- }
113
- body div#sidekick div#sk_taskbar div#logo,
114
- body.branch-3-8 div#sidekick div#sk_taskbar div#logo {
115
- width: 19px;
116
- background-position: 3px 9px;
117
- }
118
- body div#sidekick div#sk_taskbar button.sk_toggle,
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: 145px;
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: 116px;
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: 20px;
 
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: none;
387
  float: right;
388
  height: 100%;
389
  }
390
  div#sidekick div#sk_taskbar div.sk_toggles button {
391
- height: 100%;
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: 26px;
 
 
 
 
 
 
 
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 .buckets {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 .buckets a {
559
- text-decoration: none;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
560
  }
561
- div#sidekick #sk_drawer ul.sk_bucketContainer .buckets.hide {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: 25px;
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,3495 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
 
2
- /* appModel.js */
3
-
4
- /* 1 */ (function($) {
5
- /* 2 */
6
- /* 3 */ window.SidekickWP = {
7
- /* 4 */ Models: {},
8
- /* 5 */ Collections: {},
9
- /* 6 */ Views: {},
10
- /* 7 */ Events: {},
11
- /* 8 */ Templates: {},
12
- /* 9 */ Helpers: {}
13
- /* 10 */ };
14
- /* 11 */
15
- /* 12 */ if (!window.console) window.console = {log: function() {}};
16
- /* 13 */ if (!window.console.clear) window.console.clear = function(){};
17
- /* 14 */ if (!window.console.group) window.console.group = function(){};
18
- /* 15 */ if (!window.console.groupEnd) window.console.groupEnd = function(){};
19
- /* 16 */ if (!window.console.table) window.console.table = function(){};
20
- /* 17 */ if (!window.console.error) window.console.error = function(){};
21
- /* 18 */ if (!window.console.groupCollapsed) window.console.groupCollapsed = function(){};
22
- /* 19 */
23
- /* 20 */ if (window.console){
24
- /* 21 */ 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);};
25
- /* 22 */ 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);};
26
- /* 23 */ }
27
- /* 24 */
28
- /* 25 */ SidekickWP.Models.App = Backbone.Model.extend({
29
- /* 26 */ defaults: {
30
- /* 27 */ full_library: null,
31
- /* 28 */ library_filtered_hotspots: null,
32
- /* 29 */ library_filtered_walkthroughs: null,
33
- /* 30 */ library_filtered_walkthroughs_by_id: null,
34
- /* 31 */ library_filtered_walkthroughs_by_bucket: null,
35
- /* 32 */ library_filtered_buckets: [],
36
- /* 33 */ library_filtered_sub_buckets: null,
37
- /* 34 */ library_filtered_sub_buckets_by_id: null,
38
- /* 35 */ my_library: null,
39
- /* 36 */ wp_version: null,
40
- /* 37 */ installed_plugins: null,
41
- /* 38 */ current_url: null,
42
- /* 39 */ current_plugin: null,
43
- /* 40 */ license_status: null,
44
- /* 41 */ show_toggle_feedback: true,
45
- /* 42 */ bucket_counts: []
46
- /* 43 */ },
47
- /* 44 */
48
- /* 45 */ initialize: function(){
49
- /* 46 */ console.group('%cinitialize: App Model %o', 'color:#3b4580', this);
50
- /* 47 */
51
- /* 48 */ if ( $.browser.msie && $.browser.version < 9) {
52
- /* 49 */ console.error('This browser is not supported');
53
- /* 50 */ return false;
54
-
55
- /* appModel.js */
56
-
57
- /* 51 */ }
58
- /* 52 */
59
- /* 53 */ _.extend(this, Backbone.Events);
60
- /* 54 */ SidekickWP.Events = _.extend({}, Backbone.Events);
61
- /* 55 */
62
- /* 56 */ Sidekick.Events.on('loaded_walkthrough',this.loaded_walkthrough,this);
63
- /* 57 */ // Sidekick.Events.on('stop',this.show_review,this);
64
- /* 58 */ Sidekick.Events.on('stop',this.deactivate_controls,this);
65
- /* 59 */ Sidekick.Events.on('track_play',this.activate_controls,this);
66
- /* 60 */ SidekickWP.Events.on('show_msg',this.show_msg,this);
67
- /* 61 */
68
- /* 62 */ this.trackingModel = new SidekickWP.Models.Tracking();
69
- /* 63 */
70
- /* 64 */ if (typeof sk_library == 'undefined') {
71
- /* 65 */ var msg = 'No Library Found!';
72
- /* 66 */ SidekickWP.Events.trigger('track_error',{msg: msg});
73
- /* 67 */
74
- /* 68 */ console.error('Sidekick Library Not Found! -> %s',sk_library_file);
75
- /* 69 */ return;
76
- /* 70 */ } else {
77
- /* 71 */ console.info('Library -> ' + sk_library_file);
78
- /* 72 */ console.log('sk_library %o', sk_library);
79
- /* 73 */ }
80
- /* 74 */
81
- /* 75 */ if (typeof sk_just_activated != 'undefined')
82
- /* 76 */ SidekickWP.Events.trigger('window_activate');
83
- /* 77 */
84
- /* 78 */ if (typeof sk_main_soft_version === 'undefined') {
85
- /* 79 */ console.error('No WP Version?!?');
86
- /* 80 */ return false;
87
- /* 81 */ }
88
- /* 82 */
89
- /* 83 */ if (typeof sk_main_soft_version != 'undefined') this.set('sk_main_soft_version',sk_main_soft_version);
90
- /* 84 */ if (typeof sk_library != 'undefined') this.set('full_library',sk_library);
91
- /* 85 */ if (typeof sk_installed_plugins != 'undefined') this.set('installed_plugins',sk_installed_plugins);
92
- /* 86 */
93
- /* 87 */ if (sk_track_data === true) console.log("Can't Track User Data!");
94
- /* 88 */
95
- /* 89 */ // console.table(this.attributes);
96
- /* 90 */
97
- /* 91 */ console.info('Full Library %o', this.get('full_library'));
98
- /* 92 */ this.set('current_url',window.location.toString());
99
- /* 93 */
100
- /* 94 */ this.Config = {
101
- /* 95 */ domain: 'http://www.wpuniversity.com'
102
- /* 96 */ };
103
- /* 97 */
104
- /* 98 */ this.views = {};
105
- /* 99 */
106
- /* 100 */ this.check_library();
107
-
108
- /* appModel.js */
109
-
110
- /* 101 */ this.filter_walkthroughs();
111
- /* 102 */ this.filter_buckets();
112
- /* 103 */ // this.remove_empty_buckets();
113
- /* 104 */
114
- /* 105 */ this.views.app = new SidekickWP.Views.App({model: this, el: $("body")});
115
- /* 106 */
116
- /* 107 */ console.groupEnd();
117
- /* 108 */ },
118
- /* 109 */
119
- /* 110 */ filter_walkthroughs: function(){
120
- /* 111 */ var library = this.get('full_library');
121
- /* 112 */ var check_list = [];
122
- /* 113 */ var passed_list = [];
123
- /* 114 */ var library_filtered_walkthroughs_by_id = [];
124
- /* 115 */ var library_filtered_walkthroughs_by_bucket = [];
125
- /* 116 */ var library_filtered_hotspots = [];
126
- /* 117 */
127
- /* 118 */ console.groupCollapsed('%cCHECK_WALKTHROUGH_COMPATIBILITY %o', 'color:#3b4580', walkthrough);
128
- /* 119 */ // console.group('%cCHECK_WALKTHROUGH_COMPATIBILITY %o', 'color:#3b4580', walkthrough);
129
- /* 120 */ for(var type in library.walkthroughs){
130
- /* 121 */ for(var walkthrough_key in library.walkthroughs[type]){
131
- /* 122 */ var walkthrough = library.walkthroughs[type][walkthrough_key];
132
- /* 123 */ var check_walkthought = this.check_walkthrough_compatibility(walkthrough);
133
- /* 124 */
134
- /* 125 */ if (check_walkthought) {
135
- /* 126 */ library_filtered_walkthroughs_by_id[walkthrough.id] = walkthrough;
136
- /* 127 */
137
- /* 128 */ if (walkthrough.type == 'hotspot') {
138
- /* 129 */ _.each(walkthrough.hotspots,function(item){
139
- /* 130 */ library_filtered_hotspots.push({url:item.url,selector: item.selector,id:walkthrough.id});
140
- /* 131 */ });
141
- /* 132 */ } else {
142
- /* 133 */ for (var bucket in walkthrough.buckets){
143
- /* 134 */ var bucket_id = walkthrough.buckets[bucket];
144
- /* 135 */ this.assign_walkthrough(bucket_id,walkthrough);
145
- /* 136 */
146
- /* 137 */ if (typeof library_filtered_walkthroughs_by_bucket[bucket_id] === 'undefined') library_filtered_walkthroughs_by_bucket[bucket_id] = [];
147
- /* 138 */ if (typeof library_filtered_walkthroughs_by_bucket[bucket_id][type] === 'undefined') library_filtered_walkthroughs_by_bucket[bucket_id][type] = [];
148
- /* 139 */
149
- /* 140 */ library_filtered_walkthroughs_by_bucket[bucket_id][type].push(walkthrough);
150
- /* 141 */ }
151
- /* 142 */ }
152
- /* 143 */ if (!_.size(passed_list)) {
153
- /* 144 */ passed_list = [walkthrough.id];
154
- /* 145 */ } else {
155
- /* 146 */ passed_list = _.union(passed_list,walkthrough.id);
156
- /* 147 */ }
157
- /* 148 */ }
158
- /* 149 */ }
159
- /* 150 */ }
160
-
161
- /* appModel.js */
162
-
163
- /* 151 */ console.log('passed_list %o', passed_list);
164
- /* 152 */ console.log('library_filtered_walkthroughs_by_bucket %o', library_filtered_walkthroughs_by_bucket);
165
- /* 153 */
166
- /* 154 */ console.groupEnd();
167
- /* 155 */
168
- /* 156 */ this.set('library_filtered_hotspots',library_filtered_hotspots);
169
- /* 157 */ this.set('library_filtered_walkthroughs',passed_list);
170
- /* 158 */ this.set('library_filtered_walkthroughs_by_id',library_filtered_walkthroughs_by_id);
171
- /* 159 */ this.set('library_filtered_walkthroughs_by_bucket',library_filtered_walkthroughs_by_bucket);
172
- /* 160 */ },
173
- /* 161 */
174
- /* 162 */ assign_walkthrough: function(into_bucket_id,walkthrough){
175
- /* 163 */ console.group('%cassign_walkthrough (%s) -> bucket %s', 'color:#8fa2ff',walkthrough.title,into_bucket_id);
176
- /* 164 */
177
- /* 165 */ var full_library = this.get('full_library');
178
- /* 166 */ var library_filtered_buckets = this.get('library_filtered_buckets');
179
- /* 167 */
180
- /* 168 */ for (var bucket in full_library.buckets){
181
- /* 169 */ var bucket_data = full_library.buckets[bucket];
182
- /* 170 */ if (typeof bucket_data.sub_buckets == 'object') {
183
- /* 171 */ var sub_buckets = bucket_data.sub_buckets;
184
- /* 172 */ for (var sub_bucket in sub_buckets){
185
- /* 173 */ var sub_bucket_data = sub_buckets[sub_bucket];
186
- /* 174 */
187
- /* 175 */ if (typeof sub_bucket_data.sub_buckets == 'object') {
188
- /* 176 */ var sub_sub_buckets = sub_bucket_data.sub_buckets;
189
- /* 177 */ for (var sub_sub_bucket in sub_sub_buckets){
190
- /* 178 */ var sub_sub_bucket_data = sub_sub_buckets[sub_sub_bucket];
191
- /* 179 */ if (sub_sub_bucket_data.id == into_bucket_id) {
192
- /* 180 */ // console.log(' Assigning (%s) -> (%s)',walkthrough.title,into_bucket_id);
193
- /* 181 */ (full_library.buckets[bucket].sub_buckets[sub_bucket].sub_buckets[sub_sub_bucket].walkthroughs = full_library.buckets[bucket].sub_buckets[sub_bucket].sub_buckets[sub_sub_bucket].walkthroughs || []).push(walkthrough);
194
- /* 182 */ }
195
- /* 183 */ }
196
- /* 184 */ } else {
197
- /* 185 */ if (sub_bucket_data.id == into_bucket_id) {
198
- /* 186 */ // console.log(' Assigning (%s) -> (%s)',walkthrough.title,into_bucket_id);
199
- /* 187 */ (full_library.buckets[bucket].sub_buckets[sub_bucket].walkthroughs = full_library.buckets[bucket].sub_buckets[sub_bucket].walkthroughs || []).push(walkthrough);
200
- /* 188 */ }
201
- /* 189 */ }
202
- /* 190 */ }
203
- /* 191 */ } else {
204
- /* 192 */ if (bucket_data.id == into_bucket_id) {
205
- /* 193 */ // console.log('Assigning (%s) -> (%s)',walkthrough.title,into_bucket_id);
206
- /* 194 */ (full_library.buckets[bucket].walkthroughs = full_library.buckets[bucket].walkthroughs || []).push(walkthrough);
207
- /* 195 */ }
208
- /* 196 */ }
209
- /* 197 */ }
210
- /* 198 */
211
- /* 199 */ this.set('library_filtered_buckets',library_filtered_buckets);
212
- /* 200 */ console.groupEnd();
213
-
214
- /* appModel.js */
215
-
216
- /* 201 */ },
217
- /* 202 */
218
- /* 203 */ filter_buckets: function(){
219
- /* 204 */ console.groupCollapsed('%cFILTER_BUCKETS', 'color:#8fa2ff');
220
- /* 205 */
221
- /* 206 */ var full_library = this.get('full_library');
222
- /* 207 */ var library_filtered_sub_buckets = {};
223
- /* 208 */ var bucket;
224
- /* 209 */ var bucket_data;
225
- /* 210 */ var sub_bucket;
226
- /* 211 */ var sub_buckets;
227
- /* 212 */ var sub_bucket_data;
228
- /* 213 */
229
- /* 214 */ console.log('LEVEL 3 full_library.buckets %o', full_library.buckets);
230
- /* 215 */
231
- /* 216 */
232
- /* 217 */ for (bucket in full_library.buckets){
233
- /* 218 */ console.log('bucket %o', bucket);
234
- /* 219 */
235
- /* 220 */ bucket_data = full_library.buckets[bucket];
236
- /* 221 */
237
- /* 222 */ library_filtered_sub_buckets[bucket] = {id:bucket_data.id,sub_buckets:[]};
238
- /* 223 */
239
- /* 224 */
240
- /* 225 */ if (typeof bucket_data.sub_buckets == 'object') {
241
- /* 226 */ sub_buckets = bucket_data.sub_buckets;
242
- /* 227 */ for (sub_bucket in sub_buckets){
243
- /* 228 */ console.log('sub_bucket %o', sub_bucket);
244
- /* 229 */
245
- /* 230 */ sub_bucket_data = sub_buckets[sub_bucket];
246
- /* 231 */
247
- /* 232 */ library_filtered_sub_buckets[bucket].sub_buckets[sub_bucket] = {id:sub_bucket_data.id};
248
- /* 233 */ library_filtered_sub_buckets[sub_bucket] = {id:sub_bucket_data.id,sub_buckets:[]};
249
- /* 234 */
250
- /* 235 */
251
- /* 236 */ if (typeof sub_bucket_data.sub_buckets == 'object') {
252
- /* 237 */ var sub_sub_buckets = sub_bucket_data.sub_buckets;
253
- /* 238 */
254
- /* 239 */
255
- /* 240 */ for (var sub_sub_bucket in sub_sub_buckets){
256
- /* 241 */ console.log('sub_sub_bucket %o', sub_sub_bucket);
257
- /* 242 */
258
- /* 243 */ var sub_sub_bucket_data = sub_sub_buckets[sub_sub_bucket];
259
- /* 244 */
260
- /* 245 */ library_filtered_sub_buckets[sub_sub_bucket] = {id:sub_sub_bucket_data.id,sub_buckets:[]};
261
- /* 246 */ library_filtered_sub_buckets[sub_bucket].sub_buckets[sub_sub_bucket] = {id:sub_sub_bucket_data.id,sub_buckets:[]};
262
- /* 247 */
263
- /* 248 */ // console.log('sub_sub_bucket %o - %o', sub_sub_bucket,sub_sub_bucket_data);
264
- /* 249 */
265
- /* 250 */ if (!sub_sub_bucket_data.walkthroughs && !sub_sub_bucket_data.sub_buckets) {
266
-
267
- /* appModel.js */
268
-
269
- /* 251 */ console.log('Deleteing -> %o',full_library.buckets[bucket].sub_buckets[sub_bucket].sub_buckets[sub_sub_bucket]);
270
- /* 252 */ delete(full_library.buckets[bucket].sub_buckets[sub_bucket].sub_buckets[sub_sub_bucket]);
271
- /* 253 */ }
272
- /* 254 */
273
- /* 255 */ if (typeof sub_sub_bucket_data.sub_buckets == 'object') {
274
- /* 256 */ var sub_sub_sub_buckets = sub_sub_bucket_data.sub_buckets;
275
- /* 257 */
276
- /* 258 */ for (var sub_sub_sub_bucket in sub_sub_sub_buckets){
277
- /* 259 */ console.log('sub_sub_sub_bucket %o', sub_sub_sub_bucket);
278
- /* 260 */ var sub_sub_sub_bucket_data = sub_sub_sub_buckets[sub_sub_sub_bucket];
279
- /* 261 */ library_filtered_sub_buckets[sub_sub_sub_bucket] = {id:sub_sub_sub_bucket_data.id,sub_buckets:[]};
280
- /* 262 */ library_filtered_sub_buckets[sub_sub_bucket].sub_buckets[sub_sub_sub_bucket] = {id:sub_sub_sub_bucket_data.id,sub_buckets:[]};
281
- /* 263 */ }
282
- /* 264 */ }
283
- /* 265 */
284
- /* 266 */ }
285
- /* 267 */ }
286
- /* 268 */ }
287
- /* 269 */ }
288
- /* 270 */ }
289
- /* 271 */
290
- /* 272 */ console.log('LEVEL 2 full_library.buckets %o', full_library.buckets);
291
- /* 273 */
292
- /* 274 */ for (bucket in full_library.buckets){
293
- /* 275 */ bucket_data = full_library.buckets[bucket];
294
- /* 276 */ if (typeof bucket_data.sub_buckets == 'object') {
295
- /* 277 */ sub_buckets = bucket_data.sub_buckets;
296
- /* 278 */ for (sub_bucket in sub_buckets){
297
- /* 279 */ sub_bucket_data = sub_buckets[sub_bucket];
298
- /* 280 */
299
- /* 281 */ if (!sub_bucket_data.walkthroughs && !sub_bucket_data.sub_buckets) {
300
- /* 282 */ console.log('Deleteing -> %o',sub_bucket);
301
- /* 283 */ delete(full_library.buckets[bucket].sub_buckets[sub_bucket]);
302
- /* 284 */ }
303
- /* 285 */ }
304
- /* 286 */ }
305
- /* 287 */ }
306
- /* 288 */
307
- /* 289 */ console.log('LEVEL 1 full_library.buckets %o', full_library.buckets);
308
- /* 290 */
309
- /* 291 */ for (bucket in full_library.buckets){
310
- /* 292 */ bucket_data = full_library.buckets[bucket];
311
- /* 293 */ if (!bucket_data.walkthroughs && !bucket_data.sub_buckets) {
312
- /* 294 */ console.log('Deleteing -> %o',bucket);
313
- /* 295 */ delete(full_library.buckets[bucket]);
314
- /* 296 */ }
315
- /* 297 */ }
316
- /* 298 */
317
- /* 299 */ this.set('library_filtered_sub_buckets',library_filtered_sub_buckets);
318
- /* 300 */ console.log('full_library.buckets %o', full_library.buckets);
319
-
320
- /* appModel.js */
321
-
322
- /* 301 */ console.groupEnd();
323
- /* 302 */ },
324
- /* 303 */
325
- /* 304 */ check_walkthrough_compatibility: function(walkthrough){
326
- /* 305 */ var sk_main_soft_version = this.get('sk_main_soft_version');
327
- /* 306 */ var pass_main_soft_version = false, pass_theme_version = false, pass_theme = false, pass_plugin = false, pass_plugin_version = false, pass_user_level = false;
328
- /* 307 */ var bucket_counts = this.get('bucket_counts');
329
- /* 308 */ var installed_plugins = this.get('installed_plugins') ;
330
- /* 309 */
331
- /* 310 */ // Checking Main Software Version Compatibility
332
- /* 311 */ pass_main_soft_version = _.find(walkthrough.main_soft_version,function(val){
333
- /* 312 */ if (val == sk_main_soft_version)
334
- /* 313 */ return true;
335
- /* 314 */ });
336
- /* 315 */
337
- /* 316 */ if (!pass_main_soft_version){
338
- /* 317 */ console.error('FAILED %o - Main %s != %s',walkthrough.title, pass_main_soft_version,walkthrough.main_soft_version);
339
- /* 318 */ console.log('sk_main_soft_version %o walkthrough.main_soft_version %o', sk_main_soft_version,walkthrough.main_soft_version);
340
- /* 319 */
341
- /* 320 */ return false;
342
- /* 321 */ }
343
- /* 322 */
344
- /* 323 */ // Checking Theme Compatibility
345
- /* 324 */ if (typeof walkthrough.theme !== 'undefined') {
346
- /* 325 */ if (walkthrough.theme === sk_installed_theme) {
347
- /* 326 */ pass_theme = true;
348
- /* 327 */ if (walkthrough.theme_version) {
349
- /* 328 */ pass_theme_version = _.find(walkthrough.theme_version,function(val){
350
- /* 329 */ if (val == sk_theme_version) {
351
- /* 330 */ return true;
352
- /* 331 */ }
353
- /* 332 */ });
354
- /* 333 */ } else {
355
- /* 334 */ pass_theme_version = true;
356
- /* 335 */ }
357
- /* 336 */ }
358
- /* 337 */ if (!pass_theme || !pass_theme_version){
359
- /* 338 */ console.error('FAILED %o - Theme %s (%o) != %s (%o)',walkthrough.title,walkthrough.theme_version, walkthrough.theme, pass_theme, sk_theme_version);
360
- /* 339 */ return false;
361
- /* 340 */ }
362
- /* 341 */ }
363
- /* 342 */
364
- /* 343 */ // Checking Plugin Compatibility
365
- /* 344 */ if (typeof walkthrough.plugin !== 'undefined') {
366
- /* 345 */ if (typeof sk_installed_plugins === 'undefined') return false;
367
- /* 346 */ pass_plugin = _.find(sk_installed_plugins,function(plugin_data){
368
- /* 347 */ for (var plugin in plugin_data) {
369
- /* 348 */ var version = plugin_data[plugin];
370
- /* 349 */
371
- /* 350 */ if (plugin == walkthrough.plugin) {
372
-
373
- /* appModel.js */
374
-
375
- /* 351 */ pass_plugin = true;
376
- /* 352 */
377
- /* 353 */ pass_plugin_version = _.find(walkthrough.plugin_version,function(version2){
378
- /* 354 */ // console.log('version %o == %o ?', version,version2);
379
- /* 355 */ if (version == version2) {
380
- /* 356 */ pass_plugin_version = true;
381
- /* 357 */ return true;
382
- /* 358 */ }
383
- /* 359 */ });
384
- /* 360 */ // console.log('pass_plugin_version %o', pass_plugin_version);
385
- /* 361 */ return true;
386
- /* 362 */ }
387
- /* 363 */ break;
388
- /* 364 */ }
389
- /* 365 */ });
390
- /* 366 */ if (!pass_plugin || !pass_plugin_version){
391
- /* 367 */ console.error('FAILED %o - Plugin %o (%o) != %s',walkthrough.title, sk_installed_plugins, walkthrough.plugin_version, walkthrough.plugin);
392
- /* 368 */ return false;
393
- /* 369 */ }
394
- /* 370 */ }
395
- /* 371 */
396
- /* 372 */ // Checking User Role/Level Compatibility
397
- /* 373 */ if (walkthrough.role) {
398
- /* 374 */ pass_user_level = _.find(walkthrough.role,function(val){
399
- /* 375 */ if (val == sk_user_level) {
400
- /* 376 */ return true;
401
- /* 377 */ }
402
- /* 378 */ });
403
- /* 379 */ }
404
- /* 380 */
405
- /* 381 */ if (!pass_user_level){
406
- /* 382 */ console.error('FAILED %o - User Level %s != %s',walkthrough.title, sk_user_level, walkthrough.role);
407
- /* 383 */ return false;
408
- /* 384 */ }
409
- /* 385 */
410
- /* 386 */ console.log('%cPASSED! %o', 'color: #3ab00b',walkthrough.title);
411
- /* 387 */ return true;
412
- /* 388 */ },
413
- /* 389 */
414
- /* 390 */ check_library: function(){
415
- /* 391 */ if (!this.get('full_library')) {
416
- /* 392 */ console.error("WPU Library Not Found!");
417
- /* 393 */ return false;
418
- /* 394 */ }
419
- /* 395 */ if (!this.get('sk_main_soft_version')){
420
- /* 396 */ console.error("No WP Version Found!");
421
- /* 397 */ return false;
422
- /* 398 */ }
423
- /* 399 */ // this.parse_my_library();
424
- /* 400 */ },
425
-
426
- /* appModel.js */
427
-
428
- /* 401 */
429
- /* 402 */ loaded_walkthrough: function(walkthrough_model){
430
- /* 403 */ // console.log('WPU:loaded_walkthrough');
431
- /* 404 */ this.set('last_loaded_walkthrough',walkthrough_model);
432
- /* 405 */ },
433
- /* 406 */
434
- /* 407 */ activate_controls: function(){
435
- /* 408 */ console.log('activate_controls');
436
- /* 409 */ $('div#sidekick').addClass('playing');
437
- /* 410 */ },
438
- /* 411 */
439
- /* 412 */ deactivate_controls: function(){
440
- /* 413 */ $('div#sidekick').removeClass('playing');
441
- /* 414 */ },
442
- /* 415 */
443
- /* 416 */ // show_review: function(a,b){
444
- /* 417 */ // console.log('show_review');
445
- /* 418 */ // var last_loaded_walkthrough = this.get('last_loaded_walkthrough');
446
- /* 419 */ // console.log('last_loaded_walkthrough %o', last_loaded_walkthrough);
447
- /* 420 */
448
- /* 421 */ // var walkthrough_title = last_loaded_walkthrough.get('title');
449
- /* 422 */ // console.log('walkthrough_title %o', walkthrough_title);
450
- /* 423 */
451
- /* 424 */ // // new SidekickWP.Models.Review({walkthrough_title: walkthrough_title});
452
- /* 425 */ // },
453
- /* 426 */
454
- /* 427 */ show_msg: function(data,context){
455
- /* 428 */ // console.log('show_msg %o',arguments);
456
- /* 429 */ // console.log('this.models %o', this.models);
457
- /* 430 */ // console.log('context %o', context);
458
- /* 431 */ new SidekickWP.Models.Message({title: data.title, message: data.msg});
459
- /* 432 */ }
460
- /* 433 */ });
461
- /* 434 */ }(jQuery));
462
-
463
- ;
464
- /* bucketContainerModel.js */
465
-
466
- /* 1 */ (function($) {
467
- /* 2 */
468
- /* 3 */ SidekickWP.Models.BucketContainer = Backbone.Model.extend({
469
- /* 4 */ defaults: {
470
- /* 5 */ navigation_history: ['buckets']
471
- /* 6 */ },
472
- /* 7 */
473
- /* 8 */ initialize: function(){
474
- /* 9 */ this.view = new SidekickWP.Views.BucketContainer({model: this});
475
- /* 10 */ return this;
476
- /* 11 */ }
477
- /* 12 */ });
478
- /* 13 */
479
- /* 14 */ }(jQuery));
480
-
481
- ;
482
- /* bucketModel.js */
483
-
484
- /* 1 */ (function($) {
485
- /* 2 */
486
- /* 3 */ SidekickWP.Models.Bucket = Backbone.Model.extend({
487
- /* 4 */ defaults: {
488
- /* 5 */ full_library: null,
489
- /* 6 */ library_filtered_walkthroughs: null,
490
- /* 7 */ library_filtered_buckets: null,
491
- /* 8 */ library_filtered_sub_buckets: null
492
- /* 9 */ },
493
- /* 10 */
494
- /* 11 */ initialize: function(){
495
- /* 12 */ console.log('initialize bucketModel %o', this.attributes);
496
- /* 13 */ this.view = new SidekickWP.Views.Bucket({model: this});
497
- /* 14 */ return this;
498
- /* 15 */ }
499
- /* 16 */ });
500
- /* 17 */
501
- /* 18 */ }(jQuery));
502
-
503
- ;
504
- /* helpers.js */
505
-
506
- /* 1 */ (function($) {
507
- /* 2 */
508
- /* 3 */ SidekickWP.Helpers = ({
509
- /* 4 */ preventScrolling: function(){
510
- /* 5 */ $('div#sidekick .bucketContainer>div>ul').on('DOMMouseScroll mousewheel', function(ev) {
511
- /* 6 */ console.log('asd');
512
- /* 7 */ var $this = $(this),
513
- /* 8 */ scrollTop = this.scrollTop,
514
- /* 9 */ scrollHeight = this.scrollHeight,
515
- /* 10 */ height = $this.height(),
516
- /* 11 */ delta = (ev.type == 'DOMMouseScroll' ?
517
- /* 12 */ ev.originalEvent.detail * -40 :
518
- /* 13 */ ev.originalEvent.wheelDelta),
519
- /* 14 */ up = delta > 0;
520
- /* 15 */
521
- /* 16 */ var prevent = function() {
522
- /* 17 */ ev.stopPropagation();
523
- /* 18 */ ev.preventDefault();
524
- /* 19 */ ev.returnValue = false;
525
- /* 20 */ return false;
526
- /* 21 */ };
527
- /* 22 */
528
- /* 23 */ if (!up && -delta > scrollHeight - height - scrollTop) {
529
- /* 24 */ // Scrolling down, but this will take us past the bottom.
530
- /* 25 */ $this.scrollTop(scrollHeight);
531
- /* 26 */ return prevent();
532
- /* 27 */ } else if (up && delta > scrollTop) {
533
- /* 28 */ // Scrolling up, but this will take us past the top.
534
- /* 29 */ $this.scrollTop(0);
535
- /* 30 */ return prevent();
536
- /* 31 */ }
537
- /* 32 */ });
538
- /* 33 */ }
539
- /* 34 */ });
540
- /* 35 */ }(jQuery));
541
- /* 36 */
542
- /* 37 */
543
-
544
- ;
545
- /* messageModel.js */
546
-
547
- /* 1 */ (function($) {
548
- /* 2 */
549
- /* 3 */ SidekickWP.Models.Message = Backbone.Model.extend({
550
- /* 4 */ defaults: {
551
- /* 5 */ title: null,
552
- /* 6 */ message: null
553
- /* 7 */ },
554
- /* 8 */
555
- /* 9 */ initialize: function(){
556
- /* 10 */ this.view = new SidekickWP.Views.Message({model: this, el: $("#sidekick ul.bucketContainer div")});
557
- /* 11 */ }
558
- /* 12 */ });
559
- /* 13 */
560
- /* 14 */ }(jQuery));
561
-
562
- ;
563
- /* reviewModel.js */
564
-
565
- /* 1 */ (function($) {
566
- /* 2 */
567
- /* 3 */ SidekickWP.Models.Review = Backbone.Model.extend({
568
- /* 4 */ defaults: {
569
- /* 5 */ walkthrough_title: null
570
- /* 6 */ },
571
- /* 7 */
572
- /* 8 */ initialize: function(){
573
- /* 9 */ this.view = new SidekickWP.Views.Review({model: this, el: $("#sidekick .bucketContainer div")});
574
- /* 10 */ }
575
- /* 11 */ });
576
- /* 12 */
577
- /* 13 */ }(jQuery));
578
-
579
- ;
580
- /* trackingModel.js */
581
-
582
- /* 1 */ (function($) {
583
- /* 2 */
584
- /* 3 */ SidekickWP.Models.Tracking = Backbone.Model.extend({
585
- /* 4 */ defaults : {
586
- /* 5 */ gaAccountID : 'UA-39283622-1'
587
- /* 6 */ },
588
- /* 7 */
589
- /* 8 */ initialize: function(){
590
- /* 9 */ SidekickWP.Events.on('track_open_sidekick_window', this.track_open_sidekick_window, this);
591
- /* 10 */ SidekickWP.Events.on('track_explore', this.track_explore, this);
592
- /* 11 */ SidekickWP.Events.on('window_activate', this.window_activate, this);
593
- /* 12 */ SidekickWP.Events.on('window_deactivate', this.window_deactivate, this);
594
- /* 13 */ SidekickWP.Events.on('track_error', this.track_error, this);
595
- /* 14 */
596
- /* 15 */ window._gaq = window._gaq || [];
597
- /* 16 */ window._gaq.push(['sidekickWP._setAccount', this.get('gaAccountID')]);
598
- /* 17 */
599
- /* 18 */ (function() {
600
- /* 19 */ var ga_sk = document.createElement('script'); ga_sk.type = 'text/javascript'; ga_sk.async = true;
601
- /* 20 */ ga_sk.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
602
- /* 21 */ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga_sk, s);
603
- /* 22 */ })();
604
- /* 23 */ },
605
- /* 24 */
606
- /* 25 */ send: function(data){
607
- /* 26 */ model = window.sidekickWP || {};
608
- /* 27 */
609
- /* 28 */ data = data || {};
610
- /* 29 */ data.source = 'plugin';
611
- /* 30 */ data.action = 'track';
612
- /* 31 */ data.data = JSON.stringify(model);
613
- /* 32 */ if (typeof sidekick !== 'undefined' && (typeof sk_track_data === 'undefined' || sk_track_data === true)) {
614
- /* 33 */ data.user = sk_license_key;
615
- /* 34 */ }
616
- /* 35 */
617
- /* 36 */ // console.log('send tracking to WPU',data);
618
- /* 37 */ $.post("http://www.wpuniversity.com/wp-admin/admin-ajax.php", data);
619
- /* 38 */ },
620
- /* 39 */
621
- /* 40 */ track_explore: function(data){
622
- /* 41 */ window._gaq.push(['sidekickWP._trackEvent', 'Plugin - Explore', data.what, null, 0,true]);
623
- /* 42 */ this.send({type: 'explore', label: data.what});
624
- /* 43 */ },
625
- /* 44 */
626
- /* 45 */ track_open_sidekick_window: function(data){
627
- /* 46 */ window._gaq.push(['sidekickWP._trackEvent', 'Plugin - Window', 'Open', null, 0,true]);
628
- /* 47 */ this.send({type: 'open'});
629
- /* 48 */ },
630
- /* 49 */
631
- /* 50 */ window_activate: function(data){
632
-
633
- /* trackingModel.js */
634
-
635
- /* 51 */ window._gaq.push(['sidekickWP._trackEvent', 'Plugin - Activate', '', wpu_plugin_version, 0,true]);
636
- /* 52 */ this.send({type: 'activate'});
637
- /* 53 */ },
638
- /* 54 */
639
- /* 55 */ window_deactivate: function(data){
640
- /* 56 */ window._gaq.push(['sidekickWP._trackEvent', 'Plugin - Deactivate', '', wpu_plugin_version, 0,true]);
641
- /* 57 */ this.send({type: 'deactivate'});
642
- /* 58 */ },
643
- /* 59 */
644
- /* 60 */ track_error: function(data){
645
- /* 61 */ window._gaq.push(['sidekickWP._trackEvent', 'Plugin', 'Error', data.msg,null,true]);
646
- /* 62 */ this.send({type: 'error', label: data.msg});
647
- /* 63 */ }
648
- /* 64 */
649
- /* 65 */ });
650
- /* 66 */
651
- /* 67 */ }(jQuery));
652
- /* 68 */
653
- /* 69 */
654
- /* 70 */
655
-
656
- ;
657
- /* appView.js */
658
-
659
- /* 1 */ (function($) {
660
- /* 2 */ SidekickWP.Views.App = Backbone.View.extend({
661
- /* 3 */ initialize: function(){
662
- /* 4 */ SidekickWP.Events.on('toggle_sidekick_drawer', this.toggle_sidekick_drawer, this);
663
- /* 5 */ SidekickWP.Events.on('close_sidekick_drawer', this.close_sidekick_drawer, this);
664
- /* 6 */ SidekickWP.Events.on('open_sidekick_drawer', this.open_sidekick_drawer, this);
665
- /* 7 */ SidekickWP.Events.on('resize_sidekick_drawer', this.resize_sidekick_drawer, this);
666
- /* 8 */ SidekickWP.Events.on('toggle_hotspots', this.toggle_hotspots, this);
667
- /* 9 */ SidekickWP.Events.on('toggle_preferences', this.toggle_preferences, this);
668
- /* 10 */
669
- /* 11 */
670
- /* 12 */ Sidekick.Events.on('track_play',this.toggle_sidekick_drawer,'hide');
671
- /* 13 */ Sidekick.Events.on('track_stop',this.show_sidekick_drawer);
672
- /* 14 */
673
- /* 15 */ return this.render();
674
- /* 16 */ },
675
- /* 17 */
676
- /* 18 */ render: function(){
677
- /* 19 */ console.groupEnd('%crender: SidekickWP: appView %o', 'color:#8fa2ff', this);
678
- /* 20 */
679
- /* 21 */ this.BucketContainer = new SidekickWP.Models.BucketContainer({
680
- /* 22 */ full_library: this.model.get('full_library'),
681
- /* 23 */ library_filtered_walkthroughs: this.model.get('library_filtered_walkthroughs'),
682
- /* 24 */ library_filtered_buckets: this.model.get('library_filtered_buckets'),
683
- /* 25 */ library_filtered_sub_buckets: this.model.get('library_filtered_sub_buckets'),
684
- /* 26 */ library_filtered_walkthroughs_by_bucket: this.model.get('library_filtered_walkthroughs_by_bucket'),
685
- /* 27 */ bucket_counts: this.model.get('bucket_counts')
686
- /* 28 */ });
687
- /* 29 */
688
- /* 30 */ if (_.size(this.model.get('library_filtered_walkthroughs')) > 0) {
689
- /* 31 */ BucketContainer = this.BucketContainer.view.render().$el.html();
690
- /* 32 */ } else {
691
- /* 33 */ BucketContainer = '<div class="warning">No walkthroughs found for ' + sk_main_soft_name + ' ' + sk_main_soft_version + '</div>';
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
+
1935
+
1936
+ if (sk_config.site_url == item.trim()) {
1937
+ matched_domain = item;
1938
+ console.log('%cCHECK DOMAIN %o == %o', 'background-color: #51fa3d;color: white',sk_config.site_url,item);
1939
+ } else {
1940
+ console.log('%cCHECK DOMAIN %o == %o', 'background-color: #c12029;color: white',sk_config.site_url,item);
1941
+ }
1942
+ });
1943
+ } else {
1944
+ if (sk_config.site_url == paid_library_domain) {
1945
+ matched_domain = item;
1946
+ }
1947
+ }
1948
+ console.groupEnd();
1949
+ } else {
1950
+ console.log('%cNO paid library','background-color: #c12029;color: white');
1951
+ sk_config.activation_id = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxfree';
1952
+ if (typeof sk_free_library == 'undefined' || !sk_config.library_free_file){
1953
+ console.error('Paid Library didn\'t match domain and no free library');
1954
+ return false;
1955
+ }
1956
+ }
1957
+ }
1958
+
1959
+ if (matched_domain) {
1960
+ this.set('full_library',sk_paid_library);
1961
+ this.set('paid_library',sk_paid_library);
1962
+ console.info('%cPaid Library for %s -> ' + sk_config.library_paid_file + ' (%o)', 'background-color: #51fa3d; color black;',matched_domain,sk_paid_library);
1963
+ } else {
1964
+ this.set('full_library',sk_free_library);
1965
+ console.info('%cFree Library -> ' + sk_config.library_free_file + ' (%o)', 'background-color: #facf42; color black;',sk_free_library);
1966
+ }
1967
+
1968
+ if (typeof sk_config.just_activated != 'undefined')
1969
+ SidekickWP.Events.trigger('window_activate');
1970
+
1971
+ if (typeof sk_config.main_soft_version === 'undefined') {
1972
+ console.error('No WP Version?!?');
1973
+ return false;
1974
+ }
1975
+
1976
+ if (typeof sk_config.main_soft_version != 'undefined') this.set('main_soft_version',sk_config.main_soft_version);
1977
+ if (typeof sk_config.installed_plugins != 'undefined') this.set('installed_plugins',sk_config.installed_plugins);
1978
+
1979
+ if (sk_config.track_data === true) console.log("Can't Track User Data!");
1980
+
1981
+ this.set('current_url',window.location.toString());
1982
+
1983
+ var http = 'http';
1984
+ if (window.location.toString().indexOf('https') > -1) {
1985
+ http = 'https';
1986
+ }
1987
+
1988
+ this.views = {};
1989
+ this.check_library();
1990
+ this.filter_walkthroughs();
1991
+
1992
+ this.views.app = new SidekickWP.Views.App({model: this, el: $("body")});
1993
+
1994
+ if (sk_config.show_login === true) {
1995
+ SidekickWP.Events.trigger('open_sidekick_drawer');
1996
+ }
1997
+ // console.groupEnd();
1998
+ },
1999
+
2000
+ screen_activate: function(){
2001
+ SidekickWP.Events.trigger('open_sidekick_drawer');
2002
+
2003
+ var activation_id = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
2004
+ if (sk_config.activation_id) {
2005
+ activation_id = sk_config.activation_id;
2006
+ }
2007
+
2008
+ new SidekickWP.Models.User({
2009
+ 'view': 'activate',
2010
+ 'primary_domain': sk_config.domain,
2011
+ 'activation_id': activation_id
2012
+ });
2013
+ },
2014
+
2015
+ filter_walkthroughs: function(){
2016
+ console.groupCollapsed('%cFilter Walkthroughs','color: orange');
2017
+ var library = this.get('full_library');
2018
+ _.each(library.buckets,function(item,key){
2019
+ this.filter_sub_bucket_recursive(item);
2020
+ },this);
2021
+
2022
+ _.each(library.buckets,function(item,key){
2023
+ // Delete root bucket if no sub buckets
2024
+ this.check_delete_empty_sub_buckets_recrusive(item);
2025
+
2026
+ if (_.size(library.buckets[key].sub_buckets) === 0 && _.size(library.buckets[key].walkthroughs) === 0) {
2027
+ // console.log('%cDELETE ROOT BUCKET -> %o(%o)','color: red',key,library.buckets[key]);
2028
+ delete(library.buckets[key]);
2029
+ }
2030
+ },this);
2031
+ console.groupEnd();
2032
+ },
2033
+
2034
+ check_delete_empty_sub_buckets_recrusive: function(sub_bucket){
2035
+ // console.group('%ccheck_delete_empty_sub_buckets_recrusive %o (%o)', 'color: #d2984c;',sub_bucket.post_title,sub_bucket);
2036
+
2037
+ if (_.size(sub_bucket.sub_buckets) > 0) {
2038
+ _.each(sub_bucket.sub_buckets,function(item,key){
2039
+ if (!this.check_delete_empty_sub_buckets_recrusive(item)) {
2040
+ // console.error('DELETE key %o', key);
2041
+ delete(sub_bucket.sub_buckets[key]);
2042
+ }
2043
+ },this);
2044
+ // console.groupEnd();
2045
+ return true;
2046
+ } else if (_.size(sub_bucket.sub_buckets) === 0 && _.size(sub_bucket.walkthroughs) === 0 ){
2047
+ // console.groupEnd();
2048
+ return false;
2049
+ }
2050
+ // console.groupEnd();
2051
+ return true;
2052
+ },
2053
+
2054
+ filter_sub_bucket_recursive: function(sub_bucket){
2055
+ console.group('%cfilter_sub_bucket_recursive %s (%o)', 'color: orange',sub_bucket.post_title, sub_bucket);
2056
+
2057
+ if (_.size(sub_bucket.sub_buckets) > 0) {
2058
+ console.log('AAA sub_bucket.sub_buckets %o', sub_bucket.sub_buckets);
2059
+ _.each(sub_bucket.sub_buckets,function(item,key){
2060
+ return this.filter_sub_bucket_recursive(item);
2061
+ },this);
2062
+ } else if (_.size(sub_bucket.walkthroughs)) {
2063
+ console.log('BBB Filter walkthrough %o', sub_bucket.walkthroughs);
2064
+ // Filter walkthrough
2065
+ sub_bucket.walkthroughs.reverse();
2066
+ var key = sub_bucket.walkthroughs.length;
2067
+ while (key--) {
2068
+ var walkthrough = sub_bucket.walkthroughs[key];
2069
+ if (!this.check_walkthrough_compatibility(walkthrough)) {
2070
+ console.error('DELETE sub_bucket.walkthroughs[key] %o', sub_bucket.walkthroughs[key]);
2071
+ sub_bucket.walkthroughs.splice(key, 1);
2072
+ continue;
2073
+ }
2074
+
2075
+ // Check if Hotspot, if so move out
2076
+ if (walkthrough.type == 'hotspot') {
2077
+ _.each(walkthrough.hotspots,function(item){
2078
+ console.info(' HOTSPOT %o', item);
2079
+ var library_filtered_hotspots = this.get('library_filtered_hotspots');
2080
+ library_filtered_hotspots.push({
2081
+ url:item.url,selector:
2082
+ item.selector,id:walkthrough.id
2083
+ });
2084
+ this.set('library_filtered_hotspots',library_filtered_hotspots);
2085
+ },this);
2086
+ console.error('DELETE2 sub_bucket.walkthroughs[key] %o %o', key,sub_bucket.walkthroughs[key]);
2087
+ sub_bucket.walkthroughs.splice(key, 1);
2088
+ continue;
2089
+ }
2090
+ }
2091
+ } else {
2092
+ // Sub_bucket has no walkthroughs
2093
+ console.log('CCC Sub_bucket has no walkthroughs');
2094
+ }
2095
+ console.groupEnd();
2096
+ return false;
2097
+ },
2098
+
2099
+ check_walkthrough_compatibility: function(walkthrough){
2100
+ var main_soft_version = this.get('main_soft_version');
2101
+ var pass_main_soft_version = false, pass_theme_version = false, pass_theme = false, pass_plugin = false, pass_plugin_version = false, pass_user_level = false;
2102
+ var bucket_counts = this.get('bucket_counts');
2103
+ var installed_plugins = this.get('installed_plugins') ;
2104
+
2105
+ // Checking Main Software Version Compatibility
2106
+ if (walkthrough.main_soft_version) {
2107
+ pass_main_soft_version = _.find(walkthrough.main_soft_version,function(val){
2108
+ if (val == main_soft_version)
2109
+ return true;
2110
+ });
2111
+ } else {
2112
+ // If no assigned main_soft_version assume not needed
2113
+ pass_main_soft_version = true;
2114
+ }
2115
+
2116
+
2117
+ if (!pass_main_soft_version){
2118
+ console.error('FAILED %o - SOFT_VER %o != %O',walkthrough.title, main_soft_version,walkthrough.main_soft_version);
2119
+ return false;
2120
+ }
2121
+
2122
+ // Checking Theme Compatibility
2123
+ if (typeof walkthrough.theme !== 'undefined') {
2124
+ if (walkthrough.theme === sk_config.installed_theme) {
2125
+ pass_theme = true;
2126
+ if (walkthrough.theme_version) {
2127
+ pass_theme_version = _.find(walkthrough.theme_version,function(val){
2128
+ if (val == sk_config.theme_version) {
2129
+ return true;
2130
+ }
2131
+ });
2132
+ } else {
2133
+ pass_theme_version = true;
2134
+ }
2135
+ }
2136
+ if (!pass_theme || !pass_theme_version){
2137
+ console.error('FAILED %o - THEME %s (%o) != %s (%o)',walkthrough.title,walkthrough.theme_version, walkthrough.theme, pass_theme, sk_config.theme_version);
2138
+ return false;
2139
+ }
2140
+ }
2141
+
2142
+ // Checking Plugin Compatibility
2143
+ if (typeof walkthrough.plugin !== 'undefined') {
2144
+ if (typeof sk_config.installed_plugins === 'undefined') return false;
2145
+ pass_plugin = _.find(sk_config.installed_plugins,function(plugin_data){
2146
+ for (var plugin in plugin_data) {
2147
+ var version = plugin_data[plugin];
2148
+
2149
+ if (plugin == walkthrough.plugin || _.escape(plugin) == walkthrough.plugin) {
2150
+ pass_plugin = true;
2151
+
2152
+ pass_plugin_version = _.find(walkthrough.plugin_version,function(version2){
2153
+ if (version == version2) {
2154
+ pass_plugin_version = true;
2155
+ return true;
2156
+ }
2157
+ });
2158
+ return true;
2159
+ }
2160
+ break;
2161
+ }
2162
+ });
2163
+
2164
+ if (!pass_plugin) {
2165
+ console.error('FAILED %o (%o) - PLUGIN %s (%o)',walkthrough.title, walkthrough, walkthrough.plugin, sk_config.installed_plugins);
2166
+ return false;
2167
+ }
2168
+ if (!pass_plugin_version){
2169
+ console.error('FAILED %o (%o) - PLUGIN %s VER %s (%o)',walkthrough.title, walkthrough, walkthrough.plugin, walkthrough.plugin_version, sk_config.installed_plugins);
2170
+ return false;
2171
+ }
2172
+ }
2173
+
2174
+ // Checking User Role/Level Compatibility
2175
+ if (walkthrough.role) {
2176
+ pass_user_level = _.find(walkthrough.role,function(val){
2177
+ if (val == sk_config.user_level) {
2178
+ return true;
2179
+ }
2180
+ });
2181
+ } else {
2182
+ // No User Level Defined so assume not needed
2183
+ pass_user_level = true;
2184
+ }
2185
+
2186
+ if (!pass_user_level){
2187
+ console.error('FAILED %o - User Level %s != %s',walkthrough.title, sk_config.user_level, walkthrough.role);
2188
+ return false;
2189
+ }
2190
+
2191
+ var passed_walkthroughs = this.get('passed_walkthroughs');
2192
+ passed_walkthroughs.push(walkthrough.id);
2193
+ this.set('passed_walkthroughs',passed_walkthroughs);
2194
+
2195
+ if (walkthrough.plugin) {
2196
+ console.log('%cPASSED! %o', 'color: #3ab00b',walkthrough.plugin + ': ' + walkthrough.title);
2197
+ } else {
2198
+ console.log('%cPASSED! %o', 'color: #3ab00b',walkthrough.title);
2199
+ }
2200
+
2201
+ return true;
2202
+ },
2203
+
2204
+ check_library: function(){
2205
+ if (!this.get('full_library')) {
2206
+ console.error("WPU Library Not Found!");
2207
+ return false;
2208
+ }
2209
+ if (!this.get('main_soft_version')){
2210
+ console.error("No WP Version Found!");
2211
+ return false;
2212
+ }
2213
+ },
2214
+
2215
+ loaded_walkthrough: function(walkthrough_model){
2216
+ // console.log('WPU:loaded_walkthrough');
2217
+ this.set('last_loaded_walkthrough',walkthrough_model);
2218
+ },
2219
+
2220
+ activate_controls: function(){
2221
+ console.log('activate_controls');
2222
+ $('div#sidekick').addClass('playing');
2223
+ },
2224
+
2225
+ deactivate_controls: function(){
2226
+ $('div#sidekick').removeClass('playing');
2227
+ },
2228
+
2229
+ show_msg: function(data,context){
2230
+ // console.log('show_msg %o',arguments);
2231
+ new SidekickWP.Models.Message({title: data.title, message: data.msg});
2232
+ },
2233
+ getParameterByName: function(name) {
2234
+ name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
2235
+ var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
2236
+ results = regex.exec(location.search);
2237
+ return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
2238
+ }
2239
+ });
2240
+ }(jQuery));;(function($) {
2241
+
2242
+ SidekickWP.Models.BucketContainer = Backbone.Model.extend({
2243
+ defaults: {
2244
+ navigation_history: ['buckets']
2245
+ },
2246
+
2247
+ initialize: function(){
2248
+ this.view = new SidekickWP.Views.BucketContainer({model: this});
2249
+ return this;
2250
+ }
2251
+ });
2252
+
2253
+ }(jQuery));;(function($) {
2254
+
2255
+ SidekickWP.Models.Bucket = Backbone.Model.extend({
2256
+ defaults: {
2257
+ full_library: null
2258
+ },
2259
+
2260
+ initialize: function(){
2261
+ // console.log('initialize bucketModel %o', this.attributes);
2262
+ this.view = new SidekickWP.Views.Bucket({model: this});
2263
+ return this;
2264
+ }
2265
+ });
2266
+
2267
+ }(jQuery));;(function($) {
2268
+
2269
+ SidekickWP.Helpers = ({
2270
+ preventScrolling: function(){
2271
+ $('div#sidekick .bucketContainer>div>ul').on('DOMMouseScroll mousewheel', function(ev) {
2272
+ console.log('asd');
2273
+ var $this = $(this),
2274
+ scrollTop = this.scrollTop,
2275
+ scrollHeight = this.scrollHeight,
2276
+ height = $this.height(),
2277
+ delta = (ev.type == 'DOMMouseScroll' ?
2278
+ ev.originalEvent.detail * -40 :
2279
+ ev.originalEvent.wheelDelta),
2280
+ up = delta > 0;
2281
+
2282
+ var prevent = function() {
2283
+ ev.stopPropagation();
2284
+ ev.preventDefault();
2285
+ ev.returnValue = false;
2286
+ return false;
2287
+ };
2288
+
2289
+ if (!up && -delta > scrollHeight - height - scrollTop) {
2290
+ // Scrolling down, but this will take us past the bottom.
2291
+ $this.scrollTop(scrollHeight);
2292
+ return prevent();
2293
+ } else if (up && delta > scrollTop) {
2294
+ // Scrolling up, but this will take us past the top.
2295
+ $this.scrollTop(0);
2296
+ return prevent();
2297
+ }
2298
+ });
2299
+ }
2300
+ });
2301
+ }(jQuery));
2302
+
2303
+ ;(function($) {
2304
+
2305
+ SidekickWP.Models.Message = Backbone.Model.extend({
2306
+ defaults: {
2307
+ title: null,
2308
+ message: null
2309
+ },
2310
+
2311
+ initialize: function(){
2312
+ this.view = new SidekickWP.Views.Message({model: this, el: $("#sidekick ul.bucketContainer div")});
2313
+ }
2314
+ });
2315
+
2316
+ }(jQuery));;(function($) {
2317
+
2318
+ SidekickWP.Models.Review = Backbone.Model.extend({
2319
+ defaults: {
2320
+ walkthrough_title: null
2321
+ },
2322
+
2323
+ initialize: function(){
2324
+ this.view = new SidekickWP.Views.Review({model: this, el: $("#sidekick .bucketContainer div")});
2325
+ }
2326
+ });
2327
+
2328
+ }(jQuery));;(function($) {
2329
+
2330
+ SidekickWP.Models.Tracking = Backbone.Model.extend({
2331
+ defaults : {
2332
+ gaAccountID : 'UA-39283622-1'
2333
+ },
2334
+
2335
+ initialize: function(){
2336
+ SidekickWP.Events.on('track_open_sidekick_window', this.track_open_sidekick_window, this);
2337
+ SidekickWP.Events.on('track_explore', this.track_explore, this);
2338
+ SidekickWP.Events.on('window_activate', this.window_activate, this);
2339
+ SidekickWP.Events.on('window_deactivate', this.window_deactivate, this);
2340
+ SidekickWP.Events.on('track_error', this.track_error, this);
2341
+
2342
+ window._gaq = window._gaq || [];
2343
+ window._gaq.push(['sidekickWP._setAccount', this.get('gaAccountID')]);
2344
+
2345
+ (function() {
2346
+ var ga_sk = document.createElement('script'); ga_sk.type = 'text/javascript'; ga_sk.async = true;
2347
+ ga_sk.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
2348
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga_sk, s);
2349
+ })();
2350
+ },
2351
+
2352
+ send: function(data){
2353
+ if (typeof sk_config.tracking_off !== 'undefined' && sk_config.tracking_off === true) {
2354
+ console.log("Tracking is off!");
2355
+ return false;
2356
+ }
2357
+
2358
+ model = window.sidekickWP || {};
2359
+
2360
+ data = data || {};
2361
+ data.source = 'plugin';
2362
+ data.action = 'track';
2363
+ data.config = sk_config;
2364
+
2365
+ if (typeof sidekick !== 'undefined' && (typeof sk_config.track_data === 'undefined' || sk_config.track_data === true)) {
2366
+ data.user = sk_config.license_key;
2367
+ }
2368
+
2369
+ var http = 'http';
2370
+ if (window.location.toString().indexOf('https') > -1) {
2371
+ http = 'https';
2372
+ }
2373
+
2374
+ // console.log('WP: send tracking to WPU',data);
2375
+ $.post(http + "://library.sidekick.pro/wp-admin/admin-ajax.php", data);
2376
+ },
2377
+
2378
+ track_explore: function(data){
2379
+ window._gaq.push(['sidekickWP._trackEvent', 'Plugin - Explore', data.what, null, 0,true]);
2380
+ this.send({type: 'explore', label: data.what, data: data.id});
2381
+ },
2382
+
2383
+ track_open_sidekick_window: function(data){
2384
+ window._gaq.push(['sidekickWP._trackEvent', 'Plugin - Window', 'Open', null, 0,true]);
2385
+ this.send({type: 'open'});
2386
+ },
2387
+
2388
+ window_activate: function(data){
2389
+ window._gaq.push(['sidekickWP._trackEvent', 'Plugin - Activate', '', sk_config.wpu_plugin_version, 0,true]);
2390
+ this.send({type: 'activate'});
2391
+ },
2392
+
2393
+ window_deactivate: function(data){
2394
+ window._gaq.push(['sidekickWP._trackEvent', 'Plugin - Deactivate', '', sk_config.wpu_plugin_version, 0,true]);
2395
+ this.send({type: 'deactivate'});
2396
+ },
2397
+
2398
+ track_error: function(data){
2399
+ window._gaq.push(['sidekickWP._trackEvent', 'Plugin', 'Error', data.msg,null,true]);
2400
+ this.send({type: 'error', label: data.msg});
2401
+ }
2402
+
2403
+ });
2404
+
2405
+ }(jQuery));
2406
+
2407
+
2408
+ ;(function($) {
2409
+
2410
+ SidekickWP.Models.User = Backbone.Model.extend({
2411
+ defaults: {
2412
+ view: null,
2413
+ http: 'http'
2414
+ },
2415
+
2416
+ initialize: function(){
2417
+ if (window.location.toString().indexOf('https') > -1) {
2418
+ this.set('http','https');
2419
+ }
2420
+ this.view = new SidekickWP.Views.User({model: this, el: $("#sidekick ul.sk_bucketContainer div")});
2421
+ }
2422
+ });
2423
+
2424
+ }(jQuery));;(function($) {
2425
+ SidekickWP.Views.App = Backbone.View.extend({
2426
+ initialize: function(){
2427
+ SidekickWP.Events.on('toggle_sidekick_drawer', this.toggle_sidekick_drawer, this);
2428
+ SidekickWP.Events.on('close_sidekick_drawer', this.close_sidekick_drawer, this);
2429
+ SidekickWP.Events.on('open_sidekick_drawer', this.open_sidekick_drawer, this);
2430
+ SidekickWP.Events.on('resize_sidekick_drawer', this.resize_sidekick_drawer, this);
2431
+ SidekickWP.Events.on('toggle_hotspots', this.toggle_hotspots, this);
2432
+ SidekickWP.Events.on('toggle_preferences', this.toggle_preferences, this);
2433
+ SidekickWP.Events.on('window_resize', this.check_sidebar_minifiy, this);
2434
+ SidekickWP.Events.on('size_drawer', this.size_drawer, this);
2435
+
2436
+
2437
+ Sidekick.Events.on('track_play', this.check_sidebar_minifiy, this);
2438
+ Sidekick.Events.on('track_play', this.toggle_sidekick_drawer,'hide');
2439
+ Sidekick.Events.on('track_stop', this.open_sidekick_drawer);
2440
+
2441
+ Sidekick.Events.on('track_play', this.remove_hotspots,this);
2442
+ Sidekick.Events.on('track_stop', this.draw_hotspots,this);
2443
+
2444
+ Sidekick.Events.on('nextStep', this.update_debugger);
2445
+
2446
+ return this.render();
2447
+ },
2448
+
2449
+ render: function(){
2450
+ console.groupEnd('%crender: SidekickWP: appView %o', 'color:#8fa2ff', this);
2451
+
2452
+ this.BucketContainer = new SidekickWP.Models.BucketContainer({
2453
+ full_library: this.model.get('full_library')
2454
+ });
2455
+
2456
+ if (_.size(this.model.get('full_library').buckets) > 0) {
2457
+ BucketContainer = this.BucketContainer.view.render().$el.html();
2458
+ } else {
2459
+ 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>';
2460
+ 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);
2461
+ }
2462
+
2463
+ var template = _.template( SidekickWP.Templates.App, {
2464
+ sk_debug: this.model.get('sk_debug'),
2465
+ BucketContainer: BucketContainer,
2466
+ paid_library: this.model.get('paid_library'),
2467
+ hotspots: $.cookie('sidekick_hotspots')
2468
+ });
2469
+ this.$el.append( template );
2470
+
2471
+ if (!this.model.get('show_toggle_feedback'))
2472
+ $('#sk_taskbar #toggle_feedback').hide();
2473
+
2474
+ SidekickWP.Events.trigger('rendered');
2475
+ Sidekick.Events.trigger('bind_controls');
2476
+
2477
+ // this.toggle_sidekick_window();
2478
+ this.draw_hotspots();
2479
+
2480
+ var currentDebugMode = $.cookie('sidekick_debug_mode');
2481
+
2482
+ $(document).bind('keypress.sidekickwp',{context: this}, function(e){
2483
+ console.log('e %o', e);
2484
+ console.log('e.keyCode %o', e.keyCode);
2485
+
2486
+ if ((e.keyCode == 68 || e.charCode == 68) && e.shiftKey === true) { // shift D
2487
+ var currentDebugMode = $.cookie('sidekick_debug_mode');
2488
+
2489
+ if (currentDebugMode){
2490
+ console.log('DEBUG MODE ON');
2491
+ $('.sk_debug').hide();
2492
+ $.cookie('sidekick_debug_mode', 0, { expires: 0, path: '/' });
2493
+ $.cookie('sidekick_active_walkthrough_current_step_DEBUG', null, { expires: 0, path: '/' });
2494
+ } else {
2495
+ console.log('DEBUG MODE OFF');
2496
+ $('.sk_debug').show();
2497
+ $.cookie('sidekick_debug_mode', 1, { expires: 365, path: '/' });
2498
+ }
2499
+ }
2500
+ });
2501
+
2502
+ $('.sk_debug input').bind('keyup.sidekickwp',{context: this}, function(e){
2503
+ if ($.isNumeric($('.sk_debug input').val())) {
2504
+ console.log('Saving Debug Step');
2505
+ $.cookie('sidekick_active_walkthrough_current_step_DEBUG', parseInt($('.sk_debug input').val(),10), { expires: 1, path: '/' });
2506
+ } else {
2507
+ console.log('Clearing Debug Step');
2508
+ $.cookie('sidekick_active_walkthrough_current_step_DEBUG', null, { expires: 0, path: '/' });
2509
+ }
2510
+ });
2511
+
2512
+ if (currentDebugMode) {
2513
+ var activeStepDEBUG = $.cookie('sidekick_active_walkthrough_current_step_DEBUG');
2514
+ if (activeStepDEBUG) {
2515
+ $('.sk_debug input').val(activeStepDEBUG);
2516
+ }
2517
+ $('.sk_debug').show();
2518
+ }
2519
+
2520
+ // if (sk_config.open_bucket) {
2521
+ // SidekickWP.Events.trigger('open_sidekick_drawer');
2522
+ // $('[data-open_bucket="' + sk_config.open_bucket + '"],[data-open_walkthroughs="' + sk_config.open_bucket + '"]').trigger('click');
2523
+ // }
2524
+
2525
+ $(window).resize(_.debounce(function(){
2526
+ SidekickWP.Events.trigger('resize_sidekick_drawer');
2527
+ },500));
2528
+
2529
+ $(window).resize(_.debounce(function(){
2530
+ SidekickWP.Events.trigger('window_resize');
2531
+ },500));
2532
+
2533
+ console.groupEnd();
2534
+ return this;
2535
+ },
2536
+
2537
+ events: {
2538
+ "click #logo,.sk_toggle": "toggle_sidekick_window",
2539
+ "click #toggle_drawer": "toggle_sidekick_drawer",
2540
+ "click #toggle_hotspots": "toggle_hotspots",
2541
+ "click #toggle_preferences": "toggle_preferences",
2542
+ "click #toggle_feedback": "show_feedback",
2543
+ "click #close_sidekick": "close_sidekick_window",
2544
+ "click #sk_upgrade button": "screen_activate"
2545
+ },
2546
+
2547
+ update_debugger: function(){
2548
+
2549
+ $('#sidekick .step_count').html('Current Step: ' + sidekick.walkthroughModel.get('currentStep') + '/' + _.size(sidekick.walkthroughModel.get('steps')));
2550
+ },
2551
+
2552
+ screen_activate: function(){
2553
+ SidekickWP.Events.trigger('screen_activate');
2554
+ },
2555
+
2556
+ check_sidebar_minifiy: function(){
2557
+ var width = $( document ).width();
2558
+ var playing = $('#sidekick').hasClass('playing');
2559
+ if (width < 784 && playing) {
2560
+ $('.sidekick_stop').trigger('click');
2561
+ Sidekick.Events.trigger('show_modal',{error_id:1,msg: 'Sidekick requires a larger window to run properly.'});
2562
+ }
2563
+
2564
+ if ('body.sticky-menu') {
2565
+ $('body').removeClass('sticky-menu');
2566
+ $('body').removeClass('auto-fold');
2567
+ // $('li#collapse-menu').trigger('click');
2568
+ }
2569
+ },
2570
+
2571
+ goto_config: function(){
2572
+ // console.log('goto_config');
2573
+ window.open(sk_config.plugin_url,'_self');
2574
+ },
2575
+
2576
+ show_feedback: function(){
2577
+ // console.log('show_feedback');
2578
+ 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});
2579
+ },
2580
+
2581
+ resize_sidekick_drawer: function(){
2582
+ // console.log('resize_sidekick_drawer %o', $('#sk_drawer').height());
2583
+ // console.log('$(#sidekick).hasClass(open) %o', $('div#sidekick').hasClass('open'));
2584
+
2585
+ if ($('div#sidekick').hasClass('open')) {
2586
+ if ($('#sk_drawer').height() > 0) {
2587
+ SidekickWP.Events.trigger('size_drawer');
2588
+ }
2589
+ } else {
2590
+ $('#sk_drawer').height(0);
2591
+ }
2592
+ },
2593
+
2594
+ toggle_preferences: function(){
2595
+ window.open(sk_config.plugin_url,'_self');
2596
+ },
2597
+
2598
+ toggle_sidekick_drawer: function(force){
2599
+ // console.log('toggle_sidekick_drawer %o | %o | %o', force,$('#sk_drawer').height(),$('div#sidekick').hasClass('open'));
2600
+
2601
+ if ($('#sk_drawer').height() > 0 || force == 'hide' || !$('div#sidekick').hasClass('open')) {
2602
+ // $('.sk_hotspot').hide();
2603
+ SidekickWP.Events.trigger('close_sidekick_drawer');
2604
+ } else {
2605
+ SidekickWP.Events.trigger('open_sidekick_drawer');
2606
+ }
2607
+ },
2608
+
2609
+ close_sidekick_drawer: function(){
2610
+ console.log('Closing Drawer');
2611
+ $('div#sidekick').addClass('drawer_closed').removeClass('drawer_open');
2612
+ $('div#sidekick #toggle_drawer').removeClass('on');
2613
+ $('#sk_drawer .sk_bucketContainer,#sk_drawer').css({
2614
+ height: 0,
2615
+ transition: 'height 0.3s ease-in-out'
2616
+ });
2617
+ },
2618
+
2619
+ open_sidekick_drawer: function(){
2620
+ console.log('Open Drawer');
2621
+
2622
+ $('div#sidekick').addClass('drawer_open').removeClass('drawer_closed');
2623
+ $('.sk_hotspot').show();
2624
+ SidekickWP.Events.trigger('size_drawer');
2625
+ },
2626
+
2627
+ size_drawer: function(){
2628
+ var window_height = $(window).height();
2629
+ var sk_drawer_height = window_height - 80;
2630
+ var sk_bucketContainer_height = sk_drawer_height - 56;
2631
+ if ($('#sk_upgrade').length > 0) {
2632
+ sk_bucketContainer_height -= $('#sk_upgrade').height();
2633
+ }
2634
+ var sub_bucket_height = window_height - 137;
2635
+ var sub_bucket_inner_height = sub_bucket_height - $('#sk_upgrade').height() - 58;
2636
+
2637
+ $('div#sidekick').addClass('open');
2638
+ $('div#sidekick .sk_caption').removeClass('show');
2639
+ $('div#sidekick #toggle_drawer').addClass('on');
2640
+ $('#sk_drawer').css({
2641
+ height: sk_drawer_height,
2642
+ transition: 'height 0.3s ease-in-out'
2643
+ });
2644
+ $('#sk_drawer .sk_bucketContainer').css({
2645
+ height: sk_bucketContainer_height,
2646
+ transition: 'height 0.3s ease-in-out'
2647
+ });
2648
+ $('#sk_drawer .sub_bucket').css({
2649
+ maxHeight: sub_bucket_height,
2650
+ transition: 'all 0.3s ease-in-out'
2651
+ });
2652
+ $('#sk_drawer .sub_bucket_inner').css({
2653
+ height: sub_bucket_inner_height
2654
+ });
2655
+ },
2656
+
2657
+ toggle_sidekick_window: function(e){
2658
+ console.log('toggle_sidekick_window');
2659
+
2660
+ if ($('div#sidekick').hasClass('open')) {
2661
+ // console.log('Closing Sidekick Window');
2662
+ SidekickWP.Events.trigger('close_sidekick_drawer');
2663
+ $('div#sidekick').wait(500).removeClass('open');
2664
+ } else {
2665
+ SidekickWP.Events.trigger('track_explore',{what:'Sidekick - Open'});
2666
+ // console.log('Showing Sidekick Window');
2667
+ $('div#sidekick').addClass('open').wait(500,function(e){
2668
+ SidekickWP.Events.trigger('open_sidekick_drawer');
2669
+ });
2670
+ }
2671
+ },
2672
+
2673
+ close_sidekick_window: function(e){
2674
+ // console.log('close_sidekick_window');
2675
+ if ($('div#sidekick').hasClass('open')) {
2676
+ SidekickWP.Events.trigger('toggle_sidekick_drawer');
2677
+ $('div#sidekick').wait(500).removeClass('open');
2678
+ }
2679
+ },
2680
+
2681
+ toggle_hotspots: function(){
2682
+ console.log('toggle_hotspots');
2683
+ if ($('#toggle_hotspots').hasClass('on')) {
2684
+ // console.log('Turning off hotspots');
2685
+ $('#toggle_hotspots').removeClass('on');
2686
+ $.cookie('sidekick_hotspots', 0, { expires: 365, path: '/' });
2687
+ $('.sk_hotspot').parent().remove();
2688
+ } else {
2689
+ // console.log('Turning on hotspots');
2690
+ $('#toggle_hotspots').addClass('on');
2691
+ $.cookie('sidekick_hotspots', 1, { expires: 365, path: '/' });
2692
+ this.draw_hotspots();
2693
+ }
2694
+ },
2695
+
2696
+ remove_hotspots: function(){
2697
+ // console.log('remove_hotspots');
2698
+
2699
+ this.unbind_hotspot_targets();
2700
+ $('.sk_hotspot').parent().remove();
2701
+ },
2702
+
2703
+ unbind_hotspot_targets: function(){
2704
+ // console.log('unbind_hotspot_targets');
2705
+ var hotspots = this.model.get('library_filtered_hotspots');
2706
+ var url = window.location.toString();
2707
+
2708
+ for(var hotspot in hotspots){
2709
+ hotspot_data = hotspots[hotspot];
2710
+
2711
+ if (url.indexOf(hotspot_data.url) > -1) {
2712
+ selectors = hotspot_data.selector;
2713
+ $(selectors).off('css-change');
2714
+ }
2715
+ }
2716
+ },
2717
+
2718
+ draw_hotspots: function(){
2719
+ var hotspots = this.model.get('library_filtered_hotspots');
2720
+ console.groupCollapsed('Attaching Hotspots [%o]',hotspots.length);
2721
+
2722
+ var url = window.location.toString();
2723
+ var show_hotspots = $.cookie('sidekick_hotspots');
2724
+ var count = 0;
2725
+ var hotspot_data;
2726
+ var hotspot;
2727
+ var selectors;
2728
+
2729
+ console.log('show_hotspots %o', show_hotspots);
2730
+ console.log('show_hotspots === true %o', show_hotspots === true);
2731
+
2732
+ // Counting Hotspots
2733
+ for(hotspot in hotspots){
2734
+ hotspot_data = hotspots[hotspot];
2735
+
2736
+ if (url.indexOf(hotspot_data.url) > -1) {
2737
+ selectors = hotspot_data.selector;
2738
+
2739
+ if ($(selectors).length == 1 && $(selectors).is(':visible')) {
2740
+ console.log('hotspot selectors-1 %o', selectors);
2741
+ count++;
2742
+ } else if ($(selectors).length > 1){
2743
+ _.each($(selectors),function(item,key){
2744
+ if ($(item).length && $(item).is(':visible')) {
2745
+ console.log('hotspot selectors-2 %o', item);
2746
+ count++;
2747
+ }
2748
+ });
2749
+ }
2750
+ }
2751
+ }
2752
+
2753
+ if (count > 0) {
2754
+ $('div#sidekick #toggle_hotspots').html(count).show();
2755
+ } else {
2756
+ $('div#sidekick #toggle_hotspots').html(count).hide();
2757
+ }
2758
+
2759
+ if (show_hotspots === '1' || typeof show_hotspots === 'undefined') { // User unspecified default is on
2760
+
2761
+ for(hotspot in hotspots){
2762
+
2763
+ var selector_x = 'left';
2764
+ var selector_y = 'top';
2765
+ var hotspot_x = 'right';
2766
+ var hotspot_y = 'top';
2767
+ var hotspot_y_padding = '+0';
2768
+ var hotspot_x_padding = '+0';
2769
+
2770
+ hotspot_data = hotspots[hotspot];
2771
+
2772
+ if (url.indexOf(hotspot_data.url) > -1) {
2773
+ selectors = hotspot_data.selector;
2774
+ if ($(selectors).length == 1) {
2775
+
2776
+ var offset = $(selectors).offset();
2777
+
2778
+ // selectors = '.add-new-h2';
2779
+ $('body').append('<a href="javascript: sidekick.play(' + hotspot_data.id + ')"><div class="sk_hotspot sk_hotspot_' + hotspot + '" data-target="' + selectors + '"></div></a>');
2780
+
2781
+ console.log('%cAttaching Single Hotspot %o[%O] -> (%o [%O])','color: #64c541','sk_hotspot_' + hotspot,$('.sk_hotspot_' + hotspot), selectors,$(selectors));
2782
+
2783
+ console.log('at: selector_x + " " + selector_y %o', selector_x + " " + selector_y);
2784
+ console.log('my: hotspot_x + hotspot_x_padding + " " + hotspot_y + hotspot_y_padding %o', hotspot_x + hotspot_x_padding + " " + hotspot_y + hotspot_y_padding);
2785
+
2786
+ $('.sk_hotspot_' + hotspot).position({
2787
+ at: selector_x + " " + selector_y,
2788
+ my: hotspot_x + hotspot_x_padding + " " + hotspot_y + hotspot_y_padding,
2789
+ of: $(selectors)
2790
+ }).css({zIndex: $(selectors).css('zIndex')});
2791
+
2792
+ $(selectors).data('sk_hotspot','.sk_hotspot_' + hotspot);
2793
+
2794
+ $(selectors).csswatch({
2795
+ props: 'top,left',
2796
+ props_functions: {"top":"offset().top", "left":"offset().left"}
2797
+ });
2798
+
2799
+ console.log('selectors %o', selectors);
2800
+
2801
+
2802
+ $(selectors).on("css-change", function(event, change){
2803
+ console.log('css-change',arguments);
2804
+ console.log('this %o', this);
2805
 
2806
+ var selector_x = 'left';
2807
+ var selector_y = 'top';
2808
+ var hotspot_x = 'right';
2809
+ var hotspot_y = 'top';
2810
+ var hotspot_y_padding = '+0';
2811
+ var hotspot_x_padding = '+0';
2812
+
2813
+
2814
+ $($(this).data('sk_hotspot')).position({
2815
+ at: selector_x + " " + selector_y,
2816
+ my: hotspot_x + hotspot_x_padding + " " + hotspot_y + hotspot_y_padding,
2817
+ of: this
2818
+ });
2819
+ });
2820
+
2821
+ $('.sk_hotspot').wait(20*count).addClass('visible');
2822
+ } else if ($(selectors).length > 1){
2823
+ console.log('selectors %o', selectors);
2824
+
2825
+ _.each($(selectors),function(item,key){
2826
+ $('body').append('<a href="javascript: sidekick.play(' + hotspot_data.id + ')"><div class="sk_hotspot sk_hotspot_' + hotspot + '_' + key + '" data-target="' + item + '"></div></a>');
2827
+ // console.log('%cAttaching Hotspot #o %o (%o)','color: #64c541',key,'sk_hotspot_' + hotspot + '_' + key, $('.sk_hotspot_' + hotspot + '_' + key));
2828
+
2829
+ $('.sk_hotspot_' + hotspot + '_' + key).position({
2830
+ at: selector_x + " " + selector_y,
2831
+ my: hotspot_x + hotspot_x_padding + " " + hotspot_y + hotspot_y_padding,
2832
+ of: item
2833
+ }).css({zIndex: $(item).css('zIndex')});
2834
+
2835
+ $('.sk_hotspot').wait(20*count).addClass('visible');
2836
+ });
2837
+ } else {
2838
+ console.log("%cCouldn't attach a hotspot to selector (" + selectors + ")",'color: red');
2839
+ // Sidekick.Events.trigger('track_error',{model: this, msg: msg});
2840
+ // console.error(msg + ' %o',hotspot_data);
2841
+ }
2842
+ }
2843
+ }
2844
+ };
2845
+ console.groupEnd();
2846
+ }
2847
+ });
2848
+
2849
+ }(jQuery));
2850
+
2851
+
2852
+
2853
+ ;(function($) {
2854
+ SidekickWP.Views.BucketContainer = Backbone.View.extend({
2855
+
2856
+ initialize: function(models,options){
2857
+ SidekickWP.Events.on('rendered', this.setup_events, this);
2858
+ return this;
2859
+ },
2860
+
2861
+ render: function(){
2862
+ // console.group('%crender: render: bucketContainerView %o', 'color:#8fa2ff', this);
2863
+
2864
+ this.bucket = new SidekickWP.Models.Bucket({
2865
+ title: this.model.get('title'),
2866
+ full_library: this.model.get('full_library')
2867
+ });
2868
+ this.$el.append(this.bucket.view.render().el);
2869
+ // console.groupEnd();
2870
+ return this;
2871
+ },
2872
+
2873
+ clicked_bucket: function(e){
2874
+ // console.log('clicked_bucket',e);
2875
+
2876
+
2877
+ var navigation_history = this.model.get('navigation_history');
2878
+ $('#sk_drawer>h2 span').html('Walkthroughs');
2879
+
2880
+ if ($(e).hasClass('goprev')) {
2881
+ // console.log('Go Back');
2882
+ $('.show').removeClass('show').wait(2000).parent().remove();
2883
+ navigation_history.pop();
2884
+ var goto_bucket = navigation_history[navigation_history.length-1];
2885
+ if (goto_bucket == 'buckets') {
2886
+ $('[data-bucket_id="' + goto_bucket + '"]').removeClass('hide').addClass('show');
2887
+ } else {
2888
+ $('ul.sub_bucket[data-bucket_id="' + goto_bucket + '"]').removeClass('hide').addClass('show');
2889
+ }
2890
+
2891
+ } else if ($(e).data('open_bucket')){
2892
+ // console.log('Showing Bucket %o',$(e).data('open_bucket'));
2893
+ // console.log('$(e).closest(.show) %o', $(e).closest('.show'));
2894
+
2895
+ SidekickWP.Events.trigger('track_explore',{what:'Bucket - ' + $('span',e).html(), id: $(e).data('open_bucket') });
2896
+
2897
+ $(e).closest('.show').removeClass('show').addClass('hide');
2898
+
2899
+
2900
+ this.draw_bucket($(e).data('open_bucket'));
2901
+
2902
+
2903
+ SidekickWP.Events.trigger('resize_sidekick_drawer');
2904
+
2905
+
2906
+ $('ul.sub_bucket[data-bucket_id="' + $(e).data('open_bucket') + '"]').wait(10).addClass('show');
2907
+
2908
+ navigation_history.push($(e).data('open_bucket'));
2909
+ } else {
2910
+ // console.log('Showing Walkthroughs %o',$(e).data('open_walkthroughs'));
2911
+ // console.log('$(e).parent() %o', $(e).parent());
2912
+
2913
+ SidekickWP.Events.trigger('track_explore',{what:'Bucket - ' + $('span',e).html(), id: $(e).data('open_walkthroughs') });
2914
+
2915
+ $('#sk_drawer>h2 span').html('How Do I...');
2916
+
2917
+ $(e).closest('.show').removeClass('show').addClass('hide');
2918
+
2919
+ this.draw_walkthroughs($(e).data('open_walkthroughs'));
2920
+ $('ul.walkthrough[data-bucket_id="' + $(e).data('open_walkthroughs') + '"]').wait(10).addClass('show');
2921
+
2922
+ navigation_history.push($(e).data('open_bucket'));
2923
+ }
2924
+ this.setup_events();
2925
+ this.model.set('navigation_history',navigation_history);
2926
+ },
2927
+
2928
+ find_bucket_by_id: function(data,key,match){
2929
+ if (data[key] == match) {
2930
+ // console.log('%cfound %o','color: green',data);
2931
+ return data;
2932
+ }
2933
+
2934
+ if (_.size(data.sub_buckets) > 0 ) {
2935
+ for (var sub_bucket in data.sub_buckets){
2936
+ var found = this.find_bucket_by_id(data.sub_buckets[sub_bucket],key,match);
2937
+ if (found) {
2938
+ return found;
2939
+ }
2940
+ }
2941
+ } else {
2942
+ // console.log('%cnot found','color: red');
2943
+ return;
2944
+ }
2945
+ },
2946
+
2947
+ find_bucket_by_id_rec: function(data,key,match){
2948
+ for (var sub_bucket in data){
2949
+ var result = this.find_bucket_by_id(data[sub_bucket],key,match);
2950
+ if (result) {
2951
+ return result;
2952
+ }
2953
+ }
2954
+ return false;
2955
+ },
2956
+
2957
+ draw_bucket: function(bucket_id){
2958
+ // console.info('draw_bucket %o', bucket_id);
2959
+ var full_library = this.model.get('full_library');
2960
+ var bucket_data = this.find_bucket_by_id_rec(full_library.buckets,'id',bucket_id);
2961
+
2962
+ var variables = {
2963
+ bucket_id: bucket_id,
2964
+ bucket_title: bucket_data.post_title,
2965
+ bucket_data: bucket_data,
2966
+ full_library: full_library
2967
+ };
2968
+
2969
+ var template = _.template( SidekickWP.Templates.SubBucket, variables );
2970
+
2971
+ // console.log('draw_bucket variables %o', variables);
2972
+ // console.log('template %o', template);
2973
+
2974
+ $('.sk_bucketContainer>div').append(template);
2975
+ },
2976
+
2977
+ draw_walkthroughs: function(bucket_id){
2978
+ // console.log('draw_walkthroughs %o', bucket_id);
2979
+
2980
+ var full_library = this.model.get('full_library');
2981
+ var bucket_data = this.find_bucket_by_id_rec(full_library.buckets,'id',bucket_id);
2982
+
2983
+ var variables = {
2984
+ bucket_id: bucket_id,
2985
+ bucket_data: bucket_data,
2986
+ full_library: full_library
2987
+ };
2988
+
2989
+ var template = _.template( SidekickWP.Templates.Walkthroughs, variables );
2990
+ // console.log('template %o', template);
2991
+
2992
+ $('.sk_bucketContainer>div').append(template);
2993
+ },
2994
+
2995
+ setup_events: function(){
2996
+ $('.heading').unbind('click').click({context:this},function(e){
2997
+ e.data.context.clicked_bucket(this);
2998
+ });
2999
+
3000
+ $('a.sidekick_play_walkthrough').unbind('click').click({context:this},function(e){
3001
+ SidekickWP.Events.trigger('close_sidekick_window');
3002
+ });
3003
+ // SidekickWP.Helpers.preventScrolling();
3004
+ }
3005
+ });
3006
+
3007
+ }(jQuery));
3008
+
3009
+ ;(function($) {
3010
+ SidekickWP.Views.Bucket = Backbone.View.extend({
3011
+
3012
+ initialize: function(models,options){
3013
+ return this;
3014
+ },
3015
+
3016
+ render: function(){
3017
+ // console.group('%crender: render: bucketView %o', 'color:#8fa2ff', this);
3018
+
3019
+ var variables = {
3020
+ full_library: this.model.get('full_library')
3021
+ };
3022
+
3023
+ console.log('SidekickWP.Templates.Bucket variables %o', variables);
3024
+
3025
+ var template = _.template( SidekickWP.Templates.Bucket, variables );
3026
+ this.$el.append(template);
3027
+ // console.groupEnd();
3028
+ return this;
3029
+ }
3030
+ });
3031
+
3032
+ }(jQuery));;(function($) {
3033
+ SidekickWP.Views.Message = Backbone.View.extend({
3034
+
3035
+ initialize: function(models,options){
3036
+ console.group('%crender: render: messageView %o', 'color:#8fa2ff', this);
3037
+ this.render();
3038
+ console.groupEnd();
3039
+ return this;
3040
+ },
3041
+
3042
+ render: function(){
3043
+
3044
+ var variables = {
3045
+ title: this.model.get('title'),
3046
+ message: this.model.get('message')
3047
+ };
3048
+
3049
+ var template = _.template( SidekickWP.Templates.Message, variables );
3050
+
3051
+ this.$el.append( template );
3052
+ // SidekickWP.Helpers.preventScrolling();
3053
+ // SidekickWP.Events.trigger('show_next_pane');
3054
+
3055
+ // $('div#sidekick .prev_window').removeClass('prev_window');
3056
+ // $('div#sidekick #main_menu').addClass('prev_window');
3057
+ // $('div#sidekick ul.main>li').not('#main_menu,#review').remove();
3058
+
3059
+ return this;
3060
+ }
3061
+
3062
+ });
3063
+
3064
+ }(jQuery));;(function($) {
3065
+ SidekickWP.Views.Review = Backbone.View.extend({
3066
+
3067
+ initialize: function(models,options){
3068
+ console.group('%cinitialize: Core View %o', 'color:#3b4580', arguments);
3069
+ this.render();
3070
+ this.setup_events();
3071
+ console.groupEnd();
3072
+ return this;
3073
+ },
3074
+
3075
+ render: function(){
3076
+ console.group('%crender: render: renderView %o', 'color:#8fa2ff', this);
3077
+ console.log('SidekickWP.Templates.Review %o', SidekickWP.Templates.Review);
3078
+
3079
+ var variables = {
3080
+ title: 'How did we do?'
3081
+ };
3082
+
3083
+ var template = _.template( SidekickWP.Templates.Review, variables );
3084
+ console.log('template %o', template);
3085
+
3086
+ this.$el.append( template );
3087
+ // SidekickWP.Helpers.preventScrolling();
3088
+ // SidekickWP.Events.trigger('show_next_pane');
3089
+
3090
+ // $('div#sidekick .prev_window').removeClass('prev_window');
3091
+ // $('div#sidekick #main_menu').addClass('prev_window');
3092
+ // $('div#sidekick ul.main>li').not('#main_menu,#review').remove();
3093
+
3094
+ return this;
3095
+ },
3096
+
3097
+ events: {
3098
+ "click input[type='submit']": "submit",
3099
+ "click div.rate span": "rate"
3100
+ },
3101
+
3102
+ setup_events: function(){
3103
+ var group_id = this.model.get('id');
3104
+
3105
+ $('div#sidekick .review h2 button.goback, #sidekick .review input[type="button"]').unbind('click').click({context:this},function(e){
3106
+ console.log('click goback/button');
3107
+ SidekickWP.Events.trigger('show_main_pane');
3108
+ });
3109
+
3110
+ $('div#sidekick .review .rate span').unbind('hover').hover(function(){
3111
+ $(this).addClass('hover')
3112
+ .prevAll().addClass('hover');
3113
+ },function(){
3114
+ $('div#sidekick .review .rate span').removeClass('hover');
3115
+ });
3116
+
3117
+ $('div#sidekick .review .rate span').unbind('click').click = this.rate;
3118
+
3119
+ $('div#sidekick .review textarea').unbind('click').click(function(){
3120
+ if(!$(this).hasClass('clicked')){
3121
+ $(this).addClass('clicked')
3122
+ .val('');
3123
+ }
3124
+ });
3125
+ },
3126
+
3127
+ submit: function(){
3128
+ var data = {
3129
+ walkthrough_title: this.model.get('walkthrough_title'),
3130
+ value: $('div#sidekick textarea[name="comment"]').val(),
3131
+ license: sk_config.license_key
3132
+ };
3133
+
3134
+ var http = 'http';
3135
+ if (window.location.toString().indexOf('https') > -1) {
3136
+ http = 'https';
3137
+ }
3138
+
3139
+ $.ajax({
3140
+ url: http + '://library.sidekick.pro/wp-admin/admin-ajax.php?action=wpu_add_comment',
3141
+ context: this,
3142
+ data: data,
3143
+ dataType: 'json'
3144
+ }).done(function(data,e){
3145
+ console.log('Saved Comment');
3146
+ $('div#sidekick textarea').html('Thank You!');
3147
+ $('div#sidekick .review input[type="submit"]').val('Sent!');
3148
+ setTimeout(SidekickWP.Events.trigger('show_main_pane'),3000);
3149
+ }).error(function(e){
3150
+ console.error('Comment Save error (%o)',e);
3151
+ });
3152
+ },
3153
+
3154
+ rate: function(e){
3155
+ var data = {
3156
+ walkthrough_title: this.model.get('walkthrough_title'),
3157
+ rating: $(e.currentTarget).data('val'),
3158
+ license: sk_config.license_key
3159
+ };
3160
+
3161
+ $(e.currentTarget).addClass('saved')
3162
+ .prevAll().addClass('saved');
3163
+
3164
+ $('div#sidekick .rate span').unbind('mouseenter mouseleave click').css({cursor: 'default'});
3165
+
3166
+ var http = 'http';
3167
+ if (window.location.toString().indexOf('https') > -1) {
3168
+ http = 'https';
3169
+ }
3170
+
3171
+ $.ajax({
3172
+ url: http + '://library.sidekick.pro/wp-admin/admin-ajax.php?action=wpu_add_rating',
3173
+ context: this,
3174
+ data: data,
3175
+ dataType: 'json'
3176
+ }).done(function(data,e){
3177
+ console.log('Saved Rating');
3178
+ $('div#sidekick .hover').addClass('saved');
3179
+
3180
+ }).error(function(e){
3181
+ console.error('Rating Save error (%o)',e);
3182
+ });
3183
+
3184
+ }
3185
+
3186
+ });
3187
+
3188
+ }(jQuery));;_.templateSettings.interpolate = /\{\{(.*?)\}\}/;
3189
+
3190
+ SidekickWP.Templates.App = [
3191
+ "<div id='sidekick' class='sidekick_player'>",
3192
+ "<div id='sk_taskbar'>",
3193
+ "<div id='logo'></div>",
3194
+ "<button class='sk_toggle'></button>",
3195
+ "<div class='sk_controls'>",
3196
+ "<button class='sidekick_restart'></button>",
3197
+ "<button class='sidekick_play_pause'></button>",
3198
+ "<button class='sidekick_stop'></button>",
3199
+ "</div>",
3200
+ "<div class='sk_debug'>",
3201
+ "<div class='step_count'></div>",
3202
+ "<input type='text' name='step' placeholder='Force Step'></input>",
3203
+ "<div class=''>Skip Step <br/>Press ></div>",
3204
+ "</div>",
3205
+ "<div class='sk_toggles'>",
3206
+ // "<% console.log('hotspots %o',hotspots);%>",
3207
+ "<button id='toggle_hotspots' <% if (hotspots === '1' || typeof hotspots === 'undefined'){%>class='on'<% } %> alt='Number of hotspots'>0</button>",
3208
+ "<button id='toggle_feedback'></button>",
3209
+ "<button id='toggle_preferences'></button>",
3210
+ "<button id='toggle_drawer'><i></i></button>",
3211
+ "</div>",
3212
+ "<div class='sk_info'>",
3213
+ "<div class='sk_title'><label>Now Playing</label><span class='sk_walkthrough_title'></span></div>",
3214
+ "<div class='sk_time'>0:00/0:00</div>",
3215
+ "</div>",
3216
+ "<div class='sk_caption'>",
3217
+ "<div class='text'></div>",
3218
+ "</div>",
3219
+ "</div>",
3220
+ "<div id='sk_drawer'>",
3221
+ "<h2><span>Walkthroughs</span><button id='close_sidekick'></button></h2>",
3222
+ "<ul class='sk_bucketContainer'>",
3223
+ "<% print(BucketContainer) %>",
3224
+ "<% if(typeof paid_library === 'undefined' || paid_library == null || _.size(paid_library.buckets) == 0){ %>",
3225
+ "<ul id='sk_upgrade'><li><button>Upgrade SIDEKICK!</button></li></ul>",
3226
+ "<% } %>",
3227
+ "</ul>",
3228
+ "</div>",
3229
+ "</div>"
3230
+ ].join("");
3231
+
3232
+ SidekickWP.Templates.Bucket = [
3233
+ "<ul class='buckets' data-bucket_id='buckets'>",
3234
+ "<% _.each(full_library.buckets, function(bucket_data, bucket_title){ %>",
3235
+ "<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>",
3236
+ "<% }); %>",
3237
+ "</ul>"
3238
+ ].join("");
3239
+
3240
+ SidekickWP.Templates.SubBucket = [
3241
+ "<ul class='sub_buckets'>",
3242
+ "<ul class='sub_bucket' data-bucket_id='<% print(bucket_id) %>'>",
3243
+ "<li class='heading goprev'><span><% print(bucket_title) %></span><i></i></li>",
3244
+ "<ul class='sub_bucket_inner'>",
3245
+ "<% for (sub_bucket_data in bucket_data.sub_buckets){ %>",
3246
+ "<% sub_bucket_data = bucket_data.sub_buckets[sub_bucket_data] %>",
3247
+ "<% if (_.size(sub_bucket_data.sub_buckets) > 0){ %>",
3248
+ "<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>",
3249
+ "<% } else { %>",
3250
+ "<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>",
3251
+ "<% } %>",
3252
+ "<% }; %>",
3253
+ "</ul>",
3254
+ "</ul>",
3255
+ "</ul>"
3256
+ ].join("");
3257
+
3258
+ SidekickWP.Templates.User = [
3259
+ "<% if (view == 'login') { %>",
3260
+ "<ul class='user login'>",
3261
+ "<li class='heading goprev'><span>Account</span><i></i></li>",
3262
+ "<li>",
3263
+ "<form id='login' action='<% print(http) %>://library.sidekick.pro/api/user/' method='GET'>",
3264
+ "<div>",
3265
+ "<label>E-Mail</label><input type='text' name='user_email'/>",
3266
+ "<label>Password</label><input type='password' name='password'/>",
3267
+ "<a target='_blank' href='/wp-login.php?action=lostpassword'>Forgot Password</a>",
3268
+ "<div id='buttons'>",
3269
+ "<input type='submit' value='Login'/>",
3270
+ "<input type='button' value='Register'/>",
3271
+ "</div>",
3272
+ "</div>",
3273
+ "</form>",
3274
+ "</li>",
3275
+ "</ul>",
3276
+ "<% } else if(view == 'activate') { %>",
3277
+ "<ul class='user activate'>",
3278
+ "<li class='heading goprev'><span>Activate</span><i></i></li>",
3279
+ "<li>",
3280
+ // "<form action='<% print(http) %>://library.sidekick.pro/api/user/' method='POST'>",
3281
+ "<div id='content'>",
3282
+ "<div class='padder'>",
3283
+ "<h3>SIDEKICK premium get's you all core walkthroughs</h3>",
3284
+ "<a href='<% print(http) %>://www.sidekick.pro/wordpress/modules/wordpress-core-module-premium/' target='_blank'><button>BUY<span>$10 Per Month</span></button></a>",
3285
+ // "<div>OR</div>",
3286
+ "<br/><label>Enter Activation ID</label><input placeholder='<% print(activation_id) %>' type='text' name='activation_id'/>",
3287
+ "<div id='buttons'>",
3288
+ "<input type='submit' name='Activate' value='Activate' />",
3289
+ "<input type='button' name='Cancel' value='Cancel' />",
3290
+ "</div>",
3291
+ "</div>",
3292
+ "<div id='benefits'>",
3293
+ "<h3>Benefits of premium</h3>",
3294
+ "<ul>",
3295
+ "<li id='more'>",
3296
+ "<h4>More Walkthroughs</h4><p>Get our full WordPress Core library of over 150 walkthroughs.</p>",
3297
+ "</li>",
3298
+ "<li id='types'>",
3299
+ "<h4>Hotspots & Overviews</h4><p>Gain in depth knowledge and quick hints.</p>",
3300
+ "</li>",
3301
+ "</ul>",
3302
+ "</div>",
3303
+ "</div>",
3304
+ // "</form>",
3305
+ "</li>",
3306
+ "</ul>",
3307
+ "<% } else if(view == 'register') { %>",
3308
+ "<ul class='user register'>",
3309
+ "<li class='heading goprev'><span>Register</span><i></i></li>",
3310
+ "<li>",
3311
+ "<form action='<% print(http) %>://library.sidekick.pro/api/user/' method='POST'>",
3312
+ "<label>First Name</label><input type='text' name='first_name'/>",
3313
+ "<label>E-Mail</label><input type='text' name='user_email'/>",
3314
+ "<label>Password</label><input type='password' name='password'/>",
3315
+ "<label>Confirm Password</label><input type='password' name='password2'/>",
3316
+ "<label>Coupon</label><input type='text' name='coupon'/>",
3317
+ "<input type='button' name='Cancel'/>",
3318
+ "<input type='submit' name='Register'/>",
3319
+ "</form>",
3320
+ "</li>",
3321
+ "</ul>",
3322
+ "<% } else if(view == 'profile') { %>",
3323
+ "<ul class='user profile'>",
3324
+ "<li class='heading goprev'><span>Profile</span><i></i></li>",
3325
+ "<li>",
3326
+ "<form action=''>",
3327
+ "<label>Coupon</label><input type='text' name='coupon'/>",
3328
+ "<input type='button' name='Cancel'/>",
3329
+ "<input type='submit' name='Register'/>",
3330
+ "</form>",
3331
+ "</li>",
3332
+ "</ul>",
3333
+ "<% } %>"
3334
+ ].join("");
3335
+
3336
+ SidekickWP.Templates.Walkthroughs = [
3337
+ "<ul class='walkthroughs'>",
3338
+ "<ul class='walkthrough' data-bucket_id='<% print(bucket_id) %>'>",
3339
+ "<li class='heading goprev'><span><% print(bucket_data.post_title) %></span><i></i></li>",
3340
+ "<ul class='walkthroughs_inner' data-bucket_id='<% print(bucket_id) %>'>",
3341
+ "<% console.log('bucket_data %',bucket_data); %>",
3342
+ "<% var first_drawn = false; %>",
3343
+ "<% _.each(bucket_data.walkthroughs, function(walkthrough, walkthrough_key){ %>",
3344
+ "<% if (walkthrough.type == 'overview'){ %>",
3345
+ "<% if (!first_drawn){ %>",
3346
+ "<% if (_.size(bucket_data.walkthroughs) > 1){ %>",
3347
+ "<li class='sub_heading'><span>Overviews</span></li>",
3348
+ "<% } else{ %>",
3349
+ "<li class='sub_heading'><span>Overview</span></li>",
3350
+ "<% } %>",
3351
+ "<% first_drawn = true %>",
3352
+ "<% } %>",
3353
+ "<a href='javascript: sidekick.play(<% print(walkthrough.id) %>)'><li class='overview'><% print(walkthrough.title) %></li></a>",
3354
+ "<% } %>",
3355
+ "<% }); %>",
3356
+ "<% var first_drawn = false; %>",
3357
+ "<% _.each(bucket_data.walkthroughs, function(walkthrough, walkthrough_key){ %>",
3358
+ "<% if (walkthrough.type == 'how'){ %>",
3359
+ "<% if (!first_drawn){ %>",
3360
+ "<% if (_.size(bucket_data.walkthroughs) > 1){ %>",
3361
+ "<li class='sub_heading'><span>How-Tos</span></li>",
3362
+ "<% } else{ %>",
3363
+ "<li class='sub_heading'><span>How-To</span></li>",
3364
+ "<% } %>",
3365
+ "<% first_drawn = true %>",
3366
+ "<% } %>",
3367
+ "<a href='javascript: sidekick.play(<% print(walkthrough.id) %>)'><li class='how'><% print(walkthrough.title) %></li></a>",
3368
+ "<% } %>",
3369
+ "<% }); %>",
3370
+ "</ul>",
3371
+ "</ul>",
3372
+ "</ul>"
3373
+ ].join("");
3374
+
3375
+ SidekickWP.Templates.Review = [
3376
+ "<ul class='new_window review' data-title='<% print(title) %>'>",
3377
+ "<li>",
3378
+ "<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>",
3379
+ "<textarea name='comment'>Let us know if you found the Walkthrough helpful or if we can improve something.</textarea>",
3380
+ "<br/><input type='button' value='Skip'></input><input type='submit' value='Submit'></input>",
3381
+ "</li>",
3382
+ "</ul>"
3383
+ ].join("");
3384
+
3385
+
3386
+ SidekickWP.Templates.Message = [
3387
+ "<ul class='new_window message' data-title='<% print(title) %>'>",
3388
+ "<li>",
3389
+ "<div><% print(message) %></div>",
3390
+ "</li>",
3391
+ "</ul>"
3392
+ ].join("");
3393
+
3394
+ ;(function($) {
3395
+ SidekickWP.Views.User = Backbone.View.extend({
3396
+
3397
+ initialize: function(models,options){
3398
+ console.group('%cinitialize: User View %o', 'color:#3b4580', arguments);
3399
+ this.render();
3400
+ this.setup_events();
3401
+ console.groupEnd();
3402
+ return this;
3403
+ },
3404
+
3405
+ render: function(){
3406
+ console.group('%crender: User View %o', 'color:#8fa2ff', this);
3407
+
3408
+ var template = _.template( SidekickWP.Templates.User, this.model.attributes );
3409
+ console.log('this.$el %o', this.$el);
3410
+ console.log('template %o', template);
3411
+
3412
+ $('> *',this.$el).addClass('hide');
3413
+
3414
+ this.$el.append( template );
3415
+ return this;
3416
+ },
3417
+
3418
+ events: {
3419
+ },
3420
+
3421
+ close_profile: function(){
3422
+ $('ul.sk_bucketContainer ul.user').addClass('hide').wait(1000).remove();
3423
+ $('ul.sk_bucketContainer ul.buckets').removeClass('hide');
3424
+ },
3425
+
3426
+ setup_events: function(){
3427
+ // this.setup_login();
3428
+
3429
+ $('.heading',$('ul.sk_bucketContainer ul.user')).unbind('click').click({context:this},function(e){
3430
+ e.data.context.close_profile(this);
3431
+ });
3432
+
3433
+ $('#sidekick ul.activate input[name="Cancel"]').unbind('click').click({context:this},function(e){
3434
+ console.log('click');
3435
+ e.data.context.close_profile(this);
3436
+ });
3437
+
3438
+ $('#sidekick ul.activate input[type="submit"]').click(function(){
3439
+ var input = $('ul.activate input[name="activation_id"]');
3440
+
3441
+ if ($(input).val() === '') {
3442
+ $(input).addClass('error');
3443
+ } else {
3444
+ $.post(ajaxurl, {action: 'sk_activate', activation_id: $(input).val()}, function(e){
3445
+ console.log('%cBack %o','background-color: yellow; color: black;',e);
3446
+ if (e.error == 404) {
3447
+ $(input).addClass('error').val("Activation ID Not Valid");
3448
+ } else if (e.success) {
3449
+ $(input).addClass('success').val("Successful... loading...");
3450
+ location.reload();
3451
+ }
3452
+ },'json');
3453
+ }
3454
+ });
3455
+ }
3456
+
3457
+ // setup_login: function(){
3458
+ // $('#sidekick .login form').data('view',this);
3459
+ // $('#sidekick .login form').submit(function(e){
3460
+ // e.preventDefault();
3461
+
3462
+ // var request = $.ajax({
3463
+ // // url: "http://library.sidekick.pro/api/login/",
3464
+ // url: "http://local.library.sidekick.pro/api/login/",
3465
+ // data: {
3466
+ // 'user_email' : $('#sidekick .login form input[name="user_email"]').val(),
3467
+ // 'password' : $('#sidekick .login form input[name="password"]').val()
3468
+ // },
3469
+ // dataType: "jsonp",
3470
+ // context: { view: $(this).data('view')}
3471
+ // },this).done(function(e){
3472
+ // this.view.login_callback(e,this.view);
3473
+ // });
3474
+ // });
3475
+ // },
3476
+
3477
+ // login_callback: function(result,view){
3478
+ // console.log('%clogin_callback','color: white;background-color: green');
3479
+ // console.log('result %o', result);
3480
+ // if (result.token) {
3481
+ // $.cookie('sk_token', result.token);
3482
+ // new SidekickWP.Models.User({
3483
+ // 'view' : 'activate'
3484
+ // });
3485
+ // }
3486
+ // }
3487
+ });
3488
+ }(jQuery));;
3489
+ jQuery(document).ready(function($) {
3490
+ window.sidekickWP = new SidekickWP.Models.App({
3491
+ show_toggle_feedback: true
3492
+ });
3493
+ // console.log('window.sidekickWP %o', window.sidekickWP);
3494
+ // jQuery('#logo').trigger('click');
3495
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -1,39 +1,74 @@
1
  === Sidekick ===
2
- Contributors: raptor235,Ben Fox
3
  Donate link: http://www.sidekick.pro
4
- Tags: help, tutorial, training, learn, learning, sidekick, interactive help, teach, video, manual, videos, wphelp, support, instructions, question, questions, answers, answer, clippy, q&a, chat, wpuniversity, helper, walkthrough,
5
- Requires at least: 3.7.1
6
- Tested up to: 3.8
7
- Stable tag: 1.1
8
  License: GNU Version 2 or Any Later Version
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- Interactive help, support & training right inside your Dashboard.
12
-
13
 
14
  == Description ==
15
 
16
- **SIDEKICK**
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
- The Sidekick Plugin for WordPress brings over 40 Walkthroughs for the WordPress Core right to your Dashboard. Each Walkthrough will guide you step-by-step through a task like creating a post or installing a new plugin!
19
 
20
- Sidekick will also detect the plugins and themes you have active and push any related walkthroughs in the library, right to your Dashboard.
21
 
22
- **Think [Clippy](http://en.wikipedia.org/wiki/Office_Assistant "Clippy"), but useful!**
23
 
24
- **HOW DOES IT WORK?**
25
 
26
- The [Sidekick](http://Sidekick.pro/ "Sidekick") platform provides **real-time, voice-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 even complicated tasks.
27
 
28
- Walkthroughs are served directly from the Sidekick library. With the user’s permission, an installed Sidekick module can automatically detect a user’s access level, installed 3rd party extensions and settings. That information is used to pull the appropriate walkthroughs from the Sidekick library. Sidekick also collects anonymous user data (with the user’s permission) to track, amongst other things, which walkthroughs are attempted and completed and how often.
 
 
 
 
 
 
 
 
29
 
30
  == Installation ==
31
 
32
- This section describes how to install the plugin and get it working.
 
 
 
 
 
 
33
 
34
- 1. Unzip and upload the Sidekick plugin to the `/wp-content/plugins/` directory
35
- 2. Activate the plugin through the 'Plugins' menu in WordPress
36
- 3. You will see a Help button appear in the bottom right corner of your Dashboard.
 
 
 
 
 
 
 
 
 
 
37
 
38
  == Upgrade Notice ==
39
 
@@ -41,63 +76,51 @@ Upgrade Notice
41
 
42
  == Activation ==
43
 
44
- After installation, you will have access to at least 5 Core WordPress Walkthroughs and all third party walkthroughs that are applicable to your WordPress Dashboard.
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
- **Access to at least 5 Core Walkthroughs and all third party walkthroughs will remain free forever.**
49
-
50
- Need more information? Want a clear understanding of the difference between a Core Walkthrough and a Third Party Walkthrough? Check out our FAQ page at www.wpuniversity.com/faq/
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” that guide users through everything from understanding simple aspects of an application to completing complicated tasks.
 
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 helping you complete a standard WordPress function like creating a post, it’s a Core Walkthrough and WPUniversity created it.
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 December 2013. If you’re interested in getting a head start, send us an email at info@wpuniversity.com and we’ll let you know how you can get started.
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 at least 5 Core WordPress Walkthroughs as well as Walkthroughs created for any plugins or themes that are installed and active on your WordPress site.
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
- For now, access to all 40+ Core Walkthroughs is FREE of charge!
87
 
88
  = Ok, the plugin is installed and activated. How do I use it? =
89
 
90
- Click on the little icon in the bottom right of your screen to open the Walkthrough menu. (Think Clippy, only useful.)
91
- You will be presented with the Walkthrough menu. Select your category then your walkthrough and away you go.
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,14 @@ 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 +146,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
- = 0.78 =
122
- * Plugin compatibility issues resolved.
123
 
124
  = 0.76 =
125
  * Fixed sizing issues when more walkthroughs were added
@@ -131,4 +161,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 =
134
+ * 3.9 Support Added
135
+ * Suppport for Module Marketplace
136
+ * HTTPs Support Added
137
+ * Fixes to "safety layer"
138
+ * Fix issue with hotspots showing while playing a walkthrough
139
+
140
+ = 1.10 =
141
  * Brand New User Interface
142
  * Hotspot Support Added
143
  * 3.8 Support Added
146
  * Known bug exists with HTTPs protocols
147
 
148
  = 1.00 =
149
+ * Added support for buckets
150
 
151
+ =0.78=
152
+ * plugin Compatibility issues resolved
153
 
154
  = 0.76 =
155
  * Fixed sizing issues when more walkthroughs were added
161
  * Fixed Activation Bug
162
 
163
  = 0.70 =
164
+ * Initial Beta Release
sidekick.php CHANGED
@@ -2,469 +2,451 @@
2
 
3
  /*
4
  Plugin Name: Sidekick
5
- Plugin URL: http://www.wpuniversity.com/plugin/
6
  Description: Adds a real-time WordPress training walkthroughs right in your Dashboard
7
  Requires at least: 3.7
8
- Tested up to: 3.8
9
- Version: 1.1
10
  Author: WPUniversity.com
11
  Author URI: http://www.wpuniversity.com
12
  */
13
 
14
- define('SK_DOMAIN','http://www.wpuniversity.com');
15
- define('SK_PLUGIN_VERSION',1.08);
16
- define('SK_LIBRARY_VERSION',4);
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
- function mlog(){}
30
- }
31
-
32
- class Sidekick{
33
- function enqueue_required(){
34
- mlog('PHP: enqueue_required');
35
-
36
- wp_enqueue_script('jquery' , null );
37
- wp_enqueue_script('underscore' , null, array('underscore'));
38
- wp_enqueue_script('backbone' , null, array('jquery','underscore'));
39
- wp_enqueue_script('jquery-ui-core' , null, array('jquery') );
40
- wp_enqueue_script('jquery-ui-position' , null, array('jquery-ui-core') );
41
- wp_enqueue_script('jquery-ui-draggable' , null, array('jquery-ui-core') );
42
- wp_enqueue_script('jquery-ui-droppable' , null, array('jquery-ui-core') );
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
- 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);
56
- wp_enqueue_script('sk' ,plugins_url( '/js/sk.source.js' , __FILE__ ), array('sidekick') ,SK_PLUGIN_VERSION);
57
- wp_enqueue_script("sk_library" , SK_LIBRARY_FILE , array("sk") ,null);
58
- wp_enqueue_style('sk-style' ,plugins_url( '/css/sidekick_wordpress.css' , __FILE__ ), null ,SK_PLUGIN_VERSION);
59
 
60
- wp_enqueue_style('wp-pointer');
61
- wp_enqueue_script('wp-pointer');
62
- }
 
 
63
 
64
- function setup_menu(){
65
- add_menu_page( 'Sidekick', 'Sidekick', 'activate_plugins', 'sidekick', array(&$this,'admin_page'));
66
- }
67
 
68
- function admin_page(){
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
- if (isset($_POST['option_page']) && $_POST['option_page'] == 'sk_license') {
 
 
88
 
89
- if (isset($_POST['first_name']) && $_POST['first_name'])
90
- update_option('sk_first_name',$_POST['first_name']);
 
91
 
92
- if (isset($_POST['email']) && $_POST['email'])
93
- update_option('sk_email',$_POST['email']);
94
 
95
- if (isset($_POST['sk_track_data'])) {
96
- update_option( 'sk_track_data', true );
97
- } else {
98
- delete_option('sk_track_data');
99
- }
100
 
101
- if ($status !== 'valid') {
102
- $first_name = $_POST['first_name'];
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 ( is_wp_error( $response ) ) {
122
- $error_message = $response->get_error_message();
123
  } else {
124
- $success = 'Successfully Activated';
125
- update_option('sk_license_key',$response['body']);
126
- $license = $response['body'];
127
- $email = $_POST['email'];
128
- $status = 'valid';
129
 
130
- update_option('sk_license_status','valid');
 
 
 
131
  }
 
132
  update_option( 'sk_activated', true );
133
- die('<script>window.open("' . get_site_url() . '/wp-admin/admin.php?page=sidekick&firstuse","_self")</script>');
 
134
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  }
136
- }
137
 
138
- $current_user = wp_get_current_user();
139
- if (!$first_name)
140
- $first_name = $current_user->user_firstname;
141
 
142
- if (!$email)
143
- $email = $current_user->user_email;
144
 
145
- $track_data = get_option( 'sk_track_data' );
146
 
147
- global $wp_version;
148
- if (version_compare($wp_version, '3.7', '<=')) {
149
- $error = "Sorry, Sidekick requires WordPress 3.7 or higher to function.";
150
- }
151
 
152
- if (!$license) {
153
- $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.";
154
- }
155
 
156
- if(preg_match('/(?i)msie [1-8]/',$_SERVER['HTTP_USER_AGENT'])){
157
- $error = "Sorry, Sidekick requires Internet Explorer 9 or higher to function.";
158
- }
159
 
160
- ?>
161
-
162
- <?php if ($_SERVER['QUERY_STRING'] == 'page=sidekick&firstuse'): ?>
163
- <script type="text/javascript">
164
- jQuery(document).ready(function($) {
165
- jQuery('#wpu #logo').trigger('click');
166
- });
167
- </script>
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
- <?php if (!$error): ?>
192
- <?php if ($status == 'valid'): ?>
193
- <h3>Your Sidekick Account</h3>
194
- <?php else: ?>
195
- <h3>Activate <b>Full Library</b></h3>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
  <?php endif ?>
197
 
198
- <form method="post">
199
- <?php settings_fields('sk_license'); ?>
200
- <table class="form-table">
201
- <tbody>
202
- <tr valign="top">
203
- <th scope="row" valign="top">First Name</th>
204
- <td>
205
- <input id="first_name" name="first_name" type="text" class="regular-text" <?php if ($status == 'valid'): ?>DISABLED<?php endif ?> value="<?php echo $first_name ?>" />
206
- <?php if ($status !== 'valid'): ?>
 
207
  <label class="description" for="first_name"><?php _e('Enter your first name'); ?></label>
208
- <?php endif ?>
209
- </td>
210
- </tr>
211
-
212
- <tr valign="top">
213
- <th scope="row" valign="top">E-Mail</th>
214
- <td>
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
- <?php endif ?>
219
- </td>
220
- </tr>
221
 
222
- <?php if ($license): ?>
223
  <tr valign="top">
224
- <th scope="row" valign="top">License</th>
225
- <td><span><?php echo $license ?></span></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
- <?php else: ?>
241
  <tr valign="top">
242
  <th scope="row" valign="top">
243
- Status
244
  </th>
245
-
246
  <td>
247
- <span style='color: blue'>Demo</span>
 
 
248
  </td>
249
  </tr>
250
- <?php endif ?>
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
- <?php endif ?>
271
- </form>
272
- <?php endif ?>
273
 
274
- <h3>About Sidekick</h3>
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>&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;4. If you have any questions, bug reports or feedback, please send them to info@sidekick.pro</li>
284
- <li>&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;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
- function footer(){
294
- global $current_user, $wp_roles;
 
 
295
 
296
- $current_user = wp_get_current_user();
297
- $sk_just_activated = get_option( 'sk_just_activated' );
298
- $track_data = get_option( 'sk_track_data' );
299
- $theme = wp_get_theme();
300
- $not_supported_ie = false;
 
 
 
 
301
 
302
- delete_option( 'sk_just_activated' );
303
- foreach($wp_roles->role_names as $role => $Role) {
304
- if (array_key_exists($role, $current_user->caps)){
305
- $user_role = $role;
306
- break;
307
- }
308
  }
309
 
310
- if(preg_match('/(?i)msie [1-8]/',$_SERVER['HTTP_USER_AGENT'])){
311
- $not_supported_ie = true;
 
 
 
 
 
312
  }
313
 
314
- ?>
315
-
316
- <?php if (!$not_supported_ie): ?>
317
-
318
- <script type="text/javascript">
319
- var sk_library_file = '<?php echo SK_LIBRARY_FILE ?>';
320
- var sk_main_soft_name = 'WordPress';
321
- var sk_main_soft_version = '<?php echo get_bloginfo("version"); ?>';
322
- var sk_installed_plugins = <?php echo $this->list_plugins() ?>;
323
- var sk_installed_theme = '<?php echo $theme->Name ?>';
324
- var sk_theme_version = '<?php echo $theme->Version ?>';
325
- var sk_domain = '<?php echo SK_DOMAIN ?>';
326
- var sk_license_status = '<?php echo get_option( "sk_license_status" ) ?>';
327
- var sk_plugin_version = <?php echo SK_PLUGIN_VERSION ?>;
328
- var sk_library_version = <?php echo SK_LIBRARY_VERSION ?>;
329
- var sk_platform_version = <?php echo SK_PLATFORM_VERSION ?>;
330
- var sk_track_data = '<?php echo get_option( 'sk_track_data' ) ?>';
331
- var sk_user_level = '<?php echo $user_role ?>';
332
- var sk_user_email = '<?php echo $current_user->user_email ?>';
333
- var sk_use_native_controls = false;
334
- var sk_plugin_url = '<?php echo admin_url("admin.php?page=sidekick") ?>';
335
- var sk_domain = '<?php echo str_replace("http://","",$_SERVER["SERVER_NAME"]) ?>'
336
- <?php if ($license_key = get_option( "sk_license_key" )): ?>
337
- var sk_license_key = '<?php echo $license_key ?>';
338
- <?php else: ?>
339
- var sk_license_key = 'demo';
340
- <?php endif ?>
341
- <?php if ($sk_just_activated): ?>
342
- var sk_just_activated = true;
343
- <?php endif; ?>
344
- </script>
345
-
346
- <?php if ($track_data): ?>
347
- <script id="IntercomSettingsScriptTag">
348
- window.intercomSettings = {
349
- email: "<?php echo $current_user->user_email; ?>",
350
- created_at: 1234567980,
351
- app_id: "75fbe21e31b2881f775fba2ff3ff7928485478e8",
352
- // last_date_watched : 0,
353
- // walkthroughs_watched: 0,
354
- // number_of_plugins: 0,
355
- // domain: 0,
356
- // first_name: 0,
357
- // plugin_version: '<?php echo SK_PLUGIN_VERSION ?>'
 
 
 
 
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
- <?php endif ?>
363
- <?php
364
- }
365
 
366
- function list_plugins(){
367
- $active_plugins = wp_get_active_and_valid_plugins();
368
- echo '[';
369
- foreach ($active_plugins as $plugins_key => $plugin) {
370
- $data = get_plugin_data( $plugin, false, false );
371
 
372
- $plugins[addslashes($data['Name'])] = $data['Version'];
373
- if ($plugins_key > 0) echo ',';
374
- $data['Name'] = addslashes($data['Name']);
375
- echo "{'{$data['Name']}' : '{$data['Version']}'}";
376
- }
377
- echo ']';
378
- }
379
 
380
- function bal_http_request_args($r){
381
- $r['timeout'] = 15;
382
- return $r;
383
- }
384
 
385
- function bal_http_api_curl($handle){
386
- curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, 15 );
387
- curl_setopt( $handle, CURLOPT_TIMEOUT, 15 );
388
- }
389
 
390
- function track($data){
391
- $response = wp_remote_post( "http://www.wpuniversity.com/wp-admin/admin-ajax.php", array(
392
- 'method' => 'POST',
393
- 'timeout' => 45,
394
- 'redirection' => 5,
395
- 'httpversion' => '1.0',
396
- 'blocking' => true,
397
- 'headers' => array(),
398
- 'body' => $data,
399
- 'cookies' => array()
400
- )
401
- );
402
- }
 
 
 
 
 
 
403
 
404
- function activate_plugin(){
405
- update_option( 'sk_do_activation_redirect', true );
406
- $data = array(
407
- 'source' => 'plugin',
408
- 'action' => 'track',
409
- 'type' => 'activate'
 
 
 
 
 
410
  );
411
- $this->track($data);
412
- // $this->redirect();
413
- }
414
 
415
- function redirect(){
416
- if (get_option('sk_do_activation_redirect', false)) {
417
- delete_option('sk_do_activation_redirect');
418
- $siteurl = get_site_url();
419
- wp_redirect($siteurl . "/wp-admin/admin.php?page=sidekick&firstuse");
420
- die();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
421
  }
422
- }
423
 
424
- function deactivate_plugin(){
425
- $track_data = get_option( 'sk_track_data' );
426
- if ($track_data) {
427
  $data = array(
428
  'source' => 'plugin',
429
  'action' => 'track',
430
- 'type' => 'deactivate',
431
- 'user' => get_option( "sk_license_key" )
432
  );
433
  $this->track($data);
434
- ?>
435
- <script type="text/javascript">
436
- window._gaq = window._gaq || [];
437
- window._gaq.push(['wpu._setAccount', 'UA-39283622-1']);
438
-
439
- (function() {
440
- var ga_wpu = document.createElement('script'); ga_wpu.type = 'text/javascript'; ga_wpu.async = true;
441
- ga_wpu.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
442
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga_wpu, s);
443
- })();
444
- window._gaq.push(['wpu._trackEvent', 'Plugin - Deactivate', '', <?php echo SK_PLUGIN_VERSION ?>, 0,true]);
445
- </script>
446
- <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
447
  }
448
  }
449
- }
450
-
451
- $sidekick = new Sidekick;
452
- if (!defined('SK_PLUGIN_DEGBUG')){
453
- register_activation_hook( __FILE__, array($sidekick,'activate_plugin') );
454
- register_deactivation_hook( __FILE__, array($sidekick,'deactivate_plugin') );
455
- }
456
-
457
- add_filter('http_request_args', array($sidekick,'bal_http_request_args'), 100, 1);
458
- add_action('http_api_curl', array($sidekick,'bal_http_api_curl'), 100, 1);
459
- add_action('admin_menu', array($sidekick,'setup_menu'));
460
- add_action('admin_init', array($sidekick,'redirect'));
461
-
462
- if (!defined('SK_PLUGIN_DEGBUG'))
463
- require_once('sk_init.php');
464
-
465
- if (!(isset($_GET['tab']) && $_GET['tab'] == 'plugin-information')) {
466
- add_action('admin_footer', array($sidekick,'footer'));
467
- add_action('customize_controls_print_footer_scripts', array($sidekick,'footer'));
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.8.1
9
+ Version: 1.2
10
  Author: WPUniversity.com
11
  Author URI: http://www.wpuniversity.com
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>&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;2. Your Activation ID is unique and locked to this URL. </li>
226
+ <li>&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;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
- }