Henning Snater has uploaded a new change for review. https://gerrit.wikimedia.org/r/91822
Change subject: Hide "remove" button when adding a new statement ...................................................................... Hide "remove" button when adding a new statement (bug 56096) "Remove" button is not initialized anymore when adding a new statement. Change-Id: If020dd22930f4dd308417ce2eb741cad77351948 --- M lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js 1 file changed, 2 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/22/91822/1 diff --git a/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js b/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js index 30d6416..b62f5ed 100644 --- a/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js +++ b/lib/resources/jquery.wikibase/toolbar/toolbarcontroller.js @@ -155,11 +155,8 @@ // corresponding to the widget just instantiated. self.element.on( eventPrefix + 'create.' + self.widgetName, function( event ) { var $target = $( event.target ), - isPending = baseClass - && ( - $target.hasClass( baseClass + '-new' ) - || $target.find( baseClass + '-new' ).length > 0 - ); + isWidget = !!def.widget, + isPending = isWidget && !$target.data( def.widget.name ).value(); if ( type === 'addtoolbar' ) { // Initialize toolbars that are not initialized already: -- To view, visit https://gerrit.wikimedia.org/r/91822 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If020dd22930f4dd308417ce2eb741cad77351948 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