Add factory detail (work in progress).
Add the ipojo.css file and load it.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@963387 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/webconsole-plugin/src/main/resources/res/factories.html b/ipojo/webconsole-plugin/src/main/resources/res/factories.html
index 16a186a..f49ed6e 100644
--- a/ipojo/webconsole-plugin/src/main/resources/res/factories.html
+++ b/ipojo/webconsole-plugin/src/main/resources/res/factories.html
@@ -1,5 +1,10 @@
 <script type="text/javascript" src="${pluginRoot}/res/ui/factory.js"></script>
-
+<script>
+    var root_url = '${pluginRoot}';
+    var instances_url = '${pluginRoot}' + '/instances';
+    var factories_url = '${pluginRoot}' + '/factories';
+    var handlers_url = '${pluginRoot}' + '/handlers';
+</script>
 
 <!-- status line -->
 <p class="statline">&nbsp;</p>
diff --git a/ipojo/webconsole-plugin/src/main/resources/res/handlers.html b/ipojo/webconsole-plugin/src/main/resources/res/handlers.html
index b93da53..b5edb5f 100644
--- a/ipojo/webconsole-plugin/src/main/resources/res/handlers.html
+++ b/ipojo/webconsole-plugin/src/main/resources/res/handlers.html
@@ -1,5 +1,10 @@
 <script type="text/javascript" src="${pluginRoot}/res/ui/handler.js"></script>
-
+<script>
+    var root_url = '${pluginRoot}';
+    var instances_url = '${pluginRoot}' + '/instances';
+    var factories_url = '${pluginRoot}' + '/factories';
+    var handlers_url = '${pluginRoot}' + '/handlers';
+</script>
 
 <!-- status line -->
 <p class="statline">&nbsp;</p>
diff --git a/ipojo/webconsole-plugin/src/main/resources/res/instances.html b/ipojo/webconsole-plugin/src/main/resources/res/instances.html
index 42c3cc0..1c83905 100644
--- a/ipojo/webconsole-plugin/src/main/resources/res/instances.html
+++ b/ipojo/webconsole-plugin/src/main/resources/res/instances.html
@@ -1,4 +1,10 @@
 <script type="text/javascript" src="${pluginRoot}/res/ui/ipojo.js"></script>
+<script>
+    var root_url = '${pluginRoot}';
+    var instances_url = '${pluginRoot}' + '/instances';
+    var factories_url = '${pluginRoot}' + '/factories';
+    var handlers_url = '${pluginRoot}' + '/handlers';
+</script>
 
 <!-- status line -->
 <p class="statline">&nbsp;</p>
diff --git a/ipojo/webconsole-plugin/src/main/resources/res/ui/factory.js b/ipojo/webconsole-plugin/src/main/resources/res/ui/factory.js
index 50b8ba3..8fc76cf 100644
--- a/ipojo/webconsole-plugin/src/main/resources/res/ui/factory.js
+++ b/ipojo/webconsole-plugin/src/main/resources/res/ui/factory.js
@@ -38,7 +38,7 @@
 
     var _ = tableEntryTemplate.clone().appendTo(tableBody).attr('id', 'factory-' + factory.name);
 
-    _.find('td.name').html('<a href="' + window.location.pathname + '/factories/' + name + '">' + name + '</a>');
+    _.find('td.name').html('<a href="' + factories_url + '/' + name + '">' + name + '</a>');
     _.find('td.bundle').text(bundle);
     _.find('td.state').text(state);
 }
@@ -53,11 +53,11 @@
 
 function loadInstancesData() {
     console.log("Go to instances"); 
-    window.location=window.location.pathname + "?view=instances"
+    window.location = instances_url;
 }
 
 function loadHandlersData() {
-    window.location=window.location.pathname + "?view=handlers"
+    window.location = handlers_url;
 }
 
 var tableBody = false;
diff --git a/ipojo/webconsole-plugin/src/main/resources/res/ui/handler.js b/ipojo/webconsole-plugin/src/main/resources/res/ui/handler.js
index cddbd60..6298146 100644
--- a/ipojo/webconsole-plugin/src/main/resources/res/ui/handler.js
+++ b/ipojo/webconsole-plugin/src/main/resources/res/ui/handler.js
@@ -60,11 +60,11 @@
 }
 
 function loadInstancesData() {
-    window.location=window.location.pathname + "?view=instances"
+    window.location = instances_url;
 }
 
 function loadFactoriesData() {
-    window.location=window.location.pathname + "?view=factories"
+    window.location = factories_url;
 }
 
 var tableBody = false;
diff --git a/ipojo/webconsole-plugin/src/main/resources/res/ui/ipojo.js b/ipojo/webconsole-plugin/src/main/resources/res/ui/ipojo.js
index 0fea36e..f59f15f 100644
--- a/ipojo/webconsole-plugin/src/main/resources/res/ui/ipojo.js
+++ b/ipojo/webconsole-plugin/src/main/resources/res/ui/ipojo.js
@@ -49,12 +49,11 @@
 }
 
 function loadFactoriesData() {
-    console.log("Go to factories data");
-    window.location=window.location.pathname + '?view=factories'; 
+    window.location = factories_url; 
 }
 
 function loadHandlersData() {
-    window.location=window.location.pathname + "?view=handlers"
+    window.location = handlers_url;
 }
 
 var tableBody = false;