Easy Forms for MailChimp - Version 2.0.0

Version Description

  • Added import function to pull in existing custom fields
  • Added new field handling to work with any list configuration
  • Required fields in MailChimp are now reflected properly in the list view
  • Added ability to choose Divs or Tables
Download this release

Release Info

Developer yikesinc
Plugin Icon 128x128 Easy Forms for MailChimp
Version 2.0.0
Comparing to
See all releases

Code changes from version 1.3.1 to 2.0.0

classes/class.yksemeBase.php CHANGED
@@ -40,6 +40,7 @@ public function activate()
40
  }
41
  public function deactivate()
42
  {
 
43
  }
44
  public function uninstall()
45
  {
@@ -86,8 +87,9 @@ public function createShortcodes()
86
  public function getOptionValue()
87
  {
88
  $defaultVals = array(
89
- 'version' => '',
90
  'api-key' => '',
 
91
  'lists' => array()
92
  );
93
  $ov = get_option(YKSEME_OPTION, $defaultVals);
@@ -109,115 +111,169 @@ private function runUpdateCheck()
109
 
110
  /***** FUNCTIONS
111
  ****************************************************************************************************/
112
- public function getBlankFieldsArray()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
  {
114
  $fields = array();
115
 
116
  // Add Field
 
117
  $addField = array(
118
- 'id' => uniqid(),
119
- 'name' => 'yks-mailchimp-field-email',
120
  'merge' => 'EMAIL',
121
- 'label' => 'Email',
122
  'require' => '1',
123
  'active' => '1',
124
  'locked' => '1',
125
- 'sort' => 0
 
 
 
 
126
  );
127
  $fields[$addField['id']] = $addField;
128
 
129
- // Add Field
130
- $addField = array(
131
- 'id' => uniqid(),
132
- 'name' => 'yks-mailchimp-field-name-first',
133
- 'merge' => 'FNAME',
134
- 'label' => 'First Name',
135
- 'require' => '0',
136
- 'active' => '1',
137
- 'locked' => '0',
138
- 'sort' => 1
139
- );
140
- $fields[$addField['id']] = $addField;
141
 
142
- // Add Field
143
- $addField = array(
144
- 'id' => uniqid(),
145
- 'name' => 'yks-mailchimp-field-name-last',
146
- 'merge' => 'LNAME',
147
- 'label' => 'Last Name',
148
- 'require' => '0',
149
- 'active' => '1',
150
- 'locked' => '0',
151
- 'sort' => 2
152
- );
153
- $fields[$addField['id']] = $addField;
154
 
155
- // Add Field
156
- $addField = array(
157
- 'id' => uniqid(),
158
- 'name' => 'yks-mailchimp-field-address',
159
- 'merge' => 'ADDR1',
160
- 'label' => 'Address',
161
- 'require' => '0',
162
- 'active' => '0',
163
- 'locked' => '0',
164
- 'sort' => 3
165
- );
166
- $fields[$addField['id']] = $addField;
167
-
168
- // Add Field
169
- $addField = array(
170
- 'id' => uniqid(),
171
- 'name' => 'yks-mailchimp-field-apt-suite',
172
- 'merge' => false,
173
- 'label' => 'Apt/Suite',
174
- 'require' => '0',
175
- 'active' => '0',
176
- 'locked' => '0',
177
- 'sort' => 4
178
- );
179
- $fields[$addField['id']] = $addField;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
180
 
181
- // Add Field
182
- $addField = array(
183
- 'id' => uniqid(),
184
- 'name' => 'yks-mailchimp-field-city',
185
- 'merge' => false,
186
- 'label' => 'City',
187
- 'require' => '0',
188
- 'active' => '0',
189
- 'locked' => '0',
190
- 'sort' => 5
191
- );
192
- $fields[$addField['id']] = $addField;
193
-
194
- // Add Field
195
- $addField = array(
196
- 'id' => uniqid(),
197
- 'name' => 'yks-mailchimp-field-state',
198
- 'label' => 'State',
199
- 'merge' => false,
200
- 'require' => '0',
201
- 'active' => '0',
202
- 'locked' => '0',
203
- 'sort' => 6
204
- );
205
- $fields[$addField['id']] = $addField;
206
-
207
- // Add Field
208
- $addField = array(
209
- 'id' => uniqid(),
210
- 'name' => 'yks-mailchimp-field-zip',
211
- 'merge' => false,
212
- 'label' => 'Zip/Postal Code',
213
- 'require' => '0',
214
- 'active' => '0',
215
- 'locked' => '0',
216
- 'sort' => 7
217
- );
218
- $fields[$addField['id']] = $addField;
219
 
220
- return $fields;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
221
  }
222
 
223
 
@@ -226,6 +282,17 @@ public function getBlankFieldsArray()
226
 
227
  /***** CONFIGURATION
228
  ****************************************************************************************************/
 
 
 
 
 
 
 
 
 
 
 
229
  public function updateApiKey($k)
230
  {
231
  $this->optionVal['api-key'] = $k;
@@ -243,19 +310,25 @@ public function updateVersion($k)
243
 
244
  /***** LIST ACTIONS
245
  ****************************************************************************************************/
246
- public function addList()
247
- {
248
- $list = array(
249
- 'id' => uniqid(),
250
- 'list-id' => '',
251
- 'fields' => $this->getBlankFieldsArray()
252
- );
253
- $this->optionVal['lists'][$list['id']] = $list;
254
- if(update_option(YKSEME_OPTION, $this->optionVal))
255
  {
256
- return $this->generateListContainers(array($list));
 
 
 
 
 
 
 
 
 
257
  }
258
- else return false;
259
  }
260
  public function sortList($p)
261
  {
@@ -295,18 +368,13 @@ public function updateList($p)
295
  parse_str($p['form_data'], $fd);
296
  if(!empty($fd['yks-mailchimp-unique-id']))
297
  {
298
- $this->optionVal['lists'][$fd['yks-mailchimp-unique-id']]['list-id'] = $fd['yks-mailchimp-list-id'];
299
  foreach($this->optionVal['lists'][$fd['yks-mailchimp-unique-id']]['fields'] as $k => $v)
300
  {
301
  // Only proceed if the field is not locked
302
- if($v['locked'] == 0)
303
  {
304
  // Make sure this field was included in the update
305
  $this->optionVal['lists'][$fd['yks-mailchimp-unique-id']]['fields'][$k]['active'] = (isset($fd[$v['name']]) ? '1' : '0');
306
- if($v['merge'] !== false)
307
- {
308
- $this->optionVal['lists'][$fd['yks-mailchimp-unique-id']]['fields'][$k]['merge'] = $fd[$v['name'].'-merge'];
309
- }
310
  }
311
  }
312
  return update_option(YKSEME_OPTION, $this->optionVal);
@@ -322,7 +390,31 @@ public function deleteList($i=false)
322
  unset($this->optionVal['lists'][$i]);
323
  return update_option(YKSEME_OPTION, $this->optionVal);
324
  }
325
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
326
 
327
 
328
 
@@ -333,7 +425,7 @@ public function deleteList($i=false)
333
  public function addStyles()
334
  {
335
  // Register Styles
336
- wp_register_style('ykseme-css-base', YKSEME_URL.'css/style.ykseme.css', array(), '1.0.0', 'all');
337
  // Enqueue Styles
338
  wp_enqueue_style('thickbox');
339
  wp_enqueue_style('ykseme-css-base');
@@ -342,9 +434,11 @@ public function addStyles()
342
  public function addStyles_frontend()
343
  {
344
  // Register Styles
345
- wp_register_style('ykseme-css-base', YKSEME_URL.'css/style.ykseme.css', array(), '1.0.0', 'all');
 
346
  // Enqueue Styles
347
  wp_enqueue_style('ykseme-css-base');
 
348
  }
349
 
350
  public function addScripts()
@@ -355,7 +449,7 @@ public function addScripts()
355
  wp_enqueue_script('thickbox');
356
  wp_enqueue_script('jquery-ui-sortable');
357
  wp_enqueue_script('jquery-ui-tabs');
358
- wp_enqueue_script('ykseme-base', YKSEME_URL.'js/script.ykseme.js', array('jquery'));
359
  }
360
 
361
  public function addScripts_frontend()
@@ -363,6 +457,7 @@ public function addScripts_frontend()
363
  wp_enqueue_script('jquery');
364
  // Everything else
365
  wp_enqueue_script('jquery-ui-core');
 
366
  }
367
 
368
 
@@ -414,6 +509,7 @@ public function addAdministrationMenu()
414
  add_menu_page('Mailchimp Form', 'Mailchimp Form', 'manage_options', 'yks-mailchimp-form', array(&$this, 'generatePageOptions'), YKSEME_URL.'images/ykseme_16px.png', 400);
415
  // Sub Items
416
  add_submenu_page('yks-mailchimp-form', 'Manage Lists', 'Manage Lists', 'manage_options', 'yks-mailchimp-form-lists', array(&$this, 'generatePageLists'));
 
417
  }
418
 
419
 
@@ -430,6 +526,10 @@ public function generatePageLists()
430
  {
431
  require_once YKSEME_PATH.'pages/lists.php';
432
  }
 
 
 
 
433
 
434
 
435
 
@@ -444,49 +544,51 @@ public function addUserToMailchimp($p)
444
  parse_str($p['form_data'], $fd);
445
  if(!empty($fd['yks-mailchimp-list-id']))
446
  {
447
- $lid = $fd['yks-mailchimp-list-id'];
448
- $api = new MCAPI($this->optionVal['api-key']);
449
- $mv = array();
 
450
 
451
- // First name
452
- if(isset($fd['yks-mailchimp-field-name-first']))
453
- {
454
- $mv[$this->getFieldMergeVar('yks-mailchimp-field-name-first', $lid)] = $fd['yks-mailchimp-field-name-first'];
455
- }
456
-
457
- // Last name
458
- if(isset($fd['yks-mailchimp-field-name-last']))
459
- {
460
- $mv[$this->getFieldMergeVar('yks-mailchimp-field-name-last', $lid)] = $fd['yks-mailchimp-field-name-last'];
461
- }
462
 
463
- // Address
464
- if(isset($fd['yks-mailchimp-field-address'])
465
- || isset($fd['yks-mailchimp-field-apt-suite'])
466
- || isset($fd['yks-mailchimp-field-city'])
467
- || isset($fd['yks-mailchimp-field-state'])
468
- || isset($fd['yks-mailchimp-field-zip']))
469
- {
470
- $mv[$this->getFieldMergeVar('yks-mailchimp-field-address', $lid)] = array(
471
- 'addr1'=> $fd['yks-mailchimp-field-address'].(!empty($fd['yks-mailchimp-field-apt-suite']) ? ' '.$fd['yks-mailchimp-field-apt-suite'] : ''),
472
- 'city' => $fd['yks-mailchimp-field-city'],
473
- 'state' => $fd['yks-mailchimp-field-state'],
474
- 'zip' => $fd['yks-mailchimp-field-zip']
 
 
 
 
 
 
 
 
 
475
  );
476
- }
477
-
478
- // Phone
479
- if(isset($fd['yks-mailchimp-field-phone']))
480
- {
481
- $mv[$this->getFieldMergeVar('yks-mailchimp-field-phone', $lid)] = $fd['yks-mailchimp-field-phone'];
482
- }
 
483
 
484
  // By default this sends a confirmation email - you will not see new members
485
  // until the link contained in it is clicked!
486
- $retval = $api->listSubscribe($lid, $fd['yks-mailchimp-field-email'], $mv);
487
 
488
  if($api->errorCode)
489
  {
 
490
  return false;
491
  }
492
  else return true;
@@ -545,7 +647,7 @@ public function generateListContainers($listArr=false)
545
  </tr>
546
  <tr valign="top">
547
  <th scope="row"><label for="yks-mailchimp-api-key">Mailchimp List Id</label></th>
548
- <td><input name="yks-mailchimp-list-id" type="text" id="yks-mailchimp-list-id" value="<?php echo $list['list-id']; ?>" class="regular-text" /></td>
549
  </tr>
550
  <tr valign="top">
551
  <th scope="row"><label for="api-key">Active Fields</label></th>
@@ -557,7 +659,7 @@ public function generateListContainers($listArr=false)
557
  <div class="yks-mailchimp-fields-list-row">
558
  <label title="<?php echo $field['name']; ?>" rel="<?php echo $field['id']; ?>">
559
  <span class="yks-mailchimp-sorthandle">Drag &amp; drop</span>
560
- <input type="checkbox" name="<?php echo $field['name']; ?>" id="<?php echo $field['id']; ?>" value="1" <?php echo ($field['active'] == 1 ? 'checked="checked"' : ''); ?><?php echo ($field['locked'] == 1 ? 'disabled="disabled"' : ''); ?> />
561
  &nbsp;
562
  <span class="yks-mailchimp-field-name"><?php echo $field['label']; ?></span>
563
  </label>
@@ -574,6 +676,7 @@ public function generateListContainers($listArr=false)
574
  <p class="submit">
575
  <input type="submit" name="submit" class="yks-mailchimp-list-update button-primary" value="Update List Options" rel="<?php echo $list['id']; ?>" />
576
  <input type="button" name="delete" class="yks-mailchimp-delete button-primary" value="Delete List" rel="<?php echo $list['id']; ?>" />
 
577
  </p>
578
  </form>
579
  </div>
@@ -584,6 +687,167 @@ public function generateListContainers($listArr=false)
584
  ob_end_clean();
585
  return $output;
586
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
587
 
588
 
589
 
@@ -658,6 +922,8 @@ public function runUpdateTasks()
658
  * This update makes the first name and last name optional
659
  * To do this we need to loop through the existing fields and
660
  * change the 'require' key to 0
 
 
661
  */
662
  private function runUpdateTasks_1_1_0()
663
  {
@@ -685,6 +951,8 @@ private function runUpdateTasks_1_1_0()
685
  * This update adds a merge_vars key to each
686
  * field array so that users can specify their
687
  * own merge_var names
 
 
688
  */
689
  private function runUpdateTasks_1_2_0()
690
  {
@@ -720,6 +988,29 @@ private function runUpdateTasks_1_2_0()
720
  $this->optionVal['version'] = '1.3.0';
721
  return true;
722
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
723
 
724
 
725
 
40
  }
41
  public function deactivate()
42
  {
43
+ delete_option(YKSEME_OPTION);
44
  }
45
  public function uninstall()
46
  {
87
  public function getOptionValue()
88
  {
89
  $defaultVals = array(
90
+ 'version' => YKSEME_VERSION_CURRENT,
91
  'api-key' => '',
92
+ 'flavor' => '0',
93
  'lists' => array()
94
  );
95
  $ov = get_option(YKSEME_OPTION, $defaultVals);
111
 
112
  /***** FUNCTIONS
113
  ****************************************************************************************************/
114
+ public function slugify($text)
115
+ {
116
+ // replace non letter or digits by -
117
+ $text = preg_replace('~[^\\pL\d]+~u', '-', $text);
118
+ // trim
119
+ $text = trim($text, '-');
120
+ // transliterate
121
+ $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);
122
+ // lowercase
123
+ $text = strtolower($text);
124
+ // remove unwanted characters
125
+ $text = preg_replace('~[^-\w]+~', '', $text);
126
+ if(empty($text))
127
+ {
128
+ return 'n-a';
129
+ }
130
+ return $text;
131
+ }
132
+
133
+ public function getBlankFieldsArray($lid='')
134
  {
135
  $fields = array();
136
 
137
  // Add Field
138
+ $name = $this->slugify('Email Address'.'-'.'EMAIL');
139
  $addField = array(
140
+ 'id' => $lid.'-'.$name,
141
+ 'name' => $lid.'-'.$name,
142
  'merge' => 'EMAIL',
143
+ 'label' => 'Email Address',
144
  'require' => '1',
145
  'active' => '1',
146
  'locked' => '1',
147
+ 'sort' => '1',
148
+ 'type' => 'email',
149
+ 'help' => '',
150
+ 'defalt' => '',
151
+ 'choices' => ''
152
  );
153
  $fields[$addField['id']] = $addField;
154
 
155
+ return $fields;
156
+ }
 
 
 
 
 
 
 
 
 
 
157
 
158
+ public function getImportedFieldsArray($lid, $mv)
159
+ {
160
+ if(empty($mv)) return false;
161
+ $fields = array();
 
 
 
 
 
 
 
 
162
 
163
+ foreach($mv as $field)
164
+ {
165
+ // Add Field
166
+ $name = $this->slugify($field['label'].'-'.$field['tag']);
167
+ $addField = array(
168
+ 'id' => $lid.'-'.$name,
169
+ 'name' => $lid.'-'.$field['tag'],
170
+ 'merge' => $field['tag'],
171
+ 'label' => $field['name'],
172
+ 'require' => $field['req'],
173
+ 'active' => '1',
174
+ 'locked' => '1',
175
+ 'sort' => $field['order'],
176
+ 'type' => $field['field_type'],
177
+ 'help' => $field['helptext'],
178
+ 'defalt' => $field['default'],
179
+ 'choices' => (isset($field['choices']) ? $field['choices'] : '')
180
+ );
181
+ $fields[$addField['id']] = $addField;
182
+ }
183
+
184
+ return $fields;
185
+ }
186
+ public function getBrowser()
187
+ {
188
+ $u_agent = $_SERVER['HTTP_USER_AGENT'];
189
+ $bname = 'Unknown';
190
+ $platform = 'Unknown';
191
+ $version = "";
192
+ //First get the platform?
193
+ if(preg_match('/linux/i', $u_agent))
194
+ {
195
+ $platform = 'Linux';
196
+ }
197
+ elseif(preg_match('/macintosh|mac os x/i', $u_agent))
198
+ {
199
+ $platform = 'Mac';
200
+ }
201
+ elseif(preg_match('/windows|win32/i', $u_agent))
202
+ {
203
+ $platform = 'Windows';
204
+ }
205
 
206
+ // Next get the name of the useragent yes seperately and for good reason
207
+ if(preg_match('/MSIE/i',$u_agent) && !preg_match('/Opera/i',$u_agent))
208
+ {
209
+ $bname = 'Internet Explorer';
210
+ $ub = "MSIE";
211
+ }
212
+ elseif(preg_match('/Firefox/i',$u_agent))
213
+ {
214
+ $bname = 'Mozilla Firefox';
215
+ $ub = "Firefox";
216
+ }
217
+ elseif(preg_match('/Chrome/i',$u_agent))
218
+ {
219
+ $bname = 'Google Chrome';
220
+ $ub = "Chrome";
221
+ }
222
+ elseif(preg_match('/Safari/i',$u_agent))
223
+ {
224
+ $bname = 'Apple Safari';
225
+ $ub = "Safari";
226
+ }
227
+ elseif(preg_match('/Opera/i',$u_agent))
228
+ {
229
+ $bname = 'Opera';
230
+ $ub = "Opera";
231
+ }
232
+ elseif(preg_match('/Netscape/i',$u_agent))
233
+ {
234
+ $bname = 'Netscape';
235
+ $ub = "Netscape";
236
+ }
 
 
 
 
 
 
 
237
 
238
+ // finally get the correct version number
239
+ $known = array('Version', $ub, 'other');
240
+ $pattern = '#(?<browser>' . join('|', $known) .
241
+ ')[/ ]+(?<version>[0-9.|a-zA-Z.]*)#';
242
+ if(!preg_match_all($pattern, $u_agent, $matches))
243
+ {
244
+ // we have no matching number just continue
245
+ }
246
+
247
+ // see how many we have
248
+ $i = count($matches['browser']);
249
+ if($i != 1)
250
+ {
251
+ //we will have two since we are not using 'other' argument yet
252
+ //see if version is before or after the name
253
+ if(strripos($u_agent,"Version") < strripos($u_agent,$ub))
254
+ {
255
+ $version= $matches['version'][0];
256
+ }
257
+ else
258
+ {
259
+ $version= $matches['version'][1];
260
+ }
261
+ }
262
+ else
263
+ {
264
+ $version= $matches['version'][0];
265
+ }
266
+
267
+ // check if we have a number
268
+ if($version==null || $version=="") {$version="?";}
269
+
270
+ return array(
271
+ 'userAgent' => $u_agent,
272
+ 'name' => $bname,
273
+ 'version' => $version,
274
+ 'platform' => $platform,
275
+ 'pattern' => $pattern
276
+ );
277
  }
278
 
279
 
282
 
283
  /***** CONFIGURATION
284
  ****************************************************************************************************/
285
+ public function updateOptions($p)
286
+ {
287
+ if(!empty($p['form_data']))
288
+ {
289
+ parse_str($p['form_data'], $fd);
290
+ $this->optionVal['api-key'] = $fd['yks-mailchimp-api-key'];
291
+ $this->optionVal['flavor'] = $fd['yks-mailchimp-flavor'];
292
+ return update_option(YKSEME_OPTION, $this->optionVal);
293
+ }
294
+ return false;
295
+ }
296
  public function updateApiKey($k)
297
  {
298
  $this->optionVal['api-key'] = $k;
310
 
311
  /***** LIST ACTIONS
312
  ****************************************************************************************************/
313
+ public function addList($lid='')
314
+ {
315
+ if($lid == '') return false;
316
+ $api = new MCAPI($this->optionVal['api-key']);
317
+ $mv = $api->listMergeVars($lid);
318
+ if($mv)
 
 
 
319
  {
320
+ $list = array(
321
+ 'id' => $lid,
322
+ 'list-id' => $lid,
323
+ 'fields' => $this->getImportedFieldsArray($lid, $mv)
324
+ );
325
+ $this->optionVal['lists'][$list['id']] = $list;
326
+ if(update_option(YKSEME_OPTION, $this->optionVal))
327
+ {
328
+ return $this->generateListContainers(array($list));
329
+ }
330
  }
331
+ return false;
332
  }
333
  public function sortList($p)
334
  {
368
  parse_str($p['form_data'], $fd);
369
  if(!empty($fd['yks-mailchimp-unique-id']))
370
  {
 
371
  foreach($this->optionVal['lists'][$fd['yks-mailchimp-unique-id']]['fields'] as $k => $v)
372
  {
373
  // Only proceed if the field is not locked
374
+ if($v['require'] == 0)
375
  {
376
  // Make sure this field was included in the update
377
  $this->optionVal['lists'][$fd['yks-mailchimp-unique-id']]['fields'][$k]['active'] = (isset($fd[$v['name']]) ? '1' : '0');
 
 
 
 
378
  }
379
  }
380
  return update_option(YKSEME_OPTION, $this->optionVal);
390
  unset($this->optionVal['lists'][$i]);
391
  return update_option(YKSEME_OPTION, $this->optionVal);
392
  }
393
+ }
394
+ public function importList($i=false)
395
+ {
396
+ if($i == false) return false;
397
+ else
398
+ {
399
+ $lid = $this->optionVal['lists'][$i]['list-id'];
400
+ $api = new MCAPI($this->optionVal['api-key']);
401
+ $mv = $api->listMergeVars($lid);
402
+ if($mv)
403
+ {
404
+ $mv = $this->getImportedFieldsArray($lid, $mv);
405
+ if($mv)
406
+ {
407
+ // Save the new list
408
+ $this->optionVal['lists'][$i]['fields'] = $mv;
409
+ if(update_option(YKSEME_OPTION, $this->optionVal))
410
+ {
411
+ return $this->generateListContainers(array($this->optionVal['lists'][$i]));
412
+ }
413
+ }
414
+ }
415
+ }
416
+ return false;
417
+ }
418
 
419
 
420
 
425
  public function addStyles()
426
  {
427
  // Register Styles
428
+ wp_register_style('ykseme-css-base', YKSEME_URL.'css/style.ykseme.css', array(), '1.0.0', 'all');
429
  // Enqueue Styles
430
  wp_enqueue_style('thickbox');
431
  wp_enqueue_style('ykseme-css-base');
434
  public function addStyles_frontend()
435
  {
436
  // Register Styles
437
+ wp_register_style('ykseme-css-base', YKSEME_URL.'css/style.ykseme.css', array(), '1.0.0', 'all');
438
+ wp_register_style('ykseme-css-smoothness', YKSEME_URL.'css/jquery-ui-1.8.16.smoothness.css', array(), '1.0.0', 'all');
439
  // Enqueue Styles
440
  wp_enqueue_style('ykseme-css-base');
441
+ wp_enqueue_style('ykseme-css-smoothness');
442
  }
443
 
444
  public function addScripts()
449
  wp_enqueue_script('thickbox');
450
  wp_enqueue_script('jquery-ui-sortable');
451
  wp_enqueue_script('jquery-ui-tabs');
452
+ wp_enqueue_script('ykseme-base', YKSEME_URL.'js/script.ykseme.js', array('jquery'));
453
  }
454
 
455
  public function addScripts_frontend()
457
  wp_enqueue_script('jquery');
458
  // Everything else
459
  wp_enqueue_script('jquery-ui-core');
460
+ wp_enqueue_script('jquery-ui-datepicker', YKSEME_URL.'js/jquery-ui-1.8.16.datepicker.min.js', array('jquery'), '1.8.16');
461
  }
462
 
463
 
509
  add_menu_page('Mailchimp Form', 'Mailchimp Form', 'manage_options', 'yks-mailchimp-form', array(&$this, 'generatePageOptions'), YKSEME_URL.'images/ykseme_16px.png', 400);
510
  // Sub Items
511
  add_submenu_page('yks-mailchimp-form', 'Manage Lists', 'Manage Lists', 'manage_options', 'yks-mailchimp-form-lists', array(&$this, 'generatePageLists'));
512
+ add_submenu_page('yks-mailchimp-form', 'About YIKES, Inc.', 'About YIKES, Inc.', 'manage_options', 'yks-mailchimp-about-yikes', array(&$this, 'generatePageAboutYikes'));
513
  }
514
 
515
 
526
  {
527
  require_once YKSEME_PATH.'pages/lists.php';
528
  }
529
+ public function generatePageAboutYikes()
530
+ {
531
+ require_once YKSEME_PATH.'pages/about.php';
532
+ }
533
 
534
 
535
 
544
  parse_str($p['form_data'], $fd);
545
  if(!empty($fd['yks-mailchimp-list-id']))
546
  {
547
+ $email = false;
548
+ $lid = $fd['yks-mailchimp-list-id'];
549
+ $api = new MCAPI($this->optionVal['api-key']);
550
+ $mv = array();
551
 
552
+ foreach($this->optionVal['lists'][$lid]['fields'] as $field) : if($field['active'] == '1') :
 
 
 
 
 
 
 
 
 
 
553
 
554
+ // Check to see if the field is in the post
555
+ if(isset($fd[$field['name']])) :
556
+
557
+ // Grab the primary email
558
+ if(strtolower($field['merge']) == 'email')
559
+ $email = $fd[$field['name']];
560
+
561
+ // It exists, set the merge var that we send to mailchimp
562
+ switch($field['type'])
563
+ {
564
+ default:
565
+ $mv[$field['merge']] = $fd[$field['name']];
566
+ break;
567
+ case 'address':
568
+ $mv[$field['merge']] = array(
569
+ 'addr1' => $fd[$field['name']],
570
+ 'addr2' => $fd[$field['name'].'-add2'],
571
+ 'city' => $fd[$field['name'].'-city'],
572
+ 'state' => $fd[$field['name'].'-state'],
573
+ 'zip' => $fd[$field['name'].'-zip'],
574
+ 'country' => 'US'
575
  );
576
+ break;
577
+ }
578
+
579
+ endif;
580
+ endif; endforeach;
581
+
582
+ // If no email, fail
583
+ if($email === false) return false;
584
 
585
  // By default this sends a confirmation email - you will not see new members
586
  // until the link contained in it is clicked!
587
+ $retval = $api->listSubscribe($lid, $email, $mv);
588
 
589
  if($api->errorCode)
590
  {
591
+ echo $api->errorCode;
592
  return false;
593
  }
594
  else return true;
647
  </tr>
648
  <tr valign="top">
649
  <th scope="row"><label for="yks-mailchimp-api-key">Mailchimp List Id</label></th>
650
+ <td><strong><?php echo $list['list-id']; ?></strong></td>
651
  </tr>
652
  <tr valign="top">
653
  <th scope="row"><label for="api-key">Active Fields</label></th>
659
  <div class="yks-mailchimp-fields-list-row">
660
  <label title="<?php echo $field['name']; ?>" rel="<?php echo $field['id']; ?>">
661
  <span class="yks-mailchimp-sorthandle">Drag &amp; drop</span>
662
+ <input type="checkbox" name="<?php echo $field['name']; ?>" id="<?php echo $field['id']; ?>" value="1" <?php echo ($field['active'] == 1 ? 'checked="checked"' : ''); ?><?php echo ($field['require'] == 1 ? 'disabled="disabled"' : ''); ?> />
663
  &nbsp;
664
  <span class="yks-mailchimp-field-name"><?php echo $field['label']; ?></span>
665
  </label>
676
  <p class="submit">
677
  <input type="submit" name="submit" class="yks-mailchimp-list-update button-primary" value="Update List Options" rel="<?php echo $list['id']; ?>" />
678
  <input type="button" name="delete" class="yks-mailchimp-delete button-primary" value="Delete List" rel="<?php echo $list['id']; ?>" />
679
+ <input type="button" name="import" class="yks-mailchimp-import button-primary" value="Import List Data" rel="<?php echo $list['id']; ?>" />
680
  </p>
681
  </form>
682
  </div>
687
  ob_end_clean();
688
  return $output;
689
  }
690
+
691
+ public function getFrontendFormJavascript($list='')
692
+ {
693
+ if($list === '') return false;
694
+ $js = false;
695
+ foreach($list['fields'] as $field) : if($field['active'] == 1) :
696
+ // Setup javascript
697
+ if($field['require'] == '1') :
698
+
699
+ $js .= "\n";
700
+ switch($field['type'])
701
+ {
702
+ default:
703
+ $js .= <<<JSC
704
+ if($('#{$field[id]}').val() == '')
705
+ {
706
+ msg += '* {$field[label]}'+"\\n";
707
+ err++;
708
+ }
709
+ JSC;
710
+ break;
711
+ case 'address':
712
+ $js .= <<<JSC
713
+ if($('#{$field[id]}').val() == '')
714
+ {
715
+ msg += '* {$field[label]}: Street Address'+"\\n";
716
+ err++;
717
+ }
718
+ if($('#{$field[id]}-city').val() == '')
719
+ {
720
+ msg += '* {$field[label]}: City'+"\\n";
721
+ err++;
722
+ }
723
+ if($('#{$field[id]}-state').val() == '')
724
+ {
725
+ msg += '* {$field[label]}: State'+"\\n";
726
+ err++;
727
+ }
728
+ if($('#{$field[id]}-zip').val() == '')
729
+ {
730
+ msg += '* {$field[label]}: Zip Code'+"\\n";
731
+ err++;
732
+ }
733
+ JSC;
734
+ break;
735
+ case 'radio':
736
+ $js .= <<<JSC
737
+ if($('.{$field[name]}:checked').length <= 0)
738
+ {
739
+ msg += '* {$field[label]}'+"\\n";
740
+ err++;
741
+ }
742
+ JSC;
743
+ break;
744
+ }
745
+ $js .= "\n";
746
+ endif;
747
+ endif; endforeach;
748
+ return $js;
749
+ }
750
+
751
+ public function getFrontendFormDisplay($list='')
752
+ {
753
+ if($list === '') return false;
754
+ ob_start();
755
+ switch($this->optionVal['flavor'])
756
+ {
757
+ default:
758
+ case '0':
759
+ ?>
760
+ <table class="yks-mailchimpFormTable">
761
+ <tbody>
762
+ <?php foreach($list['fields'] as $field) : if($field['active'] == 1) : ?>
763
+ <tr class="yks-mailchimpFormTableRow">
764
+ <td class="prompt yks-mailchimpFormTableRowLabel"><?php echo $field['label']; ?></td>
765
+ <td class="prompt yks-mailchimpFormTableRowField">
766
+ <?php echo $this->getFrontendFormDisplay_field($field); ?>
767
+ </td>
768
+ </tr>
769
+ <?php endif; endforeach; ?>
770
+ <tr>
771
+ <td colspan="2" class="yks-mailchimpFormTableSubmit">
772
+ <p><input type="submit" class="ykfmc-submit" id="ykfmc-submit_<?php echo $list['id']; ?>" value="Submit" /></p>
773
+ </td>
774
+ </tr>
775
+ </tbody>
776
+ </table>
777
+ <?php
778
+ break;
779
+
780
+ case '1':
781
+ ?>
782
+ <div class="yks-mailchimpFormDiv">
783
+ <?php foreach($list['fields'] as $field) : if($field['active'] == 1) : ?>
784
+ <div class="yks-mailchimpFormDivRow">
785
+ <label class="prompt yks-mailchimpFormDivRowLabel" for="<?php echo $field['name']; ?>"><?php echo $field['label']; ?></label>
786
+ <div class="prompt yks-mailchimpFormDivRowField">
787
+ <?php echo $this->getFrontendFormDisplay_field($field); ?>
788
+ </div>
789
+ </div>
790
+ <?php endif; endforeach; ?>
791
+ <div class="yks-mailchimpFormDivRow">
792
+ <div class="yks-mailchimpFormDivSubmit">
793
+ <p><input type="submit" class="ykfmc-submit" id="ykfmc-submit_<?php echo $list['id']; ?>" value="Submit" /></p>
794
+ </div>
795
+ </div>
796
+ </div>
797
+ <?php
798
+ break;
799
+ }
800
+ $output = ob_get_contents();
801
+ ob_end_clean();
802
+ return $output;
803
+ }
804
+
805
+ private function getFrontendFormDisplay_field($field=false)
806
+ {
807
+ if($field === false) return false;
808
+ $o = '';
809
+ switch($field['type'])
810
+ {
811
+ default:
812
+ case 'email':
813
+ case 'text':
814
+ case 'number':
815
+ case 'zipcode':
816
+ case 'phone':
817
+ case 'website':
818
+ case 'imageurl':
819
+ $o .= '<input type="text" name="'.$field['name'].'" class="'.$field['name'].($field['require'] == 1 ? ' yks-require' : '').'" id="'.$field['id'].'" value="" />';
820
+ break;
821
+ case 'dropdown':
822
+ $o .= '<select name="'.$field['name'].'" class="'.$field['name'].($field['require'] == 1 ? ' yks-require' : '').'" id="'.$field['id'].'">';
823
+ if(count($field['choices']) > 0) : foreach($field['choices'] as $ok => $ov) :
824
+ $o .= '<option value="'.htmlentities($ov, ENT_QUOTES).'">'.$ov.'</option>';
825
+ endforeach; endif;
826
+ $o .= '</select>';
827
+ break;
828
+ case 'address':
829
+
830
+ $o .= '<input type="text" name="'.$field['name'].'" class="'.$field['name'].($field['require'] == 1 ? ' yks-require' : '').'" id="'.$field['id'].'" value="" /><span class="yks-mailchimp-form-tooltip">Street Address</span><br />';
831
+ $o .= '<input type="text" name="'.$field['name'].'-add2" class="'.$field['name'].'-add2'.($field['require'] == 1 ? ' yks-require' : '').'" id="'.$field['id'].'-add2" value="" /><span class="yks-mailchimp-form-tooltip">Apt/Suite</span><br />';
832
+ $o .= '<input type="text" name="'.$field['name'].'-city" class="'.$field['name'].'-city'.($field['require'] == 1 ? ' yks-require' : '').'" id="'.$field['id'].'-city" value="" /><span class="yks-mailchimp-form-tooltip">City</span><br />';
833
+ $o .= '<input type="text" name="'.$field['name'].'-state" class="'.$field['name'].'-state'.($field['require'] == 1 ? ' yks-require' : '').'" id="'.$field['id'].'-state" value="" /><span class="yks-mailchimp-form-tooltip">State</span><br />';
834
+ $o .= '<input type="text" name="'.$field['name'].'-zip" class="'.$field['name'].'-zip'.($field['require'] == 1 ? ' yks-require' : '').'" id="'.$field['id'].'-zip" value="" /><span class="yks-mailchimp-form-tooltip">Zip</span>';
835
+ break;
836
+ case 'radio':
837
+ if(count($field['choices']) > 0) : $ct=0; foreach($field['choices'] as $ok => $ov) :
838
+ $ct++;
839
+ $o .= '<input type="radio" name="'.$field['name'].'" class="'.$field['name'].($field['require'] == 1 ? ' yks-require' : '').'" id="'.$field['id'].'-'.$ok.'" value="'.htmlentities($ov, ENT_QUOTES).'" />'.$ov;
840
+ if($ct < count($field['choices']))
841
+ $o .= '<br />';
842
+ endforeach; endif;
843
+ break;
844
+ case 'date':
845
+ case 'birthday':
846
+ $o .= '<input type="text" name="'.$field['name'].'" class="'.$field['name'].' yks-field-type-date'.($field['require'] == 1 ? ' yks-require' : '').'" id="'.$field['id'].'" value="" />';
847
+ break;
848
+ }
849
+ return $o;
850
+ }
851
 
852
 
853
 
922
  * This update makes the first name and last name optional
923
  * To do this we need to loop through the existing fields and
924
  * change the 'require' key to 0
925
+ *
926
+ * 1.1.0 => 1.2.0
927
  */
928
  private function runUpdateTasks_1_1_0()
929
  {
951
  * This update adds a merge_vars key to each
952
  * field array so that users can specify their
953
  * own merge_var names
954
+ *
955
+ * 1.2.0 => 1.3.0
956
  */
957
  private function runUpdateTasks_1_2_0()
958
  {
988
  $this->optionVal['version'] = '1.3.0';
989
  return true;
990
  }
991
+
992
+ /**
993
+ * This update needs to pull in all of the custom form
994
+ * data for each of the lists, unfortunately it has to replace
995
+ * just about all of the data with the new schema. We also
996
+ * add in the flavor key (for table/div usage)
997
+ *
998
+ * 1.3.0 => 2.0.0
999
+ */
1000
+ private function runUpdateTasks_1_3_0()
1001
+ {
1002
+ $this->optionVal['flavor'] = '0';
1003
+ if($this->optionVal['lists'])
1004
+ {
1005
+ foreach($this->optionVal['lists'] as $uid => $list)
1006
+ {
1007
+ unset($this->optionVal['lists'][$uid]);
1008
+ $this->addList($list['list-id']);
1009
+ }
1010
+ }
1011
+ $this->optionVal['version'] = '2.0.0';
1012
+ return true;
1013
+ }
1014
 
1015
 
1016
 
css/jquery-ui-1.8.16.smoothness.css ADDED
@@ -0,0 +1,358 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery UI CSS Framework 1.8.16
3
+ *
4
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
+ * Dual licensed under the MIT or GPL Version 2 licenses.
6
+ * http://jquery.org/license
7
+ *
8
+ * http://docs.jquery.com/UI/Theming/API
9
+ */
10
+
11
+ /* Layout helpers
12
+ ----------------------------------*/
13
+ .ui-helper-hidden { display: none; }
14
+ .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
15
+ .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
16
+ .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
17
+ .ui-helper-clearfix { display: inline-block; }
18
+ /* required comment for clearfix to work in Opera \*/
19
+ * html .ui-helper-clearfix { height:1%; }
20
+ .ui-helper-clearfix { display:block; }
21
+ /* end clearfix */
22
+ .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
23
+
24
+
25
+ /* Interaction Cues
26
+ ----------------------------------*/
27
+ .ui-state-disabled { cursor: default !important; }
28
+
29
+
30
+ /* Icons
31
+ ----------------------------------*/
32
+
33
+ /* states and images */
34
+ .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
35
+
36
+
37
+ /* Misc visuals
38
+ ----------------------------------*/
39
+
40
+ /* Overlays */
41
+ .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
42
+
43
+
44
+ /*
45
+ * jQuery UI CSS Framework 1.8.16
46
+ *
47
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
48
+ * Dual licensed under the MIT or GPL Version 2 licenses.
49
+ * http://jquery.org/license
50
+ *
51
+ * http://docs.jquery.com/UI/Theming/API
52
+ *
53
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
54
+ */
55
+
56
+
57
+ /* Component containers
58
+ ----------------------------------*/
59
+ .ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
60
+ .ui-widget .ui-widget { font-size: 1em; }
61
+ .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
62
+ .ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(../images/smoothness/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; }
63
+ .ui-widget-content a { color: #222222; }
64
+ .ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(../images/smoothness/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
65
+ .ui-widget-header a { color: #222222; }
66
+
67
+ /* Interaction states
68
+ ----------------------------------*/
69
+ .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(../images/smoothness/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; }
70
+ .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; }
71
+ .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999; background: #dadada url(../images/smoothness/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
72
+ .ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; }
73
+ .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(../images/smoothness/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; }
74
+ .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; text-decoration: none; }
75
+ .ui-widget :active { outline: none; }
76
+
77
+ /* Interaction Cues
78
+ ----------------------------------*/
79
+ .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(../images/smoothness/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; }
80
+ .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
81
+ .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(../images/smoothness/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; }
82
+ .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
83
+ .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
84
+ .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
85
+ .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
86
+ .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
87
+
88
+ /* Icons
89
+ ----------------------------------*/
90
+
91
+ /* states and images */
92
+ .ui-icon { width: 16px; height: 16px; background-image: url(../images/smoothness/ui-icons_222222_256x240.png); }
93
+ .ui-widget-content .ui-icon {background-image: url(../images/smoothness/ui-icons_222222_256x240.png); }
94
+ .ui-widget-header .ui-icon {background-image: url(../images/smoothness/ui-icons_222222_256x240.png); }
95
+ .ui-state-default .ui-icon { background-image: url(../images/smoothness/ui-icons_888888_256x240.png); }
96
+ .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(../images/smoothness/ui-icons_454545_256x240.png); }
97
+ .ui-state-active .ui-icon {background-image: url(../images/smoothness/ui-icons_454545_256x240.png); }
98
+ .ui-state-highlight .ui-icon {background-image: url(../images/smoothness/ui-icons_2e83ff_256x240.png); }
99
+ .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(../images/smoothness/ui-icons_cd0a0a_256x240.png); }
100
+
101
+ /* positioning */
102
+ .ui-icon-carat-1-n { background-position: 0 0; }
103
+ .ui-icon-carat-1-ne { background-position: -16px 0; }
104
+ .ui-icon-carat-1-e { background-position: -32px 0; }
105
+ .ui-icon-carat-1-se { background-position: -48px 0; }
106
+ .ui-icon-carat-1-s { background-position: -64px 0; }
107
+ .ui-icon-carat-1-sw { background-position: -80px 0; }
108
+ .ui-icon-carat-1-w { background-position: -96px 0; }
109
+ .ui-icon-carat-1-nw { background-position: -112px 0; }
110
+ .ui-icon-carat-2-n-s { background-position: -128px 0; }
111
+ .ui-icon-carat-2-e-w { background-position: -144px 0; }
112
+ .ui-icon-triangle-1-n { background-position: 0 -16px; }
113
+ .ui-icon-triangle-1-ne { background-position: -16px -16px; }
114
+ .ui-icon-triangle-1-e { background-position: -32px -16px; }
115
+ .ui-icon-triangle-1-se { background-position: -48px -16px; }
116
+ .ui-icon-triangle-1-s { background-position: -64px -16px; }
117
+ .ui-icon-triangle-1-sw { background-position: -80px -16px; }
118
+ .ui-icon-triangle-1-w { background-position: -96px -16px; }
119
+ .ui-icon-triangle-1-nw { background-position: -112px -16px; }
120
+ .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
121
+ .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
122
+ .ui-icon-arrow-1-n { background-position: 0 -32px; }
123
+ .ui-icon-arrow-1-ne { background-position: -16px -32px; }
124
+ .ui-icon-arrow-1-e { background-position: -32px -32px; }
125
+ .ui-icon-arrow-1-se { background-position: -48px -32px; }
126
+ .ui-icon-arrow-1-s { background-position: -64px -32px; }
127
+ .ui-icon-arrow-1-sw { background-position: -80px -32px; }
128
+ .ui-icon-arrow-1-w { background-position: -96px -32px; }
129
+ .ui-icon-arrow-1-nw { background-position: -112px -32px; }
130
+ .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
131
+ .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
132
+ .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
133
+ .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
134
+ .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
135
+ .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
136
+ .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
137
+ .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
138
+ .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
139
+ .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
140
+ .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
141
+ .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
142
+ .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
143
+ .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
144
+ .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
145
+ .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
146
+ .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
147
+ .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
148
+ .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
149
+ .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
150
+ .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
151
+ .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
152
+ .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
153
+ .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
154
+ .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
155
+ .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
156
+ .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
157
+ .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
158
+ .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
159
+ .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
160
+ .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
161
+ .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
162
+ .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
163
+ .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
164
+ .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
165
+ .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
166
+ .ui-icon-arrow-4 { background-position: 0 -80px; }
167
+ .ui-icon-arrow-4-diag { background-position: -16px -80px; }
168
+ .ui-icon-extlink { background-position: -32px -80px; }
169
+ .ui-icon-newwin { background-position: -48px -80px; }
170
+ .ui-icon-refresh { background-position: -64px -80px; }
171
+ .ui-icon-shuffle { background-position: -80px -80px; }
172
+ .ui-icon-transfer-e-w { background-position: -96px -80px; }
173
+ .ui-icon-transferthick-e-w { background-position: -112px -80px; }
174
+ .ui-icon-folder-collapsed { background-position: 0 -96px; }
175
+ .ui-icon-folder-open { background-position: -16px -96px; }
176
+ .ui-icon-document { background-position: -32px -96px; }
177
+ .ui-icon-document-b { background-position: -48px -96px; }
178
+ .ui-icon-note { background-position: -64px -96px; }
179
+ .ui-icon-mail-closed { background-position: -80px -96px; }
180
+ .ui-icon-mail-open { background-position: -96px -96px; }
181
+ .ui-icon-suitcase { background-position: -112px -96px; }
182
+ .ui-icon-comment { background-position: -128px -96px; }
183
+ .ui-icon-person { background-position: -144px -96px; }
184
+ .ui-icon-print { background-position: -160px -96px; }
185
+ .ui-icon-trash { background-position: -176px -96px; }
186
+ .ui-icon-locked { background-position: -192px -96px; }
187
+ .ui-icon-unlocked { background-position: -208px -96px; }
188
+ .ui-icon-bookmark { background-position: -224px -96px; }
189
+ .ui-icon-tag { background-position: -240px -96px; }
190
+ .ui-icon-home { background-position: 0 -112px; }
191
+ .ui-icon-flag { background-position: -16px -112px; }
192
+ .ui-icon-calendar { background-position: -32px -112px; }
193
+ .ui-icon-cart { background-position: -48px -112px; }
194
+ .ui-icon-pencil { background-position: -64px -112px; }
195
+ .ui-icon-clock { background-position: -80px -112px; }
196
+ .ui-icon-disk { background-position: -96px -112px; }
197
+ .ui-icon-calculator { background-position: -112px -112px; }
198
+ .ui-icon-zoomin { background-position: -128px -112px; }
199
+ .ui-icon-zoomout { background-position: -144px -112px; }
200
+ .ui-icon-search { background-position: -160px -112px; }
201
+ .ui-icon-wrench { background-position: -176px -112px; }
202
+ .ui-icon-gear { background-position: -192px -112px; }
203
+ .ui-icon-heart { background-position: -208px -112px; }
204
+ .ui-icon-star { background-position: -224px -112px; }
205
+ .ui-icon-link { background-position: -240px -112px; }
206
+ .ui-icon-cancel { background-position: 0 -128px; }
207
+ .ui-icon-plus { background-position: -16px -128px; }
208
+ .ui-icon-plusthick { background-position: -32px -128px; }
209
+ .ui-icon-minus { background-position: -48px -128px; }
210
+ .ui-icon-minusthick { background-position: -64px -128px; }
211
+ .ui-icon-close { background-position: -80px -128px; }
212
+ .ui-icon-closethick { background-position: -96px -128px; }
213
+ .ui-icon-key { background-position: -112px -128px; }
214
+ .ui-icon-lightbulb { background-position: -128px -128px; }
215
+ .ui-icon-scissors { background-position: -144px -128px; }
216
+ .ui-icon-clipboard { background-position: -160px -128px; }
217
+ .ui-icon-copy { background-position: -176px -128px; }
218
+ .ui-icon-contact { background-position: -192px -128px; }
219
+ .ui-icon-image { background-position: -208px -128px; }
220
+ .ui-icon-video { background-position: -224px -128px; }
221
+ .ui-icon-script { background-position: -240px -128px; }
222
+ .ui-icon-alert { background-position: 0 -144px; }
223
+ .ui-icon-info { background-position: -16px -144px; }
224
+ .ui-icon-notice { background-position: -32px -144px; }
225
+ .ui-icon-help { background-position: -48px -144px; }
226
+ .ui-icon-check { background-position: -64px -144px; }
227
+ .ui-icon-bullet { background-position: -80px -144px; }
228
+ .ui-icon-radio-off { background-position: -96px -144px; }
229
+ .ui-icon-radio-on { background-position: -112px -144px; }
230
+ .ui-icon-pin-w { background-position: -128px -144px; }
231
+ .ui-icon-pin-s { background-position: -144px -144px; }
232
+ .ui-icon-play { background-position: 0 -160px; }
233
+ .ui-icon-pause { background-position: -16px -160px; }
234
+ .ui-icon-seek-next { background-position: -32px -160px; }
235
+ .ui-icon-seek-prev { background-position: -48px -160px; }
236
+ .ui-icon-seek-end { background-position: -64px -160px; }
237
+ .ui-icon-seek-start { background-position: -80px -160px; }
238
+ /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
239
+ .ui-icon-seek-first { background-position: -80px -160px; }
240
+ .ui-icon-stop { background-position: -96px -160px; }
241
+ .ui-icon-eject { background-position: -112px -160px; }
242
+ .ui-icon-volume-off { background-position: -128px -160px; }
243
+ .ui-icon-volume-on { background-position: -144px -160px; }
244
+ .ui-icon-power { background-position: 0 -176px; }
245
+ .ui-icon-signal-diag { background-position: -16px -176px; }
246
+ .ui-icon-signal { background-position: -32px -176px; }
247
+ .ui-icon-battery-0 { background-position: -48px -176px; }
248
+ .ui-icon-battery-1 { background-position: -64px -176px; }
249
+ .ui-icon-battery-2 { background-position: -80px -176px; }
250
+ .ui-icon-battery-3 { background-position: -96px -176px; }
251
+ .ui-icon-circle-plus { background-position: 0 -192px; }
252
+ .ui-icon-circle-minus { background-position: -16px -192px; }
253
+ .ui-icon-circle-close { background-position: -32px -192px; }
254
+ .ui-icon-circle-triangle-e { background-position: -48px -192px; }
255
+ .ui-icon-circle-triangle-s { background-position: -64px -192px; }
256
+ .ui-icon-circle-triangle-w { background-position: -80px -192px; }
257
+ .ui-icon-circle-triangle-n { background-position: -96px -192px; }
258
+ .ui-icon-circle-arrow-e { background-position: -112px -192px; }
259
+ .ui-icon-circle-arrow-s { background-position: -128px -192px; }
260
+ .ui-icon-circle-arrow-w { background-position: -144px -192px; }
261
+ .ui-icon-circle-arrow-n { background-position: -160px -192px; }
262
+ .ui-icon-circle-zoomin { background-position: -176px -192px; }
263
+ .ui-icon-circle-zoomout { background-position: -192px -192px; }
264
+ .ui-icon-circle-check { background-position: -208px -192px; }
265
+ .ui-icon-circlesmall-plus { background-position: 0 -208px; }
266
+ .ui-icon-circlesmall-minus { background-position: -16px -208px; }
267
+ .ui-icon-circlesmall-close { background-position: -32px -208px; }
268
+ .ui-icon-squaresmall-plus { background-position: -48px -208px; }
269
+ .ui-icon-squaresmall-minus { background-position: -64px -208px; }
270
+ .ui-icon-squaresmall-close { background-position: -80px -208px; }
271
+ .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
272
+ .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
273
+ .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
274
+ .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
275
+ .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
276
+ .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
277
+
278
+
279
+ /* Misc visuals
280
+ ----------------------------------*/
281
+
282
+ /* Corner radius */
283
+ .ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; }
284
+ .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; }
285
+ .ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
286
+ .ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
287
+
288
+ /* Overlays */
289
+ .ui-widget-overlay { background: #aaaaaa url(../images/smoothness/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
290
+ .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(../images/smoothness/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }
291
+ /*
292
+ * jQuery UI Datepicker 1.8.16
293
+ *
294
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
295
+ * Dual licensed under the MIT or GPL Version 2 licenses.
296
+ * http://jquery.org/license
297
+ *
298
+ * http://docs.jquery.com/UI/Datepicker#theming
299
+ */
300
+ .ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
301
+ .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
302
+ .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
303
+ .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
304
+ .ui-datepicker .ui-datepicker-prev { left:2px; }
305
+ .ui-datepicker .ui-datepicker-next { right:2px; }
306
+ .ui-datepicker .ui-datepicker-prev-hover { left:1px; }
307
+ .ui-datepicker .ui-datepicker-next-hover { right:1px; }
308
+ .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
309
+ .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
310
+ .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
311
+ .ui-datepicker select.ui-datepicker-month-year {width: 100%;}
312
+ .ui-datepicker select.ui-datepicker-month,
313
+ .ui-datepicker select.ui-datepicker-year { width: 49%;}
314
+ .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
315
+ .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
316
+ .ui-datepicker td { border: 0; padding: 1px; }
317
+ .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
318
+ .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
319
+ .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
320
+ .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
321
+
322
+ /* with multiple calendars */
323
+ .ui-datepicker.ui-datepicker-multi { width:auto; }
324
+ .ui-datepicker-multi .ui-datepicker-group { float:left; }
325
+ .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
326
+ .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
327
+ .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
328
+ .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
329
+ .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
330
+ .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
331
+ .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
332
+ .ui-datepicker-row-break { clear:both; width:100%; font-size:0em; }
333
+
334
+ /* RTL support */
335
+ .ui-datepicker-rtl { direction: rtl; }
336
+ .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
337
+ .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
338
+ .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
339
+ .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
340
+ .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
341
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
342
+ .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
343
+ .ui-datepicker-rtl .ui-datepicker-group { float:right; }
344
+ .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
345
+ .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
346
+
347
+ /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
348
+ .ui-datepicker-cover {
349
+ display: none; /*sorry for IE5*/
350
+ display/**/: block; /*sorry for IE5*/
351
+ position: absolute; /*must have*/
352
+ z-index: -1; /*must have*/
353
+ filter: mask(); /*must have*/
354
+ top: -4px; /*must have*/
355
+ left: -4px; /*must have*/
356
+ width: 200px; /*must have*/
357
+ height: 200px; /*must have*/
358
+ }
css/style.ykseme.css CHANGED
@@ -3,6 +3,20 @@
3
  background: transparent url('../images/ykseme_32px_color.png') no-repeat 0 0;
4
  }
5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  .yks-status
7
  {
8
  display: none;
@@ -40,12 +54,40 @@
40
  background: #CCDDFF;
41
  clear: both;
42
  margin: 15px auto 15px auto;
43
- text-align: center;
 
 
44
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  .yks-status .yks-notice p
46
  {
47
  padding: 5px;
48
  }
 
 
 
 
 
 
 
49
 
50
  .yks-mailchimp-fields-td
51
  {
@@ -83,6 +125,12 @@
83
  background: #890B0B !important;
84
  border-color: #890B0B !important;
85
  }
 
 
 
 
 
 
86
 
87
  #yks-list-wrapper .yks-list-container
88
  {
@@ -135,4 +183,50 @@
135
  .yks-mailchimpFormTableSubmit
136
  {
137
  text-align: center;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  }
3
  background: transparent url('../images/ykseme_32px_color.png') no-repeat 0 0;
4
  }
5
 
6
+ #yksme-yikes-logo
7
+ {
8
+ padding: ;
9
+ margin: 0 0 15px 15px;
10
+ width: 400px;
11
+ height: 395px;
12
+ clear: right;
13
+ float: right;
14
+ display: block;
15
+ }
16
+ .yks-hidden
17
+ {
18
+ display: none;
19
+ }
20
  .yks-status
21
  {
22
  display: none;
54
  background: #CCDDFF;
55
  clear: both;
56
  margin: 15px auto 15px auto;
57
+ padding: 5px;
58
+ position: relative;
59
+ text-align: left;
60
  }
61
+ .yks-status .yks-notice a.yks-notice-close,
62
+ .yks-status .yks-notice a.yks-notice-close:active,
63
+ .yks-status .yks-notice a.yks-notice-close:link,
64
+ .yks-status .yks-notice a.yks-notice-close:visited
65
+ {
66
+ background: #0033AA;
67
+ color: #FFF;
68
+ position: absolute;
69
+ padding: 0 5px !important;
70
+ margin: 0 !important;
71
+ top: 0;
72
+ right: 0;
73
+ font-size: 10px;
74
+ text-decoration: none;
75
+ }
76
+ .yks-status .yks-notice a.yks-notice-close:hover
77
+ {
78
+ text-decoration: underline;
79
+ }
80
  .yks-status .yks-notice p
81
  {
82
  padding: 5px;
83
  }
84
+
85
+ .yks-notice-toggle
86
+ {
87
+ background: #c9cced !important;
88
+ border-color: #9ea0ba !important;
89
+ color: #3c3a44 !important;
90
+ }
91
 
92
  .yks-mailchimp-fields-td
93
  {
125
  background: #890B0B !important;
126
  border-color: #890B0B !important;
127
  }
128
+ .yks-mailchimp-import {
129
+ background: #ffc000 !important;
130
+ border-color: #ffc000 !important;
131
+ float: right;
132
+ margin: 0 10px 0 0;
133
+ }
134
 
135
  #yks-list-wrapper .yks-list-container
136
  {
183
  .yks-mailchimpFormTableSubmit
184
  {
185
  text-align: center;
186
+ }
187
+
188
+ .yks-mailchimpFormTableRow,
189
+ .yks-mailchimpFormDivRow
190
+ {
191
+ width: 100%;
192
+ }
193
+ .yks-mailchimpFormTableRowLabel,
194
+ .yks-mailchimpFormTableRowField,
195
+ .yks-mailchimpFormDivRowLabel,
196
+ .yks-mailchimpFormDivRowField
197
+ {
198
+ vertical-align: top !important;
199
+ }
200
+ .yks-mailchimpFormDivRowLabel,
201
+ .yks-mailchimpFormDivRowField
202
+ {
203
+ display: inline-block;
204
+ width: 50%;
205
+ }
206
+ .yks-mailchimpFormDivSubmit
207
+ {
208
+ display: inline-block;
209
+ width: 100%;
210
+ }
211
+
212
+ .yks-mailchimp-form-tooltip
213
+ {
214
+ color: #CCC !important;
215
+ font-size: 10px;
216
+ margin: 0;
217
+ padding: 0 0 0 10px;
218
+ }
219
+
220
+ #yks-mailchimp-debug-info,
221
+ #yks-mailchimp-debug-info table,
222
+ #yks-mailchimp-debug-info table label,
223
+ #yks-mailchimp-debug-info table th,
224
+ #yks-mailchimp-debug-info table td
225
+ {
226
+ color: #CCC !important;
227
+ font-size: 10px;
228
+ margin-top: 0;
229
+ margin-bottom: 0;
230
+ padding-top: 0;
231
+ padding-bottom: 0;
232
  }
images/smoothness/ui-bg_flat_0_aaaaaa_40x100.png ADDED
Binary file
images/smoothness/ui-bg_flat_75_ffffff_40x100.png ADDED
Binary file
images/smoothness/ui-bg_glass_55_fbf9ee_1x400.png ADDED
Binary file
images/smoothness/ui-bg_glass_65_ffffff_1x400.png ADDED
Binary file
images/smoothness/ui-bg_glass_75_dadada_1x400.png ADDED
Binary file
images/smoothness/ui-bg_glass_75_e6e6e6_1x400.png ADDED
Binary file
images/smoothness/ui-bg_glass_95_fef1ec_1x400.png ADDED
Binary file
images/smoothness/ui-bg_highlight-soft_75_cccccc_1x100.png ADDED
Binary file
images/smoothness/ui-icons_222222_256x240.png ADDED
Binary file
images/smoothness/ui-icons_2e83ff_256x240.png ADDED
Binary file
images/smoothness/ui-icons_454545_256x240.png ADDED
Binary file
images/smoothness/ui-icons_888888_256x240.png ADDED
Binary file
images/smoothness/ui-icons_cd0a0a_256x240.png ADDED
Binary file
images/yikes_logo.png ADDED
Binary file
js/jquery-ui-1.8.16.datepicker.min.js ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery UI Datepicker 1.8.16
3
+ *
4
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
5
+ * Dual licensed under the MIT or GPL Version 2 licenses.
6
+ * http://jquery.org/license
7
+ *
8
+ * http://docs.jquery.com/UI/Datepicker
9
+ *
10
+ * Depends:
11
+ * jquery.ui.core.js
12
+ */
13
+ (function(d,C){function M(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass=
14
+ "ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su",
15
+ "Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",
16
+ minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false,disabled:false};d.extend(this._defaults,this.regional[""]);this.dpDiv=N(d('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}function N(a){return a.bind("mouseout",
17
+ function(b){b=d(b.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");b.length&&b.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(b){b=d(b.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");if(!(d.datepicker._isDisabledDatepicker(J.inline?a.parent()[0]:J.input[0])||!b.length)){b.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");
18
+ b.addClass("ui-state-hover");b.hasClass("ui-datepicker-prev")&&b.addClass("ui-datepicker-prev-hover");b.hasClass("ui-datepicker-next")&&b.addClass("ui-datepicker-next-hover")}})}function H(a,b){d.extend(a,b);for(var c in b)if(b[c]==null||b[c]==C)a[c]=b[c];return a}d.extend(d.ui,{datepicker:{version:"1.8.16"}});var B=(new Date).getTime(),J;d.extend(M.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},
19
+ setDefaults:function(a){H(this._defaults,a||{});return this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=f}}}e=a.nodeName.toLowerCase();f=e=="div"||e=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var i=this._newInst(d(a),f);i.settings=d.extend({},b||{},c||{});if(e=="input")this._connectDatepicker(a,i);else f&&this._inlineDatepicker(a,i)},_newInst:function(a,b){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g,
20
+ "\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:!b?this.dpDiv:N(d('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}},_connectDatepicker:function(a,b){var c=d(a);b.append=d([]);b.trigger=d([]);if(!c.hasClass(this.markerClassName)){this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",
21
+ function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});this._autoSize(b);d.data(a,"datepicker",b);b.settings.disabled&&this._disableDatepicker(a)}},_attachments:function(a,b){var c=this._get(b,"appendText"),e=this._get(b,"isRTL");b.append&&b.append.remove();if(c){b.append=d('<span class="'+this._appendClass+'">'+c+"</span>");a[e?"before":"after"](b.append)}a.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();c=this._get(b,"showOn");if(c==
22
+ "focus"||c=="both")a.focus(this._showDatepicker);if(c=="button"||c=="both"){c=this._get(b,"buttonText");var f=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("<img/>").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):d('<button type="button"></button>').addClass(this._triggerClass).html(f==""?c:d("<img/>").attr({src:f,alt:c,title:c})));a[e?"before":"after"](b.trigger);b.trigger.click(function(){d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker():
23
+ d.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var e=function(f){for(var h=0,i=0,g=0;g<f.length;g++)if(f[g].length>h){h=f[g].length;i=g}return i};b.setMonth(e(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort")));b.setDate(e(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a,
24
+ b){var c=d(a);if(!c.hasClass(this.markerClassName)){c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});d.data(a,"datepicker",b);this._setDate(b,this._getDefaultDate(b),true);this._updateDatepicker(b);this._updateAlternate(b);b.settings.disabled&&this._disableDatepicker(a);b.dpDiv.css("display","block")}},_dialogDatepicker:function(a,b,c,e,f){a=this._dialogInst;if(!a){this.uuid+=
25
+ 1;this._dialogInput=d('<input type="text" id="'+("dp"+this.uuid)+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);d("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};d.data(this._dialogInput[0],"datepicker",a)}H(a.settings,e||{});b=b&&b.constructor==Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=f?f.length?f:[f.pageX,f.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/
26
+ 2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=c;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var b=
27
+ d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a,"datepicker");if(e=="input"){c.append.remove();c.trigger.remove();b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else if(e=="div"||e=="span")b.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=
28
+ a.nodeName.toLowerCase();if(e=="input"){a.disabled=false;c.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(e=="div"||e=="span"){b=b.children("."+this._inlineClass);b.children().removeClass("ui-state-disabled");b.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:f})}},_disableDatepicker:function(a){var b=d(a),c=d.data(a,
29
+ "datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=true;c.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(e=="div"||e=="span"){b=b.children("."+this._inlineClass);b.children().addClass("ui-state-disabled");b.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==
30
+ a?null:f});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return false;for(var b=0;b<this._disabledInputs.length;b++)if(this._disabledInputs[b]==a)return true;return false},_getInst:function(a){try{return d.data(a,"datepicker")}catch(b){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(a,b,c){var e=this._getInst(a);if(arguments.length==2&&typeof b=="string")return b=="defaults"?d.extend({},d.datepicker._defaults):e?b=="all"?
31
+ d.extend({},e.settings):this._get(e,b):null;var f=b||{};if(typeof b=="string"){f={};f[b]=c}if(e){this._curInst==e&&this._hideDatepicker();var h=this._getDateDatepicker(a,true),i=this._getMinMaxDate(e,"min"),g=this._getMinMaxDate(e,"max");H(e.settings,f);if(i!==null&&f.dateFormat!==C&&f.minDate===C)e.settings.minDate=this._formatDate(e,i);if(g!==null&&f.dateFormat!==C&&f.maxDate===C)e.settings.maxDate=this._formatDate(e,g);this._attachments(d(a),e);this._autoSize(e);this._setDate(e,h);this._updateAlternate(e);
32
+ this._updateDatepicker(e)}},_changeDatepicker:function(a,b,c){this._optionDatepicker(a,b,c)},_refreshDatepicker:function(a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:function(a,b){if(a=this._getInst(a)){this._setDate(a,b);this._updateDatepicker(a);this._updateAlternate(a)}},_getDateDatepicker:function(a,b){(a=this._getInst(a))&&!a.inline&&this._setDateFromField(a,b);return a?this._getDate(a):null},_doKeyDown:function(a){var b=d.datepicker._getInst(a.target),c=true,e=b.dpDiv.is(".ui-datepicker-rtl");
33
+ b._keyEvent=true;if(d.datepicker._datepickerShowing)switch(a.keyCode){case 9:d.datepicker._hideDatepicker();c=false;break;case 13:c=d("td."+d.datepicker._dayOverClass+":not(."+d.datepicker._currentClass+")",b.dpDiv);c[0]&&d.datepicker._selectDay(a.target,b.selectedMonth,b.selectedYear,c[0]);if(a=d.datepicker._get(b,"onSelect")){c=d.datepicker._formatDate(b);a.apply(b.input?b.input[0]:null,[c,b])}else d.datepicker._hideDatepicker();return false;case 27:d.datepicker._hideDatepicker();break;case 33:d.datepicker._adjustDate(a.target,
34
+ a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M");break;case 34:d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,"stepMonths"),"M");break;case 35:if(a.ctrlKey||a.metaKey)d.datepicker._clearDate(a.target);c=a.ctrlKey||a.metaKey;break;case 36:if(a.ctrlKey||a.metaKey)d.datepicker._gotoToday(a.target);c=a.ctrlKey||a.metaKey;break;case 37:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,e?+1:-1,"D");c=
35
+ a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)d.datepicker._adjustDate(a.target,a.ctrlKey?-d.datepicker._get(b,"stepBigMonths"):-d.datepicker._get(b,"stepMonths"),"M");break;case 38:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,-7,"D");c=a.ctrlKey||a.metaKey;break;case 39:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,e?-1:+1,"D");c=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)d.datepicker._adjustDate(a.target,a.ctrlKey?+d.datepicker._get(b,"stepBigMonths"):+d.datepicker._get(b,
36
+ "stepMonths"),"M");break;case 40:if(a.ctrlKey||a.metaKey)d.datepicker._adjustDate(a.target,+7,"D");c=a.ctrlKey||a.metaKey;break;default:c=false}else if(a.keyCode==36&&a.ctrlKey)d.datepicker._showDatepicker(this);else c=false;if(c){a.preventDefault();a.stopPropagation()}},_doKeyPress:function(a){var b=d.datepicker._getInst(a.target);if(d.datepicker._get(b,"constrainInput")){b=d.datepicker._possibleChars(d.datepicker._get(b,"dateFormat"));var c=String.fromCharCode(a.charCode==C?a.keyCode:a.charCode);
37
+ return a.ctrlKey||a.metaKey||c<" "||!b||b.indexOf(c)>-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target);if(a.input.val()!=a.lastVal)try{if(d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))){d.datepicker._setDateFromField(a);d.datepicker._updateAlternate(a);d.datepicker._updateDatepicker(a)}}catch(b){d.datepicker.log(b)}return true},_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input")a=d("input",
38
+ a.parentNode)[0];if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==a)){var b=d.datepicker._getInst(a);if(d.datepicker._curInst&&d.datepicker._curInst!=b){d.datepicker._datepickerShowing&&d.datepicker._triggerOnClose(d.datepicker._curInst);d.datepicker._curInst.dpDiv.stop(true,true)}var c=d.datepicker._get(b,"beforeShow");c=c?c.apply(a,[a,b]):{};if(c!==false){H(b.settings,c);b.lastVal=null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(b);if(d.datepicker._inDialog)a.value=
39
+ "";if(!d.datepicker._pos){d.datepicker._pos=d.datepicker._findPos(a);d.datepicker._pos[1]+=a.offsetHeight}var e=false;d(a).parents().each(function(){e|=d(this).css("position")=="fixed";return!e});if(e&&d.browser.opera){d.datepicker._pos[0]-=document.documentElement.scrollLeft;d.datepicker._pos[1]-=document.documentElement.scrollTop}c={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;b.dpDiv.empty();b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(b);
40
+ c=d.datepicker._checkOffset(b,c,e);b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!b.inline){c=d.datepicker._get(b,"showAnim");var f=d.datepicker._get(b,"duration"),h=function(){var i=b.dpDiv.find("iframe.ui-datepicker-cover");if(i.length){var g=d.datepicker._getBorders(b.dpDiv);i.css({left:-g[0],top:-g[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex(d(a).zIndex()+1);d.datepicker._datepickerShowing=
41
+ true;d.effects&&d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,"showOptions"),f,h):b.dpDiv[c||"show"](c?f:null,h);if(!c||!f)h();b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();d.datepicker._curInst=b}}}},_updateDatepicker:function(a){this.maxRows=4;var b=d.datepicker._getBorders(a.dpDiv);J=a;a.dpDiv.empty().append(this._generateHTML(a));var c=a.dpDiv.find("iframe.ui-datepicker-cover");c.length&&c.css({left:-b[0],top:-b[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()});
42
+ a.dpDiv.find("."+this._dayOverClass+" a").mouseover();b=this._getNumberOfMonths(a);c=b[1];a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");c>1&&a.dpDiv.addClass("ui-datepicker-multi-"+c).css("width",17*c+"em");a.dpDiv[(b[0]!=1||b[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&
43
+ !a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var e=a.yearshtml;setTimeout(function(){e===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);e=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(c){return{thin:1,medium:2,thick:3}[c]||c};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(),
44
+ h=a.input?a.input.outerWidth():0,i=a.input?a.input.outerHeight():0,g=document.documentElement.clientWidth+d(document).scrollLeft(),j=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,"isRTL")?e-h:0;b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+i?d(document).scrollTop():0;b.left-=Math.min(b.left,b.left+e>g&&g>e?Math.abs(b.left+e-g):0);b.top-=Math.min(b.top,b.top+f>j&&j>f?Math.abs(f+i):0);return b},_findPos:function(a){for(var b=
45
+ this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1||d.expr.filters.hidden(a));)a=a[b?"previousSibling":"nextSibling"];a=d(a).offset();return[a.left,a.top]},_triggerOnClose:function(a){var b=this._get(a,"onClose");if(b)b.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a])},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=d.data(a,"datepicker")))if(this._datepickerShowing){a=this._get(b,"showAnim");var c=this._get(b,"duration"),e=function(){d.datepicker._tidyDialog(b);
46
+ this._curInst=null};d.effects&&d.effects[a]?b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),c,e):b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?c:null,e);a||e();d.datepicker._triggerOnClose(b);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(d.blockUI){d.unblockUI();d("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},
47
+ _checkExternalClick:function(a){if(d.datepicker._curInst){a=d(a.target);a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&!(d.datepicker._inDialog&&d.blockUI)&&d.datepicker._hideDatepicker()}},_adjustDate:function(a,b,c){a=d(a);var e=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"):
48
+ 0),c);this._updateDatepicker(e)}},_gotoToday:function(a){a=d(a);var b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay){b.selectedDay=b.currentDay;b.drawMonth=b.selectedMonth=b.currentMonth;b.drawYear=b.selectedYear=b.currentYear}else{var c=new Date;b.selectedDay=c.getDate();b.drawMonth=b.selectedMonth=c.getMonth();b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:function(a,b,c){a=d(a);var e=this._getInst(a[0]);e["selected"+(c=="M"?
49
+ "Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(a)},_selectDay:function(a,b,c,e){var f=d(a);if(!(d(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(f[0]))){f=this._getInst(f[0]);f.selectedDay=f.currentDay=d("a",e).html();f.selectedMonth=f.currentMonth=b;f.selectedYear=f.currentYear=c;this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){a=d(a);
50
+ this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,b){a=this._getInst(d(a)[0]);b=b!=null?b:this._formatDate(a);a.input&&a.input.val(b);this._updateAlternate(a);var c=this._get(a,"onSelect");if(c)c.apply(a.input?a.input[0]:null,[b,a]);else a.input&&a.input.trigger("change");if(a.inline)this._updateDatepicker(a);else{this._hideDatepicker();this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var b=this._get(a,"altField");
51
+ if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));d(b).each(function(){d(this).val(f)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var b=a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((b-a)/864E5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"?
52
+ b.toString():b+"";if(b=="")return null;var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;e=typeof e!="string"?e:(new Date).getFullYear()%100+parseInt(e,10);for(var f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,h=(c?c.dayNames:null)||this._defaults.dayNames,i=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,j=c=-1,l=-1,u=-1,k=false,o=function(p){(p=A+1<a.length&&a.charAt(A+1)==p)&&A++;return p},m=function(p){var D=
53
+ o(p);p=new RegExp("^\\d{1,"+(p=="@"?14:p=="!"?20:p=="y"&&D?4:p=="o"?3:2)+"}");p=b.substring(q).match(p);if(!p)throw"Missing number at position "+q;q+=p[0].length;return parseInt(p[0],10)},n=function(p,D,K){p=d.map(o(p)?K:D,function(w,x){return[[x,w]]}).sort(function(w,x){return-(w[1].length-x[1].length)});var E=-1;d.each(p,function(w,x){w=x[1];if(b.substr(q,w.length).toLowerCase()==w.toLowerCase()){E=x[0];q+=w.length;return false}});if(E!=-1)return E+1;else throw"Unknown name at position "+q;},s=
54
+ function(){if(b.charAt(q)!=a.charAt(A))throw"Unexpected literal at position "+q;q++},q=0,A=0;A<a.length;A++)if(k)if(a.charAt(A)=="'"&&!o("'"))k=false;else s();else switch(a.charAt(A)){case "d":l=m("d");break;case "D":n("D",f,h);break;case "o":u=m("o");break;case "m":j=m("m");break;case "M":j=n("M",i,g);break;case "y":c=m("y");break;case "@":var v=new Date(m("@"));c=v.getFullYear();j=v.getMonth()+1;l=v.getDate();break;case "!":v=new Date((m("!")-this._ticksTo1970)/1E4);c=v.getFullYear();j=v.getMonth()+
55
+ 1;l=v.getDate();break;case "'":if(o("'"))s();else k=true;break;default:s()}if(q<b.length)throw"Extra/unparsed characters found in date: "+b.substring(q);if(c==-1)c=(new Date).getFullYear();else if(c<100)c+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c<=e?0:-100);if(u>-1){j=1;l=u;do{e=this._getDaysInMonth(c,j-1);if(l<=e)break;j++;l-=e}while(1)}v=this._daylightSavingAdjust(new Date(c,j-1,l));if(v.getFullYear()!=c||v.getMonth()+1!=j||v.getDate()!=l)throw"Invalid date";return v},ATOM:"yy-mm-dd",
56
+ COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1E7,formatDate:function(a,b,c){if(!b)return"";var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames:
57
+ null)||this._defaults.monthNames;var i=function(o){(o=k+1<a.length&&a.charAt(k+1)==o)&&k++;return o},g=function(o,m,n){m=""+m;if(i(o))for(;m.length<n;)m="0"+m;return m},j=function(o,m,n,s){return i(o)?s[m]:n[m]},l="",u=false;if(b)for(var k=0;k<a.length;k++)if(u)if(a.charAt(k)=="'"&&!i("'"))u=false;else l+=a.charAt(k);else switch(a.charAt(k)){case "d":l+=g("d",b.getDate(),2);break;case "D":l+=j("D",b.getDay(),e,f);break;case "o":l+=g("o",Math.round(((new Date(b.getFullYear(),b.getMonth(),b.getDate())).getTime()-
58
+ (new Date(b.getFullYear(),0,0)).getTime())/864E5),3);break;case "m":l+=g("m",b.getMonth()+1,2);break;case "M":l+=j("M",b.getMonth(),h,c);break;case "y":l+=i("y")?b.getFullYear():(b.getYear()%100<10?"0":"")+b.getYear()%100;break;case "@":l+=b.getTime();break;case "!":l+=b.getTime()*1E4+this._ticksTo1970;break;case "'":if(i("'"))l+="'";else u=true;break;default:l+=a.charAt(k)}return l},_possibleChars:function(a){for(var b="",c=false,e=function(h){(h=f+1<a.length&&a.charAt(f+1)==h)&&f++;return h},f=
59
+ 0;f<a.length;f++)if(c)if(a.charAt(f)=="'"&&!e("'"))c=false;else b+=a.charAt(f);else switch(a.charAt(f)){case "d":case "m":case "y":case "@":b+="0123456789";break;case "D":case "M":return null;case "'":if(e("'"))b+="'";else c=true;break;default:b+=a.charAt(f)}return b},_get:function(a,b){return a.settings[b]!==C?a.settings[b]:this._defaults[b]},_setDateFromField:function(a,b){if(a.input.val()!=a.lastVal){var c=this._get(a,"dateFormat"),e=a.lastVal=a.input?a.input.val():null,f,h;f=h=this._getDefaultDate(a);
60
+ var i=this._getFormatConfig(a);try{f=this.parseDate(c,e,i)||h}catch(g){this.log(g);e=b?"":e}a.selectedDay=f.getDate();a.drawMonth=a.selectedMonth=f.getMonth();a.drawYear=a.selectedYear=f.getFullYear();a.currentDay=e?f.getDate():0;a.currentMonth=e?f.getMonth():0;a.currentYear=e?f.getFullYear():0;this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,b,c){var e=function(h){var i=new Date;
61
+ i.setDate(i.getDate()+h);return i},f=function(h){try{return d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),h,d.datepicker._getFormatConfig(a))}catch(i){}var g=(h.toLowerCase().match(/^c/)?d.datepicker._getDate(a):null)||new Date,j=g.getFullYear(),l=g.getMonth();g=g.getDate();for(var u=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,k=u.exec(h);k;){switch(k[2]||"d"){case "d":case "D":g+=parseInt(k[1],10);break;case "w":case "W":g+=parseInt(k[1],10)*7;break;case "m":case "M":l+=parseInt(k[1],10);g=
62
+ Math.min(g,d.datepicker._getDaysInMonth(j,l));break;case "y":case "Y":j+=parseInt(k[1],10);g=Math.min(g,d.datepicker._getDaysInMonth(j,l));break}k=u.exec(h)}return new Date(j,l,g)};if(b=(b=b==null||b===""?c:typeof b=="string"?f(b):typeof b=="number"?isNaN(b)?c:e(b):new Date(b.getTime()))&&b.toString()=="Invalid Date"?c:b){b.setHours(0);b.setMinutes(0);b.setSeconds(0);b.setMilliseconds(0)}return this._daylightSavingAdjust(b)},_daylightSavingAdjust:function(a){if(!a)return null;a.setHours(a.getHours()>
63
+ 12?a.getHours()+2:0);return a},_setDate:function(a,b,c){var e=!b,f=a.selectedMonth,h=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();if((f!=a.selectedMonth||h!=a.selectedYear)&&!c)this._notifyChange(a);this._adjustInstDate(a);if(a.input)a.input.val(e?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||a.input&&
64
+ a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),e=this._get(a,"showButtonPanel"),f=this._get(a,"hideIfNoPrevNext"),h=this._get(a,"navigationAsDateFormat"),i=this._getNumberOfMonths(a),g=this._get(a,"showCurrentAtPos"),j=this._get(a,"stepMonths"),l=i[0]!=1||i[1]!=1,u=this._daylightSavingAdjust(!a.currentDay?
65
+ new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),k=this._getMinMaxDate(a,"min"),o=this._getMinMaxDate(a,"max");g=a.drawMonth-g;var m=a.drawYear;if(g<0){g+=12;m--}if(o){var n=this._daylightSavingAdjust(new Date(o.getFullYear(),o.getMonth()-i[0]*i[1]+1,o.getDate()));for(n=k&&n<k?k:n;this._daylightSavingAdjust(new Date(m,g,1))>n;){g--;if(g<0){g=11;m--}}}a.drawMonth=g;a.drawYear=m;n=this._get(a,"prevText");n=!h?n:this.formatDate(n,this._daylightSavingAdjust(new Date(m,g-j,1)),this._getFormatConfig(a));
66
+ n=this._canAdjustMonth(a,-1,m,g)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+B+".datepicker._adjustDate('#"+a.id+"', -"+j+", 'M');\" title=\""+n+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+n+"</span></a>":f?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+n+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"e":"w")+'">'+n+"</span></a>";var s=this._get(a,"nextText");s=!h?s:this.formatDate(s,this._daylightSavingAdjust(new Date(m,
67
+ g+j,1)),this._getFormatConfig(a));f=this._canAdjustMonth(a,+1,m,g)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+B+".datepicker._adjustDate('#"+a.id+"', +"+j+", 'M');\" title=\""+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>":f?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+s+'"><span class="ui-icon ui-icon-circle-triangle-'+(c?"w":"e")+'">'+s+"</span></a>";j=this._get(a,"currentText");s=this._get(a,"gotoCurrent")&&
68
+ a.currentDay?u:b;j=!h?j:this.formatDate(j,s,this._getFormatConfig(a));h=!a.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+B+'.datepicker._hideDatepicker();">'+this._get(a,"closeText")+"</button>":"";e=e?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(c?h:"")+(this._isInRange(a,s)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+
69
+ B+".datepicker._gotoToday('#"+a.id+"');\">"+j+"</button>":"")+(c?"":h)+"</div>":"";h=parseInt(this._get(a,"firstDay"),10);h=isNaN(h)?0:h;j=this._get(a,"showWeek");s=this._get(a,"dayNames");this._get(a,"dayNamesShort");var q=this._get(a,"dayNamesMin"),A=this._get(a,"monthNames"),v=this._get(a,"monthNamesShort"),p=this._get(a,"beforeShowDay"),D=this._get(a,"showOtherMonths"),K=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var E=this._getDefaultDate(a),w="",x=0;x<i[0];x++){var O=
70
+ "";this.maxRows=4;for(var G=0;G<i[1];G++){var P=this._daylightSavingAdjust(new Date(m,g,a.selectedDay)),t=" ui-corner-all",y="";if(l){y+='<div class="ui-datepicker-group';if(i[1]>1)switch(G){case 0:y+=" ui-datepicker-group-first";t=" ui-corner-"+(c?"right":"left");break;case i[1]-1:y+=" ui-datepicker-group-last";t=" ui-corner-"+(c?"left":"right");break;default:y+=" ui-datepicker-group-middle";t="";break}y+='">'}y+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+t+'">'+(/all|left/.test(t)&&
71
+ x==0?c?f:n:"")+(/all|right/.test(t)&&x==0?c?n:f:"")+this._generateMonthYearHeader(a,g,m,k,o,x>0||G>0,A,v)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var z=j?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(t=0;t<7;t++){var r=(t+h)%7;z+="<th"+((t+h+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+s[r]+'">'+q[r]+"</span></th>"}y+=z+"</tr></thead><tbody>";z=this._getDaysInMonth(m,g);if(m==a.selectedYear&&g==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay,
72
+ z);t=(this._getFirstDayOfMonth(m,g)-h+7)%7;z=Math.ceil((t+z)/7);this.maxRows=z=l?this.maxRows>z?this.maxRows:z:z;r=this._daylightSavingAdjust(new Date(m,g,1-t));for(var Q=0;Q<z;Q++){y+="<tr>";var R=!j?"":'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(r)+"</td>";for(t=0;t<7;t++){var I=p?p.apply(a.input?a.input[0]:null,[r]):[true,""],F=r.getMonth()!=g,L=F&&!K||!I[0]||k&&r<k||o&&r>o;R+='<td class="'+((t+h+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(r.getTime()==
73
+ P.getTime()&&g==a.selectedMonth&&a._keyEvent||E.getTime()==r.getTime()&&E.getTime()==P.getTime()?" "+this._dayOverClass:"")+(L?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!D?"":" "+I[1]+(r.getTime()==u.getTime()?" "+this._currentClass:"")+(r.getTime()==b.getTime()?" ui-datepicker-today":""))+'"'+((!F||D)&&I[2]?' title="'+I[2]+'"':"")+(L?"":' onclick="DP_jQuery_'+B+".datepicker._selectDay('#"+a.id+"',"+r.getMonth()+","+r.getFullYear()+', this);return false;"')+">"+(F&&!D?"&#xa0;":L?'<span class="ui-state-default">'+
74
+ r.getDate()+"</span>":'<a class="ui-state-default'+(r.getTime()==b.getTime()?" ui-state-highlight":"")+(r.getTime()==u.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+'" href="#">'+r.getDate()+"</a>")+"</td>";r.setDate(r.getDate()+1);r=this._daylightSavingAdjust(r)}y+=R+"</tr>"}g++;if(g>11){g=0;m++}y+="</tbody></table>"+(l?"</div>"+(i[0]>0&&G==i[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");O+=y}w+=O}w+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':
75
+ "");a._keyEvent=false;return w},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var j=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),k='<div class="ui-datepicker-title">',o="";if(h||!j)o+='<span class="ui-datepicker-month">'+i[b]+"</span>";else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+B+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" >";for(var n=0;n<12;n++)if((!i||n>=e.getMonth())&&
76
+ (!m||n<=f.getMonth()))o+='<option value="'+n+'"'+(n==b?' selected="selected"':"")+">"+g[n]+"</option>";o+="</select>"}u||(k+=o+(h||!(j&&l)?"&#xa0;":""));if(!a.yearshtml){a.yearshtml="";if(h||!l)k+='<span class="ui-datepicker-year">'+c+"</span>";else{g=this._get(a,"yearRange").split(":");var s=(new Date).getFullYear();i=function(q){q=q.match(/c[+-].*/)?c+parseInt(q.substring(1),10):q.match(/[+-].*/)?s+parseInt(q,10):parseInt(q,10);return isNaN(q)?s:q};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b,
77
+ e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(a.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+B+".datepicker._selectMonthYear('#"+a.id+"', this, 'Y');\" >";b<=g;b++)a.yearshtml+='<option value="'+b+'"'+(b==c?' selected="selected"':"")+">"+b+"</option>";a.yearshtml+="</select>";k+=a.yearshtml;a.yearshtml=null}}k+=this._get(a,"yearSuffix");if(u)k+=(h||!(j&&l)?"&#xa0;":"")+o;k+="</div>";return k},_adjustInstDate:function(a,b,c){var e=a.drawYear+(c=="Y"?b:0),f=a.drawMonth+
78
+ (c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y")this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&b<c?c:b;return b=a&&b>a?a:b},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");if(b)b.apply(a.input?
79
+ a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a);c=this._daylightSavingAdjust(new Date(c,
80
+ e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a,
81
+ "dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker=function(a){if(!this.length)return this;
82
+ if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));return this.each(function(){typeof a==
83
+ "string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new M;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.16";window["DP_jQuery_"+B]=d})(jQuery);
84
+ ;
pages/about.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="wrap">
2
+ <div id="ykseme-icon" class="icon32"><br /></div>
3
+
4
+ <h2 id="ykseme-page-header">
5
+ About YIKES, Inc.
6
+ </h2>
7
+
8
+ <div id="yksme-page-content">
9
+ <img src="<?php echo YKSEME_URL; ?>/images/yikes_logo.png" alt="YIKES, Inc." id="yksme-yikes-logo" />
10
+ <h3>YIKES, Inc. Web Design and Development</h3>
11
+ <h4>Bringing Ideas To Life Since 1996</h4>
12
+
13
+ <p>YIKES is a Philadelphia company dedicated to&nbsp;<strong>sustainable business practices</strong>. Since 1996 YIKES has continued to be a socially responsible business observing the&nbsp;<strong>triple bottom line</strong>: people, planet, profit. YIKES is committed to building a more socially, environmentally and financially sustainable local economy.</p>
14
+ <p>YIKES is proud to have earned&nbsp;<strong><a href="http://www.bcorporation.net/" target="_blank">B Corporation Certification</a></strong>&nbsp;having successfully completed B Corp's screening process, and is a member and sponsor of the&nbsp;<a href="http://www.sbnphiladelphia.org/" target="_blank"><strong>Sustainable Business Network of Greater Philadelphia</strong></a>.</p>
15
+ <p>The YIKES office is located in a green (soon to be LEED certified) building and is powered by&nbsp;<strong>100% Renewable electricity</strong>&nbsp;through&nbsp;<a href="http://www.theenergyco-op.com/" target="_blank"><strong>The Energy Cooperative</strong></a>. YIKES recycles and composts office waste and prints promotional materials on recycled paper with soy ink. The YIKES office uses green cleaning and paper products. YIKES is also a&nbsp;<a href="http://www.replanttrees.org/"><strong>100% Replanted</strong></a>&nbsp;office.</p>
16
+ <p>YIKES was honored to receive the&nbsp;<strong>2011 B Corporation Award "Most Inspirational Project</strong>," and was a recipient of a&nbsp;<a href="http://www.sbnphiladelphia.org/events/svi2005folder/triplebottomlineawards"><strong>Triple Bottom Line Award</strong></a>&nbsp;at the 2005&nbsp;<a href="http://www.sbnphiladelphia.org/events/svi2005folder/"><strong>Social Venture Institute</strong></a>&nbsp;in the service category.</p>
17
+ <p>YIKES is a&nbsp;<strong>certified Woman Owned Business Enterprise</strong>&nbsp;by the Commonwealth of Pennsylvania Bureau of Minority and Women Business Opportunities and City of Philadelphia Minority Business Enterprise Council now known as the Office of Economic Opportunity.</p>
18
+ <p><a href="people.php" title="YIKES Team">YIKES employees</a> donate a percentage of YIKES' profits to non-profit organizations every year.</p>
19
+ </div>
20
+
21
+ </div>
pages/lists.php CHANGED
@@ -67,28 +67,33 @@
67
  a = confirm("Are you sure you want to add a new list?");
68
  if(a)
69
  {
70
- $.ajax({
71
- type: 'POST',
72
- url: ajaxurl,
73
- data: {
74
- action: 'yks_mailchimp_form',
75
- form_action: 'list_add'
76
- },
77
- dataType: 'json',
78
- success: function(MAILCHIMP)
79
- {
80
- if(MAILCHIMP != '-1')
 
 
81
  {
82
- if($('#yks-list-wrapper .yks-list-container').size() <= 0)
83
  {
84
- $('#yks-list-wrapper').html('');
 
 
 
 
 
 
85
  }
86
- $('#yks-list-wrapper').append(MAILCHIMP);
87
- scrollToElement($('#yks-list-wrapper .yks-list-container').last());
88
- initializeScrollableLists();
89
  }
90
- }
91
- });
92
  }
93
  return false;
94
  });
@@ -145,6 +150,65 @@
145
  }
146
  return false;
147
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  });
149
  </script>
150
  <div class="wrap">
@@ -153,14 +217,20 @@
153
  <h2 id="ykseme-page-header">
154
  Easy Mailchimp Extender
155
  <a href="#" class="button add-new-h2 yks-mailchimp-list-add">Add New List</a>
 
156
  </h2>
157
 
158
  <h3>Manage the Mailchimp Lists</h3>
159
 
160
  <div class="yks-status" style="display: block;">
161
- <div class="yks-notice">
 
162
  <p>
163
- <strong>Notice:</strong> when adding custom merge vars, keep in mind that apt, city, state and zip all use the address merge var because of the way MailChimp processes those fields. If you experience any bugs or have a feature request, please submit them to our <a href="https://github.com/yikesinc/yikes-inc-easy-mailchimp-extender">Github Issue Tracker</a>.
 
 
 
 
164
  </p>
165
  </div>
166
  </div>
67
  a = confirm("Are you sure you want to add a new list?");
68
  if(a)
69
  {
70
+ lid = prompt("Please enter the list id.");
71
+ if(lid !== '')
72
+ {
73
+ $.ajax({
74
+ type: 'POST',
75
+ url: ajaxurl,
76
+ data: {
77
+ action: 'yks_mailchimp_form',
78
+ form_action: 'list_add',
79
+ list_id: lid
80
+ },
81
+ dataType: 'json',
82
+ success: function(MAILCHIMP)
83
  {
84
+ if(MAILCHIMP != '-1')
85
  {
86
+ if($('#yks-list-wrapper .yks-list-container').size() <= 0)
87
+ {
88
+ $('#yks-list-wrapper').html('');
89
+ }
90
+ $('#yks-list-wrapper').append(MAILCHIMP);
91
+ scrollToElement($('#yks-list-wrapper .yks-list-container').last());
92
+ initializeScrollableLists();
93
  }
 
 
 
94
  }
95
+ });
96
+ }
97
  }
98
  return false;
99
  });
150
  }
151
  return false;
152
  });
153
+ $('.yks-mailchimp-import').live('click', function(e){
154
+ i = $(this).attr('rel');
155
+ a = confirm("Are you sure you want to import the list data from MailChimp?\n\nNOTICE: THE CURRENT LIST DATA WILL BE REPLACED WITH THE FIELD DATA FROM MAILCHIMP!");
156
+ if(a)
157
+ {
158
+ $.ajax({
159
+ type: 'POST',
160
+ url: ajaxurl,
161
+ data: {
162
+ action: 'yks_mailchimp_form',
163
+ form_action: 'list_import',
164
+ id: i
165
+ },
166
+ dataType: 'json',
167
+ success: function(MAILCHIMP)
168
+ {
169
+ if(MAILCHIMP != '-1')
170
+ {
171
+ $($('#yks-list-container_'+i)).replaceWith(MAILCHIMP);
172
+ $('#yks-list-container_'+i).yksYellowFade();
173
+ initializeScrollableLists();
174
+ }
175
+ else
176
+ {
177
+ alert("Looks like this list is already up to date!");
178
+ }
179
+ }
180
+ });
181
+ }
182
+ return false;
183
+ });
184
+ $('.yks-notice-close').live('click', function(e){
185
+ $.ajax({
186
+ type: 'POST',
187
+ url: ajaxurl,
188
+ data: {
189
+ action: 'yks_mailchimp_form',
190
+ form_action: 'notice_hide'
191
+ },
192
+ dataType: 'json',
193
+ success: function(MAILCHIMP)
194
+ {
195
+ if(MAILCHIMP != '-1')
196
+ {
197
+ $('.yks-notice').slideUp('fast');
198
+ }
199
+ }
200
+ });
201
+ return false;
202
+ });
203
+ $('.yks-notice-toggle').live('click', function(e){
204
+ if($('.yks-notice').hasClass('yks-hidden'))
205
+ {
206
+ $('.yks-notice').css('display', 'none');
207
+ $('.yks-notice').removeClass('yks-hidden');
208
+ }
209
+ $('.yks-notice').slideDown('fast');
210
+ return false;
211
+ });
212
  });
