added a new winix function "vim" - an editor based on the WYMeditor
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@673 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
49
html/fun_vim.html
Executable file
49
html/fun_vim.html
Executable file
@@ -0,0 +1,49 @@
|
||||
[if item_is]<h1>{edit}</h1>[else]<h1>{add}</h1>[end]
|
||||
|
||||
[include "error.html"]
|
||||
|
||||
<form id="additem" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]vim">
|
||||
<fieldset>
|
||||
<legend>{form_emacs_legend}</legend>
|
||||
|
||||
[if mount_type_is "cms"]
|
||||
<p class="withnext">{title}:</p>
|
||||
<input class="edit" type="text" name="subject" value="[item_subject]">
|
||||
|
||||
<p class="withnext">{suggested_url}:</p>
|
||||
<input class="edit" type="text" name="url" value="[item_url]">
|
||||
[end]
|
||||
|
||||
[if-any mount_type_is "thread" mount_thread_arg_is "subject"]
|
||||
<p class="withnext">{title}:</p>
|
||||
<input class="edit" type="text" name="subject" value="[item_subject]">
|
||||
|
||||
<p class="withnext">{suggested_url}:</p>
|
||||
<input class="edit" type="text" name="url" value="[item_url]">
|
||||
[end]
|
||||
|
||||
[if mount_type_is "cms"]<p class="withnext">{form_emacs_content_cms}</p>[end]
|
||||
[if mount_type_is "thread"]<p class="withnext">{form_emacs_content_thread}</p>[end]
|
||||
[if mount_type_is "ticket"]<p class="withnext">{form_emacs_content_ticket}</p>[end]
|
||||
|
||||
<textarea class="multitext" rows="[if mount_type_is "cms"]30[else]10[end]" cols="60" name="itemcontent">[item_content]</textarea>
|
||||
|
||||
<input type="hidden" name="contenttype" value="2">
|
||||
|
||||
[if winix_function_param_is "full"]
|
||||
[else]
|
||||
[end]
|
||||
|
||||
[if-no user_logged]
|
||||
<p class="withnext">{nick}:</p>
|
||||
<input class="edit" type="text" name="guestname" value="[item_guest_name]">
|
||||
|
||||
<p class="withnext">{rebus_how_is_it} [rebus_question]?</p>
|
||||
<input class="edit" type="text" name="rebus">
|
||||
[end]
|
||||
|
||||
<input class="submit" type="submit" value="[if item_is]{change}[else]{add}[end]">
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
|
||||
@@ -7,14 +7,5 @@
|
||||
<link rel="stylesheet" href="[doc_base_url_static]/winix/winix.css" type="text/css">
|
||||
<link rel="shortcut icon" href="[doc_base_url_static]/favicon.ico">
|
||||
|
||||
[if winix_function_is "ckeditor"]
|
||||
<script type="text/javascript" src="[doc_base_url_common]/ckeditor/ckeditor.js"></script>
|
||||
[end]
|
||||
|
||||
[# in the future tinymce will be placed in doc_base_url_common]
|
||||
[if winix_function_is "tinymce"]
|
||||
<script type="text/javascript" src="[doc_base_url_static]/tiny_mce/tiny_mce.js"></script>
|
||||
<script type="text/javascript" src="[doc_base_url_static]/tinymce.js"></script>
|
||||
[end]
|
||||
|
||||
[include "index_head_functions_add.html"]
|
||||
</head>
|
||||
|
||||
33
html/index_head_functions_add.html
Executable file
33
html/index_head_functions_add.html
Executable file
@@ -0,0 +1,33 @@
|
||||
[# other stuff needed by a specific function]
|
||||
|
||||
[if winix_function_is "ckeditor"]
|
||||
<script type="text/javascript" src="[doc_base_url_common]/ckeditor/ckeditor.js"></script>
|
||||
[end]
|
||||
|
||||
|
||||
[# in the future tinymce will be placed in doc_base_url_common]
|
||||
[if winix_function_is "tinymce"]
|
||||
<script type="text/javascript" src="[doc_base_url_static]/tiny_mce/tiny_mce.js"></script>
|
||||
<script type="text/javascript" src="[doc_base_url_static]/tinymce.js"></script>
|
||||
[end]
|
||||
|
||||
|
||||
[if winix_function_is "vim"]
|
||||
[# this editor doesn't work on different domains by default, solution: http://forum.wymeditor.org/forum/viewtopic.php?f=2&t=731&p=2507#p2504 ]
|
||||
[# you should add one file to winix: wymiframe.html ]
|
||||
|
||||
<script type="text/javascript" src="[doc_base_url_common]/jquery-1.4.2.min.js"></script>
|
||||
<script type="text/javascript" src="[doc_base_url_common]/wymeditor/jquery.wymeditor.min.js"></script>
|
||||
<script type="text/javascript" src="[doc_base_url_common]/wymeditor/lang/en.js"></script>
|
||||
<script type="text/javascript" src="[doc_base_url_common]/wymeditor/skins/default/skin.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="[doc_base_url_common]/wymeditor/skins/default/skin.css" />
|
||||
<script type="text/javascript">jQuery(function() \{ jQuery("textarea").wymeditor(\{ basePath: "[doc_base_url_common]/wymeditor/", iframeBasePath: "[doc_base_url]/var/", updateSelector : "form", updateEvent: 'submit' \}); \});</script>
|
||||
|
||||
[end]
|
||||
|
||||
|
||||
[if winix_has_plugin "stats"]
|
||||
[include "stats_info.html"]
|
||||
[end]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user