diff options
author | silverwind <me@silverwind.io> | 2020-03-07 22:06:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-07 21:06:15 +0000 |
commit | 9d3e69e8677008384d159ee138515ff7498064d7 (patch) | |
tree | 6f4108b98bd665506315ce8dd41e2e66b0896a3d /templates | |
parent | 0c2148c037c4bc23a802c7a5580e3fed336ebe3e (diff) | |
download | gitea-9d3e69e8677008384d159ee138515ff7498064d7.tar.gz gitea-9d3e69e8677008384d159ee138515ff7498064d7.zip |
Move dropzone.js to npm/webpack (#10645)
- unvendor dropzone and upgrade it from 4.2.0 to 5.7.0
- make `csrf` available on window.config
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base/footer.tmpl | 3 | ||||
-rw-r--r-- | templates/base/head.tmpl | 5 | ||||
-rw-r--r-- | templates/pwa/serviceworker_js.tmpl | 2 |
3 files changed, 3 insertions, 7 deletions
diff --git a/templates/base/footer.tmpl b/templates/base/footer.tmpl index fcf2f91b8c..9b54d9b2a8 100644 --- a/templates/base/footer.tmpl +++ b/templates/base/footer.tmpl @@ -29,9 +29,6 @@ {{if .RequireDatetimepicker}} <script src="{{StaticUrlPrefix}}/vendor/plugins/jquery.datetimepicker/jquery.datetimepicker.js"></script> {{end}} -{{if .RequireDropzone}} - <script src="{{StaticUrlPrefix}}/vendor/plugins/dropzone/dropzone.js"></script> -{{end}} {{if .RequireU2F}} <script src="{{StaticUrlPrefix}}/vendor/plugins/u2f/index.js"></script> {{end}} diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index a0992b2bd0..c222c96af1 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -86,8 +86,8 @@ window.config = { AppSubUrl: '{{AppSubUrl}}', StaticUrlPrefix: '{{StaticUrlPrefix}}', + csrf: '{{.CsrfToken}}', Datetimepicker: {{if .RequireDatetimepicker}}true{{else}}false{{end}}, - Dropzone: {{if .RequireDropzone}}true{{else}}false{{end}}, HighlightJS: {{if .RequireHighlightJS}}true{{else}}false{{end}}, Minicolors: {{if .RequireMinicolors}}true{{else}}false{{end}}, SimpleMDE: {{if .RequireSimpleMDE}}true{{else}}false{{end}}, @@ -125,9 +125,6 @@ {{if .RequireDatetimepicker}} <link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/plugins/jquery.datetimepicker/jquery.datetimepicker.css"> {{end}} -{{if .RequireDropzone}} - <link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/plugins/dropzone/dropzone.css"> -{{end}} <style class="list-search-style"></style> {{if .PageIsUserProfile}} <meta property="og:title" content="{{.Owner.Name}}" /> diff --git a/templates/pwa/serviceworker_js.tmpl b/templates/pwa/serviceworker_js.tmpl index 0fc9ed3193..2472b23a1f 100644 --- a/templates/pwa/serviceworker_js.tmpl +++ b/templates/pwa/serviceworker_js.tmpl @@ -9,6 +9,7 @@ var urlsToCache = [ '{{StaticUrlPrefix}}/js/jquery.js?v={{MD5 AppVer}}', '{{StaticUrlPrefix}}/js/swagger.js?v={{MD5 AppVer}}', '{{StaticUrlPrefix}}/js/userheatmap.js', + '{{StaticUrlPrefix}}/js/dropzone.js', '{{StaticUrlPrefix}}/vendor/plugins/codemirror/addon/mode/loadmode.js', '{{StaticUrlPrefix}}/vendor/plugins/codemirror/mode/meta.js', '{{StaticUrlPrefix}}/vendor/plugins/dropzone/dropzone.js', @@ -21,6 +22,7 @@ var urlsToCache = [ '{{StaticUrlPrefix}}/css/index.css?v={{MD5 AppVer}}', '{{StaticUrlPrefix}}/css/swagger.css?v={{MD5 AppVer}}', '{{StaticUrlPrefix}}/css/userheatmap.css', + '{{StaticUrlPrefix}}/css/dropzone.css', '{{StaticUrlPrefix}}/fomantic/semantic.min.css?v={{MD5 AppVer}}', '{{StaticUrlPrefix}}/vendor/assets/font-awesome/css/font-awesome.min.css', '{{StaticUrlPrefix}}/vendor/plugins/dropzone/dropzone.css', |