Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 20c658c

Browse files
author
vikasrohit
committedSep 23, 2015
Merge pull request #202 from appirio-tech/feature/vikas-sup-1534-prevent-multiple-clicks
SUP-1534, Handle double-click scenario for registration page.
2 parents 3c6ad4b + 9303e7d commit 20c658c

File tree

6 files changed

+24
-8
lines changed

6 files changed

+24
-8
lines changed
 

‎app/account/register/register.controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
// Set default for toggle password directive
1515
vm.defaultPlaceholder = 'Create Password';
16-
vm.busyDisabled = true;
16+
vm.busyMessage = CONSTANTS.BUSY_PROGRESS_MESSAGE;
1717

1818
// lookup users country
1919
Helpers.getCountyObjFromIP()

‎app/account/register/register.jade

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@
7777

7878
p(ng-class="{ 'has-symbol-or-number': (vm.registerForm.password.$dirty && !vm.registerForm.password.$error.hasSymbolOrNumber) }") At least one number or symbol
7979

80-
button(type="submit", ng-disabled="vm.registerForm.$invalid", ng-class="{'enabled-button': vm.registerForm.$valid}") Join Now
81-
//- busy-message
82-
//- i.fa.fa-spinner Processing...
80+
button(type="submit", busy, busy-disabled="true", ng-disabled="vm.registerForm.$invalid", ng-class="{'enabled-button': vm.registerForm.$valid}") Join Now
81+
busy-message
82+
i.fa.fa-spinner(ng-bind="vm.busyMessage")
8383

8484
section.terms
8585
p By clicking "JOIN NOW" you agree to Topcoder's

‎app/topcoder.constants.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ angular.module("CONSTANTS", [])
2727
"EVENT_PROFILE_UPDATED": "profile_updated",
2828
"STATE_LOADING": "loading",
2929
"STATE_ERROR": "error",
30-
"STATE_READY": "ready"
30+
"STATE_READY": "ready",
31+
"BUSY_PROGRESS_MESSAGE": "Processing.."
3132
})
3233

3334
;

‎assets/css/account/account.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@
4444
&.enabled-button {
4545
@include ui-enabled-button;
4646
}
47+
48+
&[disabled] {
49+
@include ui-disabled-button;
50+
}
4751
}
4852

4953
// Form stylings

‎assets/css/partials/_mixins.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,11 @@
294294
cursor: pointer;
295295
}
296296

297+
@mixin ui-disabled-button {
298+
background-color: $ui-disabled-button-blue;
299+
cursor: default;
300+
}
301+
297302
@mixin ui-track-button {
298303
border: 2px solid $ui-enabled-button-blue;
299304
color: $ui-enabled-button-blue;

‎config.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ module.exports = function() {
3232

3333
STATE_LOADING: 'loading',
3434
STATE_ERROR: 'error',
35-
STATE_READY: 'ready'
35+
STATE_READY: 'ready',
36+
37+
BUSY_PROGRESS_MESSAGE : 'Processing..'
3638

3739
}
3840
},
@@ -68,7 +70,9 @@ module.exports = function() {
6870

6971
STATE_LOADING: 'loading',
7072
STATE_ERROR: 'error',
71-
STATE_READY: 'ready'
73+
STATE_READY: 'ready',
74+
75+
BUSY_PROGRESS_MESSAGE : 'Processing..'
7276

7377
}
7478
},
@@ -104,7 +108,9 @@ module.exports = function() {
104108

105109
STATE_LOADING: 'loading',
106110
STATE_ERROR: 'error',
107-
STATE_READY: 'ready'
111+
STATE_READY: 'ready',
112+
113+
BUSY_PROGRESS_MESSAGE : 'Processing..'
108114

109115
}
110116
}

0 commit comments

Comments
 (0)
This repository has been archived.