X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Fmain.js;h=824f2dfdfcce3843880a2e5a83ee3bc5dfd46a28;hb=0bf8e418a8b8c57607ed8a52cff6b3ac53d38d05;hp=63b34bd21aa0bd9acc889541ad974595708d51bf;hpb=d8877b88d6c26e29019312f02297411817692361;p=friendica.git diff --git a/include/main.js b/include/main.js index 63b34bd21a..824f2dfdfc 100644 --- a/include/main.js +++ b/include/main.js @@ -29,6 +29,7 @@ $(document).ready(function() { $.ajaxSetup({cache: false}); + msie = $.browser.msie ; NavUpdate(); // Allow folks to stop the ajax page updates with the pause/break key @@ -107,7 +108,10 @@ prev = 'live-' + src; in_progress = true; - $.get('update_' + src + '?p=' + profile_uid + '&msie=' + ((msie) ? 1 : 0),function(data) { + var udargs = ((netargs.length) ? '/' + netargs : ''); + var update_url = 'update_' + src + udargs + '?p=' + profile_uid + '&page=' + profile_page + '&msie=' + ((msie) ? 1 : 0); + + $.get(update_url,function(data) { in_progress = false; $('.wall-item-outside-wrapper',data).each(function() { var ident = $(this).attr('id'); @@ -210,3 +214,27 @@ $('#panel').hide(); } + function post_comment(id) { + $.post( + "item", + $("#comment-edit-form-" + id).serialize(), + function(data) { + if(data.success) { + $("#comment-edit-wrapper-" + id).hide(); + $("#comment-edit-text-" + id).val(''); + var tarea = document.getElementById("comment-edit-text-" + id); + if(tarea) + commentClose(tarea,id); + if(timer) clearTimeout(timer); + timer = setTimeout(NavUpdate,10); + } + if(data.reload) { + window.location.href=data.reload; + } + + }, + "json" + ); + return false; + } +