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
eed09cc0
Commit
eed09cc0
authored
Apr 18, 2016
by
Ehtesham
Committed by
Clinton Blackburn
May 02, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CMS event fixes required to upgrade backbonejs
parent
861406a1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
20 deletions
+19
-20
cms/static/js/views/modals/base_modal.js
+1
-1
cms/static/js/views/modals/course_outline_modals.js
+7
-8
cms/static/js/views/modals/edit_xblock.js
+2
-3
cms/static/js/views/modals/validation_error_modal.js
+2
-2
cms/static/js/views/pages/paged_container.js
+5
-3
cms/static/js/views/uploads.js
+2
-3
No files found.
cms/static/js/views/modals/base_modal.js
View file @
eed09cc0
...
...
@@ -26,7 +26,7 @@ define(["jquery", "underscore", "gettext", "js/views/baseview"],
'click .action-cancel'
:
'cancel'
},
options
:
$
.
extend
({},
BaseView
.
prototype
.
options
,
{
options
:
_
.
extend
({},
BaseView
.
prototype
.
options
,
{
type
:
'prompt'
,
closeIcon
:
false
,
icon
:
false
,
...
...
cms/static/js/views/modals/course_outline_modals.js
View file @
eed09cc0
...
...
@@ -17,9 +17,9 @@ define(['jquery', 'backbone', 'underscore', 'gettext', 'js/views/baseview',
VerificationAccessEditor
,
TimedExaminationPreferenceEditor
,
AccessEditor
;
CourseOutlineXBlockModal
=
BaseModal
.
extend
({
events
:
{
events
:
_
.
extend
({},
BaseModal
.
prototype
.
events
,
{
'click .action-save'
:
'save'
},
}
)
,
options
:
$
.
extend
({},
BaseModal
.
prototype
.
options
,
{
modalName
:
'course-outline'
,
...
...
@@ -32,7 +32,6 @@ define(['jquery', 'backbone', 'underscore', 'gettext', 'js/views/baseview',
initialize
:
function
()
{
BaseModal
.
prototype
.
initialize
.
call
(
this
);
this
.
events
=
$
.
extend
({},
BaseModal
.
prototype
.
events
,
this
.
events
);
this
.
template
=
this
.
loadTemplate
(
'course-outline-modal'
);
this
.
options
.
title
=
this
.
getTitle
();
},
...
...
@@ -154,10 +153,10 @@ define(['jquery', 'backbone', 'underscore', 'gettext', 'js/views/baseview',
}
},
events
:
{
events
:
_
.
extend
({},
CourseOutlineXBlockModal
.
prototype
.
events
,
{
'click .action-save'
:
'save'
,
'click .settings-tab-button'
:
'handleShowTab'
,
},
'click .settings-tab-button'
:
'handleShowTab'
}
)
,
/**
* Return request data.
...
...
@@ -185,9 +184,9 @@ define(['jquery', 'backbone', 'underscore', 'gettext', 'js/views/baseview',
PublishXBlockModal
=
CourseOutlineXBlockModal
.
extend
({
events
:
{
events
:
_
.
extend
({},
CourseOutlineXBlockModal
.
prototype
.
events
,
{
'click .action-publish'
:
'save'
},
}
)
,
initialize
:
function
()
{
CourseOutlineXBlockModal
.
prototype
.
initialize
.
call
(
this
);
...
...
cms/static/js/views/modals/edit_xblock.js
View file @
eed09cc0
...
...
@@ -9,10 +9,10 @@ define(["jquery", "underscore", "gettext", "js/views/modals/base_modal", "common
"strict mode"
;
var
EditXBlockModal
=
BaseModal
.
extend
({
events
:
{
events
:
_
.
extend
({},
BaseModal
.
prototype
.
events
,
{
"click .action-save"
:
"save"
,
"click .action-modes a"
:
"changeMode"
},
}
)
,
options
:
$
.
extend
({},
BaseModal
.
prototype
.
options
,
{
modalName
:
'edit-xblock'
,
...
...
@@ -25,7 +25,6 @@ define(["jquery", "underscore", "gettext", "js/views/modals/base_modal", "common
initialize
:
function
()
{
BaseModal
.
prototype
.
initialize
.
call
(
this
);
this
.
events
=
_
.
extend
({},
BaseModal
.
prototype
.
events
,
this
.
events
);
this
.
template
=
this
.
loadTemplate
(
'edit-xblock-modal'
);
this
.
editorModeButtonTemplate
=
this
.
loadTemplate
(
'editor-mode-button'
);
},
...
...
cms/static/js/views/modals/validation_error_modal.js
View file @
eed09cc0
...
...
@@ -38,7 +38,7 @@ define(['jquery', 'underscore', 'gettext', 'js/views/modals/base_modal'],
return
this
.
template
({
response
:
this
.
response
,
num_errors
:
this
.
response
.
length
,
num_errors
:
this
.
response
.
length
});
},
...
...
@@ -57,7 +57,7 @@ define(['jquery', 'underscore', 'gettext', 'js/views/modals/base_modal'],
// hide the modal
BaseModal
.
prototype
.
hide
.
call
(
this
);
}
,
}
});
return
ValidationErrorModal
;
...
...
cms/static/js/views/pages/paged_container.js
View file @
eed09cc0
...
...
@@ -6,12 +6,14 @@ define(["jquery", "underscore", "gettext", "js/views/pages/container", "js/views
'use strict'
;
var
PagedXBlockContainerPage
=
XBlockContainerPage
.
extend
({
events
:
{
"click .toggle-preview-button"
:
"toggleChildrenPreviews"
},
events
:
_
.
extend
({},
XBlockContainerPage
.
prototype
.
events
,
{
'click .toggle-preview-button'
:
'toggleChildrenPreviews'
}),
defaultViewClass
:
PagedContainerView
,
components_on_init
:
false
,
initialize
:
function
(
options
){
this
.
events
=
_
.
extend
({},
XBlockContainerPage
.
prototype
.
events
,
this
.
events
);
initialize
:
function
(
options
)
{
this
.
page_size
=
options
.
page_size
||
10
;
this
.
showChildrenPreviews
=
options
.
showChildrenPreviews
||
true
;
XBlockContainerPage
.
prototype
.
initialize
.
call
(
this
,
options
);
...
...
cms/static/js/views/uploads.js
View file @
eed09cc0
define
([
"jquery"
,
"underscore"
,
"gettext"
,
"js/views/modals/base_modal"
,
"jquery.form"
],
function
(
$
,
_
,
gettext
,
BaseModal
)
{
var
UploadDialog
=
BaseModal
.
extend
({
events
:
{
events
:
_
.
extend
({},
BaseModal
.
prototype
.
events
,
{
"change input[type=file]"
:
"selectFile"
,
"click .action-upload"
:
"upload"
},
}
)
,
options
:
$
.
extend
({},
BaseModal
.
prototype
.
options
,
{
modalName
:
'assetupload'
,
...
...
@@ -15,7 +15,6 @@ define(["jquery", "underscore", "gettext", "js/views/modals/base_modal", "jquery
initialize
:
function
()
{
BaseModal
.
prototype
.
initialize
.
call
(
this
);
this
.
events
=
_
.
extend
({},
BaseModal
.
prototype
.
events
,
this
.
events
);
this
.
template
=
this
.
loadTemplate
(
"upload-dialog"
);
this
.
listenTo
(
this
.
model
,
"change"
,
this
.
renderContents
);
this
.
options
.
title
=
this
.
model
.
get
(
'title'
);
...
...
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