Crowdsignal Dashboard – Polls, Surveys & more - Version 1.4

Version Description

  • Added new poll styles selector
Download this release

Release Info

Developer eoigal
Plugin Icon 128x128 Crowdsignal Dashboard – Polls, Surveys & more
Version 1.4
Comparing to
See all releases

Code changes from version 1.3 to 1.4

Files changed (4) hide show
  1. poll-style-picker.js +349 -0
  2. polldaddy.css +89 -2
  3. polldaddy.php +117 -67
  4. readme.txt +4 -2
poll-style-picker.js ADDED
@@ -0,0 +1,349 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function $(id) {
2
+ return document.getElementById(id);
3
+ }
4
+
5
+ function pd_style() {
6
+ this.name = ''; // style name
7
+ this.n_id = 0; // narrow style id
8
+ this.n_desc = ''; // narrow style description
9
+ this.m_id = 0; // medium style id
10
+ this.m_desc = ''; // medium style description
11
+ this.w_id = 0; // wide style id
12
+ this.w_desc = ''; // wide style description
13
+ this.tag = ''; // tag name for styles
14
+ }
15
+
16
+ var styles_array = new Array();
17
+
18
+ var s = new pd_style;
19
+ s.name = 'Aluminum';
20
+ s.n_id = 101;
21
+ s.m_id = 102;
22
+ s.w_id = 103;
23
+ s.tag = 'st-alum-light';
24
+ styles_array.push(s);
25
+
26
+ var s = new pd_style;
27
+ s.name = 'Plain White';
28
+ s.n_id = 104;
29
+ s.m_id = 105;
30
+ s.w_id = 106;
31
+ s.tag = 'st-plain-light';
32
+ styles_array.push(s);
33
+
34
+ var s = new pd_style;
35
+ s.name = 'Plain Black';
36
+ s.n_id = 107;
37
+ s.m_id = 108;
38
+ s.w_id = 109;
39
+ s.tag = 'st-plain-dark';
40
+ styles_array.push(s);
41
+
42
+ var s = new pd_style;
43
+ s.name = 'Paper';
44
+ s.n_id = 110;
45
+ s.m_id = 111;
46
+ s.w_id = 112;
47
+ s.tag = 'st-paper';
48
+ styles_array.push(s);
49
+
50
+ var s = new pd_style;
51
+ s.name = 'Skull Dark';
52
+ s.n_id = 113;
53
+ s.m_id = 114;
54
+ s.w_id = 115;
55
+ s.tag = 'st-skull-dark';
56
+ styles_array.push(s);
57
+
58
+ var s = new pd_style;
59
+ s.name = 'Skull Light';
60
+ s.n_id = 116;
61
+ s.m_id = 117;
62
+ s.w_id = 118;
63
+ s.tag = 'st-skull-light';
64
+ styles_array.push(s);
65
+
66
+ var s = new pd_style;
67
+ s.name = 'Plastic White';
68
+ s.n_id = 119;
69
+ s.m_id = 120;
70
+ s.w_id = 121;
71
+ s.tag = 'st-plastic-white';
72
+ styles_array.push(s);
73
+
74
+ var s = new pd_style;
75
+ s.name = 'Plastic Grey';
76
+ s.n_id = 122;
77
+ s.m_id = 123;
78
+ s.w_id = 124;
79
+ s.tag = 'st-plastic-grey';
80
+ styles_array.push(s);
81
+
82
+ var s = new pd_style;
83
+ s.name = 'Plastic Black';
84
+ s.n_id = 125;
85
+ s.m_id = 126;
86
+ s.w_id = 127;
87
+ s.tag = 'st-plastic-black';
88
+ styles_array.push(s);
89
+
90
+ var s = new pd_style;
91
+ s.name = 'Manga';
92
+ s.n_id = 128;
93
+ s.m_id = 129;
94
+ s.w_id = 130;
95
+ s.tag = 'st-manga';
96
+ styles_array.push(s);
97
+
98
+ var s = new pd_style;
99
+ s.name = 'Tech Dark';
100
+ s.n_id = 131;
101
+ s.m_id = 132;
102
+ s.w_id = 133;
103
+ s.tag = 'st-tech-dark';
104
+ styles_array.push(s);
105
+
106
+ var s = new pd_style;
107
+ s.name = 'Tech Grey';
108
+ s.n_id = 134;
109
+ s.m_id = 135;
110
+ s.w_id = 136;
111
+ s.tag = 'st-tech-grey';
112
+ styles_array.push(s);
113
+
114
+ var s = new pd_style;
115
+ s.name = 'Tech Light';
116
+ s.n_id = 137;
117
+ s.m_id = 138;
118
+ s.w_id = 139;
119
+ s.tag = 'st-tech-light';
120
+ styles_array.push(s);
121
+
122
+ var s = new pd_style;
123
+ s.name = 'Working Male';
124
+ s.n_id = 140;
125
+ s.m_id = 141;
126
+ s.w_id = 142;
127
+ s.tag = 'st-working-male';
128
+ styles_array.push(s);
129
+
130
+ var s = new pd_style;
131
+ s.name = 'Working Female';
132
+ s.n_id = 143;
133
+ s.m_id = 144;
134
+ s.w_id = 145;
135
+ s.tag = 'st-working-female';
136
+ styles_array.push(s);
137
+
138
+ var s = new pd_style;
139
+ s.name = 'Thinking Male';
140
+ s.n_id = 146;
141
+ s.m_id = 147;
142
+ s.w_id = 148;
143
+ s.tag = 'st-thinking-male';
144
+ styles_array.push(s);
145
+
146
+ var s = new pd_style;
147
+ s.name = 'Thinking Female';
148
+ s.n_id = 149;
149
+ s.m_id = 150;
150
+ s.w_id = 151;
151
+ s.tag = 'st-thinking-female';
152
+ styles_array.push(s);
153
+
154
+ var s = new pd_style;
155
+ s.name = 'Sunset';
156
+ s.n_id = 152;
157
+ s.m_id = 153;
158
+ s.w_id = 154;
159
+ s.tag = 'st-sunset';
160
+ styles_array.push(s);
161
+
162
+ var s = new pd_style;
163
+ s.name = 'Music';
164
+ s.m_id = 155;
165
+ s.w_id = 156;
166
+ s.tag = 'st-music';
167
+ styles_array.push(s);
168
+
169
+
170
+ var style_id = 0;
171
+
172
+
173
+ function pd_build_styles( current_pos )
174
+ {
175
+ var style = styles_array[ current_pos ];
176
+ $('st_name').innerHTML = style.name;
177
+
178
+ var style_sizes = '';
179
+
180
+ if ( style_id == 0 )
181
+ {
182
+ if ( style.m_id > 0 )
183
+ {
184
+ style_id = style.m_id;
185
+ }
186
+ else if ( style.w_id > 0 )
187
+ {
188
+ style_id = style.w_id;
189
+ }
190
+ else if ( style.n_id > 0 )
191
+ {
192
+ style_id = style.w_id;
193
+ }
194
+ }
195
+
196
+ if ( style.w_id > 0 )
197
+ {
198
+ if ( style_id == style.w_id )
199
+ {
200
+ style_sizes += 'Wide | ';
201
+
202
+ if ( style.w_desc == '' )
203
+ {
204
+ $('st_description').innerHTML = 'Width: 630px, the wide style is good for blog posts.';
205
+ }
206
+ else
207
+ {
208
+ $('st_description').innerHTML = style.w_desc;
209
+ }
210
+ }
211
+ else
212
+ {
213
+ style_sizes += '<a href="javascript:pd_change_style(' + style.w_id + ');">Wide</a> | ';
214
+ }
215
+ }
216
+ if ( style.m_id > 0 )
217
+ {
218
+ if ( style_id == style.m_id )
219
+ {
220
+ style_sizes += 'Medium';
221
+
222
+ if ( style.n_id > 0 ){
223
+ style_sizes += ' | ';
224
+ }
225
+
226
+ if ( style.m_desc == '' )
227
+ {
228
+ $('st_description').innerHTML = 'Width: 300px, the medium style is good for general use.';
229
+ }
230
+ else
231
+ {
232
+ $('st_description').innerHTML = style.m_desc;
233
+ }
234
+
235
+ }
236
+ else
237
+ {
238
+ style_sizes += '<a href="javascript:pd_change_style(' + style.m_id + ');">Medium</a>';
239
+ if ( style.n_id > 0 ){
240
+ style_sizes += ' | ';
241
+ }
242
+ }
243
+ }
244
+ if ( style.n_id > 0 )
245
+ {
246
+ if ( style_id == style.n_id )
247
+ {
248
+ style_sizes += 'Narrow ';
249
+
250
+ if ( style.n_desc == '' )
251
+ {
252
+ $('st_description').innerHTML = 'Width: 150px, the narrow style is good for sidebars etc.';
253
+ }
254
+ else
255
+ {
256
+ $('st_description').innerHTML = style.n_desc;
257
+ }
258
+
259
+ }
260
+ else
261
+ {
262
+ style_sizes += '<a href="javascript:pd_change_style(' + style.n_id + ');">Narrow</a> ';
263
+ }
264
+ }
265
+
266
+ $('st_sizes').innerHTML = style_sizes;
267
+ $('st_number').innerHTML = (current_pos + 1) +' of '+ styles_array.length;
268
+ $('st_image').style.background = 'url(http://i.polldaddy.com/polls/' + style.tag + '.png) no-repeat top left';
269
+
270
+ $('regular').checked = true;
271
+ $('styleID').value = style_id;
272
+ }
273
+
274
+ function pd_pick_style( id )
275
+ {
276
+ found = false;
277
+ for ( x=0; x<=styles_array.length - 1; x++ )
278
+ {
279
+ if ( styles_array[x].n_id == id || styles_array[x].m_id == id || styles_array[x].w_id == id )
280
+ {
281
+ current_pos = x;
282
+ pd_change_style( id );
283
+ found = true;
284
+ break;
285
+ }
286
+ }
287
+
288
+ if (!found)
289
+ {
290
+ current_pos = 0;
291
+ pd_build_styles( current_pos );
292
+ }
293
+ }
294
+
295
+ function pd_change_style( id ){
296
+ style_id = id;
297
+
298
+ if ( style_id < 1000 ) // Regular
299
+ {
300
+ $('regular').checked = true;
301
+ pd_build_styles( current_pos );
302
+ }
303
+ else // custom
304
+ {
305
+ $('custom').checked = true;
306
+ }
307
+
308
+ $('styleID').value = style_id;
309
+ }
310
+
311
+ function pd_move( dir )
312
+ {
313
+ if ( dir == 'next' )
314
+ {
315
+ if ( styles_array.length <= ( current_pos + 1 ) )
316
+ {
317
+ current_pos = 0;
318
+ }
319
+ else
320
+ {
321
+ current_pos = current_pos + 1;
322
+ }
323
+ }
324
+ else if ( dir == 'prev' )
325
+ {
326
+ if ( current_pos == 0 )
327
+ {
328
+ current_pos = styles_array.length - 1;
329
+ }
330
+ else
331
+ {
332
+ current_pos = current_pos - 1;
333
+ }
334
+ }
335
+ style_id = 0;
336
+ pd_build_styles( current_pos );
337
+ }
338
+
339
+ function st_results( obj, cmd )
340
+ {
341
+ if ( cmd == 'show' )
342
+ {
343
+ obj.style.backgroundPosition = 'top right';
344
+ }
345
+ else if ( cmd == 'hide' )
346
+ {
347
+ obj.style.backgroundPosition = 'top left';
348
+ }
349
+ }
polldaddy.css CHANGED
@@ -258,8 +258,95 @@ tr.polldaddy-shortcode-row pre {
258
 
259
  .design_standard {
260
  display: block;
 
261
  }
262
 
263
- .design_custom {
264
- display: none;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
265
  }
258
 
259
  .design_standard {
260
  display: block;
261
+ padding: 0px 0px 0px 20px;
262
  }
263
 
264
+ .pollStyle
265
+ {
266
+ width: 100%;
267
+ border-collapse:collapse;
268
+ }
269
+
270
+ .pollStyle .cb
271
+ {
272
+ height: 40px;
273
+ width: 30px;
274
+ padding: 0px 0px 2px 0px;
275
+ }
276
+
277
+ .pollStyle .selector
278
+ {
279
+ width: 250px;
280
+ }
281
+
282
+ .pollStyle .customSelect
283
+ {
284
+ vertical-align: top;
285
+ text-align:left;
286
+ margin: 0px;
287
+ }
288
+
289
+ .pollStyle TH
290
+ {
291
+ text-align: left;
292
+ }
293
+
294
+ .st_selector {
295
+ border-collapse: collapse;
296
+ }
297
+
298
+ .st_selector .img {
299
+ width: 150px;
300
+ padding: 0px;
301
+ margin: 0px;
302
+ height: 200px;
303
+ }
304
+
305
+ .st_selector .dir_left {
306
+ padding: 0px 10px 0px 0px;
307
+ width:75px;
308
+ }
309
+
310
+ .st_selector .dir_right {
311
+ padding: 0px 0px 0px 20px;
312
+ width:75px;
313
+ }
314
+
315
+ .st_selector .title {
316
+ text-align: center;
317
+ height: 20px;
318
+ font-weight: bold;
319
+ }
320
+
321
+ .st_selector .counter {
322
+ text-align: center;
323
+ width: 150px;
324
+ padding: 10px 0px 0px 0px;
325
+ }
326
+
327
+ #st_image{
328
+ width: 150px;
329
+ padding: 0px;
330
+ margin: 0px;
331
+ height: 200px;
332
+ }
333
+
334
+ #st_sizes{
335
+ width: 150px;
336
+ text-align: center;
337
+ font-size:12px;
338
+ }
339
+
340
+ .st_image_loader{
341
+ width: 150px;
342
+ padding: 0px;
343
+ margin: 0px;
344
+ background: url(http://i.polldaddy.com/polls/st-loader.gif) no-repeat center center;
345
+ }
346
+
347
+ #st_description{
348
+ padding: 6px 0px;
349
+ font-size: 10px;
350
+ width: 300px;
351
+ text-align: center;
352
  }