213
  </script>
214
  <div class="wrap">
217
  <h2 id="ykseme-page-header">
218
  Easy Mailchimp Extender
219
  <a href="#" class="button add-new-h2 yks-mailchimp-list-add">Add New List</a>
220
+ <a href="#" class="button add-new-h2 yks-notice-toggle">Show Notice</a>
221
  </h2>
222
 
223
  <h3>Manage the Mailchimp Lists</h3>
224
 
225
  <div class="yks-status" style="display: block;">
226
+ <div class="yks-notice<?php echo ($_COOKIE['yks-mailchimp-notice-hidden'] == '1' ? ' yks-hidden' : ''); ?>">
227
+ <a href="#" class="yks-notice-close">Hide Notice</a>
228
  <p>
229
+ <strong>Notice:</strong> Version 2 is out! When you add a new list you will now be prompted to put the list id in immediately. We'll contact MailChimp for you and pull in all of your custom fields! <em>Lists created after version 2.0 use a different format for the shortcodes. Instead of a unique id being generated, I now use the MailChimp List Id. The 2.0 update had so many changes in functionality that I had to import the old lists to the new format -- if anything isn't working, please let me know!</em><br />
230
+ <br />
231
+ <strong>Please note -- due to the complexity of this update, all shortcodes have been changed to use the list id from MailChimp, please copy and paste them again! Additionally, if you make any changes on the MailChimp side, you need to click Import Changes on the appropriate list. I'm looking in to a way to automate this in future versions.</strong><br />
232
+ <br />
233
+ If you experience any bugs or have a feature request, please submit them to our <a href="https://github.com/yikesinc/yikes-inc-easy-mailchimp-extender">Github Issue Tracker</a>.
234
  </p>
