Sync plugins from current page

Signed-off-by: Adrian Nöthlich <git@promasu.tech>
This commit is contained in:
2019-09-11 19:08:46 +02:00
parent 85d41e4216
commit 8515ff9587
1847 changed files with 505469 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
(function($, undefined){
var panel = new acf.Model({
events: {
'click .acf-panel-title': 'onClick',
},
onClick: function( e, $el ){
e.preventDefault();
this.toggle( $el.parent() );
},
isOpen: function( $el ) {
return $el.hasClass('-open');
},
toggle: function( $el ){
this.isOpen($el) ? this.close( $el ) : this.open( $el );
},
open: function( $el ){
$el.addClass('-open');
$el.find('.acf-panel-title i').attr('class', 'dashicons dashicons-arrow-down');
},
close: function( $el ){
$el.removeClass('-open');
$el.find('.acf-panel-title i').attr('class', 'dashicons dashicons-arrow-right');
}
});
})(jQuery);