diff --git a/plugins/Bookmark/bookmarkpopup.js b/plugins/Bookmark/bookmarkpopup.js new file mode 100644 index 0000000000..29f314ed06 --- /dev/null +++ b/plugins/Bookmark/bookmarkpopup.js @@ -0,0 +1,23 @@ +$(document).ready( + function() { + var form = $('#form_new_bookmark'); + form.append(''); + form.ajaxForm({dataType: 'xml', + timeout: '60000', + beforeSend: function(formData) { + form.addClass('processing'); + form.find('#submit').addClass('disabled'); + }, + error: function (xhr, textStatus, errorThrown) { + form.removeClass('processing'); + form.find('#submit').removeClass('disabled'); + self.close(); + }, + success: function(data, textStatus) { + form.removeClass('processing'); + form.find('#submit').removeClass('disabled'); + self.close(); + }}); + + } +); \ No newline at end of file diff --git a/plugins/Bookmark/bookmarkpopup.php b/plugins/Bookmark/bookmarkpopup.php index 2e6d457a83..24ed79612b 100644 --- a/plugins/Bookmark/bookmarkpopup.php +++ b/plugins/Bookmark/bookmarkpopup.php @@ -103,4 +103,10 @@ class BookmarkpopupAction extends NewbookmarkAction function showFooter() { } + + function showScripts() + { + parent::showScripts(); + $this->script(common_path('plugins/Bookmark/bookmarkpopup.js')); + } }