[MediaWiki-commits] [Gerrit] Suggester visibility depend on spinner visibility - change (mediawiki...Wikibase)

2015-01-27 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Suggester visibility depend on spinner visibility
..


Suggester visibility depend on spinner visibility

This fixes the issue of the spinner not becoming visible.

Bug: T55476
Change-Id: I0295ec9d15608089f3686ae9f3c63cea76a1aba9
---
M repo/resources/jquery.wikibase/jquery.wikibase.entitysearch.js
1 file changed, 5 insertions(+), 3 deletions(-)

Approvals:
  Henning Snater: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/repo/resources/jquery.wikibase/jquery.wikibase.entitysearch.js 
b/repo/resources/jquery.wikibase/jquery.wikibase.entitysearch.js
index c18c727..313cd1c 100644
--- a/repo/resources/jquery.wikibase/jquery.wikibase.entitysearch.js
+++ b/repo/resources/jquery.wikibase/jquery.wikibase.entitysearch.js
@@ -39,6 +39,8 @@
&& ( !menu.option( 'items' ).length || 
!menu.element.is( ':visible' ) )
) {

self.options.suggestionsPlaceholder.setVisibility( true );
+   // Early update required for the 
suggestionsPlaceholder's visibility
+   self._term = self.element.val();
self._updateMenu( [] );
}
} );
@@ -103,11 +105,11 @@
 * @see jQuery.ui.suggester._updateMenuVisibility
 */
_updateMenuVisibility: function() {
-   if( !this._term.length ) {
-   this._close();
-   } else {
+   if( this._term ) {
this._open();
this.repositionMenu();
+   } else {
+   this._close();
}
},
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0295ec9d15608089f3686ae9f3c63cea76a1aba9
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: Adrian Lang 
Gerrit-Reviewer: Henning Snater 
Gerrit-Reviewer: Tobias Gritschacher 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Suggester visibility depend on spinner visibility - change (mediawiki...Wikibase)

2014-12-19 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Suggester visibility depend on spinner visibility
..

Suggester visibility depend on spinner visibility

This fixes the issue of the spinner not becoming visible.

There is an other problem: this._term is empty _after_ I typed the
first character. But I think this patch can be merged independent
from this issue.

Change-Id: I0295ec9d15608089f3686ae9f3c63cea76a1aba9
---
M repo/resources/jquery.wikibase/jquery.wikibase.entitysearch.js
1 file changed, 5 insertions(+), 3 deletions(-)


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

diff --git a/repo/resources/jquery.wikibase/jquery.wikibase.entitysearch.js 
b/repo/resources/jquery.wikibase/jquery.wikibase.entitysearch.js
index c18c727..5e55c00 100644
--- a/repo/resources/jquery.wikibase/jquery.wikibase.entitysearch.js
+++ b/repo/resources/jquery.wikibase/jquery.wikibase.entitysearch.js
@@ -103,11 +103,13 @@
 * @see jQuery.ui.suggester._updateMenuVisibility
 */
_updateMenuVisibility: function() {
-   if( !this._term.length ) {
-   this._close();
-   } else {
+   if( this._term || ( this.options.suggestionsPlaceholder
+   && this.options.suggestionsPlaceholder.getVisibility() )
+   ) {
this._open();
this.repositionMenu();
+   } else {
+   this._close();
}
},
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0295ec9d15608089f3686ae9f3c63cea76a1aba9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 

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