Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Adjusted layout of user_info controls to show error messages

  • Loading branch information...
commit 9b4f77a919761fd858b81d96dce29e5b4c5f88c5 1 parent 7c73460
authored May 21, 2011

Showing 1 changed file with 10 additions and 10 deletions. Show diff stats Hide diff stats

  1. 20  apps/tasks/views/user_information.js
20  apps/tasks/views/user_information.js
@@ -36,7 +36,7 @@ Tasks.UserInformationView = SC.View.extend(
36 36
     }));
37 37
     childViews.push(this.fullNameLabel);
38 38
     this.fullNameField = this.createChildView(SC.TextFieldView.design({
39  
-      layout: { top: 10, left: 90, height: 20, width: 300 },
  39
+      layout: { top: 10, left: 90, height: 20, right: 60 },
40 40
       hint: "_FirstnameLastname".loc(),
41 41
       valueBinding: SC.binding('*content.name', this).toLocale()
42 42
     }));
@@ -49,7 +49,7 @@ Tasks.UserInformationView = SC.View.extend(
49 49
     }));
50 50
     childViews.push(this.loginNameLabel);
51 51
     this.loginNameField = this.createChildView(SC.TextFieldView.design({
52  
-      layout: { top: 42, left: 90, height: 20, width: 300 },
  52
+      layout: { top: 42, left: 90, height: 20, right: 60 },
53 53
       hint: "_Initials".loc(),
54 54
       valueBinding: SC.binding('*content.loginNameValue', this).toLocale(),
55 55
       keyUp: function(evt) {
@@ -61,7 +61,7 @@ Tasks.UserInformationView = SC.View.extend(
61 61
     }));
62 62
     childViews.push(this.loginNameField);
63 63
     this.loginNameErrorMessageLabel = this.createChildView(SC.LabelView.design({
64  
-      layout: { top: 42, left: 395, height: 20, width: 45 },
  64
+      layout: { top: 42, right: 10, height: 20, width: 45 },
65 65
       classNames: ['error-message'],
66 66
       valueBinding: SC.Binding.oneWay('Tasks.userController.loginNameErrorMessage')
67 67
     }));
@@ -75,7 +75,7 @@ Tasks.UserInformationView = SC.View.extend(
75 75
     }));
76 76
     childViews.push(this.passwordLabel);
77 77
     this.passwordField = this.createChildView(SC.TextFieldView.design({
78  
-      layout: { top: 74, left: 90, height: 20, width: 300 },
  78
+      layout: { top: 74, left: 90, height: 20, right: 60 },
79 79
       isPassword: YES,
80 80
       hint: "_PasswordHint".loc(),
81 81
       isPassword: YES,
@@ -91,7 +91,7 @@ Tasks.UserInformationView = SC.View.extend(
91 91
     }));
92 92
     childViews.push(this.emailLabel);
93 93
     this.emailField = this.createChildView(SC.TextFieldView.design(SC.Validatable,{
94  
-      layout: { top: 106, left: 90, height: 20, width: 300 },
  94
+      layout: { top: 106, left: 90, height: 20, right: 60 },
95 95
       errorLabel: "_InvalidEmailAddress".loc(),
96 96
       hint: "_EmailAddress".loc(),
97 97
       valueBinding: SC.binding('*content.email', this).toLocale(),
@@ -104,7 +104,7 @@ Tasks.UserInformationView = SC.View.extend(
104 104
     }));
105 105
     childViews.push(this.emailField);
106 106
     this.emailErrorMessageLabel = this.createChildView(SC.LabelView.design({
107  
-      layout: { top: 106, left: 395, height: 20, width: 45 },
  107
+      layout: { top: 106, right: 10, height: 20, width: 45 },
108 108
       classNames: ['error-message'],
109 109
       valueBinding: SC.Binding.oneWay('Tasks.userController.emailErrorMessage')
110 110
     }));
@@ -134,17 +134,17 @@ Tasks.UserInformationView = SC.View.extend(
134 134
     childViews.push(this.gravatarImage);
135 135
 
136 136
     this.roleLabel = this.createChildView(SC.LabelView.design({
137  
-      layout: { top: 162, left: 108, width: 85, height: 18 },
  137
+      layout: { top: 162, right: 165, width: 85, height: 18 },
138 138
       textAlign: SC.ALIGN_RIGHT,
139  
-      // isVisibleBinding: 'CoreTasks.permissions.canUpdateUserRole',
  139
+      isVisibleBinding: 'CoreTasks.permissions.canUpdateUserRole',
140 140
       value: "_Role:".loc()
141 141
     }));
142 142
     childViews.push(this.roleLabel);
143 143
     this.roleField = this.createChildView(SC.SelectButtonView.design({
144  
-      layout: { top: 159, left: 198, height: 24, width: 130 },
  144
+      layout: { top: 159, right: 60, height: 24, width: 130 },
145 145
       classNames: ['square'],
146 146
       localize: YES,
147  
-      isEnabledBinding: 'Tasks.userController.canUpdateUserRole',
  147
+      isVisibleBinding: 'Tasks.userController.canUpdateUserRole',
148 148
       objects: this.roles(),
149 149
       nameKey: 'name',
150 150
       valueKey: 'value',

0 notes on commit 9b4f77a

Please sign in to comment.
Something went wrong with that request. Please try again.