1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-03 15:27:42 +02:00

[ticket/10328] Added a JSON class.

The JSON class adds a consistent way to send JSON to the client, making
it perfect for AJAX (jQuery automatically parses it).

PHPBB3-10328
This commit is contained in:
Callum Macrae
2011-08-19 10:45:03 +01:00
committed by Igor Wiedler
parent 94172b54dd
commit dce38f44de
5 changed files with 63 additions and 9 deletions

View File

@@ -216,8 +216,6 @@ phpbb.ajaxify = function(options, refresh, callback) {
function return_handler(res)
{
res = JSON.parse(res);
if (typeof res.S_CONFIRM_ACTION === 'undefined')
{
/**
@@ -243,7 +241,6 @@ phpbb.ajaxify = function(options, refresh, callback) {
path = res.S_CONFIRM_ACTION;
phpbb.loading_alert();
$.post(path, data + '&confirm=' + res.YES_VALUE, function(res) {
res = JSON.parse(res);
var alert = phpbb.alert(res.MESSAGE_TITLE, res.MESSAGE_TEXT);
callback = phpbb.ajax_callbacks[callback];
if (typeof callback === 'function')