summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-filebrowser/htdocs/luci-static/resources/view/system/filebrowser.js
blob: 33fe2614e8ccd2e8ae39208d32c5d7d1a7534591 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
'use strict';
'require view';
'require ui';
'require form';

var formData = {
	files: {
		root: null,
	}
};

return view.extend({
	render: function() {
		var m, s, o;

		m = new form.JSONMap(formData, _('File Browser'), '');

		s = m.section(form.NamedSection, 'files', 'files');

		o = s.option(form.FileUpload, 'root', '');
		o.root_directory = '/';
		o.browser = true;
		o.show_hidden = true;
		o.enable_upload = true;
		o.enable_remove = true;
		o.enable_download = true;

		return m.render();
	},

	handleSave: null,
	handleSaveApply: null,
	handleReset: null
})