818 lines
24 KiB
HTML
818 lines
24 KiB
HTML
[# def? means define a variable if such a variable does not exist yet]
|
|
[# true and false are ezc functions defined by winix]
|
|
|
|
[def? winix_has_uikit false]
|
|
[def? winix_has_jquery false]
|
|
[def? winix_has_htmx false]
|
|
|
|
[def? winix_set_charset true]
|
|
[def? winix_set_viewport true]
|
|
|
|
[def? winix_load_uikit true]
|
|
[def? winix_uikit_version "3.21.13"] [# "3.21.13-scope" ]
|
|
|
|
[def? winix_load_htmx true]
|
|
|
|
[def? winix_load_clocklet false]
|
|
[def? winix_clocklet_uikit_theme true]
|
|
|
|
[def? winix_load_flatpickr false]
|
|
|
|
[def? winix_load_litepicker false]
|
|
|
|
[def? winix_load_easepick false]
|
|
[def? winix_easepick_version "1.2.1"]
|
|
|
|
[def? winix_load_winixjs true]
|
|
|
|
|
|
[if winix_set_charset]
|
|
<meta charset="UTF-8">
|
|
[end]
|
|
|
|
|
|
[if winix_set_viewport]
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
[end]
|
|
|
|
|
|
[if winix_load_uikit]
|
|
[def winix_has_uikit true]
|
|
|
|
[# UIkit CSS]
|
|
<link rel="stylesheet" href="[doc_base_url_common]/uikit/uikit-[winix_uikit_version]/css/uikit.min.css">
|
|
|
|
[# UIkit JS]
|
|
<script src="[doc_base_url_common]/uikit/uikit-[winix_uikit_version]/js/uikit.min.js"></script>
|
|
<script src="[doc_base_url_common]/uikit/uikit-[winix_uikit_version]/js/uikit-icons.min.js"></script>
|
|
[end]
|
|
|
|
|
|
[if winix_load_htmx]
|
|
[def winix_has_htmx true]
|
|
|
|
<script src="[doc_base_url_common]/htmx/2.0.3/dist/htmx.min.js"></script>
|
|
[end]
|
|
|
|
|
|
[if or [winix_function_is "emacs"] [winix_function_is "ckeditor"] [winix_function_is "tinymce"] [winix_function_is "nicedit"] [winix_function_is "env"] [winix_function_is "meta"]]
|
|
<style>
|
|
.wx-button-spinner .wx-button-spinner-text \{
|
|
display: block;
|
|
\}
|
|
.wx-button-spinner .wx-button-spinner-spinner \{
|
|
display: none;
|
|
\}
|
|
.htmx-request.wx-button-spinner .wx-button-spinner-text \{
|
|
display: none;
|
|
\}
|
|
.htmx-request.wx-button-spinner .wx-button-spinner-spinner \{
|
|
display: block;
|
|
\}
|
|
</style>
|
|
|
|
<script>
|
|
function winix_update_from_editors(el, post_url, target)
|
|
\{
|
|
htmx.ajax('POST', post_url, \{source: el, target: target\} );
|
|
\}
|
|
</script>
|
|
[end]
|
|
|
|
|
|
[if or [winix_function_is "emacs"] [winix_function_is "env"] [winix_function_is "meta"]]
|
|
<script type="text/javascript" src="[doc_base_url_common]/codemirror/5.65.16/lib/codemirror.js"></script>
|
|
<link rel="stylesheet" href="[doc_base_url_common]/codemirror/5.65.16/lib/codemirror.css" type="text/css">
|
|
|
|
<script src="[doc_base_url_common]/codemirror/5.65.16/mode/css/css.js"></script>
|
|
<script src="[doc_base_url_common]/codemirror/5.65.16/mode/javascript/javascript.js"></script>
|
|
<script src="[doc_base_url_common]/codemirror/5.65.16/mode/xml/xml.js"></script>
|
|
<script src="[doc_base_url_common]/codemirror/5.65.16/mode/htmlmixed/htmlmixed.js"></script>
|
|
<script src="[doc_base_url_common]/codemirror/5.65.16/mode/markdown/markdown.js"></script>
|
|
|
|
[if false]
|
|
<link rel="stylesheet" href="[doc_base_url_common]/codemirror/5.65.16/theme/base16-light.css" type="text/css">
|
|
[end]
|
|
|
|
<script src="[doc_base_url_common]/codemirror/5.65.16/addon/display/fullscreen.js"></script>
|
|
<link rel="stylesheet" href="[doc_base_url_common]/codemirror/5.65.16/addon/display/fullscreen.css" type="text/css">
|
|
|
|
[if false]
|
|
<script src="[doc_base_url_common]/codemirror/5.65.16/addon/search/search.js"></script>
|
|
<link rel="stylesheet" href="[doc_base_url_common]/codemirror/5.65.16/addon/search/matchesonscrollbar.css" type="text/css">
|
|
[end]
|
|
|
|
<script src="[doc_base_url_common]/codemirror/5.65.16/addon/fold/xml-fold.js"></script>
|
|
<script src="[doc_base_url_common]/codemirror/5.65.16/addon/edit/matchtags.js"></script>
|
|
|
|
<script src="[doc_base_url_common]/codemirror/5.65.16/addon/selection/active-line.js"></script>
|
|
|
|
|
|
[# markdown to html converter ]
|
|
[# https://github.com/showdownjs/showdown ]
|
|
<script src="[doc_base_url_common]/showdown/2.1.0/dist/showdown.min.js"></script>
|
|
|
|
|
|
|
|
<style>
|
|
.CodeMirror-matchingtag \{
|
|
font-weight: bold;
|
|
background: none;
|
|
\}
|
|
|
|
.CodeMirror-activeline-background \{
|
|
background: #f3f3f3;
|
|
\}
|
|
|
|
.CodeMirror \{
|
|
border: 1px solid #dedede;
|
|
\}
|
|
</style>
|
|
|
|
|
|
<script type="text/javascript">
|
|
let winix_code_mirror_editor = null;
|
|
let winix_showdown_converter = null;
|
|
let winix_converter_output = null;
|
|
let winix_content_parsed = null;
|
|
let winix_emacs_mode = 0;
|
|
let winix_view_mode = 1; /* one panel */
|
|
|
|
function winix_initialize_editor()
|
|
\{
|
|
let text_area = document.getElementById("winix_content_id");
|
|
let winix_contenttype = document.getElementById("winix_contenttype_id");
|
|
let winix_viewtype = document.getElementById("winix_viewtype_id");
|
|
let onchange_delay = null;
|
|
|
|
winix_content_parsed = document.getElementById("winix_content_parsed_id");
|
|
|
|
if( text_area )
|
|
\{
|
|
winix_showdown_converter = new showdown.Converter();
|
|
winix_converter_output = document.getElementById("winix_output_preview");
|
|
|
|
winix_code_mirror_editor = CodeMirror.fromTextArea(text_area, \{
|
|
mode: winix_get_codemirror_mode(winix_emacs_mode),
|
|
theme: "default",
|
|
indentUnit: 4,
|
|
smartIndent: true,
|
|
tabSize: 4,
|
|
indentWithTabs: true,
|
|
extraKeys: \{
|
|
"F11": winix_change_cm_to_fullscreen,
|
|
"Esc": winix_change_cm_to_normal_screen
|
|
\},
|
|
lineNumbers: true,
|
|
lineWiseCopyCut: false,
|
|
dragDrop: false,
|
|
matchTags: true,
|
|
styleActiveLine: true
|
|
\});
|
|
|
|
winix_codemirror_preview();
|
|
|
|
winix_code_mirror_editor.on("change", function(instance) \{
|
|
if( onchange_delay !== null )
|
|
clearTimeout(onchange_delay);
|
|
|
|
onchange_delay = setTimeout(winix_codemirror_preview, 300);
|
|
\});
|
|
\}
|
|
|
|
if( winix_contenttype )
|
|
\{
|
|
winix_emacs_mode = parseInt(winix_contenttype.value);
|
|
winix_set_codemirror_mode();
|
|
|
|
winix_contenttype.addEventListener("change", function(e) \{
|
|
winix_emacs_mode = parseInt(this.value);
|
|
winix_set_codemirror_mode();
|
|
\});
|
|
\}
|
|
|
|
if( winix_viewtype )
|
|
\{
|
|
[if not [winix_function_param_is "tabs"]]
|
|
winix_viewtype.addEventListener("change", function(e) \{
|
|
winix_view_mode = parseInt(this.value);
|
|
winix_refresh_panels_view(false);
|
|
\});
|
|
[end]
|
|
\}
|
|
\}
|
|
|
|
function winix_change_cm_to_fullscreen(cm)
|
|
\{
|
|
let is_fullscreen = cm.getOption("fullScreen");
|
|
cm.setOption("fullScreen", !is_fullscreen);
|
|
winix_refresh_panels_view(!is_fullscreen);
|
|
\}
|
|
|
|
function winix_change_cm_to_normal_screen(cm)
|
|
\{
|
|
let is_fullscreen = cm.getOption("fullScreen");
|
|
|
|
if( is_fullscreen)
|
|
\{
|
|
cm.setOption("fullScreen", false);
|
|
winix_refresh_panels_view(false);
|
|
\}
|
|
\}
|
|
|
|
function winix_refresh_panels_view(force_one_panel)
|
|
\{
|
|
[if not [winix_function_param_is "tabs"]]
|
|
if( winix_converter_output )
|
|
\{
|
|
if( !force_one_panel && winix_view_mode == 2 )
|
|
\{
|
|
console.log('Changing to two panels mode');
|
|
winix_converter_output.parentElement.classList.remove('uk-child-width-1-1');
|
|
winix_converter_output.parentElement.classList.add('uk-child-width-1-2');
|
|
winix_converter_output.style.display = 'block';
|
|
\}
|
|
else
|
|
\{
|
|
console.log('Changing to one panel mode');
|
|
winix_converter_output.style.display = 'none';
|
|
winix_converter_output.parentElement.classList.remove('uk-child-width-1-2');
|
|
winix_converter_output.parentElement.classList.add('uk-child-width-1-1');
|
|
\}
|
|
\}
|
|
[end]
|
|
\}
|
|
|
|
function winix_esc_to_html(c)
|
|
\{
|
|
let html='';
|
|
|
|
switch(c)
|
|
\{
|
|
case '\0':
|
|
html += '�';
|
|
break;
|
|
|
|
case '<':
|
|
html += '<';
|
|
break;
|
|
|
|
case '>':
|
|
html += '>';
|
|
break;
|
|
|
|
case '&':
|
|
html += '&';
|
|
break;
|
|
|
|
case '"':
|
|
html += '"';
|
|
break;
|
|
|
|
case '\'':
|
|
html += ''';
|
|
break;
|
|
|
|
case '\n':
|
|
html += ' ';
|
|
break;
|
|
|
|
case '\r':
|
|
html += ' ';
|
|
break;
|
|
|
|
default:
|
|
html += c;
|
|
break;
|
|
\}
|
|
|
|
return html;
|
|
\}
|
|
|
|
function winix_convert_from_txt_to_html(str)
|
|
\{
|
|
let i=0;
|
|
let html='';
|
|
|
|
for(; i < str.length ; ++i)
|
|
\{
|
|
html += winix_esc_to_html(str\[i\]);
|
|
\}
|
|
|
|
return html;
|
|
\}
|
|
|
|
function winix_convert_from_formatted_txt_to_html(str)
|
|
\{
|
|
let i=0;
|
|
let html='<p>';
|
|
let was_nl=0;
|
|
|
|
// skipping first new line characters
|
|
for(; i < str.length && (str\[i\]=='\r' || str\[i\]=='\n') ; ++i)
|
|
\{
|
|
\}
|
|
|
|
for(; i < str.length ; ++i)
|
|
\{
|
|
if( str\[i\] == '\r' )
|
|
continue;
|
|
|
|
if( str\[i\] == '\n' )
|
|
\{
|
|
++was_nl;
|
|
\}
|
|
else
|
|
\{
|
|
if( was_nl == 1 )
|
|
html += '<br>\n';
|
|
else
|
|
if( was_nl > 1 )
|
|
html += '</p>\n<p>';
|
|
|
|
was_nl = 0;
|
|
\}
|
|
|
|
html += winix_esc_to_html(str\[i\]);
|
|
\}
|
|
|
|
html += '</p>';
|
|
return html;
|
|
\}
|
|
|
|
function winix_codemirror_preview()
|
|
\{
|
|
if( winix_code_mirror_editor !== null )
|
|
\{
|
|
let sourceMarkup = winix_code_mirror_editor.getValue();
|
|
|
|
if( winix_emacs_mode == 2 ) // html
|
|
\{
|
|
if( winix_converter_output !== null )
|
|
winix_converter_output.innerHTML = sourceMarkup;
|
|
|
|
if( winix_content_parsed !== null )
|
|
winix_content_parsed.value = "";
|
|
\}
|
|
else
|
|
if( winix_emacs_mode == 5 ) // markdown
|
|
\{
|
|
let htmlMarkup = winix_showdown_converter.makeHtml(sourceMarkup);
|
|
|
|
if( winix_converter_output !== null )
|
|
winix_converter_output.innerHTML = htmlMarkup;
|
|
|
|
if( winix_content_parsed !== null )
|
|
winix_content_parsed.value = htmlMarkup;
|
|
\}
|
|
else
|
|
if( winix_emacs_mode == 1 ) // formatted text
|
|
\{
|
|
if( winix_converter_output !== null )
|
|
winix_converter_output.innerHTML = winix_convert_from_formatted_txt_to_html(sourceMarkup);
|
|
|
|
if( winix_content_parsed !== null )
|
|
winix_content_parsed.value = "";
|
|
|
|
\}
|
|
else
|
|
if( winix_emacs_mode == 0 ) // text
|
|
\{
|
|
if( winix_converter_output !== null )
|
|
winix_converter_output.innerHTML = winix_convert_from_txt_to_html(sourceMarkup);
|
|
|
|
if( winix_content_parsed !== null )
|
|
winix_content_parsed.value = "";
|
|
|
|
\}
|
|
else
|
|
\{
|
|
if( winix_converter_output !== null )
|
|
winix_converter_output.innerHTML = "";
|
|
|
|
if( winix_content_parsed !== null )
|
|
winix_content_parsed.value = "";
|
|
\}
|
|
\}
|
|
\}
|
|
|
|
function winix_get_codemirror_mode(mode)
|
|
\{
|
|
switch(mode)
|
|
\{
|
|
case 5:
|
|
return "markdown";
|
|
|
|
case 2: // html
|
|
return "htmlmixed";
|
|
|
|
case 0: // text
|
|
case 1: // formatted text
|
|
case 3: // bbcode
|
|
case 4: // other
|
|
default:
|
|
return "text/plain";
|
|
\}
|
|
\}
|
|
|
|
function winix_set_codemirror_mode()
|
|
\{
|
|
if( winix_code_mirror_editor !== null )
|
|
\{
|
|
let codeMirrorMode = winix_get_codemirror_mode(winix_emacs_mode);
|
|
console.log("Changing mode to: " + codeMirrorMode);
|
|
winix_code_mirror_editor.setOption("mode", codeMirrorMode);
|
|
winix_codemirror_preview();
|
|
\}
|
|
\}
|
|
|
|
function winix_update_from_codemirror(el, post_url, target)
|
|
\{
|
|
if( winix_code_mirror_editor )
|
|
\{
|
|
winix_codemirror_preview();
|
|
let editor_data = winix_code_mirror_editor.getValue();
|
|
winix_code_mirror_editor.save(); // save content to the textarea
|
|
winix_update_from_editors(el, post_url, target);
|
|
\}
|
|
\}
|
|
|
|
|
|
window.addEventListener("load", winix_initialize_editor, false);
|
|
</script>
|
|
|
|
[end]
|
|
|
|
|
|
[if winix_function_is "ckeditor"]
|
|
<script type="text/javascript" src="[doc_base_url_common]/ckeditor/4.22.1/ckeditor.js"></script>
|
|
|
|
[if not winix_has_jquery]
|
|
[def winix_has_jquery true]
|
|
<script type="text/javascript" src="[doc_base_url_common]/jquery/3.7.1/jquery-3.7.1.min.js"></script>
|
|
[end]
|
|
|
|
<script>
|
|
function winix_update_from_ckeditor(el, post_url, target)
|
|
\{
|
|
if( typeof CKEDITOR !== 'undefined' )
|
|
\{
|
|
let div_id = 'winix-editor-content';
|
|
let editor_data = CKEDITOR.instances\[div_id\].getData();
|
|
let itemcontent = document.getElementById('winix_content_id');
|
|
|
|
if( itemcontent )
|
|
\{
|
|
itemcontent.value = editor_data;
|
|
winix_update_from_editors(el, post_url, target);
|
|
\}
|
|
\}
|
|
\}
|
|
</script>
|
|
|
|
[end]
|
|
|
|
|
|
[if winix_function_is "tinymce"]
|
|
<script type="text/javascript" src="[doc_base_url]/common/tiny_mce/5.6.2/tinymce.min.js"></script>
|
|
|
|
[# tinymce can use a special theme called 'mobile' - it is used when /mobile param is provided]
|
|
<script type="text/javascript" src="[doc_base_url]/var/tinymce.js[if winix_function_param_is "mobile"]/-/mobile[end]"></script>
|
|
|
|
[if not winix_has_jquery]
|
|
[def winix_has_jquery true]
|
|
<script type="text/javascript" src="[doc_base_url_common]/jquery/3.7.1/jquery-3.7.1.min.js"></script>
|
|
[end]
|
|
|
|
<script>
|
|
function winix_update_from_tinymce(el, post_url, target)
|
|
\{
|
|
if( typeof tinymce !== 'undefined' )
|
|
\{
|
|
let div_id = 'winix-editor-content';
|
|
let editor_data = tinymce.get(div_id).getContent();
|
|
let itemcontent = document.getElementById('winix_content_id');
|
|
|
|
if( itemcontent )
|
|
\{
|
|
itemcontent.value = editor_data;
|
|
winix_update_from_editors(el, post_url, target);
|
|
\}
|
|
\}
|
|
\}
|
|
</script>
|
|
[end]
|
|
|
|
|
|
[if winix_function_is "nicedit"]
|
|
[# the path is set in the fun_nicedit.html too for downloading a gif file]
|
|
<script type="text/javascript" src="[doc_base_url_common]/nicedit/0.9_r25/nicEdit.js"></script>
|
|
|
|
<script>
|
|
function winix_update_from_nicedit(el, post_url, target)
|
|
\{
|
|
let nicedit = nicEditors.findEditor('winix_content_id');
|
|
let itemcontent = document.getElementById('winix_content_id');
|
|
|
|
if( nicedit && itemcontent )
|
|
\{
|
|
let editor_data = nicedit.getContent();
|
|
itemcontent.value = editor_data;
|
|
winix_update_from_editors(el, post_url, target);
|
|
\}
|
|
\}
|
|
</script>
|
|
|
|
[end]
|
|
|
|
|
|
|
|
[if winix_function_is "vim"]
|
|
|
|
[# info from version 0.5-rc1: 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 ]
|
|
|
|
[if not winix_has_jquery]
|
|
[def winix_has_jquery true]
|
|
<script type="text/javascript" src="[doc_base_url_common]/jquery/3.7.1/jquery-3.7.1.min.js"></script>
|
|
[end]
|
|
|
|
<script type="text/javascript" src="[doc_base_url_common]/wymeditor/1.1.1/wymeditor/jquery.wymeditor.min.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="[doc_base_url_common]/wymeditor/1.1.1/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_function_is "gallery"]
|
|
|
|
[if gallery_mount_type_arg_is "lightbox"]
|
|
[# https://lokeshdhakar.com/projects/lightbox2/ ]
|
|
|
|
[if not winix_has_jquery]
|
|
[def winix_has_jquery true]
|
|
<script type="text/javascript" src="[doc_base_url_common]/jquery/3.7.1/jquery-3.7.1.min.js"></script>
|
|
[end]
|
|
|
|
<link rel="stylesheet" href="[doc_base_url_common]/lightbox/2.11.3/dist/css/lightbox.min.css" type="text/css">
|
|
<script src="[doc_base_url_common]/lightbox/2.11.3/dist/js/lightbox.min.js" type="text/javascript"></script>
|
|
[end]
|
|
|
|
[if gallery_mount_type_arg_is "galleriajs"]
|
|
[# https://galleriajs.github.io/ ]
|
|
[# formerly called aino-gallery ]
|
|
|
|
[if not winix_has_jquery]
|
|
[def winix_has_jquery true]
|
|
<script type="text/javascript" src="[doc_base_url_common]/jquery/3.7.1/jquery-3.7.1.min.js"></script>
|
|
[end]
|
|
|
|
<script src="[doc_base_url_common]/galleriajs/1.6.1/dist/galleria.min.js" type="text/javascript"></script>
|
|
[end]
|
|
|
|
[end]
|
|
|
|
|
|
|
|
[if winix_function_is "upload"]
|
|
[# https://blueimp.github.io/jQuery-File-Upload/]
|
|
[# https://github.com/blueimp/jQuery-File-Upload]
|
|
|
|
[# Force latest IE rendering engine or ChromeFrame if installed]
|
|
[if false]
|
|
<!--\[if IE\]>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
<!\[endif\]-->
|
|
[end]
|
|
|
|
|
|
<link rel="stylesheet" href="[doc_base_url_common]/bootstrap/3.3.7/css/bootstrap.min.css">
|
|
|
|
[# in doc_base_url_common/jquery-file-upload/10.32.0_extra/blueimp-gallery/ is download_all_files.sh script in order to download all necessary files]
|
|
[# blueimp Gallery styles ]
|
|
<link rel="stylesheet" href="[doc_base_url_common]/jquery-file-upload/10.32.0_extra/blueimp-gallery/blueimp-gallery.min.css">
|
|
|
|
[# CSS to style the file input field as button and adjust the Bootstrap progress bars]
|
|
<link rel="stylesheet" href="[doc_base_url_common]/jquery-file-upload/10.32.0/css/jquery.fileupload.css">
|
|
<link rel="stylesheet" href="[doc_base_url_common]/jquery-file-upload/10.32.0/css/jquery.fileupload-ui.css">
|
|
|
|
[# CSS adjustments for browsers with JavaScript disabled]
|
|
<noscript>
|
|
<link rel="stylesheet" href="[doc_base_url_common]/jquery-file-upload/10.32.0/css/jquery.fileupload-noscript.css">
|
|
<link rel="stylesheet" href="[doc_base_url_common]/jquery-file-upload/10.32.0/css/jquery.fileupload-ui-noscript.css">
|
|
</noscript>
|
|
|
|
|
|
[if not winix_has_jquery]
|
|
[def winix_has_jquery true]
|
|
<script type="text/javascript" src="[doc_base_url_common]/jquery/3.7.1/jquery-3.7.1.min.js"></script>
|
|
[end]
|
|
|
|
|
|
[# The jQuery UI widget factory, can be omitted if jQuery UI is already included ]
|
|
<script src="[doc_base_url_common]/jquery-file-upload/10.32.0/js/vendor/jquery.ui.widget.js"></script>
|
|
|
|
[# The Templates plugin is included to render the upload/download listings ]
|
|
<script src="[doc_base_url_common]/jquery-file-upload/10.32.0_extra/tmpl.min.js"></script>
|
|
[# The Load Image plugin is included for the preview images and image resizing functionality ]
|
|
<script src="[doc_base_url_common]/jquery-file-upload/10.32.0_extra/load-image.all.min.js"></script>
|
|
[# The Canvas to Blob plugin is included for image resizing functionality ]
|
|
<script src="[doc_base_url_common]/jquery-file-upload/10.32.0_extra/canvas-to-blob.min.js"></script>
|
|
[# blueimp Gallery script ]
|
|
<script src="[doc_base_url_common]/jquery-file-upload/10.32.0_extra/jquery.blueimp-gallery.min.js"></script>
|
|
|
|
[# The Iframe Transport is required for browsers without support for XHR file uploads ]
|
|
<script src="[doc_base_url_common]/jquery-file-upload/10.32.0/js/jquery.iframe-transport.js"></script>
|
|
[# The basic File Upload plugin ]
|
|
<script src="[doc_base_url_common]/jquery-file-upload/10.32.0/js/jquery.fileupload.js"></script>
|
|
[# The File Upload processing plugin ]
|
|
<script src="[doc_base_url_common]/jquery-file-upload/10.32.0/js/jquery.fileupload-process.js"></script>
|
|
[# The File Upload image preview & resize plugin ]
|
|
<script src="[doc_base_url_common]/jquery-file-upload/10.32.0/js/jquery.fileupload-image.js"></script>
|
|
[# The File Upload audio preview plugin ]
|
|
<script src="[doc_base_url_common]/jquery-file-upload/10.32.0/js/jquery.fileupload-audio.js"></script>
|
|
[# The File Upload video preview plugin ]
|
|
<script src="[doc_base_url_common]/jquery-file-upload/10.32.0/js/jquery.fileupload-video.js"></script>
|
|
[# The File Upload validation plugin ]
|
|
<script src="[doc_base_url_common]/jquery-file-upload/10.32.0/js/jquery.fileupload-validate.js"></script>
|
|
[# The File Upload user interface plugin ]
|
|
<script src="[doc_base_url_common]/jquery-file-upload/10.32.0/js/jquery.fileupload-ui.js"></script>
|
|
|
|
[if false]
|
|
[# the code to run the plugin we have in fun_upload.html ]
|
|
[# The main application script ]
|
|
<script src="[doc_base_url_common]/jquery-file-upload/10.32.0/js/demo.js"></script>
|
|
[end]
|
|
|
|
[if false]
|
|
[# The XDomainRequest Transport is included for cross-domain file deletion for IE 8 and IE 9 ]
|
|
<!--\[if (gte IE 8)&(lt IE 10)\]>
|
|
<script src="[doc_base_url_common]/jquery-file-upload/10.32.0/js/cors/jquery.xdr-transport.js"></script>
|
|
<!\[endif\]-->
|
|
[end]
|
|
|
|
|
|
[# small fix for better responsiveness]
|
|
[# do not show the first td if there is no an image]
|
|
<style>@media (max-width: 480px) \{.files :not(.image) td:nth-child(1) \{display: none;\}\}</style>
|
|
|
|
[end]
|
|
|
|
|
|
|
|
[if winix_function_is "sort"]
|
|
[if not request.is_item]
|
|
<script type="text/javascript" src="[doc_base_url_common]/winix/winix_sort.js"></script>
|
|
[end]
|
|
[end]
|
|
|
|
|
|
[if winix_function_is "imgcrop"]
|
|
|
|
[if not winix_has_jquery]
|
|
[def winix_has_jquery true]
|
|
<script type="text/javascript" src="[doc_base_url_common]/jquery/3.7.1/jquery-3.7.1.min.js"></script>
|
|
[end]
|
|
|
|
<script type="text/javascript" src="[doc_base_url_common]/jcrop/0.9.15/js/jquery.Jcrop.min.js"></script>
|
|
<link type="text/css" rel="stylesheet" href="[doc_base_url_common]/jcrop/0.9.15/css/jquery.Jcrop.min.css">
|
|
[end]
|
|
|
|
|
|
|
|
[if winix_load_clocklet]
|
|
[# https://github.com/luncheon/clocklet ]
|
|
[# https://luncheon.github.io/clocklet/demo.html - color samples here too]
|
|
<link rel="stylesheet" href="[doc_base_url_common]/clocklet/0.3.0/clocklet.min.css">
|
|
<script src="[doc_base_url_common]/clocklet/0.3.0/clocklet.js"></script>
|
|
|
|
[if winix_clocklet_uikit_theme]
|
|
<link rel="stylesheet" href="[doc_base_url_common]/clocklet/0.3.0/uikit-theme.css">
|
|
[end]
|
|
|
|
[end]
|
|
|
|
[if winix_load_flatpickr]
|
|
[# date picker, time picker, date and time picker, date range picker (selecting time works only for the first day), available different themes ]
|
|
[# the datepicker on mobile devices is a native datepicker (this functionality can be disabled via disableMobile option) ]
|
|
[# https://flatpickr.js.org ]
|
|
[# https://github.com/flatpickr/flatpickr ]
|
|
[# options: https://flatpickr.js.org/options/ ]
|
|
|
|
<link rel="stylesheet" href="[doc_base_url_common]/flatpickr/4.6.13/flatpickr.min.css">
|
|
<script src="[doc_base_url_common]/flatpickr/4.6.13/flatpickr.js"></script>
|
|
|
|
[if is_not [lang "flatpickr_locale_url"] "none"]
|
|
<script src="[doc_base_url_common]/flatpickr/4.6.13/l10n/[lang "flatpickr_locale_url"]"></script>
|
|
<script>flatpickr.localize(flatpickr.l10ns.{flatpickr_locale_config_prefix});</script>
|
|
[end]
|
|
|
|
[if false]
|
|
[# can be inserted in this way: ]
|
|
<script>
|
|
flatpickr("#my-input-id", \{
|
|
\});
|
|
</script>
|
|
[end]
|
|
|
|
[end]
|
|
|
|
|
|
[if winix_load_litepicker]
|
|
[# date picker and date range picker ]
|
|
[# can show a dialog with more than one month, config parameters: numberOfColumns and numberOfMonths]
|
|
[# https://litepicker.com ]
|
|
[# https://github.com/wakirin/litepicker/ ]
|
|
[# options: https://litepicker.com/docs/options ]
|
|
|
|
[# in bundle.js there are all plugins, you can use litepicker.js to load the datepicker without plugins]
|
|
|
|
<script src="[doc_base_url_common]/litepicker/2.0.12/bundle.js"></script>
|
|
|
|
[if false]
|
|
[# can be inserted in this way: ]
|
|
<script>
|
|
const picker = new Litepicker(\{
|
|
element: document.getElementById('my-input-id'),
|
|
plugins: \['mobilefriendly'\],
|
|
lang: '{winix_html_lang_attr}'
|
|
\});
|
|
</script>
|
|
[end]
|
|
[end]
|
|
|
|
|
|
[if winix_load_easepick]
|
|
[# https://easepick.com/]
|
|
|
|
<script src="[doc_base_url_common]/easepick/[winix_easepick_version]/index.umd.js"></script>
|
|
|
|
[if false]
|
|
|
|
[# can be inserted in this way (only date picker with a lock plugin - remove lock plugin if you don't need it) ]
|
|
<script>
|
|
const picker = new easepick.create(\{
|
|
element: document.getElementById('my-input-id'),
|
|
date: "2000-10-10 00:00",
|
|
plugins: \['LockPlugin'\],
|
|
lang: '{winix_html_lang_attr}',
|
|
format: 'YYYY-MM-DD',
|
|
css: \[
|
|
'[doc_base_url_common]/easepick/[winix_easepick_version]/index.css',
|
|
\],
|
|
LockPlugin: \{
|
|
minDate: "2000-10-10 00:00",
|
|
maxDate: "2000-10-11 00:00",
|
|
\},
|
|
\});
|
|
</script>
|
|
|
|
[# or this way (two panels date and time picker with a range selection plugin and cancel and apply buttons) ]
|
|
<script>
|
|
const picker = new easepick.create(\{
|
|
element: document.getElementById('my-input-id'),
|
|
date: "2000-10-10 00:00",
|
|
grid: 2,
|
|
calendars: 2,
|
|
plugins: \['RangePlugin', 'LockPlugin', 'TimePlugin'\],
|
|
lang: '{winix_html_lang_attr}',
|
|
format: 'YYYY-MM-DD HH:mm',
|
|
autoApply: false,
|
|
locale: \{cancel:'{easepick_cancel_button}', apply: '{easepick_apply_button}'\},
|
|
css: \[
|
|
'[doc_base_url_common]/easepick/[winix_easepick_version]/index.css',
|
|
\],
|
|
RangePlugin: \{
|
|
elementEnd: document.getElementById('my-second-input-id'),
|
|
tooltip: true,
|
|
locale: \{ one: '{easepick_one_day}', other: '{easepick_more_days}' \},
|
|
\},
|
|
LockPlugin: \{
|
|
minDate: "2000-10-10 00:00",
|
|
maxDate: "2000-10-11 00:00",
|
|
\},
|
|
\});
|
|
</script>
|
|
[end]
|
|
|
|
|
|
[end]
|
|
|
|
|
|
|
|
[if false]
|
|
[# temporarily blocked]
|
|
[if winix_has_plugin "stats"]
|
|
[include "stats_info.html"]
|
|
[end]
|
|
[end]
|
|
|
|
|
|
[if winix_load_winixjs]
|
|
<script src="[doc_base_url_common]/winix/winix.min.js"></script>
|
|
[end]
|
|
|
|
|