Commit 2b6a0928 by Rocky Duan

fixed loading for discussion module

parent 16ca13f2
......@@ -18,6 +18,7 @@ if Backbone?
url = DiscussionUtil.urlFor 'retrieve_discussion', discussion_id
DiscussionUtil.safeAjax
$elem: $elem
$loading: $elem
url: url
type: "GET"
dataType: 'json'
......
$ ->
$.fn.extend
loading: ->
$(this).after("<span class='loading'></span>")
$(this).after("<span class='discussion-loading'></span>")
loaded: ->
$(this).parent().children(".loading").remove()
$(this).parent().children(".discussion-loading").remove()
class @DiscussionUtil
......
......@@ -35,7 +35,13 @@ $tag-text-color: #5b614f;
}
}
.discussion-loading {
background-image: url(../images/discussion/loading.gif);
width: 15px;
height: 15px;
margin-left: 2px;
display: inline-block;
}
/*** Discussions ***/
......@@ -49,16 +55,6 @@ $tag-text-color: #5b614f;
margin-top: 0;
}
.loading {
background-image: url(../images/discussion/loading.gif);
width: 15px;
height: 15px;
margin-left: 2px;
display: inline-block;
}
/*** Sidebar ***/
.sidebar-module {
......
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