From 21b3dc9c27be50e73944eaec97001ad1279400f1 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 25 Jul 2012 19:45:45 -0700 Subject: tie the main slider to ajax updates and buildCmd --- js/main.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'js/main.js') diff --git a/js/main.js b/js/main.js index 1feb7446e..1454dd0b5 100644 --- a/js/main.js +++ b/js/main.js @@ -327,13 +327,19 @@ function updateConvItems(mode,data) { in_progress = true; - var udargs = ((page_load) ? '/load' : ''); - page_load = false; + var update_url; - var update_url = 'update_' + src + udargs + '&p=' + profile_uid + '&page=' + profile_page + '&msie=' + ((msie) ? 1 : 0); + if(typeof buildCmd == 'function') { + update_url = buildCmd(); + } + else { + var udargs = ((page_load) ? '/load' : ''); + update_url = 'update_' + src + udargs + '&p=' + profile_uid + '&page=' + profile_page + '&msie=' + ((msie) ? 1 : 0); + } $.get(update_url,function(data) { - var update_mode = ((page_load) ? 'replace' : 'update'); + var update_mode = ((page_load) ? 'replace' : 'update'); + page_load = false; in_progress = false; updateConvItems(update_mode,data); }); -- cgit v1.2.3