]> source.dussan.org Git - archiva.git/commitdiff
use a more standard naming uppercase start for js 'beans'
authorOlivier Lamy <olamy@apache.org>
Thu, 5 Jan 2012 23:19:37 +0000 (23:19 +0000)
committerOlivier Lamy <olamy@apache.org>
Thu, 5 Jan 2012 23:19:37 +0000 (23:19 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1227889 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/operation.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/permission.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/resource.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js

index 9f31787ba28069d75271fbe0eeb2967cac8c1070..4ae29db611bd7218fd3051587e2f0962de063538 100644 (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);
   }
 
 
index cc3da08443f865fc0367f6879f9761b80f5c2479..7c668448d2fb55e88ad5206c620abba55f12dc0a 100644 (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);
   }
index 9fd19c3e2fac9995810875edea620a98d7e68b0d..11bdd309ac1fb0c01ab0ceda52712560ede1a559 100644 (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);
   }
 
 
index db46428f2ec1eebbf5d427a247e4e487c92f8797..c2d7d5ac527de2ff37c66238a6adbbd4bc3533ce 100644 (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);
   }