codemirror
4 years ago
jquery-tiptip
5 years ago
select2
5 years ago
how-to.js
8 years ago
how-to.min.js
6 years ago
jquery.colorbox.js
8 years ago
jquery.colorbox.min.js
6 years ago
metabox.js
4 years ago
metabox.min.js
4 years ago
multisite-updater.js
6 years ago
multisite-updater.min.js
6 years ago
welcome-modal.js
3 years ago
welcome-modal.min.js
3 years ago
wp-pages.js
4 years ago
wp-pages.min.js
4 years ago
yit-cpt-unlimited.js
6 years ago
yit-cpt-unlimited.min.js
6 years ago
yit-plugin-panel.js
3 years ago
yit-plugin-panel.min.js
3 years ago
yit-wp-pointer.js
5 years ago
yit-wp-pointer.min.js
5 years ago
yith-bh-onboarding.js
3 years ago
yith-bh-onboarding.min.js
3 years ago
yith-colorpicker.min.js
5 years ago
yith-dashboard.js
7 years ago
yith-dashboard.min.js
6 years ago
yith-date-format.js
5 years ago
yith-date-format.min.js
5 years ago
yith-enhanced-select-wc-2.6.js
5 years ago
yith-enhanced-select-wc-2.6.min.js
5 years ago
yith-enhanced-select.js
3 years ago
yith-enhanced-select.min.js
3 years ago
yith-fields.js
4 years ago
yith-fields.min.js
4 years ago
yith-promo.js
7 years ago
yith-promo.min.js
6 years ago
yith-system-info.js
3 years ago
yith-system-info.min.js
3 years ago
yith-ui.js
4 years ago
yith-ui.min.js
4 years ago
yith-update-plugins.js
7 years ago
yith-update-plugins.min.js
6 years ago
wp-pages.js
76 lines
| 1 | /* global yith_plugin_fw_wp_pages */ |
| 2 | jQuery( function ( $ ) { |
| 3 | var wrap = $( '.yith-plugin-fw-wp-page-wrapper' ), |
| 4 | notices = $( 'div.updated, div.error, div.notice' ).not( '#message' ), |
| 5 | message = $( 'div#message.updated' ); |
| 6 | |
| 7 | // prevents the WC message for changes when leaving the panel page |
| 8 | $( '.yith-plugin-fw-wp-page-wrapper .woo-nav-tab-wrapper' ).removeClass( 'woo-nav-tab-wrapper' ).addClass( 'yith-nav-tab-wrapper' ); |
| 9 | |
| 10 | // prevent moving notices withing the tab in WP Pages and move them into the wrapper |
| 11 | notices.addClass( 'inline' ); |
| 12 | if ( wrap.length ) { |
| 13 | wrap.prepend( notices ); |
| 14 | } |
| 15 | |
| 16 | // Update message animation. |
| 17 | if ( message.length ) { |
| 18 | message.addClass( 'yith-plugin-fw-animate__appear-from-top' ).show(); |
| 19 | message.on( 'click', '.notice-dismiss', function ( e ) { |
| 20 | e.stopPropagation(); |
| 21 | message.removeClass( 'yith-plugin-fw-animate__appear-from-top' ).slideUp( 200 ); |
| 22 | } ) |
| 23 | } |
| 24 | |
| 25 | // Confirmation window when deleting custom post types and custom terms through Bulk Actions. |
| 26 | if ( yith_plugin_fw_wp_pages.bulk_delete_confirmation_enabled ) { |
| 27 | var bulkDeleteConfirmed = false; |
| 28 | |
| 29 | $( document ).on( 'click', '#doaction, #doaction2', function ( e ) { |
| 30 | var doActionButton = $( this ), |
| 31 | bulkActionSelector = doActionButton.siblings( '#bulk-action-selector-top, #bulk-action-selector-bottom' ); |
| 32 | |
| 33 | if ( 'yith' in window && 'ui' in yith ) { |
| 34 | if ( bulkDeleteConfirmed ) { |
| 35 | bulkDeleteConfirmed = false; |
| 36 | } else { |
| 37 | var confirmOptions = {}, |
| 38 | selectedItems = $( '#the-list .check-column input[type=checkbox]:checked' ); |
| 39 | |
| 40 | if ( selectedItems.length ) { |
| 41 | switch ( bulkActionSelector.val() ) { |
| 42 | case 'trash': |
| 43 | confirmOptions.title = yith_plugin_fw_wp_pages.i18n.bulk_trash_confirm_title; |
| 44 | confirmOptions.message = yith_plugin_fw_wp_pages.i18n.bulk_trash_confirm_message; |
| 45 | confirmOptions.cancelButton = yith_plugin_fw_wp_pages.i18n.bulk_trash_cancel_button; |
| 46 | confirmOptions.confirmButton = yith_plugin_fw_wp_pages.i18n.bulk_trash_confirm_button; |
| 47 | confirmOptions.confirmButtonType = 'delete'; |
| 48 | break; |
| 49 | case 'delete': |
| 50 | confirmOptions.title = yith_plugin_fw_wp_pages.i18n.bulk_delete_confirm_title; |
| 51 | confirmOptions.message = yith_plugin_fw_wp_pages.i18n.bulk_delete_confirm_message; |
| 52 | confirmOptions.cancelButton = yith_plugin_fw_wp_pages.i18n.bulk_delete_cancel_button; |
| 53 | confirmOptions.confirmButton = yith_plugin_fw_wp_pages.i18n.bulk_delete_confirm_button; |
| 54 | confirmOptions.confirmButtonType = 'delete'; |
| 55 | break; |
| 56 | } |
| 57 | |
| 58 | if ( !$.isEmptyObject( confirmOptions ) ) { |
| 59 | e.preventDefault(); |
| 60 | |
| 61 | confirmOptions.closeAfterConfirm = false; |
| 62 | confirmOptions.onConfirm = function () { |
| 63 | bulkDeleteConfirmed = true; |
| 64 | doActionButton.trigger( 'click' ); |
| 65 | }; |
| 66 | |
| 67 | yith.ui.confirm( confirmOptions ); |
| 68 | } |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | } |
| 73 | } ); |
| 74 | } |
| 75 | |
| 76 | } ); |