Better UI for bookmark popup
This commit is contained in:
parent
45b2059cd8
commit
141b4b67b3
23
plugins/Bookmark/bookmarkpopup.js
Normal file
23
plugins/Bookmark/bookmarkpopup.js
Normal 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();
|
||||
}});
|
||||
|
||||
}
|
||||
);
|
@ -103,4 +103,10 @@ class BookmarkpopupAction extends NewbookmarkAction
|
||||
function showFooter()
|
||||
{
|
||||
}
|
||||
|
||||
function showScripts()
|
||||
{
|
||||
parent::showScripts();
|
||||
$this->script(common_path('plugins/Bookmark/bookmarkpopup.js'));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user