diff options
-rw-r--r-- | view/js/main.js | 51 |
1 files changed, 20 insertions, 31 deletions
diff --git a/view/js/main.js b/view/js/main.js index 26cf12b47..191f24b59 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -386,8 +386,6 @@ function updateConvItems(mode,data) { - - if(mode === 'update') { prev = 'threads-begin'; @@ -546,14 +544,6 @@ function updateConvItems(mode,data) { collapseHeight(); } - - // $(".wall-item-body").each(function() { - // if(! $(this).hasClass('divmore')) { - // $(this).divgrow({ initialHeight: 400, showBrackets: false }); - // $(this).addClass('divmore'); - // } - //}); - } @@ -589,30 +579,29 @@ function updateConvItems(mode,data) { in_progress = true; var update_url; + var update_mode; -// if(typeof buildCmd == 'function') { - if(scroll_next) { - bParam_page = next_page; - page_load = true; - } - else { - bParam_page = 1; - } - update_url = buildCmd(); -// } -// else { -// page_load = false; -// var udargs = ((page_load) ? '/load' : ''); -// update_url = 'update_' + src + udargs + '&p=' + profile_uid + '&page=' + profile_page + '&msie=' + ((msie) ? 1 : 0); -// } - - if(page_load) + if(scroll_next) { + bParam_page = next_page; + page_load = true; + } + else { + bParam_page = 1; + } + + update_url = buildCmd(); + + if(page_load) { $("#page-spinner").spin('small'); + if(bParam_page == 1) + update_mode = 'replace'; + else + update_mode = 'append'; + } + else + update_mode = 'update'; $.get(update_url,function(data) { - var update_mode = ((page_load && bParam_page == 1) ? 'replace' : 'update'); - if(scroll_next) - update_mode = 'append'; page_load = false; scroll_next = false; updateConvItems(update_mode,data); @@ -627,7 +616,7 @@ function updateConvItems(mode,data) { // As it turns out this causes a bit of an inefficiency // as we're pinging twice for every update, once before // and once after. A btter way to do this is to rewrite - // NavUpdate and perhpas LiveUpdate so that we check for + // NavUpdate and perhaps LiveUpdate so that we check for // post updates first and only call the notification ping // once. |