[MediaWiki-commits] [Gerrit] mediawiki...SelectCategory[master]: Bump version of TreeView plugin used to 1.4.2
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/325741 ) Change subject: Bump version of TreeView plugin used to 1.4.2 .. Bump version of TreeView plugin used to 1.4.2 * This plugin is unmaintained and should be replaced. * Old version was causing deprecation warnings. Change-Id: I8193b60c8db5f6ce2467e0663df75936a2230886 --- M jquery.treeview.js 1 file changed, 29 insertions(+), 35 deletions(-) Approvals: jenkins-bot: Verified Cboltz: Verified; Looks good to me, approved diff --git a/jquery.treeview.js b/jquery.treeview.js index 93c4504..d7ce1a9 100644 --- a/jquery.treeview.js +++ b/jquery.treeview.js @@ -1,23 +1,17 @@ /* - * Treeview 1.4.1 - jQuery plugin to hide and show branches of a tree + * Treeview 1.4.2 - 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 (c) 2007 Jörn Zaefferer - * - * Dual licensed under the MIT and GPL licenses: + * Copyright Jörn Zaefferer + * Released under the MIT license: * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - * - * Revision: $Id: jquery.treeview.js 5759 2008-07-01 07:50:28Z joern.zaefferer $ - * */ -;(function($j) { +;(function($) { // TODO rewrite as a widget, removing all the extra plugins - $j.extend($j.fn, { + $.extend($.fn, { swapClass: function(c1, c2) { var c1Elements = this.filter('.' + c1); this.filter('.' + c2).removeClass(c2).addClass(c1); @@ -30,9 +24,9 @@ hoverClass: function(className) { className = className || "hover"; return this.hover(function() { - $j(this).addClass(className); + $(this).addClass(className); }, function() { - $j(this).removeClass(className); + $(this).removeClass(className); }); }, heightToggle: function(animated, callback) { @@ -68,8 +62,8 @@ this.filter(":has(>ul):not(:has(>a))").find(">span").unbind("click.treeview").bind("click.treeview", function(event) { // don't handle click events on children, eg. checkboxes if ( this == event.target ) - toggler.apply($j(this).next()); - }).add( $j("a", this) ).hoverClass(); + toggler.apply($(this).next()); + }).add( $("a", this) ).hoverClass(); if (!settings.prerendered) { // handle closed ones first @@ -88,10 +82,10 @@ hitarea = this.prepend("").find("div." + CLASSES.hitarea); hitarea.removeClass().addClass(CLASSES.hitarea).each(function() { var classes = ""; - $j.each($j(this).parent().attr("class").split(" "), function() { + $.each($(this).parent().attr("class").split(" "), function() { classes += this + "-hitarea "; }); - $j(this).addClass( classes ); + $(this).addClass( classes ); }) } @@ -100,14 +94,14 @@ }, treeview: function(settings) { - settings = $j.extend({ + settings = $.extend({ cookieId: "treeview" }, settings); if ( settings.toggle ) { var callback = settings.toggle; settings.toggle = function() { - return callback.apply($j(this).parent()[0], arguments); + return callback.apply($(this).parent()[0], arguments); }; } @@ -118,24 +112,24 @@ return function() { // reuse toggle event handler, applying the elements to toggle // start searching for all hitareas - toggler.apply( $j("div." + CLASSES.hitarea, tree).filter(function() { + toggler.apply( $("div." + CLASSES.hitarea,
[MediaWiki-commits] [Gerrit] mediawiki...SelectCategory[master]: Bump version of TreeView plugin used to 1.4.2
tosfos has uploaded a new change for review. https://gerrit.wikimedia.org/r/325741 Change subject: Bump version of TreeView plugin used to 1.4.2 .. Bump version of TreeView plugin used to 1.4.2 * This plugin is unmaintained and should be replaced. Change-Id: I8193b60c8db5f6ce2467e0663df75936a2230886 --- M jquery.treeview.js 1 file changed, 29 insertions(+), 35 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SelectCategory refs/changes/41/325741/1 diff --git a/jquery.treeview.js b/jquery.treeview.js index 93c4504..d7ce1a9 100644 --- a/jquery.treeview.js +++ b/jquery.treeview.js @@ -1,23 +1,17 @@ /* - * Treeview 1.4.1 - jQuery plugin to hide and show branches of a tree + * Treeview 1.4.2 - 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 (c) 2007 Jörn Zaefferer - * - * Dual licensed under the MIT and GPL licenses: + * Copyright Jörn Zaefferer + * Released under the MIT license: * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - * - * Revision: $Id: jquery.treeview.js 5759 2008-07-01 07:50:28Z joern.zaefferer $ - * */ -;(function($j) { +;(function($) { // TODO rewrite as a widget, removing all the extra plugins - $j.extend($j.fn, { + $.extend($.fn, { swapClass: function(c1, c2) { var c1Elements = this.filter('.' + c1); this.filter('.' + c2).removeClass(c2).addClass(c1); @@ -30,9 +24,9 @@ hoverClass: function(className) { className = className || "hover"; return this.hover(function() { - $j(this).addClass(className); + $(this).addClass(className); }, function() { - $j(this).removeClass(className); + $(this).removeClass(className); }); }, heightToggle: function(animated, callback) { @@ -68,8 +62,8 @@ this.filter(":has(>ul):not(:has(>a))").find(">span").unbind("click.treeview").bind("click.treeview", function(event) { // don't handle click events on children, eg. checkboxes if ( this == event.target ) - toggler.apply($j(this).next()); - }).add( $j("a", this) ).hoverClass(); + toggler.apply($(this).next()); + }).add( $("a", this) ).hoverClass(); if (!settings.prerendered) { // handle closed ones first @@ -88,10 +82,10 @@ hitarea = this.prepend("").find("div." + CLASSES.hitarea); hitarea.removeClass().addClass(CLASSES.hitarea).each(function() { var classes = ""; - $j.each($j(this).parent().attr("class").split(" "), function() { + $.each($(this).parent().attr("class").split(" "), function() { classes += this + "-hitarea "; }); - $j(this).addClass( classes ); + $(this).addClass( classes ); }) } @@ -100,14 +94,14 @@ }, treeview: function(settings) { - settings = $j.extend({ + settings = $.extend({ cookieId: "treeview" }, settings); if ( settings.toggle ) { var callback = settings.toggle; settings.toggle = function() { - return callback.apply($j(this).parent()[0], arguments); + return callback.apply($(this).parent()[0], arguments); }; } @@ -118,24 +112,24 @@ return function() { // reuse toggle event handler, applying the elements to toggle // start searching for all hitareas - toggler.apply( $j("div." + CLASSES.hitarea, tree).filter(function() { + toggler.apply( $("div." + CLASSES.hitarea, tree).filter(function() {