PowerPress Podcasting plugin by Blubrry - Version 8.0

Version Description

  • Released on 10/7/2019
  • New Subscribe Destinations added: ** Deezer - Anyone can now submit their podcast to Deezer with just a blubrry.com account. Learn more ** Pandora - Submit your podcast to Pandora ** iHeart - Submit your podcast to iHeart radio.
  • New Subscribe button styling options!!! ** Buttons now use an SVG sprite, providing a small footprint while being optimized for retina displays. Subscribe buttons have never been so crisp! ** There is a new "Modern" color scheme, with the traditional square or new rounded corners. ** Subscribe Widget can now be configured horizontally for use in horizontal widget areas.
  • Added an option to remove !important and text-align left styling to subscribe buttons.
  • Switched the plugin_action_links filter to use array_push function call to avoid notice messages when another plugin or theme converts the links array to a string.
  • Fixed bug since recent update to WordPress where the default feed had the word feed in the URL twice. (Thanks Daniel for pointing out the issue!)
Download this release

Release Info

Developer amandato
Plugin Icon 128x128 PowerPress Podcasting plugin by Blubrry
Version 8.0
Comparing to
See all releases

Code changes from version 7.5.4 to 8.0

3rdparty/colorpicker/css/colorpicker.css CHANGED
@@ -1,155 +1,155 @@
1
- .colorpicker {
2
- width: 286px;
3
- height: 176px;
4
- overflow: hidden;
5
- position: absolute;
6
- font-family: Arial, Helvetica, sans-serif;
7
- display: none;
8
- background-image: url(../images/custom_background2.png);
9
- position: absolute;
10
- bottom: 0;
11
- left: 0;
12
- }
13
- .colorpicker_color {
14
- width: 150px;
15
- height: 150px;
16
- left: 14px;
17
- top: 13px;
18
- position: absolute;
19
- background: #f00;
20
- overflow: hidden;
21
- cursor: crosshair;
22
- }
23
- .colorpicker_color div {
24
- position: absolute;
25
- top: 0;
26
- left: 0;
27
- width: 150px;
28
- height: 150px;
29
- background: url(../images/colorpicker_overlay.png);
30
- }
31
- .colorpicker_color div div {
32
- position: absolute;
33
- top: 0;
34
- left: 0;
35
- width: 11px;
36
- height: 11px;
37
- overflow: hidden;
38
- background: url(../images/colorpicker_select.gif);
39
- margin: -5px 0 0 -5px;
40
- }
41
- .colorpicker_hue {
42
- position: absolute;
43
- top: 13px;
44
- left: 171px;
45
- width: 35px;
46
- height: 150px;
47
- cursor: n-resize;
48
- }
49
- .colorpicker_hue div {
50
- position: absolute;
51
- width: 35px;
52
- height: 9px;
53
- overflow: hidden;
54
- background: url(../images/custom_indic.gif) left top;
55
- margin: -4px 0 0 0;
56
- left: 0px;
57
- }
58
- .colorpicker_new_color {
59
- position: absolute;
60
- width: 60px;
61
- height: 30px;
62
- left: 213px;
63
- top: 13px;
64
- background: #f00;
65
- }
66
- .colorpicker_current_color {
67
- position: absolute;
68
- width: 60px;
69
- height: 30px;
70
- left: 283px;
71
- top: 13px;
72
- background: #f00;
73
- display: none;
74
- }
75
- .colorpicker input {
76
- background-color: transparent;
77
- border: 1px solid transparent;
78
- position: absolute;
79
- font-size: 10px;
80
- font-family: Arial, Helvetica, sans-serif;
81
- color: #898989;
82
- top: 4px;
83
- right: 11px;
84
- text-align: right;
85
- margin: 0;
86
- padding: 0;
87
- height: 11px;
88
- }
89
- .colorpicker_hex {
90
- display: none;
91
- }
92
- .colorpicker_hex input {
93
- display: none;
94
- }
95
- .colorpicker_field {
96
- height: 22px;
97
- width: 62px;
98
- background-position: top;
99
- position: absolute;
100
- }
101
- .colorpicker_field span {
102
- position: absolute;
103
- width: 12px;
104
- height: 22px;
105
- overflow: hidden;
106
- top: 0;
107
- right: 0;
108
- cursor: n-resize;
109
- }
110
- .colorpicker_rgb_r {
111
- display: none;
112
- }
113
- .colorpicker_rgb_g {
114
- display: none;
115
- }
116
- .colorpicker_rgb_b {
117
- display: none;
118
- }
119
- .colorpicker_hsb_h {
120
- display: none;
121
- }
122
- .colorpicker_hsb_s {
123
- display: none;
124
- }
125
- .colorpicker_hsb_b {
126
- display: none;
127
- }
128
- .colorpicker_submit {
129
- position: absolute;
130
- left: 210px;
131
- top: 142px;
132
- overflow: hidden;
133
- width: 60px;
134
- font-family: Arial, Helvetica, sans-serif;
135
- font-weight: bold;
136
- }
137
- .colorpicker_focus {
138
- background-position: center;
139
- }
140
- .colorpicker_hex.colorpicker_focus {
141
- background-position: bottom;
142
- }
143
- .colorpicker_submit.colorpicker_focus {
144
- background-position: bottom;
145
- }
146
- .colorpicker_slider {
147
- background-position: bottom;
148
- }
149
- .color_preview {
150
- vertical-align:text-top;
151
- margin-top: 3px;
152
- margin-left: 4px;
153
- cursor: pointer;
154
- border: 1px solid #000000;
155
- }
1
+ .colorpicker {
2
+ width: 286px;
3
+ height: 176px;
4
+ overflow: hidden;
5
+ position: absolute;
6
+ font-family: Arial, Helvetica, sans-serif;
7
+ display: none;
8
+ background-image: url(../images/custom_background2.png);
9
+ position: absolute;
10
+ bottom: 0;
11
+ left: 0;
12
+ }
13
+ .colorpicker_color {
14
+ width: 150px;
15
+ height: 150px;
16
+ left: 14px;
17
+ top: 13px;
18
+ position: absolute;
19
+ background: #f00;
20
+ overflow: hidden;
21
+ cursor: crosshair;
22
+ }
23
+ .colorpicker_color div {
24
+ position: absolute;
25
+ top: 0;
26
+ left: 0;
27
+ width: 150px;
28
+ height: 150px;
29
+ background: url(../images/colorpicker_overlay.png);
30
+ }
31
+ .colorpicker_color div div {
32
+ position: absolute;
33
+ top: 0;
34
+ left: 0;
35
+ width: 11px;
36
+ height: 11px;
37
+ overflow: hidden;
38
+ background: url(../images/colorpicker_select.gif);
39
+ margin: -5px 0 0 -5px;
40
+ }
41
+ .colorpicker_hue {
42
+ position: absolute;
43
+ top: 13px;
44
+ left: 171px;
45
+ width: 35px;
46
+ height: 150px;
47
+ cursor: n-resize;
48
+ }
49
+ .colorpicker_hue div {
50
+ position: absolute;
51
+ width: 35px;
52
+ height: 9px;
53
+ overflow: hidden;
54
+ background: url(../images/custom_indic.gif) left top;
55
+ margin: -4px 0 0 0;
56
+ left: 0px;
57
+ }
58
+ .colorpicker_new_color {
59
+ position: absolute;
60
+ width: 60px;
61
+ height: 30px;
62
+ left: 213px;
63
+ top: 13px;
64
+ background: #f00;
65
+ }
66
+ .colorpicker_current_color {
67
+ position: absolute;
68
+ width: 60px;
69
+ height: 30px;
70
+ left: 283px;
71
+ top: 13px;
72
+ background: #f00;
73
+ display: none;
74
+ }
75
+ .colorpicker input {
76
+ background-color: transparent;
77
+ border: 1px solid transparent;
78
+ position: absolute;
79
+ font-size: 10px;
80
+ font-family: Arial, Helvetica, sans-serif;
81
+ color: #898989;
82
+ top: 4px;
83
+ right: 11px;
84
+ text-align: right;
85
+ margin: 0;
86
+ padding: 0;
87
+ height: 11px;
88
+ }
89
+ .colorpicker_hex {
90
+ display: none;
91
+ }
92
+ .colorpicker_hex input {
93
+ display: none;
94
+ }
95
+ .colorpicker_field {
96
+ height: 22px;
97
+ width: 62px;
98
+ background-position: top;
99
+ position: absolute;
100
+ }
101
+ .colorpicker_field span {
102
+ position: absolute;
103
+ width: 12px;
104
+ height: 22px;
105
+ overflow: hidden;
106
+ top: 0;
107
+ right: 0;
108
+ cursor: n-resize;
109
+ }
110
+ .colorpicker_rgb_r {
111
+ display: none;
112
+ }
113
+ .colorpicker_rgb_g {
114
+ display: none;
115
+ }
116
+ .colorpicker_rgb_b {
117
+ display: none;
118
+ }
119
+ .colorpicker_hsb_h {
120
+ display: none;
121
+ }
122
+ .colorpicker_hsb_s {
123
+ display: none;
124
+ }
125
+ .colorpicker_hsb_b {
126
+ display: none;
127
+ }
128
+ .colorpicker_submit {
129
+ position: absolute;
130
+ left: 210px;
131
+ top: 142px;
132
+ overflow: hidden;
133
+ width: 60px;
134
+ font-family: Arial, Helvetica, sans-serif;
135
+ font-weight: bold;
136
+ }
137
+ .colorpicker_focus {
138
+ background-position: center;
139
+ }
140
+ .colorpicker_hex.colorpicker_focus {
141
+ background-position: bottom;
142
+ }
143
+ .colorpicker_submit.colorpicker_focus {
144
+ background-position: bottom;
145
+ }
146
+ .colorpicker_slider {
147
+ background-position: bottom;
148
+ }
149
+ .color_preview {
150
+ vertical-align:text-top;
151
+ margin-top: 3px;
152
+ margin-left: 4px;
153
+ cursor: pointer;
154
+ border: 1px solid #000000;
155
+ }
3rdparty/colorpicker/js/colorpicker.js CHANGED
@@ -1,496 +1,496 @@
1
- /**
2
- *
3
- * Color picker
4
- * Author: Stefan Petre www.eyecon.ro
5
- *
6
- * Dual licensed under the MIT and GPL licenses
7
- *
8
- */
9
- (function ($) {
10
- var ColorPicker = function () {
11
- var
12
- ids = {},
13
- inAction,
14
- charMin = 65,
15
- visible,
16
- tpl = '<div class="colorpicker round"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" class="round picker_hex" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" class="round" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" class="round" /><span></span></div><button class="colorpicker_submit">Done</button></div>',
17
- defaults = {
18
- eventName: 'click',
19
- onShow: function () {},
20
- onBeforeShow: function(){},
21
- onHide: function () {},
22
- onChange: function () {},
23
- onSubmit: function () {},
24
- color: 'ff0000',
25
- livePreview: true,
26
- flat: false
27
- },
28
- fillRGBFields = function (hsb, cal) {
29
- var rgb = HSBToRGB(hsb);
30
- $(cal).data('colorpicker').fields
31
- .eq(1).val(rgb.r).end()
32
- .eq(2).val(rgb.g).end()
33
- .eq(3).val(rgb.b).end();
34
- },
35
- fillHSBFields = function (hsb, cal) {
36
- $(cal).data('colorpicker').fields
37
- .eq(4).val(hsb.h).end()
38
- .eq(5).val(hsb.s).end()
39
- .eq(6).val(hsb.b).end();
40
- },
41
- fillHexFields = function (hsb, cal) {
42
- $(cal).data('colorpicker').fields
43
- .eq(0).val(HSBToHex(hsb)).end();
44
- },
45
- setSelector = function (hsb, cal) {
46
- $(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100}));
47
- $(cal).data('colorpicker').selectorIndic.css({
48
- left: parseInt(150 * hsb.s/100, 10),
49
- top: parseInt(150 * (100-hsb.b)/100, 10)
50
- });
51
- },
52
- setHue = function (hsb, cal) {
53
- $(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10));
54
- },
55
- setCurrentColor = function (hsb, cal) {
56
- $(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb));
57
- },
58
- setNewColor = function (hsb, cal) {
59
- $(cal).data('colorpicker').newColor.css('backgroundColor', '#' + HSBToHex(hsb));
60
- },
61
- keyDown = function (ev) {
62
- var pressedKey = ev.charCode || ev.keyCode || -1;
63
- if ((pressedKey > charMin && pressedKey <= 90) || pressedKey == 32) {
64
- return false;
65
- }
66
- var cal = $(this).parent().parent();
67
- if (cal.data('colorpicker').livePreview === true) {
68
- change.apply(this);
69
- }
70
- },
71
- change = function (ev) {
72
- var cal = $(this).parent().parent(), col;
73
- if (this.parentNode.className.indexOf('_hex') > 0) {
74
- cal.data('colorpicker').color = col = HexToHSB(fixHex(this.value));
75
- } else if (this.parentNode.className.indexOf('_hsb') > 0) {
76
- cal.data('colorpicker').color = col = fixHSB({
77
- h: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10),
78
- s: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10),
79
- b: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10)
80
- });
81
- } else {
82
- cal.data('colorpicker').color = col = RGBToHSB(fixRGB({
83
- r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10),
84
- g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10),
85
- b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10)
86
- }));
87
- }
88
- if (ev) {
89
- fillRGBFields(col, cal.get(0));
90
- fillHexFields(col, cal.get(0));
91
- fillHSBFields(col, cal.get(0));
92
- }
93
- setSelector(col, cal.get(0));
94
- setHue(col, cal.get(0));
95
- setNewColor(col, cal.get(0));
96
- cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]);
97
- },
98
- blur = function (ev) {
99
- var cal = $(this).parent().parent();
100
- cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus');
101
- },
102
- focus = function () {
103
- charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65;
104
- $(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus');
105
- $(this).parent().addClass('colorpicker_focus');
106
- },
107
- downIncrement = function (ev) {
108
- var field = $(this).parent().find('input').focus();
109
- var current = {
110
- el: $(this).parent().addClass('colorpicker_slider'),
111
- max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255),
112
- y: ev.pageY,
113
- field: field,
114
- val: parseInt(field.val(), 10),
115
- preview: $(this).parent().parent().data('colorpicker').livePreview
116
- };
117
- $(document).bind('mouseup', current, upIncrement);
118
- $(document).bind('mousemove', current, moveIncrement);
119
- $(document).bind('mousedown', current, moveIncrement);
120
- },
121
- moveIncrement = function (ev) {
122
- ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10))));
123
- if (ev.data.preview) {
124
- change.apply(ev.data.field.get(0), [true]);
125
- }
126
- return false;
127
- },
128
- upIncrement = function (ev) {
129
- change.apply(ev.data.field.get(0), [true]);
130
- ev.data.el.removeClass('colorpicker_slider').find('input').focus();
131
- $(document).unbind('mouseup', upIncrement);
132
- $(document).unbind('mousemove', moveIncrement);
133
- $(document).unbind('mousedown', moveIncrement);
134
- return false;
135
- },
136
- downHue = function (ev) {
137
- var current = {
138
- cal: $(this).parent(),
139
- y: $(this).offset().top
140
- };
141
- current.preview = current.cal.data('colorpicker').livePreview;
142
- $(document).bind('mouseup', current, upHue);
143
- $(document).bind('mousemove', current, moveHue);
144
- $(document).bind('mousedown', current, moveHue);
145
- },
146
- moveHue = function (ev) {
147
- change.apply(
148
- ev.data.cal.data('colorpicker')
149
- .fields
150
- .eq(4)
151
- .val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10))
152
- .get(0),
153
- [ev.data.preview]
154
- );
155
- return false;
156
- },
157
- upHue = function (ev) {
158
- fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
159
- fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
160
- $(document).unbind('mouseup', upHue);
161
- $(document).unbind('mousemove', moveHue);
162
- $(document).unbind('mousedown', moveHue);
163
- return false;
164
- },
165
- downSelector = function (ev) {
166
- var current = {
167
- cal: $(this).parent(),
168
- pos: $(this).offset()
169
- };
170
- current.preview = current.cal.data('colorpicker').livePreview;
171
- $(document).bind('mouseup', current, upSelector);
172
- $(document).bind('mousemove', current, moveSelector);
173
- $(document).bind('mousedown', current, moveSelector);
174
- },
175
- moveSelector = function (ev) {
176
- change.apply(
177
- ev.data.cal.data('colorpicker')
178
- .fields
179
- .eq(6)
180
- .val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10))
181
- .end()
182
- .eq(5)
183
- .val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10))
184
- .get(0),
185
- [ev.data.preview]
186
- );
187
- return false;
188
- },
189
- upSelector = function (ev) {
190
- fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
191
- fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
192
- $(document).unbind('mouseup', upSelector);
193
- $(document).unbind('mousemove', moveSelector);
194
- $(document).unbind('mousedown', moveSelector);
195
- return false;
196
- },
197
- enterSubmit = function (ev) {
198
- $(this).addClass('colorpicker_focus');
199
- },
200
- leaveSubmit = function (ev) {
201
- $(this).removeClass('colorpicker_focus');
202
- },
203
- clickSubmit = function (ev) {
204
- var cal = $(this).parent();
205
- var col = cal.data('colorpicker').color;
206
- cal.data('colorpicker').origColor = col;
207
- setCurrentColor(col, cal.get(0));
208
- cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el);
209
- ev.preventDefault();
210
- return false;
211
- },
212
- show = function (ev) {
213
- var cal = $('#' + $(this).data('colorpickerId'));
214
- cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]);
215
- var pos = $(this).offset();
216
- var viewPort = getViewport();
217
- var top = pos.top + this.offsetHeight;
218
- var left = pos.left;
219
- if (top + 176 > viewPort.t + viewPort.h) {
220
- top -= this.offsetHeight + 176;
221
- }
222
- if (left + 356 > viewPort.l + viewPort.w) {
223
- left -= 356;
224
- }
225
- cal.css({left: left + 'px', top: top + 'px'});
226
- if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) {
227
- cal.show();
228
- }
229
- $(document).bind('mousedown', {cal: cal}, hide);
230
- return false;
231
- },
232
- hide = function (ev) {
233
- if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) {
234
- var hex = HSBToHex(ev.data.cal.data('colorpicker').color);
235
- if (ev.data.cal.data('colorpicker').onHide(ev.data.cal.get(0), hex) != false) {
236
- ev.data.cal.hide();
237
- }
238
- $(document).unbind('mousedown', hide);
239
- }
240
- },
241
- isChildOf = function(parentEl, el, container) {
242
- if (parentEl == el) {
243
- return true;
244
- }
245
- if (parentEl.contains) {
246
- return parentEl.contains(el);
247
- }
248
- if ( parentEl.compareDocumentPosition ) {
249
- return !!(parentEl.compareDocumentPosition(el) & 16);
250
- }
251
- var prEl = el.parentNode;
252
- while(prEl && prEl != container) {
253
- if (prEl == parentEl)
254
- return true;
255
- prEl = prEl.parentNode;
256
- }
257
- return false;
258
- },
259
- getViewport = function () {
260
- var m = document.compatMode == 'CSS1Compat';
261
- return {
262
- l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft),
263
- t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop),
264
- w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth),
265
- h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight)
266
- };
267
- },
268
- fixHSB = function (hsb) {
269
- return {
270
- h: Math.min(360, Math.max(0, hsb.h)),
271
- s: Math.min(100, Math.max(0, hsb.s)),
272
- b: Math.min(100, Math.max(0, hsb.b))
273
- };
274
- },
275
- fixRGB = function (rgb) {
276
- return {
277
- r: Math.min(255, Math.max(0, rgb.r)),
278
- g: Math.min(255, Math.max(0, rgb.g)),
279
- b: Math.min(255, Math.max(0, rgb.b))
280
- };
281
- },
282
- fixHex = function (hex) {
283
- var len = 6 - hex.length;
284
- if (len > 0) {
285
- var o = [];
286
- for (var i=0; i<len; i++) {
287
- o.push('0');
288
- }
289
- o.push(hex);
290
- hex = o.join('');
291
- }
292
- return hex;
293
- },
294
- HexToRGB = function (hex) {
295
- var hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16);
296
- return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)};
297
- },
298
- HexToHSB = function (hex) {
299
- return RGBToHSB(HexToRGB(hex));
300
- },
301
- RGBToHSB = function (rgb) {
302
- var hsb = {
303
- h: 0,
304
- s: 0,
305
- b: 0
306
- };
307
- var min = Math.min(rgb.r, rgb.g, rgb.b);
308
- var max = Math.max(rgb.r, rgb.g, rgb.b);
309
- var delta = max - min;
310
- hsb.b = max;
311
- if (max != 0) {
312
-
313
- }
314
- hsb.s = max != 0 ? 255 * delta / max : 0;
315
- if (hsb.s != 0) {
316
- if (rgb.r == max) {
317
- hsb.h = (rgb.g - rgb.b) / delta;
318
- } else if (rgb.g == max) {
319
- hsb.h = 2 + (rgb.b - rgb.r) / delta;
320
- } else {
321
- hsb.h = 4 + (rgb.r - rgb.g) / delta;
322
- }
323
- } else {
324
- hsb.h = -1;
325
- }
326
- hsb.h *= 60;
327
- if (hsb.h < 0) {
328
- hsb.h += 360;
329
- }
330
- hsb.s *= 100/255;
331
- hsb.b *= 100/255;
332
- return hsb;
333
- },
334
- HSBToRGB = function (hsb) {
335
- var rgb = {};
336
- var h = Math.round(hsb.h);
337
- var s = Math.round(hsb.s*255/100);
338
- var v = Math.round(hsb.b*255/100);
339
- if(s == 0) {
340
- rgb.r = rgb.g = rgb.b = v;
341
- } else {
342
- var t1 = v;
343
- var t2 = (255-s)*v/255;
344
- var t3 = (t1-t2)*(h%60)/60;
345
- if(h==360) h = 0;
346
- if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3}
347
- else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3}
348
- else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3}
349
- else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3}
350
- else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3}
351
- else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3}
352
- else {rgb.r=0; rgb.g=0; rgb.b=0}
353
- }
354
- return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)};
355
- },
356
- RGBToHex = function (rgb) {
357
- var hex = [
358
- rgb.r.toString(16),
359
- rgb.g.toString(16),
360
- rgb.b.toString(16)
361
- ];
362
- $.each(hex, function (nr, val) {
363
- if (val.length == 1) {
364
- hex[nr] = '0' + val;
365
- }
366
- });
367
- return hex.join('');
368
- },
369
- HSBToHex = function (hsb) {
370
- return RGBToHex(HSBToRGB(hsb));
371
- },
372
- restoreOriginal = function () {
373
- var cal = $(this).parent();
374
- var col = cal.data('colorpicker').origColor;
375
- cal.data('colorpicker').color = col;
376
- fillRGBFields(col, cal.get(0));
377
- fillHexFields(col, cal.get(0));
378
- fillHSBFields(col, cal.get(0));
379
- setSelector(col, cal.get(0));
380
- setHue(col, cal.get(0));
381
- setNewColor(col, cal.get(0));
382
- };
383
- return {
384
- init: function (opt) {
385
- opt = $.extend({}, defaults, opt||{});
386
- if (typeof opt.color == 'string') {
387
- opt.color = HexToHSB(opt.color);
388
- } else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) {
389
- opt.color = RGBToHSB(opt.color);
390
- } else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) {
391
- opt.color = fixHSB(opt.color);
392
- } else {
393
- return this;
394
- }
395
- return this.each(function () {
396
- if (!$(this).data('colorpickerId')) {
397
- var options = $.extend({}, opt);
398
- options.origColor = opt.color;
399
- var id = 'collorpicker_' + parseInt(Math.random() * 1000);
400
- $(this).data('colorpickerId', id);
401
- var cal = $(tpl).attr('id', id);
402
- if (options.flat) {
403
- cal.appendTo(this).show();
404
- } else {
405
- cal.appendTo(document.body);
406
- }
407
- options.fields = cal
408
- .find('input')
409
- .bind('keyup', keyDown)
410
- .bind('change', change)
411
- .bind('blur', blur)
412
- .bind('focus', focus);
413
- cal
414
- .find('span').bind('mousedown', downIncrement).end()
415
- .find('>div.colorpicker_current_color').bind('click', restoreOriginal);
416
- options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector);
417
- options.selectorIndic = options.selector.find('div div');
418
- options.el = this;
419
- options.hue = cal.find('div.colorpicker_hue div');
420
- cal.find('div.colorpicker_hue').bind('mousedown', downHue);
421
- options.newColor = cal.find('div.colorpicker_new_color');
422
- options.currentColor = cal.find('div.colorpicker_current_color');
423
- cal.data('colorpicker', options);
424
- cal.find('.colorpicker_submit')
425
- .bind('mouseenter', enterSubmit)
426
- .bind('mouseleave', leaveSubmit)
427
- .bind('click', clickSubmit);
428
- fillRGBFields(options.color, cal.get(0));
429
- fillHSBFields(options.color, cal.get(0));
430
- fillHexFields(options.color, cal.get(0));
431
- setHue(options.color, cal.get(0));
432
- setSelector(options.color, cal.get(0));
433
- setCurrentColor(options.color, cal.get(0));
434
- setNewColor(options.color, cal.get(0));
435
- if (options.flat) {
436
- cal.css({
437
- position: 'relative',
438
- display: 'block'
439
- });
440
- } else {
441
- $(this).bind(options.eventName, show);
442
- }
443
- }
444
- });
445
- },
446
- showPicker: function() {
447
- return this.each( function () {
448
- if ($(this).data('colorpickerId')) {
449
- show.apply(this);
450
- }
451
- });
452
- },
453
- hidePicker: function() {
454
- return this.each( function () {
455
- if ($(this).data('colorpickerId')) {
456
- $('#' + $(this).data('colorpickerId')).hide();
457
- }
458
- });
459
- },
460
- setColor: function(col) {
461
- if (typeof col == 'string') {
462
- col = HexToHSB(col);
463
- } else if (col.r != undefined && col.g != undefined && col.b != undefined) {
464
- col = RGBToHSB(col);
465
- } else if (col.h != undefined && col.s != undefined && col.b != undefined) {
466
- col = fixHSB(col);
467
- } else {
468
- return this;
469
- }
470
- return this.each(function(){
471
- if ($(this).data('colorpickerId')) {
472
- var cal = $('#' + $(this).data('colorpickerId'));
473
- cal.data('colorpicker').color = col;
474
- cal.data('colorpicker').origColor = col;
475
- fillRGBFields(col, cal.get(0));
476
- fillHSBFields(col, cal.get(0));
477
- fillHexFields(col, cal.get(0));
478
- setHue(col, cal.get(0));
479
- setSelector(col, cal.get(0));
480
- setCurrentColor(col, cal.get(0));
481
- setNewColor(col, cal.get(0));
482
- }
483
- });
484
- },
485
- rgb2hex: function(rgb) {
486
-
487
- }
488
- };
489
- }();
490
- $.fn.extend({
491
- ColorPicker: ColorPicker.init,
492
- ColorPickerHide: ColorPicker.hidePicker,
493
- ColorPickerShow: ColorPicker.showPicker,
494
- ColorPickerSetColor: ColorPicker.setColor
495
- });
496
  })(jQuery)
