Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
82b43643
Commit
82b43643
authored
Dec 19, 2006
by
Richard Mansfield
Browse files
Pass json script to filebrowser constructor
parent
aa943f14
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/file/index.php
View file @
82b43643
...
...
@@ -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;
...
...
htdocs/artefact/file/js/filebrowser.js
View file @
82b43643
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
'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment