jenkins-bot has submitted this change and it was merged. Change subject: Prominent placement of the tag could ......................................................................
Prominent placement of the tag could Removes the popover and places the tag cloud on top. Change-Id: Ib88f35d40de056751d94980678629331400eaff6 --- M index.html M style.css M wikibase/queryService/ui/QueryExampleDialog.js 3 files changed, 28 insertions(+), 23 deletions(-) Approvals: Smalyshev: Looks good to me, approved jenkins-bot: Verified diff --git a/index.html b/index.html index 6b05a74..9f5e446 100644 --- a/index.html +++ b/index.html @@ -150,19 +150,12 @@ <div class="modal fade QueryExamples" id="QueryExamples" tabindex="-1" role="dialog" aria-labelledby="QueryExamplesModalLabel"> <div class="modal-dialog modal-lg" role="document"> <div class="modal-content"> - <div class="modal-header panel-heading"> - <button type="button" class="close" data-dismiss="modal" aria-label="Close"> - <span aria-hidden="true">×</span> - </button> - <div class="modal-title" id="QueryExamplesModalLabel">SPARQL Query Examples</div> - </div> <div class="modal-body"> - <div class="input-group"> - <span class="input-group-addon"><span class="glyphicon glyphicon-filter" aria-hidden="true"></span></span> <input type="text" class="tableFilter form-control" placeholder="Type to filter"> <span class="input-group-btn"> - <a class="tagCloudPopover btn btn-primary" data-toggle="popover"><span data-toggle="popover" class="glyphicon glyphicon-tags" aria-hidden="true"></span></a> - </span> - </div> + <div class="tagCloud"></div> <div class="tagFilter"></div> + <div class="input-group"> + <span class="input-group-addon"><span class="glyphicon glyphicon-filter" aria-hidden="true"></span></span> <input type="text" class="tableFilter form-control" placeholder="Type to filter"> + </div> <div class="exampleTable"> <table class="table table-striped"> <tbody class="searchable"> diff --git a/style.css b/style.css index 5409f06..f298e18 100644 --- a/style.css +++ b/style.css @@ -208,12 +208,22 @@ Query example dialog **/ +.QueryExamples .tagCloud { + width: 100%; + height: 200px; +} + +.QueryExamples .tag { + background-color: #337ab7; + background-image: none; +} + .QueryExamples input.tags-input { visibility: hidden; } .QueryExamples .tagFilter { - padding-bottom: 0px!important; + padding-bottom: 5px!important; } .QueryExamples .exampleTable { diff --git a/wikibase/queryService/ui/QueryExampleDialog.js b/wikibase/queryService/ui/QueryExampleDialog.js index ced5f3c..5cf96eb 100644 --- a/wikibase/queryService/ui/QueryExampleDialog.js +++ b/wikibase/queryService/ui/QueryExampleDialog.js @@ -61,12 +61,17 @@ * @private **/ SELF.prototype._initFilter = function() { + var self = this; + this._$element.find( '.tableFilter' ).keyup( $.proxy( this._filterTable, this )); //tags this._$element.find( '.tagFilter' ).tags({ afterAddingTag: $.proxy( this._filterTable, this ), - afterDeletingTag: $.proxy( this._filterTable, this ) + afterDeletingTag: function(){ + self._filterTable(); + self._drawTagCloud(); + } }); }; @@ -94,18 +99,14 @@ SELF.prototype._initTagCloud = function() { var self = this; - this._$element.find( '.tagCloudPopover' ).popover({ - placement: 'bottom', - trigger: 'click', - container: 'body', - content: '<div class="tagCloud" style="height:400px; width:400px;"></div>', - html: true - }); + var interval = window.setInterval(function(){ + if( self._$element.is( ':visible') ){ + self._drawTagCloud(); + clearInterval( interval ); + } - this._$element.find( '.tagCloudPopover' ).click(function () { - self._drawTagCloud(); + }, 300 ); - }); }; /** @@ -124,6 +125,7 @@ $(".tagCloud").empty(); $(".tagCloud").jQCloud(jQCloudTags, { + delayedMode: true, afterCloudRender: function( e ){ $(".tagCloud").find('a').click( function( e ){ e.preventDefault(); -- To view, visit https://gerrit.wikimedia.org/r/279101 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib88f35d40de056751d94980678629331400eaff6 Gerrit-PatchSet: 1 Gerrit-Project: wikidata/query/gui Gerrit-Branch: master Gerrit-Owner: Jonas Kress (WMDE) <jonas.kr...@wikimedia.de> Gerrit-Reviewer: Jonas Kress (WMDE) <jonas.kr...@wikimedia.de> Gerrit-Reviewer: Lydia Pintscher <lydia.pintsc...@wikimedia.de> Gerrit-Reviewer: Smalyshev <smalys...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits