changed: the way how raw template is set

option for setting raw template from 'emacs' function has been removed
         now we have index_raw.html template and it can be set from 'template' function
removed: template index_fullscreen.html
changed: some work in miscspace (changed: space_list_tab, space_list_tab_value and space_list_tab_has_next)
fixed:   main index template could not be set through 'template' function





git-svn-id: svn://ttmath.org/publicrep/winix/trunk@1039 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2016-04-04 16:02:36 +00:00
parent abd1500f07
commit 240bf4dc5d
21 changed files with 105 additions and 445 deletions

View File

@@ -601,8 +601,6 @@ void App::CreateJSONAnswer()
// !! IMPROVE ME change to a better name
void App::MakePage()
{
bool sent = false;
if( cur.request->page_generated || !cur.request->redirect_to.empty() || !cur.request->x_sendfile.empty() )
return;
@@ -610,27 +608,7 @@ bool sent = false;
cur.request->gen_skip_new_line,
cur.request->gen_use_special_chars);
if( cur.request->is_item && cur.request->item.file_type == WINIX_ITEM_FILETYPE_NONE &&
cur.request->item.content_type == Item::ct_raw && cur.request->status == WINIX_ERR_OK && cur.request->function )
{
if( cur.request->function == &functions.fun_cat )
{
TemplatesFunctions::item_print_content(cur.request->out_main_stream,
cur.request->item.content, cur.request->item.content_type);
sent = true;
}
else
if( cur.request->function == &functions.fun_run )
{
templates.GenerateRunRaw();
sent = true;
}
}
if( !sent )
{
templates.Generate();
}
templates.Generate();
}
@@ -1182,13 +1160,6 @@ void App::SendHeaders()
template<class RawType>
DbTextStream::RawText<RawType> R(const RawType & par)
{
return DbTextStream::RawText<RawType>(par);
}
void App::SendCookies()
{
PT::Space::TableSingle::iterator i;
@@ -1248,14 +1219,11 @@ void App::PrepareHeaders(bool compressing, int compress_encoding, Header header,
void App::FilterContent()
{
Request & req = *cur.request;
bool raw = req.is_item && req.item.content_type == Item::ct_raw &&
req.status == WINIX_ERR_OK && req.function &&
(req.function == &functions.fun_cat || req.function == &functions.fun_run);
bool filter_main_stream = false;
bool filter_json = false;
if( config.html_filter && !req.send_bin_stream && !raw )
if( config.html_filter && !req.send_bin_stream )
{
if( req.return_json )
{