Commit c4122906 authored by Eric Windham's avatar Eric Windham Committed by GitHub

Merge pull request #3590 from wpninjas/select-styles

Updated styles for the new Store Submissions Action options.
parents a38fe161 b1973c8d
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -154,6 +154,7 @@ define( ['views/app/drawer/optionRepeaterError'], function( ErrorView ) {
// Select Lists need an empty '<div></div>' for styling purposes.
emptyContainer = document.createElement( 'div' );
emptyContainer.style.bottom = '6px';
label.appendChild( emptyContainer );
// The template requires a string.
......@@ -203,6 +204,7 @@ define( ['views/app/drawer/optionRepeaterError'], function( ErrorView ) {
// Select Lists need an empty '<div></div>' for styling purposes.
emptyContainer = document.createElement( 'div' );
emptyContainer.style.bottom = '6px';
label.appendChild( emptyContainer );
// The template requires a string.
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
......@@ -253,6 +253,7 @@
width: 100%;
display: inline-block;
cursor: pointer;
transition: background-color 0.4s;
}
input:checked + span {
background-color: #1ea9ea;
......
......@@ -162,7 +162,7 @@ define( [ 'views/sections/widgets.js', 'views/sections/services.js', 'views/sect
cancel.classList.add( 'nf-button', 'secondary' );
cancel.innerHTML = nfi18n.optinSecondary;
actions.appendChild( cancel );
var confirm = document.createElement( 'button' );
var confirm = document.createElement( 'div' );
confirm.id = 'optin';
confirm.classList.add( 'nf-button', 'primary', 'pull-right' );
confirm.innerHTML = nfi18n.optinPrimary;
......@@ -200,22 +200,23 @@ define( [ 'views/sections/widgets.js', 'views/sections/services.js', 'views/sect
sendEmail = 0;
userEmail = '';
}
// Show spinner
jQuery( '#optin-spinner' ).css( 'visibility', 'visible' );
jQuery( '#optin-spinner' ).css( 'display', 'inline-block' );
jQuery( '#optin-buttons' ).css( 'visibility', 'hidden' );
// Disable our buttons.
jQuery( '#optin' ).unbind( 'click' );
jQuery( '#optout' ).unbind( 'click' );
// Get a reference to the current width (to avoid resizing the button).
var width = jQuery( '#optin' ).width();
// Show spinner.
jQuery( '#optin' ).html( '<span class="dashicons dashicons-update dashicons-update-spin"></span>' );
jQuery( '#optin' ).width( width );
// Hit AJAX endpoint and opt-in.
jQuery.post( ajaxurl, { action: 'nf_optin', ninja_forms_opt_in: 1, send_email: sendEmail, user_email: userEmail },
function( response ) {
jQuery( '#optin-spinner' ).css( 'visibility', 'hidden' );
jQuery( '#optin-spinner' ).css( 'display', 'none' );
optinModal.setTitle( document.createElement( 'div' ).appendChild( successTitle ).innerHTML );
optinModal.setContent( document.createElement( 'div' ).appendChild( successContent ).innerHTML );
/**
* When we get a response from our endpoint, show a thank you and set a timeout
* to close the modal.
*/
optinModal.setTitle( document.createElement( 'div' ).appendChild( successTitle ).innerHTML );
optinModal.setContent( document.createElement( 'div' ).appendChild( successContent ).innerHTML );
setTimeout (
function(){
optinModal.close();
......@@ -226,12 +227,16 @@ define( [ 'views/sections/widgets.js', 'views/sections/services.js', 'views/sect
} );
// Setup the optout click event.
jQuery( '#optout' ).click( function( e ) {
// Show spinner
jQuery( '#optin-spinner' ).css( 'visibility', 'visible' );
jQuery( '#optin-buttons' ).css( 'visibility', 'hidden' );
// Disable our buttons.
jQuery( '#optin' ).unbind( 'click' );
jQuery( '#optout' ).unbind( 'click' );
// Get a reference to the current width (to avoid resizing the button).
var width = jQuery( '#optout' ).width();
// Show spinner.
jQuery( '#optout' ).html( '<span class="dashicons dashicons-update dashicons-update-spin"></span>' );
jQuery( '#optout' ).width( width );
// Hit AJAX endpoint and opt-in.
jQuery.post( ajaxurl, { action: 'nf_optin', ninja_forms_opt_in: 0 }, function( response ) {
jQuery( '#optin-spinner' ).css( 'visibility', 'hidden' );
// When we get a response from our endpoint, close the modal.
optinModal.close();
} );
......
......@@ -737,7 +737,7 @@ Label Three, value-three, 3
<div>
<span class="dashicons dashicons-menu handle"></span>
</div>
<div>
<div class="nf-select">
<# try { #>
{{{ data.renderNonSaveFieldSelect( 'field', data.field ) }}}
<# } catch ( err ) { #>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment