Merge pull request #8087 from shivapoudel/settings-api

Tweaks iris-picker styles
This commit is contained in:
Mike Jolley 2015-05-01 15:35:28 +01:00
commit d2b99ebe5e
2 changed files with 56 additions and 61 deletions

View File

@ -2044,7 +2044,8 @@ img.help_tip {
}
table.form-table {
margin: 0 0 0;
margin: 0;
position: relative;
.select2-container {
display: block;
@ -2121,21 +2122,17 @@ img.help_tip {
}
.color_box {
border: 1px solid #ccc;
box-shadow: 1px 1px 3px rgba(0,0,0,0.2);
-webkit-box-shadow: 1px 1px 3px rgba(0,0,0,0.2);
-moz-box-shadow: 1px 1px 3px rgba(0,0,0,0.2);
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
padding: 4px 6px;
float: left;
width: 90px;
padding: 4px 6px;
margin: 0 10px 0 0;
border: 1px solid #ccc;
border-radius: 3px;
box-shadow: 0 1px 3px rgba(0,0,0,0.2);
strong {
text-align: left;
display: block;
text-align: left;
padding: 0 0 2px;
font-size: 0.92em;
@ -2146,8 +2143,8 @@ img.help_tip {
}
input.colorpick {
width: 100%;
margin: 0;
width: 100%;
font-family: monospace;
box-sizing: border-box;
}
@ -2158,27 +2155,25 @@ img.help_tip {
}
.color_box_clear {
display: block;
clear: both;
display: block;
padding-bottom: 10px;
}
.iris-picker {
z-index: 100;
position: absolute;
display: none;
position: absolute;
border: 1px solid #ccc;
box-shadow: 1px 1px 3px rgba(0,0,0,0.2);
-webkit-box-shadow: 1px 1px 3px rgba(0,0,0,0.2);
-moz-box-shadow: 1px 1px 3px rgba(0,0,0,0.2);
@include border-radius(3px);
border-radius: 3px;
box-shadow: 0 1px 3px rgba(0,0,0,0.2);
.ui-slider {
border: 0 !important;
background: none transparent !important;
margin: 0 !important;
width: auto !important;
height: auto !important;
background: none transparent !important;
.ui-slider-handle {
margin-bottom: 0 !important;
@ -2583,7 +2578,7 @@ img.help_tip {
}
}
h4.wc-settings-sub-title {
h3.wc-settings-sub-title {
font-size: 1.2em;
}
}

View File

@ -1,8 +1,9 @@
/* global woocommerce_settings_params */
jQuery( window ).load( function() {
// Countries
jQuery( 'select#woocommerce_allowed_countries, select#woocommerce_ship_to_countries' ).change( function() {
if (jQuery(this).val()=="specific") {
if ( jQuery( this ).val() === 'specific' ) {
jQuery( this ).parent().parent().next( 'tr' ).show();
} else {
jQuery( this ).parent().parent().next( 'tr' ).hide();
@ -18,8 +19,7 @@ jQuery(window).load(function(){
border: true
}).each( function() {
jQuery( this ).css({ backgroundColor: jQuery( this ).val() });
})
.click(function(){
}).click( function() {
jQuery( '.iris-picker' ).hide();
jQuery( this ).closest( '.color_box, td' ).find( '.iris-picker' ).show();
});
@ -44,7 +44,7 @@ jQuery(window).load(function(){
if ( changed ) {
window.onbeforeunload = function() {
return woocommerce_settings_params.i18n_nav_warning;
}
};
} else {
window.onbeforeunload = '';
}
@ -62,7 +62,7 @@ jQuery(window).load(function(){
axis: 'y',
handle: 'td.sort',
scrollSensitivity: 40,
helper:function(e,ui){
helper: function( event, ui ) {
ui.children().each( function() {
jQuery( this ).width( jQuery( this ).width() );
});
@ -79,13 +79,13 @@ jQuery(window).load(function(){
// Select all/none
jQuery( '.woocommerce' ).on( 'click', '.select_all', function() {
jQuery(this).closest( 'td' ).find( 'select option' ).attr( "selected", "selected" );
jQuery( this ).closest( 'td' ).find( 'select option' ).attr( 'selected', 'selected' );
jQuery( this ).closest( 'td' ).find( 'select' ).trigger( 'change' );
return false;
});
jQuery( '.woocommerce' ).on( 'click', '.select_none', function() {
jQuery(this).closest( 'td' ).find( 'select option' ).removeAttr( "selected" );
jQuery( this ).closest( 'td' ).find( 'select option' ).removeAttr( 'selected' );
jQuery( this ).closest( 'td' ).find( 'select' ).trigger( 'change' );
return false;
});