MailPoet Newsletters (Previous) - Version 2.14

Version Description

  • 2020-07-22 =
  • Fixed PHPMail 6.x support for WordPress 5.5.
Download this release

Release Info

Developer wysija
Plugin Icon 128x128 MailPoet Newsletters (Previous)
Version 2.14
Comparing to
See all releases

Code changes from version 2.13 to 2.14

Files changed (117) hide show
  1. core/base.php +1 -1
  2. css/admin-campaigns.css +1 -1
  3. css/admin-global.css +1 -1
  4. css/admin-premium.css +1 -1
  5. css/wysija-editor.css +1 -1
  6. css/wysija-form-editor.css +1 -1
  7. helpers/mailer.php +13 -2
  8. inc/mailer/class.mysmtp.php +11 -1
  9. index.php +1 -1
  10. js/admin-ajax-proto.js +1 -1
  11. js/admin-ajax.js +1 -1
  12. js/admin-campaigns-articles.js +1 -1
  13. js/admin-campaigns-autopost.js +1 -1
  14. js/admin-campaigns-bookmarks.js +1 -1
  15. js/admin-campaigns-default.js +1 -1
  16. js/admin-campaigns-dividers.js +1 -1
  17. js/admin-campaigns-editAutonl.js +1 -1
  18. js/admin-campaigns-editDetails.js +1 -1
  19. js/admin-campaigns-editTemplate.js +1 -1
  20. js/admin-campaigns-image_data.js +1 -1
  21. js/admin-campaigns-medias.js +1 -1
  22. js/admin-campaigns-themes.js +1 -1
  23. js/admin-campaigns-welcome_new.js +1 -1
  24. js/admin-config-form_widget_settings.js +1 -1
  25. js/admin-config-settings.js +1 -1
  26. js/admin-global.js +1 -1
  27. js/admin-listing.js +1 -1
  28. js/admin-statistics-filter.js +1 -1
  29. js/admin-statistics.js +1 -1
  30. js/admin-subscribers-importmatch.js +1 -1
  31. js/admin-tmce.js +1 -1
  32. js/admin-wysija-global.js +1 -1
  33. js/admin-wysija.js +1 -1
  34. js/admin.js +1 -1
  35. js/analytics.js +1 -1
  36. js/base-script-64.js +1 -1
  37. js/forms.js +1 -1
  38. js/front-subscribers.js +1 -1
  39. js/konami.js +1 -1
  40. js/timer.js +1 -1
  41. js/wysija-charts.js +1 -1
  42. js/wysija-editor.js +3 -3
  43. js/wysija-form-editor.js +1 -1
  44. js/wysija-lazyload.js +1 -1
  45. languages/wysija-newsletters-af.mo +0 -0
  46. languages/wysija-newsletters-ar.mo +0 -0
  47. languages/wysija-newsletters-az.mo +0 -0
  48. languages/wysija-newsletters-be.mo +0 -0
  49. languages/wysija-newsletters-bg_BG.mo +0 -0
  50. languages/wysija-newsletters-bn_BD.mo +0 -0
  51. languages/wysija-newsletters-br.mo +0 -0
  52. languages/wysija-newsletters-bs_BA.mo +0 -0
  53. languages/wysija-newsletters-ca.mo +0 -0
  54. languages/wysija-newsletters-ca@valencia.mo +0 -0
  55. languages/wysija-newsletters-ca_ES.mo +0 -0
  56. languages/wysija-newsletters-cs_CZ.mo +0 -0
  57. languages/wysija-newsletters-da_DK.mo +0 -0
  58. languages/wysija-newsletters-de.mo +0 -0
  59. languages/wysija-newsletters-de_CH.mo +0 -0
  60. languages/wysija-newsletters-de_DE.mo +0 -0
  61. languages/wysija-newsletters-el.mo +0 -0
  62. languages/wysija-newsletters-en_AU.mo +0 -0
  63. languages/wysija-newsletters-en_GB.mo +0 -0
  64. languages/wysija-newsletters-es_419.mo +0 -0
  65. languages/wysija-newsletters-es_AR.mo +0 -0
  66. languages/wysija-newsletters-es_CO.mo +0 -0
  67. languages/wysija-newsletters-es_ES.mo +0 -0
  68. languages/wysija-newsletters-es_MX.mo +0 -0
  69. languages/wysija-newsletters-et.mo +0 -0
  70. languages/wysija-newsletters-eu.mo +0 -0
  71. languages/wysija-newsletters-fa.mo +0 -0
  72. languages/wysija-newsletters-fa_IR.mo +0 -0
  73. languages/wysija-newsletters-fi.mo +0 -0
  74. languages/wysija-newsletters-fr_BE.mo +0 -0
  75. languages/wysija-newsletters-fr_CA.mo +0 -0
  76. languages/wysija-newsletters-fr_FR.mo +0 -0
  77. languages/wysija-newsletters-gl_ES.mo +0 -0
  78. languages/wysija-newsletters-he_IL.mo +0 -0
  79. languages/wysija-newsletters-hi_IN.mo +0 -0
  80. languages/wysija-newsletters-hr_HR.mo +0 -0
  81. languages/wysija-newsletters-hu_HU.mo +0 -0
  82. languages/wysija-newsletters-hy_AM.mo +0 -0
  83. languages/wysija-newsletters-id.mo +0 -0
  84. languages/wysija-newsletters-id_ID.mo +0 -0
  85. languages/wysija-newsletters-is_IS.mo +0 -0
  86. languages/wysija-newsletters-it_IT.mo +0 -0
  87. languages/wysija-newsletters-ja.mo +0 -0
  88. languages/wysija-newsletters-ka.mo +0 -0
  89. languages/wysija-newsletters-ko_KR.mo +0 -0
  90. languages/wysija-newsletters-lt_LT.mo +0 -0
  91. languages/wysija-newsletters-lv.mo +0 -0
  92. languages/wysija-newsletters-mk_MK.mo +0 -0
  93. languages/wysija-newsletters-ml_IN.mo +0 -0
  94. languages/wysija-newsletters-mn.mo +0 -0
  95. languages/wysija-newsletters-nb_NO.mo +0 -0
  96. languages/wysija-newsletters-nl_NL.mo +0 -0
  97. languages/wysija-newsletters-nn_NO.mo +0 -0
  98. languages/wysija-newsletters-oc.mo +0 -0
  99. languages/wysija-newsletters-pl_PL.mo +0 -0
  100. languages/wysija-newsletters-pt_BR.mo +0 -0
  101. languages/wysija-newsletters-pt_PT.mo +0 -0
  102. languages/wysija-newsletters-ro_RO.mo +0 -0
  103. languages/wysija-newsletters-ru_RU.mo +0 -0
  104. languages/wysija-newsletters-sk_SK.mo +0 -0
  105. languages/wysija-newsletters-sl_SI.mo +0 -0
  106. languages/wysija-newsletters-sq.mo +0 -0
  107. languages/wysija-newsletters-sr_RS.mo +0 -0
  108. languages/wysija-newsletters-sr_RS@latin.mo +0 -0
  109. languages/wysija-newsletters-sv_SE.mo +0 -0
  110. languages/wysija-newsletters-th.mo +0 -0
  111. languages/wysija-newsletters-tr_TR.mo +0 -0
  112. languages/wysija-newsletters-uk.mo +0 -0
  113. languages/wysija-newsletters-ur_PK.mo +0 -0
  114. languages/wysija-newsletters-vi.mo +0 -0
  115. languages/wysija-newsletters-zh_CN.mo +0 -0
  116. languages/wysija-newsletters-zh_TW.mo +0 -0
  117. readme.txt +5 -2
core/base.php CHANGED
@@ -19,7 +19,7 @@ class WYSIJA_object{
19
  * Static variable holding core MailPoet's version
20
  * @var array
21
  */
22
- static $version = '2.13';
23
 
24
  function __construct(){}
25
 
19
  * Static variable holding core MailPoet's version
20
  * @var array
21
  */
22
+ static $version = '2.14';
23
 
24
  function __construct(){}
25
 
css/admin-campaigns.css CHANGED
@@ -1 +1 @@
1
- #wysija-app{padding-top:10px}.icon32{margin-top:0px !important}#posts-filter{clear:both}#wysija-app h2{display:inline}#icon-edit-news{background:url(../img/mail-big.png) no-repeat scroll 0 5px transparent}#TB_window{display:block}.moredetails{display:none}.sending,.scheduled{background-color:#d5f0e6}.autonl.sending{background-color:#D7E6F2}#wysija-campaign .listmissing{background-color:#EFD5D5}#preview-receiver{width:230px;vertical-align:middle;margin:0 5px 0 0}.ml-submit{margin:15px 15px 0 15px}.automatic-nl{display:none}#titlediv .titlebox{font-size:1.7em;background-color:#FFFFFF;border-color:#CCCCCC;line-height:100%;outline:medium none;padding:3px 8px;width:100%}label .description{cursor:auto}.about-wrap .feature-section.three-col>div{float:left;width:28%;padding-right:30px;padding-left:0}#socials-block div{float:none;margin:5px 5px 2px 0;width:100%}.progress_bar{padding-bottom:10px}.progress_bar .bar{display:block;width:100%;height:22px;float:left;margin-right:10px;background:#eef6fc;border:1px solid #bbbbbb;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;line-height:22px;position:relative}.progress_bar .progress{display:block;background:#69b1e9;height:100%}.progress_bar .percent{height:100%;position:absolute;top:0px;left:10px}#wysija-badge{position:absolute;top:0;right:0;color:#fff;text-shadow:0 1px 0 rgba(0,0,0,0.3);padding-top:91px;height:50px;width:173px;font-weight:bold;font-size:14px;text-align:center;margin:0 -5px;background:url("http://s-plugins.wordpress.org/wysija-newsletters/assets/wysija-badge.png") no-repeat}#review-follow{position:relative;height:177px}#review-follow div{float:left;top:0}#review-follow .review-left{background:url("http://s-plugins.wordpress.org/wysija-newsletters/assets/update_page/save-the-kitten.jpg") no-repeat;height:175px;background-color:#f8f8f8;border-top:1px solid #efefef;border-bottom:1px solid #efefef;padding-right:10px}#review-follow h4{margin:0 !important}#review-follow .review-left.small{width:450px}#review-follow .review-left.medium{width:490px}#review-follow .review-left.large{width:540px}#review-follow .small .description{margin-top:24px}#review-follow .medium .description{margin-top:20px}#review-follow .large .description{margin-top:18px}#review-follow .review-left p{margin-left:20px}#review-follow .review-right{background:url("http://s-plugins.wordpress.org/wysija-newsletters/assets/update_page/arrow_middle.jpg") no-repeat scroll -30px 0 #f8f8f8;border-bottom:1px solid #EFEFEF;border-top:1px solid #EFEFEF;height:175px;width:24px}#review-follow #mailpoet-subscribe{margin-left:0px;margin-top:10px}#review-follow .subscribe-middle{width:220px;height:175px;background-color:#f8f8f8;border-top:1px solid #efefef;border-bottom:1px solid #efefef}#review-follow .socials{margin-left:30px}#review-follow .follow-left{width:220px;height:175px;background-color:#f8f8f8;border-top:1px solid #efefef;border-bottom:1px solid #efefef}#review-follow .follow-right{background:url("http://s-plugins.wordpress.org/wysija-newsletters/assets/update_page/arrow_right.jpg") no-repeat;width:100px;height:175px}#review-follow .follow-right38{background:url("http://s-plugins.wordpress.org/wysija-newsletters/assets/update_page/arrow-right-38.jpg") no-repeat;width:100px;height:175px}#review-follow .review-left .description{margin-left:146px}#review-follow .link-cat-review{height:140px;left:20px;position:absolute;top:21px;width:120px;outline:medium none}a.ctaupdate,span.ctaupdate{font-size:12px}.pds-links,.pds-totalvotes-outer{display:none !important}#polldaddy_embed_0{width:680px;margin-left:-30px}span.local_time{margin-left:10px}#hook_newsletter_top .hook-column{width:50%}.card-title{font-weight:bold}.report-card{padding-top:10px}.googletrackingcode .action_buttons{padding-left:44px;padding-top:5px}.googletrackingcode span{font-weight:bold}.mpoet-page h1{font-size:34px}.mpoet-page h1,.mpoet-page h2,.mpoet-page h3,.mpoet-page h4{color:#626262;font-weight:bold}.mpoet-page h1 span.version{color:#5e869b}.mpoet-update-subscribe p{font-size:12px}.mpoet-update-subscribe li{font-size:12px;line-height:10px}.mpoet-update-subscribe-left,.mpoet-update-subscribe-right{float:left}.mpoet-update-subscribe-left{margin-right:50px}.about-wrap .feature-section .mpoet-update-subscribe-left p{margin-top:0;margin-bottom:5px}.about-wrap .feature-section .mpoet-update-subscribe-left ul{margin-top:5px;margin-bottom:5px}#update-page{margin-top:0px}.mp_php_alert{margin:5px 0 15px;background-color:#fff;border-left:4px solid #7ad03a;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);padding:1px 12px;outline:0 none}.feature-section ul{list-style:disc inside none}#update-page .about-text{margin-bottom:1em;margin-top:0;min-height:20px}.mpoet-update-subscribe-left .button-primary{font-size:18px;height:32px}#update-loading-icon{background:url("../img/wpspin_light.gif") no-repeat scroll 0 0 transparent;height:20px;margin-left:26%;margin-top:6px;width:20px;display:none}
1
+ #wysija-app{padding-top:10px}.icon32{margin-top:0px !important}#posts-filter{clear:both}#wysija-app h2{display:inline}#icon-edit-news{background:url(../img/mail-big.png) no-repeat scroll 0 5px transparent}#TB_window{display:block}.moredetails{display:none}.sending,.scheduled{background-color:#d5f0e6}.autonl.sending{background-color:#D7E6F2}#wysija-campaign .listmissing{background-color:#EFD5D5}#preview-receiver{width:230px;vertical-align:middle;margin:0 5px 0 0}.ml-submit{margin:15px 15px 0 15px}.automatic-nl{display:none}#titlediv .titlebox{font-size:1.7em;background-color:#FFFFFF;border-color:#CCCCCC;line-height:100%;outline:medium none;padding:3px 8px;width:100%}label .description{cursor:auto}.about-wrap .feature-section.three-col>div{float:left;width:28%;padding-right:30px;padding-left:0}#socials-block div{float:none;margin:5px 5px 2px 0;width:100%}.progress_bar{padding-bottom:10px}.progress_bar .bar{display:block;width:100%;height:22px;float:left;margin-right:10px;background:#eef6fc;border:1px solid #bbbbbb;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;line-height:22px;position:relative}.progress_bar .progress{display:block;background:#69b1e9;height:100%}.progress_bar .percent{height:100%;position:absolute;top:0px;left:10px}#wysija-badge{position:absolute;top:0;right:0;color:#fff;text-shadow:0 1px 0 rgba(0,0,0,0.3);padding-top:91px;height:50px;width:173px;font-weight:bold;font-size:14px;text-align:center;margin:0 -5px;background:url("http://s-plugins.wordpress.org/wysija-newsletters/assets/wysija-badge.png") no-repeat}#review-follow{position:relative;height:177px}#review-follow div{float:left;top:0}#review-follow .review-left{background:url("http://s-plugins.wordpress.org/wysija-newsletters/assets/update_page/save-the-kitten.jpg") no-repeat;height:175px;background-color:#f8f8f8;border-top:1px solid #efefef;border-bottom:1px solid #efefef;padding-right:10px}#review-follow h4{margin:0 !important}#review-follow .review-left.small{width:450px}#review-follow .review-left.medium{width:490px}#review-follow .review-left.large{width:540px}#review-follow .small .description{margin-top:24px}#review-follow .medium .description{margin-top:20px}#review-follow .large .description{margin-top:18px}#review-follow .review-left p{margin-left:20px}#review-follow .review-right{background:url("http://s-plugins.wordpress.org/wysija-newsletters/assets/update_page/arrow_middle.jpg") no-repeat scroll -30px 0 #F8F8F8;border-bottom:1px solid #EFEFEF;border-top:1px solid #EFEFEF;height:175px;width:24px}#review-follow #mailpoet-subscribe{margin-left:0px;margin-top:10px}#review-follow .subscribe-middle{width:220px;height:175px;background-color:#f8f8f8;border-top:1px solid #efefef;border-bottom:1px solid #efefef}#review-follow .socials{margin-left:30px}#review-follow .follow-left{width:220px;height:175px;background-color:#f8f8f8;border-top:1px solid #efefef;border-bottom:1px solid #efefef}#review-follow .follow-right{background:url("http://s-plugins.wordpress.org/wysija-newsletters/assets/update_page/arrow_right.jpg") no-repeat;width:100px;height:175px}#review-follow .follow-right38{background:url("http://s-plugins.wordpress.org/wysija-newsletters/assets/update_page/arrow-right-38.jpg") no-repeat;width:100px;height:175px}#review-follow .review-left .description{margin-left:146px}#review-follow .link-cat-review{height:140px;left:20px;position:absolute;top:21px;width:120px;outline:medium none}a.ctaupdate,span.ctaupdate{font-size:12px}.pds-links,.pds-totalvotes-outer{display:none !important}#polldaddy_embed_0{width:680px;margin-left:-30px}span.local_time{margin-left:10px}#hook_newsletter_top .hook-column{width:50%}.card-title{font-weight:bold}.report-card{padding-top:10px}.googletrackingcode .action_buttons{padding-left:44px;padding-top:5px}.googletrackingcode span{font-weight:bold}.mpoet-page h1{font-size:34px}.mpoet-page h1,.mpoet-page h2,.mpoet-page h3,.mpoet-page h4{color:#626262;font-weight:bold}.mpoet-page h1 span.version{color:#5e869b}.mpoet-update-subscribe p{font-size:12px}.mpoet-update-subscribe li{font-size:12px;line-height:10px}.mpoet-update-subscribe-left,.mpoet-update-subscribe-right{float:left}.mpoet-update-subscribe-left{margin-right:50px}.about-wrap .feature-section .mpoet-update-subscribe-left p{margin-top:0;margin-bottom:5px}.about-wrap .feature-section .mpoet-update-subscribe-left ul{margin-top:5px;margin-bottom:5px}#update-page{margin-top:0px}.mp_php_alert{margin:5px 0 15px;background-color:#fff;border-left:4px solid #7ad03a;box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);padding:1px 12px;outline:0 none}.feature-section ul{list-style:disc inside none}#update-page .about-text{margin-bottom:1em;margin-top:0;min-height:20px}.mpoet-update-subscribe-left .button-primary{font-size:18px;height:32px}#update-loading-icon{background:url("../img/wpspin_light.gif") no-repeat scroll 0 0 transparent;height:20px;margin-left:26%;margin-top:6px;width:20px;display:none}
css/admin-global.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";.clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}.clearfix{display:inline-table}* html .clearfix{height:1%}.clearfix{display:block}.hide{display:none}.wysija-version{margin:0 20px 0 165px;padding-bottom:45px}.wysija-footer h2{color:#21759B;cursor:pointer}.wysija-footer h2:hover{text-decoration:underline}.wysija-version{font-size:12px;color:#777777}.wysija-version .social-foot div{float:left;margin-right:10px}.wysija-version .version{float:left}.wysija-version .help{float:left;margin-left:20px}.wysija-version .social-foot .textsocial{margin-left:8px;margin-top:3px;padding-top:0}.wysija-version .social-foot{clear:both;display:inline-block}.wysija-version .version{float:left;margin-bottom:5px}#upperfoot{display:block;float:none}#submitexport label input[type="checkbox"]{margin-left:0px !important}.clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}.clearfix{display:inline-table}* html .clearfix{height:1%}.clearfix{display:block}.wysija-footer,.wysija-version{margin:0 20px 0 165px;padding-bottom:45px}.wysija-footer h2{color:#21759B;cursor:pointer}.wysija-footer h2:hover{text-decoration:underline}.wysija-version{font-size:12px;color:#777777;height:65px;border-top:1px solid #DFDFDF}.wysija-version .social-foot div{float:left;margin-right:10px}.social-foot .fb{width:80px}.wysija-version .version{float:left}.wysija-version .help{float:left;margin-left:20px}.wysija-version .social-foot .textsocial{margin-left:8px;margin-top:3px;padding-top:0}.wysija-version .social-foot{clear:both;display:inline-block;float:left;margin-top:2px;padding:6px 13px}.wysija-version .social-foot .socials div{margin-left:20px}.wysija-version .social-foot .socials{margin-left:0px}.wysija-version .social-foot .socials .fb,.wysija-version .social-foot .socials .fb div{margin-left:0px}.wysija-version .version{float:left;margin-bottom:5px}.wysija-version .socials{padding-top:9px}#hidesocials{margin-top:2px;font-size:12px}.social-foot .gplus{width:70px}#upperfoot{display:block;float:none}#wysija-app .form-table td{vertical-align:top}#submitexport label input[type="checkbox"]{margin-left:0px !important}#wysija-app div.warning{margin:5px 0 15px;background-color:#FFFFE0;border-color:#E6DB55;border-radius:3px 3px 3px 3px;border-style:solid;border-width:1px;padding:10px}.submit-box{border-top:1px solid #dbdbdb;background-color:#FFFFFF;bottom:0;height:50px;left:0;margin:0;padding:0;position:fixed;text-align:right;width:100%}#loading-icon{width:20px;height:20px;position:absolute;left:16px;top:16px}.loading #loading-icon{background:url(../img/wpspin_light.gif) no-repeat 0 0 #fff}.counting #loading-icon{background:url(../img/controls/icons.png) no-repeat -140px -20px #fff}.submit-box #loading-message{font-family:"Trebuchet MS";font-size:14px;left:39px;position:absolute;top:17px}.submit-box #insert-selection,.submit-box #back-selection{margin:10px 10px 0 0}.submit-box #back-selection{display:none}#icon-stats{background:url("../img/stats-icon.png") no-repeat scroll 0 0 transparent}.mpoet-wrap{position:relative;margin:25px 40px 0 20px;max-width:1050px;font-size:15px}.mpoet-wrap.full-width-layout{max-width:1200px}.mpoet-wrap hr{border:0;height:0;margin:0;border-top:1px solid rgba(0,0,0,0.1)}.mpoet-wrap img{margin:0;max-width:100%;height:auto;vertical-align:middle}.mpoet-wrap p{font-size:14px}.mpoet-wrap .changelog h2{font-size:1.4em;font-weight:600;text-align:left}.mpoet-wrap .changelog h3{margin:1.33em 0;font-size:1em;line-height:inherit;color:#23282d}.mpoet-wrap .feature-section p{max-width:55em;margin-left:auto;margin-right:auto}.mpoet-wrap .feature-section.one-col{margin:0 auto;max-width:700px}.mpoet-wrap .feature-section.two-col h3{margin-top:0}.mpoet-wrap .feature-section h4{margin:1.4em 0 0.6em 0;font-size:1em}.mpoet-wrap .feature-section p{margin-top:0.6em}.mpoet-wrap .feature-section{overflow:hidden;padding:0 0 40px}.mpoet-wrap .feature-section.no-heading{padding-top:35px}.mpoet-wrap .feature-section .media-container{overflow:hidden}.mpoet-wrap .feature-section img{margin-bottom:1em}.mpoet-wrap .feature-section .col{margin-top:40px}.mpoet-wrap .changelog{margin-bottom:40px}.mpoet-wrap .changelog.feature-section .col{margin-top:40px}.mpoet-wrap h2{margin:40px 0 .6em;font-size:2.0em;line-height:1.3;font-weight:300;text-align:center}.mpoet-wrap h3{margin:1.25em 0 .6em;font-size:1.4em;line-height:1.5}.mpoet-wrap .lead-description{font-size:1.5em;text-align:center}.mpoet-wrap .center{margin-left:auto;margin-right:auto;text-align:center}.mpoet-wrap .three-col .col{-webkit-align-self:flex-start;align-self:flex-start;min-width:31%;max-width:31%}.mpoet-wrap .floating-header-section{display:-ms-grid;display:grid;grid-gap:0 60px;-ms-grid-columns:5fr 11fr;grid-template-columns:5fr 11fr;max-width:1020px;margin:0 auto 120px}.mpoet-wrap .floating-header-section .section-header{-ms-grid-column:1;grid-column:1;position:relative;min-width:230px;max-width:300px}.mpoet-wrap .floating-header-section h2{margin:0 0 1em 0;text-align:left}.mpoet-wrap .floating-header-section h3{margin:0 0 1em 0}.mpoet-wrap .floating-header-section .section-content{-ms-grid-column:2;grid-column:2;display:-webkit-box;display:flex;-webkit-box-pack:justify;justify-content:space-between;-webkit-box-align:start;align-items:flex-start;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-flow:row wrap;-webkit-box-flex:2;flex-grow:2;flex-shrink:0}.mpoet-wrap .feature-video{position:relative;margin:0 auto;padding-bottom:35%;height:0;text-align:center}.mpoet-wrap .feature-section b{font-weight:800}.mpoet-wrap .floating-header-section .section-item{-webkit-box-flex:1;flex-grow:1;max-width:calc(50% - 30px)}.mpoet-wrap .floating-header-section .section-item:nth-child(1),.mpoet-wrap .floating-header-section .section-item:nth-child(2){margin-bottom:60px}.mpoet-wrap .floating-header-section .section-item:nth-child(1):nth-last-child(2),.mpoet-wrap .floating-header-section .section-item:nth-child(2):nth-last-child(1){margin-bottom:0}.mpoet-wrap .floating-header-section.has-long-title{display:block}.mpoet-wrap .floating-header-section.has-long-title .section-header{max-width:100%}.mpoet-wrap .floating-header-section.has-long-title h2{position:static;margin-bottom:60px}.mpoet-wrap .floating-header-section.has-long-title .section-content{-webkit-box-pack:start;justify-content:flex-start}.mpoet-wrap .floating-header-section.has-long-title .section-item{max-width:300px;margin-bottom:0}.mpoet-wrap .floating-header-section.has-long-title .section-item+.section-item{margin-left:60px}@media screen and (max-width: 1250px){.mpoet-wrap .floating-header-section.has-long-title .section-item:nth-child(1),.mpoet-wrap .floating-header-section.has-long-title .section-item:nth-child(2){margin:0 0 60px}.mpoet-wrap .floating-header-section.has-long-title .section-item:nth-child(3),.mpoet-wrap .floating-header-section.has-long-title .section-item:nth-child(4){margin:0}.mpoet-wrap .floating-header-section.has-long-title .section-item:nth-child(2),.mpoet-wrap .floating-header-section.has-long-title .section-item:nth-child(4){margin-left:60px}}.black-tick:before{content:'✔';margin-right:5px}.red-cross:before{content:'❌';font-size:10px;margin-right:5px}@media screen and (max-width: 782px){.mpoet-wrap .two-col-text{-webkit-column-count:1;column-count:1}.mpoet-wrap .two-col .col,.mpoet-wrap .three-col .col{min-width:48% !important}.mpoet-wrap .three-col img{display:block;margin:0 auto}.mpoet-wrap .floating-header-section{display:block}.mpoet-wrap .floating-header-section .section-header,.mpoet-wrap .floating-header-section .section-content{max-width:100%}.mpoet-wrap .floating-header-section h2{position:static;margin-bottom:60px}}@media only screen and (max-width: 500px){.mpoet-wrap{margin-right:20px;margin-left:10px}.mpoet-wrap h1,.mpoet-wrap .about-text{margin-right:0}.mpoet-wrap .about-text{margin-bottom:0.25em}.mpoet-wrap .wp-badge{position:relative;margin-bottom:1.5em;width:100%}.mpoet-wrap .two-col .col,.mpoet-wrap .three-col .col{min-width:100% !important}.mpoet-wrap .under-the-hood.three-col .col,.mpoet-wrap .under-the-hood.two-col .col,.mpoet-wrap .under-the-hood.one-col .col{margin-bottom:2em;padding-bottom:0}.mpoet-wrap .under-the-hood:nth-of-type(2n),.mpoet-wrap .under-the-hood:nth-of-type(3n){margin-top:0}.mpoet-wrap .under-the-hood:nth-of-type(2n) h3,.mpoet-wrap .under-the-hood:nth-of-type(3n) h3{margin-top:0}.mpoet-wrap .floating-header-section{margin-bottom:60px;grid-gap:30px 0}.mpoet-wrap .inline-svg.full-width{margin-bottom:60px}.mpoet-wrap .floating-header-section h2{word-break:break-all;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}.mpoet-wrap .floating-header-section .section-content .section-item{max-width:100%;margin:0 0 60px}}
1
+ .clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}.clearfix{display:inline-table}* html .clearfix{height:1%}.clearfix{display:block}.hide{display:none}.wysija-version{margin:0 20px 0 165px;padding-bottom:45px}.wysija-footer h2{color:#21759B;cursor:pointer}.wysija-footer h2:hover{text-decoration:underline}.wysija-version{font-size:12px;color:#777777}.wysija-version .social-foot div{float:left;margin-right:10px}.wysija-version .version{float:left}.wysija-version .help{float:left;margin-left:20px}.wysija-version .social-foot .textsocial{margin-left:8px;margin-top:3px;padding-top:0}.wysija-version .social-foot{clear:both;display:inline-block}.wysija-version .version{float:left;margin-bottom:5px}#upperfoot{display:block;float:none}#submitexport label input[type="checkbox"]{margin-left:0px !important}.clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}.clearfix{display:inline-table}* html .clearfix{height:1%}.clearfix{display:block}.wysija-footer,.wysija-version{margin:0 20px 0 165px;padding-bottom:45px}.wysija-footer h2{color:#21759B;cursor:pointer}.wysija-footer h2:hover{text-decoration:underline}.wysija-version{font-size:12px;color:#777777;height:65px;border-top:1px solid #DFDFDF}.wysija-version .social-foot div{float:left;margin-right:10px}.social-foot .fb{width:80px}.wysija-version .version{float:left}.wysija-version .help{float:left;margin-left:20px}.wysija-version .social-foot .textsocial{margin-left:8px;margin-top:3px;padding-top:0}.wysija-version .social-foot{clear:both;display:inline-block;float:left;margin-top:2px;padding:6px 13px}.wysija-version .social-foot .socials div{margin-left:20px}.wysija-version .social-foot .socials{margin-left:0px}.wysija-version .social-foot .socials .fb,.wysija-version .social-foot .socials .fb div{margin-left:0px}.wysija-version .version{float:left;margin-bottom:5px}.wysija-version .socials{padding-top:9px}#hidesocials{margin-top:2px;font-size:12px}.social-foot .gplus{width:70px}#upperfoot{display:block;float:none}#wysija-app .form-table td{vertical-align:top}#submitexport label input[type="checkbox"]{margin-left:0px !important}#wysija-app div.warning{margin:5px 0 15px;background-color:#FFFFE0;border-color:#E6DB55;border-radius:3px 3px 3px 3px;border-style:solid;border-width:1px;padding:10px}.submit-box{border-top:1px solid #dbdbdb;background-color:#FFFFFF;bottom:0;height:50px;left:0;margin:0;padding:0;position:fixed;text-align:right;width:100%}#loading-icon{width:20px;height:20px;position:absolute;left:16px;top:16px}.loading #loading-icon{background:url(../img/wpspin_light.gif) no-repeat 0 0 #fff}.counting #loading-icon{background:url(../img/controls/icons.png) no-repeat -140px -20px #fff}.submit-box #loading-message{font-family:"Trebuchet MS";font-size:14px;left:39px;position:absolute;top:17px}.submit-box #insert-selection,.submit-box #back-selection{margin:10px 10px 0 0}.submit-box #back-selection{display:none}#icon-stats{background:url("../img/stats-icon.png") no-repeat scroll 0 0 transparent}.mpoet-wrap{position:relative;margin:25px 40px 0 20px;max-width:1050px;font-size:15px}.mpoet-wrap.full-width-layout{max-width:1200px}.mpoet-wrap hr{border:0;height:0;margin:0;border-top:1px solid rgba(0,0,0,0.1)}.mpoet-wrap img{margin:0;max-width:100%;height:auto;vertical-align:middle}.mpoet-wrap p{font-size:14px}.mpoet-wrap .changelog h2{font-size:1.4em;font-weight:600;text-align:left}.mpoet-wrap .changelog h3{margin:1.33em 0;font-size:1em;line-height:inherit;color:#23282d}.mpoet-wrap .feature-section p{max-width:55em;margin-left:auto;margin-right:auto}.mpoet-wrap .feature-section.one-col{margin:0 auto;max-width:700px}.mpoet-wrap .feature-section.two-col h3{margin-top:0}.mpoet-wrap .feature-section h4{margin:1.4em 0 0.6em 0;font-size:1em}.mpoet-wrap .feature-section p{margin-top:0.6em}.mpoet-wrap .feature-section{overflow:hidden;padding:0 0 40px}.mpoet-wrap .feature-section.no-heading{padding-top:35px}.mpoet-wrap .feature-section .media-container{overflow:hidden}.mpoet-wrap .feature-section img{margin-bottom:1em}.mpoet-wrap .feature-section .col{margin-top:40px}.mpoet-wrap .changelog{margin-bottom:40px}.mpoet-wrap .changelog.feature-section .col{margin-top:40px}.mpoet-wrap h2{margin:40px 0 .6em;font-size:2.0em;line-height:1.3;font-weight:300;text-align:center}.mpoet-wrap h3{margin:1.25em 0 .6em;font-size:1.4em;line-height:1.5}.mpoet-wrap .lead-description{font-size:1.5em;text-align:center}.mpoet-wrap .center{margin-left:auto;margin-right:auto;text-align:center}.mpoet-wrap .three-col .col{-webkit-align-self:flex-start;align-self:flex-start;min-width:31%;max-width:31%}.mpoet-wrap .floating-header-section{display:-ms-grid;display:grid;grid-gap:0 60px;-ms-grid-columns:5fr 11fr;grid-template-columns:5fr 11fr;max-width:1020px;margin:0 auto 120px}.mpoet-wrap .floating-header-section .section-header{-ms-grid-column:1;grid-column:1;position:relative;min-width:230px;max-width:300px}.mpoet-wrap .floating-header-section h2{margin:0 0 1em 0;text-align:left}.mpoet-wrap .floating-header-section h3{margin:0 0 1em 0}.mpoet-wrap .floating-header-section .section-content{-ms-grid-column:2;grid-column:2;display:-webkit-box;display:flex;-webkit-box-pack:justify;justify-content:space-between;-webkit-box-align:start;align-items:flex-start;-webkit-box-orient:horizontal;-webkit-box-direction:normal;flex-flow:row wrap;-webkit-box-flex:2;flex-grow:2;flex-shrink:0}.mpoet-wrap .feature-video{position:relative;margin:0 auto;padding-bottom:35%;height:0;text-align:center}.mpoet-wrap .feature-section b{font-weight:800}.mpoet-wrap .floating-header-section .section-item{-webkit-box-flex:1;flex-grow:1;max-width:calc(50% - 30px)}.mpoet-wrap .floating-header-section .section-item:nth-child(1),.mpoet-wrap .floating-header-section .section-item:nth-child(2){margin-bottom:60px}.mpoet-wrap .floating-header-section .section-item:nth-child(1):nth-last-child(2),.mpoet-wrap .floating-header-section .section-item:nth-child(2):nth-last-child(1){margin-bottom:0}.mpoet-wrap .floating-header-section.has-long-title{display:block}.mpoet-wrap .floating-header-section.has-long-title .section-header{max-width:100%}.mpoet-wrap .floating-header-section.has-long-title h2{position:static;margin-bottom:60px}.mpoet-wrap .floating-header-section.has-long-title .section-content{-webkit-box-pack:start;justify-content:flex-start}.mpoet-wrap .floating-header-section.has-long-title .section-item{max-width:300px;margin-bottom:0}.mpoet-wrap .floating-header-section.has-long-title .section-item+.section-item{margin-left:60px}@media screen and (max-width: 1250px){.mpoet-wrap .floating-header-section.has-long-title .section-item:nth-child(1),.mpoet-wrap .floating-header-section.has-long-title .section-item:nth-child(2){margin:0 0 60px}.mpoet-wrap .floating-header-section.has-long-title .section-item:nth-child(3),.mpoet-wrap .floating-header-section.has-long-title .section-item:nth-child(4){margin:0}.mpoet-wrap .floating-header-section.has-long-title .section-item:nth-child(2),.mpoet-wrap .floating-header-section.has-long-title .section-item:nth-child(4){margin-left:60px}}.black-tick:before{content:'✔';margin-right:5px}.red-cross:before{content:'❌';font-size:10px;margin-right:5px}@media screen and (max-width: 782px){.mpoet-wrap .two-col-text{-webkit-column-count:1;column-count:1}.mpoet-wrap .two-col .col,.mpoet-wrap .three-col .col{min-width:48% !important}.mpoet-wrap .three-col img{display:block;margin:0 auto}.mpoet-wrap .floating-header-section{display:block}.mpoet-wrap .floating-header-section .section-header,.mpoet-wrap .floating-header-section .section-content{max-width:100%}.mpoet-wrap .floating-header-section h2{position:static;margin-bottom:60px}}@media only screen and (max-width: 500px){.mpoet-wrap{margin-right:20px;margin-left:10px}.mpoet-wrap h1,.mpoet-wrap .about-text{margin-right:0}.mpoet-wrap .about-text{margin-bottom:0.25em}.mpoet-wrap .wp-badge{position:relative;margin-bottom:1.5em;width:100%}.mpoet-wrap .two-col .col,.mpoet-wrap .three-col .col{min-width:100% !important}.mpoet-wrap .under-the-hood.three-col .col,.mpoet-wrap .under-the-hood.two-col .col,.mpoet-wrap .under-the-hood.one-col .col{margin-bottom:2em;padding-bottom:0}.mpoet-wrap .under-the-hood:nth-of-type(2n),.mpoet-wrap .under-the-hood:nth-of-type(3n){margin-top:0}.mpoet-wrap .under-the-hood:nth-of-type(2n) h3,.mpoet-wrap .under-the-hood:nth-of-type(3n) h3{margin-top:0}.mpoet-wrap .floating-header-section{margin-bottom:60px;grid-gap:30px 0}.mpoet-wrap .inline-svg.full-width{margin-bottom:60px}.mpoet-wrap .floating-header-section h2{word-break:break-all;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}.mpoet-wrap .floating-header-section .section-content .section-item{max-width:100%;margin:0 0 60px}}
css/admin-premium.css CHANGED
@@ -1 +1 @@
1
- #mainmenu .premium{background:url(../img/ui-bg_glass_premium_1x400.png) repeat-x scroll 50% 50% #e6e6e6;border:1px solid #a9abc3}#mainmenu .premium:hover{background:url(../img/ui-bg_glass_premium_hover_1x400.png) repeat-x scroll 50% 50% #e6e6e6;border:1px solid #9c9eb2}#mainmenu .premium a{font-weight:700;color:#5d5e76}#mainmenu .premium a:hover{color:#4b4d69}#mainmenu .ui-state-active{background:white !important;border:1px solid #d8d9e6}.mpoet-page h2{color:#4b4d69;font-size:1.8em;font-weight:200;line-height:1.2em;margin:0}.wysija-premium-wrapper{margin:0 0 20px 0}.wysija-premium-actions{position:fixed;width:1028px;bottom:0;background-color:#eee;border-top:1px solid #ccc;border-left:1px solid #ccc;border-right:1px solid #ccc;-webkit-border-top-left-radius:7px;-webkit-border-top-right-radius:7px;-moz-border-radius-topleft:7px;-moz-border-radius-topright:7px;border-top-left-radius:7px;border-top-right-radius:7px;z-index:999;padding:10px 10px 0}.wysija-premium-actions .licence{margin-right:15px}.wysija-premium-actions p{margin:0px 0px 10px 0;text-align:center}.wysija-premium-actions span.conditions{font-size:12px;margin-right:15px}.wysija-premium-actions .button-primary.wysija-premium-activate{float:none}.wysija-premium-actions-kim{position:fixed;width:1066px;bottom:0;background-color:#eee;border-top:1px solid #ccc;border-left:1px solid #ccc;border-right:1px solid #ccc;z-index:999;margin-left:-30px;padding:10px 10px;text-align:center}.mpoet-page .feature-section.three-col>div{width:29%;float:left;padding-right:30px;padding-left:0}.mpoet-page .three-col img{margin:0.5em 0;max-width:100%}a.wysija-premium-purchase{background-color:#FFB30D !important;background:-webkit-gradient(linear, left top, left bottom, from(#fecb19), to(#ff9c00)) !important;background:-webkit-linear-gradient(#fecb19, #ff9c00) !important;background:-moz-linear-gradient(center top, #fecb19 0%, #ff9c00 100%) !important;background:-moz-gradient(center top, #fecb19 0%, #ff9c00 100%) !important;border:1px solid #ff9c00 !important;color:#ffffff;font-family:"Amaranth", Arial, sans-serif;font-style:italic;font-size:15px !important;font-weight:normal;letter-spacing:1px;text-decoration:none;text-shadow:0 1px 0 #434343;padding:10px 30px;border-radius:7px;-moz-border-radius:7px;-webkit-border-radius:7px;box-shadow:none !important;text-shadow:0px 2px 1px rgba(0,0,0,0.3) !important;display:inline-block;text-align:center;width:auto}a.wysija-premium-purchase:hover{box-shadow:none !important}a.wysija-premium-purchase:hover,a.wysija-premium-purchase:active{text-decoration:none !important;background:#ffd547;background:-webkit-gradient(linear, left top, left bottom, from(#ffd648), to(#ffbe38));background:-webkit-linear-gradient(#ffd648, #ffbe38);background:-moz-linear-gradient(center top, #ffd648 20%, #ffbe38 100%);background:-moz-gradient(center top, #ffd648 20%, #ffbe38 100%)}a.wysija-premium-purchase,a.wysija-premium-activate{margin:10px 0}.mpoet-page .bullet-hold{width:600px;margin:15px 30px 15px 5px}.mpoet-page div.description h3{margin:5px 0 4px 0;font-family:"HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",sans-serif;font-size:20px;font-weight:normal;color:black}.mpoet-page div.description p{margin:0}#prices_table{margin-top:55px}#prices_table .one-third{display:block;float:left;width:284px}#prices_table #prices_names{height:63px}#prices_table #prices_names .one-third{-moz-border-bottom-colors:none;-moz-border-left-colors:none;-moz-border-right-colors:none;-moz-border-top-colors:none;background:none repeat-x scroll left top transparent;border-color:#414141 -moz-use-text-color #414141 #414141;border-image:none;border-style:solid none solid solid;border-width:1px 0 1px 1px;height:61px;text-align:center}#prices_table #prices_names{display:block}#prices_table #prices_names h3{color:#FFF !important;line-height:1em !important}#prices_table #prices_names .blogger{background-color:#0074A2}#prices_table #prices_names .freelance{background-color:#026187}#prices_table #prices_names .agency{background-color:#014661;border-right:1px solid #414141}#prices_table #prices_cost{height:177px}#prices_table #prices_cost p{margin:0}#prices_table #prices_cost .one-third{-moz-border-bottom-colors:none;-moz-border-left-colors:none;-moz-border-right-colors:none;-moz-border-top-colors:none;border-color:-moz-use-text-color -moz-use-text-color #849A97 #849A97;border-image:none;border-style:none none solid solid;border-width:0 0 1px 1px;font-family:'Amaranth',Arial,sans-serif;height:176px}#prices_table #prices_cost .agency{border-right:1px solid #849A97}#prices_table #prices_cost span{display:block}#prices_table #prices_cost .dollars{font-size:80px;height:80px;line-height:normal;padding:20px 55px 0;text-align:center}#prices_table #prices_cost .per_year{font-size:18px;padding:0 60px;text-align:right}#prices_table #prices_cost .blogger .dollars{padding:20px 75px 0}#prices_table #prices_cost .blogger .per_year{padding:0 80px}#prices_table #prices_description{height:62px}#prices_table #prices_description .one-third{-moz-border-bottom-colors:none;-moz-border-left-colors:none;-moz-border-right-colors:none;-moz-border-top-colors:none;border-color:-moz-use-text-color -moz-use-text-color #849A97 #849A97;border-image:none;border-style:none none solid solid;border-width:0 0 1px 1px;font-size:22px;height:61px}#prices_table #prices_description .agency{border-right:1px solid #849A97}#prices_table #prices_description .agency p{display:block;margin:-15px 62px 0 0;text-align:right;font-size:.5em}#prices_table #prices_description span{display:block;padding:17px 0;text-align:center}#prices_table #prices_content{height:158px}#prices_table #prices_content .prices_content{-moz-border-bottom-colors:none;-moz-border-left-colors:none;-moz-border-right-colors:none;-moz-border-top-colors:none;border-color:-moz-use-text-color #849A97 #849A97;border-image:none;border-right:1px solid #849A97;border-style:none solid solid;border-width:0 1px 1px;color:#414141;font-size:17px;padding:16px 0}#prices_table #prices_content .prices_content span{display:block;padding:2px 0;text-align:center}a.buy-button{background:none repeat scroll 0 0 #2EA2CC;border-color:#0074A2;box-shadow:0 1px 0 rgba(120,200,230,0.5) inset,0 1px 0 rgba(0,0,0,0.15);color:#FFFFFF;-moz-box-sizing:border-box;border-radius:3px;border-style:solid;border-width:1px;cursor:pointer;display:inline-block;font-size:20px;margin-top:20px;margin-bottom:60px;padding:7px 10px 7px;text-decoration:none;white-space:nowrap}a.buy-button:hover{color:#ecf3fe}.mpoet-page h1{font-size:34px}#wysija-app .mpoet-page h2{font-size:25px}.mpoet-page h1,.mpoet-page h2,.mpoet-page h3,.mpoet-page h4{color:#626262;font-weight:bold}.mpoet-page h3{margin-top:5px;line-height:24px}.mpoet-page .three-col .argument-cta{display:table;margin-top:5px}#premium-content-b .pick-licence{margin-bottom:15px}.mpoet-page hr{margin-bottom:20px}#premium-content-b .price{font-weight:bold}#footer-upgrade,#footer-left,#wpfooter .alignright,.wysija-footer{display:none}.about-wrap div.updated,.about-wrap div.error{display:block !important}#wysija-app .about-wrap .feature-section{margin-top:20px}.about-wrap .three-col>div{margin-right:32px}
1
+ #mainmenu .premium{background:url(../img/ui-bg_glass_premium_1x400.png) repeat-x scroll 50% 50% #E6E6E6;border:1px solid #a9abc3}#mainmenu .premium:hover{background:url(../img/ui-bg_glass_premium_hover_1x400.png) repeat-x scroll 50% 50% #E6E6E6;border:1px solid #9c9eb2}#mainmenu .premium a{font-weight:700;color:#5d5e76}#mainmenu .premium a:hover{color:#4b4d69}#mainmenu .ui-state-active{background:white !important;border:1px solid #d8d9e6}.mpoet-page h2{color:#4b4d69;font-size:1.8em;font-weight:200;line-height:1.2em;margin:0}.wysija-premium-wrapper{margin:0 0 20px 0}.wysija-premium-actions{position:fixed;width:1028px;bottom:0;background-color:#eee;border-top:1px solid #ccc;border-left:1px solid #ccc;border-right:1px solid #ccc;-webkit-border-top-left-radius:7px;-webkit-border-top-right-radius:7px;-moz-border-radius-topleft:7px;-moz-border-radius-topright:7px;border-top-left-radius:7px;border-top-right-radius:7px;z-index:999;padding:10px 10px 0}.wysija-premium-actions .licence{margin-right:15px}.wysija-premium-actions p{margin:0px 0px 10px 0;text-align:center}.wysija-premium-actions span.conditions{font-size:12px;margin-right:15px}.wysija-premium-actions .button-primary.wysija-premium-activate{float:none}.wysija-premium-actions-kim{position:fixed;width:1066px;bottom:0;background-color:#eee;border-top:1px solid #ccc;border-left:1px solid #ccc;border-right:1px solid #ccc;z-index:999;margin-left:-30px;padding:10px 10px;text-align:center}.mpoet-page .feature-section.three-col>div{width:29%;float:left;padding-right:30px;padding-left:0}.mpoet-page .three-col img{margin:0.5em 0;max-width:100%}a.wysija-premium-purchase{background-color:#FFB30D !important;background:-webkit-gradient(linear, left top, left bottom, from(#fecb19), to(#ff9c00)) !important;background:-webkit-linear-gradient(#fecb19, #ff9c00) !important;background:-moz-linear-gradient(center top, #fecb19 0%, #ff9c00 100%) !important;background:-moz-gradient(center top, #fecb19 0%, #ff9c00 100%) !important;border:1px solid #ff9c00 !important;color:#ffffff;font-family:"Amaranth", Arial, sans-serif;font-style:italic;font-size:15px !important;font-weight:normal;letter-spacing:1px;text-decoration:none;text-shadow:0 1px 0 #434343;padding:10px 30px;border-radius:7px;-moz-border-radius:7px;-webkit-border-radius:7px;box-shadow:none !important;text-shadow:0px 2px 1px rgba(0,0,0,0.3) !important;display:inline-block;text-align:center;width:auto}a.wysija-premium-purchase:hover{box-shadow:none !important}a.wysija-premium-purchase:hover,a.wysija-premium-purchase:active{text-decoration:none !important;background:#ffd547;background:-webkit-gradient(linear, left top, left bottom, from(#ffd648), to(#ffbe38));background:-webkit-linear-gradient(#ffd648, #ffbe38);background:-moz-linear-gradient(center top, #ffd648 20%, #ffbe38 100%);background:-moz-gradient(center top, #ffd648 20%, #ffbe38 100%)}a.wysija-premium-purchase,a.wysija-premium-activate{margin:10px 0}.mpoet-page .bullet-hold{width:600px;margin:15px 30px 15px 5px}.mpoet-page div.description h3{margin:5px 0 4px 0;font-family:"HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",sans-serif;font-size:20px;font-weight:normal;color:black}.mpoet-page div.description p{margin:0}#prices_table{margin-top:55px}#prices_table .one-third{display:block;float:left;width:284px}#prices_table #prices_names{height:63px}#prices_table #prices_names .one-third{-moz-border-bottom-colors:none;-moz-border-left-colors:none;-moz-border-right-colors:none;-moz-border-top-colors:none;background:none repeat-x scroll left top transparent;border-color:#414141 -moz-use-text-color #414141 #414141;border-image:none;border-style:solid none solid solid;border-width:1px 0 1px 1px;height:61px;text-align:center}#prices_table #prices_names{display:block}#prices_table #prices_names h3{color:#FFF !important;line-height:1em !important}#prices_table #prices_names .blogger{background-color:#0074A2}#prices_table #prices_names .freelance{background-color:#026187}#prices_table #prices_names .agency{background-color:#014661;border-right:1px solid #414141}#prices_table #prices_cost{height:177px}#prices_table #prices_cost p{margin:0}#prices_table #prices_cost .one-third{-moz-border-bottom-colors:none;-moz-border-left-colors:none;-moz-border-right-colors:none;-moz-border-top-colors:none;border-color:-moz-use-text-color -moz-use-text-color #849A97 #849A97;border-image:none;border-style:none none solid solid;border-width:0 0 1px 1px;font-family:'Amaranth',Arial,sans-serif;height:176px}#prices_table #prices_cost .agency{border-right:1px solid #849A97}#prices_table #prices_cost span{display:block}#prices_table #prices_cost .dollars{font-size:80px;height:80px;line-height:normal;padding:20px 55px 0;text-align:center}#prices_table #prices_cost .per_year{font-size:18px;padding:0 60px;text-align:right}#prices_table #prices_cost .blogger .dollars{padding:20px 75px 0}#prices_table #prices_cost .blogger .per_year{padding:0 80px}#prices_table #prices_description{height:62px}#prices_table #prices_description .one-third{-moz-border-bottom-colors:none;-moz-border-left-colors:none;-moz-border-right-colors:none;-moz-border-top-colors:none;border-color:-moz-use-text-color -moz-use-text-color #849A97 #849A97;border-image:none;border-style:none none solid solid;border-width:0 0 1px 1px;font-size:22px;height:61px}#prices_table #prices_description .agency{border-right:1px solid #849A97}#prices_table #prices_description .agency p{display:block;margin:-15px 62px 0 0;text-align:right;font-size:.5em}#prices_table #prices_description span{display:block;padding:17px 0;text-align:center}#prices_table #prices_content{height:158px}#prices_table #prices_content .prices_content{-moz-border-bottom-colors:none;-moz-border-left-colors:none;-moz-border-right-colors:none;-moz-border-top-colors:none;border-color:-moz-use-text-color #849A97 #849A97;border-image:none;border-right:1px solid #849A97;border-style:none solid solid;border-width:0 1px 1px;color:#414141;font-size:17px;padding:16px 0}#prices_table #prices_content .prices_content span{display:block;padding:2px 0;text-align:center}a.buy-button{background:none repeat scroll 0 0 #2EA2CC;border-color:#0074A2;box-shadow:0 1px 0 rgba(120,200,230,0.5) inset,0 1px 0 rgba(0,0,0,0.15);color:#FFFFFF;-moz-box-sizing:border-box;border-radius:3px;border-style:solid;border-width:1px;cursor:pointer;display:inline-block;font-size:20px;margin-top:20px;margin-bottom:60px;padding:7px 10px 7px;text-decoration:none;white-space:nowrap}a.buy-button:hover{color:#ecf3fe}.mpoet-page h1{font-size:34px}#wysija-app .mpoet-page h2{font-size:25px}.mpoet-page h1,.mpoet-page h2,.mpoet-page h3,.mpoet-page h4{color:#626262;font-weight:bold}.mpoet-page h3{margin-top:5px;line-height:24px}.mpoet-page .three-col .argument-cta{display:table;margin-top:5px}#premium-content-b .pick-licence{margin-bottom:15px}.mpoet-page hr{margin-bottom:20px}#premium-content-b .price{font-weight:bold}#footer-upgrade,#footer-left,#wpfooter .alignright,.wysija-footer{display:none}.about-wrap div.updated,.about-wrap div.error{display:block !important}#wysija-app .about-wrap .feature-section{margin-top:20px}.about-wrap .three-col>div{margin-right:32px}
css/wysija-editor.css CHANGED
@@ -1 +1 @@
1
- .clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}.clearfix{display:inline-table}* html .clearfix{height:1%}.clearfix{display:block}.hidden{display:none}strong{font-weight:bold}img{vertical-align:middle}:focus{outline:0 !important}.inline{display:-moz-inline-box;display:inline-block;*display:inline;*float:left}.wysija_tools li,.wysija_tools dd{margin:0 !important}.wysija_controls li{margin:0 0 0 3px !important}#wysija_items{position:fixed;width:275px;right:20px;top:20px;z-index:999}#wysija_items li{line-height:100px;height:100px;outline:1px solid #ccc;text-align:center}.wysija_items li.disabled{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";filter:alpha(opacity=20);-moz-opacity:0.2;opacity:0.2}.wysija_items li.active a{height:100px;cursor:pointer;display:block}.wysija_header,.wysija_footer{position:relative;display:inline-table;display:block;height:1%;margin:0;padding:0;z-index:98}.wysija_header:after,.wysija_footer:after{content:".";display:block;height:0;clear:both;visibility:hidden}.wysija_block{position:relative;margin:0 10px;padding:10px 18px 10px 18px;display:inline-table;display:block;height:1%;margin:0;z-index:98}.wysija_block.dragging,.wysija_header.dragging,.wysija_footer.dragging{z-index:99000}.wysija_block:after{content:".";display:block;height:0;clear:both;visibility:hidden}.wysija_block.hover{border:1px dashed #bbb;margin:0 0 0 0;padding:9px 17px 9px 17px}.wysija_block.static{padding:0;margin:0}.wysija_block .wysija_controls{background-color:#dfdfdf;background-image:-moz-linear-gradient(center bottom, #bbb, #eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#bbbbbb');background:-webkit-gradient(linear, left bottom, left top, from(#bbb), to(#eee));-moz-border-radius:2px;-webkit-border-radius:2px;-khtml-border-radius:2px;border-radius:2px;border:1px solid #ccc;position:absolute;margin:0;padding:0;width:598px;height:20px;left:-1px;right:0;top:-22px;width:100%}.wysija_block .wysija_controls .handle{width:600px}.wysija_block .wysija_controls li{float:left;width:20px;height:20px}.wysija_block .wysija_controls a{cursor:pointer;float:left;font-size:120%;font-weight:bold;height:20px;line-height:20px;text-align:center;width:20px;color:#000}.wysija_block .handle_container,.wysija_block .handle_container a{float:none;width:40px}.wysija_block .handle_container{left:280px;top:0;position:absolute}.wysija_gallery .wysija_tools,.wysija_image .wysija_tools{position:absolute;height:34px;line-height:34px;margin:0;width:152px;top:-36px;z-index:1010;background-color:#dfdfdf;background-image:-moz-linear-gradient(center bottom, #bbb, #eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#bbbbbb');background:-webkit-gradient(linear, left bottom, left top, from(#bbb), to(#eee));-moz-border-radius:2px;-webkit-border-radius:2px;-khtml-border-radius:2px;border-radius:2px;border:1px solid #ccc;padding:0 0 0 5px}.wysija_gallery .wysija_tools{width:102px}.left .wysija_image .wysija_tools,.center .wysija_image .wysija_tools,.left.wysija_gallery .wysija_tools,.center.wysija_gallery .wysija_tools{left:0;text-align:left}.right .wysija_image .wysija_tools,.right.wysija_gallery .wysija_tools{right:0;text-align:right}.wysija_text .wysija_tools{position:absolute;height:20px;line-height:20px;top:0;right:0;margin:0;z-index:1000;width:20px}.wysija_text.alone .wysija_tools{display:none}.wysija_gallery .wysija_tools li,.wysija_image .wysija_tools li{float:left;width:25px;height:34px}.wysija_text .wysija_tools li{float:left;width:20px;height:20px}.wysija_gallery .wysija_tools a,.wysija_image .wysija_tools a,.wysija_text .wysija_tools a{background-color:#dfdfdf;background-image:-moz-linear-gradient(center bottom, #bbb, #eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#bbbbbb');background:-webkit-gradient(linear, left bottom, left top, from(#bbb), to(#eee));float:left;width:20px;height:20px;margin:5px 3px 0 0;-moz-border-radius:2px;-webkit-border-radius:2px;-khtml-border-radius:2px;border-radius:2px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff;-moz-box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff;box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff;border:1px solid #ccc;z-index:1010;position:relative}.wysija_text .wysija_tools a{margin:0}.wysija_gallery .wysija_tools a:hover,.wysija_image .wysija_tools a:hover,.wysija_text .wysija_tools a:hover{background-color:#ddd;border-color:#909090}.wysija_gallery .wysija_tools a.active,.wysija_image .wysija_tools a.active,.wysija_text .wysija_tools a.active{background-color:#ddd;background-image:-moz-linear-gradient(center bottom, #eee, #bbb);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#bbbbbb');background:-webkit-gradient(linear, left bottom, left top, from(#eee), to(#bbb));border-color:#909090}.wysija_controls a span,.wysija_gallery .wysija_tools a span,.wysija_image .wysija_tools a span,.wysija_text .wysija_tools a span,.wj_content a span{display:block;height:20px;width:20px}.wysija_controls span input{margin:2px 0 0 0;padding:0;color:transparent}.alignment-left span{background:url(../img/controls/icons.png) no-repeat 0 0}.alignment-left.active span,.alignment-left:hover span{background:url(../img/controls/icons.png) no-repeat 0 -20px}.alignment-center span{background:url(../img/controls/icons.png) no-repeat -20px 0}.alignment-center.active span,.alignment-center:hover span{background:url(../img/controls/icons.png) no-repeat -20px -20px}.alignment-right span{background:url(../img/controls/icons.png) no-repeat -40px 0}.alignment-right.active span,.alignment-right:hover span{background:url(../img/controls/icons.png) no-repeat -40px -20px}.add-link span{background:url(../img/controls/icons.png) no-repeat -60px 0}.add-link.active span,.add-link:hover span{background:url(../img/controls/icons.png) no-repeat -60px -20px}.remove-link span{background:url(../img/controls/icons.png) no-repeat -80px 0}.remove-link.active span,.remove-link:hover span{background:url(../img/controls/icons.png) no-repeat -80px -20px}.remove span{background:url(../img/controls/icons.png) no-repeat -100px 0}.remove.active span,.remove:hover span{background:url(../img/controls/icons.png) no-repeat -100px -20px}.handle span{background:url(../img/controls/grip-handle.png) no-repeat;cursor:move;width:40px !important}.duplicate span{background:url(../img/controls/icons.png) no-repeat -140px 0}.duplicate.active span,.duplicate:hover span{background:url(../img/controls/icons.png) no-repeat -140px -20px}.settings span{background:url(../img/controls/icons.png) no-repeat -160px 0}.settings.active span,.settings:hover span{background:url(../img/controls/icons.png) no-repeat -160px -20px}.icon-plus span{background:url(../img/controls/icons.png) no-repeat -200px 0}.icon-plus.active span,.icon-plus:hover span{background:url(../img/controls/icons.png) no-repeat -200px -20px}.icon-minus span{background:url(../img/controls/icons.png) no-repeat -220px 0}.icon-minus.active span,.icon-minus:hover span{background:url(../img/controls/icons.png) no-repeat -220px -20px}.banner{color:#000;z-index:999;text-align:center;width:600px;position:absolute;top:0;right:0;left:0;bottom:0;white-space:nowrap;font-size:16px !important;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.banner .banner-message{margin:20px auto 0 auto}.banner .banner-icon{background:url(../img/controls/image-placeholder.png) no-repeat;padding:2px 0 0 28px}.banner .banner-notice{margin:10px auto 0 auto;font-size:12px;font-style:italic}#wysija_wrapper{padding:20px;width:600px;border:1px solid #ccc;position:relative;background-color:#fff;-webkit-box-shadow:0 0 4px rgba(0,0,0,0.2),inset 0 0 20px rgba(0,0,0,0.1);-moz-box-shadow:0 0 4px rgba(0,0,0,0.2),inset 0 0 20px rgba(0,0,0,0.1);box-shadow:0 0 5px rgba(0,0,0,0.2),inset 0 0 20px rgba(0,0,0,0.1)}#wysija_wrapper:before,#wysija_wrapper:after{position:absolute;width:40%;height:10px;content:' ';left:12px;bottom:12px;background:transparent;-webkit-transform:skew(-5deg) rotate(-5deg);-moz-transform:skew(-5deg) rotate(-5deg);-ms-transform:skew(-5deg) rotate(-5deg);-o-transform:skew(-5deg) rotate(-5deg);transform:skew(-5deg) rotate(-5deg);-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.3);-moz-box-shadow:0 6px 12px rgba(0,0,0,0.3);box-shadow:0 6px 12px rgba(0,0,0,0.3);z-index:-1}#wysija_wrapper:after{left:auto;right:12px;-webkit-transform:skew(5deg) rotate(5deg);-moz-transform:skew(5deg) rotate(5deg);-ms-transform:skew(5deg) rotate(5deg);-o-transform:skew(5deg) rotate(5deg);transform:skew(5deg) rotate(5deg)}body.rtl #wysija_wrapper{right:603px !important}#wysija_container{margin:30px 0 0 0;width:600px;border-collapse:collapse;width:600px;margin:0;padding:0}#wysija_header{padding:0}#wysija_body{vertical-align:top;padding:0}#wysija_footer{padding:0}#wysija_block_placeholder{height:0;padding:0;margin:0}.block_placeholder,.text_placeholder{font-weight:bold;height:0;overflow:hidden;line-height:30px;text-align:center;border:0 none;width:598px;z-index:9500;margin:0 auto;text-indent:-9999px}.wysija_block .block_placeholder,.wysija_block .text_placeholder,.wysija_block .image_placeholder{margin:0}.image_placeholder{margin:1px 0 0 1px}.hover .image_placeholder{margin:0}.wysija_content .empty.wysija_editable{font-size:13px;line-height:30px}.wysija_image.empty{height:0;width:0;margin:0 !important;z-index:-1;overflow:hidden}.wysija_image.empty.active{height:auto}.wysija_image.active{background:url(../img/controls/image-placeholder.png) no-repeat center center #f5f5f5;border:1px dashed #dfdfdf}#wysija_header .wysija_image.empty,#wysija_footer .wysija_image.empty{background-image:none;height:auto}#wysija_header .wysija_image.active,#wysija_footer .wysija_image.active{border:0 none}.block_placeholder.active,.text_placeholder.active{text-indent:0;border:1px dashed #dfdfdf;background-color:#f5f5f5;display:block;overflow:auto;height:30px}.image_placeholder.empty.active{display:block}.block_placeholder.hover,.text_placeholder.hover,.image_hover .wysija_image{background-color:#0074a2;border-color:#0074a2;color:#fff !important}.image_placeholder.active{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=25)";filter:alpha(opacity=25);-moz-opacity:0.25;opacity:0.25;z-index:9501}.wysija_image.empty.active,.wysija_text.empty.active{display:block;margin:0}#wysija_header .wysija_image.active,#wysija_footer .wysija_image.active{left:0;top:0;right:0}.wysija_header .image_placeholder,.wysija_footer .image_placeholder{border:0 none !important;margin:0 !important}.wysija_header .image_placeholder.active,.wysija_footer .image_placeholder.active{border:0 none !important}.wysija_options{display:none}.wysija_content .wysija_image{margin:0 auto 15px auto;cursor:move}.wysija_header .wysija_content.left .wysija_image,.wysija_header .wysija_content.right .wysija_image,.wysija_footer .wysija_content.left .wysija_image,.wysija_footer .wysija_content.right .wysija_image{margin:0 0 0 0 !important}.wysija_content.center .image_placeholder.active{margin:0 0 -2px 0}.wysija_header .wysija_content.center .wysija_image,.wysija_footer .wysija_content.center .wysija_image{margin:0 auto !important}.wysija_header .wysija_content.center .image_placeholder.active,.wysija_footer .wysija_content.center .image_placeholder.active{margin:0}.wysija_block .wysija_content.center .wysija_image.empty.active{margin-bottom:5px !important}.wysija_content.left{float:none}.wysija_gallery.left{float:left}.wysija_content.left .wysija_image{float:left;margin:0 15px 5px 0}.wysija_content.left .wysija_image.active{margin:0 13px 3px 0}.wysija_content.left .wysija_image.empty.active{margin:0 15px 5px 0 !important}.wysija_gallery.right{float:right}.wysija_content.right .wysija_image{float:right;margin:0 0 5px 15px}.wysija_content.right .wysija_image.active{margin:0 0 3px 13px}.wysija_content.right .wysija_image.empty.active{margin:0 0 5px 15px !important}.wysija_content .wysija_image.alone{margin:0 !important}.wysija_content.center .wysija_image.alone{margin:0 auto !important}.wysija_image{position:relative;z-index:999}.wysija_image .url-info{position:absolute;bottom:0;left:0;font-size:0.7em;padding:2px;color:#000;background-color:#fff;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";filter:alpha(opacity=80);-moz-opacity:0.8;opacity:0.8}.wysija_content.left .wysija_image .url-info{right:0;left:auto}.wysija_text{position:relative;z-index:998}.wysija_text.wysija_editing{border:1px solid #dfdfdf}.wysija_content.left .wysija_text.wysija_editing{float:left}.wysija_text .wysija_editable:hover{cursor:pointer}#wysija_toolbar{left:657px;position:absolute;top:-1000px;width:295px}#wysija_toolbar .wysija_toolbar_tabs{border-bottom:1px solid #dfdfdf;line-height:0}#wysija_toolbar .wysija_toolbar_tabs li,#wysija_toolbar .wysija_toolbar_tabs a{margin:0;height:30px;line-height:30px;padding:0;display:-moz-inline-box;display:inline-block;*display:inline;*float:left;outline:0 none}#wysija_toolbar .wysija_toolbar_tabs a{outline:0 none;text-decoration:none;color:#a6a6a6}#wysija_toolbar .wysija_toolbar_tabs li{margin:0 0 1px 0}#wysija_toolbar .wysija_toolbar_tabs a{font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;background-color:#F5F5F5;background-image:-moz-linear-gradient(center top, #f9f9f9, #f5f5f5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#F5F5F5', endColorstr='#F9F9F9');background:-webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#f5f5f5));border:1px solid #DFDFDF;-moz-border-radius:3px 3px 0 0;-webkit-border-radius:3px 3px 0 0;-khtml-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;box-shadow:0 1px 0 #FFFFFF inset;padding:0 7px}#wysija_toolbar .wysija_toolbar_tabs a:hover{background-color:#eee}#wysija_toolbar .wysija_toolbar_tabs a.selected{color:#000;border-bottom:0 none;background:#fcfcfc;filter:none;padding-bottom:1px}#wysija_toolbar .wysija_toolbar_tabs,#wysija_toolbar .wj_content,#wysija_toolbar .wj_images,#wysija_toolbar .wj_styles,#wysija_toolbar .wj_themes{position:relative;z-index:9998;margin:0}#wysija_toolbar #wysija_notices span{font-size:12px !important;font-weight:normal !important}.wj_content{background-color:#fcfcfc;border:1px solid #dfdfdf;border-top:0 none;padding:0 0 10px 0}.wj_content li{padding:10px 10px 0 10px;position:relative}.wj_content li.notice{font-style:italic;font-size:11px;margin:0 !important;border:0 none !important;background:none !important}.wj_images{z-index:999;background-color:#fcfcfc;border:1px solid #dfdfdf;border-top:0 none;padding:9px}.wj_images ul{min-height:200px;max-height:600px;height:360px;overflow:auto;margin:0;padding:0}.wj_images li{float:left;width:80px;margin:2px;height:80px;overflow:hidden;position:relative;border:1px solid #dfdfdf}.wj_images li img{max-height:150px;width:80px}.wj_images li a{float:left;display:block;height:80px;width:80px}.wj_button{text-align:center;width:265px;margin:20px 0;height:30px;line-height:30px}.wj_images img{cursor:move;max-width:275px}#wysija-upload-browse,#wysija-themes-browse{float:none}.wj_images #wj_images_preview{border:3px solid #dfdfdf;position:absolute;right:295px;top:0;background-color:#fff}.wj_styles{z-index:999;background-color:#fcfcfc;border:1px solid #dfdfdf;border-top:0 none;padding:9px}.wj_styles p{margin:10px 0}.wj_styles .preview{width:20px;float:none !important;height:20px;vertical-align:middle;display:-moz-inline-box;display:inline-block;*display:inline;*float:left;border:1px solid #333}.wj_styles input,.wj_styles select{height:20px;border:0 none;border:1px solid #CCC;margin:0 3px 0 0 !important;padding:0 !important;vertical-align:middle;line-height:20px;font-size:12px}.wj_styles #aUnderlineInput{margin:0 0 0 10px !important}.wj_styles select{width:75px}.wj_styles input.checkbox,.wj_styles input[type=checkbox]{border:0 none !important}.wj_styles input.color{width:55px;padding:0 0 0 2px !important}.wj_styles input.color.disabled{background-color:#eee !important;color:#eee !important}.wj_styles select.small-size{width:50px}.wj_styles select.type{width:68px}.wj_styles select.size{width:58px}.wj_styles form label{cursor:normal;margin:0 0 0 3px}.wj_themes{z-index:999;background-color:#fcfcfc;border:1px solid #dfdfdf;border-top:0 none;padding:9px}.wj_themes ul{height:360px;overflow:auto;margin:0;padding:0}.wj_themes li{float:left;width:80px;margin:2px;height:80px;overflow:hidden;border:1px solid #dfdfdf;position:relative}.wj_themes li img{max-height:150px;width:80px}.wj_themes li a{display:block}.wj_themes #wj_themes_preview{border:3px solid #dfdfdf;position:absolute;right:295px;top:0;background-color:#fff}.wysija_widget{width:275px;height:25px;line-height:25px;z-index:9999 !important}.wj_content a.wysija_item,.wysija_widget{height:25px;line-height:25px;background-color:#F5F5F5;background-image:-moz-linear-gradient(center top, #f9f9f9, #ececec);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#ececec');background:-webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#ececec));border:1px solid #DFDFDF;-moz-border-radius:3px;-webkit-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;box-shadow:0 1px 0 #FFFFFF inset;display:block;font-size:12px;font-weight:bold;padding:0 0 0 7px;cursor:move;color:#222;text-shadow:0 1px 0 #FFFFFF}.wj_content a.wysija_item.disabled{cursor:help;color:#cccccc}.wysija_item_settings{position:absolute;right:15px;top:13px}.wysija_widget.image{z-index:9999 !important;height:auto !important;width:150px !important;background:none !important;border:0 none !important;box-shadow:none !important;border-radius:0 !important;padding:0 !important}#wysija_notices{z-index:20000;position:relative;left:0;top:0;padding:5px;border:1px solid #dfdfdf;border-top:0 none}#wysija_notices.notice{background-color:#FFFFE0;border-color:#E6DB55;z-index:9999}#wysija_notices.error{background-color:#FFEBE8;border-color:#CC0000}#wysija_notice_msg{font-size:14px;font-weight:bold}.align-center{text-align:center}.align-left{text-align:left}.align-right{text-align:right}.align-justify{text-align:justify}.wysija_gallery{position:relative}.wysija_gallery.center{margin:0 auto}.wysija_gallery.right{text-align:right}.wysija_gallery.left{text-align:left}.wysija_row{width:100%}.wysija_cell{float:left;text-align:center}.resize-controls{position:absolute;left:0;right:0;top:0;bottom:0;z-index:99000;border:1px dashed #ccc}.resize-handle{position:absolute;bottom:0;right:0;width:20px;height:20px;border:0 none;z-index:1001;cursor:se-resize;background:transparent url(../img/controls/resize-se.png) no-repeat scroll right bottom}.resize-info{position:absolute;bottom:0;left:4px;font-size:0.8em;padding:0;margin:0;text-shadow:0 1px 0 #F7F5F2;white-space:nowrap}.right .resize-handle{position:absolute;bottom:0;left:0;width:20px;height:20px;border:0 none;z-index:1001;cursor:sw-resize;background:transparent url(../img/controls/resize-sw.png) no-repeat scroll left bottom}.right .resize-info{left:auto !important;right:4px}#adminmenu li .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{z-index:1001 !important}.wysija_divider{margin:0 auto;width:564px}.wysija_block.auto-post.hover .wysija_content *,.wysija_block.auto-post.hover .wysija_divider{z-index:1000;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";filter:alpha(opacity=30);-moz-opacity:0.3;opacity:0.3}.wysija_auto-post .wysija_divider{text-align:center;margin:0 !important;width:100% !important}.wysija_auto-post .nopost{height:100px}.wysija_auto-post .nopost p{margin:25px 0 0 0}.wysija_settings{left:10px;position:absolute;top:0;z-index:1000}.wysija_settings a{background-color:#F5F5F5;background-image:-moz-linear-gradient(center top, #f9f9f9, #ececec);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#ececec');background:-webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#ececec));border:1px solid #DFDFDF;-moz-border-radius:3px;-webkit-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;box-shadow:0 1px 0 #FFFFFF inset;font-size:12px;font-weight:normal;cursor:pointer;color:#222;text-shadow:0 1px 0 #FFFFFF;text-decoration:none;display:block;padding:5px 5px 3px 27px}.wysija_settings a span{width:20px;height:20px;position:absolute;top:3px;left:5px}#wysija_toggle_images{position:absolute;top:5px;right:5px;z-index:1000;width:73px;height:33px;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";filter:alpha(opacity=50);-moz-opacity:0.5;opacity:0.5;background-color:#fff}#wysija_toggle_images.on{background:url(../img/controls/images-toggle-on.png) no-repeat}#wysija_toggle_images.off{background:url(../img/controls/images-toggle-off.png) no-repeat}#wysija_toggle_images:hover{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";filter:alpha(opacity=100);-moz-opacity:1.0;opacity:1.0}.wysija_block.auto-post{padding:0 !important}.wysija_auto-post .wysija_content{padding:10px 17px !important}.wysija_auto-post .wysija_content:after{content:".";display:block;height:0;clear:both;visibility:hidden}.wysija_auto-post .wysija_content{display:inline-table}* html .wysija_auto-post .wysija_content{height:1%}.wysija_auto-post .wysija_content{display:block}.wysija_auto-post .wysija_divider{padding:9px 0 !important}.wysija_block.auto-post.hover .wysija_content{padding:10px 17px !important}.wysija_auto-post .wysija_text{pointer-events:none;cursor:default}.wysija_auto-post .wysija_image{pointer-events:none;cursor:default}.auto-post.hover .wysija_content:last-child{padding:9px 17px 9px 17px !important}.wysija_auto-post .loading{padding:10px 17px;font-size:10px}#wysija_popup_overlay{background-color:#000;height:100%;left:0;position:fixed;top:0;width:100%;z-index:999989;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=75)";filter:alpha(opacity=75);-moz-opacity:0.75;opacity:0.75}#wysija_popup_overlay.loading{background:url(../img/popup/loading.gif) no-repeat 50% 50% #000}#wysija_popup{position:absolute;top:0;left:0;width:600px;height:400px;background-color:#fff;z-index:999999;-moz-border-radius:3px;-webkit-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;-moz-box-shadow:#000 0 4px 30px;-webkit-box-shadow:#000 0 4px 30px;-khtml-box-shadow:#000 0 4px 30px;box-shadow:#000 0 4px 30px;border:1px solid #555}#wysija_popup_content{padding:0;overflow:hidden;position:relative}#wysija_popup_title{background-color:#222;border:1px solid #333;height:27px;margin:0;padding:0}#wysija_popup_title h3{color:#cfcfcf;font-size:12px;font-weight:normal;margin:6px 0 0 10px;padding:0;float:left;font:12px "Lucida Grande", Verdana, Arial, sans-serif}#wysija_popup_iframe{border:0 none;outline:0 none}#wysija_popup_close{background:url(../img/popup/close.png) no-repeat;height:15px;width:15px;background-color:#333;display:block;float:right;margin:6px 10px 0 0}.mpoet-ui .wysija_item_settings{text-decoration:none}.mpoet-ui .settings span{background:none;color:#999}.mpoet-ui .wysija_item_settings:hover .dashicons-admin-generic:before,.mpoet-ui .settings:hover .dashicons-admin-generic:before{color:#2ea2cc}.wp_themeSkin .mceToolbar{margin:0 !important;padding:0 !important}
1
+ .clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}.clearfix{display:inline-table}* html .clearfix{height:1%}.clearfix{display:block}.hidden{display:none}strong{font-weight:bold}img{vertical-align:middle}:focus{outline:0 !important}.inline{display:-moz-inline-box;display:inline-block;*display:inline;*float:left}.wysija_tools li,.wysija_tools dd{margin:0 !important}.wysija_controls li{margin:0 0 0 3px !important}#wysija_items{position:fixed;width:275px;right:20px;top:20px;z-index:999}#wysija_items li{line-height:100px;height:100px;outline:1px solid #ccc;text-align:center}.wysija_items li.disabled{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";filter:alpha(opacity=20);-moz-opacity:0.2;opacity:0.2}.wysija_items li.active a{height:100px;cursor:pointer;display:block}.wysija_header,.wysija_footer{position:relative;display:inline-table;display:block;height:1%;margin:0;padding:0;z-index:98}.wysija_header:after,.wysija_footer:after{content:".";display:block;height:0;clear:both;visibility:hidden}.wysija_block{position:relative;margin:0 10px;padding:10px 18px 10px 18px;display:inline-table;display:block;height:1%;margin:0;z-index:98}.wysija_block.dragging,.wysija_header.dragging,.wysija_footer.dragging{z-index:99000}.wysija_block:after{content:".";display:block;height:0;clear:both;visibility:hidden}.wysija_block.hover{border:1px dashed #bbb;margin:0 0 0 0;padding:9px 17px 9px 17px}.wysija_block.static{padding:0;margin:0}.wysija_block .wysija_controls{background-color:#dfdfdf;background-image:-moz-linear-gradient(center bottom, #bbb, #eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#bbbbbb');background:-webkit-gradient(linear, left bottom, left top, from(#bbb), to(#eee));-moz-border-radius:2px;-webkit-border-radius:2px;-khtml-border-radius:2px;border-radius:2px;border:1px solid #ccc;position:absolute;margin:0;padding:0;width:598px;height:20px;left:-1px;right:0;top:-22px;width:100%}.wysija_block .wysija_controls .handle{width:600px}.wysija_block .wysija_controls li{float:left;width:20px;height:20px}.wysija_block .wysija_controls a{cursor:pointer;float:left;font-size:120%;font-weight:bold;height:20px;line-height:20px;text-align:center;width:20px;color:#000}.wysija_block .handle_container,.wysija_block .handle_container a{float:none;width:40px}.wysija_block .handle_container{left:280px;top:0;position:absolute}.wysija_gallery .wysija_tools,.wysija_image .wysija_tools{position:absolute;height:34px;line-height:34px;margin:0;width:152px;top:-36px;z-index:1010;background-color:#dfdfdf;background-image:-moz-linear-gradient(center bottom, #bbb, #eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#bbbbbb');background:-webkit-gradient(linear, left bottom, left top, from(#bbb), to(#eee));-moz-border-radius:2px;-webkit-border-radius:2px;-khtml-border-radius:2px;border-radius:2px;border:1px solid #ccc;padding:0 0 0 5px}.wysija_gallery .wysija_tools{width:102px}.left .wysija_image .wysija_tools,.center .wysija_image .wysija_tools,.left.wysija_gallery .wysija_tools,.center.wysija_gallery .wysija_tools{left:0;text-align:left}.right .wysija_image .wysija_tools,.right.wysija_gallery .wysija_tools{right:0;text-align:right}.wysija_text .wysija_tools{position:absolute;height:20px;line-height:20px;top:0;right:0;margin:0;z-index:1000;width:20px}.wysija_text.alone .wysija_tools{display:none}.wysija_gallery .wysija_tools li,.wysija_image .wysija_tools li{float:left;width:25px;height:34px}.wysija_text .wysija_tools li{float:left;width:20px;height:20px}.wysija_gallery .wysija_tools a,.wysija_image .wysija_tools a,.wysija_text .wysija_tools a{background-color:#dfdfdf;background-image:-moz-linear-gradient(center bottom, #bbb, #eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#bbbbbb');background:-webkit-gradient(linear, left bottom, left top, from(#bbb), to(#eee));float:left;width:20px;height:20px;margin:5px 3px 0 0;-moz-border-radius:2px;-webkit-border-radius:2px;-khtml-border-radius:2px;border-radius:2px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff;-moz-box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff;box-shadow:0 1px 0 rgba(0,0,0,0.15),inset 0 0 2px 1px #fff;border:1px solid #ccc;z-index:1010;position:relative}.wysija_text .wysija_tools a{margin:0}.wysija_gallery .wysija_tools a:hover,.wysija_image .wysija_tools a:hover,.wysija_text .wysija_tools a:hover{background-color:#ddd;border-color:#909090}.wysija_gallery .wysija_tools a.active,.wysija_image .wysija_tools a.active,.wysija_text .wysija_tools a.active{background-color:#ddd;background-image:-moz-linear-gradient(center bottom, #eee, #bbb);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#bbbbbb');background:-webkit-gradient(linear, left bottom, left top, from(#eee), to(#bbb));border-color:#909090}.wysija_controls a span,.wysija_gallery .wysija_tools a span,.wysija_image .wysija_tools a span,.wysija_text .wysija_tools a span,.wj_content a span{display:block;height:20px;width:20px}.wysija_controls span input{margin:2px 0 0 0;padding:0;color:transparent}.alignment-left span{background:url(../img/controls/icons.png) no-repeat 0 0}.alignment-left.active span,.alignment-left:hover span{background:url(../img/controls/icons.png) no-repeat 0 -20px}.alignment-center span{background:url(../img/controls/icons.png) no-repeat -20px 0}.alignment-center.active span,.alignment-center:hover span{background:url(../img/controls/icons.png) no-repeat -20px -20px}.alignment-right span{background:url(../img/controls/icons.png) no-repeat -40px 0}.alignment-right.active span,.alignment-right:hover span{background:url(../img/controls/icons.png) no-repeat -40px -20px}.add-link span{background:url(../img/controls/icons.png) no-repeat -60px 0}.add-link.active span,.add-link:hover span{background:url(../img/controls/icons.png) no-repeat -60px -20px}.remove-link span{background:url(../img/controls/icons.png) no-repeat -80px 0}.remove-link.active span,.remove-link:hover span{background:url(../img/controls/icons.png) no-repeat -80px -20px}.remove span{background:url(../img/controls/icons.png) no-repeat -100px 0}.remove.active span,.remove:hover span{background:url(../img/controls/icons.png) no-repeat -100px -20px}.handle span{background:url(../img/controls/grip-handle.png) no-repeat;cursor:move;width:40px !important}.duplicate span{background:url(../img/controls/icons.png) no-repeat -140px 0}.duplicate.active span,.duplicate:hover span{background:url(../img/controls/icons.png) no-repeat -140px -20px}.settings span{background:url(../img/controls/icons.png) no-repeat -160px 0}.settings.active span,.settings:hover span{background:url(../img/controls/icons.png) no-repeat -160px -20px}.icon-plus span{background:url(../img/controls/icons.png) no-repeat -200px 0}.icon-plus.active span,.icon-plus:hover span{background:url(../img/controls/icons.png) no-repeat -200px -20px}.icon-minus span{background:url(../img/controls/icons.png) no-repeat -220px 0}.icon-minus.active span,.icon-minus:hover span{background:url(../img/controls/icons.png) no-repeat -220px -20px}.banner{color:#000;z-index:999;text-align:center;width:600px;position:absolute;top:0;right:0;left:0;bottom:0;white-space:nowrap;font-size:16px !important;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.banner .banner-message{margin:20px auto 0 auto}.banner .banner-icon{background:url(../img/controls/image-placeholder.png) no-repeat;padding:2px 0 0 28px}.banner .banner-notice{margin:10px auto 0 auto;font-size:12px;font-style:italic}#wysija_wrapper{padding:20px;width:600px;border:1px solid #ccc;position:relative;background-color:#fff;-webkit-box-shadow:0 0 4px rgba(0,0,0,0.2),inset 0 0 20px rgba(0,0,0,0.1);-moz-box-shadow:0 0 4px rgba(0,0,0,0.2),inset 0 0 20px rgba(0,0,0,0.1);box-shadow:0 0 5px rgba(0,0,0,0.2),inset 0 0 20px rgba(0,0,0,0.1)}#wysija_wrapper:before,#wysija_wrapper:after{position:absolute;width:40%;height:10px;content:' ';left:12px;bottom:12px;background:transparent;-webkit-transform:skew(-5deg) rotate(-5deg);-moz-transform:skew(-5deg) rotate(-5deg);-ms-transform:skew(-5deg) rotate(-5deg);-o-transform:skew(-5deg) rotate(-5deg);transform:skew(-5deg) rotate(-5deg);-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.3);-moz-box-shadow:0 6px 12px rgba(0,0,0,0.3);box-shadow:0 6px 12px rgba(0,0,0,0.3);z-index:-1}#wysija_wrapper:after{left:auto;right:12px;-webkit-transform:skew(5deg) rotate(5deg);-moz-transform:skew(5deg) rotate(5deg);-ms-transform:skew(5deg) rotate(5deg);-o-transform:skew(5deg) rotate(5deg);transform:skew(5deg) rotate(5deg)}body.rtl #wysija_wrapper{right:603px !important}#wysija_container{margin:30px 0 0 0;width:600px;border-collapse:collapse;width:600px;margin:0;padding:0}#wysija_header{padding:0}#wysija_body{vertical-align:top;padding:0}#wysija_footer{padding:0}#wysija_block_placeholder{height:0;padding:0;margin:0}.block_placeholder,.text_placeholder{font-weight:bold;height:0;overflow:hidden;line-height:30px;text-align:center;border:0 none;width:598px;z-index:9500;margin:0 auto;text-indent:-9999px}.wysija_block .block_placeholder,.wysija_block .text_placeholder,.wysija_block .image_placeholder{margin:0}.image_placeholder{margin:1px 0 0 1px}.hover .image_placeholder{margin:0}.wysija_content .empty.wysija_editable{font-size:13px;line-height:30px}.wysija_image.empty{height:0;width:0;margin:0 !important;z-index:-1;overflow:hidden}.wysija_image.empty.active{height:auto}.wysija_image.active{background:url(../img/controls/image-placeholder.png) no-repeat center center #f5f5f5;border:1px dashed #dfdfdf}#wysija_header .wysija_image.empty,#wysija_footer .wysija_image.empty{background-image:none;height:auto}#wysija_header .wysija_image.active,#wysija_footer .wysija_image.active{border:0 none}.block_placeholder.active,.text_placeholder.active{text-indent:0;border:1px dashed #dfdfdf;background-color:#f5f5f5;display:block;overflow:auto;height:30px}.image_placeholder.empty.active{display:block}.block_placeholder.hover,.text_placeholder.hover,.image_hover .wysija_image{background-color:#0074a2;border-color:#0074a2;color:#fff !important}.image_placeholder.active{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=25)";filter:alpha(opacity=25);-moz-opacity:0.25;opacity:0.25;z-index:9501}.wysija_image.empty.active,.wysija_text.empty.active{display:block;margin:0}#wysija_header .wysija_image.active,#wysija_footer .wysija_image.active{left:0;top:0;right:0}.wysija_header .image_placeholder,.wysija_footer .image_placeholder{border:0 none !important;margin:0 !important}.wysija_header .image_placeholder.active,.wysija_footer .image_placeholder.active{border:0 none !important}.wysija_options{display:none}.wysija_content .wysija_image{margin:0 auto 15px auto;cursor:move}.wysija_header .wysija_content.left .wysija_image,.wysija_header .wysija_content.right .wysija_image,.wysija_footer .wysija_content.left .wysija_image,.wysija_footer .wysija_content.right .wysija_image{margin:0 0 0 0 !important}.wysija_content.center .image_placeholder.active{margin:0 0 -2px 0}.wysija_header .wysija_content.center .wysija_image,.wysija_footer .wysija_content.center .wysija_image{margin:0 auto !important}.wysija_header .wysija_content.center .image_placeholder.active,.wysija_footer .wysija_content.center .image_placeholder.active{margin:0}.wysija_block .wysija_content.center .wysija_image.empty.active{margin-bottom:5px !important}.wysija_content.left{float:none}.wysija_gallery.left{float:left}.wysija_content.left .wysija_image{float:left;margin:0 15px 5px 0}.wysija_content.left .wysija_image.active{margin:0 13px 3px 0}.wysija_content.left .wysija_image.empty.active{margin:0 15px 5px 0 !important}.wysija_gallery.right{float:right}.wysija_content.right .wysija_image{float:right;margin:0 0 5px 15px}.wysija_content.right .wysija_image.active{margin:0 0 3px 13px}.wysija_content.right .wysija_image.empty.active{margin:0 0 5px 15px !important}.wysija_content .wysija_image.alone{margin:0 !important}.wysija_content.center .wysija_image.alone{margin:0 auto !important}.wysija_image{position:relative;z-index:999}.wysija_image .url-info{position:absolute;bottom:0;left:0;font-size:0.7em;padding:2px;color:#000;background-color:#fff;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";filter:alpha(opacity=80);-moz-opacity:0.8;opacity:0.8}.wysija_content.left .wysija_image .url-info{right:0;left:auto}.wysija_text{position:relative;z-index:998}.wysija_text.wysija_editing{border:1px solid #dfdfdf}.wysija_content.left .wysija_text.wysija_editing{float:left}.wysija_text .wysija_editable:hover{cursor:pointer}#wysija_toolbar{left:657px;position:absolute;top:-1000px;width:295px}#wysija_toolbar .wysija_toolbar_tabs{border-bottom:1px solid #dfdfdf;line-height:0}#wysija_toolbar .wysija_toolbar_tabs li,#wysija_toolbar .wysija_toolbar_tabs a{margin:0;height:30px;line-height:30px;padding:0;display:-moz-inline-box;display:inline-block;*display:inline;*float:left;outline:0 none}#wysija_toolbar .wysija_toolbar_tabs a{outline:0 none;text-decoration:none;color:#a6a6a6}#wysija_toolbar .wysija_toolbar_tabs li{margin:0 0 1px 0}#wysija_toolbar .wysija_toolbar_tabs a{font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;background-color:#F5F5F5;background-image:-moz-linear-gradient(center top, #F9F9F9, #F5F5F5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#F5F5F5', endColorstr='#F9F9F9');background:-webkit-gradient(linear, left top, left bottom, from(#F9F9F9), to(#F5F5F5));border:1px solid #DFDFDF;-moz-border-radius:3px 3px 0 0;-webkit-border-radius:3px 3px 0 0;-khtml-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;box-shadow:0 1px 0 #FFFFFF inset;padding:0 7px}#wysija_toolbar .wysija_toolbar_tabs a:hover{background-color:#eee}#wysija_toolbar .wysija_toolbar_tabs a.selected{color:#000;border-bottom:0 none;background:#fcfcfc;filter:none;padding-bottom:1px}#wysija_toolbar .wysija_toolbar_tabs,#wysija_toolbar .wj_content,#wysija_toolbar .wj_images,#wysija_toolbar .wj_styles,#wysija_toolbar .wj_themes{position:relative;z-index:9998;margin:0}#wysija_toolbar #wysija_notices span{font-size:12px !important;font-weight:normal !important}.wj_content{background-color:#fcfcfc;border:1px solid #dfdfdf;border-top:0 none;padding:0 0 10px 0}.wj_content li{padding:10px 10px 0 10px;position:relative}.wj_content li.notice{font-style:italic;font-size:11px;margin:0 !important;border:0 none !important;background:none !important}.wj_images{z-index:999;background-color:#fcfcfc;border:1px solid #dfdfdf;border-top:0 none;padding:9px}.wj_images ul{min-height:200px;max-height:600px;height:360px;overflow:auto;margin:0;padding:0}.wj_images li{float:left;width:80px;margin:2px;height:80px;overflow:hidden;position:relative;border:1px solid #dfdfdf}.wj_images li img{max-height:150px;width:80px}.wj_images li a{float:left;display:block;height:80px;width:80px}.wj_button{text-align:center;width:265px;margin:20px 0;height:30px;line-height:30px}.wj_images img{cursor:move;max-width:275px}#wysija-upload-browse,#wysija-themes-browse{float:none}.wj_images #wj_images_preview{border:3px solid #dfdfdf;position:absolute;right:295px;top:0;background-color:#fff}.wj_styles{z-index:999;background-color:#fcfcfc;border:1px solid #dfdfdf;border-top:0 none;padding:9px}.wj_styles p{margin:10px 0}.wj_styles .preview{width:20px;float:none !important;height:20px;vertical-align:middle;display:-moz-inline-box;display:inline-block;*display:inline;*float:left;border:1px solid #333}.wj_styles input,.wj_styles select{height:20px;border:0 none;border:1px solid #CCC;margin:0 3px 0 0 !important;padding:0 !important;vertical-align:middle;line-height:20px;font-size:12px}.wj_styles #aUnderlineInput{margin:0 0 0 10px !important}.wj_styles select{width:75px}.wj_styles input.checkbox,.wj_styles input[type=checkbox]{border:0 none !important}.wj_styles input.color{width:55px;padding:0 0 0 2px !important}.wj_styles input.color.disabled{background-color:#eee !important;color:#eee !important}.wj_styles select.small-size{width:50px}.wj_styles select.type{width:68px}.wj_styles select.size{width:58px}.wj_styles form label{cursor:normal;margin:0 0 0 3px}.wj_themes{z-index:999;background-color:#fcfcfc;border:1px solid #dfdfdf;border-top:0 none;padding:9px}.wj_themes ul{height:360px;overflow:auto;margin:0;padding:0}.wj_themes li{float:left;width:80px;margin:2px;height:80px;overflow:hidden;border:1px solid #dfdfdf;position:relative}.wj_themes li img{max-height:150px;width:80px}.wj_themes li a{display:block}.wj_themes #wj_themes_preview{border:3px solid #dfdfdf;position:absolute;right:295px;top:0;background-color:#fff}.wysija_widget{width:275px;height:25px;line-height:25px;z-index:9999 !important}.wj_content a.wysija_item,.wysija_widget{height:25px;line-height:25px;background-color:#F5F5F5;background-image:-moz-linear-gradient(center top, #f9f9f9, #ececec);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#ececec');background:-webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#ececec));border:1px solid #DFDFDF;-moz-border-radius:3px;-webkit-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;box-shadow:0 1px 0 #FFFFFF inset;display:block;font-size:12px;font-weight:bold;padding:0 0 0 7px;cursor:move;color:#222;text-shadow:0 1px 0 #FFFFFF}.wj_content a.wysija_item.disabled{cursor:help;color:#cccccc}.wysija_item_settings{position:absolute;right:15px;top:13px}.wysija_widget.image{z-index:9999 !important;height:auto !important;width:150px !important;background:none !important;border:0 none !important;box-shadow:none !important;border-radius:0 !important;padding:0 !important}#wysija_notices{z-index:20000;position:relative;left:0;top:0;padding:5px;border:1px solid #dfdfdf;border-top:0 none}#wysija_notices.notice{background-color:#FFFFE0;border-color:#E6DB55;z-index:9999}#wysija_notices.error{background-color:#FFEBE8;border-color:#CC0000}#wysija_notice_msg{font-size:14px;font-weight:bold}.align-center{text-align:center}.align-left{text-align:left}.align-right{text-align:right}.align-justify{text-align:justify}.wysija_gallery{position:relative}.wysija_gallery.center{margin:0 auto}.wysija_gallery.right{text-align:right}.wysija_gallery.left{text-align:left}.wysija_row{width:100%}.wysija_cell{float:left;text-align:center}.resize-controls{position:absolute;left:0;right:0;top:0;bottom:0;z-index:99000;border:1px dashed #ccc}.resize-handle{position:absolute;bottom:0;right:0;width:20px;height:20px;border:0 none;z-index:1001;cursor:se-resize;background:transparent url(../img/controls/resize-se.png) no-repeat scroll right bottom}.resize-info{position:absolute;bottom:0;left:4px;font-size:0.8em;padding:0;margin:0;text-shadow:0 1px 0 #F7F5F2;white-space:nowrap}.right .resize-handle{position:absolute;bottom:0;left:0;width:20px;height:20px;border:0 none;z-index:1001;cursor:sw-resize;background:transparent url(../img/controls/resize-sw.png) no-repeat scroll left bottom}.right .resize-info{left:auto !important;right:4px}#adminmenu li .wp-submenu,.folded #adminmenu .wp-has-current-submenu .wp-submenu{z-index:1001 !important}.wysija_divider{margin:0 auto;width:564px}.wysija_block.auto-post.hover .wysija_content *,.wysija_block.auto-post.hover .wysija_divider{z-index:1000;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";filter:alpha(opacity=30);-moz-opacity:0.3;opacity:0.3}.wysija_auto-post .wysija_divider{text-align:center;margin:0 !important;width:100% !important}.wysija_auto-post .nopost{height:100px}.wysija_auto-post .nopost p{margin:25px 0 0 0}.wysija_settings{left:10px;position:absolute;top:0;z-index:1000}.wysija_settings a{background-color:#F5F5F5;background-image:-moz-linear-gradient(center top, #f9f9f9, #ececec);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#ececec');background:-webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#ececec));border:1px solid #DFDFDF;-moz-border-radius:3px;-webkit-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;box-shadow:0 1px 0 #FFFFFF inset;font-size:12px;font-weight:normal;cursor:pointer;color:#222;text-shadow:0 1px 0 #FFFFFF;text-decoration:none;display:block;padding:5px 5px 3px 27px}.wysija_settings a span{width:20px;height:20px;position:absolute;top:3px;left:5px}#wysija_toggle_images{position:absolute;top:5px;right:5px;z-index:1000;width:73px;height:33px;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";filter:alpha(opacity=50);-moz-opacity:0.5;opacity:0.5;background-color:#fff}#wysija_toggle_images.on{background:url(../img/controls/images-toggle-on.png) no-repeat}#wysija_toggle_images.off{background:url(../img/controls/images-toggle-off.png) no-repeat}#wysija_toggle_images:hover{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";filter:alpha(opacity=100);-moz-opacity:1.0;opacity:1.0}.wysija_block.auto-post{padding:0 !important}.wysija_auto-post .wysija_content{padding:10px 17px !important}.wysija_auto-post .wysija_content:after{content:".";display:block;height:0;clear:both;visibility:hidden}.wysija_auto-post .wysija_content{display:inline-table}* html .wysija_auto-post .wysija_content{height:1%}.wysija_auto-post .wysija_content{display:block}.wysija_auto-post .wysija_divider{padding:9px 0 !important}.wysija_block.auto-post.hover .wysija_content{padding:10px 17px !important}.wysija_auto-post .wysija_text{pointer-events:none;cursor:default}.wysija_auto-post .wysija_image{pointer-events:none;cursor:default}.auto-post.hover .wysija_content:last-child{padding:9px 17px 9px 17px !important}.wysija_auto-post .loading{padding:10px 17px;font-size:10px}#wysija_popup_overlay{background-color:#000;height:100%;left:0;position:fixed;top:0;width:100%;z-index:999989;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=75)";filter:alpha(opacity=75);-moz-opacity:0.75;opacity:0.75}#wysija_popup_overlay.loading{background:url(../img/popup/loading.gif) no-repeat 50% 50% #000}#wysija_popup{position:absolute;top:0;left:0;width:600px;height:400px;background-color:#fff;z-index:999999;-moz-border-radius:3px;-webkit-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;-moz-box-shadow:#000 0 4px 30px;-webkit-box-shadow:#000 0 4px 30px;-khtml-box-shadow:#000 0 4px 30px;box-shadow:#000 0 4px 30px;border:1px solid #555}#wysija_popup_content{padding:0;overflow:hidden;position:relative}#wysija_popup_title{background-color:#222;border:1px solid #333;height:27px;margin:0;padding:0}#wysija_popup_title h3{color:#cfcfcf;font-size:12px;font-weight:normal;margin:6px 0 0 10px;padding:0;float:left;font:12px "Lucida Grande", Verdana, Arial, sans-serif}#wysija_popup_iframe{border:0 none;outline:0 none}#wysija_popup_close{background:url(../img/popup/close.png) no-repeat;height:15px;width:15px;background-color:#333;display:block;float:right;margin:6px 10px 0 0}.mpoet-ui .wysija_item_settings{text-decoration:none}.mpoet-ui .settings span{background:none;color:#999}.mpoet-ui .wysija_item_settings:hover .dashicons-admin-generic:before,.mpoet-ui .settings:hover .dashicons-admin-generic:before{color:#2ea2cc}.wp_themeSkin .mceToolbar{margin:0 !important;padding:0 !important}
css/wysija-form-editor.css CHANGED
@@ -1 +1 @@
1
- .clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}.clearfix{display:inline-table}* html .clearfix{height:1%}.clearfix{display:block}.hidden{display:none}strong{font-weight:bold}img{vertical-align:middle}:focus{outline:0 !important}.inline{display:-moz-inline-box;display:inline-block;*display:inline;*float:left}#form-error{padding:10px;-moz-border-radius:3px;-webkit-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;color:#000;font-weight:normal;background-color:#ffebe8;border:1px solid #c00}#form-notice{padding:10px;-moz-border-radius:3px;-webkit-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;color:#555555;font-weight:normal;background-color:#FFFBCC;border:1px solid #E6DB55}#wysija_form_editor{padding:20px;width:600px;border:1px solid #ccc;position:relative;background-color:#fff;-webkit-box-shadow:0 0 4px rgba(0,0,0,0.2),inset 0 0 20px rgba(0,0,0,0.1);-moz-box-shadow:0 0 4px rgba(0,0,0,0.2),inset 0 0 20px rgba(0,0,0,0.1);box-shadow:0 0 5px rgba(0,0,0,0.2),inset 0 0 20px rgba(0,0,0,0.1)}#wysija_form_editor:before,#wysija_form_editor:after{position:absolute;width:40%;height:10px;content:' ';left:12px;bottom:12px;background:transparent;-webkit-transform:skew(-5deg) rotate(-5deg);-moz-transform:skew(-5deg) rotate(-5deg);-ms-transform:skew(-5deg) rotate(-5deg);-o-transform:skew(-5deg) rotate(-5deg);transform:skew(-5deg) rotate(-5deg);-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.3);-moz-box-shadow:0 6px 12px rgba(0,0,0,0.3);box-shadow:0 6px 12px rgba(0,0,0,0.3);z-index:-1}#wysija_form_editor:after{left:auto;right:12px;-webkit-transform:skew(5deg) rotate(5deg);-moz-transform:skew(5deg) rotate(5deg);-ms-transform:skew(5deg) rotate(5deg);-o-transform:skew(5deg) rotate(5deg);transform:skew(5deg) rotate(5deg)}.wysija_form_block .wysija_warning{font-weight:bold;color:#900}.block_placeholder{margin:0;border:0 none}.block_placeholder.active{border:1px dashed #b4b4b4;margin:10px;display:block}.block_placeholder.hover{margin:10px;border:1px dashed #b4b4b4;background-color:#f5f5f5}.wysija_form_block{background-color:#fff;height:20px;border:0 none}.wysija_form_block.highlighted{border:1px solid #5897FB;padding:9px 17px}.wysija_form_block img{max-width:100%}.wysija_form_block p{margin:5px 0;word-wrap:break-word}.wysija_form_block p input.radio,.wysija_form_block p input.checkbox{margin:0 5px 0 0}#wysija_form_container{width:640px;margin:0}#wysija-add-field{float:none}#wysija_form_toolbar{position:absolute;width:295px}#wysija_form_toolbar .wysija_form_toolbar_tabs{border-bottom:1px solid #dfdfdf;line-height:0}#wysija_form_toolbar .add_custom_field{text-align:center;padding:15px 0 5px 0}#wysija_form_toolbar .wysija_form_toolbar_tabs li,#wysija_form_toolbar .wysija_form_toolbar_tabs a{margin:0;height:30px;line-height:30px;padding:0;display:-moz-inline-box;display:inline-block;*display:inline;*float:left;outline:0 none}#wysija_form_toolbar .wysija_form_toolbar_tabs a{outline:0 none;text-decoration:none;color:#a6a6a6}#wysija_form_toolbar .wysija_form_toolbar_tabs li{margin:0 0 1px 0}#wysija_form_toolbar .wysija_form_toolbar_tabs a{font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;background-color:#F5F5F5;background-image:-moz-linear-gradient(center top, #f9f9f9, #f5f5f5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#F5F5F5', endColorstr='#F9F9F9');background:-webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#f5f5f5));border:1px solid #DFDFDF;-moz-border-radius:3px 3px 0 0;-webkit-border-radius:3px 3px 0 0;-khtml-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;box-shadow:0 1px 0 #FFFFFF inset;padding:0 7px}#wysija_form_toolbar .wysija_form_toolbar_tabs a:hover{background-color:#eee}#wysija_form_toolbar .wysija_form_toolbar_tabs a.selected{color:#000;border-bottom:0 none;background:#fcfcfc;filter:none;padding-bottom:1px}#wysija_form_toolbar .wysija_form_toolbar_tabs,#wysija_form_toolbar .wj_content,#wysija_form_toolbar .wj_images,#wysija_form_toolbar .wj_styles,#wysija_form_toolbar .wj_themes{position:relative;z-index:9998;margin:0}.wysija_form_widget{width:275px;height:25px;line-height:25px;z-index:9999 !important}#wysija_form_toolbar a.wysija_form_item,.wysija_form_widget{height:25px;line-height:25px;background-color:#F5F5F5;background-image:-moz-linear-gradient(center top, #f9f9f9, #ececec);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#ececec');background:-webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#ececec));border:1px solid #DFDFDF;-moz-border-radius:3px;-webkit-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;box-shadow:0 1px 0 #FFFFFF inset;display:block;font-size:12px;font-weight:bold;padding:0 0 0 7px;cursor:move;color:#222;text-shadow:0 1px 0 #FFFFFF}#wysija_form_toolbar a.wysija_form_item.disabled{cursor:pointer;color:#cccccc;pointer-events:none}.wysija_form_item_settings{position:absolute;right:35px;top:13px}.wysija_form_item_delete{position:absolute;right:15px;top:13px}.wj_content{background-color:#fcfcfc;border:1px solid #dfdfdf;padding:0 0 10px 0}.wj_content li{padding:10px 10px 0 10px;position:relative}.wj_content li.notice{font-style:italic;font-size:11px;margin:0 !important;border:0 none !important;background:none !important}.wysija_form_block{position:relative;margin:0;padding:10px 18px 10px 18px;display:inline-table;display:block;height:1%;margin:0;z-index:98}.wysija_form_block.dragging{z-index:99000;pointer-events:none}.wysija_form_block:after{content:".";display:block;height:0;clear:both;visibility:hidden}.wysija_form_block.hover{border:1px dashed #bbb;margin:0 0 0 0;padding:9px 17px 9px 17px}.wysija_form_block.static{background-color:#999}.wysija_form_block .wysija_controls{background-color:#dfdfdf;background-image:-moz-linear-gradient(center bottom, #bbb, #eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#bbbbbb');background:-webkit-gradient(linear, left bottom, left top, from(#bbb), to(#eee));-moz-border-radius:2px;-webkit-border-radius:2px;-khtml-border-radius:2px;border-radius:2px;border:1px solid #ccc;position:absolute;margin:0;padding:0;width:598px;height:20px;left:-1px;right:0;top:-22px}.wysija_form_block .wysija_controls li{float:left;width:20px;height:20px}.wysija_form_block .wysija_controls a{cursor:pointer;float:left;font-size:120%;font-weight:bold;height:20px;line-height:20px;text-align:center;width:20px;color:#000}.wysija_form_block .wysija_controls a.remove{margin:0 0 0 1px}.wysija_form_block .handle_container,.wysija_form_block .handle_container a{float:none;width:40px !important}.wysija_form_block .handle_container{left:280px;top:0;position:absolute}.wysija_controls a span,.wysija_gallery .wysija_tools a span,.wysija_image .wysija_tools a span,.wysija_text .wysija_tools a span,.wj_content a span{display:block;height:20px;width:20px}.wysija_controls span input{margin:2px 0 0 0;padding:0;color:transparent}.alignment-left span{background:url(../img/controls/icons.png) no-repeat 0 0}.alignment-left.active span,.alignment-left:hover span{background:url(../img/controls/icons.png) no-repeat 0 -20px}.alignment-center span{background:url(../img/controls/icons.png) no-repeat -20px 0}.alignment-center.active span,.alignment-center:hover span{background:url(../img/controls/icons.png) no-repeat -20px -20px}.alignment-right span{background:url(../img/controls/icons.png) no-repeat -40px 0}.alignment-right.active span,.alignment-right:hover span{background:url(../img/controls/icons.png) no-repeat -40px -20px}.add-link span{background:url(../img/controls/icons.png) no-repeat -60px 0}.add-link.active span,.add-link:hover span{background:url(../img/controls/icons.png) no-repeat -60px -20px}.remove-link span{background:url(../img/controls/icons.png) no-repeat -80px 0}.remove-link.active span,.remove-link:hover span{background:url(../img/controls/icons.png) no-repeat -80px -20px}.remove span,.delete span{background:url(../img/controls/icons.png) no-repeat -100px 0}.remove.active span,.remove:hover span,.delete.active span,.delete:hover span{background:url(../img/controls/icons.png) no-repeat -100px -20px}.handle span{background:url(../img/controls/grip-handle.png) no-repeat;cursor:move;width:40px !important}.duplicate span{background:url(../img/controls/icons.png) no-repeat -140px 0}.duplicate.active span,.duplicate:hover span{background:url(../img/controls/icons.png) no-repeat -140px -20px}.settings span{background:url(../img/controls/icons.png) no-repeat -160px 0}.settings.active span,.settings:hover span{background:url(../img/controls/icons.png) no-repeat -160px -20px}.icon-plus span{background:url(../img/controls/icons.png) no-repeat -200px 0}.icon-plus.active span,.icon-plus:hover span{background:url(../img/controls/icons.png) no-repeat -200px -20px}.icon-minus span{background:url(../img/controls/icons.png) no-repeat -220px 0}.icon-minus.active span,.icon-minus:hover span{background:url(../img/controls/icons.png) no-repeat -220px -20px}.wysija_options{display:none}.wysija_settings{left:10px;position:absolute;top:0;z-index:1000}.wysija_settings a{background-color:#F5F5F5;background-image:-moz-linear-gradient(center top, #f9f9f9, #ececec);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#ececec');background:-webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#ececec));border:1px solid #DFDFDF;-moz-border-radius:3px;-webkit-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;box-shadow:0 1px 0 #FFFFFF inset;font-size:12px;font-weight:normal;cursor:pointer;color:#222;text-shadow:0 1px 0 #FFFFFF;text-decoration:none;display:block;padding:5px 5px 3px 27px}.wysija_settings a span{width:20px;height:20px;position:absolute;top:3px;left:5px}.wysija_form_block label{margin:0 5px 0 0;display:block}#wysija_widget_templates{display:none}#wysija_popup_overlay{background-color:#000;height:100%;left:0;position:fixed;top:0;width:100%;z-index:999998;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=75)";filter:alpha(opacity=75);-moz-opacity:0.75;opacity:0.75}#wysija_popup_overlay.loading{background:url(../img/popup/loading.gif) no-repeat 50% 50% #000}#wysija_popup{position:absolute;top:0;left:0;width:600px;height:400px;background-color:#fff;z-index:999999;-moz-border-radius:3px;-webkit-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;-moz-box-shadow:#000 0 4px 30px;-webkit-box-shadow:#000 0 4px 30px;-khtml-box-shadow:#000 0 4px 30px;box-shadow:#000 0 4px 30px;border:1px solid #555}#wysija_popup_content{padding:0;overflow:hidden;clear:both}#wysija_popup_title{background-color:#222;border:1px solid #333;height:27px;margin:0;padding:0}#wysija_popup_title h3{color:#cfcfcf;font-size:12px;font-weight:normal;margin:6px 0 0 10px;padding:0;float:left;font:12px "Lucida Grande", Verdana, Arial, sans-serif}#wysija_popup_title.empty{background-color:transparent;height:0;border:0 none}#wysija_popup_iframe{border:0 none;outline:0 none}#wysija_popup_close{background:url(../img/popup/close.png) no-repeat;height:15px;width:15px;background-color:#333;display:block;float:right;margin:6px 10px 0 0}h2.title{height:40px;line-height:40px;margin:0 0 15px 0}h2.title span,h2.title form{float:left;margin:0 5px 0 0;vertical-align:middle}h2.title span#form-name{padding:0 3px;margin:0 10px 0 0;font-style:italic}h2.title span#form-name-default{display:none}h2.title #edit-form-name{float:left;margin:10px 5px 0 0}h2.title input{margin:0 10px 0 0}#list-selection{margin:30px 0 0 0}#list-selection label{display:block}#after-submit{margin:30px 0 0 0}#after-submit textarea{width:300px;height:50px}#form-export-links{margin:20px 0 0 0}#form-export textarea{width:100%;height:100px}#wysija_notices{z-index:20000;position:relative;left:0;top:0;padding:5px;border:1px solid #dfdfdf;border-top:0 none}#wysija_notices.notice{background-color:#FFFFE0;border-color:#E6DB55;z-index:9999}#wysija_notices.error{background-color:#FFEBE8;border-color:#CC0000}#wysija_notice_msg{font-size:14px;font-weight:bold}.expand-code{cursor:pointer}.wysija_form_block textarea{resize:none}.mpoet-ui .wysija_form_item_settings,.mpoet-ui .wysija_form_item_delete{text-decoration:none}.mpoet-ui .wysija_form_item_settings:hover .dashicons-admin-generic:before,.mpoet-ui .wysija_form_item_delete:hover .dashicons-dismiss:before,.mpoet-ui .settings:hover .dashicons-admin-generic:before{color:#2ea2cc}.mpoet-ui .settings span,.mpoet-ui .delete span{background:none;color:#999}.mpoet-ui .delete span:before{font-size:21px}
1
+ .clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}.clearfix{display:inline-table}* html .clearfix{height:1%}.clearfix{display:block}.hidden{display:none}strong{font-weight:bold}img{vertical-align:middle}:focus{outline:0 !important}.inline{display:-moz-inline-box;display:inline-block;*display:inline;*float:left}#form-error{padding:10px;-moz-border-radius:3px;-webkit-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;color:#000;font-weight:normal;background-color:#ffebe8;border:1px solid #c00}#form-notice{padding:10px;-moz-border-radius:3px;-webkit-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;color:#555555;font-weight:normal;background-color:#FFFBCC;border:1px solid #E6DB55}#wysija_form_editor{padding:20px;width:600px;border:1px solid #ccc;position:relative;background-color:#fff;-webkit-box-shadow:0 0 4px rgba(0,0,0,0.2),inset 0 0 20px rgba(0,0,0,0.1);-moz-box-shadow:0 0 4px rgba(0,0,0,0.2),inset 0 0 20px rgba(0,0,0,0.1);box-shadow:0 0 5px rgba(0,0,0,0.2),inset 0 0 20px rgba(0,0,0,0.1)}#wysija_form_editor:before,#wysija_form_editor:after{position:absolute;width:40%;height:10px;content:' ';left:12px;bottom:12px;background:transparent;-webkit-transform:skew(-5deg) rotate(-5deg);-moz-transform:skew(-5deg) rotate(-5deg);-ms-transform:skew(-5deg) rotate(-5deg);-o-transform:skew(-5deg) rotate(-5deg);transform:skew(-5deg) rotate(-5deg);-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.3);-moz-box-shadow:0 6px 12px rgba(0,0,0,0.3);box-shadow:0 6px 12px rgba(0,0,0,0.3);z-index:-1}#wysija_form_editor:after{left:auto;right:12px;-webkit-transform:skew(5deg) rotate(5deg);-moz-transform:skew(5deg) rotate(5deg);-ms-transform:skew(5deg) rotate(5deg);-o-transform:skew(5deg) rotate(5deg);transform:skew(5deg) rotate(5deg)}.wysija_form_block .wysija_warning{font-weight:bold;color:#900}.block_placeholder{margin:0;border:0 none}.block_placeholder.active{border:1px dashed #b4b4b4;margin:10px;display:block}.block_placeholder.hover{margin:10px;border:1px dashed #b4b4b4;background-color:#f5f5f5}.wysija_form_block{background-color:#fff;height:20px;border:0 none}.wysija_form_block.highlighted{border:1px solid #5897FB;padding:9px 17px}.wysija_form_block img{max-width:100%}.wysija_form_block p{margin:5px 0;word-wrap:break-word}.wysija_form_block p input.radio,.wysija_form_block p input.checkbox{margin:0 5px 0 0}#wysija_form_container{width:640px;margin:0}#wysija-add-field{float:none}#wysija_form_toolbar{position:absolute;width:295px}#wysija_form_toolbar .wysija_form_toolbar_tabs{border-bottom:1px solid #dfdfdf;line-height:0}#wysija_form_toolbar .add_custom_field{text-align:center;padding:15px 0 5px 0}#wysija_form_toolbar .wysija_form_toolbar_tabs li,#wysija_form_toolbar .wysija_form_toolbar_tabs a{margin:0;height:30px;line-height:30px;padding:0;display:-moz-inline-box;display:inline-block;*display:inline;*float:left;outline:0 none}#wysija_form_toolbar .wysija_form_toolbar_tabs a{outline:0 none;text-decoration:none;color:#a6a6a6}#wysija_form_toolbar .wysija_form_toolbar_tabs li{margin:0 0 1px 0}#wysija_form_toolbar .wysija_form_toolbar_tabs a{font-family:Georgia,"Times New Roman","Bitstream Charter",Times,serif;background-color:#F5F5F5;background-image:-moz-linear-gradient(center top, #F9F9F9, #F5F5F5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#F5F5F5', endColorstr='#F9F9F9');background:-webkit-gradient(linear, left top, left bottom, from(#F9F9F9), to(#F5F5F5));border:1px solid #DFDFDF;-moz-border-radius:3px 3px 0 0;-webkit-border-radius:3px 3px 0 0;-khtml-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;box-shadow:0 1px 0 #FFFFFF inset;padding:0 7px}#wysija_form_toolbar .wysija_form_toolbar_tabs a:hover{background-color:#eee}#wysija_form_toolbar .wysija_form_toolbar_tabs a.selected{color:#000;border-bottom:0 none;background:#fcfcfc;filter:none;padding-bottom:1px}#wysija_form_toolbar .wysija_form_toolbar_tabs,#wysija_form_toolbar .wj_content,#wysija_form_toolbar .wj_images,#wysija_form_toolbar .wj_styles,#wysija_form_toolbar .wj_themes{position:relative;z-index:9998;margin:0}.wysija_form_widget{width:275px;height:25px;line-height:25px;z-index:9999 !important}#wysija_form_toolbar a.wysija_form_item,.wysija_form_widget{height:25px;line-height:25px;background-color:#F5F5F5;background-image:-moz-linear-gradient(center top, #f9f9f9, #ececec);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#ececec');background:-webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#ececec));border:1px solid #DFDFDF;-moz-border-radius:3px;-webkit-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;box-shadow:0 1px 0 #FFFFFF inset;display:block;font-size:12px;font-weight:bold;padding:0 0 0 7px;cursor:move;color:#222;text-shadow:0 1px 0 #FFFFFF}#wysija_form_toolbar a.wysija_form_item.disabled{cursor:pointer;color:#cccccc;pointer-events:none}.wysija_form_item_settings{position:absolute;right:35px;top:13px}.wysija_form_item_delete{position:absolute;right:15px;top:13px}.wj_content{background-color:#fcfcfc;border:1px solid #dfdfdf;padding:0 0 10px 0}.wj_content li{padding:10px 10px 0 10px;position:relative}.wj_content li.notice{font-style:italic;font-size:11px;margin:0 !important;border:0 none !important;background:none !important}.wysija_form_block{position:relative;margin:0;padding:10px 18px 10px 18px;display:inline-table;display:block;height:1%;margin:0;z-index:98}.wysija_form_block.dragging{z-index:99000;pointer-events:none}.wysija_form_block:after{content:".";display:block;height:0;clear:both;visibility:hidden}.wysija_form_block.hover{border:1px dashed #bbb;margin:0 0 0 0;padding:9px 17px 9px 17px}.wysija_form_block.static{background-color:#999}.wysija_form_block .wysija_controls{background-color:#dfdfdf;background-image:-moz-linear-gradient(center bottom, #bbb, #eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#bbbbbb');background:-webkit-gradient(linear, left bottom, left top, from(#bbb), to(#eee));-moz-border-radius:2px;-webkit-border-radius:2px;-khtml-border-radius:2px;border-radius:2px;border:1px solid #ccc;position:absolute;margin:0;padding:0;width:598px;height:20px;left:-1px;right:0;top:-22px}.wysija_form_block .wysija_controls li{float:left;width:20px;height:20px}.wysija_form_block .wysija_controls a{cursor:pointer;float:left;font-size:120%;font-weight:bold;height:20px;line-height:20px;text-align:center;width:20px;color:#000}.wysija_form_block .wysija_controls a.remove{margin:0 0 0 1px}.wysija_form_block .handle_container,.wysija_form_block .handle_container a{float:none;width:40px !important}.wysija_form_block .handle_container{left:280px;top:0;position:absolute}.wysija_controls a span,.wysija_gallery .wysija_tools a span,.wysija_image .wysija_tools a span,.wysija_text .wysija_tools a span,.wj_content a span{display:block;height:20px;width:20px}.wysija_controls span input{margin:2px 0 0 0;padding:0;color:transparent}.alignment-left span{background:url(../img/controls/icons.png) no-repeat 0 0}.alignment-left.active span,.alignment-left:hover span{background:url(../img/controls/icons.png) no-repeat 0 -20px}.alignment-center span{background:url(../img/controls/icons.png) no-repeat -20px 0}.alignment-center.active span,.alignment-center:hover span{background:url(../img/controls/icons.png) no-repeat -20px -20px}.alignment-right span{background:url(../img/controls/icons.png) no-repeat -40px 0}.alignment-right.active span,.alignment-right:hover span{background:url(../img/controls/icons.png) no-repeat -40px -20px}.add-link span{background:url(../img/controls/icons.png) no-repeat -60px 0}.add-link.active span,.add-link:hover span{background:url(../img/controls/icons.png) no-repeat -60px -20px}.remove-link span{background:url(../img/controls/icons.png) no-repeat -80px 0}.remove-link.active span,.remove-link:hover span{background:url(../img/controls/icons.png) no-repeat -80px -20px}.remove span,.delete span{background:url(../img/controls/icons.png) no-repeat -100px 0}.remove.active span,.remove:hover span,.delete.active span,.delete:hover span{background:url(../img/controls/icons.png) no-repeat -100px -20px}.handle span{background:url(../img/controls/grip-handle.png) no-repeat;cursor:move;width:40px !important}.duplicate span{background:url(../img/controls/icons.png) no-repeat -140px 0}.duplicate.active span,.duplicate:hover span{background:url(../img/controls/icons.png) no-repeat -140px -20px}.settings span{background:url(../img/controls/icons.png) no-repeat -160px 0}.settings.active span,.settings:hover span{background:url(../img/controls/icons.png) no-repeat -160px -20px}.icon-plus span{background:url(../img/controls/icons.png) no-repeat -200px 0}.icon-plus.active span,.icon-plus:hover span{background:url(../img/controls/icons.png) no-repeat -200px -20px}.icon-minus span{background:url(../img/controls/icons.png) no-repeat -220px 0}.icon-minus.active span,.icon-minus:hover span{background:url(../img/controls/icons.png) no-repeat -220px -20px}.wysija_options{display:none}.wysija_settings{left:10px;position:absolute;top:0;z-index:1000}.wysija_settings a{background-color:#F5F5F5;background-image:-moz-linear-gradient(center top, #f9f9f9, #ececec);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#ececec');background:-webkit-gradient(linear, left top, left bottom, from(#f9f9f9), to(#ececec));border:1px solid #DFDFDF;-moz-border-radius:3px;-webkit-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;box-shadow:0 1px 0 #FFFFFF inset;font-size:12px;font-weight:normal;cursor:pointer;color:#222;text-shadow:0 1px 0 #FFFFFF;text-decoration:none;display:block;padding:5px 5px 3px 27px}.wysija_settings a span{width:20px;height:20px;position:absolute;top:3px;left:5px}.wysija_form_block label{margin:0 5px 0 0;display:block}#wysija_widget_templates{display:none}#wysija_popup_overlay{background-color:#000;height:100%;left:0;position:fixed;top:0;width:100%;z-index:999998;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=75)";filter:alpha(opacity=75);-moz-opacity:0.75;opacity:0.75}#wysija_popup_overlay.loading{background:url(../img/popup/loading.gif) no-repeat 50% 50% #000}#wysija_popup{position:absolute;top:0;left:0;width:600px;height:400px;background-color:#fff;z-index:999999;-moz-border-radius:3px;-webkit-border-radius:3px;-khtml-border-radius:3px;border-radius:3px;-moz-box-shadow:#000 0 4px 30px;-webkit-box-shadow:#000 0 4px 30px;-khtml-box-shadow:#000 0 4px 30px;box-shadow:#000 0 4px 30px;border:1px solid #555}#wysija_popup_content{padding:0;overflow:hidden;clear:both}#wysija_popup_title{background-color:#222;border:1px solid #333;height:27px;margin:0;padding:0}#wysija_popup_title h3{color:#cfcfcf;font-size:12px;font-weight:normal;margin:6px 0 0 10px;padding:0;float:left;font:12px "Lucida Grande", Verdana, Arial, sans-serif}#wysija_popup_title.empty{background-color:transparent;height:0;border:0 none}#wysija_popup_iframe{border:0 none;outline:0 none}#wysija_popup_close{background:url(../img/popup/close.png) no-repeat;height:15px;width:15px;background-color:#333;display:block;float:right;margin:6px 10px 0 0}h2.title{height:40px;line-height:40px;margin:0 0 15px 0}h2.title span,h2.title form{float:left;margin:0 5px 0 0;vertical-align:middle}h2.title span#form-name{padding:0 3px;margin:0 10px 0 0;font-style:italic}h2.title span#form-name-default{display:none}h2.title #edit-form-name{float:left;margin:10px 5px 0 0}h2.title input{margin:0 10px 0 0}#list-selection{margin:30px 0 0 0}#list-selection label{display:block}#after-submit{margin:30px 0 0 0}#after-submit textarea{width:300px;height:50px}#form-export-links{margin:20px 0 0 0}#form-export textarea{width:100%;height:100px}#wysija_notices{z-index:20000;position:relative;left:0;top:0;padding:5px;border:1px solid #dfdfdf;border-top:0 none}#wysija_notices.notice{background-color:#FFFFE0;border-color:#E6DB55;z-index:9999}#wysija_notices.error{background-color:#FFEBE8;border-color:#CC0000}#wysija_notice_msg{font-size:14px;font-weight:bold}.expand-code{cursor:pointer}.wysija_form_block textarea{resize:none}.mpoet-ui .wysija_form_item_settings,.mpoet-ui .wysija_form_item_delete{text-decoration:none}.mpoet-ui .wysija_form_item_settings:hover .dashicons-admin-generic:before,.mpoet-ui .wysija_form_item_delete:hover .dashicons-dismiss:before,.mpoet-ui .settings:hover .dashicons-admin-generic:before{color:#2ea2cc}.mpoet-ui .settings span,.mpoet-ui .delete span{background:none;color:#999}.mpoet-ui .delete span:before{font-size:21px}
helpers/mailer.php CHANGED
@@ -5,7 +5,19 @@
5
  */
6
  defined( 'WYSIJA' ) || die( 'Restricted access' );
7
 
8
- require_once ABSPATH . WPINC . '/class-phpmailer.php';
 
 
 
 
 
 
 
 
 
 
 
 
9
  require_once dirname(__FILE__) . '/blacklist.php';
10
 
11
  class WYSIJA_help_mailer extends PHPMailer {
@@ -175,7 +187,6 @@ class WYSIJA_help_mailer extends PHPMailer {
175
  break;
176
  }//endswitch
177
 
178
- $this->PluginDir = dirname(__FILE__).DS;
179
  $this->CharSet = strtolower($this->config->getValue('advanced_charset'));
180
  if(empty($this->CharSet)){
181
  $this->CharSet = 'utf-8';
5
  */
6
  defined( 'WYSIJA' ) || die( 'Restricted access' );
7
 
8
+ if (!class_exists('PHPMailer')) {
9
+ if (is_readable(ABSPATH . WPINC . '/PHPMailer/PHPMailer.php')) {
10
+ // WordPress 5.5+
11
+ require_once ABSPATH . WPINC . '/PHPMailer/PHPMailer.php';
12
+ require_once ABSPATH . WPINC . '/PHPMailer/Exception.php';
13
+ class_alias('\PHPMailer\PHPMailer\PHPMailer', 'PHPMailer');
14
+ class_alias('\PHPMailer\PHPMailer\Exception', 'phpmailerException');
15
+ } else {
16
+ // WordPress < 5.5
17
+ require_once ABSPATH . WPINC . '/class-phpmailer.php';
18
+ }
19
+ }
20
+
21
  require_once dirname(__FILE__) . '/blacklist.php';
22
 
23
  class WYSIJA_help_mailer extends PHPMailer {
187
  break;
188
  }//endswitch
189
 
 
190
  $this->CharSet = strtolower($this->config->getValue('advanced_charset'));
191
  if(empty($this->CharSet)){
192
  $this->CharSet = 'utf-8';
inc/mailer/class.mysmtp.php CHANGED
@@ -1,7 +1,17 @@
1
  <?php
2
  defined('WYSIJA') or die('Restricted access');
3
 
4
- require_once ABSPATH . WPINC . '/class-smtp.php';
 
 
 
 
 
 
 
 
 
 
5
  class WYSIJA_MySMTP extends SMTP {
6
  public function StartTLS() {
7
  stream_context_set_option($this->smtp_conn, "ssl", "verify_peer", false);
1
  <?php
2
  defined('WYSIJA') or die('Restricted access');
3
 
4
+ if (!class_exists('SMTP')) {
5
+ if (is_readable(ABSPATH . WPINC . '/PHPMailer/SMTP.php')) {
6
+ // WordPress 5.5+
7
+ require_once ABSPATH . WPINC . '/PHPMailer/SMTP.php';
8
+ class_alias('\PHPMailer\PHPMailer\SMTP', 'SMTP');
9
+ } else {
10
+ // WordPress < 5.5
11
+ require_once ABSPATH . WPINC . '/class-smtp.php';
12
+ }
13
+ }
14
+
15
  class WYSIJA_MySMTP extends SMTP {
16
  public function StartTLS() {
17
  stream_context_set_option($this->smtp_conn, "ssl", "verify_peer", false);
index.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: MailPoet 2
4
  Plugin URI: http://www.mailpoet.com/
5
  Description: Create and send newsletters or automated emails. Capture subscribers with a widget. Import and manage your lists. This version is being replaced by MailPoet 3. Support offered to Premium customers only. Updates are limited to security issues.
6
- Version: 2.13
7
  Author: MailPoet
8
  Author URI: http://www.mailpoet.com/
9
  License: GPLv2 or later
3
  Plugin Name: MailPoet 2
4
  Plugin URI: http://www.mailpoet.com/
5
  Description: Create and send newsletters or automated emails. Capture subscribers with a widget. Import and manage your lists. This version is being replaced by MailPoet 3. Support offered to Premium customers only. Updates are limited to security issues.
6
+ Version: 2.14
7
  Author: MailPoet
8
  Author URI: http://www.mailpoet.com/
9
  License: GPLv2 or later
js/admin-ajax-proto.js CHANGED
@@ -1 +1 @@
1
- function WYSIJA_SYNC_AJAX(s){$("ajax-loading").show(),$("wysija_notice_msg").update(void 0!==s.loading_message?s.loading_message:Wysija_i18n.savingnl),$("wysija_notices").show(),$("wysija_notice_msg").show(),$("wysija_notices").writeAttribute("class","notice").setStyle({opacity:1}),new Ajax.Request(wysijaAJAX.ajaxurl,{method:"post",parameters:wysijaAJAX,asynchronous:!0,onSuccess:function(e){void 0!==s.success&&s.success(e);var i=Wysija_i18n.savednl;void 0!==s.message&&(i=s.message),"msgs"in e.responseJSON&&"error"in e.responseJSON.msgs&&($("wysija_notices").writeAttribute("class","error"),i=e.responseJSON.msgs.error),"msgs"in e.responseJSON&&"updated"in e.responseJSON.msgs&&(i=e.responseJSON.msgs.updated),$("wysija_notice_msg").update(i),$("ajax-loading").hide(),new Effect.Fade($("wysija_notices"),{duration:1,from:1,to:0}),ajaxOver=!0},onFailure:function(e){void 0!==s.failure&&s.failure(e),$("wysija_notices").writeAttribute("class","error"),$("ajax-loading").hide(),$("wysija_notices").hide(),$("wysija_notice_msg").update(Wysija_i18n.errorsavingnl),ajaxOver=!0}})}function WYSIJA_AJAX_POST(s){var e=s||{};$("ajax-loading").show(),$("wysija_notice_msg").update(void 0!==e.loading_message?e.loading_message:Wysija_i18n.savingnl),$("wysija_notices").show(),$("wysija_notice_msg").show(),$("wysija_notices").setAttribute("class","notice"),$("wysija_notices").writeAttribute("class","notice").setStyle({opacity:1}),new Ajax.Request(wysijaAJAX.ajaxurl,{method:"post",parameters:wysijaAJAX,onSuccess:function(s){$("wysija_notices").writeAttribute("class","notice");var i=Wysija_i18n.savednl;void 0!==e.success_message&&(i=e.success_message),void 0!=e.success&&e.success(s),"msgs"in s.responseJSON&&"error"in s.responseJSON.msgs&&($("wysija_notices").writeAttribute("class","error"),i=s.responseJSON.msgs.error),"msgs"in s.responseJSON&&"updated"in s.responseJSON.msgs&&(i=s.responseJSON.msgs.updated),$("wysija_notice_msg").update(i),$("ajax-loading").hide(),new Effect.Fade($("wysija_notices"),{duration:1,from:1,to:0}),ajaxOver=!0},onFailure:function(s){$("wysija_notices").setAttribute("class","error"),void 0!=e.failure&&e.failure(s),$("ajax-loading").hide(),$("wysija_notices").hide(),$("wysija_notice_msg").update(void 0!==e.error_message?e.error_message:Wysija_i18n.errorsavingnl),ajaxOver=!0}})}
1
+ function WYSIJA_SYNC_AJAX(i){$("ajax-loading").show(),i.loading_message!==undefined?$("wysija_notice_msg").update(i.loading_message):$("wysija_notice_msg").update(Wysija_i18n.savingnl),$("wysija_notices").show(),$("wysija_notice_msg").show(),$("wysija_notices").writeAttribute("class","notice").setStyle({opacity:1}),new Ajax.Request(wysijaAJAX.ajaxurl,{method:"post",parameters:wysijaAJAX,asynchronous:!0,onSuccess:function(s){i.success!==undefined&&i.success(s);var e=Wysija_i18n.savednl;i.message!==undefined&&(e=i.message),"msgs"in s.responseJSON&&"error"in s.responseJSON.msgs&&($("wysija_notices").writeAttribute("class","error"),e=s.responseJSON.msgs.error),"msgs"in s.responseJSON&&"updated"in s.responseJSON.msgs&&(e=s.responseJSON.msgs.updated),$("wysija_notice_msg").update(e),$("ajax-loading").hide(),new Effect.Fade($("wysija_notices"),{duration:1,from:1,to:0}),ajaxOver=!0},onFailure:function(s){i.failure!==undefined&&i.failure(s),$("wysija_notices").writeAttribute("class","error"),$("ajax-loading").hide(),$("wysija_notices").hide(),$("wysija_notice_msg").update(Wysija_i18n.errorsavingnl),ajaxOver=!0}})}function WYSIJA_AJAX_POST(s){var i=s||{};$("ajax-loading").show(),i.loading_message!==undefined?$("wysija_notice_msg").update(i.loading_message):$("wysija_notice_msg").update(Wysija_i18n.savingnl),$("wysija_notices").show(),$("wysija_notice_msg").show(),$("wysija_notices").setAttribute("class","notice"),$("wysija_notices").writeAttribute("class","notice").setStyle({opacity:1}),new Ajax.Request(wysijaAJAX.ajaxurl,{method:"post",parameters:wysijaAJAX,onSuccess:function(s){$("wysija_notices").writeAttribute("class","notice");var e=Wysija_i18n.savednl;i.success_message!==undefined&&(e=i.success_message),i.success!=undefined&&i.success(s),"msgs"in s.responseJSON&&"error"in s.responseJSON.msgs&&($("wysija_notices").writeAttribute("class","error"),e=s.responseJSON.msgs.error),"msgs"in s.responseJSON&&"updated"in s.responseJSON.msgs&&(e=s.responseJSON.msgs.updated),$("wysija_notice_msg").update(e),$("ajax-loading").hide(),new Effect.Fade($("wysija_notices"),{duration:1,from:1,to:0}),ajaxOver=!0},onFailure:function(s){$("wysija_notices").setAttribute("class","error"),i.failure!=undefined&&i.failure(s),$("ajax-loading").hide(),$("wysija_notices").hide(),i.error_message!==undefined?$("wysija_notice_msg").update(i.error_message):$("wysija_notice_msg").update(Wysija_i18n.errorsavingnl),ajaxOver=!0}})}
js/admin-ajax.js CHANGED
@@ -1 +1 @@
1
- var wysijaAJAXcallback=function(){};wysijaAJAXcallback.prototype.onSuccess=function(){};var displaychange=1,popupopen=0;jQuery(function(a){a.WYSIJA_SEND=function(){displaychange=1,0===popupopen?(a(".wysija-msg.ajax").html('<div class="allmsgs" title="'+wysijaAJAX.popTitle+'"><blink>'+wysijaAJAX.loadingTrans+"</blink></div>"),a(".wysija-msg.ajax .allmsgs").dialog({modal:!0,draggable:!1,resizable:!1,width:400,close:function(){displaychange=0,popupopen=0,a(this).remove()}})):a(".allmsgs.ui-dialog-content.ui-widget-content").html("<blink>"+wysijaAJAX.loadingTrans+"</blink>"),popupopen=1,"json"===wysijaAJAX.dataType?a.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:a.WYSIJA_HANDLE_RESPONSE,error:function(a){alert("Request error not JSON:"+a.responseText),wysijaAJAXcallback.onSuccess=""},dataType:wysijaAJAX.dataType}):a(".allmsgs.ui-dialog-content.ui-widget-content").load(wysijaAJAX.ajaxurl,wysijaAJAX,function(s){var i=JSON.parse(s);return"object"!=typeof i?!0:void a.WYSIJA_HANDLE_RESPONSE(i)})},a.WYSIJA_HANDLE_RESPONSE=function(s){a(".allmsgs.ui-dialog-content.ui-widget-content").html(""),a(".wysija-msg.ajax").html('<div class="allmsgs"></div>'),a.each(s.msgs,function(i,l){displaychange?(a(".allmsgs.ui-dialog-content.ui-widget-content ."+i+" ul").length||a(".allmsgs.ui-dialog-content.ui-widget-content").append('<div class="'+i+'"><ul></ul></div>'),a.each(l,function(s,l){a(".allmsgs.ui-dialog-content.ui-widget-content ."+i+" ul").append("<li>"+l+"</li>")})):(a(".wysija-msg.ajax .allmsgs ."+i+" ul").length||a(".wysija-msg.ajax .allmsgs").append('<div class="'+i+'"><ul></ul></div>'),a.each(l,function(s,l){a(".wysija-msg.ajax .allmsgs ."+i+" ul").append("<li>"+l+"</li>")})),a.isFunction(wysijaAJAXcallback.onSuccess)&&wysijaAJAXcallback.onSuccess(s),wysijaAJAXcallback.onSuccess=function(){}})}});
1
+ var wysijaAJAXcallback=function(){};wysijaAJAXcallback.prototype.onSuccess=function(){};var displaychange=1,popupopen=0;jQuery(function(l){l.WYSIJA_SEND=function(){displaychange=1,0===popupopen?(l(".wysija-msg.ajax").html('<div class="allmsgs" title="'+wysijaAJAX.popTitle+'"><blink>'+wysijaAJAX.loadingTrans+"</blink></div>"),l(".wysija-msg.ajax .allmsgs").dialog({modal:!0,draggable:!1,resizable:!1,width:400,close:function(){popupopen=displaychange=0,l(this).remove()}})):l(".allmsgs.ui-dialog-content.ui-widget-content").html("<blink>"+wysijaAJAX.loadingTrans+"</blink>"),popupopen=1,"json"===wysijaAJAX.dataType?l.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:l.WYSIJA_HANDLE_RESPONSE,error:function(a){alert("Request error not JSON:"+a.responseText),wysijaAJAXcallback.onSuccess=""},dataType:wysijaAJAX.dataType}):l(".allmsgs.ui-dialog-content.ui-widget-content").load(wysijaAJAX.ajaxurl,wysijaAJAX,function(a){var s=JSON.parse(a);if("object"!=typeof s)return!0;l.WYSIJA_HANDLE_RESPONSE(s)})},l.WYSIJA_HANDLE_RESPONSE=function(s){l(".allmsgs.ui-dialog-content.ui-widget-content").html(""),l(".wysija-msg.ajax").html('<div class="allmsgs"></div>'),l.each(s.msgs,function(i,a){displaychange?(l(".allmsgs.ui-dialog-content.ui-widget-content ."+i+" ul").length||l(".allmsgs.ui-dialog-content.ui-widget-content").append('<div class="'+i+'"><ul></ul></div>'),l.each(a,function(a,s){l(".allmsgs.ui-dialog-content.ui-widget-content ."+i+" ul").append("<li>"+s+"</li>")})):(l(".wysija-msg.ajax .allmsgs ."+i+" ul").length||l(".wysija-msg.ajax .allmsgs").append('<div class="'+i+'"><ul></ul></div>'),l.each(a,function(a,s){l(".wysija-msg.ajax .allmsgs ."+i+" ul").append("<li>"+s+"</li>")})),l.isFunction(wysijaAJAXcallback.onSuccess)&&wysijaAJAXcallback.onSuccess(s),wysijaAJAXcallback.onSuccess=function(){}})}});
js/admin-campaigns-articles.js CHANGED
@@ -1 +1 @@
1
- var query_offset=0,wysappend=0,totalReached=!1,searchRunning=!1,slider=null,colorpicker=null;jQuery(function(e){function t(){e(".submit-box").addClass("counting");var t=parseInt(e(".search_results .checkbox:checked").length,10);0===t?i():o(t+" "+wysijatrans.post_selected)}function i(){e(".submit-box").removeClass("counting"),c()}function a(){return query_offset=0,wysappend=0,s(),!1}function n(){if(null===slider){var t=32,i=564,a=Math.min(Math.max(t,parseInt(e("#slider_info span").html())),i);slider=new Control.Slider("slider_handle","image_width_slider",{range:$R(t,i),slideValue:a,axis:"horizontal",onSlide:function(t){var i=parseInt(t,10);e("#slider_info").find("span").html(i),e("#image_width").val(i)},onChange:function(t){var i=parseInt(t,10);e("#slider_info").find("span").html(i),e("#image_width").val(i)}}),slider.setValue(a)}}function s(){var t="";wysappend||e("#results").html(t),wysijaAJAX.task="get_articles",wysijaAJAX.data=e("#articles-form").serializeArray(),wysijaAJAX.query_offset=query_offset,l(wysijatrans.loading_results),jQuery.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:m,error:f,dataType:"json"})}function l(t){i(),e(".submit-box").addClass("loading"),o(t)}function o(t){void 0!==t&&e("#loading-message").html(t)}function c(){e("#loading-message").html("")}function r(){e(".submit-box").removeClass("loading"),c(),t()}function d(){e("#title_position_block")["title"===e('input[name="post_content"]:checked').val()?"hide":"show"](),e("#title_tag_list")["title"===e('input[name="post_content"]:checked').val()?"show":"hide"](),e("#advanced:visible").length>0&&(e("#title_tag_list:hidden").length>0&&"list"===e('input[name="title_tag"]:checked').val()&&e('input[name="title_tag"][value="h2"]').attr("checked","checked"),"list"===e('input[name="title_tag"]:checked').val()?u(["image","author","category","readmore","divider","bgcolor"]):h(["image","author","category","readmore","divider","bgcolor"]))}function u(t){e.each(t,function(t,i){e("#"+i+"-block").hide()})}function h(t){e.each(t,function(t,i){e("#"+i+"-block").show()})}function p(){null===colorpicker&&(colorpicker=!0,e("input.color").modcoder_excolor({hue_bar:1,border_color:"#969696",anim_speed:"fast",round_corners:!1,shadow_size:2,shadow_color:"#f0f0f0",background_color:"#ececec",backlight:!1,label_color:"#333333",effect:"fade",show_input:!1,z_index:2e4,callback_on_open:function(){e("html, body").animate({scrollTop:e("#modcoder_colorpicker_wrapper:visible").offset().top},200)}}))}function _(){e("#image_block")[e('input[name="title_tag"][value="list"]:checked').length>0?"hide":"show"]()}function g(){var t=e('input[name="image_alignment"]:checked').val(),i=!0,a=32,s=325;"center"===t?s=564:"none"===t&&(i=!1),i===!0?(e("#image_width_block").show(),n(),slider.range=$R(a,s),slider.setValue(slider.value)):e("#image_width_block").hide()}function m(t){var i="",a=null;t.result.result?(i='<ul class="search_results">',e.each(t.result.posts,function(e,t){a={src:null,alt:"",title:""},null!==t.post_image&&(a.src=t.post_image.src,a.alt=t.post_image.alt,a.title=t.post_title);var n=query_offset+e;i+='<li id="post-'+n+'" class="clearfix">',i+='<div class="checkbox_container">',i+='<input id="post-checkbox-'+n+'" data-post-id="'+n+'" type="checkbox" class="checkbox" value="'+t.ID+'" name="post_selection" />',i+="</div>",null!==a.src?(i+='<div class="thumbnail"><img width="60" title="'+a.title+'" src="'+a.src+'" alt="'+a.alt+'" /></div>',i+='<label class="with_thumbnail" for="post-checkbox-'+n+'">'+t.post_title+"</label>"):i+='<label for="post-checkbox-'+n+'">'+t.post_title+"</label>",i+='<span class="cpt-type">'+t.post_type+" - <small>"+t.post_status+"</small></span>",i+="</li>"}),i+="</ul>"):i=t.result.append?"":'<p class="message"><strong>'+t.result.msg+"</strong></p>",t.result.append?""!==i&&e("#results").append("<hr />"+i):e("#results").html(i),wysappend=0,searchRunning=!1,totalReached=parseInt(t.result.total)===e("ul.search_results li").length?!0:!1,r()}function f(){searchRunning=!1,wysappend=0}function w(){0!==e("#advanced:hidden").length&&searchRunning!==!0&&(searchRunning=!0,query_offset+=10,wysappend=1,s())}e("#toggle-advanced").toggle(function(){return e(this).html(wysijatrans.hide_advanced),e("#advanced").show(),e("#basic").hide(),n(),d(),g(),_(),p(),e(this).blur(),!1},function(){return e(this).html(wysijatrans.show_advanced),e("#basic").show(),e("#advanced").hide(),e(this).blur(),!1}),e("#back-selection").click(function(){return e("#toggle-advanced").trigger("click"),!1}),e("#insert-selection").click(function(){var t=[],i=e('#results input[name="post_selection"]:checked'),a=[],n=["readmore","author_label","category_label"];return 0===i.length?!1:(e.each(i,function(i,a){t.push(e(a).val())}),e("#articles-form").serializeArray().each(function(e){n.include(e.name)&&(e.value=window.parent.Wysija.encodeHtmlValue(e.value)),a.push(e)}),wysijaAJAX.task="insert_articles",wysijaAJAX.post_ids=t.join(","),wysijaAJAX.data=a,wysijaAJAX._wpnonce=wysijanonces.campaigns.insert_articles,wysijaAJAX.divider={src:window.parent.$$('.wysija_item[wysija_type="divider"]')[0].readAttribute("wysija_src"),width:window.parent.$$('.wysija_item[wysija_type="divider"]')[0].readAttribute("wysija_width"),height:window.parent.$$('.wysija_item[wysija_type="divider"]')[0].readAttribute("wysija_height")},l(wysijatrans.inserting_selection),jQuery.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(e){window.parent.WysijaPopup.success(e.result.posts),r()},error:f,dataType:"json"}),!1)}),e(document).on("click",".search_results .checkbox",function(){e(this).is(":checked")===!0?e("#post-"+e(this).data("post-id")).addClass("selected"):e("#post-"+e(this).data("post-id")).removeClass("selected"),t()}),e(document).on("change","#post_type",function(){a()}),e(".post_category").change(function(){a()}),e("#post_status").change(function(){a()}),e(document).on("click","#search-submit",function(){return s(),!1}),e('input[name="image_alignment"]').click(function(){g()}),e('input[name="post_content"]').click(function(){d(),_(),g()}),e('input[name="title_tag"]').click(function(){d(),_(),g()}),e(function(){s()}),e(window).scroll(function(){totalReached===!1&&e("#results li").length>=10&&!wysappend&&e(window).scrollTop()===e(document).height()-e(window).height()&&w()})});
1
+ var query_offset=0,wysappend=0,totalReached=!1,searchRunning=!1,slider=null,colorpicker=null;jQuery(function(s){function e(){s(".submit-box").addClass("counting");var e=parseInt(s(".search_results .checkbox:checked").length,10);0===e?t():o(e+" "+wysijatrans.post_selected)}function t(){s(".submit-box").removeClass("counting"),c()}function i(){return wysappend=query_offset=0,a(),!1}function n(){if(null===slider){var e=32,t=564,i=Math.min(Math.max(e,parseInt(s("#slider_info span").html())),t);(slider=new Control.Slider("slider_handle","image_width_slider",{range:$R(e,t),slideValue:i,axis:"horizontal",onSlide:function(e){var t=parseInt(e,10);s("#slider_info").find("span").html(t),s("#image_width").val(t)},onChange:function(e){var t=parseInt(e,10);s("#slider_info").find("span").html(t),s("#image_width").val(t)}})).setValue(i)}}function a(){var e="";wysappend||s("#results").html(e),wysijaAJAX.task="get_articles",wysijaAJAX.data=s("#articles-form").serializeArray(),wysijaAJAX.query_offset=query_offset,l(wysijatrans.loading_results),jQuery.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:f,error:m,dataType:"json"})}function l(e){t(),s(".submit-box").addClass("loading"),o(e)}function o(e){e!==undefined&&s("#loading-message").html(e)}function c(){s("#loading-message").html("")}function r(){s(".submit-box").removeClass("loading"),c(),e()}function d(){s("#title_position_block")["title"===s('input[name="post_content"]:checked').val()?"hide":"show"](),s("#title_tag_list")["title"===s('input[name="post_content"]:checked').val()?"show":"hide"](),0<s("#advanced:visible").length&&(0<s("#title_tag_list:hidden").length&&"list"===s('input[name="title_tag"]:checked').val()&&s('input[name="title_tag"][value="h2"]').attr("checked","checked"),"list"===s('input[name="title_tag"]:checked').val()?u(["image","author","category","readmore","divider","bgcolor"]):h(["image","author","category","readmore","divider","bgcolor"]))}function u(e){s.each(e,function(e,t){s("#"+t+"-block").hide()})}function h(e){s.each(e,function(e,t){s("#"+t+"-block").show()})}function p(){null===colorpicker&&(colorpicker=!0,s("input.color").modcoder_excolor({hue_bar:1,border_color:"#969696",anim_speed:"fast",round_corners:!1,shadow_size:2,shadow_color:"#f0f0f0",background_color:"#ececec",backlight:!1,label_color:"#333333",effect:"fade",show_input:!1,z_index:2e4,callback_on_open:function(){s("html, body").animate({scrollTop:s("#modcoder_colorpicker_wrapper:visible").offset().top},200)}}))}function _(){s("#image_block")[0<s('input[name="title_tag"][value="list"]:checked').length?"hide":"show"]()}function g(){var e=s('input[name="image_alignment"]:checked').val(),t=!0,i=32,a=325;"center"===e?a=564:"none"===e&&(t=!1),!0===t?(s("#image_width_block").show(),n(),slider.range=$R(i,a),slider.setValue(slider.value)):s("#image_width_block").hide()}function f(e){var a="",n=null;e.result.result?(a='<ul class="search_results">',s.each(e.result.posts,function(e,t){n={src:null,alt:"",title:""},null!==t.post_image&&(n.src=t.post_image.src,n.alt=t.post_image.alt,n.title=t.post_title);var i=query_offset+e;a+='<li id="post-'+i+'" class="clearfix">',a+='<div class="checkbox_container">',a+='<input id="post-checkbox-'+i+'" data-post-id="'+i+'" type="checkbox" class="checkbox" value="'+t.ID+'" name="post_selection" />',a+="</div>",null!==n.src?(a+='<div class="thumbnail"><img width="60" title="'+n.title+'" src="'+n.src+'" alt="'+n.alt+'" /></div>',a+='<label class="with_thumbnail" for="post-checkbox-'+i+'">'+t.post_title+"</label>"):a+='<label for="post-checkbox-'+i+'">'+t.post_title+"</label>",a+='<span class="cpt-type">'+t.post_type+" - <small>"+t.post_status+"</small></span>",a+="</li>"}),a+="</ul>"):a=e.result.append?"":'<p class="message"><strong>'+e.result.msg+"</strong></p>",e.result.append?""!==a&&s("#results").append("<hr />"+a):s("#results").html(a),wysappend=0,searchRunning=!1,totalReached=parseInt(e.result.total)===s("ul.search_results li").length,r()}function m(){searchRunning=!1,wysappend=0}function w(){0!==s("#advanced:hidden").length&&!0!==searchRunning&&(searchRunning=!0,query_offset+=10,wysappend=1,a())}s("#toggle-advanced").toggle(function(){return s(this).html(wysijatrans.hide_advanced),s("#advanced").show(),s("#basic").hide(),n(),d(),g(),_(),p(),s(this).blur(),!1},function(){return s(this).html(wysijatrans.show_advanced),s("#basic").show(),s("#advanced").hide(),s(this).blur(),!1}),s("#back-selection").click(function(){return s("#toggle-advanced").trigger("click"),!1}),s("#insert-selection").click(function(){var i=[],e=s('#results input[name="post_selection"]:checked'),t=[],a=["readmore","author_label","category_label"];return 0===e.length||(s.each(e,function(e,t){i.push(s(t).val())}),s("#articles-form").serializeArray().each(function(e){a.include(e.name)&&(e.value=window.parent.Wysija.encodeHtmlValue(e.value)),t.push(e)}),wysijaAJAX.task="insert_articles",wysijaAJAX.post_ids=i.join(","),wysijaAJAX.data=t,wysijaAJAX._wpnonce=wysijanonces.campaigns.insert_articles,wysijaAJAX.divider={src:window.parent.$$('.wysija_item[wysija_type="divider"]')[0].readAttribute("wysija_src"),width:window.parent.$$('.wysija_item[wysija_type="divider"]')[0].readAttribute("wysija_width"),height:window.parent.$$('.wysija_item[wysija_type="divider"]')[0].readAttribute("wysija_height")},l(wysijatrans.inserting_selection),jQuery.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(e){window.parent.WysijaPopup.success(e.result.posts),r()},error:m,dataType:"json"})),!1}),s(document).on("click",".search_results .checkbox",function(){!0===s(this).is(":checked")?s("#post-"+s(this).data("post-id")).addClass("selected"):s("#post-"+s(this).data("post-id")).removeClass("selected"),e()}),s(document).on("change","#post_type",function(){i()}),s(".post_category").change(function(){i()}),s("#post_status").change(function(){i()}),s(document).on("click","#search-submit",function(){return a(),!1}),s('input[name="image_alignment"]').click(function(){g()}),s('input[name="post_content"]').click(function(){d(),_(),g()}),s('input[name="title_tag"]').click(function(){d(),_(),g()}),s(function(){a()}),s(window).scroll(function(){!1===totalReached&&10<=s("#results li").length&&!wysappend&&s(window).scrollTop()===s(document).height()-s(window).height()&&w()})});
js/admin-campaigns-autopost.js CHANGED
@@ -1 +1 @@
1
- var colorpicker=null;jQuery(function(e){function t(){e("#title_position_block")["title"===e('input[name="post_content"]:checked').val()?"hide":"show"](),e("#title_tag_list")["title"===e('input[name="post_content"]:checked').val()?"show":"hide"](),e("#advanced:visible").length>0&&(e("#title_tag_list:hidden").length>0&&"list"===e('input[name="title_tag"]:checked').val()&&e('input[name="title_tag"][value="h2"]').attr("checked","checked"),"list"===e('input[name="title_tag"]:checked').val()?i(["image","author","category","readmore","divider","bgcolor"]):n(["image","author","category","readmore","divider","bgcolor"]))}function i(t){e.each(t,function(t,i){e("#"+i+"-block").hide()})}function n(t){e.each(t,function(t,i){e("#"+i+"-block").show()})}function a(){e("#image_block")[e('input[name="title_tag"][value="list"]:checked').length>0?"hide":"show"]()}function o(){var t=e('input[name="image_alignment"]:checked').val(),i=!0,n=32,a=325;"center"===t?a=564:"none"===t&&(i=!1),i===!0?(e("#image_width_block").show(),l(),slider.range=$R(n,a),slider.setValue(slider.value)):e("#image_width_block").hide()}function l(){var t=32,i=564,n=Math.min(Math.max(t,parseInt(e("#slider_info span").html())),i);slider=new Control.Slider("slider_handle","image_width_slider",{range:$R(t,i),slideValue:n,axis:"horizontal",onSlide:function(t){var i=parseInt(t,10);e("#slider_info").find("span").html(i),e("#image_width").val(i)},onChange:function(t){var i=parseInt(t,10);e("#slider_info").find("span").html(i),e("#image_width").val(i)}}),slider.setValue(n)}function c(){null===colorpicker&&(colorpicker=!0,e("input.color").modcoder_excolor({hue_bar:1,border_color:"#969696",anim_speed:"fast",round_corners:!1,shadow_size:2,shadow_color:"#f0f0f0",background_color:"#ececec",backlight:!1,label_color:"#333333",effect:"fade",show_input:!1,z_index:2e4,callback_on_open:function(){e("html, body").animate({scrollTop:e("#modcoder_colorpicker_wrapper:visible").offset().top},200)}}))}e("#toggle-advanced").toggle(function(){return e(this).html(wysijatrans.hide_advanced),e("#advanced").show(),l(),t(),o(),a(),c(),e(this).blur(),window.parent.WysijaPopup.setDimensions(),!1},function(){return e(this).html(wysijatrans.show_advanced),e("#advanced").hide(),e(this).blur(),window.parent.WysijaPopup.setDimensions(),!1}),e("#autopost-submit").click(function(){var t=[],i=["readmore","author_label","category_label"];return e("#autopost-form").serializeArray().each(function(e){i.include(e.name)&&(e.value=window.parent.Wysija.encodeHtmlValue(e.value)),t.push(e)}),wysijaAJAX.task="generate_auto_post",wysijaAJAX.wysijaData=t,jQuery.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(e){void 0!==e.result&&""!==e.result?window.parent.WysijaPopup.success(e.result):window.parent.WysijaPopup.cancel()}}),!1}),e('input[name="image_alignment"]').click(function(){o()}),e('input[name="post_content"]').click(function(){t(),a(),o()}),e('input[name="title_tag"]').click(function(){t(),a(),o()}),e("#post_type").change(function(){return e(".category_ids").val("").trigger("change"),!1}),e(function(){l(),t(),o(),a()})});
1
+ var colorpicker=null;jQuery(function(a){function e(){a("#title_position_block")["title"===a('input[name="post_content"]:checked').val()?"hide":"show"](),a("#title_tag_list")["title"===a('input[name="post_content"]:checked').val()?"show":"hide"](),0<a("#advanced:visible").length&&(0<a("#title_tag_list:hidden").length&&"list"===a('input[name="title_tag"]:checked').val()&&a('input[name="title_tag"][value="h2"]').attr("checked","checked"),"list"===a('input[name="title_tag"]:checked').val()?t(["image","author","category","readmore","divider","bgcolor"]):n(["image","author","category","readmore","divider","bgcolor"]))}function t(e){a.each(e,function(e,t){a("#"+t+"-block").hide()})}function n(e){a.each(e,function(e,t){a("#"+t+"-block").show()})}function i(){a("#image_block")[0<a('input[name="title_tag"][value="list"]:checked').length?"hide":"show"]()}function o(){var e=a('input[name="image_alignment"]:checked').val(),t=!0,n=32,i=325;"center"===e?i=564:"none"===e&&(t=!1),!0===t?(a("#image_width_block").show(),l(),slider.range=$R(n,i),slider.setValue(slider.value)):a("#image_width_block").hide()}function l(){var e=32,t=564,n=Math.min(Math.max(e,parseInt(a("#slider_info span").html())),t);slider=new Control.Slider("slider_handle","image_width_slider",{range:$R(e,t),slideValue:n,axis:"horizontal",onSlide:function(e){var t=parseInt(e,10);a("#slider_info").find("span").html(t),a("#image_width").val(t)},onChange:function(e){var t=parseInt(e,10);a("#slider_info").find("span").html(t),a("#image_width").val(t)}}),slider.setValue(n)}function c(){null===colorpicker&&(colorpicker=!0,a("input.color").modcoder_excolor({hue_bar:1,border_color:"#969696",anim_speed:"fast",round_corners:!1,shadow_size:2,shadow_color:"#f0f0f0",background_color:"#ececec",backlight:!1,label_color:"#333333",effect:"fade",show_input:!1,z_index:2e4,callback_on_open:function(){a("html, body").animate({scrollTop:a("#modcoder_colorpicker_wrapper:visible").offset().top},200)}}))}a("#toggle-advanced").toggle(function(){return a(this).html(wysijatrans.hide_advanced),a("#advanced").show(),l(),e(),o(),i(),c(),a(this).blur(),window.parent.WysijaPopup.setDimensions(),!1},function(){return a(this).html(wysijatrans.show_advanced),a("#advanced").hide(),a(this).blur(),window.parent.WysijaPopup.setDimensions(),!1}),a("#autopost-submit").click(function(){var t=[],n=["readmore","author_label","category_label"];return a("#autopost-form").serializeArray().each(function(e){n.include(e.name)&&(e.value=window.parent.Wysija.encodeHtmlValue(e.value)),t.push(e)}),wysijaAJAX.task="generate_auto_post",wysijaAJAX.wysijaData=t,jQuery.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(e){e.result!==undefined&&""!==e.result?window.parent.WysijaPopup.success(e.result):window.parent.WysijaPopup.cancel()}}),!1}),a('input[name="image_alignment"]').click(function(){o()}),a('input[name="post_content"]').click(function(){e(),i(),o()}),a('input[name="title_tag"]').click(function(){e(),i(),o()}),a("#post_type").change(function(){return a(".category_ids").val("").trigger("change"),!1}),a(function(){l(),e(),o(),i()})});
js/admin-campaigns-bookmarks.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(a){function s(s,e){wysijaAJAX.task="get_social_bookmarks",wysijaAJAX.wysijaData={size:s,theme:e},jQuery.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(s){if(void 0!=s.result){var e,o=JSON.parse(s.result),t="",i='class="selected"';a.each(Object.keys(o.icons).sort(),function(s,r){t+='<li class="clearfix"><a href="javascript:;" '+i+' rel="'+r+'">',e=o.icons[r],0==s&&(i="",a("#bookmarks-iconset").val(r),s++),a.each(["facebook","twitter","google","linkedin"],function(a,s){t+='<img src="'+e[s]+'" alt="'+s+'" />'})}),t+="</a></li>",a("ul.icons").html(t)}},dataType:"json"})}var e=window.parent.document.getElementById("bodyBgColorInput").value;(void 0===e||6!==e.length)&&(e="FFFFFF"),a("ul.icons").css("backgroundColor","#"+e),a(document).on("click",".bookmarks .sizes a",function(){return a(".bookmarks .sizes a").removeClass("selected"),a(this).addClass("selected"),s(a(this).attr("rel"),a("#bookmarks-theme").val()),a("#bookmarks-size").val(a(this).attr("rel")),a("#bookmarks-iconset").val(""),!1}),a(document).on("click",".bookmarks .icons a",function(){return a(".bookmarks .icons a").removeClass("selected"),a(this).addClass("selected"),a("#bookmarks-iconset").val(a(this).attr("rel")),!1}),a("#bookmarks-submit").click(function(){return wysijaAJAX.task="generate_social_bookmarks",wysijaAJAX._wpnonce=wysijanonces.campaigns.generate_social_bookmarks,wysijaAJAX.wysijaData=a("#bookmarks-form").serializeArray(),jQuery.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(a){void 0!==a.result&&""!==a.result?window.parent.WysijaPopup.success(a.result):window.parent.WysijaPopup.cancel()}}),!1}),a(function(){s(a("#bookmarks-size").val(),a("#bookmarks-theme").val())})});
1
+ jQuery(function(n){function a(a,s){wysijaAJAX.task="get_social_bookmarks",wysijaAJAX.wysijaData={size:a,theme:s},jQuery.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(a){if(a.result!=undefined){var e,o=JSON.parse(a.result),t="",i='class="selected"';n.each(Object.keys(o.icons).sort(),function(a,s){t+='<li class="clearfix"><a href="javascript:;" '+i+' rel="'+s+'">',e=o.icons[s],0==a&&(i="",n("#bookmarks-iconset").val(s),a++),n.each(["facebook","twitter","google","linkedin"],function(a,s){t+='<img src="'+e[s]+'" alt="'+s+'" />'})}),t+="</a></li>",n("ul.icons").html(t)}},dataType:"json"})}var s=window.parent.document.getElementById("bodyBgColorInput").value;s!==undefined&&6===s.length||(s="FFFFFF"),n("ul.icons").css("backgroundColor","#"+s),n(document).on("click",".bookmarks .sizes a",function(){return n(".bookmarks .sizes a").removeClass("selected"),n(this).addClass("selected"),a(n(this).attr("rel"),n("#bookmarks-theme").val()),n("#bookmarks-size").val(n(this).attr("rel")),n("#bookmarks-iconset").val(""),!1}),n(document).on("click",".bookmarks .icons a",function(){return n(".bookmarks .icons a").removeClass("selected"),n(this).addClass("selected"),n("#bookmarks-iconset").val(n(this).attr("rel")),!1}),n("#bookmarks-submit").click(function(){return wysijaAJAX.task="generate_social_bookmarks",wysijaAJAX._wpnonce=wysijanonces.campaigns.generate_social_bookmarks,wysijaAJAX.wysijaData=n("#bookmarks-form").serializeArray(),jQuery.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(a){a.result!==undefined&&""!==a.result?window.parent.WysijaPopup.success(a.result):window.parent.WysijaPopup.cancel()}}),!1}),n(function(){a(n("#bookmarks-size").val(),n("#bookmarks-theme").val())})});
js/admin-campaigns-default.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(e){e(".action-send-test-editor").click(function(){return tb_show(wysijatrans.processqueue,e(this).attr("href")+"&KeepThis=true&TB_iframe=true&height=400&width=600",null),tb_showIframe(),!1}),e(".pause-edit").click(function(){return confirm(wysijatrans.confirmpauseedit)}),e(".bulksubmit-button").click(function(){var t=e(this).data("locale"),i=e(this).data("action"),n=e("#posts-filter .check-column input:checked");if(0===n.length)return!1;switch(i){case"delete":if(!confirm(1===n.length?t.delete:t.delete_bulk))return!1}return e("<input/>",{type:"hidden",name:"action",value:"delete"}).insertAfter(e(this)),e("#_wpnonce").prop("disabled",null),!0})});
1
+ jQuery(document).ready(function(n){n(".action-send-test-editor").click(function(){return tb_show(wysijatrans.processqueue,n(this).attr("href")+"&KeepThis=true&TB_iframe=true&height=400&width=600",null),tb_showIframe(),!1}),n(".pause-edit").click(function(){return confirm(wysijatrans.confirmpauseedit)}),n(".bulksubmit-button").click(function(){var e=n(this).data("locale"),t=n(this).data("action"),i=n("#posts-filter .check-column input:checked");if(0===i.length)return!1;switch(t){case"delete":if(!confirm(1===i.length?e["delete"]:e.delete_bulk))return!1}return n("<input/>",{type:"hidden",name:"action",value:"delete"}).insertAfter(n(this)),n("#_wpnonce").prop("disabled",null),!0})});
js/admin-campaigns-dividers.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(i){var e=window.parent.document.getElementById("bodyBgColorInput").value;(void 0==e||6!=e.length)&&(e="FFFFFF"),i("ul.dividers").css("backgroundColor","#"+e),i(document).on("click",".dividers a",function(){i(".dividers a").removeClass("selected"),i(this).addClass("selected");var e=i(this).children(":first");return i("#divider_src").val(e.attr("src")),i("#divider_width").val(e.attr("width")),i("#divider_height").val(e.attr("height")),!1}),i("#dividers-submit").click(function(){return wysijaAJAX.task="set_divider",wysijaAJAX._wpnonce=wysijanonces.campaigns.set_divider,wysijaAJAX.id=i("#email_id").val(),wysijaAJAX.wysijaData={src:i("#divider_src").val(),width:i("#divider_width").val(),height:i("#divider_height").val()},i.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(i){i.result!==!1&&(window.parent.Wysija.setDivider(Base64.decode(i.result),wysijaAJAX.wysijaData),window.parent.Wysija.replaceDividers(),window.parent.Wysija.init(),window.parent.Wysija.autoSave(),window.parent.WysijaPopup.close())}}),!1})});
1
+ jQuery(function(e){var i=window.parent.document.getElementById("bodyBgColorInput").value;i!=undefined&&6==i.length||(i="FFFFFF"),e("ul.dividers").css("backgroundColor","#"+i),e(document).on("click",".dividers a",function(){e(".dividers a").removeClass("selected"),e(this).addClass("selected");var i=e(this).children(":first");return e("#divider_src").val(i.attr("src")),e("#divider_width").val(i.attr("width")),e("#divider_height").val(i.attr("height")),!1}),e("#dividers-submit").click(function(){return wysijaAJAX.task="set_divider",wysijaAJAX._wpnonce=wysijanonces.campaigns.set_divider,wysijaAJAX.id=e("#email_id").val(),wysijaAJAX.wysijaData={src:e("#divider_src").val(),width:e("#divider_width").val(),height:e("#divider_height").val()},e.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(i){!1!==i.result&&(window.parent.Wysija.setDivider(Base64.decode(i.result),wysijaAJAX.wysijaData),window.parent.Wysija.replaceDividers(),window.parent.Wysija.init(),window.parent.Wysija.autoSave(),window.parent.WysijaPopup.close())}}),!1})});
js/admin-campaigns-editAutonl.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(a){function e(){"2"==a(".radiotype-nl:checked").val()?a(".automatic-nl").show():(a(".automatic-nl").hide(),a('label[for="subject"] p.description').html(wysijatrans.descstandard)),i(),a("#params-when-article").is(":hidden")||t()}function t(){a(".sub-when-article").hide(),s();var e=autofields["when-article"].valueshow[a("#params-when-article").val()];void 0!=e&&a.each(e,function(e,t){a("#params-"+t).show(),a("#params-label-"+t).show()})}function n(){"immediate"==a("#params-numberofwhat").val()?a("#params-numberafter").hide():a("#params-numberafter").show()}function i(){a(".sub-event").hide(),s();var e=autofields.event.valueshow[a("#params-event").val()];"1"==a(".radiotype-nl:checked").val()||"2"==a(".radiotype-nl:checked").val()&&"new-articles"==a("#params-event").val()?(a(".listcheckboxes").show(),"2"==a(".radiotype-nl:checked").val()&&a('label[for="subject"] p.description').html(wysijatrans.descauto)):(a(".listcheckboxes").hide(),a('label[for="subject"] p.description').html(wysijatrans.descstandard)),void 0!=e&&a.each(e,function(e,t){a("#params-"+t).show(),a("#params-label-"+t).show()}),n()}function r(){var e={};return a(".checkbox.checklists").each(function(){a(this).attr("checked")&&(e[a(this).attr("id")]={total:parseInt(a("#"+a(this).attr("id")+"count").val()),title:a(this).attr("alt")})}),e}function s(){var e=r(),t=0;for(j in e)t+=e[j].total;return a("#immediatewarning").html(wysijatrans.immediatewarning.replace("[number]",t)),"new-articles"==a("#params-event").val()&&"immediate"==a("#params-when-article").val()&&parseInt(wysijatrans.possibleemails)<parseInt(t)?a("#immediatewarning").show():a("#immediatewarning").hide(),!1}a(document).ready(function(){s(),e()}),a(".radiotype-nl").change(function(){e()}),a("#params-event").change(function(){i(),a("#params-when-article").is(":hidden")||t()}),a("#params-when-article").change(function(){t()}),a("#params-numberofwhat").change(function(){n()}),a(".checklists").change(function(){s()})});
1
+ jQuery(function(t){function a(){"2"==t(".radiotype-nl:checked").val()?t(".automatic-nl").show():(t(".automatic-nl").hide(),t('label[for="subject"] p.description').html(wysijatrans.descstandard)),i(),t("#params-when-article").is(":hidden")||e()}function e(){t(".sub-when-article").hide(),s();var a=autofields["when-article"].valueshow[t("#params-when-article").val()];a!=undefined&&t.each(a,function(a,e){t("#params-"+e).show(),t("#params-label-"+e).show()})}function n(){"immediate"==t("#params-numberofwhat").val()?t("#params-numberafter").hide():t("#params-numberafter").show()}function i(){t(".sub-event").hide(),s();var a=autofields.event.valueshow[t("#params-event").val()];"1"==t(".radiotype-nl:checked").val()||"2"==t(".radiotype-nl:checked").val()&&"new-articles"==t("#params-event").val()?(t(".listcheckboxes").show(),"2"==t(".radiotype-nl:checked").val()&&t('label[for="subject"] p.description').html(wysijatrans.descauto)):(t(".listcheckboxes").hide(),t('label[for="subject"] p.description').html(wysijatrans.descstandard)),a!=undefined&&t.each(a,function(a,e){t("#params-"+e).show(),t("#params-label-"+e).show()}),n()}function r(){var a={};return t(".checkbox.checklists").each(function(){t(this).attr("checked")&&(a[t(this).attr("id")]={total:parseInt(t("#"+t(this).attr("id")+"count").val()),title:t(this).attr("alt")})}),a}function s(){var a=r(),e=0;for(j in a)e+=a[j].total;return t("#immediatewarning").html(wysijatrans.immediatewarning.replace("[number]",e)),"new-articles"==t("#params-event").val()&&"immediate"==t("#params-when-article").val()&&parseInt(wysijatrans.possibleemails)<parseInt(e)?t("#immediatewarning").show():t("#immediatewarning").hide(),!1}t(document).ready(function(){s(),a()}),t(".radiotype-nl").change(function(){a()}),t("#params-event").change(function(){i(),t("#params-when-article").is(":hidden")||e()}),t("#params-when-article").change(function(){e()}),t("#params-numberofwhat").change(function(){n()}),t(".checklists").change(function(){s()})});
js/admin-campaigns-editDetails.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(e){function t(){wysijaAJAX.popTitle=wysijatrans.previewemail,wysijaAJAX.dataType="json",wysijaAJAX.task="send_preview",wysijaAJAX._wpnonce=wysijanonces.campaigns.send_preview,jQuery("#campaignstep3").length>0&&(wysijaAJAX.data=jQuery("#campaignstep3").serializeArray(),wysijaAJAX.id=jQuery("#email_id").val()),wysijaAJAX.receiver=jQuery("#preview-receiver").val(),jQuery.WYSIJA_SEND()}function i(){return"function"==typeof saveWYSIJA?saveWYSIJA(function(){t()}):t(),!1}function a(){var t={};return e(".checkbox.checklists").each(function(){e(this).attr("checked")&&(t[e(this).attr("id")]={total:parseInt(e("#"+e(this).attr("id")+"count").val()),title:e(this).attr("alt")})}),t}function s(){var t=a(),i=0,s="";for(var r in t)i+=parseInt(t[r].total),s+=t[r].title+", ";if(s=s.substr(0,s.length-2),void 0!=wysijatrans.alertsend&&!e("#scheduleit").attr("checked")){var n=wysijatrans.alertsend;return n=n.replace("[#]",i),n=n.replace("[#nms]",s),confirm(n)?!0:!1}return void 0!=wysijatrans.ignoreprevious&&e("#ignore_subscribers").attr("checked")?confirm(wysijatrans.ignoreprevious)?!0:!1:!0}function r(){return e("#wysija-send-spamtest").hasClass("disabled")?!1:(WysijaPopup.showLoading(),WysijaPopup.showOverlay(),void saveWYSIJA(function(){n()}))}function n(){wysijaAJAX.popTitle=wysijatrans.previewemail,wysijaAJAX.dataType="json",wysijaAJAX.task="send_spamtest",wysijaAJAX._wpnonce=wysijanonces.campaigns.send_spamtest,e.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(t){if(WysijaPopup.hideLoading(),t.result.result){e("#wysija-spam-results").attr("href",t.result.urlredirect).fadeIn("slow");var i=parseInt(e("#counttriesleft").html())-1;e("#counttriesleft").html(i),0>=i&&e("#wysija-send-spamtest").addClass("disabled"),WysijaPopup.hideOverlay()}else t.result.notriesleft&&alert(t.result.notriesleft),WysijaPopup.hideOverlay()},error:function(e){alert("Request error not JSON:"+e.responseText),delete wysijaAJAXcallback.onSuccess},dataType:wysijaAJAX.dataType})}e(".action-send-spam-test").click(function(){return tb_show(wysijatrans.processqueue,e(this).attr("href")+"&KeepThis=true&TB_iframe=true&height=618&width=1000",null),tb_showIframe(),!1}),e("#wj-send-preview").click(i),e("#submit-send").click(s),e(document).ready(function(){function t(t){e("#scheduleit").attr("checked")?(e(".schedule-row").show(),e("#submit-send").val(wysijatrans.schedule)):(e(".schedule-row").hide(),e("#submit-send").val(t))}if("function"!=typeof saveWYSIJA){e("#datepicker-day").datepicker({minDate:0,showOn:"focus",dateFormat:"yy-mm-dd"});var i=e("#submit-send").val();t(i),e("#scheduleit").change(function(){t(i)})}}),e("#wysija-send-spamtest").click(r),e("#link-back-step2").click(function(){return e("#hid-redir").attr("value","savelastback"),e("#campaignstep3").submit(),!1})}),window.mailpoet="object"==typeof window.mailpoet?window.mailpoet:{$:{}},function(e,t){"use strict";var i=t.mailpoet,a=i.fn={};a.isGoodFromAddress=function(e){var i=e.split("@")[1];return"undefined"==typeof i||""===i?!1:i.toLowerCase()!==t.location.host.toLowerCase()?!1:!0},a.isGmailAddress=function(e){var t=e.split("@")[1];return"undefined"==typeof t||""===t?!1:"gmail.com"!==t.toLowerCase()?!1:!0}}(jQuery,window),function(e,t){"use strict";var i=t.mailpoet;e(t).load(function(){"object"==typeof e.fn.tooltip&&(i.$.from_email=e("#from_email"),i.$.from_email.tooltip({animation:!0,placement:"bottom",trigger:"manual",html:!0,title:function(){return i.$.from_email.data("message")}}).on({"verifyEmail.mailpoet":function(){if(i.fn.isGoodFromAddress(i.$.from_email.val()))return i.$.from_email.data("message","").tooltip("hide");if("true"===wysijatrans.emailCheck.isGmail)return i.$.from_email.data("message","").tooltip("hide");var e="";return e=i.fn.isGmailAddress(i.$.from_email.val())?wysijatrans.emailCheck.gmailText:wysijatrans.emailCheck.text,i.$.from_email.is(":visible")?i.$.from_email.data("message",e).tooltip("show"):i.$.from_email.tooltip("hide")},keyup:function(){i.$.from_email.trigger("verifyEmail.mailpoet")}}).trigger("verifyEmail.mailpoet"))})}(jQuery,window);
1
+ jQuery(function(r){function e(){wysijaAJAX.popTitle=wysijatrans.previewemail,wysijaAJAX.dataType="json",wysijaAJAX.task="send_preview",wysijaAJAX._wpnonce=wysijanonces.campaigns.send_preview,0<jQuery("#campaignstep3").length&&(wysijaAJAX.data=jQuery("#campaignstep3").serializeArray(),wysijaAJAX.id=jQuery("#email_id").val()),wysijaAJAX.receiver=jQuery("#preview-receiver").val(),jQuery.WYSIJA_SEND()}function t(){return"function"==typeof saveWYSIJA?saveWYSIJA(function(){e()}):e(),!1}function n(){var e={};return r(".checkbox.checklists").each(function(){r(this).attr("checked")&&(e[r(this).attr("id")]={total:parseInt(r("#"+r(this).attr("id")+"count").val()),title:r(this).attr("alt")})}),e}function i(){var e=n(),t=0,i="";for(var a in e)t+=parseInt(e[a].total),i+=e[a].title+", ";if(i=i.substr(0,i.length-2),wysijatrans.alertsend==undefined||r("#scheduleit").attr("checked"))return wysijatrans.ignoreprevious==undefined||!r("#ignore_subscribers").attr("checked")||!!confirm(wysijatrans.ignoreprevious);var s=wysijatrans.alertsend;return s=(s=s.replace("[#]",t)).replace("[#nms]",i),!!confirm(s)}function a(){if(r("#wysija-send-spamtest").hasClass("disabled"))return!1;WysijaPopup.showLoading(),WysijaPopup.showOverlay(),saveWYSIJA(function(){s()})}function s(){wysijaAJAX.popTitle=wysijatrans.previewemail,wysijaAJAX.dataType="json",wysijaAJAX.task="send_spamtest",wysijaAJAX._wpnonce=wysijanonces.campaigns.send_spamtest,r.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(e){if(WysijaPopup.hideLoading(),e.result.result){r("#wysija-spam-results").attr("href",e.result.urlredirect).fadeIn("slow");var t=parseInt(r("#counttriesleft").html())-1;r("#counttriesleft").html(t),t<=0&&r("#wysija-send-spamtest").addClass("disabled"),WysijaPopup.hideOverlay()}else e.result.notriesleft&&alert(e.result.notriesleft),WysijaPopup.hideOverlay()},error:function(e){alert("Request error not JSON:"+e.responseText),delete wysijaAJAXcallback.onSuccess},dataType:wysijaAJAX.dataType})}r(".action-send-spam-test").click(function(){return tb_show(wysijatrans.processqueue,r(this).attr("href")+"&KeepThis=true&TB_iframe=true&height=618&width=1000",null),tb_showIframe(),!1}),r("#wj-send-preview").click(t),r("#submit-send").click(i),r(document).ready(function(){function e(e){r("#scheduleit").attr("checked")?(r(".schedule-row").show(),r("#submit-send").val(wysijatrans.schedule)):(r(".schedule-row").hide(),r("#submit-send").val(e))}if("function"!=typeof saveWYSIJA){r("#datepicker-day").datepicker({minDate:0,showOn:"focus",dateFormat:"yy-mm-dd"});var t=r("#submit-send").val();e(t),r("#scheduleit").change(function(){e(t)})}}),r("#wysija-send-spamtest").click(a),r("#link-back-step2").click(function(){return r("#hid-redir").attr("value","savelastback"),r("#campaignstep3").submit(),!1})}),window.mailpoet="object"==typeof window.mailpoet?window.mailpoet:{$:{}},function(e,i){"use strict";var t=i.mailpoet.fn={};t.isGoodFromAddress=function(e){var t=e.split("@")[1];return void 0!==t&&""!==t&&t.toLowerCase()===i.location.host.toLowerCase()},t.isGmailAddress=function(e){var t=e.split("@")[1];return void 0!==t&&""!==t&&"gmail.com"===t.toLowerCase()}}(jQuery,window),function(e,t){"use strict";var i=t.mailpoet;e(t).load(function(){"object"==typeof e.fn.tooltip&&(i.$.from_email=e("#from_email"),i.$.from_email.tooltip({animation:!0,placement:"bottom",trigger:"manual",html:!0,title:function(){return i.$.from_email.data("message")}}).on({"verifyEmail.mailpoet":function(){if(i.fn.isGoodFromAddress(i.$.from_email.val()))return i.$.from_email.data("message","").tooltip("hide");if("true"===wysijatrans.emailCheck.isGmail)return i.$.from_email.data("message","").tooltip("hide");var e="";return e=i.fn.isGmailAddress(i.$.from_email.val())?wysijatrans.emailCheck.gmailText:wysijatrans.emailCheck.text,i.$.from_email.is(":visible")?i.$.from_email.data("message",e).tooltip("show"):i.$.from_email.tooltip("hide")},keyup:function(){i.$.from_email.trigger("verifyEmail.mailpoet")}}).trigger("verifyEmail.mailpoet"))})}(jQuery,window);
js/admin-campaigns-editTemplate.js CHANGED
@@ -1 +1 @@
1
- function handleRemoveImage(){$$(".wj_images li").invoke("stopObserving","mouseover"),$$(".wj_images li").invoke("stopObserving","mouseout"),$$(".wj_images li").invoke("observe","mouseover",function(){$(this).select("span.delete-wrap").first().show()}),$$(".wj_images li").invoke("observe","mouseout",function(){$(this).select("span.delete-wrap").first().hide()}),$$(".wj_images li .delete").invoke("observe","click",function(){removeImage($(this).innerHTML),$(this).stopObserving("click")})}function setDefaultTheme(e){var t=e.up().previous(".wysija_theme").readAttribute("rel");return wysijaAJAX.task="setDefaultTheme",wysijaAJAX.theme=t,wysijaAJAX._wpnonce=wysijanonces.campaigns.setDefaultTheme,WYSIJA_AJAX_POST({success:function(){$$(".wj_themes .default").invoke("removeClassName","selected"),$(e).addClassName("selected")},loading_message:wysijatrans.theme_setting_default,success_message:wysijatrans.theme_saved_default}),!1}function handleRemoveTheme(){$$(".wj_themes li").invoke("stopObserving","mouseover"),$$(".wj_themes li").invoke("stopObserving","mouseout"),$$(".wj_themes li").invoke("observe","mouseover",function(){$(this).down("span.delete-wrap").show(),$(this).down("span.default-wrap").show()}),$$(".wj_themes li").invoke("observe","mouseout",function(){$(this).down("span.delete-wrap").hide(),$(this).down(".default-wrap").hide()}),$$(".wj_themes li .delete").invoke("observe","click",function(){removeTheme($(this).innerHTML),$(this).stopObserving("click")})}function handleDefaultTheme(){$$(".wj_themes li .default").invoke("observe","click",function(){$$(".wj_themes li .default.selected").length>0&&$$(".wj_themes li .default.selected").first().up().hide(),setDefaultTheme(this)})}function handleSwitchTheme(){$$("a.wysija_theme").invoke("observe","click",function(e){switchThemeWYSIJA(e)})}function removeTheme(e){return confirm(wysijatrans.abouttodeletetheme.replace("%1$s",e))&&($("wysija-theme-"+e).remove(),wysijaAJAX.task="deleteTheme",wysijaAJAX.themekey=e,wysijaAJAX._wpnonce=wysijanonces.campaigns.deleteTheme,WYSIJA_AJAX_POST()),!0}function removeImage(e){var t=wysijaIMG.unset(e);return void 0!==t&&$("wysija-img-"+e).remove(),saveIQS(),!0}function addImage(e){var t=new Element("img",{width:80,height:80,wysija_height:e.height,wysija_width:e.width,wysija_src:e.url,src:e.thumb_url}),i=new Element("a",{wysija_type:"image","class":"wysija_item"}).update(t),s=new Element("li",{id:"wysija-img-"+e.identifier,"class":"new"}).update(i);return s.insert('<span class="delete-wrap" style="display:none;"><span class="delete">'+e.identifier+"</span></span>"),s.insert('<span class="default-wrap" style="display:none;"><span class="default">'+e.identifier+"</span></span>"),$("wj-images-quick").insert({top:s}),handleRemoveImage(),wysijaIMG.set(e.identifier,e),saveIQS(),!0}function imagesTabPostHandler(){return updateImagesToolbarSize()}function updateImagesToolbarSize(){var e=document.viewport.getDimensions().height,t=$("wpadminbar").getLayout().get("margin-box-height"),i=$("wpfooter").getLayout().get("margin-box-height"),s=$("wj-images-quick"),a=s.getLayout(),n=$("wysija_toolbar").getLayout().get("margin-box-height")-a.get("margin-box-height"),o=$("wysija-app").getLayout(),r=o.get("margin-box-height")-o.get("height"),h=$("wpbody-content").getLayout().get("height")-o.get("margin-box-height"),l=e-t-i-n-r-h;s.setStyle({height:l+"px"})}var wysijaIMG=$H(),ajaxOver=!0;document.observe("dom:loaded",function(){void 0!=$("wysija-upload-browse")&&$("wysija-upload-browse").observe("click",function(){return WysijaPopup.open($(this).innerHTML,$(this).readAttribute("href2")),!1}),void 0!=$("wysija-themes-browse")&&$("wysija-themes-browse").observe("click",function(){return WysijaPopup.open($(this).innerHTML,$(this).readAttribute("href2")),!1}),void 0!=$("wysija_divider_settings")&&$("wysija_divider_settings").observe("click",function(){return WysijaPopup.open(wysijatrans.dividerSelectionTitle,$(this).readAttribute("href2")),!1}),handleRemoveImage(),handleRemoveTheme(),handleSwitchTheme(),handleDefaultTheme(),$$(".wysija_toolbar_tabs a").invoke("observe","click",function(){$$(".wysija_toolbar_tabs a").invoke("removeClassName","selected"),$$(".wj_images, .wj_content, .wj_styles, .wj_themes").invoke("hide"),$$(".wj_"+$(this).readAttribute("rel"))[0].show(),$(this).addClassName("selected");var e=window[$(this).readAttribute("rel")+"TabPostHandler"];return"function"==typeof e&&e(),!1}),Event.observe(window,"resize",function(){updateImagesToolbarSize()})});
1
+ function handleRemoveImage(){$$(".wj_images li").invoke("stopObserving","mouseover"),$$(".wj_images li").invoke("stopObserving","mouseout"),$$(".wj_images li").invoke("observe","mouseover",function(){$(this).select("span.delete-wrap").first().show()}),$$(".wj_images li").invoke("observe","mouseout",function(){$(this).select("span.delete-wrap").first().hide()}),$$(".wj_images li .delete").invoke("observe","click",function(){removeImage($(this).innerHTML),$(this).stopObserving("click")})}function setDefaultTheme(e){var t=e.up().previous(".wysija_theme").readAttribute("rel");return wysijaAJAX.task="setDefaultTheme",wysijaAJAX.theme=t,wysijaAJAX._wpnonce=wysijanonces.campaigns.setDefaultTheme,WYSIJA_AJAX_POST({success:function(){$$(".wj_themes .default").invoke("removeClassName","selected"),$(e).addClassName("selected")},loading_message:wysijatrans.theme_setting_default,success_message:wysijatrans.theme_saved_default}),!1}function handleRemoveTheme(){$$(".wj_themes li").invoke("stopObserving","mouseover"),$$(".wj_themes li").invoke("stopObserving","mouseout"),$$(".wj_themes li").invoke("observe","mouseover",function(){$(this).down("span.delete-wrap").show(),$(this).down("span.default-wrap").show()}),$$(".wj_themes li").invoke("observe","mouseout",function(){$(this).down("span.delete-wrap").hide(),$(this).down(".default-wrap").hide()}),$$(".wj_themes li .delete").invoke("observe","click",function(){removeTheme($(this).innerHTML),$(this).stopObserving("click")})}function handleDefaultTheme(){$$(".wj_themes li .default").invoke("observe","click",function(){0<$$(".wj_themes li .default.selected").length&&$$(".wj_themes li .default.selected").first().up().hide(),setDefaultTheme(this)})}function handleSwitchTheme(){$$("a.wysija_theme").invoke("observe","click",function(e){switchThemeWYSIJA(e)})}function removeTheme(e){return confirm(wysijatrans.abouttodeletetheme.replace("%1$s",e))&&($("wysija-theme-"+e).remove(),wysijaAJAX.task="deleteTheme",wysijaAJAX.themekey=e,wysijaAJAX._wpnonce=wysijanonces.campaigns.deleteTheme,WYSIJA_AJAX_POST()),!0}function removeImage(e){return wysijaIMG.unset(e)!==undefined&&$("wysija-img-"+e).remove(),saveIQS(),!0}function addImage(e){var t=new Element("img",{width:80,height:80,wysija_height:e.height,wysija_width:e.width,wysija_src:e.url,src:e.thumb_url}),i=new Element("a",{wysija_type:"image","class":"wysija_item"}).update(t),s=new Element("li",{id:"wysija-img-"+e.identifier,"class":"new"}).update(i);return s.insert('<span class="delete-wrap" style="display:none;"><span class="delete">'+e.identifier+"</span></span>"),s.insert('<span class="default-wrap" style="display:none;"><span class="default">'+e.identifier+"</span></span>"),$("wj-images-quick").insert({top:s}),handleRemoveImage(),wysijaIMG.set(e.identifier,e),saveIQS(),!0}function imagesTabPostHandler(){return updateImagesToolbarSize()}function updateImagesToolbarSize(){var e=document.viewport.getDimensions().height,t=$("wpadminbar").getLayout().get("margin-box-height"),i=$("wpfooter").getLayout().get("margin-box-height"),s=$("wj-images-quick"),a=s.getLayout(),n=$("wysija_toolbar").getLayout().get("margin-box-height")-a.get("margin-box-height"),o=$("wysija-app").getLayout(),r=e-t-i-n-(o.get("margin-box-height")-o.get("height"))-($("wpbody-content").getLayout().get("height")-o.get("margin-box-height"));s.setStyle({height:r+"px"})}var wysijaIMG=$H(),ajaxOver=!0;document.observe("dom:loaded",function(){$("wysija-upload-browse")!=undefined&&$("wysija-upload-browse").observe("click",function(){return WysijaPopup.open($(this).innerHTML,$(this).readAttribute("href2")),!1}),$("wysija-themes-browse")!=undefined&&$("wysija-themes-browse").observe("click",function(){return WysijaPopup.open($(this).innerHTML,$(this).readAttribute("href2")),!1}),$("wysija_divider_settings")!=undefined&&$("wysija_divider_settings").observe("click",function(){return WysijaPopup.open(wysijatrans.dividerSelectionTitle,$(this).readAttribute("href2")),!1}),handleRemoveImage(),handleRemoveTheme(),handleSwitchTheme(),handleDefaultTheme(),$$(".wysija_toolbar_tabs a").invoke("observe","click",function(){$$(".wysija_toolbar_tabs a").invoke("removeClassName","selected"),$$(".wj_images, .wj_content, .wj_styles, .wj_themes").invoke("hide"),$$(".wj_"+$(this).readAttribute("rel"))[0].show(),$(this).addClassName("selected");var e=window[$(this).readAttribute("rel")+"TabPostHandler"];return"function"==typeof e&&e(),!1}),Event.observe(window,"resize",function(){updateImagesToolbarSize()})});
js/admin-campaigns-image_data.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(e){e(document).on("submit","#image-data-form",function(){var n=e("#url").val(),a=e("#alt").val();return(""===n||"http://"===n||"https://"===n)&&(n=null),null!==n&&(n=encodeURI(n).replace(/[!'()*]/g,escape)),""!==a&&(a=encodeURIComponent(a).replace(/[!'()*]/g,escape)),window.parent.WysijaPopup.success({url:n,alt:a}),!1})});
1
+ jQuery(function(a){a(document).on("submit","#image-data-form",function(){var e=a("#url").val(),n=a("#alt").val();return""!==e&&"http://"!==e&&"https://"!==e||(e=null),null!==e&&(e=encodeURI(e).replace(/[!'()*]/g,escape)),""!==n&&(n=encodeURIComponent(n).replace(/[!'()*]/g,escape)),window.parent.WysijaPopup.success({url:e,alt:n}),!1})});
js/admin-campaigns-medias.js CHANGED
@@ -1 +1 @@
1
- function closeLbox(){window.parent.WysijaPopup.close()}function unset(e){window.parent.removeImage(e)}function insert(e){window.parent.addImage(e),"undefined"!=typeof filesToAdd&&(filesToAdd>1?filesToAdd--:jQuery("#overlay").hide())}function hideShowOverlay(){if(window.parent.ajaxOver)formsubmit||jQuery("#overlay").hide();else if(formsubmit)return jQuery("#wysija-browse-form").submit(),formsubmit=!1,!1}var formsubmit=!1;jQuery(function(e){e(".wysija-thumb").click(function(){return e(this).hasClass("selected")?(e(this).removeClass("selected"),unset("wp-"+e(this).find("span.identifier").html())):(e(this).addClass("selected"),insert({identifier:"wp-"+e(this).find("span.identifier").html(),width:e(this).find("span.width").html(),height:e(this).find("span.height").html(),url:e(this).find("span.url").html(),thumb_url:e(this).find("span.thumb_url").html()})),!0}),e("#wysija-close, #close-pop-alt").click(function(){return closeLbox(),!1}),e(".del-attachment").click(function(i){return i.stopPropagation(),confirm(wysijatrans.deleteimg)&&(e("#wysija-browse-form").append('<input type="hidden" name="subaction" value="delete" /><input type="hidden" name="imgid" value="'+parseInt(e(this).html())+'" /><input type="hidden" name="_wpnonce" value="'+wysijanonces.campaigns.sub_delete_image+'" />'),formsubmit=!0,unset("wp-"+e(this).html()),jQuery("#overlay").show(),window.parent.ajaxOver=!1,hideShowOverlay()),!1})});
1
+ function closeLbox(){window.parent.WysijaPopup.close()}function unset(e){window.parent.removeImage(e)}function insert(e){window.parent.addImage(e),"undefined"!=typeof filesToAdd&&(1<filesToAdd?filesToAdd--:jQuery("#overlay").hide())}function hideShowOverlay(){if(window.parent.ajaxOver)formsubmit||jQuery("#overlay").hide();else if(formsubmit)return jQuery("#wysija-browse-form").submit(),formsubmit=!1}var formsubmit=!1;jQuery(function(i){i(".wysija-thumb").click(function(){return i(this).hasClass("selected")?(i(this).removeClass("selected"),unset("wp-"+i(this).find("span.identifier").html())):(i(this).addClass("selected"),insert({identifier:"wp-"+i(this).find("span.identifier").html(),width:i(this).find("span.width").html(),height:i(this).find("span.height").html(),url:i(this).find("span.url").html(),thumb_url:i(this).find("span.thumb_url").html()})),!0}),i("#wysija-close, #close-pop-alt").click(function(){return closeLbox(),!1}),i(".del-attachment").click(function(e){return e.stopPropagation(),confirm(wysijatrans.deleteimg)&&(i("#wysija-browse-form").append('<input type="hidden" name="subaction" value="delete" /><input type="hidden" name="imgid" value="'+parseInt(i(this).html())+'" /><input type="hidden" name="_wpnonce" value="'+wysijanonces.campaigns.sub_delete_image+'" />'),formsubmit=!0,unset("wp-"+i(this).html()),jQuery("#overlay").show(),window.parent.ajaxOver=!1,hideShowOverlay()),!1})});
js/admin-campaigns-themes.js CHANGED
@@ -1 +1 @@
1
- var allthemes={};displaychange=0,jQuery(function(a){function t(a,t){wysijaAJAX.task="install_theme";var r=allthemes[a];return wysijaAJAX.theme_id=r.id,wysijaAJAX.theme_key=r.key,wysijaAJAX.premium=parseInt(r.is_premium),wysijaAJAX.theme_name=r.name,t&&!confirm(wysijatrans.reinstallwarning.replace("%1$s",r.key))?!1:(wysijaAJAX._wpnonce=wysijanonces.campaigns.install_theme,jQuery("#overlay").show(),void jQuery.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(a){e("search-view"),jQuery("#overlay").hide(),jQuery.WYSIJA_HANDLE_RESPONSE(a),window.parent.jQuery("#wj_themes_list").html(a.result.themes),window.parent.handleSwitchTheme(),window.parent.handleRemoveTheme()},error:function(a){jQuery.WYSIJA_HANDLE_RESPONSE(a),jQuery("#overlay").hide(),e("search-view")},dataType:"json"}))}function e(t,e){a(".panel").hide(),a("#"+t).show(),void 0!==e&&e===!0&&setTimeout(function(){window.parent.WysijaPopup.setDimensions()},1)}function r(){i()}function i(t){var e='<li><img class="loading" title="Loading" alt="loading" src="../wp-content/plugins/wysija-newsletters/img/wpspin_light.gif" /></li>';a("#themes-list").html(e);var r="";if(void 0===t)var t={is_premium:0};else void 0===t.is_premium&&(t.is_premium=0);r="&"+jQuery.param(t),a.getJSON("//api.mailpoet.com/theme/search?domain="+wysijatrans.domainname+r+"&callback=?",function(t){var e="";if(t){var r="";jQuery.each(t.themes,function(a,t){allthemes[t.id]=t,r="",(a+1)%5===0&&(r+=" last");var i=wysijatrans.install;-1!==jQuery.inArray(t.key,wysijatrans.installedthemes)&&(r+=" installed",i=wysijatrans.reinstall),1===parseInt(t.is_premium)&&(r+=" premium",1!==parseInt(wysijatrans.ispremium)&&(i=wysijatrans.premiumonly)),e+='<li class="theme'+r+'">',e+='<div class="thumbnail">',e+='<img src="'+t.thumbnail_large+'" alt="'+t.name+'" title="'+t.name+'" />',e+='<a class="button-primary install'+r+'" href="javascript:;" data-id="'+t.id+'">'+i+"</a>",e+="</div>",e+='<a class="infos" href="javascript:;" data-id="'+t.id+'">'+wysijatrans.viewinfos+"</a>",e+="</li>"})}else{var e="<div>";e+="<strong>"+wysijatrans.errorconnecting+"</strong>",e+="</div>"}a("#themes-list").html(e)})}function s(a,t){if(null==a)return"http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s="+t;var e=function(a){function t(a,t){return a<<t|a>>>32-t}function e(a,t){var e,r,i,s,n;return i=2147483648&a,s=2147483648&t,e=1073741824&a,r=1073741824&t,n=(1073741823&a)+(1073741823&t),e&r?2147483648^n^i^s:e|r?1073741824&n?3221225472^n^i^s:1073741824^n^i^s:n^i^s}function r(a,t,e){return a&t|~a&e}function i(a,t,e){return a&e|t&~e}function s(a,t,e){return a^t^e}function n(a,t,e){return t^(a|~e)}function o(a,i,s,n,o,l,m){return a=e(a,e(e(r(i,s,n),o),m)),e(t(a,l),i)}function l(a,r,s,n,o,l,m){return a=e(a,e(e(i(r,s,n),o),m)),e(t(a,l),r)}function m(a,r,i,n,o,l,m){return a=e(a,e(e(s(r,i,n),o),m)),e(t(a,l),r)}function c(a,r,i,s,o,l,m){return a=e(a,e(e(n(r,i,s),o),m)),e(t(a,l),r)}function d(a){for(var t,e=a.length,r=e+8,i=(r-r%64)/64,s=16*(i+1),n=Array(s-1),o=0,l=0;e>l;)t=(l-l%4)/4,o=l%4*8,n[t]=n[t]|a.charCodeAt(l)<<o,l++;return t=(l-l%4)/4,o=l%4*8,n[t]=n[t]|128<<o,n[s-2]=e<<3,n[s-1]=e>>>29,n}function u(a){var t,e,r="",i="";for(e=0;3>=e;e++)t=a>>>8*e&255,i="0"+t.toString(16),r+=i.substr(i.length-2,2);return r}function h(a){a=a.replace(/rn/g,"n");for(var t="",e=0;e<a.length;e++){var r=a.charCodeAt(e);128>r?t+=String.fromCharCode(r):r>127&&2048>r?(t+=String.fromCharCode(r>>6|192),t+=String.fromCharCode(63&r|128)):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128),t+=String.fromCharCode(63&r|128))}return t}var p,v,w,f,y,j,g,_,A,C=Array(),k=7,b=12,S=17,I=22,J=5,Q=9,X=14,x=20,T=4,$=11,E=16,N=23,O=6,P=10,L=15,R=21;for(a=h(a),C=d(a),j=1732584193,g=4023233417,_=2562383102,A=271733878,p=0;p<C.length;p+=16)v=j,w=g,f=_,y=A,j=o(j,g,_,A,C[p+0],k,3614090360),A=o(A,j,g,_,C[p+1],b,3905402710),_=o(_,A,j,g,C[p+2],S,606105819),g=o(g,_,A,j,C[p+3],I,3250441966),j=o(j,g,_,A,C[p+4],k,4118548399),A=o(A,j,g,_,C[p+5],b,1200080426),_=o(_,A,j,g,C[p+6],S,2821735955),g=o(g,_,A,j,C[p+7],I,4249261313),j=o(j,g,_,A,C[p+8],k,1770035416),A=o(A,j,g,_,C[p+9],b,2336552879),_=o(_,A,j,g,C[p+10],S,4294925233),g=o(g,_,A,j,C[p+11],I,2304563134),j=o(j,g,_,A,C[p+12],k,1804603682),A=o(A,j,g,_,C[p+13],b,4254626195),_=o(_,A,j,g,C[p+14],S,2792965006),g=o(g,_,A,j,C[p+15],I,1236535329),j=l(j,g,_,A,C[p+1],J,4129170786),A=l(A,j,g,_,C[p+6],Q,3225465664),_=l(_,A,j,g,C[p+11],X,643717713),g=l(g,_,A,j,C[p+0],x,3921069994),j=l(j,g,_,A,C[p+5],J,3593408605),A=l(A,j,g,_,C[p+10],Q,38016083),_=l(_,A,j,g,C[p+15],X,3634488961),g=l(g,_,A,j,C[p+4],x,3889429448),j=l(j,g,_,A,C[p+9],J,568446438),A=l(A,j,g,_,C[p+14],Q,3275163606),_=l(_,A,j,g,C[p+3],X,4107603335),g=l(g,_,A,j,C[p+8],x,1163531501),j=l(j,g,_,A,C[p+13],J,2850285829),A=l(A,j,g,_,C[p+2],Q,4243563512),_=l(_,A,j,g,C[p+7],X,1735328473),g=l(g,_,A,j,C[p+12],x,2368359562),j=m(j,g,_,A,C[p+5],T,4294588738),A=m(A,j,g,_,C[p+8],$,2272392833),_=m(_,A,j,g,C[p+11],E,1839030562),g=m(g,_,A,j,C[p+14],N,4259657740),j=m(j,g,_,A,C[p+1],T,2763975236),A=m(A,j,g,_,C[p+4],$,1272893353),_=m(_,A,j,g,C[p+7],E,4139469664),g=m(g,_,A,j,C[p+10],N,3200236656),j=m(j,g,_,A,C[p+13],T,681279174),A=m(A,j,g,_,C[p+0],$,3936430074),_=m(_,A,j,g,C[p+3],E,3572445317),g=m(g,_,A,j,C[p+6],N,76029189),j=m(j,g,_,A,C[p+9],T,3654602809),A=m(A,j,g,_,C[p+12],$,3873151461),_=m(_,A,j,g,C[p+15],E,530742520),g=m(g,_,A,j,C[p+2],N,3299628645),j=c(j,g,_,A,C[p+0],O,4096336452),A=c(A,j,g,_,C[p+7],P,1126891415),_=c(_,A,j,g,C[p+14],L,2878612391),g=c(g,_,A,j,C[p+5],R,4237533241),j=c(j,g,_,A,C[p+12],O,1700485571),A=c(A,j,g,_,C[p+3],P,2399980690),_=c(_,A,j,g,C[p+10],L,4293915773),g=c(g,_,A,j,C[p+1],R,2240044497),j=c(j,g,_,A,C[p+8],O,1873313359),A=c(A,j,g,_,C[p+15],P,4264355552),_=c(_,A,j,g,C[p+6],L,2734768916),g=c(g,_,A,j,C[p+13],R,1309151649),j=c(j,g,_,A,C[p+4],O,4149444226),A=c(A,j,g,_,C[p+11],P,3174756917),_=c(_,A,j,g,C[p+2],L,718787259),g=c(g,_,A,j,C[p+9],R,3951481745),j=e(j,v),g=e(g,w),_=e(_,f),A=e(A,y);var z=u(j)+u(g)+u(_)+u(A);return z.toLowerCase()},t=t||80;return"http://www.gravatar.com/avatar/"+e(a)+".jpg?s="+t}a(function(){a("#themes-reload").length>0&&(wysijaAJAX.task="refresh_themes",jQuery.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(a){window.parent.jQuery("#wj_themes_list").html(a.result.themes),window.parent.handleSwitchTheme(),window.parent.handleRemoveTheme()},error:function(){},dataType:"json"}))}),a(document).on("click",".install",function(){return t(a(this).data("id"),a(this).hasClass("installed")),!1}),a(document).on("click",".infos",function(){var t=allthemes[a(this).data("id")],r="",i=wysijatrans.install;if(void 0!==t){-1!==a.inArray(t.key,wysijatrans.installedthemes)&&(r=" installed",i=wysijatrans.reinstall),1===parseInt(t.is_premium)&&(r+=" premium",1!==parseInt(wysijatrans.ispremium)&&(i=wysijatrans.premiumonly));for(var n='<div class="theme-screenshot"><img src="'+t.screenshot+'" alt="'+t.name+'" /></div>',o='<img src="'+s(t.author_email,80)+'" class="avatar" width="80px"/>',l=o+"<h2>"+t.name+'</h2><p><input type="button" value="'+i+'" data-id="'+t.id+'" class="button-primary install'+r+'" /></p>',m='<div class="stars"><div id="average-vote" class="star-rating" style="width:'+95*t.rating/5+'px;"></div></div>',c='<div class="stars my-rating clearfix" data-theme="'+parseInt(t.id)+'">',d=0;5>d;d++)c+=parseInt(t.user_rating)>d?'<a href="javascript:;" class="active" data-value="'+(d+1)+'"></a>':'<a href="javascript:;" data-value="'+(d+1)+'"></a>';c+="</div>",l+='<div class="paragraph"><strong>'+wysijatrans.stars.replace("%1$s","</strong> "+wysijatrans.totalvotes.replace("%1$s",'<span id="total-votes">'+t.votes+"</span>")+m)+"</div>",l+='<div class="paragraph"><strong>'+wysijatrans.starsyr.replace("%1$s","</strong>"+c)+"</div>",l+="<p><strong>"+wysijatrans.downloads.replace("%1$s","</strong>"+t.downloads_zip)+"</p>",l+="<p><strong>"+wysijatrans.lastupdated.replace("%1$s","</strong>"+t.updated_at)+"</p>",l+="<p>"+wysijatrans.viewallthemes.replace("%1$s",'<a href="javascript:;" class="author-id-filter" id="author-id-filter'+t.author_id+'">'+t.author_name+"</a>")+"</p>",l+='<p><a href="//api.mailpoet.com/download/zip/'+t.id+"?domain="+wysijatrans.domainname+'">'+wysijatrans.downloadzip+"</a></p>";var u="";1==t.has_psd&&(u='<p><a href="//api.mailpoet.com/download/psd/'+t.id+"?domain="+wysijatrans.domainname+'" class="downpsd">'+wysijatrans.downloadpsd+"</a></p>",1===parseInt(t.is_premium)&&1!==parseInt(wysijatrans.ispremium)&&(u="<p><strong>"+wysijatrans.premiumfiles+"</strong></p>")),l+=u,l+='<p><a href="'+t.author_url+'" target="_blank">'+wysijatrans.viewauthorsite+"</a></p>";var h='<div class="wrap actions"><a class="button-secondary2 theme-view-back" href="javascript:;">'+wysijatrans.viewback+'</a></div><div class="theme-infos clearfix"><div class="preview">'+n+'</div><div class="infos">'+l+"</div></div>";return a("#theme-view").html(h),e("theme-view",!0),!1}}),a(document).on("click",".theme-view-back",function(){return e("search-view",!0),!1}),a("#gallery-form").submit(function(){return r(),!1}),a(document).on("click",".my-rating a",function(){for(var t=parseInt(a(this).data("value")),e=0;5>e;e++)t>e?a(a(".my-rating a")[e]).addClass("active"):a(a(".my-rating a")[e]).removeClass("active");var r=parseInt(a(this).parent().data("theme"));return a.getJSON("//api.mailpoet.com/theme/rate/"+r+"?rating="+t+"&domain="+wysijatrans.domainname+"&callback=?",function(e){e&&(a("#average-vote").css("width",parseInt(95*e.rating/5)),a("#total-votes").html(e.votes),allthemes[r].votes=e.votes,allthemes[r].user_rating=t,allthemes[r].rating=e.rating)}),!1}),a(document).on("hover",".my-rating a",function(){var t=parseInt(a(this).data("value"));a(".my-rating a").removeClass("on").removeClass("off");for(var e=0;5>e;e++)a(a(".my-rating a")[e]).addClass(t>e?"on":"off")}),a(document).on("mouseout",".my-rating a",function(){a(".my-rating a").removeClass("on").removeClass("off")}),a("#sub-theme-box").click(function(){e("theme-upload",!0)}),a(document).on("click","a.author-id-filter",function(){return a("#filter-selection").html('<a href="javascript:;" class="button-secondary2 filter-none">'+wysijatrans.showallthemes+"</a>"),i({author_id:parseInt(a(this).attr("id").replace("author-id-filter",""))}),e("search-view",!0),!1}),a(document).on("click","a.filter-none",function(){return a("#filter-selection").html(""),i(),!1}),a("#wj_paginator").on("click","a",function(){return a("#filter-selection").html(""),a(this).hasClass("selected")?!1:(i({is_premium:"premium"===a(this).data("type")?1:0}),a("#wj_paginator a").removeClass("selected"),a(this).addClass("selected"),!1)}),i()});
1
+ var allthemes={};displaychange=0,jQuery(function(c){function a(a,e){wysijaAJAX.task="install_theme";var t=allthemes[a];if(wysijaAJAX.theme_id=t.id,wysijaAJAX.theme_key=t.key,wysijaAJAX.premium=parseInt(t.is_premium),wysijaAJAX.theme_name=t.name,e&&!confirm(wysijatrans.reinstallwarning.replace("%1$s",t.key)))return!1;wysijaAJAX._wpnonce=wysijanonces.campaigns.install_theme,jQuery("#overlay").show(),jQuery.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(a){d("search-view"),jQuery("#overlay").hide(),jQuery.WYSIJA_HANDLE_RESPONSE(a),window.parent.jQuery("#wj_themes_list").html(a.result.themes),window.parent.handleSwitchTheme(),window.parent.handleRemoveTheme()},error:function(a){jQuery.WYSIJA_HANDLE_RESPONSE(a),jQuery("#overlay").hide(),d("search-view")},dataType:"json"})}function d(a,e){c(".panel").hide(),c("#"+a).show(),e!==undefined&&!0===e&&setTimeout(function(){window.parent.WysijaPopup.setDimensions()},1)}function e(){t()}function t(a){var e='<li><img class="loading" title="Loading" alt="loading" src="../wp-content/plugins/wysija-newsletters/img/wpspin_light.gif" /></li>';c("#themes-list").html(e);var t="";if(a===undefined)a={is_premium:0};else a.is_premium===undefined&&(a.is_premium=0);t="&"+jQuery.param(a),c.getJSON("//api.mailpoet.com/theme/search?domain="+wysijatrans.domainname+t+"&callback=?",function(a){var r="";if(a){var i="";jQuery.each(a.themes,function(a,e){allthemes[e.id]=e,i="",(a+1)%5==0&&(i+=" last");var t=wysijatrans.install;-1!==jQuery.inArray(e.key,wysijatrans.installedthemes)&&(i+=" installed",t=wysijatrans.reinstall),1===parseInt(e.is_premium)&&(i+=" premium",1!==parseInt(wysijatrans.ispremium)&&(t=wysijatrans.premiumonly)),r+='<li class="theme'+i+'">',r+='<div class="thumbnail">',r+='<img src="'+e.thumbnail_large+'" alt="'+e.name+'" title="'+e.name+'" />',r+='<a class="button-primary install'+i+'" href="javascript:;" data-id="'+e.id+'">'+t+"</a>",r+="</div>",r+='<a class="infos" href="javascript:;" data-id="'+e.id+'">'+wysijatrans.viewinfos+"</a>",r+="</li>"})}else{r="<div>";r+="<strong>"+wysijatrans.errorconnecting+"</strong>",r+="</div>"}c("#themes-list").html(r)})}function u(a,e){if(null==a)return"http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s="+e;e=e||80;return"http://www.gravatar.com/avatar/"+function(a){function o(a,e){return a<<e|a>>>32-e}function l(a,e){var t,r,i,s,n;return i=2147483648&a,s=2147483648&e,n=(1073741823&a)+(1073741823&e),(t=1073741824&a)&(r=1073741824&e)?2147483648^n^i^s:t|r?1073741824&n?3221225472^n^i^s:1073741824^n^i^s:n^i^s}function m(a,e,t){return a&e|~a&t}function c(a,e,t){return a&t|e&~t}function d(a,e,t){return a^e^t}function u(a,e,t){return e^(a|~t)}function e(a,e,t,r,i,s,n){return l(o(a=l(a,l(l(m(e,t,r),i),n)),s),e)}function t(a,e,t,r,i,s,n){return l(o(a=l(a,l(l(c(e,t,r),i),n)),s),e)}function r(a,e,t,r,i,s,n){return l(o(a=l(a,l(l(d(e,t,r),i),n)),s),e)}function i(a,e,t,r,i,s,n){return l(o(a=l(a,l(l(u(e,t,r),i),n)),s),e)}function s(a){for(var e,t=a.length,r=t+8,i=16*((r-r%64)/64+1),s=Array(i-1),n=0,o=0;o<t;)n=o%4*8,s[e=(o-o%4)/4]=s[e]|a.charCodeAt(o)<<n,o++;return n=o%4*8,s[e=(o-o%4)/4]=s[e]|128<<n,s[i-2]=t<<3,s[i-1]=t>>>29,s}function n(a){var e,t="",r="";for(e=0;e<=3;e++)t+=(r="0"+(a>>>8*e&255).toString(16)).substr(r.length-2,2);return t}function h(a){a=a.replace(/rn/g,"n");for(var e="",t=0;t<a.length;t++){var r=a.charCodeAt(t);r<128?e+=String.fromCharCode(r):(127<r&&r<2048?e+=String.fromCharCode(r>>6|192):(e+=String.fromCharCode(r>>12|224),e+=String.fromCharCode(r>>6&63|128)),e+=String.fromCharCode(63&r|128))}return e}var p,w,v,f,y,j,g,_,A,C=Array(),k=7,b=12,S=17,I=22,J=5,Q=9,X=14,x=20,T=4,$=11,E=16,N=23,O=6,P=10,L=15,R=21;for(C=s(a=h(a)),j=1732584193,g=4023233417,_=2562383102,A=271733878,p=0;p<C.length;p+=16)g=i(g=i(g=i(g=i(g=r(g=r(g=r(g=r(g=t(g=t(g=t(g=t(g=e(g=e(g=e(g=e(v=g,_=e(f=_,A=e(y=A,j=e(w=j,g,_,A,C[p+0],k,3614090360),g,_,C[p+1],b,3905402710),j,g,C[p+2],S,606105819),A,j,C[p+3],I,3250441966),_=e(_,A=e(A,j=e(j,g,_,A,C[p+4],k,4118548399),g,_,C[p+5],b,1200080426),j,g,C[p+6],S,2821735955),A,j,C[p+7],I,4249261313),_=e(_,A=e(A,j=e(j,g,_,A,C[p+8],k,1770035416),g,_,C[p+9],b,2336552879),j,g,C[p+10],S,4294925233),A,j,C[p+11],I,2304563134),_=e(_,A=e(A,j=e(j,g,_,A,C[p+12],k,1804603682),g,_,C[p+13],b,4254626195),j,g,C[p+14],S,2792965006),A,j,C[p+15],I,1236535329),_=t(_,A=t(A,j=t(j,g,_,A,C[p+1],J,4129170786),g,_,C[p+6],Q,3225465664),j,g,C[p+11],X,643717713),A,j,C[p+0],x,3921069994),_=t(_,A=t(A,j=t(j,g,_,A,C[p+5],J,3593408605),g,_,C[p+10],Q,38016083),j,g,C[p+15],X,3634488961),A,j,C[p+4],x,3889429448),_=t(_,A=t(A,j=t(j,g,_,A,C[p+9],J,568446438),g,_,C[p+14],Q,3275163606),j,g,C[p+3],X,4107603335),A,j,C[p+8],x,1163531501),_=t(_,A=t(A,j=t(j,g,_,A,C[p+13],J,2850285829),g,_,C[p+2],Q,4243563512),j,g,C[p+7],X,1735328473),A,j,C[p+12],x,2368359562),_=r(_,A=r(A,j=r(j,g,_,A,C[p+5],T,4294588738),g,_,C[p+8],$,2272392833),j,g,C[p+11],E,1839030562),A,j,C[p+14],N,4259657740),_=r(_,A=r(A,j=r(j,g,_,A,C[p+1],T,2763975236),g,_,C[p+4],$,1272893353),j,g,C[p+7],E,4139469664),A,j,C[p+10],N,3200236656),_=r(_,A=r(A,j=r(j,g,_,A,C[p+13],T,681279174),g,_,C[p+0],$,3936430074),j,g,C[p+3],E,3572445317),A,j,C[p+6],N,76029189),_=r(_,A=r(A,j=r(j,g,_,A,C[p+9],T,3654602809),g,_,C[p+12],$,3873151461),j,g,C[p+15],E,530742520),A,j,C[p+2],N,3299628645),_=i(_,A=i(A,j=i(j,g,_,A,C[p+0],O,4096336452),g,_,C[p+7],P,1126891415),j,g,C[p+14],L,2878612391),A,j,C[p+5],R,4237533241),_=i(_,A=i(A,j=i(j,g,_,A,C[p+12],O,1700485571),g,_,C[p+3],P,2399980690),j,g,C[p+10],L,4293915773),A,j,C[p+1],R,2240044497),_=i(_,A=i(A,j=i(j,g,_,A,C[p+8],O,1873313359),g,_,C[p+15],P,4264355552),j,g,C[p+6],L,2734768916),A,j,C[p+13],R,1309151649),_=i(_,A=i(A,j=i(j,g,_,A,C[p+4],O,4149444226),g,_,C[p+11],P,3174756917),j,g,C[p+2],L,718787259),A,j,C[p+9],R,3951481745),j=l(j,w),g=l(g,v),_=l(_,f),A=l(A,y);return(n(j)+n(g)+n(_)+n(A)).toLowerCase()}(a)+".jpg?s="+e}c(function(){0<c("#themes-reload").length&&(wysijaAJAX.task="refresh_themes",jQuery.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(a){window.parent.jQuery("#wj_themes_list").html(a.result.themes),window.parent.handleSwitchTheme(),window.parent.handleRemoveTheme()},error:function(){},dataType:"json"}))}),c(document).on("click",".install",function(){return a(c(this).data("id"),c(this).hasClass("installed")),!1}),c(document).on("click",".infos",function(){var a=allthemes[c(this).data("id")],e="",t=wysijatrans.install;if(a!==undefined){-1!==c.inArray(a.key,wysijatrans.installedthemes)&&(e=" installed",t=wysijatrans.reinstall),1===parseInt(a.is_premium)&&(e+=" premium",1!==parseInt(wysijatrans.ispremium)&&(t=wysijatrans.premiumonly));for(var r='<div class="theme-screenshot"><img src="'+a.screenshot+'" alt="'+a.name+'" /></div>',i='<img src="'+u(a.author_email,80)+'" class="avatar" width="80px"/>'+"<h2>"+a.name+'</h2><p><input type="button" value="'+t+'" data-id="'+a.id+'" class="button-primary install'+e+'" /></p>',s='<div class="stars"><div id="average-vote" class="star-rating" style="width:'+95*a.rating/5+'px;"></div></div>',n='<div class="stars my-rating clearfix" data-theme="'+parseInt(a.id)+'">',o=0;o<5;o++)parseInt(a.user_rating)>o?n+='<a href="javascript:;" class="active" data-value="'+(o+1)+'"></a>':n+='<a href="javascript:;" data-value="'+(o+1)+'"></a>';n+="</div>",i+='<div class="paragraph"><strong>'+wysijatrans.stars.replace("%1$s","</strong> "+wysijatrans.totalvotes.replace("%1$s",'<span id="total-votes">'+a.votes+"</span>")+s)+"</div>",i+='<div class="paragraph"><strong>'+wysijatrans.starsyr.replace("%1$s","</strong>"+n)+"</div>",i+="<p><strong>"+wysijatrans.downloads.replace("%1$s","</strong>"+a.downloads_zip)+"</p>",i+="<p><strong>"+wysijatrans.lastupdated.replace("%1$s","</strong>"+a.updated_at)+"</p>",i+="<p>"+wysijatrans.viewallthemes.replace("%1$s",'<a href="javascript:;" class="author-id-filter" id="author-id-filter'+a.author_id+'">'+a.author_name+"</a>")+"</p>",i+='<p><a href="//api.mailpoet.com/download/zip/'+a.id+"?domain="+wysijatrans.domainname+'">'+wysijatrans.downloadzip+"</a></p>";var l="";1==a.has_psd&&(l='<p><a href="//api.mailpoet.com/download/psd/'+a.id+"?domain="+wysijatrans.domainname+'" class="downpsd">'+wysijatrans.downloadpsd+"</a></p>",1===parseInt(a.is_premium)&&1!==parseInt(wysijatrans.ispremium)&&(l="<p><strong>"+wysijatrans.premiumfiles+"</strong></p>")),i+=l,i+='<p><a href="'+a.author_url+'" target="_blank">'+wysijatrans.viewauthorsite+"</a></p>";var m='<div class="wrap actions"><a class="button-secondary2 theme-view-back" href="javascript:;">'+wysijatrans.viewback+'</a></div><div class="theme-infos clearfix"><div class="preview">'+r+'</div><div class="infos">'+i+"</div></div>";return c("#theme-view").html(m),d("theme-view",!0),!1}}),c(document).on("click",".theme-view-back",function(){return d("search-view",!0),!1}),c("#gallery-form").submit(function(){return e(),!1}),c(document).on("click",".my-rating a",function(){for(var e=parseInt(c(this).data("value")),a=0;a<5;a++)a<e?c(c(".my-rating a")[a]).addClass("active"):c(c(".my-rating a")[a]).removeClass("active");var t=parseInt(c(this).parent().data("theme"));return c.getJSON("//api.mailpoet.com/theme/rate/"+t+"?rating="+e+"&domain="+wysijatrans.domainname+"&callback=?",function(a){a&&(c("#average-vote").css("width",parseInt(95*a.rating/5)),c("#total-votes").html(a.votes),allthemes[t].votes=a.votes,allthemes[t].user_rating=e,allthemes[t].rating=a.rating)}),!1}),c(document).on("hover",".my-rating a",function(){var a=parseInt(c(this).data("value"));c(".my-rating a").removeClass("on").removeClass("off");for(var e=0;e<5;e++)e<a?c(c(".my-rating a")[e]).addClass("on"):c(c(".my-rating a")[e]).addClass("off")}),c(document).on("mouseout",".my-rating a",function(){c(".my-rating a").removeClass("on").removeClass("off")}),c("#sub-theme-box").click(function(){d("theme-upload",!0)}),c(document).on("click","a.author-id-filter",function(){return c("#filter-selection").html('<a href="javascript:;" class="button-secondary2 filter-none">'+wysijatrans.showallthemes+"</a>"),t({author_id:parseInt(c(this).attr("id").replace("author-id-filter",""))}),d("search-view",!0),!1}),c(document).on("click","a.filter-none",function(){return c("#filter-selection").html(""),t(),!1}),c("#wj_paginator").on("click","a",function(){return c("#filter-selection").html(""),c(this).hasClass("selected")||(t({is_premium:"premium"===c(this).data("type")?1:0}),c("#wj_paginator a").removeClass("selected"),c(this).addClass("selected")),!1}),t()});
js/admin-campaigns-welcome_new.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(u){function n(){return u("#poll_result").html(""),"url"==u(this).val()&&""!=u('input[name="how_did_you_find_us_url"]')?(u('input[name="how_did_you_find_us_url"]').focus(),!1):(wysijaAJAX.task="save_poll",wysijaAJAX._wpnonce=wysijanonces.campaigns.save_poll,wysijaAJAX.how=u('input[name="how_did_you_find_us"]:checked').val(),wysijaAJAX.where=u('input[name="how_did_you_find_us_url"]').val(),jQuery.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:_,error:e,dataType:"json"}),!1)}function _(n){u("#poll_result").html(n.result.msg)}function e(u){alert("Request error not JSON:"+u.responseText)}u('input[name="how_did_you_find_us"]').change(n),u('input[name="how_did_you_find_us_url"]').blur(n)});
1
+ jQuery(function(n){function u(){return n("#poll_result").html(""),"url"==n(this).val()&&""!=n('input[name="how_did_you_find_us_url"]')?n('input[name="how_did_you_find_us_url"]').focus():(wysijaAJAX.task="save_poll",wysijaAJAX._wpnonce=wysijanonces.campaigns.save_poll,wysijaAJAX.how=n('input[name="how_did_you_find_us"]:checked').val(),wysijaAJAX.where=n('input[name="how_did_you_find_us_url"]').val(),jQuery.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:_,error:e,dataType:"json"})),!1}function _(u){n("#poll_result").html(u.result.msg)}function e(u){alert("Request error not JSON:"+u.responseText)}n('input[name="how_did_you_find_us"]').change(u),n('input[name="how_did_you_find_us_url"]').blur(u)});
js/admin-config-form_widget_settings.js CHANGED
@@ -1 +1 @@
1
- function generateWidgetTemplate(e){void 0===e?window.parent.WysijaPopup.cancel():(toggleSubmit("off"),wysijaAJAX.task="wysija_form_generate_template",wysijaAJAX.wysijaData=Base64.encode(Object.toJSON(e).gsub('\\"','"').gsub('"[{',"[{").gsub('}]"',"}]")),new Ajax.Request(wysijaAJAX.ajaxurl,{method:"post",parameters:wysijaAJAX,onSuccess:function(e){window.parent.WysijaPopup.success(e.responseJSON.result)},onFailure:function(){window.parent.WysijaPopup.cancel()}}))}function toggleSubmit(e){"on"===e?$("widget-settings-submit").removeAttribute("disabled"):$("widget-settings-submit").writeAttribute("disabled",!0)}function manageField(e){void 0===e?window.parent.WysijaPopup.cancel():(toggleSubmit("off"),wysijaAJAX.form_id=window.parent.wysijaAJAX.form_id,wysijaAJAX.task="wysija_form_manage_field",wysijaAJAX._wpnonce=wysijanonces.config.wysija_form_manage_field,wysijaAJAX.wysijaData=Base64.encode(Object.toJSON(e).gsub('\\"','"').gsub('"[{',"[{").gsub('}]"',"}]")),new Ajax.Request(wysijaAJAX.ajaxurl,{method:"post",parameters:wysijaAJAX,onSuccess:function(e){var t=e.responseJSON.result;t.result===!1?displayError(t.error):window.parent.WysijaPopup.success(t.data)},onFailure:function(){window.parent.WysijaPopup.cancel()}}))}function saveData(e){switch(void 0!==e.label&&(e.label=window.parent.WysijaForm.encodeHtmlValue(e.label)),e.type){case"input":break;case"textarea":break;case"submit":break;case"country":case"select":case"checkbox":case"radio":if(null!==$("items-selection")){var t,i=$("items-selection").select("li"),a=[];if(i.each(function(e){t=$F(e.down(".value")),t.length>0&&a.push({value:window.parent.WysijaForm.encodeHtmlValue(t),is_checked:+e.down(".is_checked").checked})}),"checkbox"!==e.type&&a.length<2)throw new Error(window.parent.wysijatrans.not_enough_options);if("checkbox"===e.type&&1!==a.length)throw new Error(window.parent.wysijatrans.missing_checkbox_label);e.values=a}break;case"html":e.text=window.parent.WysijaForm.encodeHtmlValue(e.text);break;case"text":e.text=window.parent.WysijaForm.encodeHtmlValue(e.text);break;case"list":var s=$("lists-selection").select("input");if(0===s.length)throw new Error(window.parent.wysijatrans.list_cannot_be_empty);var n=[];s.each(function(e){n.push({list_id:+e.readAttribute("data-list"),is_checked:+e.checked})}),e.values=n}return delete e.name,delete e.field,delete e.type,delete e.submit,e}function hideError(){$("widget-settings-error").update("").hide(),window.parent.WysijaPopup.setDimensions()}function displayError(e){var t=void 0!==e.message?e.message:e;$("widget-settings-error").update(t).show(),window.parent.WysijaPopup.setDimensions(),toggleSubmit("on")}function setupSortableList(){if($$("ul.sortable").length>0){var e=$$(".sortable").first();Sortable.create(e,{tag:"li",scroll:window,handle:"handle",constraint:"vertical"})}}function setAvailableLists(){var e=$("lists-selection").select("input").map(function(e){return $(e).readAttribute("data-list")});$("lists-available").select("option").each(function(t){e.include(t.value)&&t.remove()}),$("lists-add-container")[0===$("lists-available").length?"hide":"show"](),jQuery(".mp-select-sort").trigger("sort")}function updateTabIndex(e){Draggables.removeObserver(e),Draggables.addObserver({element:e,onEnd:function(){e.select("li").each(function(e,t){$(e).down(".value").writeAttribute("tabindex",t+1)})}})}document.observe("dom:loaded",function(){var e=null!==$("widget-settings-form")?$("widget-settings-form").type.value:null;switch(e){case"list":$("lists-add-container").on("click","a.add",function(){if($("lists-available").selectedIndex>=0){var e={name:$("lists-available").options[$("lists-available").selectedIndex].innerHTML,list_id:$F("lists-available")},t=new Template($("selection-template").innerHTML);$("lists-selection").insert(t.evaluate(e)),setupSortableList(),setAvailableLists(),window.parent.WysijaPopup.setDimensions()}return!1}),$("lists-selection").on("click","a.remove",function(e,t){return $("lists-available").insert(new Element("option",{value:$(t).previous("input").readAttribute("data-list")}).update($(t).previous("label").innerHTML)),$(t).up("li").remove(),setupSortableList(),setAvailableLists(),window.parent.WysijaPopup.setDimensions(),!1}),setupSortableList(),setAvailableLists();break;case"country":case"select":case"radio":case"checkbox":$(document).on("click","a.add",function(){var e={item_index:parseInt($("items-selection").select("input.value").length,10)+1},t=new Template($("selection-template").innerHTML);return $("items-selection").insert(t.evaluate(e)),setupSortableList(),updateTabIndex($("items-selection")),window.parent.WysijaPopup.setDimensions(),!1}),$(document).on("click","#items-selection a.remove",function(e,t){return $(t).up("li").remove(),setupSortableList(),updateTabIndex($("items-selection")),window.parent.WysijaPopup.setDimensions(),!1}),setupSortableList(),updateTabIndex($("items-selection"));break;case"textarea":break;case"date":}null!==$("field-type-select")&&$("field-type-select").observe("change",function(){return $(this).up("form").submit(),!1});var t=$("widget-settings-submit");null!==t&&t.observe("click",function(e){e.preventDefault(),hideError();var t=$H(),i=$("widget-settings-form").serialize(!0),a=null!==$("field-settings-form");if(a===!0){var s=$("field-settings-form").serialize(!0);t.set("type",s.type),t.set("field","cf_"+s.field_id),t.set("name",window.parent.WysijaForm.encodeHtmlValue(i.name)),t.set("field_id",s.field_id)}else t.set("type",i.type),t.set("field",i.field),t.set("name",window.parent.WysijaForm.encodeHtmlValue(i.name));try{t.set("params",saveData(i)),a?manageField(t):generateWidgetTemplate(t)}catch(n){displayError(n)}return!1})});
1
+ function generateWidgetTemplate(e){e===undefined?window.parent.WysijaPopup.cancel():(toggleSubmit("off"),wysijaAJAX.task="wysija_form_generate_template",wysijaAJAX.wysijaData=Base64.encode(Object.toJSON(e).gsub('\\"','"').gsub('"[{',"[{").gsub('}]"',"}]")),new Ajax.Request(wysijaAJAX.ajaxurl,{method:"post",parameters:wysijaAJAX,onSuccess:function(e){window.parent.WysijaPopup.success(e.responseJSON.result)},onFailure:function(){window.parent.WysijaPopup.cancel()}}))}function toggleSubmit(e){"on"===e?$("widget-settings-submit").removeAttribute("disabled"):$("widget-settings-submit").writeAttribute("disabled",!0)}function manageField(e){e===undefined?window.parent.WysijaPopup.cancel():(toggleSubmit("off"),wysijaAJAX.form_id=window.parent.wysijaAJAX.form_id,wysijaAJAX.task="wysija_form_manage_field",wysijaAJAX._wpnonce=wysijanonces.config.wysija_form_manage_field,wysijaAJAX.wysijaData=Base64.encode(Object.toJSON(e).gsub('\\"','"').gsub('"[{',"[{").gsub('}]"',"}]")),new Ajax.Request(wysijaAJAX.ajaxurl,{method:"post",parameters:wysijaAJAX,onSuccess:function(e){var t=e.responseJSON.result;!1===t.result?displayError(t.error):window.parent.WysijaPopup.success(t.data)},onFailure:function(){window.parent.WysijaPopup.cancel()}}))}function saveData(e){switch(e.label!==undefined&&(e.label=window.parent.WysijaForm.encodeHtmlValue(e.label)),e.type){case"input":case"textarea":case"submit":break;case"country":case"select":case"checkbox":case"radio":if(null!==$("items-selection")){var t,i=$("items-selection").select("li"),s=[];if(i.each(function(e){0<(t=$F(e.down(".value"))).length&&s.push({value:window.parent.WysijaForm.encodeHtmlValue(t),is_checked:+e.down(".is_checked").checked})}),"checkbox"!==e.type&&s.length<2)throw new Error(window.parent.wysijatrans.not_enough_options);if("checkbox"===e.type&&1!==s.length)throw new Error(window.parent.wysijatrans.missing_checkbox_label);e.values=s}break;case"html":case"text":e.text=window.parent.WysijaForm.encodeHtmlValue(e.text);break;case"list":var a=$("lists-selection").select("input");if(0===a.length)throw new Error(window.parent.wysijatrans.list_cannot_be_empty);var n=[];a.each(function(e){n.push({list_id:+e.readAttribute("data-list"),is_checked:+e.checked})}),e.values=n}return delete e.name,delete e.field,delete e.type,delete e.submit,e}function hideError(){$("widget-settings-error").update("").hide(),window.parent.WysijaPopup.setDimensions()}function displayError(e){var t=e.message!==undefined?e.message:e;$("widget-settings-error").update(t).show(),window.parent.WysijaPopup.setDimensions(),toggleSubmit("on")}function setupSortableList(){if(0<$$("ul.sortable").length){var e=$$(".sortable").first();Sortable.create(e,{tag:"li",scroll:window,handle:"handle",constraint:"vertical"})}}function setAvailableLists(){var t=$("lists-selection").select("input").map(function(e){return $(e).readAttribute("data-list")});$("lists-available").select("option").each(function(e){t.include(e.value)&&e.remove()}),$("lists-add-container")[0===$("lists-available").length?"hide":"show"](),jQuery(".mp-select-sort").trigger("sort")}function updateTabIndex(e){Draggables.removeObserver(e),Draggables.addObserver({element:e,onEnd:function(){e.select("li").each(function(e,t){$(e).down(".value").writeAttribute("tabindex",t+1)})}})}document.observe("dom:loaded",function(){switch(null!==$("widget-settings-form")?$("widget-settings-form").type.value:null){case"list":$("lists-add-container").on("click","a.add",function(){if(0<=$("lists-available").selectedIndex){var e={name:$("lists-available").options[$("lists-available").selectedIndex].innerHTML,list_id:$F("lists-available")},t=new Template($("selection-template").innerHTML);$("lists-selection").insert(t.evaluate(e)),setupSortableList(),setAvailableLists(),window.parent.WysijaPopup.setDimensions()}return!1}),$("lists-selection").on("click","a.remove",function(e,t){return $("lists-available").insert(new Element("option",{value:$(t).previous("input").readAttribute("data-list")}).update($(t).previous("label").innerHTML)),$(t).up("li").remove(),setupSortableList(),setAvailableLists(),window.parent.WysijaPopup.setDimensions(),!1}),setupSortableList(),setAvailableLists();break;case"country":case"select":case"radio":case"checkbox":$(document).on("click","a.add",function(){var e={item_index:parseInt($("items-selection").select("input.value").length,10)+1},t=new Template($("selection-template").innerHTML);return $("items-selection").insert(t.evaluate(e)),setupSortableList(),updateTabIndex($("items-selection")),window.parent.WysijaPopup.setDimensions(),!1}),$(document).on("click","#items-selection a.remove",function(e,t){return $(t).up("li").remove(),setupSortableList(),updateTabIndex($("items-selection")),window.parent.WysijaPopup.setDimensions(),!1}),setupSortableList(),updateTabIndex($("items-selection"))}null!==$("field-type-select")&&$("field-type-select").observe("change",function(){return $(this).up("form").submit(),!1});var e=$("widget-settings-submit");null!==e&&e.observe("click",function(e){e.preventDefault(),hideError();var t=$H(),i=$("widget-settings-form").serialize(!0),s=null!==$("field-settings-form");if(!0===s){var a=$("field-settings-form").serialize(!0);t.set("type",a.type),t.set("field","cf_"+a.field_id),t.set("name",window.parent.WysijaForm.encodeHtmlValue(i.name)),t.set("field_id",a.field_id)}else t.set("type",i.type),t.set("field",i.field),t.set("name",window.parent.WysijaForm.encodeHtmlValue(i.name));try{t.set("params",saveData(i)),s?manageField(t):generateWidgetTemplate(t)}catch(n){displayError(n)}return!1})});
js/admin-config-settings.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(e){function i(){e("#manage_subscriptions").attr("checked")?e(".manage_subscriptions").fadeIn():e(".manage_subscriptions").fadeOut()}function t(i){null===i?e.each(e(".page_select"),function(){e("#"+e(this).attr("id")+"-links-"+e(this).val()).fadeIn()}):(id_section="#"+e(i).attr("id")+"-links",e(id_section+" span").hide(),e(id_section+"-"+e(i).val()).fadeIn())}function n(){switch(e("#sending-method-smtp").attr("checked")&&(e('#smtp-port, #smtp-secure, #smtp-login, #smtp-auth-1, label[for="smtp-auth-"]').parent().parent().show(),e("label[for='smtp-password']").html(wysija_translations.password),a()),e("#restapipossible").hide(),e("#smtp-host").val()){case"smtp.gmail.com":""==y&&(e("#smtp-port").val("465"),e("#smtp-secure").val("ssl"),e("#smtp-login").val("your_username@gmail.com"));break;case"smtp.sendgrid.net":e("#sending-method-smtp").is(":checked")?e("#restapipossible").show():e("#restapipossible").hide();break;case"mailpoet.com":e('#smtp-port, #smtp-secure, #smtp-login, label[for="smtp-auth-"]').parent().parent().hide(),e("label[for='smtp-password']").html(wysija_translations.api);break;case"sparkpost.com":e('#smtp-port, #smtp-secure, #smtp-login, label[for="smtp-auth-"]').parent().parent().hide(),e("label[for='smtp-password']").html(wysija_translations.api);break;case"":""==y&&(e("#smtp-port").val("25"),e("#smtp-secure").val("0"),e("#smtp-login").val(""));break;default:e("#sending-method-smtp").is(":checked")&&e('#smtp-port, #smtp-secure, #smtp-login, #smtp-auth-1, label[for="smtp-auth-"]').parent().parent().show()}""==y&&e("#smtp-secure").change(),e("#smtp-rest").trigger("change")}function a(){"smtp"==e('input[name="wysija[config][sending_method]"]:checked').val()&&("none"!=e("#restapipossible").css("display")&&e("#smtp-rest").attr("checked")?(e('#smtp-port, #smtp-secure, #smtp-auth-1, label[for="smtp-auth-"]').parent().parent().hide(),e(".choice-no-restapi").hide()):(e('#smtp-port, #smtp-secure, #smtp-auth-1, label[for="smtp-auth-"]').parent().parent().show(),e(".choice-no-restapi").show()))}function s(){1===parseInt(e('input[name="wysija[config][confirm_dbleoptin]"]:checked').attr("value"))?e(".confirmemail").fadeIn():e(".confirmemail").fadeOut()}function o(){var i=e(".mailpoet-frequency_warning"),t=e("#sending-emails-each"),n=["one_min","two_min","five_min","ten_min"];-1!==e.inArray(t.val(),n)?i.removeClass("hidden"):i.addClass("hidden")}function c(){return"gmail"==e('input[name="wysija[config][sending_method]"]:checked').val()}function r(){c()?e('select[name="wysija[config][sending_emails_each]"] option[value="hourly"]').length>0&&(e("#sending-emails-number").val("20"),e('select[name="wysija[config][sending_emails_each]"]').val("hourly"),e("#sending-emails-number").attr("readonly","readonly"),e('select[name="wysija[config][sending_emails_each]"]').attr("disabled","disabled")):(e('select[name="wysija[config][sending_emails_each]"]').removeAttr("disabled"),e("#sending-emails-number").removeAttr("readonly"))}function d(){return wysijaAJAX.task="bounce_connect",wysijaAJAX.data=e("form").serializeArray(),wysijaAJAX.popTitle=wysijatrans.bounceconnect,wysijaAJAX.dataType="json",wysijaAJAXcallback.onSuccess=function(i){var t="";return i.result.result&&(t='<a class="bounce-submit button-secondary" href2="admin.php?page=wysija_campaigns&action=test_bounce">'+wysijatrans.processbounce+"</a>"),displaychange?e(".allmsgs.ui-dialog-content.ui-widget-content").append(t):e("#bounce-connector").after(t),!0},e.WYSIJA_SEND(),!1}function l(){return wysijaAJAX.task="bounce_process",wysijaAJAX._wpnonce=wysijanonces.config.bounce_process,wysijaAJAX.data=e("form").serializeArray(),wysijaAJAX.popTitle=wysijatrans.processbounceT,wysijaAJAX.dataType="html",e(".allmsgs").dialog(),e.WYSIJA_SEND(),!1}function m(){"undefined"!=typeof this?e.each(e(".activateInput"),function(){h(this)}):h(this)}function h(i){e(i).attr("checked")?e("#"+e(i).attr("id")+"_linkname").fadeIn():e("#"+e(i).attr("id")+"_linkname").fadeOut()}function p(){subscribersCountList=[],e(".subscribers-count-list").each(function(){e(this).is(":checked")&&subscribersCountList.push(e(this).val())}),shortCode="[",shortCode+="wysija_subscribers_count",subscribersCountList.length>0&&(shortCode+=' list_id="'+subscribersCountList.join()+'" '),shortCode+="]",e(".subscribers-count-shortcode").val(shortCode)}function u(){switch(e("#ms-restapipossible").hide(),e("#ms-smtp-host").val()){case"smtp.gmail.com":""==b&&(e("#ms-smtp-port").val("465"),e("#ms-smtp-secure").val("ssl"),e("#ms-smtp-login").val("your_username@gmail.com"));break;case"smtp.sendgrid.net":e("#ms-restapipossible").show();break;case"":""==b&&(e("#ms-smtp-port").val("25"),e("#ms-smtp-secure").val("0"),e("#ms-smtp-login").val(""))}""==b&&e("#ms-smtp-secure").change()}function g(){"smtp"==e('input[name="wysija[config][ms_sending_method]"]:checked').val()&&("none"!=e("#ms-restapipossible").css("display")&&e("#ms-smtp-rest").attr("checked")?e(".ms-choice-no-restapi").hide():e(".ms-choice-no-restapi").show())}function f(){-1!==e.inArray(e("#ms-sending-emails-each").val(),["one_min","two_min","five_min","ten_min"])?e(".ms-choice-under15").show():e(".ms-choice-under15").hide()}function w(){"one-for-all"==e('input[name="wysija[config][ms_sending_config]"]:checked').val()?e(".choice-one-for-all").show():e(".choice-one-for-all").hide()}var y=e("#smtp-login").val();e(".hidechoice").hide(),e(".choice-sending-method-"+e('input[name="wysija[config][sending_method]"]:checked').val()).show(),e('input[name="wysija[config][sending_method]"]').change(function(){e(".hidechoice").hide(),e(".choice-sending-method-"+this.value).show(),r()}),e("#sending-emails-each").change(function(){o()}),e("#linksendingmethod").click(function(){e("#tabs").tabs("select",e(this).attr("href"))}),e("#mainmenu li a").click(function(){e("#redirecttab").val(e(this).attr("href"))}),e('input[name="wysija[config][confirm_dbleoptin]"]').change(s),e("#confirm_dbleoptin-1").click(function(){return confirm(wysijatrans.doubleoptinon)}),e("#confirm_dbleoptin-0").click(function(){return confirm(wysijatrans.doubleoptinoff)}),e('input[name="wysija[config][sending_emails_site_method]"]').change(function(){"sendmail"==e('input[name="wysija[config][sending_emails_site_method]"]:checked').val()?e("#p-sending-emails-site-method-sendmail-path").show():e("#p-sending-emails-site-method-sendmail-path").hide()}),e('input[name="wysija[config][sending_emails_site_method]"]').change(),e(".page_select").change(function(){t(this)}),e("#manage_subscriptions").change(function(){i()}),e("#smtp-host").keyup(n),e("input.mailpoet-delivery-method").on("change",n),e("#smtp-rest").on("change",a),e("#button-regenerate-dkim").click(function(){return e("#sending-emails-site-method-phpmail").attr("checked","checked"),e("#dkim_regenerate").val("regenerate"),e("#wysija-settings").submit(),!1}),e("#bounce-connector").click(d),e(document).on("click",".bounce-submit",function(){return l(),e(".allmsgs").dialog("close"),tb_show(wysijatrans.processbounceT,e(this).attr("href2")+"&KeepThis=true&TB_iframe=true&height=400&width=600",null),tb_showIframe(),!1}),e(".forwardto").change(function(){e(this).attr("checked")?e("#"+e(this).attr("id")+"_input").show():e("#"+e(this).attr("id")+"_input").hide()}),e.each(e(".hideifnovalue"),function(){""==e(this).find("input").val()&&e(this).hide()}),e("#wysija-settings").submit(function(){var i=!1;return e(".bounce-forward-email").each(function(){var t=trim(e(this).val());""!==t&&t==e("#bounce_email").val()&&(e('#wysija-tabs a[href="#bounce"]').trigger("click"),e('#wysija-innertabs a[href="#actions"]').trigger("click"),e(this).css("border","1px solid #CC0000"),e("#bounce-msg-error").addClass("error"),e("#bounce-msg-error").html(wysijatrans.errorbounceforward),i=!0)}),i?!1:void e('select[name="wysija[config][sending_emails_each]"]').removeAttr("disabled")}),e("#bounce-process-auto").attr("checked")?e("#bounce-frequency").show():e("#bounce-frequency").hide(),e("#bounce-process-auto").change(function(){e(this).attr("checked")?e("#bounce-frequency").show():e("#bounce-frequency").hide()}),e(".activateInput").change(m),e(document).on("click","#wysija-innertabs .nav-tab",function(i,t){var n,a=e(".wysija-innerpanel"),s=e("#wysija-innertabs").children(".nav-tab"),o=e(this),c=o.attr("href").replace("#",""),r={};return"undefined"==typeof t&&(t=!0),a.each(function(i,t){var n=e(t);r[n.attr("id")]=n}),n=r[c],s.removeClass("nav-tab-active"),o.addClass("nav-tab-active"),a.not(".hidden").addClass("hidden"),n.removeClass("hidden"),t&&(window.location.hash="inner-tab-"+c),n.trigger("shown.innertab.mailpoet"),!1}),e(document).on("click","#wysija-tabs .nav-tab",function(i,t){var n,a=e(".wysija-panel"),s=e("#wysija-tabs").children(".nav-tab"),o=e(this),c=o.attr("href").replace("#",""),r={};return"undefined"==typeof t&&(t=!0),a.each(function(i,t){var n=e(t);r[n.attr("id")]=n}),n=r[c],s.removeClass("nav-tab-active"),o.addClass("nav-tab-active"),a.not(".hidden").addClass("hidden"),n.removeClass("hidden"),t&&(window.location.hash="tab-"+c),n.trigger("shown.tab.mailpoet"),!1}),e(document).on("click","#tip-send-with",function(i){e('.nav-tab[href="#sendingmethod"]').trigger("click"),i.preventDefault()}),e(window).load(function(){if(window.location.hash.length>0){var i=window.location.hash.replace("tab-","");e('#wysija-tabs .nav-tab[href="'+i+'"]').trigger("click")}else e("#wysija-tabs .nav-tab").first().trigger("click",!1);if(1===window.location.hash.indexOf("inner-tab")){var t=e('#wysija-innertabs .nav-tab[href="'+window.location.hash.replace("inner-tab-","")+'"]').trigger("click");e('#wysija-tabs .nav-tab[href="#'+t.parents(".wysija-panel").attr("id")+'"]').trigger("click",!1)}else e("#wysija-innertabs .nav-tab-active").trigger("click",!1)}),e(document).ready(function(){r(),o(),s(),m(),n(),a(),t(null),i(),e(".subscribers-count-list").change(p),e("#analytics-0").is(":checked")&&e("#advanced .industry").hide(),e("#analytics-1").change(function(){"1"==e(this).val()&&e("#advanced .industry").show()}),e("#analytics-0").change(function(){"0"==e(this).val()&&e("#advanced .industry").hide()}),e("#recaptcha-0").is(":checked")&&e("#advanced .recaptcha").hide(),e("#recaptcha-1").change(function(){"1"==e(this).val()&&e("#advanced .recaptcha").show()}),e("#recaptcha-0").change(function(){"0"==e(this).val()&&e("#advanced .recaptcha").hide()}),e("#"+getURLParameter("scroll_to")).length>0&&(e("html,body").animate({scrollTop:e("#"+getURLParameter("scroll_to")).offset().top-e("#wpadminbar").height()},500),e("#"+getURLParameter("scroll_to")).css({"background-color":"#f8fcff","font-size":"16px","font-weight":"bold"}))}),e("#dkimpub, #domainrecord, .subscribers-count-shortcode").click(function(){this.select()});var b=e("#ms-smtp-login").val();e(".ms-hidechoice").hide(),e(".ms-choice-sending-method-"+e('input[name="wysija[config][ms_sending_method]"]:checked').val()).show(),e('input[name="wysija[config][ms_sending_method]"]').change(function(){e(".ms-hidechoice").hide(),e(".ms-choice-sending-method-"+this.value).show()}),e("#ms-sending-emails-each").change(function(){f()}),e('input[name="wysija[config][ms_sending_config]"]').change(function(){w()}),e('input[name="wysija[config][ms_sending_emails_site_method]"]').change(function(){"sendmail"==e('input[name="wysija[config][ms_sending_emails_site_method]"]:checked').val()?e("#ms_p-sending-emails-site-method-sendmail-path").show():e("#ms_p-sending-emails-site-method-sendmail-path").hide()}),e('input[name="wysija[config][ms_sending_emails_site_method]"]').change(),e("#ms-smtp-host").keyup(u),e("input.mailpoet-delivery-method").on("change",u),e("#ms-smtp-rest").change(g),e.each(e(".hideifnovalue"),function(){""===e(this).find("input").val()&&e(this).hide()}),e("table.capabilities_form .view_all").click(function(){e("table.capabilities_form tr.hidden").removeClass("hidden"),objTr=e(this).parents("tr")[0],e(objTr).remove()}),e(".mailpoet-test-delivery").on({click:function(i){i.preventDefault();var t="network"===e(".mailpoet-delivery-method:checked").val()||e(this).data("multisite");return t?(wysijaAJAX.task="send_test_mail_ms",wysijaAJAX._wpnonce=wysijanonces.config.send_test_mail_ms):(wysijaAJAX.task="send_test_mail",wysijaAJAX._wpnonce=wysijanonces.config.send_test_mail),wysijaAJAX.data=e("form").serializeArray(),wysijaAJAX.popTitle=wysijatrans.testemail,wysijaAJAX.dataType="json",e.WYSIJA_SEND(),!1}}),e(document).ready(function(){e("#smtp-host").keyup(),w(),f(),u(),g()})}),window.mailpoet="object"==typeof window.mailpoet?window.mailpoet:{$:{}},function(e,i){"use strict";var t=i.mailpoet,n=t.fn={};n.getSendingMethod=function(){return t.$.sending_method instanceof jQuery||(t.$.sending_method=e('input[name="wysija[config][sending_method]"]')),t.$.sending_method.filter(":checked").val()},n.isGoodFromAddress=function(e){var t=e.split("@")[1];return"undefined"==typeof t||""===t?!1:t.toLowerCase()!==i.location.host.toLowerCase()?!1:!0},n.isGmailAddress=function(e){var i=e.split("@")[1];return"undefined"==typeof i||""===i?!1:"gmail.com"!==i.toLowerCase()?!1:!0}}(jQuery,window),function(e,i){"use strict";var t=i.mailpoet;e(document).ready(function(){"object"==typeof e.fn.tooltip&&(t.$.from_email=e("#from_email"),t.$.from_email.tooltip({animation:!0,placement:"bottom",trigger:"manual",html:!0,title:function(){return t.$.from_email.data("message")}}).on({"verifyEmail.mailpoet":function(){if(t.fn.isGoodFromAddress(t.$.from_email.val()))return t.$.from_email.data("message","").tooltip("hide");if("gmail"===t.fn.getSendingMethod())return t.$.from_email.data("message","").tooltip("hide");var e="";return e=t.fn.isGmailAddress(t.$.from_email.val())?mpEmailCheck.gmailText:mpEmailCheck.text,t.$.from_email.is(":visible")?t.$.from_email.data("message",e).tooltip("show"):t.$.from_email.tooltip("hide")},keyup:function(){t.$.from_email.trigger("verifyEmail.mailpoet")}}).trigger("verifyEmail.mailpoet"),t.$.panels=e(".wysija-panel"),t.$.panels.filter("#basics").on({"shown.tab.mailpoet":function(){t.$.from_email.trigger("verifyEmail.mailpoet")}}))})}(jQuery,window),function(e,i){"use strict";var t=i.mailpoet;e(document).on({ready:function(){t.$.geeky=e(".mailpoet-geeky-toggle"),t.$.geeky.data("l18n",{hide:t.$.geeky.data("hide"),show:t.$.geeky.text()}),t.$.geeky_rows=e(".super-advanced"),t.$.geeky.on({click:function(i){i.preventDefault();var n=t.$.geeky.data("l18n");t.$.geeky.hasClass("is_toggled")?(t.$.geeky.removeClass("is_toggled").text(n.hide),t.$.geeky_rows.removeClass("hidden"),void 0!==i.originalEvent&&e.cookie("geeky_option",1)):(t.$.geeky.addClass("is_toggled").text(n.show),t.$.geeky_rows.addClass("hidden"),void 0!==i.originalEvent&&e.cookie("geeky_option",0))}}),1==e.cookie("geeky_option")?t.$.geeky.trigger("click"):t.$.geeky_rows.addClass("hidden")}})}(jQuery,window);
1
+ jQuery(function(r){function e(){r("#manage_subscriptions").attr("checked")?r(".manage_subscriptions").fadeIn():r(".manage_subscriptions").fadeOut()}function i(e){null===e?r.each(r(".page_select"),function(){r("#"+r(this).attr("id")+"-links-"+r(this).val()).fadeIn()}):(id_section="#"+r(e).attr("id")+"-links",r(id_section+" span").hide(),r(id_section+"-"+r(e).val()).fadeIn())}function n(){switch(r("#sending-method-smtp").attr("checked")&&(r('#smtp-port, #smtp-secure, #smtp-login, #smtp-auth-1, label[for="smtp-auth-"]').parent().parent().show(),r("label[for='smtp-password']").html(wysija_translations.password),t()),r("#restapipossible").hide(),r("#smtp-host").val()){case"smtp.gmail.com":""==y&&(r("#smtp-port").val("465"),r("#smtp-secure").val("ssl"),r("#smtp-login").val("your_username@gmail.com"));break;case"smtp.sendgrid.net":r("#sending-method-smtp").is(":checked")?r("#restapipossible").show():r("#restapipossible").hide();break;case"mailpoet.com":case"sparkpost.com":r('#smtp-port, #smtp-secure, #smtp-login, label[for="smtp-auth-"]').parent().parent().hide(),r("label[for='smtp-password']").html(wysija_translations.api);break;case"":""==y&&(r("#smtp-port").val("25"),r("#smtp-secure").val("0"),r("#smtp-login").val(""));break;default:r("#sending-method-smtp").is(":checked")&&r('#smtp-port, #smtp-secure, #smtp-login, #smtp-auth-1, label[for="smtp-auth-"]').parent().parent().show()}""==y&&r("#smtp-secure").change(),r("#smtp-rest").trigger("change")}function t(){"smtp"==r('input[name="wysija[config][sending_method]"]:checked').val()&&("none"!=r("#restapipossible").css("display")&&r("#smtp-rest").attr("checked")?(r('#smtp-port, #smtp-secure, #smtp-auth-1, label[for="smtp-auth-"]').parent().parent().hide(),r(".choice-no-restapi").hide()):(r('#smtp-port, #smtp-secure, #smtp-auth-1, label[for="smtp-auth-"]').parent().parent().show(),r(".choice-no-restapi").show()))}function a(){1===parseInt(r('input[name="wysija[config][confirm_dbleoptin]"]:checked').attr("value"))?r(".confirmemail").fadeIn():r(".confirmemail").fadeOut()}function s(){var e=r(".mailpoet-frequency_warning"),i=r("#sending-emails-each"),n=["one_min","two_min","five_min","ten_min"];-1!==r.inArray(i.val(),n)?e.removeClass("hidden"):e.addClass("hidden")}function o(){return"gmail"==r('input[name="wysija[config][sending_method]"]:checked').val()}function c(){o()?0<r('select[name="wysija[config][sending_emails_each]"] option[value="hourly"]').length&&(r("#sending-emails-number").val("20"),r('select[name="wysija[config][sending_emails_each]"]').val("hourly"),r("#sending-emails-number").attr("readonly","readonly"),r('select[name="wysija[config][sending_emails_each]"]').attr("disabled","disabled")):(r('select[name="wysija[config][sending_emails_each]"]').removeAttr("disabled"),r("#sending-emails-number").removeAttr("readonly"))}function d(){return wysijaAJAX.task="bounce_connect",wysijaAJAX.data=r("form").serializeArray(),wysijaAJAX.popTitle=wysijatrans.bounceconnect,wysijaAJAX.dataType="json",wysijaAJAXcallback.onSuccess=function(e){var i="";return e.result.result&&(i='<a class="bounce-submit button-secondary" href2="admin.php?page=wysija_campaigns&action=test_bounce">'+wysijatrans.processbounce+"</a>"),displaychange?r(".allmsgs.ui-dialog-content.ui-widget-content").append(i):r("#bounce-connector").after(i),!0},r.WYSIJA_SEND(),!1}function l(){return wysijaAJAX.task="bounce_process",wysijaAJAX._wpnonce=wysijanonces.config.bounce_process,wysijaAJAX.data=r("form").serializeArray(),wysijaAJAX.popTitle=wysijatrans.processbounceT,wysijaAJAX.dataType="html",r(".allmsgs").dialog(),r.WYSIJA_SEND(),!1}function m(){void 0!==this?r.each(r(".activateInput"),function(){h(this)}):h(this)}function h(e){r(e).attr("checked")?r("#"+r(e).attr("id")+"_linkname").fadeIn():r("#"+r(e).attr("id")+"_linkname").fadeOut()}function u(){subscribersCountList=[],r(".subscribers-count-list").each(function(){r(this).is(":checked")&&subscribersCountList.push(r(this).val())}),shortCode="[",shortCode+="wysija_subscribers_count",0<subscribersCountList.length&&(shortCode+=' list_id="'+subscribersCountList.join()+'" '),shortCode+="]",r(".subscribers-count-shortcode").val(shortCode)}function p(){switch(r("#ms-restapipossible").hide(),r("#ms-smtp-host").val()){case"smtp.gmail.com":""==b&&(r("#ms-smtp-port").val("465"),r("#ms-smtp-secure").val("ssl"),r("#ms-smtp-login").val("your_username@gmail.com"));break;case"smtp.sendgrid.net":r("#ms-restapipossible").show();break;case"":""==b&&(r("#ms-smtp-port").val("25"),r("#ms-smtp-secure").val("0"),r("#ms-smtp-login").val(""))}""==b&&r("#ms-smtp-secure").change()}function g(){"smtp"==r('input[name="wysija[config][ms_sending_method]"]:checked').val()&&("none"!=r("#ms-restapipossible").css("display")&&r("#ms-smtp-rest").attr("checked")?r(".ms-choice-no-restapi").hide():r(".ms-choice-no-restapi").show())}function f(){-1!==r.inArray(r("#ms-sending-emails-each").val(),["one_min","two_min","five_min","ten_min"])?r(".ms-choice-under15").show():r(".ms-choice-under15").hide()}function w(){"one-for-all"==r('input[name="wysija[config][ms_sending_config]"]:checked').val()?r(".choice-one-for-all").show():r(".choice-one-for-all").hide()}var y=r("#smtp-login").val();r(".hidechoice").hide(),r(".choice-sending-method-"+r('input[name="wysija[config][sending_method]"]:checked').val()).show(),r('input[name="wysija[config][sending_method]"]').change(function(){r(".hidechoice").hide(),r(".choice-sending-method-"+this.value).show(),c()}),r("#sending-emails-each").change(function(){s()}),r("#linksendingmethod").click(function(){r("#tabs").tabs("select",r(this).attr("href"))}),r("#mainmenu li a").click(function(){r("#redirecttab").val(r(this).attr("href"))}),r('input[name="wysija[config][confirm_dbleoptin]"]').change(a),r("#confirm_dbleoptin-1").click(function(){return confirm(wysijatrans.doubleoptinon)}),r("#confirm_dbleoptin-0").click(function(){return confirm(wysijatrans.doubleoptinoff)}),r('input[name="wysija[config][sending_emails_site_method]"]').change(function(){"sendmail"==r('input[name="wysija[config][sending_emails_site_method]"]:checked').val()?r("#p-sending-emails-site-method-sendmail-path").show():r("#p-sending-emails-site-method-sendmail-path").hide()}),r('input[name="wysija[config][sending_emails_site_method]"]').change(),r(".page_select").change(function(){i(this)}),r("#manage_subscriptions").change(function(){e()}),r("#smtp-host").keyup(n),r("input.mailpoet-delivery-method").on("change",n),r("#smtp-rest").on("change",t),r("#button-regenerate-dkim").click(function(){return r("#sending-emails-site-method-phpmail").attr("checked","checked"),r("#dkim_regenerate").val("regenerate"),r("#wysija-settings").submit(),!1}),r("#bounce-connector").click(d),r(document).on("click",".bounce-submit",function(){return l(),r(".allmsgs").dialog("close"),tb_show(wysijatrans.processbounceT,r(this).attr("href2")+"&KeepThis=true&TB_iframe=true&height=400&width=600",null),tb_showIframe(),!1}),r(".forwardto").change(function(){r(this).attr("checked")?r("#"+r(this).attr("id")+"_input").show():r("#"+r(this).attr("id")+"_input").hide()}),r.each(r(".hideifnovalue"),function(){""==r(this).find("input").val()&&r(this).hide()}),r("#wysija-settings").submit(function(){var i=!1;if(r(".bounce-forward-email").each(function(){var e=trim(r(this).val());""!==e&&e==r("#bounce_email").val()&&(r('#wysija-tabs a[href="#bounce"]').trigger("click"),r('#wysija-innertabs a[href="#actions"]').trigger("click"),r(this).css("border","1px solid #CC0000"),r("#bounce-msg-error").addClass("error"),r("#bounce-msg-error").html(wysijatrans.errorbounceforward),i=!0)}),i)return!1;r('select[name="wysija[config][sending_emails_each]"]').removeAttr("disabled")}),r("#bounce-process-auto").attr("checked")?r("#bounce-frequency").show():r("#bounce-frequency").hide(),r("#bounce-process-auto").change(function(){r(this).attr("checked")?r("#bounce-frequency").show():r("#bounce-frequency").hide()}),r(".activateInput").change(m),r(document).on("click","#wysija-innertabs .nav-tab",function(e,i){var n,t=r(".wysija-innerpanel"),a=r("#wysija-innertabs").children(".nav-tab"),s=r(this),o=s.attr("href").replace("#",""),c={};return void 0===i&&(i=!0),t.each(function(e,i){var n=r(i);c[n.attr("id")]=n}),n=c[o],a.removeClass("nav-tab-active"),s.addClass("nav-tab-active"),t.not(".hidden").addClass("hidden"),n.removeClass("hidden"),i&&(window.location.hash="inner-tab-"+o),n.trigger("shown.innertab.mailpoet"),!1}),r(document).on("click","#wysija-tabs .nav-tab",function(e,i){var n,t=r(".wysija-panel"),a=r("#wysija-tabs").children(".nav-tab"),s=r(this),o=s.attr("href").replace("#",""),c={};return void 0===i&&(i=!0),t.each(function(e,i){var n=r(i);c[n.attr("id")]=n}),n=c[o],a.removeClass("nav-tab-active"),s.addClass("nav-tab-active"),t.not(".hidden").addClass("hidden"),n.removeClass("hidden"),i&&(window.location.hash="tab-"+o),n.trigger("shown.tab.mailpoet"),!1}),r(document).on("click","#tip-send-with",function(e){r('.nav-tab[href="#sendingmethod"]').trigger("click"),e.preventDefault()}),r(window).load(function(){if(0<window.location.hash.length){var e=window.location.hash.replace("tab-","");r('#wysija-tabs .nav-tab[href="'+e+'"]').trigger("click")}else r("#wysija-tabs .nav-tab").first().trigger("click",!1);if(1===window.location.hash.indexOf("inner-tab")){var i=r('#wysija-innertabs .nav-tab[href="'+window.location.hash.replace("inner-tab-","")+'"]').trigger("click");r('#wysija-tabs .nav-tab[href="#'+i.parents(".wysija-panel").attr("id")+'"]').trigger("click",!1)}else r("#wysija-innertabs .nav-tab-active").trigger("click",!1)}),r(document).ready(function(){c(),s(),a(),m(),n(),t(),i(null),e(),r(".subscribers-count-list").change(u),r("#analytics-0").is(":checked")&&r("#advanced .industry").hide(),r("#analytics-1").change(function(){"1"==r(this).val()&&r("#advanced .industry").show()}),r("#analytics-0").change(function(){"0"==r(this).val()&&r("#advanced .industry").hide()}),r("#recaptcha-0").is(":checked")&&r("#advanced .recaptcha").hide(),r("#recaptcha-1").change(function(){"1"==r(this).val()&&r("#advanced .recaptcha").show()}),r("#recaptcha-0").change(function(){"0"==r(this).val()&&r("#advanced .recaptcha").hide()}),0<r("#"+getURLParameter("scroll_to")).length&&(r("html,body").animate({scrollTop:r("#"+getURLParameter("scroll_to")).offset().top-r("#wpadminbar").height()},500),r("#"+getURLParameter("scroll_to")).css({"background-color":"#f8fcff","font-size":"16px","font-weight":"bold"}))}),r("#dkimpub, #domainrecord, .subscribers-count-shortcode").click(function(){this.select()});var b=r("#ms-smtp-login").val();r(".ms-hidechoice").hide(),r(".ms-choice-sending-method-"+r('input[name="wysija[config][ms_sending_method]"]:checked').val()).show(),r('input[name="wysija[config][ms_sending_method]"]').change(function(){r(".ms-hidechoice").hide(),r(".ms-choice-sending-method-"+this.value).show()}),r("#ms-sending-emails-each").change(function(){f()}),r('input[name="wysija[config][ms_sending_config]"]').change(function(){w()}),r('input[name="wysija[config][ms_sending_emails_site_method]"]').change(function(){"sendmail"==r('input[name="wysija[config][ms_sending_emails_site_method]"]:checked').val()?r("#ms_p-sending-emails-site-method-sendmail-path").show():r("#ms_p-sending-emails-site-method-sendmail-path").hide()}),r('input[name="wysija[config][ms_sending_emails_site_method]"]').change(),r("#ms-smtp-host").keyup(p),r("input.mailpoet-delivery-method").on("change",p),r("#ms-smtp-rest").change(g),r.each(r(".hideifnovalue"),function(){""===r(this).find("input").val()&&r(this).hide()}),r("table.capabilities_form .view_all").click(function(){r("table.capabilities_form tr.hidden").removeClass("hidden"),objTr=r(this).parents("tr")[0],r(objTr).remove()}),r(".mailpoet-test-delivery").on({click:function(e){return e.preventDefault(),"network"===r(".mailpoet-delivery-method:checked").val()||r(this).data("multisite")?(wysijaAJAX.task="send_test_mail_ms",wysijaAJAX._wpnonce=wysijanonces.config.send_test_mail_ms):(wysijaAJAX.task="send_test_mail",wysijaAJAX._wpnonce=wysijanonces.config.send_test_mail),wysijaAJAX.data=r("form").serializeArray(),wysijaAJAX.popTitle=wysijatrans.testemail,wysijaAJAX.dataType="json",r.WYSIJA_SEND(),!1}}),r(document).ready(function(){r("#smtp-host").keyup(),w(),f(),p(),g()})}),window.mailpoet="object"==typeof window.mailpoet?window.mailpoet:{$:{}},function(e,n){"use strict";var i=n.mailpoet,t=i.fn={};t.getSendingMethod=function(){return i.$.sending_method instanceof jQuery||(i.$.sending_method=e('input[name="wysija[config][sending_method]"]')),i.$.sending_method.filter(":checked").val()},t.isGoodFromAddress=function(e){var i=e.split("@")[1];return void 0!==i&&""!==i&&i.toLowerCase()===n.location.host.toLowerCase()},t.isGmailAddress=function(e){var i=e.split("@")[1];return void 0!==i&&""!==i&&"gmail.com"===i.toLowerCase()}}(jQuery,window),function(e){"use strict";var i=window.mailpoet;e(document).ready(function(){"object"==typeof e.fn.tooltip&&(i.$.from_email=e("#from_email"),i.$.from_email.tooltip({animation:!0,placement:"bottom",trigger:"manual",html:!0,title:function(){return i.$.from_email.data("message")}}).on({"verifyEmail.mailpoet":function(){if(i.fn.isGoodFromAddress(i.$.from_email.val()))return i.$.from_email.data("message","").tooltip("hide");if("gmail"===i.fn.getSendingMethod())return i.$.from_email.data("message","").tooltip("hide");var e="";return e=i.fn.isGmailAddress(i.$.from_email.val())?mpEmailCheck.gmailText:mpEmailCheck.text,i.$.from_email.is(":visible")?i.$.from_email.data("message",e).tooltip("show"):i.$.from_email.tooltip("hide")},keyup:function(){i.$.from_email.trigger("verifyEmail.mailpoet")}}).trigger("verifyEmail.mailpoet"),i.$.panels=e(".wysija-panel"),i.$.panels.filter("#basics").on({"shown.tab.mailpoet":function(){i.$.from_email.trigger("verifyEmail.mailpoet")}}))})}(jQuery),function(n){"use strict";var t=window.mailpoet;n(document).on({ready:function(){t.$.geeky=n(".mailpoet-geeky-toggle"),t.$.geeky.data("l18n",{hide:t.$.geeky.data("hide"),show:t.$.geeky.text()}),t.$.geeky_rows=n(".super-advanced"),t.$.geeky.on({click:function(e){e.preventDefault();var i=t.$.geeky.data("l18n");t.$.geeky.hasClass("is_toggled")?(t.$.geeky.removeClass("is_toggled").text(i.hide),t.$.geeky_rows.removeClass("hidden"),e.originalEvent!==undefined&&n.cookie("geeky_option",1)):(t.$.geeky.addClass("is_toggled").text(i.show),t.$.geeky_rows.addClass("hidden"),e.originalEvent!==undefined&&n.cookie("geeky_option",0))}}),1==n.cookie("geeky_option")?t.$.geeky.trigger("click"):t.$.geeky_rows.addClass("hidden")}})}(jQuery);
js/admin-global.js CHANGED
@@ -1 +1 @@
1
- !function(e){"use strict";e(document).ready(function(){e(".mp-select-sort").on({sort:function(){e(this).each(function(t,n){var r=e(n),o=r.children("option");o.detach().sort(function(t,n){return 0===parseInt(e(t).data("sort"),10)||0===parseInt(e(n).data("skip"),10)?0:"NA"===t.innerHTML?1:"NA"===n.innerHTML?-1:t.innerHTML.toLowerCase()>n.innerHTML.toLowerCase()?1:-1}).appendTo(r),o.filter("[selected]").eq(0).prop("selected",!0)})}}).trigger("sort")})}(jQuery.noConflict(),_);
1
+ !function(o){"use strict";o(document).ready(function(){o(".mp-select-sort").on({sort:function(){o(this).each(function(e,t){var n=o(t),r=n.children("option");r.detach().sort(function(e,t){return 0===parseInt(o(e).data("sort"),10)||0===parseInt(o(t).data("skip"),10)?0:"NA"===e.innerHTML?1:"NA"===t.innerHTML?-1:e.innerHTML.toLowerCase()>t.innerHTML.toLowerCase()?1:-1}).appendTo(n),r.filter("[selected]").eq(0).prop("selected",!0)})}}).trigger("sort")})}(jQuery.noConflict(),_);
js/admin-listing.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(e){function t(){flag=!1,e(".batch-select td").children().each(function(){e(this).hasClass("display")&&(flag=!0)}),flag?e(".batch-select").show():e(".batch-select").hide()}function l(){e("#force_select_all").is(":checked")&&e(".checkboxselec, #user-id input, #force_select_all").attr("checked",!1),subscriberCount=e("#posts-filter input.checkboxselec:checked").length,e(".batch-select div.clear_select_all").removeClass("display").hide(),subscriberCount>0?e(".batch-select div.force_to_select_all_link").removeClass("display").addClass("display").show():e(".batch-select div.force_to_select_all_link").removeClass("display").hide(),t()}var a=e("#_wpnonce").attr("disabled","disabled"),i=e(".global-action");i.change(function(){var e=i.val();"delete"==e||"bulk_delete"==e?a.prop("disabled",null):a.attr("disabled","disabled")}),e(".orderlink").click(function(){return e(this).parent("th.sortable , th.sorted").click(),!1}),e("#posts-filter").submit(function(){e("#wysija-pagination").length&&parseInt(e("#wysija-pagination").val())>parseInt(e("#wysija-pagination-max").val())&&e("#wysija-pagination").val(e("#wysija-pagination-max").val())}),e(".bulksubmit").click(function(){var t=i.data("locale"),l=i.val(),s=e("#posts-filter .check-column input:checked");if(0===s.length)return alert(wysijatrans.selecmiss),!1;switch(l){case"deleteusers":if(!confirm(1===s.length?t.delete:t.delete_bulk))return!1}return e("<input/>",{type:"hidden",name:"action",value:i.val()}).insertAfter(e(this)),a.prop("disabled",null),e("#_wpnonce").val(e(".global-action option:selected").data("nonce")),!0}),e('.check-column input[type="checkbox"]').click(function(){}),e("#user-id").click(l),e(".checkboxselec").click(function(){e(this).is(":checked")||(e("#user-id input, #force_select_all").attr("checked",!1),e(".batch-select div.force_to_select_all_link").removeClass("display").hide(),e(".batch-select div.clear_select_all").removeClass("display").hide()),t()}),e(".force_to_select_all_link a").click(function(l){l.preventDefault(),e(".checkboxselec, #user-id input, #force_select_all").attr("checked","checked"),e(".batch-select div.force_to_select_all_link").removeClass("display").hide(),e(".batch-select div.clear_select_all").removeClass("display").addClass("display").show(),t()}),e(".clear_select_all a").click(function(){e(".batch-select div.force_to_select_all_link").removeClass("display").hide(),e(".batch-select div.clear_select_all").removeClass("display").hide(),e(".checkboxselec, #user-id input, #force_select_all").attr("checked",!1),t()}),e("th.sortable , th.sorted").click(function(){var t="";t=e(this).hasClass("sorted")?e(this).hasClass("asc")?"desc":"asc":"desc";var l=e(this).attr("id");e("#wysija-orderby").length?(e("#wysija-orderby").val(l),e("#wysija-ordert").val(t)):(e("#posts-filter").append('<input id="wysija-ordert" type="hidden" name="ordert" value="'+t+'" />'),e("#posts-filter").append('<input id="wysija-orderby" type="hidden" name="orderby" value="'+l+'" />')),e("#posts-filter").submit()}),e("a.page-numbers").click(function(){var t=e(this).attr("alt");return e("#wysija-pagination").length?e("#wysija-pagination").val(t):e("#posts-filter").append('<input id="wysija-pagination" type="hidden" name="pagi" value="'+t+'" />'),e("#posts-filter").submit(),!1}),e("a.page-limit").click(function(){var t=e(this).html();return e("#wysija-pagelimit").length?e("#wysija-pagelimit").val(t):e("#posts-filter").append('<input id="wysija-pagelimit" type="hidden" name="limit_pp" value="'+t+'" />'),e("#posts-filter").submit(),!1}),e(document).ready(function(){e("a.exported-file").length&&window.open(e("a.exported-file").attr("href"),"Download")}),e(".searchbox").blur(function(){e(this).val(trim(e(this).val()))}),t()});
1
+ jQuery(function(a){function t(){flag=!1,a(".batch-select td").children().each(function(){a(this).hasClass("display")&&(flag=!0)}),flag?a(".batch-select").show():a(".batch-select").hide()}function e(){a("#force_select_all").is(":checked")&&a(".checkboxselec, #user-id input, #force_select_all").attr("checked",!1),subscriberCount=a("#posts-filter input.checkboxselec:checked").length,a(".batch-select div.clear_select_all").removeClass("display").hide(),0<subscriberCount?a(".batch-select div.force_to_select_all_link").removeClass("display").addClass("display").show():a(".batch-select div.force_to_select_all_link").removeClass("display").hide(),t()}var i=a("#_wpnonce").attr("disabled","disabled"),s=a(".global-action");s.change(function(){var e=s.val();"delete"==e||"bulk_delete"==e?i.prop("disabled",null):i.attr("disabled","disabled")}),a(".orderlink").click(function(){return a(this).parent("th.sortable , th.sorted").click(),!1}),a("#posts-filter").submit(function(){a("#wysija-pagination").length&&parseInt(a("#wysija-pagination").val())>parseInt(a("#wysija-pagination-max").val())&&a("#wysija-pagination").val(a("#wysija-pagination-max").val())}),a(".bulksubmit").click(function(){var e=s.data("locale"),t=s.val(),l=a("#posts-filter .check-column input:checked");if(0===l.length)return alert(wysijatrans.selecmiss),!1;switch(t){case"deleteusers":if(!confirm(1===l.length?e["delete"]:e.delete_bulk))return!1}return a("<input/>",{type:"hidden",name:"action",value:s.val()}).insertAfter(a(this)),i.prop("disabled",null),a("#_wpnonce").val(a(".global-action option:selected").data("nonce")),!0}),a('.check-column input[type="checkbox"]').click(function(){}),a("#user-id").click(e),a(".checkboxselec").click(function(){a(this).is(":checked")||(a("#user-id input, #force_select_all").attr("checked",!1),a(".batch-select div.force_to_select_all_link").removeClass("display").hide(),a(".batch-select div.clear_select_all").removeClass("display").hide()),t()}),a(".force_to_select_all_link a").click(function(e){e.preventDefault(),a(".checkboxselec, #user-id input, #force_select_all").attr("checked","checked"),a(".batch-select div.force_to_select_all_link").removeClass("display").hide(),a(".batch-select div.clear_select_all").removeClass("display").addClass("display").show(),t()}),a(".clear_select_all a").click(function(){a(".batch-select div.force_to_select_all_link").removeClass("display").hide(),a(".batch-select div.clear_select_all").removeClass("display").hide(),a(".checkboxselec, #user-id input, #force_select_all").attr("checked",!1),t()}),a("th.sortable , th.sorted").click(function(){var e="";e=a(this).hasClass("sorted")?a(this).hasClass("asc")?"desc":"asc":"desc";var t=a(this).attr("id");a("#wysija-orderby").length?(a("#wysija-orderby").val(t),a("#wysija-ordert").val(e)):(a("#posts-filter").append('<input id="wysija-ordert" type="hidden" name="ordert" value="'+e+'" />'),a("#posts-filter").append('<input id="wysija-orderby" type="hidden" name="orderby" value="'+t+'" />')),a("#posts-filter").submit()}),a("a.page-numbers").click(function(){var e=a(this).attr("alt");return a("#wysija-pagination").length?a("#wysija-pagination").val(e):a("#posts-filter").append('<input id="wysija-pagination" type="hidden" name="pagi" value="'+e+'" />'),a("#posts-filter").submit(),!1}),a("a.page-limit").click(function(){var e=a(this).html();return a("#wysija-pagelimit").length?a("#wysija-pagelimit").val(e):a("#posts-filter").append('<input id="wysija-pagelimit" type="hidden" name="limit_pp" value="'+e+'" />'),a("#posts-filter").submit(),!1}),a(document).ready(function(){a("a.exported-file").length&&window.open(a("a.exported-file").attr("href"),"Download")}),a(".searchbox").blur(function(){a(this).val(trim(a(this).val()))}),t()});
js/admin-statistics-filter.js CHANGED
@@ -1 +1 @@
1
- function StatsFilter(t){return this.forceToSortByDesc="undefined"!=typeof t.forceToSortByDesc?t.forceToSortByDesc:!1,this.sortBy2Directions=["stats_top_domains"],this.from="undefined"!=typeof t.from?t.from:null,this.to="undefined"!=typeof t.to?t.to:null,this.lastDays="undefined"!=typeof t.lastDays?t.lastDays:null,this.formName="undefined"!=typeof t.formName?t.formName:null,this.block="undefined"!=typeof t.block?t.block:null,this.itemPerPage="undefined"!=typeof t.itemPerPage?t.itemPerPage:null,this.orderDirection="undefined"!=typeof t.sortDirection?t.sortDirection:"DESC",this.orderBy="undefined"!=typeof t.sortBy?t.sortBy:null,this.isInProgress=!1,this.submit=function(t,e){return t.preventDefault(),this.isInProgress&&wysijaLazyLoad.terminate(),this.moduleName=null,this.itemPerPage=null,this.setupLazyLoad(e),!1},this.doFilter=function(t,e){this.isInProgress&&wysijaLazyLoad.terminate(),this.isInProgress=!0,forceToSortByDesc=this.forceToSortByDesc,forceToSortByDesc&&-1!==this.sortBy2Directions.indexOf(this.block)&&(forceToSortByDesc=!1),blocks=this.block.split(" "),wysijaLazyLoad.options.data=[blocks[0]],wysijaLazyLoad.options.task=e.task,wysijaLazyLoad.options.filter={from:this.from,to:this.to,lastDays:this.lastDays,itemPerPage:this.itemPerPage,orderBy:this.orderBy,orderDirection:forceToSortByDesc?"DESC":this.orderDirection},"undefined"!=typeof blocks[1]&&jQuery.extend(wysijaLazyLoad.options.filter,{additionalParam:blocks[1]}),wysijaLazyLoad.init(function(e){var s;prevElement=jQuery(t).prev(),0===prevElement.length&&(s=jQuery(t).parent()),jQuery(t).fadeOut(400,function(){jQuery(this).remove(),"undefined"!=typeof s?jQuery(s).prepend(e.result):jQuery(e.result).insertAfter(prevElement)}),StatsFilter.instance.isInProgress=!1})},this.setupLazyLoad=function(t){var e=jQuery.extend([],wysijaStatisticVars.lazyLoad.blocks);e.length<=0||(this.isInProgress=!0,wysijaLazyLoad.options.data=e,wysijaLazyLoad.options.task=t.task,wysijaLazyLoad.options.filter={from:this.from,to:this.to,lastDays:this.lastDays},jQuery(t.targetContainer).empty(),wysijaLazyLoad.init(function(e,s){"undefined"!=typeof s&&0===s&&(StatsFilter.instance.isInProgress=!1),jQuery(t.targetContainer).append(e.result)}))},this.fromChange=function(t){this.from=t.target.value},this.toChange=function(t){this.to=t.target.value},this.lastDaysChange=function(t){this.lastDays=t},this.formValidate=function(){return!0},StatsFilter.instance=this,this}
1
+ function StatsFilter(t){return this.forceToSortByDesc="undefined"!=typeof t.forceToSortByDesc&&t.forceToSortByDesc,this.sortBy2Directions=["stats_top_domains"],this.from="undefined"!=typeof t.from?t.from:null,this.to="undefined"!=typeof t.to?t.to:null,this.lastDays="undefined"!=typeof t.lastDays?t.lastDays:null,this.formName="undefined"!=typeof t.formName?t.formName:null,this.block="undefined"!=typeof t.block?t.block:null,this.itemPerPage="undefined"!=typeof t.itemPerPage?t.itemPerPage:null,this.orderDirection="undefined"!=typeof t.sortDirection?t.sortDirection:"DESC",this.orderBy="undefined"!=typeof t.sortBy?t.sortBy:null,this.isInProgress=!1,this.submit=function(t,e){return t.preventDefault(),this.isInProgress&&wysijaLazyLoad.terminate(),this.moduleName=null,this.itemPerPage=null,this.setupLazyLoad(e),!1},this.doFilter=function(s,t){this.isInProgress&&wysijaLazyLoad.terminate(),this.isInProgress=!0,forceToSortByDesc=this.forceToSortByDesc,forceToSortByDesc&&-1!==this.sortBy2Directions.indexOf(this.block)&&(forceToSortByDesc=!1),blocks=this.block.split(" "),wysijaLazyLoad.options.data=[blocks[0]],wysijaLazyLoad.options.task=t.task,wysijaLazyLoad.options.filter={from:this.from,to:this.to,lastDays:this.lastDays,itemPerPage:this.itemPerPage,orderBy:this.orderBy,orderDirection:forceToSortByDesc?"DESC":this.orderDirection},"undefined"!=typeof blocks[1]&&jQuery.extend(wysijaLazyLoad.options.filter,{additionalParam:blocks[1]}),wysijaLazyLoad.init(function(t){var e;prevElement=jQuery(s).prev(),0===prevElement.length&&(e=jQuery(s).parent()),jQuery(s).fadeOut(400,function(){jQuery(this).remove(),void 0!==e?jQuery(e).prepend(t.result):jQuery(t.result).insertAfter(prevElement)}),StatsFilter.instance.isInProgress=!1})},this.setupLazyLoad=function(s){var t=jQuery.extend([],wysijaStatisticVars.lazyLoad.blocks);t.length<=0||(this.isInProgress=!0,wysijaLazyLoad.options.data=t,wysijaLazyLoad.options.task=s.task,wysijaLazyLoad.options.filter={from:this.from,to:this.to,lastDays:this.lastDays},jQuery(s.targetContainer).empty(),wysijaLazyLoad.init(function(t,e){void 0!==e&&0===e&&(StatsFilter.instance.isInProgress=!1),jQuery(s.targetContainer).append(t.result)}))},this.fromChange=function(t){this.from=t.target.value},this.toChange=function(t){this.to=t.target.value},this.lastDaysChange=function(t){this.lastDays=t},this.formValidate=function(){return!0},StatsFilter.instance=this}
js/admin-statistics.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(t){var a=function(a,s,e){"undefined"!=typeof wysijaLazyLoad&&(StatsFilter.instance.isInProgress=!0,wysijaLazyLoad.options.data=s,wysijaLazyLoad.options.task=e,wysijaLazyLoad.options.filter={from:t("#stats-filter-from").val(),to:t("#stats-filter-to").val(),lastDays:t("#custom-date").val()},wysijaLazyLoad.init(function(t,s){0===s&&(StatsFilter.instance.isInProgress=!1),jQuery(a).append(t.result)}))},s=function(){var a=new StatsFilter({from:t("#stats-filter-from").val(),to:t("#stats-filter-to").val(),lastDays:t("#custom-date").val(),formName:"stats-filter",forceToSortByDesc:!0}),s=!1;t("#stats-filter-from").change(function(e){s||(t("#custom-date").val(0),a.lastDaysChange(t("#custom-date").val())),a.fromChange(e)}),t("#stats-filter-to").change(function(e){s||(t("#custom-date").val(0),a.lastDaysChange(t("#custom-date").val())),a.toChange(e)}),t("#custom-date").change(function(e){s=!0,t("#stats-filter-from").val(t(e.target.options[e.target.selectedIndex]).attr("from")).change(),t("#stats-filter-to").val(t(e.target.options[e.target.selectedIndex]).attr("to")).change(),a.lastDaysChange(e.target.value),s=!1,"0"!=e.target.value&&t("#stats-filter").submit()}),t("#stats-filter").submit(function(t){a.submit(t,wysijaStatisticVars.lazyLoad)}),t(document).on("click",".sort-filter",function(){var s=t(this).hasClass("asc")?"asc":"desc";s="desc"===s?"asc":"desc",t(this).removeClass("desc").removeClass("asc").addClass(s),a.orderDirection=s,a.orderBy=t(this).attr("rel"),a.block=t(this).parents(".container").attr("rel"),a.doFilter(t(this).parents(".container"),wysijaStatisticVars.lazyLoad)}),t(".page-limit").click(function(){a.itemPerPage=parseInt(t(this).html()),a.block=t(this).parents(".container").attr("rel"),a.doFilter(t(this).parents(".container"),wysijaStatisticVars.lazyLoad)}),t(document).on("click",".page-limit",function(){a.itemPerPage=parseInt(t(this).html()),a.block=t(this).parents(".container").attr("rel"),a.doFilter(t(this).parents(".container"),wysijaStatisticVars.lazyLoad)})};if(s(),t(wysijaStatisticVars.filter.datePickerElements).datepicker({dateFormat:wysijaStatisticVars.filter.dateFormat}),wysijaStatisticVars.lazyLoad){var e=jQuery.extend([],wysijaStatisticVars.lazyLoad.lazyLoadBlocks);a(wysijaStatisticVars.lazyLoad.targetContainer,e,wysijaStatisticVars.lazyLoad.task)}});
1
+ jQuery(function(e){var t=function(s,t,a){"undefined"!=typeof wysijaLazyLoad&&(StatsFilter.instance.isInProgress=!0,wysijaLazyLoad.options.data=t,wysijaLazyLoad.options.task=a,wysijaLazyLoad.options.filter={from:e("#stats-filter-from").val(),to:e("#stats-filter-to").val(),lastDays:e("#custom-date").val()},wysijaLazyLoad.init(function(t,a){0===a&&(StatsFilter.instance.isInProgress=!1),jQuery(s).append(t.result)}))};if(function(){var a=new StatsFilter({from:e("#stats-filter-from").val(),to:e("#stats-filter-to").val(),lastDays:e("#custom-date").val(),formName:"stats-filter",forceToSortByDesc:!0}),s=!1;e("#stats-filter-from").change(function(t){s||(e("#custom-date").val(0),a.lastDaysChange(e("#custom-date").val())),a.fromChange(t)}),e("#stats-filter-to").change(function(t){s||(e("#custom-date").val(0),a.lastDaysChange(e("#custom-date").val())),a.toChange(t)}),e("#custom-date").change(function(t){s=!0,e("#stats-filter-from").val(e(t.target.options[t.target.selectedIndex]).attr("from")).change(),e("#stats-filter-to").val(e(t.target.options[t.target.selectedIndex]).attr("to")).change(),a.lastDaysChange(t.target.value),s=!1,"0"!=t.target.value&&e("#stats-filter").submit()}),e("#stats-filter").submit(function(t){a.submit(t,wysijaStatisticVars.lazyLoad)}),e(document).on("click",".sort-filter",function(){var t=e(this).hasClass("asc")?"asc":"desc";t="desc"===t?"asc":"desc",e(this).removeClass("desc").removeClass("asc").addClass(t),a.orderDirection=t,a.orderBy=e(this).attr("rel"),a.block=e(this).parents(".container").attr("rel"),a.doFilter(e(this).parents(".container"),wysijaStatisticVars.lazyLoad)}),e(".page-limit").click(function(){a.itemPerPage=parseInt(e(this).html()),a.block=e(this).parents(".container").attr("rel"),a.doFilter(e(this).parents(".container"),wysijaStatisticVars.lazyLoad)}),e(document).on("click",".page-limit",function(){a.itemPerPage=parseInt(e(this).html()),a.block=e(this).parents(".container").attr("rel"),a.doFilter(e(this).parents(".container"),wysijaStatisticVars.lazyLoad)})}(),e(wysijaStatisticVars.filter.datePickerElements).datepicker({dateFormat:wysijaStatisticVars.filter.dateFormat}),wysijaStatisticVars.lazyLoad){var a=jQuery.extend([],wysijaStatisticVars.lazyLoad.lazyLoadBlocks);t(wysijaStatisticVars.lazyLoad.targetContainer,a,wysijaStatisticVars.lazyLoad.task)}});
js/admin-subscribers-importmatch.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(t){t("#namenewlist").attr("disabled","disabled"),t("#blocknewlist").hide(),t("#namenewlist").focus(function(){this.value==this.defaultValue&&(this.value="")}).blur(function(){this.value.length||(this.value=this.defaultValue)}),t("#list0").click(function(){this.checked?(t("#namenewlist").removeAttr("disabled"),t("#blocknewlist").fadeIn().prev().find("span").hide()):(t("#namenewlist").attr("disabled","disabled"),t("#blocknewlist").fadeOut().prev().find("span").show())}),t(".create_extra").change(function(){var e=t(this).attr("id").replace("column-match-","column-match-date-wrap-");-1!=this.value.indexOf("new_field|date")?(t(t(this).attr("class").split(" ")).each(function(){""!==this&&-1!=this.indexOf("row-")&&t("span."+this).fadeIn()}),t("#"+e).fadeIn()):null!=t("#"+e)&&(t(t(this).attr("class").split(" ")).each(function(){""!==this&&-1!=this.indexOf("row-")&&t("span."+this).fadeOut()}),t("#"+e).fadeOut())}),jQuery(".match-dropdown select").matchColumn({defaultValue:"nomatch",showConfirmation:!0,confirmationMessage:wysijatrans.subscribers_import_match_confirmation_1+"\n"+wysijatrans.subscribers_import_match_confirmation_2,beforeResetColumn:function(t,e){"undefined"!=typeof jQuery.userStatusMapping&&"status"===t&&jQuery.userStatusMapping.changeFromUserStatus(e)},beforeChange:function(t,e){"undefined"!=typeof jQuery.userStatusMapping&&"status"===t&&jQuery.userStatusMapping.changeFromUserStatus(e)}}),"undefined"!=typeof wysijatrans.userStatuses&&jQuery(".match-dropdown select").userStatusMapping({defaultValue:"status",dataElement:".imported-field",statuses:wysijatrans.userStatuses})});
1
+ jQuery(function(e){e("#namenewlist").attr("disabled","disabled"),e("#blocknewlist").hide(),e("#namenewlist").focus(function(){this.value==this.defaultValue&&(this.value="")}).blur(function(){this.value.length||(this.value=this.defaultValue)}),e("#list0").click(function(){this.checked?(e("#namenewlist").removeAttr("disabled"),e("#blocknewlist").fadeIn().prev().find("span").hide()):(e("#namenewlist").attr("disabled","disabled"),e("#blocknewlist").fadeOut().prev().find("span").show())}),e(".create_extra").change(function(){var t=e(this).attr("id").replace("column-match-","column-match-date-wrap-");-1!=this.value.indexOf("new_field|date")?(e(e(this).attr("class").split(" ")).each(function(){""!==this&&-1!=this.indexOf("row-")&&e("span."+this).fadeIn()}),e("#"+t).fadeIn()):null!=e("#"+t)&&(e(e(this).attr("class").split(" ")).each(function(){""!==this&&-1!=this.indexOf("row-")&&e("span."+this).fadeOut()}),e("#"+t).fadeOut())}),jQuery(".match-dropdown select").matchColumn({defaultValue:"nomatch",showConfirmation:!0,confirmationMessage:wysijatrans.subscribers_import_match_confirmation_1+"\n"+wysijatrans.subscribers_import_match_confirmation_2,beforeResetColumn:function(t,e){"undefined"!=typeof jQuery.userStatusMapping&&"status"===t&&jQuery.userStatusMapping.changeFromUserStatus(e)},beforeChange:function(t,e){"undefined"!=typeof jQuery.userStatusMapping&&"status"===t&&jQuery.userStatusMapping.changeFromUserStatus(e)}}),"undefined"!=typeof wysijatrans.userStatuses&&jQuery(".match-dropdown select").userStatusMapping({defaultValue:"status",dataElement:".imported-field",statuses:wysijatrans.userStatuses})});
js/admin-tmce.js CHANGED
@@ -1 +1 @@
1
- function trim(e){return e.replace(/^\s+/g,"").replace(/\s+$/g,"")}var MceInsertSelectorDialog={local_ed:"ed",init:function(e){MceInsertSelectorDialog.local_ed=e,tinyMCEPopup.resizeToInnerSize()},insertWidget:function(e,t){tinyMCEPopup.restoreSelection(),el=e.selection.getNode(),"DIV"==el.nodeName&&"wysija-register"==el.className&&jQuery(function(e){e(el).remove()}),output='[wysija_form id="'+t+'"]',tinyMCEPopup.execCommand("mceInsertRawHTML",!1,output),tinyMCEPopup.close()},insertSubscribers:function(e,t,r){tinyMCEPopup.restoreSelection(),el=e.selection.getNode(),"DIV"==el.nodeName&&"wysija-register"==el.className&&jQuery(function(e){e(el).remove()}),shortcodeAttributes=[],t>0&&shortcodeAttributes.push('list_id="'+t+'"'),parseInt(r)>0&&shortcodeAttributes.push('confirmed_subscribers="'+parseInt(r)+'"'),shortcodeAttributes=shortcodeAttributes.length>0?" "+shortcodeAttributes.join(" "):"",output="[wysija_subscribers_count"+shortcodeAttributes+"]",tinyMCEPopup.execCommand("mceInsertRawHTML",!1,output),tinyMCEPopup.close()}};tinyMCEPopup.onInit.add(MceInsertSelectorDialog.init,MceInsertSelectorDialog),jQuery(function(e){e("#widget-insert").click(function(){return MceInsertSelectorDialog.insertWidget(MceInsertSelectorDialog.local_ed,e("#widget-wysija--form").val()),!1}),e("#subscribers-insert").click(function(){return MceInsertSelectorDialog.insertSubscribers(MceInsertSelectorDialog.local_ed,e("#wysija-list").val(),e("#confirmedSubscribers").attr("checked")?1:0),!1})});
1
+ function trim(e){return e.replace(/^\s+/g,"").replace(/\s+$/g,"")}var MceInsertSelectorDialog={local_ed:"ed",init:function(e){MceInsertSelectorDialog.local_ed=e,tinyMCEPopup.resizeToInnerSize()},insertWidget:function insertHighlightSection(e,t){tinyMCEPopup.restoreSelection(),el=e.selection.getNode(),"DIV"==el.nodeName&&"wysija-register"==el.className&&jQuery(function(e){e(el).remove()}),output='[wysija_form id="'+t+'"]',tinyMCEPopup.execCommand("mceInsertRawHTML",!1,output),tinyMCEPopup.close()},insertSubscribers:function(e,t,r){tinyMCEPopup.restoreSelection(),el=e.selection.getNode(),"DIV"==el.nodeName&&"wysija-register"==el.className&&jQuery(function(e){e(el).remove()}),shortcodeAttributes=[],0<t&&shortcodeAttributes.push('list_id="'+t+'"'),0<parseInt(r)&&shortcodeAttributes.push('confirmed_subscribers="'+parseInt(r)+'"'),0<shortcodeAttributes.length?shortcodeAttributes=" "+shortcodeAttributes.join(" "):shortcodeAttributes="",output="[wysija_subscribers_count"+shortcodeAttributes+"]",tinyMCEPopup.execCommand("mceInsertRawHTML",!1,output),tinyMCEPopup.close()}};tinyMCEPopup.onInit.add(MceInsertSelectorDialog.init,MceInsertSelectorDialog),jQuery(function(e){e("#widget-insert").click(function(){return MceInsertSelectorDialog.insertWidget(MceInsertSelectorDialog.local_ed,e("#widget-wysija--form").val()),!1}),e("#subscribers-insert").click(function(){return MceInsertSelectorDialog.insertSubscribers(MceInsertSelectorDialog.local_ed,e("#wysija-list").val(),e("#confirmedSubscribers").attr("checked")?1:0),!1})});
js/admin-wysija-global.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(n){void 0===n.fn.on&&(n.fn.on=function(o,t,e,i){return"function"==typeof t?n(this.context).live(o,t):n(t).live(o,e,i),this}),n(".wysija-footer pre").hide(),n(document).on("click",".wysija-footer .expandquer h2",function(){n(this).nextAll().toggle()})});
1
+ jQuery(function(i){i.fn.on===undefined&&(i.fn.on=function(n,e,t,o){return"function"==typeof e?i(this.context).live(n,e):i(e).live(n,t,o),this}),i(".wysija-footer pre").hide(),i(document).on("click",".wysija-footer .expandquer h2",function(){i(this).nextAll().toggle()})});
js/admin-wysija.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(a){function i(i){i?(a(".wysija-premium-activate").addClass("wysija-button-loading"),a(".wysija-premium-activate").html(wysijatrans.premium_activating+"<span>.</span><span>.</span><span>.</span>")):(a(".wysija-premium-activate").removeClass("wysija-button-loading"),a(".wysija-premium-activate").html(wysijatrans.premium_activate))}a("#wysija-app .submitdelete").click(function(){return confirm(wysijatrans.suredelete)}),a("#wysija-app .linkignore, .wysija-version .linkignore").click(function(){var i=this;return wysijaAJAX.controller="config",wysijaAJAX.task="linkignore",wysijaAJAX.ignorewhat=a.trim(a(this).attr("class").replace(/linkignore/g,"")),wysijaAJAX._wpnonce=wysijanonces.config.linkignore,a.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(){a(i).parents(".removeme").length>0?a(i).parents(".removeme").fadeOut():a(i).parents("li").siblings().size()>0?a(i).parents("li").fadeOut():a(i).parents("div.updated").fadeOut()},error:function(a){alert("Request error not JSON:"+a.responseText),wysijaAJAXcallback.onSuccess=""},dataType:"json"}),!0}),a(document).on("click","#wysija-app .premium-tab, .wysija-msg .premium-tab, #theme-view .premium-tab",function(){a("#wysija-app .wysija-premium img").hide(),a(this).hasClass("ispopup")?(window.parent.tb_remove(),window.parent.location.href=wysijatrans.urlpremium):a("#wysija-tabs").length>0?a('#wysija-tabs a[href="#premium"]').trigger("click"):window.location.href=wysijatrans.urlpremium}),a(".wysija-premium-activate").click(function(){wysijaAJAX.controller="config",wysijaAJAX.task="validate",wysijaAJAX._wpnonce=wysijanonces.config.validate,i(!0);var e=this;return a.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(s){s.result.result?window.location.href="admin.php?page=wysija_campaigns&sp=1":(s.result.nocontact?window.location.href="admin.php?page=wysija_campaigns&nocontact=1":(displaychange=0,a.WYSIJA_HANDLE_RESPONSE(s)),i(!1)),a(e).removeClass("wysija-button-loading")},error:function(a){alert(a.responseText),delete wysijaAJAXcallback.onSuccess,i(!1)},dataType:"json"}),!1}),a("#install-wjp").click(function(){return confirm(a(this).data("warn"))?(tb_show(a(this).attr("title"),a(this).attr("href")+"&KeepThis=true&TB_iframe=true&height=400&width=600",null),tb_showIframe(),!1):!1}),a("#share_analytics").click(function(){var i=this;return wysijaAJAX.controller="config",wysijaAJAX.task="share_analytics",wysijaAJAX._wpnonce=wysijanonces.config.share_analytics,a(i).addClass("disabled"),a("#update-loading-icon").show(),a.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(){a(i).after("<h2>Thanks!</h2>"),a(i).hide(),a("#update-loading-icon").hide()},error:function(e){alert("Request error not JSON:"+e.responseText),wysijaAJAXcallback.onSuccess="",a(i).removeClass("disabled")},dataType:"json"}),!0})});
1
+ jQuery(function(e){function s(a){a?(e(".wysija-premium-activate").addClass("wysija-button-loading"),e(".wysija-premium-activate").html(wysijatrans.premium_activating+"<span>.</span><span>.</span><span>.</span>")):(e(".wysija-premium-activate").removeClass("wysija-button-loading"),e(".wysija-premium-activate").html(wysijatrans.premium_activate))}e("#wysija-app .submitdelete").click(function(){return confirm(wysijatrans.suredelete)}),e("#wysija-app .linkignore, .wysija-version .linkignore").click(function(){var a=this;return wysijaAJAX.controller="config",wysijaAJAX.task="linkignore",wysijaAJAX.ignorewhat=e.trim(e(this).attr("class").replace(/linkignore/g,"")),wysijaAJAX._wpnonce=wysijanonces.config.linkignore,e.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(){0<e(a).parents(".removeme").length?e(a).parents(".removeme").fadeOut():0<e(a).parents("li").siblings().size()?e(a).parents("li").fadeOut():e(a).parents("div.updated").fadeOut()},error:function(a){alert("Request error not JSON:"+a.responseText),wysijaAJAXcallback.onSuccess=""},dataType:"json"}),!0}),e(document).on("click","#wysija-app .premium-tab, .wysija-msg .premium-tab, #theme-view .premium-tab",function(){e("#wysija-app .wysija-premium img").hide(),e(this).hasClass("ispopup")?(window.parent.tb_remove(),window.parent.location.href=wysijatrans.urlpremium):0<e("#wysija-tabs").length?e('#wysija-tabs a[href="#premium"]').trigger("click"):window.location.href=wysijatrans.urlpremium}),e(".wysija-premium-activate").click(function(){wysijaAJAX.controller="config",wysijaAJAX.task="validate",wysijaAJAX._wpnonce=wysijanonces.config.validate,s(!0);var i=this;return e.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(a){a.result.result?window.location.href="admin.php?page=wysija_campaigns&sp=1":(a.result.nocontact?window.location.href="admin.php?page=wysija_campaigns&nocontact=1":(displaychange=0,e.WYSIJA_HANDLE_RESPONSE(a)),s(!1)),e(i).removeClass("wysija-button-loading")},error:function(a){alert(a.responseText),delete wysijaAJAXcallback.onSuccess,s(!1)},dataType:"json"}),!1}),e("#install-wjp").click(function(){return confirm(e(this).data("warn"))&&(tb_show(e(this).attr("title"),e(this).attr("href")+"&KeepThis=true&TB_iframe=true&height=400&width=600",null),tb_showIframe()),!1}),e("#share_analytics").click(function(){var i=this;return wysijaAJAX.controller="config",wysijaAJAX.task="share_analytics",wysijaAJAX._wpnonce=wysijanonces.config.share_analytics,e(i).addClass("disabled"),e("#update-loading-icon").show(),e.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(){e(i).after("<h2>Thanks!</h2>"),e(i).hide(),e("#update-loading-icon").hide()},error:function(a){alert("Request error not JSON:"+a.responseText),wysijaAJAXcallback.onSuccess="",e(i).removeClass("disabled")},dataType:"json"}),!0})});
js/admin.js CHANGED
@@ -1 +1 @@
1
- function trim(e){return e.replace(/^\s+/g,"").replace(/\s+$/g,"")}function getURLParameter(e){return decodeURI((RegExp(e+"=(.+?)(&|$)").exec(location.search)||[,null])[1])}function addError(e){var s=new Array;s[0]=e,addMsg("error",s)}function addNotice(e){var s=new Array;s[0]=e,addMsg("update",s)}function addMsg(e,s){jQuery(".wysija-msg.ajax").html('<div class="allmsgs"></div>'),jQuery(".wysija-msg.ajax .allmsgs ."+e+" ul").length||jQuery(".wysija-msg.ajax .allmsgs").append('<div class="'+e+'"><ul></ul></div>'),jQuery.each(s,function(s,a){jQuery(".wysija-msg.ajax .allmsgs ."+e+" ul").append("<li>"+a+"</li>")})}jQuery(function(e){e(document).ready(function(){if("undefined"!=typeof wysijaAJAX&&void 0!==wysijaAJAX.pluginurl){var s=wysijaAJAX.pluginurl.replace("plugins/wysija-newsletters","themes"),a=wysijaAJAX.pluginurl.replace("wysija-newsletters",""),i="";e('script[src^="'+s+'"]').each(function(){i+="<li>"+e(this).attr("src")+"</li>"}),e('script[src^="'+a+'"]').each(function(){e(this).attr('src:notcontains("wysija-newsletters")')&&(i+="<li>"+e(this).attr("src")+"</li>")}),""!==i&&(e(".wysija-footer").append('<div class="expandquer"><h2 class="errors">WYSIJA POSSIBLE 3rd PARTY CONFLICTS</h2><pre><ol>'+i+"</ol></pre></div>"),e(".wysija-footer pre").hide())}e("#wysija-app").siblings("div.updated, div.error").hide()}),e(document).on("click",".showerrors",function(){return e(".xdetailed-errors").toggle(),!1}),e(document).on("click",".shownotices",function(){return e(".xdetailed-updated").toggle(),!1}),e(document).on("click",".wysija_dismiss_update_notice, .wysija_dismiss_license_notice",function(){return wysijaAJAX.controller="config",wysijaAJAX.task=e(this).attr("class"),e.ajax({type:"post",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(){e(".notice-msg").remove()},dataType:"jsonp"}),!1})});
1
+ function trim(e){return e.replace(/^\s+/g,"").replace(/\s+$/g,"")}function getURLParameter(e){return decodeURI((RegExp(e+"=(.+?)(&|$)").exec(location.search)||[,null])[1])}function addError(e){var s=new Array;s[0]=e,addMsg("error",s)}function addNotice(e){var s=new Array;s[0]=e,addMsg("update",s)}function addMsg(a,e){jQuery(".wysija-msg.ajax").html('<div class="allmsgs"></div>'),jQuery(".wysija-msg.ajax .allmsgs ."+a+" ul").length||jQuery(".wysija-msg.ajax .allmsgs").append('<div class="'+a+'"><ul></ul></div>'),jQuery.each(e,function(e,s){jQuery(".wysija-msg.ajax .allmsgs ."+a+" ul").append("<li>"+s+"</li>")})}jQuery(function(i){i(document).ready(function(){if("undefined"!=typeof wysijaAJAX&&wysijaAJAX.pluginurl!==undefined){var e=wysijaAJAX.pluginurl.replace("plugins/wysija-newsletters","themes"),s=wysijaAJAX.pluginurl.replace("wysija-newsletters",""),a="";i('script[src^="'+e+'"]').each(function(){a+="<li>"+i(this).attr("src")+"</li>"}),i('script[src^="'+s+'"]').each(function(){i(this).attr('src:notcontains("wysija-newsletters")')&&(a+="<li>"+i(this).attr("src")+"</li>")}),""!==a&&(i(".wysija-footer").append('<div class="expandquer"><h2 class="errors">WYSIJA POSSIBLE 3rd PARTY CONFLICTS</h2><pre><ol>'+a+"</ol></pre></div>"),i(".wysija-footer pre").hide())}i("#wysija-app").siblings("div.updated, div.error").hide()}),i(document).on("click",".showerrors",function(){return i(".xdetailed-errors").toggle(),!1}),i(document).on("click",".shownotices",function(){return i(".xdetailed-updated").toggle(),!1}),i(document).on("click",".wysija_dismiss_update_notice, .wysija_dismiss_license_notice",function(){return wysijaAJAX.controller="config",wysijaAJAX.task=i(this).attr("class"),i.ajax({type:"post",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(){i(".notice-msg").remove()},dataType:"jsonp"}),!1})});
js/analytics.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){if(!t.__SV){var a,n,i,l;window.mixpanel=t,t._i=[],t.init=function(e,a,n){function p(e,t){var a=t.split(".");2==a.length&&(e=e[a[0]],t=a[1]),e[t]=function(){e.push([t].concat(Array.prototype.slice.call(arguments,0)))}}var r=t;for("undefined"!=typeof n?r=t[n]=[]:n="mixpanel",r.people=r.people||[],r.toString=function(e){var t="mixpanel";return"mixpanel"!==n&&(t+="."+n),e||(t+=" (stub)"),t},r.people.toString=function(){return r.toString(1)+".people (stub)"},i="disable track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config people.set people.set_once people.increment people.append people.track_charge people.clear_charges people.delete_user".split(" "),l=0;l<i.length;l++)p(r,i[l]);t._i.push([e,a,n])},t.__SV=1.2,a=e.createElement("script"),a.type="text/javascript",a.async=!0,a.src="//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js",n=e.getElementsByTagName("script")[0],n.parentNode.insertBefore(a,n)}}(document,window.mixpanel||[]),mixpanel.init("f683d388fb25fcf331f1b2b5c4449798",{api_host:"https://api.mixpanel.com"});var mixpanel_set={},mx_length=analytics_data.length,label="",value="";for(key in analytics_data)label=analytics_data[key].label,value=analytics_data[key].value,mixpanel_set[label]=value;mixpanel.track("Wysija Usage",mixpanel_set);
1
+ !function(e,l){var a,t,p,r;l.__SV||((window.mixpanel=l)._i=[],l.init=function(e,a,t){function n(e,a){var t=a.split(".");2==t.length&&(e=e[t[0]],a=t[1]),e[a]=function(){e.push([a].concat(Array.prototype.slice.call(arguments,0)))}}var i=l;for(void 0!==t?i=l[t]=[]:t="mixpanel",i.people=i.people||[],i.toString=function(e){var a="mixpanel";return"mixpanel"!==t&&(a+="."+t),e||(a+=" (stub)"),a},i.people.toString=function(){return i.toString(1)+".people (stub)"},p="disable track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config people.set people.set_once people.increment people.append people.track_charge people.clear_charges people.delete_user".split(" "),r=0;r<p.length;r++)n(i,p[r]);l._i.push([e,a,t])},l.__SV=1.2,(a=e.createElement("script")).type="text/javascript",a.async=!0,a.src="//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js",(t=e.getElementsByTagName("script")[0]).parentNode.insertBefore(a,t))}(document,window.mixpanel||[]),mixpanel.init("f683d388fb25fcf331f1b2b5c4449798",{api_host:"https://api.mixpanel.com"});var mixpanel_set={},mx_length=analytics_data.length,label="",value="";for(key in analytics_data)label=analytics_data[key].label,value=analytics_data[key].value,mixpanel_set[label]=value;mixpanel.track("Wysija Usage",mixpanel_set);
js/base-script-64.js CHANGED
@@ -1 +1 @@
1
- var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",utoa:function(r){return window.btoa(unescape(encodeURIComponent(r)))},atou:function(r){return decodeURIComponent(escape(window.atob(r)))},encode:function(r){if(window.btoa)return this.utoa(r);var t,e,o,n,a,c,h,d="",i=0;for(r=Base64._utf8_encode(r);i<r.length;)t=r.charCodeAt(i++),e=r.charCodeAt(i++),o=r.charCodeAt(i++),n=t>>2,a=(3&t)<<4|e>>4,c=(15&e)<<2|o>>6,h=63&o,isNaN(e)?c=h=64:isNaN(o)&&(h=64),d=d+this._keyStr.charAt(n)+this._keyStr.charAt(a)+this._keyStr.charAt(c)+this._keyStr.charAt(h);return d},decode:function(r){if(window.btoa)return this.atou(r);var t,e,o,n,a,c,h,d="",i=0;for(r=r.replace(/[^A-Za-z0-9\+\/\=]/g,"");i<r.length;)n=this._keyStr.indexOf(r.charAt(i++)),a=this._keyStr.indexOf(r.charAt(i++)),c=this._keyStr.indexOf(r.charAt(i++)),h=this._keyStr.indexOf(r.charAt(i++)),t=n<<2|a>>4,e=(15&a)<<4|c>>2,o=(3&c)<<6|h,d+=String.fromCharCode(t),64!=c&&(d+=String.fromCharCode(e)),64!=h&&(d+=String.fromCharCode(o));return d=Base64._utf8_decode(d)},_utf8_encode:function(r){r=r.replace(/\r\n/g,"\n");for(var t="",e=0;e<r.length;e++){var o=r.charCodeAt(e);128>o?t+=String.fromCharCode(o):o>127&&2048>o?(t+=String.fromCharCode(o>>6|192),t+=String.fromCharCode(63&o|128)):(t+=String.fromCharCode(o>>12|224),t+=String.fromCharCode(o>>6&63|128),t+=String.fromCharCode(63&o|128))}return t},_utf8_decode:function(r){for(var t="",e=0,o=c1=c2=0;e<r.length;)o=r.charCodeAt(e),128>o?(t+=String.fromCharCode(o),e++):o>191&&224>o?(c2=r.charCodeAt(e+1),t+=String.fromCharCode((31&o)<<6|63&c2),e+=2):(c2=r.charCodeAt(e+1),c3=r.charCodeAt(e+2),t+=String.fromCharCode((15&o)<<12|(63&c2)<<6|63&c3),e+=3);return t}};
1
+ var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",utoa:function(r){return window.btoa(unescape(encodeURIComponent(r)))},atou:function(r){return decodeURIComponent(escape(window.atob(r)))},encode:function(r){if(window.btoa)return this.utoa(r);var t,e,o,n,a,c,h,d="",i=0;for(r=Base64._utf8_encode(r);i<r.length;)n=(t=r.charCodeAt(i++))>>2,a=(3&t)<<4|(e=r.charCodeAt(i++))>>4,c=(15&e)<<2|(o=r.charCodeAt(i++))>>6,h=63&o,isNaN(e)?c=h=64:isNaN(o)&&(h=64),d=d+this._keyStr.charAt(n)+this._keyStr.charAt(a)+this._keyStr.charAt(c)+this._keyStr.charAt(h);return d},decode:function(r){if(window.btoa)return this.atou(r);var t,e,o,n,a,c,h="",d=0;for(r=r.replace(/[^A-Za-z0-9\+\/\=]/g,"");d<r.length;)t=this._keyStr.indexOf(r.charAt(d++))<<2|(n=this._keyStr.indexOf(r.charAt(d++)))>>4,e=(15&n)<<4|(a=this._keyStr.indexOf(r.charAt(d++)))>>2,o=(3&a)<<6|(c=this._keyStr.indexOf(r.charAt(d++))),h+=String.fromCharCode(t),64!=a&&(h+=String.fromCharCode(e)),64!=c&&(h+=String.fromCharCode(o));return h=Base64._utf8_decode(h)},_utf8_encode:function(r){r=r.replace(/\r\n/g,"\n");for(var t="",e=0;e<r.length;e++){var o=r.charCodeAt(e);o<128?t+=String.fromCharCode(o):(127<o&&o<2048?t+=String.fromCharCode(o>>6|192):(t+=String.fromCharCode(o>>12|224),t+=String.fromCharCode(o>>6&63|128)),t+=String.fromCharCode(63&o|128))}return t},_utf8_decode:function(r){for(var t="",e=0,o=c1=c2=0;e<r.length;)(o=r.charCodeAt(e))<128?(t+=String.fromCharCode(o),e++):191<o&&o<224?(c2=r.charCodeAt(e+1),t+=String.fromCharCode((31&o)<<6|63&c2),e+=2):(c2=r.charCodeAt(e+1),c3=r.charCodeAt(e+2),t+=String.fromCharCode((15&o)<<12|(63&c2)<<6|63&c3),e+=3);return t}};
js/forms.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(i){i(document).ready(function(){i(".form-valid")&&void 0!==i(".form-valid").validationEngine&&i(".form-valid").validationEngine("attach",{promptPosition:"topRight",scroll:!1,validationEventTrigger:"submit"})})});
1
+ jQuery(function(i){i(document).ready(function(){i(".form-valid")&&i(".form-valid").validationEngine!==undefined&&i(".form-valid").validationEngine("attach",{promptPosition:"topRight",scroll:!1,validationEventTrigger:"submit"})})});
js/front-subscribers.js CHANGED
@@ -1 +1 @@
1
- function version_compare(t,i){if(t===i)return 0;for(var a=t.split("."),n=i.split("."),l=Math.min(a.length,n.length),e=0;l>e;e++){if(parseInt(a[e])>parseInt(n[e]))return 1;if(parseInt(a[e])<parseInt(n[e]))return-1}return a.length>n.length?1:a.length<n.length?-1:0}jQuery(function(t){void 0===t.fn.on&&(t.fn.on=function(i,a,n,l){return"function"==typeof a?t(this.context).live(i,a):t(a).live(i,n,l),this}),t(document).on("click",".showerrors",function(){return t(".xdetailed-errors").toggle(),!1}),t(document).on("click",".shownotices",function(){return t(".xdetailed-updated").toggle(),!1}),t("form.widget_wysija").on("focus","input[placeholder]",function(){t(this).val()===t(this).attr("placeholder")&&t(this).val("")}),t("form.widget_wysija").on("blur","input[placeholder]",function(){""===t(this).val()&&t(this).val(t(this).attr("placeholder"))}),t("form.widget_wysija").on("focus","input.defaultlabels",function(){t(this).val()===t(this).attr("title")&&t(this).val("")}),t("form.widget_wysija").on("blur","input.defaultlabels",function(){""===t(this).val()&&t(this).val(t(this).attr("title"))}),t(document).on("submit","form.widget_wysija",function(i){if(i.preventDefault(),void 0!==wysijaAJAX.noajax)return t(this).validationEngine("validate");if(t(this).validationEngine("validate")===!0){var a=t(this).find('input[name="action"]').val(),n=t(this).find('input[name="controller"]').val(),l=t(this).attr("id"),e=t(this).serializeArray();wysijaAJAX.task=a,wysijaAJAX.controller=n,wysijaAJAX.formid=l,t.each(e,function(t,i){wysijaAJAX["data["+t+"][name]"]=i.name,wysijaAJAX["data["+t+"][value]"]=i.value}),t("#msg-"+l).html('<div class="allmsgs"><blink>'+wysijaAJAX.loadingTrans+"</blink></div>"),t("#"+l).fadeOut(),t.ajax({type:"post",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(i){t("#msg-"+l).html('<div class="allmsgs"></div>'),i.result||t("#"+l).fadeIn(),t.each(i.msgs,function(i,a){t("#msg-"+l+" .allmsgs ."+i+" ul").length||t("#msg-"+l+" .allmsgs").append('<div class="'+i+'"><ul></ul></div>'),t.each(a,function(a,n){t("#msg-"+l+" .allmsgs ."+i+" ul").append("<li>"+n+"</li>")})})},error:function(i,a,n){t("#msg-"+l).html('<div class="allmsgs"></div>'),t("#msg-"+l+" .allmsgs").html('<div class="error"><ul><li>Oops! There is a problem with this form:</li><li>textStatus:'+a+"</li><li>errorThrown:"+n+"</li><li>responseText:"+i.responseText+"</li></ul></div>")},dataType:"jsonp"})}return!1}),t(function(){var i="centerRight";wysijaAJAX.is_rtl&&(i="centerLeft"),t("form.widget_wysija").validationEngine("attach",{promptPosition:i,scroll:!1}),t("form.widget_wysija").bind("jqv.form.validating",function(){t(this).find("input[placeholder]").each(function(){t(this).val()===t(this).attr("placeholder")&&t(this).val("")})}),t("form.widget_wysija").find("input[placeholder]").each(function(){""===t(this).val()&&t(this).val(t(this).attr("placeholder"))}),t("form.widget_wysija").bind("jqv.form.validating",function(){t(this).find("input.defaultlabels").each(function(){t(this).val()===t(this).attr("title")&&t(this).val("")})}),t("form.widget_wysija").find("input.defaultlabels").each(function(){""===t(this).val()&&t(this).val(t(this).attr("title"))})})});
1
+ function version_compare(t,i){if(t===i)return 0;for(var a=t.split("."),n=i.split("."),e=Math.min(a.length,n.length),l=0;l<e;l++){if(parseInt(a[l])>parseInt(n[l]))return 1;if(parseInt(a[l])<parseInt(n[l]))return-1}return a.length>n.length?1:a.length<n.length?-1:0}jQuery(function(l){l.fn.on===undefined&&(l.fn.on=function(t,i,a,n){return"function"==typeof i?l(this.context).live(t,i):l(i).live(t,a,n),this}),l(document).on("click",".showerrors",function(){return l(".xdetailed-errors").toggle(),!1}),l(document).on("click",".shownotices",function(){return l(".xdetailed-updated").toggle(),!1}),l("form.widget_wysija").on("focus","input[placeholder]",function(){l(this).val()===l(this).attr("placeholder")&&l(this).val("")}),l("form.widget_wysija").on("blur","input[placeholder]",function(){""===l(this).val()&&l(this).val(l(this).attr("placeholder"))}),l("form.widget_wysija").on("focus","input.defaultlabels",function(){l(this).val()===l(this).attr("title")&&l(this).val("")}),l("form.widget_wysija").on("blur","input.defaultlabels",function(){""===l(this).val()&&l(this).val(l(this).attr("title"))}),l(document).on("submit","form.widget_wysija",function(t){if(t.preventDefault(),wysijaAJAX.noajax!==undefined)return l(this).validationEngine("validate");if(!0===l(this).validationEngine("validate")){var i=l(this).find('input[name="action"]').val(),a=l(this).find('input[name="controller"]').val(),n=l(this).attr("id"),e=l(this).serializeArray();wysijaAJAX.task=i,wysijaAJAX.controller=a,wysijaAJAX.formid=n,l.each(e,function(t,i){wysijaAJAX["data["+t+"][name]"]=i.name,wysijaAJAX["data["+t+"][value]"]=i.value}),l("#msg-"+n).html('<div class="allmsgs"><blink>'+wysijaAJAX.loadingTrans+"</blink></div>"),l("#"+n).fadeOut(),l.ajax({type:"post",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,success:function(t){l("#msg-"+n).html('<div class="allmsgs"></div>'),t.result||l("#"+n).fadeIn(),l.each(t.msgs,function(a,t){l("#msg-"+n+" .allmsgs ."+a+" ul").length||l("#msg-"+n+" .allmsgs").append('<div class="'+a+'"><ul></ul></div>'),l.each(t,function(t,i){l("#msg-"+n+" .allmsgs ."+a+" ul").append("<li>"+i+"</li>")})})},error:function(t,i,a){l("#msg-"+n).html('<div class="allmsgs"></div>'),l("#msg-"+n+" .allmsgs").html('<div class="error"><ul><li>Oops! There is a problem with this form:</li><li>textStatus:'+i+"</li><li>errorThrown:"+a+"</li><li>responseText:"+t.responseText+"</li></ul></div>")},dataType:"jsonp"})}return!1}),l(function(){var t="centerRight";wysijaAJAX.is_rtl&&(t="centerLeft"),l("form.widget_wysija").validationEngine("attach",{promptPosition:t,scroll:!1}),l("form.widget_wysija").bind("jqv.form.validating",function(){l(this).find("input[placeholder]").each(function(){l(this).val()===l(this).attr("placeholder")&&l(this).val("")})}),l("form.widget_wysija").find("input[placeholder]").each(function(){""===l(this).val()&&l(this).val(l(this).attr("placeholder"))}),l("form.widget_wysija").bind("jqv.form.validating",function(){l(this).find("input.defaultlabels").each(function(){l(this).val()===l(this).attr("title")&&l(this).val("")})}),l("form.widget_wysija").find("input.defaultlabels").each(function(){""===l(this).val()&&l(this).val(l(this).attr("title"))})})});
js/konami.js CHANGED
@@ -1 +1 @@
1
- var Konami=function(){var t={addEvent:function(t,e,n,i){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&(t["e"+e+n]=n,t[e+n]=function(){t["e"+e+n](window.event,i)},t.attachEvent("on"+e,t[e+n]))},input:"",pattern:"38384040373937396665",load:function(e){this.addEvent(document,"keydown",function(n,i){i&&(t=i),t.input+=n?n.keyCode:event.keyCode,t.input.length>t.pattern.length&&(t.input=t.input.substr(t.input.length-t.pattern.length)),t.input==t.pattern&&(t.code(e),t.input="")},this),this.iphone.load(e)},code:function(t){window.location=t},iphone:{start_x:0,start_y:0,stop_x:0,stop_y:0,tap:!1,capture:!1,orig_keys:"",keys:["UP","UP","DOWN","DOWN","LEFT","RIGHT","LEFT","RIGHT","TAP","TAP","TAP"],code:function(e){t.code(e)},load:function(e){this.orig_keys=this.keys,t.addEvent(document,"touchmove",function(e){1==e.touches.length&&1==t.iphone.capture&&(e=e.touches[0],t.iphone.stop_x=e.pageX,t.iphone.stop_y=e.pageY,t.iphone.tap=!1,t.iphone.capture=!1,t.iphone.check_direction())}),t.addEvent(document,"touchend",function(){1==t.iphone.tap&&t.iphone.check_direction(e)},!1),t.addEvent(document,"touchstart",function(e){t.iphone.start_x=e.changedTouches[0].pageX,t.iphone.start_y=e.changedTouches[0].pageY,t.iphone.tap=!0,t.iphone.capture=!0})},check_direction:function(t){x_magnitude=Math.abs(this.start_x-this.stop_x),y_magnitude=Math.abs(this.start_y-this.stop_y),x=this.start_x-this.stop_x<0?"RIGHT":"LEFT",y=this.start_y-this.stop_y<0?"DOWN":"UP",result=x_magnitude>y_magnitude?x:y,result=1==this.tap?"TAP":result,result==this.keys[0]&&(this.keys=this.keys.slice(1,this.keys.length)),0==this.keys.length&&(this.keys=this.orig_keys,this.code(t))}}};return t};
1
+ var Konami=function(){var i={addEvent:function(t,e,n,i){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&(t["e"+e+n]=n,t[e+n]=function(){t["e"+e+n](window.event,i)},t.attachEvent("on"+e,t[e+n]))},input:"",pattern:"38384040373937396665",load:function(n){this.addEvent(document,"keydown",function(t,e){e&&(i=e),i.input+=t?t.keyCode:event.keyCode,i.input.length>i.pattern.length&&(i.input=i.input.substr(i.input.length-i.pattern.length)),i.input==i.pattern&&(i.code(n),i.input="")},this),this.iphone.load(n)},code:function(t){window.location=t},iphone:{start_x:0,start_y:0,stop_x:0,stop_y:0,tap:!1,capture:!1,orig_keys:"",keys:["UP","UP","DOWN","DOWN","LEFT","RIGHT","LEFT","RIGHT","TAP","TAP","TAP"],code:function(t){i.code(t)},load:function(t){this.orig_keys=this.keys,i.addEvent(document,"touchmove",function(t){1==t.touches.length&&1==i.iphone.capture&&(t=t.touches[0],i.iphone.stop_x=t.pageX,i.iphone.stop_y=t.pageY,i.iphone.tap=!1,i.iphone.capture=!1,i.iphone.check_direction())}),i.addEvent(document,"touchend",function(){1==i.iphone.tap&&i.iphone.check_direction(t)},!1),i.addEvent(document,"touchstart",function(t){i.iphone.start_x=t.changedTouches[0].pageX,i.iphone.start_y=t.changedTouches[0].pageY,i.iphone.tap=!0,i.iphone.capture=!0})},check_direction:function(t){x_magnitude=Math.abs(this.start_x-this.stop_x),y_magnitude=Math.abs(this.start_y-this.stop_y),x=this.start_x-this.stop_x<0?"RIGHT":"LEFT",y=this.start_y-this.stop_y<0?"DOWN":"UP",result=x_magnitude>y_magnitude?x:y,result=1==this.tap?"TAP":result,result==this.keys[0]&&(this.keys=this.keys.slice(1,this.keys.length)),0==this.keys.length&&(this.keys=this.orig_keys,this.code(t))}}};return i};
js/timer.js CHANGED
@@ -1 +1 @@
1
- function Timer(t,r){"[object Function]"===Object.prototype.toString.call(r)&&(r=[r]),this.callbacks=r;{var n=this;setInterval(function(){if(n.running){for(var t=0;t<n.callbacks.length;t++)n.callbacks[t].call(n);n.count++}},t)}Timer.all.push(this)}Timer.prototype.running=!0,Timer.prototype.count=0,Timer.prototype.pause=function(){return this.running=!1,this},Timer.prototype.run=function(){return this.running=!0,this},Timer.prototype.stop=function(){return clearInterval(this.id),this.stopped=!0,this},Timer.prototype.id=function(){return this.id},Timer.prototype.delay=function(){return this.delay},Timer.all=[],Timer.all.pause=function(){for(var t=Timer.all,r=0;r<t.length;r++)t[r].pause();return t},Timer.all.run=function(){for(var t=Timer.all,r=0;r<t.length;r++)t[r].run();return t},Timer.all.stop=function(){for(var t=Timer.all,r=0;r<t.length;r++)t[r].stop();return t};
1
+ function Timer(t,r){"[object Function]"===Object.prototype.toString.call(r)&&(r=[r]),this.callbacks=r;var n=this;setInterval(function e(){if(n.running){for(var t=0;t<n.callbacks.length;t++)n.callbacks[t].call(n);n.count++}},t);Timer.all.push(this)}Timer.prototype.running=!0,Timer.prototype.count=0,Timer.prototype.pause=function pause(){return this.running=!1,this},Timer.prototype.run=function run(){return this.running=!0,this},Timer.prototype.stop=function stop(){return clearInterval(this.id),this.stopped=!0,this},Timer.prototype.id=function id(){return this.id},Timer.prototype.delay=function delay(){return this.delay},Timer.all=[],Timer.all.pause=function pause(){for(var t=Timer.all,r=0;r<t.length;r++)t[r].pause();return t},Timer.all.run=function run(){for(var t=Timer.all,r=0;r<t.length;r++)t[r].run();return t},Timer.all.stop=function stop(){for(var t=Timer.all,r=0;r<t.length;r++)t[r].stop();return t};
js/wysija-charts.js CHANGED
@@ -1 +1 @@
1
- var RColor=function(){this.hue=Math.random(),this.goldenRatio=.618033988749895};RColor.prototype.hsvToRgb=function(t,a,e){var r=Math.floor(6*t),i=6*t-r,s=e*(1-a),o=e*(1-i*a),h=e*(1-(1-i)*a),l=255,n=255,u=255;switch(r){case 0:l=e,n=h,u=s;break;case 1:l=o,n=e,u=s;break;case 2:l=s,n=e,u=h;break;case 3:l=s,n=o,u=e;break;case 4:l=h,n=s,u=e;break;case 5:l=e,n=s,u=o}return[Math.floor(256*l),Math.floor(256*n),Math.floor(256*u)]},RColor.prototype.get=function(t,a,e){this.hue+=this.goldenRatio,this.hue%=1,"number"!=typeof a&&(a=.5),"number"!=typeof e&&(e=.95);var r=this.hsvToRgb(this.hue,a,e);return t?"#"+r[0].toString(16)+r[1].toString(16)+r[2].toString(16):r};var WysijaCharts={charts:[],axes:{},chartsCount:0,current:null,getData:function(t){return void 0===t?!1:(jQuery.get(t,function(t){return t.result.success===!0&&t.result.data?(this.current.dataProvider=t.result.data,this.current.validateData(),!0):void 0}.bind(this)),!1)},generateChart:function(t,a,e){void 0!==WysijaCharts[t+"Chart"]&&WysijaCharts[t+"Chart"](a,e)},serialChart:function(t,a){var e=new AmCharts.AmSerialChart;e.categoryField=a.category,e.color="#333333",e.fontSize=12,e.startDuration=0,e.plotAreaFillAlphas=.2;var r=e.categoryAxis;return r.gridAlpha=.2,r.gridPosition="start",r.gridColor="#AAAAAA",r.axisColor="#AAAAAA",r.axisAlpha=.5,r.dashLength=5,jQuery.each(a.axes,function(t,a){var r=new AmCharts.ValueAxis;r.gridAlpha=.2,r.gridColor="#AAAAAA",r.axisColor="#AAAAAA",r.axisAlpha=.5,r.dashLength=5,r.title=a.title,r.titleColor="#999999",void 0!==a.stackType&&(r.stackType=a.stackType),r.position=a.position||"left",void 0!==a.valueMin&&(r.minimum=a.valueMin),void 0!==a.valueMax&&(r.maximum=a.valueMax),e.addValueAxis(r),WysijaCharts.axes[t]=r,jQuery.each(a.graphs,function(r,i){var s=new AmCharts.AmGraph;switch(s.title=i.title,s.valueField=i.valueField,s.type=a.graphType,s.type){case"line":s.lineThickness=1,s.bullet="square";break;case"column":s.lineAlpha=1,s.fillAlphas=.6}s.valueAxis=WysijaCharts.axes[t],s.balloonText="[[value]] [[title]]",e.addGraph(s)});var i=new AmCharts.ChartCursor;i.zoomable=!1,i.cursorAlpha=0,e.addChartCursor(i);var s=new AmCharts.AmLegend;e.addLegend(s)}),void 0!==a.title&&e.addTitle(a.title),void 0===a.data?(alert("missing data provider"),!1):(e.dataProvider=a.data,e.validateData(),this.chartsCount=this.charts.push(e),this.charts[this.chartsCount-1].elementId=t,this.current=this.charts[this.chartsCount-1],void this.current.write(this.current.elementId))},pieChart:function(t,a){var e=null;if(e=new AmCharts.AmPieChart,e.titleField=a.titleField,e.color="#333333",e.fontSize=12,e.valueField=a.valueField,e.sequencedAnimation=!0,e.startEffect="elastic",e.innerRadius="30%",e.startDuration=0,e.labelRadius=15,void 0!==a.threeD&&(e.depth3D=10,e.angle=15),void 0!==a.title&&e.addTitle(a.title),void 0!==a.data)e.dataProvider=a.data,e.validateData();else{if(void 0===a.url)return alert("missing data provider"),!1;this.getData(a.url,function(t){e.dataProvider=t}.bind(e))}this.chartsCount=this.charts.push(e),this.charts[this.chartsCount-1].elementId=t,this.current=this.charts[this.chartsCount-1],this.current.write(this.current.elementId)}};
1
+ var RColor=function(){this.hue=Math.random(),this.goldenRatio=.618033988749895};RColor.prototype.hsvToRgb=function(t,e,a){var r=Math.floor(6*t),i=6*t-r,s=a*(1-e),n=a*(1-i*e),h=a*(1-(1-i)*e),l=255,o=255,u=255;switch(r){case 0:l=a,o=h,u=s;break;case 1:l=n,o=a,u=s;break;case 2:l=s,o=a,u=h;break;case 3:l=s,o=n,u=a;break;case 4:l=h,o=s,u=a;break;case 5:l=a,o=s,u=n}return[Math.floor(256*l),Math.floor(256*o),Math.floor(256*u)]},RColor.prototype.get=function(t,e,a){this.hue+=this.goldenRatio,this.hue%=1,"number"!=typeof e&&(e=.5),"number"!=typeof a&&(a=.95);var r=this.hsvToRgb(this.hue,e,a);return t?"#"+r[0].toString(16)+r[1].toString(16)+r[2].toString(16):r};var WysijaCharts={charts:[],axes:{},chartsCount:0,current:null,getData:function(t){return t===undefined||jQuery.get(t,function(t){if(!0===t.result.success&&t.result.data)return this.current.dataProvider=t.result.data,this.current.validateData(),!0}.bind(this)),!1},generateChart:function(t,e,a){WysijaCharts[t+"Chart"]!==undefined&&WysijaCharts[t+"Chart"](e,a)},serialChart:function(t,e){var s=new AmCharts.AmSerialChart;s.categoryField=e.category,s.color="#333333",s.fontSize=12,s.startDuration=0,s.plotAreaFillAlphas=.2;var a=s.categoryAxis;if(a.gridAlpha=.2,a.gridPosition="start",a.gridColor="#AAAAAA",a.axisColor="#AAAAAA",a.axisAlpha=.5,a.dashLength=5,jQuery.each(e.axes,function(r,i){var t=new AmCharts.ValueAxis;t.gridAlpha=.2,t.gridColor="#AAAAAA",t.axisColor="#AAAAAA",t.axisAlpha=.5,t.dashLength=5,t.title=i.title,t.titleColor="#999999",i.stackType!==undefined&&(t.stackType=i.stackType),t.position=i.position||"left",i.valueMin!==undefined&&(t.minimum=i.valueMin),i.valueMax!==undefined&&(t.maximum=i.valueMax),s.addValueAxis(t),WysijaCharts.axes[r]=t,jQuery.each(i.graphs,function(t,e){var a=new AmCharts.AmGraph;switch(a.title=e.title,a.valueField=e.valueField,a.type=i.graphType,a.type){case"line":a.lineThickness=1,a.bullet="square";break;case"column":a.lineAlpha=1,a.fillAlphas=.6}a.valueAxis=WysijaCharts.axes[r],a.balloonText="[[value]] [[title]]",s.addGraph(a)});var e=new AmCharts.ChartCursor;e.zoomable=!1,e.cursorAlpha=0,s.addChartCursor(e);var a=new AmCharts.AmLegend;s.addLegend(a)}),e.title!==undefined&&s.addTitle(e.title),e.data===undefined)return alert("missing data provider"),!1;s.dataProvider=e.data,s.validateData(),this.chartsCount=this.charts.push(s),this.charts[this.chartsCount-1].elementId=t,this.current=this.charts[this.chartsCount-1],this.current.write(this.current.elementId)},pieChart:function(t,e){var a=null;if((a=new AmCharts.AmPieChart).titleField=e.titleField,a.color="#333333",a.fontSize=12,a.valueField=e.valueField,a.sequencedAnimation=!0,a.startEffect="elastic",a.innerRadius="30%",a.startDuration=0,a.labelRadius=15,e.threeD!==undefined&&(a.depth3D=10,a.angle=15),e.title!==undefined&&a.addTitle(e.title),e.data!==undefined)a.dataProvider=e.data,a.validateData();else{if(e.url===undefined)return alert("missing data provider"),!1;this.getData(e.url,function(t){a.dataProvider=t}.bind(a))}this.chartsCount=this.charts.push(a),this.charts[this.chartsCount-1].elementId=t,this.current=this.charts[this.chartsCount-1],this.current.write(this.current.elementId)}};
js/wysija-editor.js CHANGED
@@ -1,3 +1,3 @@
1
- "use strict";function info(t){if(Wysija.options.verbose!==!1){window.console&&console.log||!function(){for(var t=function(){},e=["assert","clear","count","debug","dir","dirxml","error","exception","group","groupCollapsed","groupEnd","info","log","markTimeline","profile","profileEnd","markTimeline","table","time","timeEnd","timeStamp","trace","warn"],i=e.length,s=window.console={};i--;)s[e[i]]=t}();try{console.log("[INFO] "+t)}catch(e){}}}Object.extend(Prototype.Browser,{ie6:/MSIE (\d+\.\d+);/.test(navigator.userAgent)&&6===Number(RegExp.$1)?!0:!1,ie7:/MSIE (\d+\.\d+);/.test(navigator.userAgent)&&7===Number(RegExp.$1)?!0:!1,ie8:/MSIE (\d+\.\d+);/.test(navigator.userAgent)&&8===Number(RegExp.$1)?!0:!1,ie9:/MSIE (\d+\.\d+);/.test(navigator.userAgent)&&9===Number(RegExp.$1)?!0:!1}),Event.cacheDelegated={},Object.extend(document,function(){function t(t){return o[t]=o[t]||{}}function e(e,i){var s=t(e);return s[i]=s[i]||[]}function i(t,i,s){var n=e(t,i);return n.find(function(t){return t.handler===s})}function s(e,s,n){var o=t(e);if(!o[s])return!1;var a=i(e,s,n);return o[s]=o[s].without(a),a}function n(t,i,s,n){var o,a=e(t,i);return a.pluck("handler").include(s)?!1:(o=function(e){var i=e.findElement(t);i&&s.call(n||i,e,i)},o.handler=s,a.push(o),o)}var o=Event.cacheDelegated;return{delegate:function(t,e){var i=n.apply(null,arguments);return i&&document.observe(e,i),document},stopDelegating:function(i,n){var a=arguments.length;switch(a){case 2:e(i,n).each(function(t){document.stopDelegating(i,n,t.handler)});break;case 1:Object.keys(t(i)).each(function(t){document.stopDelegating(i,t)});break;case 0:Object.keys(o).each(function(t){document.stopDelegating(t)});break;default:var r=s.apply(null,arguments);r&&document.stopObserving(n,r)}return document}}}());var Observable=function(){function t(t,e){return t=t.substring(2),e&&(t=e+":"+t),t.underscore().split("_").join(":")}function e(e){var s=e.prototype,n=s.namespace;return Object.keys(s).grep(/^on/).inject($H(),function(o,a){return"onDomLoaded"===a?o:(o.set(t(a,n),i(s[a],e)),o)})}function i(t,e){return function(i){return t.call(new e(this),i,i.memo)}}function s(t,e){$$(t).each(function(t){new e(t).onDomLoaded()})}return{observe:function(t){if(this.handlers||(this.handlers={}),!this.handlers[t]){var i=this;this.prototype.onDomLoaded&&(document.loaded?s(t,i):document.observe("dom:loaded",s.curry(t,i))),this.handlers[t]=e(i).each(function(e){document.delegate(t,e.key,e.value)})}},stopObserving:function(t){this.handlers&&this.handlers[t]&&(this.handlers[t].each(function(e){document.stopDelegating(t,e.key,e.value)}),delete this.handlers[t])}}}();Object.extend(Droppables,{deactivate:Droppables.deactivate.wrap(function(t,e,i){return e.onLeave&&e.onLeave(i,e.element),t(e)}),activate:Droppables.activate.wrap(function(t,e,i){return e.onEnter&&e.onEnter(i,e.element),t(e)}),togglePlaceholders:function(t,e){if(0!==this.drops.length&&!($$(".block_placeholder.hover, .text_placeholder.hover, .image_placeholder.hover").length>0)){var i=document.viewport.getDimensions(),s=document.viewport.getScrollOffsets();this.drops.each(function(n){if(void 0===n.overlap){var o=!1,a=n.element.cumulativeOffset(),r=Math.max(30,n.element.getHeight()),l=t.element.hasClassName("image"),h=t.element.hasClassName("text");if(a.top>s.top+i.height)return;if(a.top<s.top&&a.top+r<s.top)return;if(l===!1&&-1!==n.accept.indexOf("image"))return;if(h===!1&&-1!==n.accept.indexOf("text"))return;if(l===!0){if(-1!==n.accept.indexOf("text"))return;if(t.element.readAttribute("wysija_src")===n.element.readAttribute("wysija_src"))return}var c=a.top-2*Wysija.options.blockDropTreshold,m=a.top+r+Wysija.options.blockDropTreshold;c<e.pageY&&e.pageY<m&&(o=!0);var d=n.element.up();o===!0?(d&&d.addClassName("active"),n.element.addClassName("active")):(d&&d.removeClassName("active"),n.element.removeClassName("active"))}})}},hidePlaceholders:function(){0!==this.drops.length&&$$(".block_placeholder.active, .text_placeholder.active, .image_placeholder.active, .wysija_image.active").invoke("removeClassName","active")}});var Wysija={version:"2.3",options:{debug:!1,verbose:!1,css:"wj_css",toolbar:"wysija_toolbar",notices:"wysija_notices",wrapper:"wysija_wrapper",container:"wysija_container",header:"wysija_header",body:"wysija_body",footer:"wysija_footer",blockDropTreshold:30,imageDropTreshold:30,minTextPlaceholderWidth:45},toolbar:{effect:null,x:null,y:null,top:null,left:null},scroll:{top:0,left:0},locks:{dragging:!1,selectingColor:!1,showingTools:!1},flags:{displayImages:!0,doSave:!1},defaults:{contentAlignment:"left",imageAlignment:"center",galleryAlignment:"center"},autoSave:function(){Wysija.flags.doSave===!1&&(Wysija.flags.doSave=!0)},save:function(){var t,e=1,i={},s=$H();s.set("version",Wysija.version);var n=Wysija.getHeader();i=n.block.save(),i.type="header",s.set("header",i);var o=$H();Wysija.getBlocks().each(function(s){t=s.block,t.save&&(i=t.save(),null!==i&&(i.position=e,i.type=s.elementType,i.background_color=t.element.readAttribute("wysija_bg_color"),o.set("block-"+e,i),e++))}),s.set("body",o);var a=Wysija.getFooter();return i=a.block.save(),i.type="footer",s.set("footer",i),Object.toJSON(s).gsub('\\"','"').gsub('"[{',"[{").gsub('}]"',"}]")},blockDropOptions:{accept:$w("wysija_widget"),onEnter:function(t,e){$(e).addClassName("hover")},onLeave:function(t,e){$(e).removeClassName("hover")},onDrop:function(t,e){var i={},s=null;i.elementType=t.readAttribute("wysija_type"),i.element=t,"image"===i.elementType?(i.elementRatio=t.readAttribute("elementRatio"),i.elementSrc=t.readAttribute("wysija_src"),i.elementWidth=t.readAttribute("wysija_width"),i.elementHeight=t.readAttribute("wysija_height"),i.elementClass=null,s=t.readAttribute("wysija_parent"),null!==$(s)&&(i.elementData=Wysija.get($(s)).block.image.getData())):"divider"===i.elementType?(i.elementSrc=t.readAttribute("wysija_src"),i.elementWidth=t.readAttribute("wysija_width"),i.elementHeight=t.readAttribute("wysija_height")):"text"===i.elementType&&(i.elementText=Wysija_i18n.clickToEditText),e.fire("item:drop",i),$(e).removeClassName("hover"),null!==$(s)&&(s=Wysija.get($(s)),s.block.image.removeImage())}},imageDropOptions:{accept:$w("image"),onEnter:function(t,e){$(e).addClassName("hover"),($(e).up(".wysija_block")||$(e).up(".wysija_header")||$(e).up(".wysija_footer")).addClassName("image_hover")},onLeave:function(t,e){$(e).removeClassName("hover"),$$(".image_hover").invoke("removeClassName","image_hover")},onDrop:function(t,e){if(e.readAttribute("wysija_src")===t.readAttribute("wysija_src"))return Wysija.hideTools(),!1;var i={},s=t.readAttribute("wysija_parent");i.elementType=t.readAttribute("wysija_type"),i.element=t,i.elementRatio=t.readAttribute("elementRatio"),i.elementSrc=t.readAttribute("wysija_src"),i.elementWidth=t.readAttribute("wysija_width"),i.elementHeight=t.readAttribute("wysija_height"),i.elementClass=null,null!==$(s)&&(s=Wysija.get($(s)),i.elementData=s.block.image.getData()),e.fire("image:drop",i),$(e).removeClassName("hover"),null!==$(s)&&s.block.image.removeImage()}},textDropOptions:{accept:$w("text"),onEnter:function(t,e){$(e).addClassName("hover")},onLeave:function(t,e){$(e).removeClassName("hover")},onDrop:function(t,e){var i={};i.elementType=t.readAttribute("wysija_type"),i.element=t,i.elementText=Wysija_i18n.clickToEditText,e.fire("text:drop",i),$(e).removeClassName("hover")}},instances:{},get:function(t,e){void 0===e&&(e="block");var i=t.identify(),s=Wysija.instances[i]||new(Wysija[e.capitalize().camelize()])(i);return Wysija.instances[i]=s,s},getTheme:function(){var t=$("wysija_widgets_settings").down(".theme");return void 0!==t&&t.innerHTML.length>0?t.innerHTML:"default"},getHeader:function(){return Wysija.get(Wysija.getHeaderElement(),"header")},getHeaderElement:function(){return $$("div.wysija_header")[0]},getFooter:function(){return Wysija.get(Wysija.getFooterElement(),"footer")},getFooterElement:function(){return $$("div.wysija_footer")[0]},getBlocks:function(){return Wysija.getBlockElements().map(function(t){return Wysija.get(t)})},getBlockElements:function(){return $$("div.wysija_block")},startBlockPositions:function(t,e){e.element.hasClassName("wysija_block")&&(Wysija.locks.dragging=!0,Wysija.hideEditors())},setScrollOffsets:function(){Wysija.scroll=document.viewport.getScrollOffsets()},setBlockPositions:function(t,e){Wysija.locks.dragging=!1;var i=1;Wysija.getBlocks().each(function(t){t.setPosition(i++),t.block.element.setStyle({zIndex:""});var e=$$(".block_placeholder[data-parent="+t.block.element.identify()+"]").first();void 0!==e&&t.block.element.insert({before:e})}),void 0!==e&&$$(".wysija_auto-post").length>1&&"auto-post"===e.element.readAttribute("wysija_type")&&(Wysija.initAutoPost(),Wysija.setBackgroundColors()),Wysija.autoSave()},init:function(){Wysija.setScrollOffsets(),Wysija.getHeader(),Wysija.getFooter(),Wysija.makeDroppable(),Wysija.makeSortable(),Wysija.hideControls(),Wysija.hideTools(),Wysija.hideSettings(),Wysija.setSettingsPosition(),Wysija.initSettings(),Wysija.initAutoPost(),Wysija.setBackgroundColors(),Wysija.setToolbarPosition(),Wysija.setImagesDisplay()},initToolbarPosition:function(){null===Wysija.toolbar.top&&(Wysija.toolbar.top=parseInt($(Wysija.options.wrapper).positionedOffset().top)),null===Wysija.toolbar.left&&(Wysija.toolbar.left=parseInt($(Wysija.options.wrapper).positionedOffset().left)),null===Wysija.toolbar.x&&(Wysija.toolbar.x=parseInt(Wysija.toolbar.left+$(Wysija.options.wrapper).getDimensions().width+15)),Wysija.toolbar.y=parseInt(Wysija.scroll.top>=Wysija.toolbar.top-20?20+Wysija.scroll.top:Wysija.toolbar.top+Wysija.scroll.top)},setToolbarPosition:function(){Wysija.initToolbarPosition(),$(Wysija.options.toolbar).setStyle({top:Wysija.toolbar.y+"px",left:Wysija.toolbar.x+"px",opacity:0}).appear({duration:.5}),$(Wysija.options.notices).hide()},updateToolbarPosition:function(){Wysija.initToolbarPosition(),null!==Wysija.toolbar.effect&&Wysija.toolbar.effect.cancel(),Wysija.scroll.top>=Wysija.toolbar.top-20?(Wysija.toolbar.y=parseInt(20+Wysija.scroll.top),Wysija.toolbar.effect=new Effect.Move(Wysija.options.toolbar,{x:Wysija.toolbar.x,y:Wysija.toolbar.y,mode:"absolute",duration:.2})):$(Wysija.options.toolbar).setStyle({left:Wysija.toolbar.x+"px",top:Wysija.toolbar.top+"px"})},editorCleanup:function(t,e){switch(t){case"get_from_editor":e=e.gsub(/<h1><\/h1>/,"<br />"),e=e.gsub(/<h2><\/h2>/,"<br />"),e=e.gsub(/<h3><\/h3>/,"<br />"),e=e.gsub(/<p><\/p>/,"<p>&nbsp;</p>");break;case"insert_to_editor":break;case"submit_content":break;case"get_from_editor_dom":break;case"insert_to_editor_dom":break;case"setup_content_dom":break;case"submit_content_dom":}return e},updateCSSColor:function(t,e){var i=[],s="color",n=$(Wysija.options.css).innerHTML.strip();switch(t.endsWith("BgColorInput")&&(s="background-color"),e=""===e?"transparent":"#"+e,t){case"bodyColorInput":i.push("wysija_editable"),i.push("wysija_editable ul li"),i.push("wysija_editable ol li");break;case"h1ColorInput":i.push("wysija_editable h1");break;case"h2ColorInput":i.push("wysija_editable h2");break;case"h3ColorInput":i.push("wysija_editable h3");break;case"linksColorInput":i.push("wysija_editable a"),i.push("wysija_editable h1 a"),i.push("wysija_editable h2 a"),i.push("wysija_editable h3 a");break;case"unsubscribeColorInput":i.push("wysija_unsubscribe p");break;case"viewbrowserColorInput":i.push("wysija_viewbrowser p");break;case"htmlBgColorInput":i.push("wysija_wrapper");break;case"headerBgColorInput":i.push("wysija_header");break;case"bodyBgColorInput":i.push("wysija_body");break;case"footerBgColorInput":i.push("wysija_footer")}i.length>0&&null!==s&&(i.each(function(t){var i=new RegExp("([\\.|#]"+t+".*?{.*?"+s+":\\s*)(#?[a-z0-9]*)*(.*?})","i");n=n.replace(i,"$1"+e+"$3")}),n.length>0&&Wysija.updateCSS(n))},updateCSS:function(t){void 0!==$(Wysija.options.css)&&$(Wysija.options.css).remove();var e=document.getElementsByTagName("head")[0],i=document.createElement("style");i.id=Wysija.options.css,i.type="text/css",i.styleSheet?i.innerHTML=t:i.appendChild(document.createTextNode(t)),e.appendChild(i)},setTextStyles:function(t){var e=t.editorId+"_ifr",i=$(e);if(null!==i&&(i.doc=null,i.contentDocument?i.doc=i.contentDocument:i.contentWindow?i.doc=i.contentWindow.document:i.document&&(i.doc=i.document),null!==i.doc)){var s=i.doc.getElementsByTagName("head")[0],n=i.doc.createElement("style"),o=$(Wysija.options.css).innerHTML.strip();n.type="text/css",n.id="wj_iframe_css",n.styleSheet?n.innerHTML=o:n.appendChild(document.createTextNode(o)),s.appendChild(n)}},setBackgroundColors:function(){Wysija.getBlocks().invoke("setBackgroundColor"),$$(".wysija_auto-post .wysija_content, .wysija_auto-post .wysija_divider .wysija_raw").each(function(t){var e=t.readAttribute("wysija_bg_color");""===e?t.setStyle({backgroundColor:"transparent"}):null!==e&&t.setStyle({backgroundColor:"#"+e})})},hideBlockControls:function(){$$(".wysija_controls").invoke("hide"),this.getBlockElements().invoke("removeClassName","hover")},hideEditors:function(){tinymce.editors.length>0&&Wysija.getBlocks().each(function(t){"content"===t.elementType&&null!==t.block.contents&&t.block.contents.disableEditor()})},hideControls:function(){return Wysija.getBlocks().invoke("hideControls")},hideTools:function(){$$(".resize-controls").invoke("hide"),$$(".wysija_tools").invoke("hide"),Wysija.locks.showingTools=!1},makeDroppable:function(){Droppables.add("block_placeholder",Wysija.blockDropOptions)},makeSortable:function(){var t=$(Wysija.options.body);Sortable.create(t,{tag:"div",only:"wysija_block",scroll:window,handle:"handle",constraint:"vertical"}),Draggables.removeObserver(t),Draggables.addObserver({element:t,onStart:Wysija.startBlockPositions,onEnd:Wysija.setBlockPositions})},setDivider:function(t,e){$("wysija_widgets_settings").down(".divider").update(t),$$('.wysija_item[wysija_type="divider"]')[0].writeAttribute("wysija_src",e.src),$$('.wysija_item[wysija_type="divider"]')[0].writeAttribute("wysija_width",e.width),$$('.wysija_item[wysija_type="divider"]')[0].writeAttribute("wysija_height",e.height)},replaceDividers:function(){$$(".wysija_block .wysija_divider").invoke("replace",$("wysija_widgets_settings").down(".divider").innerHTML)},toggleImages:function(){return Wysija.flags.displayImages=!Wysija.flags.displayImages,this.setImagesDisplay()},setImagesDisplay:function(){return Wysija.flags.displayImages===!0?($$(".wysija_image img").invoke("setStyle",{visibility:"visible"}),$$(".wysija_cell img").invoke("setStyle",{visibility:"visible"}),$$(".wysija_divider img").invoke("setStyle",{visibility:"visible"}),$$(".wysija_raw img").invoke("setStyle",{visibility:"visible"}),!0):($$(".wysija_image img").invoke("setStyle",{visibility:"hidden"}),$$(".wysija_cell img").invoke("setStyle",{visibility:"hidden"}),$$(".wysija_divider img").invoke("setStyle",{visibility:"hidden"}),$$(".wysija_raw img").invoke("setStyle",{visibility:"hidden"}),!1)},flyToTheMoon:function(){if($("wysija-konami")){var t=document.viewport.getDimensions(),e=t.width;$("wysija-konami-overlay").show(),$("wysija-konami-bird").show(),$("wysija-konami-bird").setStyle({left:"-1000px",top:"100px"}),new Effect.Morph("wysija-konami-bird",{style:{left:e+"px"},duration:5,beforeStart:function(){},afterFinish:function(){$("wysija-konami-bird").writeAttribute("style","z-index:99999;position:absolute;top:300px;left:"+e+'px;-moz-transform: scaleX(-1);-o-transform: scaleX(-1);-webkit-transform: scaleX(-1);transform: scaleX(-1);filter: FlipH;-ms-filter: "FlipH";')}}),new Effect.Morph("wysija-konami-bird",{queue:"end",style:{left:"-1000px"},duration:5,afterFinish:function(){$("wysija-konami-bird").writeAttribute("style","z-index:99999;position:absolute;top:100px;left:-1000px;"),$("wysija-konami-overlay").hide(),$("wysija-konami-bird").hide()}})}},hideSettings:function(){$$(".wysija_settings").invoke("hide")},initSettings:function(){Event.stopObserving("scroll"),Event.observe(window,"scroll",function(){Wysija.setScrollOffsets(),Wysija.setSettingsPosition(),Wysija.updateToolbarPosition(),WysijaPopup.setPosition()}),Event.stopObserving("resize"),Event.observe(window,"resize",function(){WysijaPopup.setPosition()})},setSettingsPosition:function(){var t=document.viewport.getHeight(),e=25;$$(".wysija_settings").each(function(i){var s=i.up(".wysija_block").getDimensions(),n=i.up(".wysija_block").cumulativeOffset(),o=n.top<=Wysija.scroll.top+t?!0:!1,a=100;if(o){var r=parseInt(Wysija.scroll.top+(t/2-i.getHeight()/2)),l=parseInt(n.top-e),h=parseInt(n.top+s.height-e);a=parseInt(s.height)<200?parseInt(s.height/2-i.getHeight()/2):r+100>h+e?parseInt(s.height-100):l+e>r-100?100:parseInt(r-n.top)}new Effect.Move(i,{x:parseInt(s.width/2-i.getWidth()/2),y:a,mode:"absolute",duration:.2})})},initAutoPost:function(){var t=$("wysija_widgets_settings").down(".autopost").innerHTML,e=$$(".wysija_auto-post").length;"single"===t&&(e>0?($("wysija-widget-autopost").addClassName("disabled"),$("wysija-widget-autopost").writeAttribute("title",Wysija_i18n.autoPostImmediateNotice)):($("wysija-widget-autopost").removeClassName("disabled"),$("wysija-widget-autopost").writeAttribute("title",""))),Wysija.getBlocks().each(function(t){"auto-post"===t.elementType&&t.block.loadContent()})},encodeHtmlValue:function(t){return t.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;")},encodeURIComponent:function(t){var e=new RegExp(/^http[s]?:\/\//),i=e.exec(t);return null===i?encodeURIComponent(t).replace(/[!'()*]/g,escape):1===i.length?encodeURI(t).replace(/[!'()*]/g,escape):void 0}};document.observe("dom:loaded",Wysija.init),Wysija.Block=Class.create({initialize:function(t){return info("block -> init"),this.element=$(t),this.elementType=this.element.readAttribute("wysija_type"),this.block=new(Wysija[this.elementType.capitalize().camelize()])(this.element),1===parseInt(this.element.readAttribute("wysija_new"))&&(this.block.draw(),this.element.writeAttribute("wysija_new",0)),this.block.makeBlockDroppable(),void 0!==this.block.setup&&this.block.setup(),this},getCustomData:function(t){return void 0!==this.element.down(".wysija_options."+t)?(info("got options for "+t),this.element.down(".wysija_options."+t).innerHTML.toQueryParams("&amp;")):(info("no options to get for "+t),null)},getOptions:function(){return this.options},setOptions:function(t){return void 0===t&&(t={}),void 0===this.options&&(this.options=new Hash),this.options=this.options.update(t),this},setPosition:function(t){this.element.writeAttribute("wysija_position",t)},hideControls:function(){this.getControls&&(this.element.removeClassName("hover"),this.getControls().hide())},showControls:function(){this.getControls&&(this.element.addClassName("hover"),this.getControls().show())},makeBlockDroppable:function(){if(this.isBlockDroppableEnabled()===!1){var t=this.getBlockDroppable();Droppables.add(t.identify(),Wysija.blockDropOptions),t.addClassName("enabled")}},removeBlockDroppable:function(){if(this.isBlockDroppableEnabled()){var t=this.getBlockDroppable();Droppables.remove(t.identify()),t.removeClassName("enabled"),t.remove()}},isBlockDroppableEnabled:function(){return this.element.hasClassName("static")?!0:this.getBlockDroppable().hasClassName("enabled")},createBlockDroppable:function(){return this.element.insert({before:'<div class="block_placeholder" data-parent="'+this.element.identify()+'">'+Wysija_i18n.drop_block_here+"</div>"})},getBlockDroppable:function(){var t=this.element.identify();return 0===$$('.block_placeholder[data-parent="'+t+'"]').length&&this.createBlockDroppable(),$$('.block_placeholder[data-parent="'+t+'"]').first()},getControls:function(){return this.element.down(".wysija_controls")},setupControls:function(){if(this.controls=this.getControls(),this.controls){this.element.observe("mouseover",function(){Wysija.locks.dragging!==!0&&Wysija.locks.selectingColor!==!0&&Wysija.locks.showingTools!==!0&&(this.element.addClassName("hover"),this.showControls())}.bind(this)),this.element.observe("mouseout",function(){Wysija.locks.dragging!==!0&&Wysija.locks.selectingColor!==!0&&this.hideControls()}.bind(this)),this.removeButton=this.controls.down(".remove"),this.removeButton.observe("click",function(){this.removeBlock(),this.removeButton.stopObserving("click")}.bind(this)),this.bgColorButton=this.controls.down(".bgcolor");var t=this;jQuery(this.bgColorButton).modcoder_excolor({default_color:t.element.readAttribute("wysija_bg_color"),hue_bar:1,border_color:"#969696",anim_speed:"fast",round_corners:!1,shadow_size:2,shadow_color:"#f0f0f0",background_color:"#ececec",backlight:!1,label_color:"#333333",effect:"fade",show_input:!1,z_index:2e4,callback_on_init:function(){Wysija.locks.selectingColor=!0},callback_on_select:function(e){t.setBackgroundColor(e)},callback_on_ok:function(e,i){i===!0&&t.setBackgroundColor(e),Wysija.locks.selectingColor=!1,t.hideControls()}})}return this},setBackgroundColor:function(t){void 0!==t&&this.element.writeAttribute("wysija_bg_color",t);var e=this.element.readAttribute("wysija_bg_color");""===e?this.element.setStyle({backgroundColor:"transparent"}):null!==e&&this.element.setStyle({backgroundColor:"#"+e}),Wysija.autoSave()},replaceBlock:function(t){return this.removeBlockDroppable(),this.element.replace(t)},removeBlock:function(t){info("block -> removeBlock"),this.removeBlockDroppable(),Effect.Fade(this.element.identify(),{duration:.2,afterFinish:function(){void 0!==this.element.next(".wysija_block")&&t!==!1&&Wysija.get(this.element.next(".wysija_block")).block.showControls(),this.element.remove(),Wysija.setBlockPositions(),void 0!==t&&"function"==typeof t&&t(),delete Wysija.instances[this.element.identify()]}.bind(this)})}}),document.observe("item:drop",function(t){Wysija.Block.create(t.memo,t.target),Wysija.hideBlockControls(),Wysija.setImagesDisplay()}),Wysija.Block.create=function(t,e){var i='<li class="handle_container"><a class="handle" href="javascript:;"><span></span></a></li><li><a class="bgcolor" href="javascript:;"><span></span></a></li><li><a class="remove" href="javascript:;"><span></span></a></li>';"image"===t.elementType&&(t.elementOptions='<span class="wysija_options image">#{options}</span>'.interpolate({options:Object.toQueryString(t)}),t.elementType="content",t.blockAlignment=Wysija.defaults.imageAlignment),"text"===t.elementType&&(t.elementOptions='<span class="wysija_options text">#{options}</span>'.interpolate({options:Object.toQueryString(t)}),t.elementType="content",t.blockAlignment=Wysija.defaults.contentAlignment),"divider"===t.elementType&&(t.elementOptions='<span class="wysija_options divider">#{options}</span>'.interpolate({options:Object.toQueryString(t)}));var s,n=$(Wysija.options.body),o=new Template('<div class="wysija_block" wysija_type="#{elementType}" wysija_new="1"><ul class="wysija_controls">'+i+'</ul>#{elementOptions}<div class="wysija_#{elementType} #{blockAlignment}" wysija_align="#{blockAlignment}"></div></div>');"block_placeholder"===e.identify()?(n.insert(o.evaluate(t)),s=n.childElements().last()):(e.insert({before:o.evaluate(t)}),s=e.previous(".wysija_block")),Wysija.makeSortable(),Wysija.setBlockPositions();var a=Wysija.get(s);"object"==typeof t.elementData&&a.block.image.setData(t.elementData),a.element.fire("block:insert"),void 0!==a.block.contents&&a.block.contents.isEmpty()===!1&&a.block.contents.setFocus()},Wysija.Header=Class.create({initialize:function(t){return this.element=$(t),this.block=new Wysija.Banner(this.element),this.block.setup(),this}}),Wysija.Footer=Class.create({initialize:function(t){return this.element=$(t),this.block=new Wysija.Banner(this.element),this.block.setup(),this}}),Wysija.Banner=Class.create(Wysija.Block,{image:null,constraints:{left:{minHeight:20,minWidth:20,maxWidth:600},right:{minHeight:20,minWidth:20,maxWidth:600},center:{minHeight:20,minWidth:20,maxWidth:600},full:{minHeight:20,minWidth:20,maxWidth:600}},initialize:function(t){return this.element=$(t),this.elementArea=this.element.readAttribute("wysija_type"),this.getImageContainer()&&(this.image=new Wysija.BannerImage(this.getImageContainer(),this.elementArea)),this},save:function(){var t={};return t.text=null,null!==this.image&&(t.image=this.image.save(),t.alignment=this.image.isEmpty()===!1?t.image.alignment:"center",t["static"]=this.element.hasClassName("static")),t},draw:function(){return null===this.image&&(this.element.childElements().last().insert(this.drawContainer("image")),this.image=new Wysija.BannerImage(this.getImageContainer(),this.elementArea),this.image.setOptions(this.getCustomData("image")),this.getImageContainer().insert(this.image.draw())),this},drawContainer:function(t){return'<div class="wysija_'+t+'"></div>'},getImageContainer:function(){return this.element.down(".wysija_image")},getContainer:function(){return this.element.down(".wysija_content")},minWidth:function(){return this.constraints[this.alignment].minWidth},maxWidth:function(){return this.constraints[this.alignment].maxWidth},fullWidth:function(){return this.constraints.full.maxWidth},setup:function(){null!==this.image&&this.image.setup(),this.constrainSize()},getControls:function(){return this.element.down(".wysija_controls")},remove:function(){this.image.isEmpty()&&($("wysija_"+this.elementArea).innerHTML=$("wysija_default_"+this.elementArea).innerHTML,Wysija.init())},setBlockAlignment:function(t){return info("content -> set block alignment"),this.getContainer().removeClassName("left").removeClassName("center").removeClassName("right"),this.getContainer().writeAttribute("wysija_align",t),this.getContainer().addClassName(t),null!==this.image&&(this.image.setAlignment(t),this.image.setInformation()),this.constrainSize(),Wysija.autoSave(),this},constrainSize:function(){info("banner -> constrain size"),this.image.ratio=this.image.getRatio();var t=this.image.minSize(),e=this.image.maxSize(),i=this.image.getImageElement();i.width>e.width||i.height>e.height?(this.image.getImageContainer().writeAttribute("style",""),i.writeAttribute({width:e.width,height:e.height})):(i.width<t.width||i.height<t.height)&&(this.image.getImageContainer().writeAttribute("style",""),i.writeAttribute({width:t.width,height:t.height})),this.image.getImageContainer().setStyle("center"===this.image.alignment?{width:i.readAttribute("width")+"px"}:{width:"auto"}),this.image.isEmpty()===!1&&this.image.setInformation()},getBlock:function(){return this.element.up(".wysija_"+this.elementArea)}}),Wysija.Gallery=Class.create(Wysija.Block,{items:$H(),constraints:{left:{minWidth:20,maxWidth:562},right:{minWidth:20,maxWidth:562},center:{minWidth:20,maxWidth:562}},initialize:function(t){info("gallery -> init"),this.element=$(t),this.alignment=this.getDefaultAlignment();for(var e=this.getCells(),i=this.element.identify(),s=[],n=0;n<e.length;n++)s[n]=new Wysija.GalleryImage(e[n]);return this.items.set(i,s),this},getDefaultAlignment:function(){return this.getGalleryElement().readAttribute("wysija_align")||Wysija.defaults.galleryAlignment},draw:function(){info("gallery -> draw")},setup:function(){info("gallery -> setup"),this.createResizeControls(),this.setupResizeControls(),this.setupControls(),this.setupTools(),this.setBlockAlignment(this.getDefaultAlignment()),this.items.get(this.element.id).each(function(t){t.setup()},this)},save:function(){info("gallery -> save");var t={};return t.width=this.getGalleryElement().getWidth(),t.alignment=this.alignment,t.items=[],this.items.get(this.element.id).each(function(e){t.items.push(e.save())},this),t},setupTools:function(){this.tools=this.getTools(),this.tools&&(this.getGalleryElement().observe("mouseover",function(){Wysija.locks.dragging!==!0&&Wysija.locks.selectingColor!==!0&&Wysija.locks.showingTools!==!0&&(this.showTools(),this.getResizeControls().show())}.bind(this)),this.getGalleryElement().observe("mouseout",function(){Wysija.locks.dragging!==!0&&Wysija.locks.selectingColor!==!0&&(this.hideTools(),void 0!==this.getResizeControls()&&this.getResizeControls().hide())}.bind(this)),this.leftButton=this.tools.down(".alignment-left"),this.leftButton.observe("click",function(){this.setBlockAlignment("left")}.bind(this)),this.centerButton=this.tools.down(".alignment-center"),this.centerButton.observe("click",function(){this.setBlockAlignment("center")}.bind(this)),this.rightButton=this.tools.down(".alignment-right"),this.rightButton.observe("click",function(){this.setBlockAlignment("right")}.bind(this)),this.removeButton=this.tools.down(".remove"),this.removeButton.observe("click",function(){this.remove(),this.removeButton.stopObserving("click")}.bind(this)))},remove:function(){this.items.unset(this.element.id),this.removeBlock()},getTools:function(){return this.getGalleryElement().down(".wysija_tools")},hideTools:function(){void 0!==this.getTools()&&this.getTools().hide(),Wysija.locks.showingTools=!1,void 0!==this.information&&this.information.hide()},showTools:function(){void 0!==this.getTools()&&this.getTools().show(),Wysija.locks.showingTools=!0,void 0!==this.information&&this.information.show()},setBlockAlignment:function(t){return info("gallery -> setBlockAlignment"),this.getGalleryElement().removeClassName("left").removeClassName("center").removeClassName("right"),this.getGalleryElement().writeAttribute("wysija_align",t),this.getGalleryElement().addClassName(t),this.alignment=t,this.leftButton.removeClassName("active"),this.centerButton.removeClassName("active"),this.rightButton.removeClassName("active"),this[t+"Button"].addClassName("active"),this.constrainSize(),Wysija.autoSave(),this},constrainSize:function(){info("gallery -> constrainSize");var t=this.getGalleryElement().getDimensions(),e=this.getCells(0).length,i=t.width-this.minWidth();this.getCells().each(function(t){t.setStyle({width:t.down("img").getWidth()+Math.floor(i/e)+"px"})})},getCells:function(t){return t=0|t,this.getGalleryElement().select(".wysija_row")[t].select(".wysija_cell")},minWidth:function(){return info("gallery -> minWidth"),this.getCells(0).inject(0,function(t,e){return t+e.down("img").getWidth()})},maxWidth:function(){return this.constraints[this.alignment].maxWidth},maxHeight:function(){return this.getCells(0).first().getHeight()},setupResizeControls:function(){return this.handle=this.getResizeControls().down(".resize-handle"),this.information=this.getResizeControls().down(".resize-info"),this.handleSize=this.handle.getDimensions(),this.draggable=new Draggable(this.handle,{onStart:this.dragStart.bind(this),snap:this.dragSnap.bind(this),change:this.dragChange.bind(this),onEnd:this.dragEnd.bind(this),starteffect:Prototype.emptyFunction,endeffect:Prototype.emptyFunction}),this},dragStart:function(){Wysija.hideEditors(),this.dragging=!0,Wysija.locks.dragging=!0,$$("body")[0].setStyle({cursor:this.handle.getStyle("cursor")}),"right"===this.alignment&&this.getGalleryElement().insert(this.handle)},dragSnap:function(t,e){var i=this.minWidth(),s=this.maxWidth();if("right"===this.alignment){var n=this.getGalleryElement().getWidth(),o=n-t;o>s&&(t=n-s,o=s),i>o&&(t=n-i,o=i),e=Math.floor(this.maxHeight()-this.handleSize.height+this.borderWidth())}else{var o=t+this.handleSize.width;o>s&&(t=s-this.handleSize.width,o=s),i>o&&(t=i-this.handleSize.width,o=i),e=Math.floor(this.maxHeight()-this.handleSize.height+this.borderWidth())}return[t,e]},dragChange:function(){if("right"===this.alignment){var t=this.handle.positionedOffset(),e=this.getGalleryElement().getDimensions();t.left=e.width-t.left+this.borderWidth(),t.top+=this.handleSize.height+this.borderWidth(),this.getResizeControls().setStyle({left:e.width-t.left+this.borderWidth()+"px",width:t.left-2*this.borderWidth()+"px",height:t.top-2*this.borderWidth()+"px"})}else if("left"===this.alignment){var t=this.handle.positionedOffset();t.left+=this.handleSize.width,t.top+=this.handleSize.height,this.getResizeControls().setStyle({width:t.left-this.borderWidth()+"px",height:t.top-this.borderWidth()+"px"})}else if("center"===this.alignment){var t=this.handle.positionedOffset(),e=this.getGalleryElement().getDimensions();t.left+=this.handleSize.width,t.top+=this.handleSize.height,this.getResizeControls().setStyle({left:(e.width-t.left+this.borderWidth())/2+"px",width:t.left-this.borderWidth()+"px",height:t.top-this.borderWidth()+"px"})}},dragEnd:function(){this.dragging=!1,Wysija.locks.dragging=!1,$$("body")[0].setStyle({cursor:""});var t=this.minWidth(),e=this.getResizeControls().getWidth();t>e&&(e=t),this.setDimensions(e),this.handle.writeAttribute("style",""),"right"===this.alignment?(this.getResizeControls().insert(this.handle),this.getResizeControls().writeAttribute("style","")):"center"===this.alignment&&this.getResizeControls().writeAttribute("style",""),Wysija.hideTools(),this.getGalleryElement().fire("drag:end")},setDimensions:function(t){var t=void 0===t?this.maxWidth():t,e=this.maxHeight();
2
- this.getGalleryElement().setStyle({width:t+"px",height:e+"px"}),this.getResizeControls().setStyle({width:t+"px",height:e+"px"}),this.getResizeControls().writeAttribute("style","")},borderWidth:function(){return 2},createResizeControls:function(){void 0===this.getResizeControls()&&this.getGalleryElement().insert('<div class="resize-controls"><span class="resize-handle"></span><span class="resize-info"></span></div>')},getResizeControls:function(){return this.getGalleryElement().down(".resize-controls")},getGalleryElement:function(){return this.element.down(".wysija_gallery")}}),Wysija.Content=Class.create(Wysija.Block,{contents:null,image:null,constraints:{left:{minHeight:20,minWidth:32,maxWidth:325},right:{minHeight:20,minWidth:32,maxWidth:325},center:{minHeight:20,minWidth:32,maxWidth:562},full:{minHeight:20,minWidth:32,maxWidth:562}},initialize:function(t){return this.element=$(t),this.getTextContainer()&&(this.contents=new Wysija.Text(this.getTextContainer())),this.getImageContainer()&&(this.image=new Wysija.Image(this.getImageContainer())),this},save:function(){var t={};return null!==this.contents&&(t.text=this.contents.save()),null!==this.image&&(t.image=this.image.save(),t.alignment=this.image.isEmpty()===!1?t.image.alignment:"center",t["static"]=this.element.hasClassName("static")),t},draw:function(){return null===this.image&&(this.element.childElements().last().insert(this.drawContainer("image")),this.image=new Wysija.Image(this.getImageContainer()),this.image.setOptions(this.getCustomData("image")),this.getImageContainer().insert(this.image.draw())),null===this.contents&&(this.element.childElements().last().insert(this.drawContainer("text")),this.contents=new Wysija.Text(this.getTextContainer()),this.contents.setOptions(this.getCustomData("text")),this.getTextContainer().insert(this.contents.draw())),this},drawContainer:function(t){return'<div class="wysija_'+t+'"></div>'},getImageContainer:function(){return this.element.down(".wysija_image")},getTextContainer:function(){return this.element.down(".wysija_text")},getContainer:function(){return this.element.down(".wysija_content")},minWidth:function(){return this.constraints[this.alignment].minWidth},maxWidth:function(){return this.isAlone()?this.constraints.full.maxWidth:this.constraints[this.alignment].maxWidth},fullWidth:function(){return this.constraints.full.maxWidth},setup:function(){info("content -> setup"),this.setupControls(),null!==this.contents&&this.contents.setup(),null!==this.image&&this.image.setup(),this.constrainSize()},getControls:function(){return this.element.down(".wysija_controls")},remove:function(){this.image.isEmpty()&&this.contents.isEmpty()&&this.removeBlock()},setBlockAlignment:function(t){return info("content -> set block alignment"),this.getContainer().removeClassName("left").removeClassName("center").removeClassName("right"),this.getContainer().writeAttribute("wysija_align",t),this.getContainer().addClassName(t),this.alignment=t,null!==this.image&&(this.image.setAlignment(t),this.image.setInformation()),null!==this.contents&&this.contents.setAlignment(t),this.constrainSize(),Wysija.autoSave(),this},constrainSize:function(){info("content -> constrain size"),this.image.ratio=this.image.getRatio();var t=this.image.minSize(),e=this.image.maxSize(),i=this.image.getImageElement();if(this.image.getImageContainer().writeAttribute("style",""),i.width>e.width||i.height>e.height?i.writeAttribute({width:e.width,height:e.height}):(i.width<t.width||i.height<t.height)&&i.writeAttribute({width:t.width,height:t.height}),this.image.isEmpty()===!1&&this.image.getImageContainer().setStyle({width:i.readAttribute("width")+"px",height:null}),this.image.isEmpty()||this.contents.isEmpty()){if(this.contents.isEmpty()){this.contents.getTextContainer().writeAttribute("style","");var s=this.image.getImageElement().getDimensions(),n=this.constraints[this.contents.alignment].maxWidth;if("center"!==this.contents.alignment&&s.width>n)this.contents.getTextPlaceholder().setStyle({width:s.width-2+"px","float":this.contents.alignment,lineHeight:null});else switch(this.contents.alignment){case"left":case"right":this.contents.getTextPlaceholder().setStyle({width:this.contents.fullWidth()-s.width-15-2+"px",height:s.height-2+"px",lineHeight:s.height-2+"px","float":"left"===this.contents.alignment?"right":"none"});break;case"center":this.contents.getTextPlaceholder().setStyle({width:this.contents.fullWidth()-2+"px",height:null,lineHeight:null})}}else this.image.isEmpty()&&(this.contents.getTextContainer().setStyle({width:this.contents.fullWidth()-2+"px",height:"auto","float":"none"}),this.image.getImageContainer().setStyle({width:"auto"}),"center"===this.contents.alignment&&i.writeAttribute("width",e.width));this.contents.getTools()&&this.contents.getTools().setStyle({right:0})}else if(this.contents.isEditing()){switch(this.contents.getTextContainer().setStyle({width:"auto","float":"none"}),this.contents.getTools()&&this.contents.getTools().setStyle({right:0}),this.contents.alignment){case"left":var o=parseInt(this.image.getImageElement().readAttribute("width"));this.contents.getTextContainer().setStyle({width:this.contents.fullWidth()-o-15-2+"px","float":"right"});break;case"right":var o=parseInt(this.image.getImageElement().readAttribute("width"));this.contents.getTextContainer().setStyle({width:this.contents.fullWidth()-o-15-2+"px"});break;case"center":this.contents.getTextContainer().setStyle({width:this.contents.fullWidth()-2+"px"})}this.contents.getTextContainer().setStyle({height:"auto"})}else{if(this.contents.getTextContainer().setStyle({width:this.contents.fullWidth()+"px","float":"none"}),this.contents.getTools()&&this.contents.getTools().setStyle({right:0}),"right"===this.contents.alignment&&this.contents.getTools()&&Prototype.Browser.ie7===!1){var o=parseInt(this.image.getImageElement().readAttribute("width"));this.contents.getTools().setStyle({right:o+15+2+"px"})}if(this.contents.isEmpty()===!1){var a=this.contents.getTextArea().getHeight(),r=parseInt(this.image.getImageElement().readAttribute("height"));this.contents.getTextContainer().setStyle("right"===this.contents.alignment||"left"===this.contents.alignment?r>a?{height:r+"px"}:{height:"auto"}:20>a?{height:"20px"}:{height:"auto"})}}this.image.isEmpty()===!1&&this.image.setInformation()},getBlock:function(){return this.element.up(".wysija_block")}});var WysijaImageAbstract={initialize:function(t,e){return info("image abstract -> init"),this.element=$(t),this.elementArea=void 0===e?"block":e,this.alignment=this.getDefaultAlignment(),this.params=new Hash,this},save:function(){return this.isEmpty()?null:{src:this.getImageElement().readAttribute("src"),width:parseInt(this.getImageElement().readAttribute("width")),height:parseInt(this.getImageElement().readAttribute("height")),url:this.params.get("url"),alt:this.params.get("alt"),alignment:this.alignment,"static":this.getImageElement().hasClassName("static")}},draw:function(){return this.customDraw()+this.customTools()},customDraw:function(){void 0===this.getOptions().get("elementSrc")&&this.setOptions({elementSrc:$("wysija_widgets_settings").down(".image").innerHTML,elementRatio:1,elementClass:"empty",elementWidth:106,elementHeight:80});var t=this.getOptions();return this.setRatio(t.get("elementRatio")||1),void 0!==this.getImageElement()&&t.set("elementId",this.getImageElement().identify()),'<img class="image_placeholder #{elementClass}" id="#{elementId}" src="#{elementSrc}" wysija_src="#{elementSrc}" height="#{elementHeight}" wysija_height="#{elementHeight}" width="#{elementWidth}" wysija_width="#{elementWidth}" alt="" />'.interpolate(t)},customTools:function(){return"empty"===this.getOptions().get("elementClass")?"":'<ul class="wysija_tools"><li><a href="javascript:;" title="'+Wysija_i18n.alignmentLeft+'" class="alignment-left"><span></span></a></li><li><a href="javascript:;" title="'+Wysija_i18n.alignmentCenter+'" class="alignment-center"><span></span></a></li><li><a href="javascript:;" title="'+Wysija_i18n.alignmentRight+'" class="alignment-right"><span></span></a></li><li><a href="javascript:;" title="'+Wysija_i18n.addImageLink+'" class="add-link"><span></span></a></li><li><a href="javascript:;" title="'+Wysija_i18n.removeImageLink+'" class="remove-link"><span></span></a></li><li><a href="javascript:;" title="'+Wysija_i18n.removeImage+'" class="remove"><span></span></a></li></ul>'},setupTools:function(){this.tools=this.getTools(),this.tools&&(this.element.observe("mouseover",function(){this.isEmpty()!==!0&&Wysija.locks.dragging!==!0&&Wysija.locks.selectingColor!==!0&&Wysija.locks.showingTools!==!0&&(this.showTools(),this.getResizeControls().show())}.bind(this)),this.element.observe("mouseout",function(){Wysija.locks.dragging!==!0&&Wysija.locks.selectingColor!==!0&&(this.hideTools(),void 0!==this.getResizeControls()&&this.getResizeControls().hide())}.bind(this)),this.leftButton=this.tools.down(".alignment-left"),this.leftButton.observe("click",function(){this.setBlockAlignment("left")}.bind(this)),this.centerButton=this.tools.down(".alignment-center"),this.centerButton.observe("click",function(){this.setBlockAlignment("center")}.bind(this)),this.rightButton=this.tools.down(".alignment-right"),this.rightButton.observe("click",function(){this.setBlockAlignment("right")}.bind(this)),this.addLinkButton=this.tools.down(".add-link"),this.addLinkButton.observe("click",function(){this.addLink()}.bind(this)),this.removeLinkButton=this.tools.down(".remove-link"),this.removeLinkButton.observe("click",function(){this.removeLink()}.bind(this)),this.removeButton=this.tools.down(".remove"),this.removeButton.observe("click",function(){this.removeImage(),this.removeButton.stopObserving("click")}.bind(this)))},getTools:function(){return this.element.down(".wysija_tools")},hideTools:function(){void 0!==this.getTools()&&this.getTools().hide(),Wysija.locks.showingTools=!1,void 0!==this.information&&this.information.hide()},showTools:function(){void 0!==this.getTools()&&this.getTools().show(),Wysija.locks.showingTools=!0,void 0!==this.information&&this.information.show()},addLink:function(){var t=wysijaAJAX.adminurl+"?page=wysija_campaigns&action=image_data";void 0!==this.params.get("url")&&null!==this.params.get("url")&&(t+="&url="+Wysija.encodeURIComponent(this.params.get("url"))),void 0!==this.params.get("alt")&&(t+="&alt="+Wysija.encodeURIComponent(this.params.get("alt"))),WysijaPopup.open(Wysija_i18n.addLinkTitle,t,this.setData.bind(this))},setData:function(t){"undefined"!=typeof t.url&&this.params.set("url",t.url),"undefined"!=typeof t.alt&&this.params.set("alt",t.alt),void 0!==this.params.get("url")&&null!==this.params.get("url")?this.showLink():this.hideLink(),Wysija.autoSave(),Wysija.init()},getData:function(){return{url:this.params.get("url"),alt:this.params.get("alt")}},removeLink:function(){this.params.set("url",null),this.hideLink()},showLink:function(){this.addLinkButton.writeAttribute("title",decodeURIComponent(this.params.get("url"))),this.addLinkButton.addClassName("active")},hideLink:function(){this.addLinkButton.writeAttribute("title",Wysija_i18n.addImageLink),this.addLinkButton.removeClassName("active")},setBlockAlignment:function(t){info("image -> set block alignment to : "+t);var e=Wysija.get(this.getBlock());e.block.setBlockAlignment(t)},removeImage:function(){info("image -> remove"),this.params=new Hash,this.element.fire("image:remove")},makeDroppable:function(){info("image -> make droppable"),Droppables.add(this.getImageElement().identify(),Wysija.imageDropOptions)},removeDroppable:function(){info("image -> remove droppable"),Droppables.remove(this.getImageElement().identify())},setup:function(){return info("image -> setup"),this.createControls(),this.setupControls(),this.setupTools(),this.makeDroppable(),this.getParameters(),this[this.alignment+"Button"]&&this[this.alignment+"Button"].addClassName("active"),this},getParameters:function(){info("image -> get parameters");var t=this.element.down(".wysija_params");if(void 0!==t&&0===this.params.keys().length){var e=$F(t.down('input[name="url"]'));""!==e&&(this.params.set("url",e),this.showLink());var i=$F(t.down('input[name="alt"]'));""!==i&&this.params.set("alt",i)}return this},createControls:function(){this.getImageElement().hasClassName("empty")||this.getImageElement().hasClassName("static")||void 0!==this.getResizeControls()||this.element.insert('<div class="resize-controls"><span class="resize-handle"></span><span class="resize-info"></span></div>')},setupControls:function(){return this.getImageElement().hasClassName("empty")||this.getImageElement().hasClassName("static")?void 0:(this.ratio=this.getRatio(),this.controls=this.getControls(),this.handle=this.controls.down(".resize-handle"),this.information=this.controls.down(".resize-info"),this.handleSize=this.handle.getDimensions(),this.draggable=new Draggable(this.handle,{onStart:this.dragStart.bind(this),snap:this.dragSnap.bind(this),change:this.dragChange.bind(this),onEnd:this.dragEnd.bind(this),starteffect:Prototype.emptyFunction,endeffect:Prototype.emptyFunction}),this)},getImageContainer:function(){return this.element},getImageElement:function(){return this.element.down("img")},getResizeControls:function(){return this.element.down(".resize-controls")},minSize:function(){var t=this.minWidth();return{width:t,height:Math.floor(t/this.ratio)}},maxSize:function(){var t=this.maxWidth();return{width:t,height:Math.floor(t/this.ratio)}},getRatio:function(){return this.getImageContainer().readAttribute("wysija_ratio")||(this.getImageElement().width/this.getImageElement().height*1e3).round()/1e3},setRatio:function(t){return this.element.writeAttribute("wysija_ratio",t),this},isEmpty:function(){return this.getImageElement().hasClassName("empty")},setEmpty:function(t){this.getImageContainer()[t?"addClassName":"removeClassName"]("empty")},isAlone:function(){return this.getImageContainer().hasClassName("alone")},setAlone:function(t){this.getImageContainer()[t?"addClassName":"removeClassName"]("alone")},setAlignment:function(t){return this.isEmpty()?void 0:(info("image -> setAlignment = "+t),this.alignment=t,this.leftButton.removeClassName("active"),this.centerButton.removeClassName("active"),this.rightButton.removeClassName("active"),this.getResizeControls().writeAttribute("style",""),this[t+"Button"].addClassName("active"),this)},getDefaultAlignment:function(){return this.element.up(".wysija_content").readAttribute("wysija_align")||Wysija.defaults.imageAlignment},dragStart:function(){Wysija.hideEditors(),this.dragging=!0,Wysija.locks.dragging=!0,$$("body")[0].setStyle({cursor:this.handle.getStyle("cursor")}),this.imageDimensions=this.getImageElement().getDimensions(),this.controls.setStyle({width:this.imageDimensions.width+"px",height:this.imageDimensions.height+"px"});var t=Wysija.get(this.element.up(".wysija_block")||this.element.up(".wysija_header")||this.element.up(".wysija_footer"));t.block.element.addClassName("dragging"),"right"===this.alignment&&this.element.insert(this.handle)},dragSnap:function(t,e){var i=this.constraints[this.alignment].minWidth,s=this.constraints[this.alignment].maxWidth,n=this.constraints[this.alignment].minHeight;if(this.isAlone()&&(s=this.constraints.full.maxWidth),"right"===this.alignment){var o=this.imageDimensions.width,a=o-t;a>s&&(t=o-s,a=s),i>a&&(t=o-i,a=i),e=Math.max(n,Math.floor(a/this.ratio)),e===n&&(t=o-Math.floor(n*this.ratio)),e-=this.handleSize.height}else{var a=t+this.handleSize.width;a>s&&(t=s-this.handleSize.width,a=s),i>a&&(t=i-this.handleSize.width,a=i),e=Math.max(n,Math.floor(a/this.ratio)),e===n&&(t=Math.floor(n*this.ratio)-this.handleSize.height),e-=this.handleSize.height}return[t-this.borderWidth(),e-this.borderWidth()]},dragChange:function(){var t=this.handle.positionedOffset();"right"===this.alignment?(t.left=this.imageDimensions.width-t.left,t.top+=this.handleSize.height,this.controls.setStyle({left:Math.floor(this.imageDimensions.width-t.left)+this.borderWidth()+"px",width:t.left-2*this.borderWidth()+"px",height:t.top+"px"}),this.handle.setStyle({left:parseInt(this.handle.getStyle("left"))+this.borderWidth()+"px",top:parseInt(this.handle.getStyle("top"))+this.borderWidth()+"px"})):"left"===this.alignment?(t.left+=this.handleSize.width,t.top+=this.handleSize.height,this.controls.setStyle({width:t.left+"px",height:t.top+"px"})):"center"===this.alignment&&(t.left+=this.handleSize.width+this.borderWidth(),t.top+=this.handleSize.height+this.borderWidth(),this.controls.setStyle({left:Math.floor((this.imageDimensions.width-t.left)/2)+"px",width:t.left-this.borderWidth()+"px",height:t.top-this.borderWidth()+"px"})),this.setInformation(!0)},dragEnd:function(){this.dragging=!1,Wysija.locks.dragging=!1;var t=Wysija.get(this.element.up(".wysija_block")||this.element.up(".wysija_header")||this.element.up(".wysija_footer"));t.block.element.removeClassName("dragging"),void 0!==t.block.contents&&t.block.contents.isEmpty()&&t.block.contents.getTextArea().setStyle({height:""}),$$("body")[0].setStyle({cursor:""});var e=this.constraints[this.alignment].minWidth,i=(this.constraints[this.alignment].minHeight,this.controls.getWidth()),s=this.controls.getHeight();e>i&&(i=e),this.setDimensions(i,s),this.handle.writeAttribute("style",""),"right"===this.alignment?(this.controls.insert(this.handle),this.controls.writeAttribute("style",""),this.element.writeAttribute("style",""),this.element.setStyle({height:s+"px"})):"center"===this.alignment?(this.controls.writeAttribute("style",""),this.element.setStyle({width:i+"px",height:s+"px"})):(this.element.writeAttribute("style",""),this.element.setStyle({height:s+"px"})),Wysija.hideTools(),this.element.fire("drag:end")},setDimensions:function(t,e){var t=void 0===t?this.maxWidth():parseInt(t,10),e=void 0===e?(t/this.ratio*1e3).round()/1e3:parseInt(e,10),i=this.getImageElement();i.writeAttribute("width",t),i.writeAttribute("height",e),this.controls.setStyle({width:t-this.borderWidth()+"px",height:e-this.borderWidth()+"px"})},borderWidth:function(){return 2},getControls:function(){return this.element.down(".resize-controls")},getInformation:function(){return this.controls.down(".resize-info")},setInformation:function(t){if(void 0===t&&(t=!1),this.controls=this.getControls(),void 0!==this.controls&&(this.information=this.getInformation(),void 0!==this.information)){if(t)var e=this.controls.getDimensions();else var e=this.element.getDimensions();void 0!==this.information&&this.information.update("#{width} x #{height}".interpolate(e))}}};Wysija.Image=Class.create(Wysija.Content,WysijaImageAbstract),Wysija.BannerImage=Class.create(Wysija.Banner,WysijaImageAbstract);var WysijaGalleryItemAbstract={initialize:function(t){return info("gallery item -> init"),this.element=$(t),this.params=new Hash,this},save:function(){return this.isEmpty()?null:{src:this.getImageElement().readAttribute("src"),width:parseInt(this.getImageElement().readAttribute("width")),height:parseInt(this.getImageElement().readAttribute("height")),url:this.params.get("url"),alt:this.params.get("alt"),cellWidth:parseInt(this.getImageContainer().getWidth()),cellHeight:parseInt(this.getImageContainer().getHeight())}},draw:function(){return this.customDraw()+this.customTools()},customDraw:function(){void 0===this.getOptions().get("elementSrc")&&this.setOptions({elementSrc:"",elementRatio:1.48,elementClass:"empty",elementHeight:135,elementWidth:200});var t=this.getOptions();return void 0!==this.getImageElement()&&t.set("elementId",this.getImageElement().identify()),'<img class="image_placeholder #{elementClass}" id="#{elementId}" src="#{elementSrc}" height="#{elementHeight}" width="#{elementWidth}" />'.interpolate(t)},customTools:function(){return"empty"===this.getOptions().get("elementClass")?"":'<ul class="wysija_tools"><li><a href="javascript:;" title="'+Wysija_i18n.addImageLink+'" class="add-link"><span></span></a></li><li><a href="javascript:;" title="'+Wysija_i18n.removeImageLink+'" class="remove-link"><span></span></a></li><li><a href="javascript:;" title="'+Wysija_i18n.removeImage+'" class="remove"><span></span></a></li></ul>'},setupTools:function(){this.tools=this.getTools(),this.tools&&(this.addLinkButton=this.tools.down(".add-link"),this.addLinkButton.observe("click",function(){this.addLink()}.bind(this)),this.removeLinkButton=this.tools.down(".remove-link"),this.removeLinkButton.observe("click",function(){this.removeLink()}.bind(this)),this.removeButton=this.tools.down(".remove"),this.removeButton.observe("click",function(){this.remove(),this.removeButton.stopObserving("click")}.bind(this)))},getTools:function(){return this.element.down(".wysija_tools")},hideTools:function(){this.getTools().hide(),Wysija.locks.showingTools=!1},showTools:function(){this.getTools().show(),Wysija.locks.showingTools=!0},remove:function(){info("gallery item -> remove"),this.element.fire("image:remove")},setup:function(){return info("gallery item -> setup"),this.setupControls(),this.setupTools(),this.getParameters(),this},getParameters:function(){info("gallery item -> get parameters");var t=this.element.down(".wysija_params");if(void 0!==t&&0===this.params.keys().length){var e=$F(t.down('input[name="url"]'));""!=e&&this.params.set("url",e);var i=$F(t.down('input[name="alt"]'));""!=i&&this.params.set("alt",i)}return this},getImageContainer:function(){return this.element},getImageElement:function(){return this.element.down("img")},isEmpty:function(){return this.getImageElement().hasClassName("empty")},setEmpty:function(t){this.getImageContainer()[t?"addClassName":"removeClassName"]("empty")},setPosition:function(t){this.element.writeAttribute("wysija_position",t)}};Wysija.GalleryImage=Class.create(Wysija.Gallery,WysijaGalleryItemAbstract);var WysijaTextAbstract={initialize:function(t){return this.element=$(t),this.alignment=this.getDefaultAlignment(),this},save:function(){return this.isEmpty()?null:{value:Base64.encode(this.getTextArea().innerHTML)}},draw:function(){return info("text -> draw"),this.customDraw()+this.customTools()},customDraw:function(){info("text -> custom draw");var t=this.getOptions();return void 0!==this.getTextArea()&&t.set("elementId",this.getTextArea().identify()),void 0===t.get("elementText")?(t.set("placeholderText",Wysija_i18n.drop_block_here),'<div class="text_placeholder empty" id="#{elementId}">#{placeholderText}</div>'.interpolate(this.getOptions())):'<div class="wysija_editable" id="#{elementId}">#{elementText}</div>'.interpolate(this.getOptions())},makeDroppable:function(){this.isDroppable()&&Droppables.add(this.getTextArea().identify(),Wysija.textDropOptions)},removeDroppable:function(){Droppables.remove(this.getTextArea().identify())},hasContent:function(){return void 0!==this.getTextArea()},isDroppable:function(){return this.getTextArea().hasClassName("text_placeholder")},isEmpty:function(){return this.getTextArea().hasClassName("empty")},isEditing:function(){return this.element.hasClassName("wysija_editing")},setup:function(){info("text -> setup"),this.setupEditor(),this.setAlignment(this.getDefaultAlignment()),this.setupTools(),this.makeDroppable()},setAlignment:function(t){return info("text -> setAlignment = "+t),this.alignment=t,this.isEmpty()===!1&&this.disableEditor(),this},getDefaultAlignment:function(){return this.element.up(".wysija_content").readAttribute("wysija_align")||Wysija.defaults.contentAlignment},setBlockAlignment:function(t){info("text -> set block alignment to : "+t);var e=Wysija.get(this.getBlock());e.block.setBlockAlignment(t)},setupEditor:function(){info("text -> setupEditor"),this.getTextContainer().observe("click",this.enableEditor.bind(this))},customTools:function(){return void 0===this.getOptions().get("elementText")?"":'<ul class="wysija_tools"><li><a href="javascript:;" title="'+Wysija_i18n.removeText+'" class="remove"><span></span></a></li></ul>'},setupTools:function(){this.tools=this.getTools(),this.tools&&(this.element.observe("mouseover",function(){this.isEditing()!==!0&&Wysija.locks.dragging!==!0&&Wysija.locks.selectingColor!==!0&&Wysija.locks.showingTools!==!0&&this.showTools()}.bind(this)),this.element.observe("mouseout",function(){Wysija.locks.selectingColor!==!0&&this.hideTools()}.bind(this)),this.removeButton=this.tools.down(".remove"),this.removeButton.observe("click",function(){this.remove(),this.removeButton.stopObserving("click")}.bind(this)))},getTools:function(){return this.element.down(".wysija_tools")},hideTools:function(){void 0!==this.getTools()&&this.getTools().hide()},showTools:function(){void 0!==this.getTools()&&this.getTools().show()},remove:function(){info("text -> remove"),this.element.fire("text:remove")},enableEditor:function(){!this.isEditing()&&this.element.getElementsByClassName("wysija_editable").length&&(info("text -> enableEditor"),Wysija.hideEditors(),this.element.addClassName("wysija_editing"),tinyMCE.execCommand("mceAddControl",!1,this.getTextArea().identify()),this.element.fire("editor:enable"))},disableEditor:function(){this.isEditing()!==!1&&(info("text -> disableEditor"),this.element.removeClassName("wysija_editing"),tinyMCE.execCommand("mceRemoveControl",!1,this.getTextArea().identify()),this.element.fire("editor:disable"))},setFocus:function(){info("text -> setFocus"),this.enableEditor()},getTextContainer:function(){return this.element},getTextArea:function(){return this.element.down(".wysija_editable")||this.getTextPlaceholder()},getTextPlaceholder:function(){return this.element.down(".text_placeholder")},getTextEditor:function(){return tinymce.get(this.getTextArea().identify())},isAlone:function(){return this.getTextContainer().hasClassName("alone")},setAlone:function(t){this.getTextContainer()[t?"addClassName":"removeClassName"]("alone")}};Wysija.Text=Class.create(Wysija.Content,WysijaTextAbstract),Wysija.Divider=Class.create(Wysija.Block,{initialize:function(t){return this.element=$(t),this.setOptions(this.getCustomData("divider")),this},save:function(){return void 0===this.getDivider()?null:{src:this.getDivider().readAttribute("src"),width:parseInt(this.getDivider().readAttribute("width")),height:parseInt(this.getDivider().readAttribute("height"))}},draw:function(){this.element.childElements().last().insert(this.customDraw())},customDraw:function(){return info("divider -> custom draw"),void 0===this.getOptions().get("elementSrc")&&this.setOptions({elementSrc:"",elementHeight:1,elementWidth:564}),'<img class="divider" src="#{elementSrc}" height="#{elementHeight}" width="#{elementWidth}" />'.interpolate(this.getOptions())},customControls:function(){return""},setup:function(){this.setupControls()},getContainer:function(){return this.element.down(".wysija_divider")},getDivider:function(){return this.getContainer().down("img")}}),Wysija.Raw=Class.create(Wysija.Block,{initialize:function(t){return this.element=$(t),this.setOptions({elementRaw:""}),this},save:function(){return void 0===this.getRaw()?null:{raw:Base64.encode(this.getRaw().innerHTML)}},draw:function(){this.element.childElements().last().insert(this.customDraw())},customDraw:function(){info("raw -> custom draw");var t=this.getOptions();return void 0!==this.getRaw()&&t.set("elementId",this.getRaw().identify()),void 0===t.get("elementRaw")?'<div class="raw empty" id="#{elementId}"></div>'.interpolate(this.getOptions()):'<div class="raw" id="#{elementId}">#{elementRaw}</div>'.interpolate(this.getOptions())},customControls:function(){return""},setup:function(){this.setupControls()},getContainer:function(){return this.element.down(".wysija_raw")},getRaw:function(){return this.getContainer().down(".raw")}}),Wysija.Post=Class.create(Wysija.Block,{initialize:function(t){return info("post -> init"),this.element=$(t),this},draw:function(){WysijaPopup.open(Wysija_i18n.articleSelectionTitle,WysijaPopup.formatURI(wysijaAJAX.adminurl,"page=wysija_campaigns&action=articles"),this.success.bind(this),this.cancel.bind(this))},success:function(t){Wysija.get(this.element).block.replaceBlock(Base64.decode(t)),Wysija.init()},cancel:function(){Wysija.get(this.element).block.removeBlock(!1)}}),Wysija.AutoPost=Class.create(Wysija.Block,{initialize:function(t){return info("autopost -> init"),this.element=$(t),this},draw:function(){info("autopost -> draw")},setup:function(){info("autopost -> setup"),this.setupControls()},save:function(){info("autopost -> save");var t={};return this.getParameters(),t.params=this.params,t},getParameters:function(){info("autopost -> get parameters"),this.params=[];var t=this.element.down(".wysija_params");return void 0!==t&&t.select("input").each(function(t){this.params.push($H({key:t.name,value:t.value}))}.bind(this)),this},getControls:function(){return this.element.down(".wysija_controls")},setupControls:function(){return this.controls=this.getControls(),this.controls&&(this.element.observe("mouseover",function(){Wysija.locks.dragging!==!0&&Wysija.locks.selectingColor!==!0&&Wysija.locks.showingTools!==!0&&(this.element.addClassName("hover"),this.showControls(),this.element.down(".wysija_settings").show())}.bind(this)),this.element.observe("mouseout",function(){Wysija.locks.dragging!==!0&&Wysija.locks.selectingColor!==!0&&(this.hideControls(),this.element.down(".wysija_settings").hide())}.bind(this)),this.removeButton=this.controls.down(".remove"),this.removeButton.observe("click",function(){this.remove(),this.removeButton.stopObserving("click")}.bind(this)),this.settingsButton=this.element.down(".settings"),this.settingsButton.observe("click",function(){this.editSettings()}.bind(this))),this},editSettings:function(){this.getParameters();var t=this.formatParameters();WysijaPopup.open(Wysija_i18n.autoPostSettingsTitle,wysijaAJAX.adminurl+"?page=wysija_campaigns&action=autopost&"+t,this.callback.bind(this))},callback:function(t){Wysija.get(this.element).block.replaceBlock(Base64.decode(t)),Wysija.init()},formatParameters:function(){var t=["autopost_count="+$$(".wysija_auto-post").length,"autopost_type="+$("wysija_widgets_settings").down(".autopost").innerHTML];return void 0!==this.params&&this.params.length>0&&(this.params.each(function(e){t.push(e.get("key")+"="+e.get("value"))}),t=t.join("&")),t},loadContent:function(){var t=this.element.previousSiblings();if(t.length>0){var e=[];t.each(function(t){"auto-post"===t.readAttribute("wysija_type")&&void 0!==t.down('input[name="post_ids"]')&&e.push(t.down('input[name="post_ids"]').value)}),e.length>0&&(e=e.join(","))}this.getParameters();var i=this.formatParameters();void 0!==e&&e.length>0&&(i+="&exclude="+e);var s=this;wysijaAJAX.task="load_auto_post",wysijaAJAX.wysijaData=i,new Ajax.Request(wysijaAJAX.ajaxurl,{method:"post",asynchronous:!1,parameters:wysijaAJAX,onSuccess:function(t){s.getAutoPostElement().update(Base64.decode(t.responseJSON.result)),Wysija.setSettingsPosition.delay(1)},onFailure:function(){}})},remove:function(){info("autopost remove"),this.removeBlock(function(){Wysija.initAutoPost(),Wysija.setBackgroundColors()})},getAutoPostElement:function(){return this.element.down(".wysija_auto-post")},getSettings:function(){return this.element.down(".wysija_settings")}}),Wysija.PopupAutoPost=Class.create(Wysija.Block,{initialize:function(t){return this.element=$(t),this},draw:function(){var t=["autopost_count="+parseInt($$(".wysija_auto-post").length+1),"autopost_type="+$("wysija_widgets_settings").down(".autopost").innerHTML].join("&");WysijaPopup.open(Wysija_i18n.autoPostSettingsTitle,wysijaAJAX.adminurl+"?page=wysija_campaigns&action=autopost&"+t,this.success.bind(this),this.cancel.bind(this))},success:function(t){Wysija.get(this.element).block.replaceBlock(Base64.decode(t)),Wysija.init()},cancel:function(){Wysija.get(this.element).block.removeBlock(!1)}}),Wysija.PopupBookmark=Class.create(Wysija.Block,{initialize:function(t){return info("popup bookmark -> init"),this.element=$(t),this},draw:function(){var t="theme="+$("wysija_widgets_settings").down(".theme").innerHTML;WysijaPopup.open(Wysija_i18n.bookmarkSelectionTitle,wysijaAJAX.adminurl+"?page=wysija_campaigns&action=bookmarks&"+t,this.success.bind(this),this.cancel.bind(this))},success:function(t){t&&Wysija.get(this.element).block.replaceBlock(Base64.decode(t)),Wysija.init()},cancel:function(){Wysija.get(this.element).block.removeBlock(!1)}});var WysijaPopup={initialized:!1,opened:!1,locked:!1,title:null,url:null,popupWidth:null,popupHeight:null,onSuccess:null,onCancel:null,setSize:function(t,e){return WysijaPopup.popupWidth=t,WysijaPopup.popupHeight=e,this},formatURI:function(t,e){return-1===t.indexOf("?")?t+"?"+e:t+"&"+e},init:function(){if(WysijaPopup.initialized===!1){info("init popup");var t='<div id="wysija_popup_overlay"></div><div id="wysija_popup"><div id="wysija_popup_title"><h3></h3><a id="wysija_popup_close" href="javascript:;"></a></div><div id="wysija_popup_content" class="clearfix"><iframe id="wysija_popup_iframe" marginheight="0" marginwidth="0" frameborder="0"></iframe></div></div>';
3
- $$("body")[0].insert(t),$("wysija_popup").setStyle({visibility:"hidden"}),WysijaPopup.hideLoading(),WysijaPopup.hideOverlay(),$("wysija_popup_close").observe("click",WysijaPopup.cancel),$("wysija_popup_overlay").observe("click",function(t){"wysija_popup_overlay"===t.target.id&&WysijaPopup.cancel()}),WysijaPopup.initialized=!0,$("wysija_popup_iframe").observe("load",function(){null!==$(this).readAttribute("src")&&setTimeout(function(){WysijaPopup.opened=!0,WysijaPopup.setDimensions(),WysijaPopup.hideLoading(),WysijaPopup.showOverlay(),setTimeout(function(){$("wysija_popup").setStyle({visibility:"visible"})},101)},0)})}},lock:function(){WysijaPopup.locked=!0},unlock:function(){WysijaPopup.locked=!1},isLocked:function(){return WysijaPopup.locked},setPosition:function(){if(WysijaPopup.init(),WysijaPopup.opened!==!1){var t=$("wysija_popup").getDimensions(),e=document.viewport.getDimensions(),i=parseInt(Wysija.scroll.top+e.height/2-t.height/2-15,10),s=parseInt(Wysija.scroll.left+e.width/2-t.width/2,10);i<Wysija.scroll.top&&(i=parseInt(Wysija.scroll.top,10)),s<Wysija.scroll.left&&(s=parseInt(Wysija.scroll.left,10)),$("wysija_popup").setStyle({top:i+"px",left:s+"px"})}},setDimensions:function(){if(WysijaPopup.opened!==!1){var t=$("wysija_popup_iframe");if(null!==t){t.doc=null,t.contentDocument?t.doc=t.contentDocument:t.contentWindow?t.doc=t.contentWindow.document:t.document&&(t.doc=t.document);var e=0,i=0,s=document.viewport.getDimensions();setTimeout(function(){if($("wysija_popup_iframe").writeAttribute("width",null),$("wysija_popup_iframe").writeAttribute("height",null),null===WysijaPopup.popupWidth||null===WysijaPopup.popupHeight){var n=null;n=WysijaPopup.getElementSize(t.doc.querySelectorAll(".popup_content").length>0?t.doc.querySelectorAll(".popup_content")[0]:t.doc.getElementsByClassName(".popup_content")[0]),i=n.width,e=n.height}else i=WysijaPopup.popupWidth,e=WysijaPopup.popupHeight;e+50>s.height&&(e=s.height-50),$("wysija_popup").setStyle({width:i+"px",height:e+20+"px"}),$("wysija_popup_iframe").writeAttribute("width",i),$("wysija_popup_iframe").writeAttribute("height",e+20),WysijaPopup.setPosition()},100)}}},getElementSize:function(t){var e=t.currentStyle||window.getComputedStyle(t),i=t.offsetWidth;i+=parseInt(e.marginLeft),i+=parseInt(e.marginRight);var s=t.offsetHeight;return s+=parseInt(e.marginTop),s+=parseInt(e.marginBottom),{width:i,height:s}},loadContent:function(t,e){$("wysija_popup_iframe").writeAttribute("src",e),$("wysija_popup_title").down("h3").update(t)},showOverlay:function(){$("wysija_popup_overlay").setStyle({visibility:"visible"})},showLoading:function(){$("wysija_popup_overlay").addClassName("loading")},hideOverlay:function(){$("wysija_popup_overlay").setStyle({visibility:"hidden"})},hideLoading:function(){$("wysija_popup_overlay").removeClassName("loading")},open:function(t,e,i,s){WysijaPopup.init(),WysijaPopup.showLoading(),WysijaPopup.showOverlay(),void 0!==i&&(WysijaPopup.onSuccess=i),void 0!==s&&(WysijaPopup.onCancel=s),WysijaPopup.loadContent(t,e)},success:function(t){null!==WysijaPopup.onSuccess&&WysijaPopup.onSuccess(t),WysijaPopup.close()},cancel:function(t){null!==WysijaPopup.onCancel&&WysijaPopup.onCancel(t),WysijaPopup.close()},close:function(){return WysijaPopup.isLocked()===!0?!1:($("wysija_popup").writeAttribute("style",""),$("wysija_popup").setStyle({visibility:"hidden"}),WysijaPopup.hideLoading(),WysijaPopup.hideOverlay(),$("wysija_popup_iframe").writeAttribute("src",null),$("wysija_popup_iframe").writeAttribute("height",null),$("wysija_popup_iframe").writeAttribute("width",null),WysijaPopup.onSuccess=null,WysijaPopup.onCancel=null,WysijaPopup.popupWidth=null,WysijaPopup.popupHeight=null,WysijaPopup.opened=!1,!1)}};Wysija.DraggableItem=Class.create({initialize:function(t){this.elementType=$(t).readAttribute("wysija_type"),this.element=$(t).down()||$(t),this.clone=null,t.hasClassName("wysija_item")===!1&&(this.elementType="block_image")},STYLES:new Template("position: absolute; top: #{top}px; left: #{left}px;"),cloneElement:function(){var t=this.element.clone(),e=this.element.cumulativeOffset();if(this.element.hasClassName("wysija_item")){var i=this.getList(),s=this.STYLES.evaluate({top:e.top-i.scrollTop,left:e.left-i.scrollLeft});t.addClassName("wysija_widget"),t.addClassName(this.elementType)}else{var s=this.STYLES.evaluate({top:e.top,left:e.left,width:this.element.getWidth()+"px",height:this.element.getHeight()+"px"});t.writeAttribute("wysija_height",this.element.readAttribute("wysija_height")),t.writeAttribute("wysija_width",this.element.readAttribute("wysija_width")),t.writeAttribute("wysija_src",this.element.readAttribute("wysija_src")),this.element.hasClassName("image_placeholder")&&t.writeAttribute("wysija_parent",(this.element.up(".wysija_block")||this.element.up(".wysija_header")||this.element.up(".wysija_footer")).identify()),t.addClassName("wysija_widget image")}return t.setStyle(s),"image"===this.elementType||"block_image"===this.elementType?t.writeAttribute({elementRatio:this.calculateRatio(),wysija_type:"image"}):t.innerHTML=this.element.innerHTML,t},getOffset:function(){return this.element.offsetTop-this.getList().scrollTop},getList:function(){return this.element.up("ul")},insert:function(){$$("body")[0].insert(this.clone)},onMousedown:function(t){if("block_image"!==this.elementType||"img"===this.element.tagName.toLowerCase()&&"span"!==t.target.tagName.toLowerCase()){null===this.clone&&(this.clone=this.cloneElement(),this.insert());var e=new Draggable(this.clone,{scroll:window,isImage:!1,onStart:function(t,e){this.isImage=t.element.hasClassName("wysija_widget image"),this.isImage===!0&&t.element.setStyle({left:e.pageX+"px",top:e.pageY+"px"}),Wysija.locks.dragging=!0,Wysija.hideTools(),Wysija.hideBlockControls(),Droppables.togglePlaceholders(t,e)},onDrag:function(t,e){Droppables.togglePlaceholders(t,e)},snap:function(t,e,i){return this.isImage===!0?[t+i.offset[0],e+i.offset[1]]:[t,e]},onEnd:function(t){t.destroy(),t.element.remove(),Wysija.locks.dragging=!1,Droppables.hidePlaceholders()},starteffect:Prototype.emptyFunction,endeffect:Prototype.emptyFunction});return e.initDrag(t),e.startDrag(t),e}},calculateRatio:function(){return(this.element.readAttribute("wysija_width")/this.element.readAttribute("wysija_height")*1e3).round()/1e3}}),Object.extend(Wysija.DraggableItem,Observable).observe('a[class="wysija_item"], .wysija_image'),Wysija.ImagePreview=Class.create({initialize:function(t){this.element=$(t)},onMouseover:function(){if(Wysija.locks.dragging!==!0){var t=this.element.down("img").clone();if(""!==t.readAttribute("wysija_src")){var e=parseInt(t.readAttribute("wysija_height"),10),i=parseInt(t.readAttribute("wysija_width"),10),s=(i/e*1e3).round()/1e3;i>275&&(i=275),e=(i/s).round(),t.writeAttribute("src",t.readAttribute("wysija_src")),$("wj_images_preview").insert(t),$("wj_images_preview").down("img").writeAttribute({width:i,height:e}),$("wj_images_preview").show()}}},onMouseout:function(){$("wj_images_preview").update(""),$("wj_images_preview").hide()}}),Wysija.ThemePreview=Class.create({initialize:function(t){this.element=$(t)},onMouseover:function(){if(Wysija.locks.dragging!==!0){var t=this.element.down("img").clone();if(""!==t.readAttribute("wysija_src")){var e=t.readAttribute("wysija_height"),i=t.readAttribute("wysija_width"),s=(i/e*1e3).round()/1e3;i>275&&(i=275),e=(i/s).round(),t.writeAttribute("src",t.readAttribute("wysija_src")),$("wj_themes_preview").insert(t),$("wj_themes_preview").down("img").writeAttribute("width",i),$("wj_themes_preview").down("img").writeAttribute("height",e),$("wj_themes_preview").show()}}},onMouseout:function(){$("wj_themes_preview").update(""),$("wj_themes_preview").hide()}}),Object.extend(Wysija.ThemePreview,Observable).observe(".wj_themes li a"),Wysija.TextLinks=Class.create({initialize:function(t){this.element=$(t)},onClick:function(t){return t.stop(),!1}}),Object.extend(Wysija.TextLinks,Observable).observe(".wysija_editable a"),window.document.observe("mousedown",function(t){if(tinymce.editors.length>0){if("mceModalBlocker"===t.target.id)return;if(t.target.hasClassName("mceClose"))return;if(t.target.hasClassName("mceMenu")||void 0!==t.target.up(".mceMenu"))return;void 0===t.target.up(".wysija_text")&&void 0===t.target.up(".wysija_editable")&&t.target.hasClassName("mceText")===!1&&(Wysija.hideEditors(),Wysija.autoSave())}}),document.on("image:drop",function(t,e){var i,s=Wysija.get(e.up(".wysija_block")||e.up(".wysija_header")||e.up(".wysija_footer"));i=t.memo.elementData,delete t.memo.elementData,s.block.image.removeDroppable(),s.block.image.setOptions(t.memo),s.block.getImageContainer().writeAttribute("style",""),s.block.getImageContainer().update(s.block.image.draw()),s.block.image.setup(),"object"==typeof i&&s.block.image.setData(i),void 0===s.block.contents?s.block.image.setAlone(!0):(s.block.contents.setAlone(s.block.image.isEmpty()),s.block.image.setAlone(s.block.contents.isEmpty()),s.block.setBlockAlignment(s.block.contents.getDefaultAlignment())),Wysija.hideTools(),s.block.image.setEmpty(!1),s.block.constrainSize(),Wysija.hideTools(),Wysija.autoSave()}),document.on("text:drop",function(t,e){var i=Wysija.get(e.up(".wysija_block"));i.block.contents.removeDroppable(),i.block.contents.setOptions(t.memo),i.block.getTextContainer().update(i.block.contents.draw()),i.block.contents.setup(),i.block.image.isEmpty()===!1?(i.block.image.setAlone(!1),i.block.setBlockAlignment(i.block.image.alignment)):i.block.contents.setAlone(!0),i.block.constrainSize(),i.block.contents.setFocus(),Wysija.hideControls(),Wysija.hideTools(),Wysija.autoSave()}),document.on("image:remove",function(t,e){var i=Wysija.get(e.up(".wysija_block")||e.up(".wysija_header")||e.up(".wysija_footer"));i.block.image.hideTools(),i.block.image.removeDroppable(),i.block.image.setOptions({elementSrc:void 0}),i.block.image.element.update(i.block.image.draw()),i.block.image.makeDroppable(),i.block.image.setEmpty(!0),void 0!==i.block.contents&&i.block.contents.isEmpty()===!1&&i.block.contents.setAlone(!0),i.block.constrainSize(),i.block.remove()}),document.on("text:remove",function(t,e){var i=Wysija.get(e.up(".wysija_block"));i.block.contents.getTextContainer().stopObserving("click"),i.block.contents.removeDroppable(),i.block.contents.setOptions({elementText:void 0}),i.block.contents.element.update(i.block.contents.draw()),i.block.contents.makeDroppable(),i.block.image.isEmpty()===!1&&i.block.image.setAlone(!0),i.block.constrainSize(),i.block.remove()}),document.on("editor:enable",function(t,e){var i=Wysija.get(e.up(".wysija_block"));i.block.constrainSize()}),document.on("editor:disable",function(t,e){var i=Wysija.get(e.up(".wysija_block"));i.block.constrainSize()}),document.on("block:insert",function(t,e){var i=Wysija.get(e);"content"===i.elementType&&(i.block.image.setAlone(i.block.contents.isEmpty()),i.block.contents.setAlone(i.block.image.isEmpty()),i.block.image.setEmpty(i.block.image.isEmpty()),i.block.constrainSize(),Wysija.hideTools())}),document.on("drag:end",function(t,e){var i=Wysija.get(e.up(".wysija_block")||e.up(".wysija_header")||e.up(".wysija_footer"));i.block.constrainSize()}),document.observe("dom:loaded",function(){$("wysija_toggle_images").observe("click",function(){return Wysija.toggleImages()===!0?this.addClassName("on").removeClassName("off"):this.addClassName("off").removeClassName("on"),!1})});
1
+ "use strict";function info(t){if(!1!==Wysija.options.verbose){window.console&&console.log||function(){for(var t=function(){},e=["assert","clear","count","debug","dir","dirxml","error","exception","group","groupCollapsed","groupEnd","info","log","markTimeline","profile","profileEnd","markTimeline","table","time","timeEnd","timeStamp","trace","warn"],i=e.length,s=window.console={};i--;)s[e[i]]=t}();try{console.log("[INFO] "+t)}catch(e){}}}Object.extend(Prototype.Browser,{ie6:!!/MSIE (\d+\.\d+);/.test(navigator.userAgent)&&6===Number(RegExp.$1),ie7:!!/MSIE (\d+\.\d+);/.test(navigator.userAgent)&&7===Number(RegExp.$1),ie8:!!/MSIE (\d+\.\d+);/.test(navigator.userAgent)&&8===Number(RegExp.$1),ie9:!!/MSIE (\d+\.\d+);/.test(navigator.userAgent)&&9===Number(RegExp.$1)}),Event.cacheDelegated={},Object.extend(document,function(){function o(t){return h[t]=h[t]||{}}function a(t,e){var i=o(t);return i[e]=i[e]||[]}function l(t,e,i){return a(t,e).find(function(t){return t.handler===i})}function n(t,e,i){var s=o(t);if(!s[e])return!1;var n=l(t,e,i);return s[e]=s[e].without(n),n}function r(i,t,s,n){var e,o=a(i,t);return!o.pluck("handler").include(s)&&((e=function(t){var e=t.findElement(i);e&&s.call(n||e,t,e)}).handler=s,o.push(e),e)}var h=Event.cacheDelegated;return{delegate:function(t,e,i,s){var n=r.apply(null,arguments);return n&&document.observe(e,n),document},stopDelegating:function(e,i,t){switch(arguments.length){case 2:a(e,i).each(function(t){document.stopDelegating(e,i,t.handler)});break;case 1:Object.keys(o(e)).each(function(t){document.stopDelegating(e,t)});break;case 0:Object.keys(h).each(function(t){document.stopDelegating(t)});break;default:var s=n.apply(null,arguments);s&&document.stopObserving(i,s)}return document}}}());var Observable=function(){function o(t,e){return t=t.substring(2),e&&(t=e+":"+t),t.underscore().split("_").join(":")}function i(i){var s=i.prototype,n=s.namespace;return Object.keys(s).grep(/^on/).inject($H(),function(t,e){return"onDomLoaded"===e||t.set(o(e,n),a(s[e],i)),t})}function a(e,i){return function(t){return e.call(new i(this),t,t.memo)}}function s(t,e){$$(t).each(function(t){new e(t).onDomLoaded()})}return{observe:function(e){if(this.handlers||(this.handlers={}),!this.handlers[e]){var t=this;this.prototype.onDomLoaded&&(document.loaded?s(e,t):document.observe("dom:loaded",s.curry(e,t))),this.handlers[e]=i(t).each(function(t){document.delegate(e,t.key,t.value)})}},stopObserving:function(e){this.handlers&&this.handlers[e]&&(this.handlers[e].each(function(t){document.stopDelegating(e,t.key,t.value)}),delete this.handlers[e])}}}();Object.extend(Droppables,{deactivate:Droppables.deactivate.wrap(function(t,e,i){return e.onLeave&&e.onLeave(i,e.element),t(e)}),activate:Droppables.activate.wrap(function(t,e,i){return e.onEnter&&e.onEnter(i,e.element),t(e)}),togglePlaceholders:function(h,c){if(0!==this.drops.length&&!(0<$$(".block_placeholder.hover, .text_placeholder.hover, .image_placeholder.hover").length)){var d=document.viewport.getDimensions(),u=document.viewport.getScrollOffsets();this.drops.each(function(t){if(t.overlap===undefined){var e=!1,i=t.element.cumulativeOffset(),s=Math.max(30,t.element.getHeight()),n=h.element.hasClassName("image"),o=h.element.hasClassName("text");if(i.top>u.top+d.height)return;if(i.top<u.top&&i.top+s<u.top)return;if(!1===n&&-1!==t.accept.indexOf("image"))return;if(!1===o&&-1!==t.accept.indexOf("text"))return;if(!0===n){if(-1!==t.accept.indexOf("text"))return;if(h.element.readAttribute("wysija_src")===t.element.readAttribute("wysija_src"))return}var a=i.top-2*Wysija.options.blockDropTreshold,l=i.top+s+Wysija.options.blockDropTreshold;a<c.pageY&&c.pageY<l&&(e=!0);var r=t.element.up();!0===e?(r&&r.addClassName("active"),t.element.addClassName("active")):(r&&r.removeClassName("active"),t.element.removeClassName("active"))}})}},hidePlaceholders:function(){0!==this.drops.length&&$$(".block_placeholder.active, .text_placeholder.active, .image_placeholder.active, .wysija_image.active").invoke("removeClassName","active")}});var Wysija={version:"2.3",options:{debug:!1,verbose:!1,css:"wj_css",toolbar:"wysija_toolbar",notices:"wysija_notices",wrapper:"wysija_wrapper",container:"wysija_container",header:"wysija_header",body:"wysija_body",footer:"wysija_footer",blockDropTreshold:30,imageDropTreshold:30,minTextPlaceholderWidth:45},toolbar:{effect:null,x:null,y:null,top:null,left:null},scroll:{top:0,left:0},locks:{dragging:!1,selectingColor:!1,showingTools:!1},flags:{displayImages:!0,doSave:!1},defaults:{contentAlignment:"left",imageAlignment:"center",galleryAlignment:"center"},autoSave:function(){!1===Wysija.flags.doSave&&(Wysija.flags.doSave=!0)},save:function(){var e,i=1,s={},t=$H();t.set("version",Wysija.version);var n=Wysija.getHeader();(s=n.block.save()).type="header",t.set("header",s);var o=$H();Wysija.getBlocks().each(function(t){(e=t.block).save&&null!==(s=e.save())&&(s.position=i,s.type=t.elementType,s.background_color=e.element.readAttribute("wysija_bg_color"),o.set("block-"+i,s),i++)}),t.set("body",o);var a=Wysija.getFooter();return(s=a.block.save()).type="footer",t.set("footer",s),Object.toJSON(t).gsub('\\"','"').gsub('"[{',"[{").gsub('}]"',"}]")},blockDropOptions:{accept:$w("wysija_widget"),onEnter:function(t,e){$(e).addClassName("hover")},onLeave:function(t,e){$(e).removeClassName("hover")},onDrop:function(t,e){var i={},s=null;i.elementType=t.readAttribute("wysija_type"),i.element=t,"image"===i.elementType?(i.elementRatio=t.readAttribute("elementRatio"),i.elementSrc=t.readAttribute("wysija_src"),i.elementWidth=t.readAttribute("wysija_width"),i.elementHeight=t.readAttribute("wysija_height"),i.elementClass=null,s=t.readAttribute("wysija_parent"),null!==$(s)&&(i.elementData=Wysija.get($(s)).block.image.getData())):"divider"===i.elementType?(i.elementSrc=t.readAttribute("wysija_src"),i.elementWidth=t.readAttribute("wysija_width"),i.elementHeight=t.readAttribute("wysija_height")):"text"===i.elementType&&(i.elementText=Wysija_i18n.clickToEditText),e.fire("item:drop",i),$(e).removeClassName("hover"),null!==$(s)&&(s=Wysija.get($(s))).block.image.removeImage()}},imageDropOptions:{accept:$w("image"),onEnter:function(t,e){$(e).addClassName("hover"),($(e).up(".wysija_block")||$(e).up(".wysija_header")||$(e).up(".wysija_footer")).addClassName("image_hover")},onLeave:function(t,e){$(e).removeClassName("hover"),$$(".image_hover").invoke("removeClassName","image_hover")},onDrop:function(t,e){if(e.readAttribute("wysija_src")===t.readAttribute("wysija_src"))return Wysija.hideTools(),!1;var i={},s=t.readAttribute("wysija_parent");i.elementType=t.readAttribute("wysija_type"),i.element=t,i.elementRatio=t.readAttribute("elementRatio"),i.elementSrc=t.readAttribute("wysija_src"),i.elementWidth=t.readAttribute("wysija_width"),i.elementHeight=t.readAttribute("wysija_height"),(i.elementClass=null)!==$(s)&&(s=Wysija.get($(s)),i.elementData=s.block.image.getData()),e.fire("image:drop",i),$(e).removeClassName("hover"),null!==$(s)&&s.block.image.removeImage()}},textDropOptions:{accept:$w("text"),onEnter:function(t,e){$(e).addClassName("hover")},onLeave:function(t,e){$(e).removeClassName("hover")},onDrop:function(t,e){var i={};i.elementType=t.readAttribute("wysija_type"),i.element=t,i.elementText=Wysija_i18n.clickToEditText,e.fire("text:drop",i),$(e).removeClassName("hover")}},instances:{},get:function(t,e){e===undefined&&(e="block");var i=t.identify(),s=Wysija.instances[i]||new(Wysija[e.capitalize().camelize()])(i);return Wysija.instances[i]=s},getTheme:function(){var t=$("wysija_widgets_settings").down(".theme");return t!==undefined&&0<t.innerHTML.length?t.innerHTML:"default"},getHeader:function(){return Wysija.get(Wysija.getHeaderElement(),"header")},getHeaderElement:function(){return $$("div.wysija_header")[0]},getFooter:function(){return Wysija.get(Wysija.getFooterElement(),"footer")},getFooterElement:function(){return $$("div.wysija_footer")[0]},getBlocks:function(){return Wysija.getBlockElements().map(function(t){return Wysija.get(t)})},getBlockElements:function(){return $$("div.wysija_block")},startBlockPositions:function(t,e){e.element.hasClassName("wysija_block")&&(Wysija.locks.dragging=!0,Wysija.hideEditors())},setScrollOffsets:function(){Wysija.scroll=document.viewport.getScrollOffsets()},setBlockPositions:function(t,e){Wysija.locks.dragging=!1;var i=1;Wysija.getBlocks().each(function(t){t.setPosition(i++),t.block.element.setStyle({zIndex:""});var e=$$(".block_placeholder[data-parent="+t.block.element.identify()+"]").first();e!==undefined&&t.block.element.insert({before:e})}),e!==undefined&&1<$$(".wysija_auto-post").length&&"auto-post"===e.element.readAttribute("wysija_type")&&(Wysija.initAutoPost(),Wysija.setBackgroundColors()),Wysija.autoSave()},init:function(){Wysija.setScrollOffsets(),Wysija.getHeader(),Wysija.getFooter(),Wysija.makeDroppable(),Wysija.makeSortable(),Wysija.hideControls(),Wysija.hideTools(),Wysija.hideSettings(),Wysija.setSettingsPosition(),Wysija.initSettings(),Wysija.initAutoPost(),Wysija.setBackgroundColors(),Wysija.setToolbarPosition(),Wysija.setImagesDisplay()},initToolbarPosition:function(){null===Wysija.toolbar.top&&(Wysija.toolbar.top=parseInt($(Wysija.options.wrapper).positionedOffset().top)),null===Wysija.toolbar.left&&(Wysija.toolbar.left=parseInt($(Wysija.options.wrapper).positionedOffset().left)),null===Wysija.toolbar.x&&(Wysija.toolbar.x=parseInt(Wysija.toolbar.left+$(Wysija.options.wrapper).getDimensions().width+15)),Wysija.scroll.top>=Wysija.toolbar.top-20?Wysija.toolbar.y=parseInt(20+Wysija.scroll.top):Wysija.toolbar.y=parseInt(Wysija.toolbar.top+Wysija.scroll.top)},setToolbarPosition:function(){Wysija.initToolbarPosition(),$(Wysija.options.toolbar).setStyle({top:Wysija.toolbar.y+"px",left:Wysija.toolbar.x+"px",opacity:0}).appear({duration:.5}),$(Wysija.options.notices).hide()},updateToolbarPosition:function(){Wysija.initToolbarPosition(),null!==Wysija.toolbar.effect&&Wysija.toolbar.effect.cancel(),Wysija.scroll.top>=Wysija.toolbar.top-20?(Wysija.toolbar.y=parseInt(20+Wysija.scroll.top),Wysija.toolbar.effect=new Effect.Move(Wysija.options.toolbar,{x:Wysija.toolbar.x,y:Wysija.toolbar.y,mode:"absolute",duration:.2})):$(Wysija.options.toolbar).setStyle({left:Wysija.toolbar.x+"px",top:Wysija.toolbar.top+"px"})},editorCleanup:function(t,e){switch(t){case"get_from_editor":e=(e=(e=(e=e.gsub(/<h1><\/h1>/,"<br />")).gsub(/<h2><\/h2>/,"<br />")).gsub(/<h3><\/h3>/,"<br />")).gsub(/<p><\/p>/,"<p>&nbsp;</p>")}return e},updateCSSColor:function(t,i){var e=[],s="color",n=$(Wysija.options.css).innerHTML.strip();switch(t.endsWith("BgColorInput")&&(s="background-color"),i=""===i?"transparent":"#"+i,t){case"bodyColorInput":e.push("wysija_editable"),e.push("wysija_editable ul li"),e.push("wysija_editable ol li");break;case"h1ColorInput":e.push("wysija_editable h1");break;case"h2ColorInput":e.push("wysija_editable h2");break;case"h3ColorInput":e.push("wysija_editable h3");break;case"linksColorInput":e.push("wysija_editable a"),e.push("wysija_editable h1 a"),e.push("wysija_editable h2 a"),e.push("wysija_editable h3 a");break;case"unsubscribeColorInput":e.push("wysija_unsubscribe p");break;case"viewbrowserColorInput":e.push("wysija_viewbrowser p");break;case"htmlBgColorInput":e.push("wysija_wrapper");break;case"headerBgColorInput":e.push("wysija_header");break;case"bodyBgColorInput":e.push("wysija_body");break;case"footerBgColorInput":e.push("wysija_footer")}0<e.length&&null!==s&&(e.each(function(t){var e=new RegExp("([\\.|#]"+t+".*?{.*?"+s+":\\s*)(#?[a-z0-9]*)*(.*?})","i");n=n.replace(e,"$1"+i+"$3")}),0<n.length&&Wysija.updateCSS(n))},updateCSS:function(t){$(Wysija.options.css)!==undefined&&$(Wysija.options.css).remove();var e=document.getElementsByTagName("head")[0],i=document.createElement("style");i.id=Wysija.options.css,i.type="text/css",i.styleSheet?i.innerHTML=t:i.appendChild(document.createTextNode(t)),e.appendChild(i)},setTextStyles:function(t){var e=t.editorId+"_ifr",i=$(e);if(null!==i&&(i.doc=null,i.contentDocument?i.doc=i.contentDocument:i.contentWindow?i.doc=i.contentWindow.document:i.document&&(i.doc=i.document),null!==i.doc)){var s=i.doc.getElementsByTagName("head")[0],n=i.doc.createElement("style"),o=$(Wysija.options.css).innerHTML.strip();n.type="text/css",n.id="wj_iframe_css",n.styleSheet?n.innerHTML=o:n.appendChild(document.createTextNode(o)),s.appendChild(n)}},setBackgroundColors:function(){Wysija.getBlocks().invoke("setBackgroundColor"),$$(".wysija_auto-post .wysija_content, .wysija_auto-post .wysija_divider .wysija_raw").each(function(t){var e=t.readAttribute("wysija_bg_color");""===e?t.setStyle({backgroundColor:"transparent"}):null!==e&&t.setStyle({backgroundColor:"#"+e})})},hideBlockControls:function(){$$(".wysija_controls").invoke("hide"),this.getBlockElements().invoke("removeClassName","hover")},hideEditors:function(){0<tinymce.editors.length&&Wysija.getBlocks().each(function(t){"content"===t.elementType&&null!==t.block.contents&&t.block.contents.disableEditor()})},hideControls:function(){return Wysija.getBlocks().invoke("hideControls")},hideTools:function(){$$(".resize-controls").invoke("hide"),$$(".wysija_tools").invoke("hide"),Wysija.locks.showingTools=!1},makeDroppable:function(){Droppables.add("block_placeholder",Wysija.blockDropOptions)},makeSortable:function(){var t=$(Wysija.options.body);Sortable.create(t,{tag:"div",only:"wysija_block",scroll:window,handle:"handle",constraint:"vertical"}),Draggables.removeObserver(t),Draggables.addObserver({element:t,onStart:Wysija.startBlockPositions,onEnd:Wysija.setBlockPositions})},setDivider:function(t,e){$("wysija_widgets_settings").down(".divider").update(t),$$('.wysija_item[wysija_type="divider"]')[0].writeAttribute("wysija_src",e.src),$$('.wysija_item[wysija_type="divider"]')[0].writeAttribute("wysija_width",e.width),$$('.wysija_item[wysija_type="divider"]')[0].writeAttribute("wysija_height",e.height)},replaceDividers:function(){$$(".wysija_block .wysija_divider").invoke("replace",$("wysija_widgets_settings").down(".divider").innerHTML)},toggleImages:function(){return Wysija.flags.displayImages=!Wysija.flags.displayImages,this.setImagesDisplay()},setImagesDisplay:function(){return!0===Wysija.flags.displayImages?($$(".wysija_image img").invoke("setStyle",{visibility:"visible"}),$$(".wysija_cell img").invoke("setStyle",{visibility:"visible"}),$$(".wysija_divider img").invoke("setStyle",{visibility:"visible"}),$$(".wysija_raw img").invoke("setStyle",{visibility:"visible"}),!0):($$(".wysija_image img").invoke("setStyle",{visibility:"hidden"}),$$(".wysija_cell img").invoke("setStyle",{visibility:"hidden"}),$$(".wysija_divider img").invoke("setStyle",{visibility:"hidden"}),$$(".wysija_raw img").invoke("setStyle",{visibility:"hidden"}),!1)},flyToTheMoon:function(){if($("wysija-konami")){var t=document.viewport.getDimensions().width;$("wysija-konami-overlay").show(),$("wysija-konami-bird").show(),$("wysija-konami-bird").setStyle({left:"-1000px",top:"100px"}),new Effect.Morph("wysija-konami-bird",{style:{left:t+"px"},duration:5,beforeStart:function(){},afterFinish:function(){$("wysija-konami-bird").writeAttribute("style","z-index:99999;position:absolute;top:300px;left:"+t+'px;-moz-transform: scaleX(-1);-o-transform: scaleX(-1);-webkit-transform: scaleX(-1);transform: scaleX(-1);filter: FlipH;-ms-filter: "FlipH";')}}),new Effect.Morph("wysija-konami-bird",{queue:"end",style:{left:"-1000px"},duration:5,afterFinish:function(){$("wysija-konami-bird").writeAttribute("style","z-index:99999;position:absolute;top:100px;left:-1000px;"),$("wysija-konami-overlay").hide(),$("wysija-konami-bird").hide()}})}},hideSettings:function(){$$(".wysija_settings").invoke("hide")},initSettings:function(){Event.stopObserving("scroll"),Event.observe(window,"scroll",function(){Wysija.setScrollOffsets(),Wysija.setSettingsPosition(),Wysija.updateToolbarPosition(),WysijaPopup.setPosition()}),Event.stopObserving("resize"),Event.observe(window,"resize",function(){WysijaPopup.setPosition()})},setSettingsPosition:function(){var l=document.viewport.getHeight(),r=25;$$(".wysija_settings").each(function(t){var e=t.up(".wysija_block").getDimensions(),i=t.up(".wysija_block").cumulativeOffset(),s=100;if(i.top<=Wysija.scroll.top+l){var n=parseInt(Wysija.scroll.top+(l/2-t.getHeight()/2)),o=parseInt(i.top-r),a=parseInt(i.top+e.height-r);s=parseInt(e.height)<200?parseInt(e.height/2-t.getHeight()/2):a+r<n+100?parseInt(e.height-100):n-100<o+r?100:parseInt(n-i.top)}new Effect.Move(t,{x:parseInt(e.width/2-t.getWidth()/2),y:s,mode:"absolute",duration:.2})})},initAutoPost:function(){var t=$("wysija_widgets_settings").down(".autopost").innerHTML,e=$$(".wysija_auto-post").length;"single"===t&&(0<e?($("wysija-widget-autopost").addClassName("disabled"),$("wysija-widget-autopost").writeAttribute("title",Wysija_i18n.autoPostImmediateNotice)):($("wysija-widget-autopost").removeClassName("disabled"),$("wysija-widget-autopost").writeAttribute("title",""))),Wysija.getBlocks().each(function(t){"auto-post"===t.elementType&&t.block.loadContent()})},encodeHtmlValue:function(t){return t.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;")},encodeURIComponent:function(t){var e=new RegExp(/^http[s]?:\/\//).exec(t);return null===e?encodeURIComponent(t).replace(/[!'()*]/g,escape):1===e.length?encodeURI(t).replace(/[!'()*]/g,escape):void 0}};document.observe("dom:loaded",Wysija.init),Wysija.Block=Class.create({initialize:function(t){return info("block -> init"),this.element=$(t),this.elementType=this.element.readAttribute("wysija_type"),this.block=new(Wysija[this.elementType.capitalize().camelize()])(this.element),1===parseInt(this.element.readAttribute("wysija_new"))&&(this.block.draw(),this.element.writeAttribute("wysija_new",0)),this.block.makeBlockDroppable(),this.block.setup!==undefined&&this.block.setup(),this},getCustomData:function(t){return this.element.down(".wysija_options."+t)!==undefined?(info("got options for "+t),this.element.down(".wysija_options."+t).innerHTML.toQueryParams("&amp;")):(info("no options to get for "+t),null)},getOptions:function(){return this.options},setOptions:function(t){return t===undefined&&(t={}),this.options===undefined&&(this.options=new Hash),this.options=this.options.update(t),this},setPosition:function(t){this.element.writeAttribute("wysija_position",t)},hideControls:function(){this.getControls&&(this.element.removeClassName("hover"),this.getControls().hide())},showControls:function(){this.getControls&&(this.element.addClassName("hover"),this.getControls().show())},makeBlockDroppable:function(){if(!1===this.isBlockDroppableEnabled()){var t=this.getBlockDroppable();Droppables.add(t.identify(),Wysija.blockDropOptions),t.addClassName("enabled")}},removeBlockDroppable:function(){if(this.isBlockDroppableEnabled()){var t=this.getBlockDroppable();Droppables.remove(t.identify()),t.removeClassName("enabled"),t.remove()}},isBlockDroppableEnabled:function(){return!!this.element.hasClassName("static")||this.getBlockDroppable().hasClassName("enabled")},createBlockDroppable:function(){return this.element.insert({before:'<div class="block_placeholder" data-parent="'+this.element.identify()+'">'+Wysija_i18n.drop_block_here+"</div>"})},getBlockDroppable:function(){var t=this.element.identify();return 0===$$('.block_placeholder[data-parent="'+t+'"]').length&&this.createBlockDroppable(),$$('.block_placeholder[data-parent="'+t+'"]').first()},getControls:function(){return this.element.down(".wysija_controls")},setupControls:function(){if(this.controls=this.getControls(),this.controls){this.element.observe("mouseover",function(){!0!==Wysija.locks.dragging&&!0!==Wysija.locks.selectingColor&&!0!==Wysija.locks.showingTools&&(this.element.addClassName("hover"),this.showControls())}.bind(this)),this.element.observe("mouseout",function(){!0!==Wysija.locks.dragging&&!0!==Wysija.locks.selectingColor&&this.hideControls()}.bind(this)),this.removeButton=this.controls.down(".remove"),this.removeButton.observe("click",function(){this.removeBlock(),this.removeButton.stopObserving("click")}.bind(this)),this.bgColorButton=this.controls.down(".bgcolor");var i=this;jQuery(this.bgColorButton).modcoder_excolor({default_color:i.element.readAttribute("wysija_bg_color"),hue_bar:1,border_color:"#969696",anim_speed:"fast",round_corners:!1,shadow_size:2,shadow_color:"#f0f0f0",background_color:"#ececec",backlight:!1,label_color:"#333333",effect:"fade",show_input:!1,z_index:2e4,callback_on_init:function(){Wysija.locks.selectingColor=!0},callback_on_select:function(t){i.setBackgroundColor(t)},callback_on_ok:function(t,e){!0===e&&i.setBackgroundColor(t),Wysija.locks.selectingColor=!1,i.hideControls()}})}return this},setBackgroundColor:function(t){t!==undefined&&this.element.writeAttribute("wysija_bg_color",t);var e=this.element.readAttribute("wysija_bg_color");""===e?this.element.setStyle({backgroundColor:"transparent"}):null!==e&&this.element.setStyle({backgroundColor:"#"+e}),Wysija.autoSave()},replaceBlock:function(t){return this.removeBlockDroppable(),this.element.replace(t)},removeBlock:function(t){info("block -> removeBlock"),this.removeBlockDroppable(),Effect.Fade(this.element.identify(),{duration:.2,afterFinish:function(){this.element.next(".wysija_block")!==undefined&&!1!==t&&Wysija.get(this.element.next(".wysija_block")).block.showControls(),this.element.remove(),Wysija.setBlockPositions(),t!==undefined&&"function"==typeof t&&t(),delete Wysija.instances[this.element.identify()]}.bind(this)})}}),document.observe("item:drop",function(t){Wysija.Block.create(t.memo,t.target),Wysija.hideBlockControls(),Wysija.setImagesDisplay()}),Wysija.Block.create=function(t,e){var i='<li class="handle_container"><a class="handle" href="javascript:;"><span></span></a></li><li><a class="bgcolor" href="javascript:;"><span></span></a></li><li><a class="remove" href="javascript:;"><span></span></a></li>';"image"===t.elementType&&(t.elementOptions='<span class="wysija_options image">#{options}</span>'.interpolate({options:Object.toQueryString(t)}),t.elementType="content",t.blockAlignment=Wysija.defaults.imageAlignment),"text"===t.elementType&&(t.elementOptions='<span class="wysija_options text">#{options}</span>'.interpolate({options:Object.toQueryString(t)}),t.elementType="content",t.blockAlignment=Wysija.defaults.contentAlignment),"divider"===t.elementType&&(t.elementOptions='<span class="wysija_options divider">#{options}</span>'.interpolate({options:Object.toQueryString(t)}));var s,n=$(Wysija.options.body),o=new Template('<div class="wysija_block" wysija_type="#{elementType}" wysija_new="1"><ul class="wysija_controls">'+i+'</ul>#{elementOptions}<div class="wysija_#{elementType} #{blockAlignment}" wysija_align="#{blockAlignment}"></div></div>');"block_placeholder"===e.identify()?(n.insert(o.evaluate(t)),s=n.childElements().last()):(e.insert({before:o.evaluate(t)}),s=e.previous(".wysija_block")),Wysija.makeSortable(),Wysija.setBlockPositions();var a=Wysija.get(s);"object"==typeof t.elementData&&a.block.image.setData(t.elementData),a.element.fire("block:insert"),a.block.contents!==undefined&&!1===a.block.contents.isEmpty()&&a.block.contents.setFocus()},Wysija.Header=Class.create({initialize:function(t){return this.element=$(t),this.block=new Wysija.Banner(this.element),this.block.setup(),this}}),Wysija.Footer=Class.create({initialize:function(t){return this.element=$(t),this.block=new Wysija.Banner(this.element),this.block.setup(),this}}),Wysija.Banner=Class.create(Wysija.Block,{image:null,constraints:{left:{minHeight:20,minWidth:20,maxWidth:600},right:{minHeight:20,minWidth:20,maxWidth:600},center:{minHeight:20,minWidth:20,maxWidth:600},full:{minHeight:20,minWidth:20,maxWidth:600}},initialize:function(t){return this.element=$(t),this.elementArea=this.element.readAttribute("wysija_type"),this.getImageContainer()&&(this.image=new Wysija.BannerImage(this.getImageContainer(),this.elementArea)),this},save:function(){var t={text:null};return null!==this.image&&(t.image=this.image.save(),!1===this.image.isEmpty()?t.alignment=t.image.alignment:t.alignment="center",t["static"]=this.element.hasClassName("static")),t},draw:function(){return null===this.image&&(this.element.childElements().last().insert(this.drawContainer("image")),this.image=new Wysija.BannerImage(this.getImageContainer(),this.elementArea),this.image.setOptions(this.getCustomData("image")),this.getImageContainer().insert(this.image.draw())),this},drawContainer:function(t){return'<div class="wysija_'+t+'"></div>'},getImageContainer:function(){return this.element.down(".wysija_image")},getContainer:function(){return this.element.down(".wysija_content")},minWidth:function(){return this.constraints[this.alignment].minWidth},maxWidth:function(){return this.constraints[this.alignment].maxWidth},fullWidth:function(){return this.constraints.full.maxWidth},setup:function(){null!==this.image&&this.image.setup(),this.constrainSize()},getControls:function(){return this.element.down(".wysija_controls")},remove:function(){this.image.isEmpty()&&($("wysija_"+this.elementArea).innerHTML=$("wysija_default_"+this.elementArea).innerHTML,Wysija.init())},setBlockAlignment:function(t){return info("content -> set block alignment"),this.getContainer().removeClassName("left").removeClassName("center").removeClassName("right"),this.getContainer().writeAttribute("wysija_align",t),this.getContainer().addClassName(t),null!==this.image&&(this.image.setAlignment(t),this.image.setInformation()),this.constrainSize(),Wysija.autoSave(),this},constrainSize:function(){info("banner -> constrain size"),this.image.ratio=this.image.getRatio();var t=this.image.minSize(),e=this.image.maxSize(),i=this.image.getImageElement();i.width>e.width||i.height>e.height?(this.image.getImageContainer().writeAttribute("style",""),i.writeAttribute({width:e.width,height:e.height})):(i.width<t.width||i.height<t.height)&&(this.image.getImageContainer().writeAttribute("style",""),i.writeAttribute({width:t.width,height:t.height})),"center"===this.image.alignment?this.image.getImageContainer().setStyle({width:i.readAttribute("width")+"px"}):this.image.getImageContainer().setStyle({width:"auto"}),!1===this.image.isEmpty()&&this.image.setInformation()},getBlock:function(){return this.element.up(".wysija_"+this.elementArea)}}),Wysija.Gallery=Class.create(Wysija.Block,{items:$H(),constraints:{left:{minWidth:20,maxWidth:562},right:{minWidth:20,maxWidth:562},center:{minWidth:20,maxWidth:562}},initialize:function(t){info("gallery -> init"),this.element=$(t),this.alignment=this.getDefaultAlignment();for(var e=this.getCells(),i=this.element.identify(),s=[],n=0;n<e.length;n++)s[n]=new Wysija.GalleryImage(e[n]);return this.items.set(i,s),this},getDefaultAlignment:function(){return this.getGalleryElement().readAttribute("wysija_align")||Wysija.defaults.galleryAlignment},draw:function(){info("gallery -> draw")},setup:function(){info("gallery -> setup"),this.createResizeControls(),this.setupResizeControls(),this.setupControls(),this.setupTools(),this.setBlockAlignment(this.getDefaultAlignment()),this.items.get(this.element.id).each(function(t){t.setup()},this)},save:function(){info("gallery -> save");var e={};return e.width=this.getGalleryElement().getWidth(),e.alignment=this.alignment,e.items=[],this.items.get(this.element.id).each(function(t){e.items.push(t.save())},this),e},setupTools:function(){this.tools=this.getTools(),this.tools&&(this.getGalleryElement().observe("mouseover",function(){!0!==Wysija.locks.dragging&&!0!==Wysija.locks.selectingColor&&!0!==Wysija.locks.showingTools&&(this.showTools(),this.getResizeControls().show())}.bind(this)),this.getGalleryElement().observe("mouseout",function(){!0!==Wysija.locks.dragging&&!0!==Wysija.locks.selectingColor&&(this.hideTools(),this.getResizeControls()!==undefined&&this.getResizeControls().hide())}.bind(this)),this.leftButton=this.tools.down(".alignment-left"),this.leftButton.observe("click",function(){this.setBlockAlignment("left")}.bind(this)),this.centerButton=this.tools.down(".alignment-center"),this.centerButton.observe("click",function(){this.setBlockAlignment("center")}.bind(this)),this.rightButton=this.tools.down(".alignment-right"),this.rightButton.observe("click",function(){this.setBlockAlignment("right")}.bind(this)),this.removeButton=this.tools.down(".remove"),this.removeButton.observe("click",function(){this.remove(),this.removeButton.stopObserving("click")}.bind(this)))},remove:function(){this.items.unset(this.element.id),this.removeBlock()},getTools:function(){return this.getGalleryElement().down(".wysija_tools")},hideTools:function(){this.getTools()!==undefined&&this.getTools().hide(),Wysija.locks.showingTools=!1,this.information!==undefined&&this.information.hide()},showTools:function(){this.getTools()!==undefined&&this.getTools().show(),Wysija.locks.showingTools=!0,this.information!==undefined&&this.information.show()},setBlockAlignment:function(t){return info("gallery -> setBlockAlignment"),this.getGalleryElement().removeClassName("left").removeClassName("center").removeClassName("right"),this.getGalleryElement().writeAttribute("wysija_align",t),this.getGalleryElement().addClassName(t),this.alignment=t,this.leftButton.removeClassName("active"),this.centerButton.removeClassName("active"),this.rightButton.removeClassName("active"),this[t+"Button"].addClassName("active"),this.constrainSize(),Wysija.autoSave(),this},constrainSize:function(){info("gallery -> constrainSize");var t=this.getGalleryElement().getDimensions(),e=this.getCells(0).length,i=t.width-this.minWidth();this.getCells().each(function(t){t.setStyle({width:t.down("img").getWidth()+Math.floor(i/e)+"px"})})},getCells:function(t){return t|=0,this.getGalleryElement().select(".wysija_row")[t].select(".wysija_cell")},minWidth:function(){return info("gallery -> minWidth"),this.getCells(0).inject(0,function(t,e){return t+e.down("img").getWidth()})},maxWidth:function(){return this.constraints[this.alignment].maxWidth},maxHeight:function(){return this.getCells(0).first().getHeight()},setupResizeControls:function(){return this.handle=this.getResizeControls().down(".resize-handle"),this.information=this.getResizeControls().down(".resize-info"),this.handleSize=this.handle.getDimensions(),this.draggable=new Draggable(this.handle,{onStart:this.dragStart.bind(this),snap:this.dragSnap.bind(this),change:this.dragChange.bind(this),onEnd:this.dragEnd.bind(this),starteffect:Prototype.emptyFunction,endeffect:Prototype.emptyFunction}),this},dragStart:function(){Wysija.hideEditors(),this.dragging=!0,Wysija.locks.dragging=!0,$$("body")[0].setStyle({cursor:this.handle.getStyle("cursor")}),"right"===this.alignment&&this.getGalleryElement().insert(this.handle)},dragSnap:function(t,e){var i=this.minWidth(),s=this.maxWidth();if("right"===this.alignment){var n=this.getGalleryElement().getWidth();s<(o=n-t)&&(t=n-s,o=s),o<i&&(t=n-i,o=i),e=Math.floor(this.maxHeight()-this.handleSize.height+this.borderWidth())}else{var o;s<(o=t+this.handleSize.width)&&(t=s-this.handleSize.width,o=s),o<i&&(t=i-this.handleSize.width,o=i),e=Math.floor(this.maxHeight()-this.handleSize.height+this.borderWidth())}return[t,e]},dragChange:function(){if("right"===this.alignment){var t=this.handle.positionedOffset(),e=this.getGalleryElement().getDimensions();t.left=e.width-t.left+this.borderWidth(),t.top+=this.handleSize.height+this.borderWidth(),this.getResizeControls().setStyle({left:e.width-t.left+this.borderWidth()+"px",width:t.left-2*this.borderWidth()+"px",height:t.top-2*this.borderWidth()+"px"})}else if("left"===this.alignment){(t=this.handle.positionedOffset()).left+=this.handleSize.width,t.top+=this.handleSize.height,this.getResizeControls().setStyle({width:t.left-this.borderWidth()+"px",height:t.top-this.borderWidth()+"px"})}else if("center"===this.alignment){t=this.handle.positionedOffset(),e=this.getGalleryElement().getDimensions();t.left+=this.handleSize.width,t.top+=this.handleSize.height,this.getResizeControls().setStyle({left:(e.width-t.left+this.borderWidth())/2+"px",width:t.left-this.borderWidth()+"px",height:t.top-this.borderWidth()+"px"})}},dragEnd:function(){this.dragging=!1,Wysija.locks.dragging=!1,$$("body")[0].setStyle({cursor:""});var t=this.minWidth(),e=this.getResizeControls().getWidth();e<t&&(e=t),this.setDimensions(e),this.handle.writeAttribute("style",""),"right"===this.alignment?(this.getResizeControls().insert(this.handle),this.getResizeControls().writeAttribute("style","")):"center"===this.alignment&&this.getResizeControls().writeAttribute("style",""),Wysija.hideTools(),this.getGalleryElement().fire("drag:end")},setDimensions:function(t){t=t===undefined?this.maxWidth():t;var e=this.maxHeight();this.getGalleryElement().setStyle({width:t+"px",height:e+"px"}),this.getResizeControls().setStyle({width:t+"px",
2
+ height:e+"px"}),this.getResizeControls().writeAttribute("style","")},borderWidth:function(){return 2},createResizeControls:function(){this.getResizeControls()===undefined&&this.getGalleryElement().insert('<div class="resize-controls"><span class="resize-handle"></span><span class="resize-info"></span></div>')},getResizeControls:function(){return this.getGalleryElement().down(".resize-controls")},getGalleryElement:function(){return this.element.down(".wysija_gallery")}}),Wysija.Content=Class.create(Wysija.Block,{contents:null,image:null,constraints:{left:{minHeight:20,minWidth:32,maxWidth:325},right:{minHeight:20,minWidth:32,maxWidth:325},center:{minHeight:20,minWidth:32,maxWidth:562},full:{minHeight:20,minWidth:32,maxWidth:562}},initialize:function(t){return this.element=$(t),this.getTextContainer()&&(this.contents=new Wysija.Text(this.getTextContainer())),this.getImageContainer()&&(this.image=new Wysija.Image(this.getImageContainer())),this},save:function(){var t={};return null!==this.contents&&(t.text=this.contents.save()),null!==this.image&&(t.image=this.image.save(),!1===this.image.isEmpty()?t.alignment=t.image.alignment:t.alignment="center",t["static"]=this.element.hasClassName("static")),t},draw:function(){return null===this.image&&(this.element.childElements().last().insert(this.drawContainer("image")),this.image=new Wysija.Image(this.getImageContainer()),this.image.setOptions(this.getCustomData("image")),this.getImageContainer().insert(this.image.draw())),null===this.contents&&(this.element.childElements().last().insert(this.drawContainer("text")),this.contents=new Wysija.Text(this.getTextContainer()),this.contents.setOptions(this.getCustomData("text")),this.getTextContainer().insert(this.contents.draw())),this},drawContainer:function(t){return'<div class="wysija_'+t+'"></div>'},getImageContainer:function(){return this.element.down(".wysija_image")},getTextContainer:function(){return this.element.down(".wysija_text")},getContainer:function(){return this.element.down(".wysija_content")},minWidth:function(){return this.constraints[this.alignment].minWidth},maxWidth:function(){return this.isAlone()?this.constraints.full.maxWidth:this.constraints[this.alignment].maxWidth},fullWidth:function(){return this.constraints.full.maxWidth},setup:function(){info("content -> setup"),this.setupControls(),null!==this.contents&&this.contents.setup(),null!==this.image&&this.image.setup(),this.constrainSize()},getControls:function(){return this.element.down(".wysija_controls")},remove:function(){this.image.isEmpty()&&this.contents.isEmpty()&&this.removeBlock()},setBlockAlignment:function(t){return info("content -> set block alignment"),this.getContainer().removeClassName("left").removeClassName("center").removeClassName("right"),this.getContainer().writeAttribute("wysija_align",t),this.getContainer().addClassName(t),this.alignment=t,null!==this.image&&(this.image.setAlignment(t),this.image.setInformation()),null!==this.contents&&this.contents.setAlignment(t),this.constrainSize(),Wysija.autoSave(),this},constrainSize:function(){info("content -> constrain size"),this.image.ratio=this.image.getRatio();var t=this.image.minSize(),e=this.image.maxSize(),i=this.image.getImageElement();if(this.image.getImageContainer().writeAttribute("style",""),i.width>e.width||i.height>e.height?i.writeAttribute({width:e.width,height:e.height}):(i.width<t.width||i.height<t.height)&&i.writeAttribute({width:t.width,height:t.height}),!1===this.image.isEmpty()&&this.image.getImageContainer().setStyle({width:i.readAttribute("width")+"px",height:null}),this.image.isEmpty()||this.contents.isEmpty()){if(this.contents.isEmpty()){this.contents.getTextContainer().writeAttribute("style","");var s=this.image.getImageElement().getDimensions(),n=this.constraints[this.contents.alignment].maxWidth;if("center"!==this.contents.alignment&&s.width>n)this.contents.getTextPlaceholder().setStyle({width:s.width-2+"px","float":this.contents.alignment,lineHeight:null});else switch(this.contents.alignment){case"left":case"right":this.contents.getTextPlaceholder().setStyle({width:this.contents.fullWidth()-s.width-15-2+"px",height:s.height-2+"px",lineHeight:s.height-2+"px","float":"left"===this.contents.alignment?"right":"none"});break;case"center":this.contents.getTextPlaceholder().setStyle({width:this.contents.fullWidth()-2+"px",height:null,lineHeight:null})}}else this.image.isEmpty()&&(this.contents.getTextContainer().setStyle({width:this.contents.fullWidth()-2+"px",height:"auto","float":"none"}),this.image.getImageContainer().setStyle({width:"auto"}),"center"===this.contents.alignment&&i.writeAttribute("width",e.width));this.contents.getTools()&&this.contents.getTools().setStyle({right:0})}else if(this.contents.isEditing()){switch(this.contents.getTextContainer().setStyle({width:"auto","float":"none"}),this.contents.getTools()&&this.contents.getTools().setStyle({right:0}),this.contents.alignment){case"left":var o=parseInt(this.image.getImageElement().readAttribute("width"));this.contents.getTextContainer().setStyle({width:this.contents.fullWidth()-o-15-2+"px","float":"right"});break;case"right":o=parseInt(this.image.getImageElement().readAttribute("width"));this.contents.getTextContainer().setStyle({width:this.contents.fullWidth()-o-15-2+"px"});break;case"center":this.contents.getTextContainer().setStyle({width:this.contents.fullWidth()-2+"px"})}this.contents.getTextContainer().setStyle({height:"auto"})}else{if(this.contents.getTextContainer().setStyle({width:this.contents.fullWidth()+"px","float":"none"}),this.contents.getTools()&&this.contents.getTools().setStyle({right:0}),"right"===this.contents.alignment&&this.contents.getTools()&&!1===Prototype.Browser.ie7){o=parseInt(this.image.getImageElement().readAttribute("width"));this.contents.getTools().setStyle({right:o+15+2+"px"})}if(!1===this.contents.isEmpty()){var a=this.contents.getTextArea().getHeight(),l=parseInt(this.image.getImageElement().readAttribute("height"));"right"===this.contents.alignment||"left"===this.contents.alignment?a<l?this.contents.getTextContainer().setStyle({height:l+"px"}):this.contents.getTextContainer().setStyle({height:"auto"}):a<20?this.contents.getTextContainer().setStyle({height:"20px"}):this.contents.getTextContainer().setStyle({height:"auto"})}}!1===this.image.isEmpty()&&this.image.setInformation()},getBlock:function(){return this.element.up(".wysija_block")}});var WysijaImageAbstract={initialize:function(t,e){return info("image abstract -> init"),this.element=$(t),this.elementArea=e===undefined?"block":e,this.alignment=this.getDefaultAlignment(),this.params=new Hash,this},save:function(){return this.isEmpty()?null:{src:this.getImageElement().readAttribute("src"),width:parseInt(this.getImageElement().readAttribute("width")),height:parseInt(this.getImageElement().readAttribute("height")),url:this.params.get("url"),alt:this.params.get("alt"),alignment:this.alignment,"static":this.getImageElement().hasClassName("static")}},draw:function(){return this.customDraw()+this.customTools()},customDraw:function(){this.getOptions().get("elementSrc")===undefined&&this.setOptions({elementSrc:$("wysija_widgets_settings").down(".image").innerHTML,elementRatio:1,elementClass:"empty",elementWidth:106,elementHeight:80});var t=this.getOptions();return this.setRatio(t.get("elementRatio")||1),this.getImageElement()!==undefined&&t.set("elementId",this.getImageElement().identify()),'<img class="image_placeholder #{elementClass}" id="#{elementId}" src="#{elementSrc}" wysija_src="#{elementSrc}" height="#{elementHeight}" wysija_height="#{elementHeight}" width="#{elementWidth}" wysija_width="#{elementWidth}" alt="" />'.interpolate(t)},customTools:function(){return"empty"===this.getOptions().get("elementClass")?"":'<ul class="wysija_tools"><li><a href="javascript:;" title="'+Wysija_i18n.alignmentLeft+'" class="alignment-left"><span></span></a></li><li><a href="javascript:;" title="'+Wysija_i18n.alignmentCenter+'" class="alignment-center"><span></span></a></li><li><a href="javascript:;" title="'+Wysija_i18n.alignmentRight+'" class="alignment-right"><span></span></a></li><li><a href="javascript:;" title="'+Wysija_i18n.addImageLink+'" class="add-link"><span></span></a></li><li><a href="javascript:;" title="'+Wysija_i18n.removeImageLink+'" class="remove-link"><span></span></a></li><li><a href="javascript:;" title="'+Wysija_i18n.removeImage+'" class="remove"><span></span></a></li></ul>'},setupTools:function(){this.tools=this.getTools(),this.tools&&(this.element.observe("mouseover",function(){!0!==this.isEmpty()&&!0!==Wysija.locks.dragging&&!0!==Wysija.locks.selectingColor&&!0!==Wysija.locks.showingTools&&(this.showTools(),this.getResizeControls().show())}.bind(this)),this.element.observe("mouseout",function(){!0!==Wysija.locks.dragging&&!0!==Wysija.locks.selectingColor&&(this.hideTools(),this.getResizeControls()!==undefined&&this.getResizeControls().hide())}.bind(this)),this.leftButton=this.tools.down(".alignment-left"),this.leftButton.observe("click",function(){this.setBlockAlignment("left")}.bind(this)),this.centerButton=this.tools.down(".alignment-center"),this.centerButton.observe("click",function(){this.setBlockAlignment("center")}.bind(this)),this.rightButton=this.tools.down(".alignment-right"),this.rightButton.observe("click",function(){this.setBlockAlignment("right")}.bind(this)),this.addLinkButton=this.tools.down(".add-link"),this.addLinkButton.observe("click",function(){this.addLink()}.bind(this)),this.removeLinkButton=this.tools.down(".remove-link"),this.removeLinkButton.observe("click",function(){this.removeLink()}.bind(this)),this.removeButton=this.tools.down(".remove"),this.removeButton.observe("click",function(){this.removeImage(),this.removeButton.stopObserving("click")}.bind(this)))},getTools:function(){return this.element.down(".wysija_tools")},hideTools:function(){this.getTools()!==undefined&&this.getTools().hide(),Wysija.locks.showingTools=!1,this.information!==undefined&&this.information.hide()},showTools:function(){this.getTools()!==undefined&&this.getTools().show(),Wysija.locks.showingTools=!0,this.information!==undefined&&this.information.show()},addLink:function(){var t=wysijaAJAX.adminurl+"?page=wysija_campaigns&action=image_data";this.params.get("url")!==undefined&&null!==this.params.get("url")&&(t+="&url="+Wysija.encodeURIComponent(this.params.get("url"))),this.params.get("alt")!==undefined&&(t+="&alt="+Wysija.encodeURIComponent(this.params.get("alt"))),WysijaPopup.open(Wysija_i18n.addLinkTitle,t,this.setData.bind(this))},setData:function(t){"undefined"!=typeof t.url&&this.params.set("url",t.url),"undefined"!=typeof t.alt&&this.params.set("alt",t.alt),this.params.get("url")!==undefined&&null!==this.params.get("url")?this.showLink():this.hideLink(),Wysija.autoSave(),Wysija.init()},getData:function(){return{url:this.params.get("url"),alt:this.params.get("alt")}},removeLink:function(){this.params.set("url",null),this.hideLink()},showLink:function(){this.addLinkButton.writeAttribute("title",decodeURIComponent(this.params.get("url"))),this.addLinkButton.addClassName("active")},hideLink:function(){this.addLinkButton.writeAttribute("title",Wysija_i18n.addImageLink),this.addLinkButton.removeClassName("active")},setBlockAlignment:function(t){info("image -> set block alignment to : "+t),Wysija.get(this.getBlock()).block.setBlockAlignment(t)},removeImage:function(){info("image -> remove"),this.params=new Hash,this.element.fire("image:remove")},makeDroppable:function(){info("image -> make droppable"),Droppables.add(this.getImageElement().identify(),Wysija.imageDropOptions)},removeDroppable:function(){info("image -> remove droppable"),Droppables.remove(this.getImageElement().identify())},setup:function(){return info("image -> setup"),this.createControls(),this.setupControls(),this.setupTools(),this.makeDroppable(),this.getParameters(),this[this.alignment+"Button"]&&this[this.alignment+"Button"].addClassName("active"),this},getParameters:function(){info("image -> get parameters");var t=this.element.down(".wysija_params");if(t!==undefined&&0===this.params.keys().length){var e=$F(t.down('input[name="url"]'));""!==e&&(this.params.set("url",e),this.showLink());var i=$F(t.down('input[name="alt"]'));""!==i&&this.params.set("alt",i)}return this},createControls:function(){this.getImageElement().hasClassName("empty")||this.getImageElement().hasClassName("static")||this.getResizeControls()!==undefined||this.element.insert('<div class="resize-controls"><span class="resize-handle"></span><span class="resize-info"></span></div>')},setupControls:function(){if(!this.getImageElement().hasClassName("empty")&&!this.getImageElement().hasClassName("static"))return this.ratio=this.getRatio(),this.controls=this.getControls(),this.handle=this.controls.down(".resize-handle"),this.information=this.controls.down(".resize-info"),this.handleSize=this.handle.getDimensions(),this.draggable=new Draggable(this.handle,{onStart:this.dragStart.bind(this),snap:this.dragSnap.bind(this),change:this.dragChange.bind(this),onEnd:this.dragEnd.bind(this),starteffect:Prototype.emptyFunction,endeffect:Prototype.emptyFunction}),this},getImageContainer:function(){return this.element},getImageElement:function(){return this.element.down("img")},getResizeControls:function(){return this.element.down(".resize-controls")},minSize:function(){var t=this.minWidth();return{width:t,height:Math.floor(t/this.ratio)}},maxSize:function(){var t=this.maxWidth();return{width:t,height:Math.floor(t/this.ratio)}},getRatio:function(){return this.getImageContainer().readAttribute("wysija_ratio")||(this.getImageElement().width/this.getImageElement().height*1e3).round()/1e3},setRatio:function(t){return this.element.writeAttribute("wysija_ratio",t),this},isEmpty:function(){return this.getImageElement().hasClassName("empty")},setEmpty:function(t){this.getImageContainer()[t?"addClassName":"removeClassName"]("empty")},isAlone:function(){return this.getImageContainer().hasClassName("alone")},setAlone:function(t){this.getImageContainer()[t?"addClassName":"removeClassName"]("alone")},setAlignment:function(t){if(!this.isEmpty())return info("image -> setAlignment = "+t),this.alignment=t,this.leftButton.removeClassName("active"),this.centerButton.removeClassName("active"),this.rightButton.removeClassName("active"),this.getResizeControls().writeAttribute("style",""),this[t+"Button"].addClassName("active"),this},getDefaultAlignment:function(){return this.element.up(".wysija_content").readAttribute("wysija_align")||Wysija.defaults.imageAlignment},dragStart:function(){Wysija.hideEditors(),this.dragging=!0,Wysija.locks.dragging=!0,$$("body")[0].setStyle({cursor:this.handle.getStyle("cursor")}),this.imageDimensions=this.getImageElement().getDimensions(),this.controls.setStyle({width:this.imageDimensions.width+"px",height:this.imageDimensions.height+"px"}),Wysija.get(this.element.up(".wysija_block")||this.element.up(".wysija_header")||this.element.up(".wysija_footer")).block.element.addClassName("dragging"),"right"===this.alignment&&this.element.insert(this.handle)},dragSnap:function(t,e){var i=this.constraints[this.alignment].minWidth,s=this.constraints[this.alignment].maxWidth,n=this.constraints[this.alignment].minHeight;if(this.isAlone()&&(s=this.constraints.full.maxWidth),"right"===this.alignment){var o=this.imageDimensions.width;s<(a=o-t)&&(t=o-s,a=s),a<i&&(t=o-i,a=i),(e=Math.max(n,Math.floor(a/this.ratio)))===n&&(t=o-Math.floor(n*this.ratio)),e-=this.handleSize.height}else{var a;s<(a=t+this.handleSize.width)&&(t=s-this.handleSize.width,a=s),a<i&&(t=i-this.handleSize.width,a=i),(e=Math.max(n,Math.floor(a/this.ratio)))===n&&(t=Math.floor(n*this.ratio)-this.handleSize.height),e-=this.handleSize.height}return[t-this.borderWidth(),e-this.borderWidth()]},dragChange:function(){var t=this.handle.positionedOffset();"right"===this.alignment?(t.left=this.imageDimensions.width-t.left,t.top+=this.handleSize.height,this.controls.setStyle({left:Math.floor(this.imageDimensions.width-t.left)+this.borderWidth()+"px",width:t.left-2*this.borderWidth()+"px",height:t.top+"px"}),this.handle.setStyle({left:parseInt(this.handle.getStyle("left"))+this.borderWidth()+"px",top:parseInt(this.handle.getStyle("top"))+this.borderWidth()+"px"})):"left"===this.alignment?(t.left+=this.handleSize.width,t.top+=this.handleSize.height,this.controls.setStyle({width:t.left+"px",height:t.top+"px"})):"center"===this.alignment&&(t.left+=this.handleSize.width+this.borderWidth(),t.top+=this.handleSize.height+this.borderWidth(),this.controls.setStyle({left:Math.floor((this.imageDimensions.width-t.left)/2)+"px",width:t.left-this.borderWidth()+"px",height:t.top-this.borderWidth()+"px"})),this.setInformation(!0)},dragEnd:function(){this.dragging=!1,Wysija.locks.dragging=!1;var t=Wysija.get(this.element.up(".wysija_block")||this.element.up(".wysija_header")||this.element.up(".wysija_footer"));t.block.element.removeClassName("dragging"),t.block.contents!==undefined&&t.block.contents.isEmpty()&&t.block.contents.getTextArea().setStyle({height:""}),$$("body")[0].setStyle({cursor:""});var e=this.constraints[this.alignment].minWidth,i=(this.constraints[this.alignment].minHeight,this.controls.getWidth()),s=this.controls.getHeight();i<e&&(i=e),this.setDimensions(i,s),this.handle.writeAttribute("style",""),"right"===this.alignment?(this.controls.insert(this.handle),this.controls.writeAttribute("style",""),this.element.writeAttribute("style",""),this.element.setStyle({height:s+"px"})):"center"===this.alignment?(this.controls.writeAttribute("style",""),this.element.setStyle({width:i+"px",height:s+"px"})):(this.element.writeAttribute("style",""),this.element.setStyle({height:s+"px"})),Wysija.hideTools(),this.element.fire("drag:end")},setDimensions:function(t,e){t=t===undefined?this.maxWidth():parseInt(t,10),e=e===undefined?(t/this.ratio*1e3).round()/1e3:parseInt(e,10);var i=this.getImageElement();i.writeAttribute("width",t),i.writeAttribute("height",e),this.controls.setStyle({width:t-this.borderWidth()+"px",height:e-this.borderWidth()+"px"})},borderWidth:function(){return 2},getControls:function(){return this.element.down(".resize-controls")},getInformation:function(){return this.controls.down(".resize-info")},setInformation:function(t){if(t===undefined&&(t=!1),this.controls=this.getControls(),this.controls!==undefined&&(this.information=this.getInformation(),this.information!==undefined)){if(t)var e=this.controls.getDimensions();else e=this.element.getDimensions();this.information!==undefined&&this.information.update("#{width} x #{height}".interpolate(e))}}};Wysija.Image=Class.create(Wysija.Content,WysijaImageAbstract),Wysija.BannerImage=Class.create(Wysija.Banner,WysijaImageAbstract);var WysijaGalleryItemAbstract={initialize:function(t){return info("gallery item -> init"),this.element=$(t),this.params=new Hash,this},save:function(){return this.isEmpty()?null:{src:this.getImageElement().readAttribute("src"),width:parseInt(this.getImageElement().readAttribute("width")),height:parseInt(this.getImageElement().readAttribute("height")),url:this.params.get("url"),alt:this.params.get("alt"),cellWidth:parseInt(this.getImageContainer().getWidth()),cellHeight:parseInt(this.getImageContainer().getHeight())}},draw:function(){return this.customDraw()+this.customTools()},customDraw:function(){this.getOptions().get("elementSrc")===undefined&&this.setOptions({elementSrc:"",elementRatio:1.48,elementClass:"empty",elementHeight:135,elementWidth:200});var t=this.getOptions();return this.getImageElement()!==undefined&&t.set("elementId",this.getImageElement().identify()),'<img class="image_placeholder #{elementClass}" id="#{elementId}" src="#{elementSrc}" height="#{elementHeight}" width="#{elementWidth}" />'.interpolate(t)},customTools:function(){return"empty"===this.getOptions().get("elementClass")?"":'<ul class="wysija_tools"><li><a href="javascript:;" title="'+Wysija_i18n.addImageLink+'" class="add-link"><span></span></a></li><li><a href="javascript:;" title="'+Wysija_i18n.removeImageLink+'" class="remove-link"><span></span></a></li><li><a href="javascript:;" title="'+Wysija_i18n.removeImage+'" class="remove"><span></span></a></li></ul>'},setupTools:function(){this.tools=this.getTools(),this.tools&&(this.addLinkButton=this.tools.down(".add-link"),this.addLinkButton.observe("click",function(){this.addLink()}.bind(this)),this.removeLinkButton=this.tools.down(".remove-link"),this.removeLinkButton.observe("click",function(){this.removeLink()}.bind(this)),this.removeButton=this.tools.down(".remove"),this.removeButton.observe("click",function(){this.remove(),this.removeButton.stopObserving("click")}.bind(this)))},getTools:function(){return this.element.down(".wysija_tools")},hideTools:function(){this.getTools().hide(),Wysija.locks.showingTools=!1},showTools:function(){this.getTools().show(),Wysija.locks.showingTools=!0},remove:function(){info("gallery item -> remove"),this.element.fire("image:remove")},setup:function(){return info("gallery item -> setup"),this.setupControls(),this.setupTools(),this.getParameters(),this},getParameters:function(){info("gallery item -> get parameters");var t=this.element.down(".wysija_params");if(t!==undefined&&0===this.params.keys().length){var e=$F(t.down('input[name="url"]'));""!=e&&this.params.set("url",e);var i=$F(t.down('input[name="alt"]'));""!=i&&this.params.set("alt",i)}return this},getImageContainer:function(){return this.element},getImageElement:function(){return this.element.down("img")},isEmpty:function(){return this.getImageElement().hasClassName("empty")},setEmpty:function(t){this.getImageContainer()[t?"addClassName":"removeClassName"]("empty")},setPosition:function(t){this.element.writeAttribute("wysija_position",t)}};Wysija.GalleryImage=Class.create(Wysija.Gallery,WysijaGalleryItemAbstract);var WysijaTextAbstract={initialize:function(t){return this.element=$(t),this.alignment=this.getDefaultAlignment(),this},save:function(){return this.isEmpty()?null:{value:Base64.encode(this.getTextArea().innerHTML)}},draw:function(){return info("text -> draw"),this.customDraw()+this.customTools()},customDraw:function(){info("text -> custom draw");var t=this.getOptions();return this.getTextArea()!==undefined&&t.set("elementId",this.getTextArea().identify()),t.get("elementText")===undefined?(t.set("placeholderText",Wysija_i18n.drop_block_here),'<div class="text_placeholder empty" id="#{elementId}">#{placeholderText}</div>'.interpolate(this.getOptions())):'<div class="wysija_editable" id="#{elementId}">#{elementText}</div>'.interpolate(this.getOptions())},makeDroppable:function(){this.isDroppable()&&Droppables.add(this.getTextArea().identify(),Wysija.textDropOptions)},removeDroppable:function(){Droppables.remove(this.getTextArea().identify())},hasContent:function(){return this.getTextArea()!==undefined},isDroppable:function(){return this.getTextArea().hasClassName("text_placeholder")},isEmpty:function(){return this.getTextArea().hasClassName("empty")},isEditing:function(){return this.element.hasClassName("wysija_editing")},setup:function(){info("text -> setup"),this.setupEditor(),this.setAlignment(this.getDefaultAlignment()),this.setupTools(),this.makeDroppable()},setAlignment:function(t){return info("text -> setAlignment = "+t),this.alignment=t,!1===this.isEmpty()&&this.disableEditor(),this},getDefaultAlignment:function(){return this.element.up(".wysija_content").readAttribute("wysija_align")||Wysija.defaults.contentAlignment},setBlockAlignment:function(t){info("text -> set block alignment to : "+t),Wysija.get(this.getBlock()).block.setBlockAlignment(t)},setupEditor:function(){info("text -> setupEditor"),this.getTextContainer().observe("click",this.enableEditor.bind(this))},customTools:function(){return this.getOptions().get("elementText")===undefined?"":'<ul class="wysija_tools"><li><a href="javascript:;" title="'+Wysija_i18n.removeText+'" class="remove"><span></span></a></li></ul>'},setupTools:function(){this.tools=this.getTools(),this.tools&&(this.element.observe("mouseover",function(){!0!==this.isEditing()&&!0!==Wysija.locks.dragging&&!0!==Wysija.locks.selectingColor&&!0!==Wysija.locks.showingTools&&this.showTools()}.bind(this)),this.element.observe("mouseout",function(){!0!==Wysija.locks.selectingColor&&this.hideTools()}.bind(this)),this.removeButton=this.tools.down(".remove"),this.removeButton.observe("click",function(){this.remove(),this.removeButton.stopObserving("click")}.bind(this)))},getTools:function(){return this.element.down(".wysija_tools")},hideTools:function(){this.getTools()!==undefined&&this.getTools().hide()},showTools:function(){this.getTools()!==undefined&&this.getTools().show()},remove:function(){info("text -> remove"),this.element.fire("text:remove")},enableEditor:function(){!this.isEditing()&&this.element.getElementsByClassName("wysija_editable").length&&(info("text -> enableEditor"),Wysija.hideEditors(),this.element.addClassName("wysija_editing"),tinyMCE.execCommand("mceAddControl",!1,this.getTextArea().identify()),this.element.fire("editor:enable"))},disableEditor:function(){!1!==this.isEditing()&&(info("text -> disableEditor"),this.element.removeClassName("wysija_editing"),tinyMCE.execCommand("mceRemoveControl",!1,this.getTextArea().identify()),this.element.fire("editor:disable"))},setFocus:function(){info("text -> setFocus"),this.enableEditor()},getTextContainer:function(){return this.element},getTextArea:function(){return this.element.down(".wysija_editable")||this.getTextPlaceholder()},getTextPlaceholder:function(){return this.element.down(".text_placeholder")},getTextEditor:function(){return tinymce.get(this.getTextArea().identify())},isAlone:function(){return this.getTextContainer().hasClassName("alone")},setAlone:function(t){this.getTextContainer()[t?"addClassName":"removeClassName"]("alone")}};Wysija.Text=Class.create(Wysija.Content,WysijaTextAbstract),Wysija.Divider=Class.create(Wysija.Block,{initialize:function(t){return this.element=$(t),this.setOptions(this.getCustomData("divider")),this},save:function(){return this.getDivider()===undefined?null:{src:this.getDivider().readAttribute("src"),width:parseInt(this.getDivider().readAttribute("width")),height:parseInt(this.getDivider().readAttribute("height"))}},draw:function(){this.element.childElements().last().insert(this.customDraw())},customDraw:function(){return info("divider -> custom draw"),this.getOptions().get("elementSrc")===undefined&&this.setOptions({elementSrc:"",elementHeight:1,elementWidth:564}),'<img class="divider" src="#{elementSrc}" height="#{elementHeight}" width="#{elementWidth}" />'.interpolate(this.getOptions())},customControls:function(){return""},setup:function(){this.setupControls()},getContainer:function(){return this.element.down(".wysija_divider")},getDivider:function(){return this.getContainer().down("img")}}),Wysija.Raw=Class.create(Wysija.Block,{initialize:function(t){return this.element=$(t),this.setOptions({elementRaw:""}),this},save:function(){return this.getRaw()===undefined?null:{raw:Base64.encode(this.getRaw().innerHTML)}},draw:function(){this.element.childElements().last().insert(this.customDraw())},customDraw:function(){info("raw -> custom draw");var t=this.getOptions();return this.getRaw()!==undefined&&t.set("elementId",this.getRaw().identify()),t.get("elementRaw")===undefined?'<div class="raw empty" id="#{elementId}"></div>'.interpolate(this.getOptions()):'<div class="raw" id="#{elementId}">#{elementRaw}</div>'.interpolate(this.getOptions())},customControls:function(){return""},setup:function(){this.setupControls()},getContainer:function(){return this.element.down(".wysija_raw")},getRaw:function(){return this.getContainer().down(".raw")}}),Wysija.Post=Class.create(Wysija.Block,{initialize:function(t){return info("post -> init"),this.element=$(t),this},draw:function(){WysijaPopup.open(Wysija_i18n.articleSelectionTitle,WysijaPopup.formatURI(wysijaAJAX.adminurl,"page=wysija_campaigns&action=articles"),this.success.bind(this),this.cancel.bind(this))},success:function(t){Wysija.get(this.element).block.replaceBlock(Base64.decode(t)),Wysija.init()},cancel:function(){Wysija.get(this.element).block.removeBlock(!1)}}),Wysija.AutoPost=Class.create(Wysija.Block,{initialize:function(t){return info("autopost -> init"),this.element=$(t),this},draw:function(){info("autopost -> draw")},setup:function(){info("autopost -> setup"),this.setupControls()},save:function(){info("autopost -> save");var t={};return this.getParameters(),t.params=this.params,t},getParameters:function(){info("autopost -> get parameters"),this.params=[];var t=this.element.down(".wysija_params");return t!==undefined&&t.select("input").each(function(t){this.params.push($H({key:t.name,value:t.value}))}.bind(this)),this},getControls:function(){return this.element.down(".wysija_controls")},setupControls:function(){return this.controls=this.getControls(),this.controls&&(this.element.observe("mouseover",function(){!0!==Wysija.locks.dragging&&!0!==Wysija.locks.selectingColor&&!0!==Wysija.locks.showingTools&&(this.element.addClassName("hover"),this.showControls(),this.element.down(".wysija_settings").show())}.bind(this)),this.element.observe("mouseout",function(){!0!==Wysija.locks.dragging&&!0!==Wysija.locks.selectingColor&&(this.hideControls(),this.element.down(".wysija_settings").hide())}.bind(this)),this.removeButton=this.controls.down(".remove"),this.removeButton.observe("click",function(){this.remove(),this.removeButton.stopObserving("click")}.bind(this)),this.settingsButton=this.element.down(".settings"),this.settingsButton.observe("click",function(){this.editSettings()}.bind(this))),this},editSettings:function(){this.getParameters();var t=this.formatParameters();WysijaPopup.open(Wysija_i18n.autoPostSettingsTitle,wysijaAJAX.adminurl+"?page=wysija_campaigns&action=autopost&"+t,this.callback.bind(this))},callback:function(t){Wysija.get(this.element).block.replaceBlock(Base64.decode(t)),Wysija.init()},formatParameters:function(){var e=["autopost_count="+$$(".wysija_auto-post").length,"autopost_type="+$("wysija_widgets_settings").down(".autopost").innerHTML];return this.params!==undefined&&0<this.params.length&&(this.params.each(function(t){e.push(t.get("key")+"="+t.get("value"))}),e=e.join("&")),e},loadContent:function(){var t=this.element.previousSiblings();if(0<t.length){var e=[];t.each(function(t){"auto-post"===t.readAttribute("wysija_type")&&t.down('input[name="post_ids"]')!==undefined&&e.push(t.down('input[name="post_ids"]').value)}),0<e.length&&(e=e.join(","))}this.getParameters();var i=this.formatParameters();e!==undefined&&0<e.length&&(i+="&exclude="+e);var s=this;wysijaAJAX.task="load_auto_post",wysijaAJAX.wysijaData=i,new Ajax.Request(wysijaAJAX.ajaxurl,{method:"post",asynchronous:!1,parameters:wysijaAJAX,onSuccess:function(t){s.getAutoPostElement().update(Base64.decode(t.responseJSON.result)),Wysija.setSettingsPosition.delay(1)},onFailure:function(){}})},remove:function(){info("autopost remove"),this.removeBlock(function(){Wysija.initAutoPost(),Wysija.setBackgroundColors()})},getAutoPostElement:function(){return this.element.down(".wysija_auto-post")},getSettings:function(){return this.element.down(".wysija_settings")}}),Wysija.PopupAutoPost=Class.create(Wysija.Block,{initialize:function(t){return this.element=$(t),this},draw:function(){var t=["autopost_count="+parseInt($$(".wysija_auto-post").length+1),"autopost_type="+$("wysija_widgets_settings").down(".autopost").innerHTML].join("&");WysijaPopup.open(Wysija_i18n.autoPostSettingsTitle,wysijaAJAX.adminurl+"?page=wysija_campaigns&action=autopost&"+t,this.success.bind(this),this.cancel.bind(this))},success:function(t){Wysija.get(this.element).block.replaceBlock(Base64.decode(t)),Wysija.init()},cancel:function(){Wysija.get(this.element).block.removeBlock(!1)}}),Wysija.PopupBookmark=Class.create(Wysija.Block,{initialize:function(t){return info("popup bookmark -> init"),this.element=$(t),this},draw:function(){var t="theme="+$("wysija_widgets_settings").down(".theme").innerHTML;WysijaPopup.open(Wysija_i18n.bookmarkSelectionTitle,wysijaAJAX.adminurl+"?page=wysija_campaigns&action=bookmarks&"+t,this.success.bind(this),this.cancel.bind(this))},success:function(t){t&&Wysija.get(this.element).block.replaceBlock(Base64.decode(t)),Wysija.init()},cancel:function(){Wysija.get(this.element).block.removeBlock(!1)}});var WysijaPopup={initialized:!1,opened:!1,locked:!1,title:null,url:null,popupWidth:null,popupHeight:null,onSuccess:null,onCancel:null,setSize:function(t,e){return WysijaPopup.popupWidth=t,WysijaPopup.popupHeight=e,this},formatURI:function(t,e){return-1===t.indexOf("?")?t+"?"+e:t+"&"+e},init:function(){if(!1===WysijaPopup.initialized){info("init popup")
3
+ ;var t='<div id="wysija_popup_overlay"></div><div id="wysija_popup"><div id="wysija_popup_title"><h3></h3><a id="wysija_popup_close" href="javascript:;"></a></div><div id="wysija_popup_content" class="clearfix"><iframe id="wysija_popup_iframe" marginheight="0" marginwidth="0" frameborder="0"></iframe></div></div>';$$("body")[0].insert(t),$("wysija_popup").setStyle({visibility:"hidden"}),WysijaPopup.hideLoading(),WysijaPopup.hideOverlay(),$("wysija_popup_close").observe("click",WysijaPopup.cancel),$("wysija_popup_overlay").observe("click",function(t){"wysija_popup_overlay"===t.target.id&&WysijaPopup.cancel()}),WysijaPopup.initialized=!0,$("wysija_popup_iframe").observe("load",function(){null!==$(this).readAttribute("src")&&setTimeout(function(){WysijaPopup.opened=!0,WysijaPopup.setDimensions(),WysijaPopup.hideLoading(),WysijaPopup.showOverlay(),setTimeout(function(){$("wysija_popup").setStyle({visibility:"visible"})},101)},0)})}},lock:function(){WysijaPopup.locked=!0},unlock:function(){WysijaPopup.locked=!1},isLocked:function(){return WysijaPopup.locked},setPosition:function(){if(WysijaPopup.init(),!1!==WysijaPopup.opened){var t=$("wysija_popup").getDimensions(),e=document.viewport.getDimensions(),i=parseInt(Wysija.scroll.top+e.height/2-t.height/2-15,10),s=parseInt(Wysija.scroll.left+e.width/2-t.width/2,10);i<Wysija.scroll.top&&(i=parseInt(Wysija.scroll.top,10)),s<Wysija.scroll.left&&(s=parseInt(Wysija.scroll.left,10)),$("wysija_popup").setStyle({top:i+"px",left:s+"px"})}},setDimensions:function(){if(!1!==WysijaPopup.opened){var e=$("wysija_popup_iframe");if(null!==e){e.doc=null,e.contentDocument?e.doc=e.contentDocument:e.contentWindow?e.doc=e.contentWindow.document:e.document&&(e.doc=e.document);var i=0,s=0,n=document.viewport.getDimensions();setTimeout(function(){if($("wysija_popup_iframe").writeAttribute("width",null),$("wysija_popup_iframe").writeAttribute("height",null),null===WysijaPopup.popupWidth||null===WysijaPopup.popupHeight){var t=null;t=0<e.doc.querySelectorAll(".popup_content").length?WysijaPopup.getElementSize(e.doc.querySelectorAll(".popup_content")[0]):WysijaPopup.getElementSize(e.doc.getElementsByClassName(".popup_content")[0]),s=t.width,i=t.height}else s=WysijaPopup.popupWidth,i=WysijaPopup.popupHeight;i+50>n.height&&(i=n.height-50),$("wysija_popup").setStyle({width:s+"px",height:i+20+"px"}),$("wysija_popup_iframe").writeAttribute("width",s),$("wysija_popup_iframe").writeAttribute("height",i+20),WysijaPopup.setPosition()},100)}}},getElementSize:function(t){var e=t.currentStyle||window.getComputedStyle(t),i=t.offsetWidth;i+=parseInt(e.marginLeft),i+=parseInt(e.marginRight);var s=t.offsetHeight;return s+=parseInt(e.marginTop),{width:i,height:s+=parseInt(e.marginBottom)}},loadContent:function(t,e){$("wysija_popup_iframe").writeAttribute("src",e),$("wysija_popup_title").down("h3").update(t)},showOverlay:function(){$("wysija_popup_overlay").setStyle({visibility:"visible"})},showLoading:function(){$("wysija_popup_overlay").addClassName("loading")},hideOverlay:function(){$("wysija_popup_overlay").setStyle({visibility:"hidden"})},hideLoading:function(){$("wysija_popup_overlay").removeClassName("loading")},open:function(t,e,i,s){WysijaPopup.init(),WysijaPopup.showLoading(),WysijaPopup.showOverlay(),i!==undefined&&(WysijaPopup.onSuccess=i),s!==undefined&&(WysijaPopup.onCancel=s),WysijaPopup.loadContent(t,e)},success:function(t){null!==WysijaPopup.onSuccess&&WysijaPopup.onSuccess(t),WysijaPopup.close()},cancel:function(t){null!==WysijaPopup.onCancel&&WysijaPopup.onCancel(t),WysijaPopup.close()},close:function(){return!0!==WysijaPopup.isLocked()&&($("wysija_popup").writeAttribute("style",""),$("wysija_popup").setStyle({visibility:"hidden"}),WysijaPopup.hideLoading(),WysijaPopup.hideOverlay(),$("wysija_popup_iframe").writeAttribute("src",null),$("wysija_popup_iframe").writeAttribute("height",null),$("wysija_popup_iframe").writeAttribute("width",null),WysijaPopup.onSuccess=null,WysijaPopup.onCancel=null,WysijaPopup.popupWidth=null,WysijaPopup.popupHeight=null,WysijaPopup.opened=!1)}};Wysija.DraggableItem=Class.create({initialize:function(t){this.elementType=$(t).readAttribute("wysija_type"),this.element=$(t).down()||$(t),this.clone=null,!1===t.hasClassName("wysija_item")&&(this.elementType="block_image")},STYLES:new Template("position: absolute; top: #{top}px; left: #{left}px;"),cloneElement:function(){var t=this.element.clone(),e=this.element.cumulativeOffset();if(this.element.hasClassName("wysija_item")){var i=this.getList(),s=this.STYLES.evaluate({top:e.top-i.scrollTop,left:e.left-i.scrollLeft});t.addClassName("wysija_widget"),t.addClassName(this.elementType)}else{s=this.STYLES.evaluate({top:e.top,left:e.left,width:this.element.getWidth()+"px",height:this.element.getHeight()+"px"});t.writeAttribute("wysija_height",this.element.readAttribute("wysija_height")),t.writeAttribute("wysija_width",this.element.readAttribute("wysija_width")),t.writeAttribute("wysija_src",this.element.readAttribute("wysija_src")),this.element.hasClassName("image_placeholder")&&t.writeAttribute("wysija_parent",(this.element.up(".wysija_block")||this.element.up(".wysija_header")||this.element.up(".wysija_footer")).identify()),t.addClassName("wysija_widget image")}return t.setStyle(s),"image"===this.elementType||"block_image"===this.elementType?t.writeAttribute({elementRatio:this.calculateRatio(),wysija_type:"image"}):t.innerHTML=this.element.innerHTML,t},getOffset:function(){return this.element.offsetTop-this.getList().scrollTop},getList:function(){return this.element.up("ul")},insert:function(){$$("body")[0].insert(this.clone)},onMousedown:function(t){if("block_image"!==this.elementType||"img"===this.element.tagName.toLowerCase()&&"span"!==t.target.tagName.toLowerCase()){null===this.clone&&(this.clone=this.cloneElement(),this.insert());var e=new Draggable(this.clone,{scroll:window,isImage:!1,onStart:function(t,e){this.isImage=t.element.hasClassName("wysija_widget image"),!0===this.isImage&&t.element.setStyle({left:e.pageX+"px",top:e.pageY+"px"}),Wysija.locks.dragging=!0,Wysija.hideTools(),Wysija.hideBlockControls(),Droppables.togglePlaceholders(t,e)},onDrag:function(t,e){Droppables.togglePlaceholders(t,e)},snap:function(t,e,i){return!0===this.isImage?[t+i.offset[0],e+i.offset[1]]:[t,e]},onEnd:function(t){t.destroy(),t.element.remove(),Wysija.locks.dragging=!1,Droppables.hidePlaceholders()},starteffect:Prototype.emptyFunction,endeffect:Prototype.emptyFunction});return e.initDrag(t),e.startDrag(t),e}},calculateRatio:function(){return(this.element.readAttribute("wysija_width")/this.element.readAttribute("wysija_height")*1e3).round()/1e3}}),Object.extend(Wysija.DraggableItem,Observable).observe('a[class="wysija_item"], .wysija_image'),Wysija.ImagePreview=Class.create({initialize:function(t){this.element=$(t)},onMouseover:function(){if(!0!==Wysija.locks.dragging){var t=this.element.down("img").clone();if(""!==t.readAttribute("wysija_src")){var e=parseInt(t.readAttribute("wysija_height"),10),i=parseInt(t.readAttribute("wysija_width"),10),s=(i/e*1e3).round()/1e3;275<i&&(i=275),e=(i/s).round(),t.writeAttribute("src",t.readAttribute("wysija_src")),$("wj_images_preview").insert(t),$("wj_images_preview").down("img").writeAttribute({width:i,height:e}),$("wj_images_preview").show()}}},onMouseout:function(){$("wj_images_preview").update(""),$("wj_images_preview").hide()}}),Wysija.ThemePreview=Class.create({initialize:function(t){this.element=$(t)},onMouseover:function(){if(!0!==Wysija.locks.dragging){var t=this.element.down("img").clone();if(""!==t.readAttribute("wysija_src")){var e=t.readAttribute("wysija_height"),i=t.readAttribute("wysija_width"),s=(i/e*1e3).round()/1e3;275<i&&(i=275),e=(i/s).round(),t.writeAttribute("src",t.readAttribute("wysija_src")),$("wj_themes_preview").insert(t),$("wj_themes_preview").down("img").writeAttribute("width",i),$("wj_themes_preview").down("img").writeAttribute("height",e),$("wj_themes_preview").show()}}},onMouseout:function(){$("wj_themes_preview").update(""),$("wj_themes_preview").hide()}}),Object.extend(Wysija.ThemePreview,Observable).observe(".wj_themes li a"),Wysija.TextLinks=Class.create({initialize:function(t){this.element=$(t)},onClick:function(t){return t.stop(),!1}}),Object.extend(Wysija.TextLinks,Observable).observe(".wysija_editable a"),window.document.observe("mousedown",function(t){if(0<tinymce.editors.length){if("mceModalBlocker"===t.target.id)return;if(t.target.hasClassName("mceClose"))return;if(t.target.hasClassName("mceMenu")||t.target.up(".mceMenu")!==undefined)return;t.target.up(".wysija_text")===undefined&&t.target.up(".wysija_editable")===undefined&&!1===t.target.hasClassName("mceText")&&(Wysija.hideEditors(),Wysija.autoSave())}}),document.on("image:drop",function(t,e){var i,s=Wysija.get(e.up(".wysija_block")||e.up(".wysija_header")||e.up(".wysija_footer"));i=t.memo.elementData,delete t.memo.elementData,s.block.image.removeDroppable(),s.block.image.setOptions(t.memo),s.block.getImageContainer().writeAttribute("style",""),s.block.getImageContainer().update(s.block.image.draw()),s.block.image.setup(),"object"==typeof i&&s.block.image.setData(i),s.block.contents===undefined?s.block.image.setAlone(!0):(s.block.contents.setAlone(s.block.image.isEmpty()),s.block.image.setAlone(s.block.contents.isEmpty()),s.block.setBlockAlignment(s.block.contents.getDefaultAlignment())),Wysija.hideTools(),s.block.image.setEmpty(!1),s.block.constrainSize(),Wysija.hideTools(),Wysija.autoSave()}),document.on("text:drop",function(t,e){var i=Wysija.get(e.up(".wysija_block"));i.block.contents.removeDroppable(),i.block.contents.setOptions(t.memo),i.block.getTextContainer().update(i.block.contents.draw()),i.block.contents.setup(),!1===i.block.image.isEmpty()?(i.block.image.setAlone(!1),i.block.setBlockAlignment(i.block.image.alignment)):i.block.contents.setAlone(!0),i.block.constrainSize(),i.block.contents.setFocus(),Wysija.hideControls(),Wysija.hideTools(),Wysija.autoSave()}),document.on("image:remove",function(t,e){var i=Wysija.get(e.up(".wysija_block")||e.up(".wysija_header")||e.up(".wysija_footer"));i.block.image.hideTools(),i.block.image.removeDroppable(),i.block.image.setOptions({elementSrc:undefined}),i.block.image.element.update(i.block.image.draw()),i.block.image.makeDroppable(),i.block.image.setEmpty(!0),i.block.contents!==undefined&&!1===i.block.contents.isEmpty()&&i.block.contents.setAlone(!0),i.block.constrainSize(),i.block.remove()}),document.on("text:remove",function(t,e){var i=Wysija.get(e.up(".wysija_block"));i.block.contents.getTextContainer().stopObserving("click"),i.block.contents.removeDroppable(),i.block.contents.setOptions({elementText:undefined}),i.block.contents.element.update(i.block.contents.draw()),i.block.contents.makeDroppable(),!1===i.block.image.isEmpty()&&i.block.image.setAlone(!0),i.block.constrainSize(),i.block.remove()}),document.on("editor:enable",function(t,e){Wysija.get(e.up(".wysija_block")).block.constrainSize()}),document.on("editor:disable",function(t,e){Wysija.get(e.up(".wysija_block")).block.constrainSize()}),document.on("block:insert",function(t,e){var i=Wysija.get(e);"content"===i.elementType&&(i.block.image.setAlone(i.block.contents.isEmpty()),i.block.contents.setAlone(i.block.image.isEmpty()),i.block.image.setEmpty(i.block.image.isEmpty()),i.block.constrainSize(),Wysija.hideTools())}),document.on("drag:end",function(t,e){Wysija.get(e.up(".wysija_block")||e.up(".wysija_header")||e.up(".wysija_footer")).block.constrainSize()}),document.observe("dom:loaded",function(){$("wysija_toggle_images").observe("click",function(){return!0===Wysija.toggleImages()?this.addClassName("on").removeClassName("off"):this.addClassName("off").removeClassName("on"),!1})});
js/wysija-form-editor.js CHANGED
@@ -1 +1 @@
1
- "use strict";function info(e){if(WysijaForm.options.debug!==!1){window.console&&console.log||!function(){for(var e=function(){},t=["assert","clear","count","debug","dir","dirxml","error","exception","group","groupCollapsed","groupEnd","info","log","markTimeline","profile","profileEnd","markTimeline","table","time","timeEnd","timeStamp","trace","warn"],o=t.length,i=window.console={};o--;)i[t[o]]=e}();try{console.log("[INFO] "+e)}catch(t){}}}Object.extend(Prototype.Browser,{ie6:/MSIE (\d+\.\d+);/.test(navigator.userAgent)&&6===Number(RegExp.$1)?!0:!1,ie7:/MSIE (\d+\.\d+);/.test(navigator.userAgent)&&7===Number(RegExp.$1)?!0:!1,ie8:/MSIE (\d+\.\d+);/.test(navigator.userAgent)&&8===Number(RegExp.$1)?!0:!1,ie9:/MSIE (\d+\.\d+);/.test(navigator.userAgent)&&9===Number(RegExp.$1)?!0:!1}),Event.cacheDelegated={},Object.extend(document,function(){function e(e){return s[e]=s[e]||{}}function t(t,o){var i=e(t);return i[o]=i[o]||[]}function o(e,o,i){var n=t(e,o);return n.find(function(e){return e.handler===i})}function i(t,i,n){var s=e(t);if(!s[i])return!1;var a=o(t,i,n);return s[i]=s[i].without(a),a}function n(e,o,i,n){var s,a=t(e,o);return a.pluck("handler").include(i)?!1:(s=function(t){var o=t.findElement(e);o&&i.call(n||o,t,o)},s.handler=i,a.push(s),s)}var s=Event.cacheDelegated;return{delegate:function(e,t){var o=n.apply(null,arguments);return o&&document.observe(t,o),document},stopDelegating:function(o,n){var a=arguments.length;switch(a){case 2:t(o,n).each(function(e){document.stopDelegating(o,n,e.handler)});break;case 1:Object.keys(e(o)).each(function(e){document.stopDelegating(o,e)});break;case 0:Object.keys(s).each(function(e){document.stopDelegating(e)});break;default:var r=i.apply(null,arguments);r&&document.stopObserving(n,r)}return document}}}());var Observable=function(){function e(e,t){return e=e.substring(2),t&&(e=t+":"+e),e.underscore().split("_").join(":")}function t(t){var i=t.prototype,n=i.namespace;return Object.keys(i).grep(/^on/).inject($H(),function(s,a){return"onDomLoaded"===a?s:(s.set(e(a,n),o(i[a],t)),s)})}function o(e,t){return function(o){return e.call(new t(this),o,o.memo)}}function i(e,t){$$(e).each(function(e){new t(e).onDomLoaded()})}return{observe:function(e){if(this.handlers||(this.handlers={}),!this.handlers[e]){var o=this;this.prototype.onDomLoaded&&(document.loaded?i(e,o):document.observe("dom:loaded",i.curry(e,o))),this.handlers[e]=t(o).each(function(t){document.delegate(e,t.key,t.value)})}},stopObserving:function(e){this.handlers&&this.handlers[e]&&(this.handlers[e].each(function(t){document.stopDelegating(e,t.key,t.value)}),delete this.handlers[e])}}}();Object.extend(Droppables,{deactivate:Droppables.deactivate.wrap(function(e,t,o){return t.onLeave&&t.onLeave(o,t.element),e(t)}),activate:Droppables.activate.wrap(function(e,t,o){return t.onEnter&&t.onEnter(o,t.element),e(t)}),show:function(e,t){if(this.drops.length){var o,i=[];this.drops.each(function(o){Droppables.isAffected(e,t,o)&&i.push(o)}),i.length>0&&(o=Droppables.findDeepestChild(i)),this.last_active&&this.last_active!==o&&this.deactivate(this.last_active,t),o&&(Position.within(o.element,e[0],e[1]),o.onHover&&o.onHover(t,o.element,Position.overlap(o.overlap,o.element)),o!==this.last_active&&Droppables.activate(o,t))}},displayArea:function(){this.drops.length&&(WysijaForm.hideBlockControls(),this.drops.each(function(e){e.element.hasClassName("block_placeholder")&&(e.element.resizeHeight(30),e.element.addClassName("active"))}))},hideArea:function(){this.drops.length&&this.drops.each(function(e){e.element.hasClassName("block_placeholder")?(e.element.resizeHeight(0),e.element.removeClassName("active")):e.element.hasClassName("image_placeholder")?(e.element.removeClassName("active"),e.element.up().removeClassName("active")):e.element.hasClassName("text_placeholder")&&e.element.removeClassName("active")})},reset:function(e){this.last_active&&this.deactivate(this.last_active,e)}}),Element.addMethods({resizeHeight:function(e,t,o,i){return new Effect.Morph(e,{style:{height:parseInt(t,10)+"px"},afterUpdate:o,afterFinish:i,duration:.1})},scrollToCenter:function(e,t){var e=$(e),o=Object.extend({duration:.2,offset:-document.viewport.getHeight()/2},t||{});return Effect.ScrollTo(e,o),e}});var WysijaForm={version:"0.4",options:{container:"wysija_form_editor",wrapper:"wysija_form_wrapper",body:"wysija_form_body",toolbar:"wysija_form_toolbar",templates:"wysija_widget_templates",debug:!1,css:"wj_css"},toolbar:{effect:null,x:null,y:null,top:null,left:null},scroll:{top:0,left:0},flags:{doSave:!1},locks:{dragging:!1,selectingColor:!1,showingTools:!1},autoSave:function(){WysijaForm.flags.doSave===!1&&(WysijaForm.flags.doSave=!0)},encodeHtmlValue:function(e){return e.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;")},stripHtmlValue:function(e){return e.replace(/(<([^>]+)>)/gi,"")},save:function(){var e,t=1,o={},i=$H();i.set("version",WysijaForm.version);var n=$("wysija-form-settings").serialize(!0);void 0!==n.success_message&&n.success_message.length>0&&(n.success_message=WysijaForm.encodeHtmlValue(n.success_message)),i.set("settings",n);var s=$H();return WysijaForm.getBlocks().each(function(i){e=i.block,e.save&&(o=e.save(),null!==o&&(o.position=t,o.type=e.element.readAttribute("wysija_type"),o.field=e.element.readAttribute("wysija_field"),o.name=WysijaForm.encodeHtmlValue(e.element.readAttribute("wysija_name")),s.set("block-"+t,o),t++))}),i.set("body",s),Base64.encode(Object.toJSON(i).gsub('\\"','"').gsub('"[{',"[{").gsub('}]"',"}]"))},init:function(){info("init -> set scroll offsets"),WysijaForm.setScrollOffsets(),info("init -> make droppable"),WysijaForm.makeDroppable(),info("init -> make sortable"),WysijaForm.makeSortable(),info("init -> hide controls"),WysijaForm.hideControls(),info("init -> hide settings"),WysijaForm.hideSettings(),info("init -> init toolbar & settings"),WysijaForm.initToolbar(),WysijaForm.setSettingsPosition(),info("init -> set toolbar position"),WysijaForm.setToolbarPosition(),info("init -> toggle widgets"),WysijaForm.toggleWidgets(),WysijaForm.initExport()},initExport:function(){$("form-export-links").select('a[class="expand-code"]').each(function(e){$(e).stopObserving("click"),$(e).observe("click",function(){$("form-export").select("textarea").invoke("hide"),$("export-"+$(e).readAttribute("title")).show()})}),$("form-export").select("textarea").invoke("hide")},hideExport:function(){$("form-export").hide()},showExport:function(){WysijaForm.initExport(),$("form-export").show()},toggleWidgets:function(){var e=($$('a[wysija_unique="1"]').collect(function(e){return $(e).identify()}),null),t=!1;$$('a[wysija_unique="1"]').invoke("removeClassName","disabled"),WysijaForm.getBlocks().each(function(o){void 0!==o.block&&(e=o.block.element.readAttribute("wysija_field"),1===$$("a#"+e+'[wysija_unique="1"]').length&&($$("a#"+e+'[wysija_unique="1"]')[0].addClassName("disabled"),"list"===e&&(t=!0)))}),$("list-selection")[t===!0?"hide":"show"]()},setBlockPositions:function(e,t){WysijaForm.locks.dragging=!1;var o=1;if(WysijaForm.getBlocks().each(function(e){e.setPosition(o++),void 0!==e.block&&e.block.element.setStyle({zIndex:""})}),void 0!==t){var i=$(t.element.readAttribute("wysija_placeholder")),n=t.element.previous(".block_placeholder");null!==i&&(t.element.insert({before:i}),void 0!==t.element.next()&&t.element.next().hasClassName("wysija_form_block")&&void 0!==n&&t.element.insert({after:n}))}WysijaForm.autoSave()},setScrollOffsets:function(){WysijaForm.scroll=document.viewport.getScrollOffsets()},hideSettings:function(){$(WysijaForm.options.wrapper).select(".wysija_settings").invoke("hide")},setSettingsPosition:function(){var e=document.viewport.getHeight(),t=5;$(WysijaForm.options.wrapper).select(".wysija_settings").each(function(o){var i=o.up(".wysija_form_block").getDimensions(),n=o.up(".wysija_form_block").cumulativeOffset(),s=n.top<=WysijaForm.scroll.top+e?!0:!1,a=5,r=a;if(s){{parseInt(WysijaForm.scroll.top+(e/2-o.getHeight()/2),10),parseInt(n.top-t,10),parseInt(n.top+i.height-t,10)}r=parseInt(i.height/2-o.getHeight()/2,10)}new Effect.Move(o,{x:parseInt(i.width/2-o.getWidth()/2),y:r,mode:"absolute",duration:.2})})},initToolbar:function(){Event.stopObserving("scroll"),Event.observe(window,"scroll",function(){WysijaForm.setScrollOffsets(),WysijaForm.setSettingsPosition()})},initToolbarPosition:function(){null===WysijaForm.toolbar.top&&(WysijaForm.toolbar.top=parseInt($(WysijaForm.options.container).positionedOffset().top)),null===WysijaForm.toolbar.left&&(WysijaForm.toolbar.left=parseInt($(WysijaForm.options.container).positionedOffset().left)),null===WysijaForm.toolbar.x&&(WysijaForm.toolbar.x=parseInt(WysijaForm.toolbar.left+$(WysijaForm.options.container).getDimensions().width+15)),null===WysijaForm.toolbar.y&&(WysijaForm.toolbar.y=parseInt(WysijaForm.toolbar.top))},setToolbarPosition:function(){WysijaForm.initToolbarPosition(),$(WysijaForm.options.toolbar).setStyle({top:WysijaForm.toolbar.y+"px",left:WysijaForm.toolbar.x+"px",opacity:0}).fade({duration:1,from:0,to:1})},updateToolbarPosition:function(){WysijaForm.initToolbarPosition(),null!==WysijaForm.toolbar.effect&&WysijaForm.toolbar.effect.cancel(),WysijaForm.scroll.top>=WysijaForm.toolbar.top-20?(WysijaForm.toolbar.y=parseInt(20+WysijaForm.scroll.top),WysijaForm.toolbar.effect=new Effect.Move(WysijaForm.options.toolbar,{x:WysijaForm.toolbar.x,y:WysijaForm.toolbar.y,mode:"absolute",duration:.2})):$(WysijaForm.options.toolbar).setStyle({left:WysijaForm.toolbar.x+"px",top:WysijaForm.toolbar.top+"px"})},blockDropOptions:{accept:$w("wysija_form_item"),onEnter:function(e,t){$(t).addClassName("hover")},onLeave:function(e,t){$(t).removeClassName("hover")},onDrop:function(e,t){var o={};o.type=e.readAttribute("wysija_type"),o.field=e.readAttribute("wysija_field"),o.name=e.readAttribute("wysija_name"),o.element=e,t.fire("wjfe:item:drop",o),$(t).removeClassName("hover")}},hideControls:function(){try{return WysijaForm.getBlocks().invoke("hideControls")}catch(e){}},hideTools:function(){$$(".wysija_tools").invoke("hide"),WysijaForm.locks.showingTools=!1},instances:{},fields:{},get:function(e,t){void 0===t&&(t="block");var o=e.identify(),i=WysijaForm.instances[o]||new(WysijaForm[t.capitalize().camelize()])(o);return WysijaForm.instances[o]=i,i},makeDroppable:function(){Droppables.add("block_placeholder",WysijaForm.blockDropOptions)},makeSortable:function(){var e=$(WysijaForm.options.body);Sortable.create(e,{tag:"div",only:"wysija_form_block",scroll:window,handle:"handle",constraint:"vertical"}),Draggables.removeObserver(e),Draggables.addObserver({element:e,onStart:WysijaForm.startBlockPositions,onEnd:WysijaForm.setBlockPositions})},hideBlockControls:function(){$$(".wysija_controls").invoke("hide"),this.getBlockElements().invoke("removeClassName","hover")},getBlocks:function(){return WysijaForm.getBlockElements().map(function(e){return WysijaForm.get(e)})},getBlockElements:function(){return $(WysijaForm.options.wrapper).select(".wysija_form_block")},startBlockPositions:function(e,t){t.element.hasClassName("wysija_form_block")&&void 0!==t.element.previous(".block_placeholder")&&t.element.writeAttribute("wysija_placeholder",t.element.previous(".block_placeholder").identify()),WysijaForm.locks.dragging=!0},encodeURIComponent:function(e){var t=new RegExp(/^http[s]?:\/\//),o=t.exec(e);return null===o?encodeURIComponent(e).replace(/[!'()*]/g,escape):1===o.length?encodeURI(e).replace(/[!'()*]/g,escape):void 0}};WysijaForm.DraggableItem=Class.create({initialize:function(e){this.elementType=$(e).readAttribute("wysija_type"),this.element=$(e).down()||$(e),this.clone=this.cloneElement(),this.insert()},STYLES:new Template("position: absolute; top: #{top}px; left: #{left}px;"),cloneElement:function(){var e=this.element.clone(),t=this.element.cumulativeOffset(),o=this.getList(),i=this.STYLES.evaluate({top:t.top-o.scrollTop,left:t.left-o.scrollLeft});return e.setStyle(i),e.addClassName("wysija_form_widget"),e.addClassName(this.elementType),e.innerHTML=this.element.innerHTML,e},getOffset:function(){return this.element.offsetTop-this.getList().scrollTop},getList:function(){return this.element.up("ul")},insert:function(){$$("body")[0].insert(this.clone)},onMousedown:function(e){var t=new Draggable(this.clone,{scroll:window,onStart:function(){Droppables.displayArea(t)},onEnd:function(e){e.destroy(),e.element.remove(),Droppables.hideArea()},starteffect:function(e){new Effect.Opacity(e,{duration:.2,from:e.getOpacity(),to:.7})},endeffect:Prototype.emptyFunction});return t.initDrag(e),t.startDrag(e),t}}),Object.extend(WysijaForm.DraggableItem,Observable).observe('a[class="wysija_form_item"]'),WysijaForm.Block=Class.create({initialize:function(e){return info("block -> init"),this.element=$(e),this.block=new WysijaForm.Widget(this.element),this.block.makeBlockDroppable(),void 0!==this.block.setup&&this.block.setup(),this},getCustomData:function(e){return void 0!==this.element.down(".wysija_options."+e)?(info("got options for "+e),this.element.down(".wysija_options."+e).innerHTML.toQueryParams("&amp;")):(info("no options to get for "+e),null)},getOptions:function(){return this.options},setOptions:function(e){return void 0===e&&(e={}),void 0===this.options&&(this.options=new Hash),this.options=this.options.update(e),this},setPosition:function(e){this.element.writeAttribute("wysija_position",e)},hideControls:function(){this.getControls&&(this.element.removeClassName("hover"),this.getControls().hide())},showControls:function(){if(this.getControls){this.element.addClassName("hover");try{this.getControls().show()}catch(e){}}},makeBlockDroppable:function(){if(this.isBlockDroppableEnabled()===!1){var e=this.getBlockDroppable();Droppables.add(e.identify(),WysijaForm.blockDropOptions),e.addClassName("enabled")}},removeBlockDroppable:function(){if(this.isBlockDroppableEnabled()){var e=this.getBlockDroppable();Droppables.remove(e.identify()),e.removeClassName("enabled")}},isBlockDroppableEnabled:function(){var e=this.getBlockDroppable();return null===e?this.createBlockDroppable().hasClassName("enabled"):e.hasClassName("enabled")},createBlockDroppable:function(){return info("block -> createBlockDroppable"),this.element.insert({before:'<div class="block_placeholder"></div>'}),this.element.previous(".block_placeholder")},getBlockDroppable:function(){return void 0===this.element.previous()||this.element.previous().hasClassName("block_placeholder")===!1?null:this.element.previous()},getControls:function(){return this.element.down(".wysija_controls")},setupControls:function(){return this.controls=this.getControls(),this.controls&&(this.element.observe("mouseover",function(){WysijaForm.locks.dragging!==!0&&WysijaForm.locks.selectingColor!==!0&&WysijaForm.locks.showingTools!==!0&&(this.element.addClassName("hover"),this.showControls(),void 0!==this.element.down(".wysija_settings")&&this.element.down(".wysija_settings").show())}.bind(this)),this.element.observe("mouseout",function(){WysijaForm.locks.dragging!==!0&&WysijaForm.locks.selectingColor!==!0&&(this.hideControls(),void 0!==this.element.down(".wysija_settings")&&this.element.down(".wysija_settings").hide())}.bind(this)),this.element.hasClassName("static")===!1&&(this.removeButton=this.controls.down(".remove")||null,null!==this.removeButton&&this.removeButton.observe("click",function(){this.removeBlock(),this.removeButton.stopObserving("click")}.bind(this)),this.settingsButton=this.element.down(".settings")||null,null!==this.settingsButton&&this.settingsButton.observe("click",function(){this.editSettings()}.bind(this)))),this},setBackgroundColor:function(e){void 0!==e&&this.element.writeAttribute("wysija_bg_color",e);var t=this.element.readAttribute("wysija_bg_color");""===t?this.element.setStyle({backgroundColor:"transparent"}):null!==t&&this.element.setStyle({backgroundColor:"#"+t}),WysijaForm.autoSave()},removeBlock:function(e){info("block -> removeBlock"),delete WysijaForm.instances[this.element.identify()],this.element.blindUp({duration:.2,afterFinish:function(t){void 0!==t.element.next(".wysija_form_block")&&e!==!1&&WysijaForm.get(t.element.next(".wysija_form_block")).block.showControls(),void 0!==t.element.previous(".block_placeholder")&&t.element.previous(".block_placeholder").remove(),t.element.remove(),WysijaForm.setBlockPositions(),WysijaForm.toggleWidgets(),void 0!==e&&"function"==typeof e&&e()}})},setFocus:function(){this.element.scrollToCenter()}}),WysijaForm.Block.create=function(e,t){var o,i=$(WysijaForm.options.body),n=new Template('<div class="wysija_form_block" wysija_type="#{type}" wysija_field="#{field}" wysija_name="#{sanitized_name}">'+$(WysijaForm.options.templates).select('[wysija_type="'+e.type+'"][wysija_field="'+e.field+'"]')[0].innerHTML+"</div>");e.sanitized_name="",void 0!==e.name&&(e.sanitized_name=WysijaForm.encodeHtmlValue(e.name)),"block_placeholder"===t.identify()?(i.insert(n.evaluate(e)),o=i.childElements().last()):(t.insert({before:n.evaluate(e)}),o=t.previous(".wysija_form_block")),WysijaForm.makeSortable(),WysijaForm.setBlockPositions(),WysijaForm.setSettingsPosition(),setTimeout(function(){WysijaForm.toggleWidgets()},1)},document.observe("wjfe:item:drop",function(e){info("create block"),WysijaForm.Block.create(e.memo,e.target),info("hide controls"),WysijaForm.hideBlockControls()}),WysijaForm.Widget=Class.create(WysijaForm.Block,{initialize:function(e){return info("widget -> init"),this.element=$(e),this},setup:function(){info("widget -> setup"),this.setupControls()},save:function(){info("widget -> save");var e={};return this.getParameters(),e.params=this.params,e},getParameters:function(){info("widget -> get parameters"),this.params=$H();var e=this.element.down(".wysija_params");return void 0!==e&&e.select("input").each(function(e){this.params.set(e.name,e.value)}.bind(this)),this},getControls:function(){return this.element.down(".wysija_controls")},callback:function(e){this.element.replace(Base64.decode(e)),WysijaForm.init()},formatParameters:function(){this.getParameters();var e=[];return void 0!==this.params&&this.params.keys().length>0&&(this.params.each(function(t){e.push(t[0]+":"+t[1])}),e=e.join("|")),e},remove:function(){this.removeBlock()},editSettings:function(){var e=encodeURIComponent(this.formatParameters());WysijaPopup.open(this.element.readAttribute("wysija_name"),wysijaAJAX.adminurl+"?page=wysija_config&action=form_widget_settings&name="+WysijaForm.encodeURIComponent(this.element.readAttribute("wysija_name"))+"&type="+this.element.readAttribute("wysija_type")+"&field="+this.element.readAttribute("wysija_field")+"&params="+e,this.callback.bind(this))},getSettings:function(){return this.element.down(".wysija_settings")}}),document.observe("dom:loaded",WysijaForm.init);var WysijaPopup={initialized:!1,opened:!1,locked:!1,title:null,url:null,popupWidth:null,popupHeight:null,onSuccess:null,onCancel:null,setSize:function(e,t){return WysijaPopup.popupWidth=e,WysijaPopup.popupHeight=t,this},formatURI:function(e,t){return-1===e.indexOf("?")?e+"?"+t:e+"&"+t},init:function(){if(WysijaPopup.initialized===!1){info("init popup");var e='<div id="wysija_popup_overlay"></div><div id="wysija_popup"><div id="wysija_popup_title"><h3></h3><a id="wysija_popup_close" href="javascript:;"></a></div><div id="wysija_popup_content" class="clearfix"><iframe id="wysija_popup_iframe" marginheight="0" marginwidth="0" frameborder="0"></iframe></div></div>';$$("body")[0].insert(e),$("wysija_popup").setStyle({visibility:"hidden"}),WysijaPopup.hideLoading(),WysijaPopup.hideOverlay(),$("wysija_popup_close").observe("click",WysijaPopup.cancel),$("wysija_popup_overlay").observe("click",function(e){"wysija_popup_overlay"===e.target.id&&WysijaPopup.cancel()}),WysijaPopup.initialized=!0,$("wysija_popup_iframe").observe("load",function(){null!==$(this).readAttribute("src")&&setTimeout(function(){WysijaPopup.opened=!0,WysijaPopup.setDimensions(),WysijaPopup.hideLoading(),WysijaPopup.showOverlay(),setTimeout(function(){$("wysija_popup").setStyle({visibility:"visible"})},1)},0)})}},lock:function(){WysijaPopup.locked=!0},unlock:function(){WysijaPopup.locked=!1},isLocked:function(){return WysijaPopup.locked},setPosition:function(){if(WysijaPopup.init(),WysijaPopup.opened!==!1){var e=$("wysija_popup").getDimensions(),t=document.viewport.getDimensions(),o=parseInt(WysijaForm.scroll.top+t.height/2-e.height/2-15,10),i=parseInt(WysijaForm.scroll.left+t.width/2-e.width/2,10);o<WysijaForm.scroll.top&&(o=parseInt(WysijaForm.scroll.top,10)),i<WysijaForm.scroll.left&&(i=parseInt(WysijaForm.scroll.left,10)),$("wysija_popup").setStyle({top:o+"px",left:i+"px"})}},setDimensions:function(){if(WysijaPopup.opened!==!1){var e=$("wysija_popup_iframe");if(null!==e){e.doc=null,e.contentDocument?e.doc=e.contentDocument:e.contentWindow?e.doc=e.contentWindow.document:e.document&&(e.doc=e.document);var t=0,o=0,i=document.viewport.getDimensions();setTimeout(function(){if($("wysija_popup_iframe").writeAttribute("width",null),$("wysija_popup_iframe").writeAttribute("height",null),null===WysijaPopup.popupWidth||null===WysijaPopup.popupHeight){var n=null;n=e.doc.querySelectorAll(".popup_content").length>0?e.doc.querySelectorAll(".popup_content")[0].getBoundingClientRect():e.doc.getElementsByClassName("popup_content")[0].getBoundingClientRect(),o=n.width.ceil(),t=n.bottom.ceil()}else o=WysijaPopup.popupWidth,t=WysijaPopup.popupHeight;t+50>i.height&&(t=i.height-50),$("wysija_popup").setStyle({width:o+14+"px",height:t+14+"px"}),$("wysija_popup_iframe").writeAttribute("width",o+14),$("wysija_popup_iframe").writeAttribute("height",t+14),WysijaPopup.setPosition()},1)}}},loadContent:function(e,t){$("wysija_popup_iframe").writeAttribute("src",t),$("wysija_popup_title").down("h3").update(WysijaForm.encodeHtmlValue(e))},showOverlay:function(){$("wysija_popup_overlay").setStyle({visibility:"visible"})},showLoading:function(){$("wysija_popup_overlay").addClassName("loading")},hideOverlay:function(){$("wysija_popup_overlay").setStyle({visibility:"hidden"})},hideLoading:function(){$("wysija_popup_overlay").removeClassName("loading")},open:function(e,t,o,i){WysijaPopup.init(),WysijaPopup.showLoading(),WysijaPopup.showOverlay(),void 0!==o&&(WysijaPopup.onSuccess=o),void 0!==i&&(WysijaPopup.onCancel=i),WysijaPopup.loadContent(e,t)},success:function(e){null!==WysijaPopup.onSuccess&&WysijaPopup.onSuccess(e),WysijaPopup.close()},cancel:function(e){null!==WysijaPopup.onCancel&&WysijaPopup.onCancel(e),WysijaPopup.close()},close:function(){return WysijaPopup.isLocked()===!0?!1:($("wysija_popup").writeAttribute("style",""),$("wysija_popup").setStyle({visibility:"hidden"}),WysijaPopup.hideLoading(),WysijaPopup.hideOverlay(),$("wysija_popup_iframe").writeAttribute("src",null),WysijaPopup.onSuccess=null,WysijaPopup.onCancel=null,WysijaPopup.popupWidth=null,WysijaPopup.popupHeight=null,WysijaPopup.opened=!1,!1)}};
1
+ "use strict";function info(e){if(!1!==WysijaForm.options.debug){window.console&&console.log||function(){for(var e=function(){},t=["assert","clear","count","debug","dir","dirxml","error","exception","group","groupCollapsed","groupEnd","info","log","markTimeline","profile","profileEnd","markTimeline","table","time","timeEnd","timeStamp","trace","warn"],o=t.length,i=window.console={};o--;)i[t[o]]=e}();try{console.log("[INFO] "+e)}catch(t){}}}Object.extend(Prototype.Browser,{ie6:!!/MSIE (\d+\.\d+);/.test(navigator.userAgent)&&6===Number(RegExp.$1),ie7:!!/MSIE (\d+\.\d+);/.test(navigator.userAgent)&&7===Number(RegExp.$1),ie8:!!/MSIE (\d+\.\d+);/.test(navigator.userAgent)&&8===Number(RegExp.$1),ie9:!!/MSIE (\d+\.\d+);/.test(navigator.userAgent)&&9===Number(RegExp.$1)}),Event.cacheDelegated={},Object.extend(document,function(){function s(e){return c[e]=c[e]||{}}function a(e,t){var o=s(e);return o[t]=o[t]||[]}function r(e,t,o){return a(e,t).find(function(e){return e.handler===o})}function n(e,t,o){var i=s(e);if(!i[t])return!1;var n=r(e,t,o);return i[t]=i[t].without(n),n}function l(o,e,i,n){var t,s=a(o,e);return!s.pluck("handler").include(i)&&((t=function(e){var t=e.findElement(o);t&&i.call(n||t,e,t)}).handler=i,s.push(t),t)}var c=Event.cacheDelegated;return{delegate:function(e,t,o,i){var n=l.apply(null,arguments);return n&&document.observe(t,n),document},stopDelegating:function(t,o,e){switch(arguments.length){case 2:a(t,o).each(function(e){document.stopDelegating(t,o,e.handler)});break;case 1:Object.keys(s(t)).each(function(e){document.stopDelegating(t,e)});break;case 0:Object.keys(c).each(function(e){document.stopDelegating(e)});break;default:var i=n.apply(null,arguments);i&&document.stopObserving(o,i)}return document}}}());var Observable=function(){function s(e,t){return e=e.substring(2),t&&(e=t+":"+e),e.underscore().split("_").join(":")}function o(o){var i=o.prototype,n=i.namespace;return Object.keys(i).grep(/^on/).inject($H(),function(e,t){return"onDomLoaded"===t||e.set(s(t,n),a(i[t],o)),e})}function a(t,o){return function(e){return t.call(new o(this),e,e.memo)}}function i(e,t){$$(e).each(function(e){new t(e).onDomLoaded()})}return{observe:function(t){if(this.handlers||(this.handlers={}),!this.handlers[t]){var e=this;this.prototype.onDomLoaded&&(document.loaded?i(t,e):document.observe("dom:loaded",i.curry(t,e))),this.handlers[t]=o(e).each(function(e){document.delegate(t,e.key,e.value)})}},stopObserving:function(t){this.handlers&&this.handlers[t]&&(this.handlers[t].each(function(e){document.stopDelegating(t,e.key,e.value)}),delete this.handlers[t])}}}();Object.extend(Droppables,{deactivate:Droppables.deactivate.wrap(function(e,t,o){return t.onLeave&&t.onLeave(o,t.element),e(t)}),activate:Droppables.activate.wrap(function(e,t,o){return t.onEnter&&t.onEnter(o,t.element),e(t)}),show:function(t,o){if(this.drops.length){var e,i=[];this.drops.each(function(e){Droppables.isAffected(t,o,e)&&i.push(e)}),0<i.length&&(e=Droppables.findDeepestChild(i)),this.last_active&&this.last_active!==e&&this.deactivate(this.last_active,o),e&&(Position.within(e.element,t[0],t[1]),e.onHover&&e.onHover(o,e.element,Position.overlap(e.overlap,e.element)),e!==this.last_active&&Droppables.activate(e,o))}},displayArea:function(){this.drops.length&&(WysijaForm.hideBlockControls(),this.drops.each(function(e){e.element.hasClassName("block_placeholder")&&(e.element.resizeHeight(30),e.element.addClassName("active"))}))},hideArea:function(){this.drops.length&&this.drops.each(function(e){e.element.hasClassName("block_placeholder")?(e.element.resizeHeight(0),e.element.removeClassName("active")):e.element.hasClassName("image_placeholder")?(e.element.removeClassName("active"),e.element.up().removeClassName("active")):e.element.hasClassName("text_placeholder")&&e.element.removeClassName("active")})},reset:function(e){this.last_active&&this.deactivate(this.last_active,e)}}),Element.addMethods({resizeHeight:function(e,t,o,i){return new Effect.Morph(e,{style:{height:parseInt(t,10)+"px"},afterUpdate:o,afterFinish:i,duration:.1})},scrollToCenter:function(e,t){e=$(e);var o=Object.extend({duration:.2,offset:-document.viewport.getHeight()/2},t||{});return Effect.ScrollTo(e,o),e}});var WysijaForm={version:"0.4",options:{container:"wysija_form_editor",wrapper:"wysija_form_wrapper",body:"wysija_form_body",toolbar:"wysija_form_toolbar",templates:"wysija_widget_templates",debug:!1,css:"wj_css"},toolbar:{effect:null,x:null,y:null,top:null,left:null},scroll:{top:0,left:0},flags:{doSave:!1},locks:{dragging:!1,selectingColor:!1,showingTools:!1},autoSave:function(){!1===WysijaForm.flags.doSave&&(WysijaForm.flags.doSave=!0)},encodeHtmlValue:function(e){return e.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;")},stripHtmlValue:function(e){return e.replace(/(<([^>]+)>)/gi,"")},save:function(){var t,o=1,i={},e=$H();e.set("version",WysijaForm.version);var n=$("wysija-form-settings").serialize(!0);n.success_message!==undefined&&0<n.success_message.length&&(n.success_message=WysijaForm.encodeHtmlValue(n.success_message)),e.set("settings",n);var s=$H();return WysijaForm.getBlocks().each(function(e){(t=e.block).save&&null!==(i=t.save())&&(i.position=o,i.type=t.element.readAttribute("wysija_type"),i.field=t.element.readAttribute("wysija_field"),i.name=WysijaForm.encodeHtmlValue(t.element.readAttribute("wysija_name")),s.set("block-"+o,i),o++)}),e.set("body",s),Base64.encode(Object.toJSON(e).gsub('\\"','"').gsub('"[{',"[{").gsub('}]"',"}]"))},init:function(){info("init -> set scroll offsets"),WysijaForm.setScrollOffsets(),info("init -> make droppable"),WysijaForm.makeDroppable(),info("init -> make sortable"),WysijaForm.makeSortable(),info("init -> hide controls"),WysijaForm.hideControls(),info("init -> hide settings"),WysijaForm.hideSettings(),info("init -> init toolbar & settings"),WysijaForm.initToolbar(),WysijaForm.setSettingsPosition(),info("init -> set toolbar position"),WysijaForm.setToolbarPosition(),info("init -> toggle widgets"),WysijaForm.toggleWidgets(),WysijaForm.initExport()},initExport:function(){$("form-export-links").select('a[class="expand-code"]').each(function(e){$(e).stopObserving("click"),$(e).observe("click",function(){$("form-export").select("textarea").invoke("hide"),$("export-"+$(e).readAttribute("title")).show()})}),$("form-export").select("textarea").invoke("hide")},hideExport:function(){$("form-export").hide()},showExport:function(){WysijaForm.initExport(),$("form-export").show()},toggleWidgets:function(){$$('a[wysija_unique="1"]').collect(function(e){return $(e).identify()});var t=null,o=!1;$$('a[wysija_unique="1"]').invoke("removeClassName","disabled"),WysijaForm.getBlocks().each(function(e){e.block!==undefined&&(t=e.block.element.readAttribute("wysija_field"),1===$$("a#"+t+'[wysija_unique="1"]').length&&($$("a#"+t+'[wysija_unique="1"]')[0].addClassName("disabled"),"list"===t&&(o=!0)))}),$("list-selection")[!0===o?"hide":"show"]()},setBlockPositions:function(e,t){WysijaForm.locks.dragging=!1;var o=1;if(WysijaForm.getBlocks().each(function(e){e.setPosition(o++),e.block!==undefined&&e.block.element.setStyle({zIndex:""})}),t!==undefined){var i=$(t.element.readAttribute("wysija_placeholder")),n=t.element.previous(".block_placeholder");null!==i&&(t.element.insert({before:i}),t.element.next()!==undefined&&t.element.next().hasClassName("wysija_form_block")&&n!==undefined&&t.element.insert({after:n}))}WysijaForm.autoSave()},setScrollOffsets:function(){WysijaForm.scroll=document.viewport.getScrollOffsets()},hideSettings:function(){$(WysijaForm.options.wrapper).select(".wysija_settings").invoke("hide")},setSettingsPosition:function(){var n=document.viewport.getHeight(),s=5;$(WysijaForm.options.wrapper).select(".wysija_settings").each(function(e){var t=e.up(".wysija_form_block").getDimensions(),o=e.up(".wysija_form_block").cumulativeOffset(),i=5;if(o.top<=WysijaForm.scroll.top+n){parseInt(WysijaForm.scroll.top+(n/2-e.getHeight()/2),10),parseInt(o.top-s,10),parseInt(o.top+t.height-s,10);i=parseInt(t.height/2-e.getHeight()/2,10)}new Effect.Move(e,{x:parseInt(t.width/2-e.getWidth()/2),y:i,mode:"absolute",duration:.2})})},initToolbar:function(){Event.stopObserving("scroll"),Event.observe(window,"scroll",function(){WysijaForm.setScrollOffsets(),WysijaForm.setSettingsPosition()})},initToolbarPosition:function(){null===WysijaForm.toolbar.top&&(WysijaForm.toolbar.top=parseInt($(WysijaForm.options.container).positionedOffset().top)),null===WysijaForm.toolbar.left&&(WysijaForm.toolbar.left=parseInt($(WysijaForm.options.container).positionedOffset().left)),null===WysijaForm.toolbar.x&&(WysijaForm.toolbar.x=parseInt(WysijaForm.toolbar.left+$(WysijaForm.options.container).getDimensions().width+15)),null===WysijaForm.toolbar.y&&(WysijaForm.toolbar.y=parseInt(WysijaForm.toolbar.top))},setToolbarPosition:function(){WysijaForm.initToolbarPosition(),$(WysijaForm.options.toolbar).setStyle({top:WysijaForm.toolbar.y+"px",left:WysijaForm.toolbar.x+"px",opacity:0}).fade({duration:1,from:0,to:1})},updateToolbarPosition:function(){WysijaForm.initToolbarPosition(),null!==WysijaForm.toolbar.effect&&WysijaForm.toolbar.effect.cancel(),WysijaForm.scroll.top>=WysijaForm.toolbar.top-20?(WysijaForm.toolbar.y=parseInt(20+WysijaForm.scroll.top),WysijaForm.toolbar.effect=new Effect.Move(WysijaForm.options.toolbar,{x:WysijaForm.toolbar.x,y:WysijaForm.toolbar.y,mode:"absolute",duration:.2})):$(WysijaForm.options.toolbar).setStyle({left:WysijaForm.toolbar.x+"px",top:WysijaForm.toolbar.top+"px"})},blockDropOptions:{accept:$w("wysija_form_item"),onEnter:function(e,t){$(t).addClassName("hover")},onLeave:function(e,t){$(t).removeClassName("hover")},onDrop:function(e,t){var o={};o.type=e.readAttribute("wysija_type"),o.field=e.readAttribute("wysija_field"),o.name=e.readAttribute("wysija_name"),o.element=e,t.fire("wjfe:item:drop",o),$(t).removeClassName("hover")}},hideControls:function(){try{return WysijaForm.getBlocks().invoke("hideControls")}catch(e){}},hideTools:function(){$$(".wysija_tools").invoke("hide"),WysijaForm.locks.showingTools=!1},instances:{},fields:{},get:function(e,t){t===undefined&&(t="block");var o=e.identify(),i=WysijaForm.instances[o]||new(WysijaForm[t.capitalize().camelize()])(o);return WysijaForm.instances[o]=i},makeDroppable:function(){Droppables.add("block_placeholder",WysijaForm.blockDropOptions)},makeSortable:function(){var e=$(WysijaForm.options.body);Sortable.create(e,{tag:"div",only:"wysija_form_block",scroll:window,handle:"handle",constraint:"vertical"}),Draggables.removeObserver(e),Draggables.addObserver({element:e,onStart:WysijaForm.startBlockPositions,onEnd:WysijaForm.setBlockPositions})},hideBlockControls:function(){$$(".wysija_controls").invoke("hide"),this.getBlockElements().invoke("removeClassName","hover")},getBlocks:function(){return WysijaForm.getBlockElements().map(function(e){return WysijaForm.get(e)})},getBlockElements:function(){return $(WysijaForm.options.wrapper).select(".wysija_form_block")},startBlockPositions:function(e,t){t.element.hasClassName("wysija_form_block")&&t.element.previous(".block_placeholder")!==undefined&&t.element.writeAttribute("wysija_placeholder",t.element.previous(".block_placeholder").identify()),WysijaForm.locks.dragging=!0},encodeURIComponent:function(e){var t=new RegExp(/^http[s]?:\/\//).exec(e);return null===t?encodeURIComponent(e).replace(/[!'()*]/g,escape):1===t.length?encodeURI(e).replace(/[!'()*]/g,escape):void 0}};WysijaForm.DraggableItem=Class.create({initialize:function(e){this.elementType=$(e).readAttribute("wysija_type"),this.element=$(e).down()||$(e),this.clone=this.cloneElement(),this.insert()},STYLES:new Template("position: absolute; top: #{top}px; left: #{left}px;"),cloneElement:function(){var e=this.element.clone(),t=this.element.cumulativeOffset(),o=this.getList(),i=this.STYLES.evaluate({top:t.top-o.scrollTop,left:t.left-o.scrollLeft});return e.setStyle(i),e.addClassName("wysija_form_widget"),e.addClassName(this.elementType),e.innerHTML=this.element.innerHTML,e},getOffset:function(){return this.element.offsetTop-this.getList().scrollTop},getList:function(){return this.element.up("ul")},insert:function(){$$("body")[0].insert(this.clone)},onMousedown:function(e){var t=new Draggable(this.clone,{scroll:window,onStart:function(){Droppables.displayArea(t)},onEnd:function(e){e.destroy(),e.element.remove(),Droppables.hideArea()},starteffect:function(e){new Effect.Opacity(e,{duration:.2,from:e.getOpacity(),to:.7})},endeffect:Prototype.emptyFunction});return t.initDrag(e),t.startDrag(e),t}}),Object.extend(WysijaForm.DraggableItem,Observable).observe('a[class="wysija_form_item"]'),WysijaForm.Block=Class.create({initialize:function(e){return info("block -> init"),this.element=$(e),this.block=new WysijaForm.Widget(this.element),this.block.makeBlockDroppable(),this.block.setup!==undefined&&this.block.setup(),this},getCustomData:function(e){return this.element.down(".wysija_options."+e)!==undefined?(info("got options for "+e),this.element.down(".wysija_options."+e).innerHTML.toQueryParams("&amp;")):(info("no options to get for "+e),null)},getOptions:function(){return this.options},setOptions:function(e){return e===undefined&&(e={}),this.options===undefined&&(this.options=new Hash),this.options=this.options.update(e),this},setPosition:function(e){this.element.writeAttribute("wysija_position",e)},hideControls:function(){this.getControls&&(this.element.removeClassName("hover"),this.getControls().hide())},showControls:function(){if(this.getControls){this.element.addClassName("hover");try{this.getControls().show()}catch(e){}}},makeBlockDroppable:function(){if(!1===this.isBlockDroppableEnabled()){var e=this.getBlockDroppable();Droppables.add(e.identify(),WysijaForm.blockDropOptions),e.addClassName("enabled")}},removeBlockDroppable:function(){if(this.isBlockDroppableEnabled()){var e=this.getBlockDroppable();Droppables.remove(e.identify()),e.removeClassName("enabled")}},isBlockDroppableEnabled:function(){var e=this.getBlockDroppable();return null===e?this.createBlockDroppable().hasClassName("enabled"):e.hasClassName("enabled")},createBlockDroppable:function(){return info("block -> createBlockDroppable"),this.element.insert({before:'<div class="block_placeholder"></div>'}),this.element.previous(".block_placeholder")},getBlockDroppable:function(){return this.element.previous()===undefined||!1===this.element.previous().hasClassName("block_placeholder")?null:this.element.previous()},getControls:function(){return this.element.down(".wysija_controls")},setupControls:function(){return this.controls=this.getControls(),this.controls&&(this.element.observe("mouseover",function(){!0!==WysijaForm.locks.dragging&&!0!==WysijaForm.locks.selectingColor&&!0!==WysijaForm.locks.showingTools&&(this.element.addClassName("hover"),this.showControls(),this.element.down(".wysija_settings")!==undefined&&this.element.down(".wysija_settings").show())}.bind(this)),this.element.observe("mouseout",function(){!0!==WysijaForm.locks.dragging&&!0!==WysijaForm.locks.selectingColor&&(this.hideControls(),this.element.down(".wysija_settings")!==undefined&&this.element.down(".wysija_settings").hide())}.bind(this)),!1===this.element.hasClassName("static")&&(this.removeButton=this.controls.down(".remove")||null,null!==this.removeButton&&this.removeButton.observe("click",function(){this.removeBlock(),this.removeButton.stopObserving("click")}.bind(this)),this.settingsButton=this.element.down(".settings")||null,null!==this.settingsButton&&this.settingsButton.observe("click",function(){this.editSettings()}.bind(this)))),this},setBackgroundColor:function(e){e!==undefined&&this.element.writeAttribute("wysija_bg_color",e);var t=this.element.readAttribute("wysija_bg_color");""===t?this.element.setStyle({backgroundColor:"transparent"}):null!==t&&this.element.setStyle({backgroundColor:"#"+t}),WysijaForm.autoSave()},removeBlock:function(t){info("block -> removeBlock"),delete WysijaForm.instances[this.element.identify()],this.element.blindUp({duration:.2,afterFinish:function(e){e.element.next(".wysija_form_block")!==undefined&&!1!==t&&WysijaForm.get(e.element.next(".wysija_form_block")).block.showControls(),e.element.previous(".block_placeholder")!==undefined&&e.element.previous(".block_placeholder").remove(),e.element.remove(),WysijaForm.setBlockPositions(),WysijaForm.toggleWidgets(),t!==undefined&&"function"==typeof t&&t()}})},setFocus:function(){this.element.scrollToCenter()}}),WysijaForm.Block.create=function(e,t){var o=$(WysijaForm.options.body),i=new Template('<div class="wysija_form_block" wysija_type="#{type}" wysija_field="#{field}" wysija_name="#{sanitized_name}">'+$(WysijaForm.options.templates).select('[wysija_type="'+e.type+'"][wysija_field="'+e.field+'"]')[0].innerHTML+"</div>");e.sanitized_name="",e.name!==undefined&&(e.sanitized_name=WysijaForm.encodeHtmlValue(e.name)),"block_placeholder"===t.identify()?(o.insert(i.evaluate(e)),o.childElements().last()):(t.insert({before:i.evaluate(e)}),t.previous(".wysija_form_block")),WysijaForm.makeSortable(),WysijaForm.setBlockPositions(),WysijaForm.setSettingsPosition(),setTimeout(function(){WysijaForm.toggleWidgets()},1)},document.observe("wjfe:item:drop",function(e){info("create block"),WysijaForm.Block.create(e.memo,e.target),info("hide controls"),WysijaForm.hideBlockControls()}),WysijaForm.Widget=Class.create(WysijaForm.Block,{initialize:function(e){return info("widget -> init"),this.element=$(e),this},setup:function(){info("widget -> setup"),this.setupControls()},save:function(){info("widget -> save");var e={};return this.getParameters(),e.params=this.params,e},getParameters:function(){info("widget -> get parameters"),this.params=$H();var e=this.element.down(".wysija_params");return e!==undefined&&e.select("input").each(function(e){this.params.set(e.name,e.value)}.bind(this)),this},getControls:function(){return this.element.down(".wysija_controls")},callback:function(e){this.element.replace(Base64.decode(e)),WysijaForm.init()},formatParameters:function(){this.getParameters();var t=[];return this.params!==undefined&&0<this.params.keys().length&&(this.params.each(function(e){t.push(e[0]+":"+e[1])}),t=t.join("|")),t},remove:function(){this.removeBlock()},editSettings:function(){var e=encodeURIComponent(this.formatParameters());WysijaPopup.open(this.element.readAttribute("wysija_name"),wysijaAJAX.adminurl+"?page=wysija_config&action=form_widget_settings&name="+WysijaForm.encodeURIComponent(this.element.readAttribute("wysija_name"))+"&type="+this.element.readAttribute("wysija_type")+"&field="+this.element.readAttribute("wysija_field")+"&params="+e,this.callback.bind(this))},getSettings:function(){return this.element.down(".wysija_settings")}}),document.observe("dom:loaded",WysijaForm.init);var WysijaPopup={initialized:!1,opened:!1,locked:!1,title:null,url:null,popupWidth:null,popupHeight:null,onSuccess:null,onCancel:null,setSize:function(e,t){return WysijaPopup.popupWidth=e,WysijaPopup.popupHeight=t,this},formatURI:function(e,t){return-1===e.indexOf("?")?e+"?"+t:e+"&"+t},init:function(){if(!1===WysijaPopup.initialized){info("init popup");var e='<div id="wysija_popup_overlay"></div><div id="wysija_popup"><div id="wysija_popup_title"><h3></h3><a id="wysija_popup_close" href="javascript:;"></a></div><div id="wysija_popup_content" class="clearfix"><iframe id="wysija_popup_iframe" marginheight="0" marginwidth="0" frameborder="0"></iframe></div></div>';$$("body")[0].insert(e),$("wysija_popup").setStyle({visibility:"hidden"}),WysijaPopup.hideLoading(),WysijaPopup.hideOverlay(),$("wysija_popup_close").observe("click",WysijaPopup.cancel),$("wysija_popup_overlay").observe("click",function(e){"wysija_popup_overlay"===e.target.id&&WysijaPopup.cancel()}),WysijaPopup.initialized=!0,$("wysija_popup_iframe").observe("load",function(){null!==$(this).readAttribute("src")&&setTimeout(function(){WysijaPopup.opened=!0,WysijaPopup.setDimensions(),WysijaPopup.hideLoading(),WysijaPopup.showOverlay(),setTimeout(function(){$("wysija_popup").setStyle({visibility:"visible"})},1)},0)})}},lock:function(){WysijaPopup.locked=!0},unlock:function(){WysijaPopup.locked=!1},isLocked:function(){return WysijaPopup.locked},setPosition:function(){if(WysijaPopup.init(),!1!==WysijaPopup.opened){var e=$("wysija_popup").getDimensions(),t=document.viewport.getDimensions(),o=parseInt(WysijaForm.scroll.top+t.height/2-e.height/2-15,10),i=parseInt(WysijaForm.scroll.left+t.width/2-e.width/2,10);o<WysijaForm.scroll.top&&(o=parseInt(WysijaForm.scroll.top,10)),i<WysijaForm.scroll.left&&(i=parseInt(WysijaForm.scroll.left,10)),$("wysija_popup").setStyle({top:o+"px",left:i+"px"})}},setDimensions:function(){if(!1!==WysijaPopup.opened){var t=$("wysija_popup_iframe");if(null!==t){t.doc=null,t.contentDocument?t.doc=t.contentDocument:t.contentWindow?t.doc=t.contentWindow.document:t.document&&(t.doc=t.document);var o=0,i=0,n=document.viewport.getDimensions();setTimeout(function(){if($("wysija_popup_iframe").writeAttribute("width",null),$("wysija_popup_iframe").writeAttribute("height",null),null===WysijaPopup.popupWidth||null===WysijaPopup.popupHeight){var e=null;e=0<t.doc.querySelectorAll(".popup_content").length?t.doc.querySelectorAll(".popup_content")[0].getBoundingClientRect():t.doc.getElementsByClassName("popup_content")[0].getBoundingClientRect(),i=e.width.ceil(),o=e.bottom.ceil()}else i=WysijaPopup.popupWidth,o=WysijaPopup.popupHeight;o+50>n.height&&(o=n.height-50),$("wysija_popup").setStyle({width:i+14+"px",height:o+14+"px"}),$("wysija_popup_iframe").writeAttribute("width",i+14),$("wysija_popup_iframe").writeAttribute("height",o+14),WysijaPopup.setPosition()},1)}}},loadContent:function(e,t){$("wysija_popup_iframe").writeAttribute("src",t),$("wysija_popup_title").down("h3").update(WysijaForm.encodeHtmlValue(e))},showOverlay:function(){$("wysija_popup_overlay").setStyle({visibility:"visible"})},showLoading:function(){$("wysija_popup_overlay").addClassName("loading")},hideOverlay:function(){$("wysija_popup_overlay").setStyle({visibility:"hidden"})},hideLoading:function(){$("wysija_popup_overlay").removeClassName("loading")},open:function(e,t,o,i){WysijaPopup.init(),WysijaPopup.showLoading(),WysijaPopup.showOverlay(),o!==undefined&&(WysijaPopup.onSuccess=o),i!==undefined&&(WysijaPopup.onCancel=i),WysijaPopup.loadContent(e,t)},success:function(e){null!==WysijaPopup.onSuccess&&WysijaPopup.onSuccess(e),WysijaPopup.close()},cancel:function(e){null!==WysijaPopup.onCancel&&WysijaPopup.onCancel(e),WysijaPopup.close()},close:function(){return!0!==WysijaPopup.isLocked()&&($("wysija_popup").writeAttribute("style",""),$("wysija_popup").setStyle({visibility:"hidden"}),WysijaPopup.hideLoading(),WysijaPopup.hideOverlay(),$("wysija_popup_iframe").writeAttribute("src",null),WysijaPopup.onSuccess=null,WysijaPopup.onCancel=null,WysijaPopup.popupWidth=null,WysijaPopup.popupHeight=null,WysijaPopup.opened=!1)}};
js/wysija-lazyload.js CHANGED
@@ -1 +1 @@
1
- var wysijaLazyLoad={};wysijaLazyLoad.options={data:[],task:null,successCallback:null,errorCallback:null,targetContainer:null,filter:null,spinner:".spinner"},wysijaLazyLoad.jqXHR=null,wysijaLazyLoad.init=function(a,o){options=wysijaLazyLoad.options,"undefined"!=typeof options.data&&"undefined"!=typeof options.task&&jQuery.isArray(options.data)&&("undefined"!=typeof options.filter&&null!==options.filter&&(wysijaAJAX.filter=options.filter),wysijaAJAX.task=options.task,blockNames=wysijaLazyLoad.options.data.splice(0,1),parseInt(blockNames.length)>0&&(wysijaAJAX.block=blockNames[0],wysijaLazyLoad.lazyLoad(a,o,function(){})))},wysijaLazyLoad.lazyLoad=function(a){wysijaLazyLoad.jqXHR=jQuery.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,dataType:"json",beforeSend:function(){jQuery(wysijaLazyLoad.options.spinner).show()},success:function(o){blockNames=wysijaLazyLoad.options.data.splice(0,1),parseInt(blockNames.length)>0?(wysijaAJAX.block=blockNames[0],wysijaLazyLoad.lazyLoad(a)):jQuery(wysijaLazyLoad.options.spinner).hide(),a(o,parseInt(blockNames.length))},error:function(){blockNames=wysijaLazyLoad.options.data.splice(0,1),parseInt(blockNames.length)>0&&(wysijaAJAX.block=blockNames[0],wysijaLazyLoad.lazyLoad(a))}})},wysijaLazyLoad.terminate=function(){try{wysijaLazyLoad.options.data=new Array,wysijaLazyLoad.jqXHR.abort()}catch(a){}};
1
+ var wysijaLazyLoad={options:{data:[],task:null,successCallback:null,errorCallback:null,targetContainer:null,filter:null,spinner:".spinner"},jqXHR:null,init:function(a,o){options=wysijaLazyLoad.options,"undefined"!=typeof options.data&&"undefined"!=typeof options.task&&jQuery.isArray(options.data)&&("undefined"!=typeof options.filter&&null!==options.filter&&(wysijaAJAX.filter=options.filter),wysijaAJAX.task=options.task,blockNames=wysijaLazyLoad.options.data.splice(0,1),0<parseInt(blockNames.length)&&(wysijaAJAX.block=blockNames[0],wysijaLazyLoad.lazyLoad(a,o,function(){})))},lazyLoad:function(o){wysijaLazyLoad.jqXHR=jQuery.ajax({type:"POST",url:wysijaAJAX.ajaxurl,data:wysijaAJAX,dataType:"json",beforeSend:function(){jQuery(wysijaLazyLoad.options.spinner).show()},success:function(a){blockNames=wysijaLazyLoad.options.data.splice(0,1),0<parseInt(blockNames.length)?(wysijaAJAX.block=blockNames[0],wysijaLazyLoad.lazyLoad(o)):jQuery(wysijaLazyLoad.options.spinner).hide(),o(a,parseInt(blockNames.length))},error:function(){blockNames=wysijaLazyLoad.options.data.splice(0,1),0<parseInt(blockNames.length)&&(wysijaAJAX.block=blockNames[0],wysijaLazyLoad.lazyLoad(o))}})},terminate:function(){try{wysijaLazyLoad.options.data=new Array,wysijaLazyLoad.jqXHR.abort()}catch(a){}}};
languages/wysija-newsletters-af.mo CHANGED
Binary file
languages/wysija-newsletters-ar.mo CHANGED
Binary file
languages/wysija-newsletters-az.mo CHANGED
Binary file
languages/wysija-newsletters-be.mo CHANGED
Binary file
languages/wysija-newsletters-bg_BG.mo CHANGED
Binary file
languages/wysija-newsletters-bn_BD.mo CHANGED
Binary file
languages/wysija-newsletters-br.mo CHANGED
Binary file
languages/wysija-newsletters-bs_BA.mo CHANGED
Binary file
languages/wysija-newsletters-ca.mo CHANGED
Binary file
languages/wysija-newsletters-ca@valencia.mo CHANGED
Binary file
languages/wysija-newsletters-ca_ES.mo CHANGED
Binary file
languages/wysija-newsletters-cs_CZ.mo CHANGED
Binary file
languages/wysija-newsletters-da_DK.mo CHANGED
Binary file
languages/wysija-newsletters-de.mo CHANGED
Binary file
languages/wysija-newsletters-de_CH.mo CHANGED
Binary file
languages/wysija-newsletters-de_DE.mo CHANGED
Binary file
languages/wysija-newsletters-el.mo CHANGED
Binary file
languages/wysija-newsletters-en_AU.mo CHANGED
Binary file
languages/wysija-newsletters-en_GB.mo CHANGED
Binary file
languages/wysija-newsletters-es_419.mo CHANGED
Binary file
languages/wysija-newsletters-es_AR.mo CHANGED
Binary file
languages/wysija-newsletters-es_CO.mo CHANGED
Binary file
languages/wysija-newsletters-es_ES.mo CHANGED
Binary file
languages/wysija-newsletters-es_MX.mo CHANGED
Binary file
languages/wysija-newsletters-et.mo CHANGED
Binary file
languages/wysija-newsletters-eu.mo CHANGED
Binary file
languages/wysija-newsletters-fa.mo CHANGED
Binary file
languages/wysija-newsletters-fa_IR.mo CHANGED
Binary file
languages/wysija-newsletters-fi.mo CHANGED
Binary file
languages/wysija-newsletters-fr_BE.mo CHANGED
Binary file
languages/wysija-newsletters-fr_CA.mo CHANGED
Binary file
languages/wysija-newsletters-fr_FR.mo CHANGED
Binary file
languages/wysija-newsletters-gl_ES.mo CHANGED
Binary file
languages/wysija-newsletters-he_IL.mo CHANGED
Binary file
languages/wysija-newsletters-hi_IN.mo CHANGED
Binary file
languages/wysija-newsletters-hr_HR.mo CHANGED
Binary file
languages/wysija-newsletters-hu_HU.mo CHANGED
Binary file
languages/wysija-newsletters-hy_AM.mo CHANGED
Binary file
languages/wysija-newsletters-id.mo CHANGED
Binary file
languages/wysija-newsletters-id_ID.mo CHANGED
Binary file
languages/wysija-newsletters-is_IS.mo CHANGED
Binary file
languages/wysija-newsletters-it_IT.mo CHANGED
Binary file
languages/wysija-newsletters-ja.mo CHANGED
Binary file
languages/wysija-newsletters-ka.mo CHANGED
Binary file
languages/wysija-newsletters-ko_KR.mo CHANGED
Binary file
languages/wysija-newsletters-lt_LT.mo CHANGED
Binary file
languages/wysija-newsletters-lv.mo CHANGED
Binary file
languages/wysija-newsletters-mk_MK.mo CHANGED
Binary file
languages/wysija-newsletters-ml_IN.mo CHANGED
Binary file
languages/wysija-newsletters-mn.mo CHANGED
Binary file
languages/wysija-newsletters-nb_NO.mo CHANGED
Binary file
languages/wysija-newsletters-nl_NL.mo CHANGED
Binary file
languages/wysija-newsletters-nn_NO.mo CHANGED
Binary file
languages/wysija-newsletters-oc.mo CHANGED
Binary file
languages/wysija-newsletters-pl_PL.mo CHANGED
Binary file
languages/wysija-newsletters-pt_BR.mo CHANGED
Binary file
languages/wysija-newsletters-pt_PT.mo CHANGED
Binary file
languages/wysija-newsletters-ro_RO.mo CHANGED
Binary file
languages/wysija-newsletters-ru_RU.mo CHANGED
Binary file
languages/wysija-newsletters-sk_SK.mo CHANGED
Binary file
languages/wysija-newsletters-sl_SI.mo CHANGED
Binary file
languages/wysija-newsletters-sq.mo CHANGED
Binary file
languages/wysija-newsletters-sr_RS.mo CHANGED
Binary file
languages/wysija-newsletters-sr_RS@latin.mo CHANGED
Binary file
languages/wysija-newsletters-sv_SE.mo CHANGED
Binary file
languages/wysija-newsletters-th.mo CHANGED
Binary file
languages/wysija-newsletters-tr_TR.mo CHANGED
Binary file
languages/wysija-newsletters-uk.mo CHANGED
Binary file
languages/wysija-newsletters-ur_PK.mo CHANGED
Binary file
languages/wysija-newsletters-vi.mo CHANGED
Binary file
languages/wysija-newsletters-zh_CN.mo CHANGED
Binary file
languages/wysija-newsletters-zh_TW.mo CHANGED
Binary file
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: wysija
3
  Tags: newsletter, email, welcome email, post notification, autoresponder, signup, subscription, SMTP
4
  Requires at least: 3.5
5
- Tested up to: 5.2
6
- Stable tag: 2.13
7
  Send newsletters post notifications or autoresponders from WordPress easily, and beautifully. Start to capture subscribers with our widget now.
8
 
9
  == Description ==
@@ -113,6 +113,9 @@ Our [support site](https://www.mailpoet.com/support) has plenty of articles and
113
 
114
  == Changelog ==
115
 
 
 
 
116
  = 2.13 - 2019-11-05 =
117
  * Added a blacklist for email addresses that should not be receiving any emails;
118
  * Fixed PHP 7.3 support.
2
  Contributors: wysija
3
  Tags: newsletter, email, welcome email, post notification, autoresponder, signup, subscription, SMTP
4
  Requires at least: 3.5
5
+ Tested up to: 5.5
6
+ Stable tag: 2.14
7
  Send newsletters post notifications or autoresponders from WordPress easily, and beautifully. Start to capture subscribers with our widget now.
8
 
9
  == Description ==
113
 
114
  == Changelog ==
115
 
116
+ = 2.14 - 2020-07-22 =
117
+ * Fixed PHPMail 6.x support for WordPress 5.5.
118
+
119
  = 2.13 - 2019-11-05 =
120
  * Added a blacklist for email addresses that should not be receiving any emails;
121
  * Fixed PHP 7.3 support.