Commit 82b43643 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Pass json script to filebrowser constructor

parent aa943f14
......@@ -34,7 +34,7 @@ $copyright = get_field('site_content', 'content', 'name', 'uploadcopyright');
$javascript = <<<JAVASCRIPT
var copyrightnotice = '{$copyright}';
var browser = new FileBrowser('filelist');
var browser = new FileBrowser('filelist', 'myfiles.json.php');
var uploader = new FileUploader('uploader', 'upload.php', null, null, browser.refresh, browser.fileexists);
browser.changedircallback = uploader.updatedestination;
......
var changedir = function () {};
function FileBrowser(element, changedircallback) {
function FileBrowser(element, source, changedircallback) {
var self = this;
this.element = element;
this.source = source;
this.pathids = {'/':null};
this.cwd = '/';
if (typeof(changedircallback) == 'function') {
......@@ -29,7 +30,7 @@ function FileBrowser(element, changedircallback) {
self.filelist = new TableRenderer(
self.element,
'myfiles.json.php',
self.source,
[
self.formatname,
'description',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment