diff --git a/lms/static/coffee/src/discussion/views/discussion_thread_list_view.coffee b/lms/static/coffee/src/discussion/views/discussion_thread_list_view.coffee index 367803f6bd..b77e76d29d 100644 --- a/lms/static/coffee/src/discussion/views/discussion_thread_list_view.coffee +++ b/lms/static/coffee/src/discussion/views/discussion_thread_list_view.coffee @@ -156,13 +156,6 @@ if Backbone? _.each item.parents('ul').not('.browse-topic-drop-menu'), (parent) -> boardName = $(parent).siblings('a').find('.board-name').html() + ' / ' + 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) -> @$(".current-board").html(@fitName(name)) @@ -182,24 +175,21 @@ if Backbone? return width fitName: (name) -> + @maxNameWidth = (@$el.width() * .8) - 50 width = @getNameWidth(name) if width < @maxNameWidth return name path = (x.replace /^\s+|\s+$/g, "" for x in name.split("/")) while path.length > 1 path.shift() - partialName = "... / " + path.join(" / ") + partialName = "…/" + path.join("/") if @getNameWidth(partialName) < @maxNameWidth return partialName - rawName = path[0] - - name = "... / " + rawName - + name = "…/" + rawName while @getNameWidth(name) > @maxNameWidth rawName = rawName[0...rawName.length-1] - name = "... / " + rawName + " ..." - + name = "…/" + rawName + "…" return name filterTopic: (event) -> @@ -245,6 +235,7 @@ if Backbone? return if event.which != 40 && event.which != 38 return + event.preventDefault() items = $.makeArray($(".browse-topic-drop-menu-wrapper a").not(".hidden")) diff --git a/lms/static/sass/_discussion.scss b/lms/static/sass/_discussion.scss index cd804e1ba6..252c6ac0f0 100644 --- a/lms/static/sass/_discussion.scss +++ b/lms/static/sass/_discussion.scss @@ -739,7 +739,7 @@ body.discussion { } span { - font-size: 16px; + font-size: 14px; font-weight: 700; line-height: 58px; color: #333;