js:layout_filters

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

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:35] avillepreuxjs:layout_filters [2024/05/16 13:58] (Version actuelle) avillepreux
Ligne 37: Ligne 37:
                 }                 }
             }             }
 +            
 +            return null;
         }         }
  
Ligne 58: Ligne 60:
         var hidden_layer_designs  = (jQuery("#toggle_designs" ).html().indexOf("unchecked") > -1);         var hidden_layer_designs  = (jQuery("#toggle_designs" ).html().indexOf("unchecked") > -1);
         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_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_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); }
  
-        var triggered_comments = false; jQuery("#toggle_comments, #toggle_comments>.icon").click(function() { if (!triggered_comments) { triggered_comments = true; jQuery("#toggle_comments").html('<img src="'+(hidden_layer_comments ? src_1 : src_0)+'" class="icon"> Comments'); jQuery(comments_selector ).toggle(400function() { triggered_comments = false; }); hidden_layer_comments = !hidden_layer_comments; Cookies.set('CYA_LAYERS_comments', hidden_layer_comments ? 0 : 1); } }); +        console.log("CYA LAYERS BAR INIT", "React to click events");
-        var triggered_designs  = false; jQuery("#toggle_designs,  #toggle_designs>.icon" ).click(function() { if (!triggered_designs)  { triggered_designs  = true; jQuery("#toggle_designs" ).html('<img src="'+(hidden_layer_designs  ? src_1 : src_0)+'" class="icon"> Designs' ); jQuery(designs_selector  ).toggle(400, function() { triggered_designs  = false; }); hidden_layer_designs  = !hidden_layer_designs;  Cookies.set('CYA_LAYERS_designs',  hidden_layer_designs  ? 0 : 1); } }); +
-        var triggered_tips     = false; jQuery("#toggle_tips,     #toggle_tips>.icon"    ).click(function() { if (!triggered_tips)     { triggered_tips     = true; jQuery("#toggle_tips"    ).html('<img src="'+(hidden_layer_tips     ? src_1 : src_0)+'" class="icon"> Tips'    ); jQuery(tips_selector     ).toggle(400, function() { triggered_tips     = false; }); hidden_layer_tips     = !hidden_layer_tips;     Cookies.set('CYA_LAYERS_tips',     hidden_layer_tips     ? 0 : 1); } });+
  
-        if ((hidden_layer_comments ? "1" : "0"=== Cookies.get('CYA_LAYERS_comments') { console.log("CYA LAYERS: APPLY comments COOKIE");    jQuery("#toggle_comments>.icon" ).click(); hidden_layer_comments = !hidden_layer_comments} +        jQuery("#toggle_comments").click(function()                { console.log("CYA LAYERS: APPLY comments CLICK");     toggle_comments (); })
-        if ((hidden_layer_designs "1" : "0"=== Cookies.get('CYA_LAYERS_designs')  ) { console.log("CYA LAYERS: APPLY designs COOKIE");     jQuery("#toggle_designs>.icon"  ).click(); hidden_layer_designs  = !hidden_layer_designs } +        jQuery("#toggle_designs" ).click(function()                { console.log("CYA LAYERS: APPLY designs CLICK");      toggle_designs  (); })
-        if ((hidden_layer_tips     ? "1" : "0"=== Cookies.get('CYA_LAYERS_tips'    ) { console.log("CYA LAYERS: APPLY tips COOKIE");        jQuery("#toggle_tips>.icon"     ).click(); hidden_layer_tips     = !hidden_layer_tips    }+        jQuery("#toggle_tips   ).click(function()                { console.log("CYA LAYERS: APPLY tips CLICK");         toggle_tips     (); });
  
-        if ((hidden_layer_comments ? "1" : "0") === GetURLParameter('comments'       ) { console.log("CYA LAYERS: APPLY comments URL param"); jQuery("#toggle_comments>.icon" ).click(); hidden_layer_comments = !hidden_layer_comments; } + console.log("CYA LAYERS BAR INIT", "React to cookies settings"); 
-        if ((hidden_layer_designs  ? "1" : "0") === GetURLParameter('designs'        ) { console.log("CYA LAYERS: APPLY designs URL param");  jQuery("#toggle_designs>.icon"  ).click(); hidden_layer_designs  = !hidden_layer_designs;  + 
-        if ((hidden_layer_tips     ? "1" : "0") === GetURLParameter('tips'           ) { console.log("CYA LAYERS: APPLY tips URL param");     jQuery("#toggle_tips>.icon"     ).click(); hidden_layer_tips     = !hidden_layer_tips;     +        if ((hidden_layer_comments ? "1" : "0") === Cookies.get('CYA_LAYERS_comments') ) { console.log("CYA LAYERS: APPLY comments COOKIE");    toggle_comments (); } 
-        if ((hidden_layer_tips     ? "1" : "0") === GetURLParameter('tooltips'       ) { console.log("CYA LAYERS: APPLY tips URL param");     jQuery("#toggle_tips>.icon"     ).click(); hidden_layer_tips     = !hidden_layer_tips;     }+        if ((hidden_layer_designs "1" : "0") === Cookies.get('CYA_LAYERS_designs' ) { console.log("CYA LAYERS: APPLY designs COOKIE");     toggle_designs  (); } 
 +        if ((hidden_layer_tips     ? "1" : "0") === Cookies.get('CYA_LAYERS_tips'    ) { console.log("CYA LAYERS: APPLY tips COOKIE");        toggle_tips     (); } 
 +         
 +        console.log("CYA LAYERS BAR INIT", "React to URL settings"); 
 + 
 +        if ((hidden_layer_comments ? "1" : "0"=== GetURLParameter('comments'       ) { console.log("CYA LAYERS: APPLY comments URL param"); toggle_comments (); } 
 +        if ((hidden_layer_designs  ? "1" : "0") === GetURLParameter('designs'        ) { console.log("CYA LAYERS: APPLY designs URL param");  toggle_designs  (); } 
 +        if ((hidden_layer_tips     ? "1" : "0") === GetURLParameter('tips'           ) { console.log("CYA LAYERS: APPLY tips URL param");     toggle_tips     (); } 
 +        if ((hidden_layer_tips     ? "1" : "0") === GetURLParameter('tooltips'       ) { console.log("CYA LAYERS: APPLY tips URL param");     toggle_tips     (); }
  
     }     }
  
 }}); }});
- 
-</JS></ifauth> 
- 
-<ifauth @bigben-prod><JS> 
- 
-jQuery(document).ready(function()  
-{ 
-    console.log("Nacon specific comments toolbar init"); 
-     
-    jQuery(".wrap_hi, .wrap_av, .wrap_answer, .wrap_username").hide(); 
-    jQuery("[class*='plugin_include__projects\:example\:design_']").hide(); 
-     
-    /* A décommenter */ 
-    /* 
-    jQuery(".wrap_tooltip").hide(); 
-    jQuery("#toggle_tips").html('<img src="/lib/images/smileys/local/unchecked_w.png" class="icon"> Tips'); */ 
-}); 
  
 </JS></ifauth> </JS></ifauth>
  • js/layout_filters.1715859334.txt.gz
  • Dernière modification : 2024/05/16 13:35
  • de avillepreux