Commit 87dcd071 by Tom Giannattasio

delayed appearance of spinner in thread so things are less jumpy

parent d88de521
......@@ -14,6 +14,7 @@ if Backbone?
render: ->
@template = _.template($("#thread-template").html())
@$el.html(@template(@model.toJSON()))
@$el.find(".loading").hide()
@delegateEvents()
@renderShowView()
......@@ -27,7 +28,10 @@ if Backbone?
if @responsesRequest?
@responsesRequest.abort()
renderResponses: ->
renderResponses: ->
setTimeout(=>
@$el.find(".loading").show()
, 200)
@responsesRequest = DiscussionUtil.safeAjax
url: "/courses/#{$$course_id}/discussion/forum/#{@model.get('commentable_id')}/threads/#{@model.id}"
success: (data, textStatus, xhr) =>
......
......@@ -1309,7 +1309,7 @@ body.discussion {
> li {
position: relative;
margin: 0 -10px 30px;
padding: 26px 30px 30px;
padding: 26px 30px 20px;
border-radius: 3px;
border: 1px solid #b2b2b2;
box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
......@@ -1573,6 +1573,7 @@ body.discussion {
.discussion-reply-new {
padding: 20px;
@include clearfix;
@include transition(opacity .2s);
h4 {
font-size: 16px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment