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