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
cc1f182f
Commit
cc1f182f
authored
Sep 17, 2012
by
Ibrahim Awwal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move new post button handler to DiscussionRouter.
parent
49d7a932
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
lms/static/coffee/src/discussion/discussion_router.coffee
+10
-0
lms/static/js/discussions-temp.js
+0
-11
No files found.
lms/static/coffee/src/discussion/discussion_router.coffee
View file @
cc1f182f
...
...
@@ -14,6 +14,9 @@ if Backbone?
@
newPostView
=
new
NewPostView
(
el
:
$
(
".new-post-article"
),
collection
:
@
discussion
)
@
nav
.
on
"thread:created"
,
@
navigateToThread
@
newPost
=
$
(
'.new-post-article'
)
$
(
'.new-post-btn'
).
bind
"click"
,
@
showNewPost
$
(
'.new-post-cancel'
).
bind
"click"
,
@
hideNewPost
allThreads
:
->
@
nav
.
updateSidebar
()
...
...
@@ -43,3 +46,10 @@ if Backbone?
navigateToAllThreads
:
=>
@
navigate
(
""
,
trigger
:
true
)
showNewPost
:
(
event
)
=>
@
newPost
.
slideDown
(
300
)
$
(
'.new-post-title'
).
focus
()
hideNewPost
:
(
event
)
=>
@
newPost
.
slideUp
(
300
)
lms/static/js/discussions-temp.js
View file @
cc1f182f
...
...
@@ -55,8 +55,6 @@ $(document).ready(function() {
// $topicDrop.bind('click', setTopic);
$formTopicDropBtn
.
bind
(
'click'
,
showFormTopicDrop
);
$formTopicDropMenu
.
bind
(
'click'
,
setFormTopic
);
$
(
'.new-post-btn'
).
bind
(
'click'
,
newPost
);
$
(
'.new-post-cancel'
).
bind
(
'click'
,
closeNewPost
);
$body
.
delegate
(
'[data-tooltip]'
,
{
'mouseover'
:
showTooltip
,
...
...
@@ -266,15 +264,6 @@ function setTopic(e) {
showBrowse
();
}
function
newPost
(
e
)
{
$newPost
.
slideDown
(
300
);
$
(
'.new-post-title'
).
focus
();
}
function
closeNewPost
(
e
)
{
$newPost
.
slideUp
(
300
);
}
function
showFormTopicDrop
(
e
)
{
$formTopicDropBtn
.
addClass
(
'is-dropped'
);
$formTopicDropMenu
.
show
();
...
...
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