From 238d3e53f51c4408581b4961924120ac008a2ae4 Mon Sep 17 00:00:00 2001 From: yehudah Date: Wed, 15 Nov 2017 07:56:14 +0000 Subject: * Fixed: IP detection error in some web hosts * Fixed: Link open in new page attribute = _blank * Fixed: Replace deprecated PHP 7 functions. * Temp: Missconfigured certificate errors * Updated: Validator TLD's list --- script/feedback/feedback.js | 73 +++++++++++++++++++++++++++++++++++++++++++++ script/postman.js | 4 +++ 2 files changed, 77 insertions(+) create mode 100644 script/feedback/feedback.js (limited to 'script') diff --git a/script/feedback/feedback.js b/script/feedback/feedback.js new file mode 100644 index 0000000..97940cf --- /dev/null +++ b/script/feedback/feedback.js @@ -0,0 +1,73 @@ +jQuery(document).ready(function($) { + + $( '#the-list #postman-plugin-disbale-link' ).click(function(e) { + e.preventDefault(); + + var reason = $( '#postman-feedback-dialog-content .postman-reason' ), + deactivateLink = $( this ).attr( 'href' ); + + $( "#postman-feedback-dialog-content" ).dialog({ + title: 'Post SMTP Feedback Form', + dialogClass: 'postman-feedback-dialog-form', + resizable: false, + minWidth: 400, + minHeight: 300, + modal: true, + buttons: { + 'skip' : { + text: 'Skip', + id: 'postman-feedback-dialog-skip', + click: function() { + $( this ).dialog( "close" ); + + location.href = deactivateLink; + } + }, + 'go' : { + text: 'Continue', + id: 'postman-feedback-dialog-go', + class: 'button', + click: function() { + $( this ).dialog( "close" ); + + var form = $( this ).find( 'form' ).serializeArray(), + result = {}; + + $.each( form, function() { + if ( '' !== this.value ) + result[ this.name ] = this.value; + }); + + if ( ! jQuery.isEmptyObject( result ) ) { + result.action = 'post_user_feedback'; + + $.post( post_feedback.admin_ajax, result, function(result) { + + }); + } + + // Remove this comment to deactivate plugin + location.href = deactivateLink; + }, + }, + 'cancel' : { + text: 'Cancel', + id: 'postman-feedback-dialog-cancel', + class: 'button button-primary', + click: function() { + $( this ).dialog( "close" ); + } + } + } + }); + + reason.change(function() { + $( '.postman-reason-input' ).hide(); + + if ( $( this ).hasClass( 'postman-custom-input' ) ) { + $( this ).find( '.postman-reason-input' ).show(); + } + }); + + }); +}); \ No newline at end of file diff --git a/script/postman.js b/script/postman.js index f019dbb..c6c0e98 100644 --- a/script/postman.js +++ b/script/postman.js @@ -1,3 +1,7 @@ +jQuery(document).ready(function($) { + $( ".email-log-date" ).datepicker(); +}); + var redirectUrlWarning = false; if (!console) console = { -- cgit v1.2.3