Tobias Gritschacher has submitted this change and it was merged.
Change subject: (bug 45505) Toggle "action message" on stopediting event
......................................................................
(bug 45505) Toggle "action message" on stopediting event
In order to display the "saving..." message when saving by hitting the "enter"
key,
the "action" message has to be toggled when listening to the interaction
widget's
"stopediting" event.
Change-Id: Ibb1531ae8ede116ec7fac56c11fcb43d2f180fb9
---
M lib/resources/jquery.wikibase/jquery.wikibase.edittoolbar.js
1 file changed, 5 insertions(+), 2 deletions(-)
Approvals:
Tobias Gritschacher: Verified; Looks good to me, approved
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.edittoolbar.js
b/lib/resources/jquery.wikibase/jquery.wikibase.edittoolbar.js
index eacb37c..a0e13a1 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.edittoolbar.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.edittoolbar.js
@@ -136,7 +136,6 @@
this.editGroup.on( 'save', function( e ) {
e.preventDefault(); // Prevent
auto-transforming toolbar to non-edit mode.
- self.toggleActionMessage( { message:
'wikibase-save-inprogress' } );
self._interactionWidget.stopEditing();
} );
@@ -152,8 +151,12 @@
.on( prefix + 'afterstartediting', function( event ) {
self.editGroup.toEditMode();
} )
- .on( prefix + 'stopediting', function( event ) {
+ .on( prefix + 'stopediting', function( event, dropValue
) {
self.disable();
+ // Toggling "action message" here in order to
react on pressing the "enter" key.
+ if ( !dropValue ) {
+ self.toggleActionMessage( { message:
'wikibase-save-inprogress' } );
+ }
} )
.on( prefix + 'afterstopediting', function( event ) {
self.editGroup.toNonEditMode();
--
To view, visit https://gerrit.wikimedia.org/r/52025
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ibb1531ae8ede116ec7fac56c11fcb43d2f180fb9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater <[email protected]>
Gerrit-Reviewer: Tobias Gritschacher <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits