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
783cecb5
Commit
783cecb5
authored
Nov 15, 2012
by
Bridger Maxwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a 'find collaborators' xmodule mockup.
parent
5aa2ad84
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
8 deletions
+25
-8
common/lib/xmodule/xmodule/collaborate_module.py
+4
-5
common/lib/xmodule/xmodule/js/src/collaborate/display.coffee
+16
-0
lms/static/sass/_collaborate.scss
+1
-1
lms/templates/main.html
+2
-1
lms/templates/xmodules/collaborate_module.html
+2
-1
No files found.
common/lib/xmodule/xmodule/collaborate_module.py
View file @
783cecb5
...
...
@@ -7,11 +7,10 @@ from xmodule.raw_module import RawDescriptor
import
json
class
CollaborateModule
(
XModule
):
# js = {'coffee':
# [resource_string(__name__, 'js/src/time.coffee'),
# resource_string(__name__, 'js/src/discussion/display.coffee')]
# }
# js_module_name = "FindCollaborators"
js
=
{
'coffee'
:
[
resource_string
(
__name__
,
'js/src/collaborate/display.coffee'
)]
}
js_module_name
=
"FindCollaborator"
def
get_html
(
self
):
context
=
{
'collaborate_room'
:
self
.
collaborate_room
,
...
...
common/lib/xmodule/xmodule/js/src/collaborate/display.coffee
0 → 100644
View file @
783cecb5
class
@
FindCollaborator
constructor
:
(
element
)
->
@
socket
=
io
.
connect
(
'http://127.0.0.1:3000/pair'
)
@
statusElement
=
$
(
element
).
find
(
".collaborate-status"
)
@
roomName
=
@
statusElement
.
data
(
'collaborate-room'
)
@
listen
()
@
socket
.
emit
(
"watch_pair_room"
,
{
'room-name'
:
@
roomName
});
listen
:
->
@
socket
.
on
'status_updated'
,
(
data
)
=>
if
@
roomName
==
data
[
'room-name'
]
@
statusElement
.
text
(
data
[
'status'
])
lms/static/sass/_collaborate.scss
View file @
783cecb5
...
...
@@ -36,7 +36,7 @@
display
:
block
;
height
:
22px
;
border-radius
:
3px
;
background-color
:
#
10242E
;
background-color
:
#
064666
;
color
:
#fff
;
margin
:
-10px
10px
;
padding
:
12px
15px
0px
;
...
...
lms/templates/main.html
View file @
783cecb5
...
...
@@ -7,7 +7,8 @@
<link
rel=
"icon"
type=
"image/x-icon"
href=
"${static.url('images/favicon.ico')}"
/>
<
%
static:css
group=
'application'
/>
<script
src=
"http://127.0.0.1:3000/socket.io/socket.io.js"
></script>
<
%
static:js
group=
'main_vendor'
/>
<
%
block
name=
"headextra"
/>
...
...
lms/templates/xmodules/collaborate_module.html
View file @
783cecb5
...
...
@@ -4,5 +4,5 @@
<div
class=
"collaborate_module"
>
<a
class=
"find_collaborator"
href=
"#"
onclick=
"window.open('http://127.0.0.1:3000/pair/${collaborate_room | urllib.quote}', 'collaborate_window', 'width=780, height=590'); return false;"
>
Collaborate on ${collaborate_room | h}
</a>
<span
class=
"collaborate-status"
>
Connecting...
</span>
<span
class=
"collaborate-status"
data-collaborate-room=
"${collaborate_room | h}"
>
Connecting...
</span>
</div>
\ No newline at end of file
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