Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Fiat Tux
Hat softwares
Lutim
Commits
87e0e4e2
Verified
Commit
87e0e4e2
authored
Sep 20, 2019
by
Luc Didry
Browse files
Fix
#105
—
✨
Add a "select all" checkbox on /myfiles
parent
dc3735b3
Pipeline
#167830
passed with stages
in 12 minutes and 13 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
87e0e4e2
...
...
@@ -2,6 +2,7 @@ Revision history for Lutim
0.11.6 ????-??-??
- Remove the "Support the author" dropdown
- Add a "select all" checkbox on /myfiles (#105)
0.11.5 2019-04-19
- Revert catching Image::Magick problems
...
...
themes/default/lib/Lutim/I18N/lutim.pot
View file @
87e0e4e2
...
...
@@ -40,7 +40,7 @@ msgstr ""
msgid "24 hours"
msgstr ""
#: themes/default/templates/partial/myfiles.js.ep:1
8
0
#: themes/default/templates/partial/myfiles.js.ep:
2
10
msgid ": Error while trying to get the counter."
msgstr ""
...
...
@@ -88,7 +88,7 @@ msgstr ""
msgid "Copy all view links to clipboard"
msgstr ""
#: themes/default/templates/index.html.ep:103 themes/default/templates/index.html.ep:111 themes/default/templates/index.html.ep:18 themes/default/templates/index.html.ep:36 themes/default/templates/index.html.ep:54 themes/default/templates/index.html.ep:87 themes/default/templates/index.html.ep:95 themes/default/templates/myfiles.html.ep:104 themes/default/templates/myfiles.html.ep:68 themes/default/templates/myfiles.html.ep:86 themes/default/templates/partial/common.js.ep:186 themes/default/templates/partial/lutim.js.ep:106 themes/default/templates/partial/lutim.js.ep:121 themes/default/templates/partial/lutim.js.ep:80 themes/default/templates/partial/lutim.js.ep:92 themes/default/templates/partial/myfiles.js.ep:1
4
2
#: themes/default/templates/index.html.ep:103 themes/default/templates/index.html.ep:111 themes/default/templates/index.html.ep:18 themes/default/templates/index.html.ep:36 themes/default/templates/index.html.ep:54 themes/default/templates/index.html.ep:87 themes/default/templates/index.html.ep:95 themes/default/templates/myfiles.html.ep:104 themes/default/templates/myfiles.html.ep:68 themes/default/templates/myfiles.html.ep:86 themes/default/templates/partial/common.js.ep:186 themes/default/templates/partial/lutim.js.ep:106 themes/default/templates/partial/lutim.js.ep:121 themes/default/templates/partial/lutim.js.ep:80 themes/default/templates/partial/lutim.js.ep:92 themes/default/templates/partial/myfiles.js.ep:1
7
2
msgid "Copy to clipboard"
msgstr ""
...
...
@@ -144,7 +144,7 @@ msgstr ""
msgid "Encrypt the image (Lutim does not keep the key)."
msgstr ""
#: themes/default/templates/partial/lutim.js.ep:45 themes/default/templates/partial/myfiles.js.ep:1
13
#: themes/default/templates/partial/lutim.js.ep:45 themes/default/templates/partial/myfiles.js.ep:1
28
msgid "Error while trying to modify the image."
msgstr ""
...
...
@@ -288,7 +288,7 @@ msgstr ""
msgid "Markdown syntax"
msgstr ""
#: themes/default/templates/partial/myfiles.js.ep:1
4
9
#: themes/default/templates/partial/myfiles.js.ep:1
7
9
msgid "Modify expiration delay"
msgstr ""
...
...
@@ -300,7 +300,7 @@ msgstr ""
msgid "Next (arrow right)"
msgstr ""
#: themes/default/templates/partial/myfiles.js.ep:10
5
themes/default/templates/partial/myfiles.js.ep:1
3
2
#: themes/default/templates/partial/myfiles.js.ep:1
2
0 themes/default/templates/partial/myfiles.js.ep:1
6
2
msgid "No limit"
msgstr ""
...
...
themes/default/public/js/lutim.js
View file @
87e0e4e2
...
...
@@ -109,6 +109,7 @@ $('document').ready(function() {
$
(
'
#json-import
'
).
on
(
'
click
'
,
function
()
{
$
(
'
#import
'
).
click
();
});
$
(
'
#import
'
).
on
(
'
change
'
,
function
()
{
importStorage
(
this
.
files
);
})
$
(
'
#mod-delay
'
).
on
(
'
click
'
,
modifyDelay
);
$
(
'
#check-all
'
).
on
(
'
click
'
,
checkAll
)
}
$
(
'
.copy-to-clipboard-link
'
).
on
(
'
click
'
,
clickOnCopyLink
);
$
(
'
.copy-all-to-clipboard-link
'
).
on
(
'
click
'
,
copyAllToClipboard
);
...
...
themes/default/templates/myfiles.html.ep
View file @
87e0e4e2
...
...
@@ -117,7 +117,7 @@
<table
class=
"table table-hover"
>
<thead>
<tr>
<th
class=
"text-center"
></th>
<th
class=
"text-center"
><
span
class=
"checkbox"
><label><input
type=
"checkbox"
id=
"check-all"
><label></span><
/th>
<th
class=
"text-center"
><
%=
l
('
File
name
')
%
></th>
<th
class=
"text-center"
><
%=
l
('
View
link
')
%
></th>
<th
class=
"text-center"
><
%=
l
('
Counter
')
%
></th>
...
...
themes/default/templates/partial/myfiles.js.ep
View file @
87e0e4e2
...
...
@@ -60,12 +60,27 @@ function onCheck(e) {
addToShortHash
(
short
+
'
.
'
+
ext
);
addToZipHash
(
short
);
addToRandomHash
(
short
);
if
(
!
$
(
'
#check-all
'
).
is
(
'
:checked
'
)
&&
isAllChecked
())
{
$
(
'
#check-all
'
).
prop
(
'
checked
'
,
true
);
}
}
else
{
if
(
$
(
'
#check-all
'
).
is
(
'
:checked
'
))
{
$
(
'
#check-all
'
).
prop
(
'
checked
'
,
false
);
}
rmFromShortHash
(
short
+
'
.
'
+
ext
);
rmFromZipHash
(
short
);
rmFromRandomHash
(
short
);
}
}
function
isAllChecked
()
{
var
allChecked
=
true
;
$
(
'
.ckbx
'
).
each
(
function
(
index
)
{
if
(
!
$
(
this
).
is
(
'
:checked
'
))
{
allChecked
=
false
;
}
});
return
allChecked
;
}
function
delView
(
del_at_view
)
{
return
(
del_at_view
)
?
'
<span class="icon icon-ok"></span>
'
:
'
<span class="icon icon-cancel"></span>
'
;
}
...
...
@@ -117,6 +132,21 @@ function modifyDelay() {
}
});
}
function
checkAll
(
e
)
{
var
checked
=
$
(
'
#check-all
'
).
is
(
'
:checked
'
);
$
(
'
.ckbx
'
).
each
(
function
(
index
)
{
var
element
=
$
(
this
);
if
(
checked
)
{
if
(
!
element
.
is
(
'
:checked
'
))
{
element
.
click
();
}
}
else
{
if
(
element
.
is
(
'
:checked
'
))
{
element
.
click
();
}
}
});
}
function
populateFilesTable
()
{
var
localImages
=
localStorage
.
getItem
(
'
images
'
);
if
(
localImages
===
null
)
{
...
...
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