Easy Modal - Version 1.2

Version Description

  • Code has been rewritten from ground up, JS, admin panels etc.
  • Added animations
  • Added responsive modals
  • Added several additional settings.
Download this release

Release Info

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

Code changes from version 1.1.9.9 to 1.2

easy-modal.php CHANGED
@@ -2,34 +2,31 @@
2
  /*
3
  Plugin Name: Easy Modal
4
  Plugin URI: http://wizardinternetsolutions.com/plugins/easy-modal/
5
- Description: Easy Modal allows you to easily add just about any shortcodes or other content into a modal window. This includes forms such as CF7.
6
  Author: Wizard Internet Solutions
7
- Version: 1.1.9.9
8
  Author URI: http://wizardinternetsolutions.com
9
  */
10
- add_action('admin_init', '_disable_older_versions', 1 );
11
- function _disable_older_versions()
12
- {
13
- deactivate_plugins(array(
14
- ABSPATH.'wp-content/plugins/easy-modal-lite/easy-modal-lite.php',
15
- ABSPATH.'wp-content/plugins/easy-modal-pro/easy-modal-pro.php'
16
- ));
17
- }
18
- /* Change Begin */
 
 
 
 
 
 
19
  class Easy_Modal {
20
- var $Plugin = array(
21
- 'version' => '1.1.9.9',
22
- 'name' => 'Easy Modal',
23
- 'slug' => 'easy-modal',
24
- 'short'=> 'EasyModal'
25
- );
26
- var $api_url = 'http://wizardinternetsolutions.com/api/';
27
  public function __construct()
28
  {
29
- $this->Plugin['file'] = __FILE__;
30
- $this->Plugin['dir'] = PLUGINDIR.'/'. dirname( plugin_basename(__FILE__));
31
- $this->Plugin['url'] = trailingslashit (get_bloginfo('wpurl') ).PLUGINDIR.'/'. dirname( plugin_basename(__FILE__) );
32
-
33
 
34
  // Add WPMU Support
35
  // Add default options on new site creation.
@@ -37,44 +34,163 @@ class Easy_Modal {
37
 
38
  if (is_admin())
39
  {
40
- add_action('init', array(&$this,'_activation'),9);
41
- add_action('init', array(&$this,'_migrate'),10);
42
- register_activation_hook(__FILE__, array(&$this, '_activation'));
43
-
44
- add_action('admin_menu', array(&$this, '_menus') );
45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  add_filter( 'plugin_action_links', array(&$this, '_actionLinks') , 10, 2 );
47
  add_filter('mce_buttons_2', array(&$this, '_TinyMCEButtons'), 999);
48
  add_filter('tiny_mce_before_init', array(&$this, '_TinyMCEInit'));
 
 
 
49
  }
 
 
 
 
50
  $this->_styles_scripts();
51
- $license_status = get_option('EasyModal_License_Status');
52
- if($license_status['status']===200)
53
  {
54
- add_filter('pre_set_site_transient_update_plugins', array(&$this,'check_updates'));
55
- add_filter('plugins_api', array(&$this,'get_plugin_info'), 10, 3);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  }
57
  }
 
 
 
 
58
  public function _styles_scripts()
59
  {
60
  if (is_admin())
61
  {
62
- add_action("admin_head-toplevel_page_easy-modal",array(&$this,'_styles'));
63
- add_action("admin_head-toplevel_page_easy-modal",array(&$this,'_scripts'));
64
- add_action("admin_head-easy-modal_page_easy-modal-modals",array(&$this,'_styles'));
65
- add_action("admin_head-easy-modal_page_easy-modal-modals",array(&$this,'_scripts'));
66
- add_action("admin_head-easy-modal_page_easy-modal-themes",array(&$this,'_styles'));
67
- add_action("admin_head-easy-modal_page_easy-modal-themes",array(&$this,'_scripts'));
68
- add_action("admin_head-easy-modal_page_easy-modal-settings",array(&$this,'_styles'));
69
- add_action("admin_head-easy-modal_page_easy-modal-settings",array(&$this,'_scripts'));
70
  }
71
  else
72
  {
73
- add_action('wp_print_styles', array(&$this, '_styles') );
74
- add_action('wp_print_scripts', array(&$this, '_scripts') );
75
  }
76
  }
77
- private function _migrate_EM()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  {
79
  global $wp;
80
  $o_modal_list = get_option('EasyModal');
@@ -96,7 +212,7 @@ class Easy_Modal {
96
  delete_option('eM_version');
97
  delete_option('EasyModal');
98
  }
99
- private function _migrate_EM_Lite()
100
  {
101
  global $wp;
102
  $o_modal_list = get_option('EasyModalLite_ModalList');
@@ -132,7 +248,7 @@ class Easy_Modal {
132
  delete_option('EasyModalLite_ModalList');
133
  delete_option('EasyModalLite_ThemeList');
134
  }
135
- private function _migrate_EM_Pro()
136
  {
137
  global $wp;
138
  $o_theme_list = get_option('EasyModalPro_ModalList');
@@ -184,114 +300,83 @@ class Easy_Modal {
184
  delete_option('EasyModalPro_Version');
185
  $this->updateSettings($o_settings);
186
  }
187
- public function _activation()
188
- {
189
- if(!get_option('EasyModal_Version'))
190
- {
191
- $this->resetOptions();
192
- }
193
- update_option('EasyModal_Version', $this->Plugin['version']);
194
- }
195
- public function _migrate()
196
- {
197
- // detect EM Free
198
- if(get_option('eM_version'))
199
- {
200
- $this->_migrate_EM();
201
- }
202
- // detect EM Lite
203
- if(get_option('EasyModalLite_Version'))
204
- {
205
- $this->_migrate_EM_Lite();
206
- }
207
- // detect EM Lite
208
- if(get_option('EasyModalPro_Version'))
209
- {
210
- $this->_migrate_EM_Pro();
211
- }
212
- }
213
  public function _wpmu_activation($blog_id, $user_id, $domain, $path, $site_id, $meta)
214
  {
215
  // Make sure the user can perform this action and the request came from the correct page.
216
  switch_to_blog($blog_id);
217
- // Use a default value here if the field was not submitted.
218
- if(!get_option('EasyModal_Version'))
219
- {
220
- $this->resetOptions();
221
- }
222
- update_option('EasyModal_Version', $this->Plugin['version']);
223
  restore_current_blog();
224
  }
225
  public function resetOptions()
226
  {
227
  update_option('EasyModal_Settings', $this->defaultSettings());
228
- foreach(get_option('EasyModal_ModalList',array()) as $id => $name)
229
  {
230
  $this->deleteModal($id);
231
  }
232
- update_option('EasyModal_ModalList', array());
233
- foreach(get_option('EasyModal_ThemeList',array()) as $id => $name)
234
  {
235
- $this->deleteTheme($id);
 
236
  }
237
- update_option('EasyModal_ThemeList', array('1'=>'Black'));
238
  $theme = $this->defaultThemeSettings();
239
- $theme['name'] = 'Black';
240
- update_option('EasyModal_Theme-1', $theme);
241
  }
242
-
243
- public function _styles()
244
  {
245
- if (!is_admin())
246
- {
247
- wp_enqueue_style($this->Plugin['slug'].'-styles', $this->Plugin['url'].'/inc/css/styles.min.css');
248
- }
249
- else
250
- {
251
- wp_enqueue_style($this->Plugin['slug'].'-admin-styles', $this->Plugin['url'].'/inc/css/admin-styles.min.css');
252
- }
 
 
 
 
 
 
 
253
 
 
 
 
 
 
254
  }
255
 
256
- public function _scripts()
257
- {
258
- wp_enqueue_script('jquery');
259
- if (!is_admin())
260
- {
261
- wp_enqueue_script( 'jquery-form', $this->Plugin['url'].'/inc/js/jquery.form.js', array( 'jquery' ));
262
- wp_enqueue_script($this->Plugin['slug'].'-scripts', $this->Plugin['url'].'/inc/js/easy-modal.min.js', array('jquery'));
263
- $data = array(
264
- 'ajaxurl' => $this->Plugin['url'].'/inc/ajax/content.php',
265
- 'modals' => $this->enqueue_modals(),
266
- 'themes' => $this->enqueue_themes(),
267
- 'settings' => $this->getSettings()
268
- );
269
- $params = array(
270
- 'l10n_print_after' => 'easymodal = ' . json_encode($data) . ';'
271
- );
272
- wp_localize_script( $this->Plugin['slug'].'-scripts', 'easymodal', $params );
273
- }
274
- else
275
- {
276
- wp_enqueue_script('jquery-ui-core');
277
- wp_enqueue_script('jquery-ui-accordion');
278
- wp_enqueue_script('jquery-ui-slider');
279
- wp_enqueue_script('jquery-colorpicker', $this->Plugin['url'].'/inc/js/colorpicker.min.js', array('jquery'));
280
- wp_enqueue_script('easy-modal-admin', $this->Plugin['url'].'/inc/js/easy-modal-admin.min.js', array('jquery', 'jquery-ui-core', 'jquery-ui-slider', 'jquery-colorpicker'));
281
- }
282
  }
283
  public function _menus()
284
  {
285
- add_menu_page( 'Home', $this->Plugin['name'] , 'edit_posts', $this->Plugin['slug'], array(&$this, 'dashboard_page'),'',1000);
286
- add_submenu_page( $this->Plugin['slug'], 'Modals', 'Modals', 'edit_posts', $this->Plugin['slug'].'-modals', array(&$this, 'modal_page'));
287
- add_submenu_page( $this->Plugin['slug'], 'Theme', 'Theme', 'edit_themes', $this->Plugin['slug'].'-themes', array(&$this, 'theme_page'));
288
- add_submenu_page( $this->Plugin['slug'], 'Settings', 'Settings', 'manage_options', $this->Plugin['slug'].'-settings', array(&$this, 'settings_page'));
289
- }
 
290
  public function _actionLinks( $links, $file )
291
  {
292
  if ( $file == plugin_basename( __FILE__ ) )
293
  {
294
- $posk_links = '<a href="'.get_admin_url().'admin.php?page='.$this->Plugin['slug'].'-settings">'.__('Settings').'</a>';
 
 
295
  array_unshift( $links, $posk_links );
296
  }
297
  return $links;
@@ -308,7 +393,7 @@ class Easy_Modal {
308
  $customClasses = array();
309
  foreach($modals as $key => $modal)
310
  {
311
- $customClasses['eModal'.$modal] = 'eModal-'.$key;
312
  }
313
  // Build array
314
  $initArray['theme_advanced_styles'] = isset($initArray['theme_advanced_styles']) ? $initArray['theme_advanced_styles'] : '';
@@ -319,429 +404,547 @@ class Easy_Modal {
319
  $initArray['theme_advanced_styles'] = rtrim($initArray['theme_advanced_styles'], ';'); // Remove final semicolon from list
320
  return $initArray;
321
  }
322
-
323
- public function dashboard_page()
 
 
 
 
 
 
 
 
 
 
 
 
324
  {
325
- require_once(ABSPATH.PLUGINDIR.'/'.dirname(plugin_basename(__FILE__)).'/inc/dashboard.php');
326
  }
327
 
328
  public function settings_page()
329
  {
330
- require_once(ABSPATH.PLUGINDIR.'/'.dirname(plugin_basename(__FILE__)).'/inc/settings.php');
331
- }
332
- public function getSettings()
333
- {
334
- return get_option('EasyModal_Settings');
335
  }
336
- public function defaultSettings()
337
  {
338
- return array();
339
- }
340
- public function updateSettings( $post = NULL )
341
- {
342
- global $wp;
343
- $settings = get_option('EasyModal_Settings');
344
- if(!$settings)
345
- {
346
- $settings = $this->defaultSettings();
347
- }
348
- elseif(!is_array($settings))
349
- {
350
- $settings = unserialize($settings);
351
- }
352
- if($post)
353
  {
354
- $post = stripslashes_deep($post);
355
- extract($post);
356
- if (isset($license))
357
  {
358
- $current = get_option('EasyModal_License');
359
- if($license != $current)
360
- {
361
- $redirect = true;
362
- }
363
- update_option('EasyModal_License', $license);
364
- $license_status = $this->check_license($license);
365
- update_option('EasyModal_License_Status', $license_status);
366
- if($license_status['status']===200)
367
- {
368
- update_option('EasyModal_License_LastChecked', strtotime(date("Y-m-d H:i:s")));
369
- delete_option('_site_transient_update_plugins');
370
- }
371
- }
372
- if (isset($autoOpen))
373
- {
374
- $settings['autoOpen'] = $autoOpen;
375
-
376
  }
377
- else
378
- {
379
- $settings['autoOpen'] = 'false';
380
- }
381
- if (isset($autoOpenId))
382
- {
383
- $settings['autoOpenDelay'] = $autoOpenDelay;
384
- }
385
- if (isset($autoOpenId))
386
- {
387
- $settings['autoOpenId'] = $autoOpenId;
388
- }
389
- if (isset($exitOpen))
390
- {
391
- $settings['exitOpen'] = $exitOpen;
392
- }
393
- if (isset($exitOpenId))
394
  {
395
- $settings['exitOpenId'] = $exitOpenId;
 
 
 
 
 
396
  }
397
  }
398
- update_option('EasyModal_Settings', $settings);
399
- if(!empty($redirect) && $redirect == true)
400
  {
401
- wp_redirect('admin.php?page='.$this->Plugin['slug'].'-settings',302);
402
- exit;
 
 
 
 
 
403
  }
404
- return $settings;
405
  }
406
-
407
- /* Modal Functions */
408
- public function modal_page()
 
 
 
409
  {
410
- require_once(ABSPATH.PLUGINDIR.'/'.dirname(plugin_basename(__FILE__)).'/inc/modals.php');
411
  }
 
412
  public function getModalList()
413
  {
414
  return get_option('EasyModal_ModalList',array());
415
  }
416
- public function getModalSettings($modal_id)
417
  {
418
- return get_option('EasyModal_Modal-'.$modal_id);
419
  }
420
- public function defaultModalSettings()
 
421
  {
422
- return array(
423
- 'name' => 'change_me',
424
- 'title' => '',
425
- 'content' => '',
426
- 'cf7form' => false,
427
- 'gravityform' => false,
428
- 'theme' => 1,
429
- 'userMaxHeight' => 0,
430
- 'userHeight' => 0,
431
- 'userMaxWidth' => 0,
432
- 'userWidth' => 0,
433
- 'overlayClose' => 'false',
434
- 'overlayEscClose' => 'false',
435
- );
436
  }
437
- public function updateModalSettings( $modal_id, $post = NULL )
438
  {
439
- global $wp;
440
- $modals = get_option('EasyModal_ModalList',array());
441
- if($modal_id == 'new')
442
  {
443
- $highest = 0;
444
- foreach($modals as $id => $name)
445
- {
446
- if($id > $highest) $highest = $id;
447
- }
448
- $modal_id = $highest+1;
449
  }
450
- if(array_key_exists($modal_id, $modals))
 
 
 
451
  {
452
- $settings = get_option( 'EasyModal_Modal-'.$modal_id);
453
  }
454
  else
455
  {
456
- $settings = $this->defaultModalSettings();
457
  }
458
- $settings['modal_id'] = $modal_id;
459
- if($post)
 
 
460
  {
461
- $post = stripslashes_deep($post);
462
- extract($post);
463
- if (isset($name))
464
- {
465
- $settings['name'] = $name;
466
- }
467
- if (isset($title))
468
  {
469
- $settings['title'] = apply_filters('content_save_pre', $title);
 
470
  }
471
- if (isset($content))
472
  {
473
- if(strstr($content,'[contact-form')!= NULL){ $settings['cf7form'] = true; }
474
- else { $settings['cf7form'] = false; }
475
- $settings['content'] = $content;
476
- }
477
- if (isset($content))
478
- {
479
- if(strstr($content,'[gravityform')!= NULL){ $settings['gravityform'] = true; }
480
- else { $settings['gravityform'] = false; }
481
- $settings['content'] = $content;
482
- }
483
- if (isset($userMaxHeight)){
484
- $settings['userMaxHeight'] = $userMaxHeight;
485
  }
486
- if (isset($userHeight))
487
- {
488
- $settings['userHeight'] = $userHeight;
489
- }
490
- if (isset($userMaxWidth))
491
- {
492
- $settings['userMaxWidth'] = $userMaxWidth;
493
- }
494
- if (isset($userWidth))
495
- {
496
- $settings['userWidth'] = $userWidth;
497
- }
498
- if (isset($overlayClose))
 
 
 
 
 
 
 
499
  {
500
- $settings['overlayClose'] = $overlayClose;
 
 
 
 
 
501
  }
502
- else
 
 
 
 
 
 
 
 
 
503
  {
504
- $settings['overlayClose'] = 'false';
 
 
 
 
505
  }
506
- if (isset($overlayEscClose))
 
 
 
 
 
 
 
 
 
507
  {
508
- $settings['overlayEscClose'] = $overlayEscClose;
 
 
 
 
 
 
 
 
 
509
  }
510
- else
 
 
 
 
 
 
 
 
 
511
  {
512
- $settings['overlayEscClose'] = 'false';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
513
  }
 
514
  }
515
- $modals[$modal_id] = $settings['name'];
516
  update_option('EasyModal_ModalList', $modals);
517
  update_option('EasyModal_Modal-'.$modal_id, $settings);
 
518
  return $settings;
519
  }
520
- public function deleteModal( $modal_id )
521
  {
522
- $modals = get_option('EasyModal_ModalList',array());
523
- unset($modals[$modal_id]);
524
- update_option('EasyModal_ModalList', $modals);
525
- delete_option('EasyModal_Modal-'.$modal_id);
526
- }
527
- public function enqueue_modals()
528
- {
529
- $modals = $this->getModalList();
530
- $settings = array();
531
- $setting = $this->getModalSettings('Link');
532
- $settings['Link'] = array(
533
- "requestData" => array(
534
- "modalId" => 'Link'
535
- ),
536
- "theme" => '1',
537
- "type" => 'Link'
538
- );
539
- foreach($modals as $key => $value)
540
  {
541
- $setting = $this->getModalSettings($key);
542
- $setting["requestData"] = array('modalId' => $key);
543
- $settings[$key] = $setting;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
544
  }
 
 
545
  return $settings;
546
  }
547
- /* Theme Functions */
548
- public function theme_page()
549
 
 
550
  {
551
- require_once(ABSPATH.PLUGINDIR.'/'.dirname(plugin_basename(__FILE__)).'/inc/themes.php');
552
- }
553
- public function getThemeList()
554
- {
555
- return get_option('EasyModal_ThemeList');
556
  }
557
- public function getThemeSettings($theme_id)
558
  {
559
- return get_option('EasyModal_Theme-'.$theme_id);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
560
  }
561
  public function defaultThemeSettings()
562
  {
563
  return array(
564
  'name' => 'change_me',
565
- 'overlayColor' => '#000000',
566
- 'overlayOpacity' => '75',
567
- 'containerBgColor' => '#000000',
 
 
568
  'containerPadding' => '10',
569
- 'containerBorderColor' => '#ffffff',
570
  'containerBorderStyle' => 'solid',
571
- 'containerBorderWidth' => '3',
572
- 'containerBorderRadius' => '20',
 
 
573
  'closeBgColor' => '#000000',
574
- 'closeFontColor' => '#ffffff',
575
  'closeFontSize' => '15',
576
  'closeBorderRadius' => '10',
577
  'closeSize' => '20',
 
578
  'closePosition' => 'topright',
579
- 'contentTitleFontColor' => '#ffffff',
 
580
  'contentTitleFontSize' => '32',
581
  'contentTitleFontFamily' => 'Tahoma',
582
- 'contentFontColor' => '#ffffff'
583
  );
584
  }
585
- public function updateThemeSettings( $theme_id, $post = NULL )
 
586
  {
587
- global $wp;
588
- $themes = get_option('EasyModal_ThemeList');
589
- if($theme_id == 'new')
590
- {
591
- $highest = 0;
592
- foreach($themes as $id => $name)
593
- {
594
- if($id > $highest) $highest = $id;
595
- }
596
- $theme_id = $highest+1;
597
- }
598
- if(array_key_exists($theme_id, $themes))
599
- {
600
- $settings = get_option( 'EasyModal_Theme-'.$theme_id);
601
- }
602
- else
603
  {
604
- $settings = $this->defaultThemeSettings();
 
 
605
  }
606
- if($post)
 
 
 
 
 
 
607
  {
608
- $post = stripslashes_deep($post);
609
- extract($post);
610
- $settings['theme_id'] = $theme_id;
611
- if (isset($name))
612
  {
613
- $settings['name'] = $name;
614
- }
615
- if (isset($overlayColor) && preg_match('/^#[a-f0-9]{6}$/i', $overlayColor))
616
- {
617
- $settings['overlayColor'] = $overlayColor;
618
- }
619
- if (isset($overlayOpacity) && $overlayOpacity >= 0 && $overlayOpacity <= 100){
620
- $settings['overlayOpacity'] = $overlayOpacity;
621
  }
622
- if (isset($containerBgColor) && preg_match('/^#[a-f0-9]{6}$/i', $containerBgColor))
623
  {
624
- $settings['containerBgColor'] = $containerBgColor;
625
  }
626
- if (isset($containerPadding))
627
- {
628
- $settings['containerPadding'] = $containerPadding;
629
- }
630
- if (isset($containerBorderColor) && preg_match('/^#[a-f0-9]{6}$/i', $containerBorderColor))
631
- {
632
- $settings['containerBorderColor'] = $containerBorderColor;
633
- }
634
- if (isset($containerBorderStyle))
635
- {
636
- $settings['containerBorderStyle'] = $containerBorderStyle;
637
- }
638
- if (isset($containerBorderWidth))
639
- {
640
- $settings['containerBorderWidth'] = $containerBorderWidth;
641
- }
642
- if (isset($containerBorderRadius))
643
- {
644
- $settings['containerBorderRadius'] = $containerBorderRadius;
645
- }
646
- if (isset($closeBgColor) && preg_match('/^#[a-f0-9]{6}$/i', $closeBgColor))
647
- {
648
- $settings['closeBgColor'] = $closeBgColor;
649
- }
650
- if (isset($closeFontColor) && preg_match('/^#[a-f0-9]{6}$/i', $closeFontColor))
651
- {
652
- $settings['closeFontColor'] = $closeFontColor;
653
- }
654
- if (isset($closeFontSize))
655
- {
656
- $settings['closeFontSize'] = $closeFontSize;
657
- }
658
- if (isset($closeBorderRadius))
659
- {
660
- $settings['closeBorderRadius'] = $closeBorderRadius;
661
- }
662
- if (isset($closeSize))
663
- {
664
- $settings['closeSize'] = $closeSize;
665
- }
666
- if (isset($closePosition))
667
- {
668
- $settings['closePosition'] = $closePosition;
669
- }
670
- if (isset($contentTitleFontColor) && preg_match('/^#[a-f0-9]{6}$/i', $contentTitleFontColor))
671
- {
672
- $settings['contentTitleFontColor'] = $contentTitleFontColor;
673
- }
674
- if (isset($contentTitleFontSize))
675
- {
676
- $settings['contentTitleFontSize'] = $contentTitleFontSize;
677
- }
678
- if (isset($contentTitleFontFamily))
679
  {
680
- $settings['contentTitleFontFamily'] = $contentTitleFontFamily;
681
  }
682
- if (isset($contentFontColor) && preg_match('/^#[a-f0-9]{6}$/i', $contentFontColor))
683
  {
684
- $settings['contentFontColor'] = $contentFontColor;
685
  }
 
686
  }
687
- $themes[$theme_id] = $settings['name'];
688
- update_option('EasyModal_ThemeList', $themes);
689
- update_option('EasyModal_Theme-'.$theme_id, $settings);
690
- return $settings;
691
- }
692
- public function deleteTheme( $theme_id )
693
- {
694
- $themes = $this->getThemeList();
695
- unset($themes[$theme_id]);
696
- update_option('EasyModal_ThemeList', $themes);
697
- delete_option('EasyModal_Theme-'.$theme_id);
698
  }
699
  public function enqueue_themes()
700
  {
 
 
701
 
702
- $settings = array(
703
- 1 => $this->getThemeSettings(1)
 
 
 
 
 
 
 
 
 
704
  );
705
- return $settings;
 
 
 
 
 
 
 
 
 
706
  }
707
 
708
-
709
- public function check_license()
710
  {
711
- $args = new stdClass;
712
- $args->slug = $this->Plugin['slug'];
713
- $args->version = $this->Plugin['version'];
714
- $request_string = $this->uopdate_request('license_check', $args);
715
- $request = wp_remote_post($this->api_url, $request_string);
716
- if (is_wp_error($request))
717
  {
718
- $res = new WP_Error('plugins_api_failed', __('An Unexpected HTTP Error occurred during the API request.</p> <p><a href="?" onclick="document.location.reload(); return false;">Try again</a>'), $request->get_error_message());
 
719
  }
720
- else
 
 
 
 
 
 
 
721
  {
722
- $res = unserialize($request['body']);
723
- if ($res === false)
724
- {
725
- $res = new WP_Error('plugins_api_failed', __('An unknown error occurred'), $request['body']);
726
- }
727
  }
728
- return $res;
729
  }
730
- public function uopdate_request($action, $args)
 
731
  {
732
  global $wp_version;
733
  return array(
734
  'body' => array(
735
- 'action' => $action,
736
- 'request' => serialize($args),
 
 
737
  'domain' => get_bloginfo('url'),
738
- 'api_key' => md5(get_bloginfo('url')),
739
  'license' => get_option('EasyModal_License'),
740
  'wp_version'=> $wp_version
741
  ),
742
  'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo('url')
743
  );
744
  }
 
 
 
 
 
 
 
 
745
  // Activated With Valid License
746
  public function check_updates($checked_data)
747
  {
@@ -749,57 +952,64 @@ class Easy_Modal {
749
  {
750
  return $checked_data;
751
  }
752
- $request_args = array(
753
- 'slug' => $this->Plugin['slug'],
754
- 'version' => $checked_data->checked[$this->Plugin['slug'] .'/'. $this->Plugin['slug'] .'.php'],
755
- );
756
- $request_string = $this->uopdate_request('basic_check', $request_args);
757
- // Start checking for an update
758
- $raw_response = wp_remote_post($this->api_url, $request_string);
759
- if (!is_wp_error($raw_response) && ($raw_response['response']['code'] == 200))
760
  {
761
- $response = unserialize($raw_response['body']);
762
  }
763
- if (is_object($response) && !empty($response)) // Feed the update data into WP updater
764
  {
765
- $checked_data->response[$this->Plugin['slug'] .'/'. $this->Plugin['slug'] .'.php'] = $response;
766
  }
767
  return $checked_data;
768
  }
769
  public function get_plugin_info($def, $action, $args)
770
  {
771
- if (empty($args->slug) || $args->slug != $this->Plugin['slug'])
772
  {
773
  return false;
774
  }
775
- // Get the current version
776
- $plugin_info = get_site_transient('update_plugins');
777
- $current_version = $plugin_info->checked[$this->Plugin['slug'] .'/'. $this->Plugin['slug'] .'.php'];
778
- $args->version = $current_version;
779
- $request_string = $this->uopdate_request($action, $args);
780
  $request = wp_remote_post($this->api_url, $request_string);
781
  if (is_wp_error($request))
782
  {
783
- $res = new WP_Error('plugins_api_failed', __('An Unexpected HTTP Error occurred during the API request.</p> <p><a href="?" onclick="document.location.reload(); return false;">Try again</a>'), $request->get_error_message());
784
  }
785
  else
786
  {
787
- $res = unserialize($request['body']);
788
- if ($res === false)
789
  {
790
- $res = new WP_Error('plugins_api_failed', __('An unknown error occurred'), $request['body']);
791
  }
792
  }
793
- return $res;
794
  }
795
  }
796
- $license_status = get_option('EasyModal_License_Status');
797
- if(file_exists(ABSPATH.PLUGINDIR.'/'.dirname(plugin_basename(__FILE__)).'/easy-modal-pro.php') && isset($license_status['status']) && $license_status['status']===200)
798
  {
799
- include(ABSPATH.PLUGINDIR.'/'.dirname(plugin_basename(__FILE__)).'/easy-modal-pro.php');
800
- $EM = new Easy_Modal_Pro;
 
 
 
 
801
  }
802
- else
803
  {
804
  $EM = new Easy_Modal;
 
 
 
 
 
 
 
 
 
805
  }
2
  /*
3
  Plugin Name: Easy Modal
4
  Plugin URI: http://wizardinternetsolutions.com/plugins/easy-modal/
5
+ Description: Easily create & style modals with any content. Theme editor to quickly style your modals. Add forms, social media boxes, videos & more.
6
  Author: Wizard Internet Solutions
7
+ Version: 1.2
8
  Author URI: http://wizardinternetsolutions.com
9
  */
10
+ if (!defined('EASYMODAL'))
11
+ define('EASYMODAL', 'Easy Modal');
12
+
13
+ if (!defined('EASYMODAL_SLUG'))
14
+ define('EASYMODAL_SLUG', trim(dirname(plugin_basename(__FILE__)), '/'));
15
+
16
+ if (!defined('EASYMODAL_DIR'))
17
+ define('EASYMODAL_DIR', WP_PLUGIN_DIR . '/' . EASYMODAL_SLUG);
18
+
19
+ if (!defined('EASYMODAL_URL'))
20
+ define('EASYMODAL_URL', WP_PLUGIN_URL . '/' . EASYMODAL_SLUG);
21
+
22
+ if (!defined('EASYMODAL_VERSION'))
23
+ define('EASYMODAL_VERSION', '1.2' );
24
+
25
  class Easy_Modal {
26
+ protected $api_url = 'http://easy-modal.com/api';
27
+ protected $messages = array();
 
 
 
 
 
28
  public function __construct()
29
  {
 
 
 
 
30
 
31
  // Add WPMU Support
32
  // Add default options on new site creation.
34
 
35
  if (is_admin())
36
  {
37
+ add_action('admin_init', array(&$this,'_migrate'),1);
38
+ add_action('admin_init', array(&$this,'_messages'),10);
39
+
 
 
40
 
41
+ add_action('admin_init', array(&$this,'process_get'),9);
42
+
43
+ if(!empty($_POST['em_settings']) && in_array($_POST['em_settings'],array('settings','modal','theme')))
44
+ {
45
+ add_action('init', array(&$this,'process_post'),9);
46
+ }
47
+ register_activation_hook(__FILE__, array(&$this, '_migrate'));
48
+ add_action('admin_menu', array(&$this, '_menus') );
49
+ if(isset($_GET['pages']) && $_GET['pages'] == 'easy-modal')
50
+ {
51
+ add_action('admin_init', array(&$this,'editor_admin_init'));
52
+ add_action('admin_head', array(&$this,'editor_admin_head'));
53
+ }
54
  add_filter( 'plugin_action_links', array(&$this, '_actionLinks') , 10, 2 );
55
  add_filter('mce_buttons_2', array(&$this, '_TinyMCEButtons'), 999);
56
  add_filter('tiny_mce_before_init', array(&$this, '_TinyMCEInit'));
57
+
58
+ add_action( 'load-post.php', array(&$this, 'post_meta_boxes_setup'));
59
+ add_action( 'load-post-new.php', array(&$this, 'post_meta_boxes_setup') );
60
  }
61
+ else
62
+ {
63
+ add_action('wp_footer', array(&$this, 'preload_modals'),1000);
64
+ }
65
  $this->_styles_scripts();
66
+ $all_options = wp_load_alloptions();
67
+ if(array_key_exists('EasyModal_License_Status', $all_options) && $license_status = get_option('EasyModal_License_Status'))
68
  {
69
+ if(is_array($license_status) && in_array($license_status['status'], array(2000,2001,3002,3003)))
70
+ {
71
+ add_filter('update_plugins', array(&$this,'check_updates'));
72
+ add_filter('pre_set_site_transient_update_plugins', array(&$this,'check_updates'));
73
+ add_filter('plugins_api', array(&$this,'get_plugin_info'), 10, 3);
74
+ }
75
+ }
76
+ }
77
+ public function admin_footer()
78
+ {
79
+ require $this->load_view('admin_footer');
80
+ }
81
+ public function _messages()
82
+ {
83
+ $this->messages = $this->get_messages();
84
+ }
85
+ public function post_meta_boxes_setup()
86
+ {
87
+ add_action( 'add_meta_boxes', array(&$this, 'post_meta_boxes') );
88
+ add_action( 'save_post', array(&$this, 'save_easy_modal_post_modals'), 10, 2 );
89
+ }
90
+ public function easy_modal_post_modals( $object, $box )
91
+ {
92
+ $current_modals = get_post_meta( $object->ID, 'easy_modal_post_modals', true );
93
+ $modals = $this->getModalList();
94
+ require EASYMODAL_DIR.'/inc/views/metaboxes.php';
95
+ }
96
+ public function save_easy_modal_post_modals( $post_id, $post )
97
+ {
98
+
99
+ /* Verify the nonce before proceeding. */
100
+ if ( !isset( $_POST['safe_csrf_nonce_easy_modal'] ) || !wp_verify_nonce( $_POST['safe_csrf_nonce_easy_modal'], "safe_csrf_nonce_easy_modal" ) )
101
+ return $post_id;
102
+ $post_type = get_post_type_object( $post->post_type );
103
+ if ( !current_user_can( $post_type->cap->edit_post, $post_id ) )
104
+ return $post_id;
105
+
106
+ $post_modals = ( !empty( $_POST['easy_modal_post_modals']) && $this->all_numeric($_POST['easy_modal_post_modals']) ) ? $_POST['easy_modal_post_modals'] : array() ;
107
+
108
+ $current_post_modals = get_post_meta( $post_id, 'easy_modal_post_modals', true );
109
+ if ( $post_modals && '' == $current_post_modals )
110
+ add_post_meta( $post_id, 'easy_modal_post_modals', $post_modals, true );
111
+ elseif ( $post_modals && $post_modals != $current_post_modals )
112
+ update_post_meta( $post_id, 'easy_modal_post_modals', $post_modals );
113
+ elseif ( '' == $post_modals && $current_post_modals )
114
+ delete_post_meta( $post_id, 'easy_modal_post_modals' );
115
+ }
116
+ public function post_meta_boxes()
117
+ {
118
+ $screens = array('post','page');
119
+ foreach($screens as $screen)
120
+ {
121
+ add_meta_box(
122
+ 'easy-modal', // Unique ID
123
+ esc_html__( 'Easy Modal', 'easy-modal' ), // Title
124
+ array(&$this,'easy_modal_post_modals'), // Callback function
125
+ $screen // Admin page (or post type)
126
+ //'side', // Context
127
+ //'default' // Priority
128
+ );
129
  }
130
  }
131
+ public function editor_admin_head()
132
+ {
133
+ wp_tiny_mce();
134
+ }
135
  public function _styles_scripts()
136
  {
137
  if (is_admin())
138
  {
139
+ add_action("admin_head-toplevel_page_easy-modal",array(&$this,'admin_styles'));
140
+ add_action("admin_head-toplevel_page_easy-modal",array(&$this,'admin_scripts'));
141
+ add_action("admin_head-easy-modal_page_easy-modal-themes",array(&$this,'admin_styles'));
142
+ add_action("admin_head-easy-modal_page_easy-modal-themes",array(&$this,'admin_scripts'));
143
+ add_action("admin_head-easy-modal_page_easy-modal-settings",array(&$this,'admin_styles'));
144
+ add_action("admin_head-easy-modal_page_easy-modal-settings",array(&$this,'admin_scripts'));
145
+ add_action("admin_head-easy-modal_page_easy-modal-help",array(&$this,'admin_styles'));
146
+ add_action("admin_head-easy-modal_page_easy-modal-help",array(&$this,'admin_scripts'));
147
  }
148
  else
149
  {
150
+ add_action('wp_print_styles', array(&$this, 'styles') );
151
+ add_action('wp_print_scripts', array(&$this, 'scripts') );
152
  }
153
  }
154
+ public function _migrate()
155
+ {
156
+ $all_options = wp_load_alloptions();
157
+ if(!array_key_exists('EasyModal_Version', $all_options))
158
+ {
159
+ $this->resetOptions();
160
+ }
161
+ else
162
+ {
163
+ $current_version = get_option('EasyModal_Version');
164
+ if($current_version == '1.1.9.9')
165
+ {
166
+ foreach($this->getModalList() as $key => $name)
167
+ {
168
+ $modal = $this->getModalSettings($key);
169
+ $modal['sitewide'] = true;
170
+ $modal['overlayClose'] = $modal['overlayClose'] == 'true' ? true : false;
171
+ $modal['overlayEscClose'] = $modal['overlayEscClose'] == 'true' ? true : false;
172
+ //$this->updateModalSettings($key, $modal);
173
+ }
174
+ }
175
+ }
176
+ // detect EM Free
177
+ if(array_key_exists('eM_version', $all_options))
178
+ {
179
+ $this->_migrate_EM();
180
+ }
181
+ // detect EM Lite
182
+ if(array_key_exists('EasyModalLite_Version', $all_options))
183
+ {
184
+ $this->_migrate_EM_Lite();
185
+ }
186
+ // detect EM Lite
187
+ if(array_key_exists('EasyModalPro_Version', $all_options))
188
+ {
189
+ $this->_migrate_EM_Pro();
190
+ }
191
+ update_option('EasyModal_Version', EASYMODAL_VERSION);
192
+ }
193
+ protected function _migrate_EM()
194
  {
195
  global $wp;
196
  $o_modal_list = get_option('EasyModal');
212
  delete_option('eM_version');
213
  delete_option('EasyModal');
214
  }
215
+ protected function _migrate_EM_Lite()
216
  {
217
  global $wp;
218
  $o_modal_list = get_option('EasyModalLite_ModalList');
248
  delete_option('EasyModalLite_ModalList');
249
  delete_option('EasyModalLite_ThemeList');
250
  }
251
+ protected function _migrate_EM_Pro()
252
  {
253
  global $wp;
254
  $o_theme_list = get_option('EasyModalPro_ModalList');
300
  delete_option('EasyModalPro_Version');
301
  $this->updateSettings($o_settings);
302
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
303
  public function _wpmu_activation($blog_id, $user_id, $domain, $path, $site_id, $meta)
304
  {
305
  // Make sure the user can perform this action and the request came from the correct page.
306
  switch_to_blog($blog_id);
307
+ $this->_migrate();
 
 
 
 
 
308
  restore_current_blog();
309
  }
310
  public function resetOptions()
311
  {
312
  update_option('EasyModal_Settings', $this->defaultSettings());
313
+ foreach($this->getModalList() as $id => $name)
314
  {
315
  $this->deleteModal($id);
316
  }
317
+ foreach($this->getThemeList() as $id => $name)
 
318
  {
319
+ if($id != 1)
320
+ $this->deleteTheme($id);
321
  }
 
322
  $theme = $this->defaultThemeSettings();
323
+ $theme['name'] = '2013 Theme';
324
+ $this->updateThemeSettings(1, $theme);
325
  }
326
+ public function styles()
 
327
  {
328
+ wp_register_style(EASYMODAL_SLUG.'-styles',EASYMODAL_URL.'/inc/css/easy-modal.min.css',false,0.1);
329
+ wp_enqueue_style(EASYMODAL_SLUG.'-styles');
330
+ }
331
+ public function scripts()
332
+ {
333
+ wp_enqueue_script(EASYMODAL_SLUG.'-scripts', EASYMODAL_URL.'/inc/js/easy-modal.min.js', array('jquery'));
334
+ $data = array(
335
+ 'modals' => $this->enqueue_modals(),
336
+ 'themes' => $this->enqueue_themes()
337
+ );
338
+ $params = array(
339
+ 'l10n_print_after' => 'easymodal = ' . json_encode($data) . ';'
340
+ );
341
+ wp_localize_script( EASYMODAL_SLUG.'-scripts', 'easymodal', $params );
342
+ }
343
 
344
+ public function admin_styles()
345
+ {
346
+ $this->styles();
347
+ wp_register_style(EASYMODAL_SLUG.'-admin-styles',EASYMODAL_URL.'/inc/css/easy-modal-admin.min.css',false,0.1);
348
+ wp_enqueue_style(EASYMODAL_SLUG.'-admin-styles');
349
  }
350
 
351
+ public function admin_scripts()
352
+ {
353
+ wp_enqueue_script('word-count');
354
+ wp_enqueue_script('post');
355
+ wp_enqueue_script('editor');
356
+ wp_enqueue_script('media-upload');
357
+ wp_enqueue_script('jquery-ui-core');
358
+ wp_enqueue_script('jquery-ui-accordion');
359
+ wp_enqueue_script('jquery-ui-slider');
360
+ wp_enqueue_script('jquery-colorpicker', EASYMODAL_URL.'/inc/js/colorpicker.min.js', array('jquery'));
361
+ wp_enqueue_script('easy-modal-admin', EASYMODAL_URL.'/inc/js/easy-modal-admin.min.js', array('jquery', 'jquery-ui-core', 'jquery-ui-slider', 'jquery-colorpicker'));
362
+ add_action('admin_print_footer_scripts', array(&$this,'admin_footer'),1000);
363
+
 
 
 
 
 
 
 
 
 
 
 
 
 
364
  }
365
  public function _menus()
366
  {
367
+ add_menu_page( EASYMODAL, EASYMODAL, 'edit_posts', EASYMODAL_SLUG, array(&$this, 'modal_page'),EASYMODAL_URL.'/inc/images/admin/dashboard-icon.png',1000);
368
+ add_submenu_page( EASYMODAL_SLUG, 'Modals', 'Modals', 'edit_posts', EASYMODAL_SLUG, array(&$this, 'modal_page'));
369
+ add_submenu_page( EASYMODAL_SLUG, 'Theme', 'Theme', 'edit_themes', EASYMODAL_SLUG.'-themes', array(&$this, 'theme_page'));
370
+ add_submenu_page( EASYMODAL_SLUG, 'Settings', 'Settings', 'manage_options', EASYMODAL_SLUG.'-settings', array(&$this, 'settings_page'));
371
+ add_submenu_page( EASYMODAL_SLUG, 'Help', 'Help', 'edit_posts', EASYMODAL_SLUG.'-help', array(&$this, 'help_page'));
372
+ }
373
  public function _actionLinks( $links, $file )
374
  {
375
  if ( $file == plugin_basename( __FILE__ ) )
376
  {
377
+ $posk_links = '<a href="'.get_admin_url().'admin.php?page='.EASYMODAL_SLUG.'-settings">'.__('Settings').'</a>';
378
+ array_unshift( $links, $posk_links );
379
+ $posk_links = '<a href="http://wizardinternetsolutions.com/plugins/easy-modal?utm_source=em-lite&utm_medium=dashboard+link&utm_campaign=upgrade">'.__('Upgrade').'</a>';
380
  array_unshift( $links, $posk_links );
381
  }
382
  return $links;
393
  $customClasses = array();
394
  foreach($modals as $key => $modal)
395
  {
396
+ $customClasses['Modal - '.$modal] = 'eModal-'.$key;
397
  }
398
  // Build array
399
  $initArray['theme_advanced_styles'] = isset($initArray['theme_advanced_styles']) ? $initArray['theme_advanced_styles'] : '';
404
  $initArray['theme_advanced_styles'] = rtrim($initArray['theme_advanced_styles'], ';'); // Remove final semicolon from list
405
  return $initArray;
406
  }
407
+ private $_accepted_modal_ids = array('new');
408
+ protected $views = array(
409
+ 'admin_footer' => '/inc/views/admin_footer.php',
410
+ 'help' => '/inc/views/help.php',
411
+ 'metaboxes' => '/inc/views/metaboxes.php',
412
+ 'modal' => '/inc/views/modal.php',
413
+ 'modal_delete' => '/inc/views/modal_delete.php',
414
+ 'modal_list' => '/inc/views/modal_list.php',
415
+ 'modal_settings' => '/inc/views/modal_settings.php',
416
+ 'settings' => '/inc/views/settings.php',
417
+ 'sidebar' => '/inc/views/sidebar.php',
418
+ 'theme_settings' => '/inc/views/theme_settings.php',
419
+ );
420
+ public function load_view($view = NULL)
421
  {
422
+ if($view) return EASYMODAL_DIR.$this->views[$view];
423
  }
424
 
425
  public function settings_page()
426
  {
427
+ require $this->load_view('settings');
 
 
 
 
428
  }
429
+ public function process_get()
430
  {
431
+ $modal_id = isset($_GET['modal_id']) ? $_GET['modal_id'] : NULL;
432
+ if($modal_id>0 && isset($_GET['action']) && wp_verify_nonce($_GET['safe_csrf_nonce_easy_modal'], "safe_csrf_nonce_easy_modal"))
 
 
 
 
 
 
 
 
 
 
 
 
 
433
  {
434
+ switch($_GET['action'])
 
 
435
  {
436
+ case 'delete':
437
+ if(!empty($_GET['confirm']))
438
+ {
439
+ $this->deleteModal($modal_id);
440
+ wp_redirect('admin.php?page='.EASYMODAL_SLUG,302);
441
+ }
442
+ break;
443
+ case 'clone':
444
+ $settings = $this->updateModalSettings('clone', $this->getModalSettings( $modal_id ), true);
445
+ wp_redirect('admin.php?page='.EASYMODAL_SLUG.'&modal_id='.$settings['id'],302);
446
+ break;
 
 
 
 
 
 
 
447
  }
448
+ }
449
+ }
450
+
451
+ public function modal_page()
452
+ {
453
+
454
+
455
+ $modal_id = isset($_GET['modal_id']) ? $_GET['modal_id'] : NULL;
456
+ if($modal_id>0 && isset($_GET['action']) && wp_verify_nonce($_GET['safe_csrf_nonce_easy_modal'], "safe_csrf_nonce_easy_modal"))
457
+ {
458
+ switch($_GET['action'])
 
 
 
 
 
 
459
  {
460
+ case 'delete':
461
+ if(empty($_GET['confirm']))
462
+ {
463
+ require $this->load_view('modal_delete');
464
+ }
465
+ break;
466
  }
467
  }
468
+ elseif(in_array($modal_id, $this->_accepted_modal_ids) || $modal_id>0)
 
469
  {
470
+ $settings = $this->getModalSettings($modal_id);
471
+ require $this->load_view('modal_settings');
472
+ }
473
+ else
474
+ {
475
+ $modals = $this->getModalList();
476
+ require $this->load_view('modal_list');
477
  }
 
478
  }
479
+ public function theme_page()
480
+ {
481
+ $settings = $this->getThemeSettings(1);
482
+ require $this->load_view('theme_settings');
483
+ }
484
+ public function help_page()
485
  {
486
+ require $this->load_view('help');
487
  }
488
+
489
  public function getModalList()
490
  {
491
  return get_option('EasyModal_ModalList',array());
492
  }
493
+ public function getThemeList()
494
  {
495
+ return get_option('EasyModal_ThemeList',array());
496
  }
497
+
498
+ public function getSettings()
499
  {
500
+ if($settings = get_option('EasyModal_Settings'))
501
+ {
502
+ return $this->merge_existing($this->defaultSettings(), $settings);
503
+ }
504
+ else
505
+ {
506
+ return $this->defaultSettings();
507
+ }
 
 
 
 
 
 
508
  }
509
+ public function getModalSettings($modal_id)
510
  {
511
+ if($modal = get_option('EasyModal_Modal-'.$modal_id))
 
 
512
  {
513
+ return $this->merge_existing($this->defaultModalSettings(), $modal);
514
+ }
515
+ else
516
+ {
517
+ return $this->defaultModalSettings();
 
518
  }
519
+ }
520
+ public function getThemeSettings($theme_id = 1)
521
+ {
522
+ if($theme = get_option('EasyModal_Theme-1'))
523
  {
524
+ return $this->merge_existing($this->defaultThemeSettings(), $theme);
525
  }
526
  else
527
  {
528
+ return $this->defaultThemeSettings();
529
  }
530
+ }
531
+ public function process_license($key)
532
+ {
533
+ if(!empty($key) && $key != get_option('EasyModal_License'))
534
  {
535
+ update_option('EasyModal_License', $key);
536
+ $license_status = $this->check_license($key);
537
+ if(is_array($license_status) && in_array($license_status['status'], array(3004,3006)))
 
 
 
 
538
  {
539
+ $this->activate_domain();
540
+ $license_status = $this->check_license($key);
541
  }
542
+ if(is_array($license_status) && in_array($license_status['status'], array(2000,2001,3002,3003)))
543
  {
544
+ // Force Update Check
545
+ delete_option('_site_transient_update_plugins');
 
 
 
 
 
 
 
 
 
 
546
  }
547
+ update_option('EasyModal_License_Status', $license_status);
548
+ update_option('EasyModal_License_LastChecked', strtotime(date("Y-m-d H:i:s")));
549
+ return true;
550
+ }
551
+ elseif(empty($key))
552
+ {
553
+ delete_option('EasyModal_License');
554
+ delete_option('EasyModal_License_Status');
555
+ delete_option('EasyModal_License_LastChecked');
556
+ return true;
557
+ }
558
+ return false;
559
+ }
560
+ public function process_post()
561
+ {
562
+ if(wp_verify_nonce($_POST['safe_csrf_nonce_easy_modal'], "safe_csrf_nonce_easy_modal"))
563
+ {
564
+ unset($_POST['safe_csrf_nonce_easy_modal']);
565
+ $post = stripslashes_deep($_POST);
566
+ switch($post['em_settings'])
567
  {
568
+ case 'settings': $this->updateSettings($post);
569
+ break;
570
+ case 'modal': $this->updateModalSettings(isset($_GET['modal_id']) ? $_GET['modal_id'] : NULL, $post, $_GET['modal_id'] == 'new' ? true : false);
571
+ break;
572
+ case 'theme': $this->updateThemeSettings(isset($_GET['theme_id']) ? $_GET['theme_id'] : NULL, $post, $_GET['theme_id'] == 'new' ? true : false);
573
+ break;
574
  }
575
+ }
576
+ }
577
+ public function updateSettings($post = NULL)
578
+ {
579
+ $settings = $this->getSettings();
580
+ if($post)
581
+ {
582
+ update_option('EasyModal_Settings', $settings);
583
+ $this->message('Settings Updated');
584
+ if(array_key_exists('license',$post))
585
  {
586
+ if($this->process_license($post['license']))
587
+ {
588
+ wp_redirect('admin.php?page='.EASYMODAL_SLUG.'-settings',302);
589
+ exit;
590
+ }
591
  }
592
+ $this->message('Settings Updated');
593
+ }
594
+ return $settings;
595
+ }
596
+ public function updateModalSettings($modal_id, $post = NULL, $redirect = false)
597
+ {
598
+ $modals = $this->getModalList();
599
+ if(!is_numeric($modal_id))
600
+ {
601
+ switch($modal_id)
602
  {
603
+ case 'new':
604
+ case 'clone':
605
+ $highest = 0;
606
+ if($modal_id == 'clone') $clone = true;
607
+ foreach($modals as $id => $name)
608
+ {
609
+ if($id > $highest) $highest = $id;
610
+ }
611
+ $modal_id = $highest + 1;
612
+ break;
613
  }
614
+ }
615
+ $settings = $this->getModalSettings($modal_id);
616
+ if($post)
617
+ {
618
+ $settings['id'] = $modal_id;
619
+ unset($post['id']);
620
+ $settings['sitewide'] = false;
621
+ $settings['overlayClose'] = false;
622
+ $settings['overlayEscClose'] = false;
623
+ foreach($post as $key => $val)
624
  {
625
+ switch($key)
626
+ {
627
+ case 'name':
628
+ case 'title':
629
+ $settings[$key] = sanitize_text_field($val);
630
+ break;
631
+ case 'content':
632
+ $settings[$key] = balanceTags($val);
633
+ break;
634
+ case 'sitewide':
635
+ case 'overlayClose':
636
+ case 'overlayEscClose':
637
+ $settings[$key] = ($val === true || $val === 'true') ? true : false;
638
+ break;
639
+ case 'duration':
640
+ case 'userHeight':
641
+ case 'userWidth':
642
+ if(is_numeric($val))
643
+ {
644
+ $settings[$key] = intval($val);
645
+ }
646
+ break;
647
+ case 'size':
648
+ if(in_array($val,array('','tiny','small','medium','large','xlarge','custom')))
649
+ {
650
+ $settings[$key] = $val;
651
+ }
652
+ break;
653
+ case 'animation':
654
+ if(in_array($val,array('fade','fadeAndSlide','grow','growAndSlide')))
655
+ {
656
+ $settings[$key] = $val;
657
+ }
658
+ break;
659
+ case 'direction':
660
+ if(in_array($val,array('top','bottom','left','right','topleft','topright','bottomleft','bottomright','mouse')))
661
+ {
662
+ $settings[$key] = $val;
663
+ }
664
+ break;
665
+ case 'userHeightUnit':
666
+ case 'userWidthUnit':
667
+ if(in_array($val,array('px','%','em','rem')))
668
+ {
669
+ $settings[$key] = $val;
670
+ }
671
+ break;
672
+ }
673
  }
674
+ isset($clone) ? $this->message('Modal cloned successfully') : $this->message('Modal Updated Successfully');
675
  }
676
+ $modals[$settings['id']] = $settings['name'];
677
  update_option('EasyModal_ModalList', $modals);
678
  update_option('EasyModal_Modal-'.$modal_id, $settings);
679
+ if($redirect) wp_redirect('admin.php?page='.EASYMODAL_SLUG.'&modal_id='.$settings['id'],302);
680
  return $settings;
681
  }
682
+ public function updateThemeSettings($theme_id = 1, $post = NULL, $redirect = false)
683
  {
684
+ $settings = $this->getThemeSettings(1);
685
+ if($post)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
686
  {
687
+ $settings['id'] = 1;
688
+ foreach($post as $key => $val)
689
+ {
690
+ switch($key)
691
+ {
692
+ case 'name':
693
+ case 'closeText':
694
+ $settings[$key] = sanitize_text_field($val);
695
+ break;
696
+ case 'overlayOpacity':
697
+ case 'containerPadding':
698
+ case 'containerBorderWidth':
699
+ case 'containerBorderRadius':
700
+ case 'closeFontSize':
701
+ case 'closeBorderRadius':
702
+ case 'closeSize':
703
+ case 'contentTitleFontSize':
704
+ if(is_numeric($val))
705
+ {
706
+ $settings[$key] = intval($val);
707
+ }
708
+ break;
709
+ case 'overlayColor':
710
+ case 'containerBgColor':
711
+ case 'containerBorderColor':
712
+ case 'closeBgColor':
713
+ case 'closeFontColor':
714
+ case 'contentTitleFontColor':
715
+ case 'contentFontColor':
716
+ if(preg_match('/^#[a-f0-9]{6}$/i', $val))
717
+ {
718
+ $settings[$key] = $val;
719
+ }
720
+ break;
721
+ case 'containerBorderStyle':
722
+ if(in_array($val,array('none','solid','dotted','dashed','double','groove','inset','outset','ridge')))
723
+ {
724
+ $settings[$key] = $val;
725
+ }
726
+ break;
727
+ case 'closeLocation':
728
+ if(in_array($val,array('inside','outside')))
729
+ {
730
+ $settings[$key] = $val;
731
+ }
732
+ break;
733
+ case 'closePosition':
734
+ if(in_array($val,array('topright','topleft','bottomright','bottomleft')))
735
+ {
736
+ $settings[$key] = $val;
737
+ }
738
+ break;
739
+ case 'contentTitleFontFamily':
740
+ if(in_array($val,array('Sans-Serif','Tahoma','Georgia','Comic Sans MS','Arial','Lucida Grande','Times New Roman')))
741
+ {
742
+ $settings[$key] = $val;
743
+ }
744
+ break;
745
+ }
746
+ }
747
+ $this->message('Theme Updated');
748
  }
749
+ update_option('EasyModal_ThemeList', array(1 => $settings['name']));
750
+ update_option('EasyModal_Theme-1', $settings);
751
  return $settings;
752
  }
 
 
753
 
754
+ public function defaultSettings()
755
  {
756
+ return array();
 
 
 
 
757
  }
758
+ public function defaultModalSettings()
759
  {
760
+ return array(
761
+ 'id' => '',
762
+ 'name' => 'change_me',
763
+ 'sitewide' => false,
764
+ 'title' => '',
765
+ 'content' => '',
766
+
767
+ 'theme' => 1,
768
+
769
+ 'size' => 'normal',
770
+ 'userHeight' => 0,
771
+ 'userHeightUnit' => 0,
772
+ 'userWidth' => 0,
773
+ 'userWidthUnit' => 0,
774
+
775
+ 'animation' => 'fade',
776
+ 'direction' => 'bottom',
777
+ 'duration' => 350,
778
+ 'overlayClose' => false,
779
+ 'overlayEscClose' => false,
780
+ );
781
  }
782
  public function defaultThemeSettings()
783
  {
784
  return array(
785
  'name' => 'change_me',
786
+
787
+ 'overlayColor' => '#220E10',
788
+ 'overlayOpacity' => '85',
789
+
790
+ 'containerBgColor' => '#F7F5E7',
791
  'containerPadding' => '10',
792
+ 'containerBorderColor' => '#F0532B',
793
  'containerBorderStyle' => 'solid',
794
+ 'containerBorderWidth' => '1',
795
+ 'containerBorderRadius' => '8',
796
+
797
+ 'closeLocation' => 'inside',
798
  'closeBgColor' => '#000000',
799
+ 'closeFontColor' => '#F0532B',
800
  'closeFontSize' => '15',
801
  'closeBorderRadius' => '10',
802
  'closeSize' => '20',
803
+ 'closeText' => '&#215;',
804
  'closePosition' => 'topright',
805
+
806
+ 'contentTitleFontColor' => '#F0532B',
807
  'contentTitleFontSize' => '32',
808
  'contentTitleFontFamily' => 'Tahoma',
809
+ 'contentFontColor' => '#F0532B'
810
  );
811
  }
812
+
813
+ public function deleteModal($modal_id)
814
  {
815
+ $modals = get_option('EasyModal_ModalList',array());
816
+ unset($modals[$modal_id]);
817
+ update_option('EasyModal_ModalList', $modals);
818
+ delete_option('EasyModal_Modal-'.$modal_id);
819
+ $this->message('Modal deleted successfully');
820
+ }
821
+
822
+ public function loadModals()
823
+ {
824
+ if(empty($this->loadedModals))
 
 
 
 
 
 
825
  {
826
+ $post_id = get_the_ID();
827
+ $load_modals = (!empty( $post_id ) && is_array(get_post_meta( $post_id, 'easy_modal_post_modals', true ))) ? get_post_meta( $post_id, 'easy_modal_post_modals', true ) : array();
828
+ $this->loadedModals = $load_modals;
829
  }
830
+ return $this->loadedModals;
831
+ }
832
+ public function enqueue_modals()
833
+ {
834
+ $load_modals = $this->loadModals();
835
+ $modals = array();
836
+ foreach($this->getModalList() as $id => $name)
837
  {
838
+ $modal = $this->getModalSettings($id);
839
+ $return = false;
840
+ if($modal['sitewide'] == true)
 
841
  {
842
+ $return = true;
 
 
 
 
 
 
 
843
  }
844
+ elseif(in_array($id,$load_modals))
845
  {
846
+ $return = true;
847
  }
848
+ if($return) $modals[$id] = $modal;
849
+
850
+ }
851
+ return $modals;
852
+ }
853
+ public function preload_modals()
854
+ {
855
+ $load_modals = $this->loadModals();
856
+ $modals = array();
857
+ foreach($this->getModalList() as $id => $name)
858
+ {
859
+ $modal = $this->getModalSettings($id);
860
+ $return = false;
861
+ if($modal['sitewide'] == true)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
862
  {
863
+ $return = true;
864
  }
865
+ elseif(in_array($id,$load_modals))
866
  {
867
+ $return = true;
868
  }
869
+ if($return) require(EASYMODAL_DIR.'/inc/views/modal.php');
870
  }
 
 
 
 
 
 
 
 
 
 
 
871
  }
872
  public function enqueue_themes()
873
  {
874
+ return array(1 => $this->getThemeSettings(1));
875
+ }
876
 
877
+ public function message($message,$type = 'updated')
878
+ {
879
+ if ( !session_id() )
880
+ session_start();
881
+ $this->messages[] = array(
882
+ 'message' => $message,
883
+ 'type' => $type
884
+ );
885
+ $_SESSION['easy_modal_messages'][] = array(
886
+ 'message' => $message,
887
+ 'type' => $type
888
  );
889
+ }
890
+ public function get_messages($type = NULL)
891
+ {
892
+ if ( !session_id() )
893
+ session_start();
894
+ if (empty($_SESSION['easy_modal_messages']))
895
+ return false;
896
+ $messages = $_SESSION['easy_modal_messages'];
897
+ unset($_SESSION['easy_modal_messages']);
898
+ return $messages;
899
  }
900
 
901
+ public function all_numeric($array)
 
902
  {
903
+ if(!is_array($array))
904
+ return false;
905
+ foreach($array as $val)
 
 
 
906
  {
907
+ if(!is_numeric($val))
908
+ return false;
909
  }
910
+ return true;
911
+ }
912
+ public function merge_existing($array1, $array2)
913
+ {
914
+ if(!is_array($array1) || !is_array($array2))
915
+ return false;
916
+
917
+ foreach($array2 as $key => $val)
918
  {
919
+ $array1[$key] = $val;
 
 
 
 
920
  }
921
+ return $array1;
922
  }
923
+
924
+ public function prepare_request($action, $args = array())
925
  {
926
  global $wp_version;
927
  return array(
928
  'body' => array(
929
+ 'action' => $action,
930
+ 'slug' => EASYMODAL_SLUG,
931
+ 'version' => !defined('EASYMODALPRO_VERSION') ? EASYMODAL_VERSION : EASYMODALPRO_VERSION,
932
+ 'request' => $args,
933
  'domain' => get_bloginfo('url'),
 
934
  'license' => get_option('EasyModal_License'),
935
  'wp_version'=> $wp_version
936
  ),
937
  'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo('url')
938
  );
939
  }
940
+ public function check_license()
941
+ {
942
+ return $this->api_request('license_check');
943
+ }
944
+ public function activate_domain()
945
+ {
946
+ return $this->api_request('activate_domain');
947
+ }
948
  // Activated With Valid License
949
  public function check_updates($checked_data)
950
  {
952
  {
953
  return $checked_data;
954
  }
955
+ $request_string = $this->prepare_request('basic_check');
956
+ $request = wp_remote_post($this->api_url, $request_string);
957
+ if (!is_wp_error($request) && ($request['response']['code'] == 200))
 
 
 
 
 
958
  {
959
+ $response = unserialize($request['body']);
960
  }
961
+ if (!empty($response) && is_object($response)) // Feed the update data into WP updater
962
  {
963
+ $checked_data->response[EASYMODAL_SLUG .'/'. EASYMODAL_SLUG .'.php'] = $response;
964
  }
965
  return $checked_data;
966
  }
967
  public function get_plugin_info($def, $action, $args)
968
  {
969
+ if (empty($args->slug) || $args->slug != EASYMODAL_SLUG)
970
  {
971
  return false;
972
  }
973
+ return $this->api_request($action, $args);
974
+ }
975
+ public function api_request($action, $args = array())
976
+ {
977
+ $request_string = $this->prepare_request($action, $args);
978
  $request = wp_remote_post($this->api_url, $request_string);
979
  if (is_wp_error($request))
980
  {
981
+ $response = new WP_Error('plugins_api_failed', __('An Unexpected HTTP Error occurred during the API request.</p> <p><a href="?" onclick="document.location.reload(); return false;">Try again</a>'), $request->get_error_message());
982
  }
983
  else
984
  {
985
+ $response = unserialize($request['body']);
986
+ if ($response === false)
987
  {
988
+ $response = new WP_Error('plugins_api_failed', __('An unknown error occurred'), $request['body']);
989
  }
990
  }
991
+ return $response;
992
  }
993
  }
994
+ if(array_key_exists('EasyModal_License_Status', wp_load_alloptions()))
 
995
  {
996
+ $license_status = get_option('EasyModal_License_Status');
997
+ if(file_exists(EASYMODAL_DIR.'/easy-modal-pro.php') && is_array($license_status) && in_array($license_status['status'], array(2000,2001,3002,3003)))
998
+ {
999
+ require_once(EASYMODAL_DIR.'/easy-modal-pro.php');
1000
+ $EM = new Easy_Modal_Pro;
1001
+ }
1002
  }
1003
+ if(!isset($EM))
1004
  {
1005
  $EM = new Easy_Modal;
1006
+ }
1007
+
1008
+ add_action('admin_init', 'easymodal_disable_older_versions', 1 );
1009
+ function easymodal_disable_older_versions()
1010
+ {
1011
+ deactivate_plugins(array(
1012
+ ABSPATH.'wp-content/plugins/easy-modal-lite/easy-modal-lite.php',
1013
+ ABSPATH.'wp-content/plugins/easy-modal-pro/easy-modal-pro.php'
1014
+ ));
1015
  }
inc/ajax/content.php CHANGED
@@ -1,17 +1,17 @@
1
- <?php
2
- /*
3
- * Easy Modal
4
- * http://wizardinternetsolutions.com/plugins/easy-modal/
5
- */
6
- require( '../../../../../wp-load.php' );
7
- global $EM;
8
- $options = $EM->getModalSettings($_POST['modalId']);
9
-
10
- if($_POST['modalId'] == 'Link'){?>
11
- <iframe src="<?php echo $_POST['url']?>" height="<?php echo $_POST['iframeHeight']?>" width="<?php echo $_POST['iframeWidth']?>" style="background:#fff" >
12
- <p>Your browser does not support iframes.</p>
13
- </iframe><?php
14
- } else {?>
15
- <h1 id='eModal-Title'><?php echo $options['title'] ?></h1>
16
- <?php echo do_shortcode($options['content']);
17
  }?>
1
+ <?php
2
+ /*
3
+ * Easy Modal
4
+ * http://wizardinternetsolutions.com/plugins/easy-modal/
5
+ */
6
+ require( '../../../../../wp-load.php' );
7
+ global $EM;
8
+ $options = $EM->getModalSettings($_POST['modalId']);
9
+
10
+ if($_POST['modalId'] == 'Link'){?>
11
+ <iframe src="<?php echo $_POST['url']?>" height="<?php echo $_POST['iframeHeight']?>" width="<?php echo $_POST['iframeWidth']?>" style="background:#fff" >
12
+ <p>Your browser does not support iframes.</p>
13
+ </iframe><?php
14
+ } else {?>
15
+ <h1 id='eModal-Title'><?php echo $options['title'] ?></h1>
16
+ <?php echo do_shortcode($options['content']);
17
  }?>
inc/css/admin-styles.min.css DELETED
@@ -1,492 +0,0 @@
1
- h4 span.desc{font-weight:400;font-size:.9em;margin-top:2px;display:block}
2
- .emthemes h4{margin:0}
3
- .emthemes td,.emthemes th{vertical-align:middle;width:49.9%;padding:5px}
4
- .empreview{width:49.9%;float:left;position:relative;border:1px solid #666}
5
- .empreview h2{text-align:center;color:#fff;margin:0 7px;font-size:30px;position:relative}
6
- .empreview #eModal-Preview{height:450px;width:100%;position:relative}
7
- .empreview #eModal-Overlay{position:absolute;width:100%;height:100%;top:0;left:0}
8
- .empreview #eModal-Container{position:relative;width:300px;top:10px;margin:auto}
9
- .empreview #eModal-Close{position:absolute;text-align:center;font-weight:700;text-decoration:none;top:-10px;right:-10px;display:block;width:20px;height:20px;background-color:#000;border:2px solid #fff;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;color:#fff;vertical-align:middle}
10
- .empreview #eModal-Close.topright{top:-10px;right:-10px;bottom:auto;left:auto}
11
- .empreview #eModal-Close.topleft{top:-10px;left:-10px;bottom:auto;right:auto}
12
- .empreview #eModal-Close.bottomright{bottom:-10px;right:-10px;top:auto;left:auto}
13
- .empreview #eModal-Close.bottomleft{bottom:-10px;left:-10px;top:auto;right:auto}
14
- .settings_page_easy-modal-pro .half.last,.settings_page_easy-modal-pro input[type=submit]{float:right}
15
- .emthemes{display:inline-block;float:left;width:48%;margin-right:1%}
16
- .emthemes>div{display:block;float:left;width:100%}
17
- .colorpicker{width:356px;height:176px;overflow:hidden;position:absolute;background:url(../images/admin/colorpicker_background.png);font-family:Arial,Helvetica,sans-serif;display:none;z-index:1000}
18
- .colorpicker_color{width:150px;height:150px;left:14px;top:13px;position:absolute;background:red;overflow:hidden;cursor:crosshair}
19
- .colorpicker_color div{position:absolute;top:0;left:0;width:150px;height:150px;background:url(../images/admin/colorpicker_overlay.png)}
20
- .colorpicker_color div div{position:absolute;top:0;left:0;width:11px;height:11px;overflow:hidden;background:url(../images/admin/colorpicker_select.gif);margin:-5px 0 0 -5px}
21
- .colorpicker_hue{position:absolute;top:13px;left:171px;width:35px;height:150px;cursor:n-resize}
22
- .colorpicker_hue div{position:absolute;width:35px;height:9px;overflow:hidden;background:url(../images/admin/colorpicker_indic.gif) left top;left:0;margin:-4px 0 0}
23
- .colorpicker_new_color{position:absolute;width:60px;height:30px;left:213px;top:13px;background:red}
24
- .colorpicker_current_color{position:absolute;width:60px;height:30px;left:283px;top:13px;background:red}
25
- .colorpicker input{background-color:transparent;border:1px solid transparent;position:absolute;font-size:10px;font-family:Arial,Helvetica,sans-serif;color:#898989;top:4px;right:11px;text-align:right;height:11px;margin:0;padding:0}
26
- .colorpicker_hex{position:absolute;width:72px;height:22px;background:url(../images/admin/colorpicker_hex.png) top;left:212px;top:142px}
27
- .colorpicker_hex input{right:6px}
28
- .colorpicker_field{height:22px;width:62px;background-position:top;position:absolute}
29
- .colorpicker_field span{position:absolute;width:12px;height:22px;overflow:hidden;top:0;right:0;cursor:n-resize}
30
- .colorpicker_rgb_r{background-image:url(../images/admin/colorpicker_rgb_r.png);top:52px;left:212px}
31
- .colorpicker_rgb_g{background-image:url(../images/admin/colorpicker_rgb_g.png);top:82px;left:212px}
32
- .colorpicker_rgb_b{background-image:url(../images/admin/colorpicker_rgb_b.png);top:112px;left:212px}
33
- .colorpicker_hsb_h{background-image:url(../images/admin/colorpicker_hsb_h.png);top:52px;left:282px}
34
- .colorpicker_hsb_s{background-image:url(../images/admin/colorpicker_hsb_s.png);top:82px;left:282px}
35
- .colorpicker_hsb_b{background-image:url(../images/admin/colorpicker_hsb_b.png);top:112px;left:282px}
36
- .colorpicker_submit{position:absolute;width:22px;height:22px;background:url(../images/admin/colorpicker_submit.png) top;left:322px;top:142px;overflow:hidden}
37
- .colorpicker_focus{background-position:center}
38
- .colorpicker_hex.colorpicker_focus,.colorpicker_submit.colorpicker_focus,.colorpicker_slider{background-position:bottom}
39
- /*!
40
- * jQuery UI CSS Framework 1.8.22
41
- *
42
- * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
43
- * Dual licensed under the MIT or GPL Version 2 licenses.
44
- * http://jquery.org/license
45
- *
46
- * http://docs.jquery.com/UI/Theming/API
47
- */.ui-helper-hidden{display:none}
48
- .ui-helper-hidden-accessible{position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px)}
49
- .ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}
50
- .ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table}
51
- .ui-helper-clearfix:after{clear:both}
52
- .ui-helper-clearfix{zoom:1}
53
- .ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}
54
- .ui-state-disabled{cursor:default!important}
55
- .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}
56
- .ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%}
57
- /*!
58
- * jQuery UI CSS Framework 1.8.22
59
- *
60
- * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
61
- * Dual licensed under the MIT or GPL Version 2 licenses.
62
- * http://jquery.org/license
63
- *
64
- * http://docs.jquery.com/UI/Theming/API
65
- *
66
- * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=5px&bgColorHeader=5c9ccc&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=55&borderColorHeader=4297d7&fcHeader=ffffff&iconColorHeader=d8e7f3&bgColorContent=fcfdfd&bgTextureContent=06_inset_hard.png&bgImgOpacityContent=100&borderColorContent=a6c9e2&fcContent=222222&iconColorContent=469bdd&bgColorDefault=dfeffc&bgTextureDefault=02_glass.png&bgImgOpacityDefault=85&borderColorDefault=c5dbec&fcDefault=2e6e9e&iconColorDefault=6da8d5&bgColorHover=d0e5f5&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=79b7e7&fcHover=1d5987&iconColorHover=217bc0&bgColorActive=f5f8f9&bgTextureActive=06_inset_hard.png&bgImgOpacityActive=100&borderColorActive=79b7e7&fcActive=e17009&iconColorActive=f9bd01&bgColorHighlight=fbec88&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=fad42e&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
67
- */.ui-widget{font-family:Lucida Grande,Lucida Sans,Arial,sans-serif;font-size:1.1em}
68
- .ui-widget .ui-widget{font-size:1em}
69
- .ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Lucida Grande,Lucida Sans,Arial,sans-serif;font-size:1em}
70
- .ui-widget-content{border:1px solid #a6c9e2;background:#fcfdfd url(../images/admin/ui-bg_inset-hard_100_fcfdfd_1x100.png) 50% bottom repeat-x;color:#222}
71
- .ui-widget-content a{color:#222}
72
- .ui-widget-header{border:1px solid #4297d7;background:#5c9ccc url(../images/admin/ui-bg_gloss-wave_55_5c9ccc_500x100.png) 50% 50% repeat-x;color:#fff;font-weight:bold}
73
- .ui-widget-header a{color:#fff}
74
- .ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #c5dbec;background:#dfeffc url(../images/admin/ui-bg_glass_85_dfeffc_1x400.png) 50% 50% repeat-x;font-weight:bold;color:#2e6e9e}
75
- .ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#2e6e9e;text-decoration:none}
76
- .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 #79b7e7;background:#d0e5f5 url(../images/admin/ui-bg_glass_75_d0e5f5_1x400.png) 50% 50% repeat-x;font-weight:bold;color:#1d5987}
77
- .ui-state-hover a,.ui-state-hover a:hover{color:#1d5987;text-decoration:none}
78
- .ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #79b7e7;background:#f5f8f9 url(../images/admin/ui-bg_inset-hard_100_f5f8f9_1x100.png) 50% 50% repeat-x;font-weight:bold;color:#e17009}
79
- .ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#e17009;text-decoration:none}
80
- .ui-widget :active{outline:0}
81
- .ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fad42e;background:#fbec88 url(../images/admin/ui-bg_flat_55_fbec88_40x100.png) 50% 50% repeat-x;color:#363636}
82
- .ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}
83
- .ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url(../images/admin/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;color:#cd0a0a}
84
- .ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}
85
- .ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}
86
- .ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}
87
- .ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}
88
- .ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}
89
- .ui-icon{width:16px;height:16px;background-image:url(../images/admin/ui-icons_469bdd_256x240.png)}
90
- .ui-widget-content .ui-icon{background-image:url(../images/admin/ui-icons_469bdd_256x240.png)}
91
- .ui-widget-header .ui-icon{background-image:url(../images/admin/ui-icons_d8e7f3_256x240.png)}
92
- .ui-state-default .ui-icon{background-image:url(../images/admin/ui-icons_6da8d5_256x240.png)}
93
- .ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(../images/admin/ui-icons_217bc0_256x240.png)}
94
- .ui-state-active .ui-icon{background-image:url(../images/admin/ui-icons_f9bd01_256x240.png)}
95
- .ui-state-highlight .ui-icon{background-image:url(../images/admin/ui-icons_2e83ff_256x240.png)}
96
- .ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(../images/admin/ui-icons_cd0a0a_256x240.png)}
97
- .ui-icon-carat-1-n{background-position:0 0}
98
- .ui-icon-carat-1-ne{background-position:-16px 0}
99
- .ui-icon-carat-1-e{background-position:-32px 0}
100
- .ui-icon-carat-1-se{background-position:-48px 0}
101
- .ui-icon-carat-1-s{background-position:-64px 0}
102
- .ui-icon-carat-1-sw{background-position:-80px 0}
103
- .ui-icon-carat-1-w{background-position:-96px 0}
104
- .ui-icon-carat-1-nw{background-position:-112px 0}
105
- .ui-icon-carat-2-n-s{background-position:-128px 0}
106
- .ui-icon-carat-2-e-w{background-position:-144px 0}
107
- .ui-icon-triangle-1-n{background-position:0 -16px}
108
- .ui-icon-triangle-1-ne{background-position:-16px -16px}
109
- .ui-icon-triangle-1-e{background-position:-32px -16px}
110
- .ui-icon-triangle-1-se{background-position:-48px -16px}
111
- .ui-icon-triangle-1-s{background-position:-64px -16px}
112
- .ui-icon-triangle-1-sw{background-position:-80px -16px}
113
- .ui-icon-triangle-1-w{background-position:-96px -16px}
114
- .ui-icon-triangle-1-nw{background-position:-112px -16px}
115
- .ui-icon-triangle-2-n-s{background-position:-128px -16px}
116
- .ui-icon-triangle-2-e-w{background-position:-144px -16px}
117
- .ui-icon-arrow-1-n{background-position:0 -32px}
118
- .ui-icon-arrow-1-ne{background-position:-16px -32px}
119
- .ui-icon-arrow-1-e{background-position:-32px -32px}
120
- .ui-icon-arrow-1-se{background-position:-48px -32px}
121
- .ui-icon-arrow-1-s{background-position:-64px -32px}
122
- .ui-icon-arrow-1-sw{background-position:-80px -32px}
123
- .ui-icon-arrow-1-w{background-position:-96px -32px}
124
- .ui-icon-arrow-1-nw{background-position:-112px -32px}
125
- .ui-icon-arrow-2-n-s{background-position:-128px -32px}
126
- .ui-icon-arrow-2-ne-sw{background-position:-144px -32px}
127
- .ui-icon-arrow-2-e-w{background-position:-160px -32px}
128
- .ui-icon-arrow-2-se-nw{background-position:-176px -32px}
129
- .ui-icon-arrowstop-1-n{background-position:-192px -32px}
130
- .ui-icon-arrowstop-1-e{background-position:-208px -32px}
131
- .ui-icon-arrowstop-1-s{background-position:-224px -32px}
132
- .ui-icon-arrowstop-1-w{background-position:-240px -32px}
133
- .ui-icon-arrowthick-1-n{background-position:0 -48px}
134
- .ui-icon-arrowthick-1-ne{background-position:-16px -48px}
135
- .ui-icon-arrowthick-1-e{background-position:-32px -48px}
136
- .ui-icon-arrowthick-1-se{background-position:-48px -48px}
137
- .ui-icon-arrowthick-1-s{background-position:-64px -48px}
138
- .ui-icon-arrowthick-1-sw{background-position:-80px -48px}
139
- .ui-icon-arrowthick-1-w{background-position:-96px -48px}
140
- .ui-icon-arrowthick-1-nw{background-position:-112px -48px}
141
- .ui-icon-arrowthick-2-n-s{background-position:-128px -48px}
142
- .ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}
143
- .ui-icon-arrowthick-2-e-w{background-position:-160px -48px}
144
- .ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}
145
- .ui-icon-arrowthickstop-1-n{background-position:-192px -48px}
146
- .ui-icon-arrowthickstop-1-e{background-position:-208px -48px}
147
- .ui-icon-arrowthickstop-1-s{background-position:-224px -48px}
148
- .ui-icon-arrowthickstop-1-w{background-position:-240px -48px}
149
- .ui-icon-arrowreturnthick-1-w{background-position:0 -64px}
150
- .ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}
151
- .ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}
152
- .ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}
153
- .ui-icon-arrowreturn-1-w{background-position:-64px -64px}
154
- .ui-icon-arrowreturn-1-n{background-position:-80px -64px}
155
- .ui-icon-arrowreturn-1-e{background-position:-96px -64px}
156
- .ui-icon-arrowreturn-1-s{background-position:-112px -64px}
157
- .ui-icon-arrowrefresh-1-w{background-position:-128px -64px}
158
- .ui-icon-arrowrefresh-1-n{background-position:-144px -64px}
159
- .ui-icon-arrowrefresh-1-e{background-position:-160px -64px}
160
- .ui-icon-arrowrefresh-1-s{background-position:-176px -64px}
161
- .ui-icon-arrow-4{background-position:0 -80px}
162
- .ui-icon-arrow-4-diag{background-position:-16px -80px}
163
- .ui-icon-extlink{background-position:-32px -80px}
164
- .ui-icon-newwin{background-position:-48px -80px}
165
- .ui-icon-refresh{background-position:-64px -80px}
166
- .ui-icon-shuffle{background-position:-80px -80px}
167
- .ui-icon-transfer-e-w{background-position:-96px -80px}
168
- .ui-icon-transferthick-e-w{background-position:-112px -80px}
169
- .ui-icon-folder-collapsed{background-position:0 -96px}
170
- .ui-icon-folder-open{background-position:-16px -96px}
171
- .ui-icon-document{background-position:-32px -96px}
172
- .ui-icon-document-b{background-position:-48px -96px}
173
- .ui-icon-note{background-position:-64px -96px}
174
- .ui-icon-mail-closed{background-position:-80px -96px}
175
- .ui-icon-mail-open{background-position:-96px -96px}
176
- .ui-icon-suitcase{background-position:-112px -96px}
177
- .ui-icon-comment{background-position:-128px -96px}
178
- .ui-icon-person{background-position:-144px -96px}
179
- .ui-icon-print{background-position:-160px -96px}
180
- .ui-icon-trash{background-position:-176px -96px}
181
- .ui-icon-locked{background-position:-192px -96px}
182
- .ui-icon-unlocked{background-position:-208px -96px}
183
- .ui-icon-bookmark{background-position:-224px -96px}
184
- .ui-icon-tag{background-position:-240px -96px}
185
- .ui-icon-home{background-position:0 -112px}
186
- .ui-icon-flag{background-position:-16px -112px}
187
- .ui-icon-calendar{background-position:-32px -112px}
188
- .ui-icon-cart{background-position:-48px -112px}
189
- .ui-icon-pencil{background-position:-64px -112px}
190
- .ui-icon-clock{background-position:-80px -112px}
191
- .ui-icon-disk{background-position:-96px -112px}
192
- .ui-icon-calculator{background-position:-112px -112px}
193
- .ui-icon-zoomin{background-position:-128px -112px}
194
- .ui-icon-zoomout{background-position:-144px -112px}
195
- .ui-icon-search{background-position:-160px -112px}
196
- .ui-icon-wrench{background-position:-176px -112px}
197
- .ui-icon-gear{background-position:-192px -112px}
198
- .ui-icon-heart{background-position:-208px -112px}
199
- .ui-icon-star{background-position:-224px -112px}
200
- .ui-icon-link{background-position:-240px -112px}
201
- .ui-icon-cancel{background-position:0 -128px}
202
- .ui-icon-plus{background-position:-16px -128px}
203
- .ui-icon-plusthick{background-position:-32px -128px}
204
- .ui-icon-minus{background-position:-48px -128px}
205
- .ui-icon-minusthick{background-position:-64px -128px}
206
- .ui-icon-close{background-position:-80px -128px}
207
- .ui-icon-closethick{background-position:-96px -128px}
208
- .ui-icon-key{background-position:-112px -128px}
209
- .ui-icon-lightbulb{background-position:-128px -128px}
210
- .ui-icon-scissors{background-position:-144px -128px}
211
- .ui-icon-clipboard{background-position:-160px -128px}
212
- .ui-icon-copy{background-position:-176px -128px}
213
- .ui-icon-contact{background-position:-192px -128px}
214
- .ui-icon-image{background-position:-208px -128px}
215
- .ui-icon-video{background-position:-224px -128px}
216
- .ui-icon-script{background-position:-240px -128px}
217
- .ui-icon-alert{background-position:0 -144px}
218
- .ui-icon-info{background-position:-16px -144px}
219
- .ui-icon-notice{background-position:-32px -144px}
220
- .ui-icon-help{background-position:-48px -144px}
221
- .ui-icon-check{background-position:-64px -144px}
222
- .ui-icon-bullet{background-position:-80px -144px}
223
- .ui-icon-radio-off{background-position:-96px -144px}
224
- .ui-icon-radio-on{background-position:-112px -144px}
225
- .ui-icon-pin-w{background-position:-128px -144px}
226
- .ui-icon-pin-s{background-position:-144px -144px}
227
- .ui-icon-play{background-position:0 -160px}
228
- .ui-icon-pause{background-position:-16px -160px}
229
- .ui-icon-seek-next{background-position:-32px -160px}
230
- .ui-icon-seek-prev{background-position:-48px -160px}
231
- .ui-icon-seek-end{background-position:-64px -160px}
232
- .ui-icon-seek-start{background-position:-80px -160px}
233
- .ui-icon-seek-first{background-position:-80px -160px}
234
- .ui-icon-stop{background-position:-96px -160px}
235
- .ui-icon-eject{background-position:-112px -160px}
236
- .ui-icon-volume-off{background-position:-128px -160px}
237
- .ui-icon-volume-on{background-position:-144px -160px}
238
- .ui-icon-power{background-position:0 -176px}
239
- .ui-icon-signal-diag{background-position:-16px -176px}
240
- .ui-icon-signal{background-position:-32px -176px}
241
- .ui-icon-battery-0{background-position:-48px -176px}
242
- .ui-icon-battery-1{background-position:-64px -176px}
243
- .ui-icon-battery-2{background-position:-80px -176px}
244
- .ui-icon-battery-3{background-position:-96px -176px}
245
- .ui-icon-circle-plus{background-position:0 -192px}
246
- .ui-icon-circle-minus{background-position:-16px -192px}
247
- .ui-icon-circle-close{background-position:-32px -192px}
248
- .ui-icon-circle-triangle-e{background-position:-48px -192px}
249
- .ui-icon-circle-triangle-s{background-position:-64px -192px}
250
- .ui-icon-circle-triangle-w{background-position:-80px -192px}
251
- .ui-icon-circle-triangle-n{background-position:-96px -192px}
252
- .ui-icon-circle-arrow-e{background-position:-112px -192px}
253
- .ui-icon-circle-arrow-s{background-position:-128px -192px}
254
- .ui-icon-circle-arrow-w{background-position:-144px -192px}
255
- .ui-icon-circle-arrow-n{background-position:-160px -192px}
256
- .ui-icon-circle-zoomin{background-position:-176px -192px}
257
- .ui-icon-circle-zoomout{background-position:-192px -192px}
258
- .ui-icon-circle-check{background-position:-208px -192px}
259
- .ui-icon-circlesmall-plus{background-position:0 -208px}
260
- .ui-icon-circlesmall-minus{background-position:-16px -208px}
261
- .ui-icon-circlesmall-close{background-position:-32px -208px}
262
- .ui-icon-squaresmall-plus{background-position:-48px -208px}
263
- .ui-icon-squaresmall-minus{background-position:-64px -208px}
264
- .ui-icon-squaresmall-close{background-position:-80px -208px}
265
- .ui-icon-grip-dotted-vertical{background-position:0 -224px}
266
- .ui-icon-grip-dotted-horizontal{background-position:-16px -224px}
267
- .ui-icon-grip-solid-vertical{background-position:-32px -224px}
268
- .ui-icon-grip-solid-horizontal{background-position:-48px -224px}
269
- .ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}
270
- .ui-icon-grip-diagonal-se{background-position:-80px -224px}
271
- .ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;-khtml-border-top-left-radius:5px;border-top-left-radius:5px}
272
- .ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;-khtml-border-top-right-radius:5px;border-top-right-radius:5px}
273
- .ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;-khtml-border-bottom-left-radius:5px;border-bottom-left-radius:5px}
274
- .ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;-khtml-border-bottom-right-radius:5px;border-bottom-right-radius:5px}
275
- .ui-widget-overlay{background:#aaa url(../images/admin/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.30;filter:Alpha(Opacity=30)}
276
- .ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url(../images/admin/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}
277
- /*!
278
- * jQuery UI Resizable 1.8.22
279
- *
280
- * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
281
- * Dual licensed under the MIT or GPL Version 2 licenses.
282
- * http://jquery.org/license
283
- *
284
- * http://docs.jquery.com/UI/Resizable#theming
285
- */.ui-resizable{position:relative}
286
- .ui-resizable-handle{position:absolute;font-size:.1px;display:block}
287
- .ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}
288
- .ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}
289
- .ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}
290
- .ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}
291
- .ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}
292
- .ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}
293
- .ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}
294
- .ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}
295
- .ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}
296
- /*!
297
- * jQuery UI Selectable 1.8.22
298
- *
299
- * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
300
- * Dual licensed under the MIT or GPL Version 2 licenses.
301
- * http://jquery.org/license
302
- *
303
- * http://docs.jquery.com/UI/Selectable#theming
304
- */.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}
305
- /*!
306
- * jQuery UI Accordion 1.8.22
307
- *
308
- * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
309
- * Dual licensed under the MIT or GPL Version 2 licenses.
310
- * http://jquery.org/license
311
- *
312
- * http://docs.jquery.com/UI/Accordion#theming
313
- */.ui-accordion{width:100%}
314
- .ui-accordion .ui-accordion-header{cursor:pointer;position:relative;margin-top:1px;zoom:1}
315
- .ui-accordion .ui-accordion-li-fix{display:inline}
316
- .ui-accordion .ui-accordion-header-active{border-bottom:0!important}
317
- .ui-accordion .ui-accordion-header a{display:block;font-size:1em;padding:.5em .5em .5em .7em}
318
- .ui-accordion-icons .ui-accordion-header a{padding-left:2.2em}
319
- .ui-accordion .ui-accordion-header .ui-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}
320
- .ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;margin-top:-2px;position:relative;top:1px;margin-bottom:2px;overflow:auto;display:none;zoom:1}
321
- .ui-accordion .ui-accordion-content-active{display:block}
322
- /*!
323
- * jQuery UI Autocomplete 1.8.22
324
- *
325
- * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
326
- * Dual licensed under the MIT or GPL Version 2 licenses.
327
- * http://jquery.org/license
328
- *
329
- * http://docs.jquery.com/UI/Autocomplete#theming
330
- */.ui-autocomplete{position:absolute;cursor:default}
331
- * html .ui-autocomplete{width:1px}
332
- .ui-menu{list-style:none;padding:2px;margin:0;display:block;float:left}
333
- .ui-menu .ui-menu{margin-top:-3px}
334
- .ui-menu .ui-menu-item{margin:0;padding:0;zoom:1;float:left;clear:left;width:100%}
335
- .ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:.2em .4em;line-height:1.5;zoom:1}
336
- .ui-menu .ui-menu-item a.ui-state-hover,.ui-menu .ui-menu-item a.ui-state-active{font-weight:normal;margin:-1px}
337
- /*!
338
- * jQuery UI Button 1.8.22
339
- *
340
- * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
341
- * Dual licensed under the MIT or GPL Version 2 licenses.
342
- * http://jquery.org/license
343
- *
344
- * http://docs.jquery.com/UI/Button#theming
345
- */.ui-button{display:inline-block;position:relative;padding:0;margin-right:.1em;text-decoration:none!important;cursor:pointer;text-align:center;zoom:1;overflow:visible}
346
- .ui-button-icon-only{width:2.2em}
347
- button.ui-button-icon-only{width:2.4em}
348
- .ui-button-icons-only{width:3.4em}
349
- button.ui-button-icons-only{width:3.7em}
350
- .ui-button .ui-button-text{display:block;line-height:1.4}
351
- .ui-button-text-only .ui-button-text{padding:.4em 1em}
352
- .ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}
353
- .ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}
354
- .ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}
355
- .ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}
356
- input.ui-button{padding:.4em 1em}
357
- .ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}
358
- .ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}
359
- .ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}
360
- .ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}
361
- .ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}
362
- .ui-buttonset{margin-right:7px}
363
- .ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}
364
- button.ui-button::-moz-focus-inner{border:0;padding:0}
365
- /*!
366
- * jQuery UI Dialog 1.8.22
367
- *
368
- * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
369
- * Dual licensed under the MIT or GPL Version 2 licenses.
370
- * http://jquery.org/license
371
- *
372
- * http://docs.jquery.com/UI/Dialog#theming
373
- */.ui-dialog{position:absolute;padding:.2em;width:300px;overflow:hidden}
374
- .ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}
375
- .ui-dialog .ui-dialog-title{float:left;margin:.1em 16px .1em 0}
376
- .ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:19px;margin:-10px 0 0 0;padding:1px;height:18px}
377
- .ui-dialog .ui-dialog-titlebar-close span{display:block;margin:1px}
378
- .ui-dialog .ui-dialog-titlebar-close:hover,.ui-dialog .ui-dialog-titlebar-close:focus{padding:0}
379
- .ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:0;overflow:auto;zoom:1}
380
- .ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin:.5em 0 0 0;padding:.3em 1em .5em .4em}
381
- .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}
382
- .ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}
383
- .ui-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px}
384
- .ui-draggable .ui-dialog-titlebar{cursor:move}
385
- /*!
386
- * jQuery UI Slider 1.8.22
387
- *
388
- * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
389
- * Dual licensed under the MIT or GPL Version 2 licenses.
390
- * http://jquery.org/license
391
- *
392
- * http://docs.jquery.com/UI/Slider#theming
393
- */.ui-slider{position:relative;text-align:left}
394
- .ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}
395
- .ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}
396
- .ui-slider-horizontal{height:.8em}
397
- .ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}
398
- .ui-slider-horizontal .ui-slider-range{top:0;height:100%}
399
- .ui-slider-horizontal .ui-slider-range-min{left:0}
400
- .ui-slider-horizontal .ui-slider-range-max{right:0}
401
- .ui-slider-vertical{width:.8em;height:100px}
402
- .ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}
403
- .ui-slider-vertical .ui-slider-range{left:0;width:100%}
404
- .ui-slider-vertical .ui-slider-range-min{bottom:0}
405
- .ui-slider-vertical .ui-slider-range-max{top:0}
406
- /*!
407
- * jQuery UI Tabs 1.8.22
408
- *
409
- * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
410
- * Dual licensed under the MIT or GPL Version 2 licenses.
411
- * http://jquery.org/license
412
- *
413
- * http://docs.jquery.com/UI/Tabs#theming
414
- */.ui-tabs{position:relative;padding:.2em;zoom:1}
415
- .ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}
416
- .ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:1px;margin:0 .2em 1px 0;border-bottom:0!important;padding:0;white-space:nowrap}
417
- .ui-tabs .ui-tabs-nav li a{float:left;padding:.5em 1em;text-decoration:none}
418
- .ui-tabs .ui-tabs-nav li.ui-tabs-selected{margin-bottom:0;padding-bottom:1px}
419
- .ui-tabs .ui-tabs-nav li.ui-tabs-selected a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-state-processing a{cursor:text}
420
- .ui-tabs .ui-tabs-nav li a,.ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a{cursor:pointer}
421
- .ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:0}
422
- .ui-tabs .ui-tabs-hide{display:none!important}
423
- /*!
424
- * jQuery UI Datepicker 1.8.22
425
- *
426
- * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
427
- * Dual licensed under the MIT or GPL Version 2 licenses.
428
- * http://jquery.org/license
429
- *
430
- * http://docs.jquery.com/UI/Datepicker#theming
431
- */.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}
432
- .ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}
433
- .ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}
434
- .ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}
435
- .ui-datepicker .ui-datepicker-prev{left:2px}
436
- .ui-datepicker .ui-datepicker-next{right:2px}
437
- .ui-datepicker .ui-datepicker-prev-hover{left:1px}
438
- .ui-datepicker .ui-datepicker-next-hover{right:1px}
439
- .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}
440
- .ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}
441
- .ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}
442
- .ui-datepicker select.ui-datepicker-month-year{width:100%}
443
- .ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}
444
- .ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}
445
- .ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}
446
- .ui-datepicker td{border:0;padding:1px}
447
- .ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}
448
- .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}
449
- .ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}
450
- .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}
451
- .ui-datepicker.ui-datepicker-multi{width:auto}
452
- .ui-datepicker-multi .ui-datepicker-group{float:left}
453
- .ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}
454
- .ui-datepicker-multi-2 .ui-datepicker-group{width:50%}
455
- .ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}
456
- .ui-datepicker-multi-4 .ui-datepicker-group{width:25%}
457
- .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header{border-left-width:0}
458
- .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}
459
- .ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}
460
- .ui-datepicker-row-break{clear:both;width:100%;font-size:0}
461
- .ui-datepicker-rtl{direction:rtl}
462
- .ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}
463
- .ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}
464
- .ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}
465
- .ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}
466
- .ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}
467
- .ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}
468
- .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current{float:right}
469
- .ui-datepicker-rtl .ui-datepicker-group{float:right}
470
- .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header{border-right-width:0;border-left-width:1px}
471
- .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}
472
- .ui-datepicker-cover{position:absolute;z-index:-1;filter:mask();top:-4px;left:-4px;width:200px;height:200px}
473
- /*!
474
- * jQuery UI Progressbar 1.8.22
475
- *
476
- * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
477
- * Dual licensed under the MIT or GPL Version 2 licenses.
478
- * http://jquery.org/license
479
- *
480
- * http://docs.jquery.com/UI/Progressbar#theming
481
- */.ui-progressbar{height:2em;text-align:left;overflow:hidden}
482
- .ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}
483
- .cb-enable,.cb-disable,.cb-enable span,.cb-disable span{background:url(../images/admin/switch.gif) repeat-x;display:block;float:left}
484
- .cb-enable span,.cb-disable span{line-height:30px;display:block;background-repeat:no-repeat;font-weight:bold}
485
- .cb-enable span{background-position:left -90px;padding:0 10px}
486
- .cb-disable span{background-position:right -180px;padding:0 10px}
487
- .cb-disable.selected{background-position:0 -30px}
488
- .cb-disable.selected span{background-position:right -210px;color:#fff}
489
- .cb-enable.selected{background-position:0 -60px}
490
- .cb-enable.selected span{background-position:left -150px;color:#fff}
491
- .switch label{cursor:pointer}
492
- .switch input{display:none}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/css/easy-modal-admin.css ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #icon-easy-modal {
2
+ background: transparent url('../images/admin/easy-modal-icon.png') no-repeat;
3
+ }
4
+ #poststuff h2 { margin-bottom:0; }
5
+ .em-tab {
6
+ display: none;
7
+ }
8
+ .em-tab.active {
9
+ display: block;
10
+ padding: 0.5em 0.9em;
11
+ border: 1px solid #ddd;
12
+ background-color: #fff;
13
+ border-radius: 0 3px 3px 3px;
14
+ }
15
+ .colorSelect {
16
+ width:100px!important;
17
+ display:inline-block;
18
+ }
19
+ .color-swatch {
20
+ margin-top:1px;
21
+ margin-right:10px;
22
+ width:1.75em;
23
+ height:1.75em;
24
+ display:block;
25
+ float:left;
26
+ border-style: solid;
27
+ border-width: 1px;
28
+ border-radius: 3px;
29
+ cursor:pointer;
30
+ }
31
+ #userHeight, #userWidth, #duration{
32
+ width:100px;
33
+ }
34
+ .share-buttons {
35
+ margin:0;
36
+ width:100%;
37
+ display:block;
38
+ clear:both;
39
+ }
40
+ .share-buttons li {
41
+ text-align:center;
42
+ width:32%;
43
+ display:inline-block; float:left; margin-right:1%;
44
+ margin-bottom:0;
45
+ }
46
+ .share-buttons li:last-child {
47
+ margin-right:0;
48
+ }
49
+ ul.bullets {
50
+ padding-left:1em;
51
+ list-style:circle;
52
+ }
53
+ ul.bullets li {
54
+ margin-bottom:.125em;
55
+ }
56
+ .postbox .inside p, .postbox .inside ul { margin-top:0; }
57
+ .postbox .inside h2,
58
+ .postbox .inside h3,
59
+ .postbox .inside h4,
60
+ .postbox .inside h5,
61
+ .postbox .inside h6 { margin-bottom:0; }
62
+
63
+ .modal h2,
64
+ .modal h3,
65
+ .modal h4,
66
+ .modal h5,
67
+ .modal h6 { margin-bottom:.5em; }
68
+ .modal img.left { margin-right:.5em; }
69
+ .modal img.right { margin-left:.5em; }
70
+ .modal p { margin-top:0; }
71
+ .value-slider { margin-right:10px; min-width:75%; display:inline-block; }
72
+ .slider-value { display:inline-block; }
73
+ .nav-tab { margin-right:0; }
74
+
75
+ .empreview{width:42%;float:left;position:relative;border:1px solid #666}
76
+ .empreview h2{text-align:center;color:#fff;margin:0 7px;font-size:30px;position:relative}
77
+
78
+
79
+
80
+ #eModal-Preview .example-modal {
81
+ position:relative;
82
+ width:300px;
83
+ top:10px;
84
+ margin:auto;
85
+ font-size:16px;
86
+ position: relative;
87
+ z-index: 99;
88
+ -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
89
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
90
+ }
91
+ #eModal-Preview .example-modal .close-modal {
92
+ text-decoration:none;
93
+ text-align:center;
94
+ font-size: 1.375em;
95
+ line-height: 1;
96
+ position: absolute;
97
+ top: 0.5em;
98
+ right: 0.6875em;
99
+ color: #aaa;
100
+ text-shadow: 0 -1px 1px rbga(0,0,0,.6);
101
+ font-weight: bold;
102
+ cursor: pointer;
103
+ }
104
+ #eModal-Preview .example-modal, #eModal-Preview .example-modal-overlay { display:block; }
105
+
106
+ .empreview #eModal-Preview{height:450px;width:100%;position:relative}
107
+ .example-modal-overlay{position:absolute;width:100%;height:100%;top:0;left:0}
108
+
109
+
110
+
111
+ .emthemes{display:inline-block;float:left;width:57%;margin-right:.5%}
112
+ .colorpicker{width:356px;height:176px;overflow:hidden;position:absolute;background:url(../images/admin/colorpicker_background.png);font-family:Arial,Helvetica,sans-serif;display:none;z-index:1000}
113
+ .colorpicker_color{width:150px;height:150px;left:14px;top:13px;position:absolute;background:red;overflow:hidden;cursor:crosshair}
114
+ .colorpicker_color div{position:absolute;top:0;left:0;width:150px;height:150px;background:url(../images/admin/colorpicker_overlay.png)}
115
+ .colorpicker_color div div{position:absolute;top:0;left:0;width:11px;height:11px;overflow:hidden;background:url(../images/admin/colorpicker_select.gif);margin:-5px 0 0 -5px}
116
+ .colorpicker_hue{position:absolute;top:13px;left:171px;width:35px;height:150px;cursor:n-resize}
117
+ .colorpicker_hue div{position:absolute;width:35px;height:9px;overflow:hidden;background:url(../images/admin/colorpicker_indic.gif) left top;left:0;margin:-4px 0 0}
118
+ .colorpicker_new_color{position:absolute;width:60px;height:30px;left:213px;top:13px;background:red}
119
+ .colorpicker_current_color{position:absolute;width:60px;height:30px;left:283px;top:13px;background:red}
120
+ .colorpicker input{background-color:transparent;border:1px solid transparent;position:absolute;font-size:10px;font-family:Arial,Helvetica,sans-serif;color:#898989;top:4px;right:11px;text-align:right;height:11px;margin:0;padding:0}
121
+ .colorpicker_hex{position:absolute;width:72px;height:22px;background:url(../images/admin/colorpicker_hex.png) top;left:212px;top:142px}
122
+ .colorpicker_hex input{right:6px}
123
+ .colorpicker_field{height:22px;width:62px;background-position:top;position:absolute}
124
+ .colorpicker_field span{position:absolute;width:12px;height:22px;overflow:hidden;top:0;right:0;cursor:n-resize}
125
+ .colorpicker_rgb_r{background-image:url(../images/admin/colorpicker_rgb_r.png);top:52px;left:212px}
126
+ .colorpicker_rgb_g{background-image:url(../images/admin/colorpicker_rgb_g.png);top:82px;left:212px}
127
+ .colorpicker_rgb_b{background-image:url(../images/admin/colorpicker_rgb_b.png);top:112px;left:212px}
128
+ .colorpicker_hsb_h{background-image:url(../images/admin/colorpicker_hsb_h.png);top:52px;left:282px}
129
+ .colorpicker_hsb_s{background-image:url(../images/admin/colorpicker_hsb_s.png);top:82px;left:282px}
130
+ .colorpicker_hsb_b{background-image:url(../images/admin/colorpicker_hsb_b.png);top:112px;left:282px}
131
+ .colorpicker_submit{position:absolute;width:22px;height:22px;background:url(../images/admin/colorpicker_submit.png) top;left:322px;top:142px;overflow:hidden}
132
+ .colorpicker_focus{background-position:center}
133
+ .colorpicker_hex.colorpicker_focus,.colorpicker_submit.colorpicker_focus,.colorpicker_slider{background-position:bottom}
134
+
135
+ /*!
136
+ * jQuery UI CSS Framework 1.8.22
137
+ *
138
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
139
+ * Dual licensed under the MIT or GPL Version 2 licenses.
140
+ * http://jquery.org/license
141
+ *
142
+ * http://docs.jquery.com/UI/Theming/API
143
+ *
144
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=5px&bgColorHeader=5c9ccc&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=55&borderColorHeader=4297d7&fcHeader=ffffff&iconColorHeader=d8e7f3&bgColorContent=fcfdfd&bgTextureContent=06_inset_hard.png&bgImgOpacityContent=100&borderColorContent=a6c9e2&fcContent=222222&iconColorContent=469bdd&bgColorDefault=dfeffc&bgTextureDefault=02_glass.png&bgImgOpacityDefault=85&borderColorDefault=c5dbec&fcDefault=2e6e9e&iconColorDefault=6da8d5&bgColorHover=d0e5f5&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=79b7e7&fcHover=1d5987&iconColorHover=217bc0&bgColorActive=f5f8f9&bgTextureActive=06_inset_hard.png&bgImgOpacityActive=100&borderColorActive=79b7e7&fcActive=e17009&iconColorActive=f9bd01&bgColorHighlight=fbec88&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=fad42e&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
145
+ */
146
+ .ui-widget{font-family:Lucida Grande,Lucida Sans,Arial,sans-serif;font-size:1.1em}
147
+ .ui-widget-content{border:1px solid #a6c9e2;background:#fcfdfd url(../images/admin/ui-bg_inset-hard_100_fcfdfd_1x100.png) 50% bottom repeat-x;color:#222}
148
+ .ui-widget-content a{color:#222}
149
+ .ui-widget-header{border:1px solid #4297d7;background:#5c9ccc url(../images/admin/ui-bg_gloss-wave_55_5c9ccc_500x100.png) 50% 50% repeat-x;color:#fff;font-weight:bold}
150
+ .ui-state-default,.ui-widget-content .ui-state-default{border:1px solid #c5dbec;background:#dfeffc url(../images/admin/ui-bg_glass_85_dfeffc_1x400.png) 50% 50% repeat-x;font-weight:bold;color:#2e6e9e}
151
+ .ui-corner-all{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;-khtml-border-top-left-radius:5px;border-top-left-radius:5px}
152
+ .ui-corner-all{-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;-khtml-border-top-right-radius:5px;border-top-right-radius:5px}
153
+ .ui-corner-all{-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;-khtml-border-bottom-left-radius:5px;border-bottom-left-radius:5px}
154
+ .ui-corner-all{-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;-khtml-border-bottom-right-radius:5px;border-bottom-right-radius:5px}
155
+
156
+ /*!
157
+ * jQuery UI Slider 1.8.22
158
+ */
159
+ .ui-slider{position:relative;text-align:left}
160
+ .ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}
161
+ .ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}
162
+ .ui-slider-horizontal{height:.8em}
163
+ .ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}
164
+ .ui-slider-horizontal .ui-slider-range{top:0;height:100%}
165
+ .ui-slider-horizontal .ui-slider-range-min{left:0}
166
+ .ui-slider-horizontal .ui-slider-range-max{right:0}
167
+ .ui-slider-vertical{width:.8em;height:100px}
168
+ .ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}
169
+ .ui-slider-vertical .ui-slider-range{left:0;width:100%}
170
+ .ui-slider-vertical .ui-slider-range-min{bottom:0}
171
+ .ui-slider-vertical .ui-slider-range-max{top:0}
172
+
173
+
174
+ .cb-enable,.cb-disable,.cb-enable span,.cb-disable span{background:url(../images/admin/switch.gif) repeat-x;display:block;float:left}
175
+ .cb-enable span,.cb-disable span{line-height:30px;display:block;background-repeat:no-repeat;font-weight:bold}
176
+ .cb-enable span{background-position:left -90px;padding:0 10px}
177
+ .cb-disable span{background-position:right -180px;padding:0 10px}
178
+ .cb-disable.selected{background-position:0 -30px}
179
+ .cb-disable.selected span{background-position:right -210px;color:#fff}
180
+ .cb-enable.selected{background-position:0 -60px}
181
+ .cb-enable.selected span{background-position:left -150px;color:#fff}
182
+ .switch label{cursor:pointer}
183
+ .switch input{display:none}
inc/css/easy-modal-admin.min.css ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #icon-easy-modal {
2
+ background: transparent url('../images/admin/easy-modal-icon.png') no-repeat;
3
+ }
4
+ #poststuff h2#em-tabs { margin-bottom:0; }
5
+
6
+ .em-tab {
7
+ display: none;
8
+ }
9
+ .em-tab.active {
10
+ display: block;
11
+ padding: 0.5em 0.9em;
12
+ border: 1px solid #ddd;
13
+ background-color: #fff;
14
+ border-radius: 0 3px 3px 3px;
15
+ }
16
+ .colorSelect {
17
+ width:100px!important;
18
+ display:inline-block;
19
+ }
20
+ .color-swatch {
21
+ margin-top:1px;
22
+ margin-right:10px;
23
+ width:1.75em;
24
+ height:1.75em;
25
+ display:block;
26
+ float:left;
27
+ border-style: solid;
28
+ border-width: 1px;
29
+ border-radius: 3px;
30
+ cursor:pointer;
31
+ }
32
+ #userHeight, #userWidth, #duration{
33
+ width:100px;
34
+ }
35
+ .share-buttons {
36
+ margin:0;
37
+ width:100%;
38
+ display:block;
39
+ clear:both;
40
+ }
41
+ .share-buttons li {
42
+ text-align:center;
43
+ width:32%;
44
+ display:inline-block; float:left; margin-right:1%;
45
+ margin-bottom:0;
46
+ }
47
+ .share-buttons li:last-child {
48
+ margin-right:0;
49
+ }
50
+ ul.bullets {
51
+ padding-left:1em;
52
+ list-style:circle;
53
+ }
54
+ ul.bullets li {
55
+ margin-bottom:.125em;
56
+ }
57
+ .postbox .inside p, .postbox .inside ul { margin-top:0; }
58
+ .postbox .inside h2,
59
+ .postbox .inside h3,
60
+ .postbox .inside h4,
61
+ .postbox .inside h5,
62
+ .postbox .inside h6 { margin-bottom:0; }
63
+
64
+ .modal h2,
65
+ .modal h3,
66
+ .modal h4,
67
+ .modal h5,
68
+ .modal h6 { margin-bottom:.5em; }
69
+ .modal img.left { margin-right:.5em; }
70
+ .modal img.right { margin-left:.5em; }
71
+ .modal p { margin-top:0; }
72
+ .value-slider { margin-right:10px; min-width:75%; display:inline-block; }
73
+ .slider-value { display:inline-block; }
74
+ .nav-tab { margin-right:0; }
75
+
76
+ .empreview{width:42%;float:left;position:relative;border:1px solid #666}
77
+ .empreview h2{text-align:center;color:#fff;margin:0 7px;font-size:30px;position:relative}
78
+
79
+
80
+
81
+ #eModal-Preview .example-modal {
82
+ position:relative;
83
+ width:300px;
84
+ top:10px;
85
+ margin:auto;
86
+ font-size:16px;
87
+ position: relative;
88
+ z-index: 99;
89
+ -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
90
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
91
+ }
92
+ #eModal-Preview .example-modal .close-modal {
93
+ text-decoration:none;
94
+ text-align:center;
95
+ font-size: 1.375em;
96
+ line-height: 1;
97
+ position: absolute;
98
+ top: 0.5em;
99
+ right: 0.6875em;
100
+ color: #aaa;
101
+ text-shadow: 0 -1px 1px rbga(0,0,0,.6);
102
+ font-weight: bold;
103
+ cursor: pointer;
104
+ }
105
+ #eModal-Preview .example-modal, #eModal-Preview .example-modal-overlay { display:block; }
106
+
107
+ .empreview #eModal-Preview{height:450px;width:100%;position:relative}
108
+ .example-modal-overlay{position:absolute;width:100%;height:100%;top:0;left:0}
109
+
110
+
111
+
112
+ .emthemes{display:inline-block;float:left;width:57%;margin-right:.5%}
113
+ .colorpicker{width:356px;height:176px;overflow:hidden;position:absolute;background:url(../images/admin/colorpicker_background.png);font-family:Arial,Helvetica,sans-serif;display:none;z-index:1000}
114
+ .colorpicker_color{width:150px;height:150px;left:14px;top:13px;position:absolute;background:red;overflow:hidden;cursor:crosshair}
115
+ .colorpicker_color div{position:absolute;top:0;left:0;width:150px;height:150px;background:url(../images/admin/colorpicker_overlay.png)}
116
+ .colorpicker_color div div{position:absolute;top:0;left:0;width:11px;height:11px;overflow:hidden;background:url(../images/admin/colorpicker_select.gif);margin:-5px 0 0 -5px}
117
+ .colorpicker_hue{position:absolute;top:13px;left:171px;width:35px;height:150px;cursor:n-resize}
118
+ .colorpicker_hue div{position:absolute;width:35px;height:9px;overflow:hidden;background:url(../images/admin/colorpicker_indic.gif) left top;left:0;margin:-4px 0 0}
119
+ .colorpicker_new_color{position:absolute;width:60px;height:30px;left:213px;top:13px;background:red}
120
+ .colorpicker_current_color{position:absolute;width:60px;height:30px;left:283px;top:13px;background:red}
121
+ .colorpicker input{background-color:transparent;border:1px solid transparent;position:absolute;font-size:10px;font-family:Arial,Helvetica,sans-serif;color:#898989;top:4px;right:11px;text-align:right;height:11px;margin:0;padding:0}
122
+ .colorpicker_hex{position:absolute;width:72px;height:22px;background:url(../images/admin/colorpicker_hex.png) top;left:212px;top:142px}
123
+ .colorpicker_hex input{right:6px}
124
+ .colorpicker_field{height:22px;width:62px;background-position:top;position:absolute}
125
+ .colorpicker_field span{position:absolute;width:12px;height:22px;overflow:hidden;top:0;right:0;cursor:n-resize}
126
+ .colorpicker_rgb_r{background-image:url(../images/admin/colorpicker_rgb_r.png);top:52px;left:212px}
127
+ .colorpicker_rgb_g{background-image:url(../images/admin/colorpicker_rgb_g.png);top:82px;left:212px}
128
+ .colorpicker_rgb_b{background-image:url(../images/admin/colorpicker_rgb_b.png);top:112px;left:212px}
129
+ .colorpicker_hsb_h{background-image:url(../images/admin/colorpicker_hsb_h.png);top:52px;left:282px}
130
+ .colorpicker_hsb_s{background-image:url(../images/admin/colorpicker_hsb_s.png);top:82px;left:282px}
131
+ .colorpicker_hsb_b{background-image:url(../images/admin/colorpicker_hsb_b.png);top:112px;left:282px}
132
+ .colorpicker_submit{position:absolute;width:22px;height:22px;background:url(../images/admin/colorpicker_submit.png) top;left:322px;top:142px;overflow:hidden}
133
+ .colorpicker_focus{background-position:center}
134
+ .colorpicker_hex.colorpicker_focus,.colorpicker_submit.colorpicker_focus,.colorpicker_slider{background-position:bottom}
135
+
136
+ /*!
137
+ * jQuery UI CSS Framework 1.8.22
138
+ *
139
+ * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
140
+ * Dual licensed under the MIT or GPL Version 2 licenses.
141
+ * http://jquery.org/license
142
+ *
143
+ * http://docs.jquery.com/UI/Theming/API
144
+ *
145
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=5px&bgColorHeader=5c9ccc&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=55&borderColorHeader=4297d7&fcHeader=ffffff&iconColorHeader=d8e7f3&bgColorContent=fcfdfd&bgTextureContent=06_inset_hard.png&bgImgOpacityContent=100&borderColorContent=a6c9e2&fcContent=222222&iconColorContent=469bdd&bgColorDefault=dfeffc&bgTextureDefault=02_glass.png&bgImgOpacityDefault=85&borderColorDefault=c5dbec&fcDefault=2e6e9e&iconColorDefault=6da8d5&bgColorHover=d0e5f5&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=79b7e7&fcHover=1d5987&iconColorHover=217bc0&bgColorActive=f5f8f9&bgTextureActive=06_inset_hard.png&bgImgOpacityActive=100&borderColorActive=79b7e7&fcActive=e17009&iconColorActive=f9bd01&bgColorHighlight=fbec88&bgTextureHighlight=01_flat.png&bgImgOpacityHighlight=55&borderColorHighlight=fad42e&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
146
+ */
147
+ .ui-widget{font-family:Lucida Grande,Lucida Sans,Arial,sans-serif;font-size:1.1em}
148
+ .ui-widget-content{border:1px solid #a6c9e2;background:#fcfdfd url(../images/admin/ui-bg_inset-hard_100_fcfdfd_1x100.png) 50% bottom repeat-x;color:#222}
149
+ .ui-widget-content a{color:#222}
150
+ .ui-widget-header{border:1px solid #4297d7;background:#5c9ccc url(../images/admin/ui-bg_gloss-wave_55_5c9ccc_500x100.png) 50% 50% repeat-x;color:#fff;font-weight:bold}
151
+ .ui-state-default,.ui-widget-content .ui-state-default{border:1px solid #c5dbec;background:#dfeffc url(../images/admin/ui-bg_glass_85_dfeffc_1x400.png) 50% 50% repeat-x;font-weight:bold;color:#2e6e9e}
152
+ .ui-corner-all{-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;-khtml-border-top-left-radius:5px;border-top-left-radius:5px}
153
+ .ui-corner-all{-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;-khtml-border-top-right-radius:5px;border-top-right-radius:5px}
154
+ .ui-corner-all{-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;-khtml-border-bottom-left-radius:5px;border-bottom-left-radius:5px}
155
+ .ui-corner-all{-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;-khtml-border-bottom-right-radius:5px;border-bottom-right-radius:5px}
156
+
157
+ /*!
158
+ * jQuery UI Slider 1.8.22
159
+ */
160
+ .ui-slider{position:relative;text-align:left}
161
+ .ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}
162
+ .ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}
163
+ .ui-slider-horizontal{height:.8em}
164
+ .ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}
165
+ .ui-slider-horizontal .ui-slider-range{top:0;height:100%}
166
+ .ui-slider-horizontal .ui-slider-range-min{left:0}
167
+ .ui-slider-horizontal .ui-slider-range-max{right:0}
168
+ .ui-slider-vertical{width:.8em;height:100px}
169
+ .ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}
170
+ .ui-slider-vertical .ui-slider-range{left:0;width:100%}
171
+ .ui-slider-vertical .ui-slider-range-min{bottom:0}
172
+ .ui-slider-vertical .ui-slider-range-max{top:0}
173
+
174
+
175
+ .cb-enable,.cb-disable,.cb-enable span,.cb-disable span{background:url(../images/admin/switch.gif) repeat-x;display:block;float:left}
176
+ .cb-enable span,.cb-disable span{line-height:30px;display:block;background-repeat:no-repeat;font-weight:bold}
177
+ .cb-enable span{background-position:left -90px;padding:0 10px}
178
+ .cb-disable span{background-position:right -180px;padding:0 10px}
179
+ .cb-disable.selected{background-position:0 -30px}
180
+ .cb-disable.selected span{background-position:right -210px;color:#fff}
181
+ .cb-enable.selected{background-position:0 -60px}
182
+ .cb-enable.selected span{background-position:left -150px;color:#fff}
183
+ .switch label{cursor:pointer}
184
+ .switch input{display:none}
inc/css/easy-modal.css ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #modal-overlay {
2
+ position: fixed;
3
+ height: 100%;
4
+ width: 100%;
5
+ background: #000;
6
+ background: rgba(0,0,0,0.45);
7
+ z-index: 98;
8
+ display: none;
9
+ top: 0;
10
+ left: 0;
11
+ }
12
+ .modal, .modal:before, .modal:after, .modal * {
13
+ -moz-box-sizing: border-box;
14
+ }
15
+ .modal {
16
+ font-size: 16px;
17
+ display: none;
18
+ visibility: hidden;
19
+ top: 100px;
20
+ left: 50%;
21
+ margin-left: -40%;
22
+ width: 80%;
23
+ height: auto;
24
+ background-color: white;
25
+ border: solid 1px #666;
26
+ position: absolute;
27
+ overflow:hidden;
28
+ z-index: 99;
29
+ padding: 1.25em;
30
+ -webkit-border-radius: 5px;
31
+ border-radius: 5px;
32
+ -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
33
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
34
+ transform: scale(1, 1);
35
+ transform-origin: 0;
36
+ }
37
+ .modal .close-modal {
38
+ text-decoration: none;
39
+ text-align: center;
40
+ font-size: 1.375em;
41
+ line-height: 1;
42
+ position: absolute;
43
+ top: .5em;
44
+ right: .6875em;
45
+ color: #aaa;
46
+ text-shadow: 0 -1px 1px rbga(0, 0, 0, .6);
47
+ font-weight: bold;
48
+ cursor: pointer;
49
+ }
50
+ .modal .title {
51
+ display: block;
52
+ }
53
+ .modal-placeholder {
54
+ z-index: 100;
55
+ left: 50%;
56
+ position: absolute;
57
+ }
58
+ @media only screen and (min-width: 768px) {
59
+ .modal {
60
+ padding: 1.875em;
61
+ top: 6.25em;
62
+ }
63
+ .modal.tiny {
64
+ margin-left: -15%;
65
+ width: 30%;
66
+ }
67
+ .modal.small {
68
+ margin-left: -20%;
69
+ width: 40%;
70
+ }
71
+ .modal.medium {
72
+ margin-left: -30%;
73
+ width: 60%;
74
+ }
75
+ .modal.large {
76
+ margin-left: -35%;
77
+ width: 70%;
78
+ }
79
+ .modal.xlarge {
80
+ margin-left: -47.5%;
81
+ width: 95%;
82
+ }
83
+ .modal>:first-child {
84
+ margin-top: 0;
85
+ }
86
+ .modal>:last-child {
87
+ margin-bottom: 0;
88
+ }
89
+ }
90
+ @media print {
91
+ .modal {
92
+ background: white!important;
93
+ }
94
+ }
inc/css/easy-modal.min.css ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #modal-overlay {
2
+ position: fixed;
3
+ height: 100%;
4
+ width: 100%;
5
+ background: #000;
6
+ background: rgba(0,0,0,0.45);
7
+ z-index: 98;
8
+ display: none;
9
+ top: 0;
10
+ left: 0;
11
+ }
12
+ .modal, .modal:before, .modal:after, .modal * {
13
+ -moz-box-sizing: border-box;
14
+ }
15
+ .modal {
16
+ font-size: 16px;
17
+ display: none;
18
+ visibility: hidden;
19
+ top: 100px;
20
+ left: 50%;
21
+ margin-left: -40%;
22
+ width: 80%;
23
+ height: auto;
24
+ background-color: white;
25
+ border: solid 1px #666;
26
+ overflow:hidden;
27
+ position: absolute;
28
+ z-index: 99;
29
+ padding: 1.25em;
30
+ -webkit-border-radius: 5px;
31
+ border-radius: 5px;
32
+ -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
33
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
34
+ transform: scale(1, 1);
35
+ transform-origin: 0;
36
+ }
37
+ .modal .close-modal {
38
+ text-decoration: none;
39
+ text-align: center;
40
+ font-size: 1.375em;
41
+ line-height: 1;
42
+ position: absolute;
43
+ top: .5em;
44
+ right: .6875em;
45
+ color: #aaa;
46
+ text-shadow: 0 -1px 1px rbga(0, 0, 0, .6);
47
+ font-weight: bold;
48
+ cursor: pointer;
49
+ }
50
+ .modal .title {
51
+ display: block;
52
+ }
53
+ .modal-placeholder {
54
+ z-index: 100;
55
+ left: 50%;
56
+ position: absolute;
57
+ }
58
+ @media only screen and (min-width: 768px) {
59
+ .modal {
60
+ padding: 1.875em;
61
+ top: 6.25em;
62
+ }
63
+ .modal.tiny {
64
+ margin-left: -15%;
65
+ width: 30%;
66
+ }
67
+ .modal.small {
68
+ margin-left: -20%;
69
+ width: 40%;
70
+ }
71
+ .modal.medium {
72
+ margin-left: -30%;
73
+ width: 60%;
74
+ }
75
+ .modal.large {
76
+ margin-left: -35%;
77
+ width: 70%;
78
+ }
79
+ .modal.xlarge {
80
+ margin-left: -47.5%;
81
+ width: 95%;
82
+ }
83
+ .modal>:first-child {
84
+ margin-top: 0;
85
+ }
86
+ .modal>:last-child {
87
+ margin-bottom: 0;
88
+ }
89
+ }
90
+ @media print {
91
+ .modal {
92
+ background: white!important;
93
+ }
94
+ }
inc/css/styles.min.css DELETED
@@ -1,12 +0,0 @@
1
- #eModal-Overlay{background:#000 url(../images/loader.gif) no-repeat scroll center center;height:100%;left:0;position:fixed;top:0;width:100%;z-index:100000}
2
- #eModal-Container{max-height:90%;max-width:90%;position:absolute;z-index:100001}
3
- #eModal-Container #eModal-Title{font-size:20px;line-height:20px;margin:0 5px 5px;text-align:left}
4
- #eModal-Container #eModal-Content{overflow-x:hidden;overflow-y:auto}
5
- #eModal-Container img{max-height:100%;width:auto}
6
- #eModal-Close{font-family:sans-serif;cursor:pointer;display:block;font-size:20px;font-weight:700;line-height:16px;position:absolute;text-align:center;text-decoration:none;vertical-align:middle}
7
- #eModal-Buttons{bottom:20px;height:30px;left:-30px;position:absolute;right:-30px}
8
- #eModal-Previous{background:#fff;height:30px;left:0;position:absolute;width:30px}
9
- #eModal-Next{background:#fff;height:30px;position:absolute;right:0;width:30px}
10
- #eModal-Content p{margin:0}
11
- * html #eModal-Overlay{position:absolute;height:expression(document.body.scrollHeight>document.body.offsetHeight ? document.body.scrollHeight:document.body.offsetHeight 'px')}
12
- #eModal-Container .poweredby{margin:5px 20px 0;font-size:.75em;display:block}
 
 
 
 
 
 
 
 
 
 
 
 
inc/dashboard.php DELETED
File without changes
inc/images/admin/affiliate.jpg ADDED
Binary file
inc/images/admin/affiliate.png ADDED
Binary file
inc/images/admin/bonus.png ADDED
Binary file
inc/images/admin/dashboard-icon.png ADDED
Binary file
inc/images/admin/easy-modal-icon.png ADDED
Binary file
inc/js/colorpicker.js CHANGED
@@ -1,484 +1,484 @@
1
- /**
2
- *
3
- * Color picker
4
- * Author: Stefan Petre www.eyecon.ro
5
- *
6
- * Dual licensed under the MIT and GPL licenses
7
- *
8
- */
9
- (function ($) {
10
- var ColorPicker = function () {
11
- var
12
- ids = {},
13
- inAction,
14
- charMin = 65,
15
- visible,
16
- tpl = '<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>',
17
- defaults = {
18
- eventName: 'click',
19
- onShow: function () {},
20
- onBeforeShow: function(){},
21
- onHide: function () {},
22
- onChange: function () {},
23
- onSubmit: function () {},
24
- color: 'ff0000',
25
- livePreview: true,
26
- flat: false
27
- },
28
- fillRGBFields = function (hsb, cal) {
29
- var rgb = HSBToRGB(hsb);
30
- $(cal).data('colorpicker').fields
31
- .eq(1).val(rgb.r).end()
32
- .eq(2).val(rgb.g).end()
33
- .eq(3).val(rgb.b).end();
34
- },
35
- fillHSBFields = function (hsb, cal) {
36
- $(cal).data('colorpicker').fields
37
- .eq(4).val(hsb.h).end()
38
- .eq(5).val(hsb.s).end()
39
- .eq(6).val(hsb.b).end();
40
- },
41
- fillHexFields = function (hsb, cal) {
42
- $(cal).data('colorpicker').fields
43
- .eq(0).val(HSBToHex(hsb)).end();
44
- },
45
- setSelector = function (hsb, cal) {
46
- $(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100}));
47
- $(cal).data('colorpicker').selectorIndic.css({
48
- left: parseInt(150 * hsb.s/100, 10),
49
- top: parseInt(150 * (100-hsb.b)/100, 10)
50
- });
51
- },
52
- setHue = function (hsb, cal) {
53
- $(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10));
54
- },
55
- setCurrentColor = function (hsb, cal) {
56
- $(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb));
57
- },
58
- setNewColor = function (hsb, cal) {
59
- $(cal).data('colorpicker').newColor.css('backgroundColor', '#' + HSBToHex(hsb));
60
- },
61
- keyDown = function (ev) {
62
- var pressedKey = ev.charCode || ev.keyCode || -1;
63
- if ((pressedKey > charMin && pressedKey <= 90) || pressedKey == 32) {
64
- return false;
65
- }
66
- var cal = $(this).parent().parent();
67
- if (cal.data('colorpicker').livePreview === true) {
68
- change.apply(this);
69
- }
70
- },
71
- change = function (ev) {
72
- var cal = $(this).parent().parent(), col;
73
- if (this.parentNode.className.indexOf('_hex') > 0) {
74
- cal.data('colorpicker').color = col = HexToHSB(fixHex(this.value));
75
- } else if (this.parentNode.className.indexOf('_hsb') > 0) {
76
- cal.data('colorpicker').color = col = fixHSB({
77
- h: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10),
78
- s: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10),
79
- b: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10)
80
- });
81
- } else {
82
- cal.data('colorpicker').color = col = RGBToHSB(fixRGB({
83
- r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10),
84
- g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10),
85
- b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10)
86
- }));
87
- }
88
- if (ev) {
89
- fillRGBFields(col, cal.get(0));
90
- fillHexFields(col, cal.get(0));
91
- fillHSBFields(col, cal.get(0));
92
- }
93
- setSelector(col, cal.get(0));
94
- setHue(col, cal.get(0));
95
- setNewColor(col, cal.get(0));
96
- cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]);
97
- },
98
- blur = function (ev) {
99
- var cal = $(this).parent().parent();
100
- cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus');
101
- },
102
- focus = function () {
103
- charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65;
104
- $(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus');
105
- $(this).parent().addClass('colorpicker_focus');
106
- },
107
- downIncrement = function (ev) {
108
- var field = $(this).parent().find('input').focus();
109
- var current = {
110
- el: $(this).parent().addClass('colorpicker_slider'),
111
- max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255),
112
- y: ev.pageY,
113
- field: field,
114
- val: parseInt(field.val(), 10),
115
- preview: $(this).parent().parent().data('colorpicker').livePreview
116
- };
117
- $(document).bind('mouseup', current, upIncrement);
118
- $(document).bind('mousemove', current, moveIncrement);
119
- },
120
- moveIncrement = function (ev) {
121
- ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10))));
122
- if (ev.data.preview) {
123
- change.apply(ev.data.field.get(0), [true]);
124
- }
125
- return false;
126
- },
127
- upIncrement = function (ev) {
128
- change.apply(ev.data.field.get(0), [true]);
129
- ev.data.el.removeClass('colorpicker_slider').find('input').focus();
130
- $(document).unbind('mouseup', upIncrement);
131
- $(document).unbind('mousemove', moveIncrement);
132
- return false;
133
- },
134
- downHue = function (ev) {
135
- var current = {
136
- cal: $(this).parent(),
137
- y: $(this).offset().top
138
- };
139
- current.preview = current.cal.data('colorpicker').livePreview;
140
- $(document).bind('mouseup', current, upHue);
141
- $(document).bind('mousemove', current, moveHue);
142
- },
143
- moveHue = function (ev) {
144
- change.apply(
145
- ev.data.cal.data('colorpicker')
146
- .fields
147
- .eq(4)
148
- .val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10))
149
- .get(0),
150
- [ev.data.preview]
151
- );
152
- return false;
153
- },
154
- upHue = function (ev) {
155
- fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
156
- fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
157
- $(document).unbind('mouseup', upHue);
158
- $(document).unbind('mousemove', moveHue);
159
- return false;
160
- },
161
- downSelector = function (ev) {
162
- var current = {
163
- cal: $(this).parent(),
164
- pos: $(this).offset()
165
- };
166
- current.preview = current.cal.data('colorpicker').livePreview;
167
- $(document).bind('mouseup', current, upSelector);
168
- $(document).bind('mousemove', current, moveSelector);
169
- },
170
- moveSelector = function (ev) {
171
- change.apply(
172
- ev.data.cal.data('colorpicker')
173
- .fields
174
- .eq(6)
175
- .val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10))
176
- .end()
177
- .eq(5)
178
- .val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10))
179
- .get(0),
180
- [ev.data.preview]
181
- );
182
- return false;
183
- },
184
- upSelector = function (ev) {
185
- fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
186
- fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
187
- $(document).unbind('mouseup', upSelector);
188
- $(document).unbind('mousemove', moveSelector);
189
- return false;
190
- },
191
- enterSubmit = function (ev) {
192
- $(this).addClass('colorpicker_focus');
193
- },
194
- leaveSubmit = function (ev) {
195
- $(this).removeClass('colorpicker_focus');
196
- },
197
- clickSubmit = function (ev) {
198
- var cal = $(this).parent();
199
- var col = cal.data('colorpicker').color;
200
- cal.data('colorpicker').origColor = col;
201
- setCurrentColor(col, cal.get(0));
202
- cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el);
203
- },
204
- show = function (ev) {
205
- var cal = $('#' + $(this).data('colorpickerId'));
206
- cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]);
207
- var pos = $(this).offset();
208
- var viewPort = getViewport();
209
- var top = pos.top + this.offsetHeight;
210
- var left = pos.left;
211
- if (top + 176 > viewPort.t + viewPort.h) {
212
- top -= this.offsetHeight + 176;
213
- }
214
- if (left + 356 > viewPort.l + viewPort.w) {
215
- left -= 356;
216
- }
217
- cal.css({left: left + 'px', top: top + 'px'});
218
- if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) {
219
- cal.show();
220
- }
221
- $(document).bind('mousedown', {cal: cal}, hide);
222
- return false;
223
- },
224
- hide = function (ev) {
225
- if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) {
226
- if (ev.data.cal.data('colorpicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) {
227
- ev.data.cal.hide();
228
- }
229
- $(document).unbind('mousedown', hide);
230
- }
231
- },
232
- isChildOf = function(parentEl, el, container) {
233
- if (parentEl == el) {
234
- return true;
235
- }
236
- if (parentEl.contains) {
237
- return parentEl.contains(el);
238
- }
239
- if ( parentEl.compareDocumentPosition ) {
240
- return !!(parentEl.compareDocumentPosition(el) & 16);
241
- }
242
- var prEl = el.parentNode;
243
- while(prEl && prEl != container) {
244
- if (prEl == parentEl)
245
- return true;
246
- prEl = prEl.parentNode;
247
- }
248
- return false;
249
- },
250
- getViewport = function () {
251
- var m = document.compatMode == 'CSS1Compat';
252
- return {
253
- l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft),
254
- t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop),
255
- w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth),
256
- h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight)
257
- };
258
- },
259
- fixHSB = function (hsb) {
260
- return {
261
- h: Math.min(360, Math.max(0, hsb.h)),
262
- s: Math.min(100, Math.max(0, hsb.s)),
263
- b: Math.min(100, Math.max(0, hsb.b))
264
- };
265
- },
266
- fixRGB = function (rgb) {
267
- return {
268
- r: Math.min(255, Math.max(0, rgb.r)),
269
- g: Math.min(255, Math.max(0, rgb.g)),
270
- b: Math.min(255, Math.max(0, rgb.b))
271
- };
272
- },
273
- fixHex = function (hex) {
274
- var len = 6 - hex.length;
275
- if (len > 0) {
276
- var o = [];
277
- for (var i=0; i<len; i++) {
278
- o.push('0');
279
- }
280
- o.push(hex);
281
- hex = o.join('');
282
- }
283
- return hex;
284
- },
285
- HexToRGB = function (hex) {
286
- var hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16);
287
- return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)};
288
- },
289
- HexToHSB = function (hex) {
290
- return RGBToHSB(HexToRGB(hex));
291
- },
292
- RGBToHSB = function (rgb) {
293
- var hsb = {
294
- h: 0,
295
- s: 0,
296
- b: 0
297
- };
298
- var min = Math.min(rgb.r, rgb.g, rgb.b);
299
- var max = Math.max(rgb.r, rgb.g, rgb.b);
300
- var delta = max - min;
301
- hsb.b = max;
302
- if (max != 0) {
303
-
304
- }
305
- hsb.s = max != 0 ? 255 * delta / max : 0;
306
- if (hsb.s != 0) {
307
- if (rgb.r == max) {
308
- hsb.h = (rgb.g - rgb.b) / delta;
309
- } else if (rgb.g == max) {
310
- hsb.h = 2 + (rgb.b - rgb.r) / delta;
311
- } else {
312
- hsb.h = 4 + (rgb.r - rgb.g) / delta;
313
- }
314
- } else {
315
- hsb.h = -1;
316
- }
317
- hsb.h *= 60;
318
- if (hsb.h < 0) {
319
- hsb.h += 360;
320
- }
321
- hsb.s *= 100/255;
322
- hsb.b *= 100/255;
323
- return hsb;
324
- },
325
- HSBToRGB = function (hsb) {
326
- var rgb = {};
327
- var h = Math.round(hsb.h);
328
- var s = Math.round(hsb.s*255/100);
329
- var v = Math.round(hsb.b*255/100);
330
- if(s == 0) {
331
- rgb.r = rgb.g = rgb.b = v;
332
- } else {
333
- var t1 = v;
334
- var t2 = (255-s)*v/255;
335
- var t3 = (t1-t2)*(h%60)/60;
336
- if(h==360) h = 0;
337
- if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3}
338
- else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3}
339
- else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3}
340
- else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3}
341
- else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3}
342
- else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3}
343
- else {rgb.r=0; rgb.g=0; rgb.b=0}
344
- }
345
- return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)};
346
- },
347
- RGBToHex = function (rgb) {
348
- var hex = [
349
- rgb.r.toString(16),
350
- rgb.g.toString(16),
351
- rgb.b.toString(16)
352
- ];
353
- $.each(hex, function (nr, val) {
354
- if (val.length == 1) {
355
- hex[nr] = '0' + val;
356
- }
357
- });
358
- return hex.join('');
359
- },
360
- HSBToHex = function (hsb) {
361
- return RGBToHex(HSBToRGB(hsb));
362
- },
363
- restoreOriginal = function () {
364
- var cal = $(this).parent();
365
- var col = cal.data('colorpicker').origColor;
366
- cal.data('colorpicker').color = col;
367
- fillRGBFields(col, cal.get(0));
368
- fillHexFields(col, cal.get(0));
369
- fillHSBFields(col, cal.get(0));
370
- setSelector(col, cal.get(0));
371
- setHue(col, cal.get(0));
372
- setNewColor(col, cal.get(0));
373
- };
374
- return {
375
- init: function (opt) {
376
- opt = $.extend({}, defaults, opt||{});
377
- if (typeof opt.color == 'string') {
378
- opt.color = HexToHSB(opt.color);
379
- } else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) {
380
- opt.color = RGBToHSB(opt.color);
381
- } else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) {
382
- opt.color = fixHSB(opt.color);
383
- } else {
384
- return this;
385
- }
386
- return this.each(function () {
387
- if (!$(this).data('colorpickerId')) {
388
- var options = $.extend({}, opt);
389
- options.origColor = opt.color;
390
- var id = 'collorpicker_' + parseInt(Math.random() * 1000);
391
- $(this).data('colorpickerId', id);
392
- var cal = $(tpl).attr('id', id);
393
- if (options.flat) {
394
- cal.appendTo(this).show();
395
- } else {
396
- cal.appendTo(document.body);
397
- }
398
- options.fields = cal
399
- .find('input')
400
- .bind('keyup', keyDown)
401
- .bind('change', change)
402
- .bind('blur', blur)
403
- .bind('focus', focus);
404
- cal
405
- .find('span').bind('mousedown', downIncrement).end()
406
- .find('>div.colorpicker_current_color').bind('click', restoreOriginal);
407
- options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector);
408
- options.selectorIndic = options.selector.find('div div');
409
- options.el = this;
410
- options.hue = cal.find('div.colorpicker_hue div');
411
- cal.find('div.colorpicker_hue').bind('mousedown', downHue);
412
- options.newColor = cal.find('div.colorpicker_new_color');
413
- options.currentColor = cal.find('div.colorpicker_current_color');
414
- cal.data('colorpicker', options);
415
- cal.find('div.colorpicker_submit')
416
- .bind('mouseenter', enterSubmit)
417
- .bind('mouseleave', leaveSubmit)
418
- .bind('click', clickSubmit);
419
- fillRGBFields(options.color, cal.get(0));
420
- fillHSBFields(options.color, cal.get(0));
421
- fillHexFields(options.color, cal.get(0));
422
- setHue(options.color, cal.get(0));
423
- setSelector(options.color, cal.get(0));
424
- setCurrentColor(options.color, cal.get(0));
425
- setNewColor(options.color, cal.get(0));
426
- if (options.flat) {
427
- cal.css({
428
- position: 'relative',
429
- display: 'block'
430
- });
431
- } else {
432
- $(this).bind(options.eventName, show);
433
- }
434
- }
435
- });
436
- },
437
- showPicker: function() {
438
- return this.each( function () {
439
- if ($(this).data('colorpickerId')) {
440
- show.apply(this);
441
- }
442
- });
443
- },
444
- hidePicker: function() {
445
- return this.each( function () {
446
- if ($(this).data('colorpickerId')) {
447
- $('#' + $(this).data('colorpickerId')).hide();
448
- }
449
- });
450
- },
451
- setColor: function(col) {
452
- if (typeof col == 'string') {
453
- col = HexToHSB(col);
454
- } else if (col.r != undefined && col.g != undefined && col.b != undefined) {
455
- col = RGBToHSB(col);
456
- } else if (col.h != undefined && col.s != undefined && col.b != undefined) {
457
- col = fixHSB(col);
458
- } else {
459
- return this;
460
- }
461
- return this.each(function(){
462
- if ($(this).data('colorpickerId')) {
463
- var cal = $('#' + $(this).data('colorpickerId'));
464
- cal.data('colorpicker').color = col;
465
- cal.data('colorpicker').origColor = col;
466
- fillRGBFields(col, cal.get(0));
467
- fillHSBFields(col, cal.get(0));
468
- fillHexFields(col, cal.get(0));
469
- setHue(col, cal.get(0));
470
- setSelector(col, cal.get(0));
471
- setCurrentColor(col, cal.get(0));
472
- setNewColor(col, cal.get(0));
473
- }
474
- });
475
- }
476
- };
477
- }();
478
- $.fn.extend({
479
- ColorPicker: ColorPicker.init,
480
- ColorPickerHide: ColorPicker.hidePicker,
481
- ColorPickerShow: ColorPicker.showPicker,
482
- ColorPickerSetColor: ColorPicker.setColor
483
- });
484
  })(jQuery)
1
+ /**
2
+ *
3
+ * Color picker
4
+ * Author: Stefan Petre www.eyecon.ro
5
+ *
6
+ * Dual licensed under the MIT and GPL licenses
7
+ *
8
+ */
9
+ (function ($) {
10
+ var ColorPicker = function () {
11
+ var
12
+ ids = {},
13
+ inAction,
14
+ charMin = 65,
15
+ visible,
16
+ tpl = '<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>',
17
+ defaults = {
18
+ eventName: 'click',
19
+ onShow: function () {},
20
+ onBeforeShow: function(){},
21
+ onHide: function () {},
22
+ onChange: function () {},
23
+ onSubmit: function () {},
24
+ color: 'ff0000',
25
+ livePreview: true,
26
+ flat: false
27
+ },
28
+ fillRGBFields = function (hsb, cal) {
29
+ var rgb = HSBToRGB(hsb);
30
+ $(cal).data('colorpicker').fields
31
+ .eq(1).val(rgb.r).end()
32
+ .eq(2).val(rgb.g).end()
33
+ .eq(3).val(rgb.b).end();
34
+ },
35
+ fillHSBFields = function (hsb, cal) {
36
+ $(cal).data('colorpicker').fields
37
+ .eq(4).val(hsb.h).end()
38
+ .eq(5).val(hsb.s).end()
39
+ .eq(6).val(hsb.b).end();
40
+ },
41
+ fillHexFields = function (hsb, cal) {
42
+ $(cal).data('colorpicker').fields
43
+ .eq(0).val(HSBToHex(hsb)).end();
44
+ },
45
+ setSelector = function (hsb, cal) {
46
+ $(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100}));
47
+ $(cal).data('colorpicker').selectorIndic.css({
48
+ left: parseInt(150 * hsb.s/100, 10),
49
+ top: parseInt(150 * (100-hsb.b)/100, 10)
50
+ });
51
+ },
52
+ setHue = function (hsb, cal) {
53
+ $(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10));
54
+ },
55
+ setCurrentColor = function (hsb, cal) {
56
+ $(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb));
57
+ },
58
+ setNewColor = function (hsb, cal) {
59
+ $(cal).data('colorpicker').newColor.css('backgroundColor', '#' + HSBToHex(hsb));
60
+ },
61
+ keyDown = function (ev) {
62
+ var pressedKey = ev.charCode || ev.keyCode || -1;
63
+ if ((pressedKey > charMin && pressedKey <= 90) || pressedKey == 32) {
64
+ return false;
65
+ }
66
+ var cal = $(this).parent().parent();
67
+ if (cal.data('colorpicker').livePreview === true) {
68
+ change.apply(this);
69
+ }
70
+ },
71
+ change = function (ev) {
72
+ var cal = $(this).parent().parent(), col;
73
+ if (this.parentNode.className.indexOf('_hex') > 0) {
74
+ cal.data('colorpicker').color = col = HexToHSB(fixHex(this.value));
75
+ } else if (this.parentNode.className.indexOf('_hsb') > 0) {
76
+ cal.data('colorpicker').color = col = fixHSB({
77
+ h: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10),
78
+ s: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10),
79
+ b: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10)
80
+ });
81
+ } else {
82
+ cal.data('colorpicker').color = col = RGBToHSB(fixRGB({
83
+ r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10),
84
+ g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10),
85
+ b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10)
86
+ }));
87
+ }
88
+ if (ev) {
89
+ fillRGBFields(col, cal.get(0));
90
+ fillHexFields(col, cal.get(0));
91
+ fillHSBFields(col, cal.get(0));
92
+ }
93
+ setSelector(col, cal.get(0));
94
+ setHue(col, cal.get(0));
95
+ setNewColor(col, cal.get(0));
96
+ cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]);
97
+ },
98
+ blur = function (ev) {
99
+ var cal = $(this).parent().parent();
100
+ cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus');
101
+ },
102
+ focus = function () {
103
+ charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65;
104
+ $(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus');
105
+ $(this).parent().addClass('colorpicker_focus');
106
+ },
107
+ downIncrement = function (ev) {
108
+ var field = $(this).parent().find('input').focus();
109
+ var current = {
110
+ el: $(this).parent().addClass('colorpicker_slider'),
111
+ max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255),
112
+ y: ev.pageY,
113
+ field: field,
114
+ val: parseInt(field.val(), 10),
115
+ preview: $(this).parent().parent().data('colorpicker').livePreview
116
+ };
117
+ $(document).bind('mouseup', current, upIncrement);
118
+ $(document).bind('mousemove', current, moveIncrement);
119
+ },
120
+ moveIncrement = function (ev) {
121
+ ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10))));
122
+ if (ev.data.preview) {
123
+ change.apply(ev.data.field.get(0), [true]);
124
+ }
125
+ return false;
126
+ },
127
+ upIncrement = function (ev) {
128
+ change.apply(ev.data.field.get(0), [true]);
129
+ ev.data.el.removeClass('colorpicker_slider').find('input').focus();
130
+ $(document).unbind('mouseup', upIncrement);
131
+ $(document).unbind('mousemove', moveIncrement);
132
+ return false;
133
+ },
134
+ downHue = function (ev) {
135
+ var current = {
136
+ cal: $(this).parent(),
137
+ y: $(this).offset().top
138
+ };
139
+ current.preview = current.cal.data('colorpicker').livePreview;
140
+ $(document).bind('mouseup', current, upHue);
141
+ $(document).bind('mousemove', current, moveHue);
142
+ },
143
+ moveHue = function (ev) {
144
+ change.apply(
145
+ ev.data.cal.data('colorpicker')
146
+ .fields
147
+ .eq(4)
148
+ .val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10))
149
+ .get(0),
150
+ [ev.data.preview]
151
+ );
152
+ return false;
153
+ },
154
+ upHue = function (ev) {
155
+ fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
156
+ fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
157
+ $(document).unbind('mouseup', upHue);
158
+ $(document).unbind('mousemove', moveHue);
159
+ return false;
160
+ },
161
+ downSelector = function (ev) {
162
+ var current = {
163
+ cal: $(this).parent(),
164
+ pos: $(this).offset()
165
+ };
166
+ current.preview = current.cal.data('colorpicker').livePreview;
167
+ $(document).bind('mouseup', current, upSelector);
168
+ $(document).bind('mousemove', current, moveSelector);
169
+ },
170
+ moveSelector = function (ev) {
171
+ change.apply(
172
+ ev.data.cal.data('colorpicker')
173
+ .fields
174
+ .eq(6)
175
+ .val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10))
176
+ .end()
177
+ .eq(5)
178
+ .val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10))
179
+ .get(0),
180
+ [ev.data.preview]
181
+ );
182
+ return false;
183
+ },
184
+ upSelector = function (ev) {
185
+ fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
186
+ fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
187
+ $(document).unbind('mouseup', upSelector);
188
+ $(document).unbind('mousemove', moveSelector);
189
+ return false;
190
+ },
191
+ enterSubmit = function (ev) {
192
+ $(this).addClass('colorpicker_focus');
193
+ },
194
+ leaveSubmit = function (ev) {
195
+ $(this).removeClass('colorpicker_focus');
196
+ },
197
+ clickSubmit = function (ev) {
198
+ var cal = $(this).parent();
199
+ var col = cal.data('colorpicker').color;
200
+ cal.data('colorpicker').origColor = col;
201
+ setCurrentColor(col, cal.get(0));
202
+ cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el);
203
+ },
204
+ show = function (ev) {
205
+ var cal = $('#' + $(this).data('colorpickerId'));
206
+ cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]);
207
+ var pos = $(this).offset();
208
+ var viewPort = getViewport();
209
+ var top = pos.top + this.offsetHeight;
210
+ var left = pos.left;
211
+ if (top + 176 > viewPort.t + viewPort.h) {
212
+ top -= this.offsetHeight + 176;
213
+ }
214
+ if (left + 356 > viewPort.l + viewPort.w) {
215
+ left -= 356;
216
+ }
217
+ cal.css({left: left + 'px', top: top + 'px'});
218
+ if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) {
219
+ cal.show();
220
+ }
221
+ $(document).bind('mousedown', {cal: cal}, hide);
222
+ return false;
223
+ },
224
+ hide = function (ev) {
225
+ if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) {
226
+ if (ev.data.cal.data('colorpicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) {
227
+ ev.data.cal.hide();
228
+ }
229
+ $(document).unbind('mousedown', hide);
230
+ }
231
+ },
232
+ isChildOf = function(parentEl, el, container) {
233
+ if (parentEl == el) {
234
+ return true;
235
+ }
236
+ if (parentEl.contains) {
237
+ return parentEl.contains(el);
238
+ }
239
+ if ( parentEl.compareDocumentPosition ) {
240
+ return !!(parentEl.compareDocumentPosition(el) & 16);
241
+ }
242
+ var prEl = el.parentNode;
243
+ while(prEl && prEl != container) {
244
+ if (prEl == parentEl)
245
+ return true;
246
+ prEl = prEl.parentNode;
247
+ }
248
+ return false;
249
+ },
250
+ getViewport = function () {
251
+ var m = document.compatMode == 'CSS1Compat';
252
+ return {
253
+ l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft),
254
+ t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop),
255
+ w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth),
256
+ h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight)
257
+ };
258
+ },
259
+ fixHSB = function (hsb) {
260
+ return {
261
+ h: Math.min(360, Math.max(0, hsb.h)),
262
+ s: Math.min(100, Math.max(0, hsb.s)),
263
+ b: Math.min(100, Math.max(0, hsb.b))
264
+ };
265
+ },
266
+ fixRGB = function (rgb) {
267
+ return {
268
+ r: Math.min(255, Math.max(0, rgb.r)),
269
+ g: Math.min(255, Math.max(0, rgb.g)),
270
+ b: Math.min(255, Math.max(0, rgb.b))
271
+ };
272
+ },
273
+ fixHex = function (hex) {
274
+ var len = 6 - hex.length;
275
+ if (len > 0) {
276
+ var o = [];
277
+ for (var i=0; i<len; i++) {
278
+ o.push('0');
279
+ }
280
+ o.push(hex);
281
+ hex = o.join('');
282
+ }
283
+ return hex;
284
+ },
285
+ HexToRGB = function (hex) {
286
+ var hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16);
287
+ return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)};
288
+ },
289
+ HexToHSB = function (hex) {
290
+ return RGBToHSB(HexToRGB(hex));
291
+ },
292
+ RGBToHSB = function (rgb) {
293
+ var hsb = {
294
+ h: 0,
295
+ s: 0,
296
+ b: 0
297
+ };
298
+ var min = Math.min(rgb.r, rgb.g, rgb.b);
299
+ var max = Math.max(rgb.r, rgb.g, rgb.b);
300
+ var delta = max - min;
301
+ hsb.b = max;
302
+ if (max != 0) {
303
+
304
+ }
305
+ hsb.s = max != 0 ? 255 * delta / max : 0;
306
+ if (hsb.s != 0) {
307
+ if (rgb.r == max) {
308
+ hsb.h = (rgb.g - rgb.b) / delta;
309
+ } else if (rgb.g == max) {
310
+ hsb.h = 2 + (rgb.b - rgb.r) / delta;
311
+ } else {
312
+ hsb.h = 4 + (rgb.r - rgb.g) / delta;
313
+ }
314
+ } else {
315
+ hsb.h = -1;
316
+ }
317
+ hsb.h *= 60;
318
+ if (hsb.h < 0) {
319
+ hsb.h += 360;
320
+ }
321
+ hsb.s *= 100/255;
322
+ hsb.b *= 100/255;
323
+ return hsb;
324
+ },
325
+ HSBToRGB = function (hsb) {
326
+ var rgb = {};
327
+ var h = Math.round(hsb.h);
328
+ var s = Math.round(hsb.s*255/100);
329
+ var v = Math.round(hsb.b*255/100);
330
+ if(s == 0) {
331
+ rgb.r = rgb.g = rgb.b = v;
332
+ } else {
333
+ var t1 = v;
334
+ var t2 = (255-s)*v/255;
335
+ var t3 = (t1-t2)*(h%60)/60;
336
+ if(h==360) h = 0;
337
+ if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3}
338
+ else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3}
339
+ else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3}
340
+ else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3}
341
+ else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3}
342
+ else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3}
343
+ else {rgb.r=0; rgb.g=0; rgb.b=0}
344
+ }
345
+ return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)};
346
+ },
347
+ RGBToHex = function (rgb) {
348
+ var hex = [
349
+ rgb.r.toString(16),
350
+ rgb.g.toString(16),
351
+ rgb.b.toString(16)
352
+ ];
353
+ $.each(hex, function (nr, val) {
354
+ if (val.length == 1) {
355
+ hex[nr] = '0' + val;
356
+ }
357
+ });
358
+ return hex.join('');
359
+ },
360
+ HSBToHex = function (hsb) {
361
+ return RGBToHex(HSBToRGB(hsb));
362
+ },
363
+ restoreOriginal = function () {
364
+ var cal = $(this).parent();
365
+ var col = cal.data('colorpicker').origColor;
366
+ cal.data('colorpicker').color = col;
367
+ fillRGBFields(col, cal.get(0));
368
+ fillHexFields(col, cal.get(0));
369
+ fillHSBFields(col, cal.get(0));
370
+ setSelector(col, cal.get(0));
371
+ setHue(col, cal.get(0));
372
+ setNewColor(col, cal.get(0));
373
+ };
374
+ return {
375
+ init: function (opt) {
376
+ opt = $.extend({}, defaults, opt||{});
377
+ if (typeof opt.color == 'string') {
378
+ opt.color = HexToHSB(opt.color);
379
+ } else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) {
380
+ opt.color = RGBToHSB(opt.color);
381
+ } else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) {
382
+ opt.color = fixHSB(opt.color);
383
+ } else {
384
+ return this;
385
+ }
386
+ return this.each(function () {
387
+ if (!$(this).data('colorpickerId')) {
388
+ var options = $.extend({}, opt);
389
+ options.origColor = opt.color;
390
+ var id = 'collorpicker_' + parseInt(Math.random() * 1000);
391
+ $(this).data('colorpickerId', id);
392
+ var cal = $(tpl).attr('id', id);
393
+ if (options.flat) {
394
+ cal.appendTo(this).show();
395
+ } else {
396
+ cal.appendTo(document.body);
397
+ }
398
+ options.fields = cal
399
+ .find('input')
400
+ .bind('keyup', keyDown)
401
+ .bind('change', change)
402
+ .bind('blur', blur)
403
+ .bind('focus', focus);
404
+ cal
405
+ .find('span').bind('mousedown', downIncrement).end()
406
+ .find('>div.colorpicker_current_color').bind('click', restoreOriginal);
407
+ options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector);
408
+ options.selectorIndic = options.selector.find('div div');
409
+ options.el = this;
410
+ options.hue = cal.find('div.colorpicker_hue div');
411
+ cal.find('div.colorpicker_hue').bind('mousedown', downHue);
412
+ options.newColor = cal.find('div.colorpicker_new_color');
413
+ options.currentColor = cal.find('div.colorpicker_current_color');
414
+ cal.data('colorpicker', options);
415
+ cal.find('div.colorpicker_submit')
416
+ .bind('mouseenter', enterSubmit)
417
+ .bind('mouseleave', leaveSubmit)
418
+ .bind('click', clickSubmit);
419
+ fillRGBFields(options.color, cal.get(0));
420
+ fillHSBFields(options.color, cal.get(0));
421
+ fillHexFields(options.color, cal.get(0));
422
+ setHue(options.color, cal.get(0));
423
+ setSelector(options.color, cal.get(0));
424
+ setCurrentColor(options.color, cal.get(0));
425
+ setNewColor(options.color, cal.get(0));
426
+ if (options.flat) {
427
+ cal.css({
428
+ position: 'relative',
429
+ display: 'block'
430
+ });
431
+ } else {
432
+ $(this).bind(options.eventName, show);
433
+ }
434
+ }
435
+ });
436
+ },
437
+ showPicker: function() {
438
+ return this.each( function () {
439
+ if ($(this).data('colorpickerId')) {
440
+ show.apply(this);
441
+ }
442
+ });
443
+ },
444
+ hidePicker: function() {
445
+ return this.each( function () {
446
+ if ($(this).data('colorpickerId')) {
447
+ $('#' + $(this).data('colorpickerId')).hide();
448
+ }
449
+ });
450
+ },
451
+ setColor: function(col) {
452
+ if (typeof col == 'string') {
453
+ col = HexToHSB(col);
454
+ } else if (col.r != undefined && col.g != undefined && col.b != undefined) {
455
+ col = RGBToHSB(col);
456
+ } else if (col.h != undefined && col.s != undefined && col.b != undefined) {
457
+ col = fixHSB(col);
458
+ } else {
459
+ return this;
460
+ }
461
+ return this.each(function(){
462
+ if ($(this).data('colorpickerId')) {
463
+ var cal = $('#' + $(this).data('colorpickerId'));
464
+ cal.data('colorpicker').color = col;
465
+ cal.data('colorpicker').origColor = col;
466
+ fillRGBFields(col, cal.get(0));
467
+ fillHSBFields(col, cal.get(0));
468
+ fillHexFields(col, cal.get(0));
469
+ setHue(col, cal.get(0));
470
+ setSelector(col, cal.get(0));
471
+ setCurrentColor(col, cal.get(0));
472
+ setNewColor(col, cal.get(0));
473
+ }
474
+ });
475
+ }
476
+ };
477
+ }();
478
+ $.fn.extend({
479
+ ColorPicker: ColorPicker.init,
480
+ ColorPickerHide: ColorPicker.hidePicker,
481
+ ColorPickerShow: ColorPicker.showPicker,
482
+ ColorPickerSetColor: ColorPicker.setColor
483
+ });
484
  })(jQuery)
inc/js/easy-modal-admin.js ADDED
@@ -0,0 +1,334 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function(){
2
+ var active_tab = window.location.hash.replace('#top#','');
3
+ if ( active_tab == '' )
4
+ active_tab = jQuery('.em-tab').attr('id');
5
+ jQuery('#'+active_tab).addClass('active');
6
+ jQuery('#'+active_tab+'-tab').addClass('nav-tab-active');
7
+
8
+ jQuery('#em-tabs a').click(function() {
9
+ jQuery('#em-tabs a').removeClass('nav-tab-active');
10
+ jQuery('.em-tab').removeClass('active');
11
+
12
+ var id = jQuery(this).attr('id').replace('-tab','');
13
+ jQuery('#'+id).addClass('active');
14
+ jQuery(this).addClass('nav-tab-active');
15
+ });
16
+
17
+
18
+
19
+ /* Value Sliders */
20
+ jQuery("#overlayOpacitySlider")
21
+ .slider({value: 0,range: "min",min: 0,max: 100,step: 1,slide: function(t, n){
22
+ jQuery("#overlayOpacity").val(n.value)
23
+ jQuery("#overlayOpacityValue").text(n.value)
24
+ jQuery(".example-modal-overlay").css({
25
+ opacity: n.value / 100
26
+ })
27
+ }})
28
+ jQuery("#containerPaddingSlider")
29
+ .slider({value: 0,range: "min",min: 0,max: 40,step: 1,slide: function(t, n){
30
+ jQuery("#containerPadding").val(n.value)
31
+ jQuery("#containerPaddingValue").text(n.value)
32
+ jQuery(".example-modal").css({
33
+ padding: n.value + "px"
34
+ })
35
+ }})
36
+ jQuery("#containerBorderWidthSlider")
37
+ .slider({value: 0,range: "min",min: 0,max: 10,step: 1,slide: function(t, n){
38
+ jQuery("#containerBorderWidth").val(n.value), jQuery("#containerBorderWidthValue").text(n.value), jQuery(".example-modal").css({
39
+ borderWidth: n.value + "px"
40
+ })
41
+ }})
42
+ jQuery("#containerBorderRadiusSlider")
43
+ .slider({value: 0,range: "min",min: 0,max: 50,step: 1,slide: function(t, n){
44
+ jQuery("#containerBorderRadius").val(n.value), jQuery("#containerBorderRadiusValue").text(n.value);
45
+ var r = n.value + "px";
46
+ jQuery(".example-modal").css({
47
+ "-moz-border-radius": r,
48
+ "-webkit-border-radius": r,
49
+ "border-radius": r
50
+ })
51
+ }})
52
+ jQuery("#contentTitleFontSizeSlider")
53
+ .slider({value: 0,range: "min",min: 12,max: 48,step: 1,slide: function(t, n){
54
+ jQuery("#contentTitleFontSize").val(n.value), jQuery("#contentTitleFontSizeValue").text(n.value);
55
+ var r = n.value + "px";
56
+ jQuery(".example-modal .title").css({
57
+ fontSize: r
58
+ })
59
+ }})
60
+ jQuery("#closeBorderRadiusSlider")
61
+ .slider({value: 0,range: "min",min: 0,max: Math.round(jQuery("#closeSize").val() / 2),step: 1,slide: function(t, n){
62
+ jQuery("#closeBorderRadius").val(n.value), jQuery("#closeBorderRadiusValue").text(n.value);
63
+ var r = n.value + "px";
64
+ jQuery(".example-modal .close-modal").css({
65
+ "-moz-border-radius": r,
66
+ "-webkit-border-radius": r,
67
+ "border-radius": r
68
+ })
69
+ }})
70
+ jQuery("#closeFontSizeSlider")
71
+ .slider({value: 0,range: "min",min: 0,max: Math.round(jQuery("#closeSize").val() - 2),step: 1,slide: function(t, n){
72
+ jQuery("#closeFontSize").val(n.value), jQuery("#closeFontSizeValue").text(n.value);
73
+ var r = n.value + "px";
74
+ jQuery(".example-modal .close-modal").css({
75
+ fontSize: r
76
+ })
77
+ }})
78
+ jQuery("#closeSizeSlider")
79
+ .slider({value: 0,range: "min",min: 0,max: 40,step: 1,slide: function(t, n){
80
+ jQuery("#closeSize").val(n.value)
81
+ jQuery("#closeSizeValue").text(n.value);
82
+ var r = n.value,i = s = o = u = "auto";
83
+ switch (jQuery("[name=closePosition]").val()) {
84
+ case "topright":
85
+ i = -(r / 2) + "px", u = -(r / 2) + "px";
86
+ break;
87
+ case "topleft":
88
+ i = -(r / 2) + "px", o = -(r / 2) + "px";
89
+ break;
90
+ case "bottomright":
91
+ s = -(r / 2) + "px", u = -(r / 2) + "px";
92
+ break;
93
+ case "bottomleft":
94
+ s = -(r / 2) + "px", o = -(r / 2) + "px"
95
+ }
96
+
97
+ var a = jQuery("#closeFontSizeSlider").slider("value");
98
+
99
+ a > r - 2 && (a = r - 2)
100
+ jQuery("#closeFontSizeValue").text(a)
101
+ jQuery(".example-modal .close-modal")
102
+ .css({fontSize: a + "px"})
103
+
104
+ jQuery("#closeFontSizeSlider")
105
+ .slider("option", "max", r - 2)
106
+ .slider("option", "value", a);
107
+
108
+ var f = Math.round(r / 2),
109
+ l = jQuery("#closeBorderRadiusSlider").slider("value");
110
+ l > f && (l = f)
111
+ jQuery("#closeBorderRadiusValue").text(l)
112
+
113
+ jQuery(".example-modal .close-modal")
114
+ .css({"-webkit-border-radius": l + "px","border-radius": l + "px"})
115
+
116
+ jQuery("#closeBorderRadiusSlider")
117
+ .slider("option", "max", f)
118
+ .slider("option", "value", l)
119
+
120
+ jQuery(".example-modal .close-modal")
121
+ .css({width: r + "px",height: r + "px",lineHeight: r + "px",left: o,right: u,top: i,bottom: s})
122
+ }})
123
+ jQuery("#autoOpenDelaySlider")
124
+ .slider({value: 0,range: "min",min: 0,max: 1e4,step: 500,slide: function(t, n){
125
+ jQuery("#autoOpenDelay").val(n.value)
126
+ jQuery("#autoOpenDelayValue").text(n.value)
127
+ }})
128
+
129
+
130
+ /* Color Pickers */
131
+
132
+
133
+ jQuery(".color-swatch")
134
+ .each(function(){
135
+ var swatch = jQuery(this);
136
+ var input = swatch.prev('.colorSelect');
137
+ swatch.ColorPicker({
138
+ color: input.val(),
139
+ onShow: function(colpkr){
140
+ return jQuery(colpkr).fadeIn(500), !1
141
+ },
142
+ onHide: function(colpkr){
143
+ return jQuery(colpkr).fadeOut(500), !1
144
+ },
145
+ onChange: function(n, r, i){
146
+ swatch.css("backgroundColor", "#" + r)
147
+ input.val("#" + r);
148
+ switch (input.attr("name")) {
149
+ case "overlayColor": jQuery(".example-modal-overlay").css({backgroundColor: "#" + r});
150
+ break;
151
+ case "containerBgColor": jQuery(".example-modal").css({backgroundColor: "#" + r});
152
+ break;
153
+ case "containerBorderColor": jQuery(".example-modal").css({borderColor: "#" + r});
154
+ break;
155
+ case "contentTitleFontColor": jQuery(".example-modal .title").css({color: "#" + r});
156
+ break;
157
+ case "contentFontColor": jQuery(".example-modal").css({color: "#" + r});
158
+ break;
159
+ case "closeBgColor": jQuery(".example-modal .close-modal").css({backgroundColor: "#" + r});
160
+ break;
161
+ case "closeBorderColor": jQuery(".example-modal .close-modal").css({borderColor: "#" + r});
162
+ break;
163
+ case "closeFontColor": jQuery(".example-modal .close-modal").css({color: "#" + r})
164
+ }
165
+ }
166
+ })
167
+ })
168
+ jQuery(".colorSelect")
169
+ .on('focusout', function(){
170
+ var $this = jQuery(this);
171
+ $this.next('.color-swatch').css('backgroundColor', $this.val()).ColorPickerSetColor($this.val())
172
+ var color = $this.val();
173
+ switch ($this.attr("name")){
174
+ case "overlayColor": jQuery(".example-modal-overlay").css({backgroundColor: color});
175
+ break;
176
+ case "containerBgColor": jQuery(".example-modal").css({backgroundColor: color});
177
+ break;
178
+ case "containerBorderColor": jQuery(".example-modal").css({borderColor: color});
179
+ break;
180
+ case "contentTitleFontColor": jQuery(".example-modal .title").css({color: color});
181
+ break;
182
+ case "contentFontColor": jQuery(".example-modal").css({color: color});
183
+ break;
184
+ case "closeBgColor": jQuery(".example-modal .close-modal").css({backgroundColor: color});
185
+ break;
186
+ case "closeBorderColor": jQuery(".example-modal .close-modal").css({borderColor: color});
187
+ break;
188
+ case "closeFontColor": jQuery(".example-modal .close-modal").css({color: color})
189
+ }
190
+ })
191
+
192
+ jQuery("#autoOpenDelay")
193
+ .on("change", function(){
194
+ jQuery("#autoOpenDelaySlider").slider("option", "value", jQuery(this).val())
195
+ })
196
+ jQuery(".cb-enable")
197
+ .click(function(){
198
+ var t = jQuery(this).parents(".switch");
199
+ jQuery(".cb-disable", t).removeClass("selected")
200
+ jQuery(this).addClass("selected")
201
+ jQuery(".checkbox", t).attr("checked", !0)
202
+ })
203
+
204
+ jQuery(".cb-disable")
205
+ .click(function(){
206
+ var t = jQuery(this).parents(".switch");
207
+ jQuery(".cb-enable", t).removeClass("selected")
208
+ jQuery(this).addClass("selected")
209
+ jQuery(".checkbox", t).attr("checked", !1)
210
+ })
211
+ jQuery(".switch")
212
+ .each(function(){
213
+ var t = jQuery(this),
214
+ n = jQuery(".checkbox", t);
215
+ n.is(":checked") && (jQuery(".cb-disable", t).removeClass("selected"), jQuery(".cb-enable", t).addClass("selected"))
216
+ })
217
+ jQuery("#containerBorderStyle")
218
+ .on('change',function(){
219
+ var $this = jQuery(this)
220
+ var val = $this.val();
221
+ jQuery(".example-modal").css({borderStyle: val})
222
+ if(val == 'none')
223
+ {
224
+ jQuery('.border-only').hide()
225
+ }
226
+ else
227
+ {
228
+ jQuery('.border-only').show()
229
+ }
230
+ })
231
+
232
+ jQuery("#contentTitleFontFamily")
233
+ .change(function(){
234
+ var t = jQuery(this).val();
235
+ jQuery(".example-modal .title").css({
236
+ fontFamily: t
237
+ })
238
+ })
239
+ jQuery("#closePosition")
240
+ .change(function(){
241
+ var t = parseInt(jQuery("#closeSize").val()),
242
+ n = bottom = left = right = "auto";
243
+ switch (jQuery(this).val()) {
244
+ case "topright":
245
+ n = -(t / 2) + "px", right = -(t / 2) + "px";
246
+ break;
247
+ case "topleft":
248
+ n = -(t / 2) + "px", left = -(t / 2) + "px";
249
+ break;
250
+ case "bottomright":
251
+ bottom = -(t / 2) + "px", right = -(t / 2) + "px";
252
+ break;
253
+ case "bottomleft":
254
+ bottom = -(t / 2) + "px", left = -(t / 2) + "px"
255
+ }
256
+ jQuery(".example-modal .close-modal")
257
+ .css({left: left,right: right,top: n,bottom: bottom})
258
+ })
259
+ jQuery('#closeLocation')
260
+ .on('change',function(){
261
+ var $this = jQuery(this)
262
+ var val = $this.val();
263
+ if(val == 'inside')
264
+ {
265
+ jQuery('.outside-only').hide()
266
+ jQuery('.close-modal').removeAttr('styles');
267
+ }
268
+ else
269
+ {
270
+ jQuery('.outside-only').show()
271
+ }
272
+ })
273
+ jQuery("#size")
274
+ .on('change',function(){
275
+ var $this = jQuery(this)
276
+ var val = $this.val();
277
+ if(val != 'custom')
278
+ {
279
+ jQuery('.custom-size-only').hide()
280
+ }
281
+ else
282
+ {
283
+ jQuery('.custom-size-only').show()
284
+ }
285
+ })
286
+ jQuery("#animation")
287
+ .on('change',function(){
288
+ var $this = jQuery(this)
289
+ var val = $this.val();
290
+ if(val == 'fade' || val == 'grow')
291
+ {
292
+ jQuery('.animation-only').hide()
293
+ }
294
+ else
295
+ {
296
+ jQuery('.animation-only').show()
297
+ }
298
+ })
299
+
300
+ jQuery("#overlayOpacitySlider").slider("option", "value", jQuery("#overlayOpacity").val())
301
+ jQuery("#containerPaddingSlider").slider("option", "value", jQuery("#containerPadding").val())
302
+ jQuery("#containerBorderWidthSlider").slider("option", "value", jQuery("#containerBorderWidth").val())
303
+ jQuery("#containerBorderRadiusSlider").slider("option", "value", jQuery("#containerBorderRadius").val())
304
+ jQuery("#contentTitleFontSizeSlider").slider("option", "value", jQuery("#contentTitleFontSize").val())
305
+ jQuery("#closeBorderRadiusSlider").slider("option", "value", jQuery("#closeBorderRadius").val())
306
+ jQuery("#closeFontSizeSlider").slider("option", "value", jQuery("#closeFontSize").val())
307
+ jQuery("#closeSizeSlider").slider("option", "value", jQuery("#closeSize").val())
308
+ jQuery("#autoOpenDelaySlider").slider("option", "value", jQuery("#autoOpenDelay").val())
309
+
310
+ jQuery(document)
311
+ .on("click", '.close-modal',function(){
312
+ jQuery(this).parent('.modal').fadeOut();
313
+ jQuery('.modal-overlay').fadeOut(function(){jQuery(this).remove();})
314
+ })
315
+ .on("click", '.modal-overlay',function(){
316
+ jQuery('.modal:visible').fadeOut(function(){jQuery(this).css('visibility','hidden');});
317
+ jQuery(this).fadeOut(function(){jQuery(this).remove();})
318
+ })
319
+ .on("keyup",function(e){
320
+ if (e.keyCode == 27) {
321
+ jQuery('.modal:visible').fadeOut(function(){jQuery(this).css('visibility','hidden');});
322
+ jQuery('.modal-overlay').fadeOut(function(){jQuery(this).remove();})
323
+ }
324
+ })
325
+
326
+ jQuery(document)
327
+ .on("click", '.write-it', function(){
328
+ jQuery('<div class="modal-overlay" />').appendTo('body').fadeIn();
329
+ jQuery('#eModal-Admin-1').css('visibility','visible').fadeIn();
330
+ return false;
331
+ })
332
+
333
+
334
+ });
inc/js/easy-modal-admin.min.js CHANGED
@@ -1 +1,72 @@
1
- (function(e){e(document).ready(function(){e("#accordion").accordion(),setTimeout(function(){var t=parseInt(e("[name=containerBorderRadius]").val())+"px";e("#eModal-Container").css({"-moz-border-radius":t,"-webkit-border-radius":t,"border-radius":t})},1e3),e("#overlayOpacitySlider").slider({value:0,range:"min",min:0,max:100,step:1,slide:function(t,n){e("#overlayOpacity").val(n.value),e("#overlayOpacityValue").text(n.value),e("#eModal-Overlay").css({opacity:n.value/100})}}),e("#overlayOpacitySlider").slider("option","value",e("#overlayOpacity").val()),e("#containerPaddingSlider").slider({value:0,range:"min",min:0,max:40,step:1,slide:function(t,n){e("#containerPadding").val(n.value),e("#containerPaddingValue").text(n.value),e("#eModal-Container").css({padding:n.value+"px"})}}),e("#containerPaddingSlider").slider("option","value",e("#containerPadding").val()),e("#containerBorderWidthSlider").slider({value:0,range:"min",min:0,max:10,step:1,slide:function(t,n){e("#containerBorderWidth").val(n.value),e("#containerBorderWidthValue").text(n.value),e("#eModal-Container").css({borderWidth:n.value+"px"})}}),e("#containerBorderWidthSlider").slider("option","value",e("#containerBorderWidth").val()),e("[name=containerBorderStyle]").change(function(){var t=e(this).val();e("#eModal-Container").css({borderStyle:t})}),e("#containerBorderRadiusSlider").slider({value:0,range:"min",min:0,max:50,step:1,slide:function(t,n){e("#containerBorderRadius").val(n.value),e("#containerBorderRadiusValue").text(n.value);var r=n.value+"px";e("#eModal-Container").css({"-moz-border-radius":r,"-webkit-border-radius":r,"border-radius":r})}}),e("#containerBorderRadiusSlider").slider("option","value",e("#containerBorderRadius").val()),e("#contentTitleFontSizeSlider").slider({value:0,range:"min",min:12,max:48,step:1,slide:function(t,n){e("#contentTitleFontSize").val(n.value),e("#contentTitleFontSizeValue").text(n.value);var r=n.value+"px";e("#eModal-Title").css({fontSize:r})}}),e("#contentTitleFontSizeSlider").slider("option","value",e("#contentTitleFontSize").val()),e("[name=contentTitleFontFamily]").change(function(){var t=e(this).val();e("#eModal-Title").css({fontFamily:t})}),e("#closeBorderRadiusSlider").slider({value:0,range:"min",min:0,max:Math.round(e("#closeSize").val()/2),step:1,slide:function(t,n){e("#closeBorderRadius").val(n.value),e("#closeBorderRadiusValue").text(n.value);var r=n.value+"px";e("#eModal-Close").css({"-moz-border-radius":r,"-webkit-border-radius":r,"border-radius":r})}}),e("#closeBorderRadiusSlider").slider("option","value",e("#closeBorderRadius").val()),e("#closeFontSizeSlider").slider({value:0,range:"min",min:0,max:Math.round(e("#closeSize").val()-2),step:1,slide:function(t,n){e("#closeFontSize").val(n.value),e("#closeFontSizeValue").text(n.value);var r=n.value+"px";e("#eModal-Close").css({fontSize:r})}}),e("#closeFontSizeSlider").slider("option","value",e("#closeFontSize").val()),e("#closeSizeSlider").slider({value:0,range:"min",min:0,max:40,step:1,slide:function(t,n){e("#closeSize").val(n.value),e("#closeSizeValue").text(n.value);var r=n.value,i,s,o,u="auto";switch(e("[name=closePosition]").val()){case"topright":i=-(r/2)+"px",u=-(r/2)+"px";break;case"topleft":i=-(r/2)+"px",o=-(r/2)+"px";break;case"bottomright":s=-(r/2)+"px",u=-(r/2)+"px";break;case"bottomleft":s=-(r/2)+"px",o=-(r/2)+"px"}var a=e("#closeFontSizeSlider").slider("value");a>r-2&&(a=r-2),e("#closeFontSizeValue").text(a),e("#eModal-Close").css({fontSize:a+"px"}),e("#closeFontSizeSlider").slider("option","max",r-2).slider("option","value",a);var f=Math.round(r/2),l=e("#closeBorderRadiusSlider").slider("value");l>f&&(l=f),e("#closeBorderRadiusValue").text(l),e("#eModal-Close").css({"-moz-border-radius":l+"px","-webkit-border-radius":l+"px","border-radius":l+"px"}),e("#closeBorderRadiusSlider").slider("option","max",f).slider("option","value",l),e("#eModal-Close").css({width:r+"px",height:r+"px",lineHeight:r+"px",left:o,right:u,top:i,bottom:s})}}),e("#closeSizeSlider").slider("option","value",e("#closeSize").val()),e("#closePosition").change(function(){var t=parseInt(e("#closeSize").val()),n=bottom=left=right="auto";switch(e(this).val()){case"topright":n=-(t/2)+"px",right=-(t/2)+"px";break;case"topleft":n=-(t/2)+"px",left=-(t/2)+"px";break;case"bottomright":bottom=-(t/2)+"px",right=-(t/2)+"px";break;case"bottomleft":bottom=-(t/2)+"px",left=-(t/2)+"px"}e("#eModal-Close").css({left:left,right:right,top:n,bottom:bottom})}),e(".colorSelect").each(function(){var t=e(this);e(this).ColorPicker({color:e(t).val(),onShow:function(t){return e(t).fadeIn(500),!1},onHide:function(t){return e(t).fadeOut(500),!1},onChange:function(n,r,i){e(t).css("backgroundColor","#"+r).val("#"+r);switch(e(t).attr("name")){case"overlayColor":e("#eModal-Overlay").css({backgroundColor:"#"+r});break;case"containerBgColor":e("#eModal-Container").css({backgroundColor:"#"+r});break;case"containerBorderColor":e("#eModal-Container").css({borderColor:"#"+r});break;case"contentTitleFontColor":e("#eModal-Title").css({color:"#"+r});break;case"contentFontColor":e("#eModal-Container").css({color:"#"+r});break;case"closeBgColor":e("#eModal-Close").css({backgroundColor:"#"+r});break;case"closeBorderColor":e("#eModal-Close").css({borderColor:"#"+r});break;case"closeFontColor":e("#eModal-Close").css({color:"#"+r})}}})})}),e(document).ready(function(){e("#userMaxHeightSlider").slider({value:0,range:"min",min:0,max:100,step:1,slide:function(t,n){e("#userMaxHeight").val(n.value)}}),e("#userMaxHeight").live("change",function(){e("#userMaxHeightSlider").slider("option","value",e(this).val())}),e("#userMaxWidthSlider").slider({value:0,range:"min",min:0,max:100,step:1,slide:function(t,n){e("#userMaxWidth").val(n.value)}}),e("#userMaxWidth").live("change",function(){e("#userMaxWidthSlider").slider("option","value",e(this).val())}),e("#userMaxHeightSlider").slider("option","value",e("#userMaxHeight").val()),e("#userMaxWidthSlider").slider("option","value",e("#userMaxWidth").val())}),e(document).ready(function(){e("#autoOpenDelaySlider").slider({value:0,range:"min",min:0,max:1e4,step:500,slide:function(t,n){e("#autoOpenDelay").val(n.value),e("#autoOpenDelayValue").text(n.value)}}),e("#autoOpenDelay").live("change",function(){e("#autoOpenDelaySlider").slider("option","value",e(this).val())}),e("#autoOpenDelaySlider").slider("option","value",e("#autoOpenDelay").val()),e(".cb-enable").click(function(){var t=e(this).parents(".switch");e(".cb-disable",t).removeClass("selected"),e(this).addClass("selected"),e(".checkbox",t).attr("checked",!0)}),e(".cb-disable").click(function(){var t=e(this).parents(".switch");e(".cb-enable",t).removeClass("selected"),e(this).addClass("selected"),e(".checkbox",t).attr("checked",!1)}),e(".switch").each(function(){var t=e(this),n=e(".checkbox",t);n.is(":checked")&&(e(".cb-disable",t).removeClass("selected"),e(".cb-enable",t).addClass("selected"))})})})(jQuery)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function(){var active_tab=window.location.hash.replace('#top#','');if(active_tab=='')
2
+ active_tab=jQuery('.em-tab').attr('id');jQuery('#'+active_tab).addClass('active');jQuery('#'+active_tab+'-tab').addClass('nav-tab-active');jQuery('#em-tabs a').click(function(){jQuery('#em-tabs a').removeClass('nav-tab-active');jQuery('.em-tab').removeClass('active');var id=jQuery(this).attr('id').replace('-tab','');jQuery('#'+id).addClass('active');jQuery(this).addClass('nav-tab-active');});jQuery("#overlayOpacitySlider").slider({value:0,range:"min",min:0,max:100,step:1,slide:function(t,n){jQuery("#overlayOpacity").val(n.value)
3
+ jQuery("#overlayOpacityValue").text(n.value)
4
+ jQuery(".example-modal-overlay").css({opacity:n.value/100})}})
5
+ jQuery("#containerPaddingSlider").slider({value:0,range:"min",min:0,max:40,step:1,slide:function(t,n){jQuery("#containerPadding").val(n.value)
6
+ jQuery("#containerPaddingValue").text(n.value)
7
+ jQuery(".example-modal").css({padding:n.value+"px"})}})
8
+ jQuery("#containerBorderWidthSlider").slider({value:0,range:"min",min:0,max:10,step:1,slide:function(t,n){jQuery("#containerBorderWidth").val(n.value),jQuery("#containerBorderWidthValue").text(n.value),jQuery(".example-modal").css({borderWidth:n.value+"px"})}})
9
+ jQuery("#containerBorderRadiusSlider").slider({value:0,range:"min",min:0,max:50,step:1,slide:function(t,n){jQuery("#containerBorderRadius").val(n.value),jQuery("#containerBorderRadiusValue").text(n.value);var r=n.value+"px";jQuery(".example-modal").css({"-moz-border-radius":r,"-webkit-border-radius":r,"border-radius":r})}})
10
+ jQuery("#contentTitleFontSizeSlider").slider({value:0,range:"min",min:12,max:48,step:1,slide:function(t,n){jQuery("#contentTitleFontSize").val(n.value),jQuery("#contentTitleFontSizeValue").text(n.value);var r=n.value+"px";jQuery(".example-modal .title").css({fontSize:r})}})
11
+ jQuery("#closeBorderRadiusSlider").slider({value:0,range:"min",min:0,max:Math.round(jQuery("#closeSize").val()/2),step:1,slide:function(t,n){jQuery("#closeBorderRadius").val(n.value),jQuery("#closeBorderRadiusValue").text(n.value);var r=n.value+"px";jQuery(".example-modal .close-modal").css({"-moz-border-radius":r,"-webkit-border-radius":r,"border-radius":r})}})
12
+ jQuery("#closeFontSizeSlider").slider({value:0,range:"min",min:0,max:Math.round(jQuery("#closeSize").val()-2),step:1,slide:function(t,n){jQuery("#closeFontSize").val(n.value),jQuery("#closeFontSizeValue").text(n.value);var r=n.value+"px";jQuery(".example-modal .close-modal").css({fontSize:r})}})
13
+ jQuery("#closeSizeSlider").slider({value:0,range:"min",min:0,max:40,step:1,slide:function(t,n){jQuery("#closeSize").val(n.value)
14
+ jQuery("#closeSizeValue").text(n.value);var r=n.value,i=s=o=u="auto";switch(jQuery("[name=closePosition]").val()){case"topright":i=-(r/2)+"px",u=-(r/2)+"px";break;case"topleft":i=-(r/2)+"px",o=-(r/2)+"px";break;case"bottomright":s=-(r/2)+"px",u=-(r/2)+"px";break;case"bottomleft":s=-(r/2)+"px",o=-(r/2)+"px"}
15
+ var a=jQuery("#closeFontSizeSlider").slider("value");a>r-2&&(a=r-2)
16
+ jQuery("#closeFontSizeValue").text(a)
17
+ jQuery(".example-modal .close-modal").css({fontSize:a+"px"})
18
+ jQuery("#closeFontSizeSlider").slider("option","max",r-2).slider("option","value",a);var f=Math.round(r/2),l=jQuery("#closeBorderRadiusSlider").slider("value");l>f&&(l=f)
19
+ jQuery("#closeBorderRadiusValue").text(l)
20
+ jQuery(".example-modal .close-modal").css({"-webkit-border-radius":l+"px","border-radius":l+"px"})
21
+ jQuery("#closeBorderRadiusSlider").slider("option","max",f).slider("option","value",l)
22
+ jQuery(".example-modal .close-modal").css({width:r+"px",height:r+"px",lineHeight:r+"px",left:o,right:u,top:i,bottom:s})}})
23
+ jQuery("#autoOpenDelaySlider").slider({value:0,range:"min",min:0,max:1e4,step:500,slide:function(t,n){jQuery("#autoOpenDelay").val(n.value)
24
+ jQuery("#autoOpenDelayValue").text(n.value)}})
25
+ jQuery(".color-swatch").each(function(){var swatch=jQuery(this);var input=swatch.prev('.colorSelect');swatch.ColorPicker({color:input.val(),onShow:function(colpkr){return jQuery(colpkr).fadeIn(500),!1},onHide:function(colpkr){return jQuery(colpkr).fadeOut(500),!1},onChange:function(n,r,i){swatch.css("backgroundColor","#"+r)
26
+ input.val("#"+r);switch(input.attr("name")){case"overlayColor":jQuery(".example-modal-overlay").css({backgroundColor:"#"+r});break;case"containerBgColor":jQuery(".example-modal").css({backgroundColor:"#"+r});break;case"containerBorderColor":jQuery(".example-modal").css({borderColor:"#"+r});break;case"contentTitleFontColor":jQuery(".example-modal .title").css({color:"#"+r});break;case"contentFontColor":jQuery(".example-modal").css({color:"#"+r});break;case"closeBgColor":jQuery(".example-modal .close-modal").css({backgroundColor:"#"+r});break;case"closeBorderColor":jQuery(".example-modal .close-modal").css({borderColor:"#"+r});break;case"closeFontColor":jQuery(".example-modal .close-modal").css({color:"#"+r})}}})})
27
+ jQuery(".colorSelect").on('focusout',function(){var $this=jQuery(this);$this.next('.color-swatch').css('backgroundColor',$this.val()).ColorPickerSetColor($this.val())
28
+ var color=$this.val();switch($this.attr("name")){case"overlayColor":jQuery(".example-modal-overlay").css({backgroundColor:color});break;case"containerBgColor":jQuery(".example-modal").css({backgroundColor:color});break;case"containerBorderColor":jQuery(".example-modal").css({borderColor:color});break;case"contentTitleFontColor":jQuery(".example-modal .title").css({color:color});break;case"contentFontColor":jQuery(".example-modal").css({color:color});break;case"closeBgColor":jQuery(".example-modal .close-modal").css({backgroundColor:color});break;case"closeBorderColor":jQuery(".example-modal .close-modal").css({borderColor:color});break;case"closeFontColor":jQuery(".example-modal .close-modal").css({color:color})}})
29
+ jQuery("#autoOpenDelay").on("change",function(){jQuery("#autoOpenDelaySlider").slider("option","value",jQuery(this).val())})
30
+ jQuery(".cb-enable").click(function(){var t=jQuery(this).parents(".switch");jQuery(".cb-disable",t).removeClass("selected")
31
+ jQuery(this).addClass("selected")
32
+ jQuery(".checkbox",t).attr("checked",!0)})
33
+ jQuery(".cb-disable").click(function(){var t=jQuery(this).parents(".switch");jQuery(".cb-enable",t).removeClass("selected")
34
+ jQuery(this).addClass("selected")
35
+ jQuery(".checkbox",t).attr("checked",!1)})
36
+ jQuery(".switch").each(function(){var t=jQuery(this),n=jQuery(".checkbox",t);n.is(":checked")&&(jQuery(".cb-disable",t).removeClass("selected"),jQuery(".cb-enable",t).addClass("selected"))})
37
+ jQuery("#containerBorderStyle").on('change',function(){var $this=jQuery(this)
38
+ var val=$this.val();jQuery(".example-modal").css({borderStyle:val})
39
+ if(val=='none')
40
+ {jQuery('.border-only').hide()}
41
+ else
42
+ {jQuery('.border-only').show()}})
43
+ jQuery("#contentTitleFontFamily").change(function(){var t=jQuery(this).val();jQuery(".example-modal .title").css({fontFamily:t})})
44
+ jQuery("#closePosition").change(function(){var t=parseInt(jQuery("#closeSize").val()),n=bottom=left=right="auto";switch(jQuery(this).val()){case"topright":n=-(t/2)+"px",right=-(t/2)+"px";break;case"topleft":n=-(t/2)+"px",left=-(t/2)+"px";break;case"bottomright":bottom=-(t/2)+"px",right=-(t/2)+"px";break;case"bottomleft":bottom=-(t/2)+"px",left=-(t/2)+"px"}
45
+ jQuery(".example-modal .close-modal").css({left:left,right:right,top:n,bottom:bottom})})
46
+ jQuery('#closeLocation').on('change',function(){var $this=jQuery(this)
47
+ var val=$this.val();if(val=='inside')
48
+ {jQuery('.outside-only').hide()
49
+ jQuery('.close-modal').removeAttr('styles');}
50
+ else
51
+ {jQuery('.outside-only').show()}})
52
+ jQuery("#size").on('change',function(){var $this=jQuery(this)
53
+ var val=$this.val();if(val!='custom')
54
+ {jQuery('.custom-size-only').hide()}
55
+ else
56
+ {jQuery('.custom-size-only').show()}})
57
+ jQuery("#animation").on('change',function(){var $this=jQuery(this)
58
+ var val=$this.val();if(val=='fade'||val=='grow')
59
+ {jQuery('.animation-only').hide()}
60
+ else
61
+ {jQuery('.animation-only').show()}})
62
+ jQuery("#overlayOpacitySlider").slider("option","value",jQuery("#overlayOpacity").val())
63
+ jQuery("#containerPaddingSlider").slider("option","value",jQuery("#containerPadding").val())
64
+ jQuery("#containerBorderWidthSlider").slider("option","value",jQuery("#containerBorderWidth").val())
65
+ jQuery("#containerBorderRadiusSlider").slider("option","value",jQuery("#containerBorderRadius").val())
66
+ jQuery("#contentTitleFontSizeSlider").slider("option","value",jQuery("#contentTitleFontSize").val())
67
+ jQuery("#closeBorderRadiusSlider").slider("option","value",jQuery("#closeBorderRadius").val())
68
+ jQuery("#closeFontSizeSlider").slider("option","value",jQuery("#closeFontSize").val())
69
+ jQuery("#closeSizeSlider").slider("option","value",jQuery("#closeSize").val())
70
+ jQuery("#autoOpenDelaySlider").slider("option","value",jQuery("#autoOpenDelay").val())
71
+ jQuery(document).on("click",'.close-modal',function(){jQuery(this).parent('.modal').fadeOut();jQuery('.modal-overlay').fadeOut(function(){jQuery(this).remove();})}).on("click",'.modal-overlay',function(){jQuery('.modal:visible').fadeOut(function(){jQuery(this).css('visibility','hidden');});jQuery(this).fadeOut(function(){jQuery(this).remove();})}).on("keyup",function(e){if(e.keyCode==27){jQuery('.modal:visible').fadeOut(function(){jQuery(this).css('visibility','hidden');});jQuery('.modal-overlay').fadeOut(function(){jQuery(this).remove();})}})
72
+ jQuery(document).on("click",'.write-it',function(){jQuery('<div class="modal-overlay" />').appendTo('body').fadeIn();jQuery('#eModal-Admin-1').css('visibility','visible').fadeIn();return false;})});
inc/js/easy-modal.js ADDED
@@ -0,0 +1,926 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Easy Modal v1.2
2
+ (function ($)
3
+ {
4
+ var currentMousePos = { x: -1, y: -1 };
5
+ var methods = {
6
+ init: function (options)
7
+ {
8
+ var opts = $.extend({}, $.fn.emodal.defaults, options);
9
+ return $(this).data('emodal', opts);
10
+ },
11
+ close: function (options)
12
+ {
13
+ var options = $.extend({
14
+ speed: 'fast',
15
+ overlay: true
16
+ }, $.fn.emodal.defaults, options);
17
+
18
+ var $this = $(this);
19
+ var opts = $this.data('emodal');
20
+ $this.removeClass('active').fadeOut(options.speed,function(){
21
+ if(options.overlay)
22
+ $('#modal-overlay').fadeOut(options.speed,function(){
23
+ options.onClose();
24
+ });
25
+ })
26
+ $(window).unbind('scroll.emodal').unbind('keyup.emodal');
27
+ return this;
28
+ },
29
+ open: function()
30
+ {
31
+ var $this = $(this);
32
+ var opts = $this.data('emodal');
33
+ if(themes[opts.theme] === undefined)
34
+ {
35
+ var theme = themes[1];
36
+ }
37
+ else
38
+ {
39
+ var theme = themes[opts.theme];
40
+ }
41
+ // Check for and create Modal Overlay
42
+ if(!$('#modal-overlay').length){ $('<div id="modal-overlay">').appendTo('body'); }
43
+
44
+ // If not stackable close all other modals.
45
+ if($('.modal.active').length)
46
+ {
47
+ $('.modal.active').each(function(){$(this).emodal('close',{speed:100,overlay:false})});
48
+ }
49
+ else
50
+ {
51
+ $('#modal-overlay').css('opacity',0).show(0);
52
+ }
53
+
54
+ $this.addClass('active');
55
+ // Modal Clos Button
56
+
57
+ if(!opts.closeDisabled && $('.close-modal',$this).length)
58
+ {
59
+ $('.close-modal',$this)
60
+ .unbind('click')
61
+ .click(function(){ $this.emodal('close'); })
62
+ .themeClose(opts);
63
+ }
64
+ $('#modal-overlay')
65
+ .unbind('click')
66
+ .click(function()
67
+ {
68
+ if (opts.overlayClose == true)
69
+ {
70
+ $this.emodal('close');
71
+ }
72
+ })
73
+ .themeOverlay(opts);
74
+
75
+ if(opts.overlayEscClose == true)
76
+ {
77
+ $(window).bind('keyup.emodal',function(e){
78
+ if($('.modal.active').length && e.keyCode == 27)
79
+ {
80
+ $this.emodal('close');
81
+ }
82
+ });
83
+ }
84
+ $this.themeModal(opts);
85
+ $this.animation(opts.animation,opts);
86
+ return $this;
87
+ }/*,
88
+ show: function ()
89
+ {
90
+ if (opts.type === 'Image')
91
+ {
92
+ container.css(
93
+ {
94
+ maxWidth: opts.maxWidth,
95
+ maxHeight: opts.maxHeight
96
+ });
97
+ var abcs = $("a.eModal-Image")
98
+ var prevButton = $('<a>')
99
+ .attr('id',opts.prevId)
100
+ .click(function (){
101
+ var current = $('.eModal-Opened')
102
+ var prev = abcs.eq(abcs.index(current) - 1)
103
+ current.removeClass('eModal-Opened')
104
+ if (prev.length <= 0) prev = abcs.eq(abcs.length)
105
+ prev.addClass('eModal-Opened')
106
+ container
107
+ .animate({opacity: '.01'}, function (){
108
+ var img = $("<img/>")
109
+ .attr('src', prev.attr('href'))
110
+ .css({
111
+ maxWidth: '100%',
112
+ maxHeight: '100%'
113
+ })
114
+ .load(function (){
115
+ if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0)
116
+ {
117
+ alert('broken image!')
118
+ }
119
+ else
120
+ {
121
+ if (this.naturalWidth > opts.maxWidth) img.attr('width', opts.maxWidth)
122
+ if (this.naturalHeight > opts.maxHeight) img.attr('height', opts.maxHeight)
123
+ content
124
+ .html(img)
125
+ .css({opacity:'.01'})
126
+
127
+ container
128
+ .emodal('center')
129
+ .animate({opacity:'.01'})
130
+ .animate({opacity:'1'})
131
+
132
+ content.animate({opacity: '1'})
133
+ }
134
+ })
135
+ })
136
+ return false
137
+ })
138
+ var nextButton = $('<a>')
139
+ .attr('id',opts.nextId)
140
+ .click(function (){
141
+ var current = $('.eModal-Opened')
142
+ var next = abcs.eq(abcs.index(current) + 1)
143
+ current.removeClass('eModal-Opened')
144
+ if (next.length == 0) next = abcs.eq(0)
145
+ next.addClass('eModal-Opened')
146
+ container
147
+ .animate({opacity: '.01'}, function (){
148
+ var img = $("<img/>")
149
+ .attr('src', next.attr('href'))
150
+ .css({
151
+ maxWidth: '100%',
152
+ maxHeight: '100%'
153
+ })
154
+ .load(function (){
155
+ if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0)
156
+ {
157
+ alert('broken image!')
158
+ }
159
+ else
160
+ {
161
+ if (this.naturalWidth > opts.maxWidth) img.attr('width', opts.maxWidth)
162
+ if (this.naturalHeight > opts.maxHeight) img.attr('height', opts.maxHeight)
163
+ content
164
+ .html(img)
165
+ .css({opacity:'.01'})
166
+
167
+ container
168
+ .emodal('center')
169
+ .animate({opacity:'.01'})
170
+ .animate({opacity:'1'})
171
+
172
+ content.animate({opacity: '1'})
173
+ }
174
+ })
175
+ })
176
+ return false
177
+ })
178
+ var buttons = $('<div>')
179
+ .attr('id',opts.buttonsId)
180
+ .append(prevButton, nextButton)
181
+ .appendTo(container)
182
+ }
183
+ if (opts.type === 'Link')
184
+ {
185
+ opts.requestData.url = $(this).attr('href')
186
+ opts.requestData.iframeWidth = opts.maxWidth
187
+ opts.requestData.iframeHeight = opts.maxHeight
188
+ }
189
+ var loaded = false
190
+ if (opts.url != null){
191
+ if (opts.type === 'Image'){
192
+ var img = $("<img/>")
193
+ .attr('src', opts.url)
194
+ .css({
195
+ maxWidth: '100%',
196
+ maxHeight: '100%'
197
+ })
198
+ .load(function (){
199
+ if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) alert('broken image!')
200
+ else {
201
+ if (this.naturalWidth > opts.maxWidth) img.attr('width', opts.maxWidth)
202
+ if (this.naturalHeight > opts.maxHeight) img.attr('height', opts.maxHeight)
203
+ content.append(img)
204
+ loaded = true
205
+ }
206
+ })
207
+ }
208
+ else
209
+ {
210
+ $.post(opts.url, opts.requestData, function (data){
211
+ content.prepend(data)
212
+ if($('form',content).length)
213
+ {
214
+ $orig_action = $('form',content).attr('action').split('#');
215
+ $('form',content).attr('action',"#" + $orig_action[1]).attr('action')
216
+ }
217
+ container
218
+ .show()
219
+ .css({opacity: '.01'});
220
+ if(opts.userMaxHeight > 0)
221
+ {
222
+ content.css({maxHeight: $(window).height() * (opts.userMaxHeight / 100) + 'px'});
223
+ }
224
+ else if(content.innerHeight() > opts.maxHeight && opts.type != 'Link')
225
+ {
226
+ content.css({maxHeight: (opts.maxHeight - 60) + 'px'});
227
+ }
228
+
229
+ if(opts.userHeight > 0)
230
+ {
231
+ content.css({height: opts.userHeight + 'px'});
232
+ }
233
+
234
+ if(opts.userMaxWidth > 0)
235
+ {
236
+ content.css({maxWidth: $(window).width() * (opts.userMaxWidth / 100) + 'px'});
237
+ }
238
+
239
+ if(opts.userWidth > 0)
240
+ {
241
+ content.css({width: opts.userWidth + 'px'});
242
+ }
243
+ var title = content
244
+ .find("#eModal-Title")
245
+ .css({
246
+ color: theme.contentTitleFontColor,
247
+ fontFamily: theme.contentTitleFontFamily,
248
+ fontSize: theme.contentTitleFontSize + 'px'
249
+ })
250
+ if(title) title.attr('title', title.text()).appendTo(controls)
251
+ opts.onLoad()
252
+ if(opts.cf7form == true) loadCf7()
253
+ if(opts.gravityform == true) loadGravityForms()
254
+ loaded = true
255
+ })
256
+ }
257
+ }
258
+ },*/
259
+ };
260
+ $.fn.emodal = function(method)
261
+ {
262
+ // Method calling logic
263
+ if (methods[method])
264
+ {
265
+ return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
266
+ }
267
+ else if (typeof method === 'object' || !method)
268
+ {
269
+ return methods.init.apply(this, arguments);
270
+ }
271
+ else
272
+ {
273
+ $.error('Method ' + method + ' does not exist on jQuery.emodal');
274
+ }
275
+ };
276
+ $.fn.themeOverlay = function(opts)
277
+ {
278
+ var $this = $(this);
279
+ if(themes[opts.theme] === undefined)
280
+ {
281
+ var theme = themes[1];
282
+ }
283
+ else
284
+ {
285
+ var theme = themes[opts.theme];
286
+ }
287
+ return $this.addClass('theme-'+opts.theme).animate({
288
+ backgroundColor: theme.overlayColor,
289
+ opacity: theme.overlayOpacity / 100
290
+ },opts.duration);
291
+ };
292
+ $.fn.themeModal = function(opts)
293
+ {
294
+ var $this = $(this);
295
+ if(themes[opts.theme] === undefined)
296
+ {
297
+ var theme = themes[1];
298
+ }
299
+ else
300
+ {
301
+ var theme = themes[opts.theme];
302
+ }
303
+ if(opts.size == 'custom')
304
+ {
305
+ $this.css({
306
+ 'height': opts.userHeight ? opts.userHeight + opts.userHeightUnit : $this.css('height'),
307
+ 'width': opts.userWidth ? opts.userWidth + opts.userWidthUnit : $this.css('width'),
308
+ 'margin-left': opts.userWidth ? -(opts.userWidth / 2) + opts.userWidthUnit : $this.css('margin-left')
309
+ });
310
+ }
311
+ return $this
312
+ .addClass(opts.size)
313
+ .addClass('theme-'+opts.theme)
314
+ .css({
315
+ color: theme.contentFontColor,
316
+ backgroundColor: theme.containerBgColor,
317
+ padding: theme.containerPadding + 'px',
318
+ border: theme.containerBorderColor + ' ' + theme.containerBorderStyle + ' ' + theme.containerBorderWidth + 'px',
319
+ "-webkit-border-radius": theme.containerBorderRadius + 'px',
320
+ "border-radius": theme.containerBorderRadius + 'px'
321
+ })
322
+ };
323
+ $.fn.themeClose = function(opts)
324
+ {
325
+ var $this = $(this);
326
+ if(themes[opts.theme] === undefined)
327
+ {
328
+ var theme = themes[1];
329
+ }
330
+ else
331
+ {
332
+ var theme = themes[opts.theme];
333
+ }
334
+ if(theme.closeLocation == 'outside')
335
+ {
336
+ var val = theme.closeSize;
337
+ var top = bottom = left = right = 'auto';
338
+ switch (theme.closePosition)
339
+ {
340
+ case 'topright':
341
+ top = -(val / 2) + 'px';
342
+ right = -(val / 2) + 'px';
343
+ break;
344
+ case 'topleft':
345
+ top = -(val / 2) + 'px';
346
+ left = -(val / 2) + 'px';
347
+ break;
348
+ case 'bottomright':
349
+ bottom = -(val / 2) + 'px';
350
+ right = -(val / 2) + 'px';
351
+ break;
352
+ case 'bottomleft':
353
+ bottom = -(val / 2) + 'px';
354
+ left = -(val / 2) + 'px';
355
+ break;
356
+ }
357
+ $this
358
+ .addClass('outside')
359
+ .css({
360
+ left: left,
361
+ right: right,
362
+ top: top,
363
+ bottom: bottom,
364
+ height: theme.closeSize + 'px',
365
+ fontSize: theme.closeFontSize + 'px',
366
+ width: theme.closeSize + 'px',
367
+ backgroundColor: theme.closeBgColor,
368
+ "-webkit-border-radius": theme.closeBorderRadius + 'px',
369
+ "border-radius": theme.closeBorderRadius + 'px',
370
+ lineHeight: theme.closeSize + 'px'
371
+ });
372
+ }
373
+ return $this.addClass('theme-'+opts.theme)
374
+ .html(theme.closeText)
375
+ .css({
376
+ color: theme.closeFontColor,
377
+ });
378
+ };
379
+
380
+ var animations = {
381
+ fade: function(options)
382
+ {
383
+ var $this = $(this).show(0).css({'opacity':0,'top':$(window).scrollTop() + 100 +'px'});
384
+ var opts = $.extend($.fn.animation.defaults, options);
385
+ $this.animate({
386
+ opacity: 1
387
+ },parseInt(opts.duration),opts.easing,function(){
388
+ $this
389
+ .removeAttr('style')
390
+ .css({'display':'block','visibility':'visible','top': ($(window).scrollTop() + 100) +'px'})
391
+ .themeModal(opts);
392
+ });
393
+ },
394
+ fadeAndSlide: function(options)
395
+ {
396
+ var $this = $(this).show(0).css('opacity',0);
397
+ var opts = $.extend($.fn.animation.defaults, options);
398
+ switch(opts.direction)
399
+ {
400
+ case 'mouse': $this.css({'top': currentMousePos.y + 'px','left': currentMousePos.x +'px'}); break;
401
+ case 'top': $this.css({'top': $(window).scrollTop() - $this.outerHeight(true) + 'px'}); break;
402
+ case 'left': $this.css({'left': '-'+$this.outerWidth(true)+'px','top':$(window).scrollTop() + 100 +'px'}); break;
403
+ case 'bottom': $this.css({'top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
404
+ case 'right': $this.css({'left': $(window).innerWidth()+'px','top':$(window).scrollTop() + 100 +'px'}); break;
405
+ case 'topleft': $this.css({'left': '-'+$this.outerWidth(true)+'px','top':$(window).scrollTop() + 100 +'px','top': $(window).scrollTop() - $this.outerHeight(true) + 'px'}); break;
406
+ case 'topright': $this.css({'left': $(window).innerWidth()+'px','top': $(window).scrollTop() - $this.outerHeight(true) + 'px'}); break;
407
+ case 'bottomleft': $this.css({'left': '-'+$this.outerWidth(true)+'px','top':$(window).scrollTop() + 100 +'px','top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
408
+ case 'bottomright': $this.css({'left': $(window).innerWidth()+'px','top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
409
+ }
410
+ $('html').css('overflow-x','hidden');
411
+ $this.animate({
412
+ 'left': '50%',
413
+ 'top': $(window).scrollTop() + 100 +'px'
414
+ },{duration: opts.duration , queue:false},opts.easing);
415
+ setTimeout(function()
416
+ {
417
+ $this.animate({
418
+ 'opacity': 1
419
+ },opts.duration * .75,opts.easing,function(){
420
+ $this
421
+ .removeAttr('style')
422
+ .css({'display':'block','visibility':'visible','top': ($(window).scrollTop() + 100) +'px'})
423
+ .themeModal(opts);
424
+ $('html').css('overflow-x','inherit');
425
+ });
426
+ },opts.duration * .25);
427
+ },
428
+ grow: function(options)
429
+ {
430
+ var $this = $(this).show(0);
431
+ var opts = $.extend($.fn.animation.defaults, options);
432
+ var currently = {
433
+ width: parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100 + '%',
434
+ height: parseInt($this.css('height')),
435
+ marginLeft: '-' + parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100 / 2 + '%',
436
+ padding: parseInt($this.css('padding-left')) / parseInt($this.css('font-size')) + 'em'
437
+ };
438
+ $('*',$this).fadeOut(0);
439
+ $this.css({
440
+ 'top': (currently.height/10) * 5 + $(window).scrollTop() + 100 +'px',
441
+ 'left': (currently.width/10) * 5 + ($(window).innerWidth() / 2) +'px',
442
+ 'height': 0,
443
+ 'width': 0,
444
+ 'padding': 0,
445
+ 'margin-left': 0
446
+ }).animate({
447
+ 'top': $(window).scrollTop() + 100 +'px',
448
+ 'left': '50%',
449
+ 'padding': currently.padding,
450
+ 'height': currently.height,
451
+ 'width': currently.width,
452
+ 'margin-left': currently.marginLeft
453
+ },opts.duration,function(){
454
+ $this
455
+ .removeAttr('style')
456
+ .css({'display':'block','visibility':'visible','top': ($(window).scrollTop() + 100) +'px'})
457
+ .themeModal(opts);
458
+ $('*',$this).fadeIn('fast');
459
+ });
460
+ },
461
+ growAndSlide: function(options)
462
+ {
463
+ var $this = $(this).show(0);
464
+ var opts = $.extend($.fn.animation.defaults, options);
465
+ var currently = {
466
+ width: parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100 + '%',
467
+ height: parseInt($this.css('height')),
468
+ marginLeft: '-' + parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100 / 2 + '%',
469
+ padding: parseInt($this.css('padding-left')) / parseInt($this.css('font-size')) + 'em'
470
+ };
471
+ $('html,body').css('overflow-x','hidden');
472
+ $('*',$this).fadeOut(0);
473
+ $this.css({
474
+ 'opacity': 1,
475
+ 'height': 0,
476
+ 'width': 0,
477
+ 'padding': 0,
478
+ 'margin-left': 0
479
+ });
480
+ switch(opts.direction)
481
+ {
482
+ case 'mouse': $this.css({'top': currentMousePos.y + 'px','left': currentMousePos.x +'px'}); break;
483
+ case 'top': $this.css({'top': $(window).scrollTop() + $this.outerHeight(true) + 'px'}); break;
484
+ case 'left': $this.css({'left': 0,'top':$(window).scrollTop() + 100 +'px'}); break;
485
+ case 'bottom': $this.css({'top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
486
+ case 'right': $this.css({'left': $(window).innerWidth()+'px','top':$(window).scrollTop() + 100 +'px'}); break;
487
+ case 'topleft': $this.css({'left': 0,'top':$(window).scrollTop() + 100 +'px','top': $(window).scrollTop() - $this.outerHeight(true) + 'px'}); break;
488
+ case 'topright': $this.css({'left': $(window).innerWidth()+'px','top': $(window).scrollTop() - $this.outerHeight(true) + 'px'}); break;
489
+ case 'bottomleft': $this.css({'left': 0,'top':$(window).scrollTop() + 100 +'px','top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
490
+ case 'bottomright': $this.css({'left': $(window).innerWidth()+'px','top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
491
+ }
492
+ $this.animate({
493
+ 'height': currently.height,
494
+ 'padding': currently.padding,
495
+ 'width': currently.width,
496
+ 'margin-left': currently.marginLeft
497
+ },{duration: opts.duration , queue:false},opts.easing);
498
+ setTimeout(function()
499
+ {
500
+ $this.animate({
501
+ 'height': 'auto',
502
+ 'top': ($(window).scrollTop() + 100) +'px',
503
+ 'left': '50%'
504
+ },opts.duration * .95,opts.easing,function(){
505
+ $this
506
+ .removeAttr('style')
507
+ .css({'display':'block','visibility':'visible','top': ($(window).scrollTop() + 100) +'px'})
508
+ .themeModal(opts);
509
+ $('*',$this).fadeIn('fast');
510
+ $('html').css('overflow-x','inherit');
511
+ });
512
+ },opts.duration * .05);
513
+ }/*,
514
+ canvas: function(options)
515
+ {
516
+ var $this = $(this)
517
+ $this.css('top',$(document).height() + $this.height()).show(0);
518
+ html2canvas($this, {
519
+ onrendered: function(canvas) {
520
+ var canvas = canvas;
521
+ //$('body').append(canvas);
522
+ var x = 4,
523
+ y = 3,
524
+ random = true,
525
+ width = parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100,
526
+ height = parseInt($this.css('height')),
527
+ marginLeft = '-' + parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100 / 2 + '%',
528
+ $img = canvas.toDataURL(),
529
+ n_tiles = x * y, // total number of tiles
530
+ tiles = [],
531
+ $tiles = {};
532
+
533
+ for ( var i = 0; i < n_tiles; i++ ) {
534
+ tiles.push('<div class="tile"/>');
535
+ }
536
+
537
+ $tiles = $( tiles.join('') );
538
+ // Hide original image and insert tiles in DOM
539
+ $this.hide().after(
540
+ $('<div class="modal-placeholder"/>').attr('style', $this.attr('style')).css({
541
+ 'opacity': 1,
542
+ 'height': height,
543
+ 'margin-left': '-' + (parseInt(width) / 2) + '%',
544
+ 'padding': 0,
545
+ 'width': parseInt(width) + '%',
546
+ 'top': $(window).scrollTop() + 100
547
+ })
548
+ .show(0)
549
+ .append( $tiles )
550
+ );
551
+ // Adjust position
552
+ $tiles.each(function(){
553
+ var pos = $(this).position();
554
+
555
+ console.log($this.outerHeight() / y + 'px');
556
+ $(this).css({
557
+ 'border': 0,
558
+ 'backgroundPosition': -pos.left +'px ' + -pos.top + 'px',
559
+ 'width': $this.outerWidth() / x + 'px',
560
+ 'height': $this.outerHeight() / y + 'px',
561
+ 'background-image': 'url('+ $img +')'
562
+ });
563
+ });
564
+
565
+ }
566
+ });
567
+ //$this.hide(0);
568
+ var opts = $.extend($.fn.animation.defaults, options);
569
+ }*/
570
+ };
571
+ $.fn.animation = function(style)
572
+ {
573
+ // Method calling logic
574
+ if (animations[style])
575
+ {
576
+ return animations[style].apply(this, Array.prototype.slice.call(arguments, 1));
577
+ }
578
+ else
579
+ {
580
+ $.error('Animation style ' + animations + ' does not exist on jQuery.animation');
581
+ }
582
+ };
583
+
584
+ $.fn.animation.defaults = {
585
+ duration:750,
586
+ direction: 'mouse',
587
+ easing: 'swing'
588
+ };
589
+ $.fn.emodal.defaults = {
590
+ theme: 1,
591
+ onLoad: function (){},
592
+ onClose: function (){},
593
+ type: null,
594
+ maxHeight: null,
595
+ maxWidth: null,
596
+ userHeight: null,
597
+ userWidth: null,
598
+ animation: 'fadeAndSlide',
599
+ direction: 'bottom',
600
+ overlayClose: false,
601
+ overlayEscClose: false
602
+ };
603
+ var modals = easymodal.modals;
604
+ var themes = easymodal.themes;
605
+ var settings = easymodal.settings;
606
+
607
+ $(document).ready(function()
608
+ {
609
+ $('.modal').each(function()
610
+ {
611
+ var $this = $(this).css({visibility:'visible'}).hide(0);
612
+ var modalId = $this.attr('id').split("-")[1];
613
+ $this.emodal(modals[modalId]);
614
+
615
+ $(document).on('click','.'+$this.attr('id'),function(e){
616
+ e.preventDefault();
617
+ e.stopPropagation();
618
+ currentMousePos.x = e.pageX;
619
+ currentMousePos.y = e.pageY;
620
+ $this.emodal('open');
621
+ });
622
+ $('.'+$this.attr('id')).css('cursor','pointer');
623
+ });
624
+ if(easymodal.autoOpen && !$.cookie("eModal-autoOpen-"+easymodal.autoOpen.id))
625
+ {
626
+ setTimeout(function(){
627
+ $('#eModal-'+easymodal.autoOpen.id).emodal('open');
628
+ $.cookie("eModal-autoOpen-"+easymodal.autoOpen.id, true, { expires : parseInt(easymodal.autoOpen.timer) });
629
+ },easymodal.autoOpen.delay);
630
+ }
631
+ if(easymodal.autoExit && !$.cookie("eModal-autoExit-"+easymodal.autoExit.id))
632
+ {
633
+ $('body').one('mouseleave',function(){
634
+ if(easymodal.force_user_login)
635
+ {
636
+ return false;
637
+ }
638
+ $this = $('#eModal-'+easymodal.autoExit.id).emodal('open');
639
+ $.cookie("eModal-autoExit-"+easymodal.autoExit.id, true, { expires : parseInt(easymodal.autoExit.timer) });
640
+ });
641
+ }
642
+
643
+
644
+
645
+ // Run our login ajax
646
+ $('#eModal-Login form').on('submit', function(e) {
647
+ $form = $(this);
648
+ // Stop the form from submitting so we can use ajax.
649
+ e.preventDefault();
650
+ // Check what form is currently being submitted so we can return the right values for the ajax request.
651
+ // Display our loading message while we check the credentials.
652
+ $form.append('<p class="message notice">' + easymodal.loadingtext + '</p>');
653
+ // Check if we are trying to login. If so, process all the needed form fields and return a faild or success message.
654
+ $.ajax({
655
+ type: 'POST',
656
+ dataType: 'json',
657
+ url: easymodal.ajaxLogin,
658
+ data: {
659
+ 'action' : 'ajaxlogin', // Calls our wp_ajax_nopriv_ajaxlogin
660
+ 'username' : $('#user_login',$form).val(),
661
+ 'password' : $('#user_pass',$form).val(),
662
+ 'rememberme' : $('#rememberme',$form).is(':checked') ? true : false,
663
+ 'login' : true,
664
+ 'easy-modal' : $('#safe_csrf_nonce_easy_modal',$form).val()
665
+ },
666
+ success: function(results) {
667
+ // Check the returned data message. If we logged in successfully, then let our users know and remove the modal window.
668
+ if(results.loggedin === true) {
669
+ $('p.message',$form).removeClass('notice').addClass('success').text(results.message).show();
670
+ setTimeout(function(){
671
+ $('#eModal-Login').emodal('close',{onClose: function(){
672
+ window.location.href = easymodal.redirecturl;
673
+ }});
674
+
675
+ },2000);
676
+
677
+ } else {
678
+ $('p.message',$form).removeClass('notice').addClass('error').text(results.message).show();
679
+ }
680
+ }
681
+ });
682
+ });
683
+ // Run our register ajax
684
+ $('#eModal-Register form').on('submit', function(e) {
685
+ $form = $(this);
686
+ // Stop the form from submitting so we can use ajax.
687
+ e.preventDefault();
688
+ // Check what form is currently being submitted so we can return the right values for the ajax request.
689
+ // Display our loading message while we check the credentials.
690
+ $form.append('<p class="message notice">' + easymodal.loadingtext + '</p>');
691
+ // Check if we are trying to login. If so, process all the needed form fields and return a faild or success message.
692
+ $.ajax({
693
+ type: 'POST',
694
+ dataType: 'json',
695
+ url: easymodal.ajaxLogin,
696
+ data: {
697
+ 'action' : 'ajaxlogin', // Calls our wp_ajax_nopriv_ajaxlogin
698
+ 'username' : $('#forgot_login',$form).val(),
699
+ 'email' : $('#reg_email',$form).val(),
700
+ 'register' : true,
701
+ 'easy-modal' : $('#safe_csrf_nonce_easy_modal',$form).val()
702
+ },
703
+ success: function(results) {
704
+ // Check the returned data message. If we logged in successfully, then let our users know and remove the modal window.
705
+ if(results.loggedin === true) {
706
+ $('p.message',$form).removeClass('notice').addClass('success').text(results.message).show();
707
+ setTimeout(function(){
708
+ $('#eModal-Login').emodal('close',{onClose: function(){
709
+ window.location.href = easymodal.redirecturl;
710
+ }});
711
+
712
+ },2000);
713
+
714
+ } else {
715
+ $('p.message',$form).removeClass('notice').addClass('error').text(results.message).show();
716
+ }
717
+ }
718
+ });
719
+ });
720
+ // Run our forgot password ajax
721
+ $('#eModal-Forgot form').on('submit', function(e) {
722
+ $form = $(this);
723
+ // Stop the form from submitting so we can use ajax.
724
+ e.preventDefault();
725
+ // Check what form is currently being submitted so we can return the right values for the ajax request.
726
+ // Display our loading message while we check the credentials.
727
+ $form.append('<p class="message notice">' + easymodal.loadingtext + '</p>');
728
+ // Check if we are trying to login. If so, process all the needed form fields and return a faild or success message.
729
+ $.ajax({
730
+ type: 'POST',
731
+ dataType: 'json',
732
+ url: easymodal.ajaxLogin,
733
+ data: {
734
+ 'action' : 'ajaxlogin', // Calls our wp_ajax_nopriv_ajaxlogin
735
+ 'username' : $('#forgot_login',$form).val(),
736
+ 'forgotten' : true,
737
+ 'easy-modal' : $('#safe_csrf_nonce_easy_modal',$form).val()
738
+ },
739
+ success: function(results) {
740
+ // Check the returned data message. If we logged in successfully, then let our users know and remove the modal window.
741
+ if(results.loggedin === true) {
742
+ $('p.message',$form).removeClass('notice').addClass('success').text(results.message).show();
743
+ setTimeout(function(){
744
+ $('#eModal-Login').emodal('close',{onClose: function(){
745
+ window.location.href = easymodal.redirecturl;
746
+ }});
747
+
748
+ },2000);
749
+
750
+ } else {
751
+ $('p.message',$form).removeClass('notice').addClass('error').text(results.message).show();
752
+ }
753
+ }
754
+ });
755
+ });
756
+ /*
757
+ } else if ( form_id === 'register' ) {
758
+ $.ajax({
759
+ type: 'GET',
760
+ dataType: 'json',
761
+ url: wpml_script.ajax,
762
+ data: {
763
+ 'action' : 'ajaxlogin', // Calls our wp_ajax_nopriv_ajaxlogin
764
+ 'username' : $('#form #reg_user').val(),
765
+ 'email' : $('#form #reg_email').val(),
766
+ 'register' : $('#form input[name="register"]').val(),
767
+ 'security' : $('#form #security').val()
768
+ },
769
+ success: function(results) {
770
+ if(results.registerd === true) {
771
+ $('.wpml-content > p.message').removeClass('notice').addClass('success').text(results.message).show();
772
+ $('#register #form input:not(#user-submit)').val('');
773
+ } else {
774
+ $('.wpml-content > p.message').removeClass('notice').addClass('error').text(results.message).show();
775
+ }
776
+ }
777
+ });
778
+ } else if ( form_id === 'forgotten' ) {
779
+ $.ajax({
780
+ type: 'GET',
781
+ dataType: 'json',
782
+ url: wpml_script.ajax,
783
+ data: {
784
+ 'action' : 'ajaxlogin', // Calls our wp_ajax_nopriv_ajaxlogin
785
+ 'username' : $('#form #forgot_login').val(),
786
+ 'forgotten' : $('#form input[name="register"]').val(),
787
+ 'security' : $('#form #security').val()
788
+ },
789
+ success: function(results) {
790
+ if(results.reset === true) {
791
+ $('.wpml-content > p.message').removeClass('notice').addClass('success').text(results.message).show();
792
+ $('#forgotten #form input:not(#user-submit)').val('');
793
+ } else {
794
+ $('.wpml-content > p.message').removeClass('notice').addClass('error').text(results.message).show();
795
+ }
796
+ }
797
+ });
798
+ } else {
799
+ // if all else fails and we've hit here... something strange happen and notify the user.
800
+ $('.wpml-content > p.message').text('Something Please refresh your window and try again.');
801
+ }
802
+ });
803
+
804
+
805
+
806
+
807
+
808
+ /*
809
+ $.expr[':'].external = function (obj)
810
+ {
811
+ return !obj.href.match(/^mailto\:/) && (obj.hostname != location.hostname);
812
+ };
813
+ $('a:external').addClass('external eModal-Link').emodal(easymodal.modals['Link']);
814
+ $('a[href$=".gif"], a[href$=".jpg"], a[href$=".png"], a[href$=".bmp"]').children('img').each(function ()
815
+ {
816
+ var anch = $(this).parents('a').addClass('eModal-Image');
817
+ var url = $(anch).attr('href');
818
+ $(anch).emodal(
819
+ {
820
+ url: url,
821
+ theme: '1',
822
+ type: 'Image'
823
+ });
824
+ });
825
+ if(settings.autoOpen == 'true')
826
+ {
827
+ setTimeout(function(){
828
+ $('#emModal-'+settings.autoOpenId).emodal('open');
829
+ }, settings.autoOpenDelay);
830
+ }
831
+ */
832
+ })
833
+ })(jQuery);
834
+ /*!
835
+ * jQuery Cookie Plugin v1.3.1
836
+ * https://github.com/carhartl/jquery-cookie
837
+ *
838
+ * Copyright 2013 Klaus Hartl
839
+ * Released under the MIT license
840
+ */
841
+
842
+ (function (factory) {
843
+ if (typeof define === 'function' && define.amd) {
844
+ // AMD. Register as anonymous module.
845
+ define(['jquery'], factory);
846
+ } else {
847
+ // Browser globals.
848
+ factory(jQuery);
849
+ }
850
+ }(function ($) {
851
+ var pluses = /\+/g;
852
+ function raw(s) {
853
+ return s;
854
+ }
855
+ function decoded(s) {
856
+ return decodeURIComponent(s.replace(pluses, ' '));
857
+ }
858
+ function converted(s) {
859
+ if (s.indexOf('"') === 0) {
860
+ // This is a quoted cookie as according to RFC2068, unescape
861
+ s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
862
+ }
863
+ try {
864
+ return config.json ? JSON.parse(s) : s;
865
+ } catch(er) {}
866
+ }
867
+ var config = $.cookie = function (key, value, options) {
868
+ // write
869
+ if (value !== undefined) {
870
+ options = $.extend({}, config.defaults, options);
871
+ if (typeof options.expires === 'number') {
872
+ var days = options.expires, t = options.expires = new Date();
873
+ t.setDate(t.getDate() + days);
874
+ }
875
+ value = config.json ? JSON.stringify(value) : String(value);
876
+ return (document.cookie = [
877
+ config.raw ? key : encodeURIComponent(key),
878
+ '=',
879
+ config.raw ? value : encodeURIComponent(value),
880
+ options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
881
+ options.path ? '; path=' + options.path : '',
882
+ options.domain ? '; domain=' + options.domain : '',
883
+ options.secure ? '; secure' : ''
884
+ ].join(''));
885
+ }
886
+ // read
887
+ var decode = config.raw ? raw : decoded;
888
+ var cookies = document.cookie.split('; ');
889
+ var result = key ? undefined : {};
890
+ for (var i = 0, l = cookies.length; i < l; i++) {
891
+ var parts = cookies[i].split('=');
892
+ var name = decode(parts.shift());
893
+ var cookie = decode(parts.join('='));
894
+ if (key && key === name) {
895
+ result = converted(cookie);
896
+ break;
897
+ }
898
+ if (!key) {
899
+ result[name] = converted(cookie);
900
+ }
901
+ }
902
+ return result;
903
+ };
904
+ config.defaults = {};
905
+ $.removeCookie = function (key, options) {
906
+ if ($.cookie(key) !== undefined) {
907
+ // Must not alter options, thus extending a fresh object...
908
+ $.cookie(key, '', $.extend({}, options, { expires: -1 }));
909
+ return true;
910
+ }
911
+ return false;
912
+ };
913
+ }));
914
+ (function(h,m){function n(a,b,c){var d=r[b.type]||{};if(null==a)return c||!b.def?null:b.def;a=d.floor?~~a:parseFloat(a);return isNaN(a)?b.def:d.mod?(a+d.mod)%d.mod:0>a?0:d.max<a?d.max:a}function s(a){var b=f(),c=b._rgba=[],a=a.toLowerCase();j(v,function(d,g){var e,i=g.re.exec(a);e=i&&g.parse(i);i=g.space||"rgba";if(e)return e=b[i](e),b[k[i].cache]=e[k[i].cache],c=b._rgba=e._rgba,!1});return c.length?("0,0,0,0"===c.join()&&h.extend(c,o.transparent),b):o[a]}function p(a,b,c){c=(c+1)%1;return 1>6*c?
915
+ a+6*(b-a)*c:1>2*c?b:2>3*c?a+6*(b-a)*(2/3-c):a}var w=/^([\-+])=\s*(\d+\.?\d*)/,v=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),
916
+ parseInt(a[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1],a[2]/100,a[3]/100,a[4]]}}],f=h.Color=function(a,b,c,d){return new h.Color.fn.parse(a,b,c,d)},k={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,
917
+ type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},r={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},t=f.support={},u=h("<p>")[0],o,j=h.each;u.style.cssText="background-color:rgba(1,1,1,.5)";t.rgba=-1<u.style.backgroundColor.indexOf("rgba");j(k,function(a,b){b.cache="_"+a;b.props.alpha={idx:3,type:"percent",def:1}});f.fn=h.extend(f.prototype,{parse:function(a,b,c,d){if(a===m)return this._rgba=[null,null,null,null],this;if(a.jquery||a.nodeType)a=
918
+ h(a).css(b),b=m;var g=this,e=h.type(a),i=this._rgba=[];b!==m&&(a=[a,b,c,d],e="array");if("string"===e)return this.parse(s(a)||o._default);if("array"===e)return j(k.rgba.props,function(d,c){i[c.idx]=n(a[c.idx],c)}),this;if("object"===e)return a instanceof f?j(k,function(c,d){a[d.cache]&&(g[d.cache]=a[d.cache].slice())}):j(k,function(d,c){var b=c.cache;j(c.props,function(d,e){if(!g[b]&&c.to){if(d==="alpha"||a[d]==null)return;g[b]=c.to(g._rgba)}g[b][e.idx]=n(a[d],e,true)});if(g[b]&&h.inArray(null,g[b].slice(0,
919
+ 3))<0){g[b][3]=1;if(c.from)g._rgba=c.from(g[b])}}),this},is:function(a){var b=f(a),c=!0,d=this;j(k,function(a,e){var i,h=b[e.cache];h&&(i=d[e.cache]||e.to&&e.to(d._rgba)||[],j(e.props,function(a,d){if(null!=h[d.idx])return c=h[d.idx]===i[d.idx]}));return c});return c},_space:function(){var a=[],b=this;j(k,function(c,d){b[d.cache]&&a.push(c)});return a.pop()},transition:function(a,b){var c=f(a),d=c._space(),g=k[d],e=0===this.alpha()?f("transparent"):this,i=e[g.cache]||g.to(e._rgba),h=i.slice(),c=c[g.cache];
920
+ j(g.props,function(a,d){var g=d.idx,e=i[g],f=c[g],j=r[d.type]||{};null!==f&&(null===e?h[g]=f:(j.mod&&(f-e>j.mod/2?e+=j.mod:e-f>j.mod/2&&(e-=j.mod)),h[g]=n((f-e)*b+e,d)))});return this[d](h)},blend:function(a){if(1===this._rgba[3])return this;var b=this._rgba.slice(),c=b.pop(),d=f(a)._rgba;return f(h.map(b,function(a,b){return(1-c)*d[b]+c*a}))},toRgbaString:function(){var a="rgba(",b=h.map(this._rgba,function(a,d){return null==a?2<d?1:0:a});1===b[3]&&(b.pop(),a="rgb(");return a+b.join()+")"},toHslaString:function(){var a=
921
+ "hsla(",b=h.map(this.hsla(),function(a,d){null==a&&(a=2<d?1:0);d&&3>d&&(a=Math.round(100*a)+"%");return a});1===b[3]&&(b.pop(),a="hsl(");return a+b.join()+")"},toHexString:function(a){var b=this._rgba.slice(),c=b.pop();a&&b.push(~~(255*c));return"#"+h.map(b,function(a){a=(a||0).toString(16);return 1===a.length?"0"+a:a}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}});f.fn.parse.prototype=f.fn;k.hsla.to=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,
922
+ null,null,a[3]];var b=a[0]/255,c=a[1]/255,d=a[2]/255,a=a[3],g=Math.max(b,c,d),e=Math.min(b,c,d),i=g-e,h=g+e,f=0.5*h;return[Math.round(e===g?0:b===g?60*(c-d)/i+360:c===g?60*(d-b)/i+120:60*(b-c)/i+240)%360,0===f||1===f?f:0.5>=f?i/h:i/(2-h),f,null==a?1:a]};k.hsla.from=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b=a[0]/360,c=a[1],d=a[2],a=a[3],c=0.5>=d?d*(1+c):d+c-d*c,d=2*d-c;return[Math.round(255*p(d,c,b+1/3)),Math.round(255*p(d,c,b)),Math.round(255*p(d,c,b-1/3)),
923
+ a]};j(k,function(a,b){var c=b.props,d=b.cache,g=b.to,e=b.from;f.fn[a]=function(a){g&&!this[d]&&(this[d]=g(this._rgba));if(a===m)return this[d].slice();var b,q=h.type(a),k="array"===q||"object"===q?a:arguments,l=this[d].slice();j(c,function(a,d){var b=k["object"===q?a:d.idx];null==b&&(b=l[d.idx]);l[d.idx]=n(b,d)});return e?(b=f(e(l)),b[d]=l,b):f(l)};j(c,function(d,b){f.fn[d]||(f.fn[d]=function(c){var e=h.type(c),g="alpha"===d?this._hsla?"hsla":"rgba":a,f=this[g](),j=f[b.idx];if("undefined"===e)return j;
924
+ "function"===e&&(c=c.call(this,j),e=h.type(c));if(null==c&&b.empty)return this;"string"===e&&(e=w.exec(c))&&(c=j+parseFloat(e[2])*("+"===e[1]?1:-1));f[b.idx]=c;return this[g](f)})})});f.hook=function(a){a=a.split(" ");j(a,function(a,c){h.cssHooks[c]={set:function(a,b){var e,i="";if("string"!==h.type(b)||(e=s(b))){b=f(e||b);if(!t.rgba&&1!==b._rgba[3]){for(e="backgroundColor"===c?a.parentNode:a;(""===i||"transparent"===i)&&e&&e.style;)try{i=h.css(e,"backgroundColor"),e=e.parentNode}catch(j){}b=b.blend(i&&
925
+ "transparent"!==i?i:"_default")}b=b.toRgbaString()}try{a.style[c]=b}catch(k){}}};h.fx.step[c]=function(a){a.colorInit||(a.start=f(a.elem,c),a.end=f(a.end),a.colorInit=!0);h.cssHooks[c].set(a.elem,a.start.transition(a.end,a.pos))}})};f.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor");h.cssHooks.borderColor={expand:function(a){var b={};j(["Top","Right","Bottom","Left"],function(c,d){b["border"+
926
+ d+"Color"]=a});return b}};o=h.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}})(jQuery);
inc/js/easy-modal.min.js CHANGED
@@ -1 +1,928 @@
1
- (function(a){var k={init:function(c){$this=a(this);var b=a.extend({},a.fn.emodal.defaults,c);return this.each(function(){a(this).addClass("emodal").data("emodal",b).click(function(){a(this).emodal("show");return!1})})},close:function(){$this=a("#eModal-Container");var c=$this.data("emodal");a("#"+c.containerId).fadeOut(function(){a(this).remove();a("#"+c.overlayId).fadeOut(function(){a(this).remove()})});a("html").removeAttr("style").attr("style",a("html").data("htmlStyles"));a("body").removeAttr("style").attr("style", a("body").data("bodyStyles"));$this.removeClass("eModal-Opened");return this},show:function(){function c(){if(!0===m)return $this.each(function(){f.show().css({opacity:".01"}).emodal("center").animate({opacity:".01"}).animate({opacity:"1"});var b,c;a(window).resize(function(){clearTimeout(b);0<a(".eModal-Opened").length&&(b=setTimeout(function(){e.css({maxHeight:0.9*a(window).width()-60+"px"});f.emodal("center",!0)},200))}).scroll(function(){clearTimeout(c);0<a(".eModal-Opened").length&&(c=setTimeout(function(){f.emodal("center", !0)},200))})});setTimeout(c,200)}$this=a(this).addClass("eModal-Opened");var b=$this.data("emodal");b.maxHeight=0.85*a(window).height();b.maxWidth=0.9*a(window).width();var d=t[b.theme];a("html").data("htmlStyles",a("html").attr("style")||"");a("body").data("bodyStyles",a("body").attr("style")||"");a("html,body").css({width:"100%",height:"100%"});a("<div>").attr("id",b.overlayId).css({backgroundColor:d.overlayColor,opacity:d.overlayOpacity/100}).appendTo("body").fadeIn().click(function(){"true"== b.overlayClose&&(modal_is_open=!1,f.emodal("close"))});var f=a("<div>").data("emodal",b).attr("id",b.containerId).css({backgroundColor:d.containerBgColor,padding:d.containerPadding+"px",border:d.containerBorderColor+" "+d.containerBorderStyle+" "+d.containerBorderWidth+"px","-moz-border-radius":d.containerBorderRadius+"px","-webkit-border-radius":d.containerBorderRadius+"px","border-radius":d.containerBorderRadius+"px"}).hide().appendTo("body"),e=a("<div>").attr("id",b.contentId).css({color:d.contentFontColor}).appendTo(f), k=a("<div>").attr("id",b.controlsId).prependTo(f),g=d.closeSize,l,j,n,p="auto";switch(d.closePosition){case "topright":l=-(g/2)+"px";p=-(g/2)+"px";break;case "topleft":l=-(g/2)+"px";n=-(g/2)+"px";break;case "bottomright":j=-(g/2)+"px";p=-(g/2)+"px";break;case "bottomleft":j=-(g/2)+"px",n=-(g/2)+"px"}a("<a>").attr("id",b.closeId).text("x").click(function(){modal_is_open=!1;$this.emodal("close")}).css({left:n,right:p,top:l,bottom:j,height:d.closeSize+"px",width:d.closeSize+"px",backgroundColor:d.closeBgColor, border:"2px solid #FFFFFF","-moz-border-radius":d.closeBorderRadius+"px","-webkit-border-radius":d.closeBorderRadius+"px","border-radius":d.closeBorderRadius+"px",color:d.closeFontColor,fontSize:d.closeFontSize+"px",lineHeight:d.closeSize+"px"}).appendTo(k);if("Image"===b.type){f.css({maxWidth:b.maxWidth,maxHeight:b.maxHeight});var h=a("a.eModal-Image"),g=a("<a>").attr("id",b.prevId).click(function(){var c=a(".eModal-Opened"),d=h.eq(h.index(c)-1);c.removeClass("eModal-Opened");0>=d.length&&(d=h.eq(h.length)); d.addClass("eModal-Opened");f.animate({opacity:".01"},function(){var c=a("<img/>").attr("src",d.attr("href")).css({maxWidth:"100%",maxHeight:"100%"}).load(function(){!this.complete||"undefined"==typeof this.naturalWidth||0==this.naturalWidth?alert("broken image!"):(this.naturalWidth>b.maxWidth&&c.attr("width",b.maxWidth),this.naturalHeight>b.maxHeight&&c.attr("height",b.maxHeight),e.html(c).css({opacity:".01"}),f.emodal("center").animate({opacity:".01"}).animate({opacity:"1"}),e.animate({opacity:"1"}))})}); return!1});l=a("<a>").attr("id",b.nextId).click(function(){var c=a(".eModal-Opened"),d=h.eq(h.index(c)+1);c.removeClass("eModal-Opened");0==d.length&&(d=h.eq(0));d.addClass("eModal-Opened");f.animate({opacity:".01"},function(){var c=a("<img/>").attr("src",d.attr("href")).css({maxWidth:"100%",maxHeight:"100%"}).load(function(){!this.complete||"undefined"==typeof this.naturalWidth||0==this.naturalWidth?alert("broken image!"):(this.naturalWidth>b.maxWidth&&c.attr("width",b.maxWidth),this.naturalHeight> b.maxHeight&&c.attr("height",b.maxHeight),e.html(c).css({opacity:".01"}),f.emodal("center").animate({opacity:".01"}).animate({opacity:"1"}),e.animate({opacity:"1"}))})});return!1});a("<div>").attr("id",b.buttonsId).append(g,l).appendTo(f)}"Link"===b.type&&(b.requestData.url=a(this).attr("href"),b.requestData.iframeWidth=b.maxWidth,b.requestData.iframeHeight=b.maxHeight);var m=!1;if(null!=b.url)if("Image"===b.type)var q=a("<img/>").attr("src",b.url).css({maxWidth:"100%",maxHeight:"100%"}).load(function(){!this.complete|| "undefined"==typeof this.naturalWidth||0==this.naturalWidth?alert("broken image!"):(this.naturalWidth>b.maxWidth&&q.attr("width",b.maxWidth),this.naturalHeight>b.maxHeight&&q.attr("height",b.maxHeight),e.append(q),m=!0)});else a.post(b.url,b.requestData,function(c){e.prepend(c);a("form",e).length&&($orig_action=a("form",e).attr("action").split("#"),a("form",e).attr("action","#"+$orig_action[1]).attr("action"));f.show().css({opacity:".01"});0<b.userMaxHeight?e.css({maxHeight:a(window).height()*(b.userMaxHeight/ 100)+"px"}):e.innerHeight()>b.maxHeight&&"Link"!=b.type&&e.css({maxHeight:b.maxHeight-60+"px"});0<b.userHeight&&e.css({height:b.userHeight+"px"});0<b.userMaxWidth&&e.css({maxWidth:a(window).width()*(b.userMaxWidth/100)+"px"});0<b.userWidth&&e.css({width:b.userWidth+"px"});(c=e.find("#eModal-Title").css({color:d.contentTitleFontColor,fontFamily:d.contentTitleFontFamily,fontSize:d.contentTitleFontSize+"px"}))&&c.attr("title",c.text()).appendTo(k);b.onLoad();!0==b.cf7form&&u();!0==b.gravityform&&r(); m=!0});"true"==b.overlayEscClose&&a(document).keyup(function(c){if(a("#eModal-Container").length)27==c.keyCode&&(modal_is_open=!1,a("#eModal-Container").emodal("close"));else return!1});c()},center:function(c){$this=a(".eModal-Opened");var b=$this.data("emodal"),d=a("#"+b.containerId);setTimeout(function(){var b=(a(window).height()-a(d).outerHeight())/2,e=(a(window).width()-a(d).outerWidth())/2;!0==c?a(d).stop().animate({top:b+a(document).scrollTop(),left:e}):a(d).css({top:b+a(document).scrollTop(), left:e})},200);return this}},r=function(){var c=a("#eModal-Content");a("form[id^=gform]:not(.ajax_form)",c).addClass("ajax_form").ajaxForm({dataType:"html",success:function(b){c.html(b);a("form[id^=gform]",c).length?($orig_action=a("form[id^=gform]",c).attr("action").split("#"),a("form[id^=gform]",c).attr("action","#"+$orig_action[1]).attr("action"),r()):a("#eModal-Container").emodal("center",!0)}})},u=function(){a("div.wpcf7 > form").ajaxForm({beforeSubmit:function(a,b){b.wpcf7ClearResponseOutput(); b.find("img.ajax-loader").css({visibility:"visible"});return!0},beforeSerialize:function(c){c.find(".wpcf7-use-title-as-watermark.watermark").each(function(b,c){a(c).val("")});return!0},data:{_wpcf7_is_ajax_call:1},dataType:"json",success:function(c){var b=a(c.into).find("div.wpcf7-response-output");a(c.into).wpcf7ClearResponseOutput();c.invalids&&(a.each(c.invalids,function(b,f){a(c.into).find(f.into).wpcf7NotValidTip(f.message)}),b.addClass("wpcf7-validation-errors"));c.captcha&&a(c.into).wpcf7RefillCaptcha(c.captcha); c.quiz&&a(c.into).wpcf7RefillQuiz(c.quiz);1==c.spam&&b.addClass("wpcf7-spam-blocked");1==c.mailSent?(a(c.into).find("form").resetForm().clearForm(),b.addClass("wpcf7-mail-sent-ok"),c.onSentOk&&a.each(c.onSentOk,function(a,b){eval(b)}),modal_is_open=!1,a(this).emodal("close")):b.addClass("wpcf7-mail-sent-ng");c.onSubmit&&a.each(c.onSubmit,function(a,b){eval(b)});a(c.into).find(".wpcf7-use-title-as-watermark.watermark").each(function(b,c){a(c).val(a(c).attr("title"))});b.append(c.message).slideDown("fast")}})}; a.fn.emodal=function(c){if(k[c])return k[c].apply(this,Array.prototype.slice.call(arguments,1));if("object"===typeof c||!c)return k.init.apply(this,arguments);a.error("Method "+c+" does not exist on jQuery.emodal")};a.fn.emodal.defaults={overlayId:"eModal-Overlay",containerId:"eModal-Container",contentId:"eModal-Content",controlsId:"eModal-Controls",closeId:"eModal-Close",prevId:"eModal-Previous",nextId:"eModal-Next",buttonsId:"eModal-Buttons",imgId:"eModal-Img",url:easymodal.ajaxurl,piePath:easymodal.piePath, requestData:{},theme:"1",onLoad:function(){},type:null,maxHeight:0.85*a(window).height(),maxWidth:0.9*a(window).width(),overlayClose:!1};var s=easymodal.modals,t=easymodal.themes,j=easymodal.settings;a(document).ready(function(){jQuery.fn.isChildOf=function(a){return 0<this.parents(a).length};a.fn.hasAttr=function(a){return void 0!==this.attr(a)};a.expr[":"].external=function(a){return!a.href.match(/^mailto\:/)&&a.hostname!=location.hostname};a("[class^='eModal-'],[class*=' eModal-']").each(function(){for(var c= a(this).attr("class").split(" "),b=0;b<c.length;b++)if("eModal-"==c[b].substr(0,7)){var d=c[b].split("-")[1];break}a(this).emodal(s[d])});"true"==j.autoOpen&&0==a("#eModal_autoOpen").length&&($span=a('<span id="eModal_autoOpen">').hide().appendTo("body").emodal(s[j.autoOpenId]),setTimeout(function(){$span.click()},j.autoOpenDelay))})})(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Easy Modal v1.2
2
+ (function ($)
3
+ {
4
+ var currentMousePos = { x: -1, y: -1 };
5
+ var methods = {
6
+ init: function (options)
7
+ {
8
+ var opts = $.extend({}, $.fn.emodal.defaults, options);
9
+ return $(this).data('emodal', opts);
10
+ },
11
+ close: function (options)
12
+ {
13
+ var options = $.extend({
14
+ speed: 'fast',
15
+ overlay: true
16
+ }, $.fn.emodal.defaults, options);
17
+
18
+ var $this = $(this);
19
+ var opts = $this.data('emodal');
20
+ $this.removeClass('active').fadeOut(options.speed,function(){
21
+ if(options.overlay)
22
+ $('#modal-overlay').fadeOut(options.speed,function(){
23
+ options.onClose();
24
+ });
25
+ })
26
+ $(window).unbind('scroll.emodal').unbind('keyup.emodal');
27
+ return this;
28
+ },
29
+ open: function()
30
+ {
31
+ var $this = $(this);
32
+ var opts = $this.data('emodal');
33
+ if(themes[opts.theme] === undefined)
34
+ {
35
+ var theme = themes[1];
36
+ }
37
+ else
38
+ {
39
+ var theme = themes[opts.theme];
40
+ }
41
+ // Check for and create Modal Overlay
42
+ if(!$('#modal-overlay').length){ $('<div id="modal-overlay">').appendTo('body'); }
43
+
44
+ // If not stackable close all other modals.
45
+ if($('.modal.active').length)
46
+ {
47
+ $('.modal.active').each(function(){$(this).emodal('close',{speed:100,overlay:false})});
48
+ }
49
+ else
50
+ {
51
+ $('#modal-overlay').css('opacity',0).show(0);
52
+ }
53
+
54
+ $this.addClass('active');
55
+ // Modal Clos Button
56
+
57
+ if(!opts.closeDisabled && $('.close-modal',$this).length)
58
+ {
59
+ $('.close-modal',$this)
60
+ .unbind('click')
61
+ .click(function(){ $this.emodal('close'); })
62
+ .themeClose(opts);
63
+ }
64
+ $('#modal-overlay')
65
+ .unbind('click')
66
+ .click(function()
67
+ {
68
+ if (opts.overlayClose == true)
69
+ {
70
+ $this.emodal('close');
71
+ }
72
+ })
73
+ .themeOverlay(opts);
74
+
75
+ if(opts.overlayEscClose == true)
76
+ {
77
+ $(window).bind('keyup.emodal',function(e){
78
+ if($('.modal.active').length && e.keyCode == 27)
79
+ {
80
+ $this.emodal('close');
81
+ }
82
+ });
83
+ }
84
+ $this.themeModal(opts);
85
+ $this.animation(opts.animation,opts);
86
+ return $this;
87
+ }/*,
88
+ show: function ()
89
+ {
90
+ if (opts.type === 'Image')
91
+ {
92
+ container.css(
93
+ {
94
+ maxWidth: opts.maxWidth,
95
+ maxHeight: opts.maxHeight
96
+ });
97
+ var abcs = $("a.eModal-Image")
98
+ var prevButton = $('<a>')
99
+ .attr('id',opts.prevId)
100
+ .click(function (){
101
+ var current = $('.eModal-Opened')
102
+ var prev = abcs.eq(abcs.index(current) - 1)
103
+ current.removeClass('eModal-Opened')
104
+ if (prev.length <= 0) prev = abcs.eq(abcs.length)
105
+ prev.addClass('eModal-Opened')
106
+ container
107
+ .animate({opacity: '.01'}, function (){
108
+ var img = $("<img/>")
109
+ .attr('src', prev.attr('href'))
110
+ .css({
111
+ maxWidth: '100%',
112
+ maxHeight: '100%'
113
+ })
114
+ .load(function (){
115
+ if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0)
116
+ {
117
+ alert('broken image!')
118
+ }
119
+ else
120
+ {
121
+ if (this.naturalWidth > opts.maxWidth) img.attr('width', opts.maxWidth)
122
+ if (this.naturalHeight > opts.maxHeight) img.attr('height', opts.maxHeight)
123
+ content
124
+ .html(img)
125
+ .css({opacity:'.01'})
126
+
127
+ container
128
+ .emodal('center')
129
+ .animate({opacity:'.01'})
130
+ .animate({opacity:'1'})
131
+
132
+ content.animate({opacity: '1'})
133
+ }
134
+ })
135
+ })
136
+ return false
137
+ })
138
+ var nextButton = $('<a>')
139
+ .attr('id',opts.nextId)
140
+ .click(function (){
141
+ var current = $('.eModal-Opened')
142
+ var next = abcs.eq(abcs.index(current) + 1)
143
+ current.removeClass('eModal-Opened')
144
+ if (next.length == 0) next = abcs.eq(0)
145
+ next.addClass('eModal-Opened')
146
+ container
147
+ .animate({opacity: '.01'}, function (){
148
+ var img = $("<img/>")
149
+ .attr('src', next.attr('href'))
150
+ .css({
151
+ maxWidth: '100%',
152
+ maxHeight: '100%'
153
+ })
154
+ .load(function (){
155
+ if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0)
156
+ {
157
+ alert('broken image!')
158
+ }
159
+ else
160
+ {
161
+ if (this.naturalWidth > opts.maxWidth) img.attr('width', opts.maxWidth)
162
+ if (this.naturalHeight > opts.maxHeight) img.attr('height', opts.maxHeight)
163
+ content
164
+ .html(img)
165
+ .css({opacity:'.01'})
166
+
167
+ container
168
+ .emodal('center')
169
+ .animate({opacity:'.01'})
170
+ .animate({opacity:'1'})
171
+
172
+ content.animate({opacity: '1'})
173
+ }
174
+ })
175
+ })
176
+ return false
177
+ })
178
+ var buttons = $('<div>')
179
+ .attr('id',opts.buttonsId)
180
+ .append(prevButton, nextButton)
181
+ .appendTo(container)
182
+ }
183
+ if (opts.type === 'Link')
184
+ {
185
+ opts.requestData.url = $(this).attr('href')
186
+ opts.requestData.iframeWidth = opts.maxWidth
187
+ opts.requestData.iframeHeight = opts.maxHeight
188
+ }
189
+ var loaded = false
190
+ if (opts.url != null){
191
+ if (opts.type === 'Image'){
192
+ var img = $("<img/>")
193
+ .attr('src', opts.url)
194
+ .css({
195
+ maxWidth: '100%',
196
+ maxHeight: '100%'
197
+ })
198
+ .load(function (){
199
+ if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) alert('broken image!')
200
+ else {
201
+ if (this.naturalWidth > opts.maxWidth) img.attr('width', opts.maxWidth)
202
+ if (this.naturalHeight > opts.maxHeight) img.attr('height', opts.maxHeight)
203
+ content.append(img)
204
+ loaded = true
205
+ }
206
+ })
207
+ }
208
+ else
209
+ {
210
+ $.post(opts.url, opts.requestData, function (data){
211
+ content.prepend(data)
212
+ if($('form',content).length)
213
+ {
214
+ $orig_action = $('form',content).attr('action').split('#');
215
+ $('form',content).attr('action',"#" + $orig_action[1]).attr('action')
216
+ }
217
+ container
218
+ .show()
219
+ .css({opacity: '.01'});
220
+ if(opts.userMaxHeight > 0)
221
+ {
222
+ content.css({maxHeight: $(window).height() * (opts.userMaxHeight / 100) + 'px'});
223
+ }
224
+ else if(content.innerHeight() > opts.maxHeight && opts.type != 'Link')
225
+ {
226
+ content.css({maxHeight: (opts.maxHeight - 60) + 'px'});
227
+ }
228
+
229
+ if(opts.userHeight > 0)
230
+ {
231
+ content.css({height: opts.userHeight + 'px'});
232
+ }
233
+
234
+ if(opts.userMaxWidth > 0)
235
+ {
236
+ content.css({maxWidth: $(window).width() * (opts.userMaxWidth / 100) + 'px'});
237
+ }
238
+
239
+ if(opts.userWidth > 0)
240
+ {
241
+ content.css({width: opts.userWidth + 'px'});
242
+ }
243
+ var title = content
244
+ .find("#eModal-Title")
245
+ .css({
246
+ color: theme.contentTitleFontColor,
247
+ fontFamily: theme.contentTitleFontFamily,
248
+ fontSize: theme.contentTitleFontSize + 'px'
249
+ })
250
+ if(title) title.attr('title', title.text()).appendTo(controls)
251
+ opts.onLoad()
252
+ if(opts.cf7form == true) loadCf7()
253
+ if(opts.gravityform == true) loadGravityForms()
254
+ loaded = true
255
+ })
256
+ }
257
+ }
258
+ },*/
259
+ };
260
+ $.fn.emodal = function(method)
261
+ {
262
+ // Method calling logic
263
+ if (methods[method])
264
+ {
265
+ return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
266
+ }
267
+ else if (typeof method === 'object' || !method)
268
+ {
269
+ return methods.init.apply(this, arguments);
270
+ }
271
+ else
272
+ {
273
+ $.error('Method ' + method + ' does not exist on jQuery.emodal');
274
+ }
275
+ };
276
+ $.fn.themeOverlay = function(opts)
277
+ {
278
+ var $this = $(this);
279
+ if(themes[opts.theme] === undefined)
280
+ {
281
+ var theme = themes[1];
282
+ }
283
+ else
284
+ {
285
+ var theme = themes[opts.theme];
286
+ }
287
+ return $this
288
+ .addClass('theme-'+opts.theme)
289
+ .animate({
290
+ backgroundColor: theme.overlayColor,
291
+ opacity: theme.overlayOpacity / 100
292
+ },opts.duration);
293
+ };
294
+ $.fn.themeModal = function(opts)
295
+ {
296
+ var $this = $(this);
297
+ if(themes[opts.theme] === undefined)
298
+ {
299
+ var theme = themes[1];
300
+ }
301
+ else
302
+ {
303
+ var theme = themes[opts.theme];
304
+ }
305
+ if(opts.size == 'custom')
306
+ {
307
+ $this.css({
308
+ 'height': opts.userHeight ? opts.userHeight + opts.userHeightUnit : $this.css('height'),
309
+ 'width': opts.userWidth ? opts.userWidth + opts.userWidthUnit : $this.css('width'),
310
+ 'margin-left': opts.userWidth ? -(opts.userWidth / 2) + opts.userWidthUnit : $this.css('margin-left')
311
+ });
312
+ }
313
+ return $this
314
+ .addClass('theme-'+opts.theme)
315
+ .css({
316
+ color: theme.contentFontColor,
317
+ backgroundColor: theme.containerBgColor,
318
+ padding: theme.containerPadding + 'px',
319
+ border: theme.containerBorderColor + ' ' + theme.containerBorderStyle + ' ' + theme.containerBorderWidth + 'px',
320
+ "-webkit-border-radius": theme.containerBorderRadius + 'px',
321
+ "border-radius": theme.containerBorderRadius + 'px'
322
+ })
323
+ };
324
+ $.fn.themeClose = function(opts)
325
+ {
326
+ var $this = $(this);
327
+ if(themes[opts.theme] === undefined)
328
+ {
329
+ var theme = themes[1];
330
+ }
331
+ else
332
+ {
333
+ var theme = themes[opts.theme];
334
+ }
335
+ if(theme.closeLocation == 'outside')
336
+ {
337
+ var val = theme.closeSize;
338
+ var top = bottom = left = right = 'auto';
339
+ switch (theme.closePosition)
340
+ {
341
+ case 'topright':
342
+ top = -(val / 2) + 'px';
343
+ right = -(val / 2) + 'px';
344
+ break;
345
+ case 'topleft':
346
+ top = -(val / 2) + 'px';
347
+ left = -(val / 2) + 'px';
348
+ break;
349
+ case 'bottomright':
350
+ bottom = -(val / 2) + 'px';
351
+ right = -(val / 2) + 'px';
352
+ break;
353
+ case 'bottomleft':
354
+ bottom = -(val / 2) + 'px';
355
+ left = -(val / 2) + 'px';
356
+ break;
357
+ }
358
+ $this
359
+ .addClass('outside')
360
+ .css({
361
+ left: left,
362
+ right: right,
363
+ top: top,
364
+ bottom: bottom,
365
+ height: theme.closeSize + 'px',
366
+ fontSize: theme.closeFontSize + 'px',
367
+ width: theme.closeSize + 'px',
368
+ backgroundColor: theme.closeBgColor,
369
+ "-webkit-border-radius": theme.closeBorderRadius + 'px',
370
+ "border-radius": theme.closeBorderRadius + 'px',
371
+ lineHeight: theme.closeSize + 'px'
372
+ });
373
+ }
374
+ return $this
375
+ .addClass('theme-'+opts.theme)
376
+ .html(theme.closeText)
377
+ .css({
378
+ color: theme.closeFontColor,
379
+ });
380
+ };
381
+
382
+ var animations = {
383
+ fade: function(options)
384
+ {
385
+ var $this = $(this).show(0).css({'opacity':0,'top':$(window).scrollTop() + 100 +'px'});
386
+ var opts = $.extend($.fn.animation.defaults, options);
387
+ $this.animate({
388
+ opacity: 1
389
+ },parseInt(opts.duration),opts.easing,function(){
390
+ $this
391
+ .removeAttr('style')
392
+ .css({'display':'block','visibility':'visible','top': ($(window).scrollTop() + 100) +'px'})
393
+ .themeModal(opts);
394
+ });
395
+ },
396
+ fadeAndSlide: function(options)
397
+ {
398
+ var $this = $(this).show(0).css('opacity',0);
399
+ var opts = $.extend($.fn.animation.defaults, options);
400
+ switch(opts.direction)
401
+ {
402
+ case 'mouse': $this.css({'top': currentMousePos.y + 'px','left': currentMousePos.x +'px'}); break;
403
+ case 'top': $this.css({'top': $(window).scrollTop() - $this.outerHeight(true) + 'px'}); break;
404
+ case 'left': $this.css({'left': '-'+$this.outerWidth(true)+'px','top':$(window).scrollTop() + 100 +'px'}); break;
405
+ case 'bottom': $this.css({'top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
406
+ case 'right': $this.css({'left': $(window).innerWidth()+'px','top':$(window).scrollTop() + 100 +'px'}); break;
407
+ case 'topleft': $this.css({'left': '-'+$this.outerWidth(true)+'px','top':$(window).scrollTop() + 100 +'px','top': $(window).scrollTop() - $this.outerHeight(true) + 'px'}); break;
408
+ case 'topright': $this.css({'left': $(window).innerWidth()+'px','top': $(window).scrollTop() - $this.outerHeight(true) + 'px'}); break;
409
+ case 'bottomleft': $this.css({'left': '-'+$this.outerWidth(true)+'px','top':$(window).scrollTop() + 100 +'px','top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
410
+ case 'bottomright': $this.css({'left': $(window).innerWidth()+'px','top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
411
+ }
412
+ $('html').css('overflow-x','hidden');
413
+ $this.animate({
414
+ 'left': '50%',
415
+ 'top': $(window).scrollTop() + 100 +'px'
416
+ },{duration: opts.duration , queue:false},opts.easing);
417
+ setTimeout(function()
418
+ {
419
+ $this.animate({
420
+ 'opacity': 1
421
+ },opts.duration * .75,opts.easing,function(){
422
+ $this
423
+ .removeAttr('style')
424
+ .css({'display':'block','visibility':'visible','top': ($(window).scrollTop() + 100) +'px'})
425
+ .themeModal(opts);
426
+ $('html').css('overflow-x','inherit');
427
+ });
428
+ },opts.duration * .25);
429
+ },
430
+ grow: function(options)
431
+ {
432
+ var $this = $(this).show(0);
433
+ var opts = $.extend($.fn.animation.defaults, options);
434
+ var currently = {
435
+ width: parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100 + '%',
436
+ height: parseInt($this.css('height')),
437
+ marginLeft: '-' + parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100 / 2 + '%',
438
+ padding: parseInt($this.css('padding-left')) / parseInt($this.css('font-size')) + 'em'
439
+ };
440
+ $('*',$this).fadeOut(0);
441
+ $this.css({
442
+ 'top': (currently.height/10) * 5 + $(window).scrollTop() + 100 +'px',
443
+ 'left': (currently.width/10) * 5 + ($(window).innerWidth() / 2) +'px',
444
+ 'height': 0,
445
+ 'width': 0,
446
+ 'padding': 0,
447
+ 'margin-left': 0
448
+ }).animate({
449
+ 'top': $(window).scrollTop() + 100 +'px',
450
+ 'left': '50%',
451
+ 'padding': currently.padding,
452
+ 'height': currently.height,
453
+ 'width': currently.width,
454
+ 'margin-left': currently.marginLeft
455
+ },opts.duration,function(){
456
+ $this
457
+ .removeAttr('style')
458
+ .css({'display':'block','visibility':'visible','top': ($(window).scrollTop() + 100) +'px'})
459
+ .themeModal(opts);
460
+ $('*',$this).fadeIn('fast');
461
+ });
462
+ },
463
+ growAndSlide: function(options)
464
+ {
465
+ var $this = $(this).show(0);
466
+ var opts = $.extend($.fn.animation.defaults, options);
467
+ var currently = {
468
+ width: parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100 + '%',
469
+ height: parseInt($this.css('height')),
470
+ marginLeft: '-' + parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100 / 2 + '%',
471
+ padding: parseInt($this.css('padding-left')) / parseInt($this.css('font-size')) + 'em'
472
+ };
473
+ $('html,body').css('overflow-x','hidden');
474
+ $('*',$this).fadeOut(0);
475
+ $this.css({
476
+ 'opacity': 1,
477
+ 'height': 0,
478
+ 'width': 0,
479
+ 'padding': 0,
480
+ 'margin-left': 0
481
+ });
482
+ switch(opts.direction)
483
+ {
484
+ case 'mouse': $this.css({'top': currentMousePos.y + 'px','left': currentMousePos.x +'px'}); break;
485
+ case 'top': $this.css({'top': $(window).scrollTop() + $this.outerHeight(true) + 'px'}); break;
486
+ case 'left': $this.css({'left': 0,'top':$(window).scrollTop() + 100 +'px'}); break;
487
+ case 'bottom': $this.css({'top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
488
+ case 'right': $this.css({'left': $(window).innerWidth()+'px','top':$(window).scrollTop() + 100 +'px'}); break;
489
+ case 'topleft': $this.css({'left': 0,'top':$(window).scrollTop() + 100 +'px','top': $(window).scrollTop() - $this.outerHeight(true) + 'px'}); break;
490
+ case 'topright': $this.css({'left': $(window).innerWidth()+'px','top': $(window).scrollTop() - $this.outerHeight(true) + 'px'}); break;
491
+ case 'bottomleft': $this.css({'left': 0,'top':$(window).scrollTop() + 100 +'px','top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
492
+ case 'bottomright': $this.css({'left': $(window).innerWidth()+'px','top': $(window).innerHeight() + $(window).scrollTop() + 'px'}); break;
493
+ }
494
+ $this.animate({
495
+ 'height': currently.height,
496
+ 'padding': currently.padding,
497
+ 'width': currently.width,
498
+ 'margin-left': currently.marginLeft
499
+ },{duration: opts.duration , queue:false},opts.easing);
500
+ setTimeout(function()
501
+ {
502
+ $this.animate({
503
+ 'height': 'auto',
504
+ 'top': ($(window).scrollTop() + 100) +'px',
505
+ 'left': '50%'
506
+ },opts.duration * .95,opts.easing,function(){
507
+ $this
508
+ .removeAttr('style')
509
+ .css({'display':'block','visibility':'visible','top': ($(window).scrollTop() + 100) +'px'})
510
+ .themeModal(opts);
511
+ $('*',$this).fadeIn('fast');
512
+ $('html').css('overflow-x','inherit');
513
+ });
514
+ },opts.duration * .05);
515
+ }/*,
516
+ canvas: function(options)
517
+ {
518
+ var $this = $(this)
519
+ $this.css('top',$(document).height() + $this.height()).show(0);
520
+ html2canvas($this, {
521
+ onrendered: function(canvas) {
522
+ var canvas = canvas;
523
+ //$('body').append(canvas);
524
+ var x = 4,
525
+ y = 3,
526
+ random = true,
527
+ width = parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100,
528
+ height = parseInt($this.css('height')),
529
+ marginLeft = '-' + parseInt($this.css('width')) / parseInt($this.parent().innerWidth()) * 100 / 2 + '%',
530
+ $img = canvas.toDataURL(),
531
+ n_tiles = x * y, // total number of tiles
532
+ tiles = [],
533
+ $tiles = {};
534
+
535
+ for ( var i = 0; i < n_tiles; i++ ) {
536
+ tiles.push('<div class="tile"/>');
537
+ }
538
+
539
+ $tiles = $( tiles.join('') );
540
+ // Hide original image and insert tiles in DOM
541
+ $this.hide().after(
542
+ $('<div class="modal-placeholder"/>').attr('style', $this.attr('style')).css({
543
+ 'opacity': 1,
544
+ 'height': height,
545
+ 'margin-left': '-' + (parseInt(width) / 2) + '%',
546
+ 'padding': 0,
547
+ 'width': parseInt(width) + '%',
548
+ 'top': $(window).scrollTop() + 100
549
+ })
550
+ .show(0)
551
+ .append( $tiles )
552
+ );
553
+ // Adjust position
554
+ $tiles.each(function(){
555
+ var pos = $(this).position();
556
+
557
+ console.log($this.outerHeight() / y + 'px');
558
+ $(this).css({
559
+ 'border': 0,
560
+ 'backgroundPosition': -pos.left +'px ' + -pos.top + 'px',
561
+ 'width': $this.outerWidth() / x + 'px',
562
+ 'height': $this.outerHeight() / y + 'px',
563
+ 'background-image': 'url('+ $img +')'
564
+ });
565
+ });
566
+
567
+ }
568
+ });
569
+ //$this.hide(0);
570
+ var opts = $.extend($.fn.animation.defaults, options);
571
+ }*/
572
+ };
573
+ $.fn.animation = function(style)
574
+ {
575
+ // Method calling logic
576
+ if (animations[style])
577
+ {
578
+ return animations[style].apply(this, Array.prototype.slice.call(arguments, 1));
579
+ }
580
+ else
581
+ {
582
+ $.error('Animation style ' + animations + ' does not exist on jQuery.animation');
583
+ }
584
+ };
585
+
586
+ $.fn.animation.defaults = {
587
+ duration:750,
588
+ direction: 'mouse',
589
+ easing: 'swing'
590
+ };
591
+ $.fn.emodal.defaults = {
592
+ theme: 1,
593
+ onLoad: function (){},
594
+ onClose: function (){},
595
+ type: null,
596
+ maxHeight: null,
597
+ maxWidth: null,
598
+ userHeight: null,
599
+ userWidth: null,
600
+ animation: 'fadeAndSlide',
601
+ direction: 'bottom',
602
+ overlayClose: false,
603
+ overlayEscClose: false
604
+ };
605
+ var modals = easymodal.modals;
606
+ var themes = easymodal.themes;
607
+ var settings = easymodal.settings;
608
+
609
+ $(document).ready(function()
610
+ {
611
+ $('.modal').each(function()
612
+ {
613
+ var $this = $(this).css({visibility:'visible'}).hide(0);
614
+ var modalId = $this.attr('id').split("-")[1];
615
+ $this.emodal(modals[modalId]);
616
+
617
+ $(document).on('click','.'+$this.attr('id'),function(e){
618
+ e.preventDefault();
619
+ e.stopPropagation();
620
+ currentMousePos.x = e.pageX;
621
+ currentMousePos.y = e.pageY;
622
+ $this.emodal('open');
623
+ });
624
+ $('.'+$this.attr('id')).css('cursor','pointer');
625
+ });
626
+ if(easymodal.autoOpen && !$.cookie("eModal-autoOpen-"+easymodal.autoOpen.id))
627
+ {
628
+ setTimeout(function(){
629
+ $('#eModal-'+easymodal.autoOpen.id).emodal('open');
630
+ $.cookie("eModal-autoOpen-"+easymodal.autoOpen.id, true, { expires : parseInt(easymodal.autoOpen.timer) });
631
+ },easymodal.autoOpen.delay);
632
+ }
633
+ if(easymodal.autoExit && !$.cookie("eModal-autoExit-"+easymodal.autoExit.id))
634
+ {
635
+ $('body').one('mouseleave',function(){
636
+ if(easymodal.force_user_login)
637
+ {
638
+ return false;
639
+ }
640
+ $this = $('#eModal-'+easymodal.autoExit.id).emodal('open');
641
+ $.cookie("eModal-autoExit-"+easymodal.autoExit.id, true, { expires : parseInt(easymodal.autoExit.timer) });
642
+ });
643
+ }
644
+
645
+
646
+
647
+ // Run our login ajax
648
+ $('#eModal-Login form').on('submit', function(e) {
649
+ $form = $(this);
650
+ // Stop the form from submitting so we can use ajax.
651
+ e.preventDefault();
652
+ // Check what form is currently being submitted so we can return the right values for the ajax request.
653
+ // Display our loading message while we check the credentials.
654
+ $form.append('<p class="message notice">' + easymodal.loadingtext + '</p>');
655
+ // Check if we are trying to login. If so, process all the needed form fields and return a faild or success message.
656
+ $.ajax({
657
+ type: 'POST',
658
+ dataType: 'json',
659
+ url: easymodal.ajaxLogin,
660
+ data: {
661
+ 'action' : 'ajaxlogin', // Calls our wp_ajax_nopriv_ajaxlogin
662
+ 'username' : $('#user_login',$form).val(),
663
+ 'password' : $('#user_pass',$form).val(),
664
+ 'rememberme' : $('#rememberme',$form).is(':checked') ? true : false,
665
+ 'login' : true,
666
+ 'easy-modal' : $('#safe_csrf_nonce_easy_modal',$form).val()
667
+ },
668
+ success: function(results) {
669
+ // Check the returned data message. If we logged in successfully, then let our users know and remove the modal window.
670
+ if(results.loggedin === true) {
671
+ $('p.message',$form).removeClass('notice').addClass('success').text(results.message).show();
672
+ setTimeout(function(){
673
+ $('#eModal-Login').emodal('close',{onClose: function(){
674
+ window.location.href = easymodal.redirecturl;
675
+ }});
676
+
677
+ },2000);
678
+
679
+ } else {
680
+ $('p.message',$form).removeClass('notice').addClass('error').text(results.message).show();
681
+ }
682
+ }
683
+ });
684
+ });
685
+ // Run our register ajax
686
+ $('#eModal-Register form').on('submit', function(e) {
687
+ $form = $(this);
688
+ // Stop the form from submitting so we can use ajax.
689
+ e.preventDefault();
690
+ // Check what form is currently being submitted so we can return the right values for the ajax request.
691
+ // Display our loading message while we check the credentials.
692
+ $form.append('<p class="message notice">' + easymodal.loadingtext + '</p>');
693
+ // Check if we are trying to login. If so, process all the needed form fields and return a faild or success message.
694
+ $.ajax({
695
+ type: 'POST',
696
+ dataType: 'json',
697
+ url: easymodal.ajaxLogin,
698
+ data: {
699
+ 'action' : 'ajaxlogin', // Calls our wp_ajax_nopriv_ajaxlogin
700
+ 'username' : $('#forgot_login',$form).val(),
701
+ 'email' : $('#reg_email',$form).val(),
702
+ 'register' : true,
703
+ 'easy-modal' : $('#safe_csrf_nonce_easy_modal',$form).val()
704
+ },
705
+ success: function(results) {
706
+ // Check the returned data message. If we logged in successfully, then let our users know and remove the modal window.
707
+ if(results.loggedin === true) {
708
+ $('p.message',$form).removeClass('notice').addClass('success').text(results.message).show();
709
+ setTimeout(function(){
710
+ $('#eModal-Login').emodal('close',{onClose: function(){
711
+ window.location.href = easymodal.redirecturl;
712
+ }});
713
+
714
+ },2000);
715
+
716
+ } else {
717
+ $('p.message',$form).removeClass('notice').addClass('error').text(results.message).show();
718
+ }
719
+ }
720
+ });
721
+ });
722
+ // Run our forgot password ajax
723
+ $('#eModal-Forgot form').on('submit', function(e) {
724
+ $form = $(this);
725
+ // Stop the form from submitting so we can use ajax.
726
+ e.preventDefault();
727
+ // Check what form is currently being submitted so we can return the right values for the ajax request.
728
+ // Display our loading message while we check the credentials.
729
+ $form.append('<p class="message notice">' + easymodal.loadingtext + '</p>');
730
+ // Check if we are trying to login. If so, process all the needed form fields and return a faild or success message.
731
+ $.ajax({
732
+ type: 'POST',
733
+ dataType: 'json',
734
+ url: easymodal.ajaxLogin,
735
+ data: {
736
+ 'action' : 'ajaxlogin', // Calls our wp_ajax_nopriv_ajaxlogin
737
+ 'username' : $('#forgot_login',$form).val(),
738
+ 'forgotten' : true,
739
+ 'easy-modal' : $('#safe_csrf_nonce_easy_modal',$form).val()
740
+ },
741
+ success: function(results) {
742
+ // Check the returned data message. If we logged in successfully, then let our users know and remove the modal window.
743
+ if(results.loggedin === true) {
744
+ $('p.message',$form).removeClass('notice').addClass('success').text(results.message).show();
745
+ setTimeout(function(){
746
+ $('#eModal-Login').emodal('close',{onClose: function(){
747
+ window.location.href = easymodal.redirecturl;
748
+ }});
749
+
750
+ },2000);
751
+
752
+ } else {
753
+ $('p.message',$form).removeClass('notice').addClass('error').text(results.message).show();
754
+ }
755
+ }
756
+ });
757
+ });
758
+ /*
759
+ } else if ( form_id === 'register' ) {
760
+ $.ajax({
761
+ type: 'GET',
762
+ dataType: 'json',
763
+ url: wpml_script.ajax,
764
+ data: {
765
+ 'action' : 'ajaxlogin', // Calls our wp_ajax_nopriv_ajaxlogin
766
+ 'username' : $('#form #reg_user').val(),
767
+ 'email' : $('#form #reg_email').val(),
768
+ 'register' : $('#form input[name="register"]').val(),
769
+ 'security' : $('#form #security').val()
770
+ },
771
+ success: function(results) {
772
+ if(results.registerd === true) {
773
+ $('.wpml-content > p.message').removeClass('notice').addClass('success').text(results.message).show();
774
+ $('#register #form input:not(#user-submit)').val('');
775
+ } else {
776
+ $('.wpml-content > p.message').removeClass('notice').addClass('error').text(results.message).show();
777
+ }
778
+ }
779
+ });
780
+ } else if ( form_id === 'forgotten' ) {
781
+ $.ajax({
782
+ type: 'GET',
783
+ dataType: 'json',
784
+ url: wpml_script.ajax,
785
+ data: {
786
+ 'action' : 'ajaxlogin', // Calls our wp_ajax_nopriv_ajaxlogin
787
+ 'username' : $('#form #forgot_login').val(),
788
+ 'forgotten' : $('#form input[name="register"]').val(),
789
+ 'security' : $('#form #security').val()
790
+ },
791
+ success: function(results) {
792
+ if(results.reset === true) {
793
+ $('.wpml-content > p.message').removeClass('notice').addClass('success').text(results.message).show();
794
+ $('#forgotten #form input:not(#user-submit)').val('');
795
+ } else {
796
+ $('.wpml-content > p.message').removeClass('notice').addClass('error').text(results.message).show();
797
+ }
798
+ }
799
+ });
800
+ } else {
801
+ // if all else fails and we've hit here... something strange happen and notify the user.
802
+ $('.wpml-content > p.message').text('Something Please refresh your window and try again.');
803
+ }
804
+ });
805
+
806
+
807
+
808
+
809
+
810
+ /*
811
+ $.expr[':'].external = function (obj)
812
+ {
813
+ return !obj.href.match(/^mailto\:/) && (obj.hostname != location.hostname);
814
+ };
815
+ $('a:external').addClass('external eModal-Link').emodal(easymodal.modals['Link']);
816
+ $('a[href$=".gif"], a[href$=".jpg"], a[href$=".png"], a[href$=".bmp"]').children('img').each(function ()
817
+ {
818
+ var anch = $(this).parents('a').addClass('eModal-Image');
819
+ var url = $(anch).attr('href');
820
+ $(anch).emodal(
821
+ {
822
+ url: url,
823
+ theme: '1',
824
+ type: 'Image'
825
+ });
826
+ });
827
+ if(settings.autoOpen == 'true')
828
+ {
829
+ setTimeout(function(){
830
+ $('#emModal-'+settings.autoOpenId).emodal('open');
831
+ }, settings.autoOpenDelay);
832
+ }
833
+ */
834
+ })
835
+ })(jQuery);
836
+ /*!
837
+ * jQuery Cookie Plugin v1.3.1
838
+ * https://github.com/carhartl/jquery-cookie
839
+ *
840
+ * Copyright 2013 Klaus Hartl
841
+ * Released under the MIT license
842
+ */
843
+
844
+ (function (factory) {
845
+ if (typeof define === 'function' && define.amd) {
846
+ // AMD. Register as anonymous module.
847
+ define(['jquery'], factory);
848
+ } else {
849
+ // Browser globals.
850
+ factory(jQuery);
851
+ }
852
+ }(function ($) {
853
+ var pluses = /\+/g;
854
+ function raw(s) {
855
+ return s;
856
+ }
857
+ function decoded(s) {
858
+ return decodeURIComponent(s.replace(pluses, ' '));
859
+ }
860
+ function converted(s) {
861
+ if (s.indexOf('"') === 0) {
862
+ // This is a quoted cookie as according to RFC2068, unescape
863
+ s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
864
+ }
865
+ try {
866
+ return config.json ? JSON.parse(s) : s;
867
+ } catch(er) {}
868
+ }
869
+ var config = $.cookie = function (key, value, options) {
870
+ // write
871
+ if (value !== undefined) {
872
+ options = $.extend({}, config.defaults, options);
873
+ if (typeof options.expires === 'number') {
874
+ var days = options.expires, t = options.expires = new Date();
875
+ t.setDate(t.getDate() + days);
876
+ }
877
+ value = config.json ? JSON.stringify(value) : String(value);
878
+ return (document.cookie = [
879
+ config.raw ? key : encodeURIComponent(key),
880
+ '=',
881
+ config.raw ? value : encodeURIComponent(value),
882
+ options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
883
+ options.path ? '; path=' + options.path : '',
884
+ options.domain ? '; domain=' + options.domain : '',
885
+ options.secure ? '; secure' : ''
886
+ ].join(''));
887
+ }
888
+ // read
889
+ var decode = config.raw ? raw : decoded;
890
+ var cookies = document.cookie.split('; ');
891
+ var result = key ? undefined : {};
892
+ for (var i = 0, l = cookies.length; i < l; i++) {
893
+ var parts = cookies[i].split('=');
894
+ var name = decode(parts.shift());
895
+ var cookie = decode(parts.join('='));
896
+ if (key && key === name) {
897
+ result = converted(cookie);
898
+ break;
899
+ }
900
+ if (!key) {
901
+ result[name] = converted(cookie);
902
+ }
903
+ }
904
+ return result;
905
+ };
906
+ config.defaults = {};
907
+ $.removeCookie = function (key, options) {
908
+ if ($.cookie(key) !== undefined) {
909
+ // Must not alter options, thus extending a fresh object...
910
+ $.cookie(key, '', $.extend({}, options, { expires: -1 }));
911
+ return true;
912
+ }
913
+ return false;
914
+ };
915
+ }));
916
+ (function(h,m){function n(a,b,c){var d=r[b.type]||{};if(null==a)return c||!b.def?null:b.def;a=d.floor?~~a:parseFloat(a);return isNaN(a)?b.def:d.mod?(a+d.mod)%d.mod:0>a?0:d.max<a?d.max:a}function s(a){var b=f(),c=b._rgba=[],a=a.toLowerCase();j(v,function(d,g){var e,i=g.re.exec(a);e=i&&g.parse(i);i=g.space||"rgba";if(e)return e=b[i](e),b[k[i].cache]=e[k[i].cache],c=b._rgba=e._rgba,!1});return c.length?("0,0,0,0"===c.join()&&h.extend(c,o.transparent),b):o[a]}function p(a,b,c){c=(c+1)%1;return 1>6*c?
917
+ a+6*(b-a)*c:1>2*c?b:2>3*c?a+6*(b-a)*(2/3-c):a}var w=/^([\-+])=\s*(\d+\.?\d*)/,v=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),
918
+ parseInt(a[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(a){return[a[1],a[2]/100,a[3]/100,a[4]]}}],f=h.Color=function(a,b,c,d){return new h.Color.fn.parse(a,b,c,d)},k={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,
919
+ type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},r={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},t=f.support={},u=h("<p>")[0],o,j=h.each;u.style.cssText="background-color:rgba(1,1,1,.5)";t.rgba=-1<u.style.backgroundColor.indexOf("rgba");j(k,function(a,b){b.cache="_"+a;b.props.alpha={idx:3,type:"percent",def:1}});f.fn=h.extend(f.prototype,{parse:function(a,b,c,d){if(a===m)return this._rgba=[null,null,null,null],this;if(a.jquery||a.nodeType)a=
920
+ h(a).css(b),b=m;var g=this,e=h.type(a),i=this._rgba=[];b!==m&&(a=[a,b,c,d],e="array");if("string"===e)return this.parse(s(a)||o._default);if("array"===e)return j(k.rgba.props,function(d,c){i[c.idx]=n(a[c.idx],c)}),this;if("object"===e)return a instanceof f?j(k,function(c,d){a[d.cache]&&(g[d.cache]=a[d.cache].slice())}):j(k,function(d,c){var b=c.cache;j(c.props,function(d,e){if(!g[b]&&c.to){if(d==="alpha"||a[d]==null)return;g[b]=c.to(g._rgba)}g[b][e.idx]=n(a[d],e,true)});if(g[b]&&h.inArray(null,g[b].slice(0,
921
+ 3))<0){g[b][3]=1;if(c.from)g._rgba=c.from(g[b])}}),this},is:function(a){var b=f(a),c=!0,d=this;j(k,function(a,e){var i,h=b[e.cache];h&&(i=d[e.cache]||e.to&&e.to(d._rgba)||[],j(e.props,function(a,d){if(null!=h[d.idx])return c=h[d.idx]===i[d.idx]}));return c});return c},_space:function(){var a=[],b=this;j(k,function(c,d){b[d.cache]&&a.push(c)});return a.pop()},transition:function(a,b){var c=f(a),d=c._space(),g=k[d],e=0===this.alpha()?f("transparent"):this,i=e[g.cache]||g.to(e._rgba),h=i.slice(),c=c[g.cache];
922
+ j(g.props,function(a,d){var g=d.idx,e=i[g],f=c[g],j=r[d.type]||{};null!==f&&(null===e?h[g]=f:(j.mod&&(f-e>j.mod/2?e+=j.mod:e-f>j.mod/2&&(e-=j.mod)),h[g]=n((f-e)*b+e,d)))});return this[d](h)},blend:function(a){if(1===this._rgba[3])return this;var b=this._rgba.slice(),c=b.pop(),d=f(a)._rgba;return f(h.map(b,function(a,b){return(1-c)*d[b]+c*a}))},toRgbaString:function(){var a="rgba(",b=h.map(this._rgba,function(a,d){return null==a?2<d?1:0:a});1===b[3]&&(b.pop(),a="rgb(");return a+b.join()+")"},toHslaString:function(){var a=
923
+ "hsla(",b=h.map(this.hsla(),function(a,d){null==a&&(a=2<d?1:0);d&&3>d&&(a=Math.round(100*a)+"%");return a});1===b[3]&&(b.pop(),a="hsl(");return a+b.join()+")"},toHexString:function(a){var b=this._rgba.slice(),c=b.pop();a&&b.push(~~(255*c));return"#"+h.map(b,function(a){a=(a||0).toString(16);return 1===a.length?"0"+a:a}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}});f.fn.parse.prototype=f.fn;k.hsla.to=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,
924
+ null,null,a[3]];var b=a[0]/255,c=a[1]/255,d=a[2]/255,a=a[3],g=Math.max(b,c,d),e=Math.min(b,c,d),i=g-e,h=g+e,f=0.5*h;return[Math.round(e===g?0:b===g?60*(c-d)/i+360:c===g?60*(d-b)/i+120:60*(b-c)/i+240)%360,0===f||1===f?f:0.5>=f?i/h:i/(2-h),f,null==a?1:a]};k.hsla.from=function(a){if(null==a[0]||null==a[1]||null==a[2])return[null,null,null,a[3]];var b=a[0]/360,c=a[1],d=a[2],a=a[3],c=0.5>=d?d*(1+c):d+c-d*c,d=2*d-c;return[Math.round(255*p(d,c,b+1/3)),Math.round(255*p(d,c,b)),Math.round(255*p(d,c,b-1/3)),
925
+ a]};j(k,function(a,b){var c=b.props,d=b.cache,g=b.to,e=b.from;f.fn[a]=function(a){g&&!this[d]&&(this[d]=g(this._rgba));if(a===m)return this[d].slice();var b,q=h.type(a),k="array"===q||"object"===q?a:arguments,l=this[d].slice();j(c,function(a,d){var b=k["object"===q?a:d.idx];null==b&&(b=l[d.idx]);l[d.idx]=n(b,d)});return e?(b=f(e(l)),b[d]=l,b):f(l)};j(c,function(d,b){f.fn[d]||(f.fn[d]=function(c){var e=h.type(c),g="alpha"===d?this._hsla?"hsla":"rgba":a,f=this[g](),j=f[b.idx];if("undefined"===e)return j;
926
+ "function"===e&&(c=c.call(this,j),e=h.type(c));if(null==c&&b.empty)return this;"string"===e&&(e=w.exec(c))&&(c=j+parseFloat(e[2])*("+"===e[1]?1:-1));f[b.idx]=c;return this[g](f)})})});f.hook=function(a){a=a.split(" ");j(a,function(a,c){h.cssHooks[c]={set:function(a,b){var e,i="";if("string"!==h.type(b)||(e=s(b))){b=f(e||b);if(!t.rgba&&1!==b._rgba[3]){for(e="backgroundColor"===c?a.parentNode:a;(""===i||"transparent"===i)&&e&&e.style;)try{i=h.css(e,"backgroundColor"),e=e.parentNode}catch(j){}b=b.blend(i&&
927
+ "transparent"!==i?i:"_default")}b=b.toRgbaString()}try{a.style[c]=b}catch(k){}}};h.fx.step[c]=function(a){a.colorInit||(a.start=f(a.elem,c),a.end=f(a.end),a.colorInit=!0);h.cssHooks[c].set(a.elem,a.start.transition(a.end,a.pos))}})};f.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor");h.cssHooks.borderColor={expand:function(a){var b={};j(["Top","Right","Bottom","Left"],function(c,d){b["border"+
928
+ d+"Color"]=a});return b}};o=h.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}})(jQuery);
inc/js/jquery.form.js CHANGED
@@ -1,12 +1,12 @@
1
- /*!
2
- * jQuery Form Plugin
3
- * version: 3.14 (30-JUL-2012)
4
- * @requires jQuery v1.3.2 or later
5
- *
6
- * Examples and documentation at: http://malsup.com/jquery/form/
7
- * Project repository: https://github.com/malsup/form
8
- * Dual licensed under the MIT and GPL licenses:
9
- * http://malsup.github.com/mit-license.txt
10
- * http://malsup.github.com/gpl-license-v2.txt
11
- */
12
  (function(e){var c={};c.fileapi=e("<input type='file'/>").get(0).files!==undefined;c.formdata=window.FormData!==undefined;e.fn.ajaxSubmit=function(g){if(!this.length){d("ajaxSubmit: skipping submit process - no element selected");return this}var f,w,i,l=this;if(typeof g=="function"){g={success:g}}f=this.attr("method");w=this.attr("action");i=(typeof w==="string")?e.trim(w):"";i=i||window.location.href||"";if(i){i=(i.match(/^([^#]+)/)||[])[1]}g=e.extend(true,{url:i,success:e.ajaxSettings.success,type:f||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},g);var r={};this.trigger("form-pre-serialize",[this,g,r]);if(r.veto){d("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(g.beforeSerialize&&g.beforeSerialize(this,g)===false){d("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var j=g.traditional;if(j===undefined){j=e.ajaxSettings.traditional}var o=[];var z,A=this.formToArray(g.semantic,o);if(g.data){g.extraData=g.data;z=e.param(g.data,j)}if(g.beforeSubmit&&g.beforeSubmit(A,this,g)===false){d("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[A,this,g,r]);if(r.veto){d("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var u=e.param(A,j);if(z){u=(u?(u+"&"+z):z)}if(g.type.toUpperCase()=="GET"){g.url+=(g.url.indexOf("?")>=0?"&":"?")+u;g.data=null}else{g.data=u}var C=[];if(g.resetForm){C.push(function(){l.resetForm()})}if(g.clearForm){C.push(function(){l.clearForm(g.includeHidden)})}if(!g.dataType&&g.target){var h=g.success||function(){};C.push(function(q){var k=g.replaceTarget?"replaceWith":"html";e(g.target)[k](q).each(h,arguments)})}else{if(g.success){C.push(g.success)}}g.success=function(F,q,G){var E=g.context||this;for(var D=0,k=C.length;D<k;D++){C[D].apply(E,[F,q,G||l,l])}};var y=e("input:file:enabled[value]",this);var m=y.length>0;var x="multipart/form-data";var t=(l.attr("enctype")==x||l.attr("encoding")==x);var s=c.fileapi&&c.formdata;d("fileAPI :"+s);var n=(m||t)&&!s;if(g.iframe!==false&&(g.iframe||n)){if(g.closeKeepAlive){e.get(g.closeKeepAlive,function(){B(A)})}else{B(A)}}else{if((m||t)&&s){p(A)}else{e.ajax(g)}}for(var v=0;v<o.length;v++){o[v]=null}this.trigger("form-submit-notify",[this,g]);return this;function p(q){var k=new FormData();for(var D=0;D<q.length;D++){k.append(q[D].name,q[D].value)}if(g.extraData){for(var G in g.extraData){if(g.extraData.hasOwnProperty(G)){k.append(G,g.extraData[G])}}}g.data=null;var F=e.extend(true,{},e.ajaxSettings,g,{contentType:false,processData:false,cache:false,type:"POST"});if(g.uploadProgress){F.xhr=function(){var H=jQuery.ajaxSettings.xhr();if(H.upload){H.upload.onprogress=function(L){var K=0;var I=L.loaded||L.position;var J=L.total;if(L.lengthComputable){K=Math.ceil(I/J*100)}g.uploadProgress(L,I,J,K)}}return H}}F.data=null;var E=F.beforeSend;F.beforeSend=function(I,H){H.data=k;if(E){E.call(this,I,H)}};e.ajax(F)}function B(ab){var G=l[0],F,X,R,Z,U,I,M,K,L,V,Y,P;var J=!!e.fn.prop;if(e(":input[name=submit],:input[id=submit]",G).length){alert('Error: Form elements must not have name or id of "submit".');return}if(ab){for(X=0;X<o.length;X++){F=e(o[X]);if(J){F.prop("disabled",false)}else{F.removeAttr("disabled")}}}R=e.extend(true,{},e.ajaxSettings,g);R.context=R.context||R;U="jqFormIO"+(new Date().getTime());if(R.iframeTarget){I=e(R.iframeTarget);V=I.attr("name");if(!V){I.attr("name",U)}else{U=V}}else{I=e('<iframe name="'+U+'" src="'+R.iframeSrc+'" />');I.css({position:"absolute",top:"-1000px",left:"-1000px"})}M=I[0];K={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(ae){var af=(ae==="timeout"?"timeout":"aborted");d("aborting upload... "+af);this.aborted=1;if(M.contentWindow.document.execCommand){try{M.contentWindow.document.execCommand("Stop")}catch(ag){}}I.attr("src",R.iframeSrc);K.error=af;if(R.error){R.error.call(R.context,K,af,ae)}if(Z){e.event.trigger("ajaxError",[K,R,af])}if(R.complete){R.complete.call(R.context,K,af)}}};Z=R.global;if(Z&&0===e.active++){e.event.trigger("ajaxStart")}if(Z){e.event.trigger("ajaxSend",[K,R])}if(R.beforeSend&&R.beforeSend.call(R.context,K,R)===false){if(R.global){e.active--}return}if(K.aborted){return}L=G.clk;if(L){V=L.name;if(V&&!L.disabled){R.extraData=R.extraData||{};R.extraData[V]=L.value;if(L.type=="image"){R.extraData[V+".x"]=G.clk_x;R.extraData[V+".y"]=G.clk_y}}}var Q=1;var N=2;function O(af){var ae=af.contentWindow?af.contentWindow.document:af.contentDocument?af.contentDocument:af.document;return ae}var E=e("meta[name=csrf-token]").attr("content");var D=e("meta[name=csrf-param]").attr("content");if(D&&E){R.extraData=R.extraData||{};R.extraData[D]=E}function W(){var ag=l.attr("target"),ae=l.attr("action");G.setAttribute("target",U);if(!f){G.setAttribute("method","POST")}if(ae!=R.url){G.setAttribute("action",R.url)}if(!R.skipEncodingOverride&&(!f||/post/i.test(f))){l.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"})}if(R.timeout){P=setTimeout(function(){Y=true;T(Q)},R.timeout)}function ah(){try{var aj=O(M).readyState;d("state = "+aj);if(aj&&aj.toLowerCase()=="uninitialized"){setTimeout(ah,50)}}catch(ak){d("Server abort: ",ak," (",ak.name,")");T(N);if(P){clearTimeout(P)}P=undefined}}var af=[];try{if(R.extraData){for(var ai in R.extraData){if(R.extraData.hasOwnProperty(ai)){if(e.isPlainObject(R.extraData[ai])&&R.extraData[ai].hasOwnProperty("name")&&R.extraData[ai].hasOwnProperty("value")){af.push(e('<input type="hidden" name="'+R.extraData[ai].name+'">').attr("value",R.extraData[ai].value).appendTo(G)[0])}else{af.push(e('<input type="hidden" name="'+ai+'">').attr("value",R.extraData[ai]).appendTo(G)[0])}}}}if(!R.iframeTarget){I.appendTo("body");if(M.attachEvent){M.attachEvent("onload",T)}else{M.addEventListener("load",T,false)}}setTimeout(ah,15);G.submit()}finally{G.setAttribute("action",ae);if(ag){G.setAttribute("target",ag)}else{l.removeAttr("target")}e(af).remove()}}if(R.forceSync){W()}else{setTimeout(W,10)}var ac,ad,aa=50,H;function T(aj){if(K.aborted||H){return}try{ad=O(M)}catch(am){d("cannot access response document: ",am);aj=N}if(aj===Q&&K){K.abort("timeout");return}else{if(aj==N&&K){K.abort("server abort");return}}if(!ad||ad.location.href==R.iframeSrc){if(!Y){return}}if(M.detachEvent){M.detachEvent("onload",T)}else{M.removeEventListener("load",T,false)}var ah="success",al;try{if(Y){throw"timeout"}var ag=R.dataType=="xml"||ad.XMLDocument||e.isXMLDoc(ad);d("isXml="+ag);if(!ag&&window.opera&&(ad.body===null||!ad.body.innerHTML)){if(--aa){d("requeing onLoad callback, DOM not available");setTimeout(T,250);return}}var an=ad.body?ad.body:ad.documentElement;K.responseText=an?an.innerHTML:null;K.responseXML=ad.XMLDocument?ad.XMLDocument:ad;if(ag){R.dataType="xml"}K.getResponseHeader=function(aq){var ap={"content-type":R.dataType};return ap[aq]};if(an){K.status=Number(an.getAttribute("status"))||K.status;K.statusText=an.getAttribute("statusText")||K.statusText}var ae=(R.dataType||"").toLowerCase();var ak=/(json|script|text)/.test(ae);if(ak||R.textarea){var ai=ad.getElementsByTagName("textarea")[0];if(ai){K.responseText=ai.value;K.status=Number(ai.getAttribute("status"))||K.status;K.statusText=ai.getAttribute("statusText")||K.statusText}else{if(ak){var af=ad.getElementsByTagName("pre")[0];var ao=ad.getElementsByTagName("body")[0];if(af){K.responseText=af.textContent?af.textContent:af.innerText}else{if(ao){K.responseText=ao.textContent?ao.textContent:ao.innerText}}}}}else{if(ae=="xml"&&!K.responseXML&&K.responseText){K.responseXML=S(K.responseText)}}try{ac=k(K,ae,R)}catch(aj){ah="parsererror";K.error=al=(aj||ah)}}catch(aj){d("error caught: ",aj);ah="error";K.error=al=(aj||ah)}if(K.aborted){d("upload aborted");ah=null}if(K.status){ah=(K.status>=200&&K.status<300||K.status===304)?"success":"error"}if(ah==="success"){if(R.success){R.success.call(R.context,ac,"success",K)}if(Z){e.event.trigger("ajaxSuccess",[K,R])}}else{if(ah){if(al===undefined){al=K.statusText}if(R.error){R.error.call(R.context,K,ah,al)}if(Z){e.event.trigger("ajaxError",[K,R,al])}}}if(Z){e.event.trigger("ajaxComplete",[K,R])}if(Z&&!--e.active){e.event.trigger("ajaxStop")}if(R.complete){R.complete.call(R.context,K,ah)}H=true;if(R.timeout){clearTimeout(P)}setTimeout(function(){if(!R.iframeTarget){I.remove()}K.responseXML=null},100)}var S=e.parseXML||function(ae,af){if(window.ActiveXObject){af=new ActiveXObject("Microsoft.XMLDOM");af.async="false";af.loadXML(ae)}else{af=(new DOMParser()).parseFromString(ae,"text/xml")}return(af&&af.documentElement&&af.documentElement.nodeName!="parsererror")?af:null};var q=e.parseJSON||function(ae){return window["eval"]("("+ae+")")};var k=function(aj,ah,ag){var af=aj.getResponseHeader("content-type")||"",ae=ah==="xml"||!ah&&af.indexOf("xml")>=0,ai=ae?aj.responseXML:aj.responseText;if(ae&&ai.documentElement.nodeName==="parsererror"){if(e.error){e.error("parsererror")}}if(ag&&ag.dataFilter){ai=ag.dataFilter(ai,ah)}if(typeof ai==="string"){if(ah==="json"||!ah&&af.indexOf("json")>=0){ai=q(ai)}else{if(ah==="script"||!ah&&af.indexOf("javascript")>=0){e.globalEval(ai)}}}return ai}}};e.fn.ajaxForm=function(f){f=f||{};f.delegation=f.delegation&&e.isFunction(e.fn.on);if(!f.delegation&&this.length===0){var g={s:this.selector,c:this.context};if(!e.isReady&&g.s){d("DOM not ready, queuing ajaxForm");e(function(){e(g.s,g.c).ajaxForm(f)});return this}d("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)"));return this}if(f.delegation){e(document).off("submit.form-plugin",this.selector,b).off("click.form-plugin",this.selector,a).on("submit.form-plugin",this.selector,f,b).on("click.form-plugin",this.selector,f,a);return this}return this.ajaxFormUnbind().bind("submit.form-plugin",f,b).bind("click.form-plugin",f,a)};function b(g){var f=g.data;if(!g.isDefaultPrevented()){g.preventDefault();e(this).ajaxSubmit(f)}}function a(j){var i=j.target;var g=e(i);if(!(g.is(":submit,input:image"))){var f=g.closest(":submit");if(f.length===0){return}i=f[0]}var h=this;h.clk=i;if(i.type=="image"){if(j.offsetX!==undefined){h.clk_x=j.offsetX;h.clk_y=j.offsetY}else{if(typeof e.fn.offset=="function"){var k=g.offset();h.clk_x=j.pageX-k.left;h.clk_y=j.pageY-k.top}else{h.clk_x=j.pageX-i.offsetLeft;h.clk_y=j.pageY-i.offsetTop}}}setTimeout(function(){h.clk=h.clk_x=h.clk_y=null},100)}e.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")};e.fn.formToArray=function(w,f){var u=[];if(this.length===0){return u}var k=this[0];var o=w?k.getElementsByTagName("*"):k.elements;if(!o){return u}var q,p,m,x,l,s,h;for(q=0,s=o.length;q<s;q++){l=o[q];m=l.name;if(!m){continue}if(w&&k.clk&&l.type=="image"){if(!l.disabled&&k.clk==l){u.push({name:m,value:e(l).val(),type:l.type});u.push({name:m+".x",value:k.clk_x},{name:m+".y",value:k.clk_y})}continue}x=e.fieldValue(l,true);if(x&&x.constructor==Array){if(f){f.push(l)}for(p=0,h=x.length;p<h;p++){u.push({name:m,value:x[p]})}}else{if(c.fileapi&&l.type=="file"&&!l.disabled){if(f){f.push(l)}var g=l.files;if(g.length){for(p=0;p<g.length;p++){u.push({name:m,value:g[p],type:l.type})}}else{u.push({name:m,value:"",type:l.type})}}else{if(x!==null&&typeof x!="undefined"){if(f){f.push(l)}u.push({name:m,value:x,type:l.type,required:l.required})}}}}if(!w&&k.clk){var r=e(k.clk),t=r[0];m=t.name;if(m&&!t.disabled&&t.type=="image"){u.push({name:m,value:r.val()});u.push({name:m+".x",value:k.clk_x},{name:m+".y",value:k.clk_y})}}return u};e.fn.formSerialize=function(f){return e.param(this.formToArray(f))};e.fn.fieldSerialize=function(g){var f=[];this.each(function(){var l=this.name;if(!l){return}var j=e.fieldValue(this,g);if(j&&j.constructor==Array){for(var k=0,h=j.length;k<h;k++){f.push({name:l,value:j[k]})}}else{if(j!==null&&typeof j!="undefined"){f.push({name:this.name,value:j})}}});return e.param(f)};e.fn.fieldValue=function(l){for(var k=[],h=0,f=this.length;h<f;h++){var j=this[h];var g=e.fieldValue(j,l);if(g===null||typeof g=="undefined"||(g.constructor==Array&&!g.length)){continue}if(g.constructor==Array){e.merge(k,g)}else{k.push(g)}}return k};e.fieldValue=function(f,m){var h=f.name,s=f.type,u=f.tagName.toLowerCase();if(m===undefined){m=true}if(m&&(!h||f.disabled||s=="reset"||s=="button"||(s=="checkbox"||s=="radio")&&!f.checked||(s=="submit"||s=="image")&&f.form&&f.form.clk!=f||u=="select"&&f.selectedIndex==-1)){return null}if(u=="select"){var o=f.selectedIndex;if(o<0){return null}var q=[],g=f.options;var k=(s=="select-one");var p=(k?o+1:g.length);for(var j=(k?o:0);j<p;j++){var l=g[j];if(l.selected){var r=l.value;if(!r){r=(l.attributes&&l.attributes.value&&!(l.attributes.value.specified))?l.text:l.value}if(k){return r}q.push(r)}}return q}return e(f).val()};e.fn.clearForm=function(f){return this.each(function(){e("input,select,textarea",this).clearFields(f)})};e.fn.clearFields=e.fn.clearInputs=function(f){var g=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var i=this.type,h=this.tagName.toLowerCase();if(g.test(i)||h=="textarea"){this.value=""}else{if(i=="checkbox"||i=="radio"){this.checked=false}else{if(h=="select"){this.selectedIndex=-1}else{if(f){if((f===true&&/hidden/.test(i))||(typeof f=="string"&&e(this).is(f))){this.value=""}}}}}})};e.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset()}})};e.fn.enable=function(f){if(f===undefined){f=true}return this.each(function(){this.disabled=!f})};e.fn.selected=function(f){if(f===undefined){f=true}return this.each(function(){var g=this.type;if(g=="checkbox"||g=="radio"){this.checked=f}else{if(this.tagName.toLowerCase()=="option"){var h=e(this).parent("select");if(f&&h[0]&&h[0].type=="select-one"){h.find("option").selected(false)}this.selected=f}}})};e.fn.ajaxSubmit.debug=false;function d(){if(!e.fn.ajaxSubmit.debug){return}var f="[jquery.form] "+Array.prototype.join.call(arguments,"");if(window.console&&window.console.log){window.console.log(f)}else{if(window.opera&&window.opera.postError){window.opera.postError(f)}}}})(jQuery);
1
+ /*!
2
+ * jQuery Form Plugin
3
+ * version: 3.14 (30-JUL-2012)
4
+ * @requires jQuery v1.3.2 or later
5
+ *
6
+ * Examples and documentation at: http://malsup.com/jquery/form/
7
+ * Project repository: https://github.com/malsup/form
8
+ * Dual licensed under the MIT and GPL licenses:
9
+ * http://malsup.github.com/mit-license.txt
10
+ * http://malsup.github.com/gpl-license-v2.txt
11
+ */
12
  (function(e){var c={};c.fileapi=e("<input type='file'/>").get(0).files!==undefined;c.formdata=window.FormData!==undefined;e.fn.ajaxSubmit=function(g){if(!this.length){d("ajaxSubmit: skipping submit process - no element selected");return this}var f,w,i,l=this;if(typeof g=="function"){g={success:g}}f=this.attr("method");w=this.attr("action");i=(typeof w==="string")?e.trim(w):"";i=i||window.location.href||"";if(i){i=(i.match(/^([^#]+)/)||[])[1]}g=e.extend(true,{url:i,success:e.ajaxSettings.success,type:f||"GET",iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},g);var r={};this.trigger("form-pre-serialize",[this,g,r]);if(r.veto){d("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(g.beforeSerialize&&g.beforeSerialize(this,g)===false){d("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var j=g.traditional;if(j===undefined){j=e.ajaxSettings.traditional}var o=[];var z,A=this.formToArray(g.semantic,o);if(g.data){g.extraData=g.data;z=e.param(g.data,j)}if(g.beforeSubmit&&g.beforeSubmit(A,this,g)===false){d("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[A,this,g,r]);if(r.veto){d("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}var u=e.param(A,j);if(z){u=(u?(u+"&"+z):z)}if(g.type.toUpperCase()=="GET"){g.url+=(g.url.indexOf("?")>=0?"&":"?")+u;g.data=null}else{g.data=u}var C=[];if(g.resetForm){C.push(function(){l.resetForm()})}if(g.clearForm){C.push(function(){l.clearForm(g.includeHidden)})}if(!g.dataType&&g.target){var h=g.success||function(){};C.push(function(q){var k=g.replaceTarget?"replaceWith":"html";e(g.target)[k](q).each(h,arguments)})}else{if(g.success){C.push(g.success)}}g.success=function(F,q,G){var E=g.context||this;for(var D=0,k=C.length;D<k;D++){C[D].apply(E,[F,q,G||l,l])}};var y=e("input:file:enabled[value]",this);var m=y.length>0;var x="multipart/form-data";var t=(l.attr("enctype")==x||l.attr("encoding")==x);var s=c.fileapi&&c.formdata;d("fileAPI :"+s);var n=(m||t)&&!s;if(g.iframe!==false&&(g.iframe||n)){if(g.closeKeepAlive){e.get(g.closeKeepAlive,function(){B(A)})}else{B(A)}}else{if((m||t)&&s){p(A)}else{e.ajax(g)}}for(var v=0;v<o.length;v++){o[v]=null}this.trigger("form-submit-notify",[this,g]);return this;function p(q){var k=new FormData();for(var D=0;D<q.length;D++){k.append(q[D].name,q[D].value)}if(g.extraData){for(var G in g.extraData){if(g.extraData.hasOwnProperty(G)){k.append(G,g.extraData[G])}}}g.data=null;var F=e.extend(true,{},e.ajaxSettings,g,{contentType:false,processData:false,cache:false,type:"POST"});if(g.uploadProgress){F.xhr=function(){var H=jQuery.ajaxSettings.xhr();if(H.upload){H.upload.onprogress=function(L){var K=0;var I=L.loaded||L.position;var J=L.total;if(L.lengthComputable){K=Math.ceil(I/J*100)}g.uploadProgress(L,I,J,K)}}return H}}F.data=null;var E=F.beforeSend;F.beforeSend=function(I,H){H.data=k;if(E){E.call(this,I,H)}};e.ajax(F)}function B(ab){var G=l[0],F,X,R,Z,U,I,M,K,L,V,Y,P;var J=!!e.fn.prop;if(e(":input[name=submit],:input[id=submit]",G).length){alert('Error: Form elements must not have name or id of "submit".');return}if(ab){for(X=0;X<o.length;X++){F=e(o[X]);if(J){F.prop("disabled",false)}else{F.removeAttr("disabled")}}}R=e.extend(true,{},e.ajaxSettings,g);R.context=R.context||R;U="jqFormIO"+(new Date().getTime());if(R.iframeTarget){I=e(R.iframeTarget);V=I.attr("name");if(!V){I.attr("name",U)}else{U=V}}else{I=e('<iframe name="'+U+'" src="'+R.iframeSrc+'" />');I.css({position:"absolute",top:"-1000px",left:"-1000px"})}M=I[0];K={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(ae){var af=(ae==="timeout"?"timeout":"aborted");d("aborting upload... "+af);this.aborted=1;if(M.contentWindow.document.execCommand){try{M.contentWindow.document.execCommand("Stop")}catch(ag){}}I.attr("src",R.iframeSrc);K.error=af;if(R.error){R.error.call(R.context,K,af,ae)}if(Z){e.event.trigger("ajaxError",[K,R,af])}if(R.complete){R.complete.call(R.context,K,af)}}};Z=R.global;if(Z&&0===e.active++){e.event.trigger("ajaxStart")}if(Z){e.event.trigger("ajaxSend",[K,R])}if(R.beforeSend&&R.beforeSend.call(R.context,K,R)===false){if(R.global){e.active--}return}if(K.aborted){return}L=G.clk;if(L){V=L.name;if(V&&!L.disabled){R.extraData=R.extraData||{};R.extraData[V]=L.value;if(L.type=="image"){R.extraData[V+".x"]=G.clk_x;R.extraData[V+".y"]=G.clk_y}}}var Q=1;var N=2;function O(af){var ae=af.contentWindow?af.contentWindow.document:af.contentDocument?af.contentDocument:af.document;return ae}var E=e("meta[name=csrf-token]").attr("content");var D=e("meta[name=csrf-param]").attr("content");if(D&&E){R.extraData=R.extraData||{};R.extraData[D]=E}function W(){var ag=l.attr("target"),ae=l.attr("action");G.setAttribute("target",U);if(!f){G.setAttribute("method","POST")}if(ae!=R.url){G.setAttribute("action",R.url)}if(!R.skipEncodingOverride&&(!f||/post/i.test(f))){l.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"})}if(R.timeout){P=setTimeout(function(){Y=true;T(Q)},R.timeout)}function ah(){try{var aj=O(M).readyState;d("state = "+aj);if(aj&&aj.toLowerCase()=="uninitialized"){setTimeout(ah,50)}}catch(ak){d("Server abort: ",ak," (",ak.name,")");T(N);if(P){clearTimeout(P)}P=undefined}}var af=[];try{if(R.extraData){for(var ai in R.extraData){if(R.extraData.hasOwnProperty(ai)){if(e.isPlainObject(R.extraData[ai])&&R.extraData[ai].hasOwnProperty("name")&&R.extraData[ai].hasOwnProperty("value")){af.push(e('<input type="hidden" name="'+R.extraData[ai].name+'">').attr("value",R.extraData[ai].value).appendTo(G)[0])}else{af.push(e('<input type="hidden" name="'+ai+'">').attr("value",R.extraData[ai]).appendTo(G)[0])}}}}if(!R.iframeTarget){I.appendTo("body");if(M.attachEvent){M.attachEvent("onload",T)}else{M.addEventListener("load",T,false)}}setTimeout(ah,15);G.submit()}finally{G.setAttribute("action",ae);if(ag){G.setAttribute("target",ag)}else{l.removeAttr("target")}e(af).remove()}}if(R.forceSync){W()}else{setTimeout(W,10)}var ac,ad,aa=50,H;function T(aj){if(K.aborted||H){return}try{ad=O(M)}catch(am){d("cannot access response document: ",am);aj=N}if(aj===Q&&K){K.abort("timeout");return}else{if(aj==N&&K){K.abort("server abort");return}}if(!ad||ad.location.href==R.iframeSrc){if(!Y){return}}if(M.detachEvent){M.detachEvent("onload",T)}else{M.removeEventListener("load",T,false)}var ah="success",al;try{if(Y){throw"timeout"}var ag=R.dataType=="xml"||ad.XMLDocument||e.isXMLDoc(ad);d("isXml="+ag);if(!ag&&window.opera&&(ad.body===null||!ad.body.innerHTML)){if(--aa){d("requeing onLoad callback, DOM not available");setTimeout(T,250);return}}var an=ad.body?ad.body:ad.documentElement;K.responseText=an?an.innerHTML:null;K.responseXML=ad.XMLDocument?ad.XMLDocument:ad;if(ag){R.dataType="xml"}K.getResponseHeader=function(aq){var ap={"content-type":R.dataType};return ap[aq]};if(an){K.status=Number(an.getAttribute("status"))||K.status;K.statusText=an.getAttribute("statusText")||K.statusText}var ae=(R.dataType||"").toLowerCase();var ak=/(json|script|text)/.test(ae);if(ak||R.textarea){var ai=ad.getElementsByTagName("textarea")[0];if(ai){K.responseText=ai.value;K.status=Number(ai.getAttribute("status"))||K.status;K.statusText=ai.getAttribute("statusText")||K.statusText}else{if(ak){var af=ad.getElementsByTagName("pre")[0];var ao=ad.getElementsByTagName("body")[0];if(af){K.responseText=af.textContent?af.textContent:af.innerText}else{if(ao){K.responseText=ao.textContent?ao.textContent:ao.innerText}}}}}else{if(ae=="xml"&&!K.responseXML&&K.responseText){K.responseXML=S(K.responseText)}}try{ac=k(K,ae,R)}catch(aj){ah="parsererror";K.error=al=(aj||ah)}}catch(aj){d("error caught: ",aj);ah="error";K.error=al=(aj||ah)}if(K.aborted){d("upload aborted");ah=null}if(K.status){ah=(K.status>=200&&K.status<300||K.status===304)?"success":"error"}if(ah==="success"){if(R.success){R.success.call(R.context,ac,"success",K)}if(Z){e.event.trigger("ajaxSuccess",[K,R])}}else{if(ah){if(al===undefined){al=K.statusText}if(R.error){R.error.call(R.context,K,ah,al)}if(Z){e.event.trigger("ajaxError",[K,R,al])}}}if(Z){e.event.trigger("ajaxComplete",[K,R])}if(Z&&!--e.active){e.event.trigger("ajaxStop")}if(R.complete){R.complete.call(R.context,K,ah)}H=true;if(R.timeout){clearTimeout(P)}setTimeout(function(){if(!R.iframeTarget){I.remove()}K.responseXML=null},100)}var S=e.parseXML||function(ae,af){if(window.ActiveXObject){af=new ActiveXObject("Microsoft.XMLDOM");af.async="false";af.loadXML(ae)}else{af=(new DOMParser()).parseFromString(ae,"text/xml")}return(af&&af.documentElement&&af.documentElement.nodeName!="parsererror")?af:null};var q=e.parseJSON||function(ae){return window["eval"]("("+ae+")")};var k=function(aj,ah,ag){var af=aj.getResponseHeader("content-type")||"",ae=ah==="xml"||!ah&&af.indexOf("xml")>=0,ai=ae?aj.responseXML:aj.responseText;if(ae&&ai.documentElement.nodeName==="parsererror"){if(e.error){e.error("parsererror")}}if(ag&&ag.dataFilter){ai=ag.dataFilter(ai,ah)}if(typeof ai==="string"){if(ah==="json"||!ah&&af.indexOf("json")>=0){ai=q(ai)}else{if(ah==="script"||!ah&&af.indexOf("javascript")>=0){e.globalEval(ai)}}}return ai}}};e.fn.ajaxForm=function(f){f=f||{};f.delegation=f.delegation&&e.isFunction(e.fn.on);if(!f.delegation&&this.length===0){var g={s:this.selector,c:this.context};if(!e.isReady&&g.s){d("DOM not ready, queuing ajaxForm");e(function(){e(g.s,g.c).ajaxForm(f)});return this}d("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)"));return this}if(f.delegation){e(document).off("submit.form-plugin",this.selector,b).off("click.form-plugin",this.selector,a).on("submit.form-plugin",this.selector,f,b).on("click.form-plugin",this.selector,f,a);return this}return this.ajaxFormUnbind().bind("submit.form-plugin",f,b).bind("click.form-plugin",f,a)};function b(g){var f=g.data;if(!g.isDefaultPrevented()){g.preventDefault();e(this).ajaxSubmit(f)}}function a(j){var i=j.target;var g=e(i);if(!(g.is(":submit,input:image"))){var f=g.closest(":submit");if(f.length===0){return}i=f[0]}var h=this;h.clk=i;if(i.type=="image"){if(j.offsetX!==undefined){h.clk_x=j.offsetX;h.clk_y=j.offsetY}else{if(typeof e.fn.offset=="function"){var k=g.offset();h.clk_x=j.pageX-k.left;h.clk_y=j.pageY-k.top}else{h.clk_x=j.pageX-i.offsetLeft;h.clk_y=j.pageY-i.offsetTop}}}setTimeout(function(){h.clk=h.clk_x=h.clk_y=null},100)}e.fn.ajaxFormUnbind=function(){return this.unbind("submit.form-plugin click.form-plugin")};e.fn.formToArray=function(w,f){var u=[];if(this.length===0){return u}var k=this[0];var o=w?k.getElementsByTagName("*"):k.elements;if(!o){return u}var q,p,m,x,l,s,h;for(q=0,s=o.length;q<s;q++){l=o[q];m=l.name;if(!m){continue}if(w&&k.clk&&l.type=="image"){if(!l.disabled&&k.clk==l){u.push({name:m,value:e(l).val(),type:l.type});u.push({name:m+".x",value:k.clk_x},{name:m+".y",value:k.clk_y})}continue}x=e.fieldValue(l,true);if(x&&x.constructor==Array){if(f){f.push(l)}for(p=0,h=x.length;p<h;p++){u.push({name:m,value:x[p]})}}else{if(c.fileapi&&l.type=="file"&&!l.disabled){if(f){f.push(l)}var g=l.files;if(g.length){for(p=0;p<g.length;p++){u.push({name:m,value:g[p],type:l.type})}}else{u.push({name:m,value:"",type:l.type})}}else{if(x!==null&&typeof x!="undefined"){if(f){f.push(l)}u.push({name:m,value:x,type:l.type,required:l.required})}}}}if(!w&&k.clk){var r=e(k.clk),t=r[0];m=t.name;if(m&&!t.disabled&&t.type=="image"){u.push({name:m,value:r.val()});u.push({name:m+".x",value:k.clk_x},{name:m+".y",value:k.clk_y})}}return u};e.fn.formSerialize=function(f){return e.param(this.formToArray(f))};e.fn.fieldSerialize=function(g){var f=[];this.each(function(){var l=this.name;if(!l){return}var j=e.fieldValue(this,g);if(j&&j.constructor==Array){for(var k=0,h=j.length;k<h;k++){f.push({name:l,value:j[k]})}}else{if(j!==null&&typeof j!="undefined"){f.push({name:this.name,value:j})}}});return e.param(f)};e.fn.fieldValue=function(l){for(var k=[],h=0,f=this.length;h<f;h++){var j=this[h];var g=e.fieldValue(j,l);if(g===null||typeof g=="undefined"||(g.constructor==Array&&!g.length)){continue}if(g.constructor==Array){e.merge(k,g)}else{k.push(g)}}return k};e.fieldValue=function(f,m){var h=f.name,s=f.type,u=f.tagName.toLowerCase();if(m===undefined){m=true}if(m&&(!h||f.disabled||s=="reset"||s=="button"||(s=="checkbox"||s=="radio")&&!f.checked||(s=="submit"||s=="image")&&f.form&&f.form.clk!=f||u=="select"&&f.selectedIndex==-1)){return null}if(u=="select"){var o=f.selectedIndex;if(o<0){return null}var q=[],g=f.options;var k=(s=="select-one");var p=(k?o+1:g.length);for(var j=(k?o:0);j<p;j++){var l=g[j];if(l.selected){var r=l.value;if(!r){r=(l.attributes&&l.attributes.value&&!(l.attributes.value.specified))?l.text:l.value}if(k){return r}q.push(r)}}return q}return e(f).val()};e.fn.clearForm=function(f){return this.each(function(){e("input,select,textarea",this).clearFields(f)})};e.fn.clearFields=e.fn.clearInputs=function(f){var g=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var i=this.type,h=this.tagName.toLowerCase();if(g.test(i)||h=="textarea"){this.value=""}else{if(i=="checkbox"||i=="radio"){this.checked=false}else{if(h=="select"){this.selectedIndex=-1}else{if(f){if((f===true&&/hidden/.test(i))||(typeof f=="string"&&e(this).is(f))){this.value=""}}}}}})};e.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset()}})};e.fn.enable=function(f){if(f===undefined){f=true}return this.each(function(){this.disabled=!f})};e.fn.selected=function(f){if(f===undefined){f=true}return this.each(function(){var g=this.type;if(g=="checkbox"||g=="radio"){this.checked=f}else{if(this.tagName.toLowerCase()=="option"){var h=e(this).parent("select");if(f&&h[0]&&h[0].type=="select-one"){h.find("option").selected(false)}this.selected=f}}})};e.fn.ajaxSubmit.debug=false;function d(){if(!e.fn.ajaxSubmit.debug){return}var f="[jquery.form] "+Array.prototype.join.call(arguments,"");if(window.console&&window.console.log){window.console.log(f)}else{if(window.opera&&window.opera.postError){window.opera.postError(f)}}}})(jQuery);
inc/modals.php DELETED
@@ -1,134 +0,0 @@
1
- <div class="wrap"><?php
2
- $modal_id = isset($_GET['modal_id']) ? $_GET['modal_id'] : NULL;
3
- if($modal_id > 0 && isset($_GET['action']) && $_GET['action']=='delete')
4
- {
5
- ?><<< - <a href="admin.php?page=<?php echo $this->Plugin['slug']?>-modals">Back to Modals</a><?php
6
- if(!isset($_GET['confirm']))
7
- {
8
- ?><h2><?php _e('Delete Modal','easy-modal')?></h2>
9
- <p>Are you sure you want to delete this modal?</p>
10
- <a style="color:#fff;border:1px solid #333; background-color:#900; text-shadow: none;"class="add-new-h2" href="admin.php?page=<?php echo $this->Plugin['slug']?>-modals&modal_id=<?php echo $modal_id?>&action=delete&confirm=yes">Confirm</a><?php
11
- }
12
- else
13
- {
14
- $this->deleteModal($modal_id);
15
- ?><p>Modal Deleted</p><?php
16
- }
17
- }
18
- elseif($modal_id!=NULL)
19
- {
20
- if($_POST)
21
- {
22
- $settings = $this->updateModalSettings( $modal_id, $_POST );
23
- ?><div class="updated"><strong><?php _e('Settings Updated','easy-modal')?>.</strong></div><?php
24
- }
25
- elseif($modal_id=='new')
26
- {
27
- $settings = $this->defaultModalSettings();
28
- }
29
- else
30
- {
31
- $settings = $this->getModalSettings( $modal_id );
32
- }
33
- ?><<< - <a href="admin.php?page=<?php echo $this->Plugin['slug']?>-modals">Back to Modal Lists</a>
34
- <h2>
35
- <?php echo ucfirst($settings['name']).' '; _e('Modal','easy-modal')?>
36
- <a style="color:#fff;border:1px solid #333; background-color:#900; text-shadow: none;"class="add-new-h2" href="admin.php?page=<?php echo $this->Plugin['slug']?>-modals&modal_id=<?php echo $modal_id?>&action=delete">Delete</a>
37
- </h2>
38
- <form method="post" action="admin.php?page=<?php echo $this->Plugin['slug']?>-modals&modal_id=<?php echo (isset($settings['modal_id'])&&$settings['modal_id']!=''?$settings['modal_id']:'new')?>">
39
- <div id="accordion">
40
- <h3><a href="#"><?php _e('Modal','easy-modal')?></a></h3>
41
- <div>
42
- <label for="name"><h4><?php _e('Name','easy-modal')?><span class="desc"><?php _e('','easy-modal')?></span></h4></label>
43
- <input type="text" id="name" name="name" value="<?php echo $settings['name'];?>" />
44
-
45
- <label for="title"><h4><?php _e('Title','easy-modal')?><span class="desc"><?php _e('The title that appears in the modal window.','easy-modal')?></span></h4></label>
46
- <input type="text" id="title" name="title" value="<?php echo $settings['title'];?>" />
47
-
48
- <label for="content"><h4><?php _e('Content','easy-modal');?><span class="desc"><?php _e('Modal content. Can contain shortcodes.','easy-modal')?></span></h4></label>
49
- <textarea id="content" name="content" style="width: 100%; height: auto;"><?php echo $settings['content']?></textarea>
50
- <div class="submit">
51
- <input type="submit" name="update_settings" class="button-primary" value="<?php _e('Save Settings','easy-modal')?>" />
52
- </div>
53
- </div>
54
- <h3><a href="#"><?php _e('Size Options','easy-modal')?></a></h3>
55
- <div>
56
- <input type="hidden" name="type" value="1"/>
57
- <div style="display:block; position:relative; clear:both; overflow:auto;">
58
- <div style="float:left; margin-right:10px;">
59
- <label for="userHeight"><h4><?php _e('Height','easy-modal')?></h4></label>
60
- <input type="text" id="userHeight" name="userHeight "size="5" value="<?php echo $settings['userHeight'];?>" />px
61
- </div>
62
- <div style="float:left">
63
- <label for="userWidth"><h4><?php _e('Width','easy-modal')?></h4></label>
64
- <input type="text" id="userWidth" name="userWidth" size="5"value="<?php echo $settings['userWidth'];?>" />px
65
- </div>
66
- </div>
67
- <label for="userMaxHeight"><h4><?php _e('Max Height','easy-modal')?></h4></label>
68
- <div id="userMaxHeightSlider" style="width:100px;margin:8px;float:left;"></div>
69
- <input type="text" id="userMaxHeight" name="userMaxHeight" size="3" value="<?php echo $settings['userMaxHeight'];?>" />%
70
- <label for="userMaxWidth"><h4><?php _e('Max Width','easy-modal')?></h4></label>
71
- <div id="userMaxWidthSlider" style="width:100px;margin:8px;float:left;"></div>
72
- <input type="text" id="userMaxWidth" name="userMaxWidth" size="3" value="<?php echo $settings['userMaxWidth'];?>" />%
73
- <div class="submit">
74
- <input type="submit" name="update_settings" class="button-primary" value="<?php _e('Save Settings','easy-modal')?>" />
75
- </div>
76
- </div>
77
- <h3><a href="#"><?php _e('Additional Settings','easy-modal')?></a></h3>
78
- <div>
79
- <label for="overlayClose"><h4><?php _e('Click Overlay to Close','easy-modal')?></h4></label>
80
- <p class="field switch" style="clear:both; overflow:auto; display:block;">
81
- <label class="cb-enable"><span>On</span></label>
82
- <label class="cb-disable selected"><span>Off</span></label>
83
- <input type="checkbox" class="checkbox" id="overlayClose" name="overlayClose" value="true" <?php echo $settings['overlayClose'] == 'true' ? 'checked="checked"' : '' ?> />
84
- </p>
85
- <label for="overlayEscClose"><h4><?php _e('ESC Key to Close Overlay','easy-modal')?></h4></label>
86
- <p class="field switch" style="clear:both; overflow:auto; display:block;">
87
- <label class="cb-enable"><span>On</span></label>
88
- <label class="cb-disable selected"><span>Off</span></label>
89
- <input type="checkbox" class="checkbox" id="overlayEscClose" name="overlayEscClose" value="true" <?php echo $settings['overlayEscClose'] == 'true' ? 'checked="checked"' : '' ?> />
90
- </p>
91
- <div class="submit">
92
- <input type="submit" name="update_settings" class="button-primary" value="<?php _e('Save Settings','easy-modal')?>" />
93
- </div>
94
- </div>
95
- <h3><a href="#"><?php _e('Usage Example','easy-modal')?></a></h3>
96
- <div>
97
- <h4><?php _e('Copy this class to the link/button you want to open this modal.','easy-modal')?><span class="desc">eModal-<?php echo $settings['modal_id']?></span></h4>
98
- <h4>Link Example</h4>
99
- <a href="#" onclick="return false;" class="eModal-<?php echo $settings['modal_id']?>">Open Modal</a>
100
- <pre>&lt;a href="#" class="eModal-<?php echo $settings['modal_id']?>">Open Modal&lt;/a></pre>
101
- <h4>Button Example</h4>
102
- <button onclick="return false;" class="eModal-<?php echo $settings['modal_id']?>">Open Modal</button>
103
- <pre>&lt;button class="eModal-<?php echo $settings['modal_id']?>">Open Modal&lt;/button></pre>
104
- <h4>Image Example</h4>
105
- <img style="cursor:pointer;" src="http://www.truthunity.net/sites/all/content/graphics/ministry-click-me-button.jpg" width="75" onclick="return false;" class="eModal-<?php echo $settings['modal_id']?>" />
106
- <pre>&lt;img src="ministry-click-me-button.jpg" class="eModal-<?php echo $settings['modal_id']?>" /></pre>
107
- </div>
108
- </div>
109
- </form><?php
110
- }
111
- else
112
- {
113
- $modals = $this->getModalList();
114
- ?><h2>Easy Modal Modals<a class="add-new-h2" href="admin.php?page=<?php echo $this->Plugin['slug']?>-modals&modal_id=new">Add New</a></h2><?php
115
- if( $modals && count($modals) > 0 )
116
- {
117
- ?><table>
118
- <thead>
119
- <th>Name</th>
120
- </thead>
121
- <tbody><?php
122
- foreach($modals as $id => $name)
123
- {
124
- echo '<tr><td><a href="admin.php?page='. $this->Plugin['slug']. '-modals&modal_id='.$id.'">'.ucfirst($name).'</a></td></tr>';
125
- }
126
- ?></tbody>
127
- </table><?php
128
- }
129
- else
130
- {
131
- ?><p>To get started click the "add new" button above</p><?php
132
- }
133
- }
134
- ?></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/models/modal.php ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Model_EM_Modal
3
+ {
4
+ protected $_data = array(
5
+ 'id' => '',
6
+ 'name' => 'change_me',
7
+ 'sitewide' => false,
8
+ 'title' => '',
9
+ 'content' => '',
10
+
11
+ 'theme' => 1,
12
+
13
+ 'size' => 'normal',
14
+ 'userHeight' => 0,
15
+ 'userHeightUnit' => 0,
16
+ 'userWidth' => 0,
17
+ 'userWidthUnit' => 0,
18
+
19
+ 'animation' => 'fade',
20
+ 'direction' => 'bottom',
21
+ 'duration' => 350,
22
+ 'overlayClose' => false,
23
+ 'overlayEscClose' => false
24
+ );
25
+
26
+ public function get($key)
27
+ {
28
+ if(array_key_exists($key, $this->_data))
29
+ {
30
+ return $this->_data[$key];
31
+ }
32
+ else
33
+ {
34
+ return NULL;
35
+ }
36
+ }
37
+ public function set($key, $value)
38
+ {
39
+ if(array_key_exists($key, $this->_data))
40
+ {
41
+ $this->_data[$key] = stripslashes_deep($value);
42
+ }
43
+ return $this;
44
+ }
45
+
46
+ public function __construct($id)
47
+ {
48
+ $modal = get_option('EasyModal_Modal-'.$id);
49
+ if(is_array($modal))
50
+ {
51
+ $this->set_fields($modal);
52
+ }
53
+ return $this;
54
+ }
55
+ public function validate()
56
+ {
57
+ foreach($this->_data as $key => $val)
58
+ {
59
+ switch($key)
60
+ {
61
+ case 'name':
62
+ case 'title':
63
+ $this->_data[$key] = sanitize_text_field($val);
64
+ break;
65
+ case 'content':
66
+ $this->_data[$key] = balanceTags(wp_kses_post($val));
67
+ break;
68
+ case 'sitewide':
69
+ case 'overlayClose':
70
+ case 'overlayEscClose':
71
+ $this->_data[$key] = ($val === true || $val === 'true') ? true : false;
72
+ break;
73
+ case 'duration':
74
+ case 'userHeight':
75
+ case 'userWidth':
76
+ if(is_numeric($val))
77
+ {
78
+ $this->_data[$key] = intval($val);
79
+ }
80
+ break;
81
+ case 'size':
82
+ if(in_array($val,array('','tiny','small','medium','large','xlarge','custom')))
83
+ {
84
+ $this->_data[$key] = $val;
85
+ }
86
+ break;
87
+ case 'animation':
88
+ if(in_array($val,array('fade','fadeAndSlide','grow','growAndSlide')))
89
+ {
90
+ $this->_data[$key] = $val;
91
+ }
92
+ break;
93
+ case 'direction':
94
+ if(in_array($val,array('top','bottom','left','right','topleft','topright','bottomleft','bottomright','mouse')))
95
+ {
96
+ $this->_data[$key] = $val;
97
+ }
98
+ break;
99
+ case 'userHeightUnit':
100
+ case 'userWidthUnit':
101
+ if(in_array($val,array('px','%','em','rem')))
102
+ {
103
+ $this->_data[$key] = $val;
104
+ }
105
+ break;
106
+ }
107
+ }
108
+ }
109
+
110
+ public function set_fields(array $fields)
111
+ {
112
+ if(!is_array($fields))
113
+ {
114
+ return false;
115
+ }
116
+ $fields = stripslashes_deep($fields);
117
+ foreach($fields as $key => $val)
118
+ {
119
+ if(array_key_exists($key, $this->_data))
120
+ {
121
+ $this->_data[$key] = $val;
122
+ }
123
+ }
124
+ return $this;
125
+ }
126
+ public function save()
127
+ {
128
+ if($this->validate() === true)
129
+ {
130
+ update_option('EasyModal_Modal-'.$this->_data['id'], $settings);
131
+ }
132
+ return $this;
133
+ }
134
+ /**
135
+ * Check if transaction id is already registered
136
+ *
137
+ * @param $transaction_id
138
+ * @param $payment_status
139
+ * @return bool
140
+ */
141
+ public function is_unique($transaction_id, $payment_status)
142
+ {
143
+ return ! (bool) DB::select(array(DB::expr('COUNT("*")'), 'total_count'))
144
+ ->from($this->_table_name)
145
+ ->where('transaction_id', '=', $transaction_id)
146
+ ->and_where('payment_status', '=', $payment_status)
147
+ ->execute($this->_db)
148
+ ->get('total_count');
149
+ }
150
+ }
inc/settings.php DELETED
@@ -1,47 +0,0 @@
1
- <div class="wrap"><?php
2
- if($_POST)
3
- {
4
- $settings = $this->updateSettings( $_POST );
5
- ?><div class="updated"><strong><?php _e('Settings Updated','easy-modal')?>.</strong></div><?php
6
- }
7
- else
8
- {
9
- $settings = $this->getSettings();
10
- }
11
- ?><form method="post" action="admin.php?page=<?php echo $this->Plugin['slug']?>-settings">
12
- <div class="error">
13
- <p>If you purchased the Pro version and havent already recieved a key please email us at <a href="mailto:danieliser@wizardinternetsolutions.com">danieliser@wizardinternetsolutions.com</a></p>
14
- </div>
15
- <div>
16
- <h3><?php _e('Settings','easy-modal')?></h3>
17
- <div id="accordion">
18
- <h4><a href="#"><?php _e('License','easy-modal')?></a></h4>
19
- <div>
20
- <div>
21
- <label for="license"><h4><?php _e('License Key','easy-modal')?></h4></label><?php
22
- $license_status = get_option('EasyModal_License_Status');
23
- $valid = $license_status['status']===200 ? true : false;?>
24
- <input <?php echo $valid ? 'style="background-color:#0f0;border-color:#090;"' : '' ?> type="text" id="license" name="license" value="<?php echo get_option('EasyModal_License')?>"/>
25
- <?php echo isset($license_status['message']) ? $license_status['message'] : ''?>
26
- </div>
27
- <div class="submit">
28
- <input type="submit" name="update_settings" class="button-primary" value="<?php _e('Save Settings','easy-modal')?>" />
29
- </div>
30
- </div>
31
- <h3><a href="#"><?php _e('Usage Example','easy-modal')?></a></h3>
32
- <div>
33
- <h4><?php _e('Copy the class to the link/button you want to open this modal.','easy-modal')?><span class="desc">Will start with eModal- and end with a # of the modal you want to open.</span></h4>
34
- <h4>Link Example</h4>
35
- <a href="#" onclick="return false;" class="eModal-1">Open Modal</a>
36
- <pre>&lt;a href="#" class="eModal-1">Open Modal&lt;/a></pre>
37
- <h4>Button Example</h4>
38
- <button onclick="return false;" class="eModal-1">Open Modal</button>
39
- <pre>&lt;button class="eModal-1">Open Modal&lt;/button></pre>
40
- <h4>Image Example</h4>
41
- <img style="cursor:pointer;" src="http://www.truthunity.net/sites/all/content/graphics/ministry-click-me-button.jpg" width="75" onclick="return false;" class="eModal-1" />
42
- <pre>&lt;img src="ministry-click-me-button.jpg" class="eModal-1" /></pre>
43
- </div>
44
- </div>
45
- </div>
46
- </form>
47
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/themes.php DELETED
@@ -1,323 +0,0 @@
1
- <div class="wrap"><?php
2
- if($_POST)
3
- {
4
- $settings = $this->updateThemeSettings( 1, $_POST );
5
- ?><div class="updated"><strong><?php _e('Settings Updated','easy-modal')?>.</strong></div><?php
6
- }
7
- else
8
- {
9
- $settings = $this->getThemeSettings(1);
10
- }
11
- global $wp;
12
- $borderTypes = array(
13
- 'solid' => 'Solid',
14
- 'dotted' => 'Dotted',
15
- 'double' => 'Double'
16
- );
17
- $fontFamilys = array(
18
- 'Sans-Serif'=>'Sans-Serif',
19
- 'Tahoma' => 'Tahoma',
20
- 'Georgia' => 'Georgia',
21
- 'Comic Sans MS' => 'Comic Sans MS',
22
- 'Arial' => 'Arial',
23
- 'Lucida Grande' => 'Lucida Grande',
24
- 'Times New Roman' => 'Times New Roman'
25
- );
26
- $closePositions = array(
27
- 'topleft' => 'Top Left',
28
- 'topright' => 'Top Right',
29
- 'bottomleft' => 'Bottom Left',
30
- 'bottomright' => 'Bottom Right'
31
- );
32
- ?><form method="post" action="admin.php?page=<?php echo $this->Plugin['slug']?>-themes&theme_id=<?php echo 1?>">
33
- <h2>
34
- <?php echo ucfirst($settings['name']).' '; _e('Theme','easy-modal')?>
35
- </h2>
36
- <div class="emthemes">
37
- <div id="accordion">
38
- <h3><a href="#"><?php _e('Theme Options','easy-modal')?></a></h3>
39
- <div id="themeOptions">
40
- <table>
41
- <tr class="odd">
42
- <th>
43
- <label for="theme"><h4><?php _e('Theme Name', 'easy-modal');?></h4></label>
44
- </th>
45
- <td>
46
- <input type="text" name="name" id="name" value="<?php echo $settings['name']?>"/>
47
- <span class="description"><?php //_e('Choose the overlay color.','easy-modal')?></span>
48
- </td>
49
- </tr>
50
- </table>
51
- </div>
52
- <h3><a href="#"><?php _e('Overlay','easy-modal')?></a></h3>
53
- <div id="overlayOptions">
54
- <table>
55
- <tr class="odd">
56
- <th>
57
- <label for="overlayColor"><h4><?php _e('Overlay Color', 'easy-modal');?></h4></label>
58
- </th>
59
- <td>
60
- <input type="text" name="overlayColor" id="overlayColor" value="<?php echo $settings['overlayColor']?>" class="colorSelect" style="background-color:<?php echo $settings['overlayColor']?>" />
61
- <span class="description"><?php //_e('Choose the overlay color.','easy-modal')?></span>
62
- </td>
63
- </tr>
64
- <tr>
65
- <th>
66
- <label for="overlayOpacity"><h4><?php _e('Opacity', 'easy-modal');?></h4></label>
67
- </th>
68
- <td>
69
- <div id="overlayOpacitySlider" style="width:65%; float:left; display:inline-block;"></div><div style="display:inline-block; float:right; font-weight:bold;"><span id="overlayOpacityValue"><?php echo $settings['overlayOpacity']?></span>%</div>
70
- <input type="hidden" id="overlayOpacity" name="overlayOpacity" size="20" value="<?php echo $settings['overlayOpacity']?>"/>
71
- <span class="description"><?php //_e('The opacity value for the overlay, from 0 - 100.','easy-modal')?></span>
72
- </td>
73
- </tr>
74
- </table>
75
- </div>
76
- <h3><a href="#"><?php _e('Close Button','easy-modal')?></a></h3>
77
- <div id="closeOptions">
78
- <table>
79
- <tr class="odd">
80
- <th>
81
- <label for="closeBgColor"><h4><?php _e('Background Color', 'easy-modal');?></h4></label>
82
- </th>
83
- <td>
84
- <input type="text" name="closeBgColor" id="closeBgColor" value="<?php echo $settings['closeBgColor']?>" class="colorSelect" style="background-color:<?php echo $settings['closeBgColor']?>" />
85
- <span class="description"><?php //_e('The Presenter\'s WordPress User ID'); ?></span>
86
- </td>
87
- </tr>
88
- <tr>
89
- <th>
90
- <label for="closeFontColor"><h4><?php _e('Font Color', 'easy-modal');?></h4></label>
91
- </th>
92
- <td>
93
- <input type="text" name="closeFontColor" id="closeFontColor" value="<?php echo $settings['closeFontColor']?>" class="colorSelect" style="background-color:<?php echo $settings['closeFontColor']?>" />
94
- <span class="description"><?php //_e('The Presenter\'s WordPress User ID'); ?></span>
95
- </td>
96
- </tr>
97
- <tr class="odd">
98
- <th>
99
- <label for="closeFontSize"><h4><?php _e('Font Size', 'easy-modal');?></h4></label>
100
- </th>
101
- <td>
102
- <div id="closeFontSizeSlider" style="width:65%; float:left; display:inline-block;"></div><div style="display:inline-block; float:right; font-weight:bold;"><span id="closeFontSizeValue"><?php echo $settings['closeFontSize']?></span>px</div>
103
- <input type="hidden" name="closeFontSize" id="closeFontSize" value="<?php echo $settings['closeFontSize']?>" />
104
- <span class="description"><?php //_e('The opacity value for the overlay, from 0 - 100.','easy-modal')?></span>
105
- </td>
106
- </tr>
107
- <tr>
108
- <th>
109
- <label for="closeBorderRadius"><h4><?php _e('Border Radius', 'easy-modal');?></h4></label>
110
- </th>
111
- <td>
112
- <div id="closeBorderRadiusSlider" style="width:65%; float:left; display:inline-block;"></div><div style="display:inline-block; float:right; font-weight:bold;"><span id="closeBorderRadiusValue"><?php echo $settings['closeBorderRadius']?></span>px</div>
113
- <input type="hidden" id="closeBorderRadius" name="closeBorderRadius" value="<?php echo $settings['closeBorderRadius']?>"/>
114
- <span class="description"><?php //_e('The opacity value for the overlay, from 0 - 100.','easy-modal')?></span>
115
- </td>
116
- </tr>
117
- <tr class="odd">
118
- <th>
119
- <label for="closeSize"><h4><?php _e('Size', 'easy-modal');?></h4></label>
120
- </th>
121
- <td>
122
- <div id="closeSizeSlider" style="width:65%; float:left; display:inline-block;"></div><div style="display:inline-block; float:right; font-weight:bold;"><span id="closeSizeValue"><?php echo $settings['closeSize']?></span>px</div>
123
- <input type="hidden" id="closeSize" name="closeSize" value="<?php echo $settings['closeSize']?>"/>
124
- <span class="description"><?php //_e('The opacity value for the overlay, from 0 - 100.','easy-modal')?></span>
125
- </td>
126
- </tr>
127
- <tr>
128
- <th>
129
- <label for="closePosition"><h4><?php _e('Position', 'easy-modal');?></h4></label>
130
- </th>
131
- <td>
132
- <select name="closePosition" id="closePosition"><?php
133
- foreach($closePositions as $type => $name){
134
- echo '<option value="'.$type.'"'.($type == $settings['closePosition'] ? 'selected="selected"' : '').'>'.$name.'</option>';
135
- }?>
136
- </select>
137
- <span class="description"><?php //_e('The opacity value for the overlay, from 0 - 100.','easy-modal')?></span>
138
- </td>
139
- </tr>
140
- </table>
141
- </div>
142
- <h3><a href="#"><?php _e('Container','easy-modal')?></a></h3>
143
- <div id="containerOptions">
144
- <table>
145
- <tr class="odd">
146
- <th>
147
- <label for="containerBgColor"><h4><?php _e('Background Color', 'easy-modal');?></h4></label>
148
- </th>
149
- <td>
150
- <input type="text" name="containerBgColor" id="containerBgColor" value="<?php echo $settings['containerBgColor']?>" class="colorSelect" style="background-color:<?php echo $settings['containerBgColor']?>" />
151
- <span class="description"><?php //_e('The Presenter\'s WordPress User ID'); ?></span>
152
- </td>
153
- </tr>
154
- <tr>
155
- <th>
156
- <label for="containerPadding"><h4><?php _e('Padding', 'easy-modal');?></h4></label>
157
- </th>
158
- <td>
159
- <div id="containerPaddingSlider" style="width:65%; float:left; display:inline-block;"></div><div style="display:inline-block; float:right; font-weight:bold;"><span id="containerPaddingValue"><?php echo $settings['containerPadding']?></span>px</div>
160
- <input type="hidden" id="containerPadding" name="containerPadding" width="20" value="<?php echo $settings['containerPadding']?>"/>
161
- <span class="description"><?php //_e('The Presenter\'s WordPress User ID'); ?></span>
162
- </td>
163
- </tr>
164
- <tr class="odd">
165
- <th>
166
- <label for="containerBorderColor"><h4><?php _e('Border Color', 'easy-modal');?></h4></label>
167
- </th>
168
- <td>
169
- <input type="text" name="containerBorderColor" id="containerBorderColor" value="<?php echo $settings['containerBorderColor']?>" class="colorSelect" style="background-color:<?php echo $settings['containerBorderColor']?>" />
170
- <span class="description"><?php //_e('The opacity value for the overlay, from 0 - 100.','easy-modal')?></span>
171
- </td>
172
- </tr>
173
- <tr>
174
- <th>
175
- <label for="containerBorderStyle"><h4><?php _e('Border Style', 'easy-modal');?></h4></label>
176
- </th>
177
- <td>
178
- <select name="containerBorderStyle" id="containerBorderStyle"><?php
179
- foreach($borderTypes as $type => $name){
180
- echo '<option value="'.$type.'"'.($type == $settings['containerBorderStyle'] ? 'selected="selected"' : '').'>'.$name.'</option>';
181
- }?>
182
- </select>
183
- <span class="description"><?php //_e('The opacity value for the overlay, from 0 - 100.','easy-modal')?></span>
184
- </td>
185
- </tr>
186
- <tr class="odd">
187
- <th>
188
- <label for="containerBorderWidth"><h4><?php _e('Border Width', 'easy-modal');?></h4></label>
189
- </th>
190
- <td>
191
- <div id="containerBorderWidthSlider" style="width:65%; float:left; display:inline-block;"></div><div style="display:inline-block; float:right; font-weight:bold;"><span id="containerBorderWidthValue"><?php echo $settings['containerBorderWidth']?></span>px</div>
192
- <input type="hidden" id="containerBorderWidth" name="containerBorderWidth" value="<?php echo $settings['containerBorderWidth']?>"/>
193
- <span class="description"><?php //_e('The opacity value for the overlay, from 0 - 100.','easy-modal')?></span>
194
- </td>
195
- </tr>
196
- <tr>
197
- <th>
198
- <label for="containerBorderRadius"><h4><?php _e('Border Radius', 'easy-modal');?></h4></label>
199
- </th>
200
- <td>
201
- <div id="containerBorderRadiusSlider" style="width:65%; float:left; display:inline-block;"></div><div style="display:inline-block; float:right; font-weight:bold;"><span id="containerBorderRadiusValue"><?php echo $settings['containerBorderRadius']?></span>px</div>
202
- <input type="hidden" id="containerBorderRadius" name="containerBorderRadius" value="<?php echo $settings['containerBorderRadius']?>"/>
203
- <span class="description"><?php //_e('The opacity value for the overlay, from 0 - 100.','easy-modal')?></span>
204
- </td>
205
- </tr>
206
- </table>
207
- </div>
208
- <h3><a href="#"><?php _e('Content','easy-modal')?></a></h3>
209
- <div id="contentOptions">
210
- <table>
211
- <tr class="odd">
212
- <th>
213
- <label for="contentTitleFontColor"><h4><?php _e('Title Color', 'easy-modal');?></h4></label>
214
- </th>
215
- <td>
216
- <input type="text" name="contentTitleFontColor" id="contentTitleFontColor" value="<?php echo $settings['contentTitleFontColor']?>" class="colorSelect" style="background-color:<?php echo $settings['contentTitleFontColor']?>" />
217
- <span class="description"><?php //_e('The opacity value for the overlay, from 0 - 100.','easy-modal')?></span>
218
- </td>
219
- </tr>
220
- <tr>
221
- <th>
222
- <label for="contentTitleFontSize"><h4><?php _e('Title Font Size', 'easy-modal');?></h4></label>
223
- </th>
224
- <td>
225
- <div id="contentTitleFontSizeSlider" style="width:65%; float:left; display:inline-block;"></div><div style="display:inline-block; float:right; font-weight:bold;"><span id="contentTitleFontSizeValue"><?php echo $settings['contentTitleFontSize']?></span>px</div>
226
- <input type="hidden" name="contentTitleFontSize" id="contentTitleFontSize" value="<?php echo $settings['contentTitleFontSize']?>" />
227
- <span class="description"><?php //_e('The opacity value for the overlay, from 0 - 100.','easy-modal')?></span>
228
- </td>
229
- </tr>
230
- <tr class="odd">
231
- <th>
232
- <label for="contentTitleFontFamily"><h4><?php _e('Title Font Family', 'easy-modal');?></h4></label>
233
- </th>
234
- <td>
235
- <select name="contentTitleFontFamily" id="contentTitleFontFamily"><?php
236
- foreach($fontFamilys as $type => $name){
237
- echo '<option value="'.$type.'"'.($type == $settings['contentTitleFontFamily'] ? 'selected="selected"' : '').'>'.$name.'</option>';
238
- }?>
239
- </select>
240
- <span class="description"><?php //_e('The opacity value for the overlay, from 0 - 100.','easy-modal')?></span>
241
- </td>
242
- </tr>
243
- <tr>
244
- <th>
245
- <label for="contentFontColor"><h4><?php _e('Font Color', 'easy-modal');?></h4></label>
246
- </th>
247
- <td>
248
- <input type="text" name="contentFontColor" id="contentFontColor" value="<?php echo $settings['contentFontColor']?>" class="colorSelect" style="background-color:<?php echo $settings['contentFontColor']?>" />
249
- <span class="description"><?php //_e('The opacity value for the overlay, from 0 - 100.','easy-modal')?></span>
250
- </td>
251
- </tr>
252
- </table>
253
- </div>
254
- </div>
255
- <div class="submit" style="clear:both; overflow:auto;">
256
- <input type="submit" name="update_settings" class="button-primary" value="<?php _e('Save Settings','easy-modal')?>" />
257
- </div>
258
- </div>
259
-
260
- <div class="empreview">
261
-
262
- <div id="eModal-Preview">
263
- <div id="eModal-Overlay" style="background-color:<?php echo $settings['overlayColor']?>;opacity:<?php echo intval($settings['overlayOpacity'])/100 ?>;"></div>
264
- <h2><?php _e('eModal Theme Preview','easy-modal')?></h2>
265
- <div id="eModal-Container" style="
266
- background-color:<?php echo $settings['containerBgColor']?>;
267
- padding:<?php echo $settings['containerPadding']?>px;
268
- border:<?php echo $settings['containerBorderColor']?> <?php echo $settings['containerBorderWidth'].'px'?> <?php echo $settings['containerBorderStyle']?>;
269
- -moz-border-radius:<?php echo $settings['containerBorderRadius']?>px;
270
- -webkit-border-radius:<?php echo $settings['containerBorderRadius']?>px;
271
- border-radius:<?php echo $settings['containerBorderRadius']?>px;
272
- behavior: 'url(<?php echo get_bloginfo('wpurl').'/'.$this->Plugin['dir']?>/themes/PIE.htc)';
273
- color:<?php echo $settings['contentFontColor']?>;
274
- ">
275
- <a id="eModal-Close" href="#close" style="
276
- background-color:<?php echo $settings['closeBgColor']?>;
277
- color:<?php echo $settings['closeFontColor']?>;
278
- font-size:<?php echo $settings['closeFontSize']?>px;
279
- -moz-border-radius:<?php echo $settings['closeBorderRadius']?>px;
280
- -webkit-border-radius:<?php echo $settings['closeBorderRadius']?>px;
281
- border-radius:<?php echo $settings['closeBorderRadius']?>px;
282
- width:<?php echo $settings['closeSize']?>px;
283
- height:<?php echo $settings['closeSize']?>px;
284
- line-height:<?php echo $settings['closeSize']?>px;
285
- <?php
286
- $size = 0-($settings['closeSize']/2).'px';
287
- $top = $left = $bottom = $right = 'auto';
288
- switch($settings['closePosition'])
289
- {
290
- case 'topleft':
291
- $top = $size;
292
- $left = $size;
293
- break;
294
- case 'topright':
295
- $top = $size;
296
- $right = $size;
297
- break;
298
- case 'bottomleft':
299
- $left = $size;
300
- $bottom = $size;
301
- break;
302
- case 'bottomright':
303
- $right = $size;
304
- $bottom = $size;
305
- break;
306
- }
307
- ?>
308
- top: <?php echo $top?>;
309
- bottom: <?php echo $bottom?>;
310
- left: <?php echo $left?>;
311
- right: <?php echo $right?>;
312
- ">X</a>
313
- <h1 id="eModal-Title" style="
314
- color:<?php echo $settings['contentTitleFontColor']?>;
315
- font-family:<?php echo $settings['contentTitleFontFamily']?>;
316
- font-size:<?php echo $settings['contentTitleFontSize']?>px;
317
- ">Title Text</h1>
318
- <p>Suspendisse ipsum eros, tincidunt sed commodo ut, viverra vitae ipsum. Etiam non porta neque. Pellentesque nulla elit, aliquam in ullamcorper at, bibendum sed eros. Morbi non sapien tellus, ac vestibulum eros. In hac habitasse platea dictumst. Nulla vestibulum, diam vel porttitor placerat, eros tortor ultrices lectus, eget faucibus arcu justo eget massa. Maecenas id tellus vitae justo posuere hendrerit aliquet ut dolor.</p>
319
- </div>
320
- </div>
321
- </div>
322
- </form>
323
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/views/_notes/dwsync.xml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8" ?>
2
+ <dwsync>
3
+ <file name="admin_footer.php" server="easy-modal.com//public_html/" local="130207651112394977" remote="130208443200000000" Dst="2" />
4
+ <file name="help.php" server="easy-modal.com//public_html/" local="130207651112514984" remote="130208443200000000" Dst="2" />
5
+ <file name="modal.php" server="easy-modal.com//public_html/" local="130207651112684994" remote="130208443200000000" Dst="2" />
6
+ <file name="metaboxes.php" server="easy-modal.com//public_html/" local="130207651112594989" remote="130208443200000000" Dst="2" />
7
+ <file name="modal_delete.php" server="easy-modal.com//public_html/" local="130207651112774999" remote="130208443200000000" Dst="2" />
8
+ <file name="modal_settings.php" server="easy-modal.com//public_html/" local="130207651113455038" remote="130208443200000000" Dst="2" />
9
+ <file name="settings.php" server="easy-modal.com//public_html/" local="130207651113595046" remote="130208443200000000" Dst="2" />
10
+ <file name="modal_list.php" server="easy-modal.com//public_html/" local="130207651112965010" remote="130208443200000000" Dst="2" />
11
+ <file name="sidebar.php" server="easy-modal.com//public_html/" local="130207651113665050" remote="130208443200000000" Dst="2" />
12
+ <file name="theme_settings.php" server="easy-modal.com//public_html/" local="130207651114745112" remote="130208443200000000" Dst="2" />
13
+ <file name="modal.php" server="easy-modal.com" local="130211868143686356" remote="130211832000000000" Dst="2" />
14
+ <file name="sidebar.php" server="easy-modal.com" local="130219725758308718" remote="130219689600000000" Dst="2" />
15
+ <file name="admin_footer.php" server="easy-modal.com" local="130219723239704663" remote="130219687200000000" Dst="2" />
16
+ <file name="modal_delete.php" server="easy-modal.com" local="130218604452439616" remote="130218568200000000" Dst="2" />
17
+ <file name="settings.php" server="easy-modal.com" local="130218604757107042" remote="130218568200000000" Dst="2" />
18
+ <file name="help.php" server="easy-modal.com" local="130218604264468864" remote="130218567600000000" Dst="2" />
19
+ <file name="metaboxes.php" server="easy-modal.com" local="130218604333102790" remote="130218568200000000" Dst="2" />
20
+ <file name="modal_list.php" server="easy-modal.com" local="130218604525373787" remote="130218568200000000" Dst="2" />
21
+ <file name="modal_settings.php" server="easy-modal.com" local="130218604639310304" remote="130218568200000000" Dst="2" />
22
+ <file name="theme_settings.php" server="easy-modal.com" local="130218604839951780" remote="130218568200000000" Dst="2" />
23
+ </dwsync>
inc/views/admin_footer.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div id="eModal-Admin-1" class="modal tiny">
2
+ <h2>Let others know</h2>
3
+ <p>If you found Easy Modal useful, let others know by writing a review or about your experiences and uses for the plugin.</p>
4
+ <h3>Affiliates - Earn Extra Cash.<img class="right" src="<?php echo EASYMODAL_URL?>/inc/images/admin/affiliate.png" alt="Affiliate"/></h3>
5
+ <p>Interested in making money with Easy Modal? Earn a 40% commission on every sale you generate. <a href="https://easy-modal.com/affiliatesutm_source=em&utm_medium=dashboard+link&utm_campaign=affiliate+modal" target="_blank">Find out more</a></p>
6
+ <p>It's really that easy. We will pay you a 40% commission on every sale you generate using your affiliate referral URL! It's as easy as signing up and promoting the program on your website, blog, Facebook, Twitter or other social networks.</p>
7
+ <!--
8
+ <h3>Bonus - Free Pro License <small> ($15 Value)</small><img class="right" src="<?php echo EASYMODAL_URL?>/inc/images/admin/bonus.png" alt="Free Bonus"/></h3>
9
+ <p>If you write at least 400 words and provide a dofollow link to Easy Modal on our site or wp.org you can get a free single license for the pro version for the life of the link.</p>
10
+ <p>To qualify for your free copy send us a link to the page about Easy Modal containing the required link. We may ask you to change the context that the link is placed in to vary the keywords it is placed on.</p>
11
+ -->
12
+ <a class="close-modal">&#215;</a>
13
+ </div>
14
+ <div id="fb-root"></div>
15
+ <script>
16
+ jQuery(document).ready(function(){
17
+ (function(d, s, id) {
18
+ var js, fjs = d.getElementsByTagName(s)[0];
19
+ if (d.getElementById(id)) return;
20
+ js = d.createElement(s); js.id = id;
21
+ js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=191746824208314";
22
+ fjs.parentNode.insertBefore(js, fjs);
23
+ }(document, 'script', 'facebook-jssdk'));
24
+
25
+ (function() {
26
+ var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
27
+ po.src = 'https://apis.google.com/js/plusone.js';
28
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
29
+ })();
30
+ !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');
31
+ });
32
+ </script>
inc/views/help.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="wrap">
2
+ <?php if(!empty($this->messages)){?>
3
+ <?php foreach($this->messages as $message){?>
4
+ <div class="<?php _e($message['type'],'easy-modal')?>"><strong><?php _e($message['message'],'easy-modal')?>.</strong></div>
5
+ <?php }?>
6
+ <?php }?>
7
+ <?php screen_icon()?>
8
+ <h2><?php _e('Help','easy-modal')?></h2>
9
+ <div id="poststuff">
10
+ <div id="post-body" class="metabox-holder columns-2">
11
+ <div id="post-body-content">
12
+ <div class="meta-box-sortables ui-sortable">
13
+ <div class="meta-box-sortables ui-sortable">
14
+ <h2 id="em-tabs" class="nav-tab-wrapper">
15
+ <a href="#top#usage" id="usage-tab" class="nav-tab"><?php _e('Usage','easy-modal')?></a>
16
+ </h2>
17
+ <div class="tabwrapper">
18
+ <div id="usage" class="em-tab">
19
+ <h4><?php _e('Copy the class to the link/button you want to open this modal.','easy-modal')?><span class="desc">Will start with eModal- and end with a # of the modal you want to open.</span></h4>
20
+ <h4>Link Example</h4>
21
+ <a href="#" onclick="return false;" class="eModal-1">Open Modal</a>
22
+ <pre>&lt;a href="#" class="eModal-1">Open Modal&lt;/a></pre>
23
+ <h4>Button Example</h4>
24
+ <button onclick="return false;" class="eModal-1">Open Modal</button>
25
+ <pre>&lt;button class="eModal-1">Open Modal&lt;/button></pre>
26
+ <h4>Image Example</h4>
27
+ <img style="cursor:pointer;" src="<?php echo EASYMODAL_URL?>/inc/images/admin/easy-modal-icon.png" onclick="return false;" class="eModal-1" />
28
+ <pre>&lt;img src="easy-modal-icon.png" class="eModal-1" /></pre>
29
+ </div>
30
+ </div>
31
+ </div>
32
+ </div>
33
+ </div>
34
+ <div id="postbox-container-1" class="postbox-container">
35
+ <?php require(EASYMODAL_DIR.'/inc/views/sidebar.php')?>
36
+ </div>
37
+ </div>
38
+ <br class="clear"/>
39
+ </div>
40
+ </div>
inc/views/metaboxes.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <p>
2
+ <input type="hidden" name="safe_csrf_nonce_easy_modal" id="safe_csrf_nonce_easy_modal" value="<?php echo wp_create_nonce("safe_csrf_nonce_easy_modal"); ?>">
3
+ <label for="easy_modal_post_modals"><?php _e( "Select which modals to load", 'easy-modal' ); ?></label>
4
+ <select class="widefat" multiple="multiple" name="easy_modal_post_modals[]" id="easy_modal_post_modals">
5
+ <?php foreach($modals as $key => $name)
6
+ {
7
+ $modal = $this->getModalSettings($key);
8
+ if(!$modal['sitewide']) {?>
9
+ <option value="<?php esc_attr_e($key)?>"<?php echo (is_array($current_modals) && in_array($key,$current_modals)) ? esc_attr(' selected="selected"') : ''?>><?php esc_html_e($name)?></option>
10
+ <?php }
11
+ }?>
12
+ </select>
13
+ </p>
inc/views/modal.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <div id="eModal-<?php esc_attr_e($modal['id'])?>" class="<?php esc_attr_e($modal['size'] != 'custom' ? $modal['size'].' ' : '')?>modal">
2
+ <?php if($modal['title'] != '') {?>
3
+ <div class="title"><?php esc_html_e($modal['title'])?></div>
4
+ <?php }?>
5
+ <?php echo do_shortcode($modal['content']);?>
6
+ <a class="close-modal">&#215;</a>
7
+ </div>
inc/views/modal_delete.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="wrap">
2
+ <?php if(!empty($this->messages)){?>
3
+ <?php foreach($this->messages as $message){?>
4
+ <div class="<?php _e($message['type'],'easy-modal')?>"><strong><?php _e($message['message'],'easy-modal')?>.</strong></div>
5
+ <?php }?>
6
+ <?php }?>
7
+ <?php screen_icon()?>
8
+ <h2><?php _e('Delete Modal','easy-modal')?></h2>
9
+ <div id="poststuff">
10
+ <div id="post-body" class="metabox-holder columns-2">
11
+ <div id="post-body-content">
12
+ <<< - <a href="admin.php?page=<?php echo EASYMODAL_SLUG?>&modal_id=<?php echo intval($modal_id)?>">Back to Modal</a>
13
+ <p>Are you sure you want to delete this modal?</p>
14
+ <a style="color:#fff;border:1px solid #333; background-color:#900; text-shadow: none;"class="add-new-h2" href="admin.php?page=<?php echo EASYMODAL_SLUG?>&modal_id=<?php echo intval($modal_id)?>&action=delete&confirm=yes&safe_csrf_nonce_easy_modal=<?php echo wp_create_nonce("safe_csrf_nonce_easy_modal")?>">Confirm</a>
15
+ </div>
16
+ <div id="postbox-container-1" class="postbox-container">
17
+ <?php require(EASYMODAL_DIR.'/inc/views/sidebar.php')?>
18
+ </div>
19
+ </div>
20
+ <br class="clear"/>
21
+ </div>
22
+ </div>
inc/views/modal_list.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="wrap">
2
+ <?php if(!empty($this->messages)){?>
3
+ <?php foreach($this->messages as $message){?>
4
+ <div class="<?php _e($message['type'],'easy-modal')?>"><strong><?php _e($message['message'],'easy-modal')?>.</strong></div>
5
+ <?php }?>
6
+ <?php }?>
7
+ <?php screen_icon()?>
8
+ <h2>Easy Modal Modals<a class="add-new-h2" href="admin.php?page=<?php echo EASYMODAL_SLUG?>&modal_id=new">Add New</a></h2>
9
+ <div id="poststuff">
10
+ <div id="post-body" class="metabox-holder columns-2">
11
+ <div id="post-body-content">
12
+ <?php if( $modals && count($modals) > 0 ){?>
13
+ <table class="wp-list-table widefat fixed posts" style="width:100%">
14
+ <thead>
15
+ <th width="40">ID</th>
16
+ <th width="100">Class</th>
17
+ <th>Name</th>
18
+ <th width="100" style="text-align:center">Actions</th>
19
+ </thead>
20
+ <tbody>
21
+ <?php foreach($modals as $id => $name){?>
22
+ <tr>
23
+ <td><?php echo intval($id)?></td>
24
+ <td>eModal-<?php echo intval($id)?></td>
25
+ <td><a href="admin.php?page=<?php echo EASYMODAL_SLUG?>&modal_id=<?php echo intval($id)?>"><?php echo ucfirst(esc_html($name))?></a></td>
26
+ <td align="center">
27
+ <a style="margin-right:10px;" href="admin.php?page=<?php echo EASYMODAL_SLUG?>&modal_id=<?php echo intval($id)?>&action=clone&safe_csrf_nonce_easy_modal=<?php echo wp_create_nonce("safe_csrf_nonce_easy_modal")?>">Clone</a>
28
+ <a style="color:red" href="admin.php?page=<?php echo EASYMODAL_SLUG?>&modal_id=<?php echo intval($id)?>&action=delete&safe_csrf_nonce_easy_modal=<?php echo wp_create_nonce("safe_csrf_nonce_easy_modal")?>">Delete</a>
29
+ </td>
30
+ </tr>
31
+ <?php }?>
32
+ </tbody>
33
+ </table>
34
+ <?php }else{?>
35
+ <p>To get started click the "add new" button above</p>
36
+ <?php }?>
37
+ </div>
38
+ <div id="postbox-container-1" class="postbox-container">
39
+ <?php require(EASYMODAL_DIR.'/inc/views/sidebar.php')?>
40
+ </div>
41
+ </div>
42
+ <br class="clear"/>
43
+ </div>
44
+ </div>
inc/views/modal_settings.php ADDED
@@ -0,0 +1,254 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $sizes = array(
3
+ '' => 'Normal',
4
+ 'tiny' => 'Tiny',
5
+ 'small' => 'Small',
6
+ 'medium' => 'Medium',
7
+ 'large' => 'Large',
8
+ 'xlarge' => 'X Large',
9
+ 'custom' => 'Custom'
10
+ );
11
+ $animations = array(
12
+ 'fade' => 'Fade',
13
+ 'fadeAndSlide' => 'Fade and Slide',
14
+ 'grow' => 'Grow',
15
+ 'growAndSlide' => 'Grow and Slide',
16
+ );
17
+ $directions = array(
18
+ 'top' => 'Top',
19
+ 'bottom' => 'Bottom',
20
+ 'left' => 'Left',
21
+ 'right' => 'Right',
22
+ 'topleft' => 'Top Left',
23
+ 'topright' => 'Top Right',
24
+ 'bottomleft' => 'Bottom Left',
25
+ 'bottomright' => 'Bottom Right',
26
+ 'mouse' => 'Mouse',
27
+ );
28
+ $cssUnits = array(
29
+ 'px' => 'PX',
30
+ '%' => '%',
31
+ 'em' => 'EM',
32
+ 'rem' => 'REM'
33
+ );
34
+ $animationshowhide = !in_array($settings['animation'], array('fadeAndSlide','growAndSlide')) ? ' style="display:none"' : '';
35
+ $sizeshowhide = $settings['size'] != 'custom' ? ' style="display:none"' : '';
36
+ ?><div class="wrap">
37
+ <?php if(!empty($this->messages)){?>
38
+ <?php foreach($this->messages as $message){?>
39
+ <div class="<?php _e($message['type'],'easy-modal')?>"><strong><?php _e($message['message'],'easy-modal')?>.</strong></div>
40
+ <?php }?>
41
+ <?php }?>
42
+ <?php screen_icon()?>
43
+ <h2>
44
+ <?php echo ucfirst(esc_html($settings['name'])).' '; _e('Modal','easy-modal')?>
45
+ <?php if(is_numeric($modal_id)){?>
46
+ <a style="color:#fff;border:1px solid #333; background-color:#21759B; text-shadow: none;"class="add-new-h2" href="admin.php?page=<?php echo EASYMODAL_SLUG?>&modal_id=<?php echo intval($modal_id)?>&action=clone&safe_csrf_nonce_easy_modal=<?php echo wp_create_nonce("safe_csrf_nonce_easy_modal")?>">Clone</a>
47
+ <a style="color:#fff;border:1px solid #333; background-color:#900; text-shadow: none;"class="add-new-h2" href="admin.php?page=<?php echo EASYMODAL_SLUG?>&modal_id=<?php echo intval($modal_id)?>&action=delete&safe_csrf_nonce_easy_modal=<?php echo wp_create_nonce("safe_csrf_nonce_easy_modal")?>">Delete</a>
48
+ <?php }?>
49
+ </h2>
50
+ <div><<< - <a href="admin.php?page=<?php echo EASYMODAL_SLUG?>">Back to Modal Lists</a></div>
51
+ <div id="poststuff">
52
+ <div id="post-body" class="metabox-holder columns-2">
53
+ <div id="post-body-content">
54
+ <div class="meta-box-sortables ui-sortable">
55
+ <h2 id="em-tabs" class="nav-tab-wrapper">
56
+ <a href="#top#general" id="general-tab" class="nav-tab"><?php _e('General','easy-modal')?></a>
57
+ <a href="#top#options" id="options-tab" class="nav-tab"><?php _e('Options','easy-modal')?></a>
58
+ <a href="#top#examples" id="examples-tab" class="nav-tab"><?php _e('Examples','easy-modal')?></a>
59
+ </h2>
60
+ <div class="tabwrapper">
61
+ <form method="post" action="admin.php?page=<?php echo EASYMODAL_SLUG?>&modal_id=<?php echo is_numeric($modal_id) ? intval($modal_id) : 'new' ?>">
62
+ <input type="hidden" name="em_settings" value="modal"/>
63
+ <div id="general" class="em-tab">
64
+ <table class="form-table">
65
+ <tbody>
66
+ <tr class="form-field form-required">
67
+ <th scope="row">
68
+ <label for="name"><?php _e('Name', 'easy-modal');?> <span class="description">(required)</span></label>
69
+ </th>
70
+ <td>
71
+ <input type="text" name="name" id="name" value="<?php esc_attr_e($settings['name'])?>"/>
72
+ <p class="description"><?php _e('Enter a name for your modal.','easy-modal')?></p>
73
+ </td>
74
+ </tr>
75
+
76
+ <tr class="form-field form-required">
77
+ <th scope="row">
78
+ <label for="sitewide"><?php _e('Sitewide', 'easy-modal');?></label>
79
+ </th>
80
+ <td>
81
+ <p class="field switch" style="clear:both; overflow:auto; display:block;">
82
+ <label class="cb-enable"><span>Yes</span></label>
83
+ <label class="cb-disable selected"><span>No</span></label>
84
+ <input type="checkbox" class="checkbox" id="sitewide" name="sitewide" value="true" <?php echo $settings['sitewide'] == true ? 'checked="checked"' : '' ?> />
85
+ </p>
86
+ <p class="description"><?php _e('Should this modal be loaded on every page of the site?','easy-modal')?></p>
87
+ </td>
88
+ </tr>
89
+
90
+ <tr class="form-field form-required">
91
+ <th scope="row">
92
+ <label for="title"><?php _e('Title', 'easy-modal');?></label>
93
+ </th>
94
+ <td>
95
+ <input type="text" id="title" name="title" value="<?php esc_attr_e($settings['title']);?>" />
96
+ <p class="description"><?php _e('The title that appears in the modal window.','easy-modal')?></p>
97
+ </td>
98
+ </tr>
99
+
100
+ <tr class="form-field form-required">
101
+ <th scope="row">
102
+ <label for="content"><?php _e('Content', 'easy-modal');?></label>
103
+ </th>
104
+ <td>
105
+ <?php wp_editor($settings['content'], "content");?>
106
+ <p class="description"><?php _e('Modal content. Can contain shortcodes.','easy-modal')?></p>
107
+ </td>
108
+ </tr>
109
+ </tbody>
110
+ </table>
111
+ </div>
112
+ <div id="options" class="em-tab">
113
+ <table class="form-table">
114
+ <tbody>
115
+ <tr class="form-field form-required">
116
+ <th scope="row">
117
+ <label for="size"><?php _e('Size', 'easy-modal');?></label>
118
+ </th>
119
+ <td>
120
+ <select name="size" id="size">
121
+ <?php foreach($sizes as $value => $name){?>
122
+ <option value="<?php echo $value?>" <?php echo $value == $settings['size'] ? 'selected="selected"' : ''?>><?php echo $name?></option>
123
+ <?php }?>
124
+ </select>
125
+ <p class="description"><?php _e('Select the size of the modal.','easy-modal')?></p>
126
+ </td>
127
+ </tr>
128
+
129
+ <tr class="form-field form-required custom-size-only"<?php echo $sizeshowhide?>>
130
+ <th scope="row">
131
+ <label for="userHeight"><?php _e('Height', 'easy-modal');?></label>
132
+ </th>
133
+ <td>
134
+ <input type="text" id="userHeight" name="userHeight" size="5" value="<?php esc_attr_e($settings['userHeight'])?>" />
135
+ <select name="userHeightUnit" id="userHeightUnit">
136
+ <?php foreach($cssUnits as $value => $name){?>
137
+ <option value="<?php echo $value?>" <?php echo $value == $settings['userHeightUnit'] ? 'selected="selected"' : ''?>><?php echo $name?></option>
138
+ <?php }?>
139
+ </select>
140
+ <p class="description"><?php _e('Set a custom height for the modal.','easy-modal')?></p>
141
+ </td>
142
+ </tr>
143
+
144
+ <tr class="form-field form-required custom-size-only"<?php echo $sizeshowhide?>>
145
+ <th scope="row">
146
+ <label for="userWidth"><?php _e('Width', 'easy-modal');?></label>
147
+ </th>
148
+ <td>
149
+ <input type="text" id="userWidth" name="userWidth" size="5" value="<?php echo esc_attr_e($settings['userWidth'])?>" />
150
+ <select name="userWidthUnit" id="userWidthUnit">
151
+ <?php foreach($cssUnits as $value => $name){?>
152
+ <option value="<?php echo $value?>" <?php echo $value == $settings['userWidthUnit'] ? 'selected="selected"' : ''?>><?php echo $name?></option>
153
+ <?php }?>
154
+ </select>
155
+ <p class="description"><?php _e('Set a custom height for the modal.','easy-modal')?></p>
156
+ </td>
157
+ </tr>
158
+
159
+ <tr class="form-field form-required">
160
+ <th scope="row">
161
+ <label for="animation"><?php _e('Animation', 'easy-modal');?></label>
162
+ </th>
163
+ <td>
164
+ <select name="animation" id="animation">
165
+ <?php foreach($animations as $value => $name){?>
166
+ <option value="<?php echo $value?>" <?php echo $value == $settings['animation'] ? 'selected="selected"' : ''?>><?php echo $name?></option>
167
+ <?php }?>
168
+ </select>
169
+ <p class="description"><?php _e('Select an animation for the modal.','easy-modal')?></p>
170
+ </td>
171
+ </tr>
172
+
173
+ <tr class="form-field form-required">
174
+ <th scope="row">
175
+ <label for="duration"><?php _e('Speed', 'easy-modal');?></label>
176
+ </th>
177
+ <td>
178
+ <input type="text" id="duration" name="duration" size="3" value="<?php esc_attr_e(intval($settings['duration']))?>" />MS
179
+ <p class="description"><?php _e('Set the animation speed for the modal.','easy-modal')?></p>
180
+ </td>
181
+ </tr>
182
+
183
+ <tr class="form-field form-required animation-only"<?php echo $animationshowhide?>>
184
+ <th scope="row">
185
+ <label for="direction"><?php _e('Direction', 'easy-modal');?></label>
186
+ </th>
187
+ <td>
188
+ <select name="direction" id="direction">
189
+ <?php foreach($directions as $value => $name){?>
190
+ <option value="<?php echo $value?>" <?php echo $value == $settings['direction'] ? 'selected="selected"' : ''?>><?php echo $name?></option>
191
+ <?php }?>
192
+ </select>
193
+ <p class="description"><?php _e('Select a direction for the animation.','easy-modal')?></p>
194
+ </td>
195
+ </tr>
196
+
197
+ <tr class="form-field form-required">
198
+ <th scope="row">
199
+ <label for="overlayClose"><?php _e('Click Overlay to Close?', 'easy-modal');?></label>
200
+ </th>
201
+ <td>
202
+ <p class="field switch" style="clear:both; overflow:auto; display:block;">
203
+ <label class="cb-enable"><span>On</span></label>
204
+ <label class="cb-disable selected"><span>Off</span></label>
205
+ <input type="checkbox" class="checkbox" id="overlayClose" name="overlayClose" value="true" <?php echo $settings['overlayClose'] == true ? 'checked="checked"' : '' ?> />
206
+ </p>
207
+ <p class="description"><?php _e('Choose whether the modal will close when you click the overlay.','easy-modal')?></p>
208
+ </td>
209
+ </tr>
210
+
211
+ <tr class="form-field form-required">
212
+ <th scope="row">
213
+ <label for="overlayEscClose"><?php _e('ESC Key to Close?', 'easy-modal');?></label>
214
+ </th>
215
+ <td>
216
+ <p class="field switch" style="clear:both; overflow:auto; display:block;">
217
+ <label class="cb-enable"><span>On</span></label>
218
+ <label class="cb-disable selected"><span>Off</span></label>
219
+ <input type="checkbox" class="checkbox" id="overlayEscClose" name="overlayEscClose" value="true" <?php echo $settings['overlayEscClose'] == true ? 'checked="checked"' : '' ?> />
220
+ </p>
221
+ <p class="description"><?php _e('Choose whether the modal will close press Esc.','easy-modal')?></p>
222
+ </td>
223
+ </tr>
224
+
225
+ </tbody>
226
+ </table>
227
+ </div>
228
+ <div id="examples" class="em-tab">
229
+ <h4><?php _e('Copy this class to the link/button you want to open this modal.','easy-modal')?><span class="desc">eModal-<?php echo intval($settings['id'])?></span></h4>
230
+ <h4>Link Example</h4>
231
+ <a href="#" onclick="return false;" class="eModal-<?php echo intval($settings['id'])?>">Open Modal</a>
232
+ <pre>&lt;a href="#" class="eModal-<?php echo intval($settings['id'])?>">Open Modal&lt;/a></pre>
233
+ <h4>Button Example</h4>
234
+ <button onclick="return false;" class="eModal-<?php echo intval($settings['id'])?>">Open Modal</button>
235
+ <pre>&lt;button class="eModal-<?php echo intval($settings['id'])?>">Open Modal&lt;/button></pre>
236
+ <h4>Image Example</h4>
237
+ <img style="cursor:pointer;" src="<?php echo EASYMODAL_URL?>/inc/images/admin/easy-modal-icon.png" onclick="return false;" class="eModal-<?php echo intval($settings['id'])?>" />
238
+ <pre>&lt;img src="easy-modal-icon.png" class="eModal-<?php echo intval($settings['id'])?>" /></pre>
239
+ </div>
240
+ <div class="submit">
241
+ <input type="hidden" name="safe_csrf_nonce_easy_modal" id="safe_csrf_nonce_easy_modal" value="<?php echo wp_create_nonce("safe_csrf_nonce_easy_modal"); ?>">
242
+ <input type="submit" value="<?php _e('Save Settings','easy-modal')?>" name="submit" class="button-primary">
243
+ </div>
244
+ </form>
245
+ </div>
246
+ </div>
247
+ </div>
248
+ <div id="postbox-container-1" class="postbox-container">
249
+ <?php require(EASYMODAL_DIR.'/inc/views/sidebar.php')?>
250
+ </div>
251
+ </div>
252
+ <br class="clear"/>
253
+ </div>
254
+ </div>
inc/views/settings.php ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $settings = $this->getSettings();
3
+ $messages = $this->messages;
4
+ $license_status = get_option('EasyModal_License_Status');
5
+ $valid = is_array($license_status) && !empty($license_status['status']) && in_array($license_status['status'], array(2000,2001,3003)) ? true : false;
6
+ ?>
7
+ <div class="wrap">
8
+ <?php if(!empty($this->messages)){?>
9
+ <?php foreach($this->messages as $message){?>
10
+ <div class="<?php _e($message['type'],'easy-modal')?>"><strong><?php _e($message['message'],'easy-modal')?>.</strong></div>
11
+ <?php }?>
12
+ <?php }?>
13
+ <?php screen_icon()?>
14
+ <h2>
15
+ <?php _e('Settings','easy-modal')?>
16
+ </h2>
17
+ <?php if(!$valid){?>
18
+ <div class="error">
19
+ <p>If you purchased the Pro version and havent already recieved a key please email us at <a href="mailto:danieliser@wizardinternetsolutions.com">danieliser@wizardinternetsolutions.com</a></p>
20
+ </div>
21
+ <?php }?>
22
+ <div id="poststuff">
23
+ <div id="post-body" class="metabox-holder columns-2">
24
+ <div id="post-body-content">
25
+ <div class="meta-box-sortables ui-sortable">
26
+ <h2 id="em-tabs" class="nav-tab-wrapper">
27
+ <a href="#top#general" id="general-tab" class="nav-tab"><?php _e('General','easy-modal')?></a>
28
+ </h2>
29
+ <div class="tabwrapper">
30
+ <form method="post" action="admin.php?page=<?php echo EASYMODAL_SLUG?>-settings">
31
+ <input type="hidden" name="em_settings" value="settings"/>
32
+ <div id="general" class="em-tab">
33
+ <table class="form-table">
34
+ <tbody>
35
+ <tr class="form-field form-required">
36
+ <th scope="row">
37
+ <label for="name"><?php _e('License Key', 'easy-modal');?> <span class="description">(required)</span></label>
38
+ </th>
39
+ <td>
40
+ <input <?php echo $valid ? 'style="background-color:#0f0;border-color:#090;"' : '' ?> type="text" id="license" name="license" value="<?php esc_attr_e(get_option('EasyModal_License'))?>"/>
41
+ <p class="description"><?php _e( is_array($license_status) && !empty($license_status['message']) ? $license_status['message'] : 'Enter a key to unlock Easy Modal Pro.','easy-modal')?></p>
42
+ </td>
43
+ </tr>
44
+ </tbody>
45
+ </table>
46
+ </div>
47
+ <div class="submit">
48
+ <input type="hidden" name="safe_csrf_nonce_easy_modal" id="safe_csrf_nonce_easy_modal" value="<?php echo wp_create_nonce("safe_csrf_nonce_easy_modal"); ?>">
49
+ <input type="submit" value="<?php _e('Save Settings','easy-modal')?>" name="submit" class="button-primary">
50
+ </div>
51
+ </form>
52
+ </div>
53
+ </div>
54
+ </div>
55
+ <div id="postbox-container-1" class="postbox-container">
56
+ <?php require(EASYMODAL_DIR.'/inc/views/sidebar.php')?>
57
+ </div>
58
+ </div>
59
+ <br class="clear"/>
60
+ </div>
61
+ </div>
inc/views/sidebar.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="postbox " id="share">
2
+ <div title="Click to toggle" class="handlediv"><br></div><h3 style="text-align:center" class="hndle"><span>Love It? Share It!</span></h3>
3
+ <div class="inside">
4
+ <ul class="share-buttons">
5
+ <li><div class="fb-like" data-href="https://easy-modal.com" data-width="100" data-layout="box_count" data-action="like" data-show-faces="false" data-send="true"></div></li>
6
+ <li><a href="https://twitter.com/intent/tweet" class="twitter-share-button" data-count="vertical" data-url="https://easy-modal.com" data-via="wizard_is" data-related="wizard_is">Tweet</a></li>
7
+ <li><div class="g-plusone" data-href="https://easy-modal.com" data-size="tall"></div></li>
8
+ </ul>
9
+ <br class="clear" />
10
+ <h4>Show Some Love</h4>
11
+ <ul>
12
+ <li><a href="http://wordpress.org/support/view/plugin-reviews/easy-modal#postform">Rate It on WordPress.org</a></li>
13
+ <li>Got a blog? <a href="#" class="write-it">Write about it.</a></li>
14
+ <li>Affiliates? <a href="#" class="write-it">Get up to 40%.</a></li>
15
+ </ul>
16
+ </div>
17
+ </div>
18
+ <div class="postbox " id="upgrade">
19
+ <div title="Click to toggle" class="handlediv"><br></div><h3 style="text-align:center" class="hndle"><span>Upgrade - Go Pro Now</span></h3>
20
+ <div class="inside">
21
+ <h4>Increase Conversions & Newsletter Sign Ups</h4>
22
+ <p>The pro version aims to take your modals to the next level. With a great set of additional features coupled with our first class support make this a great value.</p>
23
+ <h4>Features</h4>
24
+ <ul class="bullets">
25
+ <li>Unlimited Themes</li>
26
+ <li>Auto show modals on page load &amp; exit.</li>
27
+ <li>Import & Export Modals, Themes & Settings</li>
28
+ <li>Premium Support</li>
29
+ <li>and More...</li>
30
+ </ul>
31
+ <h4>Try it out for yourself!</h4>
32
+ <p><a href="https://easy-modal.com/demo" target="_blank">Demo Site</a></p>
33
+ <h4>Upgrading is Easy</h4>
34
+ <p>Simply go <a href="https://easy-modal.com/pricing-purchase?utm_source=em-lite&utm_medium=dashboard+link&utm_campaign=get+premium">here</a> and click buy now. Once you recieve your key simply enter it on the settings page and then update your plugin.</p>
35
+ </div>
36
+ </div>
37
+ <div class="postbox " id="support">
38
+ <div title="Click to toggle" class="handlediv"><br></div><h3 style="text-align:center" class="hndle"><span>Get Support</span></h3>
39
+ <div class="inside">
40
+ <ul>
41
+ <li><a href="http://wordpress.org/support/plugin/easy-modal">Easy Modal Support Forum</a></li>
42
+ <li><a href="https://easy-modal.com/pricing-purchase?utm_source=em-lite&utm_medium=dashboard+link&utm_campaign=pro+support">Purchase Pro</a> for premium support</li>
43
+ </ul>
44
+ <a href="https://twitter.com/EasyModal" class="twitter-follow-button" data-show-count="true" data-show-screen-name="true" data-size="medium" data-lang="en">Follow Us</a><br />
45
+ <div class="fb-like" data-href="https://facebook.com/EasyModal" data-send="false" data-width="100px" data-show-faces="false"></div>
46
+ </div>
47
+ </div>
inc/views/theme_settings.php ADDED
@@ -0,0 +1,375 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $borderTypes = array(
3
+ 'none' => 'None',
4
+ 'solid' => 'Solid',
5
+ 'dotted' => 'Dotted',
6
+ 'dashed' => 'Dashed',
7
+ 'double' => 'Double',
8
+ 'groove' => 'Groove',
9
+ 'inset' => 'Inset',
10
+ 'outset' => 'Outset',
11
+ 'ridge' => 'Ridge'
12
+ );
13
+ $bordershowhide = $settings['containerBorderStyle'] == 'none' ? 'style="display:none"' : '';
14
+ $fontFamilys = array(
15
+ 'Sans-Serif'=>'Sans-Serif',
16
+ 'Tahoma' => 'Tahoma',
17
+ 'Georgia' => 'Georgia',
18
+ 'Comic Sans MS' => 'Comic Sans MS',
19
+ 'Arial' => 'Arial',
20
+ 'Lucida Grande' => 'Lucida Grande',
21
+ 'Times New Roman' => 'Times New Roman'
22
+ );
23
+ $closeLocations = array(
24
+ 'inside' => 'Inside',
25
+ 'outside' => 'Outside',
26
+ );
27
+ $closeshowhide = $settings['closeLocation'] == 'inside' ? 'style="display:none"' : '';
28
+ $closePositions = array(
29
+ 'topleft' => 'Top Left',
30
+ 'topright' => 'Top Right',
31
+ 'bottomleft' => 'Bottom Left',
32
+ 'bottomright' => 'Bottom Right'
33
+ );
34
+ ?><div style="border-style:" class="wrap">
35
+ <?php if(!empty($this->messages)){?>
36
+ <?php foreach($this->messages as $message){?>
37
+ <div class="<?php _e($message['type'],'easy-modal')?>"><strong><?php _e($message['message'],'easy-modal')?>.</strong></div>
38
+ <?php }?>
39
+ <?php }?>
40
+ <?php screen_icon()?>
41
+ <h2><?php echo ucfirst(esc_html($settings['name'])).' '; _e('Theme','easy-modal')?></h2>
42
+ <div class="emthemes metabox-holder">
43
+ <div class="meta-box-sortables ui-sortable">
44
+ <h2 id="em-tabs" class="nav-tab-wrapper">
45
+ <a href="#top#general" id="general-tab" class="nav-tab"><?php _e('General','easy-modal')?></a>
46
+ <a href="#top#overlay" id="overlay-tab" class="nav-tab"><?php _e('Overlay','easy-modal')?></a>
47
+ <a href="#top#close" id="close-tab" class="nav-tab"><?php _e('Close','easy-modal')?></a>
48
+ <a href="#top#container" id="container-tab" class="nav-tab"><?php _e('Container','easy-modal')?></a>
49
+ <a href="#top#content" id="content-tab" class="nav-tab"><?php _e('Content','easy-modal')?></a>
50
+ </h2>
51
+ <div class="tabwrapper">
52
+ <form method="post" action="admin.php?page=easy-modal-themes&theme_id=1">
53
+ <input type="hidden" name="em_settings" value="theme"/>
54
+ <div id="general" class="em-tab">
55
+ <table class="form-table">
56
+ <tbody>
57
+ <tr class="form-field form-required">
58
+ <th scope="row">
59
+ <label for="name"><?php _e('Theme Name', 'easy-modal');?> <span class="description">(required)</span></label>
60
+ </th>
61
+ <td>
62
+ <input type="text" name="name" id="name" value="<?php esc_attr_e($settings['name'])?>"/>
63
+ <p class="description"><?php _e('Enter a name for your theme.','easy-modal')?></p>
64
+ </td>
65
+ </tr>
66
+ </tbody>
67
+ </table>
68
+ </div>
69
+ <div id="overlay" class="em-tab">
70
+ <table class="form-table">
71
+ <tbody>
72
+ <tr class="form-field form-required">
73
+ <th scope="row">
74
+ <label for="overlayColor"><?php _e('Color', 'easy-modal');?></label>
75
+ </th>
76
+ <td>
77
+ <input type="text" name="overlayColor" id="overlayColor" value="<?php esc_attr_e($settings['overlayColor'])?>" class="colorSelect" />
78
+ <div class="color-swatch" style="background-color:<?php esc_attr_e($settings['overlayColor'])?>" ></div>
79
+ <p class="description"><?php _e('Choose the overlay color.','easy-modal')?></p>
80
+ </td>
81
+ </tr>
82
+ <tr class="form-field form-required">
83
+ <th scope="row">
84
+ <label for="overlayOpacity"><?php _e('Opacity', 'easy-modal');?></label>
85
+ </th>
86
+ <td>
87
+ <div id="overlayOpacitySlider" class="value-slider"></div>
88
+ <div class="slider-value"><span id="overlayOpacityValue"><?php echo intval($settings['overlayOpacity'])?></span>%</div>
89
+ <input type="hidden" id="overlayOpacity" name="overlayOpacity" size="20" value="<?php esc_attr_e(intval($settings['overlayOpacity']))?>"/>
90
+ <p class="description"><?php _e('The opacity value for the overlay.','easy-modal')?></p>
91
+ </td>
92
+ </tr>
93
+ </tbody>
94
+ </table>
95
+ </div>
96
+ <div id="close" class="em-tab">
97
+ <table class="form-table">
98
+ <tbody>
99
+ <tr class="form-field form-required">
100
+ <th scope="row">
101
+ <label for="closeLocation"><?php _e('Close Location', 'easy-modal');?></label>
102
+ </th>
103
+ <td>
104
+ <select name="closeLocation" id="closeLocation">
105
+ <?php foreach($closeLocations as $value => $name){?>
106
+ <option value="<?php echo $value?>" <?php echo $value == $settings['closeLocation'] ? 'selected="selected"' : ''?>><?php echo $name?></option>
107
+ <?php }?>
108
+ </select>
109
+ <p class="description"><?php _e('Choose whether the close button is inside or outside of the modal.','easy-modal')?></p>
110
+ </td>
111
+ </tr>
112
+
113
+ <tr class="form-field form-required outside-only"<?php echo $closeshowhide?>>
114
+ <th scope="row">
115
+ <label for="closeBgColor"><?php _e('Background Color', 'easy-modal');?></label>
116
+ </th>
117
+ <td>
118
+ <input type="text" name="closeBgColor" id="closeBgColor" value="<?php esc_attr_e($settings['closeBgColor'])?>" class="colorSelect" />
119
+ <div class="color-swatch" style="background-color:<?php esc_attr_e($settings['closeBgColor'])?>" ></div>
120
+ <p class="description"><?php _e('Choose the background color for your close button.','easy-modal')?></p>
121
+ </td>
122
+ </tr>
123
+
124
+ <tr class="form-field form-required">
125
+ <th scope="row">
126
+ <label for="closeFontColor"><?php _e('Font Color', 'easy-modal');?></label>
127
+ </th>
128
+ <td>
129
+ <input type="text" name="closeFontColor" id="closeFontColor" value="<?php esc_attr_e($settings['closeFontColor'])?>" class="colorSelect" />
130
+ <div class="color-swatch" style="background-color:<?php esc_attr_e($settings['closeFontColor'])?>" ></div>
131
+ <p class="description"><?php _e('Choose the font color for your close button.','easy-modal')?></p>
132
+ </td>
133
+ </tr>
134
+ <tr class="form-field form-required outside-only"<?php echo $closeshowhide?>>
135
+ <th scope="row">
136
+ <label for="closeFontSize"><?php _e('Font Size', 'easy-modal');?></label>
137
+ </th>
138
+ <td>
139
+ <div id="closeFontSizeSlider" class="value-slider"></div>
140
+ <div class="slider-value"><span id="closeFontSizeValue"><?php esc_attr_e(intval($settings['closeFontSize']))?></span>px</div>
141
+ <input type="hidden" name="closeFontSize" id="closeFontSize" value="<?php esc_attr_e(intval($settings['closeFontSize']))?>" />
142
+ <p class="description"><?php _e('Choose the font size for your close button.','easy-modal')?></p>
143
+ </td>
144
+ </tr>
145
+ <tr class="form-field form-required outside-only"<?php echo $closeshowhide?>>
146
+ <th scope="row">
147
+ <label for="closeBorderRadius"><?php _e('Border Radius', 'easy-modal');?></label>
148
+ </th>
149
+ <td>
150
+ <div id="closeBorderRadiusSlider" class="value-slider"></div>
151
+ <div class="slider-value"><span id="closeBorderRadiusValue"><?php esc_attr_e(intval($settings['closeBorderRadius']))?></span>px</div>
152
+ <input type="hidden" id="closeBorderRadius" name="closeBorderRadius" value="<?php esc_attr_e(intval($settings['closeBorderRadius']))?>"/>
153
+ <p class="description"><?php _e('Choose a corner radius for your close button.','easy-modal')?></p>
154
+ </td>
155
+ </tr>
156
+ <tr class="form-field form-required outside-only"<?php echo $closeshowhide?>>
157
+ <th scope="row">
158
+ <label for="closeSize"><?php _e('Size', 'easy-modal');?></label>
159
+ </th>
160
+ <td>
161
+ <div id="closeSizeSlider" class="value-slider"></div>
162
+ <div class="slider-value"><span id="closeSizeValue"><?php esc_attr_e(intval($settings['closeSize']))?></span>px</div>
163
+ <input type="hidden" id="closeSize" name="closeSize" value="<?php esc_attr_e(intval($settings['closeSize']))?>"/>
164
+ <p class="description"><?php _e('Choose a size for your close button.','easy-modal')?></p>
165
+ </td>
166
+ </tr>
167
+ <tr class="form-field form-required outside-only"<?php echo $closeshowhide?>>
168
+ <th scope="row">
169
+ <label for="closePosition"><?php _e('Position', 'easy-modal');?></label>
170
+ </th>
171
+ <td>
172
+ <select name="closePosition" id="closePosition">
173
+ <?php foreach($closePositions as $value => $name){?>
174
+ <option value="<?php echo $value?>" <?php echo $value == $settings['closePosition'] ? 'selected="selected"' : ''?>><?php echo $name?></option>
175
+ <?php }?>
176
+ </select>
177
+ <p class="description"><?php _e('Choose which corner the close button will be positioned.','easy-modal')?></p>
178
+ </td>
179
+ </tr>
180
+ </tbody>
181
+ </table>
182
+ </div>
183
+ <div id="container" class="em-tab">
184
+ <table class="form-table">
185
+ <tbody>
186
+ <tr class="form-field form-required">
187
+ <th scope="row">
188
+ <label for="containerBgColor"><?php _e('Background Color', 'easy-modal');?></label>
189
+ </th>
190
+ <td>
191
+ <input type="text" name="containerBgColor" id="containerBgColor" value="<?php esc_attr_e($settings['containerBgColor'])?>" class="colorSelect" />
192
+ <div class="color-swatch" style="background-color:<?php esc_attr_e($settings['containerBgColor'])?>" ></div>
193
+ <p class="description"><?php _e('Choose a color for the background of the modal.','easy-modal')?></p>
194
+ </td>
195
+ </tr>
196
+ <tr class="form-field form-required">
197
+ <th scope="row">
198
+ <label for="containerPadding"><?php _e('Padding', 'easy-modal');?></label>
199
+ </th>
200
+ <td>
201
+ <div id="containerPaddingSlider" class="value-slider"></div>
202
+ <div class="slider-value"><span id="containerPaddingValue"><?php esc_attr_e(intval($settings['containerPadding']))?></span>px</div>
203
+ <input type="hidden" id="containerPadding" name="containerPadding" width="20" value="<?php esc_attr_e(intval($settings['containerPadding']))?>"/>
204
+ <p class="description"><?php _e('Choose the amount of padding for the modal.','easy-modal')?></p>
205
+ </td>
206
+ </tr>
207
+ <tr class="form-field form-required">
208
+ <th scope="row">
209
+ <label for="containerBorderStyle"><?php _e('Border Style', 'easy-modal');?></label>
210
+ </th>
211
+ <td>
212
+ <select name="containerBorderStyle" id="containerBorderStyle">
213
+ <?php foreach($borderTypes as $value => $name){?>
214
+ <option value="<?php echo $value?>" <?php echo $value == $settings['containerBorderStyle'] ? 'selected="selected"' : ''?>><?php echo $name?></option>
215
+ <?php }?>
216
+ </select>
217
+ <p class="description"><?php _e('Choose a style for the border of the modal.','easy-modal')?></p>
218
+ </td>
219
+ </tr>
220
+ <tr class="form-field form-required border-only"<?php echo $bordershowhide?>>
221
+ <th scope="row">
222
+ <label for="containerBorderColor"><?php _e('Border Color', 'easy-modal');?></label>
223
+ </th>
224
+ <td>
225
+ <input type="text" name="containerBorderColor" id="containerBorderColor" value="<?php esc_attr_e($settings['containerBorderColor'])?>" class="colorSelect" />
226
+ <div class="color-swatch" style="background-color:<?php esc_attr_e($settings['containerBorderColor'])?>" ></div>
227
+ <p class="description"><?php _e('Choose a color for the border of the modal.','easy-modal')?></p>
228
+ </td>
229
+ </tr>
230
+ <tr class="form-field form-required border-only"<?php echo $bordershowhide?>>
231
+ <th scope="row">
232
+ <label for="containerBorderWidth"><?php _e('Border Width', 'easy-modal');?></label>
233
+ </th>
234
+ <td>
235
+ <div id="containerBorderWidthSlider" class="value-slider"></div>
236
+ <div class="slider-value"><span id="containerBorderWidthValue"><?php esc_attr_e(intval( $settings['containerBorderWidth']))?></span>px</div>
237
+ <input type="hidden" id="containerBorderWidth" name="containerBorderWidth" value="<?php esc_attr_e(intval( $settings['containerBorderWidth']))?>"/>
238
+ <p class="description"><?php _e('Choose a width for the border of the modal.','easy-modal')?></p>
239
+ </td>
240
+ </tr>
241
+ <tr class="form-field form-required">
242
+ <th scope="row">
243
+ <label for="containerBorderRadius"><?php _e('Border Radius', 'easy-modal');?></label>
244
+ </th>
245
+ <td>
246
+ <div id="containerBorderRadiusSlider" class="value-slider"></div>
247
+ <div class="slider-value"><span id="containerBorderRadiusValue"><?php echo $settings['containerBorderRadius']?></span>px</div>
248
+ <input type="hidden" id="containerBorderRadius" name="containerBorderRadius" value="<?php echo $settings['containerBorderRadius']?>"/>
249
+ <p class="description"><?php _e('Choose a width for the border of the modal.','easy-modal')?></p>
250
+ </td>
251
+ </tr>
252
+ </tbody>
253
+ </table>
254
+ </div>
255
+ <div id="content" class="em-tab">
256
+ <table class="form-table">
257
+ <tbody>
258
+ <tr class="form-field form-required">
259
+ <th scope="row">
260
+ <label for="contentTitleFontColor"><?php _e('Title Color', 'easy-modal');?></label>
261
+ </th>
262
+ <td>
263
+ <input type="text" name="contentTitleFontColor" id="contentTitleFontColor" value="<?php esc_attr_e($settings['contentTitleFontColor'])?>" class="colorSelect" />
264
+ <div class="color-swatch" style="background-color:<?php esc_attr_e($settings['contentTitleFontColor'])?>" ></div>
265
+ <p class="description"><?php _e('Choose a color for the title.','easy-modal')?></p>
266
+ </td>
267
+ </tr>
268
+ <tr class="form-field form-required">
269
+ <th scope="row">
270
+ <label for="contentTitleFontSize"><?php _e('Title Font Size', 'easy-modal');?></label>
271
+ </th>
272
+ <td>
273
+ <div id="contentTitleFontSizeSlider" class="value-slider"></div>
274
+ <div class="slider-value"><span id="contentTitleFontSizeValue"><?php esc_attr_e(intval($settings['contentTitleFontSize']))?></span>px</div>
275
+ <input type="hidden" name="contentTitleFontSize" id="contentTitleFontSize" value="<?php esc_attr_e(intval($settings['contentTitleFontSize']))?>" />
276
+ <p class="description"><?php _e('Choose a font size for the title.','easy-modal')?></p>
277
+ </td>
278
+ </tr>
279
+ <tr class="form-field form-required">
280
+ <th scope="row">
281
+ <label for="contentTitleFontFamily"><?php _e('Title Font Family', 'easy-modal');?></label>
282
+ </th>
283
+ <td>
284
+ <select name="contentTitleFontFamily" id="contentTitleFontFamily">
285
+ <?php foreach($fontFamilys as $value => $name){?>
286
+ <option value="<?php echo $value?>" <?php echo $value == $settings['contentTitleFontFamily'] ? 'selected="selected"' : ''?>><?php echo $name?></option>
287
+ <?php }?>
288
+ </select>
289
+ <p class="description"><?php _e('Choose a font for the title.','easy-modal')?></p>
290
+ </td>
291
+ <tr class="form-field form-required">
292
+ <th scope="row">
293
+ <label for="contentFontColor"><?php _e('Font Color', 'easy-modal');?></label>
294
+ </th>
295
+ <td>
296
+ <input type="text" name="contentFontColor" id="contentFontColor" value="<?php esc_attr_e($settings['contentFontColor'])?>" class="colorSelect" />
297
+ <div class="color-swatch" style="background-color:<?php esc_attr_e($settings['contentFontColor'])?>" ></div>
298
+ <p class="description"><?php _e('Choose a font color body of the modal.','easy-modal')?></p>
299
+ </td>
300
+ </tr>
301
+ </tbody>
302
+ </table>
303
+ </div>
304
+ <div class="submit">
305
+ <input type="hidden" name="safe_csrf_nonce_easy_modal" id="safe_csrf_nonce_easy_modal" value="<?php echo wp_create_nonce("safe_csrf_nonce_easy_modal"); ?>">
306
+ <input type="submit" value="<?php _e('Save Settings','easy-modal')?>" name="submit" class="button-primary">
307
+ </div>
308
+ </form>
309
+ </div>
310
+ </div>
311
+ </div>
312
+ <div class="empreview">
313
+ <div id="eModal-Preview">
314
+ <div class="example-modal-overlay" style="background-color:<?php echo $settings['overlayColor']?>;opacity:<?php echo intval($settings['overlayOpacity'])/100 ?>;"></div>
315
+ <h2>
316
+ <?php _e('eModal Theme Preview','easy-modal')?>
317
+ </h2>
318
+ <div class="example-modal" style="
319
+ background-color:<?php esc_attr_e($settings['containerBgColor'])?>;
320
+ padding:<?php esc_attr_e(intval($settings['containerPadding']))?>px;
321
+ border:<?php esc_attr_e($settings['containerBorderColor'] .' '. intval($settings['containerBorderWidth']).'px '.$settings['containerBorderStyle'])?>;
322
+ -webkit-border-radius:<?php esc_attr_e(intval($settings['containerBorderRadius']))?>px;
323
+ border-radius:<?php esc_attr_e(intval($settings['containerBorderRadius']))?>px;
324
+ color:<?php esc_attr_e($settings['contentFontColor'])?>;
325
+ ">
326
+ <div class="title" style="
327
+ color:<?php esc_attr_e($settings['contentTitleFontColor'])?>;
328
+ font-family:<?php esc_attr_e($settings['contentTitleFontFamily'])?>;
329
+ font-size:<?php esc_attr_e(intval($settings['contentTitleFontSize']))?>px;
330
+ ">Title Text</div>
331
+ <p>Suspendisse ipsum eros, tincidunt sed commodo ut, viverra vitae ipsum. Etiam non porta neque. Pellentesque nulla elit, aliquam in ullamcorper at, bibendum sed eros. Morbi non sapien tellus, ac vestibulum eros. In hac habitasse platea dictumst. Nulla vestibulum, diam vel porttitor placerat, eros tortor ultrices lectus, eget faucibus arcu justo eget massa. Maecenas id tellus vitae justo posuere hendrerit aliquet ut dolor.</p>
332
+ <a class="close-modal" style="
333
+ color:<?php esc_attr_e($settings['closeFontColor'])?>;
334
+ <?php if($settings['closeLocation'] == 'outside'){?>
335
+ font-size:<?php esc_attr_e(intval($settings['closeFontSize']))?>px;
336
+ width:<?php esc_attr_e(intval($settings['closeSize']))?>px;
337
+ height:<?php esc_attr_e(intval($settings['closeSize']))?>px;
338
+ line-height:<?php esc_attr_e(intval($settings['closeSize']))?>px;
339
+
340
+ background-color:<?php esc_attr_e($settings['closeBgColor'])?>;
341
+ -webkit-border-radius:<?php esc_attr_e(intval($settings['closeBorderRadius']))?>px;
342
+ border-radius:<?php esc_attr_e(intval($settings['closeBorderRadius']))?>px;
343
+ <?php
344
+ $size = intval(0-($settings['closeSize']/2)).'px';
345
+ $top = $left = $bottom = $right = 'auto';
346
+ switch($settings['closePosition'])
347
+ {
348
+ case 'topleft':
349
+ $top = $size;
350
+ $left = $size;
351
+ break;
352
+ case 'topright':
353
+ $top = $size;
354
+ $right = $size;
355
+ break;
356
+ case 'bottomleft':
357
+ $left = $size;
358
+ $bottom = $size;
359
+ break;
360
+ case 'bottomright':
361
+ $right = $size;
362
+ $bottom = $size;
363
+ break;
364
+ }
365
+ ?>
366
+ top: <?php esc_attr_e($top)?>;
367
+ bottom: <?php esc_attr_e($bottom)?>;
368
+ left: <?php esc_attr_e($left)?>;
369
+ right: <?php esc_attr_e($right)?>;
370
+ <?php }?>
371
+ ">&#215;</a>
372
+ </div>
373
+ </div>
374
+ </div>
375
+ </div>
readme.txt CHANGED
@@ -1,128 +1,118 @@
1
  === Easy Modal ===
2
  Contributors: danieliser
3
  Author URI: http://wizardinternetsolutions.com
4
- Plugin URI: http://wizardinternetsolutions.com/plugins/easy-modal
5
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=PQTG2JYUKSLFW
6
- Tags: modal,modal box,modal form,modal window,popup,popup box,popup form,popup window,ajax forms,contact form 7,gravity forms
7
- Requires at least: 3.0.1
8
- Tested up to: 3.5.2
9
- Stable tag: 1.1.9.9
10
-
11
- Easily create & style modals with any content. Theme editor to quickly style your modals. Add forms, social media boxes, videos & more.
12
 
13
  == Description ==
14
-
15
  This plugin allows you to easily add unlimited Modal windows with just about any content. It accepts shortcodes and has been tested to work with Contact Form 7 custom forms using ajax submission.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
- Basic theme for Contact Form 7 default form.
18
-
19
- For feature requests please visit our Easy Modal page at the link below
20
-
21
- [youtube http://www.youtube.com/watch?v=w9Us4ttVuZU]
22
 
23
  If you like the plugin please rate it.
24
 
25
- [Easy Modal Page](http://wizardinternetsolutions.com/plugins/easy-modal/ "Easy Modal Page - Info, Demo and Discussion") - Info, Demo and Feature Discussion
26
 
27
- [Wizard Internet Solutions](http://wizardinternetsolutions.com/ "Website Design & Development") - Developers Site
28
 
29
- To be notified of plugin updates, [follow us on Twitter](http://twitter.com/wizard_is "Wizard Internet Solutions on Twitter")!
30
 
31
  == Installation ==
32
-
33
  = Version 1.0.0 and above =
34
-
35
  1. Upload `Easy-Modal` folder to the `/wp-content/plugins/` directory
36
  2. Activate the plugin through the 'Plugins' menu in WordPress
37
  3. Create and customize a modal in the Easy Modal settings page.
38
  3. Copy and Add `eModal` and `eModal-#` class from the modals settings page to the object you want to make activate the modal window. Will work on divs, links, list elements and just about anything else.
39
-
40
-
41
  = Versions before 1.0.0 =
42
  [youtube http://www.youtube.com/watch?v=w9Us4ttVuZU]
43
-
44
  1. Upload `Easy-Modal` folder to the `/wp-content/plugins/` directory
45
  2. Activate the plugin through the 'Plugins' menu in WordPress
46
  3. Add `eModal` class to the object you want to make activate the modal window. Will work on divs, links, list elements and just about anything else.
47
-
48
  == Frequently Asked Questions ==
49
-
50
  = I have a problem! =
51
-
52
  If think youve found a problem please post a link with it so i can see the problem for myself.
53
-
54
  = Does this work with CF7 =
55
-
56
  Yes, this will work with any custom form shortcode and uses ajax submit features.
57
-
58
  = Is the form styled =
59
-
60
  We have only included some basic styling for the modal at this point. You can add styles to your themes styles.css or add them to the head via plugin.
61
-
62
  == Screenshots ==
63
-
64
  1. Easy Modal with default "Contact Fom 7" form.
65
  2. Shows CF7 Inline validation used during ajax submit
66
-
67
  == Changelog ==
68
-
 
 
 
 
69
  = 1.0.2 =
70
  * Fix for installation glitch.
71
-
72
  = 1.0.0 =
73
  * Release v1.0.0 Is a was rebuilt from the ground up. Features Include:
74
  * Unlimited Modals
75
  * Lighter Filesizes for Faster Loading
76
  * Auto Centers no matter what the content
77
  * Recenters on window resize/move
78
-
79
  = 0.9.0.11 =
80
  * Bug Fix in Settings page color picker.
81
-
82
  = 0.9.0.10 =
83
  * Bug Fix in CSS Fixes Form scrolling only when needed.
84
-
85
  = 0.9.0.9 =
86
  * Bug Fix in CSS Fixes Form scrolling.
87
-
88
  = 0.9.0.8 =
89
  * Bug Fix in JS (Missing " fixed)
90
-
91
  = 0.9.0.7 =
92
  * Bug Fix in JS (Affected loading of content into window)
93
-
94
  = 0.9.0.6 =
95
  * Bug Fix in JS (Affected WordPress versions below 3.1)
96
-
97
  = 0.9.0.5 =
98
  * Bug Fix in JS (Affected IE7).
99
-
100
  = 0.9.0.4 =
101
  * Added "Default" Theme for Modal windows. Includes CF7 Styles and Inline AJAX Styleing. See Screenshots.
102
  * Default Options Tweaked for better OOB Experience.
103
  * Added Version to WP Options table to provide better update functionality.
104
-
105
  = 0.9.0.3 =
106
  * Overlay Click to Close Option
107
  * Auto Position Option
108
  * Position Top Option
109
  * Position Left Option
110
  * Auto Resize Option
111
-
112
  = 0.9.0.2 =
113
  * Added Overlay Color Picker.
114
-
115
  = 0.9.0.1 =
116
  * Added Height & Width options.
117
-
118
  = 0.9 =
119
  * Initial Release
120
-
121
  == Upgrade Notice ==
122
-
123
  = 1.0.0 =
124
  * This is a new build your settings will be reset.
125
-
126
  = 0.9.0.4 =
127
  * Options will be overwritten with default options.
128
  = 0.9 =
1
  === Easy Modal ===
2
  Contributors: danieliser
3
  Author URI: http://wizardinternetsolutions.com
4
+ Plugin URI: https://easy-modal.com
5
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=PQTG2JYUKSLFW
6
+ Tags: modal,modal box,modal form,modal window,popup,popup box,popup form,popup window,ajax forms
7
+ Requires at least: 3.2
8
+ Tested up to: 3.6
9
+ Stable tag: 1.2
10
+ Easily create & style modals with any content. Theme editor to quickly style your modals. Add forms, social media boxes, videos, slideshows & more.
 
11
 
12
  == Description ==
 
13
  This plugin allows you to easily add unlimited Modal windows with just about any content. It accepts shortcodes and has been tested to work with Contact Form 7 custom forms using ajax submission.
14
+
15
+ = Core Features =
16
+ * Unlimited Customizable Modals
17
+ * Visual Theme Editor
18
+ * Responsive or Custom Width Modals
19
+ * 19 Customizable Animations
20
+ * Customize close options per modal.
21
+ * Open a modal from within another modal
22
+ * Load modals on every page or just certain pages.
23
+ * Quickly add modals to any highlighted text in editor.
24
+ * Allows custom JS functions to open & close modals.
25
+
26
+ = Pro Features =
27
+ * Premium Support*
28
+ * Unlimited Themes
29
+ * Ajax Login, Registration & Forgot Your Password Modals
30
+ * Force User Login Modal ( Per Page / Post or Site Wide )
31
+ * Set Modal to Auto Open ( Per Page / Post and/or Site Wide )
32
+ * Set Modal to Open on Exit ( Per Page / Post and/or Site Wide )
33
+ * Export / Import Settings, Modals & Themes
34
+ = Premium Support =
35
+ * Premium User Support Forum
36
+ * Expedited Feature Requests
37
+ * Setup Assistance
38
 
 
 
 
 
 
39
 
40
  If you like the plugin please rate it.
41
 
42
+ [Easy Modal Page](https://easy-modal.com "Easy Modal Page - Info, Demo and Discussion") - Info, Demo and Feature Discussion
43
 
44
+ [Wizard Internet Solutions](http://wizardinternetsolutions.com "Website Design & Development") - Developers Site
45
 
46
+ To be notified of plugin updates, [follow us on Twitter](http://twitter.com/EasyModal "Wizard Internet Solutions on Twitter")!
47
 
48
  == Installation ==
 
49
  = Version 1.0.0 and above =
 
50
  1. Upload `Easy-Modal` folder to the `/wp-content/plugins/` directory
51
  2. Activate the plugin through the 'Plugins' menu in WordPress
52
  3. Create and customize a modal in the Easy Modal settings page.
53
  3. Copy and Add `eModal` and `eModal-#` class from the modals settings page to the object you want to make activate the modal window. Will work on divs, links, list elements and just about anything else.
 
 
54
  = Versions before 1.0.0 =
55
  [youtube http://www.youtube.com/watch?v=w9Us4ttVuZU]
 
56
  1. Upload `Easy-Modal` folder to the `/wp-content/plugins/` directory
57
  2. Activate the plugin through the 'Plugins' menu in WordPress
58
  3. Add `eModal` class to the object you want to make activate the modal window. Will work on divs, links, list elements and just about anything else.
 
59
  == Frequently Asked Questions ==
 
60
  = I have a problem! =
 
61
  If think youve found a problem please post a link with it so i can see the problem for myself.
 
62
  = Does this work with CF7 =
 
63
  Yes, this will work with any custom form shortcode and uses ajax submit features.
 
64
  = Is the form styled =
 
65
  We have only included some basic styling for the modal at this point. You can add styles to your themes styles.css or add them to the head via plugin.
 
66
  == Screenshots ==
 
67
  1. Easy Modal with default "Contact Fom 7" form.
68
  2. Shows CF7 Inline validation used during ajax submit
 
69
  == Changelog ==
70
+ = 1.2 =
71
+ * Code has been rewritten from ground up, JS, admin panels etc.
72
+ * Added animations
73
+ * Added responsive modals
74
+ * Added several additional settings.
75
  = 1.0.2 =
76
  * Fix for installation glitch.
 
77
  = 1.0.0 =
78
  * Release v1.0.0 Is a was rebuilt from the ground up. Features Include:
79
  * Unlimited Modals
80
  * Lighter Filesizes for Faster Loading
81
  * Auto Centers no matter what the content
82
  * Recenters on window resize/move
 
83
  = 0.9.0.11 =
84
  * Bug Fix in Settings page color picker.
 
85
  = 0.9.0.10 =
86
  * Bug Fix in CSS Fixes Form scrolling only when needed.
 
87
  = 0.9.0.9 =
88
  * Bug Fix in CSS Fixes Form scrolling.
 
89
  = 0.9.0.8 =
90
  * Bug Fix in JS (Missing " fixed)
 
91
  = 0.9.0.7 =
92
  * Bug Fix in JS (Affected loading of content into window)
 
93
  = 0.9.0.6 =
94
  * Bug Fix in JS (Affected WordPress versions below 3.1)
 
95
  = 0.9.0.5 =
96
  * Bug Fix in JS (Affected IE7).
 
97
  = 0.9.0.4 =
98
  * Added "Default" Theme for Modal windows. Includes CF7 Styles and Inline AJAX Styleing. See Screenshots.
99
  * Default Options Tweaked for better OOB Experience.
100
  * Added Version to WP Options table to provide better update functionality.
 
101
  = 0.9.0.3 =
102
  * Overlay Click to Close Option
103
  * Auto Position Option
104
  * Position Top Option
105
  * Position Left Option
106
  * Auto Resize Option
 
107
  = 0.9.0.2 =
108
  * Added Overlay Color Picker.
 
109
  = 0.9.0.1 =
110
  * Added Height & Width options.
 
111
  = 0.9 =
112
  * Initial Release
 
113
  == Upgrade Notice ==
 
114
  = 1.0.0 =
115
  * This is a new build your settings will be reset.
 
116
  = 0.9.0.4 =
117
  * Options will be overwritten with default options.
118
  = 0.9 =