[MediaWiki-commits] [Gerrit] Improving focusing after add action in statements UI - change (mediawiki...Wikibase)

2013-03-07 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has submitted this change and it was merged.

Change subject: Improving focusing after add action in statements UI
..


Improving focusing after add action in statements UI

After ending a statement section's add action (e.g. by canceling), the focus 
is
not moved to the general add button anymore but to the section's add button.

Change-Id: Ie944353b14ff3535f01553f87537f70817b9de10
---
M lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js
M lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
2 files changed, 1 insertion(+), 4 deletions(-)

Approvals:
  Tobias Gritschacher: Verified; Looks good to me, approved



diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js
index 9e9a555..e8592a8 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js
@@ -135,9 +135,6 @@
.on(
prefixed( 'itemadded ' ) + prefixed( 
'itemremoved ' ) + prefixed( 'canceled' ),
function( event, value, $node ) {
-   if ( value === null ) {
-   return;
-   }
if ( $node !== undefined  
$node.parent()[0] !== self.element.parent()[0] ) {
// The event does not belong to 
this add button but rather to an add
// button encapsulated in a 
descendant node.
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
index 3ef8e39..74c8eab 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
@@ -419,7 +419,7 @@
if( dropValue || !self._lmwInstance( $newClaim 
).$mainSnak.data( 'snakview' ).snak() ) {
// if new claim is canceled before saved, or if 
it is invalid, we simply remove
// and forget about it
-   self._trigger( 'canceled', null, [ $newClaim ] 
);
+   self._trigger( 'canceled', null, [ null, 
$newClaim ] );
 
self._lmwInstance( $newClaim ).destroy();
$newClaim.remove();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie944353b14ff3535f01553f87537f70817b9de10
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Improving focusing after add action in statements UI - change (mediawiki...Wikibase)

2013-03-01 Thread Henning Snater (Code Review)
Henning Snater has uploaded a new change for review.

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


Change subject: Improving focusing after add action in statements UI
..

Improving focusing after add action in statements UI

After ending a statement section's add action (e.g. by canceling), the focus 
is
not moved to the general add button anymore but to the section's add button.

Change-Id: Ie944353b14ff3535f01553f87537f70817b9de10
---
M lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js
M lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
2 files changed, 1 insertion(+), 4 deletions(-)


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

diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js
index 9cec3fe..0c88fc4 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js
@@ -133,9 +133,6 @@
.on(
prefixed( 'itemadded ' ) + prefixed( 
'itemremoved ' ) + prefixed( 'canceled' ),
function( event, value, $node ) {
-   if ( value === null ) {
-   return;
-   }
if ( $node !== undefined  
$node.parent()[0] !== self.element.parent()[0] ) {
// The event does not belong to 
this add button but rather to an add
// button encapsulated in a 
descendant node.
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
index 48d9901..3bfd45f 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
@@ -426,7 +426,7 @@
if( dropValue || !self._lmwInstance( $newClaim 
).$mainSnak.data( 'snakview' ).snak() ) {
// if new claim is canceled before saved, or if 
it is invalid, we simply remove
// and forget about it
-   self._trigger( 'canceled', null, [ $newClaim ] 
);
+   self._trigger( 'canceled', null, [ null, 
$newClaim ] );
 
self._lmwInstance( $newClaim ).destroy();
$newClaim.remove();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie944353b14ff3535f01553f87537f70817b9de10
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