lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From steff...@apache.org
Subject svn commit: r1495848 - in /lucene/dev/trunk/solr: CHANGES.txt webapp/web/css/styles/common.css webapp/web/css/styles/query.css webapp/web/js/scripts/file.js webapp/web/tpl/file.html webapp/web/tpl/query.html
Date Sun, 23 Jun 2013 17:12:14 GMT
Author: steffkes
Date: Sun Jun 23 17:12:13 2013
New Revision: 1495848

URL: http://svn.apache.org/r1495848
Log:
SOLR-4955: Admin UI - Show address bar on top for Schema + Config

Added:
    lucene/dev/trunk/solr/webapp/web/tpl/file.html   (with props)
Modified:
    lucene/dev/trunk/solr/CHANGES.txt
    lucene/dev/trunk/solr/webapp/web/css/styles/common.css
    lucene/dev/trunk/solr/webapp/web/css/styles/query.css
    lucene/dev/trunk/solr/webapp/web/js/scripts/file.js
    lucene/dev/trunk/solr/webapp/web/tpl/query.html

Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1495848&r1=1495847&r2=1495848&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Sun Jun 23 17:12:13 2013
@@ -205,6 +205,8 @@ Optimizations
 * SOLR-4611: Admin UI - Analysis-Urls with empty parameters create empty result table
   (steffkes)
 
+* SOLR-4955: Admin UI - Show address bar on top for Schema + Config (steffkes)
+
 Other Changes
 ----------------------
 

Modified: lucene/dev/trunk/solr/webapp/web/css/styles/common.css
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/css/styles/common.css?rev=1495848&r1=1495847&r2=1495848&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/css/styles/common.css (original)
+++ lucene/dev/trunk/solr/webapp/web/css/styles/common.css Sun Jun 23 17:12:13 2013
@@ -640,4 +640,31 @@ pre.syntax .tex .formula
 #connection_status.online span a:hover
 {
   text-decoration: none;
+}
+
+#content .address-bar
+{
+  margin-bottom: 10px;
+  background-image: url( ../../img/ico/ui-address-bar.png );
+  background-position: 5px 50%;
+  border: 1px solid #f0f0f0;
+  box-shadow: 1px 1px 0 #f0f0f0;
+  -moz-box-shadow: 1px 1px 0 #f0f0f0;
+  -webkit-box-shadow: 1px 1px 0 #f0f0f0;
+  color: #c0c0c0;
+  display: block;
+  overflow: hidden;
+  padding: 5px;
+  padding-left: 26px;
+  white-space: nowrap;
+}
+
+#content .address-bar:focus,
+#content .address-bar:hover
+{
+  border-color: #c0c0c0;
+  box-shadow: 1px 1px 0 #d8d8d8;
+  -moz-box-shadow: 1px 1px 0 #d8d8d8;
+  -webkit-box-shadow: 1px 1px 0 #d8d8d8;
+  color: #333;
 }
\ No newline at end of file

Modified: lucene/dev/trunk/solr/webapp/web/css/styles/query.css
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/css/styles/query.css?rev=1495848&r1=1495847&r2=1495848&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/css/styles/query.css (original)
+++ lucene/dev/trunk/solr/webapp/web/css/styles/query.css Sun Jun 23 17:12:13 2013
@@ -149,33 +149,6 @@
   width: 77%;
 }
 
-#content #query #result #url
-{
-  margin-bottom: 10px;
-  background-image: url( ../../img/ico/ui-address-bar.png );
-  background-position: 5px 50%;
-  border: 1px solid #f0f0f0;
-  box-shadow: 1px 1px 0 #f0f0f0;
-  -moz-box-shadow: 1px 1px 0 #f0f0f0;
-  -webkit-box-shadow: 1px 1px 0 #f0f0f0;
-  color: #c0c0c0;
-  display: block;
-  overflow: hidden;
-  padding: 5px;
-  padding-left: 26px;
-  white-space: nowrap;
-}
-
-#content #query #result #url:focus,
-#content #query #result #url:hover
-{
-  border-color: #c0c0c0;
-  box-shadow: 1px 1px 0 #d8d8d8;
-  -moz-box-shadow: 1px 1px 0 #d8d8d8;
-  -webkit-box-shadow: 1px 1px 0 #d8d8d8;
-  color: #333;
-}
-
 #content #query #result #response
 {
 }
\ No newline at end of file

Modified: lucene/dev/trunk/solr/webapp/web/js/scripts/file.js
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/js/scripts/file.js?rev=1495848&r1=1495847&r2=1495848&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/js/scripts/file.js (original)
+++ lucene/dev/trunk/solr/webapp/web/js/scripts/file.js Sun Jun 23 17:12:13 2013
@@ -22,34 +22,51 @@ sammy.get
   function( context )
   {
     var core_basepath = this.active_core.attr( 'data-basepath' );
-	var filetype = context.params.splat[1]; // either schema or config	
-	var filename = this.active_core.attr( filetype );
+    var content_element = $( '#content' );
 
-    $.ajax
+    var url = window.location.protocol + '//' + window.location.host + core_basepath + '/admin/file'
+            + '?file=' + this.active_core.attr( context.params.splat[1] )
+            + '&contentType=text/xml;charset=utf-8';
+
+    $.get
     (
+      'tpl/file.html',
+      function( template )
       {
-        url : core_basepath + "/admin/file?file=" + filename + "&contentType=text/xml;charset=utf-8",
-        dataType : 'xml',
-        context : $( '#content' ),
-        beforeSend : function( xhr, settings )
-        {
-          this
-          .html( '<div class="loader">Loading ...</div>' );
-        },
-        complete : function( xhr, text_status )
-        {
-          var code = $(
-            '<pre class="syntax language-xml"><code>' +
-            xhr.responseText.esc() +
-            '</code></pre>'
-          );
-          this.html( code );
+        content_element
+          .html( template );
+
+        $( '#url', content_element )
+          .text( url )
+          .attr( 'href', url );
 
-          if( 'success' === text_status )
+        $.ajax
+        (
           {
-            hljs.highlightBlock( code.get(0) );
+            url : url,
+            dataType : 'xml',
+            context : $( '#response' ,content_element ),
+            beforeSend : function( xhr, settings )
+            {
+              this
+              .html( '<div class="loader">Loading ...</div>' );
+            },
+            complete : function( xhr, text_status )
+            {
+              var code = $(
+                '<pre class="syntax language-xml"><code>' +
+                xhr.responseText.esc() +
+                '</code></pre>'
+              );
+              this.html( code );
+
+              if( 'success' === text_status )
+              {
+                hljs.highlightBlock( code.get(0) );
+              }
+            }
           }
-        }
+        );
       }
     );
   }

Added: lucene/dev/trunk/solr/webapp/web/tpl/file.html
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/tpl/file.html?rev=1495848&view=auto
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/tpl/file.html (added)
+++ lucene/dev/trunk/solr/webapp/web/tpl/file.html Sun Jun 23 17:12:13 2013
@@ -0,0 +1,23 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<div id="file" class="clearfix">
+
+  <a id="url" class="address-bar" href="#"></a>
+
+  <div id="response"></div>
+
+</div>
\ No newline at end of file

Modified: lucene/dev/trunk/solr/webapp/web/tpl/query.html
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/tpl/query.html?rev=1495848&r1=1495847&r2=1495848&view=diff
==============================================================================
--- lucene/dev/trunk/solr/webapp/web/tpl/query.html (original)
+++ lucene/dev/trunk/solr/webapp/web/tpl/query.html Sun Jun 23 17:12:13 2013
@@ -348,7 +348,7 @@ limitations under the License.
 
   <div id="result">
 
-    <a id="url" href="#"></a>
+    <a id="url" class="address-bar" href="#"></a>
 
     <div id="response">
 



Mime
View raw message