Skip to content

Commit

Permalink
Switched instances of $() to jQuery() (to avoid conflicts, etc)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxguru committed Jun 5, 2022
1 parent 757da9f commit aa8c1ba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -642,22 +642,22 @@ jQuery(document).ready(function($) {
if(typeof id == 'undefined')
id = null;

if(!$(this).data('select2'))
if(!jQuery(this).data('select2'))
return;

$(this).empty();
jQuery(this).empty();

var select2Data = select2SharedData[this.data().select2.options.options.sharedDataElement];
if(select2Data.length > 0)
{
var optionInfo = select2Data[id !== null ? id : 0];
var option = new Option(optionInfo.text, optionInfo.id, true, true);
$(this).append(option).val(optionInfo.id);
jQuery(this).append(option).val(optionInfo.id);
}

// TODO fix
$(this).trigger('change');
$(this).trigger({
jQuery(this).trigger('change');
jQuery(this).trigger({
type: 'select2:select',
params: {
data: optionInfo
Expand Down Expand Up @@ -2009,7 +2009,7 @@ jQuery(document).ready(function($) {
event.stopPropagation();
event.preventDefault();

var embed_id = $(this).data('embed_id');
var embed_id = jQuery(this).data('embed_id');

var embeds = getEmbeds();
for(var i=0, l=embeds.length; i<l; i++){
Expand All @@ -2026,8 +2026,8 @@ jQuery(document).ready(function($) {

jQuery('.wpcf7-pdf-forms-admin .image-embedding-tool').on("keyup change", "textarea.mail-tags", function(event) {

var mail_tags = $(this).val();
var embed_id = $(this).data('embed_id');
var mail_tags = jQuery(this).val();
var embed_id = jQuery(this).data('embed_id');

var embeds = getEmbeds();
jQuery.each(embeds, function(index, embed) {
Expand Down
4 changes: 2 additions & 2 deletions js/notices.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jQuery(document).ready(function($) {

jQuery('.wpcf7-pdf-forms-notice').each(function() {

var notice_id = $(this).data('notice-id');
var notice_id = jQuery(this).data('notice-id');

if(typeof notice_id === "undefined")
return;
Expand All @@ -27,7 +27,7 @@ jQuery(document).ready(function($) {

jQuery('.wpcf7-pdf-forms-notice').on("click", ".notice-dismiss", function(event) {

var notice_id = $(this).closest('.wpcf7-pdf-forms-notice').data('notice-id');
var notice_id = jQuery(this).closest('.wpcf7-pdf-forms-notice').data('notice-id');
if(typeof notice_id == 'string')
{
var date = new Date();
Expand Down

0 comments on commit aa8c1ba

Please sign in to comment.