Skip to content

Commit

Permalink
ACF 5.8.6
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotcondon committed Oct 27, 2019
1 parent 92e3b3f commit ef5555c
Show file tree
Hide file tree
Showing 16 changed files with 3,338 additions and 901 deletions.
4 changes: 2 additions & 2 deletions acf.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Advanced Custom Fields
Plugin URI: https://www.advancedcustomfields.com
Description: Customize WordPress with powerful, professional and intuitive fields.
Version: 5.8.5
Version: 5.8.6
Author: Elliot Condon
Author URI: https://www.advancedcustomfields.com
Text Domain: acf
Expand All @@ -17,7 +17,7 @@
class ACF {

/** @var string The plugin version number. */
var $version = '5.8.5';
var $version = '5.8.6';

/** @var array The plugin settings array. */
var $settings = array();
Expand Down
56 changes: 28 additions & 28 deletions assets/build/css/_fields.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1295,74 +1295,74 @@ ul.acf-checkbox-list {
cursor: text;
}

.acf-actions {

}

.acf-loading {
position: absolute;
top: 10px;
right: 11px;
display: none;
}

&:hover {
.acf-actions { display: block; }
// Avoid icons disapearing when click/blur events conflict.
.acf-icon:active {
display: inline-block !important;
}
}

.canvas {
height: 400px;
}

// Show actions on hover.
&:hover .title .acf-actions {
display: block;
}

/* default is focused */
// Default state (show locate, hide search and cancel).
.title {
.acf-icon.-location {
display: inline-block;
}
.acf-icon.-cancel {
display: none;
}
.acf-icon.-cancel,
.acf-icon.-search {
display: none;
}
}


/* -search */
&.-search .title {
// Has value (hide locate, show cancel).
&.-value .title {
.search {
font-weight: bold;
}
.acf-icon.-location {
display: none;
}
.acf-icon.-cancel {
display: inline-block;
}
.acf-icon.-search {
display: inline-block;
}
}



/* -value */
&.-value .title {
.search {
font-weight: bold;
}
// Is searching (hide locate, show search and cancel).
&.-searching .title {
.acf-icon.-location {
display: none;
}
.acf-icon.-cancel {
.acf-icon.-cancel,
.acf-icon.-search {
display: inline-block;
}
.acf-icon.-search {
display: none;

// Show actions.
.acf-actions {
display: block;
}

// Change search font-weght.
.search {
font-weight: normal !important;
}
}


/* -loading */
// Loading.
&.-loading .title {
a {
display: none !important;
Expand Down
25 changes: 19 additions & 6 deletions assets/build/js/_acf-field-checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,19 @@

onChange: function( e, $el ){

// vars
// Vars.
var checked = $el.prop('checked');
var $label = $el.parent('label');
var $toggle = this.$toggle();

// selected
// Add or remove "selected" class.
if( checked ) {
$el.parent().addClass('selected');
$label.addClass('selected');
} else {
$el.parent().removeClass('selected');
$label.removeClass('selected');
}

// determine if all inputs are checked
// Update toggle state if all inputs are checked.
if( $toggle.length ) {
var $inputs = this.$inputs();

Expand All @@ -67,9 +68,21 @@
},

onClickToggle: function( e, $el ){

// Vars.
var checked = $el.prop('checked');
var $inputs = this.$inputs();
var $inputs = this.$('input[type="checkbox"]');
var $labels = this.$('label');

// Update "checked" state.
$inputs.prop('checked', checked);

// Add or remove "selected" class.
if( checked ) {
$labels.addClass('selected');
} else {
$labels.removeClass('selected');
}
},

onClickCustom: function( e, $el ){
Expand Down
Loading

0 comments on commit ef5555c

Please sign in to comment.