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
57df3965
Commit
57df3965
authored
Apr 08, 2009
by
Richard Mansfield
Browse files
Do nothing rather than displaying an error when dropping a folder onto itself
parent
1aac32c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/file/js/filebrowser.js
View file @
57df3965
...
@@ -261,8 +261,13 @@ function FileBrowser(idprefix, folderid, config, globalconfig) {
...
@@ -261,8 +261,13 @@ function FileBrowser(idprefix, folderid, config, globalconfig) {
accept
:
[
'
icon-drag-current
'
],
accept
:
[
'
icon-drag-current
'
],
hoverclass
:
'
folderhover
'
,
hoverclass
:
'
folderhover
'
,
ondrop
:
function
(
dragged
,
dropped
)
{
ondrop
:
function
(
dragged
,
dropped
)
{
$
(
self
.
id
+
'
_move
'
).
value
=
dragged
.
id
.
replace
(
/^.*drag:
(\d
+
)
$/
,
'
$1
'
);
var
dragid
=
dragged
.
id
.
replace
(
/^.*drag:
(\d
+
)
$/
,
'
$1
'
);
$
(
self
.
id
+
'
_moveto
'
).
value
=
dropped
.
id
.
replace
(
/^file:
(\d
+
)
$/
,
'
$1
'
);
var
dropid
=
dropped
.
id
.
replace
(
/^file:
(\d
+
)
$/
,
'
$1
'
);
if
(
dragid
==
dropid
)
{
return
;
}
$
(
self
.
id
+
'
_move
'
).
value
=
dragid
;
$
(
self
.
id
+
'
_moveto
'
).
value
=
dropid
;
signal
(
self
.
form
,
'
onsubmit
'
);
signal
(
self
.
form
,
'
onsubmit
'
);
self
.
form
.
submit
();
self
.
form
.
submit
();
$
(
self
.
id
+
'
_move
'
).
value
=
''
;
$
(
self
.
id
+
'
_move
'
).
value
=
''
;
...
...
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