use a more standard naming uppercase start for js 'beans'

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1227889 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-01-05 23:19:37 +00:00
parent c8ac02d78e
commit 293efa4329
4 changed files with 11 additions and 11 deletions

View File

@ -19,7 +19,7 @@
$(function() {
operation=function(name) {
Operation=function(name) {
this.name=ko.observable(name);
}
@ -27,7 +27,7 @@ $(function() {
* @param data Operation response from redback rest api
*/
mapOperation=function(data) {
return new operation(data.name,null);
return new Operation(data.name,null);
}

View File

@ -19,7 +19,7 @@
$(function() {
permission=function(name,operation,resource) {
Permission=function(name,operation,resource) {
this.name=ko.observable(name);
this.operation=ko.observable(operation);
this.resource=ko.observable(resource);
@ -29,7 +29,7 @@ $(function() {
* @param data Permission response from redback rest api
*/
mapPermission=function(data) {
return new permission(data.name,
return new Permission(data.name,
data.operation?mapOperation(data.operation):null,
data.resource?mapResource(data.resource):null);
}

View File

@ -19,7 +19,7 @@
$(function() {
resource=function(identifier,pattern) {
Resource=function(identifier,pattern) {
this.identifier=ko.observable(identifier);
this.pattern=ko.observable(pattern);
}
@ -28,7 +28,7 @@ $(function() {
* @param data Resource response from redback rest api
*/
mapResource=function(data) {
return new resource(data.identifier,data.pattern);
return new Resource(data.identifier,data.pattern);
}

View File

@ -33,7 +33,7 @@ $(function() {
* @param passwordChangeRequired
* @param ownerViewModel
*/
user=function(username, password, confirmPassword,fullName,email,permanent,validated,timestampAccountCreation,timestampLastLogin,timestampLastPasswordChange,locked,passwordChangeRequired,ownerViewModel) {
User=function(username, password, confirmPassword,fullName,email,permanent,validated,timestampAccountCreation,timestampLastLogin,timestampLastPasswordChange,locked,passwordChangeRequired,ownerViewModel) {
// Potentially Editable Field.
this.username = ko.observable(username);
// Editable Fields.
@ -206,8 +206,8 @@ $(function() {
/**
* view for admin user creation
*/
adminUserViewModel=function() {
this.user = new user("admin","","", "the administrator");
AdminUserViewModel=function() {
this.user = new User("admin","","", "the administrator");
}
/**
@ -216,7 +216,7 @@ $(function() {
adminCreateBox=function() {
window.redbackModel.createUser=true;
jQuery("#main-content").attr("data-bind",'template: {name:"redback/user-edit-tmpl",data: user}');
var viewModel = new adminUserViewModel();
var viewModel = new AdminUserViewModel();
ko.applyBindings(viewModel);
$("#user-create").validate({
rules: {
@ -549,7 +549,7 @@ $(function() {
* @param data User response from redback rest api
*/
mapUser=function(data) {
return new user(data.username, data.password, null,data.fullName,data.email,data.permanent,data.validated,data.timestampAccountCreation,data.timestampLastLogin,data.timestampLastPasswordChange,data.locked,data.passwordChangeRequired,self);
return new User(data.username, data.password, null,data.fullName,data.email,data.permanent,data.validated,data.timestampAccountCreation,data.timestampLastLogin,data.timestampLastPasswordChange,data.locked,data.passwordChangeRequired,self);
}