Commit ca07942b69547fc123eb7a1ffbc50a243fc8da2a
1 parent
6793018d
Exists in
master
#community dashboard - updating theme
Showing
1 changed file
with
9 additions
and
3 deletions
Show diff stats
public/javascripts/community_hub.js
... | ... | @@ -243,6 +243,7 @@ function update_mediations() { |
243 | 243 | type: 'get', |
244 | 244 | data: { latest_post: latest_post_id, hub: hub_id }, |
245 | 245 | success: function(data) { |
246 | + jQuery("body").removeClass("hub-loading"); | |
246 | 247 | if (data.trim().length > 0) { |
247 | 248 | jQuery("#mediation-posts").prepend(data); |
248 | 249 | } |
... | ... | @@ -284,7 +285,7 @@ function update_live_stream(recursive) { |
284 | 285 | jQuery("#live-posts").scrollTop(live_scroll_position); |
285 | 286 | } |
286 | 287 | if (first_hub_load) { |
287 | - jQuery("body").removeClass("loading"); | |
288 | + jQuery("body").removeClass("hub-loading"); | |
288 | 289 | first_hub_load = false; |
289 | 290 | } |
290 | 291 | } |
... | ... | @@ -316,10 +317,15 @@ function hub_right_tab_click() { |
316 | 317 | jQuery("#right-tab").removeClass('hide'); |
317 | 318 | jQuery("#right-tab").addClass('show'); |
318 | 319 | jQuery(".hub #right-tab.show h1.live").click(hub_left_tab_click); |
319 | - update_mediations(); | |
320 | + if (first_mediations_load) { | |
321 | + jQuery("body").addClass("hub-loading"); | |
322 | + first_mediations_load = false; | |
323 | + update_mediations(); | |
324 | + } | |
320 | 325 | } |
321 | 326 | |
322 | 327 | first_hub_load = true; |
328 | +first_mediations_load = true; | |
323 | 329 | |
324 | 330 | jQuery(".hub .envelope").scroll(function() { |
325 | 331 | jQuery("#auto_scrolling").attr('checked', false); |
... | ... | @@ -354,7 +360,7 @@ jQuery(document).ready(function() { |
354 | 360 | |
355 | 361 | jQuery(".hub #left-tab.show h1.mediation").click(hub_right_tab_click); |
356 | 362 | |
357 | - jQuery("body").addClass("loading"); | |
363 | + jQuery("body").addClass("hub-loading"); | |
358 | 364 | |
359 | 365 | update_live_stream(true); |
360 | 366 | ... | ... |