ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject [14/51] [abbrv] ignite git commit: IGNITE-3356 Fixed save user password on sign up and profile.
Date Fri, 01 Jul 2016 07:18:01 GMT
IGNITE-3356 Fixed save user password on sign up and profile.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/8db080b7
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/8db080b7
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/8db080b7

Branch: refs/heads/ignite-3262
Commit: 8db080b78bd9f466e603c7f32ee47ae9046cc728
Parents: 541e17d
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Tue Jun 28 11:13:32 2016 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Tue Jun 28 11:13:32 2016 +0700

----------------------------------------------------------------------
 .../main/js/controllers/profile-controller.js   |  5 +--
 .../src/main/js/views/settings/profile.jade     | 12 +++----
 .../web-console/src/main/js/views/signin.jade   | 38 ++++++++++----------
 3 files changed, 28 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/8db080b7/modules/web-console/src/main/js/controllers/profile-controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/controllers/profile-controller.js b/modules/web-console/src/main/js/controllers/profile-controller.js
index 39457af..8fe14cc 100644
--- a/modules/web-console/src/main/js/controllers/profile-controller.js
+++ b/modules/web-console/src/main/js/controllers/profile-controller.js
@@ -53,9 +53,10 @@ consoleModule.controller('profileController', [
         $scope.togglePassword = () => {
             $scope.expandedPassword = !$scope.expandedPassword;
 
-            if (!$scope.expandedPassword) {
+            if ($scope.expandedPassword)
+                $focus('profile_password');
+            else {
                 delete $scope.user.password;
-
                 delete $scope.user.confirm;
             }
         };

http://git-wip-us.apache.org/repos/asf/ignite/blob/8db080b7/modules/web-console/src/main/js/views/settings/profile.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/views/settings/profile.jade b/modules/web-console/src/main/js/views/settings/profile.jade
index 53991b3..c16232f 100644
--- a/modules/web-console/src/main/js/views/settings/profile.jade
+++ b/modules/web-console/src/main/js/views/settings/profile.jade
@@ -28,19 +28,19 @@ mixin lbl(txt)
                     .details-row
                         +lbl('First name:')
                         .col-xs-5.col-sm-4
-                            input#profile-firstname.form-control(type='text' ng-model='user.firstName'
placeholder='Input first name' required auto-focus)
+                            input#profile-firstname.form-control(enter-focus-next='profile-lastname'
type='text' ng-model='user.firstName' placeholder='Input first name' required auto-focus)
                     .details-row
                         +lbl('Last name:')
                         .col-xs-5.col-sm-4
-                            input#profile-lastname.form-control(type='text' ng-model='user.lastName'
placeholder='Input last name' required)
+                            input#profile-lastname.form-control(enter-focus-next='profile-email'
type='text' ng-model='user.lastName' placeholder='Input last name' required)
                     .details-row
                         +lbl('Email:')
                         .col-xs-5.col-sm-4
-                            input#profile-email.form-control(type='email' ng-model='user.email'
placeholder='Input email' required)
+                            input#profile-email.form-control(enter-focus-next='profile-company'
type='email' ng-model='user.email' placeholder='Input email' required)
                     .details-row
                         +lbl('Company:')
                         .col-xs-5.col-sm-4
-                            input#profile-company.form-control(type='text' ng-model='user.company'
placeholder='Input company name' required)
+                            input#profile-company.form-control(enter-focus-next='profile-country'
type='text' ng-model='user.company' placeholder='Input company name' required)
                     .details-row
                         +lbl('Country:')
                         .col-xs-5.col-sm-4
@@ -67,10 +67,10 @@ mixin lbl(txt)
                             .details-row
                                 +lbl('New password:')
                                 .col-xs-5.col-sm-4
-                                    input.form-control(type='password' ng-model='user.password'
placeholder='New password')
+                                    input#profile_password.form-control(enter-focus-next='profile_confirm'
type='password' ng-model='user.password' placeholder='New password')
                             .details-row
                                 +lbl('Confirm:')
                                 .col-xs-5.col-sm-4
-                                    input.form-control(type='password' ng-model='user.confirm'
match='user.password' placeholder='Confirm new password')
+                                    input#profile_confirm.form-control(type='password' ng-model='user.confirm'
match='user.password' placeholder='Confirm new password')
                 .col-xs-12.col-sm-12.details-row
                     a.btn.btn-primary(ng-disabled='!profileCouldBeSaved()' ng-click='profileCouldBeSaved()
&& saveUser()' bs-tooltip='' data-title='{{saveBtnTipText()}}' data-placement='bottom'
data-trigger='hover') Save

http://git-wip-us.apache.org/repos/asf/ignite/blob/8db080b7/modules/web-console/src/main/js/views/signin.jade
----------------------------------------------------------------------
diff --git a/modules/web-console/src/main/js/views/signin.jade b/modules/web-console/src/main/js/views/signin.jade
index 73a07e7..47dadc8 100644
--- a/modules/web-console/src/main/js/views/signin.jade
+++ b/modules/web-console/src/main/js/views/signin.jade
@@ -41,6 +41,22 @@ header#header.header
                             .settings-row
                                 p.col-xs-12.col-md-11(ng-show='action == "password/forgot"')
                                     | That's ok! Simply enter your email below and a reset
