mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-11 22:08:54 +00:00
[ticket/10291] Fixed a bug in the quick reply AJAX.
It wasn't submitting, as jQuery was ignoring the submit value. PHPBB3-10291
This commit is contained in:
parent
e73426fe26
commit
ba56e34b6d
1 changed files with 19 additions and 1 deletions
|
@ -251,7 +251,7 @@ phpbb.ajaxify = function(options) {
|
||||||
elements.bind(event_name, function() {
|
elements.bind(event_name, function() {
|
||||||
var action, method, data, that = this, $this = $(this);
|
var action, method, data, that = this, $this = $(this);
|
||||||
|
|
||||||
if (!$this.attr('data-ajax'))
|
if ($this.find('input[type="submit"][data-clicked]').attr('data-ajax') === 'false')
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -358,6 +358,15 @@ phpbb.ajaxify = function(options) {
|
||||||
action = $this.attr('action').replace('&', '&');
|
action = $this.attr('action').replace('&', '&');
|
||||||
data = $this.serializeArray();
|
data = $this.serializeArray();
|
||||||
method = $this.attr('method') || 'GET';
|
method = $this.attr('method') || 'GET';
|
||||||
|
|
||||||
|
if ($this.find('input[type="submit"][data-clicked]'))
|
||||||
|
{
|
||||||
|
var submit = $this.find('input[type="submit"][data-clicked]');
|
||||||
|
data.push({
|
||||||
|
name: submit.attr('name'),
|
||||||
|
value: submit.val()
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -386,6 +395,15 @@ phpbb.ajaxify = function(options) {
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (is_form) {
|
||||||
|
elements.find('input:submit').click(function () {
|
||||||
|
var $this = $(this);
|
||||||
|
|
||||||
|
$this.siblings('[data-clicked]').removeAttr('data-clicked');
|
||||||
|
$this.attr('data-clicked', 'true');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue