Commit e58ae17fcc83cc232fe839cb96366c3c09d797d4
1 parent
32637d5d
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
#community dashboard - updating theme
Showing
2 changed files
with
56 additions
and
18 deletions
Show diff stats
plugins/community_hub/public/javascripts/community_hub.js
| @@ -3,8 +3,23 @@ var oldest_post_id = 0; | @@ -3,8 +3,23 @@ var oldest_post_id = 0; | ||
| 3 | live_scroll_position = 0; | 3 | live_scroll_position = 0; |
| 4 | var mediations = []; | 4 | var mediations = []; |
| 5 | 5 | ||
| 6 | -function load_more_messages() { | 6 | +function load_more(tab) { |
| 7 | + switch (tab) { | ||
| 8 | + case 'live': | ||
| 9 | + load_more_messages(); | ||
| 10 | + break; | ||
| 11 | + case 'mediation': | ||
| 12 | + load_more_mediations(); | ||
| 13 | + break; | ||
| 14 | + } | ||
| 15 | +} | ||
| 16 | + | ||
| 17 | + | ||
| 18 | +function load_more_mediations() {i | ||
| 19 | + // implement! | ||
| 20 | +} | ||
| 7 | 21 | ||
| 22 | +function load_more_messages() { | ||
| 8 | var hub_id = jQuery(".hub").attr('id'); | 23 | var hub_id = jQuery(".hub").attr('id'); |
| 9 | var oldest_id = jQuery("#live-posts li.post").last().attr("id"); | 24 | var oldest_id = jQuery("#live-posts li.post").last().attr("id"); |
| 10 | 25 | ||
| @@ -312,11 +327,28 @@ function hub_right_tab_click() { | @@ -312,11 +327,28 @@ function hub_right_tab_click() { | ||
| 312 | 327 | ||
| 313 | first_hub_load = true; | 328 | first_hub_load = true; |
| 314 | 329 | ||
| 315 | -jQuery(".hub .live .envelope").scroll(function() { | 330 | +jQuery(".hub .envelope").scroll(function() { |
| 316 | jQuery("#auto_scrolling").attr('checked', false); | 331 | jQuery("#auto_scrolling").attr('checked', false); |
| 317 | - if (jQuery(".hub .live .envelope").scrollTop() == (jQuery(".hub ul#live-posts").height() - jQuery(".hub .live .envelope").height() + 23)) { | ||
| 318 | - load_more_messages(); | 332 | + |
| 333 | + // live stream tab... | ||
| 334 | + if (jQuery("#left-tab.show").size() != 0) { | ||
| 335 | + current_envelope = jQuery(".hub .live .envelope"); | ||
| 336 | + current_list_posts = jQuery(".hub ul#live-posts"); | ||
| 337 | + tab = 'live'; | ||
| 338 | + } | ||
| 339 | + else { | ||
| 340 | + // mediation tab... | ||
| 341 | + if (jQuery("#right-tab.show").size() != 0) { | ||
| 342 | + current_envelope = jQuery(".hub .mediation .envelope"); | ||
| 343 | + current_list_posts = jQuery(".hub ul#mediation-posts"); | ||
| 344 | + tab = 'mediation'; | ||
| 345 | + } | ||
| 346 | + } | ||
| 347 | + | ||
| 348 | + if (current_envelope.scrollTop() == (current_list_posts.height() - current_envelope.height() + 23)) { | ||
| 349 | + load_more(tab); | ||
| 319 | } | 350 | } |
| 351 | + | ||
| 320 | }); | 352 | }); |
| 321 | 353 | ||
| 322 | 354 |
plugins/community_hub/public/style.css
| @@ -122,7 +122,7 @@ | @@ -122,7 +122,7 @@ | ||
| 122 | 122 | ||
| 123 | .hub .mediation-bar ul li.pin { | 123 | .hub .mediation-bar ul li.pin { |
| 124 | height: 25px; | 124 | height: 25px; |
| 125 | - margin-right: 15px; | 125 | + /*margin-right: 15px;*/ |
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | .hub .remove{} | 128 | .hub .remove{} |
| @@ -175,35 +175,40 @@ | @@ -175,35 +175,40 @@ | ||
| 175 | } | 175 | } |
| 176 | 176 | ||
| 177 | .hub .envelope { | 177 | .hub .envelope { |
| 178 | -/* height: 500px; | 178 | + height: 500px; |
| 179 | overflow-x: hidden; | 179 | overflow-x: hidden; |
| 180 | - overflow-y: scroll;*/ | 180 | + overflow-y: scroll; |
| 181 | margin-top: -1px; | 181 | margin-top: -1px; |
| 182 | - border-top: 1px solid lightgray; | ||
| 183 | - display: inline-block; | 182 | + border: 1px solid lightgray; |
| 183 | + /*border-bottom: 1px solid lightgray; | ||
| 184 | + border-left: 1px solid lightgray;*/ | ||
| 185 | + /*display: inline-block;*/ | ||
| 184 | width: 100%; | 186 | width: 100%; |
| 185 | } | 187 | } |
| 186 | 188 | ||
| 187 | .hub ul#live-posts, .hub ul#mediation-posts{ | 189 | .hub ul#live-posts, .hub ul#mediation-posts{ |
| 188 | - border-width: 0 1px 1px; | ||
| 189 | - border-style: solid; | ||
| 190 | - border-color: lightGray; | 190 | + /*border-width: 0 1px 1px;*/ |
| 191 | + /*border-style: solid;*/ | ||
| 192 | + /*border-color: lightGray;*/ | ||
| 193 | + border-bottom: 1px solid lightgray; | ||
| 191 | padding-top: 10px; | 194 | padding-top: 10px; |
| 192 | - clear: both; | ||
| 193 | - height: 475px; | ||
| 194 | - overflow-y: scroll; | 195 | + /*clear: both;*/ |
| 196 | + /*height: 475px;*/ | ||
| 197 | + /*overflow-y: scroll;*/ | ||
| 195 | 198 | ||
| 196 | } | 199 | } |
| 197 | 200 | ||
| 198 | /*modificação da scroll bar*/ | 201 | /*modificação da scroll bar*/ |
| 202 | +.hub div.envelope::-webkit-scrollbar-button /*, | ||
| 199 | .hub ul#live-posts::-webkit-scrollbar-button, | 203 | .hub ul#live-posts::-webkit-scrollbar-button, |
| 200 | -.hub ul#mediation-posts::-webkit-scrollbar-button { | 204 | +.hub ul#mediation-posts::-webkit-scrollbar-button */ { |
| 201 | height: 0; | 205 | height: 0; |
| 202 | width: 0; | 206 | width: 0; |
| 203 | } | 207 | } |
| 204 | 208 | ||
| 209 | +.hub div.envelope::-webkit-scrollbar-thumb /*, | ||
| 205 | .hub ul#live-posts::-webkit-scrollbar-thumb, | 210 | .hub ul#live-posts::-webkit-scrollbar-thumb, |
| 206 | -.hub ul#mediation-posts::-webkit-scrollbar-thumb{ | 211 | +.hub ul#mediation-posts::-webkit-scrollbar-thumb */ { |
| 207 | background-clip: padding-box; | 212 | background-clip: padding-box; |
| 208 | background-color: rgba(0,0,0,.3); | 213 | background-color: rgba(0,0,0,.3); |
| 209 | border: 5px solid transparent; | 214 | border: 5px solid transparent; |
| @@ -214,8 +219,9 @@ | @@ -214,8 +219,9 @@ | ||
| 214 | width: 5px; | 219 | width: 5px; |
| 215 | } | 220 | } |
| 216 | 221 | ||
| 222 | +.hub div.envelope::-webkit-scrollbar /*, | ||
| 217 | .hub ul#live-posts::-webkit-scrollbar, | 223 | .hub ul#live-posts::-webkit-scrollbar, |
| 218 | -.hub ul#mediation-posts::-webkit-scrollbar { | 224 | +.hub ul#mediation-posts::-webkit-scrollbar */ { |
| 219 | height: 15px; | 225 | height: 15px; |
| 220 | width: 15px; | 226 | width: 15px; |
| 221 | } | 227 | } |