mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-03 17:59:21 +02:00
fix ajax post logic to include form elements
This commit is contained in:
parent
6b40e833ea
commit
a03b53485d
2 changed files with 2 additions and 6 deletions
|
@ -58,11 +58,6 @@ class Ajax {
|
||||||
$source_txt = "'#$source'";
|
$source_txt = "'#$source'";
|
||||||
}
|
}
|
||||||
|
|
||||||
// If it's a post then we need to stop events
|
|
||||||
if ($post) {
|
|
||||||
$action = 'Event.stop(e); ' . $action;
|
|
||||||
}
|
|
||||||
|
|
||||||
$observe = "<script type=\"text/javascript\">";
|
$observe = "<script type=\"text/javascript\">";
|
||||||
$observe .= "$($source_txt).$method(function(e){" . $action . ";});";
|
$observe .= "$($source_txt).$method(function(e){" . $action . ";});";
|
||||||
$observe .= "</script>";
|
$observe .= "</script>";
|
||||||
|
|
|
@ -26,7 +26,8 @@ $(document).ajaxComplete(function () {
|
||||||
// ajaxPost
|
// ajaxPost
|
||||||
// Post the contents of a form.
|
// Post the contents of a form.
|
||||||
function ajaxPost(url, input, source) {
|
function ajaxPost(url, input, source) {
|
||||||
$.ajax(url, { success: processContents, type: 'post', data: input });
|
//$('#' + input)
|
||||||
|
$.ajax(url, { success: processContents, type: 'post', data: $('#'+input).serialize() });
|
||||||
} // ajaxPost
|
} // ajaxPost
|
||||||
|
|
||||||
// ajaxPut
|
// ajaxPut
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue