Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Lufi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
40
Issues
40
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Fiat Tux
Hat softwares
Lufi
Commits
55b0a366
Commit
55b0a366
authored
Sep 12, 2017
by
Luc Didry
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes
#23
This commit is dedicated to Schoumi, who is supporting me on Tipeee. Many thanks :-)
parent
834f2520
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
2 deletions
+28
-2
CHANGELOG
CHANGELOG
+1
-0
themes/default/public/js/lufi-files.js
themes/default/public/js/lufi-files.js
+27
-2
No files found.
CHANGELOG
View file @
55b0a366
...
...
@@ -10,6 +10,7 @@ Revision history for Lufi
- Portuguese translation
- Catalan translation
- IE 11 support
- Deleting files from "My files" is now done with Ajax (#23)
- Bugfixes
0.01 2017-01-09
...
...
themes/default/public/js/lufi-files.js
View file @
55b0a366
...
...
@@ -106,6 +106,30 @@ function importStorage(f) {
reader
.
readAsArrayBuffer
(
f
[
0
]);
}
function
delFile
()
{
var
dlink
=
$
(
this
).
attr
(
'
data-dlink
'
);
var
short
=
$
(
this
).
attr
(
'
data-short
'
);
$
.
ajax
({
url
:
dlink
,
method
:
'
GET
'
,
data
:
{
format
:
'
json
'
},
success
:
function
(
data
)
{
if
(
data
.
success
)
{
$
(
'
#row-
'
+
short
).
remove
();
delItem
(
short
);
}
else
{
alert
(
data
.
msg
);
}
},
error
:
function
()
{
},
complete
:
function
()
{
}
});
}
function
populateFilesTable
()
{
$
(
'
#myfiles
'
).
empty
();
...
...
@@ -125,7 +149,7 @@ function populateFilesTable() {
var
limit
=
(
element
.
delay
===
0
)
?
i18n
.
noExpiration
:
moment
.
unix
(
element
.
delay
*
86400
+
element
.
created_at
).
locale
(
window
.
navigator
.
language
).
format
(
'
LLLL
'
);
var
created_at
=
moment
.
unix
(
element
.
created_at
).
locale
(
window
.
navigator
.
language
).
format
(
'
LLLL
'
);
var
tr
=
$
(
'
<tr>
'
);
var
tr
=
$
(
'
<tr
id="row-
'
+
element
.
short
+
'
"
>
'
);
tr
.
html
([
'
<td class="left-align">
'
,
escapeHtml
(
element
.
name
),
'
</td>
'
,
...
...
@@ -144,12 +168,13 @@ function populateFilesTable() {
limit
,
'
</td>
'
,
'
<td class="center-align">
'
,
'
<a
href="
'
,
dlink
,
'
" class="classic"><i class="small mdi-action-delete"></i></a>
'
,
'
<a
id="del-
'
,
element
.
short
,
'
" data-short="
'
,
element
.
short
,
'
" data-dlink="
'
,
dlink
,
'
" href="#
" class="classic"><i class="small mdi-action-delete"></i></a>
'
,
'
</td>
'
,
'
<td class="center-align">
'
,
'
<a href="
'
+
baseURL
+
'
m?links=["
'
+
element
.
short
+
'
"]" class="classic"><i class="small mdi-communication-email"></i></a>
'
,
'
</td>
'
].
join
(
''
));
$
(
'
#myfiles
'
).
append
(
tr
);
$
(
'
#del-
'
+
element
.
short
).
on
(
'
click
'
,
delFile
);
$
.
ajax
({
url
:
counterURL
,
...
...
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