| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente |
| js:layout_filters [2024/05/16 13:58] – avillepreux | js:layout_filters [2026/01/08 15:45] (Version actuelle) – avillepreux |
|---|
| console.log("CYA LAYERS BAR INIT"); | console.log("CYA LAYERS BAR INIT"); |
| |
| if (jQuery(".wrap_filters").length > 0) | if (jQuery(".wrap_filters").length > 0 && jQuery("#toggle_comments").length == 0) |
| { | { |
| function GetURLParameters() | function GetURLParameters() |
| var hidden_layer_tips = (jQuery("#toggle_tips" ).html().indexOf("unchecked") > -1); | var hidden_layer_tips = (jQuery("#toggle_tips" ).html().indexOf("unchecked") > -1); |
| | |
| function toggle_comments() { console.log("CYA LAYERS: Toggle comments"); hidden_layer_comments = !hidden_layer_comments; jQuery(comments_selector ).toggle(); jQuery("#toggle_comments").html('<img src="'+(hidden_layer_comments ? src_0 : src_1)+'" class="icon"> Comments'); Cookies.set('CYA_LAYERS_comments', hidden_layer_comments ? 0 : 1); } | function toggle_comments() { console.log("CYA LAYERS: Toggle comments"); hidden_layer_comments = !hidden_layer_comments; /* jQuery(comments_selector ).toggle(); */ if (hidden_layer_comments ) { jQuery(comments_selector ).hide(); } else { jQuery(comments_selector ).show(); } jQuery("#toggle_comments").html('<img src="'+(hidden_layer_comments ? src_0 : src_1)+'" class="icon"> Comments'); Cookies.set('CYA_LAYERS_comments', hidden_layer_comments ? 0 : 1); } |
| function toggle_designs() { console.log("CYA LAYERS: Toggle designs"); hidden_layer_designs = !hidden_layer_designs; jQuery(designs_selector ).toggle(); jQuery("#toggle_designs" ).html('<img src="'+(hidden_layer_designs ? src_0 : src_1)+'" class="icon"> Designs' ); Cookies.set('CYA_LAYERS_designs', hidden_layer_designs ? 0 : 1); } | function toggle_designs() { console.log("CYA LAYERS: Toggle designs"); hidden_layer_designs = !hidden_layer_designs; /* jQuery(designs_selector ).toggle(); */ if (hidden_layer_designs ) { jQuery(designs_selector ).hide(); } else { jQuery(designs_selector ).show(); } jQuery("#toggle_designs" ).html('<img src="'+(hidden_layer_designs ? src_0 : src_1)+'" class="icon"> Designs' ); Cookies.set('CYA_LAYERS_designs', hidden_layer_designs ? 0 : 1); } |
| function toggle_tips() { console.log("CYA LAYERS: Toggle tips"); hidden_layer_tips = !hidden_layer_tips; jQuery(tips_selector ).toggle(); jQuery("#toggle_tips" ).html('<img src="'+(hidden_layer_tips ? src_0 : src_1)+'" class="icon"> Tips' ); Cookies.set('CYA_LAYERS_tips', hidden_layer_tips ? 0 : 1); } | function toggle_tips() { console.log("CYA LAYERS: Toggle tips"); hidden_layer_tips = !hidden_layer_tips; /* jQuery(tips_selector ).toggle(); */ if (hidden_layer_tips ) { jQuery(tips_selector ).hide(); } else { jQuery(tips_selector ).show(); } jQuery("#toggle_tips" ).html('<img src="'+(hidden_layer_tips ? src_0 : src_1)+'" class="icon"> Tips' ); Cookies.set('CYA_LAYERS_tips', hidden_layer_tips ? 0 : 1); } |
| |
| console.log("CYA LAYERS BAR INIT", "React to click events"); | console.log("CYA LAYERS BAR INIT", "React to click events"); |