1
+ /**
2
+ *
3
+ * Color picker
4
+ * Author: Stefan Petre www.eyecon.ro
5
+ *
6
+ * Dual licensed under the MIT and GPL licenses
7
+ *
8
+ */
9
+ (function ($) {
10
+ var ColorPicker = function () {
11
+ var
12
+ ids = {},
13
+ inAction,
14
+ charMin = 65,
15
+ visible,
16
+ tpl = '<div class="colorpicker round"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" class="round picker_hex" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" class="round" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" class="round" /><span></span></div><button class="colorpicker_submit">Done</button></div>',
17
+ defaults = {
18
+ eventName: 'click',
19
+ onShow: function () {},
20
+ onBeforeShow: function(){},
21
+ onHide: function () {},
22
+ onChange: function () {},
23
+ onSubmit: function () {},
24
+ color: 'ff0000',
25
+ livePreview: true,
26
+ flat: false
27
+ },
28
+ fillRGBFields = function (hsb, cal) {
29
+ var rgb = HSBToRGB(hsb);
30
+ $(cal).data('colorpicker').fields
31
+ .eq(1).val(rgb.r).end()
32
+ .eq(2).val(rgb.g).end()
33
+ .eq(3).val(rgb.b).end();
34
+ },
35
+ fillHSBFields = function (hsb, cal) {
36
+ $(cal).data('colorpicker').fields
37
+ .eq(4).val(hsb.h).end()
38
+ .eq(5).val(hsb.s).end()
39
+ .eq(6).val(hsb.b).end();
40
+ },
41
+ fillHexFields = function (hsb, cal) {
42
+ $(cal).data('colorpicker').fields
43
+ .eq(0).val(HSBToHex(hsb)).end();
44
+ },
45
+ setSelector = function (hsb, cal) {
46
+ $(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100}));
47
+ $(cal).data('colorpicker').selectorIndic.css({
48
+ left: parseInt(150 * hsb.s/100, 10),
49
+ top: parseInt(150 * (100-hsb.b)/100, 10)
50
+ });
51
+ },
52
+ setHue = function (hsb, cal) {
53
+ $(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10));
54
+ },
55
+ setCurrentColor = function (hsb, cal) {
56
+ $(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb));
57
+ },
58
+ setNewColor = function (hsb, cal) {
59
+ $(cal).data('colorpicker').newColor.css('backgroundColor', '#' + HSBToHex(hsb));
60
+ },
61
+ keyDown = function (ev) {
62
+ var pressedKey = ev.charCode || ev.keyCode || -1;
63
+ if ((pressedKey > charMin && pressedKey <= 90) || pressedKey == 32) {
64
+ return false;
65
+ }
66
+ var cal = $(this).parent().parent();
67
+ if (cal.data('colorpicker').livePreview === true) {
68
+ change.apply(this);
69
+ }
70
+ },
71
+ change = function (ev) {
72
+ var cal = $(this).parent().parent(), col;
73
+ if (this.parentNode.className.indexOf('_hex') > 0) {
74
+ cal.data('colorpicker').color = col = HexToHSB(fixHex(this.value));
75
+ } else if (this.parentNode.className.indexOf('_hsb') > 0) {
76
+ cal.data('colorpicker').color = col = fixHSB({
77
+ h: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10),
78
+ s: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10),
79
+ b: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10)
80
+ });
81
+ } else {
82
+ cal.data('colorpicker').color = col = RGBToHSB(fixRGB({
83
+ r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10),
84
+ g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10),
85
+ b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10)
86
+ }));
87
+ }
88
+ if (ev) {
89
+ fillRGBFields(col, cal.get(0));
90
+ fillHexFields(col, cal.get(0));
91
+ fillHSBFields(col, cal.get(0));
92
+ }
93
+ setSelector(col, cal.get(0));
94
+ setHue(col, cal.get(0));
95
+ setNewColor(col, cal.get(0));
96
+ cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]);
97
+ },
98
+ blur = function (ev) {
99
+ var cal = $(this).parent().parent();
100
+ cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus');
101
+ },
102
+ focus = function () {
103
+ charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65;
104
+ $(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus');
105
+ $(this).parent().addClass('colorpicker_focus');
106
+ },
107
+ downIncrement = function (ev) {
108
+ var field = $(this).parent().find('input').focus();
109
+ var current = {
110
+ el: $(this).parent().addClass('colorpicker_slider'),
111
+ max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255),
112
+ y: ev.pageY,
113
+ field: field,
114
+ val: parseInt(field.val(), 10),
115
+ preview: $(this).parent().parent().data('colorpicker').livePreview
116
+ };
117
+ $(document).bind('mouseup', current, upIncrement);
118
+ $(document).bind('mousemove', current, moveIncrement);
119
+ $(document).bind('mousedown', current, moveIncrement);
120
+ },
121
+ moveIncrement = function (ev) {
122
+ ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10))));
123
+ if (ev.data.preview) {
124
+ change.apply(ev.data.field.get(0), [true]);
125
+ }
126
+ return false;
127
+ },
128
+ upIncrement = function (ev) {
129
+ change.apply(ev.data.field.get(0), [true]);
130
+ ev.data.el.removeClass('colorpicker_slider').find('input').focus();
131
+ $(document).unbind('mouseup', upIncrement);
132
+ $(document).unbind('mousemove', moveIncrement);
133
+ $(document).unbind('mousedown', moveIncrement);
134
+ return false;
135
+ },
136
+ downHue = function (ev) {
137
+ var current = {
138
+ cal: $(this).parent(),
139
+ y: $(this).offset().top
140
+ };
141
+ current.preview = current.cal.data('colorpicker').livePreview;
142
+ $(document).bind('mouseup', current, upHue);
143
+ $(document).bind('mousemove', current, moveHue);
144
+ $(document).bind('mousedown', current, moveHue);
145
+ },
146
+ moveHue = function (ev) {
147
+ change.apply(
148
+ ev.data.cal.data('colorpicker')
149
+ .fields
150
+ .eq(4)
151
+ .val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10))
152
+ .get(0),
153
+ [ev.data.preview]
154
+ );
155
+ return false;
156
+ },
157
+ upHue = function (ev) {
158
+ fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
159
+ fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
160
+ $(document).unbind('mouseup', upHue);
161
+ $(document).unbind('mousemove', moveHue);
162
+ $(document).unbind('mousedown', moveHue);
163
+ return false;
164
+ },
165
+ downSelector = function (ev) {
166
+ var current = {
167
+ cal: $(this).parent(),
168
+ pos: $(this).offset()
169
+ };
170
+ current.preview = current.cal.data('colorpicker').livePreview;
171
+ $(document).bind('mouseup', current, upSelector);
172
+ $(document).bind('mousemove', current, moveSelector);
173
+ $(document).bind('mousedown', current, moveSelector);
174
+ },
175
+ moveSelector = function (ev) {
176
+ change.apply(
177
+ ev.data.cal.data('colorpicker')
178
+ .fields
179
+ .eq(6)
180
+ .val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10))
181
+ .end()
182
+ .eq(5)
183
+ .val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10))
184
+ .get(0),
185
+ [ev.data.preview]
186
+ );
187
+ return false;
188
+ },
189
+ upSelector = function (ev) {
190
+ fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
191
+ fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
192
+ $(document).unbind('mouseup', upSelector);
193
+ $(document).unbind('mousemove', moveSelector);
194
+ $(document).unbind('mousedown', moveSelector);
195
+ return false;
196
+ },
197
+ enterSubmit = function (ev) {
198
+ $(this).addClass('colorpicker_focus');
199
+ },
200
+ leaveSubmit = function (ev) {
201
+ $(this).removeClass('colorpicker_focus');
202
+ },
203
+ clickSubmit = function (ev) {
204
+ var cal = $(this).parent();
205
+ var col = cal.data('colorpicker').color;
206
+ cal.data('colorpicker').origColor = col;
207
+ setCurrentColor(col, cal.get(0));
208
+ cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el);
209
+ ev.preventDefault();
210
+ return false;
211
+ },
212
+ show = function (ev) {
213
+ var cal = $('#' + $(this).data('colorpickerId'));
214
+ cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]);
215
+ var pos = $(this).offset();
216
+ var viewPort = getViewport();
217
+ var top = pos.top + this.offsetHeight;
218
+ var left = pos.left;
219
+ if (top + 176 > viewPort.t + viewPort.h) {
220
+ top -= this.offsetHeight + 176;
221
+ }
222
+ if (left + 356 > viewPort.l + viewPort.w) {
223
+ left -= 356;
224
+ }
225
+ cal.css({left: left + 'px', top: top + 'px'});
226
+ if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) {
227
+ cal.show();
228
+ }
229
+ $(document).bind('mousedown', {cal: cal}, hide);
230
+ return false;
231
+ },
232
+ hide = function (ev) {
233
+ if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) {
234
+ var hex = HSBToHex(ev.data.cal.data('colorpicker').color);
235
+ if (ev.data.cal.data('colorpicker').onHide(ev.data.cal.get(0), hex) != false) {
236
+ ev.data.cal.hide();
237
+ }
238
+ $(document).unbind('mousedown', hide);
239
+ }
240
+ },
241
+ isChildOf = function(parentEl, el, container) {
242
+ if (parentEl == el) {
243
+ return true;
244
+ }
245
+ if (parentEl.contains) {
246
+ return parentEl.contains(el);
247
+ }
248
+ if ( parentEl.compareDocumentPosition ) {
249
+ return !!(parentEl.compareDocumentPosition(el) & 16);
250
+ }
251
+ var prEl = el.parentNode;
252
+ while(prEl && prEl != container) {
253
+ if (prEl == parentEl)
254
+ return true;
255
+ prEl = prEl.parentNode;
256
+ }
257
+ return false;
258
+ },
259
+ getViewport = function () {
260
+ var m = document.compatMode == 'CSS1Compat';
261
+ return {
262
+ l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft),
263
+ t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop),
264
+ w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth),
265
+ h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight)
266
+ };
267
+ },
268
+ fixHSB = function (hsb) {
269
+ return {
270
+ h: Math.min(360, Math.max(0, hsb.h)),
271
+ s: Math.min(100, Math.max(0, hsb.s)),
272
+ b: Math.min(100, Math.max(0, hsb.b))
273
+ };
274
+ },
275
+ fixRGB = function (rgb) {
276
+ return {
277
+ r: Math.min(255, Math.max(0, rgb.r)),
278
+ g: Math.min(255, Math.max(0, rgb.g)),
279
+ b: Math.min(255, Math.max(0, rgb.b))
280
+ };
281
+ },
282
+ fixHex = function (hex) {
283
+ var len = 6 - hex.length;
284
+ if (len > 0) {
285
+ var o = [];
286
+ for (var i=0; i<len; i++) {
287
+ o.push('0');
288
+ }
289
+ o.push(hex);
290
+ hex = o.join('');
291
+ }
292
+ return hex;
293
+ },
294
+ HexToRGB = function (hex) {
295
+ var hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16);
296
+ return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)};
297
+ },
298
+ HexToHSB = function (hex) {
299
+ return RGBToHSB(HexToRGB(hex));
300
+ },
301
+ RGBToHSB = function (rgb) {
302
+ var hsb = {
303
+ h: 0,
304
+ s: 0,
305
+ b: 0
306
+ };
307
+ var min = Math.min(rgb.r, rgb.g, rgb.b);
308
+ var max = Math.max(rgb.r, rgb.g, rgb.b);
309
+ var delta = max - min;
310
+ hsb.b = max;
311
+ if (max != 0) {
312
+
313
+ }
314
+ hsb.s = max != 0 ? 255 * delta / max : 0;
315
+ if (hsb.s != 0) {
316
+ if (rgb.r == max) {
317
+ hsb.h = (rgb.g - rgb.b) / delta;
318
+ } else if (rgb.g == max) {
319
+ hsb.h = 2 + (rgb.b - rgb.r) / delta;
320
+ } else {
321
+ hsb.h = 4 + (rgb.r - rgb.g) / delta;
322
+ }
323
+ } else {
324
+ hsb.h = -1;
325
+ }
326
+ hsb.h *= 60;
327
+ if (hsb.h < 0) {
328
+ hsb.h += 360;
329
+ }
330
+ hsb.s *= 100/255;
331
+ hsb.b *= 100/255;
332
+ return hsb;
333
+ },
334
+ HSBToRGB = function (hsb) {
335
+ var rgb = {};
336
+ var h = Math.round(hsb.h);
337
+ var s = Math.round(hsb.s*255/100);
338
+ var v = Math.round(hsb.b*255/100);
339
+ if(s == 0) {
340
+ rgb.r = rgb.g = rgb.b = v;
341
+ } else {
342
+ var t1 = v;
343
+ var t2 = (255-s)*v/255;
344
+ var t3 = (t1-t2)*(h%60)/60;
345
+ if(h==360) h = 0;
346
+ if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3}
347
+ else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3}
348
+ else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3}
349
+ else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3}
350
+ else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3}
351
+ else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3}
352
+ else {rgb.r=0; rgb.g=0; rgb.b=0}
353
+ }
354
+ return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)};
355
+ },
356
+ RGBToHex = function (rgb) {
357
+ var hex = [
358
+ rgb.r.toString(16),
359
+ rgb.g.toString(16),
360
+ rgb.b.toString(16)
361
+ ];
362
+ $.each(hex, function (nr, val) {
363
+ if (val.length == 1) {
364
+ hex[nr] = '0' + val;
365
+ }
366
+ });
367
+ return hex.join('');
368
+ },
369
+ HSBToHex = function (hsb) {
370
+ return RGBToHex(HSBToRGB(hsb));
371
+ },
372
+ restoreOriginal = function () {
373
+ var cal = $(this).parent();
374
+ var col = cal.data('colorpicker').origColor;
375
+ cal.data('colorpicker').color = col;
376
+ fillRGBFields(col, cal.get(0));
377
+ fillHexFields(col, cal.get(0));
378
+ fillHSBFields(col, cal.get(0));
379
+ setSelector(col, cal.get(0));
380
+ setHue(col, cal.get(0));
381
+ setNewColor(col, cal.get(0));
382
+ };
383
+ return {
384
+ init: function (opt) {
385
+ opt = $.extend({}, defaults, opt||{});
386
+ if (typeof opt.color == 'string') {
387
+ opt.color = HexToHSB(opt.color);
388
+ } else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) {
389
+ opt.color = RGBToHSB(opt.color);
390
+ } else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) {
391
+ opt.color = fixHSB(opt.color);
392
+ } else {
393
+ return this;
394
+ }
395
+ return this.each(function () {
396
+ if (!$(this).data('colorpickerId')) {
397
+ var options = $.extend({}, opt);
398
+ options.origColor = opt.color;
399
+ var id = 'collorpicker_' + parseInt(Math.random() * 1000);
400
+ $(this).data('colorpickerId', id);
401
+ var cal = $(tpl).attr('id', id);
402
+ if (options.flat) {
403
+ cal.appendTo(this).show();
404
+ } else {
405
+ cal.appendTo(document.body);
406
+ }
407
+ options.fields = cal
408
+ .find('input')
409
+ .bind('keyup', keyDown)
410
+ .bind('change', change)
411
+ .bind('blur', blur)
412
+ .bind('focus', focus);
413
+ cal
414
+ .find('span').bind('mousedown', downIncrement).end()
415
+ .find('>div.colorpicker_current_color').bind('click', restoreOriginal);
416
+ options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector);
417
+ options.selectorIndic = options.selector.find('div div');
418
+ options.el = this;
419
+ options.hue = cal.find('div.colorpicker_hue div');
420
+ cal.find('div.colorpicker_hue').bind('mousedown', downHue);
421
+ options.newColor = cal.find('div.colorpicker_new_color');
422
+ options.currentColor = cal.find('div.colorpicker_current_color');
423
+ cal.data('colorpicker', options);
424
+ cal.find('.colorpicker_submit')
425
+ .bind('mouseenter', enterSubmit)
426
+ .bind('mouseleave', leaveSubmit)
427
+ .bind('click', clickSubmit);
428
+ fillRGBFields(options.color, cal.get(0));
429
+ fillHSBFields(options.color, cal.get(0));
430
+ fillHexFields(options.color, cal.get(0));
431
+ setHue(options.color, cal.get(0));
432
+ setSelector(options.color, cal.get(0));
433
+ setCurrentColor(options.color, cal.get(0));
434
+ setNewColor(options.color, cal.get(0));
435
+ if (options.flat) {
436
+ cal.css({
437
+ position: 'relative',
438
+ display: 'block'
439
+ });
440
+ } else {
441
+ $(this).bind(options.eventName, show);
442
+ }
443
+ }
444
+ });
445
+ },
446
+ showPicker: function() {
447
+ return this.each( function () {
448
+ if ($(this).data('colorpickerId')) {
449
+ show.apply(this);
450
+ }
451
+ });
452
+ },
453
+ hidePicker: function() {
454
+ return this.each( function () {
455
+ if ($(this).data('colorpickerId')) {
456
+ $('#' + $(this).data('colorpickerId')).hide();
457
+ }
458
+ });
459
+ },
460
+ setColor: function(col) {
461
+ if (typeof col == 'string') {
462
+ col = HexToHSB(col);
463
+ } else if (col.r != undefined && col.g != undefined && col.b != undefined) {
464
+ col = RGBToHSB(col);
465
+ } else if (col.h != undefined && col.s != undefined && col.b != undefined) {
466
+ col = fixHSB(col);
467
+ } else {
468
+ return this;
469
+ }
470
+ return this.each(function(){
471
+ if ($(this).data('colorpickerId')) {
472
+ var cal = $('#' + $(this).data('colorpickerId'));
473
+ cal.data('colorpicker').color = col;
474
+ cal.data('colorpicker').origColor = col;
475
+ fillRGBFields(col, cal.get(0));
476
+ fillHSBFields(col, cal.get(0));
477
+ fillHexFields(col, cal.get(0));
478
+ setHue(col, cal.get(0));
479
+ setSelector(col, cal.get(0));
480
+ setCurrentColor(col, cal.get(0));
481
+ setNewColor(col, cal.get(0));
482
+ }
483
+ });
484
+ },
485
+ rgb2hex: function(rgb) {
486
+
487
+ }
488
+ };
489
+ }();
490
+ $.fn.extend({
491
+ ColorPicker: ColorPicker.init,
492
+ ColorPickerHide: ColorPicker.hidePicker,
493
+ ColorPickerShow: ColorPicker.showPicker,
494
+ ColorPickerSetColor: ColorPicker.setColor
495
+ });
496
  })(jQuery)
