fixed: rm winix function returned incorrectly formated json when using jquery upload (delete file button)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1006 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
parent
901663b145
commit
ae2a885d6c
|
@ -5,7 +5,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2008-2014, Tomasz Sowa
|
* Copyright (c) 2008-2015, Tomasz Sowa
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -493,18 +493,20 @@ void Rm::Clear()
|
||||||
|
|
||||||
void Rm::CreateJSON(bool status)
|
void Rm::CreateJSON(bool status)
|
||||||
{
|
{
|
||||||
auto & out = cur->request->out_streams[0];
|
using TemplatesFunctions::R;
|
||||||
|
PT::WTextStream buf;
|
||||||
|
|
||||||
out << "{\"files\": [{\"";
|
JSONescape(buf, cur->request->item.url);
|
||||||
JSONescape(out, cur->request->item.url);
|
|
||||||
out << "\": ";
|
auto & out = cur->request->out_streams[0];
|
||||||
|
out << R("{\"files\": [{\"") << R(buf) << R("\": ");
|
||||||
|
|
||||||
if( status )
|
if( status )
|
||||||
out << "true";
|
out << R("true");
|
||||||
else
|
else
|
||||||
out << "false";
|
out << R("false");
|
||||||
|
|
||||||
out << "}]}";
|
out << R("}]}");
|
||||||
|
|
||||||
cur->request->page_generated = true;
|
cur->request->page_generated = true;
|
||||||
cur->request->use_html_filter[0] = false;
|
cur->request->use_html_filter[0] = false;
|
||||||
|
|
Loading…
Reference in New Issue