summaryrefslogtreecommitdiffstats
path: root/script/fileselect.js
diff options
context:
space:
mode:
authorSimon Rettberg2017-11-29 11:31:26 +0100
committerSimon Rettberg2017-11-29 11:31:26 +0100
commit4d120b829ad657dc329282ae6969cf1b988e544c (patch)
tree4f3c1d35eead4dfaf3caad8caaf06e64562c1d49 /script/fileselect.js
parent[runmode] Implement delete-machine action (diff)
downloadslx-admin-4d120b829ad657dc329282ae6969cf1b988e544c.tar.gz
slx-admin-4d120b829ad657dc329282ae6969cf1b988e544c.tar.xz
slx-admin-4d120b829ad657dc329282ae6969cf1b988e544c.zip
[js] Move all our fixes into one file, add browser history/URL fix for messages
Hides all the ugly message[]= entries from the URL string, so copy/paste won't show the message out of context again
Diffstat (limited to 'script/fileselect.js')
-rw-r--r--script/fileselect.js20
1 files changed, 0 insertions, 20 deletions
diff --git a/script/fileselect.js b/script/fileselect.js
deleted file mode 100644
index 13711fd5..00000000
--- a/script/fileselect.js
+++ /dev/null
@@ -1,20 +0,0 @@
-$(document).on('change', '.btn-file :file', function() {
- var input = $(this);
- var numFiles = input.get(0).files ? input.get(0).files.length : 1;
- var label = input.val().replace(/\\/g, '/').replace(/.*\//, '');
- input.trigger('fileselect', [numFiles, label]);
-});
-
-$(document).ready(function() {
- $('.btn-file :file').on('fileselect', function(event, numFiles, label) {
- var input = $(this).parents('.upload-ex').find(':text');
- var log = numFiles > 1 ? numFiles + ' files selected' : label;
- if (input.length) {
- input.val(log);
- }
- });
-});
-
-$('.upload-ex :text').click(function () {
- $(this).parents('.upload-ex').find(':file').click();
-}); \ No newline at end of file