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:
2011-06-24 20:53:21 +00:00
parent 1d6ff73aad
commit 06f42dd9cb
58 changed files with 2462 additions and 1685 deletions

View File

@@ -2,7 +2,7 @@
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2010, Tomasz Sowa
* Copyright (c) 2010-2011, Tomasz Sowa
* All rights reserved.
*
*/
@@ -15,41 +15,6 @@
namespace Fun
{
// WYMeditor doesn't work on different domains by default,
// solution: http://forum.wymeditor.org/forum/viewtopic.php?f=2&t=731&p=2507#p2504
// we add one file to winix: /var/wymiframe.html
// in the future this will be removed
static const char vim_wymiframe[] =
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n"
"<!--\n"
" * WYMeditor : what you see is What You Mean web-based editor\n"
" * Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/\n"
" * Dual licensed under the MIT (MIT-license.txt)\n"
" * and GPL (GPL-license.txt) licenses.\n"
" *\n"
" * For further information visit:\n"
" * http://www.wymeditor.org/\n"
" *\n"
" * File Name:\n"
" * wymiframe.html\n"
" * Iframe used by designMode.\n"
" * See the documentation for more info.\n"
" *\n"
" * File Authors:\n"
" * Jean-Francois Hovinne (jf.hovinne a-t wymeditor dotorg)\n"
"-->\n"
"<html>\n"
"<head>\n"
"<title>WYMeditor iframe</title>\n"
"<meta http-equiv=\"X-UA-Compatible\" content=\"IE=EmulateIE7\" />\n"
"<link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"[doc_base_url_common]/wymeditor/iframe/default/wymiframe.css\" />\n"
"</head>\n"
"<body class=\"wym_iframe\"></body>\n"
"</html>\n";
Vim::Vim()
{
fun.url = L"vim";
@@ -58,29 +23,11 @@ Vim::Vim()
void Vim::Init()
{
Item * var = system->dirs.CreateVarDir();
// WYMeditor doesn't work on different domains by default,
// solution: http://forum.wymeditor.org/forum/viewtopic.php?f=2&t=731&p=2507#p2504
// we add one file to winix: /var/wymiframe.html
if( var )
{
Item temp;
if( db->GetItem(var->id, L"wymiframe.html", temp) == WINIX_ERR_NO_ITEM )
{
Item v;
v.parent_id = var->id;
v.user_id = -1;
v.group_id = -1;
v.privileges = 0755;
v.subject = L"wymiframe.html";
v.url = L"wymiframe.html";
v.type = Item::file;
v.content_type = Item::ct_raw;
AssignString(vim_wymiframe, v.content);
system->AddFile(v, false);
}
}
system->AddCommonFileToVar(L"winix/wymiframe.html", L"wymiframe.html");
}