Widget:File upload: verschil tussen versies
Uit Dorpsbelang Den Hout
Regel 24: | Regel 24: | ||
<!--{if (isset($drop) && $drop=="true")}--><div id="drop-area"><div><!--{/if}--> | <!--{if (isset($drop) && $drop=="true")}--><div id="drop-area"><div><!--{/if}--> | ||
− | <label for="widget-file-upload-files" ><!--{if (isset($button) && $button!="")}--><!--{$button}--><!--{else}--><button>Upload</button><!--{/if}--><input type="file" id="widget-file-upload-files" name="files[]" style="display:none" <!--{if (isset($multiple) && $multiple=="false")}--><!--{else}-->multiple<!--{/if}--> /></label> | + | <label for="widget-file-upload-files" > |
+ | <!--{if (isset($button) && $button!="")}--><!--{$button}--><!--{else}--><button>Upload</button><!--{/if}--> | ||
+ | <input type="file" id="widget-file-upload-files" name="files[]" style="display:none" | ||
+ | <!--{if (isset($multiple) && $multiple=="false")}--><!--{else}-->multiple<!--{/if}--> | ||
+ | <!--{if (isset($preview) && $preview!="")}-->data-preview="<!--{$preview}-->"<!--{/if}--> | ||
+ | <!--{if (isset($caption) && $caption!="")}-->data-caption="<!--{$caption}-->"<!--{/if}--> | ||
+ | <!--{if (isset($drop) && $drop!="")}-->data-drop="<!--{$drop}-->"<!--{/if}--> | ||
+ | <!--{if (isset($filepagetemplate) && $filepagetemplate!="")}--> data-filepagetemplate="<!--{$filepagetemplate}-->"<!--{/if}--> | ||
+ | <!--{if (isset($filepageparameters) && $filepageparameters!="")}--> data-filepageparameters="<!--{$filepageparameters}-->"<!--{/if}--> | ||
+ | <!--{if (isset($filename) && $filename!="")}--> data-filename="<!--{$filename}-->"<!--{/if}--> | ||
+ | /> | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | </label> | ||
<!--{if (isset($drop) && $drop=="true")}--></div ></div><!--{/if}--> | <!--{if (isset($drop) && $drop=="true")}--></div ></div><!--{/if}--> | ||
Regel 33: | Regel 50: | ||
var dropped; | var dropped; | ||
− | var | + | var fileInput = document.getElementById('widget-file-upload-files'); |
− | var settingsCaption | + | |
− | var settingsDrop | + | var settingsPreview = fileInput.getAttribute('data-preview'); |
− | var settingsFilepagetemplate | + | var settingsCaption = fileInput.getAttribute('data-caption'); |
− | var settingsFilepageparameters | + | var settingsDrop = fileInput.getAttribute('data-drop'); |
− | var settingsFilename | + | var settingsFilepagetemplate = fileInput.getAttribute('data-filepagetemplate'); |
+ | var settingsFilepageparameters = fileInput.getAttribute('data-filepageparameters'); | ||
+ | var settingsFilename = fileInput.getAttribute('data-filename'); | ||
− | |||
Versie van 8 sep 2020 08:02
This is the Widget:File upload page. It should be called in the following format:
{{#widget:File upload |multiple=false |preview=true |caption=true |drop=false |button={{fa|upload}} |filepagetemplate=file for test |filepageparameters=filename:<FILENAME><Title>;page:{{FULLPAGENAME}} |filename=<FILENAME><Title> }}