password link will be sent to you via email. You can then follow that link and select a new
password.
+                            .settings-row(ng-show='action == "signin"')
+                                +lblRequired('Email:')
+                                .col-xs-9.col-md-8
+                                    input#signin_email.form-control(enter-focus-next='user_password'
type='email' ng-model='ui.email' placeholder='Input email' required)
+                            .settings-row(ng-show='action == "signup"')
+                                +lblRequired('Email:')
+                                .col-xs-9.col-md-8
+                                    input#signup_email.form-control(enter-focus-next='user_password'
type='email' ng-model='ui.email' placeholder='Input email' required)
+                            .settings-row(ng-show='action != "password/forgot"')
+                                +lblRequired('Password:')
+                                .col-xs-9.col-md-8
+                                    input#user_password.form-control(enter-focus-next='user_confirm'
type='password' ng-model='ui.password' placeholder='Password' ng-required='action != "password/forgot"'
on-enter='action == "signin" && form.$valid && auth(action, ui)')
+                            .settings-row(ng-if='action == "signup"')
+                                +lblRequired('Confirm:')
+                                .col-xs-9.col-md-8
+                                    input#user_confirm.form-control(enter-focus-next='first_name'
type='password' ng-model='ui_exclude.confirm' match='ui.password' placeholder='Confirm password'
ng-required='action == "signup"')
                             .settings-row(ng-show='action == "signup"')
                                 +lblRequired('First Name:')
                                 .col-xs-9.col-md-8
@@ -48,35 +64,19 @@ header#header.header
                             .settings-row(ng-show='action == "signup"')
                                 +lblRequired('Last Name:')
                                 .col-xs-9.col-md-8
-                                    input#last_name.form-control(enter-focus-next='signup_email'
type='text' ng-model='ui.lastName' placeholder='Input last name' ng-required='action=="signup"')
+                                    input#last_name.form-control(enter-focus-next='company'
type='text' ng-model='ui.lastName' placeholder='Input last name' ng-required='action=="signup"')
                             .settings-row(ng-show='action == "password/forgot"')
                                 +lblRequired('Email:')
                                 .col-xs-9.col-md-8
                                     input#forgot_email.form-control(on-enter='form.$valid
&& forgotPassword(ui)' type='email' ng-model='ui.email' placeholder='Input email'
required)
-                            .settings-row(ng-show='action == "signin"')
-                                +lblRequired('Email:')
-                                .col-xs-9.col-md-8
-                                    input#signin_email.form-control(enter-focus-next='user_password'
type='email' ng-model='ui.email' placeholder='Input email' required)
-                            .settings-row(ng-show='action == "signup"')
-                                +lblRequired('Email:')
-                                .col-xs-9.col-md-8
-                                    input#signup_email.form-control(enter-focus-next='company'
type='email' ng-model='ui.email' placeholder='Input email' required)
                             .settings-row(ng-show='action == "signup"')
                                 +lblRequired('Company:')
                                 .col-xs-9.col-md-8
-                                    input#company.form-control(enter-focus-next='country'
type='search' ng-model='ui.company' placeholder='Input company name' ng-required='action=="signup"')
+                                    input#company.form-control(enter-focus-next='country'
type='text' ng-model='ui.company' placeholder='Input company name' ng-required='action=="signup"')
                             .settings-row(ng-show='action == "signup"')
                                 +lblRequired('Country:')
                                 .col-xs-9.col-md-8
-                                    button#country.select-toggle.form-control(bs-select bs-options='item.name
as item.name for item in countries' enter-focus-next='user_password' type='search' ng-model='ui.country'
placeholder='Choose your country' ng-required='action=="signup"')
-                            .settings-row(ng-show='action != "password/forgot"')
-                                +lblRequired('Password:')
-                                .col-xs-9.col-md-8
-                                    input#user_password.form-control(enter-focus-next='user_confirm'
type='password' ng-model='ui.password' placeholder='Password' ng-required='action != "password/forgot"'
on-enter='action == "signin" && form.$valid && auth(action, ui)')
-                            .settings-row(ng-if='action == "signup"')
-                                +lblRequired('Confirm:')
-                                .col-xs-9.col-md-8
-                                    input#user_confirm.form-control(type='password' ng-model='ui_exclude.confirm'
match='ui.password' placeholder='Confirm password' ng-required='action == "signup"' on-enter='form.$valid
&& auth(action, ui)')
+                                    button#country.select-toggle.form-control(enter-focus-next='signup'
bs-select bs-options='item.name as item.name for item in countries' type='text' ng-model='ui.country'
placeholder='Choose your country' ng-required='action=="signup"')
                             .settings-row(ignite-terms)
                                 .col-md-offset-3(ng-if='action == "signup" && terms.termsState')
                                     label


Mime
View raw message