mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Added possibillity to delete attachments in admin page.
This commit is contained in:
parent
72cd9a3722
commit
7c43feefbe
10 changed files with 133 additions and 19 deletions
|
@ -256,12 +256,9 @@ class AjaxUI {
|
|||
console.debug('Links registered!');
|
||||
}
|
||||
|
||||
/**
|
||||
* Register all forms for loading via ajax.
|
||||
*/
|
||||
public registerForm()
|
||||
protected getFormOptions() : JQueryFormOptions
|
||||
{
|
||||
let options : JQueryFormOptions = {
|
||||
return {
|
||||
success: this.onAjaxComplete,
|
||||
beforeSerialize: function() : boolean {
|
||||
|
||||
|
@ -285,12 +282,34 @@ class AjaxUI {
|
|||
return true;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Register all forms for loading via ajax.
|
||||
*/
|
||||
public registerForm()
|
||||
{
|
||||
|
||||
let options = this.getFormOptions();
|
||||
|
||||
$('form').not('[data-no-ajax]').ajaxForm(options);
|
||||
|
||||
console.debug('Forms registered!');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Submits the given form via ajax.
|
||||
* @param form The form that will be submmitted.
|
||||
*/
|
||||
public submitForm(form)
|
||||
{
|
||||
let options = ajaxUI.getFormOptions();
|
||||
|
||||
$(form).ajaxSubmit(options);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Show the progressbar
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue