Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
e6c3644b
Commit
e6c3644b
authored
Apr 11, 2015
by
Usman Khalid
Committed by
Andy Armstrong
Apr 17, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Quality fixes.
parent
3110cf6b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
17 deletions
+15
-17
lms/static/js/student_account/models/user_account_model.js
+2
-2
lms/static/js/student_account/models/user_preferences_model.js
+1
-1
lms/static/js/student_account/views/account_settings_factory.js
+5
-5
lms/static/js/student_account/views/account_settings_fields.js
+5
-7
lms/static/js/student_account/views/account_settings_view.js
+1
-1
lms/static/js/views/fields.js
+1
-1
No files found.
lms/static/js/student_account/models/user_account_model.js
View file @
e6c3644b
;(
function
(
define
,
undefined
)
{
'use strict'
;
define
([
'gettext'
,
'underscore'
,
'backbone'
,
'gettext'
,
'underscore'
,
'backbone'
],
function
(
gettext
,
_
,
Backbone
)
{
var
UserAccountModel
=
Backbone
.
Model
.
extend
({
...
...
@@ -25,7 +25,7 @@
default_public_account_fields
:
[]
},
parse
:
function
(
response
,
xhr
)
{
parse
:
function
(
response
)
{
if
(
_
.
isNull
(
response
))
{
return
{};
}
...
...
lms/static/js/student_account/models/user_preferences_model.js
View file @
e6c3644b
;(
function
(
define
,
undefined
)
{
'use strict'
;
define
([
'gettext'
,
'underscore'
,
'backbone'
,
'gettext'
,
'underscore'
,
'backbone'
],
function
(
gettext
,
_
,
Backbone
)
{
var
UserPreferencesModel
=
Backbone
.
Model
.
extend
({
...
...
lms/static/js/student_account/views/account_settings_factory.js
View file @
e6c3644b
...
...
@@ -6,7 +6,7 @@
'js/student_account/models/user_account_model'
,
'js/student_account/models/user_preferences_model'
,
'js/student_account/views/account_settings_fields'
,
'js/student_account/views/account_settings_view'
,
'js/student_account/views/account_settings_view'
],
function
(
gettext
,
$
,
_
,
Backbone
,
FieldViews
,
UserAccountModel
,
UserPreferencesModel
,
AccountSettingsFieldViews
,
AccountSettingsView
)
{
...
...
@@ -116,7 +116,7 @@
})
}
]
}
,
}
];
if
(
_
.
isArray
(
authData
.
providers
))
{
...
...
@@ -145,14 +145,14 @@
accountSettingsView
.
render
();
var
showLoadingError
=
function
(
model
,
response
,
options
)
{
var
showLoadingError
=
function
()
{
accountSettingsView
.
showLoadingError
();
};
userAccountModel
.
fetch
({
success
:
function
(
model
,
response
,
options
)
{
success
:
function
()
{
userPreferencesModel
.
fetch
({
success
:
function
(
model
,
response
,
options
)
{
success
:
function
()
{
accountSettingsView
.
renderFields
();
},
error
:
showLoadingError
...
...
lms/static/js/student_account/views/account_settings_fields.js
View file @
e6c3644b
...
...
@@ -4,8 +4,6 @@
'gettext'
,
'jquery'
,
'underscore'
,
'backbone'
,
'js/mustache'
,
'js/views/fields'
],
function
(
gettext
,
$
,
_
,
Backbone
,
RequireMustache
,
FieldViews
)
{
var
Mustache
=
window
.
Mustache
||
RequireMustache
;
var
AccountSettingsFieldViews
=
{};
AccountSettingsFieldViews
.
EmailFieldView
=
FieldViews
.
TextFieldView
.
extend
({
...
...
@@ -31,7 +29,7 @@
url
:
'/i18n/setlang/'
,
data
:
data
,
dataType
:
'html'
,
success
:
function
(
data
,
status
,
xhr
)
{
success
:
function
()
{
view
.
showSuccessMessage
();
},
error
:
function
(
xhr
,
status
,
error
)
{
...
...
@@ -65,7 +63,7 @@
type
:
'POST'
,
url
:
view
.
options
.
linkHref
,
data
:
data
,
success
:
function
(
data
,
status
,
xhr
)
{
success
:
function
()
{
view
.
showSuccessMessage
()
},
error
:
function
(
xhr
,
status
,
error
)
{
...
...
@@ -79,7 +77,7 @@
gettext
(
'We
\'
ve sent a message to {email_address}. Click the link in the message to reset your password.'
),
{
'email_address'
:
this
.
model
.
get
(
this
.
options
.
emailAttribute
)}
);
}
,
}
});
AccountSettingsFieldViews
.
LanguageProficienciesFieldView
=
FieldViews
.
DropdownFieldView
.
extend
({
...
...
@@ -149,7 +147,7 @@
url
:
this
.
options
.
disconnectUrl
,
data
:
data
,
dataType
:
'html'
,
success
:
function
(
data
,
status
,
xhr
)
{
success
:
function
()
{
view
.
options
.
connected
=
false
;
view
.
render
();
view
.
showSuccessMessage
();
...
...
@@ -166,7 +164,7 @@
successMessage
:
function
()
{
return
this
.
indicators
[
'success'
]
+
gettext
(
'Successfully unlinked.'
);
}
,
}
});
return
AccountSettingsFieldViews
;
...
...
lms/static/js/student_account/views/account_settings_view.js
View file @
e6c3644b
;(
function
(
define
,
undefined
)
{
'use strict'
;
define
([
'gettext'
,
'jquery'
,
'underscore'
,
'backbone'
,
'gettext'
,
'jquery'
,
'underscore'
,
'backbone'
],
function
(
gettext
,
$
,
_
,
Backbone
)
{
var
AccountSettingsView
=
Backbone
.
View
.
extend
({
...
...
lms/static/js/views/fields.js
View file @
e6c3644b
...
...
@@ -485,7 +485,7 @@
title
:
this
.
options
.
title
,
linkTitle
:
this
.
options
.
linkTitle
,
linkHref
:
this
.
options
.
linkHref
,
message
:
this
.
helpMessage
,
message
:
this
.
helpMessage
}));
return
this
;
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment