From 141b4b67b333c37cf96dcad03fa8c8e9fca768b9 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 27 Dec 2010 12:57:03 -0800 Subject: [PATCH] Better UI for bookmark popup --- plugins/Bookmark/bookmarkpopup.js | 23 +++++++++++++++++++++++ plugins/Bookmark/bookmarkpopup.php | 6 ++++++ 2 files changed, 29 insertions(+) create mode 100644 plugins/Bookmark/bookmarkpopup.js 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')); + } } -- 2.39.5