Jonas Kress (WMDE) has uploaded a new change for review.

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

Change subject: Fix toolbar callbacks
......................................................................

Fix toolbar callbacks

Change-Id: Ib8b2f3d140c915edca88c11a96eff735eaa24cc8
---
M wikibase/queryService/ui/resultBrowser/TimelineResultBrowser.js
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui 
refs/changes/94/291194/1

diff --git a/wikibase/queryService/ui/resultBrowser/TimelineResultBrowser.js 
b/wikibase/queryService/ui/resultBrowser/TimelineResultBrowser.js
index 42ab5c7..3228b8b 100644
--- a/wikibase/queryService/ui/resultBrowser/TimelineResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/TimelineResultBrowser.js
@@ -42,7 +42,7 @@
                var $container = $( '<div>' );
 
                var timeline = new vis.Timeline( $container[0], 
this._getItems(), TIMELINE_OPTIONS );
-               $element.html( $container.prepend( this._createToolbar( 
timeline ) ) );
+               $element.append( $container.prepend( this._createToolbar( 
timeline ) ) );
        };
 
        /**
@@ -102,9 +102,9 @@
        SELF.prototype._createToolbar = function( timeline ) {
                var $toolbar = $( '<div style="margin-top: -35px; text-align: 
center;">' );
 
-               $( '<a class="btn btn-default">' ).click( timeline.redraw 
).append( '<span class="glyphicon glyphicon-resize-vertical" 
aria-hidden="true"></span>' )
+               $( '<a class="btn btn-default">' ).click( 
$.proxy(timeline.redraw, timeline) ).append( '<span class="glyphicon 
glyphicon-resize-vertical" aria-hidden="true"></span>' )
                                .appendTo( $toolbar );
-               $( '<a class="btn btn-default">' ).click( timeline.fit ).append(
+               $( '<a class="btn btn-default">' ).click( $.proxy(timeline.fit, 
timeline) ).append(
                                '<span class="glyphicon 
glyphicon-resize-horizontal" aria-hidden="true"></span>' )
                                .appendTo( $toolbar );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib8b2f3d140c915edca88c11a96eff735eaa24cc8
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Jonas Kress (WMDE) <jonas.kr...@wikimedia.de>

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

Reply via email to