mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-11 00:40:56 +02:00
[ticket/10291] AJAXified quick reply form.
Also changed the show quick reply button to a button, not a submit - it was affecting the behaviour of phpbb.ajaxify. PHPBB3-10291
This commit is contained in:
committed by
Igor Wiedler
parent
57fa45b0c4
commit
b9bbbc3ede
@ -1,4 +1,4 @@
|
|||||||
<form method="post" action="{U_QR_ACTION}">
|
<form method="post" action="{U_QR_ACTION}" data-ajax="qr-submit" data-refresh="true">
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner"><span class="corners-top"><span></span></span>
|
||||||
<h2>{L_QUICKREPLY}</h2>
|
<h2>{L_QUICKREPLY}</h2>
|
||||||
@ -15,7 +15,7 @@
|
|||||||
{S_FORM_TOKEN}
|
{S_FORM_TOKEN}
|
||||||
{QR_HIDDEN_FIELDS}
|
{QR_HIDDEN_FIELDS}
|
||||||
<input type="submit" accesskey="s" tabindex="6" name="post" value="{L_SUBMIT}" class="button1" />
|
<input type="submit" accesskey="s" tabindex="6" name="post" value="{L_SUBMIT}" class="button1" />
|
||||||
<input type="submit" accesskey="f" tabindex="7" name="full_editor" value="{L_FULL_EDITOR}" class="button2" />
|
<input type="submit" accesskey="f" tabindex="7" name="full_editor" value="{L_FULL_EDITOR}" class="button2" data-ajax="false" />
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
<span class="corners-bottom"><span></span></span></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -103,6 +103,11 @@ phpbb.ajaxify = function(options, refresh, callback) {
|
|||||||
$(selector).click(function() {
|
$(selector).click(function() {
|
||||||
var act, data, path, that = this;
|
var act, data, path, that = this;
|
||||||
|
|
||||||
|
if ($(this).data('ajax') == false)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
function return_handler(res)
|
function return_handler(res)
|
||||||
{
|
{
|
||||||
res = JSON.parse(res);
|
res = JSON.parse(res);
|
||||||
@ -157,6 +162,10 @@ phpbb.ajaxify = function(options, refresh, callback) {
|
|||||||
act = act[1]
|
act = act[1]
|
||||||
data += '&action=' + act;
|
data += '&action=' + act;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
data += '&' + this.name + '=' + this.value;
|
||||||
|
}
|
||||||
|
|
||||||
if (run_exception && options.exception($(this).parents('form'), act, data))
|
if (run_exception && options.exception($(this).parents('form'), act, data))
|
||||||
{
|
{
|
||||||
@ -213,6 +222,10 @@ phpbb.add_ajax_callback('post_delete', function(el) {
|
|||||||
$(el).parents((act === 'approve') ? '.rules' : '.post').fadeOut(function() {
|
$(el).parents((act === 'approve') ? '.rules' : '.post').fadeOut(function() {
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
});
|
});
|
||||||
|
}).add_ajax_callback('qr-submit', function(el) {
|
||||||
|
$(el).parents('form').fadeOut(function() {
|
||||||
|
$(this).remove();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user