removed: ezn patterns for rawcontent and ajaxcontent:
index_rawcontent.html, index_ajaxcontent.html now we have out_streams in Request and some special keyword in ezc templates for sending content to the specified streams changed: the way how winix answers to the client's browsers: info from Request class: winix answer send to the client's browser | | depending on send_bin_stream ------------------------------------------------- | | text answer binary answer | | depending on return_json sending out_bin_stream ------------------------------------ | | normal request ajax request | | sending out_streams[0] depending on return_info_only ------------------------------------------------------ | | generating JSON object from: generating JSON object only from info out_streams and info, e.g.: e.g.: { { info object serialized here } "stream_1": "some html content", "stream_2": "some other html content", "info": { info object serialized here } } note that out_streams[0] is not sent in JSON answers git-svn-id: svn://ttmath.org/publicrep/winix/trunk@937 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -20,13 +20,11 @@ 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
|
||||
|
||||
Patterns patterns; // all html patterns
|
||||
IndexPatterns index_patterns; // patterns for main index template (those from mountpoint)
|
||||
IndexPatterns index_patterns; // patterns for main index templates (those from mountpoint)
|
||||
// index_patterns uses patterns as a storage
|
||||
ChangePatterns change_patterns; // patterns for change_template mount option (storage is in 'patterns' too)
|
||||
PatternCacher pattern_cacher; // patterns for user items (files with an executable bit set)
|
||||
@@ -822,8 +820,6 @@ 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");
|
||||
|
||||
@@ -910,12 +906,6 @@ 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
|
||||
if( cur->request->IsParam(L"fullscreen") )
|
||||
index = patterns.Get(pat_index_fullscreen, locale.GetCurLang());
|
||||
else
|
||||
@@ -954,7 +944,7 @@ using namespace TemplatesFunctions;
|
||||
generator.SkipNewLine(gen_skip_new_line);
|
||||
generator.RecognizeSpecialChars(gen_use_special_chars);
|
||||
generator.SetMax(config->ezc_max_elements, config->ezc_max_loop_elements);
|
||||
generator.Generate(cur->request->page, *index);
|
||||
generator.Generate(cur->request->out_streams, *index);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -971,7 +961,10 @@ using namespace TemplatesFunctions;
|
||||
if( !empty_pars.empty() )
|
||||
empty_pars.clear();
|
||||
|
||||
Info info(cur->request->page, empty_pars, empty_string, empty_stream);
|
||||
// !! FIX ME
|
||||
// at the moment stream 0 is used
|
||||
// here should be something other
|
||||
Info info(cur->request->out_streams[0], empty_pars, empty_string, empty_stream);
|
||||
|
||||
info.iter = 0;
|
||||
info.res = false;
|
||||
@@ -988,7 +981,7 @@ using namespace TemplatesFunctions;
|
||||
generator.SkipNewLine(gen_skip_new_line);
|
||||
generator.RecognizeSpecialChars(gen_use_special_chars);
|
||||
generator.SetMax(config->ezc_max_elements, config->ezc_max_loop_elements);
|
||||
generator.Generate(cur->request->page, pattern);
|
||||
generator.Generate(cur->request->out_streams, pattern);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user