]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - plugins/Bookmark/js/bookmark.js
ce246ee8be8cec3be0aae37e23c81ab5c829ac04
[quix0rs-gnu-social.git] / plugins / Bookmark / js / bookmark.js
1 var Bookmark = {
2
3     // Special XHR that sends in some code to be run
4     // when the full bookmark form gets loaded
5     BookmarkXHR: function(form)
6     {
7         SN.U.FormXHR(form, Bookmark.InitBookmarkForm);
8         return false;
9     },
10
11     // Special initialization function just for the
12     // second step in the bookmarking workflow
13     InitBookmarkForm: function() {
14         alert('Gar!');
15
16         // Put fancy stuff here
17
18     }
19 }
20
21 $(document).ready(function() {
22
23     // Stop normal live event stuff
24     $('form.ajax').die();
25     $('form.ajax input[type=submit]').die();
26
27     // Make the bookmark submit super special
28     $('#form_initial_bookmark').bind('submit', function(e) {
29         Bookmark.BookmarkXHR($(this));
30         e.stopPropagation();
31         return false;
32     });
33
34     // Restore live event stuff to other forms & submit buttons
35     SN.Init.AjaxForms();
36
37 });