Sindbad~EG File Manager

Current Path : /var/www/html/wordpress_alg24news/wp-content/themes/newsbt-mobile/panel/js/
Upload File :
Current File : /var/www/html/wordpress_alg24news/wp-content/themes/newsbt-mobile/panel/js/widgets-upload.js

/*! 
 * Media Upload for widgets
 * @author : Achemli Mouad
 * Developed because when Drag & Drop widget in wordpress 4.4 upload button doesn't fire
*/
function uploadfile(e){
	var $el = jQuery(e);
	var uploader = wp.media({
		title : 'Media upload',
		multiple : false,
	})
	.on('select', function(){
		var selection = uploader.state().get('selection');
		var attachment = selection.first().toJSON();
		//console.log($el.prev());
		jQuery($el.prev()).val(attachment.url);
	})
	.open();
}
function mwpCustomChange(e) {
	var currentDropdown = jQuery(e);
	var value_select = jQuery(e).val();
	var currentdiv = currentDropdown.parent().parent();
	jQuery(currentdiv).find('.group').hide();
	jQuery(currentdiv).find('.current-div').removeClass('current-div');
	jQuery(currentdiv).find('.div-' + value_select).show();
}
function mwpCustomChange2(e) {
	var currentDropdown = jQuery(e);
	var value_select = jQuery(e).val();
	var currentdiv = currentDropdown.parent().parent().parent();
	jQuery(currentdiv).find('.head-color').hide();
	jQuery(currentdiv).find('.current-div').removeClass('current-div');
	jQuery(currentdiv).find('.div-' + value_select).show();
}
function mwpCustomClick(e) {
	var currentClick = jQuery(e);
	jQuery(currentClick).next().toggle();
}
function mwpCustomChange3(e) {
	var currentDropdown = jQuery(e);
	var value_select = jQuery(e).val();
	var currentdiv = currentDropdown.parent().parent().parent();
	jQuery(currentdiv).find('.head-color').hide();
	jQuery(currentdiv).find('.current-div').removeClass('current-div');
	jQuery(currentdiv).find('.div-' + value_select).show();
}
function mwpCustomChange4(e) {
	var currentDropdown = jQuery(e);
	var value_select = jQuery(e).val();
	var currentdiv = currentDropdown.parent().parent().parent();
	jQuery(currentdiv).find('.head-color2').hide();
	jQuery(currentdiv).find('.current-div-2').removeClass('current-div-2');
	jQuery(currentdiv).find('.civ-' + value_select).show();
}

jQuery(function(){
	jQuery(".widgets-php h3:contains('1 -'),.widgets-php h4:contains('1 -'),.widgets-php h2:contains('1 -')").html(function(_, html) {
	   return  html.replace(/(1 -)/g, '<span style="display:none;">$1</span>')
	});
	jQuery(".widgets-php h3:contains('2 -'),.widgets-php h4:contains('2 -'),.widgets-php h2:contains('2 -')").html(function(_, html) {
	   return  html.replace(/(2 -)/g, '<span style="display:none;">$1</span>')
	});
	jQuery(".widgets-php h3:contains('3 -'),.widgets-php h4:contains('3 -'),.widgets-php h2:contains('3 -')").html(function(_, html) {
	   return  html.replace(/(3 -)/g, '<span style="display:none;">$1</span>')
	});
});

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists