Tobias Gritschacher has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/81923


Change subject: Add additional css classes to toolbarbuttons
......................................................................

Add additional css classes to toolbarbuttons

This will allow us to access buttons with way less
complicated selectors or xpaths in selenium tests

Change-Id: Iea5393d06e8c0abb8e19456674e7f62f88c433f3
---
M lib/resources/jquery.wikibase/toolbar/addtoolbar.js
M lib/resources/jquery.wikibase/toolbar/removetoolbar.js
M lib/resources/jquery.wikibase/toolbar/toolbareditgroup.js
3 files changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/23/81923/1

diff --git a/lib/resources/jquery.wikibase/toolbar/addtoolbar.js 
b/lib/resources/jquery.wikibase/toolbar/addtoolbar.js
index 35ada18..6b74ceb 100644
--- a/lib/resources/jquery.wikibase/toolbar/addtoolbar.js
+++ b/lib/resources/jquery.wikibase/toolbar/addtoolbar.js
@@ -91,6 +91,7 @@
                                this.options.addButtonLabel,
                                'javascript:void(0);'
                        ).toolbarbutton();
+                       
this.toolbar.$btnAdd.addClass('wikibase-toolbarbutton-add');
                        this.toolbar.$innerGroup.data( 'toolbar' ).addElement( 
this.toolbar.$btnAdd );
                        this.toolbar.addElement( this.toolbar.$innerGroup );
 
diff --git a/lib/resources/jquery.wikibase/toolbar/removetoolbar.js 
b/lib/resources/jquery.wikibase/toolbar/removetoolbar.js
index c5457d8..116b6ee 100644
--- a/lib/resources/jquery.wikibase/toolbar/removetoolbar.js
+++ b/lib/resources/jquery.wikibase/toolbar/removetoolbar.js
@@ -71,6 +71,7 @@
                                this.options.label,
                                'javascript:void(0);'
                        ).toolbarbutton();
+                       
toolbar.$btnRemove.addClass('wikibase-toolbarbutton-remove');
 
                        toolbar.$innerGroup.data( 'toolbar' ).addElement( 
toolbar.$btnRemove );
                        toolbar.addElement( toolbar.$innerGroup );
diff --git a/lib/resources/jquery.wikibase/toolbar/toolbareditgroup.js 
b/lib/resources/jquery.wikibase/toolbar/toolbareditgroup.js
index 88b0869..75da1f4 100644
--- a/lib/resources/jquery.wikibase/toolbar/toolbareditgroup.js
+++ b/lib/resources/jquery.wikibase/toolbar/toolbareditgroup.js
@@ -163,6 +163,7 @@
                        'javascript:void(0);'
                )
                .toolbarbutton();
+               this.$btnEdit.addClass('wikibase-toolbarbutton-edit');
 
                this.$btnCancel = mw.template(
                        'wikibase-toolbarbutton',
@@ -170,6 +171,7 @@
                        'javascript:void(0);'
                )
                .toolbarbutton();
+               this.$btnCancel.addClass('wikibase-toolbarbutton-cancel');
 
                this.$btnSave = mw.template(
                        'wikibase-toolbarbutton',
@@ -177,6 +179,7 @@
                        'javascript:void(0);'
                )
                .toolbarbutton();
+               this.$btnSave.addClass('wikibase-toolbarbutton-save');
 
                this.$btnRemove = mw.template(
                        'wikibase-toolbarbutton',
@@ -184,6 +187,7 @@
                        'javascript:void(0);'
                )
                .toolbarbutton();
+               this.$btnRemove.addClass('wikibase-toolbarbutton-remove');
 
                this._attachEventHandlers();
 

-- 
To view, visit https://gerrit.wikimedia.org/r/81923
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iea5393d06e8c0abb8e19456674e7f62f88c433f3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher <tobias.gritschac...@wikimedia.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to