Easy Modal - Version 1.0.0

Version Description

  • Release v1.0.0 Is a was rebuilt from the ground up. Features Include:
  • Unlimited Modals
  • Lighter Filesizes for Faster Loading
  • Auto Centers no matter what the content
  • Recenters on window resize/move
Download this release

Release Info

Developer danieliser
Plugin Icon 128x128 Easy Modal
Version 1.0.0
Comparing to
See all releases

Code changes from version 0.9.0.11 to 1.0.0

ajax/content.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Easy Modal
4
+ * http://wizardinternetsolutions.com/project/easy-modal/
5
+ */
6
+ require( '../../../../wp-load.php' );
7
+ global $eModal;
8
+ $options = $eModal->getAdminOptions($_POST['modalId']);
9
+
10
+ ?>
11
+ <h1 class='eM-title'><?php echo $options['title'] ?></h1>
12
+ <?php echo do_shortcode($options['content']) ?>
content/content.php DELETED
@@ -1,13 +0,0 @@
1
- <?php
2
- /*
3
- * Easy Modal
4
- * http://wizardinternetsolutions.com/project/easy-modal/
5
- */
6
- require( '../../../../wp-load.php' );
7
- global $eM;
8
- $options = $eM->getAdminOptions();
9
- ?>
10
- <div class='eM-content'>
11
- <h1 class='eM-title'><?php echo $options['title'] ?></h1>
12
- <?php echo do_shortcode($options['content']) ?>
13
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
css/colorpicker.css DELETED
@@ -1,161 +0,0 @@
1
- .colorpicker {
2
- width: 356px;
3
- height: 176px;
4
- overflow: hidden;
5
- position: absolute;
6
- background: url(../images/admin/colorpicker/colorpicker_background.png);
7
- font-family: Arial, Helvetica, sans-serif;
8
- display: none;
9
- }
10
- .colorpicker_color {
11
- width: 150px;
12
- height: 150px;
13
- left: 14px;
14
- top: 13px;
15
- position: absolute;
16
- background: #f00;
17
- overflow: hidden;
18
- cursor: crosshair;
19
- }
20
- .colorpicker_color div {
21
- position: absolute;
22
- top: 0;
23
- left: 0;
24
- width: 150px;
25
- height: 150px;
26
- background: url(../images/admin/colorpicker/colorpicker_overlay.png);
27
- }
28
- .colorpicker_color div div {
29
- position: absolute;
30
- top: 0;
31
- left: 0;
32
- width: 11px;
33
- height: 11px;
34
- overflow: hidden;
35
- background: url(../images/admin/colorpicker/colorpicker_select.gif);
36
- margin: -5px 0 0 -5px;
37
- }
38
- .colorpicker_hue {
39
- position: absolute;
40
- top: 13px;
41
- left: 171px;
42
- width: 35px;
43
- height: 150px;
44
- cursor: n-resize;
45
- }
46
- .colorpicker_hue div {
47
- position: absolute;
48
- width: 35px;
49
- height: 9px;
50
- overflow: hidden;
51
- background: url(../images/admin/colorpicker/colorpicker_indic.gif) left top;
52
- margin: -4px 0 0 0;
53
- left: 0px;
54
- }
55
- .colorpicker_new_color {
56
- position: absolute;
57
- width: 60px;
58
- height: 30px;
59
- left: 213px;
60
- top: 13px;
61
- background: #f00;
62
- }
63
- .colorpicker_current_color {
64
- position: absolute;
65
- width: 60px;
66
- height: 30px;
67
- left: 283px;
68
- top: 13px;
69
- background: #f00;
70
- }
71
- .colorpicker input {
72
- background-color: transparent;
73
- border: 1px solid transparent;
74
- position: absolute;
75
- font-size: 10px;
76
- font-family: Arial, Helvetica, sans-serif;
77
- color: #898989;
78
- top: 4px;
79
- right: 11px;
80
- text-align: right;
81
- margin: 0;
82
- padding: 0;
83
- height: 11px;
84
- }
85
- .colorpicker_hex {
86
- position: absolute;
87
- width: 72px;
88
- height: 22px;
89
- background: url(../images/admin/colorpicker/colorpicker_hex.png) top;
90
- left: 212px;
91
- top: 142px;
92
- }
93
- .colorpicker_hex input {
94
- right: 6px;
95
- }
96
- .colorpicker_field {
97
- height: 22px;
98
- width: 62px;
99
- background-position: top;
100
- position: absolute;
101
- }
102
- .colorpicker_field span {
103
- position: absolute;
104
- width: 12px;
105
- height: 22px;
106
- overflow: hidden;
107
- top: 0;
108
- right: 0;
109
- cursor: n-resize;
110
- }
111
- .colorpicker_rgb_r {
112
- background-image: url(../images/admin/colorpicker/colorpicker_rgb_r.png);
113
- top: 52px;
114
- left: 212px;
115
- }
116
- .colorpicker_rgb_g {
117
- background-image: url(../images/admin/colorpicker/colorpicker_rgb_g.png);
118
- top: 82px;
119
- left: 212px;
120
- }
121
- .colorpicker_rgb_b {
122
- background-image: url(../images/admin/colorpicker/colorpicker_rgb_b.png);
123
- top: 112px;
124
- left: 212px;
125
- }
126
- .colorpicker_hsb_h {
127
- background-image: url(../images/admin/colorpicker/colorpicker_hsb_h.png);
128
- top: 52px;
129
- left: 282px;
130
- }
131
- .colorpicker_hsb_s {
132
- background-image: url(../images/admin/colorpicker/colorpicker_hsb_s.png);
133
- top: 82px;
134
- left: 282px;
135
- }
136
- .colorpicker_hsb_b {
137
- background-image: url(../images/admin/colorpicker/colorpicker_hsb_b.png);
138
- top: 112px;
139
- left: 282px;
140
- }
141
- .colorpicker_submit {
142
- position: absolute;
143
- width: 22px;
144
- height: 22px;
145
- background: url(../images/admin/colorpicker/colorpicker_submit.png) top;
146
- left: 322px;
147
- top: 142px;
148
- overflow: hidden;
149
- }
150
- .colorpicker_focus {
151
- background-position: center;
152
- }
153
- .colorpicker_hex.colorpicker_focus {
154
- background-position: bottom;
155
- }
156
- .colorpicker_submit.colorpicker_focus {
157
- background-position: bottom;
158
- }
159
- .colorpicker_slider {
160
- background-position: bottom;
161
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/easy-modal-admin.css CHANGED
@@ -2,13 +2,13 @@
2
  * Easy Modal
3
  * http://wizardinternetsolutions.com/project/easy-modal/
4
  */
5
- .full{width:100%;}
6
- .half{width:49%;float:left;}
7
- .half.last{float:right;}
8
- span.desc{font-weight:normal;font-size:.9em;margin-top:2px;display:block;}
9
- input[type=radio]{margin:0 5px;}
10
- input[type=radio]+h5{margin-right: 15px;}
11
- .submit{border:none; padding:0;margin:5px 0;display:block;clear:both;overflow:auto;}
12
- input[type=submit]{float:right;}
13
- h5{display:inline-block;margin:0;}
14
- h4{margin:10px 0 5px;}
2
  * Easy Modal
3
  * http://wizardinternetsolutions.com/project/easy-modal/
4
  */
5
+ .settings_page_easy-modal .full{width:100%;}
6
+ .settings_page_easy-modal .half{width:49%;float:left;}
7
+ .settings_page_easy-modal .half.last{float:right;}
8
+ .settings_page_easy-modal span.description{font-weight:normal;margin-top:2px;display:block;}
9
+ .settings_page_easy-modal input[type=radio]{margin:0 5px;}
10
+ .settings_page_easy-modal input[type=radio]+h5{margin-right: 15px;}
11
+ .settings_page_easy-modal .submit{border:none; padding:0;margin:5px 0;display:block;clear:both;overflow:auto;}
12
+ .settings_page_easy-modal input[type=submit]{float:right;}
13
+ .settings_page_easy-modal h5{display:inline-block;margin:0;}
14
+ .settings_page_easy-modal h4{margin:10px 0 5px;}
css/jquery-ui-1.8.14.custom.css ADDED
@@ -0,0 +1,307 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ .ui-helper-hidden { display: none; }
14
+ .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
15
+ .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
+ .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
17
+ .ui-helper-clearfix { display: inline-block; }
18
+ /* required comment for clearfix to work in Opera \*/
19
+ * html .ui-helper-clearfix { height:1%; }
20
+ .ui-helper-clearfix { display:block; }
21
+ /* end clearfix */
22
+ .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
+ .ui-state-disabled { cursor: default !important; }
28
+
29
+
30
+ /* Icons
31
+ ----------------------------------*/
32
+
33
+ /* states and images */
34
+ .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
35
+
36
+
37
+ /* Misc visuals
38
+ ----------------------------------*/
39
+
40
+ /* Overlays */
41
+ .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
42
+
43
+
44
+ /*
45
+ * jQuery UI CSS Framework 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/Theming/API
52
+ *
53
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
54
+ */
55
+
56
+
57
+ /* Component containers
58
+ ----------------------------------*/
59
+ .ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
60
+ .ui-widget .ui-widget { font-size: 1em; }
61
+ .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
62
+ .ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
63
+ .ui-widget-content a { color: #222222; }
64
+ .ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
65
+ .ui-widget-header a { color: #222222; }
66
+
67
+ /* Interaction states
68
+ ----------------------------------*/
69
+ .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
70
+ .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
71
+ .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
72
+ .ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; }
73
+ .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
74
+ .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
75
+ .ui-widget :active { outline: none; }
76
+
77
+ /* Interaction Cues
78
+ ----------------------------------*/
79
+ .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
80
+ .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
81
+ .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
82
+ .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
83
+ .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
84
+ .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
85
+ .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
86
+ .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
87
+
88
+ /* Icons
89
+ ----------------------------------*/
90
+
91
+ /* states and images */
92
+ .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
93
+ .ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
94
+ .ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
95
+ .ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); }
96
+ .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
97
+ .ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); }
98
+ .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
99
+ .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); }
100
+
101
+ /* positioning */
102
+ .ui-icon-carat-1-n { background-position: 0 0; }
103
+ .ui-icon-carat-1-ne { background-position: -16px 0; }
104
+ .ui-icon-carat-1-e { background-position: -32px 0; }
105
+ .ui-icon-carat-1-se { background-position: -48px 0; }
106
+ .ui-icon-carat-1-s { background-position: -64px 0; }
107
+ .ui-icon-carat-1-sw { background-position: -80px 0; }
108
+ .ui-icon-carat-1-w { background-position: -96px 0; }
109
+ .ui-icon-carat-1-nw { background-position: -112px 0; }
110
+ .ui-icon-carat-2-n-s { background-position: -128px 0; }
111
+ .ui-icon-carat-2-e-w { background-position: -144px 0; }
112
+ .ui-icon-triangle-1-n { background-position: 0 -16px; }
113
+ .ui-icon-triangle-1-ne { background-position: -16px -16px; }
114
+ .ui-icon-triangle-1-e { background-position: -32px -16px; }
115
+ .ui-icon-triangle-1-se { background-position: -48px -16px; }
116
+ .ui-icon-triangle-1-s { background-position: -64px -16px; }
117
+ .ui-icon-triangle-1-sw { background-position: -80px -16px; }
118
+ .ui-icon-triangle-1-w { background-position: -96px -16px; }
119
+ .ui-icon-triangle-1-nw { background-position: -112px -16px; }
120
+ .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
121
+ .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
122
+ .ui-icon-arrow-1-n { background-position: 0 -32px; }
123
+ .ui-icon-arrow-1-ne { background-position: -16px -32px; }
124
+ .ui-icon-arrow-1-e { background-position: -32px -32px; }
125
+ .ui-icon-arrow-1-se { background-position: -48px -32px; }
126
+ .ui-icon-arrow-1-s { background-position: -64px -32px; }
127
+ .ui-icon-arrow-1-sw { background-position: -80px -32px; }
128
+ .ui-icon-arrow-1-w { background-position: -96px -32px; }
129
+ .ui-icon-arrow-1-nw { background-position: -112px -32px; }
130
+ .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
131
+ .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
132
+ .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
133
+ .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
134
+ .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
135
+ .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
136
+ .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
137
+ .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
138
+ .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
139
+ .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
140
+ .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
141
+ .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
142
+ .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
143
+ .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
144
+ .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
145
+ .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
146
+ .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
147
+ .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
148
+ .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
149
+ .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
150
+ .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
151
+ .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
152
+ .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
153
+ .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
154
+ .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
155
+ .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
156
+ .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
157
+ .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
158
+ .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
159
+ .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
160
+ .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
161
+ .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
162
+ .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
163
+ .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
164
+ .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
165
+ .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
166
+ .ui-icon-arrow-4 { background-position: 0 -80px; }
167
+ .ui-icon-arrow-4-diag { background-position: -16px -80px; }
168
+ .ui-icon-extlink { background-position: -32px -80px; }
169
+ .ui-icon-newwin { background-position: -48px -80px; }
170
+ .ui-icon-refresh { background-position: -64px -80px; }
171
+ .ui-icon-shuffle { background-position: -80px -80px; }
172
+ .ui-icon-transfer-e-w { background-position: -96px -80px; }
173
+ .ui-icon-transferthick-e-w { background-position: -112px -80px; }
174
+ .ui-icon-folder-collapsed { background-position: 0 -96px; }
175
+ .ui-icon-folder-open { background-position: -16px -96px; }
176
+ .ui-icon-document { background-position: -32px -96px; }
177
+ .ui-icon-document-b { background-position: -48px -96px; }
178
+ .ui-icon-note { background-position: -64px -96px; }
179
+ .ui-icon-mail-closed { background-position: -80px -96px; }
180
+ .ui-icon-mail-open { background-position: -96px -96px; }
181
+ .ui-icon-suitcase { background-position: -112px -96px; }
182
+ .ui-icon-comment { background-position: -128px -96px; }
183
+ .ui-icon-person { background-position: -144px -96px; }
184
+ .ui-icon-print { background-position: -160px -96px; }
185
+ .ui-icon-trash { background-position: -176px -96px; }
186
+ .ui-icon-locked { background-position: -192px -96px; }
187
+ .ui-icon-unlocked { background-position: -208px -96px; }
188
+ .ui-icon-bookmark { background-position: -224px -96px; }
189
+ .ui-icon-tag { background-position: -240px -96px; }
190
+ .ui-icon-home { background-position: 0 -112px; }
191
+ .ui-icon-flag { background-position: -16px -112px; }
192
+ .ui-icon-calendar { background-position: -32px -112px; }
193
+ .ui-icon-cart { background-position: -48px -112px; }
194
+ .ui-icon-pencil { background-position: -64px -112px; }
195
+ .ui-icon-clock { background-position: -80px -112px; }
196
+ .ui-icon-disk { background-position: -96px -112px; }
197
+ .ui-icon-calculator { background-position: -112px -112px; }
198
+ .ui-icon-zoomin { background-position: -128px -112px; }
199
+ .ui-icon-zoomout { background-position: -144px -112px; }
200
+ .ui-icon-search { background-position: -160px -112px; }
201
+ .ui-icon-wrench { background-position: -176px -112px; }
202
+ .ui-icon-gear { background-position: -192px -112px; }
203
+ .ui-icon-heart { background-position: -208px -112px; }
204
+ .ui-icon-star { background-position: -224px -112px; }
205
+ .ui-icon-link { background-position: -240px -112px; }
206
+ .ui-icon-cancel { background-position: 0 -128px; }
207
+ .ui-icon-plus { background-position: -16px -128px; }
208
+ .ui-icon-plusthick { background-position: -32px -128px; }
209
+ .ui-icon-minus { background-position: -48px -128px; }
210
+ .ui-icon-minusthick { background-position: -64px -128px; }
211
+ .ui-icon-close { background-position: -80px -128px; }
212
+ .ui-icon-closethick { background-position: -96px -128px; }
213
+ .ui-icon-key { background-position: -112px -128px; }
214
+ .ui-icon-lightbulb { background-position: -128px -128px; }
215
+ .ui-icon-scissors { background-position: -144px -128px; }
216
+ .ui-icon-clipboard { background-position: -160px -128px; }
217
+ .ui-icon-copy { background-position: -176px -128px; }
218
+ .ui-icon-contact { background-position: -192px -128px; }
219
+ .ui-icon-image { background-position: -208px -128px; }
220
+ .ui-icon-video { background-position: -224px -128px; }
221
+ .ui-icon-script { background-position: -240px -128px; }
222
+ .ui-icon-alert { background-position: 0 -144px; }
223
+ .ui-icon-info { background-position: -16px -144px; }
224
+ .ui-icon-notice { background-position: -32px -144px; }
225
+ .ui-icon-help { background-position: -48px -144px; }
226
+ .ui-icon-check { background-position: -64px -144px; }
227
+ .ui-icon-bullet { background-position: -80px -144px; }
228
+ .ui-icon-radio-off { background-position: -96px -144px; }
229
+ .ui-icon-radio-on { background-position: -112px -144px; }
230
+ .ui-icon-pin-w { background-position: -128px -144px; }
231
+ .ui-icon-pin-s { background-position: -144px -144px; }
232
+ .ui-icon-play { background-position: 0 -160px; }
233
+ .ui-icon-pause { background-position: -16px -160px; }
234
+ .ui-icon-seek-next { background-position: -32px -160px; }
235
+ .ui-icon-seek-prev { background-position: -48px -160px; }
236
+ .ui-icon-seek-end { background-position: -64px -160px; }
237
+ .ui-icon-seek-start { background-position: -80px -160px; }
238
+ /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
239
+ .ui-icon-seek-first { background-position: -80px -160px; }
240
+ .ui-icon-stop { background-position: -96px -160px; }
241
+ .ui-icon-eject { background-position: -112px -160px; }
242
+ .ui-icon-volume-off { background-position: -128px -160px; }
243
+ .ui-icon-volume-on { background-position: -144px -160px; }
244
+ .ui-icon-power { background-position: 0 -176px; }
245
+ .ui-icon-signal-diag { background-position: -16px -176px; }
246
+ .ui-icon-signal { background-position: -32px -176px; }
247
+ .ui-icon-battery-0 { background-position: -48px -176px; }
248
+ .ui-icon-battery-1 { background-position: -64px -176px; }
249
+ .ui-icon-battery-2 { background-position: -80px -176px; }
250
+ .ui-icon-battery-3 { background-position: -96px -176px; }
251
+ .ui-icon-circle-plus { background-position: 0 -192px; }
252
+ .ui-icon-circle-minus { background-position: -16px -192px; }
253
+ .ui-icon-circle-close { background-position: -32px -192px; }
254
+ .ui-icon-circle-triangle-e { background-position: -48px -192px; }
255
+ .ui-icon-circle-triangle-s { background-position: -64px -192px; }
256
+ .ui-icon-circle-triangle-w { background-position: -80px -192px; }
257
+ .ui-icon-circle-triangle-n { background-position: -96px -192px; }
258
+ .ui-icon-circle-arrow-e { background-position: -112px -192px; }
259
+ .ui-icon-circle-arrow-s { background-position: -128px -192px; }
260
+ .ui-icon-circle-arrow-w { background-position: -144px -192px; }
261
+ .ui-icon-circle-arrow-n { background-position: -160px -192px; }
262
+ .ui-icon-circle-zoomin { background-position: -176px -192px; }
263
+ .ui-icon-circle-zoomout { background-position: -192px -192px; }
264
+ .ui-icon-circle-check { background-position: -208px -192px; }
265
+ .ui-icon-circlesmall-plus { background-position: 0 -208px; }
266
+ .ui-icon-circlesmall-minus { background-position: -16px -208px; }
267
+ .ui-icon-circlesmall-close { background-position: -32px -208px; }
268
+ .ui-icon-squaresmall-plus { background-position: -48px -208px; }
269
+ .ui-icon-squaresmall-minus { background-position: -64px -208px; }
270
+ .ui-icon-squaresmall-close { background-position: -80px -208px; }
271
+ .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
272
+ .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
273
+ .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
274
+ .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
275
+ .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
276
+ .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
277
+
278
+
279
+ /* Misc visuals
280
+ ----------------------------------*/
281
+
282
+ /* Corner radius */
283
+ .ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; }
284
+ .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; }
285
+ .ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
286
+ .ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
287
+
288
+ /* Overlays */
289
+ .ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
290
+ .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*
291
+ * jQuery UI Tabs 1.8.14
292
+ *
293
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
294
+ * Dual licensed under the MIT or GPL Version 2 licenses.
295
+ * http://jquery.org/license
296
+ *
297
+ * http://docs.jquery.com/UI/Tabs#theming
298
+ */
299
+ .ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
300
+ .ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
301
+ .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
302
+ .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
303
+ .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
304
+ .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
305
+ .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
306
+ .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
307
+ .ui-tabs .ui-tabs-hide { display: none !important; }
easy-modal.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Easy Modal
4
  Plugin URI: http://wizardinternetsolutions.com/plugins/easy-modal/
5
  Description: Easy Modal allows you to easily add just about any shortcodes or other content into a modal window. This includes forms such as CF7.
6
  Author: Wizard Internet Solutions
7
- Version: 0.9.0.11
8
  Author URI: http://wizardinternetsolutions.com
9
  */
10
  $pluginDIR = PLUGINDIR.'/'. dirname( plugin_basename(__FILE__));
@@ -13,8 +13,38 @@ if ( ! function_exists( 'get_plugin_data' ) )
13
  require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
14
  $plugininfo=get_plugin_data($pluginFILE);
15
  $cur_ver = $plugininfo['Version'];
 
 
16
  require_once('includes/easy-modal.class.php');
17
- $eM = new easy_modal;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  add_action('wp_print_styles', 'easy_modal_styles');
19
  add_action( 'admin_init', 'easy_modal_styles' );
20
  function easy_modal_styles()
@@ -24,37 +54,110 @@ function easy_modal_styles()
24
  wp_enqueue_style('easy-modal-theme', $em_plugin_url.'/themes/default/styles.css');
25
  } else {
26
  wp_enqueue_style('easy-modal-admin-style', $em_plugin_url.'/css/easy-modal-admin.css');
27
- wp_enqueue_style('jquery-colorpicker', $em_plugin_url.'/css/colorpicker.css');
28
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  }
 
 
30
  add_action('wp_print_scripts', 'easy_modal_scripts');
31
- add_action( 'admin_init', 'easy_modal_styles' );
32
  function easy_modal_scripts(){
33
- global $eM;
34
  $em_plugin_url = trailingslashit( get_bloginfo('wpurl') ).PLUGINDIR.'/'. dirname( plugin_basename(__FILE__) );
35
  if (!is_admin()) {
36
  wp_enqueue_script('jquery');
37
- wp_enqueue_script('jquery-form', array('jquery'));
38
- wp_enqueue_script('jquery-simplemodal', $em_plugin_url.'/js/jquery.simplemodal.js');
39
- //wp_enqueue_script('easy-modal-script', $em_plugin_url.'/js/easy-modal.js', array('jquery','jquery-simplemodal'));
40
- wp_enqueue_script('easy-modal-script', $em_plugin_url.'/js/easy-modal.js.php', array('jquery','jquery-simplemodal'));
 
 
41
  } else {
42
- wp_enqueue_script('jquery-colorpicker', $em_plugin_url.'/js/colorpicker.js', array('jquery'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  }
 
 
 
 
 
 
 
 
 
 
 
44
  }
 
 
 
 
 
 
45
  //Initialize the admin panel
46
  add_action('admin_menu', 'easy_modal_ap');
47
  if (!function_exists("easy_modal_ap")) {
48
  function easy_modal_ap() {
49
- global $eM;
50
- if (!isset($eM)) {
51
  return;
52
  }
53
  if (function_exists('add_options_page')) {
54
- add_options_page('Easy Modal', 'Easy Modal', 10, basename(__FILE__), array(&$eM, 'printAdminPage'));
55
  }
56
  }
57
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  // Display a Settings link on the main Plugins page
59
  add_filter( 'plugin_action_links', 'easy_modal_plugin_action_links', 10, 2 );
60
  function easy_modal_plugin_action_links( $links, $file ) {
@@ -65,6 +168,21 @@ function easy_modal_plugin_action_links( $links, $file ) {
65
  }
66
  return $links;
67
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  /* Initialize i18n Support
69
  add_action( 'init', 'easy_modal_i18n' );
70
  if(!function_exists(easy_modal_i18n)){
@@ -72,5 +190,14 @@ if(!function_exists(easy_modal_i18n)){
72
  load_plugin_textdomain( 'easy-modal', false, 'easy-modal/languages' );
73
  }
74
  } */
75
- register_activation_hook(__FILE__, array(&$eM, 'init'));
 
 
 
 
 
 
 
 
 
76
  ?>
4
  Plugin URI: http://wizardinternetsolutions.com/plugins/easy-modal/
5
  Description: Easy Modal allows you to easily add just about any shortcodes or other content into a modal window. This includes forms such as CF7.
6
  Author: Wizard Internet Solutions
7
+ Version: 1.0.0
8
  Author URI: http://wizardinternetsolutions.com
9
  */
10
  $pluginDIR = PLUGINDIR.'/'. dirname( plugin_basename(__FILE__));
13
  require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
14
  $plugininfo=get_plugin_data($pluginFILE);
15
  $cur_ver = $plugininfo['Version'];
16
+
17
+
18
  require_once('includes/easy-modal.class.php');
19
+ $eModal = new easy_modal;
20
+
21
+ add_action( 'wp_ajax_nopriv_eModal_Form', 'easy_modal_new_form' );
22
+ add_action( 'wp_ajax_eModal_Form', 'easy_modal_new_form' );
23
+ function easy_modal_new_form(){
24
+ global $eModal;
25
+ foreach ($_POST as $key => $value) {
26
+ $_POST[$key] = mysql_real_escape_string($value);
27
+ }
28
+ extract($_POST);
29
+ echo $eModal->display_emodal_option($modalId);
30
+ exit;
31
+ }
32
+ add_action( 'wp_ajax_nopriv_eModal_Delete_Modal', 'easy_modal_delete_modal' );
33
+ add_action( 'wp_ajax_eModal_Delete_Modal', 'easy_modal_delete_modal' );
34
+ function easy_modal_delete_modal(){
35
+ global $eModal;
36
+ foreach ($_POST as $key => $value) {
37
+ $_POST[$key] = mysql_real_escape_string($value);
38
+ }
39
+ extract($_POST);
40
+ if($eModal->deleteModal($modalId)) {
41
+ die('Deleted');
42
+ } else {
43
+ die('0');
44
+ }
45
+ exit;
46
+ }
47
+
48
  add_action('wp_print_styles', 'easy_modal_styles');
49
  add_action( 'admin_init', 'easy_modal_styles' );
50
  function easy_modal_styles()
54
  wp_enqueue_style('easy-modal-theme', $em_plugin_url.'/themes/default/styles.css');
55
  } else {
56
  wp_enqueue_style('easy-modal-admin-style', $em_plugin_url.'/css/easy-modal-admin.css');
57
+ //wp_enqueue_style('jquery-colorpicker', $em_plugin_url.'/css/colorpicker.css');
58
+ wp_enqueue_style('jquery-ui-theme', $em_plugin_url.'/css/jquery-ui-1.8.14.custom.css');
59
+ }
60
+ }
61
+
62
+
63
+
64
+
65
+
66
+ function js_localize($name, $vars) {
67
+ ?>
68
+ <script type='text/javascript'>
69
+ /* <![CDATA[ */
70
+ var <?php echo $name; ?> =
71
+ <?php
72
+ require_once(ABSPATH . '/wp-includes/class-json.php');
73
+ $wp_json = new Services_JSON();
74
+ echo stripslashes($wp_json->encodeUnsafe($vars));
75
+ ?>;
76
+ /* ]]> */
77
+ </script>
78
+ <?php
79
  }
80
+
81
+
82
  add_action('wp_print_scripts', 'easy_modal_scripts');
83
+ add_action( 'admin_init', 'easy_modal_scripts' );
84
  function easy_modal_scripts(){
85
+ global $eModal;
86
  $em_plugin_url = trailingslashit( get_bloginfo('wpurl') ).PLUGINDIR.'/'. dirname( plugin_basename(__FILE__) );
87
  if (!is_admin()) {
88
  wp_enqueue_script('jquery');
89
+ wp_enqueue_script('easy-modal-script', $em_plugin_url.'/js/easy-modal.js', array('jquery'));
90
+ $settings = $eModal->enqueue_settings();
91
+ $data = array( 'ajaxurl' => $em_plugin_url.'/ajax/content.php' , 'settings' => $settings );
92
+ js_localize('easymodal',$data);
93
+ //$settings = '{"1": { "triggerOpen": { "click": true }, "requestData": { "modalId": 1, "action": "easy_modal" } }, "2": { "triggerOpen": { "dblclick": true }, "requestData": { "modalId": 2, "action": "easy_modal" } } }';
94
+ //wp_localize_script( 'easy-modal-script', 'easymodal', $data );
95
  } else {
96
+ wp_enqueue_script(array('jquery','jquery-ui-core','jquery-ui-tabs'));
97
+ //wp_enqueue_script('jquery-colorpicker', $em_plugin_url.'/js/colorpicker.js', array('jquery'));
98
+ }
99
+ }
100
+
101
+
102
+
103
+
104
+ // if both logged in and not logged in users can send this AJAX request,
105
+ // add both of these actions, otherwise add only the appropriate one
106
+ //add_action( 'wp_ajax_nopriv_easy_modal', 'easy_modal_ajax' );
107
+ //add_action( 'wp_ajax_easy_modal', 'easy_modal_ajax' );
108
+
109
+ function easy_modal_ajax() {
110
+ // get the submitted parameters
111
+ foreach ($_POST as $key => $value) {
112
+ $_POST[$key] = mysql_real_escape_string($value);
113
  }
114
+ extract($_POST);
115
+
116
+ global $eModal, $post;
117
+ $settings = $eModal->getAdminOptions($modalId);?>
118
+
119
+ <h1 class='eM-title'><?php echo $settings['title'] ?></h1><?php
120
+ echo apply_filters('the_content',do_shortcode($settings['content']));
121
+
122
+ // IMPORTANT: don't forget to "exit"
123
+
124
+ exit;
125
  }
126
+
127
+
128
+
129
+
130
+
131
+
132
  //Initialize the admin panel
133
  add_action('admin_menu', 'easy_modal_ap');
134
  if (!function_exists("easy_modal_ap")) {
135
  function easy_modal_ap() {
136
+ global $eModal;
137
+ if (!isset($eModal)) {
138
  return;
139
  }
140
  if (function_exists('add_options_page')) {
141
+ add_options_page('Easy Modal', 'Easy Modal', 10, basename(__FILE__), array(&$eModal, 'printAdminPage'));
142
  }
143
  }
144
  }
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
  // Display a Settings link on the main Plugins page
162
  add_filter( 'plugin_action_links', 'easy_modal_plugin_action_links', 10, 2 );
163
  function easy_modal_plugin_action_links( $links, $file ) {
168
  }
169
  return $links;
170
  }
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
  /* Initialize i18n Support
187
  add_action( 'init', 'easy_modal_i18n' );
188
  if(!function_exists(easy_modal_i18n)){
190
  load_plugin_textdomain( 'easy-modal', false, 'easy-modal/languages' );
191
  }
192
  } */
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+ register_activation_hook(__FILE__, array(&$eModal, 'init'));
203
  ?>
images/admin/color_selector.png DELETED
Binary file
images/admin/colorpicker/colorpicker_background.png DELETED
Binary file
images/admin/colorpicker/colorpicker_hex.png DELETED
Binary file
images/admin/colorpicker/colorpicker_hsb_b.png DELETED
Binary file
images/admin/colorpicker/colorpicker_hsb_h.png DELETED
Binary file
images/admin/colorpicker/colorpicker_hsb_s.png DELETED
Binary file
images/admin/colorpicker/colorpicker_indic.gif DELETED
Binary file
images/admin/colorpicker/colorpicker_overlay.png DELETED
Binary file
images/admin/colorpicker/colorpicker_rgb_b.png DELETED
Binary file
images/admin/colorpicker/colorpicker_rgb_g.png DELETED
Binary file
images/admin/colorpicker/colorpicker_rgb_r.png DELETED
Binary file
images/admin/colorpicker/colorpicker_select.gif DELETED
Binary file
images/admin/colorpicker/colorpicker_submit.png DELETED
Binary file
includes/easy-modal.class.php CHANGED
@@ -4,222 +4,256 @@
4
  * http://wizardinternetsolutions.com/project/easy-modal/
5
  */
6
  global $wp, $cur_ver;
 
7
  if ( ! function_exists( 'get_plugin_data' ) )
 
8
  require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
 
9
  $plugininfo=get_plugin_data($pluginFILE);
 
10
  $cur_ver = $plugininfo['Version'];
 
11
  class easy_modal {
12
  var $adminOptionsName = "easy_modalOptions";
13
  //Returns an array of admin options
14
  function defaultAdminOptions(){
15
- $easy_modalAdminOptions = array(
16
  'title' => '',
17
  'content' => '',
18
- 'overlayId' => 'eM-overlay',
19
- 'overlayColor' => '#000000',
20
- 'opacity' => '50',
21
- 'overlayCss' => '',
22
- 'overlayClose' => true,
23
- 'containerId' => 'eM-container',
24
- 'autoPosition' => true,
25
- 'positionX' => '',
26
- 'positionY' => '',
27
- 'autoResize' => true,
28
- 'minHeight' => '370',
29
- 'maxHeight' => '370',
30
- 'minWidth' => '300',
31
- 'maxWidth' => '400',
32
- 'cf7form' => false,
33
  );
34
- return $easy_modalAdminOptions;
35
  }
36
- function getAdminOptions(){
37
- $easy_modalAdminOptions = $this->defaultAdminOptions();
38
- $eMOptions = get_option($this->adminOptionsName);
39
- if (!empty($eMOptions)) {
40
- foreach ($eMOptions as $key => $option)
41
- $easy_modalAdminOptions[$key] = $option;
 
42
  }
43
- update_option($this->adminOptionsName, $easy_modalAdminOptions);
44
- return $easy_modalAdminOptions;
45
  }
46
- function resetAdminOptions() {
47
- $easy_modalAdminOptions = $this->defaultAdminOptions();
48
- update_option($this->adminOptionsName, $easy_modalAdminOptions);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  }
50
  // Plugin Initialization
51
  function init() {
52
  global $cur_ver;
53
  // Erase Settings For versions older than 0.9.0.4
54
  if(!get_option('eM_version')) $overwrite = true;
 
55
  if($overwrite == true) $this->resetAdminOptions();
56
  update_option('eM_version', $cur_ver);
57
  $this->getAdminOptions($cur_ver);
58
  }
59
  //Prints out the admin page
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  function printAdminPage() {
61
- $eM_Options = $this->getAdminOptions();
62
  if (isset($_POST['update_eM_settings'])) {
63
- if (isset($_POST['eM_title'])) {
64
- $eM_Options['title'] = apply_filters('content_save_pre', $_POST['eM_title']);
65
- }
66
- if (isset($_POST['eM_content'])) {
67
- if(strstr($_POST['eM_content'],'[contact-form')!= NULL){ $eM_Options['cf7form'] = true; }
68
- else { $eM_Options['cf7form'] = false; }
69
- $eM_Options['content'] = $_POST['eM_content'];
70
  }
71
- // Validate Overlay Options
72
- if (isset($_POST['eM_overlayId'])) {
73
- $eM_Options['overlayId'] = $_POST['eM_overlayId'];
 
74
  }
75
- if (isset($_POST['eM_overlayColor'])) {
 
 
76
  //hex color is valid
77
- if(preg_match('/^#[a-f0-9]{6}$/i', $_POST['eM_overlayColor'])){
78
- $eM_Options['overlayColor'] = $_POST['eM_overlayColor'];
79
  }
80
  }
81
- if (isset($_POST['eM_opacity'])) {
82
- if ($_POST['eM_opacity']>=0 && $_POST['eM_opacity']<=100){
83
- $eM_Options['opacity'] = $_POST['eM_opacity'];
84
  }
85
  }
86
- if (isset($_POST['eM_overlayCss'])) {
87
- $eM_Options['overlayCss'] = $_POST['eM_overlayCss'];
88
  }
89
- if (isset($_POST['eM_overlayClose'])) {
90
- $eM_Options['overlayClose'] = $_POST['eM_overlayClose'];
91
- }
92
- // Validate Container Options
93
- if (isset($_POST['eM_containerId'])) {
94
- $eM_Options['containerId'] = $_POST['eM_containerId'];
95
- }
96
- if (isset($_POST['eM_autoResize'])) {
97
- $eM_Options['autoResize'] = $_POST['eM_autoResize'];
98
- }
99
- if (isset($_POST['eM_autoPosition'])) {
100
- $eM_Options['autoPosition'] = $_POST['eM_autoPosition'];
101
- }
102
- if (isset($_POST['eM_positionX'])) {
103
- $eM_Options['positionX'] = $_POST['eM_positionX'];
104
- }
105
- if (isset($_POST['eM_positionY'])) {
106
- $eM_Options['positionY'] = $_POST['eM_positionY'];
107
- }
108
- if (isset($_POST['eM_minHeight'])) {
109
- $eM_Options['minHeight'] = $_POST['eM_minHeight'];
110
- }
111
- if (isset($_POST['eM_maxHeight'])) {
112
- $eM_Options['maxHeight'] = $_POST['eM_maxHeight'];
113
- }
114
- if (isset($_POST['eM_minWidth'])) {
115
- $eM_Options['minWidth'] = $_POST['eM_minWidth'];
116
- }
117
- if (isset($_POST['eM_maxWidth'])) {
118
- $eM_Options['maxWidth'] = $_POST['eM_maxWidth'];
119
- }
120
- $eM_Options = stripslashes_deep($eM_Options);
121
- update_option($this->adminOptionsName, $eM_Options);?>
122
- <div class="updated"><strong><?php _e('Settings Updated','easy-modal')?>.</strong></div><?php
123
  } ?>
124
  <div id="poststuff" class="metabox-holder has-right-sidebar wrap">
125
- <div id="side-info-column" class="inner-sidebar">
 
126
  </div>
127
  <div id="post-body">
128
  <div id="post-body-content">
129
- <form method="post" action="<?php echo $_SERVER["REQUEST_URI"];?>">
130
- <h2><?php _e('Easy Modal','easy-modal')?></h2>
131
- <div class="postbox full">
132
- <h3><?php _e('Modal','easy-modal')?></h3>
133
- <div class="inside">
134
- <label for="eM_title"><h4><?php _e('Title','easy-modal')?><span class="desc"><?php _e('The title that appears in the modal window.','easy-modal')?></span></h4></label>
135
- <input type="text" id="eM_title" name="eM_title" value="<?php echo $eM_Options['title'];?>" />
136
- <label for="eM_content"><h4><?php _e('Content','easy-modal');?><span class="desc"><?php _e('Modal content. Can contain shortcodes.','easy-modal')?></span></h4></label>
137
- <textarea id="eM_content" name="eM_content" style="width: 100%; height: auto;"><?php echo $eM_Options['content']?></textarea>
138
- <div class="submit">
139
- <input type="submit" name="update_eM_settings" class="button-primary" value="<?php _e('Save Settings','easy-modal')?>" />
140
- </div>
141
- </div>
142
- </div>
143
- <div class="postbox half">
144
- <h3><?php _e('Container Options','easy-modal')?></h3>
145
- <div class="inside">
146
- <h4><label for="eM_containerId"><?php _e('Container Id','easy-modal')?><span class="desc"><?php _e('The CSS Id for the container.','easy-modal')?></span></label></h4>
147
- <input type="text" id="eM_containerId" name="eM_containerId" value="<?php echo $eM_Options['containerId']?>" />
148
- <h4><?php _e('Auto Position','easy-modal')?><span class="desc"><?php _e('Automatically position the container upon creation and on window resize?','easy-modal')?></span></h4>
149
- <input type="radio" id="eM_autoPosition1" name="eM_autoPosition" value="false" <?php echo $eM_Options['autoPosition'] == false ? 'checked="checked"' : '' ?> />
150
- <h5><label for="eM_autoPosition1"><?php _e('False','easy-modal')?></label></h5>
151
- <input type="radio" id="eM_autoPosition2" name="eM_autoPosition" value="true" <?php echo $eM_Options['autoPosition'] == true ? 'checked="checked"' : '' ?> />
152
- <h5><label for="eM_autoPosition2"><?php _e('True','easy-modal')?></span></label></h5>
153
- <h4><?php _e('Position','easy-modal')?><span class="desc"><?php _e('Position of container. Can be number of pixels (px) or percentage (%).','easy-modal')?></span></h4>
154
- <h5><label for="eM_positionX"><?php _e('Top','easy-modal')?>:</label></h5>
155
- <input type="text" id="eM_positionX" name="eM_positionX" value="<?php echo $eM_Options['positionX']?>" />
156
- <h5><label for="eM_positionY"><?php _e('Left','easy-modal')?>:</label></h5>
157
- <input type="text" id="eM_positionY" name="eM_positionY" value="<?php echo $eM_Options['positionY']?>" />
158
- <h4><?php _e('Auto Resize','easy-modal')?><span class="desc"><?php _e('Resize the container if it exceeds the browser window dimensions?','easy-modal')?></span></h4>
159
- <input type="radio" id="eM_autoResize1" name="eM_autoResize" value="false" <?php echo $eM_Options['autoResize'] == false ? 'checked="checked"' : '' ?> />
160
- <h5><label for="eM_autoResize1"><?php _e('False','easy-modal')?></label></h5>
161
- <input type="radio" id="eM_autoResize2" name="eM_autoResize" value="true" <?php echo $eM_Options['autoResize'] == true ? 'checked="checked"' : '' ?> />
162
- <h5><label for="eM_autoResize2"><?php _e('True','easy-modal')?></label></h5>
163
- <h4><?php _e('Height','easy-modal')?><span class="desc"><?php _e('The height for the container.','easy-modal')?></span></h4>
164
- <h5><label for="eM_minHeight"><?php _e('Min','easy-modal')?>:</label></h5>
165
- <input type="text" id="eM_minHeight" name="eM_minHeight" value="<?php echo $eM_Options['minHeight']?>" />
166
- <h5><label for="eM_maxHeight"><?php _e('Max','easy-modal')?>:</label></h5>
167
- <input type="text" id="eM_maxHeight" name="eM_maxHeight" value="<?php echo $eM_Options['maxHeight']?>" />
168
- <h4><?php _e('Width','easy-modal')?><span class="desc"><?php _e('The width of the container.','easy-modal')?></span></h4>
169
- <h5><label for="eM_minWidth"><?php _e('Min','easy-modal')?>:</label></h5>
170
- <input type="text" id="eM_minWidth" name="eM_minWidth" value="<?php echo $eM_Options['minWidth']?>" />
171
- <h5><label for="eM_maxWidth"><?php _e('Max','easy-modal')?>:</label></h5>
172
- <input type="text" id="eM_maxWidth" name="eM_maxWidth" value="<?php echo $eM_Options['maxWidth']?>" />
173
- <div class="submit">
174
- <input type="submit" name="update_eM_settings" class="button-primary" value="<?php _e('Save Settings','easy-modal')?>" />
175
- </div>
176
- </div>
177
- </div>
178
- <div class="postbox half last">
179
- <h3><?php _e('Overlay Options','easy-modal')?></h3>
180
- <div class="inside">
181
- <h4><label for="eM_overlayId"><?php _e('Overlay Id','easy-modal')?><span class="desc"><?php _e('Choose the CSS Id for the overlay.','easy-modal')?></span></label></h4>
182
- <input type="text" id="eM_overlayId" name="eM_overlayId" value="<?php echo $eM_Options['overlayId']?>" />
183
- <h4><label for="colorSelector"><?php _e('Overlay Color', 'easy-modal');?><span class="desc"><?php _e('Choose the overlay color.','easy-modal')?></span></label></h4>
184
- <input type="hidden" name="eM_overlayColor" value="<?php echo $eM_Options['overlayColor']?>" />
185
- <div id="colorSelector" style="height:28px;position:relative;width:28px;">
186
- <div style="background: url('<?php echo WP_PLUGIN_URL.'/' ?>easy-modal/images/admin/color_selector.png') no-repeat center center transparent;background-color:<?php echo $eM_Options['overlayColor']?>;height: 28px;width: 28px;"></div>
187
- </div>
188
- <script type="text/javascript">
189
- jQuery(document).ready(function() {
190
- jQuery('#colorSelector').ColorPicker({
191
- color: '<?php echo $eM_Options['overlayColor']?>',
192
- onShow: function (colpkr) {
193
- jQuery(colpkr).fadeIn(500);
194
- return false;
195
- },
196
- onHide: function (colpkr) {
197
- jQuery(colpkr).fadeOut(500);
198
- return false;
199
- },
200
- onChange: function (hsb, hex, rgb) {
201
- jQuery('#colorSelector div').css('backgroundColor', '#' + hex);
202
- jQuery('input[name=eM_overlayColor]').val('#' + hex);
203
- }
204
- });
205
- });
206
- </script>
207
- <h4><label for="eM_opacity"><?php _e('Opacity', 'easy-modal');?><span class="desc"><?php _e('The opacity value for the overlay, from 0 - 100.','easy-modal')?></span></label></h4>
208
- <input type="text" id="eM_opacity" name="eM_opacity" value="<?php echo $eM_Options['opacity']?>" />
209
- <h4><?php _e('Close on Click','easy-modal')?><span class="desc"><?php _e('Allow click on overlay to close the dialog?','easy-modal')?></span></h4>
210
- <input type="radio" id="eM_overlayClose1" name="eM_overlayClose" value="false" <?php echo $eM_Options['overlayClose'] == false ? 'checked="checked"' : '' ?> />
211
- <label for="eM_overlayClose1"><?php _e('False','easy-modal')?></label>
212
- <input type="radio" id="eM_overlayClose2" name="eM_overlayClose" value="true" <?php echo $eM_Options['overlayClose'] == true ? 'checked="checked"' : '' ?> />
213
- <label for="eM_overlayClose2"><?php _e('True','easy-modal')?></label>
214
- <div class="submit">
215
- <input type="submit" name="update_eM_settings" class="button-primary" value="<?php _e('Save Settings','easy-modal')?>" />
216
- </div>
217
- </div>
218
- </div>
219
- </form>
220
  </div>
221
- </div>
222
- </div><?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
223
  }//End function printAdminPage()
224
  }
225
  ?>
4
  * http://wizardinternetsolutions.com/project/easy-modal/
5
  */
6
  global $wp, $cur_ver;
7
+
8
  if ( ! function_exists( 'get_plugin_data' ) )
9
+
10
  require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
11
+
12
  $plugininfo=get_plugin_data($pluginFILE);
13
+
14
  $cur_ver = $plugininfo['Version'];
15
+
16
  class easy_modal {
17
  var $adminOptionsName = "easy_modalOptions";
18
  //Returns an array of admin options
19
  function defaultAdminOptions(){
20
+ $settings = array(
21
  'title' => '',
22
  'content' => '',
23
+ 'cf7form' => false
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  );
25
+ return $settings;
26
  }
27
+
28
+ function getModalList(){
29
+ $return = get_option($this->adminOptionsName);
30
+ if(is_array($return)){
31
+ return $return;
32
+ } else {
33
+ return unserialize($return);
34
  }
 
 
35
  }
36
+
37
+
38
+ function getAdminOptions($modalId){
39
+ $settings = $this->defaultAdminOptions();
40
+ $eMOptions = get_option($this->adminOptionsName.'_'.$modalId);
41
+ if (!is_array($eMOptions)) {
42
+ $eMOptions = unserialize($eMOptions);
43
+ }
44
+ foreach ($eMOptions as $key => $option)
45
+ $settings[$key] = $option;
46
+
47
+ update_option($this->adminOptionsName.'_'.$modalId, serialize($settings));
48
+
49
+ return $settings;
50
+
51
+ }
52
+ function deleteModal($modalId){
53
+ $modals = $this->getModalList();
54
+ foreach($modals as $key => $value){
55
+ if ($modalId == $value) unset($modals[$key]);
56
+ }
57
+ update_option($this->adminOptionsName, serialize($modals));
58
+ delete_option($this->adminOptionsName.'_'.$modalId);
59
+ return true;
60
+ }
61
+ function addNewModal($modalId){
62
+ $modals = $this->getModalList();
63
+ $modals = array_merge($modals,array($modalId));
64
+ update_option($this->adminOptionsName, serialize($modals));
65
+ $settings = $this->defaultAdminOptions();
66
+ update_option($this->adminOptionsName.'_'.$modalId, serialize($settings));
67
+ }
68
+
69
+ function enqueue_settings(){
70
+ $modals = $this->getModalList();
71
+ $settings = array();
72
+ foreach($modals as $key => $value){
73
+ $setting = $this->getAdminOptions($value);
74
+ $settings[$value] = array(
75
+ "requestData" => array(
76
+ "modalId" => $value,
77
+ "action" => "easy_modal"
78
+ ),
79
+ "cf7form" => $setting['cf7form']
80
+ );
81
+ }
82
+ return $settings;
83
+ }
84
+
85
+ function resetAdminOptions($modalId) {
86
+ update_option($this->adminOptionsName, serialize(array('1')));
87
+ update_option($this->adminOptionsName.'_'.$modalId, serialize($this->defaultAdminOptions()));
88
  }
89
  // Plugin Initialization
90
  function init() {
91
  global $cur_ver;
92
  // Erase Settings For versions older than 0.9.0.4
93
  if(!get_option('eM_version')) $overwrite = true;
94
+ if(version_compare(get_option('eM_version'),$cur_ver, '<')) $overwrite = true;
95
  if($overwrite == true) $this->resetAdminOptions();
96
  update_option('eM_version', $cur_ver);
97
  $this->getAdminOptions($cur_ver);
98
  }
99
  //Prints out the admin page
100
+ function display_emodal_option($modalId, $new = true){
101
+ if($new == true){
102
+ $settings = $this->defaultAdminOptions();
103
+ $this->addNewModal($modalId);
104
+ } else {
105
+ $settings = $this->getAdminOptions($modalId);
106
+ }
107
+
108
+ ob_start(); ?>
109
+
110
+ <form id="eModal-<?php echo $modalId ?>" method="post" action="options-general.php?page=easy-modal.php">
111
+
112
+
113
+ <div class="postbox full">
114
+
115
+ <h3><?php _e('Modal','easy-modal')?></h3>
116
+ <div class="inside">
117
+ <input type="hidden" name="modalId" value="<?php echo $modalId ?>" />
118
+ <div class="shortcode">
119
+ <label for="code_to_copy"><h4><?php _e('Code To Copy','easy-modal')?></h4><span class="description"><?php _e('Add these css classes to just about any html element.','easy-modal')?></span></label>
120
+ <input type="text" id="code_to_copy" value="eModal eModal-<?php echo $modalId?>" />
121
+ </div>
122
+ <label for="eM_title"><h4><?php _e('Title','easy-modal')?></h4><span class="description"><?php _e('The title that appears in the modal window.','easy-modal')?></span></label>
123
+ <input type="text" id="eM_title" name="eM_title" value="<?php echo $settings['title'];?>" />
124
+ <label for="eM_content"><h4><?php _e('Content','easy-modal');?></h4><span class="description"><?php _e('Modal content. Can contain shortcodes.','easy-modal')?></span></label>
125
+ <textarea id="eM_content" name="eM_content" style="width: 100%; height: auto;"><?php echo $settings['content']?></textarea>
126
+
127
+ <div class="submit">
128
+ <input type="submit" name="update_eM_settings" class="button-primary" value="<?php _e('Save Settings','easy-modal')?>" />
129
+ </div>
130
+
131
+ </div>
132
+
133
+ </div>
134
+
135
+ <a class="delete_modal"><?php _e('Delete This Modal','easy-modal')?></a>
136
+ </form>
137
+ <?php
138
+ $output = ob_get_contents();
139
+ ob_end_clean();
140
+ return $output;
141
+ }
142
+
143
  function printAdminPage() {
144
+
145
  if (isset($_POST['update_eM_settings'])) {
146
+
147
+ $_POST = stripslashes_deep($_POST);
148
+ extract($_POST);
149
+ $settings = $this->getAdminOptions($_POST['modalId']);
150
+ if (isset($eM_title)) {
151
+ $settings['title'] = apply_filters('content_save_pre', $eM_title);
 
152
  }
153
+ if (isset($eM_content)) {
154
+ if(strstr($eM_content,'[contact-form')!= NULL){ $settings['cf7form'] = true; }
155
+ else { $settings['cf7form'] = false; }
156
+ $settings['content'] = $eM_content;
157
  }
158
+
159
+
160
+ if (isset($eM_overlayColor)) {
161
  //hex color is valid
162
+ if(preg_match('/^#[a-f0-9]{6}$/i', $eM_overlayColor)){
163
+ $settings['overlayColor'] = $eM_overlayColor;
164
  }
165
  }
166
+ if (isset($eM_opacity)) {
167
+ if ($eM_opacity>= 0 && $eM_opacity<=100){
168
+ $settings['opacity'] = $eM_opacity;
169
  }
170
  }
171
+ if (isset($eM_overlayClose)) {
172
+ $settings['overlayClose'] = $eM_overlayClose;
173
  }
174
+ update_option($this->adminOptionsName.'_'.$modalId, serialize($settings));?>
175
+
176
+ <div class="updated"><strong><?php _e('Settings Updated','easy-modal')?>.</strong></div><?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
177
  } ?>
178
  <div id="poststuff" class="metabox-holder has-right-sidebar wrap">
179
+ <div id="side-info-column" class="inner-sidebar">
180
+ <a href="">Click to donate</a>
181
  </div>
182
  <div id="post-body">
183
  <div id="post-body-content">
184
+ <h2><?php _e('Easy Modal','easy-modal')?></h2>
185
+ <?php
186
+ $modals = $this->getModalList();
187
+ $count = 0;
188
+ foreach($modals as $key => $modal){
189
+ $tabs .= '<li><a href="#eModal-'.$modal.'">eModal-'.$modal.'</a></li>';
190
+ $panels .= $this->display_emodal_option($modal,false);
191
+ if(intval($modal) > $count) $count = intval($modal);
192
+ }
193
+ ?>
194
+ <button id="addModal">Add New Modal</button>
195
+ <input type="hidden" name="count" value="<?php echo $count; ?>" />
196
+ <div id="tabs" style="padding:10px;">
197
+ <ul>
198
+ <?php echo $tabs ?>
199
+ </ul>
200
+ <?php echo $panels ?>
201
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  </div>
203
+ </div>
204
+ </div>
205
+ <script>
206
+ (function($){
207
+ $(document).ready(function(){
208
+
209
+ var tabs = $("#tabs").tabs({
210
+ add: function(event, ui) {
211
+ tabs.tabs('select', '#' + ui.panel.id);
212
+ }
213
+ })
214
+ $('#addModal').click(function(){
215
+ var modalId = parseInt($('[name=count]').val())+1;
216
+ $('[name=count]').val(modalId);
217
+ tabs.tabs("add","#eModal-"+modalId,"eModal-"+modalId);
218
+ $("#eModal-"+modalId).load("<?php echo admin_url( 'admin-ajax.php')?>",{action:"eModal_Form",modalId:modalId},function(data){
219
+
220
+ $(this).find('.delete_modal').click(function(){
221
+ $(this).delModal();
222
+ });
223
+ $(this).find('.shortcode > input').click(function(){
224
+ $(this).focus().select();
225
+ });
226
+
227
+ });
228
+ });
229
+ $.fn.delModal = function(){
230
+ var modal = $(this).parent().attr('id').split('-');
231
+ var modalId = modal[1];
232
+ var del = confirm('Are you sure you want to delete eModal-'+ modalId);
233
+ if(del){
234
+ $("#eModal-"+modalId).load("<?php echo admin_url( 'admin-ajax.php')?>",{action:"eModal_Delete_Modal",modalId:modalId},function(data){
235
+ if(data == 'Deleted'){
236
+ tabs.tabs("remove","#eModal-"+modalId);
237
+ }
238
+ });
239
+ };
240
+ };
241
+
242
+ $('.delete_modal').each(function(){
243
+ $(this).click(function(){
244
+ $(this).delModal();
245
+ });
246
+ });
247
+ $('.shortcode > input').each(function(){
248
+ $(this).click(function(){
249
+ $(this).focus().select();
250
+ });
251
+ });
252
+
253
+ });
254
+ })(jQuery)
255
+ </script><?php
256
+
257
  }//End function printAdminPage()
258
  }
259
  ?>
js/colorpicker.js DELETED
@@ -1,484 +0,0 @@
1
- /**
2
- *
3
- * Color picker
4
- * Author: Stefan Petre www.eyecon.ro
5
- *
6
- * Dual licensed under the MIT and GPL licenses
7
- *
8
- */
9
- (function ($) {
10
- var ColorPicker = function () {
11
- var
12
- ids = {},
13
- inAction,
14
- charMin = 65,
15
- visible,
16
- tpl = '<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>',
17
- defaults = {
18
- eventName: 'click',
19
- onShow: function () {},
20
- onBeforeShow: function(){},
21
- onHide: function () {},
22
- onChange: function () {},
23
- onSubmit: function () {},
24
- color: 'ff0000',
25
- livePreview: true,
26
- flat: false
27
- },
28
- fillRGBFields = function (hsb, cal) {
29
- var rgb = HSBToRGB(hsb);
30
- $(cal).data('colorpicker').fields
31
- .eq(1).val(rgb.r).end()
32
- .eq(2).val(rgb.g).end()
33
- .eq(3).val(rgb.b).end();
34
- },
35
- fillHSBFields = function (hsb, cal) {
36
- $(cal).data('colorpicker').fields
37
- .eq(4).val(hsb.h).end()
38
- .eq(5).val(hsb.s).end()
39
- .eq(6).val(hsb.b).end();
40
- },
41
- fillHexFields = function (hsb, cal) {
42
- $(cal).data('colorpicker').fields
43
- .eq(0).val(HSBToHex(hsb)).end();
44
- },
45
- setSelector = function (hsb, cal) {
46
- $(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100}));
47
- $(cal).data('colorpicker').selectorIndic.css({
48
- left: parseInt(150 * hsb.s/100, 10),
49
- top: parseInt(150 * (100-hsb.b)/100, 10)
50
- });
51
- },
52
- setHue = function (hsb, cal) {
53
- $(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10));
54
- },
55
- setCurrentColor = function (hsb, cal) {
56
- $(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb));
57
- },
58
- setNewColor = function (hsb, cal) {
59
- $(cal).data('colorpicker').newColor.css('backgroundColor', '#' + HSBToHex(hsb));
60
- },
61
- keyDown = function (ev) {
62
- var pressedKey = ev.charCode || ev.keyCode || -1;
63
- if ((pressedKey > charMin && pressedKey <= 90) || pressedKey == 32) {
64
- return false;
65
- }
66
- var cal = $(this).parent().parent();
67
- if (cal.data('colorpicker').livePreview === true) {
68
- change.apply(this);
69
- }
70
- },
71
- change = function (ev) {
72
- var cal = $(this).parent().parent(), col;
73
- if (this.parentNode.className.indexOf('_hex') > 0) {
74
- cal.data('colorpicker').color = col = HexToHSB(fixHex(this.value));
75
- } else if (this.parentNode.className.indexOf('_hsb') > 0) {
76
- cal.data('colorpicker').color = col = fixHSB({
77
- h: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10),
78
- s: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10),
79
- b: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10)
80
- });
81
- } else {
82
- cal.data('colorpicker').color = col = RGBToHSB(fixRGB({
83
- r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10),
84
- g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10),
85
- b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10)
86
- }));
87
- }
88
- if (ev) {
89
- fillRGBFields(col, cal.get(0));
90
- fillHexFields(col, cal.get(0));
91
- fillHSBFields(col, cal.get(0));
92
- }
93
- setSelector(col, cal.get(0));
94
- setHue(col, cal.get(0));
95
- setNewColor(col, cal.get(0));
96
- cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]);
97
- },
98
- blur = function (ev) {
99
- var cal = $(this).parent().parent();
100
- cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus');
101
- },
102
- focus = function () {
103
- charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65;
104
- $(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus');
105
- $(this).parent().addClass('colorpicker_focus');
106
- },
107
- downIncrement = function (ev) {
108
- var field = $(this).parent().find('input').focus();
109
- var current = {
110
- el: $(this).parent().addClass('colorpicker_slider'),
111
- max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255),
112
- y: ev.pageY,
113
- field: field,
114
- val: parseInt(field.val(), 10),
115
- preview: $(this).parent().parent().data('colorpicker').livePreview
116
- };
117
- $(document).bind('mouseup', current, upIncrement);
118
- $(document).bind('mousemove', current, moveIncrement);
119
- },
120
- moveIncrement = function (ev) {
121
- ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10))));
122
- if (ev.data.preview) {
123
- change.apply(ev.data.field.get(0), [true]);
124
- }
125
- return false;
126
- },
127
- upIncrement = function (ev) {
128
- change.apply(ev.data.field.get(0), [true]);
129
- ev.data.el.removeClass('colorpicker_slider').find('input').focus();
130
- $(document).unbind('mouseup', upIncrement);
131
- $(document).unbind('mousemove', moveIncrement);
132
- return false;
133
- },
134
- downHue = function (ev) {
135
- var current = {
136
- cal: $(this).parent(),
137
- y: $(this).offset().top
138
- };
139
- current.preview = current.cal.data('colorpicker').livePreview;
140
- $(document).bind('mouseup', current, upHue);
141
- $(document).bind('mousemove', current, moveHue);
142
- },
143
- moveHue = function (ev) {
144
- change.apply(
145
- ev.data.cal.data('colorpicker')
146
- .fields
147
- .eq(4)
148
- .val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10))
149
- .get(0),
150
- [ev.data.preview]
151
- );
152
- return false;
153
- },
154
- upHue = function (ev) {
155
- fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
156
- fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
157
- $(document).unbind('mouseup', upHue);
158
- $(document).unbind('mousemove', moveHue);
159
- return false;
160
- },
161
- downSelector = function (ev) {
162
- var current = {
163
- cal: $(this).parent(),
164
- pos: $(this).offset()
165
- };
166
- current.preview = current.cal.data('colorpicker').livePreview;
167
- $(document).bind('mouseup', current, upSelector);
168
- $(document).bind('mousemove', current, moveSelector);
169
- },
170
- moveSelector = function (ev) {
171
- change.apply(
172
- ev.data.cal.data('colorpicker')
173
- .fields
174
- .eq(6)
175
- .val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10))
176
- .end()
177
- .eq(5)
178
- .val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10))
179
- .get(0),
180
- [ev.data.preview]
181
- );
182
- return false;
183
- },
184
- upSelector = function (ev) {
185
- fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
186
- fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
187
- $(document).unbind('mouseup', upSelector);
188
- $(document).unbind('mousemove', moveSelector);
189
- return false;
190
- },
191
- enterSubmit = function (ev) {
192
- $(this).addClass('colorpicker_focus');
193
- },
194
- leaveSubmit = function (ev) {
195
- $(this).removeClass('colorpicker_focus');
196
- },
197
- clickSubmit = function (ev) {
198
- var cal = $(this).parent();
199
- var col = cal.data('colorpicker').color;
200
- cal.data('colorpicker').origColor = col;
201
- setCurrentColor(col, cal.get(0));
202
- cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el);
203
- },
204
- show = function (ev) {
205
- var cal = $('#' + $(this).data('colorpickerId'));
206
- cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]);
207
- var pos = $(this).offset();
208
- var viewPort = getViewport();
209
- var top = pos.top + this.offsetHeight;
210
- var left = pos.left;
211
- if (top + 176 > viewPort.t + viewPort.h) {
212
- top -= this.offsetHeight + 176;
213
- }
214
- if (left + 356 > viewPort.l + viewPort.w) {
215
- left -= 356;
216
- }
217
- cal.css({left: left + 'px', top: top + 'px'});
218
- if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) {
219
- cal.show();
220
- }
221
- $(document).bind('mousedown', {cal: cal}, hide);
222
- return false;
223
- },
224
- hide = function (ev) {
225
- if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) {
226
- if (ev.data.cal.data('colorpicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) {
227
- ev.data.cal.hide();
228
- }
229
- $(document).unbind('mousedown', hide);
230
- }
231
- },
232
- isChildOf = function(parentEl, el, container) {
233
- if (parentEl == el) {
234
- return true;
235
- }
236
- if (parentEl.contains) {
237
- return parentEl.contains(el);
238
- }
239
- if ( parentEl.compareDocumentPosition ) {
240
- return !!(parentEl.compareDocumentPosition(el) & 16);
241
- }
242
- var prEl = el.parentNode;
243
- while(prEl && prEl != container) {
244
- if (prEl == parentEl)
245
- return true;
246
- prEl = prEl.parentNode;
247
- }
248
- return false;
249
- },
250
- getViewport = function () {
251
- var m = document.compatMode == 'CSS1Compat';
252
- return {
253
- l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft),
254
- t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop),
255
- w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth),
256
- h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight)
257
- };
258
- },
259
- fixHSB = function (hsb) {
260
- return {
261
- h: Math.min(360, Math.max(0, hsb.h)),
262
- s: Math.min(100, Math.max(0, hsb.s)),
263
- b: Math.min(100, Math.max(0, hsb.b))
264
- };
265
- },
266
- fixRGB = function (rgb) {
267
- return {
268
- r: Math.min(255, Math.max(0, rgb.r)),
269
- g: Math.min(255, Math.max(0, rgb.g)),
270
- b: Math.min(255, Math.max(0, rgb.b))
271
- };
272
- },
273
- fixHex = function (hex) {
274
- var len = 6 - hex.length;
275
- if (len > 0) {
276
- var o = [];
277
- for (var i=0; i<len; i++) {
278
- o.push('0');
279
- }
280
- o.push(hex);
281
- hex = o.join('');
282
- }
283
- return hex;
284
- },
285
- HexToRGB = function (hex) {
286
- var hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16);
287
- return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)};
288
- },
289
- HexToHSB = function (hex) {
290
- return RGBToHSB(HexToRGB(hex));
291
- },
292
- RGBToHSB = function (rgb) {
293
- var hsb = {
294
- h: 0,
295
- s: 0,
296
- b: 0
297
- };
298
- var min = Math.min(rgb.r, rgb.g, rgb.b);
299
- var max = Math.max(rgb.r, rgb.g, rgb.b);
300
- var delta = max - min;
301
- hsb.b = max;
302
- if (max != 0) {
303
-
304
- }
305
- hsb.s = max != 0 ? 255 * delta / max : 0;
306
- if (hsb.s != 0) {
307
- if (rgb.r == max) {
308
- hsb.h = (rgb.g - rgb.b) / delta;
309
- } else if (rgb.g == max) {
310
- hsb.h = 2 + (rgb.b - rgb.r) / delta;
311
- } else {
312
- hsb.h = 4 + (rgb.r - rgb.g) / delta;
313
- }
314
- } else {
315
- hsb.h = -1;
316
- }
317
- hsb.h *= 60;
318
- if (hsb.h < 0) {
319
- hsb.h += 360;
320
- }
321
- hsb.s *= 100/255;
322
- hsb.b *= 100/255;
323
- return hsb;
324
- },
325
- HSBToRGB = function (hsb) {
326
- var rgb = {};
327
- var h = Math.round(hsb.h);
328
- var s = Math.round(hsb.s*255/100);
329
- var v = Math.round(hsb.b*255/100);
330
- if(s == 0) {
331
- rgb.r = rgb.g = rgb.b = v;
332
- } else {
333
- var t1 = v;
334
- var t2 = (255-s)*v/255;
335
- var t3 = (t1-t2)*(h%60)/60;
336
- if(h==360) h = 0;
337
- if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3}
338
- else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3}
339
- else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3}
340
- else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3}
341
- else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3}
342
- else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3}
343
- else {rgb.r=0; rgb.g=0; rgb.b=0}
344
- }
345
- return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)};
346
- },
347
- RGBToHex = function (rgb) {
348
- var hex = [
349
- rgb.r.toString(16),
350
- rgb.g.toString(16),
351
- rgb.b.toString(16)
352
- ];
353
- $.each(hex, function (nr, val) {
354
- if (val.length == 1) {
355
- hex[nr] = '0' + val;
356
- }
357
- });
358
- return hex.join('');
359
- },
360
- HSBToHex = function (hsb) {
361
- return RGBToHex(HSBToRGB(hsb));
362
- },
363
- restoreOriginal = function () {
364
- var cal = $(this).parent();
365
- var col = cal.data('colorpicker').origColor;
366
- cal.data('colorpicker').color = col;
367
- fillRGBFields(col, cal.get(0));
368
- fillHexFields(col, cal.get(0));
369
- fillHSBFields(col, cal.get(0));
370
- setSelector(col, cal.get(0));
371
- setHue(col, cal.get(0));
372
- setNewColor(col, cal.get(0));
373
- };
374
- return {
375
- init: function (opt) {
376
- opt = $.extend({}, defaults, opt||{});
377
- if (typeof opt.color == 'string') {
378
- opt.color = HexToHSB(opt.color);
379
- } else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) {
380
- opt.color = RGBToHSB(opt.color);
381
- } else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) {
382
- opt.color = fixHSB(opt.color);
383
- } else {
384
- return this;
385
- }
386
- return this.each(function () {
387
- if (!$(this).data('colorpickerId')) {
388
- var options = $.extend({}, opt);
389
- options.origColor = opt.color;
390
- var id = 'collorpicker_' + parseInt(Math.random() * 1000);
391
- $(this).data('colorpickerId', id);
392
- var cal = $(tpl).attr('id', id);
393
- if (options.flat) {
394
- cal.appendTo(this).show();
395
- } else {
396
- cal.appendTo(document.body);
397
- }
398
- options.fields = cal
399
- .find('input')
400
- .bind('keyup', keyDown)
401
- .bind('change', change)
402
- .bind('blur', blur)
403
- .bind('focus', focus);
404
- cal
405
- .find('span').bind('mousedown', downIncrement).end()
406
- .find('>div.colorpicker_current_color').bind('click', restoreOriginal);
407
- options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector);
408
- options.selectorIndic = options.selector.find('div div');
409
- options.el = this;
410
- options.hue = cal.find('div.colorpicker_hue div');
411
- cal.find('div.colorpicker_hue').bind('mousedown', downHue);
412
- options.newColor = cal.find('div.colorpicker_new_color');
413
- options.currentColor = cal.find('div.colorpicker_current_color');
414
- cal.data('colorpicker', options);
415
- cal.find('div.colorpicker_submit')
416
- .bind('mouseenter', enterSubmit)
417
- .bind('mouseleave', leaveSubmit)
418
- .bind('click', clickSubmit);
419
- fillRGBFields(options.color, cal.get(0));
420
- fillHSBFields(options.color, cal.get(0));
421
- fillHexFields(options.color, cal.get(0));
422
- setHue(options.color, cal.get(0));
423
- setSelector(options.color, cal.get(0));
424
- setCurrentColor(options.color, cal.get(0));
425
- setNewColor(options.color, cal.get(0));
426
- if (options.flat) {
427
- cal.css({
428
- position: 'relative',
429
- display: 'block'
430
- });
431
- } else {
432
- $(this).bind(options.eventName, show);
433
- }
434
- }
435
- });
436
- },
437
- showPicker: function() {
438
- return this.each( function () {
439
- if ($(this).data('colorpickerId')) {
440
- show.apply(this);
441
- }
442
- });
443
- },
444
- hidePicker: function() {
445
- return this.each( function () {
446
- if ($(this).data('colorpickerId')) {
447
- $('#' + $(this).data('colorpickerId')).hide();
448
- }
449
- });
450
- },
451
- setColor: function(col) {
452
- if (typeof col == 'string') {
453
- col = HexToHSB(col);
454
- } else if (col.r != undefined && col.g != undefined && col.b != undefined) {
455
- col = RGBToHSB(col);
456
- } else if (col.h != undefined && col.s != undefined && col.b != undefined) {
457
- col = fixHSB(col);
458
- } else {
459
- return this;
460
- }
461
- return this.each(function(){
462
- if ($(this).data('colorpickerId')) {
463
- var cal = $('#' + $(this).data('colorpickerId'));
464
- cal.data('colorpicker').color = col;
465
- cal.data('colorpicker').origColor = col;
466
- fillRGBFields(col, cal.get(0));
467
- fillHSBFields(col, cal.get(0));
468
- fillHexFields(col, cal.get(0));
469
- setHue(col, cal.get(0));
470
- setSelector(col, cal.get(0));
471
- setCurrentColor(col, cal.get(0));
472
- setNewColor(col, cal.get(0));
473
- }
474
- });
475
- }
476
- };
477
- }();
478
- $.fn.extend({
479
- ColorPicker: ColorPicker.init,
480
- ColorPickerHide: ColorPicker.hidePicker,
481
- ColorPickerShow: ColorPicker.showPicker,
482
- ColorPickerSetColor: ColorPicker.setColor
483
- });
484
- })(jQuery)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/easy-modal.js ADDED
@@ -0,0 +1,194 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function($){$.toJSON=function(o)
2
+ {if(typeof(JSON)=='object'&&JSON.stringify)
3
+ return JSON.stringify(o);var type=typeof(o);if(o===null)
4
+ return"null";if(type=="undefined")
5
+ return undefined;if(type=="number"||type=="boolean")
6
+ return o+"";if(type=="string")
7
+ return $.quoteString(o);if(type=='object')
8
+ {if(typeof o.toJSON=="function")
9
+ return $.toJSON(o.toJSON());if(o.constructor===Date)
10
+ {var month=o.getUTCMonth()+1;if(month<10)month='0'+month;var day=o.getUTCDate();if(day<10)day='0'+day;var year=o.getUTCFullYear();var hours=o.getUTCHours();if(hours<10)hours='0'+hours;var minutes=o.getUTCMinutes();if(minutes<10)minutes='0'+minutes;var seconds=o.getUTCSeconds();if(seconds<10)seconds='0'+seconds;var milli=o.getUTCMilliseconds();if(milli<100)milli='0'+milli;if(milli<10)milli='0'+milli;return'"'+year+'-'+month+'-'+day+'T'+
11
+ hours+':'+minutes+':'+seconds+'.'+milli+'Z"';}
12
+ if(o.constructor===Array)
13
+ {var ret=[];for(var i=0;i<o.length;i++)
14
+ ret.push($.toJSON(o[i])||"null");return"["+ret.join(",")+"]";}
15
+ var pairs=[];for(var k in o){var name;var type=typeof k;if(type=="number")
16
+ name='"'+k+'"';else if(type=="string")
17
+ name=$.quoteString(k);else
18
+ continue;if(typeof o[k]=="function")
19
+ continue;var val=$.toJSON(o[k]);pairs.push(name+":"+val);}
20
+ return"{"+pairs.join(", ")+"}";}};$.evalJSON=function(src)
21
+ {if(typeof(JSON)=='object'&&JSON.parse)
22
+ return JSON.parse(src);return eval("("+src+")");};$.secureEvalJSON=function(src)
23
+ {if(typeof(JSON)=='object'&&JSON.parse)
24
+ return JSON.parse(src);var filtered=src;filtered=filtered.replace(/\\["\\\/bfnrtu]/g,'@');filtered=filtered.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']');filtered=filtered.replace(/(?:^|:|,)(?:\s*\[)+/g,'');if(/^[\],:{}\s]*$/.test(filtered))
25
+ return eval("("+src+")");else
26
+ throw new SyntaxError("Error parsing JSON, source is not valid.");};$.quoteString=function(string)
27
+ {if(string.match(_escapeable))
28
+ {return'"'+string.replace(_escapeable,function(a)
29
+ {var c=_meta[a];if(typeof c==='string')return c;c=a.charCodeAt();return'\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16);})+'"';}
30
+ return'"'+string+'"';};var _escapeable=/["\\\x00-\x1f\x7f-\x9f]/g;var _meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};})(jQuery);
31
+
32
+ (function ($){
33
+
34
+ $.fn.emodal = function(options) {
35
+
36
+ var defaults = {
37
+ url: convertEntities(easymodal.ajaxurl),
38
+ requestType: 'load',
39
+ requestData: {},
40
+ overlayClose: false,
41
+ buttonClose: true,
42
+ onLoad: function(){}
43
+
44
+ };
45
+
46
+ var options = $.extend({},defaults,options);
47
+ function centerModal(animate){
48
+ var top = ($(window).height() - $('#eModal-Container').outerHeight() ) / 2;
49
+ var left = ($(window).width() - $('#eModal-Container').outerWidth() ) / 2;
50
+ if(animate == true){
51
+ $('#eModal-Container').animate({
52
+ 'top': top + $(document).scrollTop(),
53
+ 'left': left
54
+ });
55
+ } else {
56
+ $('#eModal-Container').css({
57
+ 'top': top + $(document).scrollTop(),
58
+ 'left': left
59
+ });
60
+ }
61
+ }
62
+
63
+
64
+ var onLoad = function(){
65
+ $(this).prepend(function(){
66
+ if(options.buttonClose == true) return $('<a href="#close" id="close">x</a>').click(function(){
67
+ $('#eModal-Container').fadeOut().remove();
68
+ $('#eModal-Overlay').fadeOut().remove();
69
+ return false;
70
+ });
71
+ });
72
+ if(options.onLoad){
73
+ options.onLoad();
74
+ }
75
+ var resizeTimer;
76
+ $(window, this).resize(function(){
77
+ clearTimeout(resizeTimer);
78
+ resizeTimer = setTimeout(function(){
79
+ centerModal(true);
80
+ }, 100)
81
+ });
82
+ $(window).scroll(function(){
83
+ clearTimeout(resizeTimer);
84
+ resizeTimer = setTimeout(function(){
85
+ centerModal(true);
86
+ }, 100)
87
+ });
88
+
89
+ $(this).fadeIn();
90
+ centerModal();
91
+
92
+ if(options.cf7form == true)
93
+ {
94
+ $('div.wpcf7 > form').ajaxForm({
95
+ beforeSubmit: function(formData, jqForm, options) {
96
+ jqForm.wpcf7ClearResponseOutput();
97
+ jqForm.find('img.ajax-loader').css({ visibility: 'visible' });
98
+ return true;
99
+ },
100
+ beforeSerialize: function(jqForm, options) {
101
+ jqForm.find('.wpcf7-use-title-as-watermark.watermark').each(function(i, n) {
102
+ $(n).val('');
103
+ });
104
+ return true;
105
+ },
106
+ data: { '_wpcf7_is_ajax_call': 1 },
107
+ dataType: 'json',
108
+ success: function(data) {
109
+ var ro = $(data.into).find('div.wpcf7-response-output');
110
+ $(data.into).wpcf7ClearResponseOutput();
111
+ if (data.invalids) {
112
+ $.each(data.invalids, function(i, n) {
113
+ $(data.into).find(n.into).wpcf7NotValidTip(n.message);
114
+ });
115
+ ro.addClass('wpcf7-validation-errors');
116
+ }
117
+ if (data.captcha)
118
+ $(data.into).wpcf7RefillCaptcha(data.captcha);
119
+ if (data.quiz)
120
+ $(data.into).wpcf7RefillQuiz(data.quiz);
121
+ if (1 == data.spam)
122
+ ro.addClass('wpcf7-spam-blocked');
123
+ if (1 == data.mailSent) {
124
+ $(data.into).find('form').resetForm().clearForm();
125
+ ro.addClass('wpcf7-mail-sent-ok');
126
+ if (data.onSentOk)
127
+ $.each(data.onSentOk, function(i, n) { eval(n) });
128
+ } else {
129
+ ro.addClass('wpcf7-mail-sent-ng');
130
+ }
131
+ if (data.onSubmit)
132
+ $.each(data.onSubmit, function(i, n) { eval(n) });
133
+ $(data.into).find('.wpcf7-use-title-as-watermark.watermark').each(function(i, n) {
134
+ $(n).val($(n).attr('title'));
135
+ });
136
+ ro.append(data.message).slideDown('fast');
137
+ if(1 == data.mailSent){
138
+ $('#eModal-Container').fadeOut(4000,function(){$(this).remove();});
139
+ $('#eModal-Overlay').fadeOut(2000, function(){$(this).remove();});
140
+ }
141
+ }
142
+ });
143
+ }
144
+ }
145
+
146
+ var openModal = function(e){
147
+ $('<div id="eModal-Overlay"></div>').css({opacity:.3}).hide().appendTo('body').click(function(){
148
+ if(options.overlayClose == true){
149
+ $(this).next().fadeOut().remove();
150
+ $(this).fadeOut().remove();
151
+ }
152
+ }).fadeIn();
153
+ switch(options.requestType)
154
+ {
155
+ case 'load':
156
+ $('<div id="eModal-Container"></div>').hide().load(options.url, options.requestData, onLoad).appendTo('body');
157
+ break;
158
+ }
159
+ };
160
+ $(this).click(function(e){
161
+ e.stopPropagation();
162
+ openModal();
163
+ return false;
164
+ })
165
+
166
+
167
+
168
+ };
169
+
170
+ $(document).ready(function(){
171
+
172
+ $('.eModal').each(function(){
173
+
174
+ var classes = $(this).attr("class").split(" ");
175
+
176
+ for (var i = 0; i < classes.length; i++){
177
+
178
+ if ( classes[i].substr(0,7) == "eModal-" ){
179
+
180
+ var modalId = classes[i].split("-")[1];
181
+ break;
182
+
183
+ }
184
+
185
+ }
186
+ $(this).emodal(easymodal.settings[modalId]);
187
+ })
188
+
189
+
190
+
191
+
192
+
193
+ })
194
+ })(jQuery)
js/easy-modal.js.php DELETED
@@ -1,175 +0,0 @@
1
- <?php
2
- /*
3
- * Easy Modal
4
- * http://wizardinternetsolutions.com/project/easy-modal/
5
- * v 0.9.0.6
6
- */
7
- header("content-type: application/x-javascript");
8
- require('../../../../wp-load.php');
9
- $opt = get_option('easy_modalOptions');
10
- ?>
11
- eM_overlayId = "<?php echo $opt['overlayId']?>";
12
- eM_overlayColor = "<?php echo $opt['overlayColor']?>";
13
- eM_opacity = "<?php echo $opt['opacity']?>";
14
- eM_overlayClose = "<?php echo $opt['overlayClose']?>";
15
- eM_containerId = "<?php echo $opt['containerId']?>";
16
- eM_autoResize = "<?php echo $opt['autoResize']?>";
17
- eM_autoPosition = "<?php echo $opt['autoPosition']?>";
18
- eM_positionX = "<?php echo $opt['positionX']?>";
19
- eM_positionY = "<?php echo $opt['positionY']?>";
20
- eM_minHeight = "<?php echo $opt['minHeight']?>";
21
- eM_maxHeight = "<?php echo $opt['maxHeight']?>";
22
- eM_minWidth = "<?php echo $opt['minWidth']?>";
23
- eM_maxWidth = "<?php echo $opt['maxWidth']?>";
24
- eM_cf7form = "<?php echo $opt['cf7form']?>";
25
- jQuery(function ($) {
26
- var contact = {
27
- message: null,
28
- init: function () {
29
- $('.eModal').click(function (e) {
30
- e.preventDefault();
31
- // load the contact form using ajax
32
- $.get("<?php echo get_bloginfo('wpurl')?>/wp-content/plugins/easy-modal/content/content.php", function(data){
33
- // create a modal dialog with the data
34
- $(data).modal({
35
- closeHTML: "<a href='#' title='Close' class='modal-close'></a>",
36
- position: ["15%",],
37
- overlayId: eM_overlayId,
38
- overlayCss: {backgroundColor:eM_overlayColor},
39
- opacity : eM_opacity,
40
- overlayClose: eM_overlayClose,
41
- containerId: eM_containerId,
42
- autoResize: eM_autoResize,
43
- autoPosition: eM_autoPosition,
44
- position: [eM_positionX, eM_positionY],
45
- minHeight: eM_minHeight,
46
- maxHeight: eM_maxHeight,
47
- minWidth: eM_minWidth,
48
- maxWidth: eM_maxWidth,
49
- onOpen: contact.open,
50
- onShow: contact.show,
51
- onClose: contact.close
52
- });
53
- });
54
- });
55
- },
56
- open: function (dialog) {
57
- // add padding to the buttons in firefox/mozilla
58
- if ($.browser.mozilla) {
59
- $('#eM-container .contact-button').css({
60
- 'padding-bottom': '2px'
61
- });
62
- }
63
- // input field font size
64
- if ($.browser.safari) {
65
- $('#eM-container .contact-input').css({
66
- 'font-size': '.9em'
67
- });
68
- }
69
- // dynamically determine height
70
- var h = 280;
71
- if ($('#eM-subject').length) {
72
- h += 26;
73
- }
74
- if ($('#eM-cc').length) {
75
- h += 22;
76
- }
77
- var title = $('#eM-container .contact-title').html();
78
- $('#eM-container .contact-title').html('Loading...');
79
- dialog.overlay.fadeIn(200, function () {
80
- dialog.container.fadeIn(200, function () {
81
- dialog.data.fadeIn(200, function () {
82
- $('#eM-container .contact-content').animate({
83
- height: h
84
- }, function () {
85
- $('#eM-container .contact-title').html(title);
86
- $('#eM-container form').fadeIn(200, function () {
87
- $('#eM-container #eM-name').focus();
88
- $('#eM-container .contact-cc').click(function () {
89
- var cc = $('#eM-container #eM-cc');
90
- cc.is(':checked') ? cc.attr('checked', '') : cc.attr('checked', 'checked');
91
- });
92
- // fix png's for IE 6
93
- if ($.browser.msie && $.browser.version < 7) {
94
- $('#eM-container .contact-button').each(function () {
95
- if ($(this).css('backgroundImage').match(/^url[("']+(.*\.png)[)"']+$/i)) {
96
- var src = RegExp.$1;
97
- $(this).css({
98
- backgroundImage: 'none',
99
- filter: 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + src + '", sizingMethod="crop")'
100
- });
101
- }
102
- });
103
- }
104
- });
105
- });
106
- });
107
- });
108
- });
109
- },
110
- show: function (dialog) {
111
- if(eM_cf7form == true){
112
- $('div.wpcf7 > form').ajaxForm({
113
- beforeSubmit: function(formData, jqForm, options) {
114
- jqForm.wpcf7ClearResponseOutput();
115
- jqForm.find('img.ajax-loader').css({ visibility: 'visible' });
116
- return true;
117
- },
118
- beforeSerialize: function(jqForm, options) {
119
- jqForm.find('.wpcf7-use-title-as-watermark.watermark').each(function(i, n) {
120
- $(n).val('');
121
- });
122
- return true;
123
- },
124
- data: { '_wpcf7_is_ajax_call': 1 },
125
- dataType: 'json',
126
- success: function(data) {
127
- var ro = $(data.into).find('div.wpcf7-response-output');
128
- $(data.into).wpcf7ClearResponseOutput();
129
- if (data.invalids) {
130
- $.each(data.invalids, function(i, n) {
131
- $(data.into).find(n.into).wpcf7NotValidTip(n.message);
132
- });
133
- ro.addClass('wpcf7-validation-errors');
134
- }
135
- if (data.captcha)
136
- $(data.into).wpcf7RefillCaptcha(data.captcha);
137
- if (data.quiz)
138
- $(data.into).wpcf7RefillQuiz(data.quiz);
139
- if (1 == data.spam)
140
- ro.addClass('wpcf7-spam-blocked');
141
- if (1 == data.mailSent) {
142
- $(data.into).find('form').resetForm().clearForm();
143
- ro.addClass('wpcf7-mail-sent-ok');
144
- if (data.onSentOk)
145
- $.each(data.onSentOk, function(i, n) { eval(n) });
146
- } else {
147
- ro.addClass('wpcf7-mail-sent-ng');
148
- }
149
- if (data.onSubmit)
150
- $.each(data.onSubmit, function(i, n) { eval(n) });
151
- $(data.into).find('.wpcf7-use-title-as-watermark.watermark').each(function(i, n) {
152
- $(n).val($(n).attr('title'));
153
- });
154
- ro.append(data.message).slideDown('fast');
155
- }
156
- });
157
- }
158
- },
159
- close: function (dialog) {
160
- $('#eM-container').fadeOut();
161
- $('#eM-container .eM-content').animate({
162
- height: 40
163
- }, function () {
164
- dialog.data.fadeOut(200, function () {
165
- dialog.container.fadeOut(200, function () {
166
- dialog.overlay.fadeOut(200, function () {
167
- $.modal.close();
168
- });
169
- });
170
- });
171
- });
172
- }
173
- };
174
- contact.init();
175
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/jquery.simplemodal.js DELETED
@@ -1,25 +0,0 @@
1
- /*
2
- * SimpleModal 1.4.1 - jQuery Plugin
3
- * http://www.ericmmartin.com/projects/simplemodal/
4
- * Copyright (c) 2010 Eric Martin (http://twitter.com/ericmmartin)
5
- * Dual licensed under the MIT and GPL licenses
6
- * Revision: $Id: jquery.simplemodal.js 259 2010-11-05 05:53:13Z emartin24 $
7
- */
8
- (function(d){var k=d.browser.msie&&parseInt(d.browser.version)===6&&typeof window.XMLHttpRequest!=="object",m=d.browser.msie&&parseInt(d.browser.version)===7,l=null,f=[];d.modal=function(a,b){return d.modal.impl.init(a,b)};d.modal.close=function(){d.modal.impl.close()};d.modal.focus=function(a){d.modal.impl.focus(a)};d.modal.setContainerDimensions=function(){d.modal.impl.setContainerDimensions()};d.modal.setPosition=function(){d.modal.impl.setPosition()};d.modal.update=function(a,b){d.modal.impl.update(a,
9
- b)};d.fn.modal=function(a){return d.modal.impl.init(this,a)};d.modal.defaults={appendTo:"body",focus:true,opacity:50,overlayId:"simplemodal-overlay",overlayCss:{},containerId:"simplemodal-container",containerCss:{},dataId:"simplemodal-data",dataCss:{},minHeight:null,minWidth:null,maxHeight:null,maxWidth:null,autoResize:false,autoPosition:true,zIndex:1E3,close:true,closeHTML:'<a class="modalCloseImg" title="Close"></a>',closeClass:"simplemodal-close",escClose:true,overlayClose:false,position:null,
10
- persist:false,modal:true,onOpen:null,onShow:null,onClose:null};d.modal.impl={d:{},init:function(a,b){var c=this;if(c.d.data)return false;l=d.browser.msie&&!d.boxModel;c.o=d.extend({},d.modal.defaults,b);c.zIndex=c.o.zIndex;c.occb=false;if(typeof a==="object"){a=a instanceof jQuery?a:d(a);c.d.placeholder=false;if(a.parent().parent().size()>0){a.before(d("<span></span>").attr("id","simplemodal-placeholder").css({display:"none"}));c.d.placeholder=true;c.display=a.css("display");if(!c.o.persist)c.d.orig=
11
- a.clone(true)}}else if(typeof a==="string"||typeof a==="number")a=d("<div></div>").html(a);else{alert("SimpleModal Error: Unsupported data type: "+typeof a);return c}c.create(a);c.open();d.isFunction(c.o.onShow)&&c.o.onShow.apply(c,[c.d]);return c},create:function(a){var b=this;f=b.getDimensions();if(b.o.modal&&k)b.d.iframe=d('<iframe src="javascript:false;"></iframe>').css(d.extend(b.o.iframeCss,{display:"none",opacity:0,position:"fixed",height:f[0],width:f[1],zIndex:b.o.zIndex,top:0,left:0})).appendTo(b.o.appendTo);
12
- b.d.overlay=d("<div></div>").attr("id",b.o.overlayId).addClass("simplemodal-overlay").css(d.extend(b.o.overlayCss,{display:"none",opacity:b.o.opacity/100,height:b.o.modal?f[0]:0,width:b.o.modal?f[1]:0,position:"fixed",left:0,top:0,zIndex:b.o.zIndex+1})).appendTo(b.o.appendTo);b.d.container=d("<div></div>").attr("id",b.o.containerId).addClass("simplemodal-container").css(d.extend(b.o.containerCss,{display:"none",position:"fixed",zIndex:b.o.zIndex+2})).append(b.o.close&&b.o.closeHTML?d(b.o.closeHTML).addClass(b.o.closeClass):
13
- "").appendTo(b.o.appendTo);b.d.wrap=d("<div></div>").attr("tabIndex",-1).addClass("simplemodal-wrap").css({height:"100%",outline:0,width:"100%"}).appendTo(b.d.container);b.d.data=a.attr("id",a.attr("id")||b.o.dataId).addClass("simplemodal-data").css(d.extend(b.o.dataCss,{display:"none"})).appendTo("body");b.setContainerDimensions();b.d.data.appendTo(b.d.wrap);if(k||l)b.fixIE()},bindEvents:function(){var a=this;d("."+a.o.closeClass).bind("click.simplemodal",function(b){b.preventDefault();a.close()});
14
- a.o.modal&&a.o.close&&a.o.overlayClose&&a.d.overlay.bind("click.simplemodal",function(b){b.preventDefault();a.close()});d(document).bind("keydown.simplemodal",function(b){if(a.o.modal&&b.keyCode===9)a.watchTab(b);else if(a.o.close&&a.o.escClose&&b.keyCode===27){b.preventDefault();a.close()}});d(window).bind("resize.simplemodal",function(){f=a.getDimensions();a.o.autoResize?a.setContainerDimensions():a.o.autoPosition&&a.setPosition();if(k||l)a.fixIE();else if(a.o.modal){a.d.iframe&&a.d.iframe.css({height:f[0],
15
- width:f[1]});a.d.overlay.css({height:f[0],width:f[1]})}})},unbindEvents:function(){d("."+this.o.closeClass).unbind("click.simplemodal");d(document).unbind("keydown.simplemodal");d(window).unbind("resize.simplemodal");this.d.overlay.unbind("click.simplemodal")},fixIE:function(){var a=this,b=a.o.position;d.each([a.d.iframe||null,!a.o.modal?null:a.d.overlay,a.d.container],function(c,h){if(h){var g=h[0].style;g.position="absolute";if(c<2){g.removeExpression("height");g.removeExpression("width");g.setExpression("height",
16
- 'document.body.scrollHeight > document.body.clientHeight ? document.body.scrollHeight : document.body.clientHeight + "px"');g.setExpression("width",'document.body.scrollWidth > document.body.clientWidth ? document.body.scrollWidth : document.body.clientWidth + "px"')}else{var e;if(b&&b.constructor===Array){c=b[0]?typeof b[0]==="number"?b[0].toString():b[0].replace(/px/,""):h.css("top").replace(/px/,"");c=c.indexOf("%")===-1?c+' + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"':
17
- parseInt(c.replace(/%/,""))+' * ((document.documentElement.clientHeight || document.body.clientHeight) / 100) + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"';if(b[1]){e=typeof b[1]==="number"?b[1].toString():b[1].replace(/px/,"");e=e.indexOf("%")===-1?e+' + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"':parseInt(e.replace(/%/,""))+' * ((document.documentElement.clientWidth || document.body.clientWidth) / 100) + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"'}}else{c=
18
- '(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (t = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"';e='(document.documentElement.clientWidth || document.body.clientWidth) / 2 - (this.offsetWidth / 2) + (t = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft) + "px"'}g.removeExpression("top");g.removeExpression("left");g.setExpression("top",
19
- c);g.setExpression("left",e)}}})},focus:function(a){var b=this;a=a&&d.inArray(a,["first","last"])!==-1?a:"first";var c=d(":input:enabled:visible:"+a,b.d.wrap);setTimeout(function(){c.length>0?c.focus():b.d.wrap.focus()},10)},getDimensions:function(){var a=d(window);return[d.browser.opera&&d.browser.version>"9.5"&&d.fn.jquery<"1.3"||d.browser.opera&&d.browser.version<"9.5"&&d.fn.jquery>"1.2.6"?a[0].innerHeight:a.height(),a.width()]},getVal:function(a,b){return a?typeof a==="number"?a:a==="auto"?0:
20
- a.indexOf("%")>0?parseInt(a.replace(/%/,""))/100*(b==="h"?f[0]:f[1]):parseInt(a.replace(/px/,"")):null},update:function(a,b){var c=this;if(!c.d.data)return false;c.d.origHeight=c.getVal(a,"h");c.d.origWidth=c.getVal(b,"w");c.d.data.hide();a&&c.d.container.css("height",a);b&&c.d.container.css("width",b);c.setContainerDimensions();c.d.data.show();c.o.focus&&c.focus();c.unbindEvents();c.bindEvents()},setContainerDimensions:function(){var a=this,b=k||m,c=a.d.origHeight?a.d.origHeight:d.browser.opera?
21
- a.d.container.height():a.getVal(b?a.d.container[0].currentStyle.height:a.d.container.css("height"),"h");b=a.d.origWidth?a.d.origWidth:d.browser.opera?a.d.container.width():a.getVal(b?a.d.container[0].currentStyle.width:a.d.container.css("width"),"w");var h=a.d.data.outerHeight(true),g=a.d.data.outerWidth(true);a.d.origHeight=a.d.origHeight||c;a.d.origWidth=a.d.origWidth||b;var e=a.o.maxHeight?a.getVal(a.o.maxHeight,"h"):null,i=a.o.maxWidth?a.getVal(a.o.maxWidth,"w"):null;e=e&&e<f[0]?e:f[0];i=i&&i<
22
- f[1]?i:f[1];var j=a.o.minHeight?a.getVal(a.o.minHeight,"h"):"auto";c=c?a.o.autoResize&&c>e?e:c<j?j:c:h?h>e?e:a.o.minHeight&&j!=="auto"&&h<j?j:h:j;e=a.o.minWidth?a.getVal(a.o.minWidth,"w"):"auto";b=b?a.o.autoResize&&b>i?i:b<e?e:b:g?g>i?i:a.o.minWidth&&e!=="auto"&&g<e?e:g:e;a.d.container.css({height:c,width:b});a.d.wrap.css({overflow:h>c||g>b?"auto":"visible"});a.o.autoPosition&&a.setPosition()},setPosition:function(){var a=this,b,c;b=f[0]/2-a.d.container.outerHeight(true)/2;c=f[1]/2-a.d.container.outerWidth(true)/
23
- 2;if(a.o.position&&Object.prototype.toString.call(a.o.position)==="[object Array]"){b=a.o.position[0]||b;c=a.o.position[1]||c}else{b=b;c=c}a.d.container.css({left:c,top:b})},watchTab:function(a){var b=this;if(d(a.target).parents(".simplemodal-container").length>0){b.inputs=d(":input:enabled:visible:first, :input:enabled:visible:last",b.d.data[0]);if(!a.shiftKey&&a.target===b.inputs[b.inputs.length-1]||a.shiftKey&&a.target===b.inputs[0]||b.inputs.length===0){a.preventDefault();b.focus(a.shiftKey?"last":
24
- "first")}}else{a.preventDefault();b.focus()}},open:function(){var a=this;a.d.iframe&&a.d.iframe.show();if(d.isFunction(a.o.onOpen))a.o.onOpen.apply(a,[a.d]);else{a.d.overlay.show();a.d.container.show();a.d.data.show()}a.o.focus&&a.focus();a.bindEvents()},close:function(){var a=this;if(!a.d.data)return false;a.unbindEvents();if(d.isFunction(a.o.onClose)&&!a.occb){a.occb=true;a.o.onClose.apply(a,[a.d])}else{if(a.d.placeholder){var b=d("#simplemodal-placeholder");if(a.o.persist)b.replaceWith(a.d.data.removeClass("simplemodal-data").css("display",
25
- a.display));else{a.d.data.hide().remove();b.replaceWith(a.d.orig)}}else a.d.data.hide().remove();a.d.container.hide().remove();a.d.overlay.hide();a.d.iframe&&a.d.iframe.hide().remove();setTimeout(function(){a.d.overlay.remove();a.d={}},10)}}}})(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -3,24 +3,24 @@ Contributors: danieliser
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=PQTG2JYUKSLFW
4
  Tags: modal, contact form 7, ajax
5
  Requires at least: 3.0.1
6
- Tested up to: 3.1.3
7
- Stable tag: 0.9.0.11
8
 
9
  This plugin allows you to easily add a Modal window with just about any content including Contact Form 7 using ajax submission.
10
 
11
  == Description ==
12
 
13
- This plugin allows you to easily add a Modal window with just about any content. It accepts shortcodes and has been tested to work with Contact Form 7 custom forms using ajax submission.
14
 
15
- Basic theme for Contact Form 7 default form. Will be adding theme options in future releases.
16
 
17
- For feature requests please visit our Easy Modal page at the link below
18
 
19
  [youtube http://www.youtube.com/watch?v=w9Us4ttVuZU]
20
 
21
  If you like the plugin please rate it.
22
 
23
- [Easy Modal Page](http://wizardinternetsolutions.com/plugins/easy-modal/ "Easy Modal Page - Info, Demo and Discussion") - Info, Demo and Feature Discussion
24
 
25
  [Wizard Internet Solutions](http://wizardinternetsolutions.com/ "Website Design & Development") - Developers Site
26
 
@@ -28,6 +28,15 @@ To be notified of plugin updates, [follow us on Twitter](http://twitter.com/wiza
28
 
29
  == Installation ==
30
 
 
 
 
 
 
 
 
 
 
31
  [youtube http://www.youtube.com/watch?v=w9Us4ttVuZU]
32
 
33
  1. Upload `Easy-Modal` folder to the `/wp-content/plugins/` directory
@@ -36,9 +45,9 @@ To be notified of plugin updates, [follow us on Twitter](http://twitter.com/wiza
36
 
37
  == Frequently Asked Questions ==
38
 
39
- = The screen changes but my modal never shows. =
40
 
41
- This is usually because the width and height are not set. Try checking the settings page in the admin area to see if there is a minimum width and height.
42
 
43
  = Does this work with CF7 =
44
 
@@ -46,7 +55,7 @@ Yes, this will work with any custom form shortcode and uses ajax submit features
46
 
47
  = Is the form styled =
48
 
49
- We have only included some basic styling for the modal at this point. We will be adding more features to customize the look and feel of the plugin and modal windows in upcoming versions. For now you can add styles to your themes styles.css or add them to the head via plugin.
50
 
51
  == Screenshots ==
52
 
@@ -55,6 +64,13 @@ We have only included some basic styling for the modal at this point. We will be
55
 
56
  == Changelog ==
57
 
 
 
 
 
 
 
 
58
  = 0.9.0.11 =
59
  * Bug Fix in Settings page color picker.
60
 
@@ -99,6 +115,9 @@ We have only included some basic styling for the modal at this point. We will be
99
 
100
  == Upgrade Notice ==
101
 
 
 
 
102
  = 0.9.0.4 =
103
  * Options will be overwritten with default options.
104
  = 0.9 =
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=PQTG2JYUKSLFW
4
  Tags: modal, contact form 7, ajax
5
  Requires at least: 3.0.1
6
+ Tested up to: 3.2.1
7
+ Stable tag: 1.0.0
8
 
9
  This plugin allows you to easily add a Modal window with just about any content including Contact Form 7 using ajax submission.
10
 
11
  == Description ==
12
 
13
+ This plugin allows you to easily add unlimited Modal windows with just about any content. It accepts shortcodes and has been tested to work with Contact Form 7 custom forms using ajax submission.
14
 
15
+ Basic theme for Contact Form 7 default form.
16
 
17
+ For examples please visit our Easy Modal page at the link below
18
 
19
  [youtube http://www.youtube.com/watch?v=w9Us4ttVuZU]
20
 
21
  If you like the plugin please rate it.
22
 
23
+ [Easy Modal Page](http://wizardinternetsolutions.com/plugins/easy-modal/ "Easy Modal Page - Info, Demos and Discussion") - Info, Demos and Feature Discussion
24
 
25
  [Wizard Internet Solutions](http://wizardinternetsolutions.com/ "Website Design & Development") - Developers Site
26
 
28
 
29
  == Installation ==
30
 
31
+ = Version 1.0.0 and above =
32
+
33
+ 1. Upload `Easy-Modal` folder to the `/wp-content/plugins/` directory
34
+ 2. Activate the plugin through the 'Plugins' menu in WordPress
35
+ 3. Create and customize a modal in the Easy Modal settings page.
36
+ 3. Copy and Add `eModal` and `eModal-#` class from the modals settings page to the object you want to make activate the modal window. Will work on divs, links, list elements and just about anything else.
37
+
38
+
39
+ = Versions before 1.0.0 =
40
  [youtube http://www.youtube.com/watch?v=w9Us4ttVuZU]
41
 
42
  1. Upload `Easy-Modal` folder to the `/wp-content/plugins/` directory
45
 
46
  == Frequently Asked Questions ==
47
 
48
+ = I have a problem! =
49
 
50
+ If think youve found a problem please post a link with it so i can see the problem for myself.
51
 
52
  = Does this work with CF7 =
53
 
55
 
56
  = Is the form styled =
57
 
58
+ We have only included some basic styling for the modal at this point. You can add styles to your themes styles.css or add them to the head via plugin.
59
 
60
  == Screenshots ==
61
 
64
 
65
  == Changelog ==
66
 
67
+ = 1.0.0 =
68
+ * Release v1.0.0 Is a was rebuilt from the ground up. Features Include:
69
+ * Unlimited Modals
70
+ * Lighter Filesizes for Faster Loading
71
+ * Auto Centers no matter what the content
72
+ * Recenters on window resize/move
73
+
74
  = 0.9.0.11 =
75
  * Bug Fix in Settings page color picker.
76
 
115
 
116
  == Upgrade Notice ==
117
 
118
+ = 1.0.0 =
119
+ * This is a new build your settings will be reset.
120
+
121
  = 0.9.0.4 =
122
  * Options will be overwritten with default options.
123
  = 0.9 =
themes/default/_notes/dwsync.xml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8" ?>
2
+ <dwsync>
3
+ <file name="loader.gif" server="wizardinternetsolutions.com//public_html/sandbox/" local="129567000735248832" remote="129566965200000000" />
4
+ </dwsync>
themes/default/loader.gif ADDED
Binary file
themes/default/styles.css CHANGED
@@ -4,19 +4,51 @@
4
  * v 0.9.0.6
5
  * Default Theme
6
  */
7
- #eM-overlay{background-color:#000; cursor:wait;}
8
- #eM-container{text-align:left;font:'Trebuchet MS', Verdana, Arial;border:3px solid #fff;-webkit-border-radius:10px;-moz-border-radius:10px; border-radius:10px;behavior:url(PIE.htc);}
9
- #eM-container .eM-content{background-color:#333;color:#ddd;width:100%;height:100%;}
10
- #eM-container .simplemodal-wrap{overflow-y:auto!important;background:#666;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;behavior:url(PIE.htc);}
11
- #eM-container .simplemodal-data{width:100%;height:100%;}
12
- #eM-container .eM-title{color:#fff;font-size:20px;line-height:20px;margin:0;padding:5px 0 3px 10px;text-align:left;}
13
- #eM-container p{margin:0;}
14
- #eM-container .wpcf7-form-control-wrap{width:95%;margin:0 auto;}
15
- #eM-container .wpcf7-form-control-wrap input, #eM-container .wpcf7-form-control-wrap textarea{width:100%;margin:0 auto;padding:2px 0;display:inline;border:none;}
16
- #eM-container .wpcf7-form-control-wrap textarea{height:175px;}
17
- #eM-container .modal-close{background:url(close.png) no-repeat transparent;cursor:pointer;display:inline;height:20px;position:absolute;right:-12px;top:-12px;width:20px;z-index: 3200;}
18
- #eM-container .modal-close:hover{background-image:url(close_hover.png);}
19
- #eM-container .wpcf7-response-output{bottom:-65px;left:-1.5%;position:absolute;width:90%;background:#000;color:#fff;}
20
- #eM-container .wpcf7-not-valid-tip{background:#666;color:#fff;border:1px solid #FF0000;bottom:-3px;font-size:10pt;left:0;padding:0;position:absolute;top:-3px;width:100%;z-index:100;}
21
- #eM-container .wpcf7-submit{float:right;background:#000;border:1px solid #fff;color:#fff;font-weight:bold;padding:2px 15px;margin-top:4px;-webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; behavior: url(PIE.htc);}
22
- #eM-container .wpcf7{margin:0 auto;width:90%;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  * v 0.9.0.6
5
  * Default Theme
6
  */
7
+ #eModal-Overlay {
8
+ position:fixed;
9
+ top:0;
10
+ left:0;
11
+ height:100%;
12
+ width:100%;
13
+ background:black url(loader.gif) no-repeat scroll center center;
14
+ z-index:1000;
15
+ }
16
+ #eModal-Container {
17
+ position:absolute;
18
+ border:5px solid #fff;
19
+ -moz-border-radius:10px;
20
+ border-radius::10px;
21
+ padding:20px;
22
+ color:#fff;
23
+ background:#000;
24
+ z-index:1001;
25
+ }
26
+ #eModal-Container #close {
27
+ position:absolute;
28
+ top:-15px;
29
+ right:-15px;
30
+ background:#fff;
31
+ border:2px solid #333;
32
+ -webkit-border-radius: 20px;
33
+ -moz-border-radius: 20px;
34
+ border-radius: 20px;
35
+ color:#000;
36
+ width:20px;
37
+ height:20px;
38
+ line-height:16px;
39
+ text-align:center;
40
+ text-decoration:none;
41
+ font-size:20px;
42
+ z-index:1002;
43
+ }
44
+ #eModal-Container .eModal-title{color:#fff;font-size:20px;line-height:20px;margin:0;padding:5px 0 3px 10px;text-align:left;}
45
+ #eModal-Container p{margin:0;}
46
+ #eModal-Container .wpcf7-form-control-wrap{width:95%;margin:0 auto;}
47
+ #eModal-Container .wpcf7-form-control-wrap input, #eModal-Container .wpcf7-form-control-wrap textarea{width:100%;margin:0 auto;padding:2px 0;display:inline;border:none;}
48
+ #eModal-Container .wpcf7-form-control-wrap textarea{height:175px;}
49
+ #eModal-Container .modal-close{background:url(close.png) no-repeat transparent;cursor:pointer;display:inline;height:20px;position:absolute;right:-12px;top:-12px;width:20px;z-index: 3200;}
50
+ #eModal-Container .modal-close:hover{background-image:url(close_hover.png);}
51
+ #eModal-Container .wpcf7-response-output{bottom:-65px;left:-1.5%;position:absolute;width:90%;background:#000;color:#fff;}
52
+ #eModal-Container .wpcf7-not-valid-tip{background:#666;color:#fff;border:1px solid #FF0000;bottom:-3px;font-size:10pt;left:0;padding:0;position:absolute;top:-3px;width:100%;z-index:100;}
53
+ #eModal-Container .wpcf7-submit{float:right;background:#000;border:1px solid #fff;color:#fff;font-weight:bold;padding:2px 15px;margin-top:4px;-webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; behavior: url(PIE.htc);}
54
+ #eModal-Container .wpcf7{margin:0 auto;width:90%;}