added: to Request:

// used as a JSON output (when ajax_serializer is defined)
       // it will be serialized and have at least:
       // 'content' string - the whole html content
       // 'http_status' integer - http status code (e.g. 200)
       PT::Space ajax;
 
       // if not null then the request will have a JSON as an output
       PT::SpaceToJSON * ajax_serializer;




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@871 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2012-08-08 16:04:48 +00:00
parent b5c155b927
commit 51d95b49a0
19 changed files with 1520 additions and 1370 deletions

View File

@@ -21,6 +21,7 @@ namespace TemplatesFunctions
size_t pat_index; // main index pattern
size_t pat_index_fullscreen; // an empty pattern (without menus etc. but with all rest html tags, used for ckeditor images browser)
size_t pat_index_rawcontent; // completly empty pattern (only content, without html tags such as <html>, <body>)
size_t pat_index_ajaxcontent; // ajax pattern (only content, similar as pat_index_rawcontent)
size_t pat_err_404; // 404 error
size_t pat_err_per_denied; // permission denied error
@@ -768,6 +769,7 @@ using namespace TemplatesFunctions;
pat_index = patterns.Add(config->templates_index);
pat_index_fullscreen = patterns.Add(L"index_fullscreen.html");
pat_index_rawcontent = patterns.Add(L"index_rawcontent.html");
pat_index_ajaxcontent = patterns.Add(L"index_ajaxcontent.html");
pat_err_404 = patterns.Add(L"err_404.html");
pat_err_per_denied = patterns.Add(L"err_per_denied.html");
@@ -854,6 +856,9 @@ using namespace TemplatesFunctions;
Ezc::Pattern * index = 0;
if( cur->request->ajax_serializer )
index = patterns.Get(pat_index_ajaxcontent, locale.GetCurLang());
else
if( cur->request->IsParam(L"rawcontent") )
index = patterns.Get(pat_index_rawcontent, locale.GetCurLang());
else