Uji Countdown - Version 2.0.3

Version Description

  • NEW: Email Subscription
  • Visitors have now the option to subscribe using the email subscription form
  • You can create unlimited Campaigns
Download this release

Release Info

Developer ujimoto
Plugin Icon 128x128 Uji Countdown
Version 2.0.3
Comparing to
See all releases

Code changes from version 2.0.2 to 2.0.3

README.txt CHANGED
@@ -4,8 +4,8 @@ Contributors: ujimoto
4
  Donate link: http://www.wpmanage.com/uji-countdown
5
  Tags: countdown, counter, html5 countdown, animated countdown, countdown timer, count down, countdown clock, jQuery countdown, clock, timer
6
  Requires at least: 3.0
7
- Tested up to: 4.0.1
8
- Stable tag: 2.0
9
 
10
  Uji Countdown - HTML5 Customizable Countdown Timer
11
 
@@ -41,6 +41,11 @@ WPmanage [(http://www.wpmanage.com/uji-countdown/)](http://www.wpmanage.com/uji-
41
 
42
  == Changelog ==
43
 
 
 
 
 
 
44
  = 2.0.2 =
45
  * Fixed activation error conflict
46
  * Fixed server time instead of user local time
4
  Donate link: http://www.wpmanage.com/uji-countdown
5
  Tags: countdown, counter, html5 countdown, animated countdown, countdown timer, count down, countdown clock, jQuery countdown, clock, timer
6
  Requires at least: 3.0
7
+ Tested up to: 4.1
8
+ Stable tag: 2.0.3
9
 
10
  Uji Countdown - HTML5 Customizable Countdown Timer
11
 
41
 
42
  == Changelog ==
43
 
44
+ = 2.0.3 =
45
+ * NEW: Email Subscription
46
+ * Visitors have now the option to subscribe using the email subscription form
47
+ * You can create unlimited Campaigns
48
+
49
  = 2.0.2 =
50
  * Fixed activation error conflict
51
  * Fixed server time instead of user local time
assets/css/admin.css CHANGED
@@ -440,6 +440,102 @@ Preview Style
440
  color: #ffffff!important;
441
  }
442
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
443
  /*
444
  ============================================================================
445
  Responsive
440
  color: #ffffff!important;
441
  }
442
 
443
+ /*
444
+ ============================================================================
445
+ Newsletter
446
+ ============================================================================
447
+ */
448
+
449
+ .ujicf:before, .ujicf:after { content: ""; display: table; }
450
+ .ujicf:after { clear: both; }
451
+ .ujicf { *zoom: 1; }
452
+
453
+ #ujiCountdown
454
+ {
455
+ display:inline-block;
456
+ margin-bottom:0;
457
+ }
458
+
459
+ #ujiCountdown span.countdown_row
460
+ {
461
+ display:block;
462
+ }
463
+
464
+ #ujiCountdown span.ujic_s
465
+ {
466
+ margin-right: 0;
467
+ }
468
+
469
+ #ujiCountdown form
470
+ {
471
+ display:block;
472
+ margin: 0;
473
+ padding: 0;
474
+ overflow: hidden;
475
+ background: #fff center center url("uji-box-bg.png");
476
+ }
477
+
478
+ #ujiCountdown form span
479
+ {
480
+ display: block;
481
+ font-size: 15px;
482
+ font-weight: 600;
483
+ line-height: 1.2em;
484
+ margin: 1em 0;
485
+ text-align: center;
486
+ }
487
+
488
+ #ujiCountdown form p
489
+ {
490
+ width:100%;
491
+ display: inline-block;
492
+ margin: 0 auto;
493
+ text-align: center;
494
+ }
495
+
496
+ #ujiCountdown form input
497
+ {
498
+ display:inline;
499
+ margin:0;
500
+ height: 40px;
501
+ }
502
+
503
+ #ujiCountdown form div
504
+ {
505
+ text-align: center;
506
+ }
507
+
508
+ #ujiCountdown form input[type="text"]
509
+ {
510
+ background: none repeat scroll 0 0 #fff;
511
+ border: medium none;
512
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) inset;
513
+ border-radius: 3px 0 0 3px;
514
+ font-size: 15px;
515
+ margin: 0;
516
+ padding: 10px 5%;
517
+ text-align: center;
518
+ width: 70%;
519
+ float:left;
520
+ }
521
+
522
+ #ujiCountdown form input[type="submit"]
523
+ {
524
+ border-radius: 0 3px 3px 0;
525
+ font-size: 13px;
526
+ font-weight: 600;
527
+ margin: 0;
528
+ padding: 0 3%;
529
+ text-transform: uppercase;
530
+ width: 30%;
531
+ border: medium none;
532
+ box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset;
533
+ color: #fff;
534
+ background: linear-gradient(to bottom , #c816d0, #ab02b2) repeat scroll 0 0 rgba(0, 0, 0, 0);
535
+ float:left;
536
+ }
537
+
538
+
539
  /*
540
  ============================================================================
541
  Responsive
assets/css/jquery-ui-custom.css CHANGED
@@ -1,78 +1,78 @@
1
- /*
2
- * jQuery UI CSS Framework 1.8.14
3
- *
4
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
- * Dual licensed under the MIT or GPL Version 2 licenses.
6
- * http://jquery.org/license
7
- *
8
- * http://docs.jquery.com/UI/Theming/API
9
- */
10
-
11
- /* Layout helpers
12
- ----------------------------------*/
13
- .ujic_slider .ui-helper-hidden { display: none; }
14
- .ujic_slider .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
15
- .ujic_slider .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
16
- .ujic_slider .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
17
- .ujic_slider .ui-helper-clearfix { display: inline-block; }
18
- /* required comment for clearfix to work in Opera \*/
19
- * html .ujic_slider .ui-helper-clearfix { height:1%; }
20
- .ujic_slider .ui-helper-clearfix { display:block; }
21
- /* end clearfix */
22
- .ujic_slider .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
23
-
24
-
25
- /* Interaction Cues
26
- ----------------------------------*/
27
- .ujic_slider .ui-state-disabled { cursor: default !important; }
28
-
29
-
30
- /* Icons
31
- ----------------------------------*/
32
-
33
- /* states and images */
34
- .ujic_slider .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
35
-
36
-
37
- /* Misc visuals
38
- ----------------------------------*/
39
-
40
- /* Overlays */
41
- .ujic_slider .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
42
-
43
-
44
- /*
45
- * jQuery UI Slider 1.8.14
46
- *
47
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
48
- * Dual licensed under the MIT or GPL Version 2 licenses.
49
- * http://jquery.org/license
50
- *
51
- * http://docs.jquery.com/UI/Slider#theming
52
- */
53
- .ujic_sliderui { position: relative; text-align: left; background:#eee; border-radius:2px; width:200px; display:inline-block; margin-right:10px; border: 1px solid #999;}
54
- .ujic_slider .ui-slider-handle { position: absolute; z-index: 2; width: 18px; height: 18px; cursor: default; background: url(../images/slider-control.png) no-repeat center center !important; cursor: pointer;}
55
- .ujic_slider .ui-slider-handle.ui-corner-all { border:0 !important;}
56
- .ujic_slider .ui-slider-handle.ui-state-focus { border:0 !important; background: url(../images/slider-control.png) no-repeat center center !important;outline: none;}
57
- .ujic_slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
58
-
59
- .ujic_slider .ui-slider-horizontal { height: 7px; border-color: #aaa;
60
- border-radius: 2px;-webkit-border-radius: 2px;-moz-border-radius: 2px;
61
- box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.20), 0px 0px 1px rgba(0, 0, 0, 0.20);
62
- -moz-box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.20), 0px 0px 1px rgba(0, 0, 0, 0.20);
63
- -webkit-box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.20), 0px 0px 1px rgba(0, 0, 0, 0.20);}
64
- .ujic_slider .ui-slider-horizontal .ui-slider-handle { top: -5px; margin-left: -9px; }
65
- .ujic_slider .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
66
- .ujic_slider .ui-slider-horizontal .ui-slider-range-min { left: 0; }
67
- .ujic_slider .ui-slider-horizontal .ui-slider-range-max { right: 0; }
68
- .ui-slider-range{border-radius: 2px;-webkit-border-radius: 2px;-moz-border-radius: 2px;
69
- box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.20), 0px 0px 1px rgba(0, 0, 0, 0.20);
70
- -moz-box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.20), 0px 0px 1px rgba(0, 0, 0, 0.20);
71
- -webkit-box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.20), 0px 0px 1px rgba(0, 0, 0, 0.20);}
72
- .ujic_slider .ui-slider-range.ui-widget-header{border: 1px solid #a61ba6; margin-top: -1px; margin-left: -1px; background: #bd5abd;border-radius: 2px;-webkit-border-radius: 2px;-moz-border-radius: 2px;}
73
-
74
- .ujic_slider .ui-slider-vertical { width: .8em; height: 100px; }
75
- .ujic_slider .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
76
- .ujic_slider .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
77
- .ujic_slider .ui-slider-vertical .ui-slider-range-min { bottom: 0; }
78
  .ujic_slider .ui-slider-vertical .ui-slider-range-max { top: 0; }
1
+ /*
2
+ * jQuery UI CSS Framework 1.8.14
3
+ *
4
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
+ * Dual licensed under the MIT or GPL Version 2 licenses.
6
+ * http://jquery.org/license
7
+ *
8
+ * http://docs.jquery.com/UI/Theming/API
9
+ */
10
+
11
+ /* Layout helpers
12
+ ----------------------------------*/
13
+ .ujic_slider .ui-helper-hidden { display: none; }
14
+ .ujic_slider .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
15
+ .ujic_slider .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
16
+ .ujic_slider .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
17
+ .ujic_slider .ui-helper-clearfix { display: inline-block; }
18
+ /* required comment for clearfix to work in Opera \*/
19
+ * html .ujic_slider .ui-helper-clearfix { height:1%; }
20
+ .ujic_slider .ui-helper-clearfix { display:block; }
21
+ /* end clearfix */
22
+ .ujic_slider .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
23
+
24
+
25
+ /* Interaction Cues
26
+ ----------------------------------*/
27
+ .ujic_slider .ui-state-disabled { cursor: default !important; }
28
+
29
+
30
+ /* Icons
31
+ ----------------------------------*/
32
+
33
+ /* states and images */
34
+ .ujic_slider .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
35
+
36
+
37
+ /* Misc visuals
38
+ ----------------------------------*/
39
+
40
+ /* Overlays */
41
+ .ujic_slider .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
42
+
43
+
44
+ /*
45
+ * jQuery UI Slider 1.8.14
46
+ *
47
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
48
+ * Dual licensed under the MIT or GPL Version 2 licenses.
49
+ * http://jquery.org/license
50
+ *
51
+ * http://docs.jquery.com/UI/Slider#theming
52
+ */
53
+ .ujic_sliderui { position: relative; text-align: left; background:#eee; border-radius:2px; width:200px; display:inline-block; margin-right:10px; border: 1px solid #999;}
54
+ .ujic_slider .ui-slider-handle { position: absolute; z-index: 2; width: 18px; height: 18px; cursor: default; background: url(../images/slider-control.png) no-repeat center center !important; cursor: pointer;}
55
+ .ujic_slider .ui-slider-handle.ui-corner-all { border:0 !important;}
56
+ .ujic_slider .ui-slider-handle.ui-state-focus { border:0 !important; background: url(../images/slider-control.png) no-repeat center center !important;outline: none;}
57
+ .ujic_slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
58
+
59
+ .ujic_slider .ui-slider-horizontal { height: 7px; border-color: #aaa;
60
+ border-radius: 2px;-webkit-border-radius: 2px;-moz-border-radius: 2px;
61
+ box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.20), 0px 0px 1px rgba(0, 0, 0, 0.20);
62
+ -moz-box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.20), 0px 0px 1px rgba(0, 0, 0, 0.20);
63
+ -webkit-box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.20), 0px 0px 1px rgba(0, 0, 0, 0.20);}
64
+ .ujic_slider .ui-slider-horizontal .ui-slider-handle { top: -5px; margin-left: -9px; }
65
+ .ujic_slider .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
66
+ .ujic_slider .ui-slider-horizontal .ui-slider-range-min { left: 0; }
67
+ .ujic_slider .ui-slider-horizontal .ui-slider-range-max { right: 0; }
68
+ .ui-slider-range{border-radius: 2px;-webkit-border-radius: 2px;-moz-border-radius: 2px;
69
+ box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.20), 0px 0px 1px rgba(0, 0, 0, 0.20);
70
+ -moz-box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.20), 0px 0px 1px rgba(0, 0, 0, 0.20);
71
+ -webkit-box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.20), 0px 0px 1px rgba(0, 0, 0, 0.20);}
72
+ .ujic_slider .ui-slider-range.ui-widget-header{border: 1px solid #a61ba6; margin-top: -1px; margin-left: -1px; background: #bd5abd;border-radius: 2px;-webkit-border-radius: 2px;-moz-border-radius: 2px;}
73
+
74
+ .ujic_slider .ui-slider-vertical { width: .8em; height: 100px; }
75
+ .ujic_slider .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
76
+ .ujic_slider .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
77
+ .ujic_slider .ui-slider-vertical .ui-slider-range-min { bottom: 0; }
78
  .ujic_slider .ui-slider-vertical .ui-slider-range-max { top: 0; }
assets/css/uji-box-bg.png ADDED
Binary file
assets/googlefonts.php CHANGED
@@ -1,8 +1,8 @@
1
- <?php
2
-
3
- function ujic_googlefonts() {
4
- //return array('none' => 'Default Font', 'ABeeZee' => 'ABeeZee', 'Abel' => 'Abel', 'Abril Fatface' => 'Abril Fatface', 'Aclonica' => 'Aclonica', 'Acme' => 'Acme', 'Actor' => 'Actor', 'Adamina' => 'Adamina', 'Advent Pro' => 'Advent Pro', 'Aguafina Script' => 'Aguafina Script', 'Akronim' => 'Akronim', 'Aladin' => 'Aladin', 'Aldrich' => 'Aldrich', 'Alegreya' => 'Alegreya', 'Alegreya SC' => 'Alegreya SC', 'Alex Brush' => 'Alex Brush', 'Alfa Slab One' => 'Alfa Slab One', 'Alice' => 'Alice', 'Alike' => 'Alike', 'Alike Angular' => 'Alike Angular', 'Allan' => 'Allan', 'Allerta' => 'Allerta', 'Allerta Stencil' => 'Allerta Stencil', 'Allura' => 'Allura', 'Almendra' => 'Almendra', 'Almendra Display' => 'Almendra Display', 'Almendra SC' => 'Almendra SC', 'Amarante' => 'Amarante', 'Amaranth' => 'Amaranth', 'Amatic SC' => 'Amatic SC', 'Amethysta' => 'Amethysta', 'Anaheim' => 'Anaheim', 'Andada' => 'Andada', 'Andika' => 'Andika', 'Angkor' => 'Angkor', 'Annie Use Your Telescope' => 'Annie Use Your Telescope', 'Anonymous Pro' => 'Anonymous Pro', 'Antic' => 'Antic', 'Antic Didone' => 'Antic Didone', 'Antic Slab' => 'Antic Slab', 'Anton' => 'Anton', 'Arapey' => 'Arapey', 'Arbutus' => 'Arbutus', 'Arbutus Slab' => 'Arbutus Slab', 'Architects Daughter' => 'Architects Daughter', 'Archivo Black' => 'Archivo Black', 'Archivo Narrow' => 'Archivo Narrow', 'Arimo' => 'Arimo', 'Arizonia' => 'Arizonia', 'Armata' => 'Armata', 'Artifika' => 'Artifika', 'Arvo' => 'Arvo', 'Asap' => 'Asap', 'Asset' => 'Asset', 'Astloch' => 'Astloch', 'Asul' => 'Asul', 'Atomic Age' => 'Atomic Age', 'Aubrey' => 'Aubrey', 'Audiowide' => 'Audiowide', 'Autour One' => 'Autour One', 'Average' => 'Average', 'Average Sans' => 'Average Sans', 'Averia Gruesa Libre' => 'Averia Gruesa Libre', 'Averia Libre' => 'Averia Libre', 'Averia Sans Libre' => 'Averia Sans Libre', 'Averia Serif Libre' => 'Averia Serif Libre', 'Bad Script' => 'Bad Script', 'Balthazar' => 'Balthazar', 'Bangers' => 'Bangers', 'Basic' => 'Basic', 'Battambang' => 'Battambang', 'Baumans' => 'Baumans', 'Bayon' => 'Bayon', 'Belgrano' => 'Belgrano', 'Belleza' => 'Belleza', 'BenchNine' => 'BenchNine', 'Bentham' => 'Bentham', 'Berkshire Swash' => 'Berkshire Swash', 'Bevan' => 'Bevan', 'Bigelow Rules' => 'Bigelow Rules', 'Bigshot One' => 'Bigshot One', 'Bilbo' => 'Bilbo', 'Bilbo Swash Caps' => 'Bilbo Swash Caps', 'Bitter' => 'Bitter', 'Black Ops One' => 'Black Ops One', 'Bokor' => 'Bokor', 'Bonbon' => 'Bonbon', 'Boogaloo' => 'Boogaloo', 'Bowlby One' => 'Bowlby One', 'Bowlby One SC' => 'Bowlby One SC', 'Brawler' => 'Brawler', 'Bree Serif' => 'Bree Serif', 'Bubblegum Sans' => 'Bubblegum Sans', 'Bubbler One' => 'Bubbler One', 'Buda' => 'Buda', 'Buenard' => 'Buenard', 'Butcherman' => 'Butcherman', 'Butterfly Kids' => 'Butterfly Kids', 'Cabin' => 'Cabin', 'Cabin Condensed' => 'Cabin Condensed', 'Cabin Sketch' => 'Cabin Sketch', 'Caesar Dressing' => 'Caesar Dressing', 'Cagliostro' => 'Cagliostro', 'Calligraffitti' => 'Calligraffitti', 'Cambo' => 'Cambo', 'Candal' => 'Candal', 'Cantarell' => 'Cantarell', 'Cantata One' => 'Cantata One', 'Cantora One' => 'Cantora One', 'Capriola' => 'Capriola', 'Cardo' => 'Cardo', 'Carme' => 'Carme', 'Carrois Gothic' => 'Carrois Gothic', 'Carrois Gothic SC' => 'Carrois Gothic SC', 'Carter One' => 'Carter One', 'Caudex' => 'Caudex', 'Cedarville Cursive' => 'Cedarville Cursive', 'Ceviche One' => 'Ceviche One', 'Changa One' => 'Changa One', 'Chango' => 'Chango', 'Chau Philomene One' => 'Chau Philomene One', 'Chela One' => 'Chela One', 'Chelsea Market' => 'Chelsea Market', 'Chenla' => 'Chenla', 'Cherry Cream Soda' => 'Cherry Cream Soda', 'Cherry Swash' => 'Cherry Swash', 'Chewy' => 'Chewy', 'Chicle' => 'Chicle', 'Chivo' => 'Chivo', 'Cinzel' => 'Cinzel', 'Cinzel Decorative' => 'Cinzel Decorative', 'Clicker Script' => 'Clicker Script', 'Coda' => 'Coda', 'Coda Caption' => 'Coda Caption', 'Codystar' => 'Codystar', 'Combo' => 'Combo', 'Comfortaa' => 'Comfortaa', 'Coming Soon' => 'Coming Soon', 'Concert One' => 'Concert One', 'Condiment' => 'Condiment', 'Content' => 'Content', 'Contrail One' => 'Contrail One', 'Convergence' => 'Convergence', 'Cookie' => 'Cookie', 'Copse' => 'Copse', 'Corben' => 'Corben', 'Courgette' => 'Courgette', 'Cousine' => 'Cousine', 'Coustard' => 'Coustard', 'Covered By Your Grace' => 'Covered By Your Grace', 'Crafty Girls' => 'Crafty Girls', 'Creepster' => 'Creepster', 'Crete Round' => 'Crete Round', 'Crimson Text' => 'Crimson Text', 'Croissant One' => 'Croissant One', 'Crushed' => 'Crushed', 'Cuprum' => 'Cuprum', 'Cutive' => 'Cutive', 'Cutive Mono' => 'Cutive Mono', 'Damion' => 'Damion', 'Dancing Script' => 'Dancing Script', 'Dangrek' => 'Dangrek', 'Dawning of a New Day' => 'Dawning of a New Day', 'Days One' => 'Days One', 'Delius' => 'Delius', 'Delius Swash Caps' => 'Delius Swash Caps', 'Delius Unicase' => 'Delius Unicase', 'Della Respira' => 'Della Respira', 'Denk One' => 'Denk One', 'Devonshire' => 'Devonshire', 'Didact Gothic' => 'Didact Gothic', 'Diplomata' => 'Diplomata', 'Diplomata SC' => 'Diplomata SC', 'Domine' => 'Domine', 'Donegal One' => 'Donegal One', 'Doppio One' => 'Doppio One', 'Dorsa' => 'Dorsa', 'Dosis' => 'Dosis', 'Dr Sugiyama' => 'Dr Sugiyama', 'Droid Sans' => 'Droid Sans', 'Droid Sans Mono' => 'Droid Sans Mono', 'Droid Serif' => 'Droid Serif', 'Duru Sans' => 'Duru Sans', 'Dynalight' => 'Dynalight', 'EB Garamond' => 'EB Garamond', 'Eagle Lake' => 'Eagle Lake', 'Eater' => 'Eater', 'Economica' => 'Economica', 'Electrolize' => 'Electrolize', 'Elsie' => 'Elsie', 'Elsie Swash Caps' => 'Elsie Swash Caps', 'Emblema One' => 'Emblema One', 'Emilys Candy' => 'Emilys Candy', 'Engagement' => 'Engagement', 'Englebert' => 'Englebert', 'Enriqueta' => 'Enriqueta', 'Erica One' => 'Erica One', 'Esteban' => 'Esteban', 'Euphoria Script' => 'Euphoria Script', 'Ewert' => 'Ewert', 'Exo' => 'Exo', 'Expletus Sans' => 'Expletus Sans', 'Fanwood Text' => 'Fanwood Text', 'Fascinate' => 'Fascinate', 'Fascinate Inline' => 'Fascinate Inline', 'Faster One' => 'Faster One', 'Fasthand' => 'Fasthand', 'Federant' => 'Federant', 'Federo' => 'Federo', 'Felipa' => 'Felipa', 'Fenix' => 'Fenix', 'Finger Paint' => 'Finger Paint', 'Fjalla One' => 'Fjalla One', 'Fjord One' => 'Fjord One', 'Flamenco' => 'Flamenco', 'Flavors' => 'Flavors', 'Fondamento' => 'Fondamento', 'Fontdiner Swanky' => 'Fontdiner Swanky', 'Forum' => 'Forum', 'Francois One' => 'Francois One', 'Freckle Face' => 'Freckle Face', 'Fredericka the Great' => 'Fredericka the Great', 'Fredoka One' => 'Fredoka One', 'Freehand' => 'Freehand', 'Fresca' => 'Fresca', 'Frijole' => 'Frijole', 'Fruktur' => 'Fruktur', 'Fugaz One' => 'Fugaz One', 'GFS Didot' => 'GFS Didot', 'GFS Neohellenic' => 'GFS Neohellenic', 'Gabriela' => 'Gabriela', 'Gafata' => 'Gafata', 'Galdeano' => 'Galdeano', 'Galindo' => 'Galindo', 'Gentium Basic' => 'Gentium Basic', 'Gentium Book Basic' => 'Gentium Book Basic', 'Geo' => 'Geo', 'Geostar' => 'Geostar', 'Geostar Fill' => 'Geostar Fill', 'Germania One' => 'Germania One', 'Gilda Display' => 'Gilda Display', 'Give You Glory' => 'Give You Glory', 'Glass Antiqua' => 'Glass Antiqua', 'Glegoo' => 'Glegoo', 'Gloria Hallelujah' => 'Gloria Hallelujah', 'Goblin One' => 'Goblin One', 'Gochi Hand' => 'Gochi Hand', 'Gorditas' => 'Gorditas', 'Goudy Bookletter 1911' => 'Goudy Bookletter 1911', 'Graduate' => 'Graduate', 'Grand Hotel' => 'Grand Hotel', 'Gravitas One' => 'Gravitas One', 'Great Vibes' => 'Great Vibes', 'Griffy' => 'Griffy', 'Gruppo' => 'Gruppo', 'Gudea' => 'Gudea', 'Habibi' => 'Habibi', 'Hammersmith One' => 'Hammersmith One', 'Hanalei' => 'Hanalei', 'Hanalei Fill' => 'Hanalei Fill', 'Handlee' => 'Handlee', 'Hanuman' => 'Hanuman', 'Happy Monkey' => 'Happy Monkey', 'Headland One' => 'Headland One', 'Henny Penny' => 'Henny Penny', 'Herr Von Muellerhoff' => 'Herr Von Muellerhoff', 'Holtwood One SC' => 'Holtwood One SC', 'Homemade Apple' => 'Homemade Apple', 'Homenaje' => 'Homenaje', 'IM Fell DW Pica' => 'IM Fell DW Pica', 'IM Fell DW Pica SC' => 'IM Fell DW Pica SC', 'IM Fell Double Pica' => 'IM Fell Double Pica', 'IM Fell Double Pica SC' => 'IM Fell Double Pica SC', 'IM Fell English' => 'IM Fell English', 'IM Fell English SC' => 'IM Fell English SC', 'IM Fell French Canon' => 'IM Fell French Canon', 'IM Fell French Canon SC' => 'IM Fell French Canon SC', 'IM Fell Great Primer' => 'IM Fell Great Primer', 'IM Fell Great Primer SC' => 'IM Fell Great Primer SC', 'Iceberg' => 'Iceberg', 'Iceland' => 'Iceland', 'Imprima' => 'Imprima', 'Inconsolata' => 'Inconsolata', 'Inder' => 'Inder', 'Indie Flower' => 'Indie Flower', 'Inika' => 'Inika', 'Irish Grover' => 'Irish Grover', 'Istok Web' => 'Istok Web', 'Italiana' => 'Italiana', 'Italianno' => 'Italianno', 'Jacques Francois' => 'Jacques Francois', 'Jacques Francois Shadow' => 'Jacques Francois Shadow', 'Jim Nightshade' => 'Jim Nightshade', 'Jockey One' => 'Jockey One', 'Jolly Lodger' => 'Jolly Lodger', 'Josefin Sans' => 'Josefin Sans', 'Josefin Slab' => 'Josefin Slab', 'Joti One' => 'Joti One', 'Judson' => 'Judson', 'Julee' => 'Julee', 'Julius Sans One' => 'Julius Sans One', 'Junge' => 'Junge', 'Jura' => 'Jura', 'Just Another Hand' => 'Just Another Hand', 'Just Me Again Down Here' => 'Just Me Again Down Here', 'Kameron' => 'Kameron', 'Karla' => 'Karla', 'Kaushan Script' => 'Kaushan Script', 'Kavoon' => 'Kavoon', 'Keania One' => 'Keania One', 'Kelly Slab' => 'Kelly Slab', 'Kenia' => 'Kenia', 'Khmer' => 'Khmer', 'Kite One' => 'Kite One', 'Knewave' => 'Knewave', 'Kotta One' => 'Kotta One', 'Koulen' => 'Koulen', 'Kranky' => 'Kranky', 'Kreon' => 'Kreon', 'Kristi' => 'Kristi', 'Krona One' => 'Krona One', 'La Belle Aurore' => 'La Belle Aurore', 'Lancelot' => 'Lancelot', 'Lato' => 'Lato', 'League Script' => 'League Script', 'Leckerli One' => 'Leckerli One', 'Ledger' => 'Ledger', 'Lekton' => 'Lekton', 'Lemon' => 'Lemon', 'Libre Baskerville' => 'Libre Baskerville', 'Life Savers' => 'Life Savers', 'Lilita One' => 'Lilita One', 'Limelight' => 'Limelight', 'Linden Hill' => 'Linden Hill', 'Lobster' => 'Lobster', 'Lobster Two' => 'Lobster Two', 'Londrina Outline' => 'Londrina Outline', 'Londrina Shadow' => 'Londrina Shadow', 'Londrina Sketch' => 'Londrina Sketch', 'Londrina Solid' => 'Londrina Solid', 'Lora' => 'Lora', 'Love Ya Like A Sister' => 'Love Ya Like A Sister', 'Loved by the King' => 'Loved by the King', 'Lovers Quarrel' => 'Lovers Quarrel', 'Luckiest Guy' => 'Luckiest Guy', 'Lusitana' => 'Lusitana', 'Lustria' => 'Lustria', 'Macondo' => 'Macondo', 'Macondo Swash Caps' => 'Macondo Swash Caps', 'Magra' => 'Magra', 'Maiden Orange' => 'Maiden Orange', 'Mako' => 'Mako', 'Marcellus' => 'Marcellus', 'Marcellus SC' => 'Marcellus SC', 'Marck Script' => 'Marck Script', 'Margarine' => 'Margarine', 'Marko One' => 'Marko One', 'Marmelad' => 'Marmelad', 'Marvel' => 'Marvel', 'Mate' => 'Mate', 'Mate SC' => 'Mate SC', 'Maven Pro' => 'Maven Pro', 'McLaren' => 'McLaren', 'Meddon' => 'Meddon', 'MedievalSharp' => 'MedievalSharp', 'Medula One' => 'Medula One', 'Megrim' => 'Megrim', 'Meie Script' => 'Meie Script', 'Merienda' => 'Merienda', 'Merienda One' => 'Merienda One', 'Merriweather' => 'Merriweather', 'Merriweather Sans' => 'Merriweather Sans', 'Metal' => 'Metal', 'Metal Mania' => 'Metal Mania', 'Metamorphous' => 'Metamorphous', 'Metrophobic' => 'Metrophobic', 'Michroma' => 'Michroma', 'Milonga' => 'Milonga', 'Miltonian' => 'Miltonian', 'Miltonian Tattoo' => 'Miltonian Tattoo', 'Miniver' => 'Miniver', 'Miss Fajardose' => 'Miss Fajardose', 'Modern Antiqua' => 'Modern Antiqua', 'Molengo' => 'Molengo', 'Molle' => 'Molle', 'Monda' => 'Monda', 'Monofett' => 'Monofett', 'Monoton' => 'Monoton', 'Monsieur La Doulaise' => 'Monsieur La Doulaise', 'Montaga' => 'Montaga', 'Montez' => 'Montez', 'Montserrat' => 'Montserrat', 'Montserrat Alternates' => 'Montserrat Alternates', 'Montserrat Subrayada' => 'Montserrat Subrayada', 'Moul' => 'Moul', 'Moulpali' => 'Moulpali', 'Mountains of Christmas' => 'Mountains of Christmas', 'Mouse Memoirs' => 'Mouse Memoirs', 'Mr Bedfort' => 'Mr Bedfort', 'Mr Dafoe' => 'Mr Dafoe', 'Mr De Haviland' => 'Mr De Haviland', 'Mrs Saint Delafield' => 'Mrs Saint Delafield', 'Mrs Sheppards' => 'Mrs Sheppards', 'Muli' => 'Muli', 'Mystery Quest' => 'Mystery Quest', 'Neucha' => 'Neucha', 'Neuton' => 'Neuton', 'New Rocker' => 'New Rocker', 'News Cycle' => 'News Cycle', 'Niconne' => 'Niconne', 'Nixie One' => 'Nixie One', 'Nobile' => 'Nobile', 'Nokora' => 'Nokora', 'Norican' => 'Norican', 'Nosifer' => 'Nosifer', 'Nothing You Could Do' => 'Nothing You Could Do', 'Noticia Text' => 'Noticia Text', 'Noto Sans' => 'Noto Sans', 'Noto Serif' => 'Noto Serif', 'Nova Cut' => 'Nova Cut', 'Nova Flat' => 'Nova Flat', 'Nova Mono' => 'Nova Mono', 'Nova Oval' => 'Nova Oval', 'Nova Round' => 'Nova Round', 'Nova Script' => 'Nova Script', 'Nova Slim' => 'Nova Slim', 'Nova Square' => 'Nova Square', 'Numans' => 'Numans', 'Nunito' => 'Nunito', 'Odor Mean Chey' => 'Odor Mean Chey', 'Offside' => 'Offside', 'Old Standard TT' => 'Old Standard TT', 'Oldenburg' => 'Oldenburg', 'Oleo Script' => 'Oleo Script', 'Oleo Script Swash Caps' => 'Oleo Script Swash Caps', 'Open Sans' => 'Open Sans', 'Open Sans Condensed' => 'Open Sans Condensed', 'Oranienbaum' => 'Oranienbaum', 'Orbitron' => 'Orbitron', 'Oregano' => 'Oregano', 'Orienta' => 'Orienta', 'Original Surfer' => 'Original Surfer', 'Oswald' => 'Oswald', 'Over the Rainbow' => 'Over the Rainbow', 'Overlock' => 'Overlock', 'Overlock SC' => 'Overlock SC', 'Ovo' => 'Ovo', 'Oxygen' => 'Oxygen', 'Oxygen Mono' => 'Oxygen Mono', 'PT Mono' => 'PT Mono', 'PT Sans' => 'PT Sans', 'PT Sans Caption' => 'PT Sans Caption', 'PT Sans Narrow' => 'PT Sans Narrow', 'PT Serif' => 'PT Serif', 'PT Serif Caption' => 'PT Serif Caption', 'Pacifico' => 'Pacifico', 'Paprika' => 'Paprika', 'Parisienne' => 'Parisienne', 'Passero One' => 'Passero One', 'Passion One' => 'Passion One', 'Patrick Hand' => 'Patrick Hand', 'Patrick Hand SC' => 'Patrick Hand SC', 'Patua One' => 'Patua One', 'Paytone One' => 'Paytone One', 'Peralta' => 'Peralta', 'Permanent Marker' => 'Permanent Marker', 'Petit Formal Script' => 'Petit Formal Script', 'Petrona' => 'Petrona', 'Philosopher' => 'Philosopher', 'Piedra' => 'Piedra', 'Pinyon Script' => 'Pinyon Script', 'Pirata One' => 'Pirata One', 'Plaster' => 'Plaster', 'Play' => 'Play', 'Playball' => 'Playball', 'Playfair Display' => 'Playfair Display', 'Playfair Display SC' => 'Playfair Display SC', 'Podkova' => 'Podkova', 'Poiret One' => 'Poiret One', 'Poller One' => 'Poller One', 'Poly' => 'Poly', 'Pompiere' => 'Pompiere', 'Pontano Sans' => 'Pontano Sans', 'Port Lligat Sans' => 'Port Lligat Sans', 'Port Lligat Slab' => 'Port Lligat Slab', 'Prata' => 'Prata', 'Preahvihear' => 'Preahvihear', 'Press Start 2P' => 'Press Start 2P', 'Princess Sofia' => 'Princess Sofia', 'Prociono' => 'Prociono', 'Prosto One' => 'Prosto One', 'Puritan' => 'Puritan', 'Purple Purse' => 'Purple Purse', 'Quando' => 'Quando', 'Quantico' => 'Quantico', 'Quattrocento' => 'Quattrocento', 'Quattrocento Sans' => 'Quattrocento Sans', 'Questrial' => 'Questrial', 'Quicksand' => 'Quicksand', 'Quintessential' => 'Quintessential', 'Qwigley' => 'Qwigley', 'Racing Sans One' => 'Racing Sans One', 'Radley' => 'Radley', 'Raleway' => 'Raleway', 'Raleway Dots' => 'Raleway Dots', 'Rambla' => 'Rambla', 'Rammetto One' => 'Rammetto One', 'Ranchers' => 'Ranchers', 'Rancho' => 'Rancho', 'Rationale' => 'Rationale', 'Redressed' => 'Redressed', 'Reenie Beanie' => 'Reenie Beanie', 'Revalia' => 'Revalia', 'Ribeye' => 'Ribeye', 'Ribeye Marrow' => 'Ribeye Marrow', 'Righteous' => 'Righteous', 'Risque' => 'Risque', 'Roboto' => 'Roboto', 'Roboto Condensed' => 'Roboto Condensed', 'Rochester' => 'Rochester', 'Rock Salt' => 'Rock Salt', 'Rokkitt' => 'Rokkitt', 'Romanesco' => 'Romanesco', 'Ropa Sans' => 'Ropa Sans', 'Rosario' => 'Rosario', 'Rosarivo' => 'Rosarivo', 'Rouge Script' => 'Rouge Script', 'Ruda' => 'Ruda', 'Rufina' => 'Rufina', 'Ruge Boogie' => 'Ruge Boogie', 'Ruluko' => 'Ruluko', 'Rum Raisin' => 'Rum Raisin', 'Ruslan Display' => 'Ruslan Display', 'Russo One' => 'Russo One', 'Ruthie' => 'Ruthie', 'Rye' => 'Rye', 'Sacramento' => 'Sacramento', 'Sail' => 'Sail', 'Salsa' => 'Salsa', 'Sanchez' => 'Sanchez', 'Sancreek' => 'Sancreek', 'Sansita One' => 'Sansita One', 'Sarina' => 'Sarina', 'Satisfy' => 'Satisfy', 'Scada' => 'Scada', 'Schoolbell' => 'Schoolbell', 'Seaweed Script' => 'Seaweed Script', 'Sevillana' => 'Sevillana', 'Seymour One' => 'Seymour One', 'Shadows Into Light' => 'Shadows Into Light', 'Shadows Into Light Two' => 'Shadows Into Light Two', 'Shanti' => 'Shanti', 'Share' => 'Share', 'Share Tech' => 'Share Tech', 'Share Tech Mono' => 'Share Tech Mono', 'Shojumaru' => 'Shojumaru', 'Short Stack' => 'Short Stack', 'Siemreap' => 'Siemreap', 'Sigmar One' => 'Sigmar One', 'Signika' => 'Signika', 'Signika Negative' => 'Signika Negative', 'Simonetta' => 'Simonetta', 'Sintony' => 'Sintony', 'Sirin Stencil' => 'Sirin Stencil', 'Six Caps' => 'Six Caps', 'Skranji' => 'Skranji', 'Slackey' => 'Slackey', 'Smokum' => 'Smokum', 'Smythe' => 'Smythe', 'Sniglet' => 'Sniglet', 'Snippet' => 'Snippet', 'Snowburst One' => 'Snowburst One', 'Sofadi One' => 'Sofadi One', 'Sofia' => 'Sofia', 'Sonsie One' => 'Sonsie One', 'Sorts Mill Goudy' => 'Sorts Mill Goudy', 'Source Code Pro' => 'Source Code Pro', 'Source Sans Pro' => 'Source Sans Pro', 'Special Elite' => 'Special Elite', 'Spicy Rice' => 'Spicy Rice', 'Spinnaker' => 'Spinnaker', 'Spirax' => 'Spirax', 'Squada One' => 'Squada One', 'Stalemate' => 'Stalemate', 'Stalinist One' => 'Stalinist One', 'Stardos Stencil' => 'Stardos Stencil', 'Stint Ultra Condensed' => 'Stint Ultra Condensed', 'Stint Ultra Expanded' => 'Stint Ultra Expanded', 'Stoke' => 'Stoke', 'Strait' => 'Strait', 'Sue Ellen Francisco' => 'Sue Ellen Francisco', 'Sunshiney' => 'Sunshiney', 'Supermercado One' => 'Supermercado One', 'Suwannaphum' => 'Suwannaphum', 'Swanky and Moo Moo' => 'Swanky and Moo Moo', 'Syncopate' => 'Syncopate', 'Tangerine' => 'Tangerine', 'Taprom' => 'Taprom', 'Tauri' => 'Tauri', 'Telex' => 'Telex', 'Tenor Sans' => 'Tenor Sans', 'Text Me One' => 'Text Me One', 'The Girl Next Door' => 'The Girl Next Door', 'Tienne' => 'Tienne', 'Tinos' => 'Tinos', 'Titan One' => 'Titan One', 'Titillium Web' => 'Titillium Web', 'Trade Winds' => 'Trade Winds', 'Trocchi' => 'Trocchi', 'Trochut' => 'Trochut', 'Trykker' => 'Trykker', 'Tulpen One' => 'Tulpen One', 'Ubuntu' => 'Ubuntu', 'Ubuntu Condensed' => 'Ubuntu Condensed', 'Ubuntu Mono' => 'Ubuntu Mono', 'Ultra' => 'Ultra', 'Uncial Antiqua' => 'Uncial Antiqua', 'Underdog' => 'Underdog', 'Unica One' => 'Unica One', 'UnifrakturCook' => 'UnifrakturCook', 'UnifrakturMaguntia' => 'UnifrakturMaguntia', 'Unkempt' => 'Unkempt', 'Unlock' => 'Unlock', 'Unna' => 'Unna', 'VT323' => 'VT323', 'Vampiro One' => 'Vampiro One', 'Varela' => 'Varela', 'Varela Round' => 'Varela Round', 'Vast Shadow' => 'Vast Shadow', 'Vibur' => 'Vibur', 'Vidaloka' => 'Vidaloka', 'Viga' => 'Viga', 'Voces' => 'Voces', 'Volkhov' => 'Volkhov', 'Vollkorn' => 'Vollkorn', 'Voltaire' => 'Voltaire', 'Waiting for the Sunrise' => 'Waiting for the Sunrise', 'Wallpoet' => 'Wallpoet', 'Walter Turncoat' => 'Walter Turncoat', 'Warnes' => 'Warnes', 'Wellfleet' => 'Wellfleet', 'Wendy One' => 'Wendy One', 'Wire One' => 'Wire One', 'Yanone Kaffeesatz' => 'Yanone Kaffeesatz', 'Yellowtail' => 'Yellowtail', 'Yeseva One' => 'Yeseva One', 'Yesteryear' => 'Yesteryear', 'Zeyada' => 'Zeyada');
5
- return array('none' => 'Default Font', 'ABeeZee' => 'ABeeZee', 'Abel' => 'Abel', 'Abril Fatface' => 'Abril Fatface', 'Aclonica' => 'Aclonica', 'Acme' => 'Acme', 'Actor' => 'Actor', 'Adamina' => 'Adamina', 'Advent Pro' => 'Advent Pro', 'Aguafina Script' => 'Aguafina Script', 'Akronim' => 'Akronim', 'Aladin' => 'Aladin', 'Aldrich' => 'Aldrich', 'Alef' => 'Alef', 'Alegreya' => 'Alegreya', 'Alegreya SC' => 'Alegreya SC', 'Alegreya Sans' => 'Alegreya Sans', 'Alegreya Sans SC' => 'Alegreya Sans SC', 'Alex Brush' => 'Alex Brush', 'Alfa Slab One' => 'Alfa Slab One', 'Alice' => 'Alice', 'Alike' => 'Alike', 'Alike Angular' => 'Alike Angular', 'Allan' => 'Allan', 'Allerta' => 'Allerta', 'Allerta Stencil' => 'Allerta Stencil', 'Allura' => 'Allura', 'Almendra' => 'Almendra', 'Almendra Display' => 'Almendra Display', 'Almendra SC' => 'Almendra SC', 'Amarante' => 'Amarante', 'Amaranth' => 'Amaranth', 'Amatic SC' => 'Amatic SC', 'Amethysta' => 'Amethysta', 'Anaheim' => 'Anaheim', 'Andada' => 'Andada', 'Andika' => 'Andika', 'Angkor' => 'Angkor', 'Annie Use Your Telescope' => 'Annie Use Your Telescope', 'Anonymous Pro' => 'Anonymous Pro', 'Antic' => 'Antic', 'Antic Didone' => 'Antic Didone', 'Antic Slab' => 'Antic Slab', 'Anton' => 'Anton', 'Arapey' => 'Arapey', 'Arbutus' => 'Arbutus', 'Arbutus Slab' => 'Arbutus Slab', 'Architects Daughter' => 'Architects Daughter', 'Archivo Black' => 'Archivo Black', 'Archivo Narrow' => 'Archivo Narrow', 'Arimo' => 'Arimo', 'Arizonia' => 'Arizonia', 'Armata' => 'Armata', 'Artifika' => 'Artifika', 'Arvo' => 'Arvo', 'Asap' => 'Asap', 'Asset' => 'Asset', 'Astloch' => 'Astloch', 'Asul' => 'Asul', 'Atomic Age' => 'Atomic Age', 'Aubrey' => 'Aubrey', 'Audiowide' => 'Audiowide', 'Autour One' => 'Autour One', 'Average' => 'Average', 'Average Sans' => 'Average Sans', 'Averia Gruesa Libre' => 'Averia Gruesa Libre', 'Averia Libre' => 'Averia Libre', 'Averia Sans Libre' => 'Averia Sans Libre', 'Averia Serif Libre' => 'Averia Serif Libre', 'Bad Script' => 'Bad Script', 'Balthazar' => 'Balthazar', 'Bangers' => 'Bangers', 'Basic' => 'Basic', 'Battambang' => 'Battambang', 'Baumans' => 'Baumans', 'Bayon' => 'Bayon', 'Belgrano' => 'Belgrano', 'Belleza' => 'Belleza', 'BenchNine' => 'BenchNine', 'Bentham' => 'Bentham', 'Berkshire Swash' => 'Berkshire Swash', 'Bevan' => 'Bevan', 'Bigelow Rules' => 'Bigelow Rules', 'Bigshot One' => 'Bigshot One', 'Bilbo' => 'Bilbo', 'Bilbo Swash Caps' => 'Bilbo Swash Caps', 'Bitter' => 'Bitter', 'Black Ops One' => 'Black Ops One', 'Bokor' => 'Bokor', 'Bonbon' => 'Bonbon', 'Boogaloo' => 'Boogaloo', 'Bowlby One' => 'Bowlby One', 'Bowlby One SC' => 'Bowlby One SC', 'Brawler' => 'Brawler', 'Bree Serif' => 'Bree Serif', 'Bubblegum Sans' => 'Bubblegum Sans', 'Bubbler One' => 'Bubbler One', 'Buda' => 'Buda', 'Buenard' => 'Buenard', 'Butcherman' => 'Butcherman', 'Butterfly Kids' => 'Butterfly Kids', 'Cabin' => 'Cabin', 'Cabin Condensed' => 'Cabin Condensed', 'Cabin Sketch' => 'Cabin Sketch', 'Caesar Dressing' => 'Caesar Dressing', 'Cagliostro' => 'Cagliostro', 'Calligraffitti' => 'Calligraffitti', 'Cambo' => 'Cambo', 'Candal' => 'Candal', 'Cantarell' => 'Cantarell', 'Cantata One' => 'Cantata One', 'Cantora One' => 'Cantora One', 'Capriola' => 'Capriola', 'Cardo' => 'Cardo', 'Carme' => 'Carme', 'Carrois Gothic' => 'Carrois Gothic', 'Carrois Gothic SC' => 'Carrois Gothic SC', 'Carter One' => 'Carter One', 'Caudex' => 'Caudex', 'Cedarville Cursive' => 'Cedarville Cursive', 'Ceviche One' => 'Ceviche One', 'Changa One' => 'Changa One', 'Chango' => 'Chango', 'Chau Philomene One' => 'Chau Philomene One', 'Chela One' => 'Chela One', 'Chelsea Market' => 'Chelsea Market', 'Chenla' => 'Chenla', 'Cherry Cream Soda' => 'Cherry Cream Soda', 'Cherry Swash' => 'Cherry Swash', 'Chewy' => 'Chewy', 'Chicle' => 'Chicle', 'Chivo' => 'Chivo', 'Cinzel' => 'Cinzel', 'Cinzel Decorative' => 'Cinzel Decorative', 'Clicker Script' => 'Clicker Script', 'Coda' => 'Coda', 'Coda Caption' => 'Coda Caption', 'Codystar' => 'Codystar', 'Combo' => 'Combo', 'Comfortaa' => 'Comfortaa', 'Coming Soon' => 'Coming Soon', 'Concert One' => 'Concert One', 'Condiment' => 'Condiment', 'Content' => 'Content', 'Contrail One' => 'Contrail One', 'Convergence' => 'Convergence', 'Cookie' => 'Cookie', 'Copse' => 'Copse', 'Corben' => 'Corben', 'Courgette' => 'Courgette', 'Cousine' => 'Cousine', 'Coustard' => 'Coustard', 'Covered By Your Grace' => 'Covered By Your Grace', 'Crafty Girls' => 'Crafty Girls', 'Creepster' => 'Creepster', 'Crete Round' => 'Crete Round', 'Crimson Text' => 'Crimson Text', 'Croissant One' => 'Croissant One', 'Crushed' => 'Crushed', 'Cuprum' => 'Cuprum', 'Cutive' => 'Cutive', 'Cutive Mono' => 'Cutive Mono', 'Damion' => 'Damion', 'Dancing Script' => 'Dancing Script', 'Dangrek' => 'Dangrek', 'Dawning of a New Day' => 'Dawning of a New Day', 'Days One' => 'Days One', 'Delius' => 'Delius', 'Delius Swash Caps' => 'Delius Swash Caps', 'Delius Unicase' => 'Delius Unicase', 'Della Respira' => 'Della Respira', 'Denk One' => 'Denk One', 'Devonshire' => 'Devonshire', 'Didact Gothic' => 'Didact Gothic', 'Diplomata' => 'Diplomata', 'Diplomata SC' => 'Diplomata SC', 'Domine' => 'Domine', 'Donegal One' => 'Donegal One', 'Doppio One' => 'Doppio One', 'Dorsa' => 'Dorsa', 'Dosis' => 'Dosis', 'Dr Sugiyama' => 'Dr Sugiyama', 'Droid Sans' => 'Droid Sans', 'Droid Sans Mono' => 'Droid Sans Mono', 'Droid Serif' => 'Droid Serif', 'Duru Sans' => 'Duru Sans', 'Dynalight' => 'Dynalight', 'EB Garamond' => 'EB Garamond', 'Eagle Lake' => 'Eagle Lake', 'Eater' => 'Eater', 'Economica' => 'Economica', 'Ek Mukta' => 'Ek Mukta', 'Electrolize' => 'Electrolize', 'Elsie' => 'Elsie', 'Elsie Swash Caps' => 'Elsie Swash Caps', 'Emblema One' => 'Emblema One', 'Emilys Candy' => 'Emilys Candy', 'Engagement' => 'Engagement', 'Englebert' => 'Englebert', 'Enriqueta' => 'Enriqueta', 'Erica One' => 'Erica One', 'Esteban' => 'Esteban', 'Euphoria Script' => 'Euphoria Script', 'Ewert' => 'Ewert', 'Exo' => 'Exo', 'Exo 2' => 'Exo 2', 'Expletus Sans' => 'Expletus Sans', 'Fanwood Text' => 'Fanwood Text', 'Fascinate' => 'Fascinate', 'Fascinate Inline' => 'Fascinate Inline', 'Faster One' => 'Faster One', 'Fasthand' => 'Fasthand', 'Fauna One' => 'Fauna One', 'Federant' => 'Federant', 'Federo' => 'Federo', 'Felipa' => 'Felipa', 'Fenix' => 'Fenix', 'Finger Paint' => 'Finger Paint', 'Fira Mono' => 'Fira Mono', 'Fira Sans' => 'Fira Sans', 'Fjalla One' => 'Fjalla One', 'Fjord One' => 'Fjord One', 'Flamenco' => 'Flamenco', 'Flavors' => 'Flavors', 'Fondamento' => 'Fondamento', 'Fontdiner Swanky' => 'Fontdiner Swanky', 'Forum' => 'Forum', 'Francois One' => 'Francois One', 'Freckle Face' => 'Freckle Face', 'Fredericka the Great' => 'Fredericka the Great', 'Fredoka One' => 'Fredoka One', 'Freehand' => 'Freehand', 'Fresca' => 'Fresca', 'Frijole' => 'Frijole', 'Fruktur' => 'Fruktur', 'Fugaz One' => 'Fugaz One', 'GFS Didot' => 'GFS Didot', 'GFS Neohellenic' => 'GFS Neohellenic', 'Gabriela' => 'Gabriela', 'Gafata' => 'Gafata', 'Galdeano' => 'Galdeano', 'Galindo' => 'Galindo', 'Gentium Basic' => 'Gentium Basic', 'Gentium Book Basic' => 'Gentium Book Basic', 'Geo' => 'Geo', 'Geostar' => 'Geostar', 'Geostar Fill' => 'Geostar Fill', 'Germania One' => 'Germania One', 'Gilda Display' => 'Gilda Display', 'Give You Glory' => 'Give You Glory', 'Glass Antiqua' => 'Glass Antiqua', 'Glegoo' => 'Glegoo', 'Gloria Hallelujah' => 'Gloria Hallelujah', 'Goblin One' => 'Goblin One', 'Gochi Hand' => 'Gochi Hand', 'Gorditas' => 'Gorditas', 'Goudy Bookletter 1911' => 'Goudy Bookletter 1911', 'Graduate' => 'Graduate', 'Grand Hotel' => 'Grand Hotel', 'Gravitas One' => 'Gravitas One', 'Great Vibes' => 'Great Vibes', 'Griffy' => 'Griffy', 'Gruppo' => 'Gruppo', 'Gudea' => 'Gudea', 'Habibi' => 'Habibi', 'Halant' => 'Halant', 'Hammersmith One' => 'Hammersmith One', 'Hanalei' => 'Hanalei', 'Hanalei Fill' => 'Hanalei Fill', 'Handlee' => 'Handlee', 'Hanuman' => 'Hanuman', 'Happy Monkey' => 'Happy Monkey', 'Headland One' => 'Headland One', 'Henny Penny' => 'Henny Penny', 'Herr Von Muellerhoff' => 'Herr Von Muellerhoff', 'Hind' => 'Hind', 'Holtwood One SC' => 'Holtwood One SC', 'Homemade Apple' => 'Homemade Apple', 'Homenaje' => 'Homenaje', 'IM Fell DW Pica' => 'IM Fell DW Pica', 'IM Fell DW Pica SC' => 'IM Fell DW Pica SC', 'IM Fell Double Pica' => 'IM Fell Double Pica', 'IM Fell Double Pica SC' => 'IM Fell Double Pica SC', 'IM Fell English' => 'IM Fell English', 'IM Fell English SC' => 'IM Fell English SC', 'IM Fell French Canon' => 'IM Fell French Canon', 'IM Fell French Canon SC' => 'IM Fell French Canon SC', 'IM Fell Great Primer' => 'IM Fell Great Primer', 'IM Fell Great Primer SC' => 'IM Fell Great Primer SC', 'Iceberg' => 'Iceberg', 'Iceland' => 'Iceland', 'Imprima' => 'Imprima', 'Inconsolata' => 'Inconsolata', 'Inder' => 'Inder', 'Indie Flower' => 'Indie Flower', 'Inika' => 'Inika', 'Irish Grover' => 'Irish Grover', 'Istok Web' => 'Istok Web', 'Italiana' => 'Italiana', 'Italianno' => 'Italianno', 'Jacques Francois' => 'Jacques Francois', 'Jacques Francois Shadow' => 'Jacques Francois Shadow', 'Jim Nightshade' => 'Jim Nightshade', 'Jockey One' => 'Jockey One', 'Jolly Lodger' => 'Jolly Lodger', 'Josefin Sans' => 'Josefin Sans', 'Josefin Slab' => 'Josefin Slab', 'Joti One' => 'Joti One', 'Judson' => 'Judson', 'Julee' => 'Julee', 'Julius Sans One' => 'Julius Sans One', 'Junge' => 'Junge', 'Jura' => 'Jura', 'Just Another Hand' => 'Just Another Hand', 'Just Me Again Down Here' => 'Just Me Again Down Here', 'Kalam' => 'Kalam', 'Kameron' => 'Kameron', 'Kantumruy' => 'Kantumruy', 'Karla' => 'Karla', 'Karma' => 'Karma', 'Kaushan Script' => 'Kaushan Script', 'Kavoon' => 'Kavoon', 'Kdam Thmor' => 'Kdam Thmor', 'Keania One' => 'Keania One', 'Kelly Slab' => 'Kelly Slab', 'Kenia' => 'Kenia', 'Khand' => 'Khand', 'Khmer' => 'Khmer', 'Kite One' => 'Kite One', 'Knewave' => 'Knewave', 'Kotta One' => 'Kotta One', 'Koulen' => 'Koulen', 'Kranky' => 'Kranky', 'Kreon' => 'Kreon', 'Kristi' => 'Kristi', 'Krona One' => 'Krona One', 'La Belle Aurore' => 'La Belle Aurore', 'Laila' => 'Laila', 'Lancelot' => 'Lancelot', 'Lato' => 'Lato', 'League Script' => 'League Script', 'Leckerli One' => 'Leckerli One', 'Ledger' => 'Ledger', 'Lekton' => 'Lekton', 'Lemon' => 'Lemon', 'Libre Baskerville' => 'Libre Baskerville', 'Life Savers' => 'Life Savers', 'Lilita One' => 'Lilita One', 'Lily Script One' => 'Lily Script One', 'Limelight' => 'Limelight', 'Linden Hill' => 'Linden Hill', 'Lobster' => 'Lobster', 'Lobster Two' => 'Lobster Two', 'Londrina Outline' => 'Londrina Outline', 'Londrina Shadow' => 'Londrina Shadow', 'Londrina Sketch' => 'Londrina Sketch', 'Londrina Solid' => 'Londrina Solid', 'Lora' => 'Lora', 'Love Ya Like A Sister' => 'Love Ya Like A Sister', 'Loved by the King' => 'Loved by the King', 'Lovers Quarrel' => 'Lovers Quarrel', 'Luckiest Guy' => 'Luckiest Guy', 'Lusitana' => 'Lusitana', 'Lustria' => 'Lustria', 'Macondo' => 'Macondo', 'Macondo Swash Caps' => 'Macondo Swash Caps', 'Magra' => 'Magra', 'Maiden Orange' => 'Maiden Orange', 'Mako' => 'Mako', 'Marcellus' => 'Marcellus', 'Marcellus SC' => 'Marcellus SC', 'Marck Script' => 'Marck Script', 'Margarine' => 'Margarine', 'Marko One' => 'Marko One', 'Marmelad' => 'Marmelad', 'Marvel' => 'Marvel', 'Mate' => 'Mate', 'Mate SC' => 'Mate SC', 'Maven Pro' => 'Maven Pro', 'McLaren' => 'McLaren', 'Meddon' => 'Meddon', 'MedievalSharp' => 'MedievalSharp', 'Medula One' => 'Medula One', 'Megrim' => 'Megrim', 'Meie Script' => 'Meie Script', 'Merienda' => 'Merienda', 'Merienda One' => 'Merienda One', 'Merriweather' => 'Merriweather', 'Merriweather Sans' => 'Merriweather Sans', 'Metal' => 'Metal', 'Metal Mania' => 'Metal Mania', 'Metamorphous' => 'Metamorphous', 'Metrophobic' => 'Metrophobic', 'Michroma' => 'Michroma', 'Milonga' => 'Milonga', 'Miltonian' => 'Miltonian', 'Miltonian Tattoo' => 'Miltonian Tattoo', 'Miniver' => 'Miniver', 'Miss Fajardose' => 'Miss Fajardose', 'Modern Antiqua' => 'Modern Antiqua', 'Molengo' => 'Molengo', 'Molle' => 'Molle', 'Monda' => 'Monda', 'Monofett' => 'Monofett', 'Monoton' => 'Monoton', 'Monsieur La Doulaise' => 'Monsieur La Doulaise', 'Montaga' => 'Montaga', 'Montez' => 'Montez', 'Montserrat' => 'Montserrat', 'Montserrat Alternates' => 'Montserrat Alternates', 'Montserrat Subrayada' => 'Montserrat Subrayada', 'Moul' => 'Moul', 'Moulpali' => 'Moulpali', 'Mountains of Christmas' => 'Mountains of Christmas', 'Mouse Memoirs' => 'Mouse Memoirs', 'Mr Bedfort' => 'Mr Bedfort', 'Mr Dafoe' => 'Mr Dafoe', 'Mr De Haviland' => 'Mr De Haviland', 'Mrs Saint Delafield' => 'Mrs Saint Delafield', 'Mrs Sheppards' => 'Mrs Sheppards', 'Muli' => 'Muli', 'Mystery Quest' => 'Mystery Quest', 'Neucha' => 'Neucha', 'Neuton' => 'Neuton', 'New Rocker' => 'New Rocker', 'News Cycle' => 'News Cycle', 'Niconne' => 'Niconne', 'Nixie One' => 'Nixie One', 'Nobile' => 'Nobile', 'Nokora' => 'Nokora', 'Norican' => 'Norican', 'Nosifer' => 'Nosifer', 'Nothing You Could Do' => 'Nothing You Could Do', 'Noticia Text' => 'Noticia Text', 'Noto Sans' => 'Noto Sans', 'Noto Serif' => 'Noto Serif', 'Nova Cut' => 'Nova Cut', 'Nova Flat' => 'Nova Flat', 'Nova Mono' => 'Nova Mono', 'Nova Oval' => 'Nova Oval', 'Nova Round' => 'Nova Round', 'Nova Script' => 'Nova Script', 'Nova Slim' => 'Nova Slim', 'Nova Square' => 'Nova Square', 'Numans' => 'Numans', 'Nunito' => 'Nunito', 'Odor Mean Chey' => 'Odor Mean Chey', 'Offside' => 'Offside', 'Old Standard TT' => 'Old Standard TT', 'Oldenburg' => 'Oldenburg', 'Oleo Script' => 'Oleo Script', 'Oleo Script Swash Caps' => 'Oleo Script Swash Caps', 'Open Sans' => 'Open Sans', 'Open Sans Condensed' => 'Open Sans Condensed', 'Oranienbaum' => 'Oranienbaum', 'Orbitron' => 'Orbitron', 'Oregano' => 'Oregano', 'Orienta' => 'Orienta', 'Original Surfer' => 'Original Surfer', 'Oswald' => 'Oswald', 'Over the Rainbow' => 'Over the Rainbow', 'Overlock' => 'Overlock', 'Overlock SC' => 'Overlock SC', 'Ovo' => 'Ovo', 'Oxygen' => 'Oxygen', 'Oxygen Mono' => 'Oxygen Mono', 'PT Mono' => 'PT Mono', 'PT Sans' => 'PT Sans', 'PT Sans Caption' => 'PT Sans Caption', 'PT Sans Narrow' => 'PT Sans Narrow', 'PT Serif' => 'PT Serif', 'PT Serif Caption' => 'PT Serif Caption', 'Pacifico' => 'Pacifico', 'Paprika' => 'Paprika', 'Parisienne' => 'Parisienne', 'Passero One' => 'Passero One', 'Passion One' => 'Passion One', 'Pathway Gothic One' => 'Pathway Gothic One', 'Patrick Hand' => 'Patrick Hand', 'Patrick Hand SC' => 'Patrick Hand SC', 'Patua One' => 'Patua One', 'Paytone One' => 'Paytone One', 'Peralta' => 'Peralta', 'Permanent Marker' => 'Permanent Marker', 'Petit Formal Script' => 'Petit Formal Script', 'Petrona' => 'Petrona', 'Philosopher' => 'Philosopher', 'Piedra' => 'Piedra', 'Pinyon Script' => 'Pinyon Script', 'Pirata One' => 'Pirata One', 'Plaster' => 'Plaster', 'Play' => 'Play', 'Playball' => 'Playball', 'Playfair Display' => 'Playfair Display', 'Playfair Display SC' => 'Playfair Display SC', 'Podkova' => 'Podkova', 'Poiret One' => 'Poiret One', 'Poller One' => 'Poller One', 'Poly' => 'Poly', 'Pompiere' => 'Pompiere', 'Pontano Sans' => 'Pontano Sans', 'Port Lligat Sans' => 'Port Lligat Sans', 'Port Lligat Slab' => 'Port Lligat Slab', 'Prata' => 'Prata', 'Preahvihear' => 'Preahvihear', 'Press Start 2P' => 'Press Start 2P', 'Princess Sofia' => 'Princess Sofia', 'Prociono' => 'Prociono', 'Prosto One' => 'Prosto One', 'Puritan' => 'Puritan', 'Purple Purse' => 'Purple Purse', 'Quando' => 'Quando', 'Quantico' => 'Quantico', 'Quattrocento' => 'Quattrocento', 'Quattrocento Sans' => 'Quattrocento Sans', 'Questrial' => 'Questrial', 'Quicksand' => 'Quicksand', 'Quintessential' => 'Quintessential', 'Qwigley' => 'Qwigley', 'Racing Sans One' => 'Racing Sans One', 'Radley' => 'Radley', 'Rajdhani' => 'Rajdhani', 'Raleway' => 'Raleway', 'Raleway Dots' => 'Raleway Dots', 'Rambla' => 'Rambla', 'Rammetto One' => 'Rammetto One', 'Ranchers' => 'Ranchers', 'Rancho' => 'Rancho', 'Rationale' => 'Rationale', 'Redressed' => 'Redressed', 'Reenie Beanie' => 'Reenie Beanie', 'Revalia' => 'Revalia', 'Ribeye' => 'Ribeye', 'Ribeye Marrow' => 'Ribeye Marrow', 'Righteous' => 'Righteous', 'Risque' => 'Risque', 'Roboto' => 'Roboto', 'Roboto Condensed' => 'Roboto Condensed', 'Roboto Slab' => 'Roboto Slab', 'Rochester' => 'Rochester', 'Rock Salt' => 'Rock Salt', 'Rokkitt' => 'Rokkitt', 'Romanesco' => 'Romanesco', 'Ropa Sans' => 'Ropa Sans', 'Rosario' => 'Rosario', 'Rosarivo' => 'Rosarivo', 'Rouge Script' => 'Rouge Script', 'Rozha One' => 'Rozha One', 'Rubik Mono One' => 'Rubik Mono One', 'Rubik One' => 'Rubik One', 'Ruda' => 'Ruda', 'Rufina' => 'Rufina', 'Ruge Boogie' => 'Ruge Boogie', 'Ruluko' => 'Ruluko', 'Rum Raisin' => 'Rum Raisin', 'Ruslan Display' => 'Ruslan Display', 'Russo One' => 'Russo One', 'Ruthie' => 'Ruthie', 'Rye' => 'Rye', 'Sacramento' => 'Sacramento', 'Sail' => 'Sail', 'Salsa' => 'Salsa', 'Sanchez' => 'Sanchez', 'Sancreek' => 'Sancreek', 'Sansita One' => 'Sansita One', 'Sarina' => 'Sarina', 'Sarpanch' => 'Sarpanch', 'Satisfy' => 'Satisfy', 'Scada' => 'Scada', 'Schoolbell' => 'Schoolbell', 'Seaweed Script' => 'Seaweed Script', 'Sevillana' => 'Sevillana', 'Seymour One' => 'Seymour One', 'Shadows Into Light' => 'Shadows Into Light', 'Shadows Into Light Two' => 'Shadows Into Light Two', 'Shanti' => 'Shanti', 'Share' => 'Share', 'Share Tech' => 'Share Tech', 'Share Tech Mono' => 'Share Tech Mono', 'Shojumaru' => 'Shojumaru', 'Short Stack' => 'Short Stack', 'Siemreap' => 'Siemreap', 'Sigmar One' => 'Sigmar One', 'Signika' => 'Signika', 'Signika Negative' => 'Signika Negative', 'Simonetta' => 'Simonetta', 'Sintony' => 'Sintony', 'Sirin Stencil' => 'Sirin Stencil', 'Six Caps' => 'Six Caps', 'Skranji' => 'Skranji', 'Slabo 13px' => 'Slabo 13px', 'Slabo 27px' => 'Slabo 27px', 'Slackey' => 'Slackey', 'Smokum' => 'Smokum', 'Smythe' => 'Smythe', 'Sniglet' => 'Sniglet', 'Snippet' => 'Snippet', 'Snowburst One' => 'Snowburst One', 'Sofadi One' => 'Sofadi One', 'Sofia' => 'Sofia', 'Sonsie One' => 'Sonsie One', 'Sorts Mill Goudy' => 'Sorts Mill Goudy', 'Source Code Pro' => 'Source Code Pro', 'Source Sans Pro' => 'Source Sans Pro', 'Source Serif Pro' => 'Source Serif Pro', 'Special Elite' => 'Special Elite', 'Spicy Rice' => 'Spicy Rice', 'Spinnaker' => 'Spinnaker', 'Spirax' => 'Spirax', 'Squada One' => 'Squada One', 'Stalemate' => 'Stalemate', 'Stalinist One' => 'Stalinist One', 'Stardos Stencil' => 'Stardos Stencil', 'Stint Ultra Condensed' => 'Stint Ultra Condensed', 'Stint Ultra Expanded' => 'Stint Ultra Expanded', 'Stoke' => 'Stoke', 'Strait' => 'Strait', 'Sue Ellen Francisco' => 'Sue Ellen Francisco', 'Sunshiney' => 'Sunshiney', 'Supermercado One' => 'Supermercado One', 'Suwannaphum' => 'Suwannaphum', 'Swanky and Moo Moo' => 'Swanky and Moo Moo', 'Syncopate' => 'Syncopate', 'Tangerine' => 'Tangerine', 'Taprom' => 'Taprom', 'Tauri' => 'Tauri', 'Teko' => 'Teko', 'Telex' => 'Telex', 'Tenor Sans' => 'Tenor Sans', 'Text Me One' => 'Text Me One', 'The Girl Next Door' => 'The Girl Next Door', 'Tienne' => 'Tienne', 'Tinos' => 'Tinos', 'Titan One' => 'Titan One', 'Titillium Web' => 'Titillium Web', 'Trade Winds' => 'Trade Winds', 'Trocchi' => 'Trocchi', 'Trochut' => 'Trochut', 'Trykker' => 'Trykker', 'Tulpen One' => 'Tulpen One', 'Ubuntu' => 'Ubuntu', 'Ubuntu Condensed' => 'Ubuntu Condensed', 'Ubuntu Mono' => 'Ubuntu Mono', 'Ultra' => 'Ultra', 'Uncial Antiqua' => 'Uncial Antiqua', 'Underdog' => 'Underdog', 'Unica One' => 'Unica One', 'UnifrakturCook' => 'UnifrakturCook', 'UnifrakturMaguntia' => 'UnifrakturMaguntia', 'Unkempt' => 'Unkempt', 'Unlock' => 'Unlock', 'Unna' => 'Unna', 'VT323' => 'VT323', 'Vampiro One' => 'Vampiro One', 'Varela' => 'Varela', 'Varela Round' => 'Varela Round', 'Vast Shadow' => 'Vast Shadow', 'Vesper Libre' => 'Vesper Libre', 'Vibur' => 'Vibur', 'Vidaloka' => 'Vidaloka', 'Viga' => 'Viga', 'Voces' => 'Voces', 'Volkhov' => 'Volkhov', 'Vollkorn' => 'Vollkorn', 'Voltaire' => 'Voltaire', 'Waiting for the Sunrise' => 'Waiting for the Sunrise', 'Wallpoet' => 'Wallpoet', 'Walter Turncoat' => 'Walter Turncoat', 'Warnes' => 'Warnes', 'Wellfleet' => 'Wellfleet', 'Wendy One' => 'Wendy One', 'Wire One' => 'Wire One', 'Yanone Kaffeesatz' => 'Yanone Kaffeesatz', 'Yellowtail' => 'Yellowtail', 'Yeseva One' => 'Yeseva One', 'Yesteryear' => 'Yesteryear', 'Zeyada' => 'Zeyada');
6
- }
7
-
8
  ?>
1
+ <?php
2
+
3
+ function ujic_googlefonts() {
4
+ //return array('none' => 'Default Font', 'ABeeZee' => 'ABeeZee', 'Abel' => 'Abel', 'Abril Fatface' => 'Abril Fatface', 'Aclonica' => 'Aclonica', 'Acme' => 'Acme', 'Actor' => 'Actor', 'Adamina' => 'Adamina', 'Advent Pro' => 'Advent Pro', 'Aguafina Script' => 'Aguafina Script', 'Akronim' => 'Akronim', 'Aladin' => 'Aladin', 'Aldrich' => 'Aldrich', 'Alegreya' => 'Alegreya', 'Alegreya SC' => 'Alegreya SC', 'Alex Brush' => 'Alex Brush', 'Alfa Slab One' => 'Alfa Slab One', 'Alice' => 'Alice', 'Alike' => 'Alike', 'Alike Angular' => 'Alike Angular', 'Allan' => 'Allan', 'Allerta' => 'Allerta', 'Allerta Stencil' => 'Allerta Stencil', 'Allura' => 'Allura', 'Almendra' => 'Almendra', 'Almendra Display' => 'Almendra Display', 'Almendra SC' => 'Almendra SC', 'Amarante' => 'Amarante', 'Amaranth' => 'Amaranth', 'Amatic SC' => 'Amatic SC', 'Amethysta' => 'Amethysta', 'Anaheim' => 'Anaheim', 'Andada' => 'Andada', 'Andika' => 'Andika', 'Angkor' => 'Angkor', 'Annie Use Your Telescope' => 'Annie Use Your Telescope', 'Anonymous Pro' => 'Anonymous Pro', 'Antic' => 'Antic', 'Antic Didone' => 'Antic Didone', 'Antic Slab' => 'Antic Slab', 'Anton' => 'Anton', 'Arapey' => 'Arapey', 'Arbutus' => 'Arbutus', 'Arbutus Slab' => 'Arbutus Slab', 'Architects Daughter' => 'Architects Daughter', 'Archivo Black' => 'Archivo Black', 'Archivo Narrow' => 'Archivo Narrow', 'Arimo' => 'Arimo', 'Arizonia' => 'Arizonia', 'Armata' => 'Armata', 'Artifika' => 'Artifika', 'Arvo' => 'Arvo', 'Asap' => 'Asap', 'Asset' => 'Asset', 'Astloch' => 'Astloch', 'Asul' => 'Asul', 'Atomic Age' => 'Atomic Age', 'Aubrey' => 'Aubrey', 'Audiowide' => 'Audiowide', 'Autour One' => 'Autour One', 'Average' => 'Average', 'Average Sans' => 'Average Sans', 'Averia Gruesa Libre' => 'Averia Gruesa Libre', 'Averia Libre' => 'Averia Libre', 'Averia Sans Libre' => 'Averia Sans Libre', 'Averia Serif Libre' => 'Averia Serif Libre', 'Bad Script' => 'Bad Script', 'Balthazar' => 'Balthazar', 'Bangers' => 'Bangers', 'Basic' => 'Basic', 'Battambang' => 'Battambang', 'Baumans' => 'Baumans', 'Bayon' => 'Bayon', 'Belgrano' => 'Belgrano', 'Belleza' => 'Belleza', 'BenchNine' => 'BenchNine', 'Bentham' => 'Bentham', 'Berkshire Swash' => 'Berkshire Swash', 'Bevan' => 'Bevan', 'Bigelow Rules' => 'Bigelow Rules', 'Bigshot One' => 'Bigshot One', 'Bilbo' => 'Bilbo', 'Bilbo Swash Caps' => 'Bilbo Swash Caps', 'Bitter' => 'Bitter', 'Black Ops One' => 'Black Ops One', 'Bokor' => 'Bokor', 'Bonbon' => 'Bonbon', 'Boogaloo' => 'Boogaloo', 'Bowlby One' => 'Bowlby One', 'Bowlby One SC' => 'Bowlby One SC', 'Brawler' => 'Brawler', 'Bree Serif' => 'Bree Serif', 'Bubblegum Sans' => 'Bubblegum Sans', 'Bubbler One' => 'Bubbler One', 'Buda' => 'Buda', 'Buenard' => 'Buenard', 'Butcherman' => 'Butcherman', 'Butterfly Kids' => 'Butterfly Kids', 'Cabin' => 'Cabin', 'Cabin Condensed' => 'Cabin Condensed', 'Cabin Sketch' => 'Cabin Sketch', 'Caesar Dressing' => 'Caesar Dressing', 'Cagliostro' => 'Cagliostro', 'Calligraffitti' => 'Calligraffitti', 'Cambo' => 'Cambo', 'Candal' => 'Candal', 'Cantarell' => 'Cantarell', 'Cantata One' => 'Cantata One', 'Cantora One' => 'Cantora One', 'Capriola' => 'Capriola', 'Cardo' => 'Cardo', 'Carme' => 'Carme', 'Carrois Gothic' => 'Carrois Gothic', 'Carrois Gothic SC' => 'Carrois Gothic SC', 'Carter One' => 'Carter One', 'Caudex' => 'Caudex', 'Cedarville Cursive' => 'Cedarville Cursive', 'Ceviche One' => 'Ceviche One', 'Changa One' => 'Changa One', 'Chango' => 'Chango', 'Chau Philomene One' => 'Chau Philomene One', 'Chela One' => 'Chela One', 'Chelsea Market' => 'Chelsea Market', 'Chenla' => 'Chenla', 'Cherry Cream Soda' => 'Cherry Cream Soda', 'Cherry Swash' => 'Cherry Swash', 'Chewy' => 'Chewy', 'Chicle' => 'Chicle', 'Chivo' => 'Chivo', 'Cinzel' => 'Cinzel', 'Cinzel Decorative' => 'Cinzel Decorative', 'Clicker Script' => 'Clicker Script', 'Coda' => 'Coda', 'Coda Caption' => 'Coda Caption', 'Codystar' => 'Codystar', 'Combo' => 'Combo', 'Comfortaa' => 'Comfortaa', 'Coming Soon' => 'Coming Soon', 'Concert One' => 'Concert One', 'Condiment' => 'Condiment', 'Content' => 'Content', 'Contrail One' => 'Contrail One', 'Convergence' => 'Convergence', 'Cookie' => 'Cookie', 'Copse' => 'Copse', 'Corben' => 'Corben', 'Courgette' => 'Courgette', 'Cousine' => 'Cousine', 'Coustard' => 'Coustard', 'Covered By Your Grace' => 'Covered By Your Grace', 'Crafty Girls' => 'Crafty Girls', 'Creepster' => 'Creepster', 'Crete Round' => 'Crete Round', 'Crimson Text' => 'Crimson Text', 'Croissant One' => 'Croissant One', 'Crushed' => 'Crushed', 'Cuprum' => 'Cuprum', 'Cutive' => 'Cutive', 'Cutive Mono' => 'Cutive Mono', 'Damion' => 'Damion', 'Dancing Script' => 'Dancing Script', 'Dangrek' => 'Dangrek', 'Dawning of a New Day' => 'Dawning of a New Day', 'Days One' => 'Days One', 'Delius' => 'Delius', 'Delius Swash Caps' => 'Delius Swash Caps', 'Delius Unicase' => 'Delius Unicase', 'Della Respira' => 'Della Respira', 'Denk One' => 'Denk One', 'Devonshire' => 'Devonshire', 'Didact Gothic' => 'Didact Gothic', 'Diplomata' => 'Diplomata', 'Diplomata SC' => 'Diplomata SC', 'Domine' => 'Domine', 'Donegal One' => 'Donegal One', 'Doppio One' => 'Doppio One', 'Dorsa' => 'Dorsa', 'Dosis' => 'Dosis', 'Dr Sugiyama' => 'Dr Sugiyama', 'Droid Sans' => 'Droid Sans', 'Droid Sans Mono' => 'Droid Sans Mono', 'Droid Serif' => 'Droid Serif', 'Duru Sans' => 'Duru Sans', 'Dynalight' => 'Dynalight', 'EB Garamond' => 'EB Garamond', 'Eagle Lake' => 'Eagle Lake', 'Eater' => 'Eater', 'Economica' => 'Economica', 'Electrolize' => 'Electrolize', 'Elsie' => 'Elsie', 'Elsie Swash Caps' => 'Elsie Swash Caps', 'Emblema One' => 'Emblema One', 'Emilys Candy' => 'Emilys Candy', 'Engagement' => 'Engagement', 'Englebert' => 'Englebert', 'Enriqueta' => 'Enriqueta', 'Erica One' => 'Erica One', 'Esteban' => 'Esteban', 'Euphoria Script' => 'Euphoria Script', 'Ewert' => 'Ewert', 'Exo' => 'Exo', 'Expletus Sans' => 'Expletus Sans', 'Fanwood Text' => 'Fanwood Text', 'Fascinate' => 'Fascinate', 'Fascinate Inline' => 'Fascinate Inline', 'Faster One' => 'Faster One', 'Fasthand' => 'Fasthand', 'Federant' => 'Federant', 'Federo' => 'Federo', 'Felipa' => 'Felipa', 'Fenix' => 'Fenix', 'Finger Paint' => 'Finger Paint', 'Fjalla One' => 'Fjalla One', 'Fjord One' => 'Fjord One', 'Flamenco' => 'Flamenco', 'Flavors' => 'Flavors', 'Fondamento' => 'Fondamento', 'Fontdiner Swanky' => 'Fontdiner Swanky', 'Forum' => 'Forum', 'Francois One' => 'Francois One', 'Freckle Face' => 'Freckle Face', 'Fredericka the Great' => 'Fredericka the Great', 'Fredoka One' => 'Fredoka One', 'Freehand' => 'Freehand', 'Fresca' => 'Fresca', 'Frijole' => 'Frijole', 'Fruktur' => 'Fruktur', 'Fugaz One' => 'Fugaz One', 'GFS Didot' => 'GFS Didot', 'GFS Neohellenic' => 'GFS Neohellenic', 'Gabriela' => 'Gabriela', 'Gafata' => 'Gafata', 'Galdeano' => 'Galdeano', 'Galindo' => 'Galindo', 'Gentium Basic' => 'Gentium Basic', 'Gentium Book Basic' => 'Gentium Book Basic', 'Geo' => 'Geo', 'Geostar' => 'Geostar', 'Geostar Fill' => 'Geostar Fill', 'Germania One' => 'Germania One', 'Gilda Display' => 'Gilda Display', 'Give You Glory' => 'Give You Glory', 'Glass Antiqua' => 'Glass Antiqua', 'Glegoo' => 'Glegoo', 'Gloria Hallelujah' => 'Gloria Hallelujah', 'Goblin One' => 'Goblin One', 'Gochi Hand' => 'Gochi Hand', 'Gorditas' => 'Gorditas', 'Goudy Bookletter 1911' => 'Goudy Bookletter 1911', 'Graduate' => 'Graduate', 'Grand Hotel' => 'Grand Hotel', 'Gravitas One' => 'Gravitas One', 'Great Vibes' => 'Great Vibes', 'Griffy' => 'Griffy', 'Gruppo' => 'Gruppo', 'Gudea' => 'Gudea', 'Habibi' => 'Habibi', 'Hammersmith One' => 'Hammersmith One', 'Hanalei' => 'Hanalei', 'Hanalei Fill' => 'Hanalei Fill', 'Handlee' => 'Handlee', 'Hanuman' => 'Hanuman', 'Happy Monkey' => 'Happy Monkey', 'Headland One' => 'Headland One', 'Henny Penny' => 'Henny Penny', 'Herr Von Muellerhoff' => 'Herr Von Muellerhoff', 'Holtwood One SC' => 'Holtwood One SC', 'Homemade Apple' => 'Homemade Apple', 'Homenaje' => 'Homenaje', 'IM Fell DW Pica' => 'IM Fell DW Pica', 'IM Fell DW Pica SC' => 'IM Fell DW Pica SC', 'IM Fell Double Pica' => 'IM Fell Double Pica', 'IM Fell Double Pica SC' => 'IM Fell Double Pica SC', 'IM Fell English' => 'IM Fell English', 'IM Fell English SC' => 'IM Fell English SC', 'IM Fell French Canon' => 'IM Fell French Canon', 'IM Fell French Canon SC' => 'IM Fell French Canon SC', 'IM Fell Great Primer' => 'IM Fell Great Primer', 'IM Fell Great Primer SC' => 'IM Fell Great Primer SC', 'Iceberg' => 'Iceberg', 'Iceland' => 'Iceland', 'Imprima' => 'Imprima', 'Inconsolata' => 'Inconsolata', 'Inder' => 'Inder', 'Indie Flower' => 'Indie Flower', 'Inika' => 'Inika', 'Irish Grover' => 'Irish Grover', 'Istok Web' => 'Istok Web', 'Italiana' => 'Italiana', 'Italianno' => 'Italianno', 'Jacques Francois' => 'Jacques Francois', 'Jacques Francois Shadow' => 'Jacques Francois Shadow', 'Jim Nightshade' => 'Jim Nightshade', 'Jockey One' => 'Jockey One', 'Jolly Lodger' => 'Jolly Lodger', 'Josefin Sans' => 'Josefin Sans', 'Josefin Slab' => 'Josefin Slab', 'Joti One' => 'Joti One', 'Judson' => 'Judson', 'Julee' => 'Julee', 'Julius Sans One' => 'Julius Sans One', 'Junge' => 'Junge', 'Jura' => 'Jura', 'Just Another Hand' => 'Just Another Hand', 'Just Me Again Down Here' => 'Just Me Again Down Here', 'Kameron' => 'Kameron', 'Karla' => 'Karla', 'Kaushan Script' => 'Kaushan Script', 'Kavoon' => 'Kavoon', 'Keania One' => 'Keania One', 'Kelly Slab' => 'Kelly Slab', 'Kenia' => 'Kenia', 'Khmer' => 'Khmer', 'Kite One' => 'Kite One', 'Knewave' => 'Knewave', 'Kotta One' => 'Kotta One', 'Koulen' => 'Koulen', 'Kranky' => 'Kranky', 'Kreon' => 'Kreon', 'Kristi' => 'Kristi', 'Krona One' => 'Krona One', 'La Belle Aurore' => 'La Belle Aurore', 'Lancelot' => 'Lancelot', 'Lato' => 'Lato', 'League Script' => 'League Script', 'Leckerli One' => 'Leckerli One', 'Ledger' => 'Ledger', 'Lekton' => 'Lekton', 'Lemon' => 'Lemon', 'Libre Baskerville' => 'Libre Baskerville', 'Life Savers' => 'Life Savers', 'Lilita One' => 'Lilita One', 'Limelight' => 'Limelight', 'Linden Hill' => 'Linden Hill', 'Lobster' => 'Lobster', 'Lobster Two' => 'Lobster Two', 'Londrina Outline' => 'Londrina Outline', 'Londrina Shadow' => 'Londrina Shadow', 'Londrina Sketch' => 'Londrina Sketch', 'Londrina Solid' => 'Londrina Solid', 'Lora' => 'Lora', 'Love Ya Like A Sister' => 'Love Ya Like A Sister', 'Loved by the King' => 'Loved by the King', 'Lovers Quarrel' => 'Lovers Quarrel', 'Luckiest Guy' => 'Luckiest Guy', 'Lusitana' => 'Lusitana', 'Lustria' => 'Lustria', 'Macondo' => 'Macondo', 'Macondo Swash Caps' => 'Macondo Swash Caps', 'Magra' => 'Magra', 'Maiden Orange' => 'Maiden Orange', 'Mako' => 'Mako', 'Marcellus' => 'Marcellus', 'Marcellus SC' => 'Marcellus SC', 'Marck Script' => 'Marck Script', 'Margarine' => 'Margarine', 'Marko One' => 'Marko One', 'Marmelad' => 'Marmelad', 'Marvel' => 'Marvel', 'Mate' => 'Mate', 'Mate SC' => 'Mate SC', 'Maven Pro' => 'Maven Pro', 'McLaren' => 'McLaren', 'Meddon' => 'Meddon', 'MedievalSharp' => 'MedievalSharp', 'Medula One' => 'Medula One', 'Megrim' => 'Megrim', 'Meie Script' => 'Meie Script', 'Merienda' => 'Merienda', 'Merienda One' => 'Merienda One', 'Merriweather' => 'Merriweather', 'Merriweather Sans' => 'Merriweather Sans', 'Metal' => 'Metal', 'Metal Mania' => 'Metal Mania', 'Metamorphous' => 'Metamorphous', 'Metrophobic' => 'Metrophobic', 'Michroma' => 'Michroma', 'Milonga' => 'Milonga', 'Miltonian' => 'Miltonian', 'Miltonian Tattoo' => 'Miltonian Tattoo', 'Miniver' => 'Miniver', 'Miss Fajardose' => 'Miss Fajardose', 'Modern Antiqua' => 'Modern Antiqua', 'Molengo' => 'Molengo', 'Molle' => 'Molle', 'Monda' => 'Monda', 'Monofett' => 'Monofett', 'Monoton' => 'Monoton', 'Monsieur La Doulaise' => 'Monsieur La Doulaise', 'Montaga' => 'Montaga', 'Montez' => 'Montez', 'Montserrat' => 'Montserrat', 'Montserrat Alternates' => 'Montserrat Alternates', 'Montserrat Subrayada' => 'Montserrat Subrayada', 'Moul' => 'Moul', 'Moulpali' => 'Moulpali', 'Mountains of Christmas' => 'Mountains of Christmas', 'Mouse Memoirs' => 'Mouse Memoirs', 'Mr Bedfort' => 'Mr Bedfort', 'Mr Dafoe' => 'Mr Dafoe', 'Mr De Haviland' => 'Mr De Haviland', 'Mrs Saint Delafield' => 'Mrs Saint Delafield', 'Mrs Sheppards' => 'Mrs Sheppards', 'Muli' => 'Muli', 'Mystery Quest' => 'Mystery Quest', 'Neucha' => 'Neucha', 'Neuton' => 'Neuton', 'New Rocker' => 'New Rocker', 'News Cycle' => 'News Cycle', 'Niconne' => 'Niconne', 'Nixie One' => 'Nixie One', 'Nobile' => 'Nobile', 'Nokora' => 'Nokora', 'Norican' => 'Norican', 'Nosifer' => 'Nosifer', 'Nothing You Could Do' => 'Nothing You Could Do', 'Noticia Text' => 'Noticia Text', 'Noto Sans' => 'Noto Sans', 'Noto Serif' => 'Noto Serif', 'Nova Cut' => 'Nova Cut', 'Nova Flat' => 'Nova Flat', 'Nova Mono' => 'Nova Mono', 'Nova Oval' => 'Nova Oval', 'Nova Round' => 'Nova Round', 'Nova Script' => 'Nova Script', 'Nova Slim' => 'Nova Slim', 'Nova Square' => 'Nova Square', 'Numans' => 'Numans', 'Nunito' => 'Nunito', 'Odor Mean Chey' => 'Odor Mean Chey', 'Offside' => 'Offside', 'Old Standard TT' => 'Old Standard TT', 'Oldenburg' => 'Oldenburg', 'Oleo Script' => 'Oleo Script', 'Oleo Script Swash Caps' => 'Oleo Script Swash Caps', 'Open Sans' => 'Open Sans', 'Open Sans Condensed' => 'Open Sans Condensed', 'Oranienbaum' => 'Oranienbaum', 'Orbitron' => 'Orbitron', 'Oregano' => 'Oregano', 'Orienta' => 'Orienta', 'Original Surfer' => 'Original Surfer', 'Oswald' => 'Oswald', 'Over the Rainbow' => 'Over the Rainbow', 'Overlock' => 'Overlock', 'Overlock SC' => 'Overlock SC', 'Ovo' => 'Ovo', 'Oxygen' => 'Oxygen', 'Oxygen Mono' => 'Oxygen Mono', 'PT Mono' => 'PT Mono', 'PT Sans' => 'PT Sans', 'PT Sans Caption' => 'PT Sans Caption', 'PT Sans Narrow' => 'PT Sans Narrow', 'PT Serif' => 'PT Serif', 'PT Serif Caption' => 'PT Serif Caption', 'Pacifico' => 'Pacifico', 'Paprika' => 'Paprika', 'Parisienne' => 'Parisienne', 'Passero One' => 'Passero One', 'Passion One' => 'Passion One', 'Patrick Hand' => 'Patrick Hand', 'Patrick Hand SC' => 'Patrick Hand SC', 'Patua One' => 'Patua One', 'Paytone One' => 'Paytone One', 'Peralta' => 'Peralta', 'Permanent Marker' => 'Permanent Marker', 'Petit Formal Script' => 'Petit Formal Script', 'Petrona' => 'Petrona', 'Philosopher' => 'Philosopher', 'Piedra' => 'Piedra', 'Pinyon Script' => 'Pinyon Script', 'Pirata One' => 'Pirata One', 'Plaster' => 'Plaster', 'Play' => 'Play', 'Playball' => 'Playball', 'Playfair Display' => 'Playfair Display', 'Playfair Display SC' => 'Playfair Display SC', 'Podkova' => 'Podkova', 'Poiret One' => 'Poiret One', 'Poller One' => 'Poller One', 'Poly' => 'Poly', 'Pompiere' => 'Pompiere', 'Pontano Sans' => 'Pontano Sans', 'Port Lligat Sans' => 'Port Lligat Sans', 'Port Lligat Slab' => 'Port Lligat Slab', 'Prata' => 'Prata', 'Preahvihear' => 'Preahvihear', 'Press Start 2P' => 'Press Start 2P', 'Princess Sofia' => 'Princess Sofia', 'Prociono' => 'Prociono', 'Prosto One' => 'Prosto One', 'Puritan' => 'Puritan', 'Purple Purse' => 'Purple Purse', 'Quando' => 'Quando', 'Quantico' => 'Quantico', 'Quattrocento' => 'Quattrocento', 'Quattrocento Sans' => 'Quattrocento Sans', 'Questrial' => 'Questrial', 'Quicksand' => 'Quicksand', 'Quintessential' => 'Quintessential', 'Qwigley' => 'Qwigley', 'Racing Sans One' => 'Racing Sans One', 'Radley' => 'Radley', 'Raleway' => 'Raleway', 'Raleway Dots' => 'Raleway Dots', 'Rambla' => 'Rambla', 'Rammetto One' => 'Rammetto One', 'Ranchers' => 'Ranchers', 'Rancho' => 'Rancho', 'Rationale' => 'Rationale', 'Redressed' => 'Redressed', 'Reenie Beanie' => 'Reenie Beanie', 'Revalia' => 'Revalia', 'Ribeye' => 'Ribeye', 'Ribeye Marrow' => 'Ribeye Marrow', 'Righteous' => 'Righteous', 'Risque' => 'Risque', 'Roboto' => 'Roboto', 'Roboto Condensed' => 'Roboto Condensed', 'Rochester' => 'Rochester', 'Rock Salt' => 'Rock Salt', 'Rokkitt' => 'Rokkitt', 'Romanesco' => 'Romanesco', 'Ropa Sans' => 'Ropa Sans', 'Rosario' => 'Rosario', 'Rosarivo' => 'Rosarivo', 'Rouge Script' => 'Rouge Script', 'Ruda' => 'Ruda', 'Rufina' => 'Rufina', 'Ruge Boogie' => 'Ruge Boogie', 'Ruluko' => 'Ruluko', 'Rum Raisin' => 'Rum Raisin', 'Ruslan Display' => 'Ruslan Display', 'Russo One' => 'Russo One', 'Ruthie' => 'Ruthie', 'Rye' => 'Rye', 'Sacramento' => 'Sacramento', 'Sail' => 'Sail', 'Salsa' => 'Salsa', 'Sanchez' => 'Sanchez', 'Sancreek' => 'Sancreek', 'Sansita One' => 'Sansita One', 'Sarina' => 'Sarina', 'Satisfy' => 'Satisfy', 'Scada' => 'Scada', 'Schoolbell' => 'Schoolbell', 'Seaweed Script' => 'Seaweed Script', 'Sevillana' => 'Sevillana', 'Seymour One' => 'Seymour One', 'Shadows Into Light' => 'Shadows Into Light', 'Shadows Into Light Two' => 'Shadows Into Light Two', 'Shanti' => 'Shanti', 'Share' => 'Share', 'Share Tech' => 'Share Tech', 'Share Tech Mono' => 'Share Tech Mono', 'Shojumaru' => 'Shojumaru', 'Short Stack' => 'Short Stack', 'Siemreap' => 'Siemreap', 'Sigmar One' => 'Sigmar One', 'Signika' => 'Signika', 'Signika Negative' => 'Signika Negative', 'Simonetta' => 'Simonetta', 'Sintony' => 'Sintony', 'Sirin Stencil' => 'Sirin Stencil', 'Six Caps' => 'Six Caps', 'Skranji' => 'Skranji', 'Slackey' => 'Slackey', 'Smokum' => 'Smokum', 'Smythe' => 'Smythe', 'Sniglet' => 'Sniglet', 'Snippet' => 'Snippet', 'Snowburst One' => 'Snowburst One', 'Sofadi One' => 'Sofadi One', 'Sofia' => 'Sofia', 'Sonsie One' => 'Sonsie One', 'Sorts Mill Goudy' => 'Sorts Mill Goudy', 'Source Code Pro' => 'Source Code Pro', 'Source Sans Pro' => 'Source Sans Pro', 'Special Elite' => 'Special Elite', 'Spicy Rice' => 'Spicy Rice', 'Spinnaker' => 'Spinnaker', 'Spirax' => 'Spirax', 'Squada One' => 'Squada One', 'Stalemate' => 'Stalemate', 'Stalinist One' => 'Stalinist One', 'Stardos Stencil' => 'Stardos Stencil', 'Stint Ultra Condensed' => 'Stint Ultra Condensed', 'Stint Ultra Expanded' => 'Stint Ultra Expanded', 'Stoke' => 'Stoke', 'Strait' => 'Strait', 'Sue Ellen Francisco' => 'Sue Ellen Francisco', 'Sunshiney' => 'Sunshiney', 'Supermercado One' => 'Supermercado One', 'Suwannaphum' => 'Suwannaphum', 'Swanky and Moo Moo' => 'Swanky and Moo Moo', 'Syncopate' => 'Syncopate', 'Tangerine' => 'Tangerine', 'Taprom' => 'Taprom', 'Tauri' => 'Tauri', 'Telex' => 'Telex', 'Tenor Sans' => 'Tenor Sans', 'Text Me One' => 'Text Me One', 'The Girl Next Door' => 'The Girl Next Door', 'Tienne' => 'Tienne', 'Tinos' => 'Tinos', 'Titan One' => 'Titan One', 'Titillium Web' => 'Titillium Web', 'Trade Winds' => 'Trade Winds', 'Trocchi' => 'Trocchi', 'Trochut' => 'Trochut', 'Trykker' => 'Trykker', 'Tulpen One' => 'Tulpen One', 'Ubuntu' => 'Ubuntu', 'Ubuntu Condensed' => 'Ubuntu Condensed', 'Ubuntu Mono' => 'Ubuntu Mono', 'Ultra' => 'Ultra', 'Uncial Antiqua' => 'Uncial Antiqua', 'Underdog' => 'Underdog', 'Unica One' => 'Unica One', 'UnifrakturCook' => 'UnifrakturCook', 'UnifrakturMaguntia' => 'UnifrakturMaguntia', 'Unkempt' => 'Unkempt', 'Unlock' => 'Unlock', 'Unna' => 'Unna', 'VT323' => 'VT323', 'Vampiro One' => 'Vampiro One', 'Varela' => 'Varela', 'Varela Round' => 'Varela Round', 'Vast Shadow' => 'Vast Shadow', 'Vibur' => 'Vibur', 'Vidaloka' => 'Vidaloka', 'Viga' => 'Viga', 'Voces' => 'Voces', 'Volkhov' => 'Volkhov', 'Vollkorn' => 'Vollkorn', 'Voltaire' => 'Voltaire', 'Waiting for the Sunrise' => 'Waiting for the Sunrise', 'Wallpoet' => 'Wallpoet', 'Walter Turncoat' => 'Walter Turncoat', 'Warnes' => 'Warnes', 'Wellfleet' => 'Wellfleet', 'Wendy One' => 'Wendy One', 'Wire One' => 'Wire One', 'Yanone Kaffeesatz' => 'Yanone Kaffeesatz', 'Yellowtail' => 'Yellowtail', 'Yeseva One' => 'Yeseva One', 'Yesteryear' => 'Yesteryear', 'Zeyada' => 'Zeyada');
5
+ return array('none' => 'Default Font', 'ABeeZee' => 'ABeeZee', 'Abel' => 'Abel', 'Abril Fatface' => 'Abril Fatface', 'Aclonica' => 'Aclonica', 'Acme' => 'Acme', 'Actor' => 'Actor', 'Adamina' => 'Adamina', 'Advent Pro' => 'Advent Pro', 'Aguafina Script' => 'Aguafina Script', 'Akronim' => 'Akronim', 'Aladin' => 'Aladin', 'Aldrich' => 'Aldrich', 'Alef' => 'Alef', 'Alegreya' => 'Alegreya', 'Alegreya SC' => 'Alegreya SC', 'Alegreya Sans' => 'Alegreya Sans', 'Alegreya Sans SC' => 'Alegreya Sans SC', 'Alex Brush' => 'Alex Brush', 'Alfa Slab One' => 'Alfa Slab One', 'Alice' => 'Alice', 'Alike' => 'Alike', 'Alike Angular' => 'Alike Angular', 'Allan' => 'Allan', 'Allerta' => 'Allerta', 'Allerta Stencil' => 'Allerta Stencil', 'Allura' => 'Allura', 'Almendra' => 'Almendra', 'Almendra Display' => 'Almendra Display', 'Almendra SC' => 'Almendra SC', 'Amarante' => 'Amarante', 'Amaranth' => 'Amaranth', 'Amatic SC' => 'Amatic SC', 'Amethysta' => 'Amethysta', 'Anaheim' => 'Anaheim', 'Andada' => 'Andada', 'Andika' => 'Andika', 'Angkor' => 'Angkor', 'Annie Use Your Telescope' => 'Annie Use Your Telescope', 'Anonymous Pro' => 'Anonymous Pro', 'Antic' => 'Antic', 'Antic Didone' => 'Antic Didone', 'Antic Slab' => 'Antic Slab', 'Anton' => 'Anton', 'Arapey' => 'Arapey', 'Arbutus' => 'Arbutus', 'Arbutus Slab' => 'Arbutus Slab', 'Architects Daughter' => 'Architects Daughter', 'Archivo Black' => 'Archivo Black', 'Archivo Narrow' => 'Archivo Narrow', 'Arimo' => 'Arimo', 'Arizonia' => 'Arizonia', 'Armata' => 'Armata', 'Artifika' => 'Artifika', 'Arvo' => 'Arvo', 'Asap' => 'Asap', 'Asset' => 'Asset', 'Astloch' => 'Astloch', 'Asul' => 'Asul', 'Atomic Age' => 'Atomic Age', 'Aubrey' => 'Aubrey', 'Audiowide' => 'Audiowide', 'Autour One' => 'Autour One', 'Average' => 'Average', 'Average Sans' => 'Average Sans', 'Averia Gruesa Libre' => 'Averia Gruesa Libre', 'Averia Libre' => 'Averia Libre', 'Averia Sans Libre' => 'Averia Sans Libre', 'Averia Serif Libre' => 'Averia Serif Libre', 'Bad Script' => 'Bad Script', 'Balthazar' => 'Balthazar', 'Bangers' => 'Bangers', 'Basic' => 'Basic', 'Battambang' => 'Battambang', 'Baumans' => 'Baumans', 'Bayon' => 'Bayon', 'Belgrano' => 'Belgrano', 'Belleza' => 'Belleza', 'BenchNine' => 'BenchNine', 'Bentham' => 'Bentham', 'Berkshire Swash' => 'Berkshire Swash', 'Bevan' => 'Bevan', 'Bigelow Rules' => 'Bigelow Rules', 'Bigshot One' => 'Bigshot One', 'Bilbo' => 'Bilbo', 'Bilbo Swash Caps' => 'Bilbo Swash Caps', 'Bitter' => 'Bitter', 'Black Ops One' => 'Black Ops One', 'Bokor' => 'Bokor', 'Bonbon' => 'Bonbon', 'Boogaloo' => 'Boogaloo', 'Bowlby One' => 'Bowlby One', 'Bowlby One SC' => 'Bowlby One SC', 'Brawler' => 'Brawler', 'Bree Serif' => 'Bree Serif', 'Bubblegum Sans' => 'Bubblegum Sans', 'Bubbler One' => 'Bubbler One', 'Buda' => 'Buda', 'Buenard' => 'Buenard', 'Butcherman' => 'Butcherman', 'Butterfly Kids' => 'Butterfly Kids', 'Cabin' => 'Cabin', 'Cabin Condensed' => 'Cabin Condensed', 'Cabin Sketch' => 'Cabin Sketch', 'Caesar Dressing' => 'Caesar Dressing', 'Cagliostro' => 'Cagliostro', 'Calligraffitti' => 'Calligraffitti', 'Cambo' => 'Cambo', 'Candal' => 'Candal', 'Cantarell' => 'Cantarell', 'Cantata One' => 'Cantata One', 'Cantora One' => 'Cantora One', 'Capriola' => 'Capriola', 'Cardo' => 'Cardo', 'Carme' => 'Carme', 'Carrois Gothic' => 'Carrois Gothic', 'Carrois Gothic SC' => 'Carrois Gothic SC', 'Carter One' => 'Carter One', 'Caudex' => 'Caudex', 'Cedarville Cursive' => 'Cedarville Cursive', 'Ceviche One' => 'Ceviche One', 'Changa One' => 'Changa One', 'Chango' => 'Chango', 'Chau Philomene One' => 'Chau Philomene One', 'Chela One' => 'Chela One', 'Chelsea Market' => 'Chelsea Market', 'Chenla' => 'Chenla', 'Cherry Cream Soda' => 'Cherry Cream Soda', 'Cherry Swash' => 'Cherry Swash', 'Chewy' => 'Chewy', 'Chicle' => 'Chicle', 'Chivo' => 'Chivo', 'Cinzel' => 'Cinzel', 'Cinzel Decorative' => 'Cinzel Decorative', 'Clicker Script' => 'Clicker Script', 'Coda' => 'Coda', 'Coda Caption' => 'Coda Caption', 'Codystar' => 'Codystar', 'Combo' => 'Combo', 'Comfortaa' => 'Comfortaa', 'Coming Soon' => 'Coming Soon', 'Concert One' => 'Concert One', 'Condiment' => 'Condiment', 'Content' => 'Content', 'Contrail One' => 'Contrail One', 'Convergence' => 'Convergence', 'Cookie' => 'Cookie', 'Copse' => 'Copse', 'Corben' => 'Corben', 'Courgette' => 'Courgette', 'Cousine' => 'Cousine', 'Coustard' => 'Coustard', 'Covered By Your Grace' => 'Covered By Your Grace', 'Crafty Girls' => 'Crafty Girls', 'Creepster' => 'Creepster', 'Crete Round' => 'Crete Round', 'Crimson Text' => 'Crimson Text', 'Croissant One' => 'Croissant One', 'Crushed' => 'Crushed', 'Cuprum' => 'Cuprum', 'Cutive' => 'Cutive', 'Cutive Mono' => 'Cutive Mono', 'Damion' => 'Damion', 'Dancing Script' => 'Dancing Script', 'Dangrek' => 'Dangrek', 'Dawning of a New Day' => 'Dawning of a New Day', 'Days One' => 'Days One', 'Delius' => 'Delius', 'Delius Swash Caps' => 'Delius Swash Caps', 'Delius Unicase' => 'Delius Unicase', 'Della Respira' => 'Della Respira', 'Denk One' => 'Denk One', 'Devonshire' => 'Devonshire', 'Didact Gothic' => 'Didact Gothic', 'Diplomata' => 'Diplomata', 'Diplomata SC' => 'Diplomata SC', 'Domine' => 'Domine', 'Donegal One' => 'Donegal One', 'Doppio One' => 'Doppio One', 'Dorsa' => 'Dorsa', 'Dosis' => 'Dosis', 'Dr Sugiyama' => 'Dr Sugiyama', 'Droid Sans' => 'Droid Sans', 'Droid Sans Mono' => 'Droid Sans Mono', 'Droid Serif' => 'Droid Serif', 'Duru Sans' => 'Duru Sans', 'Dynalight' => 'Dynalight', 'EB Garamond' => 'EB Garamond', 'Eagle Lake' => 'Eagle Lake', 'Eater' => 'Eater', 'Economica' => 'Economica', 'Ek Mukta' => 'Ek Mukta', 'Electrolize' => 'Electrolize', 'Elsie' => 'Elsie', 'Elsie Swash Caps' => 'Elsie Swash Caps', 'Emblema One' => 'Emblema One', 'Emilys Candy' => 'Emilys Candy', 'Engagement' => 'Engagement', 'Englebert' => 'Englebert', 'Enriqueta' => 'Enriqueta', 'Erica One' => 'Erica One', 'Esteban' => 'Esteban', 'Euphoria Script' => 'Euphoria Script', 'Ewert' => 'Ewert', 'Exo' => 'Exo', 'Exo 2' => 'Exo 2', 'Expletus Sans' => 'Expletus Sans', 'Fanwood Text' => 'Fanwood Text', 'Fascinate' => 'Fascinate', 'Fascinate Inline' => 'Fascinate Inline', 'Faster One' => 'Faster One', 'Fasthand' => 'Fasthand', 'Fauna One' => 'Fauna One', 'Federant' => 'Federant', 'Federo' => 'Federo', 'Felipa' => 'Felipa', 'Fenix' => 'Fenix', 'Finger Paint' => 'Finger Paint', 'Fira Mono' => 'Fira Mono', 'Fira Sans' => 'Fira Sans', 'Fjalla One' => 'Fjalla One', 'Fjord One' => 'Fjord One', 'Flamenco' => 'Flamenco', 'Flavors' => 'Flavors', 'Fondamento' => 'Fondamento', 'Fontdiner Swanky' => 'Fontdiner Swanky', 'Forum' => 'Forum', 'Francois One' => 'Francois One', 'Freckle Face' => 'Freckle Face', 'Fredericka the Great' => 'Fredericka the Great', 'Fredoka One' => 'Fredoka One', 'Freehand' => 'Freehand', 'Fresca' => 'Fresca', 'Frijole' => 'Frijole', 'Fruktur' => 'Fruktur', 'Fugaz One' => 'Fugaz One', 'GFS Didot' => 'GFS Didot', 'GFS Neohellenic' => 'GFS Neohellenic', 'Gabriela' => 'Gabriela', 'Gafata' => 'Gafata', 'Galdeano' => 'Galdeano', 'Galindo' => 'Galindo', 'Gentium Basic' => 'Gentium Basic', 'Gentium Book Basic' => 'Gentium Book Basic', 'Geo' => 'Geo', 'Geostar' => 'Geostar', 'Geostar Fill' => 'Geostar Fill', 'Germania One' => 'Germania One', 'Gilda Display' => 'Gilda Display', 'Give You Glory' => 'Give You Glory', 'Glass Antiqua' => 'Glass Antiqua', 'Glegoo' => 'Glegoo', 'Gloria Hallelujah' => 'Gloria Hallelujah', 'Goblin One' => 'Goblin One', 'Gochi Hand' => 'Gochi Hand', 'Gorditas' => 'Gorditas', 'Goudy Bookletter 1911' => 'Goudy Bookletter 1911', 'Graduate' => 'Graduate', 'Grand Hotel' => 'Grand Hotel', 'Gravitas One' => 'Gravitas One', 'Great Vibes' => 'Great Vibes', 'Griffy' => 'Griffy', 'Gruppo' => 'Gruppo', 'Gudea' => 'Gudea', 'Habibi' => 'Habibi', 'Halant' => 'Halant', 'Hammersmith One' => 'Hammersmith One', 'Hanalei' => 'Hanalei', 'Hanalei Fill' => 'Hanalei Fill', 'Handlee' => 'Handlee', 'Hanuman' => 'Hanuman', 'Happy Monkey' => 'Happy Monkey', 'Headland One' => 'Headland One', 'Henny Penny' => 'Henny Penny', 'Herr Von Muellerhoff' => 'Herr Von Muellerhoff', 'Hind' => 'Hind', 'Holtwood One SC' => 'Holtwood One SC', 'Homemade Apple' => 'Homemade Apple', 'Homenaje' => 'Homenaje', 'IM Fell DW Pica' => 'IM Fell DW Pica', 'IM Fell DW Pica SC' => 'IM Fell DW Pica SC', 'IM Fell Double Pica' => 'IM Fell Double Pica', 'IM Fell Double Pica SC' => 'IM Fell Double Pica SC', 'IM Fell English' => 'IM Fell English', 'IM Fell English SC' => 'IM Fell English SC', 'IM Fell French Canon' => 'IM Fell French Canon', 'IM Fell French Canon SC' => 'IM Fell French Canon SC', 'IM Fell Great Primer' => 'IM Fell Great Primer', 'IM Fell Great Primer SC' => 'IM Fell Great Primer SC', 'Iceberg' => 'Iceberg', 'Iceland' => 'Iceland', 'Imprima' => 'Imprima', 'Inconsolata' => 'Inconsolata', 'Inder' => 'Inder', 'Indie Flower' => 'Indie Flower', 'Inika' => 'Inika', 'Irish Grover' => 'Irish Grover', 'Istok Web' => 'Istok Web', 'Italiana' => 'Italiana', 'Italianno' => 'Italianno', 'Jacques Francois' => 'Jacques Francois', 'Jacques Francois Shadow' => 'Jacques Francois Shadow', 'Jim Nightshade' => 'Jim Nightshade', 'Jockey One' => 'Jockey One', 'Jolly Lodger' => 'Jolly Lodger', 'Josefin Sans' => 'Josefin Sans', 'Josefin Slab' => 'Josefin Slab', 'Joti One' => 'Joti One', 'Judson' => 'Judson', 'Julee' => 'Julee', 'Julius Sans One' => 'Julius Sans One', 'Junge' => 'Junge', 'Jura' => 'Jura', 'Just Another Hand' => 'Just Another Hand', 'Just Me Again Down Here' => 'Just Me Again Down Here', 'Kalam' => 'Kalam', 'Kameron' => 'Kameron', 'Kantumruy' => 'Kantumruy', 'Karla' => 'Karla', 'Karma' => 'Karma', 'Kaushan Script' => 'Kaushan Script', 'Kavoon' => 'Kavoon', 'Kdam Thmor' => 'Kdam Thmor', 'Keania One' => 'Keania One', 'Kelly Slab' => 'Kelly Slab', 'Kenia' => 'Kenia', 'Khand' => 'Khand', 'Khmer' => 'Khmer', 'Kite One' => 'Kite One', 'Knewave' => 'Knewave', 'Kotta One' => 'Kotta One', 'Koulen' => 'Koulen', 'Kranky' => 'Kranky', 'Kreon' => 'Kreon', 'Kristi' => 'Kristi', 'Krona One' => 'Krona One', 'La Belle Aurore' => 'La Belle Aurore', 'Laila' => 'Laila', 'Lancelot' => 'Lancelot', 'Lato' => 'Lato', 'League Script' => 'League Script', 'Leckerli One' => 'Leckerli One', 'Ledger' => 'Ledger', 'Lekton' => 'Lekton', 'Lemon' => 'Lemon', 'Libre Baskerville' => 'Libre Baskerville', 'Life Savers' => 'Life Savers', 'Lilita One' => 'Lilita One', 'Lily Script One' => 'Lily Script One', 'Limelight' => 'Limelight', 'Linden Hill' => 'Linden Hill', 'Lobster' => 'Lobster', 'Lobster Two' => 'Lobster Two', 'Londrina Outline' => 'Londrina Outline', 'Londrina Shadow' => 'Londrina Shadow', 'Londrina Sketch' => 'Londrina Sketch', 'Londrina Solid' => 'Londrina Solid', 'Lora' => 'Lora', 'Love Ya Like A Sister' => 'Love Ya Like A Sister', 'Loved by the King' => 'Loved by the King', 'Lovers Quarrel' => 'Lovers Quarrel', 'Luckiest Guy' => 'Luckiest Guy', 'Lusitana' => 'Lusitana', 'Lustria' => 'Lustria', 'Macondo' => 'Macondo', 'Macondo Swash Caps' => 'Macondo Swash Caps', 'Magra' => 'Magra', 'Maiden Orange' => 'Maiden Orange', 'Mako' => 'Mako', 'Marcellus' => 'Marcellus', 'Marcellus SC' => 'Marcellus SC', 'Marck Script' => 'Marck Script', 'Margarine' => 'Margarine', 'Marko One' => 'Marko One', 'Marmelad' => 'Marmelad', 'Marvel' => 'Marvel', 'Mate' => 'Mate', 'Mate SC' => 'Mate SC', 'Maven Pro' => 'Maven Pro', 'McLaren' => 'McLaren', 'Meddon' => 'Meddon', 'MedievalSharp' => 'MedievalSharp', 'Medula One' => 'Medula One', 'Megrim' => 'Megrim', 'Meie Script' => 'Meie Script', 'Merienda' => 'Merienda', 'Merienda One' => 'Merienda One', 'Merriweather' => 'Merriweather', 'Merriweather Sans' => 'Merriweather Sans', 'Metal' => 'Metal', 'Metal Mania' => 'Metal Mania', 'Metamorphous' => 'Metamorphous', 'Metrophobic' => 'Metrophobic', 'Michroma' => 'Michroma', 'Milonga' => 'Milonga', 'Miltonian' => 'Miltonian', 'Miltonian Tattoo' => 'Miltonian Tattoo', 'Miniver' => 'Miniver', 'Miss Fajardose' => 'Miss Fajardose', 'Modern Antiqua' => 'Modern Antiqua', 'Molengo' => 'Molengo', 'Molle' => 'Molle', 'Monda' => 'Monda', 'Monofett' => 'Monofett', 'Monoton' => 'Monoton', 'Monsieur La Doulaise' => 'Monsieur La Doulaise', 'Montaga' => 'Montaga', 'Montez' => 'Montez', 'Montserrat' => 'Montserrat', 'Montserrat Alternates' => 'Montserrat Alternates', 'Montserrat Subrayada' => 'Montserrat Subrayada', 'Moul' => 'Moul', 'Moulpali' => 'Moulpali', 'Mountains of Christmas' => 'Mountains of Christmas', 'Mouse Memoirs' => 'Mouse Memoirs', 'Mr Bedfort' => 'Mr Bedfort', 'Mr Dafoe' => 'Mr Dafoe', 'Mr De Haviland' => 'Mr De Haviland', 'Mrs Saint Delafield' => 'Mrs Saint Delafield', 'Mrs Sheppards' => 'Mrs Sheppards', 'Muli' => 'Muli', 'Mystery Quest' => 'Mystery Quest', 'Neucha' => 'Neucha', 'Neuton' => 'Neuton', 'New Rocker' => 'New Rocker', 'News Cycle' => 'News Cycle', 'Niconne' => 'Niconne', 'Nixie One' => 'Nixie One', 'Nobile' => 'Nobile', 'Nokora' => 'Nokora', 'Norican' => 'Norican', 'Nosifer' => 'Nosifer', 'Nothing You Could Do' => 'Nothing You Could Do', 'Noticia Text' => 'Noticia Text', 'Noto Sans' => 'Noto Sans', 'Noto Serif' => 'Noto Serif', 'Nova Cut' => 'Nova Cut', 'Nova Flat' => 'Nova Flat', 'Nova Mono' => 'Nova Mono', 'Nova Oval' => 'Nova Oval', 'Nova Round' => 'Nova Round', 'Nova Script' => 'Nova Script', 'Nova Slim' => 'Nova Slim', 'Nova Square' => 'Nova Square', 'Numans' => 'Numans', 'Nunito' => 'Nunito', 'Odor Mean Chey' => 'Odor Mean Chey', 'Offside' => 'Offside', 'Old Standard TT' => 'Old Standard TT', 'Oldenburg' => 'Oldenburg', 'Oleo Script' => 'Oleo Script', 'Oleo Script Swash Caps' => 'Oleo Script Swash Caps', 'Open Sans' => 'Open Sans', 'Open Sans Condensed' => 'Open Sans Condensed', 'Oranienbaum' => 'Oranienbaum', 'Orbitron' => 'Orbitron', 'Oregano' => 'Oregano', 'Orienta' => 'Orienta', 'Original Surfer' => 'Original Surfer', 'Oswald' => 'Oswald', 'Over the Rainbow' => 'Over the Rainbow', 'Overlock' => 'Overlock', 'Overlock SC' => 'Overlock SC', 'Ovo' => 'Ovo', 'Oxygen' => 'Oxygen', 'Oxygen Mono' => 'Oxygen Mono', 'PT Mono' => 'PT Mono', 'PT Sans' => 'PT Sans', 'PT Sans Caption' => 'PT Sans Caption', 'PT Sans Narrow' => 'PT Sans Narrow', 'PT Serif' => 'PT Serif', 'PT Serif Caption' => 'PT Serif Caption', 'Pacifico' => 'Pacifico', 'Paprika' => 'Paprika', 'Parisienne' => 'Parisienne', 'Passero One' => 'Passero One', 'Passion One' => 'Passion One', 'Pathway Gothic One' => 'Pathway Gothic One', 'Patrick Hand' => 'Patrick Hand', 'Patrick Hand SC' => 'Patrick Hand SC', 'Patua One' => 'Patua One', 'Paytone One' => 'Paytone One', 'Peralta' => 'Peralta', 'Permanent Marker' => 'Permanent Marker', 'Petit Formal Script' => 'Petit Formal Script', 'Petrona' => 'Petrona', 'Philosopher' => 'Philosopher', 'Piedra' => 'Piedra', 'Pinyon Script' => 'Pinyon Script', 'Pirata One' => 'Pirata One', 'Plaster' => 'Plaster', 'Play' => 'Play', 'Playball' => 'Playball', 'Playfair Display' => 'Playfair Display', 'Playfair Display SC' => 'Playfair Display SC', 'Podkova' => 'Podkova', 'Poiret One' => 'Poiret One', 'Poller One' => 'Poller One', 'Poly' => 'Poly', 'Pompiere' => 'Pompiere', 'Pontano Sans' => 'Pontano Sans', 'Port Lligat Sans' => 'Port Lligat Sans', 'Port Lligat Slab' => 'Port Lligat Slab', 'Prata' => 'Prata', 'Preahvihear' => 'Preahvihear', 'Press Start 2P' => 'Press Start 2P', 'Princess Sofia' => 'Princess Sofia', 'Prociono' => 'Prociono', 'Prosto One' => 'Prosto One', 'Puritan' => 'Puritan', 'Purple Purse' => 'Purple Purse', 'Quando' => 'Quando', 'Quantico' => 'Quantico', 'Quattrocento' => 'Quattrocento', 'Quattrocento Sans' => 'Quattrocento Sans', 'Questrial' => 'Questrial', 'Quicksand' => 'Quicksand', 'Quintessential' => 'Quintessential', 'Qwigley' => 'Qwigley', 'Racing Sans One' => 'Racing Sans One', 'Radley' => 'Radley', 'Rajdhani' => 'Rajdhani', 'Raleway' => 'Raleway', 'Raleway Dots' => 'Raleway Dots', 'Rambla' => 'Rambla', 'Rammetto One' => 'Rammetto One', 'Ranchers' => 'Ranchers', 'Rancho' => 'Rancho', 'Rationale' => 'Rationale', 'Redressed' => 'Redressed', 'Reenie Beanie' => 'Reenie Beanie', 'Revalia' => 'Revalia', 'Ribeye' => 'Ribeye', 'Ribeye Marrow' => 'Ribeye Marrow', 'Righteous' => 'Righteous', 'Risque' => 'Risque', 'Roboto' => 'Roboto', 'Roboto Condensed' => 'Roboto Condensed', 'Roboto Slab' => 'Roboto Slab', 'Rochester' => 'Rochester', 'Rock Salt' => 'Rock Salt', 'Rokkitt' => 'Rokkitt', 'Romanesco' => 'Romanesco', 'Ropa Sans' => 'Ropa Sans', 'Rosario' => 'Rosario', 'Rosarivo' => 'Rosarivo', 'Rouge Script' => 'Rouge Script', 'Rozha One' => 'Rozha One', 'Rubik Mono One' => 'Rubik Mono One', 'Rubik One' => 'Rubik One', 'Ruda' => 'Ruda', 'Rufina' => 'Rufina', 'Ruge Boogie' => 'Ruge Boogie', 'Ruluko' => 'Ruluko', 'Rum Raisin' => 'Rum Raisin', 'Ruslan Display' => 'Ruslan Display', 'Russo One' => 'Russo One', 'Ruthie' => 'Ruthie', 'Rye' => 'Rye', 'Sacramento' => 'Sacramento', 'Sail' => 'Sail', 'Salsa' => 'Salsa', 'Sanchez' => 'Sanchez', 'Sancreek' => 'Sancreek', 'Sansita One' => 'Sansita One', 'Sarina' => 'Sarina', 'Sarpanch' => 'Sarpanch', 'Satisfy' => 'Satisfy', 'Scada' => 'Scada', 'Schoolbell' => 'Schoolbell', 'Seaweed Script' => 'Seaweed Script', 'Sevillana' => 'Sevillana', 'Seymour One' => 'Seymour One', 'Shadows Into Light' => 'Shadows Into Light', 'Shadows Into Light Two' => 'Shadows Into Light Two', 'Shanti' => 'Shanti', 'Share' => 'Share', 'Share Tech' => 'Share Tech', 'Share Tech Mono' => 'Share Tech Mono', 'Shojumaru' => 'Shojumaru', 'Short Stack' => 'Short Stack', 'Siemreap' => 'Siemreap', 'Sigmar One' => 'Sigmar One', 'Signika' => 'Signika', 'Signika Negative' => 'Signika Negative', 'Simonetta' => 'Simonetta', 'Sintony' => 'Sintony', 'Sirin Stencil' => 'Sirin Stencil', 'Six Caps' => 'Six Caps', 'Skranji' => 'Skranji', 'Slabo 13px' => 'Slabo 13px', 'Slabo 27px' => 'Slabo 27px', 'Slackey' => 'Slackey', 'Smokum' => 'Smokum', 'Smythe' => 'Smythe', 'Sniglet' => 'Sniglet', 'Snippet' => 'Snippet', 'Snowburst One' => 'Snowburst One', 'Sofadi One' => 'Sofadi One', 'Sofia' => 'Sofia', 'Sonsie One' => 'Sonsie One', 'Sorts Mill Goudy' => 'Sorts Mill Goudy', 'Source Code Pro' => 'Source Code Pro', 'Source Sans Pro' => 'Source Sans Pro', 'Source Serif Pro' => 'Source Serif Pro', 'Special Elite' => 'Special Elite', 'Spicy Rice' => 'Spicy Rice', 'Spinnaker' => 'Spinnaker', 'Spirax' => 'Spirax', 'Squada One' => 'Squada One', 'Stalemate' => 'Stalemate', 'Stalinist One' => 'Stalinist One', 'Stardos Stencil' => 'Stardos Stencil', 'Stint Ultra Condensed' => 'Stint Ultra Condensed', 'Stint Ultra Expanded' => 'Stint Ultra Expanded', 'Stoke' => 'Stoke', 'Strait' => 'Strait', 'Sue Ellen Francisco' => 'Sue Ellen Francisco', 'Sunshiney' => 'Sunshiney', 'Supermercado One' => 'Supermercado One', 'Suwannaphum' => 'Suwannaphum', 'Swanky and Moo Moo' => 'Swanky and Moo Moo', 'Syncopate' => 'Syncopate', 'Tangerine' => 'Tangerine', 'Taprom' => 'Taprom', 'Tauri' => 'Tauri', 'Teko' => 'Teko', 'Telex' => 'Telex', 'Tenor Sans' => 'Tenor Sans', 'Text Me One' => 'Text Me One', 'The Girl Next Door' => 'The Girl Next Door', 'Tienne' => 'Tienne', 'Tinos' => 'Tinos', 'Titan One' => 'Titan One', 'Titillium Web' => 'Titillium Web', 'Trade Winds' => 'Trade Winds', 'Trocchi' => 'Trocchi', 'Trochut' => 'Trochut', 'Trykker' => 'Trykker', 'Tulpen One' => 'Tulpen One', 'Ubuntu' => 'Ubuntu', 'Ubuntu Condensed' => 'Ubuntu Condensed', 'Ubuntu Mono' => 'Ubuntu Mono', 'Ultra' => 'Ultra', 'Uncial Antiqua' => 'Uncial Antiqua', 'Underdog' => 'Underdog', 'Unica One' => 'Unica One', 'UnifrakturCook' => 'UnifrakturCook', 'UnifrakturMaguntia' => 'UnifrakturMaguntia', 'Unkempt' => 'Unkempt', 'Unlock' => 'Unlock', 'Unna' => 'Unna', 'VT323' => 'VT323', 'Vampiro One' => 'Vampiro One', 'Varela' => 'Varela', 'Varela Round' => 'Varela Round', 'Vast Shadow' => 'Vast Shadow', 'Vesper Libre' => 'Vesper Libre', 'Vibur' => 'Vibur', 'Vidaloka' => 'Vidaloka', 'Viga' => 'Viga', 'Voces' => 'Voces', 'Volkhov' => 'Volkhov', 'Vollkorn' => 'Vollkorn', 'Voltaire' => 'Voltaire', 'Waiting for the Sunrise' => 'Waiting for the Sunrise', 'Wallpoet' => 'Wallpoet', 'Walter Turncoat' => 'Walter Turncoat', 'Warnes' => 'Warnes', 'Wellfleet' => 'Wellfleet', 'Wendy One' => 'Wendy One', 'Wire One' => 'Wire One', 'Yanone Kaffeesatz' => 'Yanone Kaffeesatz', 'Yellowtail' => 'Yellowtail', 'Yeseva One' => 'Yeseva One', 'Yesteryear' => 'Yesteryear', 'Zeyada' => 'Zeyada');
6
+ }
7
+
8
  ?>
assets/images/icon-email.png ADDED
Binary file
assets/js/admin.js CHANGED
@@ -31,6 +31,8 @@ jQuery(document).ready(function ($) {
31
  window[fname].the_thick(ui.value);
32
  if("#ujic_lab_sz" == sId)
33
  window[fname].the_lab_sz(ui.value);
 
 
34
  }
35
  });
36
 
@@ -60,6 +62,8 @@ jQuery(document).ready(function ($) {
60
  window[fname].init();
61
  }
62
 
 
 
63
  });
64
 
65
 
@@ -89,7 +93,7 @@ function ujic_admin_home() {
89
 
90
  (function ($) {
91
  classicSelect = {
92
- /// Init
93
  init: function () {
94
  var style = $('#ujic-style');
95
  if (style.length) {
@@ -99,6 +103,7 @@ function ujic_admin_home() {
99
  this.the_colors();
100
  this.the_labels();
101
  this.the_fonts();
 
102
  }
103
  },
104
  /// Size
@@ -126,6 +131,7 @@ function ujic_admin_home() {
126
  $('#ujiCountdown').find('.' + format[i]).hide();
127
  }
128
  }
 
129
  //live change
130
  $('.iCheck-helper').click(function () {
131
  var id = $(this).parent().find(":checkbox").attr("id");
@@ -134,8 +140,56 @@ function ujic_admin_home() {
134
  } else {
135
  $('#ujiCountdown').find('.' + id).hide();
136
  }
 
 
 
137
  });
138
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  /// Colors
140
  the_colors: function (id, hex) {
141
  var col_txt = $('#ujic_col_txt').val();
@@ -143,6 +197,7 @@ function ujic_admin_home() {
143
  var col_up = $('#ujic_col_up').val();
144
  var col_dw = $('#ujic_col_dw').val();
145
  var col_lab = $('#ujic_col_lab').val();
 
146
 
147
  $('.countdown_amount').css('color', col_txt);
148
  $('.countdown_amount').css("text-shadow", '1px 1px 1px ' + col_sw);
@@ -156,12 +211,23 @@ function ujic_admin_home() {
156
  $('.ujic-classic').find('.countdown_amount').css("filter", "progid:DXImageTransform.Microsoft.gradient( startColorstr='" + col_up + "', endColorstr='" + col_dw + "',GradientType=0 )"); /* IE6-9 */
157
 
158
  $('.countdown_txt').css('color', col_lab);
 
 
 
 
 
 
 
 
 
159
  },
160
  /// Colors
161
  new_colors: function (id, hex) {
162
  var col_up = $('#ujic_col_up').val();
163
  var col_dw = $('#ujic_col_dw').val();
164
-
 
 
165
  switch (id)
166
  {
167
  case 'ujic_col_txt':
@@ -191,6 +257,16 @@ function ujic_admin_home() {
191
  case 'ujic_col_lab':
192
  $('.countdown_txt').css('color', hex);
193
  break;
 
 
 
 
 
 
 
 
 
 
194
  }
195
  },
196
  /// Text Labels
31
  window[fname].the_thick(ui.value);
32
  if("#ujic_lab_sz" == sId)
33
  window[fname].the_lab_sz(ui.value);
34
+ if('#ujic_subscrFrmWidth' == sId)
35
+ window[fname].subscrFormWidth(ui.value);
36
  }
37
  });
38
 
62
  window[fname].init();
63
  }
64
 
65
+
66
+
67
  });
68
 
69
 
93
 
94
  (function ($) {
95
  classicSelect = {
96
+ /// Init
97
  init: function () {
98
  var style = $('#ujic-style');
99
  if (style.length) {
103
  this.the_colors();
104
  this.the_labels();
105
  this.the_fonts();
106
+ this.handleSubscription();
107
  }
108
  },
109
  /// Size
131
  $('#ujiCountdown').find('.' + format[i]).hide();
132
  }
133
  }
134
+
135
  //live change
136
  $('.iCheck-helper').click(function () {
137
  var id = $(this).parent().find(":checkbox").attr("id");
140
  } else {
141
  $('#ujiCountdown').find('.' + id).hide();
142
  }
143
+
144
+ (id === 'ujic_subscrFrmIsEnabled') ? classicSelect.handleSubscription() : null;
145
+
146
  });
147
  },
148
+ subscrFormWidth : function(newWidth){
149
+ $('#ujiCountdown form p').width(newWidth + '%');
150
+ },
151
+ handleSubscription : function(){
152
+ var formElements = {
153
+
154
+ subscrFrmElm : $('#ujiCountdown form'),
155
+ subscrFrmWidth : $('#ujic_subscrFrmWidth').parent(),
156
+ subscrFrmAboveTxt : $('#ujic_subscrFrmAboveText').parent(),
157
+ subscrFrmInputTxt : $('#ujic_subscrFrmInputText').parent(),
158
+ subscrFrmSubmitTxt : $('#ujic_subscrFrmSubmitText').parent(),
159
+ subscrFrmThanksMessage : $('#ujic_subscrFrmThanksMessage').parent(),
160
+ subscrFrmErrorMessage : $('#ujic_subscrFrmErrorMessage').parent(),
161
+ subscrFrmSubmitColor : $('#ujic_subscrFrmSubmitColor').closest( ".ujic-color" )
162
+
163
+ };
164
+
165
+ var isFormEnabled = $('#ujic_subscrFrmIsEnabled').is(':checked');
166
+ this.toggleSubscriptionElements(formElements, isFormEnabled);
167
+
168
+ formElements.subscrFrmAboveTxt.children('input').keyup(function(){
169
+ formElements.subscrFrmElm.children('span').text($(this).val());
170
+ }).keydown(function(evt){13 == evt.which ? evt.preventDefault() : '';});
171
+
172
+ formElements.subscrFrmInputTxt.children('input').keyup(function(){
173
+ formElements.subscrFrmElm.find('input:text').attr('placeholder', $(this).val());
174
+ }).keydown(function(evt){13 == evt.which ? evt.preventDefault() : '';});
175
+
176
+ formElements.subscrFrmSubmitTxt.children('input').keyup(function(){
177
+ formElements.subscrFrmElm.find('input:submit').val($(this).val()).click(function(evt){evt.preventDefault();});
178
+ }).keydown(function(evt){13 == evt.which ? evt.preventDefault() : '';});
179
+
180
+
181
+ },
182
+ toggleSubscriptionElements : function(elements, visible){
183
+
184
+ $.each(elements, function(prop, elm){
185
+ (!!visible) ? elm.show() : elm.hide(1000);
186
+ });
187
+ },
188
+ //color light
189
+ shadeColor : function(color, percent) {
190
+ var num = parseInt(color.slice(1),16), amt = Math.round(2.55 * percent), R = (num >> 16) + amt, G = (num >> 8 & 0x00FF) + amt, B = (num & 0x0000FF) + amt;
191
+ return "#" + (0x1000000 + (R<255?R<1?0:R:255)*0x10000 + (G<255?G<1?0:G:255)*0x100 + (B<255?B<1?0:B:255)).toString(16).slice(1);
192
+ },
193
  /// Colors
194
  the_colors: function (id, hex) {
195
  var col_txt = $('#ujic_col_txt').val();
197
  var col_up = $('#ujic_col_up').val();
198
  var col_dw = $('#ujic_col_dw').val();
199
  var col_lab = $('#ujic_col_lab').val();
200
+ var col_sub = $('#ujic_subscrFrmSubmitColor').val();
201
 
202
  $('.countdown_amount').css('color', col_txt);
203
  $('.countdown_amount').css("text-shadow", '1px 1px 1px ' + col_sw);
211
  $('.ujic-classic').find('.countdown_amount').css("filter", "progid:DXImageTransform.Microsoft.gradient( startColorstr='" + col_up + "', endColorstr='" + col_dw + "',GradientType=0 )"); /* IE6-9 */
212
 
213
  $('.countdown_txt').css('color', col_lab);
214
+
215
+ $('#ujiCountdown').find('input[type=submit]').css("background", "-moz-linear-gradient(top, " + col_sub + " 0%, " + this.shadeColor(col_sub, 20) + " 100%)"); /* FF3.6+ */
216
+ $('#ujiCountdown').find('input[type=submit]').css("background", "-webkit-gradient(linear, left top, left bottom, color-stop(0%," + col_sub + "), color-stop(100%," + this.shadeColor(col_sub, 20) + "))"); /* Chrome,Safari4+ */
217
+ $('#ujiCountdown').find('input[type=submit]').css("background", "-webkit-linear-gradient(top, " + col_sub + " 50%," + this.shadeColor(col_sub, 20) + " 100%)"); /* Chrome10+,Safari5.1+ */
218
+ $('#ujiCountdown').find('input[type=submit]').css("background", "-o-linear-gradient(top, " + col_sub + " 0%," + this.shadeColor(col_sub, 20) + " 100%)"); /* Opera 11.10+ */
219
+ $('#ujiCountdown').find('input[type=submit]').css("background", "-ms-linear-gradient(top, " + col_sub + " 0%," + this.shadeColor(col_sub, 20) + " 100%)"); /* IE10+ */
220
+ $('#ujiCountdown').find('input[type=submit]').css("background", "linear-gradient(to bottom, " + col_sub + " 0%," + this.shadeColor(col_sub, 20) + " 100%)"); /* W3C */
221
+ $('#ujiCountdown').find('input[type=submit]').css("filter", "progid:DXImageTransform.Microsoft.gradient( startColorstr='" + col_sub + "', endColorstr='" + this.shadeColor(col_sub, 20) + "',GradientType=0 )"); /* IE6-9 */
222
+
223
  },
224
  /// Colors
225
  new_colors: function (id, hex) {
226
  var col_up = $('#ujic_col_up').val();
227
  var col_dw = $('#ujic_col_dw').val();
228
+
229
+
230
+ //console.log(id);
231
  switch (id)
232
  {
233
  case 'ujic_col_txt':
257
  case 'ujic_col_lab':
258
  $('.countdown_txt').css('color', hex);
259
  break;
260
+ case 'ujic_subscrFrmSubmitColor':
261
+ //console.log(this.shadeColor(hex, 70));
262
+ $('#ujiCountdown').find('input[type=submit]').css("background", "-moz-linear-gradient(top, " + hex + " 0%, " + this.shadeColor(hex, 20) + " 100%)"); /* FF3.6+ */
263
+ $('#ujiCountdown').find('input[type=submit]').css("background", "-webkit-gradient(linear, left top, left bottom, color-stop(0%," + hex + "), color-stop(100%," + this.shadeColor(hex, 20) + "))"); /* Chrome,Safari4+ */
264
+ $('#ujiCountdown').find('input[type=submit]').css("background", "-webkit-linear-gradient(top, " + hex + " 50%," + this.shadeColor(hex, 20) + " 100%)"); /* Chrome10+,Safari5.1+ */
265
+ $('#ujiCountdown').find('input[type=submit]').css("background", "-o-linear-gradient(top, " + hex + " 0%," + this.shadeColor(hex, 20) + " 100%)"); /* Opera 11.10+ */
266
+ $('#ujiCountdown').find('input[type=submit]').css("background", "-ms-linear-gradient(top, " + hex + " 0%," + this.shadeColor(hex, 20) + " 100%)"); /* IE10+ */
267
+ $('#ujiCountdown').find('input[type=submit]').css("background", "linear-gradient(to bottom, " + hex + " 0%," + this.shadeColor(hex, 20) + " 100%)"); /* W3C */
268
+ $('#ujiCountdown').find('input[type=submit]').css("filter", "progid:DXImageTransform.Microsoft.gradient( startColorstr='" + hex + "', endColorstr='" + this.shadeColor(hex, 20) + "',GradientType=0 )"); /* IE6-9 */
269
+ break;
270
  }
271
  },
272
  /// Text Labels
assets/js/widget.js CHANGED
@@ -1,24 +1,24 @@
1
- jQuery(document).ready(function($) {
2
- jQuery("#widgets-right").on( "mouseover", ".ujic_date", function() {
3
- jQuery("#widgets-right").find(".ujic_date").datepicker({
4
- dateFormat : 'yy/mm/dd'
5
- });
6
- });
7
-
8
- jQuery('.ujic_link').each(function() {
9
- jQuery(this).keyup(function () {
10
- var value = jQuery(this).val();
11
- var cname = jQuery(this).parent().parent().find('.ujic_exp').attr("name");
12
- jQuery(this).parent().parent().find('.ujic_exp').css('border', 'red');
13
- //alert(cname);
14
-
15
- if(value){
16
- jQuery('input[name="'+cname+'"]').attr('checked', false);
17
- }else{
18
-
19
- jQuery('input[name="'+cname+'"]').attr('checked', true);
20
- }
21
-
22
- });
23
- });
24
  });
1
+ jQuery(document).ready(function($) {
2
+ jQuery("#widgets-right").on( "mouseover", ".ujic_date", function() {
3
+ jQuery("#widgets-right").find(".ujic_date").datepicker({
4
+ dateFormat : 'yy/mm/dd'
5
+ });
6
+ });
7
+
8
+ jQuery('.ujic_link').each(function() {
9
+ jQuery(this).keyup(function () {
10
+ var value = jQuery(this).val();
11
+ var cname = jQuery(this).parent().parent().find('.ujic_exp').attr("name");
12
+ jQuery(this).parent().parent().find('.ujic_exp').css('border', 'red');
13
+ //alert(cname);
14
+
15
+ if(value){
16
+ jQuery('input[name="'+cname+'"]').attr('checked', false);
17
+ }else{
18
+
19
+ jQuery('input[name="'+cname+'"]').attr('checked', true);
20
+ }
21
+
22
+ });
23
+ });
24
  });
assets/tinymce/config.php CHANGED
@@ -38,42 +38,45 @@ function ujic_get_datetime($nr){
38
 
39
 
40
  $ujic_shortcodes['countdown'] = array(
41
- 'no_preview' => true,
42
- 'params' => array(
43
- 'style' => array(
44
- 'type' => 'select',
45
- 'label' => __('Select Style', 'ujicountdown'),
46
- 'desc' => __('Select the style for your countdown', 'ujicountdown'),
47
- 'options' => ujic_get_styles(),
48
- 'desc' => ujic_get_styles(true)
49
- ),
50
- 'thedate' => array(
51
- 'std' => '',
52
- 'type' => 'datapick',
53
- 'label' => __('Expire Date', 'ujicountdown'),
54
- 'desc' => __('Select the date to expire', 'ujicountdown'),
55
- ),
56
- 'thetime' => array(
57
- 'type' => 'timepick',
58
- 'label' => __('Time', 'ujicountdown'),
59
- 'desc' => __('Select the time to expire', 'ujicountdown'),
60
- 'options_h' => ujic_get_datetime(23),
61
- 'options_m' => ujic_get_datetime(59),
62
-
63
- ),
64
- 'thexpi' => array(
65
- 'std' => '',
66
- 'std2' => 'http://',
67
- 'type' => 'expiry',
68
- 'fname' => __('Hide the countdown: ', 'ujicountdown'),
69
- 'fname2' => __('Or go to URL: ', 'ujicountdown'),
70
- 'label' => __('After Expiry', 'ujicountdown'),
71
- 'desc' => __('Select option after expiry', 'ujicountdown')
72
- )
 
 
 
 
 
73
  ),
74
- 'shortcode' => '[ujicountdown id="{{style}}" expire="{{thedate}} {{thetime}}:{{thetime_}}" hide="{{thexpi}}" url="{{thexpi_}}"]',
75
- 'popup_title' => __('Insert Countdown Shortcode', 'ujicountdown')
76
-
77
  );
78
-
79
  ?>
38
 
39
 
40
  $ujic_shortcodes['countdown'] = array(
41
+ 'no_preview' => true,
42
+ 'params' => array(
43
+ 'style' => array(
44
+ 'type' => 'select',
45
+ 'label' => __('Select Style', 'ujicountdown'),
46
+ 'desc' => __('Select the style for your countdown', 'ujicountdown'),
47
+ 'options' => ujic_get_styles(),
48
+ 'desc' => ujic_get_styles(true)
49
+ ),
50
+ 'thedate' => array(
51
+ 'std' => '',
52
+ 'type' => 'datapick',
53
+ 'label' => __('Expire Date', 'ujicountdown'),
54
+ 'desc' => __('Select the date to expire', 'ujicountdown'),
55
+ ),
56
+ 'thetime' => array(
57
+ 'type' => 'timepick',
58
+ 'label' => __('Time', 'ujicountdown'),
59
+ 'desc' => __('Select the time to expire', 'ujicountdown'),
60
+ 'options_h' => ujic_get_datetime(23),
61
+ 'options_m' => ujic_get_datetime(59),
62
+ ),
63
+ 'thexpi' => array(
64
+ 'std' => '',
65
+ 'std2' => 'http://',
66
+ 'type' => 'expiry',
67
+ 'fname' => __('Hide the countdown: ', 'ujicountdown'),
68
+ 'fname2' => __('Or go to URL: ', 'ujicountdown'),
69
+ 'label' => __('After Expiry', 'ujicountdown'),
70
+ 'desc' => __('Select option after expiry', 'ujicountdown')
71
+ ),
72
+ 'subscr' => array(
73
+ 'std' => '',
74
+ 'type' => 'text',
75
+ 'label' => __('Campaign Name', 'ujicountdown'),
76
+ 'desc' => __('Your Campaign Name', 'ujicountdown'),
77
+ )
78
  ),
79
+ 'shortcode' => '[ujicountdown id="{{style}}" expire="{{thedate}} {{thetime}}:{{thetime_}}" hide="{{thexpi}}" url="{{thexpi_}}" subscr="{{subscr}}"]',
80
+ 'popup_title' => __('Insert Countdown Shortcode', 'ujicountdown')
 
81
  );
 
82
  ?>
assets/tinymce/js/popup.js CHANGED
@@ -1,192 +1,192 @@
1
- // start the popup specefic scripts
2
- // safe to use $
3
- jQuery(document).ready(function($) {
4
- var ujics = {
5
- loadVals: function()
6
- {
7
- var shortcode = $('#_ujic_shortcode').text(),
8
- uShortcode = shortcode;
9
-
10
- // fill in the gaps eg {{param}}
11
- $('.ujic-input').each(function() {
12
- var input = $(this),
13
- id = input.attr('id'),
14
- id = id.replace('ujic_', ''), // gets rid of the ujic_ prefix
15
- re = new RegExp("{{"+id+"}}","g");
16
- if ( !$(this).is(':checkbox') || ( $(this).is(':checkbox') && $(this).is(':checked') ) )
17
- uShortcode = uShortcode.replace(re, input.val());
18
- else uShortcode = uShortcode.replace(re, '');
19
- });
20
-
21
- // adds the filled-in shortcode as hidden input
22
- $('#_ujic_ushortcode').remove();
23
- $('#ujic-sc-form-table').prepend('<div id="_ujic_ushortcode" class="hidden">' + uShortcode + '</div>');
24
- },
25
- cLoadVals: function()
26
- {
27
- var shortcode = $('#_ujic_cshortcode').text(),
28
- pShortcode = '';
29
- shortcodes = '';
30
-
31
- // fill in the gaps eg {{param}}
32
- $('.child-clone-row').each(function() {
33
- var row = $(this),
34
- rShortcode = shortcode;
35
-
36
- $('.ujic-cinput', this).each(function() {
37
- var input = $(this),
38
- id = input.attr('id'),
39
- id = id.replace('ujic_', '') // gets rid of the ujic_ prefix
40
- re = new RegExp("{{"+id+"}}","g");
41
- if ( !$(this).is(':checkbox') || ( $(this).is(':checkbox') && $(this).is(':checked') ) )
42
- rShortcode = rShortcode.replace(re, input.val());
43
- else rShortcode = rShortcode.replace(re, '');
44
- });
45
-
46
- shortcodes = shortcodes + rShortcode + "\n";
47
- });
48
-
49
- // adds the filled-in shortcode as hidden input
50
- $('#_ujic_cshortcodes').remove();
51
- $('.child-clone-rows').prepend('<div id="_ujic_cshortcodes" class="hidden">' + shortcodes + '</div>');
52
-
53
- // add to parent shortcode
54
- this.loadVals();
55
- pShortcode = $('#_ujic_ushortcode').text().replace('{{child_shortcode}}', shortcodes);
56
-
57
- // add updated parent shortcode
58
- $('#_ujic_ushortcode').remove();
59
- $('#ujic-sc-form-table').prepend('<div id="_ujic_ushortcode" class="hidden">' + pShortcode + '</div>');
60
- },
61
- children: function()
62
- {
63
- // assign the cloning plugin
64
- $('.child-clone-rows').appendo({
65
- subSelect: '> div.child-clone-row:last-child',
66
- allowDelete: false,
67
- focusFirst: false
68
- });
69
-
70
- // remove button
71
- $('.child-clone-row-remove').live('click', function() {
72
- var btn = $(this),
73
- row = btn.parent();
74
-
75
- if( $('.child-clone-row').size() > 1 )
76
- {
77
- row.remove();
78
- }
79
- else
80
- {
81
- alert('You need a minimum of one row');
82
- }
83
-
84
- return false;
85
- });
86
-
87
- // assign jUI sortable
88
- $( ".child-clone-rows" ).sortable({
89
- placeholder: "sortable-placeholder",
90
- items: '.child-clone-row'
91
-
92
- });
93
- },
94
- resizeTB: function()
95
- {
96
- var ajaxCont = $('#TB_ajaxContent'),
97
- tbWindow = $('#TB_window'),
98
- ujicPopup = $('#ujic-popup');
99
-
100
- tbWindow.css({
101
- height: ujicPopup.outerHeight() + 50,
102
- width: ujicPopup.outerWidth(),
103
- marginLeft: -(ujicPopup.outerWidth()/2)
104
- });
105
-
106
- ajaxCont.css({
107
- paddingTop: 0,
108
- paddingLeft: 0,
109
- paddingRight: 0,
110
- height: (tbWindow.outerHeight()-47),
111
- overflow: 'auto', // IMPORTANT
112
- width: ujicPopup.outerWidth()
113
- });
114
-
115
- $('#ujic-popup').addClass('no_preview');
116
- },
117
- load: function()
118
- {
119
- var ujics = this,
120
- popup = $('#ujic-popup'),
121
- form = $('#ujic-sc-form', popup),
122
- shortcode = $('#_ujic_shortcode', form).text(),
123
- popupType = $('#_ujic_popup', form).text(),
124
- uShortcode = '';
125
-
126
- // resize TB
127
- ujics.resizeTB();
128
- $(window).resize(function() { ujics.resizeTB() });
129
-
130
- // initialise
131
- ujics.loadVals();
132
- ujics.children();
133
- ujics.cLoadVals();
134
-
135
- // update on children value change
136
- $('.ujic-cinput', form).live('change', function() {
137
- ujics.cLoadVals();
138
- });
139
-
140
- // update on value change
141
- $('.ujic-input', form).change(function() {
142
- ujics.loadVals();
143
- });
144
-
145
- $('.ujic-datapick').datepicker({
146
- dateFormat: 'yy/mm/dd'
147
- });
148
-
149
- // when insert is clicked
150
- $('.ujic-insert', form).click(function() {
151
- var errors = false;
152
- var style_id = jQuery("#ujic_style").val();
153
- var date_id = jQuery("#ujic_thedate").val();
154
- var url_id = jQuery('#ujic_thexpi_').val();
155
- if(style_id == ""){
156
- alert("Please select a style");
157
- errors = true;
158
- return;
159
- }
160
- if(date_id == ""){
161
- alert("Please select countdown date");
162
- errors = true;
163
- return;
164
- }
165
- if(url_id != "" && !isUrl(url_id)){
166
- alert("Please insert valid link");
167
- errors = true;
168
- return;
169
- }
170
-
171
- if(parent.tinymce && !errors)
172
- {
173
- parent.tinymce.activeEditor.execCommand('mceInsertContent',false,$('#_ujic_ushortcode', form).html());
174
- tb_remove();
175
- }
176
-
177
- });
178
- }
179
- }
180
-
181
- // run
182
- $('#ujic-popup').livequery( function() { ujics.load(); } );
183
- });
184
-
185
- function isUrl(url) {
186
- var RegExp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
187
- if(RegExp.test(url)){
188
- return true;
189
- }else{
190
- return false;
191
- }
192
  }
1
+ // start the popup specefic scripts
2
+ // safe to use $
3
+ jQuery(document).ready(function($) {
4
+ var ujics = {
5
+ loadVals: function()
6
+ {
7
+ var shortcode = $('#_ujic_shortcode').text(),
8
+ uShortcode = shortcode;
9
+
10
+ // fill in the gaps eg {{param}}
11
+ $('.ujic-input').each(function() {
12
+ var input = $(this),
13
+ id = input.attr('id'),
14
+ id = id.replace('ujic_', ''), // gets rid of the ujic_ prefix
15
+ re = new RegExp("{{"+id+"}}","g");
16
+ if ( !$(this).is(':checkbox') || ( $(this).is(':checkbox') && $(this).is(':checked') ) )
17
+ uShortcode = uShortcode.replace(re, input.val());
18
+ else uShortcode = uShortcode.replace(re, '');
19
+ });
20
+
21
+ // adds the filled-in shortcode as hidden input
22
+ $('#_ujic_ushortcode').remove();
23
+ $('#ujic-sc-form-table').prepend('<div id="_ujic_ushortcode" class="hidden">' + uShortcode + '</div>');
24
+ },
25
+ cLoadVals: function()
26
+ {
27
+ var shortcode = $('#_ujic_cshortcode').text(),
28
+ pShortcode = '';
29
+ shortcodes = '';
30
+
31
+ // fill in the gaps eg {{param}}
32
+ $('.child-clone-row').each(function() {
33
+ var row = $(this),
34
+ rShortcode = shortcode;
35
+
36
+ $('.ujic-cinput', this).each(function() {
37
+ var input = $(this),
38
+ id = input.attr('id'),
39
+ id = id.replace('ujic_', '') // gets rid of the ujic_ prefix
40
+ re = new RegExp("{{"+id+"}}","g");
41
+ if ( !$(this).is(':checkbox') || ( $(this).is(':checkbox') && $(this).is(':checked') ) )
42
+ rShortcode = rShortcode.replace(re, input.val());
43
+ else rShortcode = rShortcode.replace(re, '');
44
+ });
45
+
46
+ shortcodes = shortcodes + rShortcode + "\n";
47
+ });
48
+
49
+ // adds the filled-in shortcode as hidden input
50
+ $('#_ujic_cshortcodes').remove();
51
+ $('.child-clone-rows').prepend('<div id="_ujic_cshortcodes" class="hidden">' + shortcodes + '</div>');
52
+
53
+ // add to parent shortcode
54
+ this.loadVals();
55
+ pShortcode = $('#_ujic_ushortcode').text().replace('{{child_shortcode}}', shortcodes);
56
+
57
+ // add updated parent shortcode
58
+ $('#_ujic_ushortcode').remove();
59
+ $('#ujic-sc-form-table').prepend('<div id="_ujic_ushortcode" class="hidden">' + pShortcode + '</div>');
60
+ },
61
+ children: function()
62
+ {
63
+ // assign the cloning plugin
64
+ $('.child-clone-rows').appendo({
65
+ subSelect: '> div.child-clone-row:last-child',
66
+ allowDelete: false,
67
+ focusFirst: false
68
+ });
69
+
70
+ // remove button
71
+ $('.child-clone-row-remove').live('click', function() {
72
+ var btn = $(this),
73
+ row = btn.parent();
74
+
75
+ if( $('.child-clone-row').size() > 1 )
76
+ {
77
+ row.remove();
78
+ }
79
+ else
80
+ {
81
+ alert('You need a minimum of one row');
82
+ }
83
+
84
+ return false;
85
+ });
86
+
87
+ // assign jUI sortable
88
+ $( ".child-clone-rows" ).sortable({
89
+ placeholder: "sortable-placeholder",
90
+ items: '.child-clone-row'
91
+
92
+ });
93
+ },
94
+ resizeTB: function()
95
+ {
96
+ var ajaxCont = $('#TB_ajaxContent'),
97
+ tbWindow = $('#TB_window'),
98
+ ujicPopup = $('#ujic-popup');
99
+
100
+ tbWindow.css({
101
+ height: ujicPopup.outerHeight() + 50,
102
+ width: ujicPopup.outerWidth(),
103
+ marginLeft: -(ujicPopup.outerWidth()/2)
104
+ });
105
+
106
+ ajaxCont.css({
107
+ paddingTop: 0,
108
+ paddingLeft: 0,
109
+ paddingRight: 0,
110
+ height: (tbWindow.outerHeight()-47),
111
+ overflow: 'auto', // IMPORTANT
112
+ width: ujicPopup.outerWidth()
113
+ });
114
+
115
+ $('#ujic-popup').addClass('no_preview');
116
+ },
117
+ load: function()
118
+ {
119
+ var ujics = this,
120
+ popup = $('#ujic-popup'),
121
+ form = $('#ujic-sc-form', popup),
122
+ shortcode = $('#_ujic_shortcode', form).text(),
123
+ popupType = $('#_ujic_popup', form).text(),
124
+ uShortcode = '';
125
+
126
+ // resize TB
127
+ ujics.resizeTB();
128
+ $(window).resize(function() { ujics.resizeTB() });
129
+
130
+ // initialise
131
+ ujics.loadVals();
132
+ ujics.children();
133
+ ujics.cLoadVals();
134
+
135
+ // update on children value change
136
+ $('.ujic-cinput', form).live('change', function() {
137
+ ujics.cLoadVals();
138
+ });
139
+
140
+ // update on value change
141
+ $('.ujic-input', form).change(function() {
142
+ ujics.loadVals();
143
+ });
144
+
145
+ $('.ujic-datapick').datepicker({
146
+ dateFormat: 'yy/mm/dd'
147
+ });
148
+
149
+ // when insert is clicked
150
+ $('.ujic-insert', form).click(function() {
151
+ var errors = false;
152
+ var style_id = jQuery("#ujic_style").val();
153
+ var date_id = jQuery("#ujic_thedate").val();
154
+ var url_id = jQuery('#ujic_thexpi_').val();
155
+ if(style_id == ""){
156
+ alert("Please select a style");
157
+ errors = true;
158
+ return;
159
+ }
160
+ if(date_id == ""){
161
+ alert("Please select countdown date");
162
+ errors = true;
163
+ return;
164
+ }
165
+ if(url_id != "" && !isUrl(url_id)){
166
+ alert("Please insert valid link");
167
+ errors = true;
168
+ return;
169
+ }
170
+
171
+ if(parent.tinymce && !errors)
172
+ {
173
+ parent.tinymce.activeEditor.execCommand('mceInsertContent',false,$('#_ujic_ushortcode', form).html());
174
+ tb_remove();
175
+ }
176
+
177
+ });
178
+ }
179
+ }
180
+
181
+ // run
182
+ $('#ujic-popup').livequery( function() { ujics.load(); } );
183
+ });
184
+
185
+ function isUrl(url) {
186
+ var RegExp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
187
+ if(RegExp.test(url)){
188
+ return true;
189
+ }else{
190
+ return false;
191
+ }
192
  }
assets/tinymce/js/popup.old.js CHANGED
@@ -1,191 +1,191 @@
1
- // start the popup specefic scripts
2
- // safe to use $
3
- jQuery(document).ready(function($) {
4
- var ujics = {
5
- loadVals: function()
6
- {
7
- var shortcode = $('#_ujic_shortcode').text(),
8
- uShortcode = shortcode;
9
-
10
- // fill in the gaps eg {{param}}
11
- $('.ujic-input').each(function() {
12
- var input = $(this),
13
- id = input.attr('id'),
14
- id = id.replace('ujic_', ''), // gets rid of the ujic_ prefix
15
- re = new RegExp("{{"+id+"}}","g");
16
- if ( !$(this).is(':checkbox') || ( $(this).is(':checkbox') && $(this).is(':checked') ) )
17
- uShortcode = uShortcode.replace(re, input.val());
18
- else uShortcode = uShortcode.replace(re, '');
19
- });
20
-
21
- // adds the filled-in shortcode as hidden input
22
- $('#_ujic_ushortcode').remove();
23
- $('#ujic-sc-form-table').prepend('<div id="_ujic_ushortcode" class="hidden">' + uShortcode + '</div>');
24
- },
25
- cLoadVals: function()
26
- {
27
- var shortcode = $('#_ujic_cshortcode').text(),
28
- pShortcode = '';
29
- shortcodes = '';
30
-
31
- // fill in the gaps eg {{param}}
32
- $('.child-clone-row').each(function() {
33
- var row = $(this),
34
- rShortcode = shortcode;
35
-
36
- $('.ujic-cinput', this).each(function() {
37
- var input = $(this),
38
- id = input.attr('id'),
39
- id = id.replace('ujic_', '') // gets rid of the ujic_ prefix
40
- re = new RegExp("{{"+id+"}}","g");
41
- if ( !$(this).is(':checkbox') || ( $(this).is(':checkbox') && $(this).is(':checked') ) )
42
- rShortcode = rShortcode.replace(re, input.val());
43
- else rShortcode = rShortcode.replace(re, '');
44
- });
45
-
46
- shortcodes = shortcodes + rShortcode + "\n";
47
- });
48
-
49
- // adds the filled-in shortcode as hidden input
50
- $('#_ujic_cshortcodes').remove();
51
- $('.child-clone-rows').prepend('<div id="_ujic_cshortcodes" class="hidden">' + shortcodes + '</div>');
52
-
53
- // add to parent shortcode
54
- this.loadVals();
55
- pShortcode = $('#_ujic_ushortcode').text().replace('{{child_shortcode}}', shortcodes);
56
-
57
- // add updated parent shortcode
58
- $('#_ujic_ushortcode').remove();
59
- $('#ujic-sc-form-table').prepend('<div id="_ujic_ushortcode" class="hidden">' + pShortcode + '</div>');
60
- },
61
- children: function()
62
- {
63
- // assign the cloning plugin
64
- $('.child-clone-rows').appendo({
65
- subSelect: '> div.child-clone-row:last-child',
66
- allowDelete: false,
67
- focusFirst: false
68
- });
69
-
70
- // remove button
71
- $('.child-clone-row-remove').live('click', function() {
72
- var btn = $(this),
73
- row = btn.parent();
74
-
75
- if( $('.child-clone-row').size() > 1 )
76
- {
77
- row.remove();
78
- }
79
- else
80
- {
81
- alert('You need a minimum of one row');
82
- }
83
-
84
- return false;
85
- });
86
-
87
- // assign jUI sortable
88
- $( ".child-clone-rows" ).sortable({
89
- placeholder: "sortable-placeholder",
90
- items: '.child-clone-row'
91
-
92
- });
93
- },
94
- resizeTB: function()
95
- {
96
- var ajaxCont = $('#TB_ajaxContent'),
97
- tbWindow = $('#TB_window'),
98
- ujicPopup = $('#ujic-popup');
99
-
100
- tbWindow.css({
101
- height: ujicPopup.outerHeight() + 50,
102
- width: ujicPopup.outerWidth(),
103
- marginLeft: -(ujicPopup.outerWidth()/2)
104
- });
105
-
106
- ajaxCont.css({
107
- paddingTop: 0,
108
- paddingLeft: 0,
109
- paddingRight: 0,
110
- height: (tbWindow.outerHeight()-47),
111
- overflow: 'auto', // IMPORTANT
112
- width: ujicPopup.outerWidth()
113
- });
114
-
115
- $('#ujic-popup').addClass('no_preview');
116
- },
117
- load: function()
118
- {
119
- var ujics = this,
120
- popup = $('#ujic-popup'),
121
- form = $('#ujic-sc-form', popup),
122
- shortcode = $('#_ujic_shortcode', form).text(),
123
- popupType = $('#_ujic_popup', form).text(),
124
- uShortcode = '';
125
-
126
- // resize TB
127
- ujics.resizeTB();
128
- $(window).resize(function() { ujics.resizeTB() });
129
-
130
- // initialise
131
- ujics.loadVals();
132
- ujics.children();
133
- ujics.cLoadVals();
134
-
135
- // update on children value change
136
- $('.ujic-cinput', form).live('change', function() {
137
- ujics.cLoadVals();
138
- });
139
-
140
- // update on value change
141
- $('.ujic-input', form).change(function() {
142
- ujics.loadVals();
143
- });
144
-
145
- $('.ujic-datapick').datepicker({
146
- dateFormat: 'yy/mm/dd'
147
- });
148
-
149
- // when insert is clicked
150
- $('.ujic-insert', form).click(function() {
151
- var errors = false;
152
- var style_id = jQuery("#ujic_style").val();
153
- var date_id = jQuery("#ujic_thedate").val();
154
- var url_id = jQuery('#ujic_thexpi_').val();
155
- if(style_id == ""){
156
- alert("Please select a style");
157
- errors = true;
158
- return;
159
- }
160
- if(date_id == ""){
161
- alert("Please select countdown date");
162
- errors = true;
163
- return;
164
- }
165
- if(url_id != "" && !isUrl(url_id)){
166
- alert("Please insert valid link");
167
- errors = true;
168
- return;
169
- }
170
-
171
- if(window.tinyMCE && !errors)
172
- {
173
- window.tinyMCE.execInstanceCommand('content', 'mceInsertContent', false, $('#_ujic_ushortcode', form).html());
174
- tb_remove();
175
- }
176
- });
177
- }
178
- }
179
-
180
- // run
181
- $('#ujic-popup').livequery( function() { ujics.load(); } );
182
- });
183
-
184
- function isUrl(url) {
185
- var RegExp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
186
- if(RegExp.test(url)){
187
- return true;
188
- }else{
189
- return false;
190
- }
191
  }
1
+ // start the popup specefic scripts
2
+ // safe to use $
3
+ jQuery(document).ready(function($) {
4
+ var ujics = {
5
+ loadVals: function()
6
+ {
7
+ var shortcode = $('#_ujic_shortcode').text(),
8
+ uShortcode = shortcode;
9
+
10
+ // fill in the gaps eg {{param}}
11
+ $('.ujic-input').each(function() {
12
+ var input = $(this),
13
+ id = input.attr('id'),
14
+ id = id.replace('ujic_', ''), // gets rid of the ujic_ prefix
15
+ re = new RegExp("{{"+id+"}}","g");
16
+ if ( !$(this).is(':checkbox') || ( $(this).is(':checkbox') && $(this).is(':checked') ) )
17
+ uShortcode = uShortcode.replace(re, input.val());
18
+ else uShortcode = uShortcode.replace(re, '');
19
+ });
20
+
21
+ // adds the filled-in shortcode as hidden input
22
+ $('#_ujic_ushortcode').remove();
23
+ $('#ujic-sc-form-table').prepend('<div id="_ujic_ushortcode" class="hidden">' + uShortcode + '</div>');
24
+ },
25
+ cLoadVals: function()
26
+ {
27
+ var shortcode = $('#_ujic_cshortcode').text(),
28
+ pShortcode = '';
29
+ shortcodes = '';
30
+
31
+ // fill in the gaps eg {{param}}
32
+ $('.child-clone-row').each(function() {
33
+ var row = $(this),
34
+ rShortcode = shortcode;
35
+
36
+ $('.ujic-cinput', this).each(function() {
37
+ var input = $(this),
38
+ id = input.attr('id'),
39
+ id = id.replace('ujic_', '') // gets rid of the ujic_ prefix
40
+ re = new RegExp("{{"+id+"}}","g");
41
+ if ( !$(this).is(':checkbox') || ( $(this).is(':checkbox') && $(this).is(':checked') ) )
42
+ rShortcode = rShortcode.replace(re, input.val());
43
+ else rShortcode = rShortcode.replace(re, '');
44
+ });
45
+
46
+ shortcodes = shortcodes + rShortcode + "\n";
47
+ });
48
+
49
+ // adds the filled-in shortcode as hidden input
50
+ $('#_ujic_cshortcodes').remove();
51
+ $('.child-clone-rows').prepend('<div id="_ujic_cshortcodes" class="hidden">' + shortcodes + '</div>');
52
+
53
+ // add to parent shortcode
54
+ this.loadVals();
55
+ pShortcode = $('#_ujic_ushortcode').text().replace('{{child_shortcode}}', shortcodes);
56
+
57
+ // add updated parent shortcode
58
+ $('#_ujic_ushortcode').remove();
59
+ $('#ujic-sc-form-table').prepend('<div id="_ujic_ushortcode" class="hidden">' + pShortcode + '</div>');
60
+ },
61
+ children: function()
62
+ {
63
+ // assign the cloning plugin
64
+ $('.child-clone-rows').appendo({
65
+ subSelect: '> div.child-clone-row:last-child',
66
+ allowDelete: false,
67
+ focusFirst: false
68
+ });
69
+
70
+ // remove button
71
+ $('.child-clone-row-remove').live('click', function() {
72
+ var btn = $(this),
73
+ row = btn.parent();
74
+
75
+ if( $('.child-clone-row').size() > 1 )
76
+ {
77
+ row.remove();
78
+ }
79
+ else
80
+ {
81
+ alert('You need a minimum of one row');
82
+ }
83
+
84
+ return false;
85
+ });
86
+
87
+ // assign jUI sortable
88
+ $( ".child-clone-rows" ).sortable({
89
+ placeholder: "sortable-placeholder",
90
+ items: '.child-clone-row'
91
+
92
+ });
93
+ },
94
+ resizeTB: function()
95
+ {
96
+ var ajaxCont = $('#TB_ajaxContent'),
97
+ tbWindow = $('#TB_window'),
98
+ ujicPopup = $('#ujic-popup');
99
+
100
+ tbWindow.css({
101
+ height: ujicPopup.outerHeight() + 50,
102
+ width: ujicPopup.outerWidth(),
103
+ marginLeft: -(ujicPopup.outerWidth()/2)
104
+ });
105
+
106
+ ajaxCont.css({
107
+ paddingTop: 0,
108
+ paddingLeft: 0,
109
+ paddingRight: 0,
110
+ height: (tbWindow.outerHeight()-47),
111
+ overflow: 'auto', // IMPORTANT
112
+ width: ujicPopup.outerWidth()
113
+ });
114
+
115
+ $('#ujic-popup').addClass('no_preview');
116
+ },
117
+ load: function()
118
+ {
119
+ var ujics = this,
120
+ popup = $('#ujic-popup'),
121
+ form = $('#ujic-sc-form', popup),
122
+ shortcode = $('#_ujic_shortcode', form).text(),
123
+ popupType = $('#_ujic_popup', form).text(),
124
+ uShortcode = '';
125
+
126
+ // resize TB
127
+ ujics.resizeTB();
128
+ $(window).resize(function() { ujics.resizeTB() });
129
+
130
+ // initialise
131
+ ujics.loadVals();
132
+ ujics.children();
133
+ ujics.cLoadVals();
134
+
135
+ // update on children value change
136
+ $('.ujic-cinput', form).live('change', function() {
137
+ ujics.cLoadVals();
138
+ });
139
+
140
+ // update on value change
141
+ $('.ujic-input', form).change(function() {
142
+ ujics.loadVals();
143
+ });
144
+
145
+ $('.ujic-datapick').datepicker({
146
+ dateFormat: 'yy/mm/dd'
147
+ });
148
+
149
+ // when insert is clicked
150
+ $('.ujic-insert', form).click(function() {
151
+ var errors = false;
152
+ var style_id = jQuery("#ujic_style").val();
153
+ var date_id = jQuery("#ujic_thedate").val();
154
+ var url_id = jQuery('#ujic_thexpi_').val();
155
+ if(style_id == ""){
156
+ alert("Please select a style");
157
+ errors = true;
158
+ return;
159
+ }
160
+ if(date_id == ""){
161
+ alert("Please select countdown date");
162
+ errors = true;
163
+ return;
164
+ }
165
+ if(url_id != "" && !isUrl(url_id)){
166
+ alert("Please insert valid link");
167
+ errors = true;
168
+ return;
169
+ }
170
+
171
+ if(window.tinyMCE && !errors)
172
+ {
173
+ window.tinyMCE.execInstanceCommand('content', 'mceInsertContent', false, $('#_ujic_ushortcode', form).html());
174
+ tb_remove();
175
+ }
176
+ });
177
+ }
178
+ }
179
+
180
+ // run
181
+ $('#ujic-popup').livequery( function() { ujics.load(); } );
182
+ });
183
+
184
+ function isUrl(url) {
185
+ var RegExp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
186
+ if(RegExp.test(url)){
187
+ return true;
188
+ }else{
189
+ return false;
190
+ }
191
  }
assets/tinymce/plugin.js CHANGED
@@ -1,32 +1,32 @@
1
- (function($) {
2
- "use strict";
3
-
4
-
5
-
6
- //Shortcodes
7
- tinymce.PluginManager.add( 'ujicShortcodes', function( editor, url ) {
8
-
9
- editor.addCommand("ujicPopup", function ( a, params )
10
- {
11
- var popup = params.identifier;
12
- tb_show("Insert Uji Countdown", url + "/popup.php?popup=" + popup + "&width=" + 800);
13
- });
14
-
15
- editor.addButton( 'ujic_button', {
16
- type: 'button',
17
- text: false,
18
- icon: 'icon dashicons-clock',
19
- onclick : function(e) {
20
- editor.execCommand("ujicPopup", false, {title: 'Uji Countdown',identifier: 'countdown'})
21
- }
22
-
23
-
24
-
25
-
26
- });
27
-
28
- });
29
-
30
-
31
-
32
  })(jQuery);
1
+ (function($) {
2
+ "use strict";
3
+
4
+
5
+
6
+ //Shortcodes
7
+ tinymce.PluginManager.add( 'ujicShortcodes', function( editor, url ) {
8
+
9
+ editor.addCommand("ujicPopup", function ( a, params )
10
+ {
11
+ var popup = params.identifier;
12
+ tb_show("Insert Uji Countdown", url + "/popup.php?popup=" + popup + "&width=" + 800);
13
+ });
14
+
15
+ editor.addButton( 'ujic_button', {
16
+ type: 'button',
17
+ text: false,
18
+ icon: 'icon dashicons-clock',
19
+ onclick : function(e) {
20
+ editor.execCommand("ujicPopup", false, {title: 'Uji Countdown',identifier: 'countdown'})
21
+ }
22
+
23
+
24
+
25
+
26
+ });
27
+
28
+ });
29
+
30
+
31
+
32
  })(jQuery);
assets/tinymce/plugin.old.js CHANGED
@@ -1,51 +1,51 @@
1
- (function ()
2
- {
3
- // create ujicShortcodes plugin
4
- tinymce.create("tinymce.plugins.ujicShortcodes",
5
- {
6
- init: function ( ed, url )
7
- {
8
- ed.addCommand("ujicPopup", function ( a, params )
9
- {
10
- var popup = params.identifier;
11
-
12
- // load thickbox
13
- tb_show("Insert Countdown Shortcode", url + "/popup.php?popup=" + popup + "&width=" + 800);
14
- });
15
- },
16
- createControl: function ( btn, e )
17
- {
18
- if ( btn == "ujic_button" )
19
- {
20
- var a = this;
21
-
22
- var btn = e.createButton('ujic_button', {
23
- title: "Insert Ujic Shortcode",
24
- image: UjicShortcodes.plugin_folder +"assets/tinymce/images/icon.png",
25
- icons: false,
26
- onclick : function() {
27
- tinyMCE.activeEditor.execCommand("ujicPopup", false, {
28
- title: 'Uji Countdown',
29
- identifier: 'countdown'
30
- })
31
- }
32
- });
33
-
34
- return btn;
35
- }
36
-
37
- return null;
38
- },
39
- addImmediate: function ( ed, title, sc) {
40
- ed.add({
41
- title: title,
42
- onclick: function () {
43
- tinyMCE.activeEditor.execCommand( "mceInsertContent", false, sc )
44
- }
45
- })
46
- }
47
- });
48
-
49
- // add ujicShortcodes plugin
50
- tinymce.PluginManager.add("ujicShortcodes", tinymce.plugins.ujicShortcodes);
51
  })();
1
+ (function ()
2
+ {
3
+ // create ujicShortcodes plugin
4
+ tinymce.create("tinymce.plugins.ujicShortcodes",
5
+ {
6
+ init: function ( ed, url )
7
+ {
8
+ ed.addCommand("ujicPopup", function ( a, params )
9
+ {
10
+ var popup = params.identifier;
11
+
12
+ // load thickbox
13
+ tb_show("Insert Countdown Shortcode", url + "/popup.php?popup=" + popup + "&width=" + 800);
14
+ });
15
+ },
16
+ createControl: function ( btn, e )
17
+ {
18
+ if ( btn == "ujic_button" )
19
+ {
20
+ var a = this;
21
+
22
+ var btn = e.createButton('ujic_button', {
23
+ title: "Insert Ujic Shortcode",
24
+ image: UjicShortcodes.plugin_folder +"assets/tinymce/images/icon.png",
25
+ icons: false,
26
+ onclick : function() {
27
+ tinyMCE.activeEditor.execCommand("ujicPopup", false, {
28
+ title: 'Uji Countdown',
29
+ identifier: 'countdown'
30
+ })
31
+ }
32
+ });
33
+
34
+ return btn;
35
+ }
36
+
37
+ return null;
38
+ },
39
+ addImmediate: function ( ed, title, sc) {
40
+ ed.add({
41
+ title: title,
42
+ onclick: function () {
43
+ tinyMCE.activeEditor.execCommand( "mceInsertContent", false, sc )
44
+ }
45
+ })
46
+ }
47
+ });
48
+
49
+ // add ujicShortcodes plugin
50
+ tinymce.PluginManager.add("ujicShortcodes", tinymce.plugins.ujicShortcodes);
51
  })();
assets/tinymce/popup.php CHANGED
@@ -1,63 +1,63 @@
1
- <?php
2
-
3
- // loads the shortcodes class, wordpress is loaded with it
4
- require_once( 'shortcodes.class.php' );
5
-
6
- // get popup type
7
- $popup = trim( $_GET['popup'] );
8
- $shortcode = new Ujic_shortcodes( $popup );
9
-
10
- ?>
11
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
12
- <html xmlns="http://www.w3.org/1999/xhtml">
13
- <head></head>
14
- <body>
15
- <div id="ujic-popup">
16
-
17
- <div id="ujic-shortcode-wrap">
18
-
19
- <div id="ujic-sc-form-wrap">
20
-
21
- <div id="ujic-sc-form-head">
22
-
23
- <?php echo $shortcode->popup_title; ?>
24
-
25
- </div>
26
- <!-- /#ujic-sc-form-head -->
27
-
28
- <form method="post" id="ujic-sc-form">
29
-
30
- <p style="font-size:11px">
31
- Only one timer on page is allowed. <br>Check the <a href="http://wpmanage.com/uji-countdown" target="_blank">Premium version</a> for multiple countdown timers on the same page.
32
- </p>
33
-
34
- <table id="ujic-sc-form-table">
35
-
36
- <?php echo $shortcode->output; ?>
37
-
38
- <tbody>
39
- <tr class="form-row">
40
- <?php if( ! $shortcode->has_child ) : ?><td class="label">&nbsp;</td><?php endif; ?>
41
- <td class="field"><a href="#" class="button-primary ujic-insert">Insert Shortcode</a></td>
42
- </tr>
43
- </tbody>
44
-
45
- </table>
46
- <!-- /#ujic-sc-form-table -->
47
-
48
- </form>
49
- <!-- /#ujic-sc-form -->
50
-
51
- </div>
52
- <!-- /#ujic-sc-form-wrap -->
53
-
54
- <div class="clear"></div>
55
-
56
- </div>
57
- <!-- /#ujic-shortcode-wrap -->
58
-
59
- </div>
60
- <!-- /#ujic-popup -->
61
-
62
- </body>
63
  </html>
1
+ <?php
2
+
3
+ // loads the shortcodes class, wordpress is loaded with it
4
+ require_once( 'shortcodes.class.php' );
5
+
6
+ // get popup type
7
+ $popup = trim( $_GET['popup'] );
8
+ $shortcode = new Ujic_shortcodes( $popup );
9
+
10
+ ?>
11
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
12
+ <html xmlns="http://www.w3.org/1999/xhtml">
13
+ <head></head>
14
+ <body>
15
+ <div id="ujic-popup">
16
+
17
+ <div id="ujic-shortcode-wrap">
18
+
19
+ <div id="ujic-sc-form-wrap">
20
+
21
+ <div id="ujic-sc-form-head">
22
+
23
+ <?php echo $shortcode->popup_title; ?>
24
+
25
+ </div>
26
+ <!-- /#ujic-sc-form-head -->
27
+
28
+ <form method="post" id="ujic-sc-form">
29
+
30
+ <p style="font-size:11px">
31
+ Only one timer on page is allowed. <br>Check the <a href="http://wpmanage.com/uji-countdown" target="_blank">Premium version</a> for multiple countdown timers on the same page.
32
+ </p>
33
+
34
+ <table id="ujic-sc-form-table">
35
+
36
+ <?php echo $shortcode->output; ?>
37
+
38
+ <tbody>
39
+ <tr class="form-row">
40
+ <?php if( ! $shortcode->has_child ) : ?><td class="label">&nbsp;</td><?php endif; ?>
41
+ <td class="field"><a href="#" class="button-primary ujic-insert">Insert Shortcode</a></td>
42
+ </tr>
43
+ </tbody>
44
+
45
+ </table>
46
+ <!-- /#ujic-sc-form-table -->
47
+
48
+ </form>
49
+ <!-- /#ujic-sc-form -->
50
+
51
+ </div>
52
+ <!-- /#ujic-sc-form-wrap -->
53
+
54
+ <div class="clear"></div>
55
+
56
+ </div>
57
+ <!-- /#ujic-shortcode-wrap -->
58
+
59
+ </div>
60
+ <!-- /#ujic-popup -->
61
+
62
+ </body>
63
  </html>
assets/tinymce/shortcodes.class.php CHANGED
@@ -1,344 +1,344 @@
1
- <?php
2
-
3
- // load wordpress
4
- require_once('get_wp.php');
5
-
6
- class Ujic_shortcodes
7
- {
8
- var $conf;
9
- var $popup;
10
- var $params;
11
- var $shortcode;
12
- var $cparams;
13
- var $cshortcode;
14
- var $popup_title;
15
- var $no_preview;
16
- var $has_child;
17
- var $output;
18
- var $errors;
19
-
20
- // --------------------------------------------------------------------------
21
-
22
- function __construct( $popup )
23
- {
24
- if( file_exists( dirname(__FILE__) . '/config.php' ) )
25
- {
26
- $this->conf = dirname(__FILE__) . '/config.php';
27
- $this->popup = $popup;
28
-
29
- $this->formate_shortcode();
30
- }
31
- else
32
- {
33
- $this->append_error('Config file does not exist');
34
- }
35
- }
36
-
37
- // --------------------------------------------------------------------------
38
-
39
- function formate_shortcode()
40
- {
41
- // get config file
42
- require_once( $this->conf );
43
-
44
- if( isset( $ujic_shortcodes[$this->popup]['child_shortcode'] ) )
45
- $this->has_child = true;
46
-
47
- if( isset( $ujic_shortcodes ) && is_array( $ujic_shortcodes ) )
48
- {
49
- // get shortcode config stuff
50
- $this->params = $ujic_shortcodes[$this->popup]['params'];
51
- $this->shortcode = $ujic_shortcodes[$this->popup]['shortcode'];
52
- $this->popup_title = $ujic_shortcodes[$this->popup]['popup_title'];
53
-
54
-
55
- // adds stuff for js use
56
- $this->append_output( "\n" . '<div id="_ujic_shortcode" class="hidden">' . $this->shortcode . '</div>' );
57
- $this->append_output( "\n" . '<div id="_ujic_popup" class="hidden">' . $this->popup . '</div>' );
58
-
59
- if( isset( $ujic_shortcodes[$this->popup]['no_preview'] ) && $ujic_shortcodes[$this->popup]['no_preview'] )
60
- {
61
- //$this->append_output( "\n" . '<div id="_ujic_preview" class="hidden">false</div>' );
62
- $this->no_preview = true;
63
- }
64
-
65
- // filters and excutes params
66
- foreach( $this->params as $pkey => $param )
67
- {
68
- // prefix the fields names and ids with ujic_
69
- $pkey = 'ujic_' . $pkey;
70
-
71
- // popup form row start
72
- $row_start = '<tbody>' . "\n";
73
- $row_start .= '<tr class="form-row">' . "\n";
74
- $row_start .= '<td class="label">' . $param['label'] . '</td>' . "\n";
75
- $row_start .= '<td class="field">' . "\n";
76
-
77
- // popup form row end
78
- $row_end = '<span class="ujic-form-desc">' . $param['desc'] . '</span>' . "\n";
79
- $row_end .= '</td>' . "\n";
80
- $row_end .= '</tr>' . "\n";
81
- $row_end .= '</tbody>' . "\n";
82
-
83
- switch( $param['type'] )
84
- {
85
- case 'text' :
86
-
87
- // prepare
88
- $output = $row_start;
89
- $output .= '<input type="text" class="ujic-form-text ujic-input" name="' . $pkey . '" id="' . $pkey . '" value="' . $param['std'] . '" />' . "\n";
90
- $output .= $row_end;
91
-
92
- // append
93
- $this->append_output( $output );
94
-
95
- break;
96
-
97
- case 'textarea' :
98
-
99
- // prepare
100
- $output = $row_start;
101
- $output .= '<textarea rows="10" cols="30" name="' . $pkey . '" id="' . $pkey . '" class="ujic-form-textarea ujic-input">' . $param['std'] . '</textarea>' . "\n";
102
- $output .= $row_end;
103
-
104
- // append
105
- $this->append_output( $output );
106
-
107
- break;
108
-
109
- case 'select' :
110
-
111
- // prepare
112
- $output = $row_start;
113
- $output .= '<select name="' . $pkey . '" id="' . $pkey . '" class="ujic-form-select ujic-input">' . "\n";
114
-
115
- foreach( $param['options'] as $value => $option )
116
- {
117
- $output .= '<option value="' . $value . '">' . $option . '</option>' . "\n";
118
- }
119
-
120
- $output .= '</select>' . "\n";
121
- $output .= $row_end;
122
-
123
- // append
124
- $this->append_output( $output );
125
-
126
- break;
127
-
128
- case 'checkbox' :
129
-
130
- // prepare
131
- $output = $row_start;
132
- $output .= '<label for="' . $pkey . '" class="ujic-form-checkbox">' . "\n";
133
- $output .= '<input type="checkbox" class="ujic-input" name="' . $pkey . '" id="' . $pkey . '" ' . ( $param['std'] ? 'checked' : '' ) . ' />' . "\n";
134
- $output .= ' ' . $param['checkbox_text'] . '</label>' . "\n";
135
- $output .= $row_end;
136
-
137
- // append
138
- $this->append_output( $output );
139
-
140
- break;
141
-
142
- case 'datapick' :
143
-
144
- // prepare
145
-
146
- $output = $row_start;
147
- $output .= '<input type="text" class="ujic-input ujic-form-datapick ujic-datapick" name="' . $pkey . '" id="' . $pkey . '" value="' . $param['std'] . '" />' . "\n";
148
- $output .= $row_end;
149
-
150
- // append
151
- $this->append_output( $output );
152
-
153
- break;
154
-
155
- case 'timepick' :
156
-
157
- // prepare
158
- $output = $row_start;
159
- $output .= '<select name="' . $pkey . '" id="' . $pkey . '" class="ujic-form-select ujic-input">' . "\n";
160
-
161
- foreach( $param['options_h'] as $value => $option )
162
- {
163
- $output .= '<option value="' . $value . '">' . $option . '</option>' . "\n";
164
- }
165
-
166
- $output .= '</select> : ' . "\n";
167
-
168
- $output .= '<select name="' . $pkey . '_" id="' . $pkey . '_" class="ujic-form-select ujic-input">' . "\n";
169
-
170
- foreach( $param['options_m'] as $value => $option )
171
- {
172
- $output .= '<option value="' . $value . '">' . $option . '</option>' . "\n";
173
- }
174
-
175
- $output .= '</select>' . "\n";
176
-
177
- $output .= $row_end;
178
-
179
- // append
180
- $this->append_output( $output );
181
-
182
- break;
183
-
184
- case 'expiry' :
185
-
186
- // prepare
187
-
188
- $output = $row_start;
189
- $output .= '<label for="' . $pkey . '" class="ujic-form-checkbox">' . $param['fname'] . "\n";
190
- $output .= '<input type="checkbox" class="ujic-input" name="' . $pkey . '" value="true" id="' . $pkey . '" ' . ( !empty($param['std']) ? 'checked' : '' ) . ' />' . "\n";
191
- $output .= '</label>' . "\n";
192
- $output .= '<div id="ujic-form-expiry-url">' . $param['fname2'] .' <input type="text" class="ujic-input ujic-form-expiry" name="' . $pkey . '_" id="' . $pkey . '_" placeholder="' . $param['std2'] . '" value="" /></div>' . "\n";
193
- $output .= $row_end;
194
-
195
- // append
196
- $this->append_output( $output );
197
-
198
- break;
199
-
200
- }
201
- }
202
-
203
- // checks if has a child shortcode
204
- if( isset( $ujic_shortcodes[$this->popup]['child_shortcode'] ) )
205
- {
206
- // set child shortcode
207
- $this->cparams = $ujic_shortcodes[$this->popup]['child_shortcode']['params'];
208
- $this->cshortcode = $ujic_shortcodes[$this->popup]['child_shortcode']['shortcode'];
209
-
210
- // popup parent form row start
211
- $prow_start = '<tbody>' . "\n";
212
- $prow_start .= '<tr class="form-row has-child">' . "\n";
213
- $prow_start .= '<td><a href="#" id="form-child-add" class="button-secondary">' . $ujic_shortcodes[$this->popup]['child_shortcode']['clone_button'] . '</a>' . "\n";
214
- $prow_start .= '<div class="child-clone-rows">' . "\n";
215
-
216
- // for js use
217
- $prow_start .= '<div id="_ujic_cshortcode" class="hidden">' . $this->cshortcode . '</div>' . "\n";
218
-
219
- // start the default row
220
- $prow_start .= '<div class="child-clone-row">' . "\n";
221
- $prow_start .= '<ul class="child-clone-row-form">' . "\n";
222
-
223
- // add $prow_start to output
224
- $this->append_output( $prow_start );
225
-
226
- foreach( $this->cparams as $cpkey => $cparam )
227
- {
228
-
229
- // prefix the fields names and ids with ujic_
230
- $cpkey = 'ujic_' . $cpkey;
231
-
232
- // popup form row start
233
- $crow_start = '<li class="child-clone-row-form-row">' . "\n";
234
- $crow_start .= '<div class="child-clone-row-label">' . "\n";
235
- $crow_start .= '<label>' . $cparam['label'] . '</label>' . "\n";
236
- $crow_start .= '</div>' . "\n";
237
- $crow_start .= '<div class="child-clone-row-field">' . "\n";
238
-
239
- // popup form row end
240
- $crow_end = '<span class="child-clone-row-desc">' . $cparam['desc'] . '</span>' . "\n";
241
- $crow_end .= '</div>' . "\n";
242
- $crow_end .= '</li>' . "\n";
243
-
244
- switch( $cparam['type'] )
245
- {
246
- case 'text' :
247
-
248
- // prepare
249
- $coutput = $crow_start;
250
- $coutput .= '<input type="text" class="ujic-form-text ujic-cinput" name="' . $cpkey . '" id="' . $cpkey . '" value="' . $cparam['std'] . '" />' . "\n";
251
- $coutput .= $crow_end;
252
-
253
- // append
254
- $this->append_output( $coutput );
255
-
256
- break;
257
-
258
- case 'textarea' :
259
-
260
- // prepare
261
- $coutput = $crow_start;
262
- $coutput .= '<textarea rows="10" cols="30" name="' . $cpkey . '" id="' . $cpkey . '" class="ujic-form-textarea ujic-cinput">' . $cparam['std'] . '</textarea>' . "\n";
263
- $coutput .= $crow_end;
264
-
265
- // append
266
- $this->append_output( $coutput );
267
-
268
- break;
269
-
270
- case 'select' :
271
-
272
- // prepare
273
- $coutput = $crow_start;
274
- $coutput .= '<select name="' . $cpkey . '" id="' . $cpkey . '" class="ujic-form-select ujic-cinput">' . "\n";
275
-
276
- foreach( $cparam['options'] as $value => $option )
277
- {
278
- $coutput .= '<option value="' . $value . '">' . $option . '</option>' . "\n";
279
- }
280
-
281
- $coutput .= '</select>' . "\n";
282
- $coutput .= $crow_end;
283
-
284
- // append
285
- $this->append_output( $coutput );
286
-
287
- break;
288
-
289
- case 'checkbox' :
290
-
291
- // prepare
292
- $coutput = $crow_start;
293
- $coutput .= '<label for="' . $cpkey . '" class="ujic-form-checkbox">' . "\n";
294
- $coutput .= '<input type="checkbox" class="ujic-cinput" name="' . $cpkey . '" id="' . $cpkey . '" ' . ( $cparam['std'] ? 'checked' : '' ) . ' />' . "\n";
295
- $coutput .= ' ' . $cparam['checkbox_text'] . '</label>' . "\n";
296
- $coutput .= $crow_end;
297
-
298
- // append
299
- $this->append_output( $coutput );
300
-
301
- break;
302
- }
303
- }
304
-
305
- // popup parent form row end
306
- $prow_end = '</ul>' . "\n"; // end .child-clone-row-form
307
- $prow_end .= '<a href="#" class="child-clone-row-remove">Remove</a>' . "\n";
308
- $prow_end .= '</div>' . "\n"; // end .child-clone-row
309
-
310
-
311
- $prow_end .= '</div>' . "\n"; // end .child-clone-rows
312
- $prow_end .= '</td>' . "\n";
313
- $prow_end .= '</tr>' . "\n";
314
- $prow_end .= '</tbody>' . "\n";
315
-
316
- // add $prow_end to output
317
- $this->append_output( $prow_end );
318
- }
319
- }
320
- }
321
-
322
- // --------------------------------------------------------------------------
323
-
324
- function append_output( $output )
325
- {
326
- $this->output = $this->output . "\n" . $output;
327
- }
328
-
329
- // --------------------------------------------------------------------------
330
-
331
- function reset_output( $output )
332
- {
333
- $this->output = '';
334
- }
335
-
336
- // --------------------------------------------------------------------------
337
-
338
- function append_error( $error )
339
- {
340
- $this->errors = $this->errors . "\n" . $error;
341
- }
342
- }
343
-
344
  ?>
1
+ <?php
2
+
3
+ // load wordpress
4
+ require_once('get_wp.php');
5
+
6
+ class Ujic_shortcodes
7
+ {
8
+ var $conf;
9
+ var $popup;
10
+ var $params;
11
+ var $shortcode;
12
+ var $cparams;
13
+ var $cshortcode;
14
+ var $popup_title;
15
+ var $no_preview;
16
+ var $has_child;
17
+ var $output;
18
+ var $errors;
19
+
20
+ // --------------------------------------------------------------------------
21
+
22
+ function __construct( $popup )
23
+ {
24
+ if( file_exists( dirname(__FILE__) . '/config.php' ) )
25
+ {
26
+ $this->conf = dirname(__FILE__) . '/config.php';
27
+ $this->popup = $popup;
28
+
29
+ $this->formate_shortcode();
30
+ }
31
+ else
32
+ {
33
+ $this->append_error('Config file does not exist');
34
+ }
35
+ }
36
+
37
+ // --------------------------------------------------------------------------
38
+
39
+ function formate_shortcode()
40
+ {
41
+ // get config file
42
+ require_once( $this->conf );
43
+
44
+ if( isset( $ujic_shortcodes[$this->popup]['child_shortcode'] ) )
45
+ $this->has_child = true;
46
+
47
+ if( isset( $ujic_shortcodes ) && is_array( $ujic_shortcodes ) )
48
+ {
49
+ // get shortcode config stuff
50
+ $this->params = $ujic_shortcodes[$this->popup]['params'];
51
+ $this->shortcode = $ujic_shortcodes[$this->popup]['shortcode'];
52
+ $this->popup_title = $ujic_shortcodes[$this->popup]['popup_title'];
53
+
54
+
55
+ // adds stuff for js use
56
+ $this->append_output( "\n" . '<div id="_ujic_shortcode" class="hidden">' . $this->shortcode . '</div>' );
57
+ $this->append_output( "\n" . '<div id="_ujic_popup" class="hidden">' . $this->popup . '</div>' );
58
+
59
+ if( isset( $ujic_shortcodes[$this->popup]['no_preview'] ) && $ujic_shortcodes[$this->popup]['no_preview'] )
60
+ {
61
+ //$this->append_output( "\n" . '<div id="_ujic_preview" class="hidden">false</div>' );
62
+ $this->no_preview = true;
63
+ }
64
+
65
+ // filters and excutes params
66
+ foreach( $this->params as $pkey => $param )
67
+ {
68
+ // prefix the fields names and ids with ujic_
69
+ $pkey = 'ujic_' . $pkey;
70
+
71
+ // popup form row start
72
+ $row_start = '<tbody>' . "\n";
73
+ $row_start .= '<tr class="form-row">' . "\n";
74
+ $row_start .= '<td class="label">' . $param['label'] . '</td>' . "\n";
75
+ $row_start .= '<td class="field">' . "\n";
76
+
77
+ // popup form row end
78
+ $row_end = '<span class="ujic-form-desc">' . $param['desc'] . '</span>' . "\n";
79
+ $row_end .= '</td>' . "\n";
80
+ $row_end .= '</tr>' . "\n";
81
+ $row_end .= '</tbody>' . "\n";
82
+
83
+ switch( $param['type'] )
84
+ {
85
+ case 'text' :
86
+
87
+ // prepare
88
+ $output = $row_start;
89
+ $output .= '<input type="text" class="ujic-form-text ujic-input" name="' . $pkey . '" id="' . $pkey . '" value="' . $param['std'] . '" />' . "\n";
90
+ $output .= $row_end;
91
+
92
+ // append
93
+ $this->append_output( $output );
94
+
95
+ break;
96
+
97
+ case 'textarea' :
98
+
99
+ // prepare
100
+ $output = $row_start;
101
+ $output .= '<textarea rows="10" cols="30" name="' . $pkey . '" id="' . $pkey . '" class="ujic-form-textarea ujic-input">' . $param['std'] . '</textarea>' . "\n";
102
+ $output .= $row_end;
103
+
104
+ // append
105
+ $this->append_output( $output );
106
+
107
+ break;
108
+
109
+ case 'select' :
110
+
111
+ // prepare
112
+ $output = $row_start;
113
+ $output .= '<select name="' . $pkey . '" id="' . $pkey . '" class="ujic-form-select ujic-input">' . "\n";
114
+
115
+ foreach( $param['options'] as $value => $option )
116
+ {
117
+ $output .= '<option value="' . $value . '">' . $option . '</option>' . "\n";
118
+ }
119
+
120
+ $output .= '</select>' . "\n";
121
+ $output .= $row_end;
122
+
123
+ // append
124
+ $this->append_output( $output );
125
+
126
+ break;
127
+
128
+ case 'checkbox' :
129
+
130
+ // prepare
131
+ $output = $row_start;
132
+ $output .= '<label for="' . $pkey . '" class="ujic-form-checkbox">' . "\n";
133
+ $output .= '<input type="checkbox" class="ujic-input" name="' . $pkey . '" id="' . $pkey . '" ' . ( $param['std'] ? 'checked' : '' ) . ' />' . "\n";
134
+ $output .= ' ' . $param['checkbox_text'] . '</label>' . "\n";
135
+ $output .= $row_end;
136
+
137
+ // append
138
+ $this->append_output( $output );
139
+
140
+ break;
141
+
142
+ case 'datapick' :
143
+
144
+ // prepare
145
+
146
+ $output = $row_start;
147
+ $output .= '<input type="text" class="ujic-input ujic-form-datapick ujic-datapick" name="' . $pkey . '" id="' . $pkey . '" value="' . $param['std'] . '" />' . "\n";
148
+ $output .= $row_end;
149
+
150
+ // append
151
+ $this->append_output( $output );
152
+
153
+ break;
154
+
155
+ case 'timepick' :
156
+
157
+ // prepare
158
+ $output = $row_start;
159
+ $output .= '<select name="' . $pkey . '" id="' . $pkey . '" class="ujic-form-select ujic-input">' . "\n";
160
+
161
+ foreach( $param['options_h'] as $value => $option )
162
+ {
163
+ $output .= '<option value="' . $value . '">' . $option . '</option>' . "\n";
164
+ }
165
+
166
+ $output .= '</select> : ' . "\n";
167
+
168
+ $output .= '<select name="' . $pkey . '_" id="' . $pkey . '_" class="ujic-form-select ujic-input">' . "\n";
169
+
170
+ foreach( $param['options_m'] as $value => $option )
171
+ {
172
+ $output .= '<option value="' . $value . '">' . $option . '</option>' . "\n";
173
+ }
174
+
175
+ $output .= '</select>' . "\n";
176
+
177
+ $output .= $row_end;
178
+
179
+ // append
180
+ $this->append_output( $output );
181
+
182
+ break;
183
+
184
+ case 'expiry' :
185
+
186
+ // prepare
187
+
188
+ $output = $row_start;
189
+ $output .= '<label for="' . $pkey . '" class="ujic-form-checkbox">' . $param['fname'] . "\n";
190
+ $output .= '<input type="checkbox" class="ujic-input" name="' . $pkey . '" value="true" id="' . $pkey . '" ' . ( !empty($param['std']) ? 'checked' : '' ) . ' />' . "\n";
191
+ $output .= '</label>' . "\n";
192
+ $output .= '<div id="ujic-form-expiry-url">' . $param['fname2'] .' <input type="text" class="ujic-input ujic-form-expiry" name="' . $pkey . '_" id="' . $pkey . '_" placeholder="' . $param['std2'] . '" value="" /></div>' . "\n";
193
+ $output .= $row_end;
194
+
195
+ // append
196
+ $this->append_output( $output );
197
+
198
+ break;
199
+
200
+ }
201
+ }
202
+
203
+ // checks if has a child shortcode
204
+ if( isset( $ujic_shortcodes[$this->popup]['child_shortcode'] ) )
205
+ {
206
+ // set child shortcode
207
+ $this->cparams = $ujic_shortcodes[$this->popup]['child_shortcode']['params'];
208
+ $this->cshortcode = $ujic_shortcodes[$this->popup]['child_shortcode']['shortcode'];
209
+
210
+ // popup parent form row start
211
+ $prow_start = '<tbody>' . "\n";
212
+ $prow_start .= '<tr class="form-row has-child">' . "\n";
213
+ $prow_start .= '<td><a href="#" id="form-child-add" class="button-secondary">' . $ujic_shortcodes[$this->popup]['child_shortcode']['clone_button'] . '</a>' . "\n";
214
+ $prow_start .= '<div class="child-clone-rows">' . "\n";
215
+
216
+ // for js use
217
+ $prow_start .= '<div id="_ujic_cshortcode" class="hidden">' . $this->cshortcode . '</div>' . "\n";
218
+
219
+ // start the default row
220
+ $prow_start .= '<div class="child-clone-row">' . "\n";
221
+ $prow_start .= '<ul class="child-clone-row-form">' . "\n";
222
+
223
+ // add $prow_start to output
224
+ $this->append_output( $prow_start );
225
+
226
+ foreach( $this->cparams as $cpkey => $cparam )
227
+ {
228
+
229
+ // prefix the fields names and ids with ujic_
230
+ $cpkey = 'ujic_' . $cpkey;
231
+
232
+ // popup form row start
233
+ $crow_start = '<li class="child-clone-row-form-row">' . "\n";
234
+ $crow_start .= '<div class="child-clone-row-label">' . "\n";
235
+ $crow_start .= '<label>' . $cparam['label'] . '</label>' . "\n";
236
+ $crow_start .= '</div>' . "\n";
237
+ $crow_start .= '<div class="child-clone-row-field">' . "\n";
238
+
239
+ // popup form row end
240
+ $crow_end = '<span class="child-clone-row-desc">' . $cparam['desc'] . '</span>' . "\n";
241
+ $crow_end .= '</div>' . "\n";
242
+ $crow_end .= '</li>' . "\n";
243
+
244
+ switch( $cparam['type'] )
245
+ {
246
+ case 'text' :
247
+
248
+ // prepare
249
+ $coutput = $crow_start;
250
+ $coutput .= '<input type="text" class="ujic-form-text ujic-cinput" name="' . $cpkey . '" id="' . $cpkey . '" value="' . $cparam['std'] . '" />' . "\n";
251
+ $coutput .= $crow_end;
252
+
253
+ // append
254
+ $this->append_output( $coutput );
255
+
256
+ break;
257
+
258
+ case 'textarea' :
259
+
260
+ // prepare
261
+ $coutput = $crow_start;
262
+ $coutput .= '<textarea rows="10" cols="30" name="' . $cpkey . '" id="' . $cpkey . '" class="ujic-form-textarea ujic-cinput">' . $cparam['std'] . '</textarea>' . "\n";
263
+ $coutput .= $crow_end;
264
+
265
+ // append
266
+ $this->append_output( $coutput );
267
+
268
+ break;
269
+
270
+ case 'select' :
271
+
272
+ // prepare
273
+ $coutput = $crow_start;
274
+ $coutput .= '<select name="' . $cpkey . '" id="' . $cpkey . '" class="ujic-form-select ujic-cinput">' . "\n";
275
+
276
+ foreach( $cparam['options'] as $value => $option )
277
+ {
278
+ $coutput .= '<option value="' . $value . '">' . $option . '</option>' . "\n";
279
+ }
280
+
281
+ $coutput .= '</select>' . "\n";
282
+ $coutput .= $crow_end;
283
+
284
+ // append
285
+ $this->append_output( $coutput );
286
+
287
+ break;
288
+
289
+ case 'checkbox' :
290
+
291
+ // prepare
292
+ $coutput = $crow_start;
293
+ $coutput .= '<label for="' . $cpkey . '" class="ujic-form-checkbox">' . "\n";
294
+ $coutput .= '<input type="checkbox" class="ujic-cinput" name="' . $cpkey . '" id="' . $cpkey . '" ' . ( $cparam['std'] ? 'checked' : '' ) . ' />' . "\n";
295
+ $coutput .= ' ' . $cparam['checkbox_text'] . '</label>' . "\n";
296
+ $coutput .= $crow_end;
297
+
298
+ // append
299
+ $this->append_output( $coutput );
300
+
301
+ break;
302
+ }
303
+ }
304
+
305
+ // popup parent form row end
306
+ $prow_end = '</ul>' . "\n"; // end .child-clone-row-form
307
+ $prow_end .= '<a href="#" class="child-clone-row-remove">Remove</a>' . "\n";
308
+ $prow_end .= '</div>' . "\n"; // end .child-clone-row
309
+
310
+
311
+ $prow_end .= '</div>' . "\n"; // end .child-clone-rows
312
+ $prow_end .= '</td>' . "\n";
313
+ $prow_end .= '</tr>' . "\n";
314
+ $prow_end .= '</tbody>' . "\n";
315
+
316
+ // add $prow_end to output
317
+ $this->append_output( $prow_end );
318
+ }
319
+ }
320
+ }
321
+
322
+ // --------------------------------------------------------------------------
323
+
324
+ function append_output( $output )
325
+ {
326
+ $this->output = $this->output . "\n" . $output;
327
+ }
328
+
329
+ // --------------------------------------------------------------------------
330
+
331
+ function reset_output( $output )
332
+ {
333
+ $this->output = '';
334
+ }
335
+
336
+ // --------------------------------------------------------------------------
337
+
338
+ function append_error( $error )
339
+ {
340
+ $this->errors = $this->errors . "\n" . $error;
341
+ }
342
+ }
343
+
344
  ?>
classes/UjiSubscriptionsTable.php ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * Plugin Name: Uji Countdown
5
+ * Plugin URI: http://www.wpmanage.com/uji-countdown/
6
+ * Description: HTML5 Countdown.
7
+ * Version: 2.0
8
+ * Author: WPmanage <info@wpmanage.com>
9
+ * Author URI: http://www.wpmanage.com
10
+ */
11
+
12
+ require_once(ABSPATH . 'wp-admin/includes/template.php' );
13
+
14
+ class_exists('WP_Screen') || require_once( ABSPATH . 'wp-admin/includes/screen.php' );
15
+
16
+ class_exists( 'WP_List_Table', false) || require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
17
+
18
+ class UjiSubscriptionsTable extends WP_List_Table
19
+ {
20
+ private $itemsPerPage = 10;
21
+
22
+ public function __construct()
23
+ {
24
+
25
+ parent::__construct( array(
26
+ 'singular' => __( 'subscriber', 'uji-countdown' ),
27
+ 'plural' => __( 'subscribers', 'uji-countdown' ),
28
+ 'ajax' => false,
29
+ 'screen' => 'subscribers-list'
30
+ ) );
31
+
32
+ $this->process_bulk_action();
33
+ $this->prepare_items();
34
+
35
+ }
36
+
37
+ function process_bulk_action()
38
+ {
39
+ global $wpdb;
40
+ if( 'delete' === $this->current_action())
41
+ {
42
+ if(!empty($_GET['subscriber']))
43
+ foreach ($_GET['subscriber'] as $subscriberId) {
44
+ if (empty($subscriberId)) continue;
45
+ $wpdb->delete(self::getSubscriptionsTableName(), array('Id' => $subscriberId), array('%d'));
46
+ }
47
+ return;
48
+ }
49
+
50
+ if('cvs-export' === $this->current_action())
51
+ {
52
+ global $wpdb;
53
+ $arrSubscribers = $wpdb->get_results('SELECT * FROM ' . self::getSubscriptionsTableName(), ARRAY_A);
54
+ if(empty($arrSubscribers))
55
+ return;
56
+
57
+ header("Cache-Control: max-age=0, no-cache, must-revalidate, proxy-revalidate");
58
+ header('Content-Description: File Transfer');
59
+ header("Content-Transfer-Encoding: UTF-8");
60
+ header("Content-type: text/csv");
61
+ header("Content-Disposition: attachment; filename=subscribers.csv");
62
+ header("Content-Transfer-Encoding: binary");
63
+ header("Expires: 0");
64
+ header("Pragma: no-cache");
65
+
66
+ $fileHandler = @fopen('php://output', 'w');
67
+ if(false === $fileHandler)
68
+ return;
69
+
70
+ $arrHeaderColumns = array('EmailAddress', 'List', 'CreatedDate');
71
+ fputcsv($fileHandler, array('EmailAddress', 'Campaign', 'CreatedDate'));
72
+
73
+ foreach ($arrSubscribers as $subscriberInfo)
74
+ {
75
+ foreach($subscriberInfo as $info => $value)
76
+ {
77
+ if(in_array($info, $arrHeaderColumns))
78
+ continue;
79
+ unset($subscriberInfo[$info]);
80
+ }
81
+
82
+ fputcsv($fileHandler, $subscriberInfo);
83
+ }
84
+
85
+ fclose($fileHandler);
86
+ exit;
87
+ }
88
+ }
89
+
90
+
91
+ private static function getSubscriptionsTableName()
92
+ {
93
+ global $wpdb;
94
+ return $wpdb->prefix . 'uji_subscriptions';
95
+ }
96
+
97
+ public function prepare_items()
98
+ {
99
+ global $wpdb;
100
+
101
+ $totalItems = $wpdb->get_var("Select count(*) from " . self::getSubscriptionsTableName());
102
+
103
+ $pageNumber = (int)(!empty($_GET["paged"]) && is_numeric(sanitize_text_field($_GET["paged"])) ? sanitize_text_field($_GET["paged"]) : 1);
104
+
105
+ $orderBy = !empty($_GET['orderby']) && array_key_exists(trim($_GET['orderby']), $this->get_sortable_columns()) ? sanitize_text_field(trim($_GET['orderby'])) : 'Id';
106
+ $orderType = !empty($orderBy) && !empty($_GET['order']) && in_array(strtolower($_GET['order']), array('asc', 'desc')) ? sanitize_text_field($_GET['order']) : 'DESC';
107
+
108
+ $sqlStatement = 'SELECT * FROM ' . self::getSubscriptionsTableName();
109
+ $sqlStatement .= isset($orderBy) && isset($orderType) ? " ORDER BY $orderBy $orderType" : null;
110
+ $sqlStatement .= " LIMIT " . (($pageNumber - 1) * $this->itemsPerPage) . ", $this->itemsPerPage";
111
+
112
+ $this->set_pagination_args( array(
113
+ "total_items" => $totalItems,
114
+ "total_pages" => ceil($totalItems / $this->itemsPerPage),
115
+ "per_page" => $this->itemsPerPage,
116
+ ) );
117
+
118
+
119
+ $columns = $this->get_columns();
120
+ $hidden = array();
121
+ $sortable = $this->get_sortable_columns();
122
+ $this->_column_headers = array($columns, $hidden, $sortable);
123
+
124
+ $this->items = $wpdb->get_results($sqlStatement);
125
+
126
+ }
127
+
128
+ public function get_sortable_columns()
129
+ {
130
+ return array(
131
+ 'CreatedDate' => array('CreatedDate', false)
132
+ );
133
+ }
134
+
135
+ public function get_columns()
136
+ {
137
+ return array(
138
+ 'cb' => '<input type="checkbox" />',
139
+ 'Email' => __( 'Email Address', 'uji-countdown'),
140
+ 'Campaign' => __( "Campaign", 'uji-countdown'),
141
+ 'CreatedDate' => __( "Subscribed", 'uji-countdown')
142
+ );
143
+
144
+ }
145
+
146
+ public function column_default($item, $column_name)
147
+ {
148
+ switch($column_name)
149
+ {
150
+ case 'Email' : return is_array($item) ? $item['EmailAddress'] : $item->EmailAddress;
151
+ case 'Campaign' : return is_array($item) ? $item['List'] : $item->List;
152
+ case 'CreatedDate' : return date_format(new DateTime(is_array($item) ? $item['CreatedDate'] : $item->CreatedDate), 'F jS, Y g:i a') ;
153
+ }
154
+
155
+ return '';
156
+ }
157
+
158
+ public function column_cb($item)
159
+ {
160
+ return sprintf(
161
+ '<input type="checkbox" name="%1$s[]" value="%2$s" />',
162
+ $this->_args['singular'],
163
+ $item->Id
164
+ );
165
+ }
166
+
167
+
168
+ public function get_bulk_actions()
169
+ {
170
+ return array(
171
+ 'delete' => __('Delete' , 'uji-countdown'),
172
+ 'cvs-export' => __('CSV Export', 'uji-countdown')
173
+ );
174
+
175
+ }
176
+ }
classes/class-uji-countdown-admin.php CHANGED
@@ -1,16 +1,8 @@
1
  <?php
2
 
3
- /**
4
- *
5
- * Plugin Name: Uji Countdown Premium Plus 2.0
6
- * Plugin URI: http://www.wpmanage.com/uji-countdown/
7
- * Description: HTML5 Countdown.
8
- * Version: 2.0
9
- * Author: WPmanage <info@wpmanage.com>
10
- * Author URI: http://www.wpmanage.com
11
- */
12
- if ( !defined( 'ABSPATH' ) )
13
- exit; // Exit if accessed directly
14
 
15
  class Uji_Countdown_Admin {
16
 
@@ -22,7 +14,16 @@ class Uji_Countdown_Admin {
22
  * @var string
23
  */
24
  protected $styles = array( 'classic' );
25
-
 
 
 
 
 
 
 
 
 
26
  /**
27
  * Init label vars
28
  *
@@ -55,7 +56,8 @@ class Uji_Countdown_Admin {
55
 
56
  $this->cform_delete();
57
 
58
- if ( $this->saved_db_style() ) {
 
59
 
60
  $table_headers = '
61
  <th class="manage-column" scope="col"><span>' . __( 'Date', $this->plugin_slug ) . '</span></th>
@@ -90,10 +92,16 @@ class Uji_Countdown_Admin {
90
 
91
  } else {
92
  //echo '<div class="ujic-create"><a href="?page=uji-countdown&tab=tab_ujic_new" class="button button-primary" id="ujic_table_new">' . __( 'Create a new timer style', $this->plugin_slug ) . '</a></div>';
93
- echo '<div id="ujic_new"><h1>Uji Countdown 2.0</h1><h4>The most customizable countdown plugin for Wordpress</h4>';
94
  echo '<a href="?page=uji-countdown&tab=tab_ujic_new" class="ujic_butnew" id="ujic_table_new">' . __( 'Add New Style', $this->plugin_slug ) . '</a>';
95
  echo '<div class="ujic_new_cnt"><h2>WHAT\'S NEW</h2>';
96
  echo '<ul>
 
 
 
 
 
 
97
  <li>
98
  <img alt="security shield" src="'.UJICOUNTDOWN_URL.'assets/images/icon-custom.png">
99
  <h3>More Customization</h3>
@@ -119,7 +127,7 @@ class Uji_Countdown_Admin {
119
  <li>
120
  <img alt="security shield" src="'.UJICOUNTDOWN_URL.'assets/images/icon-wp.png">
121
  <h3>WordPress 4.0</h3>
122
- <p>Fully supports WordPress 4.0, while maintaining compatibility through version 3.5+</p>
123
  </li>
124
  </ul>';
125
  echo '</div></div>';
@@ -175,22 +183,81 @@ class Uji_Countdown_Admin {
175
 
176
  $cnt .= $this->cform_color( __( 'Label Color:', $this->plugin_slug ), array( 'ujic_col_lab' ), array( __( 'Label Text Color', $this->plugin_slug ) ), array( $vars['ujic_col_lab'] ) );
177
  $cnt .= $this->cform_sliderui( __( 'Label Size:', $this->plugin_slug ), 'ujic_lab_sz', $vars['ujic_lab_sz'], 8, 25, 1 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
  $cnt .= $this->cform_buttons();
 
179
  $cnt .= '</form>';
 
180
  //Build Metabox
 
181
  if ( $cur_id )
 
182
  echo $this->custom_metabox( __( 'Edit Timer Style', $this->plugin_slug ), $cnt, 'ujic-create uji-fedit' );
 
183
  else
 
184
  echo $this->custom_metabox( __( 'Create New Timer Style', $this->plugin_slug ), $cnt, 'ujic-create' );
185
 
 
186
  //Left Metaboxes
 
187
  $this->left_metaboxes();
188
 
 
189
  //Preview Metaboxes
190
- $this->prev_metaboxes( $cur_style );
 
 
191
 
192
  }
193
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
194
  /**
195
  * Custom Metabox template.
196
  *
@@ -238,10 +305,10 @@ class Uji_Countdown_Admin {
238
  *
239
  * @since 2.0
240
  */
241
- private function prev_metaboxes( $style ) {
242
  if ( $style == 'classic' ) {
243
  $prw = '<div class="ujic-' . $style . ' hasCountdown" id="ujiCountdown">
244
- <span class="countdown_row">
245
  <span class="countdown_section ujic_y">
246
  <span class="countdown_amount">0</span>
247
  <span class="countdown_amount">1</span>
@@ -278,6 +345,17 @@ class Uji_Countdown_Admin {
278
  <span class="countdown_txt">' . __( 'Seconds', $this->plugin_slug ) . '</span>
279
  </span>
280
  </span>
 
 
 
 
 
 
 
 
 
 
 
281
  </div>';
282
  }
283
 
@@ -301,7 +379,7 @@ class Uji_Countdown_Admin {
301
  * @since 2.0
302
  */
303
  private function pro_metaboxes() {
304
- $pro_sho = '<a href="http://wpmanage.com/uji-countdown" target="_blank"><img src="' . UJICOUNTDOWN_URL . 'assets/images/ujic-ps3.png"></a>';
305
  echo $this->multi_custom_metabox( array( __( 'Upgrade to PRO Version', $this->plugin_slug ) ), array( $pro_sho ), 'ujic-tut' );
306
  }
307
 
@@ -353,25 +431,6 @@ class Uji_Countdown_Admin {
353
  return $form;
354
  }
355
 
356
- /**
357
- * Print checkbox field.
358
- *
359
- * @since 2.0
360
- */
361
- private function cform_checkbox( $label, $names, $name_val, $val ) {
362
- $form = '<div class="ujic-box">';
363
- $form .= '<div class="label">' . $label . '</div>';
364
- $form .= '<div class="ujic-chkbtn">';
365
- $i = 0;
366
- foreach ( $names as $name ) {
367
- $form .= '<input id="' . $name . '" type="checkbox" value="true" class="icheckbox_flat-pink" name="' . $name . '" ' . checked( $val[$i], "true", false ) . '>';
368
- $form .= '<label for="' . $name . '">' . $name_val[$i] . '</label>';
369
- $i++;
370
- }
371
- $form .= '</div>';
372
- $form .= '</div>';
373
- return $form;
374
- }
375
 
376
  /**
377
  * Print radio field.
@@ -697,6 +756,27 @@ class Uji_Countdown_Admin {
697
  return $vars[$name];
698
  else
699
  return $vars;
700
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
701
 
702
  }
1
  <?php
2
 
3
+ defined( 'WPINC' ) || exit;
4
+
5
+ require_once 'UjiSubscriptionsTable.php';
 
 
 
 
 
 
 
 
6
 
7
  class Uji_Countdown_Admin {
8
 
14
  * @var string
15
  */
16
  protected $styles = array( 'classic' );
17
+
18
+ /**
19
+ * Antispam
20
+ *
21
+ * @since 2.0.3
22
+ *
23
+ * @var boolean
24
+ */
25
+ protected static $isGoodByeCaptchaActivated = false;
26
+
27
  /**
28
  * Init label vars
29
  *
56
 
57
  $this->cform_delete();
58
 
59
+ if ( $this->saved_db_style() )
60
+ {
61
 
62
  $table_headers = '
63
  <th class="manage-column" scope="col"><span>' . __( 'Date', $this->plugin_slug ) . '</span></th>
92
 
93
  } else {
94
  //echo '<div class="ujic-create"><a href="?page=uji-countdown&tab=tab_ujic_new" class="button button-primary" id="ujic_table_new">' . __( 'Create a new timer style', $this->plugin_slug ) . '</a></div>';
95
+ echo '<div id="ujic_new"><h1>Uji Countdown 2.0.3</h1><h4>The most customizable countdown plugin for Wordpress</h4>';
96
  echo '<a href="?page=uji-countdown&tab=tab_ujic_new" class="ujic_butnew" id="ujic_table_new">' . __( 'Add New Style', $this->plugin_slug ) . '</a>';
97
  echo '<div class="ujic_new_cnt"><h2>WHAT\'S NEW</h2>';
98
  echo '<ul>
99
+ <li>
100
+ <img alt="security shield" src="'.UJICOUNTDOWN_URL.'assets/images/icon-email.png">
101
+ <h3>Email Subscription</h3>
102
+ <p>Visitors have now the option to subscribe using the email subscription form</p>
103
+ <p>You can create unlimited Campaigns</p>
104
+ </li>
105
  <li>
106
  <img alt="security shield" src="'.UJICOUNTDOWN_URL.'assets/images/icon-custom.png">
107
  <h3>More Customization</h3>
127
  <li>
128
  <img alt="security shield" src="'.UJICOUNTDOWN_URL.'assets/images/icon-wp.png">
129
  <h3>WordPress 4.0</h3>
130
+ <p>Fully supports WordPress 4.1, while maintaining compatibility through version 3.5+</p>
131
  </li>
132
  </ul>';
133
  echo '</div></div>';
183
 
184
  $cnt .= $this->cform_color( __( 'Label Color:', $this->plugin_slug ), array( 'ujic_col_lab' ), array( __( 'Label Text Color', $this->plugin_slug ) ), array( $vars['ujic_col_lab'] ) );
185
  $cnt .= $this->cform_sliderui( __( 'Label Size:', $this->plugin_slug ), 'ujic_lab_sz', $vars['ujic_lab_sz'], 8, 25, 1 );
186
+
187
+ //Newsletter form
188
+
189
+ $cnt .= $this->cform_checkbox(__('Enable Subscribe Form', $this->plugin_slug), array( 'ujic_subscrFrmIsEnabled' ), array( '' ), array( $vars['ujic_subscrFrmIsEnabled'] ) );
190
+ empty($vars['ujic_subscrFrmWidth']) ? $vars['ujic_subscrFrmWidth'] = 100 : 0;
191
+ $cnt .= $this->cform_sliderui( __( 'Subscribe Form Width(%):', $this->plugin_slug ), 'ujic_subscrFrmWidth', $vars['ujic_subscrFrmWidth'], 0, 100, 1 );
192
+
193
+ empty($cur_id) && empty($vars['ujic_subscrFrmAboveText']) ? $vars['ujic_subscrFrmAboveText'] = __("Join Our Newsletter", $this->plugin_slug) : '';
194
+ $cnt .= $this->cform_input( __( 'Subscribe Form Above Text', $this->plugin_slug ), 'ujic_subscrFrmAboveText', $vars['ujic_subscrFrmAboveText'] );
195
+
196
+ empty($cur_id) && empty($vars['ujic_subscrFrmInputText']) ? $vars['ujic_subscrFrmInputText'] = __("Enter your email here", $this->plugin_slug) : '';
197
+ $cnt .= $this->cform_input( __( 'Subscribe Form Input Text', $this->plugin_slug ), 'ujic_subscrFrmInputText', $vars['ujic_subscrFrmInputText'] );
198
+
199
+ empty($cur_id) && empty($vars['ujic_subscrFrmSubmitText']) ? $vars['ujic_subscrFrmSubmitText'] = __("Subscribe", $this->plugin_slug) : '';
200
+ $cnt .= $this->cform_input( __( 'Subscribe Form Submit Text', $this->plugin_slug ), 'ujic_subscrFrmSubmitText', $vars['ujic_subscrFrmSubmitText'] );
201
+
202
+ empty($cur_id) && empty($vars['ujic_subscrFrmSubmitColor']) ? $vars['ujic_subscrFrmSubmitColor'] = __("Subscribe", $this->plugin_slug) : '';
203
+ $cnt .= $this->cform_color( __( 'Submit Button Color:', $this->plugin_slug ), array( 'ujic_subscrFrmSubmitColor' ), array( __( 'Button Color', $this->plugin_slug ) ), array( $vars['ujic_subscrFrmSubmitColor'] ) );
204
+
205
+ empty($cur_id) && empty($vars['ujic_subscrFrmThanksMessage']) ? $vars['ujic_subscrFrmThanksMessage'] = __("Thanks for subscribing", $this->plugin_slug) : '';
206
+ $cnt .= $this->cform_input( __( 'Thank You Message', $this->plugin_slug ), 'ujic_subscrFrmThanksMessage', $vars['ujic_subscrFrmThanksMessage'] );
207
+
208
+ empty($cur_id) && empty($vars['ujic_subscrFrmErrorMessage']) ? $vars['ujic_subscrFrmErrorMessage'] = __("Invalid email address", $this->plugin_slug) : '';
209
+ $cnt .= $this->cform_input( __( 'Error Message', $this->plugin_slug ), 'ujic_subscrFrmErrorMessage', $vars['ujic_subscrFrmErrorMessage'] );
210
+
211
  $cnt .= $this->cform_buttons();
212
+
213
  $cnt .= '</form>';
214
+
215
  //Build Metabox
216
+
217
  if ( $cur_id )
218
+
219
  echo $this->custom_metabox( __( 'Edit Timer Style', $this->plugin_slug ), $cnt, 'ujic-create uji-fedit' );
220
+
221
  else
222
+
223
  echo $this->custom_metabox( __( 'Create New Timer Style', $this->plugin_slug ), $cnt, 'ujic-create' );
224
 
225
+
226
  //Left Metaboxes
227
+
228
  $this->left_metaboxes();
229
 
230
+
231
  //Preview Metaboxes
232
+
233
+ $this->prev_metaboxes( $cur_style, $vars);
234
+
235
 
236
  }
237
 
238
+ /**
239
+ * Print checkbox field.
240
+ *
241
+ * @since 2.0
242
+ */
243
+ private function cform_checkbox( $label, $names, $name_val, $val ) {
244
+ $form = '<div class="ujic-box">';
245
+ $form .= '<div class="label">' . $label . '</div>';
246
+ $form .= '<div class="ujic-chkbtn">';
247
+ $i = 0;
248
+ foreach ( $names as $name ) {
249
+ $form .= '<input id="' . $name . '" type="checkbox" value="true" class="icheckbox_flat-pink" name="' . $name . '" ' . checked( $val[$i], "true", false ) . '>';
250
+ $form .= '<label for="' . $name . '">' . $name_val[$i] . '</label>';
251
+ $i++;
252
+ }
253
+ $form .= '</div>';
254
+ $form .= '</div>';
255
+
256
+ return $form;
257
+ }
258
+
259
+
260
+
261
  /**
262
  * Custom Metabox template.
263
  *
305
  *
306
  * @since 2.0
307
  */
308
+ private function prev_metaboxes( $style, $countDownOptions) {
309
  if ( $style == 'classic' ) {
310
  $prw = '<div class="ujic-' . $style . ' hasCountdown" id="ujiCountdown">
311
+ <span class="countdown_row ujicf">
312
  <span class="countdown_section ujic_y">
313
  <span class="countdown_amount">0</span>
314
  <span class="countdown_amount">1</span>
345
  <span class="countdown_txt">' . __( 'Seconds', $this->plugin_slug ) . '</span>
346
  </span>
347
  </span>
348
+
349
+ <form>
350
+ <span>' . esc_html($countDownOptions['ujic_subscrFrmAboveText'], $this->plugin_slug) .'</span>
351
+ <div>
352
+ <p>
353
+ <input type = "text" readonly="readonly" placeholder = "' . esc_attr($countDownOptions['ujic_subscrFrmInputText']) . '"/>
354
+ <input type = "submit" value = "' . esc_attr($countDownOptions['ujic_subscrFrmSubmitText']) . '" />
355
+ </p>
356
+ </div>
357
+ </form>
358
+
359
  </div>';
360
  }
361
 
379
  * @since 2.0
380
  */
381
  private function pro_metaboxes() {
382
+ $pro_sho = '<a href="http://www.wpmanage.com/uji-countdown" target="_blank"><img src="' . UJICOUNTDOWN_URL . 'assets/images/ujic-ps3.png"></a>';
383
  echo $this->multi_custom_metabox( array( __( 'Upgrade to PRO Version', $this->plugin_slug ) ), array( $pro_sho ), 'ujic-tut' );
384
  }
385
 
431
  return $form;
432
  }
433
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
434
 
435
  /**
436
  * Print radio field.
756
  return $vars[$name];
757
  else
758
  return $vars;
759
+ }
760
+
761
+ /**
762
+ * Subscribers
763
+ *
764
+ * @since 2.0.3
765
+ */
766
+ public function admin_subscribers(){
767
+
768
+ $listTable = new UjiSubscriptionsTable();
769
+
770
+ ob_start();
771
+
772
+ $htmlContent = '<form id = "uji-subscription-frm" method="get" action="">';
773
+ $htmlContent .= '<input type="hidden" name="page" value="' . esc_attr($_REQUEST['page']) . '" />';
774
+ $listTable->display();
775
+ $htmlContent .= ob_get_clean();
776
+ $htmlContent .='</form>';
777
+
778
+ echo $this->custom_metabox( __( 'Subscribers List', $this->plugin_slug ), $htmlContent , 'ujic-create ujic-subscribers' );
779
+
780
+ }
781
 
782
  }
classes/class-uji-countdown-front.php CHANGED
@@ -8,8 +8,8 @@
8
  * Author: WPmanage <info@wpmanage.com>
9
  * Author URI: http://www.wpmanage.com
10
  */
11
- if ( !defined( 'ABSPATH' ) )
12
- exit; // Exit if accessed directly
13
 
14
  class UjiCountdown extends Uji_Countdown {
15
 
@@ -64,7 +64,8 @@ class UjiCountdown extends Uji_Countdown {
64
  'id' => "",
65
  'expire' => "",
66
  'hide' => "",
67
- 'url' => ""
 
68
  ), $atts ) );
69
  //Increment counters
70
  static $ujic_count = 0;
@@ -78,11 +79,14 @@ class UjiCountdown extends Uji_Countdown {
78
 
79
  //get all vars
80
  $get_vars = self::uji_vars();
81
-
82
  foreach ($get_vars as $nm => $var){
83
  ${$nm} = $this->sel_ujic_db( $id, $var );
84
  }
85
-
 
 
 
86
  $ujic_id = 'ujiCountdown';
87
  $classh = !empty( $ujic_style ) ? ' ujic-' . $ujic_style : '';
88
  $hclass =!empty( $class ) ? ' ujic_' . $class . '' : '';
@@ -99,6 +103,7 @@ class UjiCountdown extends Uji_Countdown {
99
  wp_enqueue_style( $this->plugin_slug . '-uji-countdown' );
100
  wp_enqueue_script( $this->plugin_slug . '-core' );
101
  wp_localize_script( $this->plugin_slug . '-init', 'ujiCount', array(
 
102
  'uji_plugin' => plugins_url(),
103
  'uji_style' => $ujic_style,
104
  'expire' => $expire,
@@ -137,16 +142,58 @@ class UjiCountdown extends Uji_Countdown {
137
  'ujic_y' => $ujic_y, //Secondary format: Years
138
  'ujic_o' => $ujic_o, //Secondary format: Months
139
  'ujic_w' => $ujic_w, //Secondary format: Weeks
140
- 'uji_time' => date_i18n( 'M j, Y H:i:s O' ),
141
  'uji_hide' => ($hide == "true") ? 'true' : 'false',
142
  'ujic_rtl' => ( $this->ujic_get_option('ujic_rtl') ) ? $this->ujic_get_option('ujic_rtl') : false,
143
  'uji_utime' => ( $this->ujic_get_option('ujic_utime') ) ? $this->ujic_get_option('ujic_utime') : false
144
  ) );
145
 
146
  wp_enqueue_script( $this->plugin_slug . '-init' );
 
147
  $ujic_count ++;
148
- return strip_shortcodes( '<div class="ujic-hold' . $hclass . '"> <div class="ujiCountdown' . $classh . '" id="' . $ujic_id . '"></div></div>' . $content );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150
  }
151
  }
152
 
8
  * Author: WPmanage <info@wpmanage.com>
9
  * Author URI: http://www.wpmanage.com
10
  */
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
 
14
  class UjiCountdown extends Uji_Countdown {
15
 
64
  'id' => "",
65
  'expire' => "",
66
  'hide' => "",
67
+ 'url' => "",
68
+ 'subscr' => ""
69
  ), $atts ) );
70
  //Increment counters
71
  static $ujic_count = 0;
79
 
80
  //get all vars
81
  $get_vars = self::uji_vars();
82
+
83
  foreach ($get_vars as $nm => $var){
84
  ${$nm} = $this->sel_ujic_db( $id, $var );
85
  }
86
+
87
+
88
+
89
+
90
  $ujic_id = 'ujiCountdown';
91
  $classh = !empty( $ujic_style ) ? ' ujic-' . $ujic_style : '';
92
  $hclass =!empty( $class ) ? ' ujic_' . $class . '' : '';
103
  wp_enqueue_style( $this->plugin_slug . '-uji-countdown' );
104
  wp_enqueue_script( $this->plugin_slug . '-core' );
105
  wp_localize_script( $this->plugin_slug . '-init', 'ujiCount', array(
106
+ 'ajaxUrl' => admin_url('admin-ajax.php'),
107
  'uji_plugin' => plugins_url(),
108
  'uji_style' => $ujic_style,
109
  'expire' => $expire,
142
  'ujic_y' => $ujic_y, //Secondary format: Years
143
  'ujic_o' => $ujic_o, //Secondary format: Months
144
  'ujic_w' => $ujic_w, //Secondary format: Weeks
145
+ 'uji_time' => date_i18n( 'M j, Y H:i:s' ) ."+0000",
146
  'uji_hide' => ($hide == "true") ? 'true' : 'false',
147
  'ujic_rtl' => ( $this->ujic_get_option('ujic_rtl') ) ? $this->ujic_get_option('ujic_rtl') : false,
148
  'uji_utime' => ( $this->ujic_get_option('ujic_utime') ) ? $this->ujic_get_option('ujic_utime') : false
149
  ) );
150
 
151
  wp_enqueue_script( $this->plugin_slug . '-init' );
152
+
153
  $ujic_count ++;
154
+
155
+ $ujic_subscrFrmIsEnabled = filter_var($this->sel_ujic_db( $id, 'ujic_subscrFrmIsEnabled' ), FILTER_VALIDATE_BOOLEAN);
156
+
157
+ if(!$ujic_subscrFrmIsEnabled)
158
+ {
159
+ return strip_shortcodes( '<div class="ujic-hold' . $hclass . '"> <div class="ujiCountdown' . $classh . '" id="' . $ujic_id . '"></div></div>' . $content );
160
+ }
161
+
162
+ wp_enqueue_script( $this->plugin_slug . '-uji-countdown-newsletter' );
163
+
164
+ $ujic_subscrFrmWidth = trim($this->sel_ujic_db( $id, 'ujic_subscrFrmWidth' ));
165
+ $ujic_subscrFrmAboveText = trim($this->sel_ujic_db( $id, 'ujic_subscrFrmAboveText' ));
166
+ $ujic_subscrFrmInputText = trim($this->sel_ujic_db( $id, 'ujic_subscrFrmInputText' ));
167
+ $ujic_subscrFrmSubmitText = trim($this->sel_ujic_db( $id, 'ujic_subscrFrmSubmitText' ));
168
+ $ujic_subscrFrmSubmitColor = trim($this->sel_ujic_db( $id, 'ujic_subscrFrmSubmitColor' ));
169
+ $ujic_subscrFrmThanksMessage = trim($this->sel_ujic_db( $id, 'ujic_subscrFrmThanksMessage' ));
170
+ $ujic_subscrFrmErrorMessage = trim($this->sel_ujic_db( $id, 'ujic_subscrFrmErrorMessage' ));
171
+ $ujic_subscrFrmName = !empty($subscr) ? $subscr : __('Subscription', $this->plugin_slug);
172
+
173
+ $formHtmlCode = '<div class = "ujicf"></div>';
174
+ $formHtmlCode .= '<form class = "ujicf" style = "margin-top:' . (empty($ujic_subscrFrmAboveText) ? '10px' : 0) . '">';
175
+
176
+ $formHtmlCode .= !empty($ujic_subscrFrmAboveText) ? '<span>' . esc_html__($ujic_subscrFrmAboveText) . '</span>' : '';
177
 
178
+ $formHtmlCode .= '<div>
179
+ <p style = "width:' . (empty($ujic_subscrFrmWidth) ? '100%' : esc_attr("$ujic_subscrFrmWidth%")) . '">
180
+ <input name = "txtEmail" type = "text" placeholder = "' . esc_attr($ujic_subscrFrmInputText) .'"/>
181
+ <input name = "txtList" type = "hidden" value = "' . esc_attr($ujic_subscrFrmName) . '" />
182
+ <input type = "submit" value = "' . esc_attr($ujic_subscrFrmSubmitText) . '" color-attr="' . esc_attr($ujic_subscrFrmSubmitColor) . '" />
183
+ </p>
184
+ <span class = "uji-msg-ok">' . esc_html__($ujic_subscrFrmThanksMessage, $this->plugin_slug) . '</span>
185
+ <span class = "uji-msg-err">' . esc_html__($ujic_subscrFrmErrorMessage, $this->plugin_slug) . '</span>
186
+ </div>';
187
+
188
+ $formHtmlCode .= self::$isGoodByeCaptchaActivated ? GdbcTokenController::getInstance()->getTokenInputField() : '';
189
+
190
+ $formHtmlCode .= wp_nonce_field('uji-subscribe-newsletter', 'uji-subscribe-nonce', false, false);
191
+
192
+ $formHtmlCode .= '</form>';
193
+
194
+ $htmlCode = strip_shortcodes('<div class="ujic-hold' . $hclass . '"> <div id = "uji-wrapper" class = "ujicf"> <div class="ujicf ujiCountdown' . $classh . '" id="' . $ujic_id . '"></div>'.$formHtmlCode.'</div></div>' . $content );
195
+
196
+ return $htmlCode;
197
  }
198
  }
199
 
classes/class-uji-countdown.php CHANGED
@@ -9,10 +9,10 @@
9
  * Author URI: http://www.wpmanage.com
10
  */
11
 
12
- if ( !defined( 'ABSPATH' ) )
13
- exit; // Exit if accessed directly
14
 
15
- class Uji_Countdown extends Uji_Countdown_Admin {
 
16
 
17
  /**
18
  * Uji Countdown
@@ -86,11 +86,41 @@ class Uji_Countdown extends Uji_Countdown_Admin {
86
  * @since 2.0
87
  */
88
  public function __construct() {
89
-
90
  // Register hooks that are fired when the plugin is activated, deactivated, and uninstalled, respectively.
91
  register_activation_hook( UJICOUNTDOWN_FILE, array( $this, 'activate' ) );
92
  register_deactivation_hook( UJICOUNTDOWN_FILE, array( $this, 'deactivate' ) );
93
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  //Show on front
95
  if ( !is_admin() ) {
96
  $ujic = new UjiCountdown();
@@ -104,7 +134,14 @@ class Uji_Countdown extends Uji_Countdown_Admin {
104
  // HOOKs Widget
105
  add_action( 'widgets_init', array( $this, 'ujic_register_widgets' ) );
106
 
107
- if ( is_admin() ) {
 
 
 
 
 
 
 
108
 
109
  // Add the options page and menu item.
110
  add_action( 'admin_menu', array( $this, 'add_plugin_admin_menu' ) );
@@ -118,8 +155,65 @@ class Uji_Countdown extends Uji_Countdown_Admin {
118
 
119
  // Add the Link from plugins
120
  add_filter('plugin_action_links', array($this, 'plugin_settings_link'),10,2);
121
-
 
 
 
 
 
122
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  }
124
 
125
  /**
@@ -153,34 +247,55 @@ class Uji_Countdown extends Uji_Countdown_Admin {
153
  "ujic_o" => 0, //Secondary format: Months
154
  "ujic_w" => 0, //Secondary format: Weeks
155
  "ujic_txt" => "true", //Show Label Text
156
- "ujic_ani" => 0 //Animation for seconds
 
 
 
 
 
 
 
 
 
 
157
  );
158
 
159
  //Return default values
160
- if ( (!isset( $name ) || empty( $name ) ) && (!isset( $id ) || empty( $id ) ) ) {
161
- if ( $this->cform_is_create() ) {
162
- foreach ( $options as $nm => $val ) {
 
 
 
163
  $new_options[$nm] = ( isset( $_POST[$nm] ) && !empty( $_POST[$nm] ) ) ? $_POST[$nm] : '';
164
  }
 
165
  return $new_options;
166
- } else {
 
 
167
  return $options;
168
  }
169
  }
170
 
171
  //Return all saved values
172
- if ( !isset( $name ) && isset( $id ) ) {
 
173
  $get_option = $this->sel_ujic_db( $id );
174
 
175
- foreach ( $options as $nm => $val ) {
 
176
  $val = ( isset( $_GET['edit'] ) && !empty( $_GET['edit'] ) ) ? '' : $val;
177
- $new_options[$nm] = ( isset( $get_option[$nm] ) && !empty( $get_option[$nm] ) ) ? $get_option[$nm] : $val;
 
 
178
  }
179
  return $new_options;
180
  }
181
 
182
  //Return one saved value
183
- if ( isset( $name ) && isset( $id ) && !empty( $name ) && !empty( $id ) ) {
 
184
  $one_option = $this->sel_ujic_db( $id, $name );
185
  $new_option = (!empty( $one_option ) ) ? $one_option : $options[$name];
186
  }
@@ -370,7 +485,7 @@ class Uji_Countdown extends Uji_Countdown_Admin {
370
 
371
  $this->upd_ujic_db( $posts, $data->id );
372
 
373
- $wpdb->query( "ALTER TABLE " . self::ujic_tab_name() . " ENGINE = INNODB;");
374
  $wpdb->query( "ALTER TABLE " . self::ujic_tab_name() . " DROP `size`, DROP `col_dw`, DROP `col_up`, DROP `ujic_pos`, DROP `col_txt`, DROP `col_sw`, DROP `ujic_ani`, DROP `ujic_txt`, DROP `ujic_thick`;");
375
 
376
  }
@@ -451,7 +566,7 @@ class Uji_Countdown extends Uji_Countdown_Admin {
451
 
452
  $screen = get_current_screen();
453
  if ( $screen->id == $this->plugin_screen_hook_suffix ) {
454
- if(isset($_GET['tab']) && (isset($_GET['tab']) && $_GET['tab'] != "tab_ujic_list") ){
455
  wp_enqueue_style( 'wp-color-picker' );
456
  wp_enqueue_style( $this->plugin_slug . '-admin-jqueryui', UJICOUNTDOWN_URL . 'assets/css/jquery-ui-custom.css', array(), $this->version );
457
  wp_enqueue_style( $this->plugin_slug . '-admin-icheck', UJICOUNTDOWN_URL . 'assets/css/pink.css', array(), $this->version );
@@ -459,6 +574,24 @@ class Uji_Countdown extends Uji_Countdown_Admin {
459
  wp_enqueue_style( $this->plugin_slug . '-admin-styles', UJICOUNTDOWN_URL . 'assets/css/admin.css', array(), $this->version );
460
  }
461
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
462
 
463
  /**
464
  * Register and enqueue admin-specific JavaScript.
@@ -479,8 +612,12 @@ class Uji_Countdown extends Uji_Countdown_Admin {
479
  wp_enqueue_script( 'jquery-ui-core' );
480
  wp_enqueue_script( 'jquery-ui-slider' );
481
  wp_enqueue_script( 'jquery-ui-draggable' );
482
- wp_enqueue_script( $this->plugin_slug . '-admin-icheck', UJICOUNTDOWN_URL . 'assets/js/jquery.icheck.min.js' );
483
- wp_enqueue_script( $this->plugin_slug . '-admin-script', UJICOUNTDOWN_URL . 'assets/js/admin.js', array( 'wp-color-picker' ), $this->version );
 
 
 
 
484
  }
485
  }
486
 
@@ -493,6 +630,8 @@ class Uji_Countdown extends Uji_Countdown_Admin {
493
  wp_register_style( $this->plugin_slug . '-uji-countdown', UJICOUNTDOWN_URL . 'css/uji-countdown.css', array(), $this->version );
494
  wp_register_script( $this->plugin_slug . '-core', UJICOUNTDOWN_URL . 'js/jquery.countdown.js', array( 'jquery' ), $this->version );
495
  wp_register_script( $this->plugin_slug . '-init', UJICOUNTDOWN_URL . 'js/uji-countdown.js', array( 'jquery' ), $this->version );
 
 
496
  }
497
 
498
  /**
@@ -597,9 +736,11 @@ class Uji_Countdown extends Uji_Countdown_Admin {
597
  * @since 2.0
598
  */
599
  public function ujic_get_option( $name, $opt = 'ujic_set' ) {
 
600
  $vars = get_option($opt);
601
- if($name && isset($vars[$name]) && !empty($vars[$name]) )
602
- return $vars[$name];
 
603
  else
604
  return false;
605
  }
9
  * Author URI: http://www.wpmanage.com
10
  */
11
 
12
+ defined( 'ABSPATH' ) || exit; // Exit if accessed directly
 
13
 
14
+ class Uji_Countdown extends Uji_Countdown_Admin
15
+ {
16
 
17
  /**
18
  * Uji Countdown
86
  * @since 2.0
87
  */
88
  public function __construct() {
89
+
90
  // Register hooks that are fired when the plugin is activated, deactivated, and uninstalled, respectively.
91
  register_activation_hook( UJICOUNTDOWN_FILE, array( $this, 'activate' ) );
92
  register_deactivation_hook( UJICOUNTDOWN_FILE, array( $this, 'deactivate' ) );
93
+
94
+ global $wpdb;
95
+
96
+ if(version_compare(self::getPluginSavedVersion(), '2.0.2') < 0)
97
+ {
98
+ $createTableStatement = "CREATE TABLE " . self::getSubscriptionsTableName() . "(
99
+ Id int unsigned NOT NULL auto_increment,
100
+ EmailAddress varchar(64) NOT NULL,
101
+ ProviderId tinyint unsigned DEFAULT '0',
102
+ List varchar(128) DEFAULT NULL,
103
+ ListGroup varchar(32) DEFAULT NULL,
104
+ CreatedDate datetime NOT NULL,
105
+ IsSynchronized tinyint unsigned NOT NULL DEFAULT '0',
106
+ PRIMARY KEY (Id)
107
+ )";
108
+
109
+ $createTableStatement .= !empty($wpdb->charset) ? " DEFAULT CHARACTER SET $wpdb->charset" : '';
110
+ $createTableStatement .= !empty($wpdb->collate) ? " COLLATE $wpdb->collate" : '';
111
+
112
+ if($wpdb->get_var($wpdb->prepare("show tables like %s", self::getSubscriptionsTableName())) !== self::getSubscriptionsTableName())
113
+ {
114
+ require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
115
+ dbDelta($createTableStatement);
116
+ }
117
+
118
+ }
119
+
120
+ self::savePluginVersion();
121
+
122
+ self::$isGoodByeCaptchaActivated = class_exists('GoodByeCaptcha', false);
123
+
124
  //Show on front
125
  if ( !is_admin() ) {
126
  $ujic = new UjiCountdown();
134
  // HOOKs Widget
135
  add_action( 'widgets_init', array( $this, 'ujic_register_widgets' ) );
136
 
137
+ if ( is_admin() )
138
+ {
139
+
140
+ if(!empty($_GET['page']) && $_GET['page'] === 'uji-countdown' && !empty($_GET['action']) && $_GET['action'] === 'cvs-export')
141
+ {
142
+ new UjiSubscriptionsTable();
143
+ exit;
144
+ }
145
 
146
  // Add the options page and menu item.
147
  add_action( 'admin_menu', array( $this, 'add_plugin_admin_menu' ) );
155
 
156
  // Add the Link from plugins
157
  add_filter('plugin_action_links', array($this, 'plugin_settings_link'),10,2);
158
+
159
+ //Subscription
160
+ add_action('wp_ajax_nopriv_ujiSubscribe', array( $this, 'handleSubscription' ) );
161
+ add_action('wp_ajax_ujiSubscribe', array( $this, 'handleSubscription' ) );
162
+
163
+ !self::$isGoodByeCaptchaActivated ? add_action('admin_notices', array($this, 'showAntiSpamAdminNotice')) : null;
164
  }
165
+
166
+ }
167
+
168
+ /**
169
+ * Subscription
170
+ *
171
+ * @since 2.0.3
172
+ */
173
+ protected static function getSubscriptionsTableName()
174
+ {
175
+ global $wpdb;
176
+ return $wpdb->prefix . 'uji_subscriptions';
177
+ }
178
+
179
+ protected static function getPluginSavedVersion()
180
+ {
181
+ return get_option('uji-countdown-version', null);
182
+ }
183
+
184
+ protected static function savePluginVersion()
185
+ {
186
+ return update_option('uji-countdown-version', UJIC_VERS);
187
+ }
188
+
189
+ public function handleSubscription()
190
+ {
191
+ global $wpdb;
192
+ $_POST = array_map('trim', $_POST);
193
+
194
+ $_POST['txtEmail'] = strtolower(sanitize_email($_POST['txtEmail']));
195
+ $showErrorMessage = empty($_POST['txtEmail']) || (false === filter_var($_POST['txtEmail'], FILTER_VALIDATE_EMAIL));
196
+ (!$showErrorMessage) ? $showErrorMessage = !check_ajax_referer('uji-subscribe-newsletter', 'uji-subscribe-nonce', false) : null;
197
+ (!$showErrorMessage && self::$isGoodByeCaptchaActivated) ? $showErrorMessage = !GdbcRequest::isValid(array("module" => GdbcModulesController::MODULE_UJI_COUNTDOWN)) : null;
198
+
199
+ $showErrorMessage ? wp_send_json_error() : null;
200
+
201
+ $arrFields = array(
202
+ 'EmailAddress' => $_POST['txtEmail'],
203
+ 'CreatedDate' => current_time('mysql'),
204
+ );
205
+ if(!empty($_POST['txtList']))
206
+ {
207
+ $_POST['txtList'] = sanitize_text_field($_POST['txtList']);
208
+ !empty($_POST['txtList']) ? $arrFields['List'] = $_POST['txtList'] : null;
209
+ }
210
+
211
+ false !== $wpdb->insert(
212
+ self::getSubscriptionsTableName(),
213
+ $arrFields,
214
+ array_fill(0, count($arrFields), '%s')
215
+ ) ? wp_send_json_success() : wp_send_json_error();
216
+
217
  }
218
 
219
  /**
247
  "ujic_o" => 0, //Secondary format: Months
248
  "ujic_w" => 0, //Secondary format: Weeks
249
  "ujic_txt" => "true", //Show Label Text
250
+ "ujic_ani" => 0, //Animation for seconds
251
+
252
+ "ujic_subscrFrmIsEnabled" => "true", // Enable subscribe form
253
+ "ujic_subscrFrmAboveText" => "",//__("Join Our Newsletter"), // Subscription form text above
254
+ "ujic_subscrFrmInputText" => "",//__("Enter your email here"), // Subscription form input text placeholder
255
+ "ujic_subscrFrmSubmitText" => "",//__("Subscribe"), // Subscription form input text placeholder
256
+ "ujic_subscrFrmWidth" => 100, // Subscription form width(%) relative to holder
257
+ "ujic_subscrFrmSubmitColor" => '#ab02b2', //Submit Button Color
258
+ "ujic_subscrFrmThanksMessage" => "",//__("Thanks for subscribing"), //Thank you message
259
+ "ujic_subscrFrmErrorMessage" => ""//__("Invalid email address"), //Error message
260
+
261
  );
262
 
263
  //Return default values
264
+ if ( (!isset( $name ) || empty( $name ) ) && (!isset( $id ) || empty( $id ) ) )
265
+ {
266
+ if ( $this->cform_is_create() )
267
+ {
268
+ foreach ( $options as $nm => $val )
269
+ {
270
  $new_options[$nm] = ( isset( $_POST[$nm] ) && !empty( $_POST[$nm] ) ) ? $_POST[$nm] : '';
271
  }
272
+
273
  return $new_options;
274
+ }
275
+ else
276
+ {
277
  return $options;
278
  }
279
  }
280
 
281
  //Return all saved values
282
+ if ( !isset( $name ) && isset( $id ) )
283
+ {
284
  $get_option = $this->sel_ujic_db( $id );
285
 
286
+ foreach ( $options as $nm => $val )
287
+ {
288
  $val = ( isset( $_GET['edit'] ) && !empty( $_GET['edit'] ) ) ? '' : $val;
289
+ //$new_options[$nm] = ( isset( $get_option[$nm] ) && !empty( $get_option[$nm] ) ) ? $get_option[$nm] : $val;
290
+
291
+ $new_options[$nm] = !empty( $get_option[$nm]) ? $get_option[$nm] : $val;
292
  }
293
  return $new_options;
294
  }
295
 
296
  //Return one saved value
297
+ if ( isset( $name ) && isset( $id ) && !empty( $name ) && !empty( $id ) )
298
+ {
299
  $one_option = $this->sel_ujic_db( $id, $name );
300
  $new_option = (!empty( $one_option ) ) ? $one_option : $options[$name];
301
  }
485
 
486
  $this->upd_ujic_db( $posts, $data->id );
487
 
488
+ $wpdb->query( "ALTER TABLE " . self::ujic_tab_name());
489
  $wpdb->query( "ALTER TABLE " . self::ujic_tab_name() . " DROP `size`, DROP `col_dw`, DROP `col_up`, DROP `ujic_pos`, DROP `col_txt`, DROP `col_sw`, DROP `ujic_ani`, DROP `ujic_txt`, DROP `ujic_thick`;");
490
 
491
  }
566
 
567
  $screen = get_current_screen();
568
  if ( $screen->id == $this->plugin_screen_hook_suffix ) {
569
+ if( isset($_GET['tab']) && $_GET['tab'] != "tab_ujic_list"){
570
  wp_enqueue_style( 'wp-color-picker' );
571
  wp_enqueue_style( $this->plugin_slug . '-admin-jqueryui', UJICOUNTDOWN_URL . 'assets/css/jquery-ui-custom.css', array(), $this->version );
572
  wp_enqueue_style( $this->plugin_slug . '-admin-icheck', UJICOUNTDOWN_URL . 'assets/css/pink.css', array(), $this->version );
574
  wp_enqueue_style( $this->plugin_slug . '-admin-styles', UJICOUNTDOWN_URL . 'assets/css/admin.css', array(), $this->version );
575
  }
576
  }
577
+
578
+ /**
579
+ * Anti Spam Notice
580
+ *
581
+ * @since 2.0.3
582
+ *
583
+ */
584
+ public function showAntiSpamAdminNotice()
585
+ {
586
+ $screen = get_current_screen();
587
+ if($screen->id != $this->plugin_screen_hook_suffix)
588
+ return;
589
+
590
+ if(empty($_GET['tab']) || ($_GET['tab'] !== 'tab_ujic_new' && $_GET['tab'] !== 'tab_ujic_news'))
591
+ return;
592
+
593
+ echo '<div class="error"><p>' . _('In order to avoid fake subscriptions we suggest to install <a target="_blank" href = "https://wordpress.org/plugins/goodbye-captcha/">GoodBye Captcha Plugin</a>') . '</p></div>';
594
+ }
595
 
596
  /**
597
  * Register and enqueue admin-specific JavaScript.
612
  wp_enqueue_script( 'jquery-ui-core' );
613
  wp_enqueue_script( 'jquery-ui-slider' );
614
  wp_enqueue_script( 'jquery-ui-draggable' );
615
+
616
+ if($_GET['tab'] != "tab_ujic_news")
617
+ {
618
+ wp_enqueue_script($this->plugin_slug . '-admin-icheck', UJICOUNTDOWN_URL . 'assets/js/jquery.icheck.min.js');
619
+ wp_enqueue_script($this->plugin_slug . '-admin-script', UJICOUNTDOWN_URL . 'assets/js/admin.js', array('wp-color-picker'), $this->version);
620
+ }
621
  }
622
  }
623
 
630
  wp_register_style( $this->plugin_slug . '-uji-countdown', UJICOUNTDOWN_URL . 'css/uji-countdown.css', array(), $this->version );
631
  wp_register_script( $this->plugin_slug . '-core', UJICOUNTDOWN_URL . 'js/jquery.countdown.js', array( 'jquery' ), $this->version );
632
  wp_register_script( $this->plugin_slug . '-init', UJICOUNTDOWN_URL . 'js/uji-countdown.js', array( 'jquery' ), $this->version );
633
+ wp_register_script( $this->plugin_slug . '-uji-countdown-newsletter', UJICOUNTDOWN_URL . 'js/uji-newsletter.js', array( 'jquery' ), $this->version );
634
+
635
  }
636
 
637
  /**
736
  * @since 2.0
737
  */
738
  public function ujic_get_option( $name, $opt = 'ujic_set' ) {
739
+
740
  $vars = get_option($opt);
741
+ if($name && isset($vars[$name]) && !empty($vars[$name]) ) {
742
+ return $vars[$name];
743
+ }
744
  else
745
  return false;
746
  }
classes/class-uji-widget.php CHANGED
@@ -1,250 +1,260 @@
1
- <?php
2
- /**
3
- *
4
- * Plugin Name: Uji Countdown
5
- * Plugin URI: http://www.wpmanage.com/uji-countdown/
6
- * Description: HTML5 Countdown.
7
- * Version: 2.0
8
- * Author: WPmanage <info@wpmanage.com>
9
- * Author URI: http://www.wpmanage.com
10
- */
11
- if ( !defined( 'ABSPATH' ) )
12
- exit; // Exit if accessed directly
13
-
14
- class ujic_Widget extends WP_Widget {
15
-
16
- protected $plugin_slug = 'uji-countdown';
17
-
18
- /**
19
- * Uji Countdown Init
20
- *
21
- * @since 2.0
22
- *
23
- * @var string
24
- */
25
- public function ujic_Widget() {
26
- $widget_ops = array(
27
- 'classname' => 'uji_Widget',
28
- 'description' => 'Uji Countdown widget.'
29
- );
30
- $this->WP_Widget( 'uji_Widget', 'Uji Countdown', $widget_ops );
31
-
32
- //actions
33
- add_action( 'plugins_loaded', array( &$this, 'load_textdomain' ) );
34
- add_action( 'admin_enqueue_scripts', array( &$this, 'admin_widgets_scripts_styles' ) );
35
- }
36
-
37
- /**
38
- * Uji Countdown Admin Scripts
39
- *
40
- * @since 2.0
41
- *
42
- * @var string
43
- */
44
- public function admin_widgets_scripts_styles( $page ) {
45
- if ( $page !== 'widgets.php' )
46
- return;
47
-
48
- wp_enqueue_script( 'jquery-ui-datepicker' );
49
- wp_enqueue_style( 'jquery-ui', UJICOUNTDOWN_URL . 'assets/tinymce/css/jquery-ui.min.css' );
50
- wp_enqueue_script( 'jquery-widget', UJICOUNTDOWN_URL . 'assets/js/widget.js' );
51
- }
52
-
53
- /**
54
- * Uji Countdown Form
55
- *
56
- * @since 2.0
57
- *
58
- * @var string
59
- */
60
- public function ujic_forms( $sel = NULL ) {
61
- global $wpdb;
62
- $table_name = $wpdb->prefix . "uji_counter";
63
- $ujic_datas = $wpdb->get_results( "SELECT * FROM $table_name ORDER BY `time` DESC" );
64
- if ( !empty( $ujic_datas ) ) {
65
- $ujictab = false;
66
- foreach ( $ujic_datas as $ujic ) {
67
- $type = !empty( $ujic->style ) ? $ujic->style : "classic";
68
- $select = (isset( $sel ) && !empty( $sel ) && $sel == $ujic->title ) ? ' selected="selected"' : '';
69
- $ujictab .='<option value="' . $ujic->title . '" data-type=' . $type . ' ' . $select . '> ' . $ujic->title . ' - ' . $type . ' </option>';
70
- }
71
- return $ujictab;
72
- } else {
73
- return false;
74
- }
75
- }
76
-
77
- /**
78
- * Uji Countdown Get Time/Date
79
- *
80
- * @since 2.0
81
- *
82
- * @var string
83
- */
84
- public function ujic_sel_datetime( $nr, $sel = null ) {
85
- for ( $i = 0; $i <= $nr; $i++ ) {
86
- $num[sprintf( "%02s", $i )] = sprintf( "%02s", $i );
87
- }
88
- $numbers = false;
89
- foreach ( $num as $n ) {
90
- $select = (isset( $sel ) && !empty( $sel ) && $sel == $n) ? ' selected="selected"' : '';
91
- $numbers .='<option value="' . $n . '"' . $select . '> ' . $n . ' </option>';
92
- }
93
-
94
- return $numbers;
95
- }
96
-
97
- /**
98
- * Uji Countdown Widget
99
- *
100
- * @since 2.0
101
- *
102
- * @var string
103
- */
104
- public function widget( $args, $instance ) {
105
- extract( $args, EXTR_SKIP );
106
-
107
- /* Our variables from the widget settings. */
108
- $title = apply_filters( 'widget_UJI_title', $instance['UJI_title'], $instance, $this->id_base );
109
- $name = isset( $instance['UJI_style'] ) ? $instance['UJI_style'] : false;
110
- $date = isset( $instance['UJI_date'] ) ? $instance['UJI_date'] : false;
111
- $hour = isset( $instance['UJI_hours'] ) ? $instance['UJI_hours'] : false;
112
- $minut = isset( $instance['UJI_minutes'] ) ? $instance['UJI_minutes'] : false;
113
- $hide = isset( $instance['UJI_hide'] ) ? $instance['UJI_hide'] : false;
114
- $url = isset( $instance['UJI_url'] ) ? $instance['UJI_url'] : false;
115
-
116
- $shtval = '';
117
- $shtval .= (!empty( $name ) ) ? ' id="' . $name . '"' : $shtval;
118
- $shtval .= (!empty( $date ) ) ? ' expire="' . $date . ' ' . $hour . ':' . $minut . '"' : $shtval;
119
- $shtval .= (!empty( $hide ) ) ? ' hide = "true"' : $shtval;
120
- $shtval .= ( empty( $hide ) && !empty( $url ) ) ? ' url = "' . $url . '"' : $shtval;
121
-
122
- $shortcode = (!empty( $shtval ) ) ? '[ujicountdown' . $shtval . ']' : '';
123
-
124
- if ( !empty( $shortcode ) ) {
125
- echo $before_widget;
126
- if ( $title )
127
- echo $before_title . $title . $after_title;
128
- echo do_shortcode( $shortcode );
129
- echo $after_widget;
130
- }
131
- }
132
-
133
- /**
134
- * Uji Countdown Update
135
- *
136
- * @since 2.0
137
- *
138
- * @var string
139
- */
140
- public function update( $new_instance, $old_instance ) {
141
- $instance = $old_instance;
142
- $instance['UJI_title'] = strip_tags( $new_instance['UJI_title'] );
143
- $instance['UJI_style'] = strip_tags( $new_instance['UJI_style'] );
144
- $instance['UJI_date'] = strip_tags( $new_instance['UJI_date'] );
145
- $instance['UJI_hours'] = strip_tags( $new_instance['UJI_hours'] );
146
- $instance['UJI_minutes'] = strip_tags( $new_instance['UJI_minutes'] );
147
- $instance['UJI_hide'] = strip_tags( $new_instance['UJI_hide'] );
148
- $instance['UJI_url'] = strip_tags( $new_instance['UJI_url'] );
149
-
150
- return $instance;
151
- }
152
-
153
- /**
154
- * Uji Countdown Form
155
- *
156
- * @since 2.0
157
- *
158
- * @var string
159
- */
160
- public function form( $instance ) {
161
-
162
- $defaults = array(
163
- 'UJI_title' => '',
164
- 'UJI_style' => false,
165
- 'UJI_date' => '',
166
- 'UJI_hours' => 23,
167
- 'UJI_minutes' => 59,
168
- 'UJI_hide' => '',
169
- 'UJI_url' => ''
170
- );
171
-
172
- $instance = wp_parse_args( (array) $instance, $defaults );
173
- ?>
174
- <p style="font-size:11px">
175
- Only one timer on page is allowed. <br>Check the <a href="http://wpmanage.com/uji-countdown" target="_blank">Premium version</a> for multiple countdown timers on the same page.
176
- <p>
177
- <!-- Widget Title: Text Input -->
178
- <p>
179
- <label for="<?php echo $this->get_field_id( 'UJI_title' ); ?>"><?php _e( 'Title (optional):', $this->plugin_slug ); ?></label>
180
- <input type="text" name="<?php echo $this->get_field_name( 'UJI_title' ); ?>" value="<?php echo $instance['UJI_title']; ?>" class="widefat" id="<?php echo $this->get_field_id( 'UJI_title' ); ?>" />
181
- </p>
182
-
183
- <!-- Widget Select Style: Select Input -->
184
- <p>
185
-
186
- <?php if ( $this->ujic_forms() ): ?>
187
-
188
- <label for="<?php echo $this->get_field_id( 'UJI_style' ); ?>"><?php _e( 'Select a Style:', $this->plugin_slug ); ?></label>
189
- <select name="<?php echo $this->get_field_name( 'UJI_style' ); ?>" class="widefat" id="<?php echo $this->get_field_id( 'UJI_style' ); ?>">
190
- <?php
191
- echo $this->ujic_forms( $instance['UJI_style'] );
192
- ?>
193
- </select>
194
-
195
- <?php else: ?>
196
-
197
- <h4 style="color: firebrick"><?php _e( 'Please create new timer style first.', $this->plugin_slug ); ?></h4>
198
-
199
- <?php endif; ?>
200
-
201
- </p>
202
-
203
- <!-- Widget Date: Text Input -->
204
- <p>
205
- <label for="<?php echo $this->get_field_id( 'UJI_date' ); ?>"><?php _e( 'Expire Date:', $this->plugin_slug ); ?></label>
206
- <input type="text" name="<?php echo $this->get_field_name( 'UJI_date' ); ?>" value="<?php echo $instance['UJI_date']; ?>" style="background: url('<?php echo UJICOUNTDOWN_URL ?>/assets/tinymce/images/data-picker.png') no-repeat scroll right top; display:block; height: 26px; width: 180px;" class="widefat ujic_date" id="<?php echo $this->get_field_id( 'UJI_date' ); ?>" />
207
- </p>
208
-
209
- <!-- Widget Select Time: Select Input -->
210
- <p>
211
- <label><?php _e( 'Select the Time:', $this->plugin_slug ); ?></label>
212
- <div style="display: block;">
213
- <div style="display: inline-block; margin: 0 5px 0 5px">
214
- <h4 style="margin:0"><?php _e( 'Hour:', $this->plugin_slug ); ?> </h4>
215
- <select name="<?php echo $this->get_field_name( 'UJI_hours' ); ?>" style="width:50px;" id="<?php echo $this->get_field_id( 'UJI_hours' ); ?>">
216
- <?php
217
- echo $this->ujic_sel_datetime( 23, $instance['UJI_hours'] );
218
- ?>
219
- </select>
220
- </div>
221
- :
222
- <div style="display: inline-block; margin: 0 5px 0 5px">
223
- <h4 style="margin:0"><?php _e( 'Minute:', $this->plugin_slug ); ?> </h4>
224
- <select name="<?php echo $this->get_field_name( 'UJI_minutes' ); ?>" style="width:50px;" id="<?php echo $this->get_field_id( 'UJI_minutes' ); ?>">
225
- <?php
226
- echo $this->ujic_sel_datetime( 59, $instance['UJI_minutes'] );
227
- ?>
228
- </select>
229
- </div>
230
- </div>
231
- </p>
232
- <h4><?php _e( 'After Expiry:', $this->plugin_slug ); ?> </h4>
233
- <!-- Widget Hide: Checkbox Input -->
234
- <p>
235
- <label for="<?php echo $this->get_field_id( 'UJI_hide' ); ?>"><?php _e( 'Hide Countdown:', $this->plugin_slug ); ?></label>
236
- <input class="ujic_exp" id="<?php echo $this->get_field_id( 'UJI_hide' ); ?>" name="<?php echo $this->get_field_name( 'UJI_hide' ); ?>" type="checkbox" value="hide" <?php checked( $instance['UJI_hide'], 'hide' ) ?> />
237
- </p>
238
-
239
- <!-- Widget Go to Link: Select Input -->
240
- <p>
241
- <label for="<?php echo $this->get_field_id( 'UJI_url' ); ?>"><?php _e( 'Or go to this link:', $this->plugin_slug ); ?></label><br />
242
- <small><?php _e( 'Select URL to send after expire', $this->plugin_slug ); ?></small>
243
- <input class="widefat ujic_link" id="<?php echo $this->get_field_id( 'UJI_url' ); ?>" name="<?php echo $this->get_field_name( 'UJI_url' ); ?>" type="text" value="<?php echo $instance['UJI_url']; ?>" />
244
- </p>
245
-
246
- <?php
247
- }
248
-
249
- }
 
 
 
 
 
 
 
 
 
 
250
  ?>
1
+ <?php
2
+ /**
3
+ *
4
+ * Plugin Name: Uji Countdown
5
+ * Plugin URI: http://www.wpmanage.com/uji-countdown/
6
+ * Description: HTML5 Countdown.
7
+ * Version: 2.0
8
+ * Author: WPmanage <info@wpmanage.com>
9
+ * Author URI: http://www.wpmanage.com
10
+ */
11
+ if ( !defined( 'ABSPATH' ) )
12
+ exit; // Exit if accessed directly
13
+
14
+ class ujic_Widget extends WP_Widget {
15
+
16
+ protected $plugin_slug = 'uji-countdown';
17
+
18
+ /**
19
+ * Uji Countdown Init
20
+ *
21
+ * @since 2.0
22
+ *
23
+ * @var string
24
+ */
25
+ public function ujic_Widget() {
26
+ $widget_ops = array(
27
+ 'classname' => 'uji_Widget',
28
+ 'description' => 'Uji Countdown widget.'
29
+ );
30
+ $this->WP_Widget( 'uji_Widget', 'Uji Countdown', $widget_ops );
31
+
32
+ //actions
33
+ add_action( 'plugins_loaded', array( &$this, 'load_textdomain' ) );
34
+ add_action( 'admin_enqueue_scripts', array( &$this, 'admin_widgets_scripts_styles' ) );
35
+ }
36
+
37
+ /**
38
+ * Uji Countdown Admin Scripts
39
+ *
40
+ * @since 2.0
41
+ *
42
+ * @var string
43
+ */
44
+ public function admin_widgets_scripts_styles( $page ) {
45
+ if ( $page !== 'widgets.php' )
46
+ return;
47
+
48
+ wp_enqueue_script( 'jquery-ui-datepicker' );
49
+ wp_enqueue_style( 'jquery-ui', UJICOUNTDOWN_URL . 'assets/tinymce/css/jquery-ui.min.css' );
50
+ wp_enqueue_script( 'jquery-widget', UJICOUNTDOWN_URL . 'assets/js/widget.js' );
51
+ }
52
+
53
+ /**
54
+ * Uji Countdown Form
55
+ *
56
+ * @since 2.0
57
+ *
58
+ * @var string
59
+ */
60
+ public function ujic_forms( $sel = NULL ) {
61
+ global $wpdb;
62
+ $table_name = $wpdb->prefix . "uji_counter";
63
+ $ujic_datas = $wpdb->get_results( "SELECT * FROM $table_name ORDER BY `time` DESC" );
64
+ if ( !empty( $ujic_datas ) ) {
65
+ $ujictab = false;
66
+ foreach ( $ujic_datas as $ujic ) {
67
+ $type = !empty( $ujic->style ) ? $ujic->style : "classic";
68
+ $select = (isset( $sel ) && !empty( $sel ) && $sel == $ujic->title ) ? ' selected="selected"' : '';
69
+ $ujictab .='<option value="' . $ujic->title . '" data-type=' . $type . ' ' . $select . '> ' . $ujic->title . ' - ' . $type . ' </option>';
70
+ }
71
+ return $ujictab;
72
+ } else {
73
+ return false;
74
+ }
75
+ }
76
+
77
+ /**
78
+ * Uji Countdown Get Time/Date
79
+ *
80
+ * @since 2.0
81
+ *
82
+ * @var string
83
+ */
84
+ public function ujic_sel_datetime( $nr, $sel = null ) {
85
+ for ( $i = 0; $i <= $nr; $i++ ) {
86
+ $num[sprintf( "%02s", $i )] = sprintf( "%02s", $i );
87
+ }
88
+ $numbers = false;
89
+ foreach ( $num as $n ) {
90
+ $select = (isset( $sel ) && !empty( $sel ) && $sel == $n) ? ' selected="selected"' : '';
91
+ $numbers .='<option value="' . $n . '"' . $select . '> ' . $n . ' </option>';
92
+ }
93
+
94
+ return $numbers;
95
+ }
96
+
97
+ /**
98
+ * Uji Countdown Widget
99
+ *
100
+ * @since 2.0
101
+ *
102
+ * @var string
103
+ */
104
+ public function widget( $args, $instance ) {
105
+ extract( $args, EXTR_SKIP );
106
+
107
+ /* Our variables from the widget settings. */
108
+ $title = apply_filters( 'widget_UJI_title', $instance['UJI_title'], $instance, $this->id_base );
109
+ $name = isset( $instance['UJI_style'] ) ? $instance['UJI_style'] : false;
110
+ $date = isset( $instance['UJI_date'] ) ? $instance['UJI_date'] : false;
111
+ $hour = isset( $instance['UJI_hours'] ) ? $instance['UJI_hours'] : false;
112
+ $minut = isset( $instance['UJI_minutes'] ) ? $instance['UJI_minutes'] : false;
113
+ $hide = isset( $instance['UJI_hide'] ) ? $instance['UJI_hide'] : false;
114
+ $url = isset( $instance['UJI_url'] ) ? $instance['UJI_url'] : false;
115
+ $subscr = isset( $instance['UJI_subscr'] ) ? $instance['UJI_subscr'] : false;
116
+
117
+ $shtval = '';
118
+ $shtval .= (!empty( $name ) ) ? ' id="' . $name . '"' : $shtval;
119
+ $shtval .= (!empty( $date ) ) ? ' expire="' . $date . ' ' . $hour . ':' . $minut . '"' : $shtval;
120
+ $shtval .= (!empty( $hide ) ) ? ' hide = "true"' : $shtval;
121
+ $shtval .= ( empty( $hide ) && !empty( $url ) ) ? ' url = "' . $url . '"' : $shtval;
122
+ $shtval .= ( empty( $subscr ) ) ? ' subscr = "' . trim($subscr) . '"' : $shtval;
123
+
124
+ $shortcode = (!empty( $shtval ) ) ? '[ujicountdown' . $shtval . ']' : '';
125
+
126
+ if ( !empty( $shortcode ) ) {
127
+ echo $before_widget;
128
+ if ( $title )
129
+ echo $before_title . $title . $after_title;
130
+ echo do_shortcode( $shortcode );
131
+ echo $after_widget;
132
+ }
133
+ }
134
+
135
+ /**
136
+ * Uji Countdown Update
137
+ *
138
+ * @since 2.0
139
+ *
140
+ * @var string
141
+ */
142
+ public function update( $new_instance, $old_instance ) {
143
+ $instance = $old_instance;
144
+ $instance['UJI_title'] = strip_tags( $new_instance['UJI_title'] );
145
+ $instance['UJI_style'] = strip_tags( $new_instance['UJI_style'] );
146
+ $instance['UJI_date'] = strip_tags( $new_instance['UJI_date'] );
147
+ $instance['UJI_hours'] = strip_tags( $new_instance['UJI_hours'] );
148
+ $instance['UJI_minutes'] = strip_tags( $new_instance['UJI_minutes'] );
149
+ $instance['UJI_hide'] = strip_tags( $new_instance['UJI_hide'] );
150
+ $instance['UJI_url'] = strip_tags( $new_instance['UJI_url'] );
151
+ $instance['UJI_subscr'] = strip_tags( $new_instance['UJI_subscr'] );
152
+
153
+ return $instance;
154
+ }
155
+
156
+ /**
157
+ * Uji Countdown Form
158
+ *
159
+ * @since 2.0
160
+ *
161
+ * @var string
162
+ */
163
+ public function form( $instance ) {
164
+
165
+ $defaults = array(
166
+ 'UJI_title' => '',
167
+ 'UJI_style' => false,
168
+ 'UJI_date' => '',
169
+ 'UJI_hours' => 23,
170
+ 'UJI_minutes' => 59,
171
+ 'UJI_hide' => '',
172
+ 'UJI_url' => '',
173
+ 'UJI_subscr' => ''
174
+ );
175
+
176
+ $instance = wp_parse_args( (array) $instance, $defaults );
177
+ ?>
178
+ <p style="font-size:11px">
179
+ Only one timer on page is allowed. <br>Check the <a href="http://wpmanage.com/uji-countdown" target="_blank">Premium version</a> for multiple countdown timers on the same page.
180
+ <p>
181
+ <!-- Widget Title: Text Input -->
182
+ <p>
183
+ <label for="<?php echo $this->get_field_id( 'UJI_title' ); ?>"><?php _e( 'Title (optional):', $this->plugin_slug ); ?></label>
184
+ <input type="text" name="<?php echo $this->get_field_name( 'UJI_title' ); ?>" value="<?php echo $instance['UJI_title']; ?>" class="widefat" id="<?php echo $this->get_field_id( 'UJI_title' ); ?>" />
185
+ </p>
186
+
187
+ <!-- Widget Select Style: Select Input -->
188
+ <p>
189
+
190
+ <?php if ( $this->ujic_forms() ): ?>
191
+
192
+ <label for="<?php echo $this->get_field_id( 'UJI_style' ); ?>"><?php _e( 'Select a Style:', $this->plugin_slug ); ?></label>
193
+ <select name="<?php echo $this->get_field_name( 'UJI_style' ); ?>" class="widefat" id="<?php echo $this->get_field_id( 'UJI_style' ); ?>">
194
+ <?php
195
+ echo $this->ujic_forms( $instance['UJI_style'] );
196
+ ?>
197
+ </select>
198
+
199
+ <?php else: ?>
200
+
201
+ <h4 style="color: firebrick"><?php _e( 'Please create new timer style first.', $this->plugin_slug ); ?></h4>
202
+
203
+ <?php endif; ?>
204
+
205
+ </p>
206
+
207
+ <!-- Widget Date: Text Input -->
208
+ <p>
209
+ <label for="<?php echo $this->get_field_id( 'UJI_date' ); ?>"><?php _e( 'Expire Date:', $this->plugin_slug ); ?></label>
210
+ <input type="text" name="<?php echo $this->get_field_name( 'UJI_date' ); ?>" value="<?php echo $instance['UJI_date']; ?>" style="background: url('<?php echo UJICOUNTDOWN_URL ?>/assets/tinymce/images/data-picker.png') no-repeat scroll right top; display:block; height: 26px; width: 180px;" class="widefat ujic_date" id="<?php echo $this->get_field_id( 'UJI_date' ); ?>" />
211
+ </p>
212
+
213
+ <!-- Widget Select Time: Select Input -->
214
+ <p>
215
+ <label><?php _e( 'Select the Time:', $this->plugin_slug ); ?></label>
216
+ <div style="display: block;">
217
+ <div style="display: inline-block; margin: 0 5px 0 5px">
218
+ <h4 style="margin:0"><?php _e( 'Hour:', $this->plugin_slug ); ?> </h4>
219
+ <select name="<?php echo $this->get_field_name( 'UJI_hours' ); ?>" style="width:50px;" id="<?php echo $this->get_field_id( 'UJI_hours' ); ?>">
220
+ <?php
221
+ echo $this->ujic_sel_datetime( 23, $instance['UJI_hours'] );
222
+ ?>
223
+ </select>
224
+ </div>
225
+ :
226
+ <div style="display: inline-block; margin: 0 5px 0 5px">
227
+ <h4 style="margin:0"><?php _e( 'Minute:', $this->plugin_slug ); ?> </h4>
228
+ <select name="<?php echo $this->get_field_name( 'UJI_minutes' ); ?>" style="width:50px;" id="<?php echo $this->get_field_id( 'UJI_minutes' ); ?>">
229
+ <?php
230
+ echo $this->ujic_sel_datetime( 59, $instance['UJI_minutes'] );
231
+ ?>
232
+ </select>
233
+ </div>
234
+ </div>
235
+ </p>
236
+ <h4><?php _e( 'After Expiry:', $this->plugin_slug ); ?> </h4>
237
+ <!-- Widget Hide: Checkbox Input -->
238
+ <p>
239
+ <label for="<?php echo $this->get_field_id( 'UJI_hide' ); ?>"><?php _e( 'Hide Countdown:', $this->plugin_slug ); ?></label>
240
+ <input class="ujic_exp" id="<?php echo $this->get_field_id( 'UJI_hide' ); ?>" name="<?php echo $this->get_field_name( 'UJI_hide' ); ?>" type="checkbox" value="hide" <?php checked( $instance['UJI_hide'], 'hide' ) ?> />
241
+ </p>
242
+
243
+ <!-- Widget Go to Link: Select Input -->
244
+ <p>
245
+ <label for="<?php echo $this->get_field_id( 'UJI_url' ); ?>"><?php _e( 'Or go to this link:', $this->plugin_slug ); ?></label><br />
246
+ <small><?php _e( 'Select URL to send after expire', $this->plugin_slug ); ?></small>
247
+ <input class="widefat ujic_link" id="<?php echo $this->get_field_id( 'UJI_url' ); ?>" name="<?php echo $this->get_field_name( 'UJI_url' ); ?>" type="text" value="<?php echo $instance['UJI_url']; ?>" />
248
+ </p>
249
+
250
+ <!-- Widget Campaign name -->
251
+ <p>
252
+ <label for="<?php echo $this->get_field_id( 'UJI_subscr' ); ?>"><?php _e( 'Campaign Name:', $this->plugin_slug ); ?></label><br />
253
+ <input class="widefat ujic_subscr" id="<?php echo $this->get_field_id( 'UJI_subscr' ); ?>" name="<?php echo $this->get_field_name( 'UJI_subscr' ); ?>" type="text" value="<?php echo $instance['UJI_subscr']; ?>" />
254
+ </p>
255
+
256
+ <?php
257
+ }
258
+
259
+ }
260
  ?>
css/uji-countdown.css CHANGED
@@ -85,6 +85,119 @@
85
  }
86
 
87
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  /* ==========================================================================
89
  RTL
90
  ========================================================================== */
85
  }
86
 
87
 
88
+ /******************** Newsletter *************/
89
+ .ujicf:before, .ujicf:after { content: ""; display: table; }
90
+ .ujicf:after { clear: both; }
91
+ .ujicf { *zoom: 1; }
92
+
93
+ #ujiCountdown
94
+ {
95
+ display:inline-block;
96
+ margin-bottom:0;
97
+ }
98
+
99
+ #ujiCountdown span.countdown_row
100
+ {
101
+ display:block;
102
+ }
103
+
104
+ #ujiCountdown span.ujic_s
105
+ {
106
+ margin-right: 0;
107
+ }
108
+
109
+ #uji-wrapper
110
+ {
111
+ display:inline-block;
112
+ margin: 0 auto;
113
+ }
114
+
115
+ .ujic-hold form
116
+ {
117
+ display:block;
118
+ margin: 0;
119
+ padding: 0;
120
+ overflow: hidden;
121
+ width: 100%;
122
+ }
123
+
124
+ .ujic-hold form span
125
+ {
126
+ display: block;
127
+ font-size: 13px;
128
+ font-weight: 600;
129
+ line-height: 1.1em;
130
+ margin: 1em 0;
131
+ text-align: center;
132
+ }
133
+
134
+ .ujic-hold form p
135
+ {
136
+ width:100%;
137
+ display: inline-block;
138
+ margin: 0 auto !important;
139
+ text-align: center;
140
+ }
141
+
142
+ .ujic-hold form input
143
+ {
144
+ display: inline !important;
145
+ margin: 0 !important;
146
+ padding: 0 !important;
147
+ height: 30px !important;
148
+ }
149
+
150
+ .ujic-hold form div
151
+ {
152
+ text-align: center;
153
+ }
154
+
155
+ .ujic-hold form input[type="text"]
156
+ {
157
+ background: none repeat scroll 0 0 #fff;
158
+ border: medium none;
159
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) inset;
160
+ border-radius: 3px 0 0 3px;
161
+ font-size: 13px;
162
+ margin: 0;
163
+ padding: 0px 5%;
164
+ text-align: center;
165
+ width: 70%;
166
+ float:left;
167
+ }
168
+
169
+ .ujic-hold form input[type="submit"]
170
+ {
171
+ border-radius: 0 3px 3px 0;
172
+ font-size: 13px;
173
+ font-weight: 600;
174
+ margin: 0;
175
+ padding: 0 3%;
176
+ text-transform: uppercase;
177
+ width: 30%;
178
+ border: medium none;
179
+ box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset;
180
+ color: #fff;
181
+ background: linear-gradient(to bottom , #c816d0, #ab02b2) repeat scroll 0 0 rgba(0, 0, 0, 0);
182
+ float:left;
183
+ }
184
+ .ujic-hold form span.uji-msg-err
185
+ {
186
+ color:#CE0000;
187
+ }
188
+ .ujic-hold form span.uji-msg-ok
189
+ {
190
+ color:green;
191
+ }
192
+
193
+ .ujic-hold form div span
194
+ {
195
+ display: none;
196
+ line-height: 1em;
197
+ margin: 0;
198
+ text-align: center;
199
+ }
200
+
201
  /* ==========================================================================
202
  RTL
203
  ========================================================================== */
js/jquery.countdown.js CHANGED
@@ -1 +1,7 @@
1
- (function(){var e,t;jQuery.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}};e=jQuery.uaMatch(navigator.userAgent);t={};if(e.browser){t[e.browser]=true;t.version=e.version}if(t.chrome){t.webkit=true}else if(t.webkit){t.safari=true}jQuery.browser=t})();(function(){var e=false;window.JQClass=function(){};JQClass.classes={};JQClass.extend=function t(n){function o(){if(!e&&this._init){this._init.apply(this,arguments)}}var r=this.prototype;e=true;var i=new this;e=false;for(var s in n){i[s]=typeof n[s]=="function"&&typeof r[s]=="function"?function(e,t){return function(){var n=this._super;this._super=function(t){return r[e].apply(this,t)};var i=t.apply(this,arguments);this._super=n;return i}}(s,n[s]):n[s]}o.prototype=i;o.prototype.constructor=o;o.extend=t;return o}})();(function($){function camelCase(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})}JQClass.classes.JQPlugin=JQClass.extend({name:"plugin",defaultOptions:{},regionalOptions:{},_getters:[],_getMarker:function(){return"is-"+this.name},_init:function(){$.extend(this.defaultOptions,this.regionalOptions&&this.regionalOptions[""]||{});var e=camelCase(this.name);$[e]=this;$.fn[e]=function(t){var n=Array.prototype.slice.call(arguments,1);if($[e]._isNotChained(t,n)){return $[e][t].apply($[e],[this[0]].concat(n))}return this.each(function(){if(typeof t==="string"){if(t[0]==="_"||!$[e][t]){throw"Unknown method: "+t}$[e][t].apply($[e],[this].concat(n))}else{$[e]._attach(this,t)}})}},setDefaults:function(e){$.extend(this.defaultOptions,e||{})},_isNotChained:function(e,t){if(e==="option"&&(t.length===0||t.length===1&&typeof t[0]==="string")){return true}return $.inArray(e,this._getters)>-1},_attach:function(e,t){e=$(e);if(e.hasClass(this._getMarker())){return}e.addClass(this._getMarker());t=$.extend({},this.defaultOptions,this._getMetadata(e),t||{});var n=$.extend({name:this.name,elem:e,options:t},this._instSettings(e,t));e.data(this.name,n);this._postAttach(e,n);this.option(e,t)},_instSettings:function(e,t){return{}},_postAttach:function(e,t){},_getMetadata:function(elem){try{var data=elem.data(this.name.toLowerCase())||"";data=data.replace(/'/g,'"');data=data.replace(/([a-zA-Z0-9]+):/g,function(e,t,n){var r=data.substring(0,n).match(/"/g);return!r||r.length%2===0?'"'+t+'":':t+":"});data=$.parseJSON("{"+data+"}");for(var name in data){var value=data[name];if(typeof value==="string"&&value.match(/^new Date\((.*)\)$/)){data[name]=eval(value)}}return data}catch(e){return{}}},_getInst:function(e){return $(e).data(this.name)||{}},option:function(e,t,n){e=$(e);var r=e.data(this.name);if(!t||typeof t==="string"&&n==null){var i=(r||{}).options;return i&&t?i[t]:i}if(!e.hasClass(this._getMarker())){return}var i=t||{};if(typeof t==="string"){i={};i[t]=n}this._optionsChanged(e,r,i);$.extend(r.options,i)},_optionsChanged:function(e,t,n){},destroy:function(e){e=$(e);if(!e.hasClass(this._getMarker())){return}this._preDestroy(e,this._getInst(e));e.removeData(this.name).removeClass(this._getMarker())},_preDestroy:function(e,t){}});$.JQPlugin={createPlugin:function(e,t){if(typeof e==="object"){t=e;e="JQPlugin"}e=camelCase(e);var n=camelCase(t.name);JQClass.classes[n]=JQClass.classes[e].extend(t);new JQClass.classes[n]}}})(jQuery);(function(e){var t="countdown";var n=0;var r=1;var i=2;var s=3;var o=4;var u=5;var a=6;e.JQPlugin.createPlugin({name:t,defaultOptions:{ujic_style:"classic",text_size:"35",animate_sec:false,color_down:"#3A3A3A",color_up:"#635b63",color_txt:"#ffffff",color_sw:"#000000",color_lab:"#000000",lab_sz:"13",ujic_txt:true,ujic_url:false,ujic_goof:"'Open Sans Condensed',sans-serif",ujic_hide:false,until:null,since:null,timezone:null,serverSync:null,format:"dHMS",layout:"",compact:false,padZeroes:true,significant:0,description:"",expiryUrl:"",expiryText:"",alwaysExpire:false,onExpiry:null,onTick:null,tickInterval:1},regionalOptions:{"":{labels:["Years","Months","Weeks","Days","Hours","Minutes","Seconds"],labels1:["Year","Month","Week","Day","Hour","Minute","Second"],compactLabels:["y","m","w","d"],whichLabels:null,digits:["0","1","2","3","4","5","6","7","8","9"],timeSeparator:":",isRTL:false}},_getters:["getTimes"],_rtlClass:t+"-rtl",_sectionClass:t+"-section",_amountClass:t+"-amount",_periodClass:t+"-period",_rowClass:t+"-row",_holdingClass:t+"-holding",_showClass:t+"-show",_descrClass:t+"-descr",_timerElems:[],_init:function(){function i(e){var u=e<1e12?r?performance.now()+performance.timing.navigationStart:n():e||n();if(u-o>=1e3){t._updateElems();o=u}s(i)}var t=this;this._super();this._serverSyncs=[];var n=typeof Date.now=="function"?Date.now:function(){return(new Date).getTime()};var r=window.performance&&typeof window.performance.now=="function";var s=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||null;var o=0;if(!s||e.noRequestAnimationFrame){e.noRequestAnimationFrame=null;setInterval(function(){t._updateElems()},980)}else{o=window.animationStartTime||window.webkitAnimationStartTime||window.mozAnimationStartTime||window.oAnimationStartTime||window.msAnimationStartTime||n();s(i)}},UTCDate:function(e,t,n,r,i,s,o,u){if(typeof t=="object"&&t.constructor==Date){u=t.getMilliseconds();o=t.getSeconds();s=t.getMinutes();i=t.getHours();r=t.getDate();n=t.getMonth();t=t.getFullYear()}var a=new Date;a.setUTCFullYear(t);a.setUTCDate(1);a.setUTCMonth(n||0);a.setUTCDate(r||1);a.setUTCHours(i||0);a.setUTCMinutes((s||0)-(Math.abs(e)<30?e*60:e));a.setUTCSeconds(o||0);a.setUTCMilliseconds(u||0);return a},periodsToSeconds:function(e){return e[0]*31557600+e[1]*2629800+e[2]*604800+e[3]*86400+e[4]*3600+e[5]*60+e[6]},_instSettings:function(e,t){return{_periods:[0,0,0,0,0,0,0]}},_addElem:function(e){if(!this._hasElem(e)){this._timerElems.push(e)}},_hasElem:function(t){return e.inArray(t,this._timerElems)>-1},_removeElem:function(t){this._timerElems=e.map(this._timerElems,function(e){return e==t?null:e})},_updateElems:function(){for(var e=this._timerElems.length-1;e>=0;e--){this._updateCountdown(this._timerElems[e])}},_optionsChanged:function(t,n,r){if(r.layout){r.layout=r.layout.replace(/&lt;/g,"<").replace(/&gt;/g,">")}this._resetExtraLabels(n.options,r);var i=n.options.timezone!=r.timezone;e.extend(n.options,r);this._adjustSettings(t,n,r.until!=null||r.since!=null||i);var s=new Date;if(n._since&&n._since<s||n._until&&n._until>s){this._addElem(t[0])}this._updateCountdown(t,n)},_updateCountdown:function(t,n){t=t.jquery?t:e(t);n=n||t.data(this.name);if(!n){return}t.html(this._generateHTML(n)).toggleClass(this._rtlClass,n.options.isRTL);var r=n.options.ujic_style;if(r=="classic"){var i=n.options.color_down;var s=n.options.color_up;var o=n.options.ujic_goof;var u=navigator.userAgent.toLowerCase();jQuery.browser.chrome=/chrome/.test(navigator.userAgent.toLowerCase());jQuery("#ujiCountdown"+" .countdown_amount").css("background","-moz-linear-gradient(top, "+s+" 50%, "+i+" 50%)");jQuery("#ujiCountdown"+" .countdown_amount").css("background","-o-linear-gradient(top, "+s+" 50%,"+i+" 50%)");jQuery("#ujiCountdown"+" .countdown_amount").css("background","-ms-linear-gradient(top, "+s+" 50%,"+i+" 50%)");jQuery("#ujiCountdown"+" .countdown_amount").css("background","linear-gradient(to bottom, "+s+" 50%,"+i+" 50%)");jQuery("#ujiCountdown"+" .countdown_amount").css("filter","progid:DXImageTransform.Microsoft.gradient( startColorstr='"+s+"', endColorstr='"+i+"',GradientType=0 )");if(jQuery.browser.safari||jQuery.browser.chrome){jQuery("#ujiCountdown"+" .countdown_amount").css("background","-webkit-gradient(linear, left top, left bottom, color-stop(50%,"+s+"), color-stop(50%,"+i+"))");jQuery("#ujiCountdown"+" .countdown_amount").css("background","-webkit-linear-gradient(top, "+s+" 50%,"+i+" 50%)")}jQuery("#ujiCountdown").children(".countdown_row").children("span:last-child").css("margin","0");if(jQuery("#ujiCountdown").children(".countdown_row").children("span:last-child").hasClass("uji_sec")){jQuery("#ujiCountdown").children(".countdown_row").children(".uji_sec").children(".countdown_section").css("margin","0")}var a=n.options.color_txt;var f=n.options.color_sw;jQuery("#ujiCountdown"+" .countdown_amount").css("color",a);jQuery("#ujiCountdown"+" .countdown_amount").css("text-shadow","1px 1px 1px "+f);var l=n.options.color_lab;jQuery("#ujiCountdown"+" .countdown_txt").css("color",l);var c=n.options.ujic_txt;var h=n.options.lab_sz;if(c){jQuery("#ujiCountdown"+" .countdown_txt").css("display","block");jQuery("#ujiCountdown"+" .countdown_txt").css("font",h+"px 'Open Sans Condensed',sans-serif")}else{jQuery("#ujiCountdown"+" .countdown_txt").css("display","none")}var p=n.options.text_size;var d=0;switch(parseInt(p)){case 10:d=5;break;case 11:d=3;break;case 12:d=3;break;case 13:d=1;break}jQuery("#ujiCountdown"+" .countdown_amount").css("font",p+"px/1.5 '"+o+"',sans-serif");if(o!="none")jQuery("#ujiCountdown"+" .countdown_amount").css("min-width",parseInt(p)-10+"px");if(p<15){jQuery("#ujiCountdown"+" .countdown_amount").css({padding:"2px 5px","margin-right":"1px"});jQuery("#ujiCountdown"+" .countdown_section").css("margin","0px 6px 0px 0px");jQuery("#ujiCountdown"+" .countdown_txt").css("font","9px 'Open Sans Condensed',sans-serif")}var v=n.options.animate_sec;if(v){jQuery("#ujiCountdown").find(".uji_sec").find(".countdown_amount").css({"text-align":"center"});jQuery("#ujiCountdown").find(".uji_sec").find(".countdown_amount").eq(1).css({top:"-74px",position:"relative",opacity:1});jQuery("#ujiCountdown").find(".uji_sec").find(".countdown_amount").eq(1).animate({top:d+"px",opacity:1},700,function(){jQuery("#ujiCountdown").find(".uji_sec").find(".countdown_amount").eq(1).animate({opacity:0},300)})}}if(e.isFunction(n.options.onTick)){var m=n._hold!="lap"?n._periods:this._calculatePeriods(n,n._show,n.options.significant,new Date);if(n.options.tickInterval==1||this.periodsToSeconds(m)%n.options.tickInterval==0){n.options.onTick.apply(t[0],[m])}}var g=n._hold!="pause"&&(n._since?n._now.getTime()<n._since.getTime():n._now.getTime()>=n._until.getTime());if(g&&!n._expiring){n._expiring=true;if(this._hasElem(t[0])||n.options.alwaysExpire){this._removeElem(t[0]);if(e.isFunction(n.options.onExpiry)){n.options.onExpiry.apply(t[0],[])}if(n.options.ujic_hide=="true"){jQuery("#ujiCountdown").remove()}if(n.options.expiryText){var y=n.options.layout;n.options.layout=n.options.expiryText;this._updateCountdown(t[0],n);n.options.layout=y}if(n.options.expiryUrl){window.location=n.options.expiryUrl}}n._expiring=false}else if(n._hold=="pause"){this._removeElem(t[0])}},_resetExtraLabels:function(e,t){var n=false;for(var r in t){if(r!="whichLabels"&&r.match(/[Ll]abels/)){n=true;break}}if(n){for(var r in e){if(r.match(/[Ll]abels[02-9]|compactLabels1/)){e[r]=null}}}},_adjustSettings:function(t,n,r){var i;var s=0;var o=null;for(var u=0;u<this._serverSyncs.length;u++){if(this._serverSyncs[u][0]==n.options.serverSync){o=this._serverSyncs[u][1];break}}if(o!=null){s=n.options.serverSync?o:0;i=new Date}else{var a=e.isFunction(n.options.serverSync)?n.options.serverSync.apply(t[0],[]):null;i=new Date;s=a?i.getTime()-a.getTime():0;this._serverSyncs.push([n.options.serverSync,s])}var f=n.options.timezone;f=f==null?-i.getTimezoneOffset():f;if(r||!r&&n._until==null&&n._since==null){n._since=n.options.since;if(n._since!=null){n._since=this.UTCDate(f,this._determineTime(n._since,null));if(n._since&&s){n._since.setMilliseconds(n._since.getMilliseconds()+s)}}n._until=this.UTCDate(f,this._determineTime(n.options.until,i));if(s){n._until.setMilliseconds(n._until.getMilliseconds()+s)}}n._show=this._determineShow(n)},_preDestroy:function(e,t){this._removeElem(e[0]);e.empty()},pause:function(e){this._hold(e,"pause")},lap:function(e){this._hold(e,"lap")},resume:function(e){this._hold(e,null)},toggle:function(t){var n=e.data(t,this.name)||{};this[!n._hold?"pause":"resume"](t)},toggleLap:function(t){var n=e.data(t,this.name)||{};this[!n._hold?"lap":"resume"](t)},_hold:function(t,n){var r=e.data(t,this.name);if(r){if(r._hold=="pause"&&!n){r._periods=r._savePeriods;var i=r._since?"-":"+";r[r._since?"_since":"_until"]=this._determineTime(i+r._periods[0]+"y"+i+r._periods[1]+"o"+i+r._periods[2]+"w"+i+r._periods[3]+"d"+i+r._periods[4]+"h"+i+r._periods[5]+"m"+i+r._periods[6]+"s");this._addElem(t)}r._hold=n;r._savePeriods=n=="pause"?r._periods:null;e.data(t,this.name,r);this._updateCountdown(t,r)}},getTimes:function(t){var n=e.data(t,this.name);return!n?null:n._hold=="pause"?n._savePeriods:!n._hold?n._periods:this._calculatePeriods(n,n._show,n.options.significant,new Date)},_determineTime:function(e,t){var n=this;var r=function(e){var t=new Date;t.setTime(t.getTime()+e*1e3);return t};var i=function(e){e=e.toLowerCase();var t=new Date;var r=t.getFullYear();var i=t.getMonth();var s=t.getDate();var o=t.getHours();var u=t.getMinutes();var a=t.getSeconds();var f=/([+-]?[0-9]+)\s*(s|m|h|d|w|o|y)?/g;var l=f.exec(e);while(l){switch(l[2]||"s"){case"s":a+=parseInt(l[1],10);break;case"m":u+=parseInt(l[1],10);break;case"h":o+=parseInt(l[1],10);break;case"d":s+=parseInt(l[1],10);break;case"w":s+=parseInt(l[1],10)*7;break;case"o":i+=parseInt(l[1],10);s=Math.min(s,n._getDaysInMonth(r,i));break;case"y":r+=parseInt(l[1],10);s=Math.min(s,n._getDaysInMonth(r,i));break}l=f.exec(e)}return new Date(r,i,s,o,u,a,0)};var s=e==null?t:typeof e=="string"?i(e):typeof e=="number"?r(e):e;if(s)s.setMilliseconds(0);return s},_getDaysInMonth:function(e,t){return 32-(new Date(e,t,32)).getDate()},_normalLabels:function(e){return e},_generateHTML:function(t){var f=this;t._periods=t._hold?t._periods:this._calculatePeriods(t,t._show,t.options.significant,new Date);var l=false;var c=0;var h=t.options.significant;var p=e.extend({},t._show);for(var d=n;d<=a;d++){l|=t._show[d]=="?"&&t._periods[d]>0;p[d]=t._show[d]=="?"&&!l?null:t._show[d];c+=p[d]?1:0;h-=t._periods[d]>0?1:0}var v=[false,false,false,false,false,false,false];for(var d=a;d>=n;d--){if(t._show[d]){if(t._periods[d]){v[d]=true}else{v[d]=h>0;h--}}}var m=t.options.compact?t.options.compactLabels:t.options.labels;var g=t.options.whichLabels||this._normalLabels;var y=function(e){var n=t.options["compactLabels"+g(t._periods[e])];return p[e]?f._translateDigits(t,t._periods[e])+(n?n[e]:m[e])+" ":""};var b=t.options.padZeroes?2:1;var w=function(e){var n=t.options["labels"+g(t._periods[e])];if(!N&&p[e]||N&&v[e]){var r="";if(t._periods[e].toString().length==1){r='<span class="countdown_amount">'+0+"</span>"+'<span class="countdown_amount">'+t._periods[e]+"</span>"}else{for(var i=0;i<t._periods[e].toString().length;i++){r+='<span class="countdown_amount">'+t._periods[e].toString().charAt(i)+"</span>"}}return'<span class="countdown_section">'+r+'<span class="countdown_txt">'+(n?n[e]:m[e])+"</span></span>"}else{return""}};var E=t.options.ujic_style;var x=t.options.layout;var T=t.options.compact;var N=t.options.significant;var C=t.options.description;if(E=="classic"){return x?this._buildLayout(t,p,x,T,N,v):(T?'<span class="countdown_row countdown_amount'+(t._hold?" countdown_holding":"")+'">'+y(n)+y(r)+y(i)+y(s)+(p[o]?this._minDigits(t._periods[o],2):"")+(p[u]?(p[o]?timeSeparator:"")+this._minDigits(t._periods[u],2):"")+(p[a]?(p[o]||p[u]?timeSeparator:"")+this._minDigits(t._periods[a],2):""):'<span class="countdown_row countdown_show'+(N||c)+(t._hold?" countdown_holding":"")+'">'+w(n)+w(r)+w(i)+w(s)+w(o)+w(u)+(w(a)?'<span class="uji_sec">'+w(a)+"</span>":""))+"</span>"+(C?'<span class="countdown_row countdown_descr">'+C+"</span>":"")}},_buildLayout:function(t,f,l,c,h,p){var d=t.options[c?"compactLabels":"labels"];var v=t.options.whichLabels||this._normalLabels;var m=function(e){return(t.options[(c?"compactLabels":"labels")+v(t._periods[e])]||d)[e]};var g=function(e,n){return t.options.digits[Math.floor(e/n)%10]};var y={desc:t.options.description,sep:t.options.timeSeparator,yl:m(n),yn:this._minDigits(t,t._periods[n],1),ynn:this._minDigits(t,t._periods[n],2),ynnn:this._minDigits(t,t._periods[n],3),y1:g(t._periods[n],1),y10:g(t._periods[n],10),y100:g(t._periods[n],100),y1000:g(t._periods[n],1e3),ol:m(r),on:this._minDigits(t,t._periods[r],1),onn:this._minDigits(t,t._periods[r],2),onnn:this._minDigits(t,t._periods[r],3),o1:g(t._periods[r],1),o10:g(t._periods[r],10),o100:g(t._periods[r],100),o1000:g(t._periods[r],1e3),wl:m(i),wn:this._minDigits(t,t._periods[i],1),wnn:this._minDigits(t,t._periods[i],2),wnnn:this._minDigits(t,t._periods[i],3),w1:g(t._periods[i],1),w10:g(t._periods[i],10),w100:g(t._periods[i],100),w1000:g(t._periods[i],1e3),dl:m(s),dn:this._minDigits(t,t._periods[s],1),dnn:this._minDigits(t,t._periods[s],2),dnnn:this._minDigits(t,t._periods[s],3),d1:g(t._periods[s],1),d10:g(t._periods[s],10),d100:g(t._periods[s],100),d1000:g(t._periods[s],1e3),hl:m(o),hn:this._minDigits(t,t._periods[o],1),hnn:this._minDigits(t,t._periods[o],2),hnnn:this._minDigits(t,t._periods[o],3),h1:g(t._periods[o],1),h10:g(t._periods[o],10),h100:g(t._periods[o],100),h1000:g(t._periods[o],1e3),ml:m(u),mn:this._minDigits(t,t._periods[u],1),mnn:this._minDigits(t,t._periods[u],2),mnnn:this._minDigits(t,t._periods[u],3),m1:g(t._periods[u],1),m10:g(t._periods[u],10),m100:g(t._periods[u],100),m1000:g(t._periods[u],1e3),sl:m(a),sn:this._minDigits(t,t._periods[a],1),snn:this._minDigits(t,t._periods[a],2),snnn:this._minDigits(t,t._periods[a],3),s1:g(t._periods[a],1),s10:g(t._periods[a],10),s100:g(t._periods[a],100),s1000:g(t._periods[a],1e3)};var b=l;for(var w=n;w<=a;w++){var E="yowdhms".charAt(w);var x=new RegExp("\\{"+E+"<\\}([\\s\\S]*)\\{"+E+">\\}","g");b=b.replace(x,!h&&f[w]||h&&p[w]?"$1":"")}e.each(y,function(e,t){var n=new RegExp("\\{"+e+"\\}","g");b=b.replace(n,t)});return b},_minDigits:function(e,t,n){t=""+t;if(t.length>=n){return this._translateDigits(e,t)}t="0000000000"+t;return this._translateDigits(e,t.substr(t.length-n))},_translateDigits:function(e,t){return(""+t).replace(/[0-9]/g,function(t){return e.options.digits[t]})},_determineShow:function(e){var t=e.options.format;var f=[];f[n]=t.match("y")?"?":t.match("Y")?"!":null;f[r]=t.match("o")?"?":t.match("O")?"!":null;f[i]=t.match("w")?"?":t.match("W")?"!":null;f[s]=t.match("d")?"?":t.match("D")?"!":null;f[o]=t.match("h")?"?":t.match("H")?"!":null;f[u]=t.match("m")?"?":t.match("M")?"!":null;f[a]=t.match("s")?"?":t.match("S")?"!":null;return f},_calculatePeriods:function(e,t,f,l){e._now=l;e._now.setMilliseconds(0);var c=new Date(e._now.getTime());if(e._since){if(l.getTime()<e._since.getTime()){e._now=l=c}else{l=e._since}}else{c.setTime(e._until.getTime());if(l.getTime()>e._until.getTime()){e._now=l=c}}var h=[0,0,0,0,0,0,0];if(t[n]||t[r]){var p=this._getDaysInMonth(l.getFullYear(),l.getMonth());var d=this._getDaysInMonth(c.getFullYear(),c.getMonth());var v=c.getDate()==l.getDate()||c.getDate()>=Math.min(p,d)&&l.getDate()>=Math.min(p,d);var m=function(e){return(e.getHours()*60+e.getMinutes())*60+e.getSeconds()};var g=Math.max(0,(c.getFullYear()-l.getFullYear())*12+c.getMonth()-l.getMonth()+(c.getDate()<l.getDate()&&!v||v&&m(c)<m(l)?-1:0));h[n]=t[n]?Math.floor(g/12):0;h[r]=t[r]?g-h[n]*12:0;l=new Date(l.getTime());var y=l.getDate()==p;var b=this._getDaysInMonth(l.getFullYear()+h[n],l.getMonth()+h[r]);if(l.getDate()>b){l.setDate(b)}l.setFullYear(l.getFullYear()+h[n]);l.setMonth(l.getMonth()+h[r]);if(y){l.setDate(b)}}var w=Math.floor((c.getTime()-l.getTime())/1e3);var E=function(e,n){h[e]=t[e]?Math.floor(w/n):0;w-=h[e]*n};E(i,604800);E(s,86400);E(o,3600);E(u,60);E(a,1);if(w>0&&!e._since){var x=[1,12,4.3482,7,24,60,60];var T=a;var N=1;for(var C=a;C>=n;C--){if(t[C]){if(h[T]>=N){h[T]=0;w=1}if(w>0){h[C]++;w=0;T=C;N=1}}N*=x[C]}}if(f){for(var C=n;C<=a;C++){if(f&&h[C]){f--}else if(!f){h[C]=0}}}return h}})})(jQuery)
 
 
 
 
 
 
1
+ (function(){var e,t;jQuery.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}};e=jQuery.uaMatch(navigator.userAgent);t={};if(e.browser){t[e.browser]=true;t.version=e.version}if(t.chrome){t.webkit=true}else if(t.webkit){t.safari=true}jQuery.browser=t})();(function(){var e=false;window.JQClass=function(){};JQClass.classes={};JQClass.extend=function t(n){function o(){if(!e&&this._init){this._init.apply(this,arguments)}}var r=this.prototype;e=true;var i=new this;e=false;for(var s in n){i[s]=typeof n[s]=="function"&&typeof r[s]=="function"?function(e,t){return function(){var n=this._super;this._super=function(t){return r[e].apply(this,t)};var i=t.apply(this,arguments);this._super=n;return i}}(s,n[s]):n[s]}o.prototype=i;o.prototype.constructor=o;o.extend=t;return o}})();(function($){function camelCase(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})}JQClass.classes.JQPlugin=JQClass.extend({name:"plugin",defaultOptions:{},regionalOptions:{},_getters:[],_getMarker:function(){return"is-"+this.name},_init:function(){$.extend(this.defaultOptions,this.regionalOptions&&this.regionalOptions[""]||{});var e=camelCase(this.name);$[e]=this;$.fn[e]=function(t){var n=Array.prototype.slice.call(arguments,1);if($[e]._isNotChained(t,n)){return $[e][t].apply($[e],[this[0]].concat(n))}return this.each(function(){if(typeof t==="string"){if(t[0]==="_"||!$[e][t]){throw"Unknown method: "+t}$[e][t].apply($[e],[this].concat(n))}else{$[e]._attach(this,t)}})}},setDefaults:function(e){$.extend(this.defaultOptions,e||{})},_isNotChained:function(e,t){if(e==="option"&&(t.length===0||t.length===1&&typeof t[0]==="string")){return true}return $.inArray(e,this._getters)>-1},_attach:function(e,t){e=$(e);if(e.hasClass(this._getMarker())){return}e.addClass(this._getMarker());t=$.extend({},this.defaultOptions,this._getMetadata(e),t||{});var n=$.extend({name:this.name,elem:e,options:t},this._instSettings(e,t));e.data(this.name,n);this._postAttach(e,n);this.option(e,t)},_instSettings:function(e,t){return{}},_postAttach:function(e,t){},_getMetadata:function(elem){try{var data=elem.data(this.name.toLowerCase())||"";data=data.replace(/'/g,'"');data=data.replace(/([a-zA-Z0-9]+):/g,function(e,t,n){var r=data.substring(0,n).match(/"/g);return!r||r.length%2===0?'"'+t+'":':t+":"});data=$.parseJSON("{"+data+"}");for(var name in data){var value=data[name];if(typeof value==="string"&&value.match(/^new Date\((.*)\)$/)){data[name]=eval(value)}}return data}catch(e){return{}}},_getInst:function(e){return $(e).data(this.name)||{}},option:function(e,t,n){e=$(e);var r=e.data(this.name);if(!t||typeof t==="string"&&n==null){var i=(r||{}).options;return i&&t?i[t]:i}if(!e.hasClass(this._getMarker())){return}var i=t||{};if(typeof t==="string"){i={};i[t]=n}this._optionsChanged(e,r,i);$.extend(r.options,i)},_optionsChanged:function(e,t,n){},destroy:function(e){e=$(e);if(!e.hasClass(this._getMarker())){return}this._preDestroy(e,this._getInst(e));e.removeData(this.name).removeClass(this._getMarker())},_preDestroy:function(e,t){}});$.JQPlugin={createPlugin:function(e,t){if(typeof e==="object"){t=e;e="JQPlugin"}e=camelCase(e);var n=camelCase(t.name);JQClass.classes[n]=JQClass.classes[e].extend(t);new JQClass.classes[n]}}})(jQuery);(function(e){var t="countdown";var n=0;var r=1;var i=2;var s=3;var o=4;var u=5;var a=6;e.JQPlugin.createPlugin({name:t,defaultOptions:{ujic_style:"classic",text_size:"35",animate_sec:false,color_down:"#3A3A3A",color_up:"#635b63",color_txt:"#ffffff",color_sw:"#000000",color_lab:"#000000",lab_sz:"13",ujic_txt:true,ujic_url:false,ujic_goof:"'Open Sans Condensed',sans-serif",ujic_hide:false,until:null,since:null,timezone:null,serverSync:null,format:"dHMS",layout:"",compact:false,padZeroes:true,significant:0,description:"",expiryUrl:"",expiryText:"",alwaysExpire:false,onExpiry:null,onTick:null,tickInterval:1},regionalOptions:{"":{labels:["Years","Months","Weeks","Days","Hours","Minutes","Seconds"],labels1:["Year","Month","Week","Day","Hour","Minute","Second"],compactLabels:["y","m","w","d"],whichLabels:null,digits:["0","1","2","3","4","5","6","7","8","9"],timeSeparator:":",isRTL:false}},_getters:["getTimes"],_rtlClass:t+"-rtl",_sectionClass:t+"-section",_amountClass:t+"-amount",_periodClass:t+"-period",_rowClass:t+"-row",_holdingClass:t+"-holding",_showClass:t+"-show",_descrClass:t+"-descr",_timerElems:[],_init:function(){function i(e){var u=e<1e12?r?performance.now()+performance.timing.navigationStart:n():e||n();if(u-o>=1e3){t._updateElems();o=u}s(i)}var t=this;this._super();this._serverSyncs=[];var n=typeof Date.now=="function"?Date.now:function(){return(new Date).getTime()};var r=window.performance&&typeof window.performance.now=="function";var s=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||null;var o=0;if(!s||e.noRequestAnimationFrame){e.noRequestAnimationFrame=null;setInterval(function(){t._updateElems()},980)}else{o=window.animationStartTime||window.webkitAnimationStartTime||window.mozAnimationStartTime||window.oAnimationStartTime||window.msAnimationStartTime||n();s(i)}},UTCDate:function(e,t,n,r,i,s,o,u){if(typeof t=="object"&&t.constructor==Date){u=t.getMilliseconds();o=t.getSeconds();s=t.getMinutes();i=t.getHours();r=t.getDate();n=t.getMonth();t=t.getFullYear()}var a=new Date;a.setUTCFullYear(t);a.setUTCDate(1);a.setUTCMonth(n||0);a.setUTCDate(r||1);a.setUTCHours(i||0);a.setUTCMinutes((s||0)-(Math.abs(e)<30?e*60:e));a.setUTCSeconds(o||0);a.setUTCMilliseconds(u||0);return a},periodsToSeconds:function(e){return e[0]*31557600+e[1]*2629800+e[2]*604800+e[3]*86400+e[4]*3600+e[5]*60+e[6]},_instSettings:function(e,t){return{_periods:[0,0,0,0,0,0,0]}},_addElem:function(e){if(!this._hasElem(e)){this._timerElems.push(e)}},_hasElem:function(t){return e.inArray(t,this._timerElems)>-1},_removeElem:function(t){this._timerElems=e.map(this._timerElems,function(e){return e==t?null:e})},_updateElems:function(){for(var e=this._timerElems.length-1;e>=0;e--){this._updateCountdown(this._timerElems[e])}},_optionsChanged:function(t,n,r){if(r.layout){r.layout=r.layout.replace(/&lt;/g,"<").replace(/&gt;/g,">")}this._resetExtraLabels(n.options,r);var i=n.options.timezone!=r.timezone;e.extend(n.options,r);this._adjustSettings(t,n,r.until!=null||r.since!=null||i);var s=new Date;if(n._since&&n._since<s||n._until&&n._until>s){this._addElem(t[0])}this._updateCountdown(t,n)},_updateCountdown:function(t,n){t=t.jquery?t:e(t);n=n||t.data(this.name);if(!n){return}t.html(this._generateHTML(n)).toggleClass(this._rtlClass,n.options.isRTL);var r=n.options.ujic_style;if(r=="classic"){var i=n.options.color_down;var s=n.options.color_up;var o=n.options.ujic_goof;var u=navigator.userAgent.toLowerCase();jQuery.browser.chrome=/chrome/.test(navigator.userAgent.toLowerCase());
2
+ jQuery("#ujiCountdown"+" .countdown_amount").css("background","-moz-linear-gradient(top, "+s+" 50%, "+i+" 50%)");
3
+ jQuery("#ujiCountdown"+" .countdown_amount").css("background","-o-linear-gradient(top, "+s+" 50%,"+i+" 50%)");
4
+ jQuery("#ujiCountdown"+" .countdown_amount").css("background","-ms-linear-gradient(top, "+s+" 50%,"+i+" 50%)");
5
+ jQuery("#ujiCountdown"+" .countdown_amount").css("background","linear-gradient(to bottom, "+s+" 50%,"+i+" 50%)");
6
+ jQuery("#ujiCountdown"+" .countdown_amount").css("filter","progid:DXImageTransform.Microsoft.gradient( startColorstr='"+s+"', endColorstr='"+i+"',GradientType=0 )");
7
+ if(jQuery.browser.safari||jQuery.browser.chrome){jQuery("#ujiCountdown"+" .countdown_amount").css("background","-webkit-gradient(linear, left top, left bottom, color-stop(50%,"+s+"), color-stop(50%,"+i+"))");jQuery("#ujiCountdown"+" .countdown_amount").css("background","-webkit-linear-gradient(top, "+s+" 50%,"+i+" 50%)")}jQuery("#ujiCountdown").children(".countdown_row").children("span:last-child").css("margin","0");if(jQuery("#ujiCountdown").children(".countdown_row").children("span:last-child").hasClass("uji_sec")){jQuery("#ujiCountdown").children(".countdown_row").children(".uji_sec").children(".countdown_section").css("margin","0")}var a=n.options.color_txt;var f=n.options.color_sw;jQuery("#ujiCountdown"+" .countdown_amount").css("color",a);jQuery("#ujiCountdown"+" .countdown_amount").css("text-shadow","1px 1px 1px "+f);var l=n.options.color_lab;jQuery("#ujiCountdown"+" .countdown_txt").css("color",l);var c=n.options.ujic_txt;var h=n.options.lab_sz;if(c){jQuery("#ujiCountdown"+" .countdown_txt").css("display","block");jQuery("#ujiCountdown"+" .countdown_txt").css("font",h+"px 'Open Sans Condensed',sans-serif")}else{jQuery("#ujiCountdown"+" .countdown_txt").css("display","none")}var p=n.options.text_size;var d=0;switch(parseInt(p)){case 10:d=5;break;case 11:d=3;break;case 12:d=3;break;case 13:d=1;break}jQuery("#ujiCountdown"+" .countdown_amount").css("font",p+"px/1.5 '"+o+"',sans-serif");if(o!="none")jQuery("#ujiCountdown"+" .countdown_amount").css("min-width",parseInt(p)-10+"px");if(p<15){jQuery("#ujiCountdown"+" .countdown_amount").css({padding:"2px 5px","margin-right":"1px"});jQuery("#ujiCountdown"+" .countdown_section").css("margin","0px 6px 0px 0px");jQuery("#ujiCountdown"+" .countdown_txt").css("font","9px 'Open Sans Condensed',sans-serif")}var v=n.options.animate_sec;if(v){jQuery("#ujiCountdown").find(".uji_sec").find(".countdown_amount").css({"text-align":"center"});jQuery("#ujiCountdown").find(".uji_sec").find(".countdown_amount").eq(1).css({top:"-74px",position:"relative",opacity:1});jQuery("#ujiCountdown").find(".uji_sec").find(".countdown_amount").eq(1).animate({top:d+"px",opacity:1},700,function(){jQuery("#ujiCountdown").find(".uji_sec").find(".countdown_amount").eq(1).animate({opacity:0},300)})}}if(e.isFunction(n.options.onTick)){var m=n._hold!="lap"?n._periods:this._calculatePeriods(n,n._show,n.options.significant,new Date);if(n.options.tickInterval==1||this.periodsToSeconds(m)%n.options.tickInterval==0){n.options.onTick.apply(t[0],[m])}}var g=n._hold!="pause"&&(n._since?n._now.getTime()<n._since.getTime():n._now.getTime()>=n._until.getTime());if(g&&!n._expiring){n._expiring=true;if(this._hasElem(t[0])||n.options.alwaysExpire){this._removeElem(t[0]);if(e.isFunction(n.options.onExpiry)){n.options.onExpiry.apply(t[0],[])}if(n.options.ujic_hide=="true"){jQuery("#ujiCountdown").remove()}if(n.options.expiryText){var y=n.options.layout;n.options.layout=n.options.expiryText;this._updateCountdown(t[0],n);n.options.layout=y}if(n.options.expiryUrl){window.location=n.options.expiryUrl}}n._expiring=false}else if(n._hold=="pause"){this._removeElem(t[0])}},_resetExtraLabels:function(e,t){var n=false;for(var r in t){if(r!="whichLabels"&&r.match(/[Ll]abels/)){n=true;break}}if(n){for(var r in e){if(r.match(/[Ll]abels[02-9]|compactLabels1/)){e[r]=null}}}},_adjustSettings:function(t,n,r){var i;var s=0;var o=null;for(var u=0;u<this._serverSyncs.length;u++){if(this._serverSyncs[u][0]==n.options.serverSync){o=this._serverSyncs[u][1];break}}if(o!=null){s=n.options.serverSync?o:0;i=new Date}else{var a=e.isFunction(n.options.serverSync)?n.options.serverSync.apply(t[0],[]):null;i=new Date;s=a?i.getTime()-a.getTime():0;this._serverSyncs.push([n.options.serverSync,s])}var f=n.options.timezone;f=f==null?-i.getTimezoneOffset():f;if(r||!r&&n._until==null&&n._since==null){n._since=n.options.since;if(n._since!=null){n._since=this.UTCDate(f,this._determineTime(n._since,null));if(n._since&&s){n._since.setMilliseconds(n._since.getMilliseconds()+s)}}n._until=this.UTCDate(f,this._determineTime(n.options.until,i));if(s){n._until.setMilliseconds(n._until.getMilliseconds()+s)}}n._show=this._determineShow(n)},_preDestroy:function(e,t){this._removeElem(e[0]);e.empty()},pause:function(e){this._hold(e,"pause")},lap:function(e){this._hold(e,"lap")},resume:function(e){this._hold(e,null)},toggle:function(t){var n=e.data(t,this.name)||{};this[!n._hold?"pause":"resume"](t)},toggleLap:function(t){var n=e.data(t,this.name)||{};this[!n._hold?"lap":"resume"](t)},_hold:function(t,n){var r=e.data(t,this.name);if(r){if(r._hold=="pause"&&!n){r._periods=r._savePeriods;var i=r._since?"-":"+";r[r._since?"_since":"_until"]=this._determineTime(i+r._periods[0]+"y"+i+r._periods[1]+"o"+i+r._periods[2]+"w"+i+r._periods[3]+"d"+i+r._periods[4]+"h"+i+r._periods[5]+"m"+i+r._periods[6]+"s");this._addElem(t)}r._hold=n;r._savePeriods=n=="pause"?r._periods:null;e.data(t,this.name,r);this._updateCountdown(t,r)}},getTimes:function(t){var n=e.data(t,this.name);return!n?null:n._hold=="pause"?n._savePeriods:!n._hold?n._periods:this._calculatePeriods(n,n._show,n.options.significant,new Date)},_determineTime:function(e,t){var n=this;var r=function(e){var t=new Date;t.setTime(t.getTime()+e*1e3);return t};var i=function(e){e=e.toLowerCase();var t=new Date;var r=t.getFullYear();var i=t.getMonth();var s=t.getDate();var o=t.getHours();var u=t.getMinutes();var a=t.getSeconds();var f=/([+-]?[0-9]+)\s*(s|m|h|d|w|o|y)?/g;var l=f.exec(e);while(l){switch(l[2]||"s"){case"s":a+=parseInt(l[1],10);break;case"m":u+=parseInt(l[1],10);break;case"h":o+=parseInt(l[1],10);break;case"d":s+=parseInt(l[1],10);break;case"w":s+=parseInt(l[1],10)*7;break;case"o":i+=parseInt(l[1],10);s=Math.min(s,n._getDaysInMonth(r,i));break;case"y":r+=parseInt(l[1],10);s=Math.min(s,n._getDaysInMonth(r,i));break}l=f.exec(e)}return new Date(r,i,s,o,u,a,0)};var s=e==null?t:typeof e=="string"?i(e):typeof e=="number"?r(e):e;if(s)s.setMilliseconds(0);return s},_getDaysInMonth:function(e,t){return 32-(new Date(e,t,32)).getDate()},_normalLabels:function(e){return e},_generateHTML:function(t){var f=this;t._periods=t._hold?t._periods:this._calculatePeriods(t,t._show,t.options.significant,new Date);var l=false;var c=0;var h=t.options.significant;var p=e.extend({},t._show);for(var d=n;d<=a;d++){l|=t._show[d]=="?"&&t._periods[d]>0;p[d]=t._show[d]=="?"&&!l?null:t._show[d];c+=p[d]?1:0;h-=t._periods[d]>0?1:0}var v=[false,false,false,false,false,false,false];for(var d=a;d>=n;d--){if(t._show[d]){if(t._periods[d]){v[d]=true}else{v[d]=h>0;h--}}}var m=t.options.compact?t.options.compactLabels:t.options.labels;var g=t.options.whichLabels||this._normalLabels;var y=function(e){var n=t.options["compactLabels"+g(t._periods[e])];return p[e]?f._translateDigits(t,t._periods[e])+(n?n[e]:m[e])+" ":""};var b=t.options.padZeroes?2:1;var w=function(e){var n=t.options["labels"+g(t._periods[e])];if(!N&&p[e]||N&&v[e]){var r="";if(t._periods[e].toString().length==1){r='<span class="countdown_amount">'+0+"</span>"+'<span class="countdown_amount">'+t._periods[e]+"</span>"}else{for(var i=0;i<t._periods[e].toString().length;i++){r+='<span class="countdown_amount">'+t._periods[e].toString().charAt(i)+"</span>"}}return'<span class="countdown_section">'+r+'<span class="countdown_txt">'+(n?n[e]:m[e])+"</span></span>"}else{return""}};var E=t.options.ujic_style;var x=t.options.layout;var T=t.options.compact;var N=t.options.significant;var C=t.options.description;if(E=="classic"){return x?this._buildLayout(t,p,x,T,N,v):(T?'<span class="countdown_row countdown_amount'+(t._hold?" countdown_holding":"")+'">'+y(n)+y(r)+y(i)+y(s)+(p[o]?this._minDigits(t._periods[o],2):"")+(p[u]?(p[o]?timeSeparator:"")+this._minDigits(t._periods[u],2):"")+(p[a]?(p[o]||p[u]?timeSeparator:"")+this._minDigits(t._periods[a],2):""):'<span class="countdown_row countdown_show'+(N||c)+(t._hold?" countdown_holding":"")+'">'+w(n)+w(r)+w(i)+w(s)+w(o)+w(u)+(w(a)?'<span class="uji_sec">'+w(a)+"</span>":""))+"</span>"+(C?'<span class="countdown_row countdown_descr">'+C+"</span>":"")}},_buildLayout:function(t,f,l,c,h,p){var d=t.options[c?"compactLabels":"labels"];var v=t.options.whichLabels||this._normalLabels;var m=function(e){return(t.options[(c?"compactLabels":"labels")+v(t._periods[e])]||d)[e]};var g=function(e,n){return t.options.digits[Math.floor(e/n)%10]};var y={desc:t.options.description,sep:t.options.timeSeparator,yl:m(n),yn:this._minDigits(t,t._periods[n],1),ynn:this._minDigits(t,t._periods[n],2),ynnn:this._minDigits(t,t._periods[n],3),y1:g(t._periods[n],1),y10:g(t._periods[n],10),y100:g(t._periods[n],100),y1000:g(t._periods[n],1e3),ol:m(r),on:this._minDigits(t,t._periods[r],1),onn:this._minDigits(t,t._periods[r],2),onnn:this._minDigits(t,t._periods[r],3),o1:g(t._periods[r],1),o10:g(t._periods[r],10),o100:g(t._periods[r],100),o1000:g(t._periods[r],1e3),wl:m(i),wn:this._minDigits(t,t._periods[i],1),wnn:this._minDigits(t,t._periods[i],2),wnnn:this._minDigits(t,t._periods[i],3),w1:g(t._periods[i],1),w10:g(t._periods[i],10),w100:g(t._periods[i],100),w1000:g(t._periods[i],1e3),dl:m(s),dn:this._minDigits(t,t._periods[s],1),dnn:this._minDigits(t,t._periods[s],2),dnnn:this._minDigits(t,t._periods[s],3),d1:g(t._periods[s],1),d10:g(t._periods[s],10),d100:g(t._periods[s],100),d1000:g(t._periods[s],1e3),hl:m(o),hn:this._minDigits(t,t._periods[o],1),hnn:this._minDigits(t,t._periods[o],2),hnnn:this._minDigits(t,t._periods[o],3),h1:g(t._periods[o],1),h10:g(t._periods[o],10),h100:g(t._periods[o],100),h1000:g(t._periods[o],1e3),ml:m(u),mn:this._minDigits(t,t._periods[u],1),mnn:this._minDigits(t,t._periods[u],2),mnnn:this._minDigits(t,t._periods[u],3),m1:g(t._periods[u],1),m10:g(t._periods[u],10),m100:g(t._periods[u],100),m1000:g(t._periods[u],1e3),sl:m(a),sn:this._minDigits(t,t._periods[a],1),snn:this._minDigits(t,t._periods[a],2),snnn:this._minDigits(t,t._periods[a],3),s1:g(t._periods[a],1),s10:g(t._periods[a],10),s100:g(t._periods[a],100),s1000:g(t._periods[a],1e3)};var b=l;for(var w=n;w<=a;w++){var E="yowdhms".charAt(w);var x=new RegExp("\\{"+E+"<\\}([\\s\\S]*)\\{"+E+">\\}","g");b=b.replace(x,!h&&f[w]||h&&p[w]?"$1":"")}e.each(y,function(e,t){var n=new RegExp("\\{"+e+"\\}","g");b=b.replace(n,t)});return b},_minDigits:function(e,t,n){t=""+t;if(t.length>=n){return this._translateDigits(e,t)}t="0000000000"+t;return this._translateDigits(e,t.substr(t.length-n))},_translateDigits:function(e,t){return(""+t).replace(/[0-9]/g,function(t){return e.options.digits[t]})},_determineShow:function(e){var t=e.options.format;var f=[];f[n]=t.match("y")?"?":t.match("Y")?"!":null;f[r]=t.match("o")?"?":t.match("O")?"!":null;f[i]=t.match("w")?"?":t.match("W")?"!":null;f[s]=t.match("d")?"?":t.match("D")?"!":null;f[o]=t.match("h")?"?":t.match("H")?"!":null;f[u]=t.match("m")?"?":t.match("M")?"!":null;f[a]=t.match("s")?"?":t.match("S")?"!":null;return f},_calculatePeriods:function(e,t,f,l){e._now=l;e._now.setMilliseconds(0);var c=new Date(e._now.getTime());if(e._since){if(l.getTime()<e._since.getTime()){e._now=l=c}else{l=e._since}}else{c.setTime(e._until.getTime());if(l.getTime()>e._until.getTime()){e._now=l=c}}var h=[0,0,0,0,0,0,0];if(t[n]||t[r]){var p=this._getDaysInMonth(l.getFullYear(),l.getMonth());var d=this._getDaysInMonth(c.getFullYear(),c.getMonth());var v=c.getDate()==l.getDate()||c.getDate()>=Math.min(p,d)&&l.getDate()>=Math.min(p,d);var m=function(e){return(e.getHours()*60+e.getMinutes())*60+e.getSeconds()};var g=Math.max(0,(c.getFullYear()-l.getFullYear())*12+c.getMonth()-l.getMonth()+(c.getDate()<l.getDate()&&!v||v&&m(c)<m(l)?-1:0));h[n]=t[n]?Math.floor(g/12):0;h[r]=t[r]?g-h[n]*12:0;l=new Date(l.getTime());var y=l.getDate()==p;var b=this._getDaysInMonth(l.getFullYear()+h[n],l.getMonth()+h[r]);if(l.getDate()>b){l.setDate(b)}l.setFullYear(l.getFullYear()+h[n]);l.setMonth(l.getMonth()+h[r]);if(y){l.setDate(b)}}var w=Math.floor((c.getTime()-l.getTime())/1e3);var E=function(e,n){h[e]=t[e]?Math.floor(w/n):0;w-=h[e]*n};E(i,604800);E(s,86400);E(o,3600);E(u,60);E(a,1);if(w>0&&!e._since){var x=[1,12,4.3482,7,24,60,60];var T=a;var N=1;for(var C=a;C>=n;C--){if(t[C]){if(h[T]>=N){h[T]=0;w=1}if(w>0){h[C]++;w=0;T=C;N=1}}N*=x[C]}}if(f){for(var C=n;C<=a;C++){if(f&&h[C]){f--}else if(!f){h[C]=0}}}return h}})})(jQuery)
js/uji-newsletter.js ADDED
@@ -0,0 +1 @@
 
1
+ jQuery(document).ready(function(e){"use strict";function t(e,t){var n=parseInt(e.slice(1),16),r=Math.round(2.55*t),i=(n>>16)+r,s=(n>>8&255)+r,o=(n&255)+r;return"#"+(16777216+(i<255?i<1?0:i:255)*65536+(s<255?s<1?0:s:255)*256+(o<255?o<1?0:o:255)).toString(16).slice(1)}e(".ujic-hold form input[type=text]").focus(function(){e(".ujic-hold form .uji-msg-ok").css("display","none");e(".ujic-hold form .uji-msg-err").css("display","none")});e(".ujic-hold form").submit(function(t){t.preventDefault();e.ajax({type:"POST",url:ujiCount.ajaxUrl,data:e(this).serialize()+"&"+e.param({action:"ujiSubscribe"}),dataType:"json",success:function(t){t.success?e(".ujic-hold form .uji-msg-ok").css("display","block"):e(".ujic-hold form .uji-msg-err").css("display","block")}})});e(".ujic-hold form input[type=submit]").each(function(){var n=e(this);var r=n.attr("color-attr");if(typeof r==="undefined")return;n.css("background","-moz-linear-gradient(top, "+r+" 0%, "+t(r,20)+" 100%)");n.css("background","-webkit-gradient(linear, left top, left bottom, color-stop(0%,"+r+"), color-stop(100%,"+t(r,20)+"))");n.css("background","-webkit-linear-gradient(top, "+r+" 50%,"+t(r,20)+" 100%)");n.css("background","-o-linear-gradient(top, "+r+" 0%,"+t(r,20)+" 100%)");n.css("background","-ms-linear-gradient(top, "+r+" 0%,"+t(r,20)+" 100%)");n.css("background","linear-gradient(to bottom, "+r+" 0%,"+t(r,20)+" 100%)");n.css("filter","progid:DXImageTransform.Microsoft.gradient( startColorstr='"+r+"', endColorstr='"+t(r,20)+"',GradientType=0 )")});})
lang/uji-countdown-fr_FR.po CHANGED
@@ -1,71 +1,71 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: uji-countdown\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2012-01-20 11:55+0200\n"
6
- "PO-Revision-Date: 2013-09-29 17:54+0100\n"
7
- "Last-Translator: lamessen <nico@lamessen.fr>\n"
8
- "Language-Team: ujimoto <raul.ujog@gmail.com>\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-KeywordsList: _e\n"
13
- "X-Poedit-SourceCharset: utf-8\n"
14
- "Language: en_RO\n"
15
- "X-Generator: Poedit 1.5.4\n"
16
-
17
- #: uji-countdown-front.php:105 uji-countdown-set.php:18
18
- msgid "Years"
19
- msgstr "Années"
20
-
21
- #: uji-countdown-front.php:105
22
- msgid "Months"
23
- msgstr "Mois"
24
-
25
- #: uji-countdown-front.php:105
26
- msgid "Weeks"
27
- msgstr "Semaines"
28
-
29
- #: uji-countdown-front.php:105
30
- msgid "Days"
31
- msgstr "Jours"
32
-
33
- #: uji-countdown-front.php:105
34
- msgid "Hours"
35
- msgstr "Heures"
36
-
37
- #: uji-countdown-front.php:105
38
- msgid "Minutes"
39
- msgstr "Minutes"
40
-
41
- #: uji-countdown-front.php:105
42
- msgid "Seconds"
43
- msgstr "Secondes"
44
-
45
- #: uji-countdown-front.php:106
46
- msgid "Year"
47
- msgstr "Année"
48
-
49
- #: uji-countdown-front.php:106
50
- msgid "Month"
51
- msgstr "Mois"
52
-
53
- #: uji-countdown-front.php:106
54
- msgid "Week"
55
- msgstr "Semaine"
56
-
57
- #: uji-countdown-front.php:106
58
- msgid "Day"
59
- msgstr "Jour"
60
-
61
- #: uji-countdown-front.php:106
62
- msgid "Hour"
63
- msgstr "Heure"
64
-
65
- #: uji-countdown-front.php:106
66
- msgid "Minute"
67
- msgstr "Minute"
68
-
69
- #: uji-countdown-front.php:106
70
- msgid "Second"
71
- msgstr "Seconde"
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: uji-countdown\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2012-01-20 11:55+0200\n"
6
+ "PO-Revision-Date: 2013-09-29 17:54+0100\n"
7
+ "Last-Translator: lamessen <nico@lamessen.fr>\n"
8
+ "Language-Team: ujimoto <raul.ujog@gmail.com>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-KeywordsList: _e\n"
13
+ "X-Poedit-SourceCharset: utf-8\n"
14
+ "Language: en_RO\n"
15
+ "X-Generator: Poedit 1.5.4\n"
16
+
17
+ #: uji-countdown-front.php:105 uji-countdown-set.php:18
18
+ msgid "Years"
19
+ msgstr "Années"
20
+
21
+ #: uji-countdown-front.php:105
22
+ msgid "Months"
23
+ msgstr "Mois"
24
+
25
+ #: uji-countdown-front.php:105
26
+ msgid "Weeks"
27
+ msgstr "Semaines"
28
+
29
+ #: uji-countdown-front.php:105
30
+ msgid "Days"
31
+ msgstr "Jours"
32
+
33
+ #: uji-countdown-front.php:105
34
+ msgid "Hours"
35
+ msgstr "Heures"
36
+
37
+ #: uji-countdown-front.php:105
38
+ msgid "Minutes"
39
+ msgstr "Minutes"
40
+
41
+ #: uji-countdown-front.php:105
42
+ msgid "Seconds"
43
+ msgstr "Secondes"
44
+
45
+ #: uji-countdown-front.php:106
46
+ msgid "Year"
47
+ msgstr "Année"
48
+
49
+ #: uji-countdown-front.php:106
50
+ msgid "Month"
51
+ msgstr "Mois"
52
+
53
+ #: uji-countdown-front.php:106
54
+ msgid "Week"
55
+ msgstr "Semaine"
56
+
57
+ #: uji-countdown-front.php:106
58
+ msgid "Day"
59
+ msgstr "Jour"
60
+
61
+ #: uji-countdown-front.php:106
62
+ msgid "Hour"
63
+ msgstr "Heure"
64
+
65
+ #: uji-countdown-front.php:106
66
+ msgid "Minute"
67
+ msgstr "Minute"
68
+
69
+ #: uji-countdown-front.php:106
70
+ msgid "Second"
71
+ msgstr "Seconde"
ujicountdown.php CHANGED
@@ -1,43 +1,37 @@
1
- <?php
2
- /**
3
- * @package Uji Countdown
4
- * @author Wpmanage <info@wpmanage.com>
5
- * @license Free
6
- * @link http://wpmanage.com/uji-countdown
7
- * @copyright 2014 WPmanage.com
8
- *
9
- * @wordpress-plugin
10
- * Plugin Name: Uji Countdown
11
- * Plugin URI: http://wpmanage.com/uji-countdown
12
- * Description: HTML5 Countdown.
13
- * Version: 2.0.2
14
- * Author: Wpmanage
15
- * Author URI: http://wpmanage.com
16
- * Text Domain: uji-countdown
17
- * License: GPL-2.0+
18
- * Domain Path: /lang
19
- */
20
-
21
- // If this file is called directly, abort.
22
- if ( ! defined( 'WPINC' ) ) {
23
- die;
24
- }
25
- define( 'UJIC_NAME', 'Uji Countdown' );
26
- define( 'UJIC_VERS', '2.0' );
27
- define( 'UJIC_FOLD', 'uji-countdown' );
28
- define( 'UJICOUNTDOWN', trailingslashit( dirname(__FILE__) ) );
29
- define( 'UJICOUNTDOWN_URL', plugin_dir_url( __FILE__ ) );
30
- define( 'UJICOUNTDOWN_BASE', plugin_basename(__FILE__) );
31
- define( 'UJICOUNTDOWN_FILE', __FILE__ );
32
-
33
- //Google Fonts
34
- require_once( plugin_dir_path( __FILE__ ) . 'assets/googlefonts.php' );
35
-
36
- // Classes
37
- require_once( plugin_dir_path( __FILE__ ) . 'classes/class-uji-countdown-admin.php' );
38
- require_once( plugin_dir_path( __FILE__ ) . 'classes/class-uji-countdown.php' );
39
- require_once( plugin_dir_path( __FILE__ ) . 'classes/class-uji-countdown-front.php' );
40
- require_once( plugin_dir_path( __FILE__ ) . 'classes/class-uji-widget.php' );
41
-
42
- // INIT
43
  Uji_Countdown::get_instance();
1
+ <?php
2
+ /*
3
+ Plugin Name: Uji Countdown
4
+ Plugin URI: http://www.wpmanage.com/uji-countdown
5
+ Description: HTML5 Customizable Countdown.
6
+ Version: 2.0.3
7
+ Text Domain: uji-countdown
8
+ Domain Path: /lang
9
+ Author: Wpmanage.com
10
+ Author URI: http://wpmanage.com
11
+ Network: True
12
+ License: GPLv2
13
+ Copyright 2015 WPmanage (email : info@wpmanage.com)
14
+ */
15
+
16
+ // If this file is called directly, abort.
17
+ defined( 'WPINC' ) || exit;
18
+
19
+ define( 'UJIC_NAME', 'Uji Countdown' );
20
+ define( 'UJIC_VERS', '2.0.3' );
21
+ define( 'UJIC_FOLD', 'uji-countdown' );
22
+ define( 'UJICOUNTDOWN', trailingslashit( dirname(__FILE__) ) );
23
+ define( 'UJICOUNTDOWN_URL', plugin_dir_url( __FILE__ ) );
24
+ define( 'UJICOUNTDOWN_BASE', plugin_basename(__FILE__) );
25
+ define( 'UJICOUNTDOWN_FILE', __FILE__ );
26
+
27
+ //Google Fonts
28
+ require_once( plugin_dir_path( __FILE__ ) . 'assets/googlefonts.php' );
29
+
30
+ // Classes
31
+ require_once( plugin_dir_path( __FILE__ ) . 'classes/class-uji-countdown-admin.php' );
32
+ require_once( plugin_dir_path( __FILE__ ) . 'classes/class-uji-countdown.php' );
33
+ require_once( plugin_dir_path( __FILE__ ) . 'classes/class-uji-countdown-front.php' );
34
+ require_once( plugin_dir_path( __FILE__ ) . 'classes/class-uji-widget.php' );
35
+
36
+ // INIT
 
 
 
 
 
 
37
  Uji_Countdown::get_instance();
views/admin.php CHANGED
@@ -1,49 +1,61 @@
1
- <?php
2
- /**
3
- * Represents the view for the administration dashboard.
4
- *
5
- * This includes the header, options, and other information that should provide
6
- * The User Interface to the end user.
7
- *
8
- * @package goodByeCaptcha
9
- * @author Your Name <email@example.com>
10
- * @license GPL-2.0+
11
- * @link http://example.com
12
- * @copyright 2013 Your Name or Company Name
13
- */
14
- ?>
15
- <div class="wrap">
16
-
17
- <?php screen_icon(); ?>
18
- <h2<?php if ( floatval( get_bloginfo( 'version' ) ) >= 3.9 ) { echo ' class="ujc-admin-tit"'; } ?>><?php echo esc_html( get_admin_page_title() ); ?></h2>
19
-
20
- <?php
21
- $active_tab = isset($_GET['tab']) ? $_GET['tab'] : 'tab_ujic_list';
22
- if(isset($_GET['tab']))
23
- $active_tab = $_GET['tab'];
24
- ?>
25
-
26
- <h2 class="nav-tab-wrapper">
27
- <a href="?page=uji-countdown&amp;tab=tab_ujic_list" class="nav-tab <?php echo $active_tab == 'tab_ujic_list' ? 'nav-tab-active' : ''; ?>"><i class="dashicons dashicons-menu ujic-mico"></i><?php _e('My Countdowns', 'uji-countdown'); ?></a>
28
- <a href="?page=uji-countdown&amp;tab=tab_ujic_new" class="nav-tab <?php echo $active_tab == 'tab_ujic_new' ? 'nav-tab-active' : ''; ?>"><i class="dashicons dashicons-clock ujic-mico"></i><?php _e('Add/Edit Countdown', 'uji-countdown'); ?></a>
29
- <a href="?page=uji-countdown&amp;tab=tab_ujic_set" class="nav-tab <?php echo $active_tab == 'tab_ujic_set' ? 'nav-tab-active' : ''; ?>"><i class="dashicons dashicons-admin-tools ujic-mico"></i><?php _e('Settings', 'uji-countdown'); ?></a>
30
- <a href="http://wpmanage.com/uji-countdown" target="_blank" class="nav-tab nav-tab-pro"><i class="dashicons dashicons-plus ujic-mico"></i><?php _e('Upgrade to PRO', 'uji-countdown'); ?></a>
31
- </h2>
32
-
33
- <?php $ujicount = new Uji_Countdown(); ?>
34
-
35
- <?php
36
- if($active_tab == 'tab_ujic_list') {
37
- $ujicount -> admin_tablelist();
38
- }
39
-
40
- if($active_tab == 'tab_ujic_new') {
41
- $ujicount -> admin_countdown();
42
- }
43
-
44
- if($active_tab == 'tab_ujic_set') {
45
- $ujicount -> admin_timerset();
46
- }
47
- ?>
48
-
 
 
 
 
 
 
 
 
 
 
 
 
49
  </div>
1
+ <?php
2
+ /**
3
+ * Represents the view for the administration dashboard.
4
+ *
5
+ * This includes the header, options, and other information that should provide
6
+ * The User Interface to the end user.
7
+ */
8
+ ?>
9
+ <div class="wrap">
10
+
11
+ <?php screen_icon(); ?>
12
+ <h2<?php if ( floatval( get_bloginfo( 'version' ) ) >= 3.9 ) {
13
+ echo ' class="ujc-admin-tit"';
14
+ } ?>><?php echo esc_html( get_admin_page_title() ); ?></h2>
15
+
16
+ <?php
17
+ $active_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : 'tab_ujic_list';
18
+ !empty($_GET['_wp_http_referer']) && false !== strpos($_GET['_wp_http_referer'], 'tab_ujic_news') ? $active_tab = 'tab_ujic_news' : null;
19
+
20
+ $add_tab = __( 'Add new style', 'uji-countdown' );
21
+
22
+ if ( isset( $_GET['tab'] ) )
23
+ {
24
+ $active_tab = $_GET['tab'];
25
+ $add_tab = ( 'tab_ujic_new' == $_GET['tab'] && isset( $_GET['edit'] ) ) ? __( 'Edit style', 'uji-countdown' ) : $add_tab;
26
+ }
27
+ ?>
28
+
29
+ <h2 class="nav-tab-wrapper">
30
+ <a href="?page=uji-countdown&amp;tab=tab_ujic_list" class="nav-tab <?php echo $active_tab == 'tab_ujic_list' ? 'nav-tab-active' : ''; ?>"><i class="dashicons dashicons-menu ujic-mico"></i><?php _e( 'My Styles', 'uji-countdown' ); ?></a>
31
+ <a href="?page=uji-countdown&amp;tab=tab_ujic_new" class="nav-tab <?php echo $active_tab == 'tab_ujic_new' ? 'nav-tab-active' : ''; ?>"><i class="dashicons dashicons-clock ujic-mico"></i><?php echo $add_tab; ?></a>
32
+ <a href="?<?php echo str_replace(is_ssl() ? 'https://' : 'http://', '', esc_url('page=uji-countdown&amp;tab=tab_ujic_news'));?>" class="nav-tab <?php echo $active_tab == 'tab_ujic_news' ? 'nav-tab-active' : ''; ?>"><i class="dashicons dashicons-email ujic-mico"></i> <?php _e( 'Subscribers', 'uji-countdown' ); ?></a>
33
+ <a href="?page=uji-countdown&amp;tab=tab_ujic_set" class="nav-tab <?php echo $active_tab == 'tab_ujic_set' ? 'nav-tab-active' : ''; ?>"><i class="dashicons dashicons-admin-tools ujic-mico"></i><?php _e( 'Settings', 'uji-countdown' ); ?></a>
34
+ <a href="http://www.wpmanage.com/uji-countdown" target="_blank" class="nav-tab nav-tab-pro"><i class="dashicons dashicons-plus ujic-mico"></i><?php _e( 'Upgrade', 'uji-countdown' ); ?></a>
35
+ </h2>
36
+
37
+ <?php
38
+
39
+
40
+ $ujicount = new Uji_Countdown();
41
+
42
+ // print_r($_GET);exit;
43
+
44
+ if ( $active_tab == 'tab_ujic_list' ) {
45
+ $ujicount->admin_tablelist();
46
+ }
47
+
48
+ if ( $active_tab == 'tab_ujic_new' ) {
49
+ $ujicount->admin_countdown();
50
+ }
51
+
52
+ if ( $active_tab == 'tab_ujic_news' ) {
53
+ $ujicount->admin_subscribers();
54
+ }
55
+
56
+ if ( $active_tab == 'tab_ujic_set' ) {
57
+ $ujicount->admin_timerset();
58
+ }
59
+ ?>
60
+
61
  </div>