Skip to content

Commit 56663c2

Browse files
committed
Add additional line breaks to comply with Share Extras coding conventions
1 parent 80005f8 commit 56663c2

File tree

1 file changed

+35
-21
lines changed

1 file changed

+35
-21
lines changed

source/web/extras/components/guest/custom-guest-reset-password.js

Lines changed: 35 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,68 +4,82 @@
44
* @namespace Extras
55
* @class ResetPasswordDialog
66
*/
7-
if (typeof Extras === undefined || !Extras) {
7+
if (typeof Extras === undefined || !Extras)
8+
{
89
var Extras = {};
910
}
1011

11-
(function () {
12+
(function ()
13+
{
1214
// Define constructor...
13-
Extras.ResetPasswordDialog = function RPD_constructor(htmlId) {
15+
Extras.ResetPasswordDialog = function RPD_constructor(htmlId)
16+
{
1417
Extras.ResetPasswordDialog.superclass.constructor.call(this, "Extras.ResetPasswordDialog", htmlId, ["button", "container"]);
1518
return this;
1619
};
1720

1821
// Extend default Base component...
19-
YAHOO.extend(Extras.ResetPasswordDialog, Alfresco.component.Base, {
20-
22+
YAHOO.extend(Extras.ResetPasswordDialog, Alfresco.component.Base,
23+
{
2124
resetPasswordDialog: null,
2225

23-
onReady: function RPD_onReady() {
26+
onReady: function RPD_onReady()
27+
{
2428
// .. hook up or lost password link event handler code
25-
YAHOO.util.Event.addListener(this.id + "-link", "click", function (e) {
29+
YAHOO.util.Event.addListener(this.id + "-link", "click", function (e)
30+
{
2631
var actionUrl = Alfresco.constants.PROXY_URI_RELATIVE.replace("/alfresco/", "/alfresco-noauth/") + "extras/modules/reset-user-password";
2732
YAHOO.util.Event.stopEvent(e);
28-
if (!this.resetPasswordDialog) {
29-
this.resetPasswordDialog = new Alfresco.module.SimpleDialog("resetPasswordDialog").setOptions({
33+
if (!this.resetPasswordDialog)
34+
{
35+
this.resetPasswordDialog = new Alfresco.module.SimpleDialog("resetPasswordDialog").setOptions(
36+
{
3037
width: "30em",
3138
templateUrl: Alfresco.constants.URL_SERVICECONTEXT + "extras/modules/reset-password-dialog",
3239
actionUrl: actionUrl,
33-
34-
onSuccess: {
35-
fn: function resetPasswordDialog_successCallback(response) {
40+
onSuccess:
41+
{
42+
fn: function resetPasswordDialog_successCallback(response)
43+
{
3644
Alfresco.util.PopupManager.displayMessage({
3745
text: Alfresco.util.message("message.passwordSent")
3846
});
3947
},
4048
scope: this
4149
},
42-
43-
onFailure: {
44-
fn: function resetPasswordDialog_failCallback(response) {
50+
onFailure:
51+
{
52+
fn: function resetPasswordDialog_failCallback(response)
53+
{
4554
var errorText = (response.json && response.json.message) ? response.json.message : Alfresco.util.message("message.unknownError"),
4655
errorTitle = (response.json && response.json.status && response.json.status.name) ? response.json.status.name : Alfresco.util.message("message.unknownErrorTitle");
4756

48-
Alfresco.util.PopupManager.displayPrompt({
57+
Alfresco.util.PopupManager.displayPrompt(
58+
{
4959
title: errorTitle,
5060
text: errorText
5161
});
5262
},
5363
scope: this
5464
},
55-
56-
doSetupFormsValidation: {
65+
doSetupFormsValidation:
66+
{
5767
fn: function resetPasswordDialog_doSetupForm_callback(form) {},
5868
scope: this
5969
}
6070
});
61-
} else {
62-
this.resetPasswordDialog.setOptions({
71+
}
72+
else
73+
{
74+
this.resetPasswordDialog.setOptions(
75+
{
6376
actionUrl: actionUrl
6477
});
6578
}
6679

6780
this.resetPasswordDialog.show();
68-
},null, this);
81+
82+
}, null, this);
6983
}
7084

7185
});

0 commit comments

Comments
 (0)