Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
25e7dc1e
Commit
25e7dc1e
authored
Apr 19, 2013
by
Bart Visscher
Browse files
Merge pull request #3024 from owncloud/file-delete-action
Fix #1164 and fix showing spinner on delete
parents
4ccc9d89
802a5a33
Changes
2
Hide whitespace changes
Inline
Side-by-side
apps/files/ajax/delete.php
View file @
25e7dc1e
...
...
@@ -8,7 +8,7 @@ OCP\JSON::callCheck();
// Get data
$dir
=
stripslashes
(
$_POST
[
"dir"
]);
$files
=
isset
(
$_POST
[
"file"
])
?
stripslashes
(
$_POST
[
"file"
]
)
:
stripslashes
(
$_POST
[
"files"
]
)
;
$files
=
isset
(
$_POST
[
"file"
])
?
$_POST
[
"file"
]
:
$_POST
[
"files"
];
$files
=
json_decode
(
$files
);
$filesWithError
=
''
;
...
...
apps/files/js/filelist.js
View file @
25e7dc1e
...
...
@@ -320,9 +320,9 @@ var FileList={
}
for
(
var
i
=
0
;
i
<
files
.
length
;
i
++
)
{
var
deleteAction
=
$
(
'
tr
'
).
filterAttr
(
'
data-file
'
,
files
[
i
]).
children
(
"
td.date
"
).
children
(
"
.action.delete
"
);
var
oldHTML
=
deleteAction
[
0
].
outerHTML
;
var
oldHTML
=
deleteAction
.
html
()
;
var
newHTML
=
'
<img class="move2trash" data-action="Delete" title="
'
+
t
(
'
files
'
,
'
perform delete operation
'
)
+
'
" src="
'
+
OC
.
imagePath
(
'
core
'
,
'
loading.gif
'
)
+
'
"></a>
'
;
deleteAction
[
0
].
outerHTML
=
newHTML
;
deleteAction
.
html
(
newHTML
)
;
}
// Finish any existing actions
if
(
FileList
.
lastAction
)
{
...
...
@@ -344,7 +344,7 @@ var FileList={
}
else
{
$
.
each
(
files
,
function
(
index
,
file
)
{
var
deleteAction
=
$
(
'
tr
'
).
filterAttr
(
'
data-file
'
,
file
).
children
(
"
td.date
"
).
children
(
"
.move2trash
"
);
deleteAction
[
0
].
outerHTML
=
oldHTML
;
deleteAction
.
html
(
oldHTML
)
;
});
}
});
...
...
Write
Preview
Markdown
is supported
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