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

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

Change subject: Explore panel
......................................................................

Explore panel

Change-Id: Ide75abfa5efffade32078c079f4f1fffaf65318e
---
M gui/index.html
M gui/style.css
M gui/wikibase/queryService/ui/App.js
3 files changed, 32 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/rdf 
refs/changes/90/255990/1

diff --git a/gui/index.html b/gui/index.html
index 802435e..a664a42 100644
--- a/gui/index.html
+++ b/gui/index.html
@@ -85,10 +85,10 @@
                                                        </div>
                                                </div>
                                                <ul class="nav navbar-nav 
navbar-right" id="total">
-                                                       <li class="navbar-text">
-                                                               <span 
class="label label-primary"><span id="total-results" ></span> Results</span> 
-                                                               <span> <span 
class="label label-info">in <span id="query-time"></span> ms </span> 
&nbsp;</span>
-                                                       </li>
+                                                       <li 
class="navbar-text"><span class="label label-primary"><span 
id="total-results"></span> Results</span> <span> <span class="label 
label-info">in <span id="query-time"></span>
+                                                                               
ms
+                                                               </span> &nbsp;
+                                                       </span></li>
                                                        <li><a href="#" 
data-toggle="dropdown" class="dropdown-toggle"> <span class="glyphicon 
glyphicon-download-alt" aria-hidden="true">Download</span><span 
class="caret"></span>
                                                        </a>
                                                                <ul 
class="dropdown-menu" role="menu">
@@ -105,11 +105,6 @@
                        </div>
                </div>
                <div class="row">
-                       <div>
-                               <div id="explore"></div><button 
id="hide-explorer" href="#">Hide explorer</button>
-                       </div>
-               </div>
-               <div class="row">
                        <div id="query-result" class="panel-heading">Test 
result</div>
                </div>
                <div class="row">
@@ -118,6 +113,18 @@
                <div class="row">
                        <div id="query-error" class="panel-heading">Test 
error</div>
                </div>
+
+               <div class="explorer-panel panel panel-default">
+                   <div class="panel-heading clearfix">
+                     <h1 class="panel-title pull-left" style="padding-top: 
7.5px;">Explorer</h1>
+                     <div class="btn-group pull-right">
+                       <a href="#" class="btn btn-default btn-sm 
explorer-close"><span class="glyphicon glyphicon-remove" 
aria-hidden="true"></span>Close</a>
+                     </div>
+                   </div>
+                       <div class="panel-body">
+                               <div class="explorer"></div>
+                       </div>
+               </div>
        </div>
 </body>
 </html>
diff --git a/gui/style.css b/gui/style.css
index 8910a31..907f07b 100644
--- a/gui/style.css
+++ b/gui/style.css
@@ -62,3 +62,13 @@
 .actionMessage {
        display: none;
 }
+
+.explorer-panel {
+       position: fixed;
+       right: 0;
+       top: 100px;
+       background-color: rgba(255,255,255,0.8);
+       z-index: 100;
+       display: none;
+}
+
diff --git a/gui/wikibase/queryService/ui/App.js 
b/gui/wikibase/queryService/ui/App.js
index e9b83e1..7a648b7 100644
--- a/gui/wikibase/queryService/ui/App.js
+++ b/gui/wikibase/queryService/ui/App.js
@@ -175,11 +175,9 @@
                        self._editor.setValue( '' );
                } );
 
-               $( '#hide-explorer' ).click( function( e ){
+               $( '.explorer-close' ).click( function( e ){
                        e.preventDefault();
-                       $( '#explore' ).empty( '' );
-                       $( '#hide-explorer' ).hide();
-                       $( '#show-explorer' ).show();
+                       $( '.explorer-panel' ).hide();
                } );
 
                $( window ).on( 'popstate', $.proxy( this._initQuery(), this ) 
);
@@ -345,18 +343,14 @@
                        return;
                }
 
-               if ( $( '#hide-explorer' ).is( ':visible' ) ) {
-                       $( '#explore' ).empty( '' );
-               } else {
-                       $( '#hide-explorer' ).show();
-                       $( '#show-explorer' ).hide();
-               }
+               $( '.explorer' ).empty( '' );
+               $( '.explorer-panel' ).show();
+
                id = match[1];
                mw.config = { get: function () {
                        return 'Q'+id;
                } };
-               $( 'html, body' ).animate( { scrollTop: $( '#explore' 
).offset().top }, 500 );
-               EXPLORER( $, mw, $( '#explore' ) );
+               EXPLORER( $, mw, $( '.explorer' ) );
 
                return false;
        };

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide75abfa5efffade32078c079f4f1fffaf65318e
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
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