codemirror
9 years ago
javascript-md5
7 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
5 years ago
metabox.min.js
5 years ago
multisite-updater.js
6 years ago
multisite-updater.min.js
6 years ago
wp-pages.js
6 years ago
wp-pages.min.js
6 years ago
yit-cpt-unlimited.js
6 years ago
yit-cpt-unlimited.min.js
6 years ago
yit-plugin-panel.js
5 years ago
yit-plugin-panel.min.js
5 years ago
yit-wp-pointer.js
5 years ago
yit-wp-pointer.min.js
5 years ago
yith-colorpicker.min.js
5 years ago
yith-dashboard.js
7 years ago
yith-dashboard.min.js
6 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
5 years ago
yith-enhanced-select.min.js
5 years ago
yith-fields.js
5 years ago
yith-fields.min.js
5 years ago
yith-gutenberg.js
5 years ago
yith-gutenberg.min.js
5 years ago
yith-promo.js
7 years ago
yith-promo.min.js
6 years ago
yith-system-info.js
5 years ago
yith-system-info.min.js
5 years ago
yith-update-plugins.js
7 years ago
yith-update-plugins.min.js
6 years ago
yith-system-info.js
92 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 | }; |
| 39 | |
| 40 | container.addClass( 'progress' ); |
| 41 | |
| 42 | $.post( |
| 43 | yith_sysinfo.ajax_url, |
| 44 | data, |
| 45 | function ( response ) { |
| 46 | if ( false !== response.file ) { |
| 47 | var a = document.createElement( "a" ); |
| 48 | var fileName = response.file.split( "/" ).pop(); |
| 49 | a.href = response.file; |
| 50 | a.download = fileName; |
| 51 | document.body.appendChild( a ); |
| 52 | a.click(); |
| 53 | window.URL.revokeObjectURL( response.file ); |
| 54 | a.remove(); |
| 55 | } |
| 56 | container.removeClass( 'progress' ); |
| 57 | } |
| 58 | ); |
| 59 | } |
| 60 | ); |
| 61 | $( document ).on( |
| 62 | 'click', |
| 63 | '.copy-link', |
| 64 | function ( e ) { |
| 65 | e.preventDefault(); |
| 66 | |
| 67 | var $this = $( this ), |
| 68 | $temp = $( '<textarea>' ); |
| 69 | |
| 70 | $( 'body' ).append( $temp ); |
| 71 | $temp.val( "define( 'WP_DEBUG', true );\ndefine( 'WP_DEBUG_LOG', true );\ndefine( 'WP_DEBUG_DISPLAY', false );" ).select(); |
| 72 | document.execCommand( "Copy" ); |
| 73 | $temp.remove(); |
| 74 | if ( ! $this.find( '.copied-tooltip' ).length ) { |
| 75 | $this |
| 76 | .append( |
| 77 | $( '<span/>', {class: 'copied-tooltip'} ) |
| 78 | .html( $this.data( "tooltip" ) ).fadeIn( 300 ) |
| 79 | ); |
| 80 | setTimeout( |
| 81 | function () { |
| 82 | $this.find( ".copied-tooltip" ).fadeOut().remove() |
| 83 | }, |
| 84 | 3000 |
| 85 | ); |
| 86 | } |
| 87 | |
| 88 | } |
| 89 | ); |
| 90 | } |
| 91 | ); |
| 92 |