diff --git a/js/auto_save.js b/js/auto_save.js index 325bf6b..6e83ceb 100644 --- a/js/auto_save.js +++ b/js/auto_save.js @@ -1,14 +1,14 @@ -jQuery(document).ready(function () { +jQuery(document).ready(function ($) { // Send elements with class sf_autosave to the server for autosave - jQuery('.sf_autosave').keyup(function () { + $('.sf_autosave').keyup(function () { var autosave_data = {}; autosave_data['ticket_id'] = SFAutoSave.ticket_id; - jQuery('.sf_autosave').each(function () { - element_key = jQuery(this).attr('name'); - element_value = jQuery(this).val(); + $('.sf_autosave').each(function () { + element_key = $(this).attr('name'); + element_value = $(this).val(); autosave_data[element_key] = element_value }); diff --git a/js/email_accounts.js b/js/email_accounts.js index a7b3568..832b1d5 100644 --- a/js/email_accounts.js +++ b/js/email_accounts.js @@ -1,12 +1,12 @@ -jQuery(document).ready(function () { - jQuery('.delete_email_account').click(function (e) { +jQuery(document).ready(function ($) { + $('.delete_email_account').click(function (e) { e.preventDefault(); if (!confirm(SFEmailAccounts.sure_delete_account)) { return; } - var account_key = jQuery(this).data('account-id'); + var account_key = $(this).data('account-id'); var form_action = "edit.php?post_type=" + SFEmailAccounts.post_type + "&page=" + SFEmailAccounts.slug; var form = ''; @@ -16,28 +16,28 @@ jQuery(document).ready(function () { form += ''; form += ''; - jQuery('body').append(form); - jQuery('#remove_email_account').submit(); + $('body').append(form); + $('#remove_email_account').submit(); }); - jQuery('#add_new_email_account #imap_ssl').change(function () { + $('#add_new_email_account #imap_ssl').change(function () { if (this.checked) { // Change to default IMAP SSL port on enabling SSL - jQuery('#add_new_email_account #imap_port').val('993'); + $('#add_new_email_account #imap_port').val('993'); } else { // Change to default IMAP non-SSL port on disabling SSL - jQuery('#add_new_email_account #imap_port').val('143'); + $('#add_new_email_account #imap_port').val('143'); } }); - jQuery('#add_new_email_account #smtp_ssl').change(function () { + $('#add_new_email_account #smtp_ssl').change(function () { if (this.checked) { // Change to default SMTP SSL port on enabling SSL - jQuery('#add_new_email_account #smtp_port').val('465'); + $('#add_new_email_account #smtp_port').val('465'); } else { // Change to default SMTP non-SSL port on disabling SSL - jQuery('#add_new_email_account #smtp_port').val('25'); + $('#add_new_email_account #smtp_port').val('25'); } }); }); diff --git a/js/email_conversation.js b/js/email_conversation.js index de266d9..3d39a19 100644 --- a/js/email_conversation.js +++ b/js/email_conversation.js @@ -1,11 +1,11 @@ -jQuery(document).ready(function () { +jQuery(document).ready(function ($) { // Send conversation to E-Mail ID's var email_conversion = function (event) { event.preventDefault(); - var email_ids = jQuery('#email_conversation_to').val(); + var email_ids = $('#email_conversation_to').val(); - jQuery.ajax(ajaxurl, { + $.ajax(ajaxurl, { type : 'post', data : { action : 'sf_forward_conversation', @@ -14,26 +14,26 @@ jQuery(document).ready(function () { _email_conversation_nonce: SFEmailConversation._email_conversation_nonce, }, beforeSend: function () { - jQuery('#email_conversation_to').prop('disabled', true); - jQuery('#email_conversation_submit').prop('disabled', true); - jQuery('#email_conversation_status').text(SFEmailConversation.sending_emails); + $('#email_conversation_to').prop('disabled', true); + $('#email_conversation_submit').prop('disabled', true); + $('#email_conversation_status').text(SFEmailConversation.sending_emails); }, success : function (content) { - jQuery('#email_conversation_status').html(content); + $('#email_conversation_status').html(content); }, error : function () { - jQuery('#email_conversation_status').text(SFEmailConversation.failed_sending); + $('#email_conversation_status').text(SFEmailConversation.failed_sending); }, complete : function () { - jQuery('#email_conversation_to').prop('disabled', false); - jQuery('#email_conversation_submit').prop('disabled', false); + $('#email_conversation_to').prop('disabled', false); + $('#email_conversation_submit').prop('disabled', false); }, }); } - jQuery('#email_conversation_submit').click(email_conversion); - jQuery('#email_conversation_to').keyup(function () { + $('#email_conversation_submit').click(email_conversion); + $('#email_conversation_to').keyup(function () { if (event.keyCode == 10) { email_conversion(); } diff --git a/js/permissions.js b/js/permissions.js index 11942b9..bb3594f 100644 --- a/js/permissions.js +++ b/js/permissions.js @@ -1,9 +1,9 @@ -jQuery(document).ready(function () { - jQuery('.permission_filters').change(function () { - var user_id = jQuery('#change_user option:selected').data('user-id'); - var status = jQuery('#change_status option:selected').data('status'); +jQuery(document).ready(function ($) { + $('.permission_filters').change(function () { + var user_id = $('#change_user option:selected').data('user-id'); + var status = $('#change_status option:selected').data('status'); - jQuery.ajax(ajaxurl, { + $.ajax(ajaxurl, { type : 'post', data : { action : 'get_user_permissions', @@ -12,13 +12,13 @@ jQuery(document).ready(function () { _get_user_permissions_nonce: SFPermissions._get_user_permissions_nonce, }, success: function (content) { - jQuery('#user_permissions_table').html(content); + $('#user_permissions_table').html(content); }, }); }); - jQuery(document).on('change', '.sf_user_permissions_table .toggle_privilege', function () { - var checkbox = jQuery(this); + $(document).on('change', '.sf_user_permissions_table .toggle_privilege', function () { + var checkbox = $(this); var checkbox_label = checkbox.siblings('.privilege_status'); var permission_identifier = checkbox.data('permission-identifier'); @@ -30,7 +30,7 @@ jQuery(document).ready(function () { checkbox_label.html(SFPermissions.changing_status); checkbox.prop('disabled', true); - jQuery.ajax(ajaxurl, { + $.ajax(ajaxurl, { type : 'post', data : { action : 'set_user_permission', diff --git a/js/predefined-replies.js b/js/predefined-replies.js index 9d27a37..f2969b5 100644 --- a/js/predefined-replies.js +++ b/js/predefined-replies.js @@ -1,18 +1,18 @@ -jQuery(document).ready(function () { +jQuery(document).ready(function ($) { - jQuery('#predefs').change(function () { + $('#predefs').change(function () { if (this.old_child == undefined) { this.old_child = 1; } // New selection of combo box - new_content = jQuery('#predefs').find('option:selected').data('content'); + new_content = $('#predefs').find('option:selected').data('content'); // Previous selection of combo box - old_content = jQuery('.predef:nth-child(' + this.old_child + ')').data('content'); + old_content = $('.predef:nth-child(' + this.old_child + ')').data('content'); // Current value of reply text box - current_content = jQuery('#reply').val(); + current_content = $('#reply').val(); if (0 == new_content.length) { return; @@ -21,12 +21,12 @@ jQuery(document).ready(function () { // Show confirmation message if reply box content is manually changed by user if (current_content != old_content) { if (false == window.confirm(SFPredefinedReplies.message)) { - jQuery('.predef:nth-child(' + this.old_child + ')').prop('selected', true); + $('.predef:nth-child(' + this.old_child + ')').prop('selected', true); return; } } - jQuery('#reply').val(new_content); - this.old_child = jQuery('#predefs').find('option:selected').index() + 1; + $('#reply').val(new_content); + this.old_child = $('#predefs').find('option:selected').index() + 1; }); }); \ No newline at end of file diff --git a/js/preferences.js b/js/preferences.js index 7f567f9..0a36235 100644 --- a/js/preferences.js +++ b/js/preferences.js @@ -1,8 +1,8 @@ -jQuery(document).ready(function () { +jQuery(document).ready(function ($) { // Update E-Mail notification settings on checkbox toggle - jQuery(document).on('change', '.sf_email_accounts_table .toggle_privilege', function () { - var checkbox = jQuery(this); + $(document).on('change', '.sf_email_accounts_table .toggle_privilege', function () { + var checkbox = $(this); var checkbox_label = checkbox.siblings('.privilege_status'); var email_notfication_identifier = checkbox.data('email-notfication-identifier'); @@ -13,7 +13,7 @@ jQuery(document).ready(function () { checkbox_label.html(SFPreferences.changing_state); checkbox.prop('disabled', true); - jQuery.ajax(ajaxurl, { + $.ajax(ajaxurl, { type : 'post', data : { action : 'set_email_notfication', diff --git a/js/supportflow.min.js b/js/supportflow.min.js index 4ea5cbf..3c33819 100644 --- a/js/supportflow.min.js +++ b/js/supportflow.min.js @@ -1,2 +1,2 @@ /*! SupportFlow minified version */ -jQuery(document).ready(function(){jQuery(".toggle-link").click(function(a){var b=jQuery(this).siblings(".toggle-content").css("display");jQuery(".toggle-content").hide(500),jQuery(".toggle-link").prop("title",SFToggleLinks.expand),"none"==b&&(jQuery(this).siblings(".toggle-content").show(500),jQuery(this).prop("title",SFToggleLinks.collapse)),a.preventDefault()}),jQuery(jQuery(".toggle-content")).each(function(){"none"==jQuery(this).css("display")?jQuery(this).siblings(".toggle-link").prop("title",SFToggleLinks.expand):jQuery(this).siblings(".toggle-link").prop("title",SFToggleLinks.collapse),jQuery(".toggle-content").first().show(500)})}),jQuery(document).ready(function(){jQuery(".delete_email_account").click(function(a){if(a.preventDefault(),confirm(SFEmailAccounts.sure_delete_account)){var b=jQuery(this).data("account-id"),c="edit.php?post_type="+SFEmailAccounts.post_type+"&page="+SFEmailAccounts.slug,d="";d+='