]> git.mxchange.org Git - friendica.git/blobdiff - include/main.js
Merge branch 'chriscase-master'
[friendica.git] / include / main.js
index 0fe20955d3bd19e5d1277d3a4dfff3c63631a33b..abd097e54a07bcfd7442377823039f264b52e8b4 100644 (file)
@@ -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
                                        $('#pause').html('');
                                }
                        }
+// this is shift-home on FF, but $ on IE, disabling until I figure out why the diff.
+// update: incompatible usage of onKeyDown vs onKeyPress
+//                     if(event.keyCode == '36' && event.shiftKey == true) {
+//                             if(homebase !== undefined) {
+//                                     event.preventDefault();
+//                                     document.location = homebase;
+//                             }
+//                     }
                });                                     
        });
 
                $('#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);
+                               }
+                       },
+                       "json"  
+         );  
+         return false;  
+       }
+