form-submission.js
3 months ago
frontend-picker.js
1 week ago
item-select.js
2 months ago
listing.css
3 months ago
listing.js
3 months ago
quick-edit.js
3 months ago
table.css
3 months ago
listing.js
31 lines
| 1 | import jQuery from 'jquery'; |
| 2 | import domReady from '@wordpress/dom-ready'; |
| 3 | |
| 4 | import './listing.css'; |
| 5 | |
| 6 | import { itemSelect } from './item-select'; |
| 7 | import { searchResults } from '../partials/search-reulsts'; |
| 8 | |
| 9 | import frontendPicker from './frontend-picker'; |
| 10 | import formSubmission from './form-submission'; |
| 11 | import QuickEdit from './quick-edit'; |
| 12 | |
| 13 | domReady( () => { |
| 14 | itemSelect(); |
| 15 | searchResults( 'post-type-advanced_ads_plcmnt' ); |
| 16 | } ); |
| 17 | |
| 18 | jQuery( function () { |
| 19 | frontendPicker(); |
| 20 | formSubmission(); |
| 21 | QuickEdit(); |
| 22 | newPlacement(); |
| 23 | } ); |
| 24 | |
| 25 | function newPlacement() { |
| 26 | // open modal if no placements are available. |
| 27 | if ( jQuery( '#posts-filter tr.no-items' ).length ) { |
| 28 | window.location.hash = 'modal-placement-new'; |
| 29 | } |
| 30 | } |
| 31 |