Skip to content

Commit

Permalink
Merge pull request #109 from sendsmaily/release/1.8.1
Browse files Browse the repository at this point in the history
Release 1.8.1
  • Loading branch information
marispulk authored Jul 14, 2021
2 parents a7c9059 + 0b25dc3 commit 7c9c49e
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 99 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

### 1.8.1
- Bugfix - improve button color and button color text responsive design. [[#107](https://github.com/sendsmaily/smaily-woocommerce-plugin/pull/107)]

### 1.8.0
- Feature - user can customize the appearance of the subscription form. [[#97](https://github.com/sendsmaily/smaily-woocommerce-plugin/pull/97)], [[#92](https://github.com/sendsmaily/smaily-woocommerce-plugin/pull/92)], [[#85](https://github.com/sendsmaily/smaily-woocommerce-plugin/issues/85)]

Expand Down
Binary file modified assets/screenshot-7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
133 changes: 66 additions & 67 deletions inc/Widget/SmailyWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -441,74 +441,73 @@ class="widefat"
value="<?php echo esc_attr( $submit_button_text ); ?>" />
</p>

<!-- Customize button color and text. -->
<div class="row">
<div class="column" id="button-color-container">
<!-- Customize button color -->
<div class="row" id="button-color-container">
<p>
<!-- Add color picker HTML. -->
<div>
<label for="<?php echo esc_attr( $this->get_field_id( 'submit_button_color' ) ); ?>">
<b><?php esc_html_e( 'Button color', 'smaily' ); ?></b>
</label>
<!-- Jscolor required:false is used to clear the input value. -->
<input
data-jscolor="{required:false}"
class="button-style"
<?php
if ( $use_site_submit_button_color === true ) :
?>
disabled<?php endif; ?>
id="<?php echo esc_attr( $this->get_field_id( 'submit_button_color' ) ); ?>"
name="<?php echo esc_attr( $this->get_field_name( 'submit_button_color' ) ); ?>"
type="text"
value="<?php echo esc_attr( $submit_button_color ); ?>" />
</div>
<div class="default-value-checkbox">
<input
class="smaily-checkbox default_background_color"
<?php
if ( $use_site_submit_button_color === true ) :
?>
checked<?php endif; ?>
id="<?php echo $this->get_field_id( 'default_background_color' ); ?>"
name="<?php echo $this->get_field_name( 'use_site_submit_button_color' ); ?>"
type="checkbox"
value="1" />
<label for="<?php echo $this->get_field_id( 'use_site_submit_button_color' ); ?>" ><?php esc_html_e( 'Use default button color?', 'smaily' ); ?></label>
</div>
</div>

<div class="column" id="button-text-container">
<div>
<label for="<?php echo esc_attr( $this->get_field_id( 'submit_button_text_color' ) ); ?>">
<b><?php esc_html_e( 'Button text color', 'smaily' ); ?></b>
</label>
<!--Jscolor required: false is used to clear the input value. -->
<input
data-jscolor="{required:false}"
class="button-style"
type="text"
<?php
if ( $use_site_submit_button_text_color === true ) :
?>
disabled<?php endif; ?>
id="<?php echo esc_attr( $this->get_field_id( 'submit_button_text_color' ) ); ?>"
name="<?php echo esc_attr( $this->get_field_name( 'submit_button_text_color' ) ); ?>"
value="<?php echo esc_attr( $submit_button_text_color ); ?>" />
</div>
<div class="default-value-checkbox">
<input
class="smaily-checkbox default_text_color"
<?php
if ( $use_site_submit_button_text_color === true ) :
?>
checked<?php endif; ?>
id="<?php echo $this->get_field_id( 'default_text_color' ); ?>"
name="<?php echo $this->get_field_name( 'use_site_submit_button_text_color' ); ?>"
type="checkbox"
value="1" />
<label for="<?php echo $this->get_field_id( 'use_site_submit_button_text_color' ); ?>" ><?php esc_html_e( 'Use default text color?', 'smaily' ); ?></label>
</div>
</div>
<label for="<?php echo esc_attr( $this->get_field_id( 'submit_button_color' ) ); ?>">
<b><?php esc_html_e( 'Button color', 'smaily' ); ?></b>
</label>
<!-- Jscolor required:false is used to clear the input value. -->
<input
data-jscolor="{required:false}"
class="button-style"
<?php
if ( $use_site_submit_button_color === true ) :
?>
disabled<?php endif; ?>
id="<?php echo esc_attr( $this->get_field_id( 'submit_button_color' ) ); ?>"
name="<?php echo esc_attr( $this->get_field_name( 'submit_button_color' ) ); ?>"
type="text"
value="<?php echo esc_attr( $submit_button_color ); ?>" />
</p>
<p>
<input
class="smaily-checkbox default_background_color"
<?php
if ( $use_site_submit_button_color === true ) :
?>
checked<?php endif; ?>
id="<?php echo $this->get_field_id( 'default_background_color' ); ?>"
name="<?php echo $this->get_field_name( 'use_site_submit_button_color' ); ?>"
type="checkbox"
value="1" />
<label for="<?php echo $this->get_field_id( 'use_site_submit_button_color' ); ?>" ><?php esc_html_e( 'Use default button color?', 'smaily' ); ?></label>
</p>
</div>

<!-- Customize button text. -->
<div class="row" id="button-text-container">
<p>
<label for="<?php echo esc_attr( $this->get_field_id( 'submit_button_text_color' ) ); ?>">
<b><?php esc_html_e( 'Button text color', 'smaily' ); ?></b>
</label>
<!--Jscolor required: false is used to clear the input value. -->
<input
data-jscolor="{required:false}"
class="button-style"
type="text"
<?php
if ( $use_site_submit_button_text_color === true ) :
?>
disabled<?php endif; ?>
id="<?php echo esc_attr( $this->get_field_id( 'submit_button_text_color' ) ); ?>"
name="<?php echo esc_attr( $this->get_field_name( 'submit_button_text_color' ) ); ?>"
value="<?php echo esc_attr( $submit_button_text_color ); ?>" />
</p>
<p>
<input
class="smaily-checkbox default_text_color"
<?php
if ( $use_site_submit_button_text_color === true ) :
?>
checked<?php endif; ?>
id="<?php echo $this->get_field_id( 'default_text_color' ); ?>"
name="<?php echo $this->get_field_name( 'use_site_submit_button_text_color' ); ?>"
type="checkbox"
value="1" />
<label for="<?php echo $this->get_field_id( 'use_site_submit_button_text_color' ); ?>" ><?php esc_html_e( 'Use default text color?', 'smaily' ); ?></label>
</p>
</div>
</div>
</div>
Expand Down
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Requires PHP: 5.6
Requires at least: 4.5
Tested up to: 5.7.2
WC tested up to: 4.7.0
Stable tag: 1.8.0
Stable tag: 1.8.1
License: GPLv3

Simple and flexible Smaily newsletter and RSS-feed integration for WooCommerce.
Expand Down Expand Up @@ -150,6 +150,10 @@ Also you can determine if customer had more than 10 items in cart

== Changelog ==

= 1.8.1 =

- Bugfix - improve widget responsive design.

= 1.8.0 =

- Feature - user can customize the appearance of the subscription form.
Expand Down
4 changes: 2 additions & 2 deletions smaily-for-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* Plugin Name: Smaily for WooCommerce
* Plugin URI: https://github.com/sendsmaily/smaily-woocommerce-plugin
* Description: Smaily email marketing and automation extension plugin for WooCommerce. Set up easy sync for your contacts, add opt-in subscription form, import products directly to your email template and send abandoned cart reminder emails.
* Version: 1.8.0
* Version: 1.8.1
* License: GPL3
* Author: Smaily
* Author URI: https://smaily.com/
Expand Down Expand Up @@ -48,7 +48,7 @@
define( 'SMAILY_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
define( 'SMAILY_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
define( 'SMAILY_PLUGIN_NAME', plugin_basename( __FILE__ ) );
define( 'SMAILY_PLUGIN_VERSION', '1.8.0' );
define( 'SMAILY_PLUGIN_VERSION', '1.8.1' );

// Required to use functions is_plugin_active and deactivate_plugins.
require_once ABSPATH . 'wp-admin/includes/plugin.php';
Expand Down
52 changes: 23 additions & 29 deletions static/admin-widget-style.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
/* WIDGET STYLES */

/* Headings and sections styles */
div.section:first-child {
margin-top: 10px;
}

div.section {
margin-bottom: 40px;
}

div.smaily div.section > h2 { /* Selects the immediate child element that is inside the section(div). If h with p are in one section,
then this rule applies to the last one in the HTML */
margin-bottom: 10px;
}

/* Layout styles*/
.smaily-layout-container {
background-color: #f6f7f7;
border: 1px solid #c3c4c7;
Expand All @@ -7,29 +23,25 @@
margin-bottom: 10px;
}

/* Clear floats after the columns */
.row {
display: flex;
}

/* Layout styles*/
.smaily-layouts {
width: 90%;
}

/* Button styles */
.column {
flex: 50%;
.row > p:first-child {
margin-bottom: 0.5em;
}
.row > p:last-child {
margin: 0.5em 1px 1em;
}

.button-style {
width: 95%;
border: 1px solid #c3c4c7;
width: 100%;
border: 1px solid #8c8f94;
border-radius: 5px;
padding: 5px 0px 5px 0px;
margin-top: 3px;
font-size: 14px;
border-color: #8c8f94;
}

/* Checkbox styles */
Expand All @@ -54,21 +66,3 @@
box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
transition: .05s border-color ease-in-out;
}

/* Headings and sections styles */
div.section:first-child {
margin-top: 10px;
}

div.section {
margin-bottom: 40px;
}

div.smaily div.section > h2 { /* Selects the immediate child element that is inside the section(div). If h with p are in one section,
then this rule applies to the last one in the HTML */
margin-bottom: 10px;
}

div.default-value-checkbox {
margin-top: 10px;
}

0 comments on commit 7c9c49e

Please sign in to comment.