Better UI for bookmark popup

This commit is contained in:
Evan Prodromou 2010-12-27 12:57:03 -08:00
parent 45b2059cd8
commit 141b4b67b3
2 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,23 @@
$(document).ready(
function() {
var form = $('#form_new_bookmark');
form.append('<input type="hidden" name="ajax" value="1"/>');
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();
}});
}
);

View File

@ -103,4 +103,10 @@ class BookmarkpopupAction extends NewbookmarkAction
function showFooter()
{
}
function showScripts()
{
parent::showScripts();
$this->script(common_path('plugins/Bookmark/bookmarkpopup.js'));
}
}