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
762a6657
Commit
762a6657
authored
Apr 19, 2016
by
muhammad-ammar
Committed by
Clinton Blackburn
May 02, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LMS fixes required to upgrade BackboneJS
parent
eed09cc0
Hide whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
85 additions
and
29 deletions
+85
-29
cms/static/coffee/src/views/tabs.coffee
+4
-4
cms/static/js/views/video/transcripts/file_uploader.js
+2
-2
cms/static/js/views/video/transcripts/message_manager.js
+3
-1
cms/static/js/views/video/transcripts/metadata_videolist.js
+2
-1
cms/static/karma_cms.conf.js
+1
-1
cms/static/karma_cms_squire.conf.js
+1
-1
common/lib/xmodule/xmodule/js/karma_xmodule.conf.js
+1
-1
common/static/karma_common.conf.js
+1
-1
common/static/karma_common_requirejs.conf.js
+1
-1
lms/djangoapps/teams/static/teams/js/collections/base.js
+2
-0
lms/djangoapps/teams/static/teams/js/collections/my_teams.js
+1
-0
lms/djangoapps/teams/static/teams/js/collections/team.js
+1
-0
lms/djangoapps/teams/static/teams/js/collections/team_membership.js
+1
-0
lms/djangoapps/teams/static/teams/js/collections/topic.js
+1
-0
lms/djangoapps/teams/static/teams/js/views/edit_team_members.js
+1
-0
lms/djangoapps/teams/static/teams/js/views/topic_teams.js
+1
-0
lms/djangoapps/teams/static/teams/js/views/topics.js
+1
-0
lms/static/js/certificates/collections/certificate_invalidation_collection.js
+5
-1
lms/static/js/certificates/collections/certificate_whitelist.js
+1
-0
lms/static/js/certificates/models/certificate_invalidation.js
+2
-2
lms/static/js/certificates/views/certificate_invalidation_view.js
+9
-5
lms/static/js/edxnotes/collections/notes.js
+1
-0
lms/static/js/edxnotes/views/note_group.js
+4
-2
lms/static/js/edxnotes/views/note_item.js
+1
-0
lms/static/js/edxnotes/views/tab_panel.js
+2
-1
lms/static/js/edxnotes/views/tabs/search_results.js
+1
-0
lms/static/js/edxnotes/views/tabs/tags.js
+1
-0
lms/static/js/spec/instructor_dashboard/certificates_invalidation_spec.js
+4
-2
lms/static/js/spec/search/search_spec.js
+9
-0
lms/static/js/student_account/views/account_settings_fields.js
+2
-0
lms/static/js/student_account/views/account_settings_view.js
+2
-1
lms/static/js/student_profile/views/badge_view.js
+1
-0
lms/static/js/student_profile/views/learner_profile_view.js
+2
-1
lms/static/js/student_profile/views/section_two_tab.js
+3
-0
lms/static/js/student_profile/views/share_modal_view.js
+3
-0
lms/static/js/views/fields.js
+5
-0
lms/static/js/views/image_field.js
+1
-0
lms/static/karma_lms.conf.js
+1
-1
No files found.
cms/static/coffee/src/views/tabs.coffee
View file @
762a6657
define
[
"jquery"
,
"jquery.ui"
,
"backbone"
,
"common/js/components/views/feedback_prompt"
,
define
[
"
underscore"
,
"
jquery"
,
"jquery.ui"
,
"backbone"
,
"common/js/components/views/feedback_prompt"
,
"common/js/components/views/feedback_notification"
,
"coffee/src/views/module_edit"
,
"js/models/module_info"
,
"js/utils/module"
],
"common/js/components/views/feedback_notification"
,
"coffee/src/views/module_edit"
,
"js/models/module_info"
,
"js/utils/module"
],
(
$
,
ui
,
Backbone
,
PromptView
,
NotificationView
,
ModuleEditView
,
ModuleModel
,
ModuleUtils
)
->
(
_
,
$
,
ui
,
Backbone
,
PromptView
,
NotificationView
,
ModuleEditView
,
ModuleModel
,
ModuleUtils
)
->
class
TabsEdit
extends
Backbone
.
View
class
TabsEdit
extends
Backbone
.
View
initialize
:
=>
initialize
:
(
options
)
=>
@
$
(
'.component'
).
each
((
idx
,
element
)
=>
@
$
(
'.component'
).
each
((
idx
,
element
)
=>
model
=
new
ModuleModel
({
model
=
new
ModuleModel
({
id
:
$
(
element
).
data
(
'locator'
)
id
:
$
(
element
).
data
(
'locator'
)
...
@@ -15,7 +15,7 @@ define ["jquery", "jquery.ui", "backbone", "common/js/components/views/feedback_
...
@@ -15,7 +15,7 @@ define ["jquery", "jquery.ui", "backbone", "common/js/components/views/feedback_
model
:
model
model
:
model
)
)
)
)
@
options
=
_
.
extend
({},
options
)
@
options
.
mast
.
find
(
'.new-tab'
).
on
(
'click'
,
@
addNewTab
)
@
options
.
mast
.
find
(
'.new-tab'
).
on
(
'click'
,
@
addNewTab
)
$
(
'.add-pages .new-tab'
).
on
(
'click'
,
@
addNewTab
)
$
(
'.add-pages .new-tab'
).
on
(
'click'
,
@
addNewTab
)
$
(
'.toggle-checkbox'
).
on
(
'click'
,
@
toggleVisibilityOfTab
)
$
(
'.toggle-checkbox'
).
on
(
'click'
,
@
toggleVisibilityOfTab
)
...
...
cms/static/js/views/video/transcripts/file_uploader.js
View file @
762a6657
...
@@ -17,11 +17,11 @@ function($, Backbone, _, Utils) {
...
@@ -17,11 +17,11 @@ function($, Backbone, _, Utils) {
uploadTpl
:
'#file-upload'
,
uploadTpl
:
'#file-upload'
,
initialize
:
function
()
{
initialize
:
function
(
options
)
{
_
.
bindAll
(
this
,
_
.
bindAll
(
this
,
'changeHandler'
,
'clickHandler'
,
'xhrResetProgressBar'
,
'xhrProgressHandler'
,
'xhrCompleteHandler'
'changeHandler'
,
'clickHandler'
,
'xhrResetProgressBar'
,
'xhrProgressHandler'
,
'xhrCompleteHandler'
);
);
this
.
options
=
_
.
extend
({},
options
);
this
.
file
=
false
;
this
.
file
=
false
;
this
.
render
();
this
.
render
();
},
},
...
...
cms/static/js/views/video/transcripts/message_manager.js
View file @
762a6657
...
@@ -28,11 +28,13 @@ function($, Backbone, _, Utils, FileUploader, gettext) {
...
@@ -28,11 +28,13 @@ function($, Backbone, _, Utils, FileUploader, gettext) {
choose
:
'#transcripts-choose'
choose
:
'#transcripts-choose'
},
},
initialize
:
function
()
{
initialize
:
function
(
options
)
{
_
.
bindAll
(
this
,
_
.
bindAll
(
this
,
'importHandler'
,
'replaceHandler'
,
'chooseHandler'
,
'useExistingHandler'
,
'showError'
,
'hideError'
'importHandler'
,
'replaceHandler'
,
'chooseHandler'
,
'useExistingHandler'
,
'showError'
,
'hideError'
);
);
this
.
options
=
_
.
extend
({},
options
);
this
.
component_locator
=
this
.
$el
.
closest
(
'[data-locator]'
).
data
(
'locator'
);
this
.
component_locator
=
this
.
$el
.
closest
(
'[data-locator]'
).
data
(
'locator'
);
this
.
fileUploader
=
new
FileUploader
({
this
.
fileUploader
=
new
FileUploader
({
...
...
cms/static/js/views/video/transcripts/metadata_videolist.js
View file @
762a6657
...
@@ -25,9 +25,10 @@ function($, Backbone, _, AbstractEditor, Utils, MessageManager) {
...
@@ -25,9 +25,10 @@ function($, Backbone, _, AbstractEditor, Utils, MessageManager) {
'youtube'
:
'http://youtube.com/'
'youtube'
:
'http://youtube.com/'
},
},
initialize
:
function
()
{
initialize
:
function
(
options
)
{
// Initialize MessageManager that is responsible for
// Initialize MessageManager that is responsible for
// status messages and errors.
// status messages and errors.
this
.
options
=
_
.
extend
({},
options
);
var
Messenger
=
this
.
options
.
MessageManager
||
MessageManager
;
var
Messenger
=
this
.
options
.
MessageManager
||
MessageManager
;
this
.
messenger
=
new
Messenger
({
this
.
messenger
=
new
Messenger
({
...
...
cms/static/karma_cms.conf.js
View file @
762a6657
...
@@ -35,7 +35,7 @@ var libraryFiles = [
...
@@ -35,7 +35,7 @@ var libraryFiles = [
{
pattern
:
'xmodule_js/common_static/js/vendor/jquery.simulate.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/jquery.simulate.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/common/js/vendor/underscore.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/common/js/vendor/underscore.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/common/js/vendor/underscore.string.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/common/js/vendor/underscore.string.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/backbone-min.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/
common/
js/vendor/backbone-min.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/backbone-associations-min.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/backbone-associations-min.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/backbone.paginator.min.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/backbone.paginator.min.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/backbone-relational.min.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/backbone-relational.min.js'
,
included
:
false
},
...
...
cms/static/karma_cms_squire.conf.js
View file @
762a6657
...
@@ -35,7 +35,7 @@ var libraryFiles = [
...
@@ -35,7 +35,7 @@ var libraryFiles = [
{
pattern
:
'xmodule_js/common_static/js/vendor/jquery.cookie.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/jquery.cookie.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/common/js/vendor/underscore.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/common/js/vendor/underscore.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/common/js/vendor/underscore.string.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/common/js/vendor/underscore.string.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/backbone-min.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/
common/
js/vendor/backbone-min.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/backbone-associations-min.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/backbone-associations-min.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/backbone.paginator.min.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/backbone.paginator.min.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/timepicker/jquery.timepicker.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/timepicker/jquery.timepicker.js'
,
included
:
false
},
...
...
common/lib/xmodule/xmodule/js/karma_xmodule.conf.js
View file @
762a6657
...
@@ -45,7 +45,7 @@ var libraryFiles = [
...
@@ -45,7 +45,7 @@ var libraryFiles = [
{
pattern
:
'common_static/js/vendor/jquery.cookie.js'
,
included
:
true
},
{
pattern
:
'common_static/js/vendor/jquery.cookie.js'
,
included
:
true
},
{
pattern
:
'common_static/js/vendor/json2.js'
,
included
:
true
},
{
pattern
:
'common_static/js/vendor/json2.js'
,
included
:
true
},
{
pattern
:
'common_static/common/js/vendor/underscore.js'
,
included
:
true
},
{
pattern
:
'common_static/common/js/vendor/underscore.js'
,
included
:
true
},
{
pattern
:
'common_static/js/vendor/backbone-min.js'
,
included
:
true
},
{
pattern
:
'common_static/
common/
js/vendor/backbone-min.js'
,
included
:
true
},
{
pattern
:
'common_static/js/vendor/jquery.leanModal.js'
,
included
:
true
},
{
pattern
:
'common_static/js/vendor/jquery.leanModal.js'
,
included
:
true
},
{
pattern
:
'common_static/js/vendor/CodeMirror/codemirror.js'
,
included
:
true
},
{
pattern
:
'common_static/js/vendor/CodeMirror/codemirror.js'
,
included
:
true
},
{
pattern
:
'common_static/js/vendor/tinymce/js/tinymce/jquery.tinymce.min.js'
,
included
:
true
},
{
pattern
:
'common_static/js/vendor/tinymce/js/tinymce/jquery.tinymce.min.js'
,
included
:
true
},
...
...
common/static/karma_common.conf.js
View file @
762a6657
...
@@ -39,7 +39,7 @@ var libraryFiles = [
...
@@ -39,7 +39,7 @@ var libraryFiles = [
{
pattern
:
'js/vendor/mustache.js'
,
included
:
true
},
{
pattern
:
'js/vendor/mustache.js'
,
included
:
true
},
{
pattern
:
'common/js/vendor/underscore.js'
,
included
:
true
},
{
pattern
:
'common/js/vendor/underscore.js'
,
included
:
true
},
{
pattern
:
'common/js/vendor/underscore.string.js'
,
included
:
true
},
{
pattern
:
'common/js/vendor/underscore.string.js'
,
included
:
true
},
{
pattern
:
'js/vendor/backbone-min.js'
,
included
:
true
},
{
pattern
:
'
common/
js/vendor/backbone-min.js'
,
included
:
true
},
{
pattern
:
'js/vendor/jquery.timeago.js'
,
included
:
true
},
{
pattern
:
'js/vendor/jquery.timeago.js'
,
included
:
true
},
{
pattern
:
'js/vendor/URI.min.js'
,
included
:
true
},
{
pattern
:
'js/vendor/URI.min.js'
,
included
:
true
},
{
pattern
:
'coffee/src/ajax_prefix.js'
,
included
:
true
},
{
pattern
:
'coffee/src/ajax_prefix.js'
,
included
:
true
},
...
...
common/static/karma_common_requirejs.conf.js
View file @
762a6657
...
@@ -37,7 +37,7 @@ var libraryFiles = [
...
@@ -37,7 +37,7 @@ var libraryFiles = [
{
pattern
:
'js/vendor/jquery.truncate.js'
,
included
:
false
},
{
pattern
:
'js/vendor/jquery.truncate.js'
,
included
:
false
},
{
pattern
:
'common/js/vendor/underscore.js'
,
included
:
false
},
{
pattern
:
'common/js/vendor/underscore.js'
,
included
:
false
},
{
pattern
:
'common/js/vendor/underscore.string.js'
,
included
:
false
},
{
pattern
:
'common/js/vendor/underscore.string.js'
,
included
:
false
},
{
pattern
:
'js/vendor/backbone-min.js'
,
included
:
false
},
{
pattern
:
'
common/
js/vendor/backbone-min.js'
,
included
:
false
},
{
pattern
:
'js/vendor/backbone.paginator.min.js'
,
included
:
false
},
{
pattern
:
'js/vendor/backbone.paginator.min.js'
,
included
:
false
},
{
pattern
:
'js/vendor/jquery.timeago.js'
,
included
:
false
},
{
pattern
:
'js/vendor/jquery.timeago.js'
,
included
:
false
},
{
pattern
:
'js/vendor/URI.min.js'
,
included
:
false
},
{
pattern
:
'js/vendor/URI.min.js'
,
included
:
false
},
...
...
lms/djangoapps/teams/static/teams/js/collections/base.js
View file @
762a6657
...
@@ -4,6 +4,8 @@
...
@@ -4,6 +4,8 @@
function
(
PagingCollection
)
{
function
(
PagingCollection
)
{
var
BaseCollection
=
PagingCollection
.
extend
({
var
BaseCollection
=
PagingCollection
.
extend
({
initialize
:
function
(
options
)
{
initialize
:
function
(
options
)
{
this
.
url
=
options
.
url
;
PagingCollection
.
prototype
.
initialize
.
call
(
this
);
PagingCollection
.
prototype
.
initialize
.
call
(
this
);
this
.
course_id
=
options
.
course_id
;
this
.
course_id
=
options
.
course_id
;
...
...
lms/djangoapps/teams/static/teams/js/collections/my_teams.js
View file @
762a6657
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
define
([
'teams/js/collections/team'
],
function
(
TeamCollection
)
{
define
([
'teams/js/collections/team'
],
function
(
TeamCollection
)
{
var
MyTeamsCollection
=
TeamCollection
.
extend
({
var
MyTeamsCollection
=
TeamCollection
.
extend
({
initialize
:
function
(
teams
,
options
)
{
initialize
:
function
(
teams
,
options
)
{
this
.
url
=
options
.
url
;
TeamCollection
.
prototype
.
initialize
.
call
(
this
,
teams
,
options
);
TeamCollection
.
prototype
.
initialize
.
call
(
this
,
teams
,
options
);
delete
this
.
server_api
.
topic_id
;
delete
this
.
server_api
.
topic_id
;
this
.
server_api
=
_
.
extend
(
this
.
server_api
,
{
this
.
server_api
=
_
.
extend
(
this
.
server_api
,
{
...
...
lms/djangoapps/teams/static/teams/js/collections/team.js
View file @
762a6657
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
sortField
:
'last_activity_at'
,
sortField
:
'last_activity_at'
,
initialize
:
function
(
teams
,
options
)
{
initialize
:
function
(
teams
,
options
)
{
this
.
url
=
options
.
url
;
var
self
=
this
;
var
self
=
this
;
BaseCollection
.
prototype
.
initialize
.
call
(
this
,
options
);
BaseCollection
.
prototype
.
initialize
.
call
(
this
,
options
);
...
...
lms/djangoapps/teams/static/teams/js/collections/team_membership.js
View file @
762a6657
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
function
(
BaseCollection
,
TeamMembershipModel
)
{
function
(
BaseCollection
,
TeamMembershipModel
)
{
var
TeamMembershipCollection
=
BaseCollection
.
extend
({
var
TeamMembershipCollection
=
BaseCollection
.
extend
({
initialize
:
function
(
team_memberships
,
options
)
{
initialize
:
function
(
team_memberships
,
options
)
{
this
.
url
=
options
.
url
;
var
self
=
this
;
var
self
=
this
;
BaseCollection
.
prototype
.
initialize
.
call
(
this
,
options
);
BaseCollection
.
prototype
.
initialize
.
call
(
this
,
options
);
...
...
lms/djangoapps/teams/static/teams/js/collections/topic.js
View file @
762a6657
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
function
(
_
,
gettext
,
BaseCollection
,
TopicModel
)
{
function
(
_
,
gettext
,
BaseCollection
,
TopicModel
)
{
var
TopicCollection
=
BaseCollection
.
extend
({
var
TopicCollection
=
BaseCollection
.
extend
({
initialize
:
function
(
topics
,
options
)
{
initialize
:
function
(
topics
,
options
)
{
var
self
=
this
;
var
self
=
this
;
BaseCollection
.
prototype
.
initialize
.
call
(
this
,
options
);
BaseCollection
.
prototype
.
initialize
.
call
(
this
,
options
);
...
...
lms/djangoapps/teams/static/teams/js/views/edit_team_members.js
View file @
762a6657
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
},
},
initialize
:
function
(
options
)
{
initialize
:
function
(
options
)
{
this
.
options
=
_
.
extend
({},
options
);
// The URL ends with team_id,request_username. We want to replace
// The URL ends with team_id,request_username. We want to replace
// the last occurrence of team_id with the actual team_id, and remove request_username
// the last occurrence of team_id with the actual team_id, and remove request_username
// as the actual user to be removed from the team will be added on before calling DELETE.
// as the actual user to be removed from the team will be added on before calling DELETE.
...
...
lms/djangoapps/teams/static/teams/js/views/topic_teams.js
View file @
762a6657
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
},
},
initialize
:
function
(
options
)
{
initialize
:
function
(
options
)
{
this
.
options
=
_
.
extend
({},
options
);
this
.
showSortControls
=
options
.
showSortControls
;
this
.
showSortControls
=
options
.
showSortControls
;
this
.
context
=
options
.
context
;
this
.
context
=
options
.
context
;
this
.
myTeamsCollection
=
options
.
myTeamsCollection
;
this
.
myTeamsCollection
=
options
.
myTeamsCollection
;
...
...
lms/djangoapps/teams/static/teams/js/views/topics.js
View file @
762a6657
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
},
},
initialize
:
function
(
options
)
{
initialize
:
function
(
options
)
{
this
.
options
=
_
.
extend
({},
options
);
this
.
itemViewClass
=
TopicCardView
.
extend
({
this
.
itemViewClass
=
TopicCardView
.
extend
({
router
:
options
.
router
,
router
:
options
.
router
,
srInfo
:
this
.
srInfo
srInfo
:
this
.
srInfo
...
...
lms/static/js/certificates/collections/certificate_invalidation_collection.js
View file @
762a6657
...
@@ -9,7 +9,11 @@
...
@@ -9,7 +9,11 @@
function
(
Backbone
,
CertificateInvalidation
)
{
function
(
Backbone
,
CertificateInvalidation
)
{
return
Backbone
.
Collection
.
extend
({
return
Backbone
.
Collection
.
extend
({
model
:
CertificateInvalidation
model
:
CertificateInvalidation
,
initialize
:
function
(
models
,
options
)
{
this
.
url
=
options
.
url
;
}
});
});
}
}
);
);
...
...
lms/static/js/certificates/collections/certificate_whitelist.js
View file @
762a6657
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
model
:
CertificateExceptionModel
,
model
:
CertificateExceptionModel
,
initialize
:
function
(
attrs
,
options
){
initialize
:
function
(
attrs
,
options
){
this
.
url
=
options
.
url
;
this
.
generate_certificates_url
=
options
.
generate_certificates_url
;
this
.
generate_certificates_url
=
options
.
generate_certificates_url
;
},
},
...
...
lms/static/js/certificates/models/certificate_invalidation.js
View file @
762a6657
...
@@ -19,8 +19,8 @@
...
@@ -19,8 +19,8 @@
notes
:
''
notes
:
''
},
},
url
:
function
(
)
{
initialize
:
function
(
attributes
,
options
)
{
return
this
.
get
(
'url'
)
;
this
.
url
=
options
.
url
;
},
},
validate
:
function
(
attrs
)
{
validate
:
function
(
attrs
)
{
...
...
lms/static/js/certificates/views/certificate_invalidation_view.js
View file @
762a6657
...
@@ -35,11 +35,15 @@
...
@@ -35,11 +35,15 @@
var
notes
=
this
.
$
(
"#certificate-invalidation-notes"
).
val
();
var
notes
=
this
.
$
(
"#certificate-invalidation-notes"
).
val
();
var
message
=
""
;
var
message
=
""
;
var
certificate_invalidation
=
new
CertificateInvalidationModel
({
var
certificate_invalidation
=
new
CertificateInvalidationModel
(
url
:
this
.
collection
.
url
,
{
user
:
user
,
user
:
user
,
notes
:
notes
notes
:
notes
});
},
{
url
:
this
.
collection
.
url
}
);
if
(
this
.
collection
.
findWhere
({
user
:
user
}))
{
if
(
this
.
collection
.
findWhere
({
user
:
user
}))
{
message
=
gettext
(
"Certificate of <%= user %> has already been invalidated. Please check your spelling and retry."
);
// jshint ignore:line
message
=
gettext
(
"Certificate of <%= user %> has already been invalidated. Please check your spelling and retry."
);
// jshint ignore:line
...
...
lms/static/js/edxnotes/collections/notes.js
View file @
762a6657
...
@@ -9,6 +9,7 @@ define([
...
@@ -9,6 +9,7 @@ define([
initialize
:
function
(
models
,
options
)
{
initialize
:
function
(
models
,
options
)
{
PagingCollection
.
prototype
.
initialize
.
call
(
this
);
PagingCollection
.
prototype
.
initialize
.
call
(
this
);
this
.
url
=
options
.
url
;
this
.
perPage
=
options
.
perPage
;
this
.
perPage
=
options
.
perPage
;
this
.
server_api
=
_
.
pick
(
this
.
server_api
,
"page"
,
"page_size"
);
this
.
server_api
=
_
.
pick
(
this
.
server_api
,
"page"
,
"page_size"
);
if
(
options
.
text
)
{
if
(
options
.
text
)
{
...
...
lms/static/js/edxnotes/views/note_group.js
View file @
762a6657
...
@@ -11,7 +11,8 @@ define([
...
@@ -11,7 +11,8 @@ define([
return
'note-section-'
+
_
.
uniqueId
();
return
'note-section-'
+
_
.
uniqueId
();
},
},
initialize
:
function
()
{
initialize
:
function
(
options
)
{
this
.
options
=
_
.
extend
({},
options
);
this
.
template
=
_
.
template
(
this
.
options
.
template
);
this
.
template
=
_
.
template
(
this
.
options
.
template
);
this
.
className
=
this
.
options
.
className
;
this
.
className
=
this
.
options
.
className
;
},
},
...
@@ -37,8 +38,9 @@ define([
...
@@ -37,8 +38,9 @@ define([
},
},
template
:
_
.
template
(
'<h3 class="course-title"><%- chapterName %></h3>'
),
template
:
_
.
template
(
'<h3 class="course-title"><%- chapterName %></h3>'
),
initialize
:
function
()
{
initialize
:
function
(
options
)
{
this
.
children
=
[];
this
.
children
=
[];
this
.
options
=
_
.
extend
({},
options
);
},
},
render
:
function
()
{
render
:
function
()
{
...
...
lms/static/js/edxnotes/views/note_item.js
View file @
762a6657
...
@@ -17,6 +17,7 @@ define([
...
@@ -17,6 +17,7 @@ define([
},
},
initialize
:
function
(
options
)
{
initialize
:
function
(
options
)
{
this
.
options
=
_
.
extend
({},
options
);
this
.
template
=
templateUtils
.
loadTemplate
(
'note-item'
);
this
.
template
=
templateUtils
.
loadTemplate
(
'note-item'
);
this
.
logger
=
NotesLogger
.
getLogger
(
'note_item'
,
options
.
debug
);
this
.
logger
=
NotesLogger
.
getLogger
(
'note_item'
,
options
.
debug
);
this
.
listenTo
(
this
.
model
,
'change:is_expanded'
,
this
.
render
);
this
.
listenTo
(
this
.
model
,
'change:is_expanded'
,
this
.
render
);
...
...
lms/static/js/edxnotes/views/tab_panel.js
View file @
762a6657
...
@@ -12,8 +12,9 @@ function (gettext, _, Backbone, NoteItemView, PagingHeaderView, PagingFooterView
...
@@ -12,8 +12,9 @@ function (gettext, _, Backbone, NoteItemView, PagingHeaderView, PagingFooterView
'tabindex'
:
-
1
'tabindex'
:
-
1
},
},
initialize
:
function
()
{
initialize
:
function
(
options
)
{
this
.
children
=
[];
this
.
children
=
[];
this
.
options
=
_
.
extend
({},
options
);
if
(
this
.
options
.
createHeaderFooter
)
{
if
(
this
.
options
.
createHeaderFooter
)
{
this
.
pagingHeaderView
=
new
PagingHeaderView
({
collection
:
this
.
collection
});
this
.
pagingHeaderView
=
new
PagingHeaderView
({
collection
:
this
.
collection
});
this
.
pagingFooterView
=
new
PagingFooterView
({
collection
:
this
.
collection
,
hideWhenOnePage
:
true
});
this
.
pagingFooterView
=
new
PagingFooterView
({
collection
:
this
.
collection
,
hideWhenOnePage
:
true
});
...
...
lms/static/js/edxnotes/views/tabs/search_results.js
View file @
762a6657
...
@@ -52,6 +52,7 @@ define([
...
@@ -52,6 +52,7 @@ define([
},
},
initialize
:
function
(
options
)
{
initialize
:
function
(
options
)
{
this
.
options
=
_
.
extend
({},
options
);
_
.
bindAll
(
this
,
'onBeforeSearchStart'
,
'onSearch'
,
'onSearchError'
);
_
.
bindAll
(
this
,
'onBeforeSearchStart'
,
'onSearch'
,
'onSearchError'
);
TabView
.
prototype
.
initialize
.
call
(
this
,
options
);
TabView
.
prototype
.
initialize
.
call
(
this
,
options
);
this
.
searchResults
=
null
;
this
.
searchResults
=
null
;
...
...
lms/static/js/edxnotes/views/tabs/tags.js
View file @
762a6657
...
@@ -24,6 +24,7 @@ define([
...
@@ -24,6 +24,7 @@ define([
},
},
initialize
:
function
(
options
)
{
initialize
:
function
(
options
)
{
this
.
options
=
_
.
extend
({},
options
);
TabView
.
prototype
.
initialize
.
call
(
this
,
options
);
TabView
.
prototype
.
initialize
.
call
(
this
,
options
);
_
.
bindAll
(
this
,
'scrollToTag'
);
_
.
bindAll
(
this
,
'scrollToTag'
);
this
.
options
.
scrollToTag
=
this
.
scrollToTag
;
this
.
options
.
scrollToTag
=
this
.
scrollToTag
;
...
...
lms/static/js/spec/instructor_dashboard/certificates_invalidation_spec.js
View file @
762a6657
...
@@ -29,7 +29,7 @@ define([
...
@@ -29,7 +29,7 @@ define([
beforeEach
(
function
()
{
beforeEach
(
function
()
{
certificate_invalidation
=
new
CertificateInvalidationModel
({
user
:
'test_user'
});
certificate_invalidation
=
new
CertificateInvalidationModel
({
user
:
'test_user'
}
,
{
url
:
'test/url/'
}
);
certificate_invalidation
.
set
({
certificate_invalidation
.
set
({
notes
:
"Test notes"
notes
:
"Test notes"
});
});
...
@@ -174,7 +174,9 @@ define([
...
@@ -174,7 +174,9 @@ define([
it
(
"verifies view is rendered on add/remove to collection"
,
function
()
{
it
(
"verifies view is rendered on add/remove to collection"
,
function
()
{
var
user
=
'test3'
,
var
user
=
'test3'
,
notes
=
'test3 notes'
,
notes
=
'test3 notes'
,
model
=
new
CertificateInvalidationModel
({
user
:
user
,
notes
:
notes
});
model
=
new
CertificateInvalidationModel
(
{
user
:
user
,
notes
:
notes
},
{
url
:
certificate_invalidation_url
}
);
// Add another model in collection and verify it is rendered
// Add another model in collection and verify it is rendered
view
.
collection
.
add
(
model
);
view
.
collection
.
add
(
model
);
...
...
lms/static/js/spec/search/search_spec.js
View file @
762a6657
...
@@ -654,6 +654,7 @@ define([
...
@@ -654,6 +654,7 @@ define([
function
navigatesToSearch
()
{
function
navigatesToSearch
()
{
var
requests
=
AjaxHelpers
.
requests
(
this
);
var
requests
=
AjaxHelpers
.
requests
(
this
);
Backbone
.
history
.
start
();
Backbone
.
history
.
loadUrl
(
'search/query'
);
Backbone
.
history
.
loadUrl
(
'search/query'
);
expect
(
requests
[
0
].
requestBody
).
toContain
(
'search_string=query'
);
expect
(
requests
[
0
].
requestBody
).
toContain
(
'search_string=query'
);
}
}
...
@@ -687,6 +688,10 @@ define([
...
@@ -687,6 +688,10 @@ define([
this
.
$searchResults
=
$
(
'.courseware-results'
);
this
.
$searchResults
=
$
(
'.courseware-results'
);
});
});
afterEach
(
function
(){
Backbone
.
history
.
stop
();
});
it
(
'shows loading message on search'
,
showsLoadingMessage
);
it
(
'shows loading message on search'
,
showsLoadingMessage
);
it
(
'performs search'
,
performsSearch
);
it
(
'performs search'
,
performsSearch
);
it
(
'shows an error message'
,
showsErrorMessage
);
it
(
'shows an error message'
,
showsErrorMessage
);
...
@@ -715,6 +720,10 @@ define([
...
@@ -715,6 +720,10 @@ define([
this
.
$searchResults
=
$
(
'#dashboard-search-results'
);
this
.
$searchResults
=
$
(
'#dashboard-search-results'
);
});
});
afterEach
(
function
(){
Backbone
.
history
.
stop
();
});
it
(
'shows loading message on search'
,
showsLoadingMessage
);
it
(
'shows loading message on search'
,
showsLoadingMessage
);
it
(
'performs search'
,
performsSearch
);
it
(
'performs search'
,
performsSearch
);
it
(
'shows an error message'
,
showsErrorMessage
);
it
(
'shows an error message'
,
showsErrorMessage
);
...
...
lms/static/js/student_account/views/account_settings_fields.js
View file @
762a6657
...
@@ -49,6 +49,7 @@
...
@@ -49,6 +49,7 @@
AccountSettingsFieldViews
.
PasswordFieldView
=
FieldViews
.
LinkFieldView
.
extend
({
AccountSettingsFieldViews
.
PasswordFieldView
=
FieldViews
.
LinkFieldView
.
extend
({
initialize
:
function
(
options
)
{
initialize
:
function
(
options
)
{
this
.
options
=
_
.
extend
({},
options
);
this
.
_super
(
options
);
this
.
_super
(
options
);
_
.
bindAll
(
this
,
'resetPassword'
);
_
.
bindAll
(
this
,
'resetPassword'
);
},
},
...
@@ -111,6 +112,7 @@
...
@@ -111,6 +112,7 @@
AccountSettingsFieldViews
.
AuthFieldView
=
FieldViews
.
LinkFieldView
.
extend
({
AccountSettingsFieldViews
.
AuthFieldView
=
FieldViews
.
LinkFieldView
.
extend
({
initialize
:
function
(
options
)
{
initialize
:
function
(
options
)
{
this
.
options
=
_
.
extend
({},
options
);
this
.
_super
(
options
);
this
.
_super
(
options
);
_
.
bindAll
(
this
,
'redirect_to'
,
'disconnect'
,
'successMessage'
,
'inProgressMessage'
);
_
.
bindAll
(
this
,
'redirect_to'
,
'disconnect'
,
'successMessage'
,
'inProgressMessage'
);
},
},
...
...
lms/static/js/student_account/views/account_settings_view.js
View file @
762a6657
...
@@ -6,7 +6,8 @@
...
@@ -6,7 +6,8 @@
var
AccountSettingsView
=
Backbone
.
View
.
extend
({
var
AccountSettingsView
=
Backbone
.
View
.
extend
({
initialize
:
function
()
{
initialize
:
function
(
options
)
{
this
.
options
=
_
.
extend
({},
options
);
_
.
bindAll
(
this
,
'render'
,
'renderFields'
,
'showLoadingError'
);
_
.
bindAll
(
this
,
'render'
,
'renderFields'
,
'showLoadingError'
);
},
},
...
...
lms/static/js/student_profile/views/badge_view.js
View file @
762a6657
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
var
BadgeView
=
Backbone
.
View
.
extend
({
var
BadgeView
=
Backbone
.
View
.
extend
({
initialize
:
function
(
options
)
{
initialize
:
function
(
options
)
{
this
.
options
=
_
.
extend
({},
options
);
this
.
context
=
_
.
extend
(
this
.
options
.
model
.
toJSON
(),
{
this
.
context
=
_
.
extend
(
this
.
options
.
model
.
toJSON
(),
{
'created'
:
new
Moment
(
this
.
options
.
model
.
toJSON
().
created
),
'created'
:
new
Moment
(
this
.
options
.
model
.
toJSON
().
created
),
'ownProfile'
:
options
.
ownProfile
,
'ownProfile'
:
options
.
ownProfile
,
...
...
lms/static/js/student_profile/views/learner_profile_view.js
View file @
762a6657
...
@@ -9,7 +9,8 @@
...
@@ -9,7 +9,8 @@
var
LearnerProfileView
=
Backbone
.
View
.
extend
({
var
LearnerProfileView
=
Backbone
.
View
.
extend
({
initialize
:
function
()
{
initialize
:
function
(
options
)
{
this
.
options
=
_
.
extend
({},
options
);
_
.
bindAll
(
this
,
'showFullProfile'
,
'render'
,
'renderFields'
,
'showLoadingError'
);
_
.
bindAll
(
this
,
'showFullProfile'
,
'render'
,
'renderFields'
,
'showLoadingError'
);
this
.
listenTo
(
this
.
options
.
preferencesModel
,
"change:"
+
'account_privacy'
,
this
.
render
);
this
.
listenTo
(
this
.
options
.
preferencesModel
,
"change:"
+
'account_privacy'
,
this
.
render
);
var
Router
=
Backbone
.
Router
.
extend
({
var
Router
=
Backbone
.
Router
.
extend
({
...
...
lms/static/js/student_profile/views/section_two_tab.js
View file @
762a6657
...
@@ -9,6 +9,9 @@
...
@@ -9,6 +9,9 @@
'class'
:
'wrapper-profile-section-two'
'class'
:
'wrapper-profile-section-two'
},
},
template
:
_
.
template
(
sectionTwoTemplate
),
template
:
_
.
template
(
sectionTwoTemplate
),
initialize
:
function
(
options
)
{
this
.
options
=
_
.
extend
({},
options
);
},
render
:
function
()
{
render
:
function
()
{
var
self
=
this
;
var
self
=
this
;
var
showFullProfile
=
this
.
options
.
showFullProfile
();
var
showFullProfile
=
this
.
options
.
showFullProfile
();
...
...
lms/static/js/student_profile/views/share_modal_view.js
View file @
762a6657
...
@@ -17,6 +17,9 @@
...
@@ -17,6 +17,9 @@
'focus .focusguard-start'
:
'focusGuardStart'
,
'focus .focusguard-start'
:
'focusGuardStart'
,
'focus .focusguard-end'
:
'focusGuardEnd'
'focus .focusguard-end'
:
'focusGuardEnd'
},
},
initialize
:
function
(
options
)
{
this
.
options
=
_
.
extend
({},
options
);
},
focusGuardStart
:
function
()
{
focusGuardStart
:
function
()
{
// Should only be selected directly if shift-tabbing from the start, so grab last item.
// Should only be selected directly if shift-tabbing from the start, so grab last item.
this
.
$el
.
find
(
"a"
).
last
().
focus
();
this
.
$el
.
find
(
"a"
).
last
().
focus
();
...
...
lms/static/js/views/fields.js
View file @
762a6657
...
@@ -46,6 +46,11 @@
...
@@ -46,6 +46,11 @@
'success'
:
gettext
(
'Your changes have been saved.'
)
'success'
:
gettext
(
'Your changes have been saved.'
)
},
},
constructor
:
function
(
options
)
{
this
.
options
=
_
.
extend
({},
options
);
Backbone
.
View
.
apply
(
this
,
arguments
);
},
initialize
:
function
()
{
initialize
:
function
()
{
this
.
template
=
_
.
template
(
this
.
fieldTemplate
||
''
);
this
.
template
=
_
.
template
(
this
.
fieldTemplate
||
''
);
...
...
lms/static/js/views/image_field.js
View file @
762a6657
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
},
},
initialize
:
function
(
options
)
{
initialize
:
function
(
options
)
{
this
.
options
=
_
.
extend
({},
options
);
this
.
_super
(
options
);
this
.
_super
(
options
);
_
.
bindAll
(
this
,
'render'
,
'imageChangeSucceeded'
,
'imageChangeFailed'
,
'fileSelected'
,
_
.
bindAll
(
this
,
'render'
,
'imageChangeSucceeded'
,
'imageChangeFailed'
,
'fileSelected'
,
'watchForPageUnload'
,
'onBeforeUnload'
);
'watchForPageUnload'
,
'onBeforeUnload'
);
...
...
lms/static/karma_lms.conf.js
View file @
762a6657
...
@@ -61,7 +61,7 @@ var libraryFiles = [
...
@@ -61,7 +61,7 @@ var libraryFiles = [
{
pattern
:
'xmodule_js/common_static/js/src/**/*.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/src/**/*.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/common/js/vendor/underscore.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/common/js/vendor/underscore.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/common/js/vendor/underscore.string.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/common/js/vendor/underscore.string.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/backbone-min.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/
common/
js/vendor/backbone-min.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/backbone.paginator.min.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/backbone.paginator.min.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/edxnotes/annotator-full.min.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/vendor/edxnotes/annotator-full.min.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/test/i18n.js'
,
included
:
false
},
{
pattern
:
'xmodule_js/common_static/js/test/i18n.js'
,
included
:
false
},
...
...
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