|
|
|
|
@ -35,19 +35,22 @@ require_once __DIR__.'/../inc/global.inc.php'; |
|
|
|
|
$js = '<script>'.api_get_language_translate_html().'</script>'; |
|
|
|
|
$htmlHeadXtra[] = $js; |
|
|
|
|
|
|
|
|
|
$htmlHeadXtra[] = '<script> |
|
|
|
|
$htmlHeadXtra[] = '<script type="text/javascript"> |
|
|
|
|
/* show eye for all show/hide*/ |
|
|
|
|
function buttomForAllShowHide() |
|
|
|
|
function buttonForAllShowHide() |
|
|
|
|
{ |
|
|
|
|
tools_invisibles = []; |
|
|
|
|
tools_visibles = []; |
|
|
|
|
$.each($(".make_visible_and_invisible").parent(), function (index, item) { |
|
|
|
|
var element = $(item).find("a"); |
|
|
|
|
image = $(element[0]).find("em")[0]; |
|
|
|
|
// extract the tool ID from the HTML em id, removing linktool_ |
|
|
|
|
image_id = $(image).attr("id").replace("linktool_",""); |
|
|
|
|
if (!$(image).hasClass("fa-eye-slash")) { |
|
|
|
|
// if the image does not have the eye-slash icon, prepare to make invisible |
|
|
|
|
tools_invisibles.push(image_id) |
|
|
|
|
} else { |
|
|
|
|
// if the image has the eye-slash icon, prepare to make visible |
|
|
|
|
tools_visibles.push(image_id) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -61,8 +64,8 @@ $htmlHeadXtra[] = '<script> |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
/* option show/hide thematic-block */ |
|
|
|
|
$(function() { |
|
|
|
|
buttomForAllShowHide(); |
|
|
|
|
$(function() { |
|
|
|
|
buttonForAllShowHide(); |
|
|
|
|
/* option show/hide all*/ |
|
|
|
|
$(".show-hide-all-tools").on("click" , function() { |
|
|
|
|
$(".show-hide-all-tools").addClass("disabled"); |
|
|
|
|
@ -78,12 +81,11 @@ $(function() { |
|
|
|
|
tools_visibles.push(image_id) |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
messaje_invisible = "'.get_lang('ToolIsNowHidden', '').'"; |
|
|
|
|
message_invisible = "'.get_lang('ToolIsNowHidden', '').'"; |
|
|
|
|
ids = tools_invisibles; |
|
|
|
|
if (tools_invisibles.length == 0) { |
|
|
|
|
ids = tools_visibles; |
|
|
|
|
messaje_invisible = "'.get_lang('ToolIsNowVisible', '').'"; |
|
|
|
|
|
|
|
|
|
message_invisible = "'.get_lang('ToolIsNowVisible', '').'"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$.ajax({ |
|
|
|
|
@ -100,24 +102,23 @@ $(function() { |
|
|
|
|
$.each(data,function(index,item){ |
|
|
|
|
new_current_view = "'.api_get_path(WEB_IMG_PATH).'" + item.view; |
|
|
|
|
//eyes |
|
|
|
|
//$("#linktool_"+item.id).attr("src", new_current_view); |
|
|
|
|
$("#linktool_"+item.id).attr("class", item.fclass); |
|
|
|
|
//tool |
|
|
|
|
$("#toolimage_" + item.id).attr("src", item.image); |
|
|
|
|
//clase |
|
|
|
|
//class |
|
|
|
|
$("#tooldesc_" + item.id).attr("class", item.tclass); |
|
|
|
|
$("#istooldesc_" + item.id).attr("class", item.tclass); |
|
|
|
|
}); |
|
|
|
|
$(".show-hide-all-tools").removeClass("disabled"); |
|
|
|
|
$(".normal-message").hide(); |
|
|
|
|
$("#id_confirmation_message").html(messaje_invisible); |
|
|
|
|
$("#id_confirmation_message").html(message_invisible); |
|
|
|
|
$("#id_confirmation_message").show(); |
|
|
|
|
buttomForAllShowHide(); |
|
|
|
|
buttonForAllShowHide(); |
|
|
|
|
}, |
|
|
|
|
error: function( jqXHR, textStatus, errorThrown ) { |
|
|
|
|
$(".show-hide-all-tools").removeClass("disabled"); |
|
|
|
|
$(".normal-message").hide(); |
|
|
|
|
buttomForAllShowHide(); |
|
|
|
|
buttonForAllShowHide(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
@ -185,8 +186,7 @@ $(function() { |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
</script>'; |
|
|
|
|
|
|
|
|
|
// The section for the tabs |
|
|
|
|
|