Skip to content
GitLab
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
100cde3f
Commit
100cde3f
authored
Jan 11, 2007
by
Richard Mansfield
Browse files
Ugly file,folder icons stolen from apache
parent
a52ded3f
Changes
9
Hide whitespace changes
Inline
Side-by-side
htdocs/admin/site/files.php
View file @
100cde3f
...
...
@@ -39,10 +39,6 @@ $javascript = <<<JAVASCRIPT
var copyrightnotice = '{$copyright}';
var browser = new FileBrowser('filelist', '{$wwwroot}artefact/file/myfiles.json.php', {'adminfiles':true});
browser.createfolderscript = '{$wwwroot}artefact/file/createfolder.json.php';
browser.deletescript = '{$wwwroot}artefact/file/delete.json.php';
browser.updatemetadatascript = '{$wwwroot}artefact/file/updatemetadata.json.php';
browser.downloadscript = '{$wwwroot}artefact/file/download.php';
var uploader = new FileUploader('uploader', '{$wwwroot}artefact/file/upload.php', {'adminfiles':true},
null, null, browser.refresh, browser.fileexists);
browser.changedircallback = uploader.updatedestination;
...
...
htdocs/artefact/blog/theme/default/editpost.tpl
View file @
100cde3f
...
...
@@ -15,6 +15,7 @@
<div
id=
'uploader'
></div>
<table
id=
'filebrowser'
style=
'display: none;'
>
<thead><tr>
<th></th>
<th>
{
str
section
=
artefact
.
file
tag
=
name
}
</th>
<th>
{
str
section
=
artefact
.
file
tag
=
description
}
</th>
<th>
{
str
section
=
artefact
.
file
tag
=
size
}
</th>
...
...
htdocs/artefact/file/js/file.js
View file @
100cde3f
...
...
@@ -18,10 +18,10 @@ function FileBrowser(element, source, statevars, changedircallback, actionname,
this
.
actionname
=
actionname
;
this
.
canmodify
=
!
actionname
;
this
.
filenames
=
{};
this
.
deletescript
=
'
delete.json.php
'
;
this
.
createfolderscript
=
'
createfolder.json.php
'
;
this
.
updatemetadatascript
=
'
updatemetadata.json.php
'
;
this
.
downloadscript
=
'
download.php
'
;
this
.
deletescript
=
config
.
wwwroot
+
'
artefact/file/
delete.json.php
'
;
this
.
createfolderscript
=
config
.
wwwroot
+
'
artefact/file/
createfolder.json.php
'
;
this
.
updatemetadatascript
=
config
.
wwwroot
+
'
artefact/file/
updatemetadata.json.php
'
;
this
.
downloadscript
=
config
.
wwwroot
+
'
artefact/file/
download.php
'
;
if
(
this
.
actionname
)
{
this
.
lastcolumnfunc
=
function
(
r
)
{
...
...
@@ -73,6 +73,7 @@ function FileBrowser(element, source, statevars, changedircallback, actionname,
self
.
element
,
self
.
source
,
[
function
(
r
)
{
return
TD
(
null
,
self
.
icon
(
r
.
artefacttype
));
},
self
.
formatname
,
'
description
'
,
function
(
r
)
{
return
TD
(
null
,
(
r
.
artefacttype
!=
'
folder
'
)
?
self
.
showsize
(
r
.
size
)
:
null
);
},
...
...
@@ -202,7 +203,7 @@ function FileBrowser(element, source, statevars, changedircallback, actionname,
this
.
showsize
=
function
(
bytes
)
{
if
(
bytes
<
1024
)
{
return
bytes
+
'
b
'
;
return
bytes
+
(
bytes
>
0
?
'
b
'
:
''
)
;
}
if
(
bytes
<
1048576
)
{
return
Math
.
floor
((
bytes
/
1024
)
*
10
+
0.5
)
/
10
+
'
k
'
;
...
...
@@ -210,6 +211,10 @@ function FileBrowser(element, source, statevars, changedircallback, actionname,
return
Math
.
floor
((
bytes
/
1048576
)
*
10
+
0.5
)
/
10
+
'
M
'
;
}
this
.
icon
=
function
(
type
)
{
return
IMG
({
'
src
'
:
config
.
themeurl
+
type
+
'
.gif
'
});
}
this
.
formatname
=
function
(
r
)
{
self
.
filenames
[
r
.
title
]
=
true
;
if
(
r
.
artefacttype
==
'
folder
'
)
{
...
...
htdocs/artefact/file/theme/default/index.tpl
View file @
100cde3f
...
...
@@ -10,6 +10,7 @@
<div
id=
"uploader"
></div>
<table
id=
"filelist"
class=
"tablerenderer"
>
<thead><tr>
<th></th>
<th>
{
str
tag
=
name
section
=
artefact
.
file
}
</th>
<th>
{
str
tag
=
description
section
=
artefact
.
file
}
</th>
<th>
{
str
tag
=
size
section
=
artefact
.
file
}
</th>
...
...
htdocs/theme/default/static/file.gif
0 → 100644
View file @
100cde3f
229 Bytes
htdocs/theme/default/static/folder.gif
0 → 100644
View file @
100cde3f
225 Bytes
htdocs/theme/default/static/image.gif
0 → 100644
View file @
100cde3f
274 Bytes
htdocs/theme/default/templates/admin/site/files.tpl
View file @
100cde3f
...
...
@@ -10,6 +10,7 @@
<div
id=
"uploader"
></div>
<table
id=
"filelist"
class=
"tablerenderer"
>
<thead><tr>
<th></th>
<th>
{
str
tag
=
name
section
=
artefact
.
file
}
</th>
<th>
{
str
tag
=
description
section
=
artefact
.
file
}
</th>
<th>
{
str
tag
=
size
section
=
artefact
.
file
}
</th>
...
...
htdocs/theme/default/templates/header.tpl
View file @
100cde3f
...
...
@@ -4,7 +4,8 @@
<title>
{
$title
|
default
:
"Mahara"
|
escape
}
</title>
<script
type=
"text/javascript"
>
var
config
=
{
literal
}{{/
literal
}
'themeurl'
:
'{$THEMEURL}'
'themeurl'
:
'{$THEMEURL}'
,
'wwwroot'
:
'{$WWWROOT}'
{
literal
}}{/
literal
}
;
</script>
{
foreach
from
=
$JAVASCRIPT
item
=
script
}
<script
type=
"text/javascript"
src=
"
{
$script
}
"
></script>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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