2021-05-23 10:14:08 +02:00
[# def? means define a variable if such a variable does not exist yet]
[# true and false are ezc functions defined by winix]
2021-01-21 17:10:04 +01:00
2021-05-23 10:14:08 +02:00
[def? winix_has_uikit false]
[def? winix_has_jquery false]
2021-05-27 13:41:29 +02:00
[def? winix_has_htmx false]
2021-02-16 12:55:35 +01:00
2021-05-23 10:14:08 +02:00
[def? winix_set_charset true]
[def? winix_set_viewport true]
2021-02-16 12:55:35 +01:00
2021-05-27 13:41:29 +02:00
[def? winix_load_uikit true]
2023-11-16 23:10:51 +01:00
[def? winix_uikit_version "3.17.9"] [# "3.17.9-scope" ]
2021-10-13 23:48:30 +02:00
2021-05-27 13:41:29 +02:00
[def? winix_load_htmx true]
2021-01-21 17:10:04 +01:00
2021-10-07 04:42:46 +02:00
[def? winix_load_clocklet false]
[def? winix_clocklet_uikit_theme true]
[def? winix_load_flatpickr false]
[def? winix_load_litepicker false]
2021-01-21 17:10:04 +01:00
2022-10-14 01:56:44 +02:00
[def? winix_load_easepick false]
2023-08-21 13:31:02 +02:00
[def? winix_easepick_version "1.2.1"]
2022-10-14 01:56:44 +02:00
2022-05-30 05:35:49 +02:00
[def? winix_load_winixjs true]
2021-01-21 17:10:04 +01:00
2021-05-23 10:14:08 +02:00
[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]
2021-10-13 23:48:30 +02:00
< link rel = "stylesheet" href = "[doc_base_url_common]/uikit/uikit-[winix_uikit_version]/css/uikit.min.css" >
2021-05-23 10:14:08 +02:00
[# UIkit JS]
2021-10-13 23:48:30 +02:00
< 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 >
2021-05-23 10:14:08 +02:00
[end]
2012-10-17 08:00:00 +02:00
2021-05-27 13:41:29 +02:00
[if winix_load_htmx]
[def winix_has_htmx true]
2021-05-27 19:36:04 +02:00
2023-11-06 04:43:20 +01:00
< script src = "[doc_base_url_common]/htmx/1.9.7/dist/htmx.min.js" > < / script >
2021-05-27 13:41:29 +02:00
[end]
2012-10-17 08:00:00 +02:00
2021-06-29 23:42:57 +02:00
[if or [winix_function_is "emacs"] [winix_function_is "env"] [winix_function_is "meta"]]
2021-11-26 21:49:21 +01:00
< script type = "text/javascript" src = "[doc_base_url_common]/codemirror/5.64.0/lib/codemirror.js" > < / script >
< link rel = "stylesheet" href = "[doc_base_url_common]/codemirror/5.64.0/lib/codemirror.css" type = "text/css" >
2015-04-18 20:50:39 +02:00
2021-11-26 21:49:21 +01:00
< script src = "[doc_base_url_common]/codemirror/5.64.0/mode/css/css.js" > < / script >
< script src = "[doc_base_url_common]/codemirror/5.64.0/mode/javascript/javascript.js" > < / script >
< script src = "[doc_base_url_common]/codemirror/5.64.0/mode/xml/xml.js" > < / script >
< script src = "[doc_base_url_common]/codemirror/5.64.0/mode/htmlmixed/htmlmixed.js" > < / script >
< script src = "[doc_base_url_common]/codemirror/5.64.0/mode/markdown/markdown.js" > < / script >
2015-04-18 20:50:39 +02:00
2022-07-31 02:03:39 +02:00
[if false]
< link rel = "stylesheet" href = "[doc_base_url_common]/codemirror/5.64.0/theme/base16-light.css" type = "text/css" >
[end]
2015-04-18 20:50:39 +02:00
2021-11-26 21:49:21 +01:00
< script src = "[doc_base_url_common]/codemirror/5.64.0/addon/display/fullscreen.js" > < / script >
< link rel = "stylesheet" href = "[doc_base_url_common]/codemirror/5.64.0/addon/display/fullscreen.css" type = "text/css" >
2015-04-18 20:50:39 +02:00
[if false]
2021-11-26 21:49:21 +01:00
< script src = "[doc_base_url_common]/codemirror/5.64.0/addon/search/search.js" > < / script >
< link rel = "stylesheet" href = "[doc_base_url_common]/codemirror/5.64.0/addon/search/matchesonscrollbar.css" type = "text/css" >
2015-04-18 20:50:39 +02:00
[end]
2021-11-26 21:49:21 +01:00
< script src = "[doc_base_url_common]/codemirror/5.64.0/addon/fold/xml-fold.js" > < / script >
< script src = "[doc_base_url_common]/codemirror/5.64.0/addon/edit/matchtags.js" > < / script >
< script src = "[doc_base_url_common]/codemirror/5.64.0/addon/selection/active-line.js" > < / script >
2022-07-31 02:03:39 +02:00
[# markdown to html converter ]
2021-11-26 21:49:21 +01:00
[# https://github.com/showdownjs/showdown ]
< script src = "[doc_base_url_common]/showdown/1.9.1/dist/showdown.min.js" > < / script >
2015-04-18 20:50:39 +02:00
< style >
.CodeMirror-matchingtag \{
font-weight: bold;
background: none;
\}
.CodeMirror-activeline-background \{
background: #f3f3f3;
\}
.CodeMirror \{
border: 1px solid #dedede;
\}
< / style >
< script type = "text/javascript" >
2021-11-26 21:49:21 +01:00
var winix_code_mirror_editor = null;
var winix_showdown_converter = null;
var winix_converter_output = null;
var winix_content_parsed = null;
var winix_emacs_mode = 0;
2015-04-18 20:50:39 +02:00
function winix_initialize_editor()
\{
var text_area = document.getElementById("winix_content_id");
2021-11-26 21:49:21 +01:00
var winix_contenttype = document.getElementById("winix_contenttype_id");
var onchange_delay = null;
winix_content_parsed = document.getElementById("winix_content_parsed_id");
2015-04-18 20:50:39 +02:00
if( text_area )
\{
2021-11-26 21:49:21 +01:00
winix_showdown_converter = new showdown.Converter();
winix_converter_output = document.getElementById("winix_output_preview");
2015-04-18 20:50:39 +02:00
winix_code_mirror_editor = CodeMirror.fromTextArea(text_area, \{
2021-11-26 21:49:21 +01:00
mode: winix_get_codemirror_mode(winix_emacs_mode),
2015-04-18 20:50:39 +02:00
theme: "default",
indentUnit: 4,
smartIndent: true,
tabSize: 4,
indentWithTabs: true,
extraKeys: \{
"F11": function(cm) \{ cm.setOption("fullScreen", !cm.getOption("fullScreen")); \},
"Esc": function(cm) \{ if (cm.getOption("fullScreen")) cm.setOption("fullScreen", false); \}
\},
lineNumbers: true,
lineWiseCopyCut: false,
dragDrop: false,
matchTags: true,
styleActiveLine: true
\});
2021-11-26 21:49:21 +01:00
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();
\});
\}
\}
function winix_codemirror_preview()
\{
if( winix_code_mirror_editor !== null )
\{
if( winix_emacs_mode == 2 )
\{
let sourceMarkup = winix_code_mirror_editor.getValue();
winix_converter_output.innerHTML = sourceMarkup;
if( winix_content_parsed !== null )
winix_content_parsed.value = "";
\}
else
if( winix_emacs_mode == 5 )
\{
let sourceMarkup = winix_code_mirror_editor.getValue();
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
\{
[# IMPROVEME add support for text and formated text ]
winix_converter_output.innerHTML = "";
if( winix_content_parsed !== null )
winix_content_parsed.value = "";
\}
2015-04-18 20:50:39 +02:00
\}
\}
2021-11-26 21:49:21 +01:00
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();
\}
\}
2015-04-18 20:50:39 +02:00
[if false]
this will probably be used to change the mode in the fly
winix_code_mirror_editor.setOption("mode", "");
before saving (update button by ajax) this method should be used:
cm.save()
Copy the content of the editor into the textarea.
[end]
2021-11-26 21:49:21 +01:00
window.addEventListener("load", winix_initialize_editor, false);
2015-04-18 20:50:39 +02:00
< / script >
[end]
2012-10-17 08:00:00 +02:00
2010-11-04 17:46:19 +01:00
[if winix_function_is "ckeditor"]
2023-09-30 01:03:54 +02:00
< script type = "text/javascript" src = "[doc_base_url_common]/ckeditor/4.22.1/ckeditor.js" > < / script >
2022-07-31 02:03:39 +02:00
[if not winix_has_jquery]
[def winix_has_jquery true]
2023-09-30 00:13:28 +02:00
< script type = "text/javascript" src = "[doc_base_url_common]/jquery/3.7.1/jquery-3.7.1.min.js" > < / script >
2022-07-31 02:03:39 +02:00
[end]
2018-05-10 19:21:39 +02:00
< script type = "text/javascript" src = "[doc_base_url_common]/winix/update_button.js" > < / script >
2010-11-04 17:46:19 +01:00
[end]
[if winix_function_is "tinymce"]
2021-01-22 16:56:51 +01:00
< 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 >
2022-07-31 02:03:39 +02:00
[if not winix_has_jquery]
[def winix_has_jquery true]
2023-09-30 00:13:28 +02:00
< script type = "text/javascript" src = "[doc_base_url_common]/jquery/3.7.1/jquery-3.7.1.min.js" > < / script >
2022-07-31 02:03:39 +02:00
[end]
2021-01-22 16:56:51 +01:00
< script type = "text/javascript" src = "[doc_base_url_common]/winix/update_button.js" > < / script >
2010-11-04 17:46:19 +01:00
[end]
2011-06-13 03:06:10 +02:00
[if winix_function_is "nicedit"]
2021-01-26 17:24:48 +01:00
< script type = "text/javascript" src = "[doc_base_url_common]/nicedit/0.9_r25/nicEdit.js" > < / script >
2011-06-13 03:06:10 +02:00
[end]
2010-11-04 17:46:19 +01:00
[if winix_function_is "vim"]
2021-01-25 14:34:35 +01:00
[# 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 ]
2010-11-04 17:46:19 +01:00
2022-07-31 02:03:39 +02:00
[if not winix_has_jquery]
[def winix_has_jquery true]
2023-09-30 00:13:28 +02:00
< script type = "text/javascript" src = "[doc_base_url_common]/jquery/3.7.1/jquery-3.7.1.min.js" > < / script >
2022-07-31 02:03:39 +02:00
[end]
2021-01-25 14:34:35 +01:00
< 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" >
2010-11-04 17:46:19 +01:00
< 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]
2011-01-31 16:51:53 +01:00
2011-04-01 18:30:14 +02:00
[if winix_function_is "gallery"]
2021-02-16 16:31:52 +01:00
[if gallery_mount_type_arg_is "lightbox"]
[# https://lokeshdhakar.com/projects/lightbox2/ ]
2011-04-01 18:30:14 +02:00
2022-07-31 02:03:39 +02:00
[if not winix_has_jquery]
[def winix_has_jquery true]
2023-09-30 00:13:28 +02:00
< script type = "text/javascript" src = "[doc_base_url_common]/jquery/3.7.1/jquery-3.7.1.min.js" > < / script >
2022-07-31 02:03:39 +02:00
[end]
2021-02-16 16:31:52 +01:00
< 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 >
2011-04-01 18:30:14 +02:00
[end]
2013-02-26 12:49:22 +01:00
2021-02-16 16:31:52 +01:00
[if gallery_mount_type_arg_is "galleriajs"]
[# https://galleriajs.github.io/ ]
[# formerly called aino-gallery ]
2022-07-31 02:03:39 +02:00
[if not winix_has_jquery]
[def winix_has_jquery true]
2023-09-30 00:13:28 +02:00
< script type = "text/javascript" src = "[doc_base_url_common]/jquery/3.7.1/jquery-3.7.1.min.js" > < / script >
2022-07-31 02:03:39 +02:00
[end]
2021-02-16 16:31:52 +01:00
< script src = "[doc_base_url_common]/galleriajs/1.6.1/dist/galleria.min.js" type = "text/javascript" > < / script >
2013-02-26 12:49:22 +01:00
[end]
2011-04-01 18:30:14 +02:00
[end]
2011-06-24 22:53:21 +02:00
2012-07-15 17:49:48 +02:00
2013-07-02 09:14:19 +02:00
[if winix_function_is "upload"]
2021-01-22 11:50:28 +01:00
[# https://blueimp.github.io/jQuery-File-Upload/]
2014-08-06 22:14:10 +02:00
[# https://github.com/blueimp/jQuery-File-Upload]
2012-07-15 17:49:48 +02:00
2014-08-06 22:14:10 +02:00
[# Force latest IE rendering engine or ChromeFrame if installed]
2022-07-31 02:03:39 +02:00
[if false]
2014-08-06 22:14:10 +02:00
<!-- \[if IE\]>
< meta http-equiv = "X-UA-Compatible" content = "IE=edge,chrome=1" >
<!\[endif\]-->
2022-07-31 02:03:39 +02:00
[end]
2012-07-15 17:49:48 +02:00
2021-01-22 11:50:28 +01:00
< link rel = "stylesheet" href = "[doc_base_url_common]/bootstrap/3.3.7/css/bootstrap.min.css" >
2021-01-21 17:10:04 +01:00
2021-01-22 11:50:28 +01:00
[# in doc_base_url_common/jquery-file-upload/10.31.0_extra/blueimp-gallery/ is download_all_files.sh script in order to download all necessary files]
2022-07-31 02:03:39 +02:00
[# blueimp Gallery styles ]
2021-01-22 11:50:28 +01:00
< link rel = "stylesheet" href = "[doc_base_url_common]/jquery-file-upload/10.31.0_extra/blueimp-gallery/blueimp-gallery.min.css" >
2012-07-15 17:49:48 +02:00
2021-01-22 11:50:28 +01:00
[# 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.31.0/css/jquery.fileupload.css" >
< link rel = "stylesheet" href = "[doc_base_url_common]/jquery-file-upload/10.31.0/css/jquery.fileupload-ui.css" >
2012-07-15 17:49:48 +02:00
2021-01-22 11:50:28 +01:00
[# CSS adjustments for browsers with JavaScript disabled]
< noscript >
< link rel = "stylesheet" href = "[doc_base_url_common]/jquery-file-upload/10.31.0/css/jquery.fileupload-noscript.css" >
< link rel = "stylesheet" href = "[doc_base_url_common]/jquery-file-upload/10.31.0/css/jquery.fileupload-ui-noscript.css" >
< / noscript >
2012-07-15 17:49:48 +02:00
2022-07-31 02:03:39 +02:00
[if not winix_has_jquery]
[def winix_has_jquery true]
2023-09-30 00:13:28 +02:00
< script type = "text/javascript" src = "[doc_base_url_common]/jquery/3.7.1/jquery-3.7.1.min.js" > < / script >
2022-07-31 02:03:39 +02:00
[end]
2021-01-22 11:50:28 +01:00
2022-07-31 02:03:39 +02:00
[# The jQuery UI widget factory, can be omitted if jQuery UI is already included ]
2021-01-22 11:50:28 +01:00
< script src = "[doc_base_url_common]/jquery-file-upload/10.31.0/js/vendor/jquery.ui.widget.js" > < / script >
2022-07-31 02:03:39 +02:00
[# The Templates plugin is included to render the upload/download listings ]
2021-01-22 11:50:28 +01:00
< script src = "[doc_base_url_common]/jquery-file-upload/10.31.0_extra/tmpl.min.js" > < / script >
2022-07-31 02:03:39 +02:00
[# The Load Image plugin is included for the preview images and image resizing functionality ]
2021-01-22 11:50:28 +01:00
< script src = "[doc_base_url_common]/jquery-file-upload/10.31.0_extra/load-image.all.min.js" > < / script >
2022-07-31 02:03:39 +02:00
[# The Canvas to Blob plugin is included for image resizing functionality ]
2021-01-22 11:50:28 +01:00
< script src = "[doc_base_url_common]/jquery-file-upload/10.31.0_extra/canvas-to-blob.min.js" > < / script >
2022-07-31 02:03:39 +02:00
[# blueimp Gallery script ]
2021-01-22 11:50:28 +01:00
< script src = "[doc_base_url_common]/jquery-file-upload/10.31.0_extra/jquery.blueimp-gallery.min.js" > < / script >
2022-07-31 02:03:39 +02:00
[# The Iframe Transport is required for browsers without support for XHR file uploads ]
2021-01-22 11:50:28 +01:00
< script src = "[doc_base_url_common]/jquery-file-upload/10.31.0/js/jquery.iframe-transport.js" > < / script >
2022-07-31 02:03:39 +02:00
[# The basic File Upload plugin ]
2021-01-22 11:50:28 +01:00
< script src = "[doc_base_url_common]/jquery-file-upload/10.31.0/js/jquery.fileupload.js" > < / script >
2022-07-31 02:03:39 +02:00
[# The File Upload processing plugin ]
2021-01-22 11:50:28 +01:00
< script src = "[doc_base_url_common]/jquery-file-upload/10.31.0/js/jquery.fileupload-process.js" > < / script >
2022-07-31 02:03:39 +02:00
[# The File Upload image preview & resize plugin ]
2021-01-22 11:50:28 +01:00
< script src = "[doc_base_url_common]/jquery-file-upload/10.31.0/js/jquery.fileupload-image.js" > < / script >
2022-07-31 02:03:39 +02:00
[# The File Upload audio preview plugin ]
2021-01-22 11:50:28 +01:00
< script src = "[doc_base_url_common]/jquery-file-upload/10.31.0/js/jquery.fileupload-audio.js" > < / script >
2022-07-31 02:03:39 +02:00
[# The File Upload video preview plugin ]
2021-01-22 11:50:28 +01:00
< script src = "[doc_base_url_common]/jquery-file-upload/10.31.0/js/jquery.fileupload-video.js" > < / script >
2022-07-31 02:03:39 +02:00
[# The File Upload validation plugin ]
2021-01-22 11:50:28 +01:00
< script src = "[doc_base_url_common]/jquery-file-upload/10.31.0/js/jquery.fileupload-validate.js" > < / script >
2022-07-31 02:03:39 +02:00
[# The File Upload user interface plugin ]
2021-01-22 11:50:28 +01:00
< script src = "[doc_base_url_common]/jquery-file-upload/10.31.0/js/jquery.fileupload-ui.js" > < / script >
[if false]
2022-07-31 02:03:39 +02:00
[# 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.31.0/js/demo.js" > < / script >
2021-01-22 11:50:28 +01:00
[end]
2012-07-15 17:49:48 +02:00
2022-07-31 02:03:39 +02:00
[if false]
[# The XDomainRequest Transport is included for cross-domain file deletion for IE 8 and IE 9 ]
2021-01-22 11:50:28 +01:00
<!-- \[if (gte IE 8)&(lt IE 10)\]>
< script src = "[doc_base_url_common]/jquery-file-upload/10.31.0/js/cors/jquery.xdr-transport.js" > < / script >
<!\[endif\]-->
2022-07-31 02:03:39 +02:00
[end]
2011-06-24 22:53:21 +02:00
[end]
2012-07-15 17:49:48 +02:00
2011-08-02 02:10:45 +02:00
[if winix_function_is "sort"]
2021-06-20 18:12:43 +02:00
[if not request.is_item]
2021-01-28 20:16:44 +01:00
< script type = "text/javascript" src = "[doc_base_url_common]/winix/winix_sort.js" > < / script >
2011-08-02 02:10:45 +02:00
[end]
[end]
2011-06-24 22:53:21 +02:00
2013-03-29 23:03:28 +01:00
[if winix_function_is "imgcrop"]
2022-07-31 02:03:39 +02:00
[if not winix_has_jquery]
[def winix_has_jquery true]
2023-09-30 00:13:28 +02:00
< script type = "text/javascript" src = "[doc_base_url_common]/jquery/3.7.1/jquery-3.7.1.min.js" > < / script >
2022-07-31 02:03:39 +02:00
[end]
2021-02-16 18:35:55 +01:00
< 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" >
2013-03-29 23:03:28 +01:00
[end]
2021-10-07 04:42:46 +02:00
[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/ ]
2023-02-15 23:03:56 +01:00
< 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 >
2021-10-07 04:42:46 +02:00
[if is_not [lang "flatpickr_locale_url"] "none"]
2023-02-15 23:03:56 +01:00
< script src = "[doc_base_url_common]/flatpickr/4.6.13/l10n/[lang " flatpickr_locale_url " ] " > < / script >
2023-02-15 22:57:41 +01:00
< script > flatpickr . localize ( flatpickr . l10ns . { flatpickr _locale _config _prefix } ) ; < / script >
2021-10-07 04:42:46 +02:00
[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]
2022-10-14 01:56:44 +02:00
< script src = "[doc_base_url_common]/litepicker/2.0.12/bundle.js" > < / script >
2021-10-07 04:42:46 +02:00
[if false]
[# can be inserted in this way: ]
< script >
const picker = new Litepicker(\{
element: document.getElementById('my-input-id'),
plugins: \['mobilefriendly'\],
2022-10-14 01:56:44 +02:00
lang: '{winix_html_lang_attr}'
\});
< / script >
[end]
[end]
[if winix_load_easepick]
[# https://easepick.com/]
2023-08-21 13:31:02 +02:00
< script src = "[doc_base_url_common]/easepick/[winix_easepick_version]/index.umd.js" > < / script >
2022-10-14 01:56:44 +02:00
[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: \[
2023-08-21 13:31:02 +02:00
'[doc_base_url_common]/easepick/[winix_easepick_version]/index.css',
2022-10-14 01:56:44 +02:00
\],
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(\{
2023-08-21 13:31:02 +02:00
element: document.getElementById('my-input-id'),
2022-10-14 01:56:44 +02:00
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: \[
2023-08-21 13:31:02 +02:00
'[doc_base_url_common]/easepick/[winix_easepick_version]/index.css',
2022-10-14 01:56:44 +02:00
\],
RangePlugin: \{
2023-08-21 13:31:02 +02:00
elementEnd: document.getElementById('my-second-input-id'),
2022-10-14 01:56:44 +02:00
tooltip: true,
locale: \{ one: '{easepick_one_day}', other: '{easepick_more_days}' \},
\},
LockPlugin: \{
minDate: "2000-10-10 00:00",
maxDate: "2000-10-11 00:00",
\},
2021-10-07 04:42:46 +02:00
\});
< / script >
[end]
2022-10-14 01:56:44 +02:00
2021-10-07 04:42:46 +02:00
[end]
2022-10-14 01:56:44 +02:00
2015-03-09 00:22:05 +01:00
[if false]
[# temporarily blocked]
2011-06-24 22:53:21 +02:00
[if winix_has_plugin "stats"]
[include "stats_info.html"]
[end]
2015-03-09 00:22:05 +01:00
[end]
2011-06-24 22:53:21 +02:00
2022-05-30 05:35:49 +02:00
[if winix_load_winixjs]
< script src = "[doc_base_url_common]/winix/winix.js" > < / script >
[end]