235
  </div>
236
  </div>
pages/options.php CHANGED
@@ -27,21 +27,21 @@
27
  type: 'POST',
28
  url: ajaxurl,
29
  data: {
30
- action: 'yks_mailchimp_form',
31
- form_action: 'update_api_key',
32
- api_key: $('#yks-mailchimp-api-key').val()
33
  },
34
  dataType: 'json',
35
  success: function(MAILCHIMP)
36
  {
37
  if(MAILCHIMP == '1')
38
  {
39
- $('#yks-status').html('<div class="yks-success"><p>The api key was saved successfully!</p></div>');
40
  $('#yks-status').slideDown('fast');
41
  }
42
  else
43
  {
44
- $('#yks-status').html('<div class="yks-error"><p>The api key could not be saved (or you forgot to change it)!</p></div>');
45
  $('#yks-status').slideDown('fast');
46
  }
47
  }
@@ -72,11 +72,48 @@
72
  <td><input name="yks-mailchimp-api-key" type="text" id="yks-mailchimp-api-key" value="<?php echo $this->optionVal['api-key']; ?>" class="regular-text" /></td>
73
  </tr>
74
 
 
 
 
 
 
 
 
 
 
 
 
75
  </tbody>
76
  </table>
77
 
78
- <p class="submit"><input type="submit" name="submit" id="submit" class="button-primary" value="Save API Key"></p>
79
 
