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
yith-system-info.js
93 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_id = t.parent().attr( 'id' ); |
| 20 | |
| 21 | if ( wrapper_id === 'yith-system-alert' ) { |
| 22 | var cname = 'hide_yith_system_alert', |
| 23 | cvalue = 'yes'; |
| 24 | |
| 25 | document.cookie = cname + "=" + cvalue + ";path=/"; |
| 26 | } |
| 27 | } |
| 28 | ); |
| 29 | $( document ).on( |
| 30 | 'click', |
| 31 | '.yith-download-log', |
| 32 | function () { |
| 33 | |
| 34 | var container = $( this ).parent(); |
| 35 | var data = { |
| 36 | action: 'yith_create_log_file', |
| 37 | file : $( this ).data( 'file' ), |
| 38 | nonce : $( this ).data( 'nonce' ), |
| 39 | }; |
| 40 | |
| 41 | container.addClass( 'progress' ); |
| 42 | |
| 43 | $.post( |
| 44 | yith_sysinfo.ajax_url, |
| 45 | data, |
| 46 | function ( response ) { |
| 47 | if ( false !== response.file ) { |
| 48 | var a = document.createElement( "a" ); |
| 49 | var fileName = response.file.split( "/" ).pop(); |
| 50 | a.href = response.file; |
| 51 | a.download = fileName; |
| 52 | document.body.appendChild( a ); |
| 53 | a.click(); |
| 54 | window.URL.revokeObjectURL( response.file ); |
| 55 | a.remove(); |
| 56 | } |
| 57 | container.removeClass( 'progress' ); |
| 58 | } |
| 59 | ); |
| 60 | } |
| 61 | ); |
| 62 | $( document ).on( |
| 63 | 'click', |
| 64 | '.copy-link', |
| 65 | function ( e ) { |
| 66 | e.preventDefault(); |
| 67 | |
| 68 | var $this = $( this ), |
| 69 | $temp = $( '<textarea>' ); |
| 70 | |
| 71 | $( 'body' ).append( $temp ); |
| 72 | $temp.val( "define( 'WP_DEBUG', true );\ndefine( 'WP_DEBUG_LOG', true );\ndefine( 'WP_DEBUG_DISPLAY', false );" ).select(); |
| 73 | document.execCommand( "Copy" ); |
| 74 | $temp.remove(); |
| 75 | if ( ! $this.find( '.copied-tooltip' ).length ) { |
| 76 | $this |
| 77 | .append( |
| 78 | $( '<span/>', { class: 'copied-tooltip' } ) |
| 79 | .html( $this.data( "tooltip" ) ).fadeIn( 300 ) |
| 80 | ); |
| 81 | setTimeout( |
| 82 | function () { |
| 83 | $this.find( ".copied-tooltip" ).fadeOut().remove() |
| 84 | }, |
| 85 | 3000 |
| 86 | ); |
| 87 | } |
| 88 | |
| 89 | } |
| 90 | ); |
| 91 | } |
| 92 | ); |
| 93 |