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
2c35cde0
Commit
2c35cde0
authored
Apr 12, 2016
by
muzaffaryousaf
Committed by
Clinton Blackburn
May 02, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Common, squire fixes required to upgrade backbonejs
TNL-4358
parent
95952d9b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
8 deletions
+14
-8
common/static/coffee/src/discussion/views/discussion_thread_view.coffee
+2
-1
common/static/common/js/components/collections/paging_collection.js
+6
-1
common/static/common/js/components/views/feedback.js
+2
-1
common/static/common/js/components/views/paginated_view.js
+3
-3
common/static/common/js/spec/components/search_field_spec.js
+1
-2
No files found.
common/static/coffee/src/discussion/views/discussion_thread_view.coffee
View file @
2c35cde0
...
...
@@ -20,6 +20,7 @@ if Backbone?
super
()
@
mode
=
options
.
mode
or
"inline"
# allowed values are "tab" or "inline"
@
context
=
options
.
context
or
"course"
# allowed values are "course" or "standalone"
@
course_settings
=
options
.
course_settings
if
@
mode
not
in
[
"tab"
,
"inline"
]
throw
new
Error
(
"invalid mode: "
+
@
mode
)
...
...
@@ -307,7 +308,7 @@ if Backbone?
model
:
@
model
mode
:
@
mode
context
:
@
context
course_settings
:
@
options
.
course_settings
course_settings
:
@
course_settings
)
@
editView
.
bind
"thread:updated thread:cancel_edit"
,
@
closeEditView
@
editView
.
bind
"comment:endorse"
,
@
endorseThread
...
...
common/static/common/js/components/collections/paging_collection.js
View file @
2c35cde0
...
...
@@ -20,7 +20,12 @@
'use strict'
;
define
([
'backbone.paginator'
],
function
(
BackbonePaginator
)
{
var
PagingCollection
=
BackbonePaginator
.
requestPager
.
extend
({
initialize
:
function
()
{
initialize
:
function
(
models
,
options
)
{
options
=
options
||
{};
if
(
options
.
url
)
{
this
.
url
=
options
.
url
;
}
var
self
=
this
;
// These must be initialized in the constructor because otherwise all PagingCollections would point
// to the same object references for sortableFields and filterableFields.
...
...
common/static/common/js/components/views/feedback.js
View file @
2c35cde0
...
...
@@ -59,7 +59,8 @@
*/
},
initialize
:
function
()
{
initialize
:
function
(
options
)
{
this
.
options
=
_
.
extend
({},
this
.
options
,
options
);
if
(
!
this
.
options
.
type
)
{
throw
"SystemFeedback: type required (given "
+
JSON
.
stringify
(
this
.
options
)
+
")"
;
...
...
common/static/common/js/components/views/paginated_view.js
View file @
2c35cde0
...
...
@@ -31,7 +31,7 @@
className
:
this
.
type
+
'-container'
,
itemViewClass
:
this
.
itemViewClass
});
this
.
listView
=
new
ItemListView
({
collection
:
this
.
options
.
collection
});
this
.
listView
=
new
ItemListView
({
collection
:
this
.
collection
});
this
.
headerView
=
this
.
createHeaderView
();
this
.
footerView
=
this
.
createFooterView
();
this
.
collection
.
on
(
'page_changed'
,
function
()
{
...
...
@@ -46,12 +46,12 @@
paginationLabel
:
gettext
(
"Pagination"
),
createHeaderView
:
function
()
{
return
new
PagingHeader
({
collection
:
this
.
options
.
collection
,
srInfo
:
this
.
srInfo
});
return
new
PagingHeader
({
collection
:
this
.
collection
,
srInfo
:
this
.
srInfo
});
},
createFooterView
:
function
()
{
return
new
PagingFooter
({
collection
:
this
.
options
.
collection
,
hideWhenOnePage
:
true
,
collection
:
this
.
collection
,
hideWhenOnePage
:
true
,
paginationLabel
:
this
.
paginationLabel
});
},
...
...
common/static/common/js/spec/components/search_field_spec.js
View file @
2c35cde0
...
...
@@ -21,8 +21,7 @@ define([
current_page
:
1
,
start
:
0
,
results
:
_
.
first
(
results
,
perPage
)
},
{
parse
:
true
}
}
);
collection
.
start
=
0
;
collection
.
totalCount
=
results
.
length
;
...
...
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