diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 45118f387ca..86e432a822d 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -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 ---------------------- diff --git a/solr/webapp/web/css/styles/common.css b/solr/webapp/web/css/styles/common.css index 94ef1a4aca9..077e67a32d3 100644 --- a/solr/webapp/web/css/styles/common.css +++ b/solr/webapp/web/css/styles/common.css @@ -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 diff --git a/solr/webapp/web/css/styles/query.css b/solr/webapp/web/css/styles/query.css index 368eca32c17..6f2931774c7 100644 --- a/solr/webapp/web/css/styles/query.css +++ b/solr/webapp/web/css/styles/query.css @@ -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 diff --git a/solr/webapp/web/js/scripts/file.js b/solr/webapp/web/js/scripts/file.js index a1ff87763c8..95d201feba1 100644 --- a/solr/webapp/web/js/scripts/file.js +++ b/solr/webapp/web/js/scripts/file.js @@ -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( '
' +
- xhr.responseText.esc() +
- '
'
- );
- this.html( code );
+ content_element
+ .html( template );
- if( 'success' === text_status )
+ $( '#url', content_element )
+ .text( url )
+ .attr( 'href', url );
+
+ $.ajax
+ (
{
- hljs.highlightBlock( code.get(0) );
+ url : url,
+ dataType : 'xml',
+ context : $( '#response' ,content_element ),
+ beforeSend : function( xhr, settings )
+ {
+ this
+ .html( '' +
+ xhr.responseText.esc() +
+ '
'
+ );
+ this.html( code );
+
+ if( 'success' === text_status )
+ {
+ hljs.highlightBlock( code.get(0) );
+ }
+ }
}
- }
+ );
}
);
}
diff --git a/solr/webapp/web/tpl/file.html b/solr/webapp/web/tpl/file.html
new file mode 100755
index 00000000000..25fa03dcf87
--- /dev/null
+++ b/solr/webapp/web/tpl/file.html
@@ -0,0 +1,23 @@
+
+
\ No newline at end of file
diff --git a/solr/webapp/web/tpl/query.html b/solr/webapp/web/tpl/query.html
index 4272e8ec0ab..bd0cdb06981 100644
--- a/solr/webapp/web/tpl/query.html
+++ b/solr/webapp/web/tpl/query.html
@@ -348,7 +348,7 @@ limitations under the License.