80
  </form>
81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  </div>
27
  type: 'POST',
28
  url: ajaxurl,
29
  data: {
30
+ action: 'yks_mailchimp_form',
31
+ form_action: 'update_options',
32
+ form_data: $('#yks-mailchimp-form').serialize()
33
  },
34
  dataType: 'json',
35
  success: function(MAILCHIMP)
36
  {
37
  if(MAILCHIMP == '1')
38
  {
39
+ $('#yks-status').html('<div class="yks-success"><p>The options were saved successfully!</p></div>');
40
  $('#yks-status').slideDown('fast');
41
  }
42
  else
43
  {
44
+ $('#yks-status').html('<div class="yks-error"><p>The options could not be saved (or you forgot to change them)!</p></div>');
45
  $('#yks-status').slideDown('fast');
46
  }
47
  }
72
  <td><input name="yks-mailchimp-api-key" type="text" id="yks-mailchimp-api-key" value="<?php echo $this->optionVal['api-key']; ?>" class="regular-text" /></td>
73
  </tr>
74
 
75
+ <tr valign="top">
76
+ <th scope="row"><label for="yks-mailchimp-flavor">What's Your Flavor?</label></th>
77
+ <td>
78
+ <select name="yks-mailchimp-flavor" id="yks-mailchimp-flavor" class="regular-text" />
79
+ <option value="0"<?php echo ($this->optionVal['flavor'] === '0' ? ' selected' : ''); ?>>Tables</option>
80
+ <option value="1"<?php echo ($this->optionVal['flavor'] === '1' ? ' selected' : ''); ?>>Divs</option>
81
+ </select>
82
+ <span class="description">What you choose determines how the form is built with the shortcode (Default: Tables)</span>
83
+ </td>
84
+ </tr>
85
+
86
  </tbody>