polldaddy.php CHANGED
@@ -5,7 +5,7 @@ Plugin Name: PollDaddy Polls
5
  Description: Create and manage PollDaddy polls in WordPress
6
  Author: Automattic, Inc.
7
  Author URL: http://automattic.com/
8
- Version: 1.3
9
  */
10
 
11
  // You can hardcode your PollDaddy PartnerGUID (API Key) here
@@ -24,7 +24,7 @@ class WP_PollDaddy {
24
  var $base_url = false;
25
  var $use_ssl = 0;
26
  var $scheme = 'https';
27
- var $version = '1.3';
28
 
29
  var $polldaddy_clients = array();
30
 
@@ -306,6 +306,7 @@ class WP_PollDaddy {
306
 
307
  require_once WP_POLLDADDY__POLLDADDY_CLIENT_PATH;
308
 
 
309
  wp_enqueue_script( 'polls', "{$this->base_url}polldaddy.js", array( 'jquery', 'jquery-ui-sortable' ), $this->version );
310
  wp_enqueue_script( 'admin-forms' );
311
  add_thickbox();
@@ -524,6 +525,13 @@ class WP_PollDaddy {
524
  return false;
525
 
526
  $poll_data['answers'] = $answers;
 
 
 
 
 
 
 
527
  $poll_data['styleID'] = (int) $_POST['styleID'];
528
 
529
  $polldaddy->reset();
@@ -564,6 +572,13 @@ class WP_PollDaddy {
564
  $poll_data[$key] = stripslashes( $_POST[$key] );
565
 
566
  $poll_data['answers'] = $answers;
 
 
 
 
 
 
 
567
 
568
  $poll = $polldaddy->CreatePoll( $poll_data );
569
  $this->parse_errors( $polldaddy );
@@ -1088,37 +1103,15 @@ class WP_PollDaddy {
1088
  <div id="design" class="postbox">
1089
 
1090
  <?php $style_ID = (int) ( $is_POST ? $_POST['styleID'] : $poll->styleID );
1091
-
1092
- $options = array(
1093
- 0 => 'Grey Plastic Standard',
1094
- 1 => 'White Plastic Standard',
1095
- 2 => 'Black Plastic Standard',
1096
- 3 => 'Simple Grey',
1097
- 4 => 'Simple White',
1098
- 5 => 'Simple Dark',
1099
- 6 => 'Thinking 1',
1100
- 7 => 'Thinking 2',
1101
- 8 => 'Manga',
1102
- 9 => 'Working 1',
1103
- 10 => 'Working 2',
1104
- 11 => 'SideBar Narrow (Dark)',
1105
- 12 => 'SideBar Narrow (Light)',
1106
- 13 => 'SideBar Narrow (Grey)',
1107
- 14 => 'Skulls',
1108
- 15 => 'Music',
1109
- 16 => 'Sunset',
1110
- 17 => 'Pink Butterflies',
1111
- 18 => 'Map'
1112
- );
1113
 
1114
  $polldaddy->reset();
1115
  $styles = $polldaddy->GetStyles();
1116
-
1117
  $show_custom = false;
1118
  if( isset( $styles ) && count( $styles ) > 0 ){
1119
  $show_custom = true;
1120
  }
1121
-
1122
  if ( $style_ID > 18 ){
1123
  $standard_style_ID = 0;
1124
  $custom_style_ID = $style_ID;
@@ -1130,49 +1123,106 @@ class WP_PollDaddy {
1130
  ?>
1131
 
1132
  <h3><?php _e( 'Design' ); ?></h3>
1133
-
1134
  <div class="inside">
1135
- <div id="design_standard" >
1136
- <div class="hide-if-no-js">
1137
- <a class="alignleft" href="#previous">&#171;</a>
1138
- <a class="alignright" href="#next">&#187;</a>
1139
- <img src="http://polldaddy.com/images/<?php echo $standard_style_ID; ?>.gif" />
1140
- <img class="hide-if-js" src="http://polldaddy.com/images/<?php echo 1 + $standard_style_ID; ?>.gif" />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1141
  </div>
1142
-
1143
- <p class="hide-if-js" id="no-js-styleID">
1144
- <select name="styleID">
1145
-
1146
- <?php foreach ( $options as $styleID => $label ) :
1147
- $selected = $styleID == $standard_style_ID ? ' selected="selected"' : ''; ?>
1148
- <option value="<?php echo (int) $styleID; ?>"<?php echo $selected; ?>><?php echo wp_specialchars( $label ); ?></option>
1149
- <?php endforeach; ?>
1150
-
1151
- </select>
1152
- </p>
1153
- </div>
1154
- <?php if ( $show_custom ){ ?>
1155
- <div id="design_custom">
1156
- <p class="hide-if-no-js">
1157
- You can select from the list of custom styles that you created on PollDaddy.com
1158
- <br />
1159
- <br />
1160
- Select a custom style:
1161
- <select name="styleID_custom">
1162
- <?php $selected = $custom_style_ID == 0 ? ' selected="selected"' : ''; ?>
1163
- <option value="0"<?php echo $selected; ?>></option>
1164
- <?php foreach ( $styles->style as $style ) :
1165
- $selected = $style->_id == $custom_style_ID ? ' selected="selected"' : ''; ?>
1166
- <option value="<?php echo (int) $style->_id; ?>"<?php echo $selected; ?>><?php echo wp_specialchars( $style->title ); ?></option>
1167
- <?php endforeach;?>
1168
-
1169
- </select>
1170
- </p>
1171
- </div>
1172
- <div id="design_options">
1173
- <a href="#" class="polldaddy-show-design-options">Custom Styles</a>
1174
- </div>
1175
- <?php } ?>
1176
  </div>
1177
  </div>
1178
 
5
  Description: Create and manage PollDaddy polls in WordPress
6
  Author: Automattic, Inc.
7
  Author URL: http://automattic.com/
8
+ Version: 1.4
9
  */
10
 
11
  // You can hardcode your PollDaddy PartnerGUID (API Key) here
24
  var $base_url = false;
25
  var $use_ssl = 0;
26
  var $scheme = 'https';
27
+ var $version = '1.4';
28
 
29
  var $polldaddy_clients = array();
30
 
306
 
307
  require_once WP_POLLDADDY__POLLDADDY_CLIENT_PATH;
308
 
309
+ wp_enqueue_script( 'polls-style', "{$this->base_url}poll-style-picker.js", array(), $this->version );
310
  wp_enqueue_script( 'polls', "{$this->base_url}polldaddy.js", array( 'jquery', 'jquery-ui-sortable' ), $this->version );
311
  wp_enqueue_script( 'admin-forms' );
312
  add_thickbox();
525
  return false;
526
 
527
  $poll_data['answers'] = $answers;
528
+
529
+ if ( isset ( $_POST['styleID'] ) ){
530
+ if ( $_POST['styleID'] == 'x' ){
531
+ $this->errors->add( 'UpdatePoll', __( 'Please choose a poll style' ) );
532
+ return false;
533
+ }
534
+ }
535
  $poll_data['styleID'] = (int) $_POST['styleID'];
536
 
537
  $polldaddy->reset();
572
  $poll_data[$key] = stripslashes( $_POST[$key] );
573
 
574
  $poll_data['answers'] = $answers;
575
+ if ( isset ( $_POST['styleID'] ) ){
576
+ if ( $_POST['styleID'] == 'x' ){
577
+ $this->errors->add( 'UpdatePoll', __( 'Please choose a poll style' ) );
578
+ return false;
579
+ }
580
+ }
581
+ $poll_data['styleID'] = $_POST['styleID'];
582
 
583
  $poll = $polldaddy->CreatePoll( $poll_data );
584
  $this->parse_errors( $polldaddy );
1103
  <div id="design" class="postbox">
1104
 
1105
  <?php $style_ID = (int) ( $is_POST ? $_POST['styleID'] : $poll->styleID );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1106
 
1107
  $polldaddy->reset();
1108
  $styles = $polldaddy->GetStyles();
1109
+
1110
  $show_custom = false;
1111
  if( isset( $styles ) && count( $styles ) > 0 ){
1112
  $show_custom = true;
1113
  }
1114
+
1115
  if ( $style_ID > 18 ){
1116
  $standard_style_ID = 0;
1117
  $custom_style_ID = $style_ID;
1123
  ?>
1124
 
1125
  <h3><?php _e( 'Design' ); ?></h3>
1126
+ <input type="hidden" name="styleID" id="styleID" value="<?php echo $style_ID ?>">
1127
  <div class="inside">
1128
+ <div class="design_standard">
1129
+ <table class="pollStyle">
1130
+ <thead>
1131
+ <tr>
1132
+ <th class="cb">
1133
+ <input type="radio" name="styleTypeCB" id="regular" onclick="javascript:pd_build_styles( 0 );"/>
1134
+ </th>
1135
+ <th>
1136
+ <label for="skin" onclick="javascript:pd_build_styles( 0 );">PollDaddy Style</label>
1137
+ </th>
1138
+ <th/>
1139
+ <th class="cb">
1140
+ <?php $disabled = $show_custom == false ? ' disabled="true"' : ''; ?>
1141
+ <input type="radio" name="styleTypeCB" id="custom" onclick="javascript:pd_change_style($('customSelect').value);" <?php echo $disabled; ?>></input>
1142
+ </th>
1143
+ <th>
1144
+ <label onclick="javascript:pd_change_style($('customSelect').value);">Custom Style</label>
1145
+ </th>
1146
+ </tr>
1147
+ </thead>
1148
+ <tr>
1149
+ <td/>
1150
+ <td class="selector">
1151
+ <table class="st_selector">
1152
+ <tr>
1153
+ <td class="dir_left">
1154
+ <a href="javascript:pd_move('prev');" style="width: 1em;display: block;font-size: 4em;text-decoration: none;">&#171;</a>
1155
+ </td>
1156
+ <td class="img"><div class="st_image_loader"><div id="st_image" onmouseover="st_results(this, 'show');" onmouseout="st_results(this, 'hide');"></div></div></td>
1157
+ <td class="dir_right">
1158
+ <a href="javascript:pd_move('next');" style="width: 1em;display: block;font-size: 4em;text-decoration: none;">&#187;</a>
1159
+ </td>
1160
+ </tr>
1161
+ <tr>
1162
+ <td></td>
1163
+ <td class="counter">
1164
+ <div id="st_number"></div>
1165
+ </td>
1166
+ <td></td>
1167
+ </tr>
1168
+ <tr>
1169
+ <td></td>
1170
+ <td class="title">
1171
+ <div id="st_name"></div>
1172
+ </td>
1173
+ <td></td>
1174
+ </tr>
1175
+ <tr>
1176
+ <td></td>
1177
+ <td>
1178
+ <div id="st_sizes"></div>
1179
+ </td>
1180
+ <td></td>
1181
+ </tr>
1182
+ <tr>
1183
+ <td colspan="3">
1184
+ <div id="st_description"></div>
1185
+ </td>
1186
+ </tr>
1187
+ </table>
1188
+ </td>
1189
+ <td width="100"></td>
1190
+ <td/>
1191
+ <td class="customSelect">
1192
+ <table>
1193
+ <tr>
1194
+ <td><?php $hide = $show_custom == true ? ' style="display:block;"' : ' style="display:none;"'; ?>
1195
+ <select id="customSelect" name="customSelect" onclick="pd_change_style(this.value);" <?php echo $hide ?>>
1196
+ <?php $selected = $custom_style_ID == 0 ? ' selected="selected"' : ''; ?>
1197
+ <option value="x"<?php echo $selected; ?>>Please choose a custom style...</option>
1198
+ <?php foreach ( $styles->style as $style ) :
1199
+ $selected = $style->_id == $custom_style_ID ? ' selected="selected"' : ''; ?>
1200
+ <option value="<?php echo (int) $style->_id; ?>"<?php echo $selected; ?>><?php echo wp_specialchars( $style->title ); ?></option>
1201
+ <?php endforeach;?>
1202
+ </select>
1203
+ <div id="styleIDErr" class="formErr" style="display:none;">Please choose a style.</div></td>
1204
+ </tr>
1205
+ <tr>
1206
+ <td><?php $extra = $show_custom == false ? 'You currently have no custom styles created.' : ''; ?>
1207
+ <p><?php echo $extra ?></p>
1208
+ <p>Did you know we have a new editor for building your own custom poll styles? Find out more <a href="http://support.polldaddy.com/custom-poll-styles/" target="_blank">here</a>.</p>
1209
+ </td>
1210
+ </tr>
1211
+ </table>
1212
+ </td>
1213
+ </tr>
1214
+ </table>
1215
+
1216
+ <script language="javascript">
1217
+ current_pos = 0;
1218
+ pd_build_styles( current_pos );
1219
+ <?php if( $style_ID > 0 && $style_ID <= 1000 ){ ?>
1220
+ pd_pick_style( <?php echo $style_ID ?> );
1221
+ <?php }else{ ?>
1222
+ pd_change_style( <?php echo $style_ID ?> );
1223
+ <?php } ?>
1224
+ </script>
1225
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1226
  </div>
1227
  </div>
1228
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: mdawaffe, eoigal
3
  Tags: poll, polls, polldaddy, WordPress.com
4
  Requires at least: 2.6
5
  Tested up to: 2.7.1
6
- Stable tag: 1.3
7
 
8
  Create and manage PollDaddy polls from within WordPress.
9
 
@@ -32,7 +32,9 @@ Yes. You'll be able to edit the polls they create from your blog. (You won't be
32
  Nope. The permissions are the same as for posts. So Editors and Administrators can edit anyone's polls for that blog. Authors can only edit their own.
33
 
34
  == Change Log ==
35
-
 
 
36
  = 1.3 =
37
  * Added Close/Open poll to poll actions
38
  * Added Custom Styles link to Edit poll, under Design. This link will be only present when the user has custom styles created on the PollDaddy.com site.
3
  Tags: poll, polls, polldaddy, WordPress.com
4
  Requires at least: 2.6
5
  Tested up to: 2.7.1
6
+ Stable tag: 1.4
7
 
8
  Create and manage PollDaddy polls from within WordPress.
9
 
32
  Nope. The permissions are the same as for posts. So Editors and Administrators can edit anyone's polls for that blog. Authors can only edit their own.
33
 
34
  == Change Log ==
35
+ = 1.4 =
36
+ * Added new poll styles selector
37
+
38
  = 1.3 =
39
  * Added Close/Open poll to poll actions
40
  * Added Custom Styles link to Edit poll, under Design. This link will be only present when the user has custom styles created on the PollDaddy.com site.