changed: winix 'upload' function is a file manager now
we're using an jquery upload plugin
added: Item struct has new rows: hash, hash_type, file_size, sort_index
added: css mount parameter
you can specify css files there, and javascript wysiwyg editors
(ckeditor, tinymce) can make use of it
changed: post parsers can parse post variables with the same name
(a postfix is added in such a case)
added: common_dir parameter to the config
this is a path to common directory (directory with common static files)
it is needed to the 'css' mount parameter
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@746 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -2,14 +2,14 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2010, Tomasz Sowa
|
||||
* Copyright (c) 2008-2011, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "templates.h"
|
||||
#include "../core/request.h"
|
||||
#include "../core/misc.h"
|
||||
#include "core/request.h"
|
||||
#include "core/misc.h"
|
||||
|
||||
|
||||
|
||||
@@ -78,6 +78,65 @@ void doc_current_url(Info & i)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
static size_t doc_css_index = 0;
|
||||
|
||||
|
||||
/*
|
||||
cur->session->last_css is set by some javascript wysiwyg editors (ckeditor, tinymce)
|
||||
*/
|
||||
void doc_css_tab(Info & i)
|
||||
{
|
||||
doc_css_index = i.iter;
|
||||
i.res = doc_css_index < cur->session->last_css.size();
|
||||
}
|
||||
|
||||
|
||||
void doc_css_tab_file(Info & i)
|
||||
{
|
||||
if( doc_css_index < cur->session->last_css.size() )
|
||||
i.out << cur->session->last_css[doc_css_index];
|
||||
}
|
||||
|
||||
|
||||
void doc_css_tab_file_is_global(Info & i)
|
||||
{
|
||||
if( doc_css_index < cur->session->last_css.size() )
|
||||
i.res = IsSubString(L"http://", cur->session->last_css[doc_css_index].c_str()) ||
|
||||
IsSubString(L"https://", cur->session->last_css[doc_css_index].c_str());
|
||||
}
|
||||
|
||||
|
||||
void doc_css_tab_has_next(Info & i)
|
||||
{
|
||||
i.res = (doc_css_index + 1 < cur->session->last_css.size());
|
||||
}
|
||||
|
||||
|
||||
void doc_css_is_empty(Info & i)
|
||||
{
|
||||
i.res = cur->session->last_css.empty();
|
||||
}
|
||||
|
||||
|
||||
void doc_css_is_one(Info & i)
|
||||
{
|
||||
i.res = cur->session->last_css.size() == 1;
|
||||
}
|
||||
|
||||
|
||||
void doc_css_more_than_one(Info & i)
|
||||
{
|
||||
i.res = cur->session->last_css.size() > 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace TemplatesFunctions
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user