87
  </table>
88
 
89
+ <p class="submit"><input type="submit" name="submit" id="submit" class="button-primary" value="Update Options"></p>
90
 
91
  </form>
92
 
93
+ <div id="yks-mailchimp-debug-info">
94
+ <table class="form-table">
95
+ <tbody>
96
+
97
+ <tr valign="top">
98
+ <th scope="row"><label>Plugin Version</label></th>
99
+ <td><?php echo YKSEME_VERSION_CURRENT; ?></td>
100
+ </tr>
101
+ <tr valign="top">
102
+ <th scope="row"><label>Wordpress Version</label></th>
103
+ <td><?php echo get_bloginfo( 'version' ); ?></td>
104
+ </tr>
105
+ <tr valign="top">
106
+ <th scope="row"><label>Browser Information</label></th>
107
+ <td>
108
+ <?php
109
+ $theBrowser = $this->getBrowser();
110
+ echo $theBrowser['name'].' '.$theBrowser['version'].' on '.$theBrowser['platform'];
111
+ ?>
112
+ </td>
113
+ </tr>
114
+
115
+ </tbody>
116
+ </table>
117
+ </div>
118
+
119
  </div>
process/ajax.php CHANGED
@@ -15,8 +15,8 @@ default:
15
  echo '-1';
16
  break;
17
 
18
- case 'update_api_key':
19
- $action = $yksemeBase->updateApiKey($_POST['api_key']);
20
  if($action)
21
  {
22
  echo '1';
@@ -25,7 +25,7 @@ case 'update_api_key':
25
  break;
26
 
27
  case 'list_add':
28
- $list = $yksemeBase->addList();
29
  if($list)
30
  {
31
  echo json_encode($list);
@@ -59,6 +59,15 @@ case 'list_delete':
59
  }
60
  else echo '-1';
61
  break;
 
 
 
 
 
 
 
 
 
62
 
63
  case 'frontend_submit_form':
64
  $action = $yksemeBase->addUserToMailchimp($_POST);
@@ -69,6 +78,11 @@ case 'frontend_submit_form':
69
  else echo '-1';
70
  break;
71
 
 
 
 
 
 
72
 
73
 
74
  }
15
  echo '-1';
16
  break;
17
 
18
+ case 'update_options':
19
+ $action = $yksemeBase->updateOptions($_POST);
20
  if($action)
21
  {
22
  echo '1';
25
  break;
26
 
27
  case 'list_add':
28
+ $list = $yksemeBase->addList($_POST['list_id']);
29
  if($list)
30
  {
31
  echo json_encode($list);
59
  }
60
  else echo '-1';
61
  break;
62
+
63
+ case 'list_import':
64
+ $list = $yksemeBase->importList($_POST['id']);
65
+ if($list)
66
+ {
67
+ echo json_encode($list);
68
+ }
69
+ else echo '-1';
70
+ break;
71
 
72
  case 'frontend_submit_form':
73
  $action = $yksemeBase->addUserToMailchimp($_POST);
78
  else echo '-1';
79
  break;
80
 
81
+ case 'notice_hide':
82
+ setcookie('yks-mailchimp-notice-hidden', '1', time()+60*60*24*30);
83
+ echo '1';
84
+ break;
85
+
86
 
87
 
88
  }
readme.md CHANGED
@@ -3,7 +3,7 @@ YIKES, Inc. Easy MailChimp Extender
3
 
4
  The MailChimp extender allows you to easily control your eMarketing with the addition of a shortcode in a post or page or a PHP tag in your template file. Simply create your lists in MailChimp and copy and paste the list ID created by MailChimp into the plugin admin.
5
 
6
- In addition, this plugin allows you to customize your signup forms with CSS. You can add as many of the base MailChimp list fields as you like and order them via an easy drag-and-drop interface.
7
 
8
  Targeted email messages are a more effective form of eMarketing for your business. The advantages of using MailChimp are vast and now you can expand upon its abilities in Wordpress easily. With simple installation and easy to follow instructions, this extender will considerably improve your email marketing campaigns.
9
 
@@ -21,27 +21,32 @@ Installation
21
  Frequently Asked Questions
22
  ===========
23
 
24
- ### Do I need to have a MailChimp Account?:
25
- Yes, you can register one for free at [MailChimp](https://mailchimp.com/signup/ "MailChimp Signup").
26
-
27
- ### Do I need to already have lists configured?:
28
  Yes, you can configure them through mailchimp. All the plugin needs is your list id.
29
 
30
- ### Where do I find my API Key?:
31
  From your MailChimp Dashboard go to Account > API Keys and Authorized Apps. There you will need to add a key if you do not already have one.
32
  For more help visit [The API Key Help Article](http://kb.mailchimp.com/article/where-can-i-find-my-api-key/ "API Key Help Article")
33
 
34
- ### Where do I find my List ID?:
35
  From your MailChimp Dashboard go to Lists. Under the specific list you want to make a signup form for, click settings > list settings and unique ID.
36
  For more help visit [The List Id Help Article](http://kb.mailchimp.com/article/how-can-i-find-my-list-id/ "List Id Help Article")
37
 
38
- ### My Information isn't showing up when people subscribe!:
39
- This is a temporary issue that has to do with the MERGE VARS naming. Follow the instruction of the notice on the lists page. The next major version will fix this issue.
40
 
 
 
41
 
42
  Changes
43
  ===========
44
 
 
 
 
 
 
 
45
  ### 1.3.1:
46
  *Added nopriv ajax action for anonymous users*
47
 
3
 
4
  The MailChimp extender allows you to easily control your eMarketing with the addition of a shortcode in a post or page or a PHP tag in your template file. Simply create your lists in MailChimp and copy and paste the list ID created by MailChimp into the plugin admin.
5
 
6
+ In addition, this plugin allows you to customize your signup forms with CSS. The plugin will pull in your mailchimp fields and allow you to order them via an easy drag-and-drop interface.
7
 
8
  Targeted email messages are a more effective form of eMarketing for your business. The advantages of using MailChimp are vast and now you can expand upon its abilities in Wordpress easily. With simple installation and easy to follow instructions, this extender will considerably improve your email marketing campaigns.
9
 
21
  Frequently Asked Questions
22
  ===========
23
 
24
+ ### Do I need to already have lists configured?
 
 
 
25
  Yes, you can configure them through mailchimp. All the plugin needs is your list id.
26
 
27
+ ### Where do I find my API Key?
28
  From your MailChimp Dashboard go to Account > API Keys and Authorized Apps. There you will need to add a key if you do not already have one.
29
  For more help visit [The API Key Help Article](http://kb.mailchimp.com/article/where-can-i-find-my-api-key/ "API Key Help Article")
30
 
31
+ ### Where do I find my List ID?
32
  From your MailChimp Dashboard go to Lists. Under the specific list you want to make a signup form for, click settings > list settings and unique ID.
33
  For more help visit [The List Id Help Article](http://kb.mailchimp.com/article/how-can-i-find-my-list-id/ "List Id Help Article")
34
 
35
+ ### My Information isn't showing up when people subscribe!
36
+ You're likely using an old version of the plugin. Please update to the latest version and import your list data.
37
 
38
+ ### My list data was changed/the form isn't showing up since the 2.0 update, what gives?
39
+ Due to the code overhaul required for the features of the new version, the structure we were using to save data had to be completely changed over to conform to the MailChimp schema. The old unique ids that the plugin gave to lists have been deprecated. The custom fields that you have are now pulled in from the MailChimp servers. If your form isn't showing up with the shortcode, just copy and paste it again to fix this issue.
40
 
41
  Changes
42
  ===========
43
 
44
+ ### 2.0.0:
45
+ *Added import function to pull in existing custom fields
46
+ *Added new field handling to work with any list configuration
47
+ *Required fields in MailChimp are now reflected properly in the list view
48
+ *Added ability to choose Divs or Tables
49
+
50
  ### 1.3.1:
51
  *Added nopriv ajax action for anonymous users*
52
 
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === YIKES, Inc. Easy MailChimp Extender ===
2
  Contributors: seriouslysean
3
- Donate link: http://yikesinc.com
4
  Tags: mailchimp, marketing, email, mailing lists, newsletter, signup
5
  Requires at least: 3.2
6
  Tested up to: 3.3
7
- Stable tag: 1.3.1
8
 
9
  The YIKES, Inc. MailChimp extender allows you to easily add a MailChimp signup form to a page or post using a shortcode or template tag.
10
 
@@ -12,7 +12,7 @@ The YIKES, Inc. MailChimp extender allows you to easily add a MailChimp signup f
12
 
13
  The MailChimp extender allows you to easily control your eMarketing with the addition of a shortcode in a post or page or a PHP tag in your template file. Simply create your lists in MailChimp and copy and paste the list ID created by MailChimp into the plugin admin.
14
 
15
- In addition, this plugin allows you to customize your signup forms with CSS. You can add as many of the base MailChimp list fields as you like and order them via an easy drag-and-drop interface.
16
 
17
  Targeted email messages are a more effective form of eMarketing for your business. The advantages of using MailChimp are vast and now you can expand upon its abilities in Wordpress easily. With simple installation and easy to follow instructions, this extender will considerably improve your email marketing campaigns.
18
 
@@ -43,17 +43,26 @@ From your MailChimp Dashboard go to Lists. Under the specific list you want to m
43
  For more help visit [The List Id Help Article](http://kb.mailchimp.com/article/how-can-i-find-my-list-id/ "List Id Help Article")
44
 
45
  = My Information isn't showing up when people subscribe! =
46
- This is a temporary issue that has to do with the MERGE VARS naming. Follow the instruction of the notice on the lists page. The next major version will fix this issue.
 
 
 
47
 
48
  == Screenshots ==
49
 
50
  1. Sidebar menu
51
  2. Options page
52
  3. List page
53
- 4. List setup you need to use
54
 
55
  == Changelog ==
56
 
 
 
 
 
 
 
57
  = 1.3.1 =
58
  * Added nopriv ajax action for anonymous users
59
 
@@ -75,6 +84,11 @@ This is a temporary issue that has to do with the MERGE VARS naming. Follow the
75
 
76
  == Upgrade Notice ==
77
 
 
 
 
 
 
78
  = 1.3.1 =
79
  * Fixed form not submitting for anonymous users bug
80
 
1
  === YIKES, Inc. Easy MailChimp Extender ===
2
  Contributors: seriouslysean
3
+ Donate link: http://www.yikesinc.com
4
  Tags: mailchimp, marketing, email, mailing lists, newsletter, signup
5
  Requires at least: 3.2
6
  Tested up to: 3.3
7
+ Stable tag: 2.0.0
8
 
9
  The YIKES, Inc. MailChimp extender allows you to easily add a MailChimp signup form to a page or post using a shortcode or template tag.
10
 
12
 
13
  The MailChimp extender allows you to easily control your eMarketing with the addition of a shortcode in a post or page or a PHP tag in your template file. Simply create your lists in MailChimp and copy and paste the list ID created by MailChimp into the plugin admin.
14
 
15
+ In addition, this plugin allows you to customize your signup forms with CSS. The plugin will pull in your mailchimp fields and allow you to order them via an easy drag-and-drop interface.
16
 
17
  Targeted email messages are a more effective form of eMarketing for your business. The advantages of using MailChimp are vast and now you can expand upon its abilities in Wordpress easily. With simple installation and easy to follow instructions, this extender will considerably improve your email marketing campaigns.
18
 
43
  For more help visit [The List Id Help Article](http://kb.mailchimp.com/article/how-can-i-find-my-list-id/ "List Id Help Article")
44
 
45
  = My Information isn't showing up when people subscribe! =
46
+ You're likely using an old version of the plugin. Please update to the latest version and import your list data.
47
+
48
+ = My list data was changed/the form isn't showing up since the 2.0 update, what gives? =
49
+ Due to the code overhaul required for the features of the new version, the structure we were using to save data had to be completely changed over to conform to the MailChimp schema. The old unique ids that the plugin gave to lists have been deprecated. The custom fields that you have are now pulled in from the MailChimp servers. If your form isn't showing up with the shortcode, just copy and paste it again to fix this issue.
50
 
51
  == Screenshots ==
52
 
53
  1. Sidebar menu
54
  2. Options page
55
  3. List page
56
+ 4. Sample list setup screen on MailChimp
57
 
58
  == Changelog ==
59
 
60
+ = 2.0.0 =
61
+ * Added import function to pull in existing custom fields
62
+ * Added new field handling to work with any list configuration
63
+ * Required fields in MailChimp are now reflected properly in the list view
64
+ * Added ability to choose Divs or Tables
65
+
66
  = 1.3.1 =
67
  * Added nopriv ajax action for anonymous users
68
 
84
 
85
  == Upgrade Notice ==
86
 
87
+ = 2.0.0 =
88
+ * Supports custom merge vars now
89
+ * Allows import from MailChimp
90
+ * Allows Table or Div output
91
+
92
  = 1.3.1 =
93
  * Fixed form not submitting for anonymous users bug
94
 
screenshot-1.png CHANGED
Binary file
screenshot-2.png CHANGED
Binary file
screenshot-3.png CHANGED
Binary file
screenshot-4.png CHANGED
Binary file
templates/shortcode_form.php CHANGED
@@ -1,25 +1,10 @@
1
- <?php
2
- $yksFormReqJs = '';
3
- $yksFormFields = '';
4
- foreach($list['fields'] as $field) : if($field['active'] == 1) :
5
- // Setup javascript
6
- if($field['require'] == '1') $yksFormReqJs .= "\n".'if($(\'#'.$field['id'].'\').val() == \'\'){msg+= \'* '.$field['label'].'\'+"\n";err++;}'."\n";
7
- // Setup form fields
8
- $yksFormFields .= '<tr>';
9
- $yksFormFields .= '<td class="prompt">'.$field['label'].'</td>';
10
- $yksFormFields .= '<td>';
11
- $yksFormFields .= '<input type="text" name="'.$field['name'].'" class="'.$field['name'].($field['require'] == 1 ? ' yks-require' : '').'" id="'.$field['id'].'" value="" />';
12
- $yksFormFields .= '</td>';
13
- $yksFormFields .= '</tr>';
14
- endif; endforeach;
15
- ?>
16
  <script type="text/javascript">
17
  jQuery(document).ready(function($){
18
  function blankFieldCheck()
19
  {
20
  err = 0;
21
  msg = '';
22
- <?php echo $yksFormReqJs; ?>
23
  if(msg != '')
24
  {
25
  msg = 'Please fix the following fields before submitting the form:'+"\n\n"+msg;
@@ -62,7 +47,14 @@ endif; endforeach;
62
  });
63
  }
64
  return false;
65
- })
 
 
 
 
 
 
 
66
  });
67
  </script>
68
 
@@ -72,16 +64,7 @@ endif; endforeach;
72
  <div class="yks-mailchimpFormContainerInner" id="yks-mailchimpFormContainerInner_<?php echo $list['id']; ?>">
73
  <form method="post" name="yks-mailchimp-form" id="yks-mailchimp-form_<?php echo $list['id']; ?>" rel="<?php echo $list['id']; ?>">
74
  <input type="hidden" name="yks-mailchimp-list-id" id="yks-mailchimp-list-id_<?php echo $list['id']; ?>" value="<?php echo $list['list-id']; ?>" />
75
- <table class="yks-mailchimpFormTable">
76
- <tbody>
77
- <?php echo $yksFormFields; ?>
78
- <tr>
79
- <td colspan="2" class="yks-mailchimpFormTableSubmit">
80
- <p><input type="submit" class="ykfmc-submit" id="ykfmc-submit_<?php echo $list['id']; ?>" value="Submit" /></p>
81
- </td>
82
- </tr>
83
- </tbody>
84
- </table>
85
  </form>
86
  </div>
87
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <script type="text/javascript">
2
  jQuery(document).ready(function($){
3
  function blankFieldCheck()
4
  {
5
  err = 0;
6
  msg = '';
7
+ <?php echo $this->getFrontendFormJavascript($list); ?>
8
  if(msg != '')
9
  {
10
  msg = 'Please fix the following fields before submitting the form:'+"\n\n"+msg;
47
  });
48
  }
49
  return false;
50
+ });
51
+ $('.yks-field-type-date').datepicker({
52
+ changeMonth: true,
53
+ changeYear: true,
54
+ yearRange: ((new Date).getFullYear()-100)+':'+((new Date).getFullYear()),
55
+ altFormat: 'yy-mm-dd'
56
+ });
57
+ $('#ui-datepicker-div').addClass('yks-mailchimpFormDatepickerContainer');
58
  });
59
  </script>
60
 
64
  <div class="yks-mailchimpFormContainerInner" id="yks-mailchimpFormContainerInner_<?php echo $list['id']; ?>">
65
  <form method="post" name="yks-mailchimp-form" id="yks-mailchimp-form_<?php echo $list['id']; ?>" rel="<?php echo $list['id']; ?>">
66
  <input type="hidden" name="yks-mailchimp-list-id" id="yks-mailchimp-list-id_<?php echo $list['id']; ?>" value="<?php echo $list['list-id']; ?>" />
67
+ <?php echo $this->getFrontendFormDisplay($list); ?>
 
 
 
 
 
 
 
 
 
68
  </form>
69
  </div>
70
 
yikes-inc-easy-mailchimp-extender.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Yikes, Inc Easy Mailchimp Extender
5
  Plugin URI: http://www.yikesinc.com
6
  Description: Mailchimp API integration in the form of a shortcode or php snippet
7
- Version: 1.3.1
8
  Author: Yikes, Inc
9
  Author URI: http://www.yikesinc.com
10
  License: GPL2
@@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29
  #_________________________________________________ CONSTANTS
30
  /** Configuration **/
31
  if(!defined('YKSEME_DEBUG')) define('YKSEME_DEBUG', false);
32
- if(!defined('YKSEME_VERSION_CURRENT')) define('YKSEME_VERSION_CURRENT', '1.3.1');
33
  if(!defined('YKSEME_REQ_PHP')) define('YKSEME_REQ_PHP', '5.0');
34
  if(!defined('YKSEME_AUTHOR')) define('YKSEME_AUTHOR', 'Sean Kennedy');
35
  if(!defined('YKSEME_SITE')) define('YKSEME_SITE', site_url().'/');
@@ -44,15 +44,15 @@ if(!defined('YKSEME_URL_CURRENT')) define('YKSEME_URL_CURRENT', $_SERVE
44
  /** Database Tables **/
45
  if(!defined('YKSEME_OPTION')) define('YKSEME_OPTION', YKSEME_PREFIX.'storage');
46
 
 
 
 
47
  /** Include Required Plugin Files **/
48
  require_once YKSEME_PATH.'classes/class.yksemeBase.php';
49
  require_once YKSEME_PATH.'classes/MCAPI.class.php';
50
  require_once YKSEME_PATH.'lib/lib.ajax.php';
51
  require_once YKSEME_PATH.'lib/lib.func.php';
52
 
53
- /** Initial Configuration **/
54
- if(YKSEME_DEBUG) error_reporting(E_ALL ^ E_NOTICE);
55
-
56
  /** Initialize the plugin's base class **/
57
  $yksemeBase = new yksemeBase();
58
 
4
  Plugin Name: Yikes, Inc Easy Mailchimp Extender
5
  Plugin URI: http://www.yikesinc.com
6
  Description: Mailchimp API integration in the form of a shortcode or php snippet
7
+ Version: 2.0.0
8
  Author: Yikes, Inc
9
  Author URI: http://www.yikesinc.com
10
  License: GPL2
29
  #_________________________________________________ CONSTANTS
30
  /** Configuration **/
31
  if(!defined('YKSEME_DEBUG')) define('YKSEME_DEBUG', false);
32
+ if(!defined('YKSEME_VERSION_CURRENT')) define('YKSEME_VERSION_CURRENT', '2.0.0');
33
  if(!defined('YKSEME_REQ_PHP')) define('YKSEME_REQ_PHP', '5.0');
34
  if(!defined('YKSEME_AUTHOR')) define('YKSEME_AUTHOR', 'Sean Kennedy');
35
  if(!defined('YKSEME_SITE')) define('YKSEME_SITE', site_url().'/');
44
  /** Database Tables **/
45
  if(!defined('YKSEME_OPTION')) define('YKSEME_OPTION', YKSEME_PREFIX.'storage');
46
 
47
+ /** Initial Configuration **/
48
+ if(YKSEME_DEBUG) error_reporting(E_ALL ^ E_NOTICE);
49
+
50
  /** Include Required Plugin Files **/
51
  require_once YKSEME_PATH.'classes/class.yksemeBase.php';
52
  require_once YKSEME_PATH.'classes/MCAPI.class.php';
53
  require_once YKSEME_PATH.'lib/lib.ajax.php';
54
  require_once YKSEME_PATH.'lib/lib.func.php';
55
 
 
 
 
56
  /** Initialize the plugin's base class **/
57
  $yksemeBase = new yksemeBase();
58