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
7a3a96d1
Commit
7a3a96d1
authored
Sep 10, 2012
by
Tom Giannattasio
Committed by
Ibrahim Awwal
Sep 10, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tightened dropdown topic name treatment
parent
a7014aef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
15 deletions
+6
-15
lms/static/coffee/src/discussion/views/discussion_thread_list_view.coffee
+5
-14
lms/static/sass/_discussion.scss
+1
-1
No files found.
lms/static/coffee/src/discussion/views/discussion_thread_list_view.coffee
View file @
7a3a96d1
...
@@ -156,13 +156,6 @@ if Backbone?
...
@@ -156,13 +156,6 @@ if Backbone?
_
.
each
item
.
parents
(
'ul'
).
not
(
'.browse-topic-drop-menu'
),
(
parent
)
->
_
.
each
item
.
parents
(
'ul'
).
not
(
'.browse-topic-drop-menu'
),
(
parent
)
->
boardName
=
$
(
parent
).
siblings
(
'a'
).
find
(
'.board-name'
).
html
()
+
' / '
+
boardName
boardName
=
$
(
parent
).
siblings
(
'a'
).
find
(
'.board-name'
).
html
()
+
' / '
+
boardName
@
$
(
".current-board"
).
html
(
@
fitName
(
boardName
))
@
$
(
".current-board"
).
html
(
@
fitName
(
boardName
))
fontSize
=
16
@
$
(
".current-board"
).
css
(
'font-size'
,
'16px'
)
while
@
$
(
".current-board"
).
width
()
>
(
@
$el
.
width
()
*
.
8
)
-
40
fontSize
--
if
fontSize
<
11
break
@
$
(
".current-board"
).
css
(
'font-size'
,
fontSize
+
'px'
)
setSelectedTopic
:
(
name
)
->
setSelectedTopic
:
(
name
)
->
@
$
(
".current-board"
).
html
(
@
fitName
(
name
))
@
$
(
".current-board"
).
html
(
@
fitName
(
name
))
...
@@ -182,24 +175,21 @@ if Backbone?
...
@@ -182,24 +175,21 @@ if Backbone?
return
width
return
width
fitName
:
(
name
)
->
fitName
:
(
name
)
->
@
maxNameWidth
=
(
@
$el
.
width
()
*
.
8
)
-
50
width
=
@
getNameWidth
(
name
)
width
=
@
getNameWidth
(
name
)
if
width
<
@
maxNameWidth
if
width
<
@
maxNameWidth
return
name
return
name
path
=
(
x
.
replace
/^\s+|\s+$/g
,
""
for
x
in
name
.
split
(
"/"
))
path
=
(
x
.
replace
/^\s+|\s+$/g
,
""
for
x
in
name
.
split
(
"/"
))
while
path
.
length
>
1
while
path
.
length
>
1
path
.
shift
()
path
.
shift
()
partialName
=
"
... / "
+
path
.
join
(
" /
"
)
partialName
=
"
…/"
+
path
.
join
(
"/
"
)
if
@
getNameWidth
(
partialName
)
<
@
maxNameWidth
if
@
getNameWidth
(
partialName
)
<
@
maxNameWidth
return
partialName
return
partialName
rawName
=
path
[
0
]
rawName
=
path
[
0
]
name
=
"…/"
+
rawName
name
=
"... / "
+
rawName
while
@
getNameWidth
(
name
)
>
@
maxNameWidth
while
@
getNameWidth
(
name
)
>
@
maxNameWidth
rawName
=
rawName
[
0
...
rawName
.
length
-
1
]
rawName
=
rawName
[
0
...
rawName
.
length
-
1
]
name
=
"... / "
+
rawName
+
" ..."
name
=
"…/"
+
rawName
+
"…"
return
name
return
name
filterTopic
:
(
event
)
->
filterTopic
:
(
event
)
->
...
@@ -245,6 +235,7 @@ if Backbone?
...
@@ -245,6 +235,7 @@ if Backbone?
return
return
if
event
.
which
!=
40
&&
event
.
which
!=
38
if
event
.
which
!=
40
&&
event
.
which
!=
38
return
return
event
.
preventDefault
()
event
.
preventDefault
()
items
=
$
.
makeArray
(
$
(
".browse-topic-drop-menu-wrapper a"
).
not
(
".hidden"
))
items
=
$
.
makeArray
(
$
(
".browse-topic-drop-menu-wrapper a"
).
not
(
".hidden"
))
...
...
lms/static/sass/_discussion.scss
View file @
7a3a96d1
...
@@ -739,7 +739,7 @@ body.discussion {
...
@@ -739,7 +739,7 @@ body.discussion {
}
}
span
{
span
{
font-size
:
1
6
px
;
font-size
:
1
4
px
;
font-weight
:
700
;
font-weight
:
700
;
line-height
:
58px
;
line-height
:
58px
;
color
:
#333
;
color
:
#333
;
...
...
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