diff options
| author | Endi S. Dewata <edewata@redhat.com> | 2014-02-07 19:48:09 -0500 |
|---|---|---|
| committer | Endi S. Dewata <edewata@redhat.com> | 2014-02-11 14:22:30 -0500 |
| commit | 310e410dfc1916e19b3aca655bbfedc62db35216 (patch) | |
| tree | 295a6e52ac21a71f279430b8b45b996e4aedee75 /base | |
| parent | 1401227e6a24366210d89349b07dcc871e1e8347 (diff) | |
| download | pki-310e410dfc1916e19b3aca655bbfedc62db35216.tar.gz pki-310e410dfc1916e19b3aca655bbfedc62db35216.tar.xz pki-310e410dfc1916e19b3aca655bbfedc62db35216.zip | |
Improved TPS UI page loading.
Previously the TPS UI would reload the JS libraries and CSS files
every time a page is opened. The pages have been simplified such that
it will only contain the necessary elements of the page. A new Page
class has been added to the framework to define page initialization.
Ticket #654
Diffstat (limited to 'base')
20 files changed, 233 insertions, 305 deletions
diff --git a/base/server/share/webapps/pki/js/pki-ui.js b/base/server/share/webapps/pki/js/pki-ui.js index c16af03ba..d35de5893 100644 --- a/base/server/share/webapps/pki/js/pki-ui.js +++ b/base/server/share/webapps/pki/js/pki-ui.js @@ -107,27 +107,52 @@ var Collection = Backbone.Collection.extend({ } }); +var Page = Backbone.View.extend({ + initialize: function(options) { + var self = this; + Page.__super__.initialize.call(self, options); + + self.url = options.url; + }, + load: function() { + } +}); + var Navigation = Backbone.View.extend({ initialize: function(options) { var self = this; Navigation.__super__.initialize.call(self, options); self.content = options.content; - self.homeURL = options.homeURL; + self.pages = options.pages; + self.homePage = options.homePage; $("li", self.$el).each(function(index) { var li = $(this); var link = $("a", li); var url = link.attr("href"); link.click(function(e) { - if (url != "#") { - self.content.load(url); + // get page name + if (url.charAt(0) == "#" && url.length > 1) { + var name = url.substring(1); + self.load(name); } e.preventDefault(); }); }); - if (self.homeURL) self.content.load(self.homeURL); + if (self.homePage) self.load(self.homePage); + }, + load: function(name) { + var self = this; + var page = self.pages[name]; + if (!page) { + alert("Invalid page: " + name); + return; + } + self.content.load(page.url, function(response, status, xhr) { + page.load(); + }); } }); diff --git a/base/tps-tomcat/shared/webapps/tps/activities.html b/base/tps-tomcat/shared/webapps/tps/activities.html index 367b5e459..4c3d613b7 100644 --- a/base/tps-tomcat/shared/webapps/tps/activities.html +++ b/base/tps-tomcat/shared/webapps/tps/activities.html @@ -15,33 +15,6 @@ Copyright (C) 2013 Red Hat, Inc. All rights reserved. --- END COPYRIGHT BLOCK --- --> -<html> -<head> - <link href="/pki/css/pki-ui.css" rel="stylesheet" type="text/css"> - <script src="/pki/js/jquery.js"></script> - <script src="/pki/js/underscore.js"></script> - <script src="/pki/js/backbone.js"></script> - <script src="/pki/js/pki-ui.js"></script> - <script src="/tps/js/activity.js"></script> - <script> -$(function() { - var editDialog = new Dialog({ - el: $("#activity-dialog"), - title: "Edit Activity", - readonly: ["id", "tokenID", "userID", "ip", - "operation", "result", "date"] - }); - - new Table({ - el: $("table[name='activities']"), - collection: new ActivityCollection({ size: 3 }), - editDialog: editDialog - }); -}); - </script> -</head> -<body> - <h1>Activities</h1> <table name="activities"> @@ -108,6 +81,3 @@ $(function() { </footer> </div> </div> - -</body> -</html> diff --git a/base/tps-tomcat/shared/webapps/tps/authenticators.html b/base/tps-tomcat/shared/webapps/tps/authenticators.html index fa588ebbb..761115c72 100644 --- a/base/tps-tomcat/shared/webapps/tps/authenticators.html +++ b/base/tps-tomcat/shared/webapps/tps/authenticators.html @@ -15,32 +15,6 @@ Copyright (C) 2013 Red Hat, Inc. All rights reserved. --- END COPYRIGHT BLOCK --- --> -<html> -<head> - <link href="/pki/css/pki-ui.css" rel="stylesheet" type="text/css"> - <script src="/pki/js/jquery.js"></script> - <script src="/pki/js/underscore.js"></script> - <script src="/pki/js/backbone.js"></script> - <script src="/pki/js/pki-ui.js"></script> - <script src="/tps/js/authenticator.js"></script> - <script> -$(function() { - var editDialog = new AuthenticatorDialog({ - el: $("#authenticator-dialog"), - title: "Edit Authenticator", - readonly: ["id", "status"] - }); - - new Table({ - el: $("table[name='authenticators']"), - collection: new AuthenticatorCollection({ size: 3 }), - editDialog: editDialog - }); -}); - </script> -</head> -<body> - <h1>Authenticators</h1> <table name="authenticators"> @@ -95,6 +69,3 @@ $(function() { </footer> </div> </div> - -</body> -</html> diff --git a/base/tps-tomcat/shared/webapps/tps/certs.html b/base/tps-tomcat/shared/webapps/tps/certs.html index f5335b7a5..71337fdb6 100644 --- a/base/tps-tomcat/shared/webapps/tps/certs.html +++ b/base/tps-tomcat/shared/webapps/tps/certs.html @@ -15,33 +15,6 @@ Copyright (C) 2013 Red Hat, Inc. All rights reserved. --- END COPYRIGHT BLOCK --- --> -<html> -<head> - <link href="/pki/css/pki-ui.css" rel="stylesheet" type="text/css"> - <script src="/pki/js/jquery.js"></script> - <script src="/pki/js/underscore.js"></script> - <script src="/pki/js/backbone.js"></script> - <script src="/pki/js/pki-ui.js"></script> - <script src="/tps/js/cert.js"></script> - <script> -$(function() { - var editDialog = new Dialog({ - el: $("#certificate-dialog"), - title: "Edit Certificate", - readonly: ["id", "serialNumber", "subject", "tokenID", "userID", - "keyType", "status", "createTime", "modifyTime"] - }); - - new Table({ - el: $("table[name='certificates']"), - collection: new CertificateCollection({ size: 3 }), - editDialog: editDialog - }); -}); - </script> -</head> -<body> - <h1>Certificates</h1> <table name="certificates"> @@ -114,6 +87,3 @@ $(function() { </footer> </div> </div> - -</body> -</html> diff --git a/base/tps-tomcat/shared/webapps/tps/connections.html b/base/tps-tomcat/shared/webapps/tps/connections.html index 33f43d7ff..f941b91b5 100644 --- a/base/tps-tomcat/shared/webapps/tps/connections.html +++ b/base/tps-tomcat/shared/webapps/tps/connections.html @@ -15,32 +15,6 @@ Copyright (C) 2013 Red Hat, Inc. All rights reserved. --- END COPYRIGHT BLOCK --- --> -<html> -<head> - <link href="/pki/css/pki-ui.css" rel="stylesheet" type="text/css"> - <script src="/pki/js/jquery.js"></script> - <script src="/pki/js/underscore.js"></script> - <script src="/pki/js/backbone.js"></script> - <script src="/pki/js/pki-ui.js"></script> - <script src="/tps/js/connection.js"></script> - <script> -$(function() { - var editDialog = new ConnectionDialog({ - el: $("#connection-dialog"), - title: "Edit Connection", - readonly: ["id", "status"] - }); - - new Table({ - el: $("table[name='connections']"), - collection: new ConnectionCollection({ size: 3 }), - editDialog: editDialog - }); -}); - </script> -</head> -<body> - <h1>Connections</h1> <table name="connections"> @@ -95,6 +69,3 @@ $(function() { </footer> </div> </div> - -</body> -</html> diff --git a/base/tps-tomcat/shared/webapps/tps/groups.html b/base/tps-tomcat/shared/webapps/tps/groups.html index 27bd77a90..2bd9b5ba8 100644 --- a/base/tps-tomcat/shared/webapps/tps/groups.html +++ b/base/tps-tomcat/shared/webapps/tps/groups.html @@ -15,40 +15,6 @@ Copyright (C) 2013 Red Hat, Inc. All rights reserved. --- END COPYRIGHT BLOCK --- --> -<html> -<head> - <link href="/pki/css/pki-ui.css" rel="stylesheet" type="text/css"> - <script src="/pki/js/jquery.js"></script> - <script src="/pki/js/underscore.js"></script> - <script src="/pki/js/backbone.js"></script> - <script src="/pki/js/pki-ui.js"></script> - <script src="/tps/js/group.js"></script> - <script> -$(function() { - var addDialog = new Dialog({ - el: $("#group-dialog"), - title: "Add Group", - actions: ["cancel", "add"] - }); - - var editDialog = new Dialog({ - el: $("#group-dialog"), - title: "Edit Group", - readonly: ["groupID"], - actions: ["cancel", "save"] - }); - - new Table({ - el: $("table[name='groups']"), - collection: new GroupCollection({ size: 3 }), - addDialog: addDialog, - editDialog: editDialog - }); -}); - </script> -</head> -<body> - <h1>Groups</h1> <table name="groups"> @@ -105,6 +71,3 @@ $(function() { </footer> </div> </div> - -</body> -</html> diff --git a/base/tps-tomcat/shared/webapps/tps/index.html b/base/tps-tomcat/shared/webapps/tps/index.html index b5c8c957a..790ab1489 100644 --- a/base/tps-tomcat/shared/webapps/tps/index.html +++ b/base/tps-tomcat/shared/webapps/tps/index.html @@ -25,12 +25,32 @@ <script src="/pki/js/backbone.js"></script> <script src="/pki/js/bootstrap.js"></script> <script src="/pki/js/pki-ui.js"></script> + <script src="/tps/js/activity.js"></script> + <script src="/tps/js/authenticator.js"></script> + <script src="/tps/js/cert.js"></script> + <script src="/tps/js/connection.js"></script> + <script src="/tps/js/group.js"></script> + <script src="/tps/js/profile.js"></script> + <script src="/tps/js/selftest.js"></script> + <script src="/tps/js/token.js"></script> + <script src="/tps/js/user.js"></script> <script> $(function() { new Navigation({ el: $("#navigation"), content: $("#content"), - homeURL: "tokens.html" + pages: { + activities: new ActivityPage({ url: "activities.html" }), + authenticators: new AuthenticatorPage({ url: "authenticators.html" }), + certs: new CertificatePage({ url: "certs.html" }), + connections: new ConnectionPage({ url: "connections.html" }), + groups: new GroupPage({ url: "groups.html" }), + profiles: new ProfilePage({ url: "profiles.html" }), + selftests: new SelfTestPage({ url: "selftests.html" }), + tokens: new TokenPage({ url: "tokens.html" }), + users: new UserPage({ url: "users.html" }) + }, + homePage: "tokens" }); }); </script> @@ -65,21 +85,21 @@ $(function() { </li> </ul> <ul class="nav navbar-nav navbar-primary"> - <li><a href="tokens.html">Tokens</a></li> - <li><a href="certs.html">Certificates</a></li> - <li><a href="activities.html">Activities</a></li> - <li><a href="profiles.html">Profiles</a></li> - <li><a href="selftests.html">SelfTests</a></li> - <li><a href="users.html">Users</a></li> - <li><a href="groups.html">Groups</a></li> + <li><a href="#tokens">Tokens</a></li> + <li><a href="#certs">Certificates</a></li> + <li><a href="#activities">Activities</a></li> + <li><a href="#profiles">Profiles</a></li> + <li><a href="#selftests">SelfTests</a></li> + <li><a href="#users">Users</a></li> + <li><a href="#groups">Groups</a></li> <li class="dropdown context"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> Configuration <b class="caret"></b> </a> <ul class="dropdown-menu"> - <li><a href="authenticators.html">Authenticators</a></li> - <li><a href="connections.html">Connections</a></li> + <li><a href="#authenticators">Authenticators</a></li> + <li><a href="#connections">Connections</a></li> </ul> </li> </ul> diff --git a/base/tps-tomcat/shared/webapps/tps/js/activity.js b/base/tps-tomcat/shared/webapps/tps/js/activity.js index 1044f6b33..4039a72ce 100644 --- a/base/tps-tomcat/shared/webapps/tps/js/activity.js +++ b/base/tps-tomcat/shared/webapps/tps/js/activity.js @@ -65,3 +65,20 @@ var ActivityCollection = Collection.extend({ }); } }); + +var ActivityPage = Page.extend({ + load: function() { + var editDialog = new Dialog({ + el: $("#activity-dialog"), + title: "Edit Activity", + readonly: ["id", "tokenID", "userID", "ip", + "operation", "result", "date"] + }); + + new Table({ + el: $("table[name='activities']"), + collection: new ActivityCollection({ size: 3 }), + editDialog: editDialog + }); + } +}); diff --git a/base/tps-tomcat/shared/webapps/tps/js/authenticator.js b/base/tps-tomcat/shared/webapps/tps/js/authenticator.js index f449b9a13..cacf09414 100644 --- a/base/tps-tomcat/shared/webapps/tps/js/authenticator.js +++ b/base/tps-tomcat/shared/webapps/tps/js/authenticator.js @@ -123,3 +123,19 @@ var AuthenticatorDialog = Dialog.extend({ } } }); + +var AuthenticatorPage = Page.extend({ + load: function() { + var editDialog = new AuthenticatorDialog({ + el: $("#authenticator-dialog"), + title: "Edit Authenticator", + readonly: ["id", "status"] + }); + + new Table({ + el: $("table[name='authenticators']"), + collection: new AuthenticatorCollection({ size: 3 }), + editDialog: editDialog + }); + } +}); diff --git a/base/tps-tomcat/shared/webapps/tps/js/cert.js b/base/tps-tomcat/shared/webapps/tps/js/cert.js index 3ccc6dd71..ede68d865 100644 --- a/base/tps-tomcat/shared/webapps/tps/js/cert.js +++ b/base/tps-tomcat/shared/webapps/tps/js/cert.js @@ -71,3 +71,20 @@ var CertificateCollection = Collection.extend({ }); } }); + +var CertificatePage = Page.extend({ + load: function() { + var editDialog = new Dialog({ + el: $("#certificate-dialog"), + title: "Edit Certificate", + readonly: ["id", "serialNumber", "subject", "tokenID", "userID", + "keyType", "status", "createTime", "modifyTime"] + }); + + new Table({ + el: $("table[name='certificates']"), + collection: new CertificateCollection({ size: 3 }), + editDialog: editDialog + }); + } +}); diff --git a/base/tps-tomcat/shared/webapps/tps/js/connection.js b/base/tps-tomcat/shared/webapps/tps/js/connection.js index 89b812e63..94c4522ce 100644 --- a/base/tps-tomcat/shared/webapps/tps/js/connection.js +++ b/base/tps-tomcat/shared/webapps/tps/js/connection.js @@ -123,3 +123,19 @@ var ConnectionDialog = Dialog.extend({ } } }); + +var ConnectionPage = Page.extend({ + load: function() { + var editDialog = new ConnectionDialog({ + el: $("#connection-dialog"), + title: "Edit Connection", + readonly: ["id", "status"] + }); + + new Table({ + el: $("table[name='connections']"), + collection: new ConnectionCollection({ size: 3 }), + editDialog: editDialog + }); + } +}); diff --git a/base/tps-tomcat/shared/webapps/tps/js/group.js b/base/tps-tomcat/shared/webapps/tps/js/group.js index 3e2409bf4..7373e0339 100644 --- a/base/tps-tomcat/shared/webapps/tps/js/group.js +++ b/base/tps-tomcat/shared/webapps/tps/js/group.js @@ -54,3 +54,27 @@ var GroupCollection = Collection.extend({ }); } }); + +var GroupPage = Page.extend({ + load: function() { + var addDialog = new Dialog({ + el: $("#group-dialog"), + title: "Add Group", + actions: ["cancel", "add"] + }); + + var editDialog = new Dialog({ + el: $("#group-dialog"), + title: "Edit Group", + readonly: ["groupID"], + actions: ["cancel", "save"] + }); + + new Table({ + el: $("table[name='groups']"), + collection: new GroupCollection({ size: 3 }), + addDialog: addDialog, + editDialog: editDialog + }); + } +}); diff --git a/base/tps-tomcat/shared/webapps/tps/js/profile.js b/base/tps-tomcat/shared/webapps/tps/js/profile.js index fea47ff04..f9d0ebc9b 100644 --- a/base/tps-tomcat/shared/webapps/tps/js/profile.js +++ b/base/tps-tomcat/shared/webapps/tps/js/profile.js @@ -123,3 +123,19 @@ var ProfileDialog = Dialog.extend({ } } }); + +var ProfilePage = Page.extend({ + load: function() { + var editDialog = new ProfileDialog({ + el: $("#profile-dialog"), + title: "Edit Profile", + readonly: ["id", "status"] + }); + + new Table({ + el: $("table[name='profiles']"), + collection: new ProfileCollection({ size: 3 }), + editDialog: editDialog + }); + } +}); diff --git a/base/tps-tomcat/shared/webapps/tps/js/selftest.js b/base/tps-tomcat/shared/webapps/tps/js/selftest.js index 1c87f1ca8..95d0301ec 100644 --- a/base/tps-tomcat/shared/webapps/tps/js/selftest.js +++ b/base/tps-tomcat/shared/webapps/tps/js/selftest.js @@ -59,3 +59,19 @@ var SelfTestCollection = Collection.extend({ }); } }); + +var SelfTestPage = Page.extend({ + load: function() { + var editDialog = new Dialog({ + el: $("#selftest-dialog"), + title: "Edit Self Test", + readonly: ["id", "enabledAtStartup", "criticalAtStartup", "enabledOnDemand", "criticalOnDemand"] + }); + + new Table({ + el: $("table[name='selftests']"), + collection: new SelfTestCollection({ size: 3 }), + editDialog: editDialog + }); + } +}); diff --git a/base/tps-tomcat/shared/webapps/tps/js/token.js b/base/tps-tomcat/shared/webapps/tps/js/token.js index a4f711219..dcf2cd99c 100644 --- a/base/tps-tomcat/shared/webapps/tps/js/token.js +++ b/base/tps-tomcat/shared/webapps/tps/js/token.js @@ -72,3 +72,30 @@ var TokenCollection = Collection.extend({ }); } }); + +var TokenPage = Page.extend({ + load: function() { + var addDialog = new Dialog({ + el: $("#token-dialog"), + title: "Add Token", + readonly: ["status", "reason", "appletID", "keyInfo", + "createTimestamp", "modifyTimestamp"], + actions: ["cancel", "add"] + }); + + var editDialog = new Dialog({ + el: $("#token-dialog"), + title: "Edit Token", + readonly: ["tokenID", "status", "reason", "appletID", "keyInfo", + "createTimestamp", "modifyTimestamp"], + actions: ["cancel", "save"] + }); + + new Table({ + el: $("table[name='tokens']"), + collection: new TokenCollection({ size: 3 }), + addDialog: addDialog, + editDialog: editDialog + }); + } +}); diff --git a/base/tps-tomcat/shared/webapps/tps/js/user.js b/base/tps-tomcat/shared/webapps/tps/js/user.js index c7d224e7a..e0d4660b5 100644 --- a/base/tps-tomcat/shared/webapps/tps/js/user.js +++ b/base/tps-tomcat/shared/webapps/tps/js/user.js @@ -117,3 +117,28 @@ var UserDialog = Dialog.extend({ attributes["attributes"] = attrs; } }); + +var UserPage = Page.extend({ + load: function() { + var addDialog = new UserDialog({ + el: $("#user-dialog"), + title: "Add User", + readonly: ["type"], + actions: ["cancel", "add"] + }); + + var editDialog = new UserDialog({ + el: $("#user-dialog"), + title: "Edit User", + readonly: ["userID", "type"], + actions: ["cancel", "save"] + }); + + new Table({ + el: $("table[name='users']"), + collection: new UserCollection({ size: 3 }), + addDialog: addDialog, + editDialog: editDialog + }); + } +}); diff --git a/base/tps-tomcat/shared/webapps/tps/profiles.html b/base/tps-tomcat/shared/webapps/tps/profiles.html index 151fdc1a4..388b5ec8b 100644 --- a/base/tps-tomcat/shared/webapps/tps/profiles.html +++ b/base/tps-tomcat/shared/webapps/tps/profiles.html @@ -15,32 +15,6 @@ Copyright (C) 2013 Red Hat, Inc. All rights reserved. --- END COPYRIGHT BLOCK --- --> -<html> -<head> - <link href="/pki/css/pki-ui.css" rel="stylesheet" type="text/css"> - <script src="/pki/js/jquery.js"></script> - <script src="/pki/js/underscore.js"></script> - <script src="/pki/js/backbone.js"></script> - <script src="/pki/js/pki-ui.js"></script> - <script src="/tps/js/profile.js"></script> - <script> -$(function() { - var editDialog = new ProfileDialog({ - el: $("#profile-dialog"), - title: "Edit Profile", - readonly: ["id", "status"] - }); - - new Table({ - el: $("table[name='profiles']"), - collection: new ProfileCollection({ size: 3 }), - editDialog: editDialog - }); -}); - </script> -</head> -<body> - <h1>Profiles</h1> <table name="profiles"> @@ -95,6 +69,3 @@ $(function() { </footer> </div> </div> - -</body> -</html> diff --git a/base/tps-tomcat/shared/webapps/tps/selftests.html b/base/tps-tomcat/shared/webapps/tps/selftests.html index 8cac37a24..ee52bd998 100644 --- a/base/tps-tomcat/shared/webapps/tps/selftests.html +++ b/base/tps-tomcat/shared/webapps/tps/selftests.html @@ -15,32 +15,6 @@ Copyright (C) 2013 Red Hat, Inc. All rights reserved. --- END COPYRIGHT BLOCK --- --> -<html> -<head> - <link href="/pki/css/pki-ui.css" rel="stylesheet" type="text/css"> - <script src="/pki/js/jquery.js"></script> - <script src="/pki/js/underscore.js"></script> - <script src="/pki/js/backbone.js"></script> - <script src="/pki/js/pki-ui.js"></script> - <script src="/tps/js/selftest.js"></script> - <script> -$(function() { - var editDialog = new Dialog({ - el: $("#selftest-dialog"), - title: "Edit Self Test", - readonly: ["id", "enabledAtStartup", "criticalAtStartup", "enabledOnDemand", "criticalOnDemand"] - }); - - new Table({ - el: $("table[name='selftests']"), - collection: new SelfTestCollection({ size: 3 }), - editDialog: editDialog - }); -}); - </script> -</head> -<body> - <h1>Self Tests</h1> <table name="selftests"> @@ -101,6 +75,3 @@ $(function() { </footer> </div> </div> - -</body> -</html> diff --git a/base/tps-tomcat/shared/webapps/tps/tokens.html b/base/tps-tomcat/shared/webapps/tps/tokens.html index e82c9a320..1575b046c 100644 --- a/base/tps-tomcat/shared/webapps/tps/tokens.html +++ b/base/tps-tomcat/shared/webapps/tps/tokens.html @@ -15,43 +15,6 @@ Copyright (C) 2013 Red Hat, Inc. All rights reserved. --- END COPYRIGHT BLOCK --- --> -<html> -<head> - <link href="/pki/css/pki-ui.css" rel="stylesheet" type="text/css"> - <script src="/pki/js/jquery.js"></script> - <script src="/pki/js/underscore.js"></script> - <script src="/pki/js/backbone.js"></script> - <script src="/pki/js/pki-ui.js"></script> - <script src="/tps/js/token.js"></script> - <script> -$(function() { - var addDialog = new Dialog({ - el: $("#token-dialog"), - title: "Add Token", - readonly: ["status", "reason", "appletID", "keyInfo", - "createTimestamp", "modifyTimestamp"], - actions: ["cancel", "add"] - }); - - var editDialog = new Dialog({ - el: $("#token-dialog"), - title: "Edit Token", - readonly: ["tokenID", "status", "reason", "appletID", "keyInfo", - "createTimestamp", "modifyTimestamp"], - actions: ["cancel", "save"] - }); - - new Table({ - el: $("table[name='tokens']"), - collection: new TokenCollection({ size: 3 }), - addDialog: addDialog, - editDialog: editDialog - }); -}); - </script> -</head> -<body> - <h1>Tokens</h1> <table name="tokens"> @@ -126,6 +89,3 @@ $(function() { </footer> </div> </div> - -</body> -</html> diff --git a/base/tps-tomcat/shared/webapps/tps/users.html b/base/tps-tomcat/shared/webapps/tps/users.html index 08656fbef..20e622cbc 100644 --- a/base/tps-tomcat/shared/webapps/tps/users.html +++ b/base/tps-tomcat/shared/webapps/tps/users.html @@ -15,41 +15,6 @@ Copyright (C) 2013 Red Hat, Inc. All rights reserved. --- END COPYRIGHT BLOCK --- --> -<html> -<head> - <link href="/pki/css/pki-ui.css" rel="stylesheet" type="text/css"> - <script src="/pki/js/jquery.js"></script> - <script src="/pki/js/underscore.js"></script> - <script src="/pki/js/backbone.js"></script> - <script src="/pki/js/pki-ui.js"></script> - <script src="/tps/js/user.js"></script> - <script> -$(function() { - var addDialog = new UserDialog({ - el: $("#user-dialog"), - title: "Add User", - readonly: ["type"], - actions: ["cancel", "add"] - }); - - var editDialog = new UserDialog({ - el: $("#user-dialog"), - title: "Edit User", - readonly: ["userID", "type"], - actions: ["cancel", "save"] - }); - - new Table({ - el: $("table[name='users']"), - collection: new UserCollection({ size: 3 }), - addDialog: addDialog, - editDialog: editDialog - }); -}); - </script> -</head> -<body> - <h1>Users</h1> <table name="users"> @@ -110,6 +75,3 @@ $(function() { </footer> </div> </div> - -</body> -</html> |
