[web] kill https-deny-anonymous option (closes #5193687)
It doesn't make much sense to prevent people from using https.
/* * Treeview 1.5pre - jQuery plugin to hide and show branches of a tree * * http://bassistance.de/jquery-plugins/jquery-plugin-treeview/ * http://docs.jquery.com/Plugins/Treeview * * Copyright 2010 Jörn Zaefferer * Released under the MIT license: * http://www.opensource.org/licenses/mit-license.php */;(function($){// TODO rewrite as a widget, removing all the extra plugins$.extend($.fn,{swapClass:function(c1,c2){varc1Elements=this.filter('.'+c1);this.filter('.'+c2).removeClass(c2).addClass(c1);c1Elements.removeClass(c1).addClass(c2);returnthis;},replaceClass:function(c1,c2){returnthis.filter('.'+c1).removeClass(c1).addClass(c2).end();},hoverClass:function(className){className=className||"hover";returnthis.hover(function(){$(this).addClass(className);},function(){$(this).removeClass(className);});},heightToggle:function(animated,callback){animated?this.animate({height:"toggle"},animated,callback):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();if(callback)callback.apply(this,arguments);});},heightHide:function(animated,callback){if(animated){this.animate({height:"hide"},animated,callback);}else{this.hide();if(callback)this.each(callback);}},prepareBranches:function(settings){if(!settings.prerendered){// mark last tree itemsthis.filter(":last-child:not(ul)").addClass(CLASSES.last);// collapse whole tree, or only those marked as closed, anyway except those marked as openthis.filter((settings.collapsed?"":"."+CLASSES.closed)+":not(."+CLASSES.open+")").find(">ul").hide();}// return all items with sublistsreturnthis.filter(":has(>ul)");},applyClasses:function(settings,toggler){// TODO use event delegationthis.filter(":has(>ul):not(:has(>a))").find(">span").unbind("click.treeview").bind("click.treeview",function(event){// don't handle click events on children, eg. checkboxesif(this==event.target)toggler.apply($(this).next());}).add($("a",this)).hoverClass();if(!settings.prerendered){// handle closed ones firstthis.filter(":has(>ul:hidden)").addClass(CLASSES.expandable).replaceClass(CLASSES.last,CLASSES.lastExpandable);// handle open onesthis.not(":has(>ul:hidden)").addClass(CLASSES.collapsable).replaceClass(CLASSES.last,CLASSES.lastCollapsable);// create hitarea if not presentvarhitarea=this.find("div."+CLASSES.hitarea);if(!hitarea.length)hitarea=this.prepend("<div class=\""+CLASSES.hitarea+"\"/>").find("div."+CLASSES.hitarea);hitarea.removeClass().addClass(CLASSES.hitarea).each(function(){varclasses="";$.each($(this).parent().attr("class").split(" "),function(){classes+=this+"-hitarea ";});$(this).addClass(classes);})}// apply event to hitareathis.find("div."+CLASSES.hitarea).click(toggler);},treeview:function(settings){settings=$.extend({cookieId:"treeview"},settings);if(settings.toggle){varcallback=settings.toggle;settings.toggle=function(){returncallback.apply($(this).parent()[0],arguments);};}// factory for treecontrollerfunctiontreeController(tree,control){// factory for click handlersfunctionhandler(filter){returnfunction(){// reuse toggle event handler, applying the elements to toggle// start searching for all hitareastoggler.apply($("div."+CLASSES.hitarea,tree).filter(function(){// for plain toggle, no filter is provided, otherwise we need to check the parent elementreturnfilter?$(this).parent("."+filter).length:true;}));returnfalse;};}// click on first element to collapse tree$("a:eq(0)",control).click(handler(CLASSES.collapsable));// click on second to expand tree$("a:eq(1)",control).click(handler(CLASSES.expandable));// click on third to toggle tree$("a:eq(2)",control).click(handler());}// handle toggle eventfunctiontoggler(){$(this).parent()// swap classes for hitarea.find(">.hitarea").swapClass(CLASSES.collapsableHitarea,CLASSES.expandableHitarea).swapClass(CLASSES.lastCollapsableHitarea,CLASSES.lastExpandableHitarea).end()// swap classes for parent li.swapClass(CLASSES.collapsable,CLASSES.expandable).swapClass(CLASSES.lastCollapsable,CLASSES.lastExpandable)// find child lists.find(">ul")// toggle them.heightToggle(settings.animated,settings.toggle);if(settings.unique){$(this).parent().siblings()// swap classes for hitarea.find(">.hitarea").replaceClass(CLASSES.collapsableHitarea,CLASSES.expandableHitarea).replaceClass(CLASSES.lastCollapsableHitarea,CLASSES.lastExpandableHitarea).end().replaceClass(CLASSES.collapsable,CLASSES.expandable).replaceClass(CLASSES.lastCollapsable,CLASSES.lastExpandable).find(">ul").heightHide(settings.animated,settings.toggle);}}this.data("toggler",toggler);functionserialize(){functionbinary(arg){returnarg?1:0;}vardata=[];branches.each(function(i,e){data[i]=$(e).is(":has(>ul:visible)")?1:0;});$.cookie(settings.cookieId,data.join(""),settings.cookieOptions);}functiondeserialize(){varstored=$.cookie(settings.cookieId);if(stored){vardata=stored.split("");branches.each(function(i,e){$(e).find(">ul")[parseInt(data[i])?"show":"hide"]();});}}// add treeview class to activate stylesthis.addClass("treeview");// prepare branches and find all tree items with child listsvarbranches=this.find("li").prepareBranches(settings);switch(settings.persist){case"cookie":vartoggleCallback=settings.toggle;settings.toggle=function(){serialize();if(toggleCallback){toggleCallback.apply(this,arguments);}};deserialize();break;case"location":varcurrent=this.find("a").filter(function(){returnlocation.href.toLowerCase().indexOf(this.href.toLowerCase())==0;});if(current.length){// TODO update the open/closed classesvaritems=current.addClass("selected").parents("ul, li").add(current.next()).show();if(settings.prerendered){// if prerendered is on, replicate the basic class swappingitems.filter("li").swapClass(CLASSES.collapsable,CLASSES.expandable).swapClass(CLASSES.lastCollapsable,CLASSES.lastExpandable).find(">.hitarea").swapClass(CLASSES.collapsableHitarea,CLASSES.expandableHitarea).swapClass(CLASSES.lastCollapsableHitarea,CLASSES.lastExpandableHitarea);}}break;}branches.applyClasses(settings,toggler);// if control option is set, create the treecontroller and show itif(settings.control){treeController(this,settings.control);$(settings.control).show();}returnthis;}});// classes used by the plugin// need to be styled via external stylesheet, see first example$.treeview={};varCLASSES=($.treeview.classes={open:"open",closed:"closed",expandable:"expandable",expandableHitarea:"expandable-hitarea",lastExpandableHitarea:"lastExpandable-hitarea",collapsable:"collapsable",collapsableHitarea:"collapsable-hitarea",lastCollapsableHitarea:"lastCollapsable-hitarea",lastCollapsable:"lastCollapsable",lastExpandable:"lastExpandable",last:"last",hitarea:"hitarea"});})(jQuery);