bindings
6 months ago
commands
2 weeks ago
pro
2 weeks ago
_acf-compatibility.js
1 year ago
_acf-condition-types.js
7 months ago
_acf-condition.js
1 year ago
_acf-conditions.js
1 year ago
_acf-field-accordion.js
6 months ago
_acf-field-button-group.js
7 months ago
_acf-field-checkbox.js
1 month ago
_acf-field-color-picker.js
7 months ago
_acf-field-date-picker.js
1 month ago
_acf-field-date-time-picker.js
1 month ago
_acf-field-file.js
1 month ago
_acf-field-google-map.js
6 months ago
_acf-field-icon-picker.js
1 month ago
_acf-field-image.js
1 month ago
_acf-field-link.js
1 year ago
_acf-field-oembed.js
1 month ago
_acf-field-page-link.js
1 year ago
_acf-field-post-object.js
1 year ago
_acf-field-radio.js
1 month ago
_acf-field-range.js
1 year ago
_acf-field-relationship.js
1 month ago
_acf-field-select.js
1 month ago
_acf-field-tab.js
3 weeks ago
_acf-field-taxonomy.js
7 months ago
_acf-field-time-picker.js
1 month ago
_acf-field-true-false.js
1 month ago
_acf-field-url.js
1 year ago
_acf-field-user.js
1 year ago
_acf-field-wysiwyg.js
1 month ago
_acf-field.js
1 year ago
_acf-fields.js
1 year ago
_acf-helpers.js
1 year ago
_acf-hooks.js
1 year ago
_acf-internal-post-type.js
7 months ago
_acf-media.js
2 weeks ago
_acf-modal.js
1 year ago
_acf-model.js
1 year ago
_acf-notice.js
7 months ago
_acf-panel.js
1 year ago
_acf-popup.js
7 months ago
_acf-postbox.js
1 year ago
_acf-screen.js
10 months ago
_acf-select2.js
1 year ago
_acf-tinymce.js
6 months ago
_acf-tooltip.js
10 months ago
_acf-unload.js
1 year ago
_acf-validation.js
1 month ago
_acf.js
7 months ago
_browse-fields-modal.js
7 months ago
_field-group-compatibility.js
1 year ago
_field-group-conditions.js
1 year ago
_field-group-field.js
3 months ago
_field-group-fields.js
10 months ago
_field-group-locations.js
1 year ago
_field-group-settings.js
1 year ago
_field-group.js
10 months ago
acf-escaped-html-notice.js
1 year ago
acf-field-group.js
1 year ago
acf-input.js
1 year ago
acf-internal-post-type.js
1 year ago
acf.js
1 year ago
_acf-panel.js
37 lines
| 1 | ( function ( $, undefined ) { |
| 2 | var panel = new acf.Model( { |
| 3 | events: { |
| 4 | 'click .acf-panel-title': 'onClick', |
| 5 | }, |
| 6 | |
| 7 | onClick: function ( e, $el ) { |
| 8 | e.preventDefault(); |
| 9 | this.toggle( $el.parent() ); |
| 10 | }, |
| 11 | |
| 12 | isOpen: function ( $el ) { |
| 13 | return $el.hasClass( '-open' ); |
| 14 | }, |
| 15 | |
| 16 | toggle: function ( $el ) { |
| 17 | this.isOpen( $el ) ? this.close( $el ) : this.open( $el ); |
| 18 | }, |
| 19 | |
| 20 | open: function ( $el ) { |
| 21 | $el.addClass( '-open' ); |
| 22 | $el.find( '.acf-panel-title i' ).attr( |
| 23 | 'class', |
| 24 | 'dashicons dashicons-arrow-down' |
| 25 | ); |
| 26 | }, |
| 27 | |
| 28 | close: function ( $el ) { |
| 29 | $el.removeClass( '-open' ); |
| 30 | $el.find( '.acf-panel-title i' ).attr( |
| 31 | 'class', |
| 32 | 'dashicons dashicons-arrow-right' |
| 33 | ); |
| 34 | }, |
| 35 | } ); |
| 36 | } )( jQuery ); |
| 37 |