class.powerpress-subscribe-widget.php CHANGED
@@ -12,7 +12,6 @@ class PowerPressSubscribe_Widget extends WP_Widget {
12
  __( 'Subscribe to Podcast' , 'powerpress'),
13
  array( 'description' => __( 'Display subscribe to podcast links.' , 'powerpress') )
14
  );
15
-
16
  if ( is_active_widget( false, false, $this->id_base ) ) {
17
  add_action( 'wp_head', array( $this, 'css' ) );
18
  }
@@ -33,7 +32,7 @@ class PowerPressSubscribe_Widget extends WP_Widget {
33
  function css() {
34
  ?>
35
 
36
- <style type="text/css">
37
 
38
  /*
39
  PowerPress subscribe sidebar widget
@@ -49,126 +48,28 @@ PowerPress subscribe sidebar widget
49
  padding-bottom: 0;
50
  }
51
  <?php } ?>
52
-
53
- .pp-ssb-widget {
54
- width: 100%;
55
- margin: 0 auto;
56
- font-family: Sans-serif;
57
- color: #FFFFFF;
58
- }
59
- body .pp-ssb-widget a.pp-ssb-btn {
60
- width: 100% !important;
61
- height: 48px;
62
- padding: 0;
63
- color: #FFFFFF;
64
- display: inline-block;
65
- margin: 10px 0 10px 0;
66
- text-decoration: none;
67
- text-align:left;
68
- vertical-align: middle;
69
- line-height: 48px;
70
- font-size: 90% !important;
71
- font-weight: bold !important;
72
- overflow: hidden;
73
- border-radius: 1px;
74
- box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
75
- }
76
-
77
- body .sidebar .widget .pp-ssb-widget a:link,
78
- body .sidebar .widget .pp-ssb-widget a:visited,
79
- body .sidebar .widget .pp-ssb-widget a:active,
80
- body .sidebar .widget .pp-ssb-widget a:hover,
81
- body .pp-ssb-widget a.pp-ssb-btn:link,
82
- body .pp-ssb-widget a.pp-ssb-btn:visited,
83
- body .pp-ssb-widget a.pp-ssb-btn:active,
84
- body .pp-ssb-widget a.pp-ssb-btn:hover {
85
- text-decoration: none !important;
86
- color: #FFFFFF !important;
87
- }
88
- .pp-ssb-widget-dark a,
89
- .pp-ssb-widget-modern a {
90
- background-color: #222222;
91
- }
92
- .pp-ssb-widget-modern a.pp-ssb-itunes {
93
- background-color: #732BBE;
94
- }
95
- .pp-ssb-widget-modern a.pp-ssb-email {
96
- background-color: #337EC9;
97
- }
98
- .pp-ssb-widget-modern a.pp-ssb-stitcher {
99
- background-color: #197195;
100
- }
101
- .pp-ssb-widget-modern a.pp-ssb-tunein {
102
- background-color: #2CB6A8;
103
- }
104
- .pp-ssb-widget-modern a.pp-ssb-gp {
105
- background-color: #db3236;
106
- }
107
- .pp-ssb-widget-modern a.pp-ssb-spotify {
108
- background-color: #84bd00;
109
- background-color: #1db954;
110
- }
111
- .pp-ssb-widget-modern a.pp-ssb-android {
112
- background-color: #6AB344;
113
- }
114
- .pp-ssb-widget-modern a.pp-ssb-rss {
115
- background-color: #FF8800;
116
- }
117
- .pp-ssb-ic {
118
- width: 48px;
119
- height: 48px;
120
- border: 0;
121
- display: inline-block;
122
- vertical-align: middle;
123
- margin-right: 2px;
124
- background-image: url(<?php echo powerpress_get_root_url(); ?>images/spriteStandard2.png);
125
- background-repeat: no-repeat;
126
- background-size: 294px;
127
- }
128
- .pp-ssb-itunes .pp-ssb-ic {
129
- background-position: -49px 0;
130
- }
131
- .pp-ssb-rss .pp-ssb-ic {
132
- background-position: 0 -49px;
133
- }
134
- .pp-ssb-email .pp-ssb-ic {
135
- background-position: -196px -49px;
136
- }
137
- .pp-ssb-android .pp-ssb-ic {
138
- background-position: -98px -98px;
139
- }
140
- .pp-ssb-stitcher .pp-ssb-ic {
141
- background-position: -147px -98px;
142
- }
143
- .pp-ssb-tunein .pp-ssb-ic {
144
- background-position: -245px -98px;
145
- }
146
- .pp-ssb-spotify .pp-ssb-ic {
147
- background-position: -147px 0;
148
- }
149
- .pp-ssb-gp .pp-ssb-ic {
150
- background-position: -196px 0;
151
- }
152
- .pp-ssb-more .pp-ssb-ic {
153
- background-position: -49px -49px;
154
- }
155
- /* Retina-specific stuff here */
156
- @media only screen and (-webkit-min-device-pixel-ratio: 2.0),
157
- only screen and (min--moz-device-pixel-ratio: 2.0),
158
- only screen and (-o-min-device-pixel-ratio: 200/100),
159
- only screen and (min-device-pixel-ratio: 2.0) {
160
- .pp-sub-ic {
161
- background-image: url(<?php echo powerpress_get_root_url(); ?>images/spriteRetina2.png);
162
- }
163
- }
164
  </style>
165
  <?php
166
  }
167
 
168
  function form( $instance ) {
 
169
  if ( empty($instance['title']) ) {
170
  $instance['title'] = __( 'Subscribe to Podcast' , 'powerpress');
171
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
172
  if ( empty($instance['subscribe_type']) ) {
173
  $instance['subscribe_type'] = '';
174
  }
@@ -188,6 +89,29 @@ body .pp-ssb-widget a.pp-ssb-btn:hover {
188
  <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php esc_html_e( 'Title:' , 'powerpress'); ?></label>
189
  <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $instance['title'] ); ?>" />
190
  </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
191
  <p class="pp-sub-widget-p-subscribe_type">
192
  <label for="<?php echo $this->get_field_id('subscribe_type'); ?>"><?php _e( 'Select Podcast Type:', 'powerpress' ); ?></label>
193
  <select class="widefat powerpress-subscribe-type" onchange="javascript: powerpress_subscribe_widget_change(this)" id="<?php echo $this->get_field_id('subscribe_type'); ?>" name="<?php echo $this->get_field_name('subscribe_type'); ?>">
@@ -245,7 +169,10 @@ body .pp-ssb-widget a.pp-ssb-btn:hover {
245
 
246
  function update( $new_instance, $old_instance ) {
247
  $instance['title'] = strip_tags( $new_instance['title'] );
248
- $instance['subscribe_type'] = strip_tags( $new_instance['subscribe_type'] ); // general, channel, category, post_type, ttid
 
 
 
249
  $instance['subscribe_post_type'] = strip_tags( $new_instance['subscribe_post_type'] );; // eg sermons
250
  $instance['subscribe_feed_slug'] = strip_tags( $new_instance['subscribe_feed_slug'] );; // e.g. podcast
251
  $instance['subscribe_category_id'] = strip_tags( $new_instance['subscribe_category_id'] );; // e.g. 456
@@ -260,7 +187,6 @@ body .pp-ssb-widget a.pp-ssb-btn:hover {
260
  $ExtraData['subscribe_type'] = $instance['subscribe_type'];
261
  else
262
  $ExtraData['subscribe_type'] = '';
263
-
264
  switch( $ExtraData['subscribe_type'] )
265
  {
266
  case 'post_type': {
@@ -302,8 +228,26 @@ body .pp-ssb-widget a.pp-ssb-btn:hover {
302
 
303
  };
304
  }
305
-
306
  $Settings = powerpresssubscribe_get_settings( $ExtraData, false );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
307
  if( empty($Settings) )
308
  return;
309
 
@@ -317,7 +261,6 @@ body .pp-ssb-widget a.pp-ssb-btn:hover {
317
  echo esc_html( $instance['title'] );
318
  echo $args['after_title'];
319
  }
320
-
321
  echo powerpress_do_subscribe_sidebar_widget( $Settings );
322
  echo $args['after_widget'];
323
  return;
12
  __( 'Subscribe to Podcast' , 'powerpress'),
13
  array( 'description' => __( 'Display subscribe to podcast links.' , 'powerpress') )
14
  );
 
15
  if ( is_active_widget( false, false, $this->id_base ) ) {
16
  add_action( 'wp_head', array( $this, 'css' ) );
17
  }
32
  function css() {
33
  ?>
34
 
35
+ <style type="text/css" xmlns="http://www.w3.org/1999/html">
36
 
37
  /*
38
  PowerPress subscribe sidebar widget
48
  padding-bottom: 0;
49
  }
50
  <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  </style>
52
  <?php
53
  }
54
 
55
  function form( $instance ) {
56
+ $General = powerpress_get_settings('powerpress_general');
57
  if ( empty($instance['title']) ) {
58
  $instance['title'] = __( 'Subscribe to Podcast' , 'powerpress');
59
  }
60
+ if(empty($instance['style'])) {
61
+ if (empty($General['timestamp']) || $General['timestamp'] > 1570366800) {
62
+ $instance['style'] = 'modern';
63
+ } else {
64
+ $instance['style'] = 'classic';
65
+ }
66
+ }
67
+ if(empty($instance['modern_style'])) {
68
+ $instance['modern_style'] = 'squared';
69
+ }
70
+ if(empty($instance['modern_direction'])) {
71
+ $instance['modern_direction'] = 'vertical';
72
+ }
73
  if ( empty($instance['subscribe_type']) ) {
74
  $instance['subscribe_type'] = '';
75
  }
89
  <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php esc_html_e( 'Title:' , 'powerpress'); ?></label>
90
  <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $instance['title'] ); ?>" />
91
  </p>
92
+ <p>
93
+ <label for="<?php echo $this->get_field_id( 'style' ); ?>"><?php esc_html_e( 'Style:' , 'powerpress'); ?></label>
94
+ <select class="widefat" id="<?php echo $this->get_field_id( 'style' ); ?>" name="<?php echo $this->get_field_name( 'style' ); ?> ">
95
+ <option value="modern" <?php echo selected($instance['style'], 'modern')?> >Modern</option>
96
+ <option value="classic" <?php echo selected($instance['style'], 'classic') ?> >Classic</option>
97
+ </select>
98
+ </p>
99
+ <p class="pp-sub-widget-p-modern-styles">
100
+ <input type="radio" id="<?php echo $this->get_field_id('modern_style_square') ?>"
101
+ name="<?php echo $this->get_field_name('modern_style') ?>" value="squared" <?php echo $instance['modern_style'] === 'squared' ? 'checked' : '' ?> />
102
+ <label for="<?php echo $this->get_field_id('modern_style_square') ?>"> <?php esc_html_e('Squared', 'powerpress'); ?></label>
103
+ <input type="radio" id="<?php echo $this->get_field_id('modern_style_rounded') ?>"
104
+ name="<?php echo $this->get_field_name('modern_style') ?>" value="rounded" <?php echo $instance['modern_style'] === 'rounded' ? 'checked' : '' ?> />
105
+ <label for="<?php echo $this->get_field_id('modern_style_rounded') ?>"> <?php esc_html_e('Rounded', 'powerpress'); ?></label>
106
+ </p>
107
+ <p class="pp-sub-widget-p-modern-styles">
108
+ <input type="radio" id="<?php echo $this->get_field_id('modern_direction_vertical') ?>"
109
+ name="<?php echo $this->get_field_name('modern_direction') ?>" value="vertical" <?php echo $instance['modern_direction'] === 'vertical' ? 'checked' : '' ?> />
110
+ <label for="<?php echo $this->get_field_id('modern_direction_vertical') ?>"> <?php esc_html_e('Vertical', 'powerpress'); ?></label>
111
+ <input type="radio" id="<?php echo $this->get_field_id('modern_direction_horizontal') ?>"
112
+ name="<?php echo $this->get_field_name('modern_direction') ?>" value="horizontal" <?php echo $instance['modern_direction'] === 'horizontal' ? 'checked' : '' ?> />
113
+ <label for="<?php echo $this->get_field_id('modern_direction_horizontal') ?>"> <?php esc_html_e('Horizontal', 'powerpress'); ?></label>
114
+ </p>
115
  <p class="pp-sub-widget-p-subscribe_type">
116
  <label for="<?php echo $this->get_field_id('subscribe_type'); ?>"><?php _e( 'Select Podcast Type:', 'powerpress' ); ?></label>
117
  <select class="widefat powerpress-subscribe-type" onchange="javascript: powerpress_subscribe_widget_change(this)" id="<?php echo $this->get_field_id('subscribe_type'); ?>" name="<?php echo $this->get_field_name('subscribe_type'); ?>">
169
 
170
  function update( $new_instance, $old_instance ) {
171
  $instance['title'] = strip_tags( $new_instance['title'] );
172
+ $instance['style'] = strip_tags( $new_instance['style']);
173
+ $instance['modern_style'] = strip_tags( $new_instance['modern_style']);
174
+ $instance['modern_direction'] = strip_tags( $new_instance['modern_direction']);
175
+ $instance['subscribe_type'] = strip_tags( $new_instance['subscribe_type'] ); // general, channel, category, post_type, ttid
176
  $instance['subscribe_post_type'] = strip_tags( $new_instance['subscribe_post_type'] );; // eg sermons
177
  $instance['subscribe_feed_slug'] = strip_tags( $new_instance['subscribe_feed_slug'] );; // e.g. podcast
178
  $instance['subscribe_category_id'] = strip_tags( $new_instance['subscribe_category_id'] );; // e.g. 456
187
  $ExtraData['subscribe_type'] = $instance['subscribe_type'];
188
  else
189
  $ExtraData['subscribe_type'] = '';
 
190
  switch( $ExtraData['subscribe_type'] )
191
  {
192
  case 'post_type': {
228
 
229
  };
230
  }
 
231
  $Settings = powerpresssubscribe_get_settings( $ExtraData, false );
232
+ $Settings['modern_style'] = '-sq'; // Default to squared corners
233
+ $Settings['style'] = '';
234
+ if( isset($instance['style']) )
235
+ $Settings['style'] = $instance['style'];
236
+ if (defined('WP_DEBUG')) {
237
+ wp_enqueue_style('powerpress_subscribe_widget_modern', plugin_dir_url(__FILE__) . 'css/subscribe-widget.css');
238
+ } else {
239
+ wp_enqueue_style('powerpress_subscribe_widget_modern', plugin_dir_url(__FILE__) . 'css/subscribe-widget.min.css');
240
+ }
241
+ if( !empty($instance['modern_style']) && $instance['modern_style'] == 'squared') {
242
+ $Settings['modern_style'] = '-sq';
243
+ }
244
+ if( !empty($instance['modern_style']) && $instance['modern_style'] == 'rounded') {
245
+ $Settings['modern_style'] = ''; // Use new rounded corners
246
+ }
247
+
248
+ if( !empty($instance['modern_direction']) && $instance['modern_direction'] == 'horizontal') {
249
+ $Settings['modern_direction'] = 'horizontal';
250
+ }
251
  if( empty($Settings) )
252
  return;
253
 
261
  echo esc_html( $instance['title'] );
262
  echo $args['after_title'];
263
  }
 
264
  echo powerpress_do_subscribe_sidebar_widget( $Settings );
265
  echo $args['after_widget'];
266
  return;
class.powerpresswebsub.php CHANGED
@@ -1,61 +1,61 @@
1
- <?php
2
-
3
-
4
- class PowerPressWebSub
5
- {
6
- const DEFAULT_HUB = "https://pubsubhubbub.appspot.com";
7
- private $hub;
8
- private $wp_remote_options = false;
9
-
10
-
11
- /**
12
- * Websub constructor.
13
- * @param string $hub URL to the hub to use, defaults to <code>$DEFAULT_HUB</code>
14
- */
15
- public function __construct($hub = self::DEFAULT_HUB){
16
- $this->hub = $hub;
17
- $this->wp_remote_options['user_agent'] = 'Blubrry PowerPress/'.POWERPRESS_VERSION;
18
- $this->wp_remote_options['httpversion'] = '1.1';
19
- $this->wp_remote_options['headers'] = array('Content-Type'=>'application/x-www-form-urlencoded');
20
- $this->wp_remote_options['body'] = array('hub.mode'=>'publish');
21
- }
22
-
23
-
24
- /**
25
- * Publishes update to the hub
26
- * @param string $feedUrl URL of feed to update
27
- * @throws Exception Throws exception if HTTP response is not 20x and returns HTTP body
28
- */
29
- public function publish($feedUrl) {
30
-
31
- $this->wp_remote_options['body']['hub.url'] = $feedUrl;
32
- $response = wp_remote_post($this->hub, $this->wp_remote_options);
33
-
34
- if (is_wp_error($response)) // Handle system level errors
35
- {
36
- if ($response->get_error_message())
37
- throw new Exception($response->get_error_message());
38
- else
39
- throw new Exception("HTTP error response " . $response->get_error_code());
40
- return false;
41
- }
42
-
43
- if ($response['response']['code'] > 299) {
44
- if (!empty($response['body'])) // Handle service level errors
45
- throw new Exception($response['body']);
46
- else
47
- throw new Exception("HTTP response " . $response['response']['code']);
48
- return false;
49
- }
50
-
51
- return true;
52
- }
53
-
54
- /**
55
- * @return string
56
- */
57
- public function getHub()
58
- {
59
- return $this->hub;
60
- }
61
  }
1
+ <?php
2
+
3
+
4
+ class PowerPressWebSub
5
+ {
6
+ const DEFAULT_HUB = "https://pubsubhubbub.appspot.com";
7
+ private $hub;
8
+ private $wp_remote_options = false;
9
+
10
+
11
+ /**
12
+ * Websub constructor.
13
+ * @param string $hub URL to the hub to use, defaults to <code>$DEFAULT_HUB</code>
14
+ */
15
+ public function __construct($hub = self::DEFAULT_HUB){
16
+ $this->hub = $hub;
17
+ $this->wp_remote_options['user_agent'] = 'Blubrry PowerPress/'.POWERPRESS_VERSION;
18
+ $this->wp_remote_options['httpversion'] = '1.1';
19
+ $this->wp_remote_options['headers'] = array('Content-Type'=>'application/x-www-form-urlencoded');
20
+ $this->wp_remote_options['body'] = array('hub.mode'=>'publish');
21
+ }
22
+
23
+
24
+ /**
25
+ * Publishes update to the hub
26
+ * @param string $feedUrl URL of feed to update
27
+ * @throws Exception Throws exception if HTTP response is not 20x and returns HTTP body
28
+ */
29
+ public function publish($feedUrl) {
30
+
31
+ $this->wp_remote_options['body']['hub.url'] = $feedUrl;
32
+ $response = wp_remote_post($this->hub, $this->wp_remote_options);
33
+
34
+ if (is_wp_error($response)) // Handle system level errors
35
+ {
36
+ if ($response->get_error_message())
37
+ throw new Exception($response->get_error_message());
38
+ else
39
+ throw new Exception("HTTP error response " . $response->get_error_code());
40
+ return false;
41
+ }
42
+
43
+ if ($response['response']['code'] > 299) {
44
+ if (!empty($response['body'])) // Handle service level errors
45
+ throw new Exception($response['body']);
46
+ else
47
+ throw new Exception("HTTP response " . $response['response']['code']);
48
+ return false;
49
+ }
50
+
51
+ return true;
52
+ }
53
+
54
+ /**
55
+ * @return string
56
+ */
57
+ public function getHub()
58
+ {
59
+ return $this->hub;
60
+ }
61
  }
css/admin.css CHANGED
@@ -1,477 +1,477 @@
1
- /* admin.css */
2
-
3
- .powerpress-notice,
4
- div.powerpress-notice,
5
- .wrap div.powerpress-notice {
6
-
7
- margin: 20px 0 10px;
8
- padding: 0 5px;
9
- line-height: 29px;
10
- }
11
- .powerpress-error,
12
- div.powerpress-error,
13
- .wrap div.powerpress-error {
14
- margin: 20px 5px 10px;
15
- padding: 0 10px;
16
- line-height: 29px;
17
- font-size: 12px;
18
- border-width: 1px;
19
- border-style: solid;
20
- font-weight: bold;
21
- /* background-color: #ffebe8; /* red */
22
- }
23
- #powerpress_settings {
24
- background-image:url(//images.blubrry.com/powerpress/blubrry_logo7.png);
25
- background-repeat: no-repeat;
26
- background-position: bottom right;
27
- }
28
-
29
- #powerpress_settings ul li ul {
30
- list-style: disc;
31
- }
32
- #powerpress_settings ul li ul li {
33
- margin-left: 50px;
34
- font-size: 90%;
35
- }
36
- #powerpress_settings label {
37
- /* font-size: 110%; */
38
- }
39
- #powerpress_settings td {
40
- padding-top: 12px;
41
- }
42
- #powerpress_settings td p {
43
- padding-bottom: 10px;
44
- }
45
- .bpp_input_sm {
46
- width: 120px;
47
- }
48
- .bpp_input_med {
49
- width: 250px;
50
- }
51
- .bpp-input-normal {
52
- width: 80%;
53
- }
54
-
55
- .powerpress_color_box {
56
- float: left;
57
- width: 16px;
58
- height: 16px;
59
- cursor: pointer;
60
- margin: 4px 1px;
61
- border: 1px solid #666666;
62
-
63
- }
64
-
65
- .powerpress_tabbed_content > ul {
66
- margin-left:10px;
67
- position:relative;
68
- top:1px;
69
- z-index:100;
70
- }
71
-
72
- .powerpress_tabbed_content > ul li { list-style:none; float:left; margin-bottom:0;}
73
- .powerpress_tabbed_content > ul a {
74
- text-decoration:none;
75
- -moz-border-radius-bottomleft:0;
76
- -moz-border-radius-bottomright:0;
77
- -moz-border-radius-topleft:3px;
78
- -moz-border-radius-topright:3px;
79
- border-radius-topleft:3px;
80
- border-radius-topright:3px;
81
- border-style:solid;
82
- border-width:1px;
83
- cursor:pointer;
84
- display:block;
85
- height:18px;
86
- margin:5px 5px 0 0;
87
- padding:4px 5px 2px;
88
- background-color:#F1F1F1;
89
- background-color:#E3E3E3;
90
- border-color:#DFDFDF;
91
- border-color:#B3B3B3;
92
- color:#999999;
93
- color:#666666;
94
- font-weight: bold;
95
- }
96
- .powerpress_tabbed_content ul a:hover {
97
- }
98
-
99
- .powerpress_tabbed_content ul .ui-tabs-active a,
100
- .powerpress_tabbed_content ul .ui-tabs-selected a {
101
- background-color:#FFFFFF;
102
- border-bottom:0 none;
103
- color:#333333;
104
- cursor:default;
105
- padding-bottom:3px;
106
- }
107
-
108
-
109
-
110
- .powerpress_tabbed_content > div {
111
- padding: 0px 10px 10px 10px;
112
- *padding-top:3px;
113
- *margin-top:-15px;
114
- clear:left;
115
- }
116
- .powerpress_tabbed_content .wrap {
117
- padding:0;
118
- }
119
-
120
- .powerpress_tab {
121
- -moz-border-radius-bottomleft:0;
122
- -moz-border-radius-bottomright:0;
123
- -moz-border-radius-topleft:6px;
124
- -moz-border-radius-topright:6px;
125
- background: #FFF;
126
- border-collapse:separate;
127
- border-style:solid;
128
- border-width:1px;
129
- border-color:#DFDFDF;
130
- border-color:#B3B3B3;
131
- padding-bottom: 15px;
132
- }
133
- .powerpress_tab .form-table {
134
- margin-top: 0;
135
- margin-bottom: 0;
136
- }
137
-
138
- .powerpress_tab .form-table td {
139
- margin-bottom: 4px;
140
- padding: 4px 10px 4px;
141
- line-height: 20px;
142
- font-size: 11px;
143
- }
144
-
145
- #powerpress_support {
146
-
147
- }
148
- #powerpress_support li {
149
- margin-left: 70px;
150
- list-style-type:disc;
151
- margin-top: 0;
152
- margin-bottom: 0;
153
- }
154
-
155
- .powerpress-welcome-news {
156
- margin: 10px 0 0 0;
157
- float: left;
158
- width: 60%;
159
- border-right: 1px solid #CCCCCC;
160
- }
161
- .powerpress-welcome-news > div {
162
- margin: 0 10px 0 0;
163
- }
164
- .powerpress-welcome-news a {
165
- text-decoration: none;
166
- }
167
- .powerpress-welcome-news .rsswidget {
168
- font-size: 110%;
169
- font-weight: bold;
170
- }
171
- .powerpress-welcome-news .rss-date {
172
- font-size: 80%;
173
- margin-left: 10px;
174
- }
175
- .powerpress-welcome-news .rssSummary {
176
- font-size: 95%;
177
- }
178
- .powerpress-welcome-news .powerpressNewsPlayer {
179
- margin-top: 5px;
180
- }
181
- .powerpress-welcome-highlighted {
182
- margin: 10px 0 0 0;
183
- float: left;
184
- width: 39%;
185
- }
186
- .powerpress-welcome-highlighted > div {
187
- margin: 0 0 0 10px;
188
- }
189
- .powerpress-welcome-highlighted a {
190
- text-decoration: none;
191
- }
192
- .powerpress-welcome-highlighted .rsswidget {
193
- font-size: 115%;
194
- font-weight: bold;
195
- }
196
- .powerpress-welcome-highlighted .rssSummary {
197
- font-size: 95%;
198
- }
199
- .powerpress-welcome-news ul li, .powerpress-welcome-highlighted ul li {
200
- margin: 15px 0 10px 0;
201
- }
202
- .powerpress-welcome-news h2, .powerpress-welcome-highlighted h2 {
203
- padding: 0;
204
- }
205
-
206
- #powerpress_settings label.powerpress-normal-font {
207
- font-size: 11px;
208
- }
209
- #powerpress_admin_header {
210
- vertical-align: text-bottom;
211
- }
212
- #powerpress_admin_header h2 {
213
- /* float: left; */
214
- display: inline-block;
215
- }
216
- #powerpress_admin_header h2,
217
- #powerpress_admin_header h3,
218
- #powerpress_admin_header h4 {
219
- line-height: 1.1;
220
- margin: 10px 0 0 0;
221
- padding: 0;
222
- font-weight: bold;
223
- }
224
- #powerpress_admin_header p {
225
- line-height: 1.1;
226
- margin: 5px 0 10px 0;
227
- padding: 0;
228
- }
229
- #powerpress_admin_header .powerpress-admin-heading {
230
- font-weight: bold;
231
- }
232
- #powerpress_admin_header .powerpress-mode {
233
- margin-left: 14px;
234
- display: inline-block;
235
- color: #FF6600;
236
- font-size: 15px;
237
- font-weight: bold;
238
- }
239
- #pp-getting-started-box {
240
- max-width: 1200px;
241
- }
242
-
243
- #pp-getting-started-box h2 {
244
- font-size: 200%;
245
- margin-bottom: 20px;
246
- font-style: oblique;
247
- line-height: 1.2em;
248
- }
249
- #pp-getting-started-box > p {
250
- font-size: 125%;
251
- }
252
-
253
-
254
-
255
-
256
- .powerpress-required {
257
- font-size: 85%;
258
- color: #CC0000;
259
- margin-left: 12px;
260
- font-style:italic;
261
- }
262
-
263
- .powerpress-step {
264
- display: inline-block;
265
- float: left;
266
- width: 200px;
267
- width: 24%;
268
- margin-left: 60px;
269
- margin-right: 0;
270
- text-align: top;
271
- position: relative;
272
- padding: 8px;
273
- }
274
-
275
- .blubrry-services {
276
- color: #337EC9;
277
- font-size: 18px;
278
- line-height: 1.2;
279
- }
280
- .blubrry-services p {
281
- margin: 0 70px 0 0;
282
- padding: 0;
283
- }
284
- .blubrry-services strong {
285
- color: #FF6600;
286
- font-weight: normal;
287
- }
288
- .blubrry-services p.top-lines {
289
- margin-right: 0;
290
- }
291
- .blubrry-services a {
292
- color: #FF6600;
293
- font-size: 20px;
294
- line-height: 2;
295
- }
296
- .blubrry-services .blubrry-hosting,
297
- .blubrry-services .blubrry-stats {
298
- float: left;
299
- width: 230px;
300
- height: 140px;
301
- background-color: #ECECEC;
302
- padding: 10px;
303
- margin-top: 10px;
304
- }
305
- .blubrry-services .blubrry-stats {
306
- background-image: url('../images/StatsIcon.png');
307
- background-repeat:no-repeat;
308
- background-position: bottom right;
309
- }
310
-
311
- .blubrry-services .blubrry-hosting {
312
- margin-right: 50px;
313
- background-image: url('../images/BlubrryIcon.png');
314
- background-repeat:no-repeat;
315
- background-position: bottom right;
316
- }
317
-
318
-
319
- @media screen and (min-width: 1px) and (max-width: 819px) {
320
- .powerpress-step {
321
- width: 170px;
322
- }
323
- #powerpress_steps p {
324
- font-size: 16px;
325
- margin: 20px 4px;
326
- }
327
- .blubrry-services .blubrry-hosting {
328
- margin-right: 20px;
329
- }
330
- }
331
- @media screen and (min-width: 1px) and (max-width: 729px) {
332
-
333
- #powerpreess_step_1 {
334
- background-position: 1px bottom;
335
- }
336
- #powerpress_steps p {
337
- margin: 10px 4px;
338
- }
339
- .blubrry-services .blubrry-hosting {
340
- margin-right: 10px;
341
- }
342
- }
343
-
344
- @media screen and (min-width: 1px) and (max-width: 729px) {
345
-
346
- .powerpress-step {
347
- width: 24%;
348
- margin-left: 30px;
349
- }
350
- }
351
-
352
- .numberCircle {
353
- border-radius: 50%;
354
- behavior: url(PIE.htc); /* remove if you don't care about IE8 */
355
-
356
- width: 36px;
357
- height: 36px;
358
- padding: 8px;
359
-
360
- background: #fff;
361
- border: 2px solid #666;
362
- color: #666;
363
- text-align: center;
364
-
365
- font: 32px Arial, sans-serif;
366
- }
367
-
368
- #powerpress_settings_page {
369
- background: none;
370
- background-color: inherit;
371
- border: none;
372
- }
373
- #powerpress_settings_page .ui-widget-header {
374
- background: none;
375
- border: none;
376
- }
377
- #powerpress_settings_page .ui-state-default,
378
- #powerpress_settings_page .ui-widget-content .ui-state-default,
379
- #powerpress_settings_page .ui-widget-header .ui-state-default {
380
- background: none;
381
- border: none;
382
- }
383
- #powerpress_settings_page .ui-tabs-nav li {
384
- margin-bottom: 0px;
385
- border-bottom: none;
386
- }
387
-
388
- #powerpress_settings_page .ui-tabs-nav li.ui-tabs-active {
389
- margin-bottom: -1px;
390
- padding-bottom: 1px;
391
- }
392
- #powerpress_settings_page .ui-tabs-nav li a {
393
- padding: 4px 5px 2px;
394
- }
395
- #powerpress_settings_page .ui-tabs-nav li.ui-tabs-active a {
396
- padding: 4px 5px 3px;
397
- }
398
-
399
-
400
- #powerpress_settings_page .powerpress_tab {
401
- background-color: #FFFFFF;
402
- border-collapse: separate;
403
- border-style: solid;
404
- border-width: 1px;
405
- border-color: #DFDFDF;
406
- border-color: #B3B3B3;
407
- }
408
-
409
-
410
- /* sections */
411
- .pp-section {
412
- clear: both;
413
- padding: 0px;
414
- margin: 0px;
415
- }
416
- .pp-section dt {
417
- font-weight: bold;
418
- }
419
-
420
- .pp-expand-section {
421
- text-decoration: none;
422
- }
423
- a.pp-expand-section,
424
- a.pp-expand-section:hover,
425
- a.pp-expand-section:focus,
426
- a.pp-expand-section:visited {
427
- color: #1976D2;
428
- }
429
- .pp-expand-section:before,
430
- .pp-expand-section-expanded:before {
431
- background-color: #1976D2;
432
- border: 1px solid #1976D2;
433
- border-radius: 3px;
434
- font-weight: bold;
435
- color: #ffffff;
436
- height: 20px;
437
- width: 20px;
438
- display: inline-block;
439
- margin-right: 10px;
440
- text-align: center;
441
- font-size: 20px;
442
- }
443
- .pp-expand-section:before {
444
- content: ' \25C4'; /* &#9668; */
445
- content: '+';
446
- }
447
- .pp-expand-section-expanded:before {
448
- content: ' \25BC';
449
- content: '-';
450
- }
451
- .bbplayer_settings .form-table th{
452
- padding-bottom: 0;
453
- }
454
- .bbplayer_settings h3{
455
- color: #003366;
456
- font-weight: bold;
457
- }
458
- /* buttons */
459
- .wp-core-ui .button-blubrry {
460
- background: #1976D2;
461
- border-color: #1976D2;
462
- color: #FFFFFF;
463
- }
464
- .wp-core-ui .button-blubrry-gray {
465
- background: #f7f7f7;
466
- border-color: #ccc;
467
- color: #555;
468
- }
469
- .wp-core-ui .button-blubrry:hover,
470
- .wp-core-ui .button-blubrry:focus {
471
- background: #0D87E9;
472
- border-color: #0D87E9;
473
- color: #FFFFFF;
474
- }
475
- .pp-form-error {
476
- border: red solid 1px;
477
  }
1
+ /* admin.css */
2
+
3
+ .powerpress-notice,
4
+ div.powerpress-notice,
5
+ .wrap div.powerpress-notice {
6
+
7
+ margin: 20px 0 10px;
8
+ padding: 0 5px;
9
+ line-height: 29px;
10
+ }
11
+ .powerpress-error,
12
+ div.powerpress-error,
13
+ .wrap div.powerpress-error {
14
+ margin: 20px 5px 10px;
15
+ padding: 0 10px;
16
+ line-height: 29px;
17
+ font-size: 12px;
18
+ border-width: 1px;
19
+ border-style: solid;
20
+ font-weight: bold;
21
+ /* background-color: #ffebe8; /* red */
22
+ }
23
+ #powerpress_settings {
24
+ background-image:url(//images.blubrry.com/powerpress/blubrry_logo7.png);
25
+ background-repeat: no-repeat;
26
+ background-position: bottom right;
27
+ }
28
+
29
+ #powerpress_settings ul li ul {
30
+ list-style: disc;
31
+ }
32
+ #powerpress_settings ul li ul li {
33
+ margin-left: 50px;
34
+ font-size: 90%;
35
+ }
36
+ #powerpress_settings label {
37
+ /* font-size: 110%; */
38
+ }
39
+ #powerpress_settings td {
40
+ padding-top: 12px;
41
+ }
42
+ #powerpress_settings td p {
43
+ padding-bottom: 10px;
44
+ }
45
+ .bpp_input_sm {
46
+ width: 120px;
47
+ }
48
+ .bpp_input_med {
49
+ width: 250px;
50
+ }
51
+ .bpp-input-normal {
52
+ width: 80%;
53
+ }
54
+
55
+ .powerpress_color_box {
56
+ float: left;
57
+ width: 16px;
58
+ height: 16px;
59
+ cursor: pointer;
60
+ margin: 4px 1px;
61
+ border: 1px solid #666666;
62
+
63
+ }
64
+
65
+ .powerpress_tabbed_content > ul {
66
+ margin-left:10px;
67
+ position:relative;
68
+ top:1px;
69
+ z-index:100;
70
+ }
71
+
72
+ .powerpress_tabbed_content > ul li { list-style:none; float:left; margin-bottom:0;}
73
+ .powerpress_tabbed_content > ul a {
74
+ text-decoration:none;
75
+ -moz-border-radius-bottomleft:0;
76
+ -moz-border-radius-bottomright:0;
77
+ -moz-border-radius-topleft:3px;
78
+ -moz-border-radius-topright:3px;
79
+ border-radius-topleft:3px;
80
+ border-radius-topright:3px;
81
+ border-style:solid;
82
+ border-width:1px;
83
+ cursor:pointer;
84
+ display:block;
85
+ height:18px;
86
+ margin:5px 5px 0 0;
87
+ padding:4px 5px 2px;
88
+ background-color:#F1F1F1;
89
+ background-color:#E3E3E3;
90
+ border-color:#DFDFDF;
91
+ border-color:#B3B3B3;
92
+ color:#999999;
93
+ color:#666666;
94
+ font-weight: bold;
95
+ }
96
+ .powerpress_tabbed_content ul a:hover {
97
+ }
98
+
99
+ .powerpress_tabbed_content ul .ui-tabs-active a,
100
+ .powerpress_tabbed_content ul .ui-tabs-selected a {
101
+ background-color:#FFFFFF;
102
+ border-bottom:0 none;
103
+ color:#333333;
104
+ cursor:default;
105
+ padding-bottom:3px;
106
+ }
107
+
108
+
109
+
110
+ .powerpress_tabbed_content > div {
111
+ padding: 0px 10px 10px 10px;
112
+ *padding-top:3px;
113
+ *margin-top:-15px;
114
+ clear:left;
115
+ }
116
+ .powerpress_tabbed_content .wrap {
117
+ padding:0;
118
+ }
119
+
120
+ .powerpress_tab {
121
+ -moz-border-radius-bottomleft:0;
122
+ -moz-border-radius-bottomright:0;
123
+ -moz-border-radius-topleft:6px;
124
+ -moz-border-radius-topright:6px;
125
+ background: #FFF;
126
+ border-collapse:separate;
127
+ border-style:solid;
128
+ border-width:1px;
129
+ border-color:#DFDFDF;
130
+ border-color:#B3B3B3;
131
+ padding-bottom: 15px;
132
+ }
133
+ .powerpress_tab .form-table {
134
+ margin-top: 0;
135
+ margin-bottom: 0;
136
+ }
137
+
138
+ .powerpress_tab .form-table td {
139
+ margin-bottom: 4px;
140
+ padding: 4px 10px 4px;
141
+ line-height: 20px;
142
+ font-size: 11px;
143
+ }
144
+
145
+ #powerpress_support {
146
+
147
+ }
148
+ #powerpress_support li {
149
+ margin-left: 70px;
150
+ list-style-type:disc;
151
+ margin-top: 0;
152
+ margin-bottom: 0;
153
+ }
154
+
155
+ .powerpress-welcome-news {
156
+ margin: 10px 0 0 0;
157
+ float: left;
158
+ width: 60%;
159
+ border-right: 1px solid #CCCCCC;
160
+ }
161
+ .powerpress-welcome-news > div {
162
+ margin: 0 10px 0 0;
163
+ }
164
+ .powerpress-welcome-news a {
165
+ text-decoration: none;
166
+ }
167
+ .powerpress-welcome-news .rsswidget {
168
+ font-size: 110%;
169
+ font-weight: bold;
170
+ }
171
+ .powerpress-welcome-news .rss-date {
172
+ font-size: 80%;
173
+ margin-left: 10px;
174
+ }
175
+ .powerpress-welcome-news .rssSummary {
176
+ font-size: 95%;
177
+ }
178
+ .powerpress-welcome-news .powerpressNewsPlayer {
179
+ margin-top: 5px;
180
+ }
181
+ .powerpress-welcome-highlighted {
182
+ margin: 10px 0 0 0;
183
+ float: left;
184
+ width: 39%;
185
+ }
186
+ .powerpress-welcome-highlighted > div {
187
+ margin: 0 0 0 10px;
188
+ }
189
+ .powerpress-welcome-highlighted a {
190
+ text-decoration: none;
191
+ }
192
+ .powerpress-welcome-highlighted .rsswidget {
193
+ font-size: 115%;
194
+ font-weight: bold;
195
+ }
196
+ .powerpress-welcome-highlighted .rssSummary {
197
+ font-size: 95%;
198
+ }
199
+ .powerpress-welcome-news ul li, .powerpress-welcome-highlighted ul li {
200
+ margin: 15px 0 10px 0;
201
+ }
202
+ .powerpress-welcome-news h2, .powerpress-welcome-highlighted h2 {
203
+ padding: 0;
204
+ }
205
+
206
+ #powerpress_settings label.powerpress-normal-font {
207
+ font-size: 11px;
208
+ }
209
+ #powerpress_admin_header {
210
+ vertical-align: text-bottom;
211
+ }
212
+ #powerpress_admin_header h2 {
213
+ /* float: left; */
214
+ display: inline-block;
215
+ }
216
+ #powerpress_admin_header h2,
217
+ #powerpress_admin_header h3,
218
+ #powerpress_admin_header h4 {
219
+ line-height: 1.1;
220
+ margin: 10px 0 0 0;
221
+ padding: 0;
222
+ font-weight: bold;
223
+ }
224
+ #powerpress_admin_header p {
225
+ line-height: 1.1;
226
+ margin: 5px 0 10px 0;
227
+ padding: 0;
228
+ }
229
+ #powerpress_admin_header .powerpress-admin-heading {
230
+ font-weight: bold;
231
+ }
232
+ #powerpress_admin_header .powerpress-mode {
233
+ margin-left: 14px;
234
+ display: inline-block;
235
+ color: #FF6600;
236
+ font-size: 15px;
237
+ font-weight: bold;
238
+ }
239
+ #pp-getting-started-box {
240
+ max-width: 1200px;
241
+ }
242
+
243
+ #pp-getting-started-box h2 {
244
+ font-size: 200%;
245
+ margin-bottom: 20px;
246
+ font-style: oblique;
247
+ line-height: 1.2em;
248
+ }
249
+ #pp-getting-started-box > p {
250
+ font-size: 125%;
251
+ }
252
+
253
+
254
+
255
+
256
+ .powerpress-required {
257
+ font-size: 85%;
258
+ color: #CC0000;
259
+ margin-left: 12px;
260
+ font-style:italic;
261
+ }
262
+
263
+ .powerpress-step {
264
+ display: inline-block;
265
+ float: left;
266
+ width: 200px;
267
+ width: 24%;
268
+ margin-left: 60px;
269
+ margin-right: 0;
270
+ text-align: top;
271
+ position: relative;
272
+ padding: 8px;
273
+ }
274
+
275
+ .blubrry-services {
276
+ color: #337EC9;
277
+ font-size: 18px;
278
+ line-height: 1.2;
279
+ }
280
+ .blubrry-services p {
281
+ margin: 0 70px 0 0;
282
+ padding: 0;
283
+ }
284
+ .blubrry-services strong {
285
+ color: #FF6600;
286
+ font-weight: normal;
287
+ }
288
+ .blubrry-services p.top-lines {
289
+ margin-right: 0;
290
+ }
291
+ .blubrry-services a {
292
+ color: #FF6600;
293
+ font-size: 20px;
294
+ line-height: 2;
295
+ }
296
+ .blubrry-services .blubrry-hosting,
297
+ .blubrry-services .blubrry-stats {
298
+ float: left;
299
+ width: 230px;
300
+ height: 140px;
301
+ background-color: #ECECEC;
302
+ padding: 10px;
303
+ margin-top: 10px;
304
+ }
305
+ .blubrry-services .blubrry-stats {
306
+ background-image: url('../images/StatsIcon.png');
307
+ background-repeat:no-repeat;
308
+ background-position: bottom right;
309
+ }
310
+
311
+ .blubrry-services .blubrry-hosting {
312
+ margin-right: 50px;
313
+ background-image: url('../images/BlubrryIcon.png');
314
+ background-repeat:no-repeat;
315
+ background-position: bottom right;
316
+ }
317
+
318
+
319
+ @media screen and (min-width: 1px) and (max-width: 819px) {
320
+ .powerpress-step {
321
+ width: 170px;
322
+ }
323
+ #powerpress_steps p {
324
+ font-size: 16px;
325
+ margin: 20px 4px;
326
+ }
327
+ .blubrry-services .blubrry-hosting {
328
+ margin-right: 20px;
329
+ }
330
+ }
331
+ @media screen and (min-width: 1px) and (max-width: 729px) {
332
+
333
+ #powerpreess_step_1 {
334
+ background-position: 1px bottom;
335
+ }
336
+ #powerpress_steps p {
337
+ margin: 10px 4px;
338
+ }
339
+ .blubrry-services .blubrry-hosting {
340
+ margin-right: 10px;
341
+ }
342
+ }
343
+
344
+ @media screen and (min-width: 1px) and (max-width: 729px) {
345
+
346
+ .powerpress-step {
347
+ width: 24%;
348
+ margin-left: 30px;
349
+ }
350
+ }
351
+
352
+ .numberCircle {
353
+ border-radius: 50%;
354
+ behavior: url(PIE.htc); /* remove if you don't care about IE8 */
355
+
356
+ width: 36px;
357
+ height: 36px;
358
+ padding: 8px;
359
+
360
+ background: #fff;
361
+ border: 2px solid #666;
362
+ color: #666;
363
+ text-align: center;
364
+
365
+ font: 32px Arial, sans-serif;
366
+ }
367
+
368
+ #powerpress_settings_page {
369
+ background: none;
370
+ background-color: inherit;
371
+ border: none;
372
+ }
373
+ #powerpress_settings_page .ui-widget-header {
374
+ background: none;
375
+ border: none;
376
+ }
377
+ #powerpress_settings_page .ui-state-default,
378
+ #powerpress_settings_page .ui-widget-content .ui-state-default,
379
+ #powerpress_settings_page .ui-widget-header .ui-state-default {
380
+ background: none;
381
+ border: none;
382
+ }
383
+ #powerpress_settings_page .ui-tabs-nav li {
384
+ margin-bottom: 0px;
385
+ border-bottom: none;
386
+ }
387
+
388
+ #powerpress_settings_page .ui-tabs-nav li.ui-tabs-active {
389
+ margin-bottom: -1px;
390
+ padding-bottom: 1px;
391
+ }
392
+ #powerpress_settings_page .ui-tabs-nav li a {
393
+ padding: 4px 5px 2px;
394
+ }
395
+ #powerpress_settings_page .ui-tabs-nav li.ui-tabs-active a {
396
+ padding: 4px 5px 3px;
397
+ }
398
+
399
+
400
+ #powerpress_settings_page .powerpress_tab {
401
+ background-color: #FFFFFF;
402
+ border-collapse: separate;
403
+ border-style: solid;
404
+ border-width: 1px;
405
+ border-color: #DFDFDF;
406
+ border-color: #B3B3B3;
407
+ }
408
+
409
+
410
+ /* sections */
411
+ .pp-section {
412
+ clear: both;
413
+ padding: 0px;
414
+ margin: 0px;
415
+ }
416
+ .pp-section dt {
417
+ font-weight: bold;
418
+ }
419
+
420
+ .pp-expand-section {
421
+ text-decoration: none;
422
+ }
423
+ a.pp-expand-section,
424
+ a.pp-expand-section:hover,
425
+ a.pp-expand-section:focus,
426
+ a.pp-expand-section:visited {
427
+ color: #1976D2;
428
+ }
429
+ .pp-expand-section:before,
430
+ .pp-expand-section-expanded:before {
431
+ background-color: #1976D2;
432
+ border: 1px solid #1976D2;
433
+ border-radius: 3px;
434
+ font-weight: bold;
435
+ color: #ffffff;
436
+ height: 20px;
437
+ width: 20px;
438
+ display: inline-block;
439
+ margin-right: 10px;
440
+ text-align: center;
441
+ font-size: 20px;
442
+ }
443
+ .pp-expand-section:before {
444
+ content: ' \25C4'; /* &#9668; */
445
+ content: '+';
446
+ }
447
+ .pp-expand-section-expanded:before {
448
+ content: ' \25BC';
449
+ content: '-';
450
+ }
451
+ .bbplayer_settings .form-table th{
452
+ padding-bottom: 0;
453
+ }
454
+ .bbplayer_settings h3{
455
+ color: #003366;
456
+ font-weight: bold;
457
+ }
458
+ /* buttons */
459
+ .wp-core-ui .button-blubrry {
460
+ background: #1976D2;
461
+ border-color: #1976D2;
462
+ color: #FFFFFF;
463
+ }
464
+ .wp-core-ui .button-blubrry-gray {
465
+ background: #f7f7f7;
466
+ border-color: #ccc;
467
+ color: #555;
468
+ }
469
+ .wp-core-ui .button-blubrry:hover,