PluginProbe
Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts / 2.7.8
Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts v2.7.8
2.7.9 2.7.8 2.7.7 2.7.6 2.7.5 2.7.4 trunk 1.3 2.0.4 2.0.6 2.1.91 2.2.4 2.2.7 2.2.9 2.3.1 2.3.10 2.4.10 2.4.2 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.6.0 All 30 releases
← All changes | admin/assets/js/snippet-library.js +19 -0 2.6.0 → 2.7.8 View file →
@@ -1,5 +1,10 @@
1 1 jQuery(document).ready( function($) {
2 + // Show premium upsell modal for locked snippets
3 + $(document).on('click', '.wbcr-inp-premium-snippet-button', function() {
4 + $('#winp-premium-snippet-modal').show();
5 + });
6 +
2 7 // Импортировать выбранный сниппет из списка
3 8 $( '.wbcr-inp-enable-snippet-button' ).click( function() {
4 9 if ( confirm(winp_snippet_library.is_import) ) {
5 10 if ($(this).hasClass('disabled')) return;
@@ -22,8 +27,22 @@
22 27 alert(winp_snippet_library.import_failed);
23 28 }
24 29 }
25 30 );
31 + }
32 + });
33 +
34 + // Close premium modal
35 + $(document).on('click', '#winp-modal-close', function(e) {
36 + e.preventDefault();
37 + e.stopPropagation();
38 + $('#winp-premium-snippet-modal').hide();
39 + });
40 +
41 + $(document).on('click', '#winp-premium-snippet-modal', function(e) {
42 + if (e.target === this) {
43 + e.preventDefault();
44 + $('#winp-premium-snippet-modal').hide();
26 45 }
27 46 });
28 47
29 48 // Удалить выбранный сниппет из списка