You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by st...@apache.org on 2014/11/13 21:33:03 UTC
svn commit: r1639512 - in /lucene/dev/branches/branch_5x: ./ solr/
solr/CHANGES.txt solr/webapp/ solr/webapp/web/css/styles/files.css
solr/webapp/web/js/scripts/files.js
Author: steffkes
Date: Thu Nov 13 20:33:03 2014
New Revision: 1639512
URL: http://svn.apache.org/r1639512
Log:
SOLR-6740: Admin UI - improve Files View (merge r1639511)
Modified:
lucene/dev/branches/branch_5x/ (props changed)
lucene/dev/branches/branch_5x/solr/ (props changed)
lucene/dev/branches/branch_5x/solr/CHANGES.txt (contents, props changed)
lucene/dev/branches/branch_5x/solr/webapp/ (props changed)
lucene/dev/branches/branch_5x/solr/webapp/web/css/styles/files.css
lucene/dev/branches/branch_5x/solr/webapp/web/js/scripts/files.js
Modified: lucene/dev/branches/branch_5x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/CHANGES.txt?rev=1639512&r1=1639511&r2=1639512&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_5x/solr/CHANGES.txt Thu Nov 13 20:33:03 2014
@@ -366,6 +366,8 @@ Other Changes
* SOLR-6739: Admin UI - Sort list of command line args (steffkes)
+* SOLR-6740: Admin UI - improve Files View (steffkes)
+
================== 4.10.3 ==================
Bug Fixes
Modified: lucene/dev/branches/branch_5x/solr/webapp/web/css/styles/files.css
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/webapp/web/css/styles/files.css?rev=1639512&r1=1639511&r2=1639512&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/webapp/web/css/styles/files.css (original)
+++ lucene/dev/branches/branch_5x/solr/webapp/web/css/styles/files.css Thu Nov 13 20:33:03 2014
@@ -23,6 +23,11 @@ limitations under the License.
width: 20%;
}
+#content #files #tree-holder li
+{
+ overflow: hidden;
+}
+
#content #files form .buttons button
{
float: right;
Modified: lucene/dev/branches/branch_5x/solr/webapp/web/js/scripts/files.js
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/webapp/web/js/scripts/files.js?rev=1639512&r1=1639511&r2=1639512&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/webapp/web/js/scripts/files.js (original)
+++ lucene/dev/branches/branch_5x/solr/webapp/web/js/scripts/files.js Thu Nov 13 20:33:03 2014
@@ -103,6 +103,7 @@ sammy.get
data: {
title : file,
attr : {
+ title : file,
href : '#/' + current_core + '/files?file=' + prefix + file
}
},
@@ -161,7 +162,7 @@ sammy.get
var endpoint = file_endpoint + '?file=' + selected_file;
- var content_type_map = { xml : 'text/xml', html : 'text/html', js : 'text/javascript' };
+ var content_type_map = { xml : 'text/xml', html : 'text/html', js : 'text/javascript', json : 'application/json', 'css' : 'text/css' };
var file_ext = selected_file.match( /\.(\w+)$/ );
endpoint += '&contentType=' + ( content_type_map[ file_ext[1] || '' ] || 'text/plain' ) + ';charset=utf-8';
@@ -209,6 +210,14 @@ sammy.get
{
highlight = 'javascript';
}
+ else if( 0 === content_type.indexOf( 'text/css' ) )
+ {
+ highlight = 'css';
+ }
+ else if( 0 === content_type.indexOf( 'application/json' ) )
+ {
+ highlight = 'json';
+ }
var code = $(
'<pre class="syntax' + ( highlight ? ' language-' + highlight : '' )+ '"><code>' +