Wp-Insert - Version 2.0.5

Version Description

Download this release

Release Info

Developer namith.jawahar
Plugin Icon 128x128 Wp-Insert
Version 2.0.5
Comparing to
See all releases

Code changes from version 2.0.4 to 2.0.5

includes/adwidgets/admin-page.php CHANGED
@@ -47,12 +47,12 @@ function wp_insert_adwidgets_content($post, $args) {
47
 
48
  $controls = array();
49
  $controls['status'] = wp_insert_get_control('tz-checkbox', false, $name.'[status]', $id.'-status', $data['status']);
50
- $controls['ad_code_1'] = wp_insert_get_control('textarea', false, $name.'[ad_code_1]', $id.'-ad_code_1', $data['ad_code_1'], 'Ad Code (Primary Network):');
51
- $controls['ad_code_2'] = wp_insert_get_control('textarea', false, $name.'[ad_code_2]', $id.'-ad_code_2', $data['ad_code_2'], 'Ad Code (Secondary Network):');
52
- $controls['ad_code_3'] = wp_insert_get_control('textarea', false, $name.'[ad_code_3]', $id.'-ad_code_3', $data['ad_code_3'], 'Ad Code (Tertiary Network):');
53
 
54
  $controls['country_1'] = wp_insert_get_control('popup', false, $name.'[country_1]', $id.'-country_1', $data['country_1'], 'Geo Targets', '', array('type' => 'countries'));
55
- $controls['country_code_1'] = wp_insert_get_control('textarea', false, $name.'[country_code_1]', $id.'-country_code_1', $data['country_code_1'], 'Ad Code', '', null, 'input widefat');
56
 
57
  $controls['rules_exclude_home'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_home]', $id.'-rules_exclude_home', $data['rules_exclude_home'], '', '', null, '', false);
58
  $controls['rules_exclude_archives'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_archives]', $id.'-rules_exclude_archives', $data['rules_exclude_archives'], '', '', null, '', false);
47
 
48
  $controls = array();
49
  $controls['status'] = wp_insert_get_control('tz-checkbox', false, $name.'[status]', $id.'-status', $data['status']);
50
+ $controls['ad_code_1'] = wp_insert_get_control('textarea', false, $name.'[ad_code_1]', $id.'-ad_code_1', $data['ad_code_1'], 'Ad Code (Primary Network):', '', null, 'input widefat chitika');
51
+ $controls['ad_code_2'] = wp_insert_get_control('textarea', false, $name.'[ad_code_2]', $id.'-ad_code_2', $data['ad_code_2'], 'Ad Code (Secondary Network):', '', null, 'input widefat chitika');
52
+ $controls['ad_code_3'] = wp_insert_get_control('textarea', false, $name.'[ad_code_3]', $id.'-ad_code_3', $data['ad_code_3'], 'Ad Code (Tertiary Network):', '', null, 'input widefat chitika');
53
 
54
  $controls['country_1'] = wp_insert_get_control('popup', false, $name.'[country_1]', $id.'-country_1', $data['country_1'], 'Geo Targets', '', array('type' => 'countries'));
55
+ $controls['country_code_1'] = wp_insert_get_control('textarea', false, $name.'[country_code_1]', $id.'-country_code_1', $data['country_code_1'], 'Ad Code', '', null, 'input widefat chitika');
56
 
57
  $controls['rules_exclude_home'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_home]', $id.'-rules_exclude_home', $data['rules_exclude_home'], '', '', null, '', false);
58
  $controls['rules_exclude_archives'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_archives]', $id.'-rules_exclude_archives', $data['rules_exclude_archives'], '', '', null, '', false);
includes/common/admin-page.php CHANGED
@@ -24,6 +24,11 @@ function wp_insert_admin_page($pageTitle, $sectionName, $optionName) { ?>
24
  jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed');
25
  postboxes.add_postbox_toggles('<?php echo $sectionName; ?>');
26
  });
 
 
 
 
 
27
  </script>
28
  </form>
29
  </div>
24
  jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed');
25
  postboxes.add_postbox_toggles('<?php echo $sectionName; ?>');
26
  });
27
+
28
+ function wpInsertChitikaPopUpHandler(sender) {
29
+ jQuery.colorbox({overlayClose: false, scrolling: false, transition: "elastic", innerWidth: "577px", innerHeight: "402px", iframe: true, href: "<?php echo WP_INSERT_URL; ?>/includes/common/popups/chitika.php?target="+sender});
30
+ return false;
31
+ }
32
  </script>
33
  </form>
34
  </div>
includes/common/controls.php CHANGED
@@ -145,6 +145,7 @@ function wp_insert_get_script_tag($content) {
145
  } else {
146
  $script = $content;
147
  }
 
148
  $output = '<script type="text/javascript">';
149
  $output .= 'jQuery(document).ready(function(){'.$script.'});';
150
  $output .= '</script>';
145
  } else {
146
  $script = $content;
147
  }
148
+
149
  $output = '<script type="text/javascript">';
150
  $output .= 'jQuery(document).ready(function(){'.$script.'});';
151
  $output .= '</script>';
includes/common/css/style.css CHANGED
@@ -1,422 +1,164 @@
1
- /*ColorBox*/
2
- #colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:9999; overflow:hidden;}
3
- #cboxOverlay{position:fixed; width:100%; height:100%;}
4
- #cboxMiddleLeft, #cboxBottomLeft{clear:left;}
5
- #cboxContent{position:relative;}
6
- #cboxLoadedContent{overflow:auto;}
7
- #cboxTitle{margin:0;}
8
- #cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%; height:100%;}
9
- #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
10
- .cboxPhoto{float:left; margin:auto; border:0; display:block; max-width:none;}
11
- .cboxIframe{width:100%; height:100%; display:block; border:0;}
12
- #colorbox, #cboxContent, #cboxLoadedContent{box-sizing:content-box;}
13
-
14
- #cboxOverlay{background:#000;}
15
- #cboxTopLeft{width:21px; height:21px; background:url(../images/controls.png) no-repeat -101px 0;}
16
- #cboxTopRight{width:21px; height:21px; background:url(../images/controls.png) no-repeat -130px 0;}
17
- #cboxBottomLeft{width:21px; height:21px; background:url(../images/controls.png) no-repeat -101px -29px;}
18
- #cboxBottomRight{width:21px; height:21px; background:url(../images/controls.png) no-repeat -130px -29px;}
19
- #cboxMiddleLeft{width:21px; background:url(../images/controls.png) left top repeat-y;}
20
- #cboxMiddleRight{width:21px; background:url(../images/controls.png) right top repeat-y;}
21
- #cboxTopCenter{height:21px; background:url(../images/border.png) 0 0 repeat-x;}
22
- #cboxBottomCenter{height:21px; background:url(../images/border.png) 0 -29px repeat-x;}
23
- #cboxContent{background:#fff; overflow:hidden;}
24
- .cboxIframe{background:#fff;}
25
- #cboxError{padding:50px; border:1px solid #ccc;}
26
- #cboxTitle{position:absolute; bottom:4px; left:0; text-align:center; width:100%; color:#949494;}
27
- #cboxCurrent{position:absolute; bottom:4px; left:58px; color:#949494;}
28
- #cboxSlideshow{position:absolute; bottom:4px; right:30px; color:#0092ef;}
29
- #cboxPrevious{position:absolute; bottom:0; left:0; background:url(../images/controls.png) no-repeat -75px 0; width:25px; height:25px; text-indent:-9999px;}
30
- #cboxPrevious:hover{background-position:-75px -25px;}
31
- #cboxNext{position:absolute; bottom:0; left:27px; background:url(../images/controls.png) no-repeat -50px 0; width:25px; height:25px; text-indent:-9999px;}
32
- #cboxNext:hover{background-position:-50px -25px;}
33
- #cboxLoadingOverlay{background:url(../images/loading_background.png) no-repeat center center;}
34
- #cboxLoadingGraphic{background:url(../images/loading.gif) no-repeat center center;}
35
- #cboxClose{position:absolute; bottom:0; right:0; background:url(../images/controls.png) no-repeat -25px 0; width:25px; height:25px; text-indent:-9999px; display: none;}
36
- #cboxClose:hover{background-position:-25px -25px;}
37
-
38
- .cboxIE #cboxTopLeft, .cboxIE #cboxTopCenter, .cboxIE #cboxTopRight, .cboxIE #cboxBottomLeft, .cboxIE #cboxBottomCenter, .cboxIE #cboxBottomRight, .cboxIE #cboxMiddleLeft, .cboxIE #cboxMiddleRight {
39
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF);
40
- }
41
-
42
- /*Jquery Better Checkboxes*/
43
- .tzCheckBox {
44
- background: url('../images/better_checkbox.png') no-repeat right bottom;
45
- display: inline-block;
46
- min-width: 60px;
47
- height: 33px;
48
- white-space: nowrap;
49
- position: relative;
50
- cursor: pointer;
51
- margin-left: 14px;
52
- }
53
-
54
- .tzCheckBox.checked {
55
- background-position: top left;
56
- margin: 0 14px 0 0;
57
- }
58
-
59
- .tzCheckBox .tzCBContent {
60
- color: white;
61
- line-height: 31px;
62
- padding-right: 38px;
63
- text-align: right;
64
- }
65
-
66
- .tzCheckBox.checked .tzCBContent {
67
- text-align: left;
68
- padding: 0 0 0 38px;
69
- }
70
-
71
- .tzCBPart {
72
- background: url('../images/better_checkbox.png') no-repeat left bottom;
73
- width: 14px;
74
- position: absolute;
75
- top: 0;
76
- left: -14px;
77
- height: 33px;
78
- overflow: hidden;
79
- }
80
-
81
- .tzCheckBox.checked .tzCBPart {
82
- background-position: top right;
83
- left: auto;
84
- right: -14px;
85
- }
86
-
87
- /*Jquery Vetical Tabs*/
88
- .vtabs {
89
- border: 1px solid #FFFFFF;
90
- margin: 10px 0 0;
91
- position: relative;
92
- }
93
-
94
- .vtabs .vtabs-tab-column {
95
- position: absolute; left: 0; margin: 0; width: 120px; min-width: 120px;
96
- }
97
-
98
- .vtabs .vtabs-tab-column ul {
99
- list-style: none;
100
- margin: 0px;
101
- padding: 0px;
102
- }
103
-
104
- .vtabs .vtabs-tab-column ul li.open, .vtabs .vtabs-tab-column ul li.closed {
105
- background-color: #ffffff;
106
- margin: 0 0 3px;
107
- min-height: 20px;
108
- padding: 4px 5px 1px 7px;
109
- z-index: 10;
110
- /* round corners do not work in IE */
111
- -moz-border-radius-topleft: 3px;
112
- -moz-border-radius-bottomleft: 3px;
113
- -webkit-border-top-left-radius: 3px;
114
- -webkit-border-bottom-left-radius: 3px;
115
- border-top: 1px solid #999999;
116
- border-bottom: 1px solid #999999;
117
- border-left: 1px solid #999999;
118
- }
119
-
120
- .vtabs .vtabs-tab-column ul li.closed {
121
- background-color: #bbbbbb;
122
- border-right: 1px solid #777777;
123
- background-image: url('../images/ClosedTabBackground.png');
124
- background-repeat:repeat-x;
125
- }
126
-
127
- .vtabs .vtabs-tab-column ul li:hover {
128
- cursor: pointer;
129
- }
130
-
131
- .vtabs .vtabs-tab-column ul li a.open, .vtabs .vtabs-tab-column ul li a.closed {
132
- font-weight: bold;
133
- margin: 0px;
134
- padding: 0px;
135
- text-decoration: none;
136
- }
137
-
138
- .vtabs .vtabs-content-column {
139
- padding: 0px;
140
- margin: 0px;
141
- }
142
-
143
- .vtabs .vtabs-content-column .vtabs-content-panel {
144
- background-color: #ffffff;
145
- padding-left: 7px;
146
- padding-right: 7px;
147
- padding-top: 3px;
148
- padding-bottom: 3px;
149
- margin: 0px;
150
- -moz-border-radius-topright: 3px;
151
- -moz-border-radius-bottomright: 3px;
152
- -moz-border-radius-bottomleft: 3px;
153
- -webkit-border-top-right-radius: 3px;
154
- -webkit-border-bottom-right-radius: 3px;
155
- -webkit-border-bottom-left-radius: 3px;
156
- border-top: 1px solid #999999;
157
- border-bottom: 1px solid #999999;
158
- border-right: 1px solid #999999;
159
- border-left: 1px solid #999999;
160
- }
161
-
162
- .vtabs-content-panel textarea, .wp-insert textarea {
163
- width: 100%;
164
- height: 150px;
165
- }
166
-
167
- .vtabs-content-panel p {
168
- margin: 5px 0 15px !important;
169
- }
170
- /*IOS CheckBox*/
171
- div.iPhoneCheckContainer {
172
- width: 129px;
173
- }
174
-
175
- .iPhoneCheckContainer {
176
- position: relative;
177
- height: 27px;
178
- cursor: pointer;
179
- overflow: hidden;
180
- }
181
-
182
- .iPhoneCheckContainer input {
183
- position: absolute;
184
- top: 5px;
185
- left: 30px;
186
- filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
187
- opacity: 0;
188
- }
189
-
190
- .iPhoneCheckContainer label {
191
- white-space: nowrap;
192
- font-size: 10px;
193
- line-height: 17px;
194
- font-weight: bold;
195
- font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
196
- cursor: pointer;
197
- display: block;
198
- height: 27px;
199
- position: absolute;
200
- width: auto;
201
- top: 0;
202
- padding-top: 5px;
203
- overflow: hidden;
204
- }
205
-
206
- .iPhoneCheckContainer, .iPhoneCheckContainer label {
207
- user-select: none;
208
- -moz-user-select: none;
209
- -khtml-user-select: none;
210
- }
211
-
212
- .iPhoneCheckDisabled {
213
- filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50);
214
- opacity: 0.5;
215
- }
216
-
217
- label.iPhoneCheckLabelOn {
218
- color: white;
219
- background: url('../images/iphone_on.png') no-repeat;
220
- text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.6);
221
- left: 0;
222
- padding-top: 5px;+
223
- }
224
-
225
- label.iPhoneCheckLabelOn span {
226
- padding-left: 8px;
227
- }
228
- label.iPhoneCheckLabelOff {
229
- color: #8b8b8b;
230
- background: url('../images/iphone_off.png') no-repeat right 0;
231
- text-shadow: 0px 0px 2px rgba(255, 255, 255, 0.6);
232
- text-align: right;
233
- right: 0;
234
- }
235
-
236
- label.iPhoneCheckLabelOff span {
237
- padding-right: 8px;
238
- }
239
-
240
- .iPhoneCheckHandle {
241
- display: block;
242
- height: 27px;
243
- cursor: pointer;
244
- position: absolute;
245
- top: 0;
246
- left: 0;
247
- width: 0;
248
- background: url('../images/iphone_slider_left.png') no-repeat;
249
- padding-left: 3px;
250
- }
251
-
252
- .iPhoneCheckHandleRight {
253
- height: 100%;
254
- width: 100%;
255
- padding-right: 3px;
256
- background: url('../images/iphone_slider_right.png') no-repeat right 0;
257
- }
258
-
259
- .iPhoneCheckHandleCenter {
260
- height: 100%;
261
- width: 100%;
262
- background: url('../images/iphone_slider_center.png');
263
- }
264
-
265
- .iOSCheckContainer {
266
- position: relative;
267
- height: 27px;
268
- cursor: pointer;
269
- overflow: hidden;
270
- }
271
-
272
- .iOSCheckContainer input {
273
- position: absolute;
274
- top: 5px;
275
- left: 30px;
276
- filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
277
- opacity: 0;
278
- }
279
-
280
- .iOSCheckContainer label {
281
- white-space: nowrap;
282
- font-size: 17px;
283
- line-height: 17px;
284
- font-weight: bold;
285
- font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
286
- cursor: pointer;
287
- display: block;
288
- height: 27px;
289
- position: absolute;
290
- width: auto;
291
- top: 0;
292
- padding-top: 5px;
293
- overflow: hidden;
294
- }
295
-
296
- .iOSCheckContainer, .iOSCheckContainer label {
297
- user-select: none;
298
- -moz-user-select: none;
299
- -khtml-user-select: none;
300
- }
301
-
302
- .iOSCheckDisabled {
303
- filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50);
304
- opacity: 0.5;
305
- }
306
-
307
- label.iOSCheckLabelOn {
308
- color: white;
309
- background: url('../images/iphone_on.png') no-repeat;
310
- text-shadow: 0px 0px 2px rgba(0, 0, 0, 0.6);
311
- left: 0;
312
- padding-top: 5px;
313
- }
314
-
315
- label.iOSCheckLabelOn span {
316
- padding-left: 8px;
317
- }
318
-
319
- label.iOSCheckLabelOff {
320
- color: #8b8b8b;
321
- background: url('../images/iphone_off.png') no-repeat right 0;
322
- text-shadow: 0px 0px 2px rgba(255, 255, 255, 0.6);
323
- text-align: right;
324
- right: 0;
325
- }
326
-
327
- label.iOSCheckLabelOff span {
328
- padding-right: 8px;
329
- }
330
-
331
- .iOSCheckHandle {
332
- display: block;
333
- height: 27px;
334
- cursor: pointer;
335
- position: absolute;
336
- top: 0;
337
- left: 0;
338
- width: 0;
339
- background: url('../images/iphone_slider_left.png') no-repeat;
340
- padding-left: 3px;
341
- }
342
-
343
- .iOSCheckHandleRight {
344
- height: 100%;
345
- width: 100%;
346
- padding-right: 3px;
347
- background: url('../images/iphone_slider_right.png') no-repeat right 0;
348
- }
349
-
350
- .iOSCheckHandleCenter {
351
- height: 100%;
352
- width: 100%;
353
- background: url('../images/iphone_slider_center.png');
354
- }
355
-
356
- /* Multiselect*/
357
- .multiselect { height: 360px; width: 560px; }
358
- .ui-multiselect { border: solid 1px; font-size: 0.8em; margin-bottom: 10px; }
359
- .ui-multiselect ul { -moz-user-select: none; }
360
- .ui-multiselect li { margin: 0; padding: 0; cursor: default; line-height: 20px; height: 20px; font-size: 11px; list-style: none; }
361
- .ui-multiselect li a { color: #999; text-decoration: none; padding: 0; display: block; float: left; cursor: pointer;}
362
- .ui-multiselect li.ui-draggable-dragging { padding-left: 10px; }
363
-
364
- .ui-multiselect div.selected { position: relative; padding: 0; margin: 0; border: 0; float:left; }
365
- .ui-multiselect ul.selected { position: relative; padding: 0; overflow: auto; overflow-x: hidden; background: #fff; margin: 0; list-style: none; border: 0; position: relative; width: 100%; }
366
- .ui-multiselect ul.selected li { }
367
-
368
- .ui-multiselect div.available { position: relative; padding: 0; margin: 0; border: 0; float:left; border-left: 1px solid; }
369
- .ui-multiselect ul.available { position: relative; padding: 0; overflow: auto; overflow-x: hidden; background: #fff; margin: 0; list-style: none; border: 0; width: 100%; }
370
- .ui-multiselect ul.available li { padding-left: 10px; }
371
-
372
- .ui-multiselect .ui-state-default { border: none; margin-bottom: 1px; position: relative; padding-left: 20px;}
373
- .ui-multiselect .ui-state-hover { border: none; }
374
- .ui-multiselect .ui-widget-header {border: none; font-size: 11px; margin-bottom: 1px;}
375
-
376
- .ui-multiselect .add-all { float: right; padding: 7px;}
377
- .ui-multiselect .remove-all { float: right; padding: 7px;}
378
- .ui-multiselect .search { float: left; padding: 4px;}
379
- .ui-multiselect .count { float: left; padding: 7px;}
380
-
381
- .ui-multiselect li span.ui-icon-arrowthick-2-n-s { position: absolute; left: 2px; }
382
- .ui-multiselect li a.action { position: absolute; right: 2px; top: 2px; }
383
-
384
- .ui-multiselect input.search { height: 14px; padding: 1px; opacity: 0.5; margin: 4px; width: 100px; }
385
-
386
- /*Admin Page*/
387
- .wp-insert .countryCode {
388
- margin: 5px 0 0;
389
- }
390
-
391
- .wp-insert input.submit {
392
- border: 4px solid gold;
393
- border-radius: 10px 10px 10px 10px;
394
- font-size: 24px;
395
- height: auto;
396
- padding: 10px 0;
397
- width: 97%;
398
- }
399
-
400
- .wp-insert .rules {
401
- margin: 10px 0;
402
- }
403
-
404
- .wp-insert .rules td {
405
- font-size: 10px;
406
- }
407
-
408
- .wp-insert .codeSnippet code {
409
- display: block;
410
- font-size: 16px;
411
- padding: 10px;
412
- vertical-align: middle;
413
- }
414
-
415
- .wp-insert .nicEdit-main ul {
416
- margin: 10px 0;
417
- padding: 10px 10px 10px 25px;
418
- }
419
-
420
- .wp-insert .nicEdit-main ul li {
421
- list-style: disc;
422
- }
1
+
2
+ /*ColorBox*/
3
+ #colorbox, #cboxOverlay, #cboxWrapper{ position:absolute; top:0; left:0; z-index:9999; overflow:hidden; }
4
+ #cboxOverlay{ position:fixed; width:100%; height:100%; }
5
+ #cboxMiddleLeft, #cboxBottomLeft{ clear:left; }
6
+ #cboxContent{ position:relative; }
7
+ #cboxLoadedContent{ overflow:auto; }
8
+ #cboxTitle{ margin:0; }
9
+ #cboxLoadingOverlay, #cboxLoadingGraphic{ position:absolute; top:0; left:0; width:100%; height:100%; }
10
+ #cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{ cursor:pointer; }
11
+ .cboxPhoto{ float:left; margin:auto; border:0; display:block; max-width:none; }
12
+ .cboxIframe{ width:100%; height:100%; display:block; border:0; }
13
+ #colorbox, #cboxContent, #cboxLoadedContent{ box-sizing:content-box; }
14
+ #cboxOverlay{ background:#000; }
15
+ #cboxTopLeft{ width:21px; height:21px; background:url(../images/controls.png) no-repeat -101px 0; }
16
+ #cboxTopRight{ width:21px; height:21px; background:url(../images/controls.png) no-repeat -130px 0; }
17
+ #cboxBottomLeft{ width:21px; height:21px; background:url(../images/controls.png) no-repeat -101px -29px; }
18
+ #cboxBottomRight{ width:21px; height:21px; background:url(../images/controls.png) no-repeat -130px -29px; }
19
+ #cboxMiddleLeft{ width:21px; background:url(../images/controls.png) left top repeat-y; }
20
+ #cboxMiddleRight{ width:21px; background:url(../images/controls.png) right top repeat-y; }
21
+ #cboxTopCenter{ height:21px; background:url(../images/border.png) 0 0 repeat-x; }
22
+ #cboxBottomCenter{ height:21px; background:url(../images/border.png) 0 -29px repeat-x; }
23
+ #cboxContent{ background:#fff; overflow:hidden; }
24
+ .cboxIframe{ background:#fff; }
25
+ #cboxError{ padding:50px; border:1px solid #ccc; }
26
+ #cboxTitle{ position:absolute; bottom:4px; left:0; text-align:center; width:100%; color:#949494; }
27
+ #cboxCurrent{ position:absolute; bottom:4px; left:58px; color:#949494; }
28
+ #cboxSlideshow{ position:absolute; bottom:4px; right:30px; color:#0092ef; }
29
+ #cboxPrevious{ position:absolute; bottom:0; left:0; background:url(../images/controls.png) no-repeat -75px 0; width:25px; height:25px; text-indent:-9999px; }
30
+ #cboxPrevious:hover{ background-position:-75px -25px; }
31
+ #cboxNext{ position:absolute; bottom:0; left:27px; background:url(../images/controls.png) no-repeat -50px 0; width:25px; height:25px; text-indent:-9999px; }
32
+ #cboxNext:hover{ background-position:-50px -25px; }
33
+ #cboxLoadingOverlay{ background:url(../images/loading_background.png) no-repeat center center; }
34
+ #cboxLoadingGraphic{ background:url(../images/loading.gif) no-repeat center center; }
35
+ #cboxClose{ position:absolute; bottom:0; right:0; background:url(../images/controls.png) no-repeat -25px 0; width:25px; height:25px; text-indent:-9999px; display:none; }
36
+ #cboxClose:hover{ background-position:-25px -25px; }
37
+ .cboxIE #cboxTopLeft, .cboxIE #cboxTopCenter, .cboxIE #cboxTopRight, .cboxIE #cboxBottomLeft, .cboxIE #cboxBottomCenter, .cboxIE #cboxBottomRight, .cboxIE #cboxMiddleLeft, .cboxIE #cboxMiddleRight{ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF, endColorstr=#00FFFFFF); }
38
+
39
+ /*Jquery Better Checkboxes*/
40
+ .tzCheckBox{ background:url('../images/better_checkbox.png') no-repeat right bottom; display:inline-block; min-width:60px; height:33px; white-space:nowrap; position:relative; cursor:pointer; margin-left:14px; }
41
+ .tzCheckBox.checked{ background-position:top left; margin:0 14px 0 0; }
42
+ .tzCheckBox .tzCBContent{ color:white; line-height:31px; padding-right:38px; text-align:right; }
43
+ .tzCheckBox.checked .tzCBContent{ text-align:left; padding:0 0 0 38px; }
44
+ .tzCBPart{ background:url('../images/better_checkbox.png') no-repeat left bottom; width:14px; position:absolute; top:0; left:-14px; height:33px; overflow:hidden; }
45
+ .tzCheckBox.checked .tzCBPart{ background-position:top right; left:auto; right:-14px; }
46
+
47
+ /*Jquery Vetical Tabs*/
48
+ .vtabs{ border:1px solid #FFFFFF; margin:10px 0 0; position:relative; }
49
+ .vtabs .vtabs-tab-column{ position:absolute; left:0; margin:0; width:120px; min-width:120px; }
50
+ .vtabs .vtabs-tab-column ul{ list-style:none; margin:0px; padding:0px; }
51
+ .vtabs .vtabs-tab-column ul li.open, .vtabs .vtabs-tab-column ul li.closed{ background-color:#ffffff; margin:0 0 3px; min-height:20px; padding:4px 5px 1px 7px; z-index:10;
52
+ /* round corners do not work in IE */
53
+ -moz-border-radius-topleft:3px; -moz-border-radius-bottomleft:3px; -webkit-border-top-left-radius:3px; -webkit-border-bottom-left-radius:3px; border-top:1px solid #999999; border-bottom:1px solid #999999; border-left:1px solid #999999; }
54
+ .vtabs .vtabs-tab-column ul li.closed{ background-color:#bbbbbb; border-right:1px solid #777777; background-image:url('../images/ClosedTabBackground.png'); background-repeat:repeat-x; }
55
+ .vtabs .vtabs-tab-column ul li:hover{ cursor:pointer; }
56
+ .vtabs .vtabs-tab-column ul li a.open, .vtabs .vtabs-tab-column ul li a.closed{ font-weight:bold; margin:0px; padding:0px; text-decoration:none; }
57
+ .vtabs .vtabs-content-column{ padding:0px; margin:0px; }
58
+ .vtabs .vtabs-content-column .vtabs-content-panel{ background-color:#ffffff; padding-left:7px; padding-right:7px; padding-top:3px; padding-bottom:3px; margin:0px; -moz-border-radius-topright:3px; -moz-border-radius-bottomright:3px; -moz-border-radius-bottomleft:3px; -webkit-border-top-right-radius:3px; -webkit-border-bottom-right-radius:3px; -webkit-border-bottom-left-radius:3px; border-top:1px solid #999999; border-bottom:1px solid #999999; border-right:1px solid #999999; border-left:1px solid #999999; }
59
+ .vtabs-content-panel textarea, .wp-insert textarea{ width:100%; height:250px; }
60
+ .vtabs-content-panel p{ margin:5px 0 15px !important; }
61
+
62
+ /*IOS CheckBox*/
63
+ div.iPhoneCheckContainer{ width:129px; }
64
+ .iPhoneCheckContainer{ position:relative; height:27px; cursor:pointer; overflow:hidden; }
65
+ .iPhoneCheckContainer input{ position:absolute; top:5px; left:30px; filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0); opacity:0; }
66
+ .iPhoneCheckContainer label{ white-space:nowrap; font-size:10px; line-height:17px; font-weight:bold; font-family:"Helvetica Neue", Arial, Helvetica, sans-serif; cursor:pointer; display:block; height:27px; position:absolute; width:auto; top:0; padding-top:5px; overflow:hidden; }
67
+ .iPhoneCheckContainer, .iPhoneCheckContainer label{ user-select:none; -moz-user-select:none; -khtml-user-select:none; }
68
+ .iPhoneCheckDisabled{ filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=50); opacity:0.5; }
69
+ label.iPhoneCheckLabelOn{ color:white; background:url('../images/iphone_on.png') no-repeat; text-shadow:0px 0px 2px rgba(0, 0, 0, 0.6); left:0; padding-top:5px; +}
70
+ label.iPhoneCheckLabelOn span{ padding-left:8px; }
71
+ label.iPhoneCheckLabelOff{ color:#8b8b8b; background:url('../images/iphone_off.png') no-repeat right 0; text-shadow:0px 0px 2px rgba(255, 255, 255, 0.6); text-align:right; right:0; }
72
+ label.iPhoneCheckLabelOff span{ padding-right:8px; }
73
+ .iPhoneCheckHandle{ display:block; height:27px; cursor:pointer; position:absolute; top:0; left:0; width:0; background:url('../images/iphone_slider_left.png') no-repeat; padding-left:3px; }
74
+ .iPhoneCheckHandleRight{ height:100%; width:100%; padding-right:3px; background:url('../images/iphone_slider_right.png') no-repeat right 0; }
75
+ .iPhoneCheckHandleCenter{ height:100%; width:100%; background:url('../images/iphone_slider_center.png'); }
76
+ .iOSCheckContainer{ position:relative; height:27px; cursor:pointer; overflow:hidden; }
77
+ .iOSCheckContainer input{ position:absolute; top:5px; left:30px; filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0); opacity:0; }
78
+ .iOSCheckContainer label{ white-space:nowrap; font-size:17px; line-height:17px; font-weight:bold; font-family:"Helvetica Neue", Arial, Helvetica, sans-serif; cursor:pointer; display:block; height:27px; position:absolute; width:auto; top:0; padding-top:5px; overflow:hidden; }
79
+ .iOSCheckContainer, .iOSCheckContainer label{ user-select:none; -moz-user-select:none; -khtml-user-select:none; }
80
+ .iOSCheckDisabled{ filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=50); opacity:0.5; }
81
+ label.iOSCheckLabelOn{ color:white; background:url('../images/iphone_on.png') no-repeat; text-shadow:0px 0px 2px rgba(0, 0, 0, 0.6); left:0; padding-top:5px; }
82
+ label.iOSCheckLabelOn span{ padding-left:8px; }
83
+ label.iOSCheckLabelOff{ color:#8b8b8b; background:url('../images/iphone_off.png') no-repeat right 0; text-shadow:0px 0px 2px rgba(255, 255, 255, 0.6); text-align:right; right:0; }
84
+ label.iOSCheckLabelOff span{ padding-right:8px; }
85
+ .iOSCheckHandle{ display:block; height:27px; cursor:pointer; position:absolute; top:0; left:0; width:0; background:url('../images/iphone_slider_left.png') no-repeat; padding-left:3px; }
86
+ .iOSCheckHandleRight{ height:100%; width:100%; padding-right:3px; background:url('../images/iphone_slider_right.png') no-repeat right 0; }
87
+ .iOSCheckHandleCenter{ height:100%; width:100%; background:url('../images/iphone_slider_center.png'); }
88
+
89
+ /* Multiselect*/
90
+ .multiselect{ height:360px; width:560px; }
91
+ .ui-multiselect{ border:solid 1px; font-size:0.8em; margin-bottom:10px; }
92
+ .ui-multiselect ul{ -moz-user-select:none; }
93
+ .ui-multiselect li{ margin:0; padding:0; cursor:default; line-height:20px; height:20px; font-size:11px; list-style:none; }
94
+ .ui-multiselect li a{ color:#999; text-decoration:none; padding:0; display:block; float:left; cursor:pointer; }
95
+ .ui-multiselect li.ui-draggable-dragging{ padding-left:10px; }
96
+ .ui-multiselect div.selected{ position:relative; padding:0; margin:0; border:0; float:left; }
97
+ .ui-multiselect ul.selected{ position:relative; padding:0; overflow:auto; overflow-x:hidden; background:#fff; margin:0; list-style:none; border:0; position:relative; width:100%; }
98
+ .ui-multiselect ul.selected li{ }
99
+ .ui-multiselect div.available{ position:relative; padding:0; margin:0; border:0; float:left; border-left:1px solid; }
100
+ .ui-multiselect ul.available{ position:relative; padding:0; overflow:auto; overflow-x:hidden; background:#fff; margin:0; list-style:none; border:0; width:100%; }
101
+ .ui-multiselect ul.available li{ padding-left:10px; }
102
+ .ui-multiselect .ui-state-default{ border:none; margin-bottom:1px; position:relative; padding-left:20px; }
103
+ .ui-multiselect .ui-state-hover{ border:none; }
104
+ .ui-multiselect .ui-widget-header{ border:none; font-size:11px; margin-bottom:1px; }
105
+ .ui-multiselect .add-all{ float:right; padding:7px; }
106
+ .ui-multiselect .remove-all{ float:right; padding:7px; }
107
+ .ui-multiselect .search{ float:left; padding:4px; }
108
+ .ui-multiselect .count{ float:left; padding:7px; }
109
+ .ui-multiselect li span.ui-icon-arrowthick-2-n-s{ position:absolute; left:2px; }
110
+ .ui-multiselect li a.action{ position:absolute; right:2px; top:2px; }
111
+ .ui-multiselect input.search{ height:14px; padding:1px; opacity:0.5; margin:4px; width:100px; }
112
+
113
+ /*Mini Colors*/
114
+ .minicolors{ position:relative; display: block; z-index:1; }
115
+ .minicolors-focus{ z-index:2; }
116
+ .minicolors.minicolors-theme-default .minicolors-input{ margin:0px; margin-right:3px; border:solid 1px #CCC; font:14px sans-serif; width:65px; height:16px; border-radius:0; box-shadow:inset 0 2px 4px rgba(0,0,0,.04); padding:2px; margin-right:-1px; }
117
+ .minicolors-theme-default.minicolors .minicolors-input{ vertical-align:middle; outline:none; }
118
+ .minicolors-theme-default.minicolors-swatch-left .minicolors-input{ margin-left:-1px; margin-right:auto; }
119
+ .minicolors-theme-default.minicolors-focus .minicolors-input,.minicolors-theme-default.minicolors-focus .minicolors-swatch{ border-color:#999; }
120
+ .minicolors-hidden{ position:absolute; left:-9999em; }
121
+ .minicolors-swatch{ position:relative; width:16px; height:16px; text-align:left; background:url(../images/jquery.minicolors.png) -80px 0; border:solid 1px #CCC; vertical-align:middle; display:inline-block; }
122
+ .minicolors-swatch span{ position:absolute; width:100%; height:100%; background:none; box-shadow:inset 0 9px 0 rgba(255,255,255,.1); display:inline-block; }
123
+ .minicolors-panel{ position:absolute; top:2px; left:0; width:173px; height:152px; background:white; border:solid 1px #CCC; box-shadow:0 0 20px rgba(0,0,0,.2); display:none; }
124
+ .minicolors-position-top .minicolors-panel{ top:-133px; }
125
+ .minicolors-position-left .minicolors-panel{ left:-83px; }
126
+ .minicolors-position-left.minicolors-with-opacity .minicolors-panel{ left:-104px; }
127
+ .minicolors-with-opacity .minicolors-panel{ width:194px; }
128
+ .minicolors .minicolors-grid{ position:absolute; top:1px; left:1px; width:150px; height:150px; background:url(../images/jquery.minicolors.png) -120px 0; cursor:crosshair; }
129
+ .minicolors .minicolors-grid-inner{ position:absolute; top:0; left:0; width:150px; height:150px; background:none; }
130
+ .minicolors-slider-saturation .minicolors-grid{ background-position:-420px 0; }
131
+ .minicolors-slider-saturation .minicolors-grid-inner{ background:url(../images/jquery.minicolors.png) -270px 0; }
132
+ .minicolors-slider-brightness .minicolors-grid{ background-position:-570px 0; }
133
+ .minicolors-slider-brightness .minicolors-grid-inner{ background:black; }
134
+ .minicolors-slider-wheel .minicolors-grid{ background-position:-720px 0; }
135
+ .minicolors-slider,.minicolors-opacity-slider{ position:absolute; top:1px; left:152px; width:20px; height:150px; background:white url(../images/jquery.minicolors.png) 0 0; cursor:crosshair; }
136
+ .minicolors-slider-saturation .minicolors-slider{ background-position:-60px 0; }
137
+ .minicolors-slider-brightness .minicolors-slider{ background-position:-20px 0; }
138
+ .minicolors-slider-wheel .minicolors-slider{ background-position:-20px 0; }
139
+ .minicolors-opacity-slider{ left:173px; background-position:-40px 0; display:none; }
140
+ .minicolors-with-opacity .minicolors-opacity-slider{ display:block; }
141
+ .minicolors-grid .minicolors-picker{ position:absolute; top:70px; left:70px; width:10px; height:10px; border:solid 1px black; border-radius:10px; margin-top:-6px; margin-left:-6px; background:none; }
142
+ .minicolors-grid .minicolors-picker span{ position:absolute; top:0; left:0; width:6px; height:6px; border-radius:6px; border:solid 2px white; }
143
+ .minicolors-picker{ position:absolute; top:0; left:0; width:18px; height:2px; background:white; border:solid 1px black; margin-top:-2px; }
144
+ .minicolors-inline .minicolors-input,.minicolors-inline .minicolors-swatch{ display:none; }
145
+ .minicolors-inline .minicolors-panel{ position:relative; top:auto; left:auto; display:inline-block; }
146
+ .minicolors-theme-bootstrap .minicolors-input{ padding:4px 6px; padding-left:30px; background-color:white; border:1px solid #CCC; border-radius:3px; height:19px; margin:0px; box-shadow:inset 0 1px 1px rgba(0,0,0,0.075); }
147
+ .minicolors-theme-bootstrap.minicolors-focus .minicolors-input{ border-color:#6fb8f1; box-shadow:0 0 10px #6fb8f1; outline:none; }
148
+ .minicolors-theme-bootstrap .minicolors-swatch{ position:absolute; left:2px; top:2px; z-index:2; }
149
+ .minicolors-theme-bootstrap.minicolors-swatch-position-right .minicolors-input{ height: 22px; padding: 1px 30px 0 6px; }
150
+ .minicolors-theme-bootstrap.minicolors-swatch-position-right .minicolors-swatch{ left:auto; right:2px; }
151
+ .minicolors-theme-bootstrap .minicolors-panel{ top:2px; z-index:3; }
152
+ .minicolors-theme-bootstrap.minicolors-position-top .minicolors-panel{ top:-133px; }
153
+ .minicolors-theme-bootstrap.minicolors-position-left .minicolors-panel{ left:-63px; }
154
+ .minicolors-theme-bootstrap.minicolors-position-left.minicolors-with-opacity .minicolors-panel{ left:-84px; }
155
+
156
+ /*Admin Page*/
157
+ .wp-insert .countryCode{ margin:5px 0 0; }
158
+ .wp-insert input.submit{ border:4px solid gold; border-radius:10px 10px 10px 10px; font-size:24px; height:auto; padding:10px 0; width:97%; }
159
+ .wp-insert .rules{ margin:10px 0; }
160
+ .wp-insert .rules td{ font-size:10px; }
161
+ .wp-insert .codeSnippet code{ display:block; font-size:16px; padding:10px; vertical-align:middle; }
162
+ .wp-insert .nicEdit-main ul{ margin:10px 0; padding:10px 10px 10px 25px; }
163
+ .wp-insert .nicEdit-main ul li{ list-style:disc; }
164
+ .wp-insert .chitikaButton{ background:url('../images/chitika_btn.png'); border-radius:5px 5px 5px 5px; box-shadow:0 0 6px #666666; cursor:pointer; height:48px; margin-left:10px; margin-top:-60px; position:relative; width:48px; z-index:10; opacity:0; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/common/geoip/GeoIP.dat CHANGED
Binary file
includes/common/images/chitika.gif DELETED
Binary file
includes/common/images/chitika.png ADDED
Binary file
includes/common/images/chitika_banner.png ADDED
Binary file
includes/common/images/chitika_btn.png ADDED
Binary file
includes/common/images/jquery.minicolors.png ADDED
Binary file
includes/common/js/jquery.minicolors.js ADDED
@@ -0,0 +1,857 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery MiniColors: A tiny color picker built on jQuery
3
+ *
4
+ * Copyright Cory LaViska for A Beautiful Site, LLC. (http://www.abeautifulsite.net/)
5
+ *
6
+ * Dual-licensed under the MIT and GPL Version 2 licenses
7
+ *
8
+ */
9
+ if(jQuery) (function($) {
10
+
11
+ // Yay, MiniColors!
12
+ $.minicolors = {
13
+ // Default settings
14
+ defaultSettings: {
15
+ animationSpeed: 100,
16
+ animationEasing: 'swing',
17
+ change: null,
18
+ changeDelay: 0,
19
+ control: 'hue',
20
+ defaultValue: '',
21
+ hide: null,
22
+ hideSpeed: 100,
23
+ inline: false,
24
+ letterCase: 'lowercase',
25
+ opacity: false,
26
+ position: 'default',
27
+ show: null,
28
+ showSpeed: 100,
29
+ swatchPosition: 'left',
30
+ textfield: true,
31
+ theme: 'default'
32
+ }
33
+ };
34
+
35
+ // Public methods
36
+ $.extend($.fn, {
37
+ minicolors: function(method, data) {
38
+
39
+ switch(method) {
40
+
41
+ // Destroy the control
42
+ case 'destroy':
43
+ $(this).each( function() {
44
+ destroy($(this));
45
+ });
46
+ return $(this);
47
+
48
+ // Hide the color picker
49
+ case 'hide':
50
+ hide();
51
+ return $(this);
52
+
53
+ // Get/set opacity
54
+ case 'opacity':
55
+ if( data === undefined ) {
56
+ // Getter
57
+ return $(this).attr('data-opacity');
58
+ } else {
59
+ // Setter
60
+ $(this).each( function() {
61
+ refresh($(this).attr('data-opacity', data));
62
+ });
63
+ return $(this);
64
+ }
65
+
66
+ // Get an RGB(A) object based on the current color/opacity
67
+ case 'rgbObject':
68
+ return rgbObject($(this), method === 'rgbaObject');
69
+
70
+ // Get an RGB(A) string based on the current color/opacity
71
+ case 'rgbString':
72
+ case 'rgbaString':
73
+ return rgbString($(this), method === 'rgbaString')
74
+
75
+ // Get/set settings on the fly
76
+ case 'settings':
77
+ if( data === undefined ) {
78
+ return $(this).data('minicolors-settings');
79
+ } else {
80
+ // Setter
81
+ $(this).each( function() {
82
+ var settings = $(this).data('minicolors-settings') || {};
83
+ destroy($(this));
84
+ $(this).minicolors($.extend(true, settings, data));
85
+ });
86
+ return $(this);
87
+ }
88
+
89
+ // Show the color picker
90
+ case 'show':
91
+ show( $(this).eq(0) );
92
+ return $(this);
93
+
94
+ // Get/set the hex color value
95
+ case 'value':
96
+ if( data === undefined ) {
97
+ // Getter
98
+ return $(this).val();
99
+ } else {
100
+ // Setter
101
+ $(this).each( function() {
102
+ refresh($(this).val(data));
103
+ });
104
+ return $(this);
105
+ }
106
+
107
+ // Initializes the control
108
+ case 'create':
109
+ default:
110
+ if( method !== 'create' ) data = method;
111
+ $(this).each( function() {
112
+ init($(this), data);
113
+ });
114
+ return $(this);
115
+
116
+ }
117
+
118
+ }
119
+ });
120
+
121
+ // Initialize input elements
122
+ function init(input, settings) {
123
+
124
+ var minicolors = $('<span class="minicolors" />'),
125
+ defaultSettings = $.minicolors.defaultSettings;
126
+
127
+ // Do nothing if already initialized
128
+ if( input.data('minicolors-initialized') ) return;
129
+
130
+ // Handle settings
131
+ settings = $.extend(true, {}, defaultSettings, settings);
132
+
133
+ // The wrapper
134
+ minicolors
135
+ .addClass('minicolors-theme-' + settings.theme)
136
+ .addClass('minicolors-swatch-position-' + settings.swatchPosition)
137
+ .toggleClass('minicolors-swatch-left', settings.swatchPosition === 'left')
138
+ .toggleClass('minicolors-with-opacity', settings.opacity);
139
+
140
+ // Custom positioning
141
+ if( settings.position !== undefined ) {
142
+ $.each(settings.position.split(' '), function() {
143
+ minicolors.addClass('minicolors-position-' + this);
144
+ });
145
+ }
146
+
147
+ // The input
148
+ input
149
+ .addClass('minicolors-input')
150
+ .data('minicolors-initialized', true)
151
+ .data('minicolors-settings', settings)
152
+ .prop('size', 7)
153
+ .prop('maxlength', 7)
154
+ .wrap(minicolors)
155
+ .after(
156
+ '<span class="minicolors-panel minicolors-slider-' + settings.control + '">' +
157
+ '<span class="minicolors-slider">' +
158
+ '<span class="minicolors-picker"></span>' +
159
+ '</span>' +
160
+ '<span class="minicolors-opacity-slider">' +
161
+ '<span class="minicolors-picker"></span>' +
162
+ '</span>' +
163
+ '<span class="minicolors-grid">' +
164
+ '<span class="minicolors-grid-inner"></span>' +
165
+ '<span class="minicolors-picker"><span></span></span>' +
166
+ '</span>' +
167
+ '</span>'
168
+ );
169
+
170
+ // Prevent text selection in IE
171
+ input.parent().find('.minicolors-panel').on('selectstart', function() { return false; }).end();
172
+
173
+ // Detect swatch position
174
+ if( settings.swatchPosition === 'left' ) {
175
+ // Left
176
+ input.before('<span class="minicolors-swatch"><span></span></span>');
177
+ } else {
178
+ // Right
179
+ input.after('<span class="minicolors-swatch"><span></span></span>');
180
+ }
181
+
182
+ // Disable textfield
183
+ if( !settings.textfield ) input.addClass('minicolors-hidden');
184
+
185
+ // Inline controls
186
+ if( settings.inline ) input.parent().addClass('minicolors-inline');
187
+
188
+ updateFromInput(input, false, true);
189
+
190
+ }
191
+
192
+ // Returns the input back to its original state
193
+ function destroy(input) {
194
+
195
+ var minicolors = input.parent();
196
+
197
+ // Revert the input element
198
+ input
199
+ .removeData('minicolors-initialized')
200
+ .removeData('minicolors-settings')
201
+ .removeProp('size')
202
+ .removeProp('maxlength')
203
+ .removeClass('minicolors-input');
204
+
205
+ // Remove the wrap and destroy whatever remains
206
+ minicolors.before(input).remove();
207
+
208
+ }
209
+
210
+ // Refresh the specified control
211
+ function refresh(input) {
212
+ updateFromInput(input);
213
+ }
214
+
215
+ // Shows the specified dropdown panel
216
+ function show(input) {
217
+
218
+ var minicolors = input.parent(),
219
+ panel = minicolors.find('.minicolors-panel'),
220
+ settings = input.data('minicolors-settings');
221
+
222
+ // Do nothing if uninitialized, disabled, inline, or already open
223
+ if( !input.data('minicolors-initialized') ||
224
+ input.prop('disabled') ||
225
+ minicolors.hasClass('minicolors-inline') ||
226
+ minicolors.hasClass('minicolors-focus')
227
+ ) return;
228
+
229
+ hide();
230
+
231
+ minicolors.addClass('minicolors-focus');
232
+ panel
233
+ .stop(true, true)
234
+ .fadeIn(settings.showSpeed, function() {
235
+ if( settings.show ) settings.show.call(input.get(0));
236
+ });
237
+
238
+ }
239
+
240
+ // Hides all dropdown panels
241
+ function hide() {
242
+
243
+ $('.minicolors-input').each( function() {
244
+
245
+ var input = $(this),
246
+ settings = input.data('minicolors-settings'),
247
+ minicolors = input.parent();
248
+
249
+ // Don't hide inline controls
250
+ if( settings.inline ) return;
251
+
252
+ minicolors.find('.minicolors-panel').fadeOut(settings.hideSpeed, function() {
253
+ if(minicolors.hasClass('minicolors-focus')) {
254
+ if( settings.hide ) settings.hide.call(input.get(0));
255
+ }
256
+ minicolors.removeClass('minicolors-focus');
257
+ });
258
+
259
+ });
260
+ }
261
+
262
+ // Moves the selected picker
263
+ function move(target, event, animate) {
264
+
265
+ var input = target.parents('.minicolors').find('.minicolors-input'),
266
+ settings = input.data('minicolors-settings'),
267
+ picker = target.find('[class$=-picker]'),
268
+ offsetX = target.offset().left,
269
+ offsetY = target.offset().top,
270
+ x = Math.round(event.pageX - offsetX),
271
+ y = Math.round(event.pageY - offsetY),
272
+ duration = animate ? settings.animationSpeed : 0,
273
+ wx, wy, r, phi;
274
+
275
+
276
+ // Touch support
277
+ if( event.originalEvent.changedTouches ) {
278
+ x = event.originalEvent.changedTouches[0].pageX - offsetX;
279
+ y = event.originalEvent.changedTouches[0].pageY - offsetY;
280
+ }
281
+
282
+ // Constrain picker to its container
283
+ if( x < 0 ) x = 0;
284
+ if( y < 0 ) y = 0;
285
+ if( x > target.width() ) x = target.width();
286
+ if( y > target.height() ) y = target.height();
287
+
288
+ // Constrain color wheel values to the wheel
289
+ if( target.parent().is('.minicolors-slider-wheel') && picker.parent().is('.minicolors-grid') ) {
290
+ wx = 75 - x;
291
+ wy = 75 - y;
292
+ r = Math.sqrt(wx * wx + wy * wy);
293
+ phi = Math.atan2(wy, wx);
294
+ if( phi < 0 ) phi += Math.PI * 2;
295
+ if( r > 75 ) {
296
+ r = 75;
297
+ x = 75 - (75 * Math.cos(phi));
298
+ y = 75 - (75 * Math.sin(phi));
299
+ }
300
+ x = Math.round(x);
301
+ y = Math.round(y);
302
+ }
303
+
304
+ // Move the picker
305
+ if( target.is('.minicolors-grid') ) {
306
+ picker
307
+ .stop(true)
308
+ .animate({
309
+ top: y + 'px',
310
+ left: x + 'px'
311
+ }, duration, settings.animationEasing, function() {
312
+ updateFromControl(input, target);
313
+ });
314
+ } else {
315
+ picker
316
+ .stop(true)
317
+ .animate({
318
+ top: y + 'px'
319
+ }, duration, settings.animationEasing, function() {
320
+ updateFromControl(input, target);
321
+ });
322
+ }
323
+
324
+ }
325
+
326
+ // Sets the input based on the color picker values
327
+ function updateFromControl(input, target) {
328
+
329
+ function getCoords(picker, container) {
330
+
331
+ var left, top;
332
+ if( !picker.length || !container ) return null;
333
+ left = picker.offset().left;
334
+ top = picker.offset().top;
335
+
336
+ return {
337
+ x: left - container.offset().left + (picker.outerWidth() / 2),
338
+ y: top - container.offset().top + (picker.outerHeight() / 2)
339
+ };
340
+
341
+ }
342
+
343
+ var hue, saturation, brightness, rgb, x, y, r, phi,
344
+
345
+ hex = input.val(),
346
+ opacity = input.attr('data-opacity'),
347
+
348
+ // Helpful references
349
+ minicolors = input.parent(),
350
+ settings = input.data('minicolors-settings'),
351
+ panel = minicolors.find('.minicolors-panel'),
352
+ swatch = minicolors.find('.minicolors-swatch'),
353
+
354
+ // Panel objects
355
+ grid = minicolors.find('.minicolors-grid'),
356
+ slider = minicolors.find('.minicolors-slider'),
357
+ opacitySlider = minicolors.find('.minicolors-opacity-slider'),
358
+
359
+ // Picker objects
360
+ gridPicker = grid.find('[class$=-picker]'),
361
+ sliderPicker = slider.find('[class$=-picker]'),
362
+ opacityPicker = opacitySlider.find('[class$=-picker]'),
363
+
364
+ // Picker positions
365
+ gridPos = getCoords(gridPicker, grid),
366
+ sliderPos = getCoords(sliderPicker, slider),
367
+ opacityPos = getCoords(opacityPicker, opacitySlider);
368
+
369
+ // Handle colors
370
+ if( target.is('.minicolors-grid, .minicolors-slider') ) {
371
+
372
+ // Determine HSB values
373
+ switch(settings.control) {
374
+
375
+ case 'wheel':
376
+ // Calculate hue, saturation, and brightness
377
+ x = (grid.width() / 2) - gridPos.x;
378
+ y = (grid.height() / 2) - gridPos.y;
379
+ r = Math.sqrt(x * x + y * y);
380
+ phi = Math.atan2(y, x);
381
+ if( phi < 0 ) phi += Math.PI * 2;
382
+ if( r > 75 ) {
383
+ r = 75;
384
+ gridPos.x = 69 - (75 * Math.cos(phi));
385
+ gridPos.y = 69 - (75 * Math.sin(phi));
386
+ }
387
+ saturation = keepWithin(r / 0.75, 0, 100);
388
+ hue = keepWithin(phi * 180 / Math.PI, 0, 360);
389
+ brightness = keepWithin(100 - Math.floor(sliderPos.y * (100 / slider.height())), 0, 100);
390
+ hex = hsb2hex({
391
+ h: hue,
392
+ s: saturation,
393
+ b: brightness
394
+ });
395
+
396
+ // Update UI
397
+ slider.css('backgroundColor', hsb2hex({ h: hue, s: saturation, b: 100 }));
398
+ break;
399
+
400
+ case 'saturation':
401
+ // Calculate hue, saturation, and brightness
402
+ hue = keepWithin(parseInt(gridPos.x * (360 / grid.width())), 0, 360);
403
+ saturation = keepWithin(100 - Math.floor(sliderPos.y * (100 / slider.height())), 0, 100);
404
+ brightness = keepWithin(100 - Math.floor(gridPos.y * (100 / grid.height())), 0, 100);
405
+ hex = hsb2hex({
406
+ h: hue,
407
+ s: saturation,
408
+ b: brightness
409
+ });
410
+
411
+ // Update UI
412
+ slider.css('backgroundColor', hsb2hex({ h: hue, s: 100, b: brightness }));
413
+ minicolors.find('.minicolors-grid-inner').css('opacity', saturation / 100);
414
+ break;
415
+
416
+ case 'brightness':
417
+ // Calculate hue, saturation, and brightness
418
+ hue = keepWithin(parseInt(gridPos.x * (360 / grid.width())), 0, 360);
419
+ saturation = keepWithin(100 - Math.floor(gridPos.y * (100 / grid.height())), 0, 100);
420
+ brightness = keepWithin(100 - Math.floor(sliderPos.y * (100 / slider.height())), 0, 100);
421
+ hex = hsb2hex({
422
+ h: hue,
423
+ s: saturation,
424
+ b: brightness
425
+ });
426
+
427
+ // Update UI
428
+ slider.css('backgroundColor', hsb2hex({ h: hue, s: saturation, b: 100 }));
429
+ minicolors.find('.minicolors-grid-inner').css('opacity', 1 - (brightness / 100));
430
+ break;
431
+
432
+ default:
433
+ // Calculate hue, saturation, and brightness
434
+ hue = keepWithin(360 - parseInt(sliderPos.y * (360 / slider.height())), 0, 360);
435
+ saturation = keepWithin(Math.floor(gridPos.x * (100 / grid.width())), 0, 100);
436
+ brightness = keepWithin(100 - Math.floor(gridPos.y * (100 / grid.height())), 0, 100);
437
+ hex = hsb2hex({
438
+ h: hue,
439
+ s: saturation,
440
+ b: brightness
441
+ });
442
+
443
+ // Update UI
444
+ grid.css('backgroundColor', hsb2hex({ h: hue, s: 100, b: 100 }));
445
+ break;
446
+
447
+ }
448
+
449
+ // Adjust case
450
+ input.val( convertCase(hex, settings.letterCase) );
451
+
452
+ }
453
+
454
+ // Handle opacity
455
+ if( target.is('.minicolors-opacity-slider') ) {
456
+ if( settings.opacity ) {
457
+ opacity = parseFloat(1 - (opacityPos.y / opacitySlider.height())).toFixed(2);
458
+ } else {
459
+ opacity = 1;
460
+ }
461
+ if( settings.opacity ) input.attr('data-opacity', opacity);
462
+ }
463
+
464
+ // Set swatch color
465
+ swatch.find('SPAN').css({
466
+ backgroundColor: hex,
467
+ opacity: opacity
468
+ });
469
+
470
+ // Handle change event
471
+ doChange(input, hex, opacity);
472
+
473
+ }
474
+
475
+ // Sets the color picker values from the input
476
+ function updateFromInput(input, preserveInputValue, firstRun) {
477
+
478
+ var hex,
479
+ hsb,
480
+ opacity,
481
+ x, y, r, phi,
482
+
483
+ // Helpful references
484
+ minicolors = input.parent(),
485
+ settings = input.data('minicolors-settings'),
486
+ swatch = minicolors.find('.minicolors-swatch'),
487
+
488
+ // Panel objects
489
+ grid = minicolors.find('.minicolors-grid'),
490
+ slider = minicolors.find('.minicolors-slider'),
491
+ opacitySlider = minicolors.find('.minicolors-opacity-slider'),
492
+
493
+ // Picker objects
494
+ gridPicker = grid.find('[class$=-picker]'),
495
+ sliderPicker = slider.find('[class$=-picker]'),
496
+ opacityPicker = opacitySlider.find('[class$=-picker]');
497
+
498
+ // Determine hex/HSB values
499
+ hex = convertCase(parseHex(input.val(), true), settings.letterCase);
500
+ if( !hex ) hex = convertCase(parseHex(settings.defaultValue, true));
501
+ hsb = hex2hsb(hex);
502
+
503
+ // Update input value
504
+ if( !preserveInputValue ) input.val(hex);
505
+
506
+ // Determine opacity value
507
+ if( settings.opacity ) {
508
+ // Get from data-opacity attribute and keep within 0-1 range
509
+ opacity = input.attr('data-opacity') === '' ? 1 : keepWithin(parseFloat(input.attr('data-opacity')).toFixed(2), 0, 1);
510
+ if( isNaN(opacity) ) opacity = 1;
511
+ input.attr('data-opacity', opacity);
512
+ swatch.find('SPAN').css('opacity', opacity);
513
+
514
+ // Set opacity picker position
515
+ y = keepWithin(opacitySlider.height() - (opacitySlider.height() * opacity), 0, opacitySlider.height());
516
+ opacityPicker.css('top', y + 'px');
517
+ }
518
+
519
+ // Update swatch
520
+ swatch.find('SPAN').css('backgroundColor', hex);
521
+
522
+ // Determine picker locations
523
+ switch(settings.control) {
524
+
525
+ case 'wheel':
526
+ // Set grid position
527
+ r = keepWithin(Math.ceil(hsb.s * 0.75), 0, grid.height() / 2);
528
+ phi = hsb.h * Math.PI / 180;
529
+ x = keepWithin(75 - Math.cos(phi) * r, 0, grid.width());
530
+ y = keepWithin(75 - Math.sin(phi) * r, 0, grid.height());
531
+ gridPicker.css({
532
+ top: y + 'px',
533
+ left: x + 'px'
534
+ });
535
+
536
+ // Set slider position
537
+ y = 150 - (hsb.b / (100 / grid.height()));
538
+ if( hex === '' ) y = 0;
539
+ sliderPicker.css('top', y + 'px');
540
+
541
+ // Update panel color
542
+ slider.css('backgroundColor', hsb2hex({ h: hsb.h, s: hsb.s, b: 100 }));
543
+ break;
544
+
545
+ case 'saturation':
546
+ // Set grid position
547
+ x = keepWithin((5 * hsb.h) / 12, 0, 150);
548
+ y = keepWithin(grid.height() - Math.ceil(hsb.b / (100 / grid.height())), 0, grid.height());
549
+ gridPicker.css({
550
+ top: y + 'px',
551
+ left: x + 'px'
552
+ });
553
+
554
+ // Set slider position
555
+ y = keepWithin(slider.height() - (hsb.s * (slider.height() / 100)), 0, slider.height());
556
+ sliderPicker.css('top', y + 'px');
557
+
558
+ // Update UI
559
+ slider.css('backgroundColor', hsb2hex({ h: hsb.h, s: 100, b: hsb.b }));
560
+ minicolors.find('.minicolors-grid-inner').css('opacity', hsb.s / 100);
561
+
562
+ break;
563
+
564
+ case 'brightness':
565
+ // Set grid position
566
+ x = keepWithin((5 * hsb.h) / 12, 0, 150);
567
+ y = keepWithin(grid.height() - Math.ceil(hsb.s / (100 / grid.height())), 0, grid.height());
568
+ gridPicker.css({
569
+ top: y + 'px',
570
+ left: x + 'px'
571
+ });
572
+
573
+ // Set slider position
574
+ y = keepWithin(slider.height() - (hsb.b * (slider.height() / 100)), 0, slider.height());
575
+ sliderPicker.css('top', y + 'px');
576
+
577
+ // Update UI
578
+ slider.css('backgroundColor', hsb2hex({ h: hsb.h, s: hsb.s, b: 100 }));
579
+ minicolors.find('.minicolors-grid-inner').css('opacity', 1 - (hsb.b / 100));
580
+ break;
581
+
582
+ default:
583
+ // Set grid position
584
+ x = keepWithin(Math.ceil(hsb.s / (100 / grid.width())), 0, grid.width());
585
+ y = keepWithin(grid.height() - Math.ceil(hsb.b / (100 / grid.height())), 0, grid.height());
586
+ gridPicker.css({
587
+ top: y + 'px',
588
+ left: x + 'px'
589
+ });
590
+
591
+ // Set slider position
592
+ y = keepWithin(slider.height() - (hsb.h / (360 / slider.height())), 0, slider.height());
593
+ sliderPicker.css('top', y + 'px');
594
+
595
+ // Update panel color
596
+ grid.css('backgroundColor', hsb2hex({ h: hsb.h, s: 100, b: 100 }));
597
+ break;
598
+
599
+ }
600
+
601
+ // Handle change event
602
+ if( !firstRun ) doChange(input, hex, opacity);
603
+
604
+ }
605
+
606
+ // Runs the change and changeDelay callbacks
607
+ function doChange(input, hex, opacity) {
608
+
609
+ var settings = input.data('minicolors-settings');
610
+
611
+ // Only run if it actually changed
612
+ if( hex + opacity !== input.data('minicolors-lastChange') ) {
613
+
614
+ // Remember last-changed value
615
+ input.data('minicolors-lastChange', hex + opacity);
616
+
617
+ // Fire change event
618
+ if( settings.change ) {
619
+ if( settings.changeDelay ) {
620
+ // Call after a delay
621
+ clearTimeout(input.data('minicolors-changeTimeout'));
622
+ input.data('minicolors-changeTimeout', setTimeout( function() {
623
+ settings.change.call(input.get(0), hex, opacity);
624
+ }, settings.changeDelay));
625
+ } else {
626
+ // Call immediately
627
+ settings.change.call(input.get(0), hex, opacity);
628
+ }
629
+ }
630
+
631
+ }
632
+
633
+ }
634
+
635
+ // Generates an RGB(A) object based on the input's value
636
+ function rgbObject(input) {
637
+ var hex = parseHex($(input).val(), true),
638
+ rgb = hex2rgb(hex),
639
+ opacity = $(input).attr('data-opacity');
640
+ if( !rgb ) return null;
641
+ if( opacity !== undefined ) $.extend(rgb, { a: parseFloat(opacity) });
642
+ return rgb;
643
+ }
644
+
645
+ // Genearates an RGB(A) string based on the input's value
646
+ function rgbString(input, alpha) {
647
+ var hex = parseHex($(input).val(), true),
648
+ rgb = hex2rgb(hex),
649
+ opacity = $(input).attr('data-opacity');
650
+ if( !rgb ) return null;
651
+ if( opacity === undefined ) opacity = 1;
652
+ if( alpha ) {
653
+ return 'rgba(' + rgb.r + ', ' + rgb.g + ', ' + rgb.b + ', ' + parseFloat(opacity) + ')';
654
+ } else {
655
+ return 'rgb(' + rgb.r + ', ' + rgb.g + ', ' + rgb.b + ')';
656
+ }
657
+ }
658
+
659
+ // Converts to the letter case specified in settings
660
+ function convertCase(string, letterCase) {
661
+ return letterCase === 'uppercase' ? string.toUpperCase() : string.toLowerCase();
662
+ }
663
+
664
+ // Parses a string and returns a valid hex string when possible
665
+ function parseHex(string, expand) {
666
+ string = string.replace(/[^A-F0-9]/ig, '');
667
+ if( string.length !== 3 && string.length !== 6 ) return '';
668
+ if( string.length === 3 && expand ) {
669
+ string = string[0] + string[0] + string[1] + string[1] + string[2] + string[2];
670
+ }
671
+ return '#' + string;
672
+ }
673
+
674
+ // Keeps value within min and max
675
+ function keepWithin(value, min, max) {
676
+ if( value < min ) value = min;
677
+ if( value > max ) value = max;
678
+ return value;
679
+ }
680
+
681
+ // Converts an HSB object to an RGB object
682
+ function hsb2rgb(hsb) {
683
+ var rgb = {};
684
+ var h = Math.round(hsb.h);
685
+ var s = Math.round(hsb.s * 255 / 100);
686
+ var v = Math.round(hsb.b * 255 / 100);
687
+ if(s === 0) {
688
+ rgb.r = rgb.g = rgb.b = v;
689
+ } else {
690
+ var t1 = v;
691
+ var t2 = (255 - s) * v / 255;
692
+ var t3 = (t1 - t2) * (h % 60) / 60;
693
+ if( h === 360 ) h = 0;
694
+ if( h < 60 ) { rgb.r = t1; rgb.b = t2; rgb.g = t2 + t3; }
695
+ else if( h < 120 ) {rgb.g = t1; rgb.b = t2; rgb.r = t1 - t3; }
696
+ else if( h < 180 ) {rgb.g = t1; rgb.r = t2; rgb.b = t2 + t3; }
697
+ else if( h < 240 ) {rgb.b = t1; rgb.r = t2; rgb.g = t1 - t3; }
698
+ else if( h < 300 ) {rgb.b = t1; rgb.g = t2; rgb.r = t2 + t3; }
699
+ else if( h < 360 ) {rgb.r = t1; rgb.g = t2; rgb.b = t1 - t3; }
700
+ else { rgb.r = 0; rgb.g = 0; rgb.b = 0; }
701
+ }
702
+ return {
703
+ r: Math.round(rgb.r),
704
+ g: Math.round(rgb.g),
705
+ b: Math.round(rgb.b)
706
+ };
707
+ }
708
+
709
+ // Converts an RGB object to a hex string
710
+ function rgb2hex(rgb) {
711
+ var hex = [
712
+ rgb.r.toString(16),
713
+ rgb.g.toString(16),
714
+ rgb.b.toString(16)
715
+ ];
716
+ $.each(hex, function(nr, val) {
717
+ if (val.length === 1) hex[nr] = '0' + val;
718
+ });
719
+ return '#' + hex.join('');
720
+ }
721
+
722
+ // Converts an HSB object to a hex string
723
+ function hsb2hex(hsb) {
724
+ return rgb2hex(hsb2rgb(hsb));
725
+ }
726
+
727
+ // Converts a hex string to an HSB object
728
+ function hex2hsb(hex) {
729
+ var hsb = rgb2hsb(hex2rgb(hex));
730
+ if( hsb.s === 0 ) hsb.h = 360;
731
+ return hsb;
732
+ }
733
+
734
+ // Converts an RGB object to an HSB object
735
+ function rgb2hsb(rgb) {
736
+ var hsb = { h: 0, s: 0, b: 0 };
737
+ var min = Math.min(rgb.r, rgb.g, rgb.b);
738
+ var max = Math.max(rgb.r, rgb.g, rgb.b);
739
+ var delta = max - min;
740
+ hsb.b = max;
741
+ hsb.s = max !== 0 ? 255 * delta / max : 0;
742
+ if( hsb.s !== 0 ) {
743
+ if( rgb.r === max ) {
744
+ hsb.h = (rgb.g - rgb.b) / delta;
745
+ } else if( rgb.g === max ) {
746
+ hsb.h = 2 + (rgb.b - rgb.r) / delta;
747
+ } else {
748
+ hsb.h = 4 + (rgb.r - rgb.g) / delta;
749
+ }
750
+ } else {
751
+ hsb.h = -1;
752
+ }
753
+ hsb.h *= 60;
754
+ if( hsb.h < 0 ) {
755
+ hsb.h += 360;
756
+ }
757
+ hsb.s *= 100/255;
758
+ hsb.b *= 100/255;
759
+ return hsb;
760
+ }
761
+
762
+ // Converts a hex string to an RGB object
763
+ function hex2rgb(hex) {
764
+ hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16);
765
+ return {
766
+ r: hex >> 16,
767
+ g: (hex & 0x00FF00) >> 8,
768
+ b: (hex & 0x0000FF)
769
+ };
770
+ }
771
+
772
+ // Handle events
773
+ $(document)
774
+ // Hide on clicks outside of the control
775
+ .on('mousedown.minicolors touchstart.minicolors', function(event) {
776
+ if( !$(event.target).parents().add(event.target).hasClass('minicolors') ) {
777
+ hide();
778
+ }
779
+ })
780
+ // Start moving
781
+ .on('mousedown.minicolors touchstart.minicolors', '.minicolors-grid, .minicolors-slider, .minicolors-opacity-slider', function(event) {
782
+ var target = $(this);
783
+ event.preventDefault();
784
+ $(document).data('minicolors-target', target);
785
+ move(target, event, true);
786
+ })
787
+ // Move pickers
788
+ .on('mousemove.minicolors touchmove.minicolors', function(event) {
789
+ var target = $(document).data('minicolors-target');
790
+ if( target ) move(target, event);
791
+ })
792
+ // Stop moving
793
+ .on('mouseup.minicolors touchend.minicolors', function() {
794
+ $(this).removeData('minicolors-target');
795
+ })
796
+ // Toggle panel when swatch is clicked
797
+ .on('mousedown.minicolors touchstart.minicolors', '.minicolors-swatch', function(event) {
798
+ var input = $(this).parent().find('.minicolors-input'),
799
+ minicolors = input.parent();
800
+ if( minicolors.hasClass('minicolors-focus') ) {
801
+ hide(input);
802
+ } else {
803
+ show(input);
804
+ }
805
+ })
806
+ // Show on focus
807
+ .on('focus.minicolors', '.minicolors-input', function(event) {
808
+ var input = $(this);
809
+ if( !input.data('minicolors-initialized') ) return;
810
+ show(input);
811
+ })
812
+ // Fix hex on blur
813
+ .on('blur.minicolors', '.minicolors-input', function(event) {
814
+ var input = $(this),
815
+ settings = input.data('minicolors-settings');
816
+ if( !input.data('minicolors-initialized') ) return;
817
+
818
+ // Parse Hex
819
+ input.val(parseHex(input.val(), true));
820
+
821
+ // Is it blank?
822
+ if( input.val() === '' ) input.val(parseHex(settings.defaultValue, true));
823
+
824
+ // Adjust case
825
+ input.val( convertCase(input.val(), settings.letterCase) );
826
+
827
+ })
828
+ // Handle keypresses
829
+ .on('keydown.minicolors', '.minicolors-input', function(event) {
830
+ var input = $(this);
831
+ if( !input.data('minicolors-initialized') ) return;
832
+ switch(event.keyCode) {
833
+ case 9: // tab
834
+ hide();
835
+ break;
836
+ case 27: // esc
837
+ hide();
838
+ input.blur();
839
+ break;
840
+ }
841
+ })
842
+ // Update on keyup
843
+ .on('keyup.minicolors', '.minicolors-input', function(event) {
844
+ var input = $(this);
845
+ if( !input.data('minicolors-initialized') ) return;
846
+ updateFromInput(input, true);
847
+ })
848
+ // Update on paste
849
+ .on('paste.minicolors', '.minicolors-input', function(event) {
850
+ var input = $(this);
851
+ if( !input.data('minicolors-initialized') ) return;
852
+ setTimeout( function() {
853
+ updateFromInput(input, true);
854
+ }, 1);
855
+ });
856
+
857
+ })(jQuery);
includes/common/js/wp-insert-functions.js CHANGED
@@ -9,4 +9,16 @@ jQuery(document).ready(function() {
9
  jQuery("input[name=\'"+formfield+"\']").val(imgurl);
10
  tb_remove();
11
  }
 
 
 
 
 
 
 
 
 
 
 
 
12
  });
9
  jQuery("input[name=\'"+formfield+"\']").val(imgurl);
10
  tb_remove();
11
  }
12
+
13
+ jQuery("#wp_insert_form textarea.chitika").focus(function() {
14
+ jQuery(this).after("<div title='Click Here to Insert Chitika Ad Code' class='chitikaButton' onclick='wpInsertChitikaPopUpHandler(\""+jQuery(this).attr('id')+"\")'></div>");
15
+ jQuery(".chitikaButton").delay(100).animate({"opacity": "1"}, 500);
16
+ return true;
17
+ });
18
+
19
+ jQuery("#wp_insert_form textarea.chitika").blur(function() {
20
+ jQuery(".chitikaButton").animate({"opacity": "0"}, 500);
21
+ setTimeout(function(){jQuery(".chitikaButton").remove()}, 200);
22
+ return true;
23
+ });
24
  });
includes/common/popups/categories.php CHANGED
@@ -7,7 +7,7 @@ require('../../../../../../wp-blog-header.php');
7
  <head>
8
  <link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/themes/smoothness/jquery-ui.css" />
9
  <link rel="stylesheet" type="text/css" href="<?php echo WP_INSERT_URL; ?>/includes/common/css/style.css" />
10
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
11
  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/jquery-ui.min.js"></script>
12
  <script type="text/javascript" src="<?php echo WP_INSERT_URL; ?>/includes/common/js/ui.multiselect.js"></script>
13
  <script type="text/javascript">
7
  <head>
8
  <link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/themes/smoothness/jquery-ui.css" />
9
  <link rel="stylesheet" type="text/css" href="<?php echo WP_INSERT_URL; ?>/includes/common/css/style.css" />
10
+ <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
11
  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/jquery-ui.min.js"></script>
12
  <script type="text/javascript" src="<?php echo WP_INSERT_URL; ?>/includes/common/js/ui.multiselect.js"></script>
13
  <script type="text/javascript">
includes/common/popups/chitika.php ADDED
@@ -0,0 +1,177 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ define('WP_USE_THEMES', false);
3
+ require('../../../../../../wp-blog-header.php');
4
+ ?>
5
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
6
+ <html xmlns="http://www.w3.org/1999/xhtml">
7
+ <head>
8
+ <link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/themes/smoothness/jquery-ui.css" />
9
+ <link rel="stylesheet" type="text/css" href="<?php echo WP_INSERT_URL; ?>/includes/common/css/style.css" />
10
+ <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
11
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>
12
+ <script type="text/javascript" src="<?php echo WP_INSERT_URL; ?>/includes/common/js/jquery-jvert-tabs-1.1.4.js"></script>
13
+ <script type="text/javascript" src="<?php echo WP_INSERT_URL; ?>/includes/common/js/jquery.miniColors.js"></script>
14
+ <script type="text/javascript">
15
+ jQuery(document).ready( function(jQuery) {
16
+ jQuery("#chitikaVtabs").jVertTabs({equalHeights: false});
17
+ jQuery('.minicolors').each( function() {
18
+ jQuery(this).minicolors({letterCase: 'uppercase', swatchPosition: 'right', theme: 'bootstrap', position: jQuery(this).attr('data-position') || 'default',});
19
+ });
20
+ });
21
+ function submit_popup() {
22
+ var adCode = '<script type="text/javascript">\n';
23
+ adCode += 'ch_client = "'+jQuery("#chitikaUserName").val()+'";\n';
24
+ adCode += 'ch_width = '+jQuery("#chitikaAdFormat").children("option").filter(":selected").attr("data-width")+';\n';
25
+ adCode += 'ch_height = '+jQuery("#chitikaAdFormat").children("option").filter(":selected").attr("data-height")+';\n';
26
+ adCode += 'ch_type = "'+jQuery("#chitikaAdType").children("option").filter(":selected").val()+'";\n';
27
+ adCode += 'ch_sid = "'+jQuery("#chitikaAdChannel").val()+'";\n';
28
+ adCode += 'ch_color_site_link = "'+jQuery("#chitikaLinkColor").val()+'";\n';
29
+ adCode += 'ch_color_title = "'+jQuery("#chitikaLinkColor").val()+'";\n';
30
+ adCode += 'ch_color_border = "'+jQuery("#chitikaBorderColor").val()+'";\n';
31
+ adCode += 'ch_color_text = "'+jQuery("#chitikaTextColor").val()+'";\n';
32
+ adCode += 'ch_color_bg = "'+jQuery("#chitikaBackgroundColor").val()+'";\n';
33
+ adCode += '</'+'script>\n';
34
+ adCode += '<script src="http://scripts.chitika.net/eminimalls/amm.js" type="text/javascript"></'+'script>';
35
+ parent.jQuery('#<?php echo (string)$_GET['target']; ?>').val(adCode);
36
+ parent.jQuery.colorbox.close();
37
+ }
38
+ function validateUsername(sender) {
39
+ if(sender.value != '') {
40
+ jQuery("#submitButton").css("display", "inline");
41
+ } else {
42
+ jQuery("#submitButton").css("display", "none");
43
+ }
44
+ }
45
+ </script>
46
+ <style type="text/css">
47
+ body {
48
+ color: #333333;
49
+ font-family: sans-serif;
50
+ font-size: 12px;
51
+ line-height: 1.4em;
52
+ }
53
+ #chitikaVtabs p {
54
+ margin: 5px 0 7px !important;
55
+ }
56
+ a {
57
+ color: #21759B;
58
+ }
59
+ a:hover {
60
+ color: #D54E21;
61
+ }
62
+ label {
63
+ line-height: 16.8px;
64
+ vertical-align: middle;
65
+ cursor: pointer;
66
+ }
67
+ select, input[type="text"] {
68
+ width: 100%;
69
+ -moz-box-sizing: border-box;
70
+ outline: 0 none;
71
+ border-radius: 3px 3px 3px 3px;
72
+ border: 1px solid #AAAAAA;
73
+ border-spacing: 0;
74
+ clear: both;
75
+ margin: 0;
76
+ padding: 3px;
77
+ box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
78
+ }
79
+ </style>
80
+ </head>
81
+ <body bgcolor="">
82
+ <a href="https://chitika.com/publishers/apply.php?refid=smartlogix"><img src="<?php echo WP_INSERT_URL; ?>/includes/common/images/chitika_banner.png" style="width: 100%;" /></a>
83
+ <div id="chitikaVtabs" style="height: 288px; overflow: hidden;">
84
+ <div>
85
+ <ul>
86
+ <li><a href="#chitikaVtabUsername">Username</a></li>
87
+ <li><a href="#chitikaVtabColors">Colors</a></li>
88
+ <li><a href="#chitikaVtabUnitOptions">Unit Options</a></li>
89
+ <li><a href="#chitikaVtabChannel">Channel</a></li>
90
+ </ul>
91
+ </div>
92
+ <div>
93
+ <div id="#chitikaVtabUsername" style="min-height: 263px;">
94
+ <p>
95
+ <label>Username</label>
96
+ <input id="chitikaUserName" type="text" class="input widefat" onchange="validateUsername(this)" onkeyup="validateUsername(this)" />
97
+ <small>It is essential that you enter the correct the username for your ads. Entering an incorrect username means you will lose any stats recorded to the changed username.</small>
98
+ </p>
99
+ <p>
100
+ <strong>Dont have a Chitika Account? <a href="https://chitika.com/publishers/apply.php?refid=smartlogix">Click Here</a> to open an Account.</strong>
101
+ </p>
102
+ </div>
103
+ <div id="#chitikaVtabColors" style="min-height: 263px;">
104
+ <p>
105
+ <label>Link</label>
106
+ <input id="chitikaLinkColor" type="text" class="input widefat minicolors" value="0000CC" />
107
+ <small>Use this field to specify the color of links in your ad.</small>
108
+ </p>
109
+ <p>
110
+ <label>Text</label>
111
+ <input id="chitikaTextColor" type="text" class="input widefat minicolors" value="#000000" />
112
+ <small>Use this field to specify the color of the text under your ad link.</small>
113
+ </p>
114
+ <p>
115
+ <label>Background</label>
116
+ <input id="chitikaBackgroundColor" type="text" class="input widefat minicolors" data-position="top" value="#FFFFFF" />
117
+ <small>Use this field to specify the color you prefer for the background of your ad.</small>
118
+ </p>
119
+ <p>
120
+ <label>Border</label>
121
+ <input id="chitikaBorderColor" type="text" class="input widefat minicolors" data-position="top" value="#FFFFFF" />
122
+ <small>Use this field to specify the color of your ad's border.</small>
123
+ </p>
124
+ </div>
125
+ <div id="#chitikaVtabUnitOptions" style="min-height: 263px;">
126
+ <p>
127
+ <label>Format</label>
128
+ <select id="chitikaAdFormat">
129
+ <option value="550x250" data-width="550" data-height="250">550 x 250 MEGA-Unit</option>
130
+ <option value="500x250" data-width="500" data-height="250">500 x 250 MEGA-Unit</option>
131
+ <option value="728x90" data-width="728" data-height="90">728 x 90 Leaderboard</option>
132
+ <option value="120x600" data-width="120" data-height="600">120 x 600 Skyscraper</option>
133
+ <option value="160x600" data-width="160" data-height="600">160 x 600 Wide Skyscraper</option>
134
+ <option value="468x250" data-width="468" data-height="250">468 x 250 *New!* MEGA-Unit Jr.</option>
135
+ <option value="468x180" data-width="468" data-height="180">468 x 180 Blog Banner</option>
136
+ <option value="468x120" data-width="468" data-height="120">468 x 120 Blog Banner</option>
137
+ <option value="468x90" data-width="468" data-height="90">468 x 90 Small Blog Banner</option>
138
+ <option value="468x60" data-width="468" data-height="60">468 x 60 Mini Blog Banner</option>
139
+ <option value="550x120" data-width="550" data-height="120">550 x 120 Content Banner</option>
140
+ <option value="550x90" data-width="550" data-height="90">550 x 90 Content Banner</option>
141
+ <option value="450x90" data-width="450" data-height="90">450 x 90 Small Content Banner</option>
142
+ <option value="430x90" data-width="430" data-height="90">430 x 90 Small Content Banner</option>
143
+ <option value="400x90" data-width="400" data-height="90">400 x 90 Small Content Banner</option>
144
+ <option value="300x250" data-width="300" data-height="250">300 x 250 Rectangle</option>
145
+ <option value="300x150" data-width="300" data-height="150">300 x 150 Rectangle, Wide</option>
146
+ <option value="300x125" data-width="300" data-height="125">300 x 125 Mini Rectangle, Wide</option>
147
+ <option value="300x70" data-width="300" data-height="70">300 x 70 Mini Rectangle, Wide</option>
148
+ <option value="250x250" data-width="250" data-height="250">250 x 250 Square</option>
149
+ <option value="200x200" data-width="200" data-height="200">200 x 200 Small Square</option>
150
+ <option value="160x160" data-width="160" data-height="160">160 x 160 Small Square</option>
151
+ <option value="336x280" data-width="336" data-height="280">336 x 280 Rectangle</option>
152
+ <option value="336x160" data-width="336" data-height="160">336 x 160 Rectangle, Wide</option>
153
+ <option value="334x100" data-width="334" data-height="100">334 x 100 Small Rectangle, Wide</option>
154
+ </select>
155
+ <small>Here is where you can select the size of your ad unit.</small>
156
+ </p>
157
+ <p>
158
+ <label>Type</label>
159
+ <select id="chitikaAdType">
160
+ <option selected="selected" value="mpu">Text Ad</option>
161
+ <option value="mobile">Mobile Ad</option>
162
+ </select>
163
+ <small>Choose which type of ad unit you would like.<br /><b>Multi Purpose Unit : </b>Our regular search targeted text ads composed of thumbnail images and text.<br /><b>Mobile Unit : </b>These ads will only be visible to users on mobile devices and will 'hover' at the bottom of their screen.</small>
164
+ </p>
165
+ </div>
166
+ <div id="#chitikaVtabChannel" style="min-height: 263px;">
167
+ <p>
168
+ <label>Channel <small>(Optional)</small></label>
169
+ <input id="chitikaAdChannel" type="text" class="input widefat" value="Chitika Default" />
170
+ <small>Create a channel to keep track of individual ad unit or website's stats.</small>
171
+ </p>
172
+ </div>
173
+ </div>
174
+ </div>
175
+ <input id="submitButton" type="image" src="<?php echo WP_INSERT_URL; ?>/includes/common/images/check.png" style="float: right; margin: 2px 20px 0 0; display: none;" onclick="submit_popup()" />
176
+ </body>
177
+ </html>
includes/common/popups/countries.php CHANGED
@@ -7,7 +7,7 @@ require('../../../../../../wp-blog-header.php');
7
  <head>
8
  <link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/themes/smoothness/jquery-ui.css" />
9
  <link rel="stylesheet" type="text/css" href="<?php echo WP_INSERT_URL; ?>/includes/common/css/style.css" />
10
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
11
  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/jquery-ui.min.js"></script>
12
  <script type="text/javascript" src="<?php echo WP_INSERT_URL; ?>/includes/common/js/ui.multiselect.js"></script>
13
  <script type="text/javascript">
7
  <head>
8
  <link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/themes/smoothness/jquery-ui.css" />
9
  <link rel="stylesheet" type="text/css" href="<?php echo WP_INSERT_URL; ?>/includes/common/css/style.css" />
10
+ <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
11
  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/jquery-ui.min.js"></script>
12
  <script type="text/javascript" src="<?php echo WP_INSERT_URL; ?>/includes/common/js/ui.multiselect.js"></script>
13
  <script type="text/javascript">
includes/common/popups/instances.php CHANGED
@@ -18,7 +18,7 @@ function wp_insert_add_ordinal_number_suffix($num) {
18
  <head>
19
  <link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/themes/smoothness/jquery-ui.css" />
20
  <link rel="stylesheet" type="text/css" href="<?php echo WP_INSERT_URL; ?>/includes/common/css/style.css" />
21
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
22
  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/jquery-ui.min.js"></script>
23
  <script type="text/javascript" src="<?php echo WP_INSERT_URL; ?>/includes/common/js/ui.multiselect.js"></script>
24
  <script type="text/javascript">
18
  <head>
19
  <link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/themes/smoothness/jquery-ui.css" />
20
  <link rel="stylesheet" type="text/css" href="<?php echo WP_INSERT_URL; ?>/includes/common/css/style.css" />
21
+ <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
22
  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/jquery-ui.min.js"></script>
23
  <script type="text/javascript" src="<?php echo WP_INSERT_URL; ?>/includes/common/js/ui.multiselect.js"></script>
24
  <script type="text/javascript">
includes/common/popups/pages.php CHANGED
@@ -7,7 +7,7 @@ require('../../../../../../wp-blog-header.php');
7
  <head>
8
  <link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/themes/smoothness/jquery-ui.css" />
9
  <link rel="stylesheet" type="text/css" href="<?php echo WP_INSERT_URL; ?>/includes/common/css/style.css" />
10
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
11
  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/jquery-ui.min.js"></script>
12
  <script type="text/javascript" src="<?php echo WP_INSERT_URL; ?>/includes/common/js/ui.multiselect.js"></script>
13
  <script type="text/javascript">
7
  <head>
8
  <link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/themes/smoothness/jquery-ui.css" />
9
  <link rel="stylesheet" type="text/css" href="<?php echo WP_INSERT_URL; ?>/includes/common/css/style.css" />
10
+ <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
11
  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/jquery-ui.min.js"></script>
12
  <script type="text/javascript" src="<?php echo WP_INSERT_URL; ?>/includes/common/js/ui.multiselect.js"></script>
13
  <script type="text/javascript">
includes/common/popups/posts.php CHANGED
@@ -7,7 +7,7 @@ require('../../../../../../wp-blog-header.php');
7
  <head>
8
  <link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/themes/smoothness/jquery-ui.css" />
9
  <link rel="stylesheet" type="text/css" href="<?php echo WP_INSERT_URL; ?>/includes/common/css/style.css" />
10
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
11
  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/jquery-ui.min.js"></script>
12
  <script type="text/javascript" src="<?php echo WP_INSERT_URL; ?>/includes/common/js/ui.multiselect.js"></script>
13
  <script type="text/javascript">
7
  <head>
8
  <link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/themes/smoothness/jquery-ui.css" />
9
  <link rel="stylesheet" type="text/css" href="<?php echo WP_INSERT_URL; ?>/includes/common/css/style.css" />
10
+ <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
11
  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/jquery-ui.min.js"></script>
12
  <script type="text/javascript" src="<?php echo WP_INSERT_URL; ?>/includes/common/js/ui.multiselect.js"></script>
13
  <script type="text/javascript">
includes/common/styles.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  function wp_insert_admin_styles() {
3
- wp_enqueue_style('wp-insert-styles', WP_INSERT_URL.'/includes/common/css/style.css', false);
4
  wp_enqueue_style('thickbox');
5
  wp_enqueue_script('common');
6
  wp_enqueue_script('jquery-ui-tabs');
1
  <?php
2
  function wp_insert_admin_styles() {
3
+ wp_enqueue_style('wp-insert-styles', WP_INSERT_URL.'/includes/common/css/style.css?version=2.0.5', false);
4
  wp_enqueue_style('thickbox');
5
  wp_enqueue_script('common');
6
  wp_enqueue_script('jquery-ui-tabs');
includes/inpostads/admin-page.php CHANGED
@@ -36,12 +36,12 @@ function wp_insert_inpostads_content($post, $args) {
36
 
37
  $controls = array();
38
  $controls['status'] = wp_insert_get_control('tz-checkbox', false, $name.'[status]', $id.'-status', $data['status']);
39
- $controls['ad_code_1'] = wp_insert_get_control('textarea', false, $name.'[ad_code_1]', $id.'-ad_code_1', $data['ad_code_1'], 'Ad Code (Primary Network):');
40
- $controls['ad_code_2'] = wp_insert_get_control('textarea', false, $name.'[ad_code_2]', $id.'-ad_code_2', $data['ad_code_2'], 'Ad Code (Secondary Network):');
41
- $controls['ad_code_3'] = wp_insert_get_control('textarea', false, $name.'[ad_code_3]', $id.'-ad_code_3', $data['ad_code_3'], 'Ad Code (Tertiary Network):');
42
 
43
  $controls['country_1'] = wp_insert_get_control('popup', false, $name.'[country_1]', $id.'-country_1', $data['country_1'], 'Geo Targets', '', array('type' => 'countries'));
44
- $controls['country_code_1'] = wp_insert_get_control('textarea', false, $name.'[country_code_1]', $id.'-country_code_1', $data['country_code_1'], 'Ad Code', '', null, 'input widefat');
45
 
46
  $controls['rules_exclude_home'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_home]', $id.'-rules_exclude_home', $data['rules_exclude_home'], '', '', null, '', false);
47
  $controls['rules_home_instances'] = wp_insert_get_control('popup', false, $name.'[rules_home_instances]', $id.'-rules_home_instances', $data['rules_home_instances'], '', '', array('type' => 'instances'), '', false);
36
 
37
  $controls = array();
38
  $controls['status'] = wp_insert_get_control('tz-checkbox', false, $name.'[status]', $id.'-status', $data['status']);
39
+ $controls['ad_code_1'] = wp_insert_get_control('textarea', false, $name.'[ad_code_1]', $id.'-ad_code_1', $data['ad_code_1'], 'Ad Code (Primary Network):', '', null, 'input widefat chitika');
40
+ $controls['ad_code_2'] = wp_insert_get_control('textarea', false, $name.'[ad_code_2]', $id.'-ad_code_2', $data['ad_code_2'], 'Ad Code (Secondary Network):', '', null, 'input widefat chitika');
41
+ $controls['ad_code_3'] = wp_insert_get_control('textarea', false, $name.'[ad_code_3]', $id.'-ad_code_3', $data['ad_code_3'], 'Ad Code (Tertiary Network):', '', null, 'input widefat chitika');
42
 
43
  $controls['country_1'] = wp_insert_get_control('popup', false, $name.'[country_1]', $id.'-country_1', $data['country_1'], 'Geo Targets', '', array('type' => 'countries'));
44
+ $controls['country_code_1'] = wp_insert_get_control('textarea', false, $name.'[country_code_1]', $id.'-country_code_1', $data['country_code_1'], 'Ad Code', '', null, 'input widefat chitika');
45
 
46
  $controls['rules_exclude_home'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_home]', $id.'-rules_exclude_home', $data['rules_exclude_home'], '', '', null, '', false);
47
  $controls['rules_home_instances'] = wp_insert_get_control('popup', false, $name.'[rules_home_instances]', $id.'-rules_home_instances', $data['rules_home_instances'], '', '', array('type' => 'instances'), '', false);
includes/multiple-adnetwork/meta-box.php CHANGED
@@ -14,7 +14,7 @@ function wp_insert_multiple_network_status_content($post, $args) {
14
  echo '<p>';
15
  echo '<b>Recommended Ad Networks</b><br />';
16
  echo '<a href="http://google.com/adsense"><img src="'.WP_INSERT_URL.'/includes/common/images/adsense.gif" /></a>';
17
- echo '<a href="https://chitika.com/publishers/apply.php?refid=smartlogix" style="margin-left: 10px;"><img src="'.WP_INSERT_URL.'/includes/common/images/chitika.gif" /></a>';
18
  echo '</p>';
19
  }
20
  ?>
14
  echo '<p>';
15
  echo '<b>Recommended Ad Networks</b><br />';
16
  echo '<a href="http://google.com/adsense"><img src="'.WP_INSERT_URL.'/includes/common/images/adsense.gif" /></a>';
17
+ echo '<a href="https://chitika.com/publishers/apply.php?refid=smartlogix" style="margin-left: 10px;"><img src="'.WP_INSERT_URL.'/includes/common/images/chitika.png" /></a>';
18
  echo '</p>';
19
  }
20
  ?>
includes/templateads/admin-page.php CHANGED
@@ -47,12 +47,12 @@ function wp_insert_templateads_content($post, $args) {
47
 
48
  $controls = array();
49
  $controls['status'] = wp_insert_get_control('tz-checkbox', false, $name.'[status]', $id.'-status', $data['status']);
50
- $controls['ad_code_1'] = wp_insert_get_control('textarea', false, $name.'[ad_code_1]', $id.'-ad_code_1', $data['ad_code_1'], 'Ad Code (Primary Network):');
51
- $controls['ad_code_2'] = wp_insert_get_control('textarea', false, $name.'[ad_code_2]', $id.'-ad_code_2', $data['ad_code_2'], 'Ad Code (Secondary Network):');
52
- $controls['ad_code_3'] = wp_insert_get_control('textarea', false, $name.'[ad_code_3]', $id.'-ad_code_3', $data['ad_code_3'], 'Ad Code (Tertiary Network):');
53
 
54
  $controls['country_1'] = wp_insert_get_control('popup', false, $name.'[country_1]', $id.'-country_1', $data['country_1'], 'Geo Targets', '', array('type' => 'countries'));
55
- $controls['country_code_1'] = wp_insert_get_control('textarea', false, $name.'[country_code_1]', $id.'-country_code_1', $data['country_code_1'], 'Ad Code', '', null, 'input widefat');
56
 
57
  $controls['rules_exclude_home'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_home]', $id.'-rules_exclude_home', $data['rules_exclude_home'], '', '', null, '', false);
58
  $controls['rules_exclude_archives'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_archives]', $id.'-rules_exclude_archives', $data['rules_exclude_archives'], '', '', null, '', false);
47
 
48
  $controls = array();
49
  $controls['status'] = wp_insert_get_control('tz-checkbox', false, $name.'[status]', $id.'-status', $data['status']);
50
+ $controls['ad_code_1'] = wp_insert_get_control('textarea', false, $name.'[ad_code_1]', $id.'-ad_code_1', $data['ad_code_1'], 'Ad Code (Primary Network):', '', null, 'input widefat chitika');
51
+ $controls['ad_code_2'] = wp_insert_get_control('textarea', false, $name.'[ad_code_2]', $id.'-ad_code_2', $data['ad_code_2'], 'Ad Code (Secondary Network):', '', null, 'input widefat chitika');
52
+ $controls['ad_code_3'] = wp_insert_get_control('textarea', false, $name.'[ad_code_3]', $id.'-ad_code_3', $data['ad_code_3'], 'Ad Code (Tertiary Network):', '', null, 'input widefat chitika');
53
 
54
  $controls['country_1'] = wp_insert_get_control('popup', false, $name.'[country_1]', $id.'-country_1', $data['country_1'], 'Geo Targets', '', array('type' => 'countries'));
55
+ $controls['country_code_1'] = wp_insert_get_control('textarea', false, $name.'[country_code_1]', $id.'-country_code_1', $data['country_code_1'], 'Ad Code', '', null, 'input widefat chitika');
56
 
57
  $controls['rules_exclude_home'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_home]', $id.'-rules_exclude_home', $data['rules_exclude_home'], '', '', null, '', false);
58
  $controls['rules_exclude_archives'] = wp_insert_get_control('ip-checkbox', false, $name.'[rules_exclude_archives]', $id.'-rules_exclude_archives', $data['rules_exclude_archives'], '', '', null, '', false);
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link:www.wp-insert.smartlogix.co.in/support
4
  Tags: adsense,google,widget,post,admin,plugin,ads,in post ads,feed logo,smartlogix,ads in feeds,analytics,google analytics,header,footer,ad management,advertisements,content,ad,advertising,privacy policy,privacy,policy,automatic privacy policy,blog,feed,feeds,formatting,html,javascript,manage,post,posts,seo,sidebar,widget,widgets,wordpress,tracking,syntex highlighter,highlighting,theme tools,plugin tools,developer tools,highlighting,theme editor,plugin editor,middle ad,ad filtration,pagewise ad filtration,template ads,ad tags,adbrite ads,adsense ready,easy adsense,adsense optimized,terms and conditions,terms,conditions,automatic terms and conditions
5
  Requires at least: 3.2
6
  Tested up to: 3.5.1
7
- Stable tag: 2.0.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
4
  Tags: adsense,google,widget,post,admin,plugin,ads,in post ads,feed logo,smartlogix,ads in feeds,analytics,google analytics,header,footer,ad management,advertisements,content,ad,advertising,privacy policy,privacy,policy,automatic privacy policy,blog,feed,feeds,formatting,html,javascript,manage,post,posts,seo,sidebar,widget,widgets,wordpress,tracking,syntex highlighter,highlighting,theme tools,plugin tools,developer tools,highlighting,theme editor,plugin editor,middle ad,ad filtration,pagewise ad filtration,template ads,ad tags,adbrite ads,adsense ready,easy adsense,adsense optimized,terms and conditions,terms,conditions,automatic terms and conditions
5
  Requires at least: 3.2
6
  Tested up to: 3.5.1
7
+ Stable tag: 2.0.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
wp-insert.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Wp-Insert
4
  Plugin URI: http://www.wp-insert.smartlogix.co.in/
5
  Description: WP-INSERT by SMARTLOGIX : The ultimate wordpress plugin (No1 Adsense Plugin for Wordpress)
6
- Version: 2.0.4
7
  Author: Namith Jawahar
8
  Author URI: http://www.smartlogix.co.in/
9
  WP-INSERT by SMARTLOGIX : The ultimate wordpress plugin (No1 Adsense Plugin for Wordpress)
@@ -31,7 +31,7 @@ if(!defined('WP_INSERT_URL'))
31
  if(!defined('WP_INSERT_DIR'))
32
  define('WP_INSERT_DIR',WP_PLUGIN_DIR.'/wp-insert');
33
  if(!defined('WP_INSERT_VERSION'))
34
- define('WP_INSERT_VERSION', '2.0.4');
35
  /*Includes*/
36
  require_once (dirname(__FILE__).'/includes/includes.php');
37
  ?>
3
  Plugin Name: Wp-Insert
4
  Plugin URI: http://www.wp-insert.smartlogix.co.in/
5
  Description: WP-INSERT by SMARTLOGIX : The ultimate wordpress plugin (No1 Adsense Plugin for Wordpress)
6
+ Version: 2.0.5
7
  Author: Namith Jawahar
8
  Author URI: http://www.smartlogix.co.in/
9
  WP-INSERT by SMARTLOGIX : The ultimate wordpress plugin (No1 Adsense Plugin for Wordpress)
31
  if(!defined('WP_INSERT_DIR'))
32
  define('WP_INSERT_DIR',WP_PLUGIN_DIR.'/wp-insert');
33
  if(!defined('WP_INSERT_VERSION'))
34
+ define('WP_INSERT_VERSION', '2.0.5');
35
  /*Includes*/
36
  require_once (dirname(__FILE__).'/includes/includes.php');
37
  ?>