PageSourceSearch

https://www.fascismoeliberta.info/wp-content/plugins/users-ultra/js/expandible.js

js fascismoeliberta.info collected 2026-10-02 12:12:15 UTC 26,461 bytes, 1,129 lines download raw bytes

1if(typeof $ == 'undefined'){
2	var $ = jQuery;
3}
4(function($) {
5    jQuery(document).ready(function () { 
6	
7	   "use strict";
8        /*-------------------- EXPANDABLE PANELS ----------------------*/
9        var panelspeed = 500; //panel animate speed in milliseconds
10        var totalpanels = 3; //total number of collapsible panels   
11        var defaultopenpanel = 1; //leave 0 for no panel open   
12        var accordian = false; //set panels to behave like an accordian, with one panel only ever open at once      
13 
14        var panelheight = new Array();
15        var currentpanel = defaultopenpanel;
16        var iconheight = parseInt(jQuery('.icon-close-open').css('height'));
17        var highlightopen = true;
18         
19        //Initialise collapsible panels
20        function panelinit() {
21                for (var i=1; i<=totalpanels; i++) {
22                    panelheight[i] = parseInt($('#cp-'+i).find('.expandable-panel-content').css('height'));
23                    jQuery('#cp-'+i).find('.expandable-panel-content').css('margin-top', -panelheight[i]);
24                    if (defaultopenpanel == i) {
25                        jQuery('#cp-'+i).find('.icon-close-open').css('background-position', '0px -'+iconheight+'px');
26                        jQuery('#cp-'+i).find('.expandable-panel-content').css('margin-top', 0);
27                    }
28                }
29        }
30 
31       jQuery('.expandable-panel-heading').click(function() {           
32            var obj = jQuery(this).next();
33            var objid = parseInt(jQuery(this).parent().attr('ID').substr(3,2));  
34            currentpanel = objid;
35            if (accordian == true) {
36                resetpanels();
37            }
38             
39            if (parseInt(obj.css('margin-top')) <= (panelheight[objid]*-1)) {
40                obj.clearQueue();
41                obj.stop();
42                obj.prev().find('.icon-close-open').css('background-position', '0px -'+iconheight+'px');
43                obj.animate({'margin-top':0}, panelspeed);
44                if (highlightopen == true) {
45                    jQuery('#cp-'+currentpanel + ' .expandable-panel-heading').addClass('header-active');
46                }
47            } else {
48                obj.clearQueue();
49                obj.stop();
50                obj.prev().find('.icon-close-open').css('background-position', '0px 0px');
51                obj.animate({'margin-top':(panelheight[objid]*-1)}, panelspeed); 
52                if (highlightopen == true) {
53                    jQuery('#cp-'+currentpanel + ' .expandable-panel-heading').removeClass('header-active');   
54                }
55            }
56        });
57         
58        function resetpanels() {
59            for (var i=1; i<=totalpanels; i++) {
60                if (currentpanel != i) {
61                    $('#cp-'+i).find('.icon-close-open').css('background-position', '0px 0px');
62                    $('#cp-'+i).find('.expandable-panel-content').animate({'margin-top':-panelheight[i]}, panelspeed);
63                    if (highlightopen == true) {
64                        $('#cp-'+i + ' .expandable-panel-heading').removeClass('header-active');
65                    }
66                }
67            }
68        }
69		
70		//add new gallery
71		
72		jQuery('#add_gallery').click(function() {
73			
74			
75			jQuery( "#new_gallery_div" ).slideDown( "slow", function() {			
76				// Animation complete.
77			
78			});			
79					 
80			 return false; 
81    		e.preventDefault();
82
83				
84        });
85		
86		//$('.display_gallery_pictures').live('click', function(event) {
87		jQuery('body').on('click', '.display_gallery_pictures', function() {	
88			
89			//alert("a");
90			var gal_id =  jQuery(this).attr("data-id");
91			var page_id_val =   $('#page_id').val(); 		
92					
93			jQuery.ajax({
94				type: 'POST',
95				url: ajaxurl,
96				data: {"action": "reload_photos", "gal_id": gal_id  , "page_id": page_id_val },
97				
98				success: function(data){					
99					$('#xoouserultra_current_gal').text(gal_id);					
100					$("#usersultra-gallerylist").html(data);				
101					
102					
103					}
104			});
105		});
106		
107		
108		
109
110		
111		jQuery('#close_add_gallery').click(function() {
112			
113			
114			jQuery( "#new_gallery_div" ).slideUp( "slow", function() {			
115				// Animation complete.
116			
117			});			
118					 
119			 return false; 
120    		e.preventDefault();
121
122				
123        });
124		
125		jQuery('#close_add_video').click(function() {
126			
127			
128			jQuery( "#new_video_div" ).slideUp( "slow", function() {			
129				// Animation complete.
130				
131							
132			});			
133					 
134			 return false; 
135    		e.preventDefault();
136
137				
138        });
139		
140		
141		
142		jQuery('#add_new_video').click(function() {			
143			
144			jQuery( "#new_video_div" ).slideDown( "slow", function() {			
145				// Animation complete.
146			
147			});			
148					 
149			 return false; 
150    		e.preventDefault();
151				
152        });  
153		jQuery('#add_new_files').click(function() {			
154			
155			jQuery( "#resp_t_image_list" ).slideDown( "slow", function() {			
156				// Animation complete.
157			
158			});			
159					 
160			 return false; 
161    		e.preventDefault();
162				
163        });  
164		
165		
166		
167				
168		jQuery('#new_gallery_add').click(function() {
169			
170	
171			var gall_name = jQuery('#new_gallery_name').val();
172			var gall_desc = jQuery('#new_gallery_desc').val();
173		
174			jQuery.ajax({
175				type: 'POST',
176				url: ajaxurl,
177				data: {"action": "add_new_gallery", "gall_name": gall_name , "gall_desc": gall_desc },
178				
179				success: function(data){
180					
181					jQuery('#new_gallery_name').text("");
182					jQuery('#new_gallery_desc').text("");
183					
184					reload_gallery_list();					
185					
186					
187					}
188			});
189			
190			 // Cancel the default action
191			 return false;
192    		e.preventDefault();
193			 
194
195				
196        });
197		
198			
199		jQuery('body').on('click', '#new_video_add_confirm', function(e) {
200			
201			e.preventDefault();
202			
203			
204			
205	
206			var video_name = jQuery('#new_video_name').val();
207			var video_id = jQuery('#new_video_unique_vid').val();
208			var video_type = jQuery('#new_video_type').val();
209			
210			if(video_name==""){alert(video_empy_field_name);return}
211			if(video_id==""){alert(video_empy_field_id);return}
212		
213			jQuery.ajax({
214				type: 'POST',
215				url: ajaxurl,
216				data: {"action": "add_new_video", "video_name": video_name , "video_id": video_id , "video_type": video_type },
217				
218				success: function(data){
219					
220					jQuery('#new_video_name').text("");
221					jQuery('#new_video_unique_vid').text("");
222					
223					reload_video_list();					
224					
225					
226					}
227			});
228			
229			 // Cancel the default action
230			 return false;
231    		e.preventDefault();
232			 
233
234				
235        });
236		
237		function reload_gallery_list ()
238		{
239			
240			var page_id_val =   jQuery('#page_id').val(); 
241			 jQuery.post(ajaxurl, {
242							action: 'reload_galleries', 'page_id':  page_id_val 
243									
244							}, function (response){
245									
246																
247							jQuery("#usersultra-gallerylist").html(response);
248									
249									
250					
251			});
252			
253			
254			
255		}
256		
257		function reload_photo_list (gal_id)
258		{
259			var page_id_val =   jQuery('#page_id').val(); 	
260			
261			 jQuery.post(ajaxurl, {
262							action: 'reload_photos', 'gal_id':  gal_id,  'page_id':  page_id_val 
263									
264							}, function (response){									
265																
266							jQuery("#usersultra-photolist").html(response);
267									
268									
269					
270			});
271			
272		}
273		
274		
275		
276		function reload_video_list ()
277		{
278			
279			 jQuery.post(ajaxurl, {
280									action: 'reload_videos'
281									
282									}, function (response){																
283																
284									jQuery("#usersultra-videolist").html(response);
285									
286														
287							});
288			
289			
290			
291		}
292		
293			
294		//$(document).on("click", "a[href='#resp_del_photo']", function(e) {
295			
296		jQuery('body').on('click',"a[href='#resp_del_photo']", function(e) {
297			
298						
299			e.preventDefault();
300			
301			var photo_id =  jQuery(this).attr("id");
302			var gal_id =  jQuery(this).attr("data-id");	
303			
304								
305			jQuery.ajax({
306				type: 'POST',
307				url: ajaxurl,
308				data: {"action": "delete_photo", "photo_id": photo_id },
309				
310				success: function(data){
311					reload_photo_list(gal_id);
312					
313					
314					}
315			});
316			
317			 // Cancel the default action
318			 return false;
319    		e.preventDefault();
320			 
321				
322        });
323		
324		//delete account		
325		$('body').on('click',"#xoouserultra-change-user-role-backend", function(e) {
326		
327		   var u_role =jQuery("#reg_uultra_custom_user_role").val();
328				
329			jQuery.ajax({
330							type: 'POST',
331							url: ajaxurl,
332							data: {"action": "uultra_user_change_role", 
333							 "role": u_role },
334							
335							success: function(data){			
336										
337							
338								jQuery("#uultra-change-role-confmsg").html(data);
339								jQuery("#uultra-change-role-confmsg").slideDown();							
340								
341								
342								}
343						});
344			
345			return false;
346				
347        });
348		
349		//delete account		
350		$('body').on('click',"#xoouserultra-close-acc-btn", function(e) {
351		
352		   
353			e.preventDefault();
354			
355			var doIt = false;
356			
357			doIt=confirm(delete_account_confirmation_mesage);
358		  
359			if(doIt)
360			{
361				
362				$('#uultra-close-account').submit();
363				
364						
365			}
366			
367			 // Cancel the default action
368			 return false;
369    		e.preventDefault();
370			 
371				
372        });
373		
374		//delete video
375		
376		$('body').on('click',"a[href='#resp_del_video']", function(e) {
377		
378		   
379			e.preventDefault();
380			
381			var doIt = false;
382			
383			doIt=confirm(video_delete_confirmation_message);
384		  
385			if(doIt)
386			{
387				
388				var video_id =  jQuery(this).attr("data-id");	
389									
390				jQuery.ajax({
391					type: 'POST',
392					url: ajaxurl,
393					data: {"action": "delete_video", "video_id": video_id },
394					
395					success: function(data){
396						//reload_photo_list(gal_id);
397						
398						reload_video_list();
399						
400						
401						}
402				});
403			
404			
405			}
406			
407			 // Cancel the default action
408			 return false;
409    		e.preventDefault();
410			 
411				
412        });
413		
414		
415		
416		//delete post
417		$('body').on('click',".uultra-del-user-postlink", function(e) {
418		
419		   
420			e.preventDefault();
421			
422			var doIt = false;
423			
424			doIt=confirm(post_del_confirmation_message);
425		  
426			if(doIt)
427			{
428				
429				var post_id =  jQuery(this).attr("data-id");	
430				
431						
432				jQuery('#uultra-delete-post').val('uultra-del-post-conf');
433				jQuery('#post_id').val(post_id);
434				jQuery('#uultra-form-publisher').submit();				
435						
436			
437			
438			}
439			
440			 // Cancel the default action
441			 return false;
442    		e.preventDefault();
443			 
444				
445        });
446		//close edit box
447		//$(document).on("click", ".btn-photo-close", function(e) {
448			
449		$('body').on('click',".btn-photo-close", function(e) {
450			
451			e.preventDefault();				
452			var photo_id =  jQuery(this).attr("data-id");						
453			$( "#photo-edit-div-"+photo_id ).slideUp();								
454			
455			
456			 // Cancel the default action
457			 return false;
458    		e.preventDefault();
459			 
460				
461        });
462		
463		$("body").on("click", ".btn-photo-conf", function(e) {
464			
465			e.preventDefault();		
466			
467			
468				var photo_id =  jQuery(this).attr("data-id");	
469				var photo_name= $("#uultra_photo_name_edit_"+photo_id).val()	;
470				var photo_desc =  $("#uultra_photo_desc_edit_"+photo_id).val();
471				
472				var photo_tags =  $("#uultra_photo_tags_edit_"+photo_id).val();				
473				var photo_category =  $("#uultra_photo_category_edit_"+photo_id).val();
474				
475				
476				
477				
478									
479				jQuery.ajax({
480					type: 'POST',
481					url: ajaxurl,
482					data: {"action": "edit_photo_confirm", "photo_id": photo_id , "photo_name": photo_name , "photo_desc": photo_desc , "photo_tags": photo_tags , "photo_category": photo_category },
483					
484					success: function(data){					
485						
486												
487						$( "#photo-edit-div-"+photo_id ).slideUp();
488						//reload_gallery_list();
489						
490						
491						}
492				});
493			
494			
495			 // Cancel the default action
496			 return false;
497    		e.preventDefault();
498			 
499				
500        });
501		
502		//edit photo
503		//$(document).on("click", "a[href='#resp_edit_photo']", function(e) {
504			
505		$('body').on('click',"a[href='#resp_edit_photo']", function(e) {
506			
507			e.preventDefault();
508			
509			
510				
511				var photo_id =  jQuery(this).attr("data-id");	
512									
513				jQuery.ajax({
514					type: 'POST',
515					url: ajaxurl,
516					data: {"action": "edit_photo", "photo_id": photo_id },
517					
518					success: function(data){
519						
520						
521						$("#photo-edit-div-"+photo_id).html(data);						
522						$( "#photo-edit-div-"+photo_id ).slideDown();
523						
524						
525						}
526				});
527			
528			
529			
530			 // Cancel the default action
531			 return false;
532    		e.preventDefault();
533			 
534				
535        });
536		
537		//edit video
538		
539		$('body').on("click", "a[href='#resp_edit_video']", function(e) {
540			
541		//$('body').on('click',"a[href='#resp_edit_photo']", function(e) {
542			
543			e.preventDefault();
544			
545			
546				
547				var video_id =  jQuery(this).attr("data-id");	
548									
549				jQuery.ajax({
550					type: 'POST',
551					url: ajaxurl,
552					data: {"action": "edit_video", "video_id": video_id },
553					
554					success: function(data){
555												
556						$("#video-edit-div-"+video_id).html(data);						
557						$( "#video-edit-div-"+video_id ).slideDown();
558						
559						
560						}
561				});
562			
563			
564			
565			 // Cancel the default action
566			 return false;
567    		e.preventDefault();
568			 
569				
570        });
571		
572		
573		//close video edit box
574		$("body").on("click", ".btn-video-close-conf", function(e) {
575			
576			e.preventDefault();				
577			var p_id =  jQuery(this).attr("data-id");
578									
579			$( "#video-edit-div-"+p_id ).slideUp();			
580			return false;
581    		e.preventDefault();
582			 
583				
584        });
585		
586		
587		
588		//edit gallery
589		jQuery("body").on("click", "a[href='#resp_edit_gallery']", function(e) {
590			
591			e.preventDefault();
592			
593			
594				
595				var gal_id =  jQuery(this).attr("data-id");	
596									
597				jQuery.ajax({
598					type: 'POST',
599					url: ajaxurl,
600					data: {"action": "edit_gallery", "gal_id": gal_id },
601					
602					success: function(data){
603						
604						
605						jQuery("#gallery-edit-div-"+gal_id).html(data);						
606						jQuery( "#gallery-edit-div-"+gal_id ).slideDown();
607						
608						
609						}
610				});
611			
612			
613			
614			 // Cancel the default action
615			 return false;
616    		e.preventDefault();
617			 
618				
619        });
620		
621		//edit gallery confirm					
622		jQuery("body").on("click", ".btn-gallery-conf", function(e) {
623			
624			e.preventDefault();		
625			
626			
627				var gal_id =  jQuery(this).attr("data-id");	
628				var gal_name= jQuery("#uultra_gall_name_edit_"+gal_id).val()	;
629				var gal_desc =  jQuery("#uultra_gall_desc_edit_"+gal_id).val();
630				var gal_visibility =  jQuery("#uultra_gall_visibility_edit_"+gal_id).val();
631									
632				jQuery.ajax({
633					type: 'POST',
634					url: ajaxurl,
635					data: {"action": "edit_gallery_confirm", "gal_id": gal_id , "gal_name": gal_name , "gal_desc": gal_desc , "gal_visibility": gal_visibility },
636					
637					success: function(data){					
638						
639												
640						jQuery( "#gallery-edit-div-"+gal_id ).slideUp();
641						reload_gallery_list();
642						
643						
644						}
645				});
646			
647			
648			 // Cancel the default action
649			 return false;
650    		e.preventDefault();
651			 
652				
653        });
654		
655		//close gallery edit box
656		$(document).on("click", ".btn-gallery-close-conf", function(e) {
657			
658			e.preventDefault();				
659			var p_id =  jQuery(this).attr("data-id");
660									
661			$( "#gallery-edit-div-"+p_id ).slideUp();			
662			return false;
663    		e.preventDefault();
664			 
665				
666        });
667		
668		
669		//edit video confirm					
670		jQuery(document).on("click", ".btn-video-edit-conf", function(e) {
671			
672			e.preventDefault();		
673			
674			
675				var video_id =  jQuery(this).attr("data-id");	
676				var video_name= jQuery("#uultra_video_name_edit_"+video_id).val()	;
677				var video_unique_id =  jQuery("#uultra_video_id_edit_"+video_id).val();
678				var video_type =  jQuery("#uultra_video_type_edit_"+video_id).val();
679									
680				jQuery.ajax({
681					type: 'POST',
682					url: ajaxurl,
683					data: {"action": "edit_video_confirm", "video_id": video_id , "video_name": video_name , "video_unique_id": video_unique_id , "video_type": video_type },
684					
685					success: function(data){					
686						
687												
688						jQuery( "#video-edit-div-"+video_id ).slideUp();
689						reload_video_list();
690						
691						
692						}
693				});
694			
695			
696			 // Cancel the default action
697			 return false;
698    		e.preventDefault();
699			 
700				
701        });
702		
703		
704		$(document).on("click", "a[href='#resp_del_gallery']", function(e) {
705			
706			e.preventDefault();
707			
708			var doIt = false;
709			
710			doIt=confirm(gallery_delete_confirmation_message);
711		  
712			if(doIt)
713			{
714				
715				var gal_id =  jQuery(this).attr("data-id");	
716									
717				jQuery.ajax({
718					type: 'POST',
719					url: ajaxurl,
720					data: {"action": "delete_gallery", "gal_id": gal_id },
721					
722					success: function(data){
723						//reload_photo_list(gal_id);
724						
725						reload_gallery_list();
726						
727						
728						}
729				});
730			
731			
732			}
733			
734			 // Cancel the default action
735			 return false;
736    		e.preventDefault();
737			 
738				
739        });
740		
741		$(document).on("click", "a[href='#resp_set_main']", function(e) {
742		
743			
744			e.preventDefault();
745			
746			var photo_id =  jQuery(this).attr("id");
747			var gal_id =  jQuery(this).attr("data-id");	
748			
749								
750			jQuery.ajax({
751				type: 'POST',
752				url: ajaxurl,
753				data: {"action": "set_as_main_photo", "photo_id": photo_id , "gal_id": gal_id },
754				
755				success: function(data){
756					reload_photo_list(gal_id);
757					
758					
759					}
760			});
761			
762			 // Cancel the default action
763			 return false;
764    		e.preventDefault();
765			 
766				
767        });
768		
769		jQuery(document).on("click", "#uultra-btn-save-customizer-change", function(e) {
770			
771			e.preventDefault();		
772			
773			 jQuery('#loading-animation-pro-builder').show(); 	
774			
775			
776			var widegetList1 = jQuery('#uultra-prof-customizar-1');
777			var widegetList2 = jQuery('#uultra-prof-customizar-2');
778			var widegetList3 = jQuery('#uultra-prof-customizar-3');
779			
780			//var widegetList1_str =  widegetList1.$sortable('toArray').toString();
781			//var widegetList2_str =  widegetList2.$sortable('toArray').toString();
782			//var widegetList3_str =  widegetList3.$sortable('toArray').toString();
783			
784			jQuery.ajax({
785				type: 'POST',
786				url: ajaxurl,
787				async: true,
788                cache: false,
789                dataType: 'json',
790				data: {action: 'arrange_widgets', // Tell WordPress how to handle this ajax request
791                    order_col_1: widegetList1.sortable('toArray').toString(),
792					order_col_2: widegetList2.sortable('toArray').toString(),
793					order_col_3: widegetList3.sortable('toArray').toString()
794                 },
795				
796				success: function(response){					
797										
798					 jQuery('#loading-animation-pro-builder').hide(); // Hide the loading animation
799                   
800					
801					
802					}
803			});
804			
805						 // Cancel the default action
806			 return false;
807    		e.preventDefault();
808			 
809
810				
811        });
812		
813		
814		/* 	WIDGETS CUSTOMIZER -  Close Open Widget */
815		jQuery('.uultra-btn-widget-elements, .uultra-expandable-panel-heading-widgets').on('click',function(e)
816		{
817			
818			e.preventDefault();
819			var widget_id =  jQuery(this).attr("widget-id");		
820			var iconheight = 20;
821			
822			//alert(widget_id);
823			if(jQuery("#uultra-widget-adm-cont-id-"+widget_id).is(":visible")) 
824			{
825				
826				jQuery("#uultra-widgets-icon-close-open-id-"+widget_id).css('background-position', '0px 0px');
827				
828			}else{
829				
830				jQuery("#uultra-widgets-icon-close-open-id-"+widget_id).css('background-position', '0px -'+iconheight+'px');			
831			 }
832			
833			
834			jQuery("#uultra-widget-adm-cont-id-"+widget_id).slideToggle();	
835						
836			return false;
837		});
838		
839		
840		
841		
842		//save user settings			
843		jQuery(document).on("click", "#uultra-update-widget-custom-user-information", function(e) {
844			
845			e.preventDefault();
846			
847			var widget_id =  jQuery(this).attr("widget-id");
848			
849			var widget_custom_text =  jQuery("#uultra_user_widget_cont_edition_"+widget_id).val();
850			
851    		jQuery.ajax({
852					type: 'POST',
853					url: ajaxurl,
854					data: {"action": "uultra_update_user_widget_customization", "widget_custom_text": widget_custom_text, "widget_id": widget_id },
855					
856					success: function(data){
857												
858												
859						
860						}
861				});
862			
863			
864			 // Cancel the default action
865			 return false;
866    		e.preventDefault();
867			 
868				
869        });
870		
871		//save user settings			
872		jQuery(document).on("click", ".uultra-edit-widget-content-html-editor", function(e) {
873			
874			e.preventDefault();
875			
876			var widget_id =  jQuery(this).attr("widget-id");
877				
878    		jQuery.ajax({
879					type: 'POST',
880					url: ajaxurl,
881					data: {"action": "uultra_edit_widget_content",  "widget_id": widget_id },
882					
883					success: function(data){					
884						
885						$("#uultra-plugin-settings-editor" ).dialog( "open" );	
886						tinyMCE.activeEditor.setContent('');					
887						tinyMCE.activeEditor.execCommand( 'mceInsertContent', false, data );						
888						$("#uultra-current-selected-widget-to-edit" ).val(widget_id );
889						
890						}
891				});
892			
893			
894			 // Cancel the default action
895			 return false;
896    		e.preventDefault();
897			 
898				
899        });
900		
901		
902		
903		 jQuery( "#uultra-plugin-settings-editor" ).dialog({
904			autoOpen: false,
905			height: 560,																				
906			width: 650,
907			modal: true,
908			buttons: {
909			"Update": function() {
910				
911								
912				var widget_id = jQuery("#uultra-current-selected-widget-to-edit" ).val();
913				var widget_text = tinymce.editors.uultra_widget_html_editor_content_.getContent();;
914				uultra_save_user_widget_data(widget_id, widget_text);
915				$( this ).dialog( "close" );
916		
917			//custom function here
918			},
919			Cancel: function() {
920			$( this ).dialog( "close" );
921			}
922			},
923			close: function() {
924			
925			
926			}
927			});
928		
929		
930			
931		jQuery( "ul.droptrue" ).sortable({
932
933		  connectWith: "ul"
934	
935		});
936		
937		
938		function uultra_save_user_widget_data (widget_id, widget_data)
939		{
940			
941			 jQuery.post(ajaxurl, {
942							action: 'uultra_edit_widget_content_confirm',  "widget_id": widget_id ,  "widget_data": widget_data}, function (response){									
943																
944							//$("#uu-backend-avatar-section").html(response);
945							//$("#uultra-bg-img-bg-id").html(response);
946									
947					
948			});
949			
950		}
951		
952		
953		jQuery(document).on("click", "#btn-delete-user-avatar", function(e) {
954			
955			e.preventDefault();
956			
957    		jQuery.ajax({
958					type: 'POST',
959					url: ajaxurl,
960					data: {"action": "delete_user_avatar" },
961					
962					success: function(data){
963												
964						refresh_my_avatar();
965						//$( "#uu-upload-avatar-box" ).slideUp("slow");
966						
967						
968						}
969				});
970			
971			
972			 // Cancel the default action
973			 return false;
974    		e.preventDefault();
975			 
976				
977        });
978		
979		//remove profile bg
980		jQuery(document).on("click", "#uultra-remove-profile-bg", function(e) {
981			
982			e.preventDefault();
983			
984    		jQuery.ajax({
985					type: 'POST',
986					url: ajaxurl,
987					data: {"action": "uultra_delete_user_profile_bg" },
988					
989					success: function(data){
990												
991						refresh_profile_bg();
992												
993						
994						}
995				});
996			
997			
998			 // Cancel the default action
999			 return false;
1000    		e.preventDefault();
1001			 
1002				
1003        });
1004		
1005		function refresh_profile_bg ()
1006		{
1007			
1008			 $.post(ajaxurl, {
1009							action: 'get_profile_bg_refresh'}, function (response){									
1010																
1011							jQuery("#uu-backend-avatar-section").html(response);
1012							jQuery("#uultra-bg-img-bg-id").html(response);
1013							
1014									
1015									
1016					
1017			});
1018			
1019		}
1020		
1021		function refresh_my_avatar ()
1022		{
1023			
1024			 jQuery.post(ajaxurl, {
1025							action: 'refresh_avatar'}, function (response){									
1026																
1027							jQuery("#uu-backend-avatar-section").html(response);
1028							//$( "#uu-upload-avatar-box" ).slideUp("slow");
1029									
1030									
1031					
1032			});
1033			
1034		}
1035		
1036	
1037		   
1038 
1039        jQuery(window).load(function() {
1040 			panelinit();
1041        }); //END LOAD
1042    }); //END READY
1043})(jQuery);
1044
1045//-------USERS PHOTO SORTABLE
1046
1047function sortable_list ()
1048{
1049	 var itemList = jQuery('#usersultra-photolist');
1050
1051    itemList.sortable({
1052        update: function(event, ui) {
1053           // $('#loading-animation').show(); // Show the animate loading gif while waiting
1054
1055            opts = {
1056                url: ajaxurl, // ajaxurl is defined by WordPress and points to /wp-admin/admin-ajax.php
1057                type: 'POST',
1058                async: true,
1059                cache: false,
1060                dataType: 'json',
1061                data:{
1062                    action: 'sort_photo_list', // Tell WordPress how to handle this ajax request
1063                    order: itemList.sortable('toArray').toString() // Passes ID's of list items in  1,3,2 format
1064                },
1065                success: function(response) {
1066                    jQuery('#loading-animation').hide(); // Hide the loading animation
1067                    return; 
1068                },
1069                error: function(xhr,textStatus,e) {  // This can be expanded to provide more information
1070                  //  alert(e);
1071                    // alert('There was an error saving the updates');
1072                    jQuery('#loading-animation').hide(); // Hide the loading animation
1073                    return; 
1074                }
1075            };
1076            jQuery.ajax(opts);
1077        }
1078    }); 
1079	
1080}
1081
1082//-------USERS GALLERY SORTABLE
1083function sortable_gallery_list ()
1084{
1085	 var itemList = jQuery('#usersultra-gallerylist');
1086
1087    itemList.sortable({
1088        update: function(event, ui) {
1089           // $('#loading-animation').show(); // Show the animate loading gif while waiting
1090
1091            opts = {
1092                url: ajaxurl, // ajaxurl is defined by WordPress and points to /wp-admin/admin-ajax.php
1093                type: 'POST',
1094                async: true,
1095                cache: false,
1096                dataType: 'json',
1097                data:{
1098                    action: 'sort_gallery_list', // Tell WordPress how to handle this ajax request
1099                    order: itemList.sortable('toArray').toString() // Passes ID's of list items in  1,3,2 format
1100                },
1101                success: function(response) {
1102                    jQuery('#loading-animation').hide(); // Hide the loading animation
1103                    return; 
1104                },
1105                error: function(xhr,textStatus,e) {  // This can be expanded to provide more information
1106                   // alert(e);
1107                    // alert('There was an error saving the updates');
1108                    jQuery('#loading-animation').hide(); // Hide the loading animation
1109                    return; 
1110                }
1111            };
1112            jQuery.ajax(opts);
1113        }
1114    }); 
1115	
1116}
1117
1118jQuery(document).ready(function($) 
1119{ 
1120   if ($('#usersultra-photolist').length > 0) {
1121	    sortable_list();
1122	}
1123	
1124	if ($('#usersultra-gallerylist').length > 0) {
1125	    sortable_gallery_list();
1126	}
1127  
1128   
1129});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.