Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
89934e30
Commit
89934e30
authored
9 years ago
by
echicken
Browse files
Options
Downloads
Patches
Plain Diff
'load' callback must return the list of files.
parent
2f617688
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
exec/load/filebrowser.js
+7
-4
7 additions, 4 deletions
exec/load/filebrowser.js
with
7 additions
and
4 deletions
exec/load/filebrowser.js
+
7
−
4
View file @
89934e30
...
...
@@ -51,7 +51,8 @@
read but before the file list has been displayed. Its callback
function will be given one argument, an array of strings of the
complete paths of all files and subdirectories within the current
directory.
directory. It must return this array - or a modified version
thereof - once complete.
- 'file' is an event that fires once for each file in the list, just
prior to the file being displayed. Its callback function will receive
...
...
@@ -163,7 +164,9 @@ var FileBrowser = function(options) {
};
var
callbacks
=
{
'
load
'
:
function
(
list
)
{},
'
load
'
:
function
(
list
)
{
return
list
;
},
'
file
'
:
function
(
str
)
{
if
(
file_isdir
(
str
))
return
"
[
"
+
file_getname
(
str
)
+
"
]
"
;
...
...
@@ -229,7 +232,7 @@ var FileBrowser = function(options) {
);
// Would rather use GLOB_APPEND here, but it crashes my BBS. :|
files
=
[].
concat
(
var
files
=
[].
concat
(
directory
(
properties
.
path
+
"
*
"
,
GLOB_ONLYDIR
|
GLOB_PERIOD
...
...
@@ -244,7 +247,7 @@ var FileBrowser = function(options) {
}
)
);
callbacks
.
load
.
apply
(
self
,
[
files
]);
files
=
callbacks
.
load
.
apply
(
self
,
[
files
]);
files
.
forEach
(
function
(
item
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment