MediaWiki:Common.js: Unterschied zwischen den Versionen
Aus Open Source Ecology (OSE) Germany - Entwicklungsplattform
Zeile 6: | Zeile 6: | ||
$(".project_material_table .showAllComments").click(function(e){ | $(".project_material_table .showAllComments").click(function(e){ | ||
e.preventDefault(); | e.preventDefault(); | ||
− | $(".project_material_table .materialCommandsBox"). | + | $(".project_material_table .materialCommandsBox").addClass("openComments"); |
− | $(".project_material_table .commentRow"). | + | $(".project_material_table .commentRow").show(500); |
+ | $(this).removeClass("showAllComments").addClass("hideAllComments"); | ||
+ | $(this).html('Hide All Comments'); | ||
+ | }); | ||
+ | $(".project_material_table .hideAllComments").click(function(e){ | ||
+ | e.preventDefault(); | ||
+ | $(".project_material_table .materialCommandsBox").removeClass("openComments"); | ||
+ | $(".project_material_table .commentRow").hide(500); | ||
+ | $(this).removeClass("hideAllComments").addClass("showAllComments"); | ||
+ | $(this).html('Show All Comments'); | ||
}); | }); | ||
Version vom 21. März 2020, 05:54 Uhr
/* Das folgende JavaScript wird für alle Benutzer geladen. */ $(".materialRow .showComment").click(function(){ $(this).parent().toggleClass("openComments"); $(this).parent().parent().next().toggle(500); }); $(".project_material_table .showAllComments").click(function(e){ e.preventDefault(); $(".project_material_table .materialCommandsBox").addClass("openComments"); $(".project_material_table .commentRow").show(500); $(this).removeClass("showAllComments").addClass("hideAllComments"); $(this).html('Hide All Comments'); }); $(".project_material_table .hideAllComments").click(function(e){ e.preventDefault(); $(".project_material_table .materialCommandsBox").removeClass("openComments"); $(".project_material_table .commentRow").hide(500); $(this).removeClass("hideAllComments").addClass("showAllComments"); $(this).html('Show All Comments'); }); if (window.initJSFuncts!==undefined) { for(ijsf=0; ijsf<window.initJSFuncts.length; ijsf++) { try {window.initJSFuncts[ijsf]();}catch(e){console.log(e);} } } function getUrlParameter(sParam) { var sPageURL = window.location.search.substring(1); var sURLVariables = sPageURL.split('&'); for (i = 0; i < sURLVariables.length; i++) { sParameterName = sURLVariables[i].split('='); if (sParameterName[0] === sParam) { return sParameterName[1] === undefined ? true : decodeURIComponent(sParameterName[1]); } } }