| 1 |
jQuery(document).ready(function(){ |
| 2 |
|
| 3 |
if ( jQuery('#select_user_to_edit_form').length > 0 ) |
| 4 |
wppb_select_user_to_edit_initialize(); |
| 5 |
|
| 6 |
}) |
| 7 |
|
| 8 |
/** |
| 9 |
* Handle "Select User To Edit" Field (Edit Profile Form) |
| 10 |
* |
| 11 |
* */ |
| 12 |
function wppb_select_user_to_edit_initialize() { |
| 13 |
jQuery("select").filter(function() { |
| 14 |
if ( this.id.startsWith( "wppb-" ) && this.id.endsWith( "user-to-edit" ) ) { |
| 15 |
return this; |
| 16 |
} |
| 17 |
}).on("change", function () { |
| 18 |
window.location.href = jQuery(this).val(); |
| 19 |
}); |
| 20 |
jQuery(function(){ |
| 21 |
jQuery("select").filter(function() { |
| 22 |
if ( this.id.startsWith( "wppb-" ) && this.id.endsWith( "user-to-edit" ) ) { |
| 23 |
return this; |
| 24 |
} |
| 25 |
}).select2().on("select2:open", function(){ |
| 26 |
if( jQuery(".wppb-user-to-edit").parents( ".overlay-container" ).length ){ |
| 27 |
jQuery(".wppb-user-to-edit").data("select2").dropdown.$dropdownContainer.css( "z-index", "99999999" ); |
| 28 |
} |
| 29 |
}); |
| 30 |
}) |
| 31 |
} |