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:
@@ -1,15 +1,49 @@
|
||||
|
||||
[if winix_function_param_is "ckeditor_upload"]
|
||||
<script type="text/javascript">window.parent.CKEDITOR.tools.callFunction([upload_ckeditor_funnum], '[item_link]');</script>
|
||||
[else]
|
||||
[end]
|
||||
|
||||
|
||||
|
||||
[if winix_function_param_is "jquery_upload"]
|
||||
\[
|
||||
[for item_tab]
|
||||
\{
|
||||
"name":"[item_tab_url]",
|
||||
"size":[item_tab_file_size],
|
||||
"url":"[item_tab_link]",
|
||||
[if item_tab_filetype_is_image]"thumbnail_url":"[if item_tab_has_thumb][item_tab_link]/-/thumb[else][item_tab_link][end]",[end]
|
||||
"delete_url":"[item_tab_link]/rm/jquery_upload",
|
||||
"delete_type":"POST"
|
||||
\}
|
||||
[if item_tab_has_next],[end]
|
||||
|
||||
[end]
|
||||
\]
|
||||
[end]
|
||||
|
||||
|
||||
[if-any-no winix_function_param_is "ckeditor_upload" winix_function_param_is "jquery_upload"]
|
||||
<h1>{upload_header}</h1>
|
||||
|
||||
[include "error.html"]
|
||||
|
||||
<form id="additem" method="post" action="[doc_base_url][dir][if-one item_is][item_url]/[end]upload" enctype="multipart/form-data">
|
||||
|
||||
<div id="fileupload">
|
||||
<form id="additem" method="post" action="[doc_base_url][dir]upload" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<legend>{upload_form_legend}</legend>
|
||||
|
||||
<div class="fileupload-buttonbar">
|
||||
<label class="fileinput-button">
|
||||
<span>{upload_add_files}</span>
|
||||
<input type="file" name="fileupload" multiple>
|
||||
</label>
|
||||
<button type="submit" class="start">{upload_start_upload}</button>
|
||||
<button type="reset" class="cancel">{upload_cancel_upload}</button>
|
||||
<button type="button" class="delete">{upload_delete_files}</button>
|
||||
</div>
|
||||
|
||||
[if false]
|
||||
[if winix_function_param_is "multi"]
|
||||
|
||||
<p class="withnext">{upload_form_file_multi}</p>
|
||||
@@ -33,7 +67,7 @@
|
||||
[include "fun_emacs_post.html"]
|
||||
|
||||
[end]
|
||||
|
||||
[end]
|
||||
[if-no user_logged]
|
||||
<p class="withnext">{nick}:</p>
|
||||
<input class="edit" type="text" name="guestname" value="[item_guest_name]">
|
||||
@@ -42,8 +76,77 @@
|
||||
<input class="edit" type="text" name="rebus">
|
||||
[end]
|
||||
|
||||
<input class="submit" type="submit" value="{upload_submit}">
|
||||
[if false]<input class="submit" type="submit" value="{upload_submit}">[end]
|
||||
</fieldset>
|
||||
</form>
|
||||
<div class="fileupload-content">
|
||||
<table class="files"></table>
|
||||
<div class="fileupload-progressbar"></div>
|
||||
</div>
|
||||
|
||||
<script id="template-upload" type="text/x-jquery-tmpl">
|
||||
<tr class="template-upload\{\{if error\}\} ui-state-error\{\{/if\}\}">
|
||||
<td class="preview"></td>
|
||||
<td class="name">$\{name\}</td>
|
||||
<td class="size">$\{sizef\}</td>
|
||||
\{\{if error\}\}
|
||||
<td class="error" colspan="2">{upload_error}:
|
||||
\{\{if error === 'maxFileSize'\}\}{upload_file_too_big}
|
||||
\{\{else error === 'minFileSize'\}\}{upload_file_too_small}
|
||||
\{\{else error === 'acceptFileTypes'\}\}{upload_filetype_not_allowed}
|
||||
\{\{else error === 'maxNumberOfFiles'\}\}{upload_max_files_exceeded}
|
||||
\{\{else\}\}$\{error\}
|
||||
\{\{/if\}\}
|
||||
</td>
|
||||
\{\{else\}\}
|
||||
<td class="progress"><div></div></td>
|
||||
<td class="start"><button>{upload_start}</button></td>
|
||||
\{\{/if\}\}
|
||||
<td class="cancel"><button>{upload_cancel}</button></td>
|
||||
</tr>
|
||||
</script>
|
||||
<script id="template-download" type="text/x-jquery-tmpl">
|
||||
<tr class="template-download\{\{if error\}\} ui-state-error\{\{/if\}\}">
|
||||
\{\{if error\}\}
|
||||
<td></td>
|
||||
<td class="name">$\{name\}</td>
|
||||
<td class="size">$\{sizef\}</td>
|
||||
<td class="error" colspan="2">{upload_error}:
|
||||
\{\{if error === 1\}\}{upload_file_too_big}
|
||||
\{\{else error === 2\}\}{upload_file_too_big}
|
||||
\{\{else error === 3\}\}{upload_partial}
|
||||
\{\{else error === 4\}\}{upload_no_file}
|
||||
\{\{else error === 5\}\}{upload_missing_tmp_folder}
|
||||
\{\{else error === 6\}\}{upload_disc_failded}
|
||||
\{\{else error === 7\}\}{upload_extenstion_stop}
|
||||
\{\{else error === 'maxFileSize'\}\}{upload_file_too_big}
|
||||
\{\{else error === 'minFileSize'\}\}{upload_file_too_small}
|
||||
\{\{else error === 'acceptFileTypes'\}\}Filetype not allowed
|
||||
\{\{else error === 'maxNumberOfFiles'\}\}{upload_filetype_not_allowed}
|
||||
\{\{else error === 'uploadedBytes'\}\}{upload_bytes_exceed_file_size}
|
||||
\{\{else error === 'emptyResult'\}\}{upload_empty_result}
|
||||
\{\{else\}\}$\{error\}
|
||||
\{\{/if\}\}
|
||||
</td>
|
||||
\{\{else\}\}
|
||||
<td class="preview">
|
||||
\{\{if thumbnail_url\}\}
|
||||
<a href="$\{url\}/cat" target="_blank"><img src="$\{thumbnail_url\}"></a>
|
||||
\{\{/if\}\}
|
||||
</td>
|
||||
<td class="name">
|
||||
<a href="$\{url\}/cat"\{\{if thumbnail_url\}\} target="_blank"\{\{/if\}\}>$\{name\}</a>
|
||||
</td>
|
||||
<td class="size">$\{sizef\}</td>
|
||||
<td class="url">$\{url\}</td>
|
||||
<td colspan="2"></td>
|
||||
\{\{/if\}\}
|
||||
<td class="delete">
|
||||
<button data-type="$\{delete_type\}" data-url="$\{delete_url\}">{upload_delete}</button>
|
||||
</td>
|
||||
</tr>
|
||||
</script>
|
||||
|
||||
</div>
|
||||
[end]
|
||||
|
||||
|
Reference in New Issue
Block a user