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
2 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
3 years ago
wp-pages.min.js
3 years ago
yit-cpt-unlimited.js
6 years ago
yit-cpt-unlimited.min.js
6 years ago
yit-plugin-panel.js
1 year ago
yit-plugin-panel.min.js
1 year 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
2 years ago
yith-enhanced-select.min.js
2 years ago
yith-fields.js
2 years ago
yith-fields.min.js
2 years ago
yith-promo.js
7 years ago
yith-promo.min.js
6 years ago
yith-system-info.js
2 years ago
yith-system-info.min.js
2 years ago
yith-ui.js
1 year ago
yith-ui.min.js
1 year ago
yith-update-plugins.js
7 years ago
yith-update-plugins.min.js
6 years ago
yith-system-info.js
94 lines
| 1 | /** |
| 2 | * This file belongs to the YIT Framework. |
| 3 | * |
| 4 | * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0) |
| 5 | * that is bundled with this package in the file LICENSE.txt. |
| 6 | * It is also available through the world-wide-web at this URL: |
| 7 | * http://www.gnu.org/licenses/gpl-3.0.txt |
| 8 | * |
| 9 | * @package YIT Plugin Framework |
| 10 | */ |
| 11 | |
| 12 | jQuery( |
| 13 | function ( $ ) { |
| 14 | $( document ).on( |
| 15 | 'click', |
| 16 | '.notice-dismiss', |
| 17 | function () { |
| 18 | var t = $( this ), |
| 19 | wrapper = t.parent(); |
| 20 | |
| 21 | if ( wrapper.attr( 'id' ) === 'yith-system-alert' ) { |
| 22 | wrapper.hide( 200 ); |
| 23 | var cname = 'hide_yith_system_alert', |
| 24 | cvalue = 'yes'; |
| 25 | |
| 26 | document.cookie = cname + "=" + cvalue + ";path=/"; |
| 27 | } |
| 28 | } |
| 29 | ); |
| 30 | $( document ).on( |
| 31 | 'click', |
| 32 | '.yith-download-log', |
| 33 | function () { |
| 34 | |
| 35 | var container = $( this ).parent(); |
| 36 | var data = { |
| 37 | action: 'yith_create_log_file', |
| 38 | file: $( this ).data( 'file' ), |
| 39 | nonce: $( this ).data( 'nonce' ), |
| 40 | }; |
| 41 | |
| 42 | container.addClass( 'progress' ); |
| 43 | |
| 44 | $.post( |
| 45 | yith_sysinfo.ajax_url, |
| 46 | data, |
| 47 | function ( response ) { |
| 48 | if ( false !== response.file ) { |
| 49 | var a = document.createElement( "a" ); |
| 50 | var fileName = response.file.split( "/" ).pop(); |
| 51 | a.href = response.file; |
| 52 | a.download = fileName; |
| 53 | document.body.appendChild( a ); |
| 54 | a.click(); |
| 55 | window.URL.revokeObjectURL( response.file ); |
| 56 | a.remove(); |
| 57 | } |
| 58 | container.removeClass( 'progress' ); |
| 59 | } |
| 60 | ); |
| 61 | } |
| 62 | ); |
| 63 | $( document ).on( |
| 64 | 'click', |
| 65 | '.copy-link', |
| 66 | function ( e ) { |
| 67 | e.preventDefault(); |
| 68 | |
| 69 | var $this = $( this ), |
| 70 | $temp = $( '<textarea>' ); |
| 71 | |
| 72 | $( 'body' ).append( $temp ); |
| 73 | $temp.val( "define( 'WP_DEBUG', true );\ndefine( 'WP_DEBUG_LOG', true );\ndefine( 'WP_DEBUG_DISPLAY', false );" ).select(); |
| 74 | document.execCommand( "Copy" ); |
| 75 | $temp.remove(); |
| 76 | if ( ! $this.find( '.copied-tooltip' ).length ) { |
| 77 | $this |
| 78 | .append( |
| 79 | $( '<span/>', {class: 'copied-tooltip'} ) |
| 80 | .html( $this.data( "tooltip" ) ).fadeIn( 300 ) |
| 81 | ); |
| 82 | setTimeout( |
| 83 | function () { |
| 84 | $this.find( ".copied-tooltip" ).fadeOut().remove() |
| 85 | }, |
| 86 | 3000 |
| 87 | ); |
| 88 | } |
| 89 | |
| 90 | } |
| 91 | ); |
| 92 | } |
| 93 | ); |
| 94 |