first commit
This commit is contained in:
747
wp-content/plugins/popups/admin/assets/css/admin.css
Normal file
747
wp-content/plugins/popups/admin/assets/css/admin.css
Normal file
@@ -0,0 +1,747 @@
|
||||
/* This stylesheet is used to style the admin option form of the plugin. */
|
||||
/*----------
|
||||
Alerts
|
||||
---------------*/
|
||||
.alert-premium {
|
||||
border: 4px solid #dd3d36;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
margin: 15px;
|
||||
}
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
Tables
|
||||
---------------------------------------------------------------------------------------------*/
|
||||
#spu-rules > .inside {
|
||||
padding: 0;
|
||||
}
|
||||
table.spu_table {
|
||||
border: 0 none;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
table.spu_table tbody tr td {
|
||||
padding: 13px 15px;
|
||||
border-top: 1px solid #f5f5f5;
|
||||
border-bottom: 0 none;
|
||||
}
|
||||
|
||||
table.spu_table tbody tr td.label {
|
||||
width: 24%;
|
||||
vertical-align: top;
|
||||
background: #F9F9F9;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
border-right: 1px solid #E1E1E1;
|
||||
}
|
||||
|
||||
table.spu_table > tbody > tr:first-child > td,
|
||||
table.spu_table > tbody > tr:first-child > td.label {
|
||||
border-top: 0 none;
|
||||
}
|
||||
|
||||
table.spu_table td.label ul.hl {
|
||||
margin: 20px 0 0;
|
||||
}
|
||||
table.spu_table td.label ul.hl li {
|
||||
margin: 0 3px 0 0;
|
||||
|
||||
}
|
||||
|
||||
table.spu_table td.label ul.hl li a.spu-button {
|
||||
font-size: 12px;
|
||||
padding: 6px 10px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
table.spu_table tbody tr td.label label {
|
||||
display: block;
|
||||
font-size: 13px;
|
||||
line-height: 1.4em;
|
||||
font-weight: bold;
|
||||
padding: 0;
|
||||
margin: 0 0 3px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
table.spu_table tbody tr td.label label span.required {
|
||||
color: #f00;
|
||||
display: inline;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
|
||||
table.spu_table tbody tr td.label p {
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
line-height: 1.4em;
|
||||
padding: 0 !important;
|
||||
margin: 3px 0 0 !important;
|
||||
font-style: normal;
|
||||
line-height: 16px;
|
||||
color: #899194;
|
||||
}
|
||||
|
||||
table.spu_table input[type="text"],
|
||||
table.spu_table input[type="number"],
|
||||
table.spu_table textarea,
|
||||
table.spu_table select{
|
||||
width: 99.95%;
|
||||
padding: 3px 5px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
table.spu_table select {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
table.spu_table select option {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
table.spu_table input[type="text"]:focus,
|
||||
table.spu_table textarea:focus,
|
||||
table.spu_table select:focus {
|
||||
border-color:#98B6CB;
|
||||
}
|
||||
#spu-options .no-top-margin{
|
||||
margin-top:0 !important;
|
||||
}
|
||||
|
||||
#spu-options .wp-picker-clear, #spu-options div.wp-picker-holder, #spu-options .wp-picker-input-wrap {
|
||||
background:white;
|
||||
z-index: 999 !important;
|
||||
position: absolute !important;
|
||||
}
|
||||
.spu-label {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
margin-bottom: 6px;
|
||||
cursor: default;
|
||||
}
|
||||
#spu-options .wp-picker-container{ white-space: nowrap; }
|
||||
input#spu-width {
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
h3.spu-title {
|
||||
border-bottom: 1px solid #ccc;
|
||||
font-size: 18px !important;
|
||||
}
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
*
|
||||
* Rules
|
||||
*
|
||||
*---------------------------------------------------------------------------------------------*/
|
||||
|
||||
#spu-rules .inside {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#spu-rules .rules-groups {
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
#spu-rules h4 {
|
||||
margin: 15px 0 5px;
|
||||
}
|
||||
|
||||
#spu-rules .rules-group {
|
||||
margin: 0 0 15px;
|
||||
}
|
||||
|
||||
#spu-rules .rules-group h4 {
|
||||
margin: 0 0 3px;;
|
||||
}
|
||||
|
||||
#spu-rules .rules-group table.spu_table tbody tr td {
|
||||
padding: 4px;
|
||||
border: 0 none;
|
||||
}
|
||||
|
||||
#spu-rules .rules-group td.param {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
#spu-rules .rules-group td.operator {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
#spu-rules .rules-group td.add {
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
#spu-rules .rules-group td.remove {
|
||||
width: 18px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#spu-rules .rules-group tr .rules-remove-rule {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#spu-rules .rules-group tr:hover .rules-remove-rule {
|
||||
display: block;
|
||||
padding: 0 7px;
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
border-radius: 50%;
|
||||
-moz-border-radius: 50%;
|
||||
-webkit-border-radius: 50%;
|
||||
box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
#spu-rules .rules-group .rules-remove-rule:hover {
|
||||
color: red;
|
||||
}
|
||||
/**
|
||||
* Other Rules
|
||||
*/
|
||||
.spu-loading{
|
||||
height: 16px;
|
||||
margin: 10px auto;
|
||||
padding: 6px;
|
||||
width: 16px;
|
||||
}
|
||||
div#spu-premium {
|
||||
border: 2px solid #999;
|
||||
box-shadow: 7px 11px 13px -3px #ccc;
|
||||
}
|
||||
div#spu-premium li{
|
||||
list-style: square;
|
||||
margin-left: 30px;
|
||||
}
|
||||
/* Don't allow user to delete the first field group */
|
||||
#spu-rules .rules-group:first-child tr:first-child:hover .rules-remove-rule {
|
||||
display: none;
|
||||
}
|
||||
#spu-options p.help {
|
||||
font-weight: normal;
|
||||
font-size: .9em !important;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'spufont';
|
||||
src:url('../../../public/assets/fonts/spufont.eot?xaknv7');
|
||||
src:url('../../../public/assets/fonts/spufont.eot?#iefixxaknv7') format('embedded-opentype'),
|
||||
url('../../../public/assets/fonts/spufont.woff?xaknv7') format('woff'),
|
||||
url('../../../public/assets/fonts/spufont.ttf?xaknv7') format('truetype'),
|
||||
url('../../../public/assets/fonts/spufont.svg?xaknv7#spufont') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
[class^="spu-icon-"], [class*=" spu-icon-"] {
|
||||
font-family: 'spufont';
|
||||
speak: none;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1;
|
||||
padding-right: 5px;
|
||||
|
||||
/* Better Font Rendering =========== */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.spu-icon-envelope:before {
|
||||
content: "\f003";
|
||||
}
|
||||
.spu-icon-check:before {
|
||||
content: "\f00c";
|
||||
}
|
||||
.spu-icon-close:before {
|
||||
content: "\f00d";
|
||||
}
|
||||
.spu-icon-eye:before {
|
||||
content: "\f06e";
|
||||
}
|
||||
.spu-icon-gears:before {
|
||||
content: "\f085";
|
||||
}
|
||||
.spu-icon-magic:before {
|
||||
content: "\f0d0";
|
||||
}
|
||||
.spu-icon-angle-up:before {
|
||||
content: "\f106";
|
||||
}
|
||||
.spu-icon-angle-down:before {
|
||||
content: "\f107";
|
||||
}
|
||||
.spu-icon-toggle-off:before {
|
||||
content: "\f204";
|
||||
}
|
||||
.spu-icon-toggle-on:before {
|
||||
content: "\f205";
|
||||
}
|
||||
.spu-icon-info:before {
|
||||
content: "\ea0c";
|
||||
}
|
||||
.spu-icon-spinner:before {
|
||||
content: "\f110";
|
||||
animation: spu-rotate 1s infinite linear;
|
||||
-webkit-animation: spu-rotate 1s infinite linear;
|
||||
-o-animation: spu-rotate 1s infinite linear;
|
||||
-moz-animation: spu-rotate 1s infinite linear;
|
||||
}
|
||||
h3 .spu-icon {
|
||||
margin-right: 7px;
|
||||
}
|
||||
@keyframes spu-rotate {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
opacity: 1;
|
||||
}
|
||||
50% {
|
||||
opacity: .7;
|
||||
}
|
||||
100% {
|
||||
transform: rotate(359deg);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
th#spu_switch{
|
||||
width: 70px;
|
||||
text-align: center;
|
||||
}
|
||||
td.spu_switch{
|
||||
text-align: center;
|
||||
}
|
||||
.spu_switch a {
|
||||
font-size: 2em;
|
||||
}
|
||||
.spu_switch a i.spu-icon-toggle-off {
|
||||
color: #999;
|
||||
}
|
||||
.spu_switch a i.spu-icon-toggle-on {
|
||||
color: forestgreen;
|
||||
}
|
||||
.post-type-spucpt div#preview-action {
|
||||
display: none;
|
||||
}
|
||||
h4.rules-or {
|
||||
border-top: 2px dashed #ddd;
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
}
|
||||
h4.rules-or span{
|
||||
background: #ffffff;
|
||||
position: relative;
|
||||
top: -8px;
|
||||
padding: 2px 10px;
|
||||
}
|
||||
|
||||
.spu-admin-options h3{
|
||||
border-bottom: 1px solid #555;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
.spu-setting-box {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
span.spu-help {
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
|
||||
#wppopups-welcome {
|
||||
border-top: 3px solid #0073aa;
|
||||
color: #555;
|
||||
padding-top: 110px;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
#wppopups-welcome {
|
||||
padding-top: 64px;
|
||||
}
|
||||
}
|
||||
|
||||
#wppopups-welcome *,
|
||||
#wppopups-welcome *::before,
|
||||
#wppopups-welcome *::after {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#wppopups-welcome .container {
|
||||
margin: 0 auto;
|
||||
max-width: 720px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#wppopups-welcome .block {
|
||||
padding: 40px;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
#wppopups-welcome .block {
|
||||
padding: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
#wppopups-welcome img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
width: 135px;
|
||||
}
|
||||
.upgrade-welcome-cta{display: flex; align-items: center;}
|
||||
a.play-video {
|
||||
background: url(../images/video-bg.jpg) no-repeat center center;
|
||||
display: block;
|
||||
padding: 80px;
|
||||
border: 2px solid #ccc;
|
||||
margin: 10px;
|
||||
background-size: cover;
|
||||
}
|
||||
a.play-video img{
|
||||
transition: all 100ms ease-in;
|
||||
}
|
||||
a.play-video:hover img{
|
||||
opacity: .8;
|
||||
}
|
||||
#wppopups-welcome h1 {
|
||||
color: #222;
|
||||
font-size: 24px;
|
||||
text-align: center;
|
||||
margin: 0 0 16px 0;
|
||||
}
|
||||
|
||||
#wppopups-welcome h5 {
|
||||
color: #222;
|
||||
font-size: 16px;
|
||||
margin: 0 0 8px 0;
|
||||
}
|
||||
|
||||
#wppopups-welcome h6 {
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
line-height: 1.6;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#wppopups-welcome p {
|
||||
font-size: 14px;
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
|
||||
#wppopups-welcome .button-wrap {
|
||||
max-width: 590px;
|
||||
margin: 0 auto 0 auto;
|
||||
}
|
||||
|
||||
#wppopups-welcome .button-wrap .left {
|
||||
float: left;
|
||||
width: 50%;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
#wppopups-welcome .button-wrap .left {
|
||||
float: none;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
#wppopups-welcome .button-wrap .right {
|
||||
float: right;
|
||||
width: 50%;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
#wppopups-welcome .button-wrap .right {
|
||||
float: none;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
#wppopups-welcome .intro {
|
||||
background-color: #fff;
|
||||
border: 2px solid #e1e1e1;
|
||||
border-radius: 2px;
|
||||
margin-bottom: 30px;
|
||||
position: relative;
|
||||
padding-top: 40px;
|
||||
}
|
||||
|
||||
#wppopups-welcome .intro .sullie {
|
||||
background-color: #fff;
|
||||
border: 2px solid #e1e1e1;
|
||||
border-radius: 50%;
|
||||
height: 110px;
|
||||
width: 110px;
|
||||
padding: 18px 14px 0 14px;
|
||||
position: absolute;
|
||||
top: -58px;
|
||||
left: 50%;
|
||||
margin-left: -55px;
|
||||
}
|
||||
|
||||
#wppopups-welcome .intro .video-thumbnail {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#wppopups-welcome .intro .button-wrap {
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
#wppopups-welcome .features {
|
||||
background-color: #fff;
|
||||
border: 2px solid #e1e1e1;
|
||||
border-bottom: 0;
|
||||
border-radius: 2px 2px 0 0;
|
||||
position: relative;
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
#wppopups-welcome .features .feature-list {
|
||||
margin-top: 60px;
|
||||
}
|
||||
|
||||
#wppopups-welcome .features .feature-block {
|
||||
float: left;
|
||||
width: 50%;
|
||||
padding-bottom: 35px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
#wppopups-welcome .features .feature-block {
|
||||
float: none;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
#wppopups-welcome .features .feature-block.first {
|
||||
padding-right: 20px;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
#wppopups-welcome .features .feature-block.first {
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
#wppopups-welcome .features .feature-block.last {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
#wppopups-welcome .features .feature-block.last {
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
#wppopups-welcome .features .feature-block img {
|
||||
float: left;
|
||||
max-width: 46px;
|
||||
}
|
||||
|
||||
#wppopups-welcome .features .feature-block h5 {
|
||||
margin-left: 68px;
|
||||
}
|
||||
|
||||
#wppopups-welcome .features .feature-block p {
|
||||
margin: 0;
|
||||
margin-left: 68px;
|
||||
}
|
||||
|
||||
#wppopups-welcome .features .button-wrap {
|
||||
margin-top: 25px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#wppopups-welcome .upgrade-cta {
|
||||
background-color: #000;
|
||||
border: 2px solid #e1e1e1;
|
||||
border-top: 0;
|
||||
border-bottom: 0;
|
||||
color: #fff;
|
||||
}
|
||||
a.wppopups-btn {
|
||||
background-color: #2273aa;
|
||||
border-radius: 3px;
|
||||
border: none;
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
font-weight: 700;
|
||||
letter-spacing: 2px;
|
||||
line-height: 1;
|
||||
padding: 16px 13px;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
width: auto;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
}
|
||||
.wppopups-clear:before {
|
||||
content: " ";
|
||||
display: table;
|
||||
}
|
||||
|
||||
.wppopups-clear:after {
|
||||
clear: both;
|
||||
content: " ";
|
||||
display: table;
|
||||
}
|
||||
#wppopups-welcome .upgrade-cta h2 {
|
||||
color: #fff;
|
||||
font-size: 20px;
|
||||
margin: 0 0 30px 0;
|
||||
}
|
||||
|
||||
#wppopups-welcome .upgrade-cta ul {
|
||||
display: -ms-flex;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
-webkit-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
font-size: 15px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#wppopups-welcome .upgrade-cta ul li {
|
||||
display: block;
|
||||
width: 50%;
|
||||
margin: 0 0 8px 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#wppopups-welcome .upgrade-cta ul li .dashicons {
|
||||
color: #2a9b39;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
#wppopups-welcome .upgrade-cta .left {
|
||||
float: left;
|
||||
width: 66.666666%;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
#wppopups-welcome .upgrade-cta .left {
|
||||
float: none;
|
||||
width: 100%;
|
||||
padding-right: 0;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
#wppopups-welcome .upgrade-cta .right {
|
||||
float: right;
|
||||
width: 33.333333%;
|
||||
padding-left: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
#wppopups-welcome .upgrade-cta .right {
|
||||
float: none;
|
||||
width: 100%;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
#wppopups-welcome .upgrade-cta .right h2 {
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#wppopups-welcome .upgrade-cta .right h2 span {
|
||||
display: inline-block;
|
||||
border-bottom: 1px solid #555;
|
||||
padding: 0 15px 12px;
|
||||
}
|
||||
|
||||
#wppopups-welcome .upgrade-cta .right .price {
|
||||
padding: 26px 0;
|
||||
}
|
||||
|
||||
#wppopups-welcome .upgrade-cta .right .price .amount {
|
||||
font-size: 48px;
|
||||
font-weight: 600;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#wppopups-welcome .upgrade-cta .right .price .amount:before {
|
||||
content: '$';
|
||||
position: absolute;
|
||||
top: -8px;
|
||||
left: -16px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#wppopups-welcome .upgrade-cta .right .price .term {
|
||||
font-size: 12px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#wppopups-welcome .testimonials {
|
||||
background-color: #fff;
|
||||
border: 2px solid #e1e1e1;
|
||||
border-top: 0;
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
#wppopups-welcome .testimonials .testimonial-block {
|
||||
margin: 50px 0 0 0;
|
||||
}
|
||||
|
||||
#wppopups-welcome .testimonials .testimonial-block img {
|
||||
border-radius: 50%;
|
||||
float: left;
|
||||
max-width: 100px;
|
||||
box-shadow: 0 0 18px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
#wppopups-welcome .testimonials .testimonial-block img {
|
||||
width: 65px;
|
||||
}
|
||||
}
|
||||
|
||||
#wppopups-welcome .testimonials .testimonial-block p {
|
||||
font-size: 14px;
|
||||
margin: 0 0 12px 140px;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
#wppopups-welcome .testimonials .testimonial-block p {
|
||||
margin-left: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
#wppopups-welcome .testimonials .testimonial-block p:last-of-type {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
#wppopups-welcome .footer {
|
||||
background-color: #f1f1f1;
|
||||
border: 2px solid #e1e1e1;
|
||||
border-top: 0;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
|
||||
#wppopups-welcome.pro .features {
|
||||
border: 2px solid #e1e1e1;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
#wppopups-welcome.pro .upgrade,
|
||||
#wppopups-welcome.pro .footer {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#wppopups-welcome.pro .testimonials {
|
||||
border: 2px solid #e1e1e1;
|
||||
}
|
||||
62
wp-content/plugins/popups/admin/assets/css/editor-style.css
Normal file
62
wp-content/plugins/popups/admin/assets/css/editor-style.css
Normal file
@@ -0,0 +1,62 @@
|
||||
/**
|
||||
* Editor
|
||||
*/
|
||||
html{
|
||||
background: #9C9B9B;
|
||||
}
|
||||
body#tinymce.wp-editor{
|
||||
margin: 20px auto;
|
||||
}
|
||||
body#tinymce.wp-editor,
|
||||
body#tinymce.wp-editor * {
|
||||
box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
}
|
||||
body#tinymce.wp-editor{
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Top position
|
||||
*/
|
||||
body#tinymce.spu-optin-editor.spu-position-top-bar,
|
||||
body#tinymce.spu-position-top-bar {
|
||||
margin-top: 0 !important;
|
||||
border-top: none !important;
|
||||
}
|
||||
body#tinymce.spu-optin-editor.spu-position-top-bar,
|
||||
body#tinymce.spu-position-top-bar ,
|
||||
body#tinymce.spu-optin-editor.spu-position-bottom-bar,
|
||||
body#tinymce.spu-position-bottom-bar {
|
||||
padding-top: 10px !important;
|
||||
padding-bottom: 10px !important;
|
||||
width: 100% !important;
|
||||
border-left: none !important;
|
||||
border-right: none !important;
|
||||
border-radius: 0;
|
||||
}
|
||||
body#tinymce.spu-optin-editor.spu-position-bottom-bar,
|
||||
body#tinymce.spu-position-bottom-bar {
|
||||
margin-bottom: 0 !important;
|
||||
border-bottom: none !important;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
body#tinymce.spu-position-top-bar h1,
|
||||
body#tinymce.spu-position-top-bar h2,
|
||||
body#tinymce.spu-position-top-bar h3,
|
||||
body#tinymce.spu-position-top-bar h4,
|
||||
body#tinymce.spu-position-top-bar h5,
|
||||
body#tinymce.spu-position-top-bar h6,
|
||||
body#tinymce.spu-position-top-bar p,
|
||||
body#tinymce.spu-position-bottom-bar h1,
|
||||
body#tinymce.spu-position-bottom-bar h2,
|
||||
body#tinymce.spu-position-bottom-bar h3,
|
||||
body#tinymce.spu-position-bottom-bar h4,
|
||||
body#tinymce.spu-position-bottom-bar h5,
|
||||
body#tinymce.spu-position-bottom-bar h6,
|
||||
body#tinymce.spu-position-bottom-bar p{
|
||||
margin: 0;
|
||||
}
|
||||
1
wp-content/plugins/popups/admin/assets/css/index.php
Normal file
1
wp-content/plugins/popups/admin/assets/css/index.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php // Silence is golden
|
||||
11
wp-content/plugins/popups/admin/assets/js/ace.js
Normal file
11
wp-content/plugins/popups/admin/assets/js/ace.js
Normal file
File diff suppressed because one or more lines are too long
362
wp-content/plugins/popups/admin/assets/js/admin.js
Normal file
362
wp-content/plugins/popups/admin/assets/js/admin.js
Normal file
@@ -0,0 +1,362 @@
|
||||
var spu = {
|
||||
// module
|
||||
rules : null
|
||||
};
|
||||
|
||||
SPU_ADMIN = (function ( $ ) {
|
||||
|
||||
var spu_editor = '';
|
||||
$(document).ready(function(){
|
||||
|
||||
spu.rules.init();
|
||||
var color_field = $('#spu-appearance input.spu-color-field'),
|
||||
spu_optin = $('#spu_optin');
|
||||
// Only run if there is no optin being used in premium version
|
||||
if( color_field.length && ( ! spu_optin.length || spu_optin.val() == '' ) ){
|
||||
color_field.wpColorPicker({ change: applyStyles, clear: applyStyles });
|
||||
}
|
||||
$("#spu-appearance input,#spu-appearance select").not(".spu-color-field").change(applyStyles);
|
||||
|
||||
//Toogle trigger boxes on init
|
||||
checkTriggerMethod( $("#spu_trigger").val() );
|
||||
|
||||
//Toogle trigger boxes on change
|
||||
$("#spu_trigger").change(function(){
|
||||
checkTriggerMethod( $(this).val() );
|
||||
})
|
||||
|
||||
/**
|
||||
* Updates on position change
|
||||
*/
|
||||
$('#spu_position').on('change', function(){
|
||||
var $editor = SPU_ADMIN.spu_editor,
|
||||
val = $(this).val();
|
||||
//update editor
|
||||
$editor.alterClass('spu-position-*', 'spu-position-'+ val )
|
||||
if( val == 'top-bar' || val == 'bottom-bar') {
|
||||
$editor.find('.spu-box-container *:not("p, .spu-fields-container, .spu-fields-container *")').remove();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* When tinyMcr loads
|
||||
*/
|
||||
function TinyMceOptin() {
|
||||
SPU_ADMIN.spu_editor = $("#content_ifr").contents().find('html #tinymce');
|
||||
|
||||
// add position class
|
||||
SPU_ADMIN.spu_editor.addClass(' spu-position-' + spu_js.opts.css.position).removeClass('wp-autoresize');
|
||||
applyStyles();
|
||||
}
|
||||
|
||||
function checkTriggerMethod( val ) {
|
||||
if( val == 'pixels' || val == 'percentage' || val == 'visible') {
|
||||
$('tr.auto_hide').fadeIn('fast');
|
||||
} else {
|
||||
$('tr.auto_hide').fadeOut('fast');
|
||||
}/*TODO I should fix premium so these values are not even considered here*/
|
||||
if( val == 'manual' || val == 'trigger-click' || val == 'visible' || val == 'exit-intent') {
|
||||
$('.spu-trigger-number').fadeOut('fast');
|
||||
} else {
|
||||
$('.spu-trigger-number').fadeIn('fast');
|
||||
}
|
||||
}
|
||||
|
||||
// functions
|
||||
function getPxValue($el, retval) {
|
||||
if($el.val()) {
|
||||
return parseInt($el.val());
|
||||
} else {
|
||||
return (retval !== undefined) ? retval + "px" : 0;
|
||||
}
|
||||
}
|
||||
|
||||
function getColor($el, retval) {
|
||||
if($el.val().length > 0) {
|
||||
return $el.wpColorPicker('color');
|
||||
} else {
|
||||
return (retval !== undefined) ? retval : '';
|
||||
}
|
||||
}
|
||||
|
||||
function applyStyles() {
|
||||
var $editor = $("#content_ifr").contents().find('html');
|
||||
$editor.trigger('spu_tinymce_init');
|
||||
$editor.css({
|
||||
'background': spu_hexToRgb(getColor($("#spu_bgcolor")),$("#spu_bgopacity").val())
|
||||
});
|
||||
|
||||
// if there is no optin mode load defaults
|
||||
if (typeof spup_js == "undefined" || $('#spu_optin').val() == '') {
|
||||
// remove any field that could be there after deactivating premium version
|
||||
$editor.find(".spu-fields-container").remove();
|
||||
$editor.find("#tinymce").attr('style', 'padding: ' + getPxValue($("#spu-padding")) + 'px !important');
|
||||
$editor.find("#tinymce").css({
|
||||
'background-color': spu_hexToRgb(getColor($("#spu-background-color")),$("#spu_background_opacity").val()),
|
||||
'border-color': getColor($("#spu-border-color")),
|
||||
'border-width': getPxValue($("#spu-border-width")),
|
||||
'border-style': $("#spu-border-type").val(),
|
||||
'width': $("#spu-width").val(),
|
||||
'color': getColor($("#spu-color")),
|
||||
'height': 'auto',
|
||||
'min-width': '200px',
|
||||
'max-width': '100%',
|
||||
'margin': '8px auto 0;',
|
||||
'box-shadow': ($("#spu-shadow-type").val() == 'inset' ? 'inset' : '') +' '+ $("#spu-shadow-x").val() + 'px ' + $("#spu-shadow-y").val() + 'px ' + $("#spu-shadow-blur").val() + 'px ' + $("#spu-shadow-spread").val() + 'px ' + getColor($("#spu-shadow-color"))
|
||||
});
|
||||
|
||||
var img_src = $('#spu_bgimage').val();
|
||||
$editor.find("#tinymce").css({
|
||||
'background-image': 'url("'+img_src+'")',
|
||||
'background-size' : 'cover'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Rules
|
||||
*
|
||||
* Js for needed for rules
|
||||
*
|
||||
* @since: 1.0.0
|
||||
* Thanks to advanced custom fields plugin for part of this code
|
||||
*/
|
||||
spu.rules = {
|
||||
$el : null,
|
||||
init : function(){
|
||||
|
||||
// vars
|
||||
var _this = this;
|
||||
|
||||
// $el
|
||||
_this.$el = $('#spu-rules');
|
||||
|
||||
// add rule
|
||||
_this.$el.on('click', '.rules-add-rule', function(){
|
||||
_this.add_rule( $(this).closest('tr') );
|
||||
return false;
|
||||
});
|
||||
|
||||
// remove rule
|
||||
_this.$el.on('click', '.rules-remove-rule', function(){
|
||||
_this.remove_rule( $(this).closest('tr') );
|
||||
return false;
|
||||
});
|
||||
|
||||
// add rule
|
||||
_this.$el.on('click', '.rules-add-group', function(){
|
||||
_this.add_group();
|
||||
return false;
|
||||
});
|
||||
|
||||
// change rule
|
||||
_this.$el.on('change', '.param select', function(){
|
||||
|
||||
// vars
|
||||
var $tr = $(this).closest('tr'),
|
||||
rule_id = $tr.attr('data-id'),
|
||||
$group = $tr.closest('.rules-group'),
|
||||
group_id = $group.attr('data-id'),
|
||||
val_td = $tr.find('td.value'),
|
||||
ajax_data = {
|
||||
'action' : "spu/field_group/render_rules",
|
||||
'nonce' : spu_js.nonce,
|
||||
'rule_id' : rule_id,
|
||||
'group_id' : group_id,
|
||||
'value' : '',
|
||||
'param' : $(this).val()
|
||||
};
|
||||
|
||||
// add loading gif
|
||||
var div = $('<div class="spu-loading"><img src="'+spu_js.admin_url+'/images/wpspin_light.gif"/> </div>');
|
||||
val_td.html( div );
|
||||
|
||||
// load rules html
|
||||
$.ajax({
|
||||
url: ajaxurl,
|
||||
data: ajax_data,
|
||||
type: 'post',
|
||||
dataType: 'html',
|
||||
success: function(html){
|
||||
val_td.html(html);
|
||||
}
|
||||
});
|
||||
|
||||
// Operators Rules
|
||||
var operator_td = $tr.find('td.operator'),
|
||||
ajax_data = {
|
||||
'action' : "spu/field_group/render_operator",
|
||||
'nonce' : spu_js.nonce,
|
||||
'rule_id' : rule_id,
|
||||
'group_id' : group_id,
|
||||
'value' : '',
|
||||
'param' : $(this).val()
|
||||
};
|
||||
|
||||
operator_td.html( div );
|
||||
$.ajax({
|
||||
url: ajaxurl,
|
||||
data: ajax_data,
|
||||
type: 'post',
|
||||
dataType: 'html',
|
||||
success: function(html){
|
||||
operator_td.html(html);
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
add_rule : function( $tr ){
|
||||
|
||||
// vars
|
||||
var $tr2 = $tr.clone(),
|
||||
old_id = $tr2.attr('data-id'),
|
||||
new_id = 'rule_' + ( parseInt( old_id.replace('rule_', ''), 10 ) + 1);
|
||||
|
||||
// update names
|
||||
$tr2.find('[name]').each(function(){
|
||||
|
||||
$(this).attr('name', $(this).attr('name').replace( old_id, new_id ));
|
||||
$(this).attr('id', $(this).attr('id').replace( old_id, new_id ));
|
||||
});
|
||||
|
||||
// update data-i
|
||||
$tr2.attr( 'data-id', new_id );
|
||||
|
||||
// add tr
|
||||
$tr.after( $tr2 );
|
||||
|
||||
return false;
|
||||
},
|
||||
remove_rule : function( $tr ){
|
||||
|
||||
// vars
|
||||
var siblings = $tr.siblings('tr').length;
|
||||
|
||||
if( siblings == 0 ) {
|
||||
// remove group
|
||||
this.remove_group( $tr.closest('.rules-group') );
|
||||
} else {
|
||||
// remove tr
|
||||
$tr.remove();
|
||||
}
|
||||
},
|
||||
add_group : function(){
|
||||
|
||||
// vars
|
||||
var $group = this.$el.find('.rules-group:last'),
|
||||
$group2 = $group.clone(),
|
||||
old_id = $group2.attr('data-id'),
|
||||
new_id = 'group_' + ( parseInt( old_id.replace('group_', ''), 10 ) + 1);
|
||||
|
||||
// update names
|
||||
$group2.find('[name]').each(function(){
|
||||
|
||||
$(this).attr('name', $(this).attr('name').replace( old_id, new_id ));
|
||||
$(this).attr('id', $(this).attr('id').replace( old_id, new_id ));
|
||||
|
||||
});
|
||||
|
||||
// update data-i
|
||||
$group2.attr( 'data-id', new_id );
|
||||
|
||||
// update h4
|
||||
$group2.find('h4').html( spu_js.l10n.or ).addClass('rules-or');
|
||||
|
||||
// remove all tr's except the first one
|
||||
$group2.find('tr:not(:first)').remove();
|
||||
|
||||
// add tr
|
||||
$group.after( $group2 );
|
||||
},
|
||||
remove_group : function( $group ){
|
||||
$group.remove();
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
onTinyMceInit: function() {
|
||||
TinyMceOptin();
|
||||
}
|
||||
}
|
||||
}(jQuery));
|
||||
|
||||
|
||||
( function( global, $ ) {
|
||||
var editor,
|
||||
syncCSS = function() {
|
||||
$( '#spu-custom-css' ).val( editor.getSession().getValue() );
|
||||
},
|
||||
loadAce = function() {
|
||||
if(! $('#custom_css').length )
|
||||
return;
|
||||
editor = ace.edit( 'custom_css' );
|
||||
global.safecss_editor = editor;
|
||||
editor.getSession().setUseWrapMode( true );
|
||||
editor.setShowPrintMargin( false );
|
||||
editor.getSession().setValue( $( '#spu-custom-css' ).val() );
|
||||
editor.getSession().setMode( "ace/mode/css" );
|
||||
jQuery.fn.spin&&$( '#custom_css_container' ).spin( false );
|
||||
$( '#post' ).submit( syncCSS );
|
||||
};
|
||||
if ( $.browser.msie&&parseInt( $.browser.version, 10 ) <= 7 ) {
|
||||
$( '#custom_css_container' ).hide();
|
||||
$( '#spu-custom-css' ).show();
|
||||
return false;
|
||||
} else {
|
||||
$( global ).load( loadAce );
|
||||
}
|
||||
global.aceSyncCSS = syncCSS;
|
||||
} )( this, jQuery );
|
||||
function spu_hexToRgb(hex, alpha) {
|
||||
hex = hex.replace('#', '');
|
||||
var r = parseInt(hex.length == 3 ? hex.slice(0, 1).repeat(2) : hex.slice(0, 2), 16);
|
||||
var g = parseInt(hex.length == 3 ? hex.slice(1, 2).repeat(2) : hex.slice(2, 4), 16);
|
||||
var b = parseInt(hex.length == 3 ? hex.slice(2, 3).repeat(2) : hex.slice(4, 6), 16);
|
||||
if ( alpha ) {
|
||||
return 'rgba(' + r + ', ' + g + ', ' + b + ', ' + alpha + ')';
|
||||
}
|
||||
else {
|
||||
return 'rgb(' + r + ', ' + g + ', ' + b + ')';
|
||||
}
|
||||
}
|
||||
/**
|
||||
* jQuery alterClass plugin
|
||||
*
|
||||
* Remove element classes with wildcard matching. Optionally add classes:
|
||||
* $( '#foo' ).alterClass( 'foo-* bar-*', 'foobar' )
|
||||
*
|
||||
* Copyright (c) 2011 Pete Boere (the-echoplex.net)
|
||||
* Free under terms of the MIT license: http://www.opensource.org/licenses/mit-license.php
|
||||
*
|
||||
*/
|
||||
(function ( $ ) {
|
||||
$.fn.alterClass = function ( removals, additions ) {
|
||||
|
||||
var self = this;
|
||||
if ( removals.indexOf( '*' ) === -1 ) {
|
||||
// Use native jQuery methods if there is no wildcard matching
|
||||
self.removeClass( removals );
|
||||
return !additions ? self : self.addClass( additions );
|
||||
}
|
||||
|
||||
var patt = new RegExp( '\\s' +
|
||||
removals.
|
||||
replace( /\*/g, '[A-Za-z0-9-_]+' ).
|
||||
split( ' ' ).
|
||||
join( '\\s|\\s' ) +
|
||||
'\\s', 'g' );
|
||||
|
||||
self.each( function ( i, it ) {
|
||||
var cn = ' ' + it.className + ' ';
|
||||
while ( patt.test( cn ) ) {
|
||||
cn = cn.replace( patt, ' ' );
|
||||
}
|
||||
it.className = $.trim( cn );
|
||||
});
|
||||
|
||||
return !additions ? self : self.addClass( additions );
|
||||
};
|
||||
})( jQuery );
|
||||
1
wp-content/plugins/popups/admin/assets/js/index.php
Normal file
1
wp-content/plugins/popups/admin/assets/js/index.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php // Silence is golden
|
||||
1
wp-content/plugins/popups/admin/assets/js/mode-css.js
Normal file
1
wp-content/plugins/popups/admin/assets/js/mode-css.js
Normal file
File diff suppressed because one or more lines are too long
BIN
wp-content/plugins/popups/admin/assets/js/popup.png
Normal file
BIN
wp-content/plugins/popups/admin/assets/js/popup.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
65
wp-content/plugins/popups/admin/assets/js/spu-tinymce.js
Normal file
65
wp-content/plugins/popups/admin/assets/js/spu-tinymce.js
Normal file
@@ -0,0 +1,65 @@
|
||||
(function( $ ) {
|
||||
'use strict';
|
||||
|
||||
|
||||
tinymce.create('tinymce.plugins.SPU', {
|
||||
init : function(ed, url) {
|
||||
ed.addButton('spu_button', {
|
||||
title : 'Add Popup',
|
||||
cmd : 'spu_button',
|
||||
image : url+'/popup.png'
|
||||
});
|
||||
ed.addCommand('spu_button', function() {
|
||||
|
||||
jQuery('#spu_editor').dialog({
|
||||
height: 500,
|
||||
width: '600px',
|
||||
buttons: {
|
||||
"Insert Shortcode": function() {
|
||||
|
||||
var spu_id = jQuery('#spu-posts').val();
|
||||
var str = "";
|
||||
|
||||
str = '[spu popup="'+spu_id+'"';
|
||||
var selected_text = ed.selection.getContent();
|
||||
if (selected_text) {
|
||||
|
||||
str += "]" + selected_text + "[/spu]";
|
||||
|
||||
} else {
|
||||
|
||||
str += "]YOUR TEXT OR IMG HERE[/spu]";
|
||||
|
||||
}
|
||||
|
||||
|
||||
var Editor = tinyMCE.get('content');
|
||||
Editor.focus();
|
||||
Editor.selection.setContent(str);
|
||||
|
||||
|
||||
jQuery( this ).dialog( "close" );
|
||||
},
|
||||
Cancel: function() {
|
||||
jQuery( this ).dialog( "close" );
|
||||
}
|
||||
}
|
||||
}).dialog('open');
|
||||
|
||||
});
|
||||
},
|
||||
createControl : function(n, cm) {
|
||||
return null;
|
||||
},
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Popups Button',
|
||||
author : 'Damian Logghe',
|
||||
authorurl : 'https://timersys.com',
|
||||
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example',
|
||||
version : "0.1"
|
||||
};
|
||||
}
|
||||
});
|
||||
tinymce.PluginManager.add('spu', tinymce.plugins.SPU);
|
||||
})( jQuery );
|
||||
1
wp-content/plugins/popups/admin/assets/js/worker-css.js
Normal file
1
wp-content/plugins/popups/admin/assets/js/worker-css.js
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user