diff --git a/openid-connect-server/src/main/java/org/mitre/openid/connect/web/ManagerController.java b/openid-connect-server/src/main/java/org/mitre/openid/connect/web/ManagerController.java
index df1efcc3b..4c1c6ae4d 100644
--- a/openid-connect-server/src/main/java/org/mitre/openid/connect/web/ManagerController.java
+++ b/openid-connect-server/src/main/java/org/mitre/openid/connect/web/ManagerController.java
@@ -29,7 +29,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
*/
@Controller
-@RequestMapping("/")
@PreAuthorize("hasRole('ROLE_USER')") // TODO: this probably shouldn't be here
public class ManagerController {
@@ -46,8 +45,9 @@ public class ManagerController {
return "home";
}
- @RequestMapping("admin/manage")
+ @RequestMapping("manage/**")
public String showClientManager() {
+ // TODO: move view
return "admin/manage";
}
diff --git a/openid-connect-server/src/main/webapp/WEB-INF/tags/footer.tag b/openid-connect-server/src/main/webapp/WEB-INF/tags/footer.tag
index 5c010bfd6..271a96949 100644
--- a/openid-connect-server/src/main/webapp/WEB-INF/tags/footer.tag
+++ b/openid-connect-server/src/main/webapp/WEB-INF/tags/footer.tag
@@ -8,6 +8,7 @@
+
diff --git a/openid-connect-server/src/main/webapp/WEB-INF/tags/sidebar.tag b/openid-connect-server/src/main/webapp/WEB-INF/tags/sidebar.tag
index 0372c29c3..9e0a72e00 100644
--- a/openid-connect-server/src/main/webapp/WEB-INF/tags/sidebar.tag
+++ b/openid-connect-server/src/main/webapp/WEB-INF/tags/sidebar.tag
@@ -5,14 +5,14 @@
\ No newline at end of file
diff --git a/openid-connect-server/src/main/webapp/WEB-INF/tags/topbar.tag b/openid-connect-server/src/main/webapp/WEB-INF/tags/topbar.tag
index 7c570696f..6f1c67242 100644
--- a/openid-connect-server/src/main/webapp/WEB-INF/tags/topbar.tag
+++ b/openid-connect-server/src/main/webapp/WEB-INF/tags/topbar.tag
@@ -8,20 +8,20 @@
- OpenID Connect Server
+ OpenID Connect Server
diff --git a/openid-connect-server/src/main/webapp/resources/js/admin.js b/openid-connect-server/src/main/webapp/resources/js/admin.js
index 7a90c3565..dd3c228e8 100644
--- a/openid-connect-server/src/main/webapp/resources/js/admin.js
+++ b/openid-connect-server/src/main/webapp/resources/js/admin.js
@@ -90,7 +90,7 @@
model = new URIModel({item:input_value});
} else {
model = new Backbone.Model({item:input_value});
- model.validate = function() { if(!this.get("item")) return "value can't be null" };
+ model.validate = function() { if(!this.get("item")) return "value can't be null"; };
}
// if it's valid and doesn't already exist
@@ -558,10 +558,10 @@
var AppRouter = Backbone.Router.extend({
routes:{
- "clients":"listClients",
- "client/new":"newClient",
- "client/:id":"editClient",
- "white_list":"whiteList",
+ "admin/clients":"listClients",
+ "admin/client/new":"newClient",
+ "admin/client/:id":"editClient",
+ "admin/white_list":"whiteList",
'*path': 'listClients'
},
@@ -584,10 +584,13 @@
startAfter:function (collections) {
// Start history when required collections are loaded
var start = _.after(collections.length, _.once(function () {
- Backbone.history.start()
+ var baseUrl = $.url($('base').attr('href'));
+
+ Backbone.history.start({pushState: true, root: baseUrl.attr('relative') + 'manage/'});
+
}));
_.each(collections, function (collection) {
- collection.bind('reset', start, Backbone.history)
+ collection.bind('reset', start, Backbone.history);
});
},
@@ -595,8 +598,8 @@
this.breadCrumbView.collection.reset();
this.breadCrumbView.collection.add([
- {text:"Home", href:"/"},
- {text:"Manage Clients", href:"admin/manage/#clients"}
+ {text:"Home", href:""},
+ {text:"Manage Clients", href:"manage/#admin/clients"}
]);
$('#content').html(this.clientListView.render().el);
@@ -608,9 +611,9 @@
this.breadCrumbView.collection.reset();
this.breadCrumbView.collection.add([
- {text:"Home", href:"/"},
- {text:"Manage Clients", href:"admin/manage/#clients"},
- {text:"New", href:"#"}
+ {text:"Home", href:""},
+ {text:"Manage Clients", href:"manage/#admin/clients"},
+ {text:"New", href:""}
]);
var client = new ClientModel();
@@ -631,9 +634,9 @@
this.breadCrumbView.collection.reset();
this.breadCrumbView.collection.add([
- {text:"Home", href:"/"},
- {text:"Manage Clients", href:"admin/manage/#clients"},
- {text:"Edit", href:"#"}
+ {text:"Home", href:""},
+ {text:"Manage Clients", href:"manage/#admin/clients"},
+ {text:"Edit", href:"manage/#admin/client/" + id}
]);
var client = this.clientList.get(id);
@@ -681,6 +684,11 @@
app = new AppRouter();
+ $('a[href*="#"').on('click', function(event) {
+ event.preventDefault();
+ app.navigate(this.hash.slice(1), {trigger: true});
+ });
+
});