Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/92652
Change subject: Removed "toolbarParentSelector" option from toolbarbase widget ...................................................................... Removed "toolbarParentSelector" option from toolbarbase widget Since the "toolbarParentSelecor" option is not used anymore and generates unnecessary complexity, it is dropped from the toolbarbase widget. Change-Id: I9950925636817ef24e68e7cdb8127607e0723bee --- M lib/resources/jquery.wikibase/toolbar/addtoolbar.js M lib/resources/jquery.wikibase/toolbar/edittoolbar.js M lib/resources/jquery.wikibase/toolbar/toolbarbase.js M lib/resources/jquery.wikibase/toolbar/toolbarcontroller.definitions.js 4 files changed, 2 insertions(+), 35 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/52/92652/1 diff --git a/lib/resources/jquery.wikibase/toolbar/addtoolbar.js b/lib/resources/jquery.wikibase/toolbar/addtoolbar.js index ee8873e..047fb2e 100644 --- a/lib/resources/jquery.wikibase/toolbar/addtoolbar.js +++ b/lib/resources/jquery.wikibase/toolbar/addtoolbar.js @@ -1,7 +1,4 @@ /** - * @file - * @ingroup WikibaseLib - * * @licence GNU GPL v2+ * @author H. Snater < mediaw...@snater.com > */ @@ -51,7 +48,6 @@ * @type {Object} */ options: { - toolbarParentSelector: null, interactionWidgetName: null, customAction: null, eventPrefix: '', diff --git a/lib/resources/jquery.wikibase/toolbar/edittoolbar.js b/lib/resources/jquery.wikibase/toolbar/edittoolbar.js index 7bec417..69d355f 100644 --- a/lib/resources/jquery.wikibase/toolbar/edittoolbar.js +++ b/lib/resources/jquery.wikibase/toolbar/edittoolbar.js @@ -1,7 +1,4 @@ /** - * @file - * @ingroup WikibaseLib - * * @licence GNU GPL v2+ * @author H. Snater < mediaw...@snater.com > */ @@ -53,7 +50,6 @@ options: { interactionWidgetName: null, parentWidgetFullName: null, - toolbarParentSelector: null, enableRemove: true }, diff --git a/lib/resources/jquery.wikibase/toolbar/toolbarbase.js b/lib/resources/jquery.wikibase/toolbar/toolbarbase.js index aa96a35..782a199 100644 --- a/lib/resources/jquery.wikibase/toolbar/toolbarbase.js +++ b/lib/resources/jquery.wikibase/toolbar/toolbarbase.js @@ -1,7 +1,4 @@ /** - * @file - * @ingroup WikibaseLib - * * @licence GNU GPL v2+ * @author H. Snater < mediaw...@snater.com > */ @@ -13,21 +10,8 @@ * @since 0.4 * * This widget offers basic functionality shared by all toolbar widgets. - * - * @option toolbarParentSelector {string} jQuery selector to find the node the toolbar DOM - * structure with its buttons shall be appended to. If omitted, the DOM structure - * required for the toolbar will be appended to the node the toolbar is initialized on. - * Default: null (this.element will be used) */ $.widget( 'wikibase.toolbarbase', { - /** - * Options - * @type {Object} - */ - options: { - toolbarParentSelector: null - }, - /** * The toolbar widget. * @type {jQuery.wikibase.toolbar} @@ -45,11 +29,7 @@ */ _create: function() { var $toolbarDom = mw.template( 'wikibase-toolbar', this.widgetBaseClass, '' ); - this.$toolbarParent = $toolbarDom.appendTo( - ( this.options.toolbarParentSelector ) - ? this.element.find( this.options.toolbarParentSelector ) - : this.element - ); + this.$toolbarParent = $toolbarDom.appendTo( this.element ); }, /** diff --git a/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.definitions.js b/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.definitions.js index 72f8cbe..1a52f55 100644 --- a/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.definitions.js +++ b/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.definitions.js @@ -1,7 +1,4 @@ /** - * @file - * @ingroup WikibaseLib - * * @licence GNU GPL v2+ * @author H. Snater < mediaw...@snater.com > */ @@ -26,9 +23,7 @@ * { * widgetName: 'wikibase.claimlistview',// <namespace>.<name> of the referenced widget that * // needs to be able to interface to the toolbar type - * options: { // options passed to the toolbar - * toolbarParentSelector: '.wb-claims-toolbar' - * } + * options: { ... } // options passed to the toolbar * } * ); * A toolbar may also be defined on a plain jQuery node which requires specifying some -- To view, visit https://gerrit.wikimedia.org/r/92652 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9950925636817ef24e68e7cdb8127607e0723bee Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Henning Snater <henning.sna...@wikimedia.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits