Commit 2b6a0928 by Rocky Duan

fixed loading for discussion module

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