PluginProbe
Loginizer / 1.9.6
Loginizer v1.9.6
2.1.0 2.0.9 2.0.8 1.9.8 1.9.9 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 trunk 1.0 1.0.1 1.0.2 1.1.0 1.1.1 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 All 74 releases
loginizer / assets / js / social-admin.js

social-admin.js in Loginizer 1.9.6, at assets/js/social-admin.js

35 lines 909 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1
2 jQuery(document).ready(function() {
3 jQuery(".loginizer-social-wrapper").sortable({
4 handle : '.loginizer-social-grip',
5 placeholder : 'loginizer-sortable-placeholder',
6 stop : loginizer_sort_social
7 });
8 });
9
10 // Used to sort and save the order of Social Login Apps.
11 function loginizer_sort_social(event, ui) {
12 var target= jQuery(event.target),
13 sortables = target.find('.loginizer-social-provider'),
14
15 sorted_arr = sortables.map(function() {
16 return jQuery(this).data('provider');
17 }).get();
18
19 // To show the saving order text.
20 let saving_order = jQuery(ui.item).find('.loginizer-social-saving-order');
21 saving_order.show();
22
23 jQuery.ajax({
24 method : 'POST',
25 url : loginizer_social.ajax_url,
26 data : {
27 security: loginizer_social.nonce,
28 order: sorted_arr,
29 action: 'loginizer_social_order'
30 },
31 success: function(res){
32 saving_order.hide();
33 }}
34 );
35 }