]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - plugins/Bookmark/js/bookmark.js
This util.min.js is pining for the fjords.
[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         SN.Init.CheckBoxes();
15         $('fieldset fieldset label').inFieldLabels({ fadeOpacity:0 });
16     }
17 }
18
19 $(document).ready(function() {
20
21     // Stop normal live event stuff
22     $('form.ajax').die();
23     $('form.ajax input[type=submit]').die();
24
25     // Make the bookmark submit super special
26     $('#form_initial_bookmark').bind('submit', function(e) {
27         Bookmark.BookmarkXHR($(this));
28         e.stopPropagation();
29         return false;
30     });
31
32     // Restore live event stuff to other forms & submit buttons
33     SN.Init.AjaxForms();
34
35 });