fixed loading for discussion module

This commit is contained in:
Rocky Duan
2012-08-23 01:55:31 -07:00
parent 16ca13f203
commit 2b6a0928ca
3 changed files with 10 additions and 13 deletions

View File

@@ -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'

View File

@@ -1,9 +1,9 @@
$ ->
$.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

View File

@@ -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 {