FELIX-2118 Load the license data wrapped in <pre>-</pre> tages into a <div> to ensure IE can properly render the fixed-format data; in addition provide a WebConsoleUtil.setNoCache method to provide a means to inform the client to not cache the response.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@915255 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/src/main/resources/res/ui/license.js b/webconsole/src/main/resources/res/ui/license.js
index a4aa3a8..ca3744f 100644
--- a/webconsole/src/main/resources/res/ui/license.js
+++ b/webconsole/src/main/resources/res/ui/license.js
@@ -18,6 +18,19 @@
 var licenseButtons = false;
 var licenseDetails = false;
 
+/*
+ * Fuction called after receiving the license data from the server to insert
+ * it into the licenseDetails div
+ * Because IE does not properly support the white-space:pre CSS setting when
+ * DOM-loading data into a <pre> element, the licenseDetails element is a
+ * <div> into which we insert the data surrounded by <pre>-</pre> tags as
+ * innerHtml. This also works in IE.
+ */
+function insertLicenseData( /* String */ data )
+{
+    licenseDetails.html( "<pre>" + data + "</pre>" );
+}
+
 function displayBundle(/* String */ bundleIndex)
 {
     var theBundleData = bundleData[bundleIndex];
@@ -66,7 +79,7 @@
     }
     
     if (firstPage) {
-        licenseDetails.load(firstPage);
+        $.get(firstPage, insertLicenseData);
     } else {
         licenseDetails.html("");
     }
@@ -75,7 +88,7 @@
 	$("#licenseLeft #" +bundleIndex).addClass('ui-state-default ui-corner-all');
 
     $('#licenseButtons a').click(function() {
-       licenseDetails.load(this.href);
+        $.get(this.href, insertLicenseData);
        return false;
     });
 }
diff --git a/webconsole/src/main/resources/templates/license.html b/webconsole/src/main/resources/templates/license.html
index bbfdd07..8ad5f7a 100644
--- a/webconsole/src/main/resources/templates/license.html
+++ b/webconsole/src/main/resources/templates/license.html
@@ -22,7 +22,7 @@
 	<div id="licenseRight">
 		<div id="licenseButtons">&nbsp;</div> 
 		<br />
-		<pre id="licenseDetails" class="ui-widget-content ui-corner-all"></pre>
+		<div id="licenseDetails" class="ui-widget-content ui-corner-all"></div>
 	</div>
 	<div class="ui-helper-clearfix">&nbsp;</div>
 </div>