Skip to content

Apache Lucene open-source search software

SOLR-3876: Solr Admin UI is completely dysfunctional on IE 9

Stefan Matheis2f3435acce09
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 1bf6b3369bf..b3937fd1a07 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -495,6 +495,8 @@ Bug Fixes
* SOLR-4170: The 'backup' ReplicationHandler command can sometimes use a stale
index directory rather than the current one. (Mark Miller, Marcin Rzewuck)
+* SOLR-3876: Solr Admin UI is completely dysfunctional on IE 9 (steffkes)
+
Other Changes
----------------------
diff --git a/solr/webapp/web/admin.html b/solr/webapp/web/admin.html
index 17997209568..3634baf6470 100644
--- a/solr/webapp/web/admin.html
+++ b/solr/webapp/web/admin.html
@@ -1,3 +1,4 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<!--
diff --git a/solr/webapp/web/js/lib/console.js b/solr/webapp/web/js/lib/console.js
index 73faabbf9e7..ef91c0871bd 100644
--- a/solr/webapp/web/js/lib/console.js
+++ b/solr/webapp/web/js/lib/console.js
@@ -15,13 +15,15 @@
limitations under the License.
*/
-if( 'undefined' === typeof( console ) )
+window.console = window.console || {};
+
+var names = ["log", "debug", "info", "warn", "error",
+ "assert", "dir", "dirxml", "group", "groupEnd", "time",
+ "timeEnd", "count", "trace", "profile", "profileEnd"];
+
+var i = 0;
+var l = names.length;
+for( i = 0; i < l; i++ )
{
- var console = {
- log : function() {},
- debug : function() {},
- dump : function() {},
- error : function() {},
- warn : function(){}
- };
-}
\ No newline at end of file
+ window.console[names[i]] = window.console[names[i]] || function() {};
+}
diff --git a/solr/webapp/web/js/scripts/app.js b/solr/webapp/web/js/scripts/app.js
index 4bdcff41c02..4e23b22af5c 100644
--- a/solr/webapp/web/js/scripts/app.js
+++ b/solr/webapp/web/js/scripts/app.js
@@ -131,7 +131,7 @@ var sammy = $.sammy
var solr_admin = function( app_config )
{
- self = this,
+ that = this,
menu_element = null,
@@ -196,13 +196,13 @@ var solr_admin = function( app_config )
this.set_cores_data = function set_cores_data( cores )
{
- self.cores_data = sort_cores_data( cores.status );
+ that.cores_data = sort_cores_data( cores.status );
- self.menu_element
+ that.menu_element
.empty();
var core_count = 0;
- for( var core_name in self.cores_data )
+ for( var core_name in that.cores_data )
{
core_count++;
var core_path = config.solr_path + '/' + core_name;
@@ -240,7 +240,7 @@ var solr_admin = function( app_config )
+ ' </ul>' + "\n"
+ '</li>';
- self.menu_element
+ that.menu_element
.append( core_tpl );
}
@@ -290,7 +290,7 @@ var solr_admin = function( app_config )
},
success : function( response )
{
- self.set_cores_data( response );
+ that.set_cores_data( response );
for( var core_name in response.status )
{
@@ -312,7 +312,7 @@ var solr_admin = function( app_config )
},
success : function( response )
{
- self.dashboard_values = response;
+ that.dashboard_values = response;
var environment_args = null;
var cloud_args = null;
diff --git a/solr/webapp/web/js/scripts/cloud.js b/solr/webapp/web/js/scripts/cloud.js
index dc4420c59bc..9a1f51f7f40 100644
--- a/solr/webapp/web/js/scripts/cloud.js
+++ b/solr/webapp/web/js/scripts/cloud.js
@@ -436,7 +436,7 @@ var prepare_graph = function( graph_element, callback )
var shard = {
name: s,
data: {
- type : 'shard',
+ type : 'shard'
},
children: nodes
};
@@ -446,7 +446,7 @@ var prepare_graph = function( graph_element, callback )
var collection = {
name: c,
data: {
- type : 'collection',
+ type : 'collection'
},
children: shards
};
diff --git a/solr/webapp/web/js/scripts/plugins.js b/solr/webapp/web/js/scripts/plugins.js
index f77d03dea14..739c65e6921 100644
--- a/solr/webapp/web/js/scripts/plugins.js
+++ b/solr/webapp/web/js/scripts/plugins.js
@@ -287,7 +287,7 @@ var render_plugin_data = function( plugin_data, plugin_sort, types )
var txt = $(this).html();
if(txt.indexOf("http") >= 0) {
$(this).linker({
- className : 'linker',
+ className : 'linker'
});
}
});
@@ -423,4 +423,4 @@ sammy.get
}
);
}
-);
\ No newline at end of file
+);