Improve cache (and so, load speed)

- Add Cache-control headers for static files
- Put almost all js/css stuff outside template
This commit is contained in:
Luc Didry
2017-06-11 11:22:15 +02:00
parent 54374765e7
commit 2a0f2ef4a2
19 changed files with 914 additions and 877 deletions
+2
View File
@@ -15,6 +15,8 @@ Revision history for Lutim
- Allow user to paste image from clipboard to upload images (#14 and !5)
- Fix #40
- Add stats in JSON format (GET /stats.json)
- Add Cache-control headers for static files
- Put almost all js/css stuff outside templates
0.7.1 2016-06-21
- Fix dependency bug
+9 -1
View File
@@ -30,13 +30,21 @@ test: podcheck test-sqlite test-pg
clean:
rm -rf lutim.db files/
dev:
rmassets:
rm -rf themes/default/public/packed/*
dev: rmassets
$(CARTON) morbo $(LUTIM) --listen http://0.0.0.0:3000 --watch lib/ --watch script/ --watch themes/ --watch lutim.conf
devlog:
multitail log/development.log
prod: rmassets
$(CARTON) hypnotoad -f $(LUTIM)
prodlog:
multitail log/production.log
create-pg-test-db:
sudo -u postgres psql -f t/create-pg-testdb.sql
+25 -6
View File
@@ -109,15 +109,20 @@ sub startup {
delete @{$wait_for_it}{grep { time - $wait_for_it->{$_} > $c->config->{anti_flood_delay} } keys %{$wait_for_it}} if (defined($wait_for_it));
}
);
$self->hook(after_static => sub {
my $c = shift;
$c->res->headers->cache_control('max-age=2592000, must-revalidate');
});
$self->asset->store->paths($self->static->paths);
$self->asset->process('index.css' => ('css/bootstrap.min.css', 'css/fontello-embedded.css', 'css/animation.css', 'css/uploader.css', 'css/hennypenny.css', 'css/lutim.css', 'css/markdown.css'));
$self->asset->process('stats.css' => ('css/bootstrap.min.css', 'css/fontello-embedded.css', 'css/morris-0.4.3.min.css', 'css/hennypenny.css', 'css/lutim.css'));
$self->asset->process('about.css' => ('css/bootstrap.min.css', 'css/fontello-embedded.css', 'css/hennypenny.css', 'css/lutim.css'));
$self->asset->process('index.css' => ('css/bootstrap.min.css', 'css/fontello-embedded.css', 'css/animation.css', 'css/uploader.css', 'css/hennypenny.css', 'css/lutim.css', 'css/markdown.css'));
$self->asset->process('stats.css' => ('css/bootstrap.min.css', 'css/fontello-embedded.css', 'css/morris-0.4.3.min.css', 'css/hennypenny.css', 'css/lutim.css'));
$self->asset->process('about.css' => ('css/bootstrap.min.css', 'css/fontello-embedded.css', 'css/hennypenny.css', 'css/lutim.css'));
$self->asset->process('gallery.css' => ('/gallery/css/unite-gallery.css', '/gallery/themes/default/ug-theme-default.css'));
$self->asset->process('index.js' => ('js/jquery-2.1.0.min.js', 'js/bootstrap.min.js', 'js/lutim.js', 'js/dmuploader.min.js'));
$self->asset->process('stats.js' => ('js/jquery-2.1.0.min.js', 'js/bootstrap.min.js', 'js/lutim.js', 'js/raphael-min.js', 'js/morris-0.4.3.min.js', 'js/stats.js'));
$self->asset->process('freeze.js' => ('js/jquery-2.1.0.min.js', 'js/freezeframe.min.js'));
$self->asset->process('index.js' => ('js/bootstrap.min.js', 'js/lutim.js', 'js/dmuploader.min.js'));
$self->asset->process('stats.js' => ('js/bootstrap.min.js', 'js/lutim.js', 'js/raphael-min.js', 'js/morris-0.4.3.min.js', 'js/stats.js'));
$self->asset->process('freeze.js' => ('js/jquery-2.1.0.min.js', 'js/freezeframe.min.js'));
$self->defaults(layout => 'default');
@@ -148,6 +153,20 @@ sub startup {
to('Controller#stats')->
name('stats');
$r->get('/partial/:file' => sub {
my $c = shift;
$c->render(
template => 'partial/'.$c->param('file'),
format => 'js',
layout => undef,
d => {
delay_0 => $c->l('no time limit'),
delay_1 => $c->l('24 hours'),
delay_365 => $c->l('1 year')
}
);
})->name('partial');
$r->get('/gallery' => sub {
shift->render(
template => 'gallery',
+4
View File
@@ -42,6 +42,10 @@ sub startup {
}
push @{$self->static->paths}, $self->home->rel_file('themes/default/public');
$self->hook(after_static => sub {
my $c = shift;
$c->res->headers->cache_control('max-age=2592000, must-revalidate');
});
$self->plugin('Mount' => {$config->{prefix} => File::Spec->catfile($Bin, '..', 'script', 'application')});
}
+34 -34
View File
@@ -22,7 +22,7 @@ msgstr ""
#. (30)
#. ($delay)
#. (config('max_delay')
#: lib/Lutim/Command/cron/stats.pm:149 lib/Lutim/Command/cron/stats.pm:150 lib/Lutim/Command/cron/stats.pm:160 lib/Lutim/Command/cron/stats.pm:161 lib/Lutim/Command/cron/stats.pm:177 lib/Lutim/Command/cron/stats.pm:178 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/for_my_delay.html.ep:13 themes/default/templates/partial/for_my_delay.html.ep:3 themes/default/templates/partial/lutim.js.ep:139 themes/default/templates/partial/lutim.js.ep:148 themes/default/templates/partial/lutim.js.ep:149 themes/default/templates/raw.html.ep:19 themes/default/templates/raw.html.ep:20 themes/default/templates/raw.html.ep:36 themes/default/templates/raw.html.ep:37 themes/default/templates/raw.html.ep:8 themes/default/templates/raw.html.ep:9
#: lib/Lutim/Command/cron/stats.pm:149 lib/Lutim/Command/cron/stats.pm:150 lib/Lutim/Command/cron/stats.pm:160 lib/Lutim/Command/cron/stats.pm:161 lib/Lutim/Command/cron/stats.pm:177 lib/Lutim/Command/cron/stats.pm:178 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/for_my_delay.html.ep:13 themes/default/templates/partial/for_my_delay.html.ep:3 themes/default/templates/partial/lutim.js.ep:138 themes/default/templates/partial/lutim.js.ep:147 themes/default/templates/partial/lutim.js.ep:148 themes/default/templates/raw.html.ep:19 themes/default/templates/raw.html.ep:20 themes/default/templates/raw.html.ep:36 themes/default/templates/raw.html.ep:37 themes/default/templates/raw.html.ep:8 themes/default/templates/raw.html.ep:9
msgid "%1 days"
msgstr "%1 Tage"
@@ -35,15 +35,15 @@ msgstr "%1 Bilder wurden bisher über diese Instanz versendet."
msgid "-or-"
msgstr "-oder-"
#: lib/Lutim/Command/cron/stats.pm:151 lib/Lutim/Command/cron/stats.pm:162 lib/Lutim/Command/cron/stats.pm:179 themes/default/templates/index.html.ep:5 themes/default/templates/raw.html.ep:10 themes/default/templates/raw.html.ep:21 themes/default/templates/raw.html.ep:38
#: lib/Lutim.pm:165 lib/Lutim/Command/cron/stats.pm:151 lib/Lutim/Command/cron/stats.pm:162 lib/Lutim/Command/cron/stats.pm:179 themes/default/templates/index.html.ep:5 themes/default/templates/raw.html.ep:10 themes/default/templates/raw.html.ep:21 themes/default/templates/raw.html.ep:38
msgid "1 year"
msgstr "1 Jahr"
#: lib/Lutim/Command/cron/stats.pm:148 lib/Lutim/Command/cron/stats.pm:159 lib/Lutim/Command/cron/stats.pm:176 themes/default/templates/index.html.ep:4 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/lutim.js.ep:148 themes/default/templates/raw.html.ep:18 themes/default/templates/raw.html.ep:35 themes/default/templates/raw.html.ep:7
#: lib/Lutim.pm:164 lib/Lutim/Command/cron/stats.pm:148 lib/Lutim/Command/cron/stats.pm:159 lib/Lutim/Command/cron/stats.pm:176 themes/default/templates/index.html.ep:4 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/lutim.js.ep:147 themes/default/templates/raw.html.ep:18 themes/default/templates/raw.html.ep:35 themes/default/templates/raw.html.ep:7
msgid "24 hours"
msgstr "24 Stunden"
#: themes/default/templates/myfiles.html.ep:123
#: themes/default/templates/partial/myfiles.js.ep:57
msgid ": Error while trying to get the counter."
msgstr ":Fehler beim Abrufen des Zählers."
@@ -71,11 +71,11 @@ msgstr "Klicken um den Dateibrowser zu öffnen"
msgid "Contributors"
msgstr "Mitwirkende"
#: themes/default/templates/partial/lutim.js.ep:215 themes/default/templates/partial/lutim.js.ep:269 themes/default/templates/partial/lutim.js.ep:347
#: themes/default/templates/partial/lutim.js.ep:214 themes/default/templates/partial/lutim.js.ep:268 themes/default/templates/partial/lutim.js.ep:346
msgid "Copy all view links to clipboard"
msgstr "Alle Links zum Anschauen in die Zwischenablage kopieren"
#: themes/default/templates/index.html.ep:18 themes/default/templates/index.html.ep:36 themes/default/templates/index.html.ep:69 themes/default/templates/index.html.ep:77 themes/default/templates/index.html.ep:85 themes/default/templates/index.html.ep:93 themes/default/templates/myfiles.html.ep:20 themes/default/templates/myfiles.html.ep:38 themes/default/templates/partial/common.js.ep:151 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/index.html.ep:18 themes/default/templates/index.html.ep:36 themes/default/templates/index.html.ep:69 themes/default/templates/index.html.ep:77 themes/default/templates/index.html.ep:85 themes/default/templates/index.html.ep:93 themes/default/templates/myfiles.html.ep:20 themes/default/templates/myfiles.html.ep:38 themes/default/templates/partial/common.js.ep:150 themes/default/templates/partial/lutim.js.ep:105 themes/default/templates/partial/lutim.js.ep:120 themes/default/templates/partial/lutim.js.ep:79 themes/default/templates/partial/lutim.js.ep:91
msgid "Copy to clipboard"
msgstr "In die Zwischenablage kopieren"
@@ -91,7 +91,7 @@ msgstr ""
msgid "Delay repartition chart for enabled images"
msgstr ""
#: themes/default/templates/index.html.ep:115 themes/default/templates/index.html.ep:147 themes/default/templates/index.html.ep:178 themes/default/templates/myfiles.html.ep:53 themes/default/templates/partial/lutim.js.ep:160
#: themes/default/templates/index.html.ep:115 themes/default/templates/index.html.ep:147 themes/default/templates/index.html.ep:178 themes/default/templates/myfiles.html.ep:53 themes/default/templates/partial/lutim.js.ep:159
msgid "Delete at first view?"
msgstr "Nach erstem Aufruf löschen?"
@@ -103,7 +103,7 @@ msgstr ""
msgid "Deleted images in 30 days"
msgstr ""
#: themes/default/templates/index.html.ep:98 themes/default/templates/myfiles.html.ep:56 themes/default/templates/partial/common.js.ep:143 themes/default/templates/partial/common.js.ep:146
#: themes/default/templates/index.html.ep:98 themes/default/templates/myfiles.html.ep:56 themes/default/templates/partial/common.js.ep:142 themes/default/templates/partial/common.js.ep:145
msgid "Deletion link"
msgstr "Link zum Löschen"
@@ -111,7 +111,7 @@ msgstr "Link zum Löschen"
msgid "Download all images"
msgstr "Laden Sie alle Bilder"
#: themes/default/templates/index.html.ep:81 themes/default/templates/index.html.ep:83 themes/default/templates/partial/lutim.js.ep:102 themes/default/templates/partial/lutim.js.ep:98
#: themes/default/templates/index.html.ep:81 themes/default/templates/index.html.ep:83 themes/default/templates/partial/lutim.js.ep:101 themes/default/templates/partial/lutim.js.ep:97
msgid "Download link"
msgstr "Link zum Herunterladen"
@@ -131,7 +131,7 @@ msgstr "Ziehe Bilder in den dafür vorgesehenen Bereich und Lutim wird vier URLs
msgid "Encrypt the image (Lutim does not keep the key)."
msgstr "Verschlüssle das Bild (Lutim behält den Key nicht)"
#: themes/default/templates/partial/lutim.js.ep:45
#: themes/default/templates/partial/lutim.js.ep:44
msgid "Error while trying to modify the image."
msgstr "Beim bearbeiten des Bildes ist ein Fehler aufgetreten."
@@ -151,7 +151,7 @@ msgstr "Dateiname"
msgid "For more details, see the <a href=\"https://framagit.org/luc/lutim\">homepage of the project</a>."
msgstr "Besuche für mehr Details die <a href=\"https://framagit.org/luc/lutim\">Homepage des Projekts</a>."
#: themes/default/templates/layouts/default.html.ep:49
#: themes/default/templates/layouts/default.html.ep:55
msgid "Fork me!"
msgstr "Fork me!"
@@ -159,11 +159,11 @@ msgstr "Fork me!"
msgid "Gallery link"
msgstr "Link zur Galerie"
#: themes/default/templates/partial/common.js.ep:105 themes/default/templates/partial/common.js.ep:88
#: themes/default/templates/partial/common.js.ep:104 themes/default/templates/partial/common.js.ep:87
msgid "Hit Ctrl+C, then Enter to copy the short link"
msgstr "Drücke STRG+C und dann Enter um den Kurz-Link zu kopieren."
#: themes/default/templates/layouts/default.html.ep:44
#: themes/default/templates/layouts/default.html.ep:50
msgid "Homepage"
msgstr "Webseite"
@@ -195,15 +195,15 @@ msgstr ""
msgid "Image not found."
msgstr "Bild nicht gefunden"
#: themes/default/templates/layouts/default.html.ep:48
#: themes/default/templates/layouts/default.html.ep:54
msgid "Informations"
msgstr "Informationen"
#: themes/default/templates/layouts/default.html.ep:56
#: themes/default/templates/layouts/default.html.ep:62
msgid "Install webapp"
msgstr "Installiere die Webapp"
#: themes/default/templates/layouts/default.html.ep:55
#: themes/default/templates/layouts/default.html.ep:61
msgid "Instance's statistics"
msgstr ""
@@ -223,19 +223,19 @@ msgstr "Genauso wie das französische Wort <a href=\"https://fr.wikipedia.org/wi
msgid "Keep EXIF tags"
msgstr "Behalte EXIF-Daten"
#: themes/default/templates/index.html.ep:118 themes/default/templates/index.html.ep:166 themes/default/templates/index.html.ep:206 themes/default/templates/partial/lutim.js.ep:164
#: themes/default/templates/index.html.ep:118 themes/default/templates/index.html.ep:166 themes/default/templates/index.html.ep:206 themes/default/templates/partial/lutim.js.ep:163
msgid "Let's go!"
msgstr "Los gehts!"
#: themes/default/templates/layouts/default.html.ep:52
#: themes/default/templates/layouts/default.html.ep:58
msgid "Liberapay button"
msgstr ""
#: themes/default/templates/layouts/default.html.ep:47
#: themes/default/templates/layouts/default.html.ep:53
msgid "License:"
msgstr "Lizenz:"
#: themes/default/templates/index.html.ep:89 themes/default/templates/index.html.ep:91 themes/default/templates/partial/lutim.js.ep:112 themes/default/templates/partial/lutim.js.ep:116
#: themes/default/templates/index.html.ep:89 themes/default/templates/index.html.ep:91 themes/default/templates/partial/lutim.js.ep:111 themes/default/templates/partial/lutim.js.ep:115
msgid "Link for share on social networks"
msgstr "Links zum teilen auf sozialen Netzwerken"
@@ -253,15 +253,15 @@ msgstr ""
msgid "Main developers"
msgstr "Haupt-Entwickler"
#: themes/default/templates/index.html.ep:73 themes/default/templates/index.html.ep:75 themes/default/templates/partial/lutim.js.ep:86 themes/default/templates/partial/lutim.js.ep:89
#: themes/default/templates/index.html.ep:73 themes/default/templates/index.html.ep:75 themes/default/templates/partial/lutim.js.ep:85 themes/default/templates/partial/lutim.js.ep:88
msgid "Markdown syntax"
msgstr "Markdown Syntax"
#: themes/default/templates/layouts/default.html.ep:54 themes/default/templates/myfiles.html.ep:2
#: themes/default/templates/layouts/default.html.ep:60 themes/default/templates/myfiles.html.ep:2
msgid "My images"
msgstr "Meine Bilder"
#: themes/default/templates/myfiles.html.ep:85
#: themes/default/templates/partial/myfiles.js.ep:19
msgid "No limit"
msgstr "Keine Begrenzung"
@@ -294,15 +294,15 @@ msgstr ""
msgid "Send an image"
msgstr "Sende ein Bild"
#: themes/default/templates/partial/lutim.js.ep:21
#: themes/default/templates/partial/lutim.js.ep:20
msgid "Share it!"
msgstr "Teile es!"
#: themes/default/templates/layouts/default.html.ep:50
#: themes/default/templates/layouts/default.html.ep:56
msgid "Share on Twitter"
msgstr "Teile es auf Twitter"
#: themes/default/templates/index.html.ep:133 themes/default/templates/partial/lutim.js.ep:175
#: themes/default/templates/index.html.ep:133 themes/default/templates/partial/lutim.js.ep:174
msgid "Something bad happened"
msgstr "Es ist ein Fehler aufgetreten"
@@ -311,11 +311,11 @@ msgstr "Es ist ein Fehler aufgetreten"
msgid "Something went wrong when creating the zip file. Try again later or contact the administrator (%1)."
msgstr "Es ist ein Fehler aufgetreten. Versuche es erneut oder kontaktiere den Administrator (%1)."
#: themes/default/templates/layouts/default.html.ep:52
#: themes/default/templates/layouts/default.html.ep:58
msgid "Support the author on Liberapay"
msgstr ""
#: themes/default/templates/layouts/default.html.ep:51
#: themes/default/templates/layouts/default.html.ep:57
msgid "Support the author on Tipeee"
msgstr ""
@@ -346,8 +346,8 @@ msgstr "Die Datei %1 ist kein Bild."
#. ($tx->res->max_message_size)
#. ($c->req->max_message_size)
#. ($max_file_size)
#: lib/Lutim/Controller.pm:271 lib/Lutim/Controller.pm:340 themes/default/templates/partial/lutim.js.ep:241
#. (config('max_file_size')
#: lib/Lutim/Controller.pm:271 lib/Lutim/Controller.pm:340 themes/default/templates/partial/lutim.js.ep:240
msgid "The file exceed the size limit (%1)"
msgstr "Die Datei überschreitet die Größenbeschränkung (%1)"
@@ -382,7 +382,7 @@ msgstr "Die Bilder, die du auf Lutim hochlädst, können entweder nie, nach dem
msgid "There is no more available URL. Retry or contact the administrator. %1"
msgstr "Es sind keine URLs mehr verfügbar. Versuche es erneut oder kontaktiere den Administrator. %1"
#: themes/default/templates/layouts/default.html.ep:51
#: themes/default/templates/layouts/default.html.ep:57
msgid "Tipeee button"
msgstr ""
@@ -390,7 +390,7 @@ msgstr ""
msgid "Total"
msgstr ""
#: themes/default/templates/index.html.ep:60 themes/default/templates/partial/lutim.js.ep:15
#: themes/default/templates/index.html.ep:60 themes/default/templates/partial/lutim.js.ep:14
msgid "Tweet it!"
msgstr "Twittere es!"
@@ -428,7 +428,7 @@ msgstr "Hochgeladene Bilder pro Tag"
msgid "Uploading is currently disabled, please try later or contact the administrator (%1)."
msgstr "Hochladen ist momentan deaktiviert. Versuche es später erneut oder kontaktiere den Administrator (%1)."
#: themes/default/templates/index.html.ep:65 themes/default/templates/index.html.ep:67 themes/default/templates/myfiles.html.ep:51 themes/default/templates/partial/lutim.js.ep:72 themes/default/templates/partial/lutim.js.ep:76
#: themes/default/templates/index.html.ep:65 themes/default/templates/index.html.ep:67 themes/default/templates/myfiles.html.ep:51 themes/default/templates/partial/lutim.js.ep:71 themes/default/templates/partial/lutim.js.ep:75
msgid "View link"
msgstr "Link ansehen"
@@ -468,7 +468,7 @@ msgstr "und auf"
msgid "core developer"
msgstr "Haupt-Entwickler"
#: lib/Lutim/Command/cron/stats.pm:147 lib/Lutim/Command/cron/stats.pm:158 lib/Lutim/Command/cron/stats.pm:175 themes/default/templates/index.html.ep:3 themes/default/templates/raw.html.ep:17 themes/default/templates/raw.html.ep:34 themes/default/templates/raw.html.ep:6
#: lib/Lutim.pm:163 lib/Lutim/Command/cron/stats.pm:147 lib/Lutim/Command/cron/stats.pm:158 lib/Lutim/Command/cron/stats.pm:175 themes/default/templates/index.html.ep:3 themes/default/templates/raw.html.ep:17 themes/default/templates/raw.html.ep:34 themes/default/templates/raw.html.ep:6
msgid "no time limit"
msgstr "keine Zeit-Begrenzung"
+34 -34
View File
@@ -20,7 +20,7 @@ msgstr ""
#. (30)
#. ($delay)
#. (config('max_delay')
#: lib/Lutim/Command/cron/stats.pm:149 lib/Lutim/Command/cron/stats.pm:150 lib/Lutim/Command/cron/stats.pm:160 lib/Lutim/Command/cron/stats.pm:161 lib/Lutim/Command/cron/stats.pm:177 lib/Lutim/Command/cron/stats.pm:178 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/for_my_delay.html.ep:13 themes/default/templates/partial/for_my_delay.html.ep:3 themes/default/templates/partial/lutim.js.ep:139 themes/default/templates/partial/lutim.js.ep:148 themes/default/templates/partial/lutim.js.ep:149 themes/default/templates/raw.html.ep:19 themes/default/templates/raw.html.ep:20 themes/default/templates/raw.html.ep:36 themes/default/templates/raw.html.ep:37 themes/default/templates/raw.html.ep:8 themes/default/templates/raw.html.ep:9
#: lib/Lutim/Command/cron/stats.pm:149 lib/Lutim/Command/cron/stats.pm:150 lib/Lutim/Command/cron/stats.pm:160 lib/Lutim/Command/cron/stats.pm:161 lib/Lutim/Command/cron/stats.pm:177 lib/Lutim/Command/cron/stats.pm:178 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/for_my_delay.html.ep:13 themes/default/templates/partial/for_my_delay.html.ep:3 themes/default/templates/partial/lutim.js.ep:138 themes/default/templates/partial/lutim.js.ep:147 themes/default/templates/partial/lutim.js.ep:148 themes/default/templates/raw.html.ep:19 themes/default/templates/raw.html.ep:20 themes/default/templates/raw.html.ep:36 themes/default/templates/raw.html.ep:37 themes/default/templates/raw.html.ep:8 themes/default/templates/raw.html.ep:9
msgid "%1 days"
msgstr ""
@@ -33,15 +33,15 @@ msgstr "%1 sent images on this instance from beginning."
msgid "-or-"
msgstr "-or-"
#: lib/Lutim/Command/cron/stats.pm:151 lib/Lutim/Command/cron/stats.pm:162 lib/Lutim/Command/cron/stats.pm:179 themes/default/templates/index.html.ep:5 themes/default/templates/raw.html.ep:10 themes/default/templates/raw.html.ep:21 themes/default/templates/raw.html.ep:38
#: lib/Lutim.pm:165 lib/Lutim/Command/cron/stats.pm:151 lib/Lutim/Command/cron/stats.pm:162 lib/Lutim/Command/cron/stats.pm:179 themes/default/templates/index.html.ep:5 themes/default/templates/raw.html.ep:10 themes/default/templates/raw.html.ep:21 themes/default/templates/raw.html.ep:38
msgid "1 year"
msgstr "1 year"
#: lib/Lutim/Command/cron/stats.pm:148 lib/Lutim/Command/cron/stats.pm:159 lib/Lutim/Command/cron/stats.pm:176 themes/default/templates/index.html.ep:4 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/lutim.js.ep:148 themes/default/templates/raw.html.ep:18 themes/default/templates/raw.html.ep:35 themes/default/templates/raw.html.ep:7
#: lib/Lutim.pm:164 lib/Lutim/Command/cron/stats.pm:148 lib/Lutim/Command/cron/stats.pm:159 lib/Lutim/Command/cron/stats.pm:176 themes/default/templates/index.html.ep:4 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/lutim.js.ep:147 themes/default/templates/raw.html.ep:18 themes/default/templates/raw.html.ep:35 themes/default/templates/raw.html.ep:7
msgid "24 hours"
msgstr "24 hours"
#: themes/default/templates/myfiles.html.ep:123
#: themes/default/templates/partial/myfiles.js.ep:57
msgid ": Error while trying to get the counter."
msgstr ""
@@ -69,11 +69,11 @@ msgstr "Click to open the file browser"
msgid "Contributors"
msgstr "Contributors"
#: themes/default/templates/partial/lutim.js.ep:215 themes/default/templates/partial/lutim.js.ep:269 themes/default/templates/partial/lutim.js.ep:347
#: themes/default/templates/partial/lutim.js.ep:214 themes/default/templates/partial/lutim.js.ep:268 themes/default/templates/partial/lutim.js.ep:346
msgid "Copy all view links to clipboard"
msgstr ""
#: themes/default/templates/index.html.ep:18 themes/default/templates/index.html.ep:36 themes/default/templates/index.html.ep:69 themes/default/templates/index.html.ep:77 themes/default/templates/index.html.ep:85 themes/default/templates/index.html.ep:93 themes/default/templates/myfiles.html.ep:20 themes/default/templates/myfiles.html.ep:38 themes/default/templates/partial/common.js.ep:151 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/index.html.ep:18 themes/default/templates/index.html.ep:36 themes/default/templates/index.html.ep:69 themes/default/templates/index.html.ep:77 themes/default/templates/index.html.ep:85 themes/default/templates/index.html.ep:93 themes/default/templates/myfiles.html.ep:20 themes/default/templates/myfiles.html.ep:38 themes/default/templates/partial/common.js.ep:150 themes/default/templates/partial/lutim.js.ep:105 themes/default/templates/partial/lutim.js.ep:120 themes/default/templates/partial/lutim.js.ep:79 themes/default/templates/partial/lutim.js.ep:91
msgid "Copy to clipboard"
msgstr "Copy to clipboard"
@@ -89,7 +89,7 @@ msgstr ""
msgid "Delay repartition chart for enabled images"
msgstr ""
#: themes/default/templates/index.html.ep:115 themes/default/templates/index.html.ep:147 themes/default/templates/index.html.ep:178 themes/default/templates/myfiles.html.ep:53 themes/default/templates/partial/lutim.js.ep:160
#: themes/default/templates/index.html.ep:115 themes/default/templates/index.html.ep:147 themes/default/templates/index.html.ep:178 themes/default/templates/myfiles.html.ep:53 themes/default/templates/partial/lutim.js.ep:159
msgid "Delete at first view?"
msgstr "Delete at first view?"
@@ -101,7 +101,7 @@ msgstr ""
msgid "Deleted images in 30 days"
msgstr ""
#: themes/default/templates/index.html.ep:98 themes/default/templates/myfiles.html.ep:56 themes/default/templates/partial/common.js.ep:143 themes/default/templates/partial/common.js.ep:146
#: themes/default/templates/index.html.ep:98 themes/default/templates/myfiles.html.ep:56 themes/default/templates/partial/common.js.ep:142 themes/default/templates/partial/common.js.ep:145
msgid "Deletion link"
msgstr "Deletion link"
@@ -109,7 +109,7 @@ msgstr "Deletion link"
msgid "Download all images"
msgstr ""
#: themes/default/templates/index.html.ep:81 themes/default/templates/index.html.ep:83 themes/default/templates/partial/lutim.js.ep:102 themes/default/templates/partial/lutim.js.ep:98
#: themes/default/templates/index.html.ep:81 themes/default/templates/index.html.ep:83 themes/default/templates/partial/lutim.js.ep:101 themes/default/templates/partial/lutim.js.ep:97
msgid "Download link"
msgstr "Download link"
@@ -129,7 +129,7 @@ msgstr "Drag and drop an image in the appropriate area or use the traditional wa
msgid "Encrypt the image (Lutim does not keep the key)."
msgstr "Encrypt the image (Lutim does not keep the key)."
#: themes/default/templates/partial/lutim.js.ep:45
#: themes/default/templates/partial/lutim.js.ep:44
msgid "Error while trying to modify the image."
msgstr ""
@@ -149,7 +149,7 @@ msgstr ""
msgid "For more details, see the <a href=\"https://framagit.org/luc/lutim\">homepage of the project</a>."
msgstr "For more details, see the <a href=\"https://framagit.org/luc/lutim\">homepage of the project</a>."
#: themes/default/templates/layouts/default.html.ep:49
#: themes/default/templates/layouts/default.html.ep:55
msgid "Fork me!"
msgstr "Fork me!"
@@ -157,11 +157,11 @@ msgstr "Fork me!"
msgid "Gallery link"
msgstr ""
#: themes/default/templates/partial/common.js.ep:105 themes/default/templates/partial/common.js.ep:88
#: themes/default/templates/partial/common.js.ep:104 themes/default/templates/partial/common.js.ep:87
msgid "Hit Ctrl+C, then Enter to copy the short link"
msgstr ""
#: themes/default/templates/layouts/default.html.ep:44
#: themes/default/templates/layouts/default.html.ep:50
msgid "Homepage"
msgstr "Homepage"
@@ -193,15 +193,15 @@ msgstr ""
msgid "Image not found."
msgstr ""
#: themes/default/templates/layouts/default.html.ep:48
#: themes/default/templates/layouts/default.html.ep:54
msgid "Informations"
msgstr "Informations"
#: themes/default/templates/layouts/default.html.ep:56
#: themes/default/templates/layouts/default.html.ep:62
msgid "Install webapp"
msgstr "Install webapp"
#: themes/default/templates/layouts/default.html.ep:55
#: themes/default/templates/layouts/default.html.ep:61
msgid "Instance's statistics"
msgstr ""
@@ -221,19 +221,19 @@ msgstr "Juste like you pronounce the French word <a href=\"https://fr.wikipedia.
msgid "Keep EXIF tags"
msgstr "Keep EXIF tags"
#: themes/default/templates/index.html.ep:118 themes/default/templates/index.html.ep:166 themes/default/templates/index.html.ep:206 themes/default/templates/partial/lutim.js.ep:164
#: themes/default/templates/index.html.ep:118 themes/default/templates/index.html.ep:166 themes/default/templates/index.html.ep:206 themes/default/templates/partial/lutim.js.ep:163
msgid "Let's go!"
msgstr "Let's go!"
#: themes/default/templates/layouts/default.html.ep:52
#: themes/default/templates/layouts/default.html.ep:58
msgid "Liberapay button"
msgstr ""
#: themes/default/templates/layouts/default.html.ep:47
#: themes/default/templates/layouts/default.html.ep:53
msgid "License:"
msgstr "License:"
#: themes/default/templates/index.html.ep:89 themes/default/templates/index.html.ep:91 themes/default/templates/partial/lutim.js.ep:112 themes/default/templates/partial/lutim.js.ep:116
#: themes/default/templates/index.html.ep:89 themes/default/templates/index.html.ep:91 themes/default/templates/partial/lutim.js.ep:111 themes/default/templates/partial/lutim.js.ep:115
msgid "Link for share on social networks"
msgstr "Link for share on social networks"
@@ -249,15 +249,15 @@ msgstr "Lutim is a free (as in free beer) and anonymous image hosting service. I
msgid "Main developers"
msgstr "Main developers"
#: themes/default/templates/index.html.ep:73 themes/default/templates/index.html.ep:75 themes/default/templates/partial/lutim.js.ep:86 themes/default/templates/partial/lutim.js.ep:89
#: themes/default/templates/index.html.ep:73 themes/default/templates/index.html.ep:75 themes/default/templates/partial/lutim.js.ep:85 themes/default/templates/partial/lutim.js.ep:88
msgid "Markdown syntax"
msgstr "Markdown syntax"
#: themes/default/templates/layouts/default.html.ep:54 themes/default/templates/myfiles.html.ep:2
#: themes/default/templates/layouts/default.html.ep:60 themes/default/templates/myfiles.html.ep:2
msgid "My images"
msgstr ""
#: themes/default/templates/myfiles.html.ep:85
#: themes/default/templates/partial/myfiles.js.ep:19
msgid "No limit"
msgstr ""
@@ -290,15 +290,15 @@ msgstr ""
msgid "Send an image"
msgstr "Send an image"
#: themes/default/templates/partial/lutim.js.ep:21
#: themes/default/templates/partial/lutim.js.ep:20
msgid "Share it!"
msgstr ""
#: themes/default/templates/layouts/default.html.ep:50
#: themes/default/templates/layouts/default.html.ep:56
msgid "Share on Twitter"
msgstr "Share on Twitter"
#: themes/default/templates/index.html.ep:133 themes/default/templates/partial/lutim.js.ep:175
#: themes/default/templates/index.html.ep:133 themes/default/templates/partial/lutim.js.ep:174
msgid "Something bad happened"
msgstr "Something bad happened"
@@ -307,11 +307,11 @@ msgstr "Something bad happened"
msgid "Something went wrong when creating the zip file. Try again later or contact the administrator (%1)."
msgstr ""
#: themes/default/templates/layouts/default.html.ep:52
#: themes/default/templates/layouts/default.html.ep:58
msgid "Support the author on Liberapay"
msgstr ""
#: themes/default/templates/layouts/default.html.ep:51
#: themes/default/templates/layouts/default.html.ep:57
msgid "Support the author on Tipeee"
msgstr ""
@@ -342,8 +342,8 @@ msgstr "The file %1 is not an image."
#. ($tx->res->max_message_size)
#. ($c->req->max_message_size)
#. ($max_file_size)
#: lib/Lutim/Controller.pm:271 lib/Lutim/Controller.pm:340 themes/default/templates/partial/lutim.js.ep:241
#. (config('max_file_size')
#: lib/Lutim/Controller.pm:271 lib/Lutim/Controller.pm:340 themes/default/templates/partial/lutim.js.ep:240
msgid "The file exceed the size limit (%1)"
msgstr "The file exceed the size limit (%1)"
@@ -378,7 +378,7 @@ msgstr "The images you post on Lutim can be stored indefinitely or be deleted at
msgid "There is no more available URL. Retry or contact the administrator. %1"
msgstr "There is no more available URL. Retry or contact the administrator. %1"
#: themes/default/templates/layouts/default.html.ep:51
#: themes/default/templates/layouts/default.html.ep:57
msgid "Tipeee button"
msgstr ""
@@ -386,7 +386,7 @@ msgstr ""
msgid "Total"
msgstr ""
#: themes/default/templates/index.html.ep:60 themes/default/templates/partial/lutim.js.ep:15
#: themes/default/templates/index.html.ep:60 themes/default/templates/partial/lutim.js.ep:14
msgid "Tweet it!"
msgstr "Tweet it!"
@@ -424,7 +424,7 @@ msgstr "Uploaded files by days"
msgid "Uploading is currently disabled, please try later or contact the administrator (%1)."
msgstr "Uploading is currently disabled, please try later or contact the administrator (%1)."
#: themes/default/templates/index.html.ep:65 themes/default/templates/index.html.ep:67 themes/default/templates/myfiles.html.ep:51 themes/default/templates/partial/lutim.js.ep:72 themes/default/templates/partial/lutim.js.ep:76
#: themes/default/templates/index.html.ep:65 themes/default/templates/index.html.ep:67 themes/default/templates/myfiles.html.ep:51 themes/default/templates/partial/lutim.js.ep:71 themes/default/templates/partial/lutim.js.ep:75
msgid "View link"
msgstr "View link"
@@ -468,7 +468,7 @@ msgstr "and on"
msgid "core developer"
msgstr "core developer"
#: lib/Lutim/Command/cron/stats.pm:147 lib/Lutim/Command/cron/stats.pm:158 lib/Lutim/Command/cron/stats.pm:175 themes/default/templates/index.html.ep:3 themes/default/templates/raw.html.ep:17 themes/default/templates/raw.html.ep:34 themes/default/templates/raw.html.ep:6
#: lib/Lutim.pm:163 lib/Lutim/Command/cron/stats.pm:147 lib/Lutim/Command/cron/stats.pm:158 lib/Lutim/Command/cron/stats.pm:175 themes/default/templates/index.html.ep:3 themes/default/templates/raw.html.ep:17 themes/default/templates/raw.html.ep:34 themes/default/templates/raw.html.ep:6
msgid "no time limit"
msgstr "no time limit"
+34 -34
View File
@@ -22,7 +22,7 @@ msgstr ""
#. (30)
#. ($delay)
#. (config('max_delay')
#: lib/Lutim/Command/cron/stats.pm:149 lib/Lutim/Command/cron/stats.pm:150 lib/Lutim/Command/cron/stats.pm:160 lib/Lutim/Command/cron/stats.pm:161 lib/Lutim/Command/cron/stats.pm:177 lib/Lutim/Command/cron/stats.pm:178 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/for_my_delay.html.ep:13 themes/default/templates/partial/for_my_delay.html.ep:3 themes/default/templates/partial/lutim.js.ep:139 themes/default/templates/partial/lutim.js.ep:148 themes/default/templates/partial/lutim.js.ep:149 themes/default/templates/raw.html.ep:19 themes/default/templates/raw.html.ep:20 themes/default/templates/raw.html.ep:36 themes/default/templates/raw.html.ep:37 themes/default/templates/raw.html.ep:8 themes/default/templates/raw.html.ep:9
#: lib/Lutim/Command/cron/stats.pm:149 lib/Lutim/Command/cron/stats.pm:150 lib/Lutim/Command/cron/stats.pm:160 lib/Lutim/Command/cron/stats.pm:161 lib/Lutim/Command/cron/stats.pm:177 lib/Lutim/Command/cron/stats.pm:178 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/for_my_delay.html.ep:13 themes/default/templates/partial/for_my_delay.html.ep:3 themes/default/templates/partial/lutim.js.ep:138 themes/default/templates/partial/lutim.js.ep:147 themes/default/templates/partial/lutim.js.ep:148 themes/default/templates/raw.html.ep:19 themes/default/templates/raw.html.ep:20 themes/default/templates/raw.html.ep:36 themes/default/templates/raw.html.ep:37 themes/default/templates/raw.html.ep:8 themes/default/templates/raw.html.ep:9
msgid "%1 days"
msgstr "%1 días"
@@ -35,15 +35,15 @@ msgstr "%1 imágenes enviadas a esta instancia desde el inicio."
msgid "-or-"
msgstr "-o-"
#: lib/Lutim/Command/cron/stats.pm:151 lib/Lutim/Command/cron/stats.pm:162 lib/Lutim/Command/cron/stats.pm:179 themes/default/templates/index.html.ep:5 themes/default/templates/raw.html.ep:10 themes/default/templates/raw.html.ep:21 themes/default/templates/raw.html.ep:38
#: lib/Lutim.pm:165 lib/Lutim/Command/cron/stats.pm:151 lib/Lutim/Command/cron/stats.pm:162 lib/Lutim/Command/cron/stats.pm:179 themes/default/templates/index.html.ep:5 themes/default/templates/raw.html.ep:10 themes/default/templates/raw.html.ep:21 themes/default/templates/raw.html.ep:38
msgid "1 year"
msgstr "1 año"
#: lib/Lutim/Command/cron/stats.pm:148 lib/Lutim/Command/cron/stats.pm:159 lib/Lutim/Command/cron/stats.pm:176 themes/default/templates/index.html.ep:4 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/lutim.js.ep:148 themes/default/templates/raw.html.ep:18 themes/default/templates/raw.html.ep:35 themes/default/templates/raw.html.ep:7
#: lib/Lutim.pm:164 lib/Lutim/Command/cron/stats.pm:148 lib/Lutim/Command/cron/stats.pm:159 lib/Lutim/Command/cron/stats.pm:176 themes/default/templates/index.html.ep:4 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/lutim.js.ep:147 themes/default/templates/raw.html.ep:18 themes/default/templates/raw.html.ep:35 themes/default/templates/raw.html.ep:7
msgid "24 hours"
msgstr "24 horas"
#: themes/default/templates/myfiles.html.ep:123
#: themes/default/templates/partial/myfiles.js.ep:57
msgid ": Error while trying to get the counter."
msgstr ": Error al intentar obtener el contador."
@@ -71,11 +71,11 @@ msgstr "Clic para abrir el explorador de archivos"
msgid "Contributors"
msgstr "Contribuidores"
#: themes/default/templates/partial/lutim.js.ep:215 themes/default/templates/partial/lutim.js.ep:269 themes/default/templates/partial/lutim.js.ep:347
#: themes/default/templates/partial/lutim.js.ep:214 themes/default/templates/partial/lutim.js.ep:268 themes/default/templates/partial/lutim.js.ep:346
msgid "Copy all view links to clipboard"
msgstr "Copiar todos los enlaces de visualización al portapapeles"
#: themes/default/templates/index.html.ep:18 themes/default/templates/index.html.ep:36 themes/default/templates/index.html.ep:69 themes/default/templates/index.html.ep:77 themes/default/templates/index.html.ep:85 themes/default/templates/index.html.ep:93 themes/default/templates/myfiles.html.ep:20 themes/default/templates/myfiles.html.ep:38 themes/default/templates/partial/common.js.ep:151 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/index.html.ep:18 themes/default/templates/index.html.ep:36 themes/default/templates/index.html.ep:69 themes/default/templates/index.html.ep:77 themes/default/templates/index.html.ep:85 themes/default/templates/index.html.ep:93 themes/default/templates/myfiles.html.ep:20 themes/default/templates/myfiles.html.ep:38 themes/default/templates/partial/common.js.ep:150 themes/default/templates/partial/lutim.js.ep:105 themes/default/templates/partial/lutim.js.ep:120 themes/default/templates/partial/lutim.js.ep:79 themes/default/templates/partial/lutim.js.ep:91
msgid "Copy to clipboard"
msgstr "Copiar al portapapeles"
@@ -91,7 +91,7 @@ msgstr ""
msgid "Delay repartition chart for enabled images"
msgstr ""
#: themes/default/templates/index.html.ep:115 themes/default/templates/index.html.ep:147 themes/default/templates/index.html.ep:178 themes/default/templates/myfiles.html.ep:53 themes/default/templates/partial/lutim.js.ep:160
#: themes/default/templates/index.html.ep:115 themes/default/templates/index.html.ep:147 themes/default/templates/index.html.ep:178 themes/default/templates/myfiles.html.ep:53 themes/default/templates/partial/lutim.js.ep:159
msgid "Delete at first view?"
msgstr "¿Borrar en la primera vista?"
@@ -103,7 +103,7 @@ msgstr ""
msgid "Deleted images in 30 days"
msgstr ""
#: themes/default/templates/index.html.ep:98 themes/default/templates/myfiles.html.ep:56 themes/default/templates/partial/common.js.ep:143 themes/default/templates/partial/common.js.ep:146
#: themes/default/templates/index.html.ep:98 themes/default/templates/myfiles.html.ep:56 themes/default/templates/partial/common.js.ep:142 themes/default/templates/partial/common.js.ep:145
msgid "Deletion link"
msgstr "Enlace para borrar"
@@ -111,7 +111,7 @@ msgstr "Enlace para borrar"
msgid "Download all images"
msgstr "Descargar todas las imágenes"
#: themes/default/templates/index.html.ep:81 themes/default/templates/index.html.ep:83 themes/default/templates/partial/lutim.js.ep:102 themes/default/templates/partial/lutim.js.ep:98
#: themes/default/templates/index.html.ep:81 themes/default/templates/index.html.ep:83 themes/default/templates/partial/lutim.js.ep:101 themes/default/templates/partial/lutim.js.ep:97
msgid "Download link"
msgstr "Enlace de descarga"
@@ -131,7 +131,7 @@ msgstr "Arrastre y suelte una imagen en el área apropiada, o use el método tra
msgid "Encrypt the image (Lutim does not keep the key)."
msgstr "Las imágenes se cifran en el servidor (Lutim no guarda la clave)."
#: themes/default/templates/partial/lutim.js.ep:45
#: themes/default/templates/partial/lutim.js.ep:44
msgid "Error while trying to modify the image."
msgstr "Error al intentar modificar la imagen."
@@ -151,7 +151,7 @@ msgstr "Nombre de archivo"
msgid "For more details, see the <a href=\"https://framagit.org/luc/lutim\">homepage of the project</a>."
msgstr "Para más detalles, vea la <a href=\"https://framagit.org/luc/lutim\">página del proyecto</a>."
#: themes/default/templates/layouts/default.html.ep:49
#: themes/default/templates/layouts/default.html.ep:55
msgid "Fork me!"
msgstr "¡Clóname!"
@@ -159,11 +159,11 @@ msgstr "¡Clóname!"
msgid "Gallery link"
msgstr "Enlace a la galería"
#: themes/default/templates/partial/common.js.ep:105 themes/default/templates/partial/common.js.ep:88
#: themes/default/templates/partial/common.js.ep:104 themes/default/templates/partial/common.js.ep:87
msgid "Hit Ctrl+C, then Enter to copy the short link"
msgstr "Presione Ctrl + C, entonces Ingresar para copiar el enlace"
#: themes/default/templates/layouts/default.html.ep:44
#: themes/default/templates/layouts/default.html.ep:50
msgid "Homepage"
msgstr "Página inicial"
@@ -195,15 +195,15 @@ msgstr ""
msgid "Image not found."
msgstr "Imagen no encontrada."
#: themes/default/templates/layouts/default.html.ep:48
#: themes/default/templates/layouts/default.html.ep:54
msgid "Informations"
msgstr "Informaciones"
#: themes/default/templates/layouts/default.html.ep:56
#: themes/default/templates/layouts/default.html.ep:62
msgid "Install webapp"
msgstr "Instalar webapp"
#: themes/default/templates/layouts/default.html.ep:55
#: themes/default/templates/layouts/default.html.ep:61
msgid "Instance's statistics"
msgstr ""
@@ -223,19 +223,19 @@ msgstr "Tal y como se pronuncia la palabra francesa <a href=\"https://fr.wikiped
msgid "Keep EXIF tags"
msgstr "Mantener las etiquetas EXIF"
#: themes/default/templates/index.html.ep:118 themes/default/templates/index.html.ep:166 themes/default/templates/index.html.ep:206 themes/default/templates/partial/lutim.js.ep:164
#: themes/default/templates/index.html.ep:118 themes/default/templates/index.html.ep:166 themes/default/templates/index.html.ep:206 themes/default/templates/partial/lutim.js.ep:163
msgid "Let's go!"
msgstr "¡Vamos allá!"
#: themes/default/templates/layouts/default.html.ep:52
#: themes/default/templates/layouts/default.html.ep:58
msgid "Liberapay button"
msgstr ""
#: themes/default/templates/layouts/default.html.ep:47
#: themes/default/templates/layouts/default.html.ep:53
msgid "License:"
msgstr "Licencia:"
#: themes/default/templates/index.html.ep:89 themes/default/templates/index.html.ep:91 themes/default/templates/partial/lutim.js.ep:112 themes/default/templates/partial/lutim.js.ep:116
#: themes/default/templates/index.html.ep:89 themes/default/templates/index.html.ep:91 themes/default/templates/partial/lutim.js.ep:111 themes/default/templates/partial/lutim.js.ep:115
msgid "Link for share on social networks"
msgstr "Enlace para compartir en redes sociales"
@@ -251,15 +251,15 @@ msgstr "Lutim es un servicio de alojamiento de imágenes anónimo y gratuito. Ta
msgid "Main developers"
msgstr "Desarrolladores principales"
#: themes/default/templates/index.html.ep:73 themes/default/templates/index.html.ep:75 themes/default/templates/partial/lutim.js.ep:86 themes/default/templates/partial/lutim.js.ep:89
#: themes/default/templates/index.html.ep:73 themes/default/templates/index.html.ep:75 themes/default/templates/partial/lutim.js.ep:85 themes/default/templates/partial/lutim.js.ep:88
msgid "Markdown syntax"
msgstr "Sintaxis de Markdown"
#: themes/default/templates/layouts/default.html.ep:54 themes/default/templates/myfiles.html.ep:2
#: themes/default/templates/layouts/default.html.ep:60 themes/default/templates/myfiles.html.ep:2
msgid "My images"
msgstr "Mis Imágenes"
#: themes/default/templates/myfiles.html.ep:85
#: themes/default/templates/partial/myfiles.js.ep:19
msgid "No limit"
msgstr "Sin fecha de caducidad"
@@ -292,15 +292,15 @@ msgstr ""
msgid "Send an image"
msgstr "Enviar una imagen"
#: themes/default/templates/partial/lutim.js.ep:21
#: themes/default/templates/partial/lutim.js.ep:20
msgid "Share it!"
msgstr "¡Compártelo!"
#: themes/default/templates/layouts/default.html.ep:50
#: themes/default/templates/layouts/default.html.ep:56
msgid "Share on Twitter"
msgstr "Compartir en Twitter"
#: themes/default/templates/index.html.ep:133 themes/default/templates/partial/lutim.js.ep:175
#: themes/default/templates/index.html.ep:133 themes/default/templates/partial/lutim.js.ep:174
msgid "Something bad happened"
msgstr "Algo malo ha pasado"
@@ -309,11 +309,11 @@ msgstr "Algo malo ha pasado"
msgid "Something went wrong when creating the zip file. Try again later or contact the administrator (%1)."
msgstr "Algo malo ha pasado. Inténtelo de nuevo más tarde o contacte con el administrador (%1)."
#: themes/default/templates/layouts/default.html.ep:52
#: themes/default/templates/layouts/default.html.ep:58
msgid "Support the author on Liberapay"
msgstr ""
#: themes/default/templates/layouts/default.html.ep:51
#: themes/default/templates/layouts/default.html.ep:57
msgid "Support the author on Tipeee"
msgstr ""
@@ -344,8 +344,8 @@ msgstr "El archivo %1 no es una imagen."
#. ($tx->res->max_message_size)
#. ($c->req->max_message_size)
#. ($max_file_size)
#: lib/Lutim/Controller.pm:271 lib/Lutim/Controller.pm:340 themes/default/templates/partial/lutim.js.ep:241
#. (config('max_file_size')
#: lib/Lutim/Controller.pm:271 lib/Lutim/Controller.pm:340 themes/default/templates/partial/lutim.js.ep:240
msgid "The file exceed the size limit (%1)"
msgstr "El archivo supera el límite de tamaño (%1)"
@@ -380,7 +380,7 @@ msgstr "Puede, opcionalmente, solicitar que la imagen publicada en Lutim se elim
msgid "There is no more available URL. Retry or contact the administrator. %1"
msgstr "No más URL disponibles. Inténtelo de nuevo o contacte con el administrador. %1"
#: themes/default/templates/layouts/default.html.ep:51
#: themes/default/templates/layouts/default.html.ep:57
msgid "Tipeee button"
msgstr ""
@@ -388,7 +388,7 @@ msgstr ""
msgid "Total"
msgstr ""
#: themes/default/templates/index.html.ep:60 themes/default/templates/partial/lutim.js.ep:15
#: themes/default/templates/index.html.ep:60 themes/default/templates/partial/lutim.js.ep:14
msgid "Tweet it!"
msgstr "¡Tuitéalo!"
@@ -426,7 +426,7 @@ msgstr "Archivos enviados por día"
msgid "Uploading is currently disabled, please try later or contact the administrator (%1)."
msgstr "La carga está deshabilitada en estos momentos, por favor inténtelo más tarde o contacte con el administrador (%1)."
#: themes/default/templates/index.html.ep:65 themes/default/templates/index.html.ep:67 themes/default/templates/myfiles.html.ep:51 themes/default/templates/partial/lutim.js.ep:72 themes/default/templates/partial/lutim.js.ep:76
#: themes/default/templates/index.html.ep:65 themes/default/templates/index.html.ep:67 themes/default/templates/myfiles.html.ep:51 themes/default/templates/partial/lutim.js.ep:71 themes/default/templates/partial/lutim.js.ep:75
msgid "View link"
msgstr "Enlace de visualización"
@@ -466,7 +466,7 @@ msgstr "y en"
msgid "core developer"
msgstr "desarrollador principal"
#: lib/Lutim/Command/cron/stats.pm:147 lib/Lutim/Command/cron/stats.pm:158 lib/Lutim/Command/cron/stats.pm:175 themes/default/templates/index.html.ep:3 themes/default/templates/raw.html.ep:17 themes/default/templates/raw.html.ep:34 themes/default/templates/raw.html.ep:6
#: lib/Lutim.pm:163 lib/Lutim/Command/cron/stats.pm:147 lib/Lutim/Command/cron/stats.pm:158 lib/Lutim/Command/cron/stats.pm:175 themes/default/templates/index.html.ep:3 themes/default/templates/raw.html.ep:17 themes/default/templates/raw.html.ep:34 themes/default/templates/raw.html.ep:6
msgid "no time limit"
msgstr "Sin tiempo límite"
+34 -34
View File
@@ -22,7 +22,7 @@ msgstr ""
#. (30)
#. ($delay)
#. (config('max_delay')
#: lib/Lutim/Command/cron/stats.pm:149 lib/Lutim/Command/cron/stats.pm:150 lib/Lutim/Command/cron/stats.pm:160 lib/Lutim/Command/cron/stats.pm:161 lib/Lutim/Command/cron/stats.pm:177 lib/Lutim/Command/cron/stats.pm:178 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/for_my_delay.html.ep:13 themes/default/templates/partial/for_my_delay.html.ep:3 themes/default/templates/partial/lutim.js.ep:139 themes/default/templates/partial/lutim.js.ep:148 themes/default/templates/partial/lutim.js.ep:149 themes/default/templates/raw.html.ep:19 themes/default/templates/raw.html.ep:20 themes/default/templates/raw.html.ep:36 themes/default/templates/raw.html.ep:37 themes/default/templates/raw.html.ep:8 themes/default/templates/raw.html.ep:9
#: lib/Lutim/Command/cron/stats.pm:149 lib/Lutim/Command/cron/stats.pm:150 lib/Lutim/Command/cron/stats.pm:160 lib/Lutim/Command/cron/stats.pm:161 lib/Lutim/Command/cron/stats.pm:177 lib/Lutim/Command/cron/stats.pm:178 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/for_my_delay.html.ep:13 themes/default/templates/partial/for_my_delay.html.ep:3 themes/default/templates/partial/lutim.js.ep:138 themes/default/templates/partial/lutim.js.ep:147 themes/default/templates/partial/lutim.js.ep:148 themes/default/templates/raw.html.ep:19 themes/default/templates/raw.html.ep:20 themes/default/templates/raw.html.ep:36 themes/default/templates/raw.html.ep:37 themes/default/templates/raw.html.ep:8 themes/default/templates/raw.html.ep:9
msgid "%1 days"
msgstr "%1 jours"
@@ -35,15 +35,15 @@ msgstr "%1 images envoyées sur cette instance depuis le début."
msgid "-or-"
msgstr "-ou-"
#: lib/Lutim/Command/cron/stats.pm:151 lib/Lutim/Command/cron/stats.pm:162 lib/Lutim/Command/cron/stats.pm:179 themes/default/templates/index.html.ep:5 themes/default/templates/raw.html.ep:10 themes/default/templates/raw.html.ep:21 themes/default/templates/raw.html.ep:38
#: lib/Lutim.pm:165 lib/Lutim/Command/cron/stats.pm:151 lib/Lutim/Command/cron/stats.pm:162 lib/Lutim/Command/cron/stats.pm:179 themes/default/templates/index.html.ep:5 themes/default/templates/raw.html.ep:10 themes/default/templates/raw.html.ep:21 themes/default/templates/raw.html.ep:38
msgid "1 year"
msgstr "1 an"
#: lib/Lutim/Command/cron/stats.pm:148 lib/Lutim/Command/cron/stats.pm:159 lib/Lutim/Command/cron/stats.pm:176 themes/default/templates/index.html.ep:4 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/lutim.js.ep:148 themes/default/templates/raw.html.ep:18 themes/default/templates/raw.html.ep:35 themes/default/templates/raw.html.ep:7
#: lib/Lutim.pm:164 lib/Lutim/Command/cron/stats.pm:148 lib/Lutim/Command/cron/stats.pm:159 lib/Lutim/Command/cron/stats.pm:176 themes/default/templates/index.html.ep:4 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/lutim.js.ep:147 themes/default/templates/raw.html.ep:18 themes/default/templates/raw.html.ep:35 themes/default/templates/raw.html.ep:7
msgid "24 hours"
msgstr "24 heures"
#: themes/default/templates/myfiles.html.ep:123
#: themes/default/templates/partial/myfiles.js.ep:57
msgid ": Error while trying to get the counter."
msgstr " : Erreur en essayant de récupérer le compteur."
@@ -71,11 +71,11 @@ msgstr "Cliquez pour utiliser le navigateur de fichier"
msgid "Contributors"
msgstr "Contributeurs"
#: themes/default/templates/partial/lutim.js.ep:215 themes/default/templates/partial/lutim.js.ep:269 themes/default/templates/partial/lutim.js.ep:347
#: themes/default/templates/partial/lutim.js.ep:214 themes/default/templates/partial/lutim.js.ep:268 themes/default/templates/partial/lutim.js.ep:346
msgid "Copy all view links to clipboard"
msgstr "Copier tous les liens de visualisation dans le presse-papier"
#: themes/default/templates/index.html.ep:18 themes/default/templates/index.html.ep:36 themes/default/templates/index.html.ep:69 themes/default/templates/index.html.ep:77 themes/default/templates/index.html.ep:85 themes/default/templates/index.html.ep:93 themes/default/templates/myfiles.html.ep:20 themes/default/templates/myfiles.html.ep:38 themes/default/templates/partial/common.js.ep:151 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/index.html.ep:18 themes/default/templates/index.html.ep:36 themes/default/templates/index.html.ep:69 themes/default/templates/index.html.ep:77 themes/default/templates/index.html.ep:85 themes/default/templates/index.html.ep:93 themes/default/templates/myfiles.html.ep:20 themes/default/templates/myfiles.html.ep:38 themes/default/templates/partial/common.js.ep:150 themes/default/templates/partial/lutim.js.ep:105 themes/default/templates/partial/lutim.js.ep:120 themes/default/templates/partial/lutim.js.ep:79 themes/default/templates/partial/lutim.js.ep:91
msgid "Copy to clipboard"
msgstr "Copier dans le presse-papier"
@@ -91,7 +91,7 @@ msgstr "Graphe de répartition des délais pour les images supprimées"
msgid "Delay repartition chart for enabled images"
msgstr "Graphe de répartition des délais pour les images actives"
#: themes/default/templates/index.html.ep:115 themes/default/templates/index.html.ep:147 themes/default/templates/index.html.ep:178 themes/default/templates/myfiles.html.ep:53 themes/default/templates/partial/lutim.js.ep:160
#: themes/default/templates/index.html.ep:115 themes/default/templates/index.html.ep:147 themes/default/templates/index.html.ep:178 themes/default/templates/myfiles.html.ep:53 themes/default/templates/partial/lutim.js.ep:159
msgid "Delete at first view?"
msgstr "Supprimer au premier accès ?"
@@ -103,7 +103,7 @@ msgstr "Images supprimées"
msgid "Deleted images in 30 days"
msgstr "Images supprimées dans 30 jours"
#: themes/default/templates/index.html.ep:98 themes/default/templates/myfiles.html.ep:56 themes/default/templates/partial/common.js.ep:143 themes/default/templates/partial/common.js.ep:146
#: themes/default/templates/index.html.ep:98 themes/default/templates/myfiles.html.ep:56 themes/default/templates/partial/common.js.ep:142 themes/default/templates/partial/common.js.ep:145
msgid "Deletion link"
msgstr "Lien de suppression"
@@ -111,7 +111,7 @@ msgstr "Lien de suppression"
msgid "Download all images"
msgstr "Télécharger toutes les images"
#: themes/default/templates/index.html.ep:81 themes/default/templates/index.html.ep:83 themes/default/templates/partial/lutim.js.ep:102 themes/default/templates/partial/lutim.js.ep:98
#: themes/default/templates/index.html.ep:81 themes/default/templates/index.html.ep:83 themes/default/templates/partial/lutim.js.ep:101 themes/default/templates/partial/lutim.js.ep:97
msgid "Download link"
msgstr "Lien de téléchargement"
@@ -131,7 +131,7 @@ msgstr "Faites glisser des images dans la zone prévue à cet effet ou sélectio
msgid "Encrypt the image (Lutim does not keep the key)."
msgstr "Chiffrer limage (Lutim ne stocke pas la clé)."
#: themes/default/templates/partial/lutim.js.ep:45
#: themes/default/templates/partial/lutim.js.ep:44
msgid "Error while trying to modify the image."
msgstr "Une erreur est survenue en essayant de modifier limage."
@@ -151,7 +151,7 @@ msgstr "Nom du fichier"
msgid "For more details, see the <a href=\"https://framagit.org/luc/lutim\">homepage of the project</a>."
msgstr "Pour plus de détails, consultez la page <a href=\"https://framagit.org/luc/lutim\">Github</a> du projet."
#: themes/default/templates/layouts/default.html.ep:49
#: themes/default/templates/layouts/default.html.ep:55
msgid "Fork me!"
msgstr "Créez un fork !"
@@ -159,11 +159,11 @@ msgstr "Créez un fork !"
msgid "Gallery link"
msgstr "Lien vers la galerie"
#: themes/default/templates/partial/common.js.ep:105 themes/default/templates/partial/common.js.ep:88
#: themes/default/templates/partial/common.js.ep:104 themes/default/templates/partial/common.js.ep:87
msgid "Hit Ctrl+C, then Enter to copy the short link"
msgstr "Faites Ctrl+C puis appuyez sur la touche Entrée pour copier le lien"
#: themes/default/templates/layouts/default.html.ep:44
#: themes/default/templates/layouts/default.html.ep:50
msgid "Homepage"
msgstr "Accueil"
@@ -195,15 +195,15 @@ msgstr "Durée de rétention de limage"
msgid "Image not found."
msgstr "Image non trouvée."
#: themes/default/templates/layouts/default.html.ep:48
#: themes/default/templates/layouts/default.html.ep:54
msgid "Informations"
msgstr "Informations"
#: themes/default/templates/layouts/default.html.ep:56
#: themes/default/templates/layouts/default.html.ep:62
msgid "Install webapp"
msgstr "Installer la webapp"
#: themes/default/templates/layouts/default.html.ep:55
#: themes/default/templates/layouts/default.html.ep:61
msgid "Instance's statistics"
msgstr "Statistiques de linstance"
@@ -223,19 +223,19 @@ msgstr "Comme on prononce <a href=\"https://fr.wikipedia.org/wiki/Lutin\">lutin<
msgid "Keep EXIF tags"
msgstr "Conserver les données EXIF"
#: themes/default/templates/index.html.ep:118 themes/default/templates/index.html.ep:166 themes/default/templates/index.html.ep:206 themes/default/templates/partial/lutim.js.ep:164
#: themes/default/templates/index.html.ep:118 themes/default/templates/index.html.ep:166 themes/default/templates/index.html.ep:206 themes/default/templates/partial/lutim.js.ep:163
msgid "Let's go!"
msgstr "Allons-y !"
#: themes/default/templates/layouts/default.html.ep:52
#: themes/default/templates/layouts/default.html.ep:58
msgid "Liberapay button"
msgstr "Bouton Liberapay"
#: themes/default/templates/layouts/default.html.ep:47
#: themes/default/templates/layouts/default.html.ep:53
msgid "License:"
msgstr "Licence :"
#: themes/default/templates/index.html.ep:89 themes/default/templates/index.html.ep:91 themes/default/templates/partial/lutim.js.ep:112 themes/default/templates/partial/lutim.js.ep:116
#: themes/default/templates/index.html.ep:89 themes/default/templates/index.html.ep:91 themes/default/templates/partial/lutim.js.ep:111 themes/default/templates/partial/lutim.js.ep:115
msgid "Link for share on social networks"
msgstr "Lien pour partager sur les réseaux sociaux"
@@ -251,15 +251,15 @@ msgstr "Lutim est un service gratuit et anonyme dhébergement dimages. Il
msgid "Main developers"
msgstr "Développeurs de lapplication"
#: themes/default/templates/index.html.ep:73 themes/default/templates/index.html.ep:75 themes/default/templates/partial/lutim.js.ep:86 themes/default/templates/partial/lutim.js.ep:89
#: themes/default/templates/index.html.ep:73 themes/default/templates/index.html.ep:75 themes/default/templates/partial/lutim.js.ep:85 themes/default/templates/partial/lutim.js.ep:88
msgid "Markdown syntax"
msgstr "Syntaxe Markdown"
#: themes/default/templates/layouts/default.html.ep:54 themes/default/templates/myfiles.html.ep:2
#: themes/default/templates/layouts/default.html.ep:60 themes/default/templates/myfiles.html.ep:2
msgid "My images"
msgstr "Mes images"
#: themes/default/templates/myfiles.html.ep:85
#: themes/default/templates/partial/myfiles.js.ep:19
msgid "No limit"
msgstr "Pas de date dexpiration"
@@ -292,15 +292,15 @@ msgstr "Statistiques brutes"
msgid "Send an image"
msgstr "Envoyer une image"
#: themes/default/templates/partial/lutim.js.ep:21
#: themes/default/templates/partial/lutim.js.ep:20
msgid "Share it!"
msgstr "Partagez !"
#: themes/default/templates/layouts/default.html.ep:50
#: themes/default/templates/layouts/default.html.ep:56
msgid "Share on Twitter"
msgstr "Partager sur Twitter"
#: themes/default/templates/index.html.ep:133 themes/default/templates/partial/lutim.js.ep:175
#: themes/default/templates/index.html.ep:133 themes/default/templates/partial/lutim.js.ep:174
msgid "Something bad happened"
msgstr "Un problème est survenu"
@@ -309,11 +309,11 @@ msgstr "Un problème est survenu"
msgid "Something went wrong when creating the zip file. Try again later or contact the administrator (%1)."
msgstr "Quelque chose sest mal passé lors de la création de larchive. Veuillez réessayer plus tard ou contactez ladministrateur (%1)."
#: themes/default/templates/layouts/default.html.ep:52
#: themes/default/templates/layouts/default.html.ep:58
msgid "Support the author on Liberapay"
msgstr "Supporter lauteur sur Liberapay"
#: themes/default/templates/layouts/default.html.ep:51
#: themes/default/templates/layouts/default.html.ep:57
msgid "Support the author on Tipeee"
msgstr "Supporter lauteur sur Tipeee"
@@ -346,8 +346,8 @@ msgstr "Le fichier %1 nest pas une image."
#. ($tx->res->max_message_size)
#. ($c->req->max_message_size)
#. ($max_file_size)
#: lib/Lutim/Controller.pm:271 lib/Lutim/Controller.pm:340 themes/default/templates/partial/lutim.js.ep:241
#. (config('max_file_size')
#: lib/Lutim/Controller.pm:271 lib/Lutim/Controller.pm:340 themes/default/templates/partial/lutim.js.ep:240
msgid "The file exceed the size limit (%1)"
msgstr "Le fichier dépasse la limite de taille (%1)"
@@ -382,7 +382,7 @@ msgstr "Les images déposées sur Lutim peuvent être stockées indéfiniment, o
msgid "There is no more available URL. Retry or contact the administrator. %1"
msgstr "Il ny a plus dURL disponible. Veuillez réessayer ou contacter ladministrateur. %1."
#: themes/default/templates/layouts/default.html.ep:51
#: themes/default/templates/layouts/default.html.ep:57
msgid "Tipeee button"
msgstr "Bouton Tipeee"
@@ -390,7 +390,7 @@ msgstr "Bouton Tipeee"
msgid "Total"
msgstr "Total"
#: themes/default/templates/index.html.ep:60 themes/default/templates/partial/lutim.js.ep:15
#: themes/default/templates/index.html.ep:60 themes/default/templates/partial/lutim.js.ep:14
msgid "Tweet it!"
msgstr "Tweetez !"
@@ -428,7 +428,7 @@ msgstr "Fichiers envoyés, par jour"
msgid "Uploading is currently disabled, please try later or contact the administrator (%1)."
msgstr "Lenvoi dimages est actuellement désactivé, veuillez réessayer plus tard ou contacter ladministrateur (%1)."
#: themes/default/templates/index.html.ep:65 themes/default/templates/index.html.ep:67 themes/default/templates/myfiles.html.ep:51 themes/default/templates/partial/lutim.js.ep:72 themes/default/templates/partial/lutim.js.ep:76
#: themes/default/templates/index.html.ep:65 themes/default/templates/index.html.ep:67 themes/default/templates/myfiles.html.ep:51 themes/default/templates/partial/lutim.js.ep:71 themes/default/templates/partial/lutim.js.ep:75
msgid "View link"
msgstr "Lien daffichage"
@@ -468,7 +468,7 @@ msgstr "et sur"
msgid "core developer"
msgstr "développeur principal"
#: lib/Lutim/Command/cron/stats.pm:147 lib/Lutim/Command/cron/stats.pm:158 lib/Lutim/Command/cron/stats.pm:175 themes/default/templates/index.html.ep:3 themes/default/templates/raw.html.ep:17 themes/default/templates/raw.html.ep:34 themes/default/templates/raw.html.ep:6
#: lib/Lutim.pm:163 lib/Lutim/Command/cron/stats.pm:147 lib/Lutim/Command/cron/stats.pm:158 lib/Lutim/Command/cron/stats.pm:175 themes/default/templates/index.html.ep:3 themes/default/templates/raw.html.ep:17 themes/default/templates/raw.html.ep:34 themes/default/templates/raw.html.ep:6
msgid "no time limit"
msgstr "Pas de limitation de durée"
+34 -34
View File
@@ -21,7 +21,7 @@ msgstr ""
#. (30)
#. ($delay)
#. (config('max_delay')
#: lib/Lutim/Command/cron/stats.pm:149 lib/Lutim/Command/cron/stats.pm:150 lib/Lutim/Command/cron/stats.pm:160 lib/Lutim/Command/cron/stats.pm:161 lib/Lutim/Command/cron/stats.pm:177 lib/Lutim/Command/cron/stats.pm:178 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/for_my_delay.html.ep:13 themes/default/templates/partial/for_my_delay.html.ep:3 themes/default/templates/partial/lutim.js.ep:139 themes/default/templates/partial/lutim.js.ep:148 themes/default/templates/partial/lutim.js.ep:149 themes/default/templates/raw.html.ep:19 themes/default/templates/raw.html.ep:20 themes/default/templates/raw.html.ep:36 themes/default/templates/raw.html.ep:37 themes/default/templates/raw.html.ep:8 themes/default/templates/raw.html.ep:9
#: lib/Lutim/Command/cron/stats.pm:149 lib/Lutim/Command/cron/stats.pm:150 lib/Lutim/Command/cron/stats.pm:160 lib/Lutim/Command/cron/stats.pm:161 lib/Lutim/Command/cron/stats.pm:177 lib/Lutim/Command/cron/stats.pm:178 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/for_my_delay.html.ep:13 themes/default/templates/partial/for_my_delay.html.ep:3 themes/default/templates/partial/lutim.js.ep:138 themes/default/templates/partial/lutim.js.ep:147 themes/default/templates/partial/lutim.js.ep:148 themes/default/templates/raw.html.ep:19 themes/default/templates/raw.html.ep:20 themes/default/templates/raw.html.ep:36 themes/default/templates/raw.html.ep:37 themes/default/templates/raw.html.ep:8 themes/default/templates/raw.html.ep:9
msgid "%1 days"
msgstr "%1 jorns"
@@ -34,15 +34,15 @@ msgstr "%1 imatges mandats sus aquesta instància dempuèi lo començament."
msgid "-or-"
msgstr "-o-"
#: lib/Lutim/Command/cron/stats.pm:151 lib/Lutim/Command/cron/stats.pm:162 lib/Lutim/Command/cron/stats.pm:179 themes/default/templates/index.html.ep:5 themes/default/templates/raw.html.ep:10 themes/default/templates/raw.html.ep:21 themes/default/templates/raw.html.ep:38
#: lib/Lutim.pm:165 lib/Lutim/Command/cron/stats.pm:151 lib/Lutim/Command/cron/stats.pm:162 lib/Lutim/Command/cron/stats.pm:179 themes/default/templates/index.html.ep:5 themes/default/templates/raw.html.ep:10 themes/default/templates/raw.html.ep:21 themes/default/templates/raw.html.ep:38
msgid "1 year"
msgstr "1 an"
#: lib/Lutim/Command/cron/stats.pm:148 lib/Lutim/Command/cron/stats.pm:159 lib/Lutim/Command/cron/stats.pm:176 themes/default/templates/index.html.ep:4 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/lutim.js.ep:148 themes/default/templates/raw.html.ep:18 themes/default/templates/raw.html.ep:35 themes/default/templates/raw.html.ep:7
#: lib/Lutim.pm:164 lib/Lutim/Command/cron/stats.pm:148 lib/Lutim/Command/cron/stats.pm:159 lib/Lutim/Command/cron/stats.pm:176 themes/default/templates/index.html.ep:4 themes/default/templates/partial/for_my_delay.html.ep:12 themes/default/templates/partial/lutim.js.ep:147 themes/default/templates/raw.html.ep:18 themes/default/templates/raw.html.ep:35 themes/default/templates/raw.html.ep:7
msgid "24 hours"
msgstr "24 oras"
#: themes/default/templates/myfiles.html.ep:123
#: themes/default/templates/partial/myfiles.js.ep:57
msgid ": Error while trying to get the counter."
msgstr " : Error al moment de recuperar lo comptador."
@@ -70,11 +70,11 @@ msgstr "Clicatz per utilizar lo navigador de fichièr"
msgid "Contributors"
msgstr "Contributors"
#: themes/default/templates/partial/lutim.js.ep:215 themes/default/templates/partial/lutim.js.ep:269 themes/default/templates/partial/lutim.js.ep:347
#: themes/default/templates/partial/lutim.js.ep:214 themes/default/templates/partial/lutim.js.ep:268 themes/default/templates/partial/lutim.js.ep:346
msgid "Copy all view links to clipboard"
msgstr "Copiar totes los ligams de visualizacion dins lo quichapapièrs"
#: themes/default/templates/index.html.ep:18 themes/default/templates/index.html.ep:36 themes/default/templates/index.html.ep:69 themes/default/templates/index.html.ep:77 themes/default/templates/index.html.ep:85 themes/default/templates/index.html.ep:93 themes/default/templates/myfiles.html.ep:20 themes/default/templates/myfiles.html.ep:38 themes/default/templates/partial/common.js.ep:151 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/index.html.ep:18 themes/default/templates/index.html.ep:36 themes/default/templates/index.html.ep:69 themes/default/templates/index.html.ep:77 themes/default/templates/index.html.ep:85 themes/default/templates/index.html.ep:93 themes/default/templates/myfiles.html.ep:20 themes/default/templates/myfiles.html.ep:38 themes/default/templates/partial/common.js.ep:150 themes/default/templates/partial/lutim.js.ep:105 themes/default/templates/partial/lutim.js.ep:120 themes/default/templates/partial/lutim.js.ep:79 themes/default/templates/partial/lutim.js.ep:91
msgid "Copy to clipboard"
msgstr "Copiar dins lo quichapapièrs"
@@ -90,7 +90,7 @@ msgstr "Grafic de despartiment dels delais pels imatges desactivats"
msgid "Delay repartition chart for enabled images"
msgstr "Grafic de despartiment dels delais pels imatges activats"
#: themes/default/templates/index.html.ep:115 themes/default/templates/index.html.ep:147 themes/default/templates/index.html.ep:178 themes/default/templates/myfiles.html.ep:53 themes/default/templates/partial/lutim.js.ep:160
#: themes/default/templates/index.html.ep:115 themes/default/templates/index.html.ep:147 themes/default/templates/index.html.ep:178 themes/default/templates/myfiles.html.ep:53 themes/default/templates/partial/lutim.js.ep:159
msgid "Delete at first view?"
msgstr "Suprimir al primièr accès ?"
@@ -102,7 +102,7 @@ msgstr "Imatges suprimits"
msgid "Deleted images in 30 days"
msgstr "Imatges per èsser suprimits dins 30 jorns"
#: themes/default/templates/index.html.ep:98 themes/default/templates/myfiles.html.ep:56 themes/default/templates/partial/common.js.ep:143 themes/default/templates/partial/common.js.ep:146
#: themes/default/templates/index.html.ep:98 themes/default/templates/myfiles.html.ep:56 themes/default/templates/partial/common.js.ep:142 themes/default/templates/partial/common.js.ep:145
msgid "Deletion link"
msgstr "Ligam de supression"
@@ -110,7 +110,7 @@ msgstr "Ligam de supression"
msgid "Download all images"
msgstr "Telecargar totes los imatges"
#: themes/default/templates/index.html.ep:81 themes/default/templates/index.html.ep:83 themes/default/templates/partial/lutim.js.ep:102 themes/default/templates/partial/lutim.js.ep:98
#: themes/default/templates/index.html.ep:81 themes/default/templates/index.html.ep:83 themes/default/templates/partial/lutim.js.ep:101 themes/default/templates/partial/lutim.js.ep:97
msgid "Download link"
msgstr "Ligam de telecargament"
@@ -130,7 +130,7 @@ msgstr "Depausatz vòstres imatges dins la zòna prevista per aquò o selecciona
msgid "Encrypt the image (Lutim does not keep the key)."
msgstr "Chifrar l'imatge (Lutim garda pas la clau)."
#: themes/default/templates/partial/lutim.js.ep:45
#: themes/default/templates/partial/lutim.js.ep:44
msgid "Error while trying to modify the image."
msgstr "Una error es apareguda al moment de modificar l'imatge."
@@ -150,7 +150,7 @@ msgstr "Nom del fichièr"
msgid "For more details, see the <a href=\"https://framagit.org/luc/lutim\">homepage of the project</a>."
msgstr "Per mai de detalhs, consultatz la pagina <a href=\"https://framagit.org/luc/lutim\">Github</a> del projècte."
#: themes/default/templates/layouts/default.html.ep:49
#: themes/default/templates/layouts/default.html.ep:55
msgid "Fork me!"
msgstr "Creatz un fork !"
@@ -158,11 +158,11 @@ msgstr "Creatz un fork !"
msgid "Gallery link"
msgstr "Ligam cap a la galariá"
#: themes/default/templates/partial/common.js.ep:105 themes/default/templates/partial/common.js.ep:88
#: themes/default/templates/partial/common.js.ep:104 themes/default/templates/partial/common.js.ep:87
msgid "Hit Ctrl+C, then Enter to copy the short link"
msgstr "Fasètz Ctrl+C puèi picatz Entrada per copiar lo ligam"
#: themes/default/templates/layouts/default.html.ep:44
#: themes/default/templates/layouts/default.html.ep:50
msgid "Homepage"
msgstr "Acuèlh"
@@ -194,15 +194,15 @@ msgstr "Delai de l'imatge"
msgid "Image not found."
msgstr "Imatge pas trobat."
#: themes/default/templates/layouts/default.html.ep:48
#: themes/default/templates/layouts/default.html.ep:54
msgid "Informations"
msgstr "Informacions"
#: themes/default/templates/layouts/default.html.ep:56
#: themes/default/templates/layouts/default.html.ep:62
msgid "Install webapp"
msgstr "Installar la webapp"
#: themes/default/templates/layouts/default.html.ep:55
#: themes/default/templates/layouts/default.html.ep:61
msgid "Instance's statistics"
msgstr ""
@@ -222,19 +222,19 @@ msgstr "Òm pronóncia coma en occitan lengadocian, LU-TI-N, amb una M finala qu
msgid "Keep EXIF tags"
msgstr "Conservar las donadas EXIF"
#: themes/default/templates/index.html.ep:118 themes/default/templates/index.html.ep:166 themes/default/templates/index.html.ep:206 themes/default/templates/partial/lutim.js.ep:164
#: themes/default/templates/index.html.ep:118 themes/default/templates/index.html.ep:166 themes/default/templates/index.html.ep:206 themes/default/templates/partial/lutim.js.ep:163
msgid "Let's go!"
msgstr "Zo !"
#: themes/default/templates/layouts/default.html.ep:52
#: themes/default/templates/layouts/default.html.ep:58
msgid "Liberapay button"
msgstr ""
#: themes/default/templates/layouts/default.html.ep:47
#: themes/default/templates/layouts/default.html.ep:53
msgid "License:"
msgstr "Licéncia :"
#: themes/default/templates/index.html.ep:89 themes/default/templates/index.html.ep:91 themes/default/templates/partial/lutim.js.ep:112 themes/default/templates/partial/lutim.js.ep:116
#: themes/default/templates/index.html.ep:89 themes/default/templates/index.html.ep:91 themes/default/templates/partial/lutim.js.ep:111 themes/default/templates/partial/lutim.js.ep:115
msgid "Link for share on social networks"
msgstr "Ligam per partejar suls malhums socials"
@@ -250,15 +250,15 @@ msgstr "Lutim es un servici gratuit e anonim dalbergament dimatges. Sag
msgid "Main developers"
msgstr "Desvolopaires de l'aplicacion"
#: themes/default/templates/index.html.ep:73 themes/default/templates/index.html.ep:75 themes/default/templates/partial/lutim.js.ep:86 themes/default/templates/partial/lutim.js.ep:89
#: themes/default/templates/index.html.ep:73 themes/default/templates/index.html.ep:75 themes/default/templates/partial/lutim.js.ep:85 themes/default/templates/partial/lutim.js.ep:88
msgid "Markdown syntax"
msgstr "Sintaxi Markdown"
#: themes/default/templates/layouts/default.html.ep:54 themes/default/templates/myfiles.html.ep:2
#: themes/default/templates/layouts/default.html.ep:60 themes/default/templates/myfiles.html.ep:2
msgid "My images"
msgstr "Mos imatges"
#: themes/default/templates/myfiles.html.ep:85
#: themes/default/templates/partial/myfiles.js.ep:19
msgid "No limit"
msgstr "Pas cap de data d'expiracion"
@@ -291,15 +291,15 @@ msgstr "Estatisticas bruts"
msgid "Send an image"
msgstr "Mandar un imatge"
#: themes/default/templates/partial/lutim.js.ep:21
#: themes/default/templates/partial/lutim.js.ep:20
msgid "Share it!"
msgstr "Partejatz !"
#: themes/default/templates/layouts/default.html.ep:50
#: themes/default/templates/layouts/default.html.ep:56
msgid "Share on Twitter"
msgstr "Partejar sus Twitter"
#: themes/default/templates/index.html.ep:133 themes/default/templates/partial/lutim.js.ep:175
#: themes/default/templates/index.html.ep:133 themes/default/templates/partial/lutim.js.ep:174
msgid "Something bad happened"
msgstr "Un problèma es aparegut"
@@ -308,11 +308,11 @@ msgstr "Un problèma es aparegut"
msgid "Something went wrong when creating the zip file. Try again later or contact the administrator (%1)."
msgstr "Quicòm a trucat pendent la creacion de l'archiu. Mercés de tornar ensajar pus tard o de contactar l'administrator (%1)."
#: themes/default/templates/layouts/default.html.ep:52
#: themes/default/templates/layouts/default.html.ep:58
msgid "Support the author on Liberapay"
msgstr ""
#: themes/default/templates/layouts/default.html.ep:51
#: themes/default/templates/layouts/default.html.ep:57
msgid "Support the author on Tipeee"
msgstr ""
@@ -343,8 +343,8 @@ msgstr "Lo fichièr %1 es pas un imatge."
#. ($tx->res->max_message_size)
#. ($c->req->max_message_size)
#. ($max_file_size)
#: lib/Lutim/Controller.pm:271 lib/Lutim/Controller.pm:340 themes/default/templates/partial/lutim.js.ep:241
#. (config('max_file_size')
#: lib/Lutim/Controller.pm:271 lib/Lutim/Controller.pm:340 themes/default/templates/partial/lutim.js.ep:240
msgid "The file exceed the size limit (%1)"
msgstr "Lo fichièr depassa lo limit de talha (%1)"
@@ -379,7 +379,7 @@ msgstr "Los imatges depausats sus Lutim pòdon èsser gardats sens fin, o ses
msgid "There is no more available URL. Retry or contact the administrator. %1"
msgstr "I a pas mai d'URL disponibla. Mercés de tornar ensajar o de contactar l'administrator. %1."
#: themes/default/templates/layouts/default.html.ep:51
#: themes/default/templates/layouts/default.html.ep:57
msgid "Tipeee button"
msgstr ""
@@ -387,7 +387,7 @@ msgstr ""
msgid "Total"
msgstr "Total"
#: themes/default/templates/index.html.ep:60 themes/default/templates/partial/lutim.js.ep:15
#: themes/default/templates/index.html.ep:60 themes/default/templates/partial/lutim.js.ep:14
msgid "Tweet it!"
msgstr "Tweetejatz !"
@@ -425,7 +425,7 @@ msgstr "Fichièrs mandats per jorn"
msgid "Uploading is currently disabled, please try later or contact the administrator (%1)."
msgstr "La mesa en linha es desactivada pel moment, mercés de tornar ensajar mai tard o de contactar l'administrator (%1)."
#: themes/default/templates/index.html.ep:65 themes/default/templates/index.html.ep:67 themes/default/templates/myfiles.html.ep:51 themes/default/templates/partial/lutim.js.ep:72 themes/default/templates/partial/lutim.js.ep:76
#: themes/default/templates/index.html.ep:65 themes/default/templates/index.html.ep:67 themes/default/templates/myfiles.html.ep:51 themes/default/templates/partial/lutim.js.ep:71 themes/default/templates/partial/lutim.js.ep:75
msgid "View link"
msgstr "Ligam d'afichatge"
@@ -465,7 +465,7 @@ msgstr "e sus"
msgid "core developer"
msgstr "desvolopaire màger"
#: lib/Lutim/Command/cron/stats.pm:147 lib/Lutim/Command/cron/stats.pm:158 lib/Lutim/Command/cron/stats.pm:175 themes/default/templates/index.html.ep:3 themes/default/templates/raw.html.ep:17 themes/default/templates/raw.html.ep:34 themes/default/templates/raw.html.ep:6
#: lib/Lutim.pm:163 lib/Lutim/Command/cron/stats.pm:147 lib/Lutim/Command/cron/stats.pm:158 lib/Lutim/Command/cron/stats.pm:175 themes/default/templates/index.html.ep:3 themes/default/templates/raw.html.ep:17 themes/default/templates/raw.html.ep:34 themes/default/templates/raw.html.ep:6
msgid "no time limit"
msgstr "Pas cap de limitacion de durada"
@@ -95,7 +95,7 @@
height:35px;
width:32px;
height:32px;
background-image:url('../images/loader_skype_trans.gif');
background-image:url('../../gallery/images/loader_skype_trans.gif');
background-repeat:no-repeat;
}
@@ -151,78 +151,78 @@
.ug-slider-preloader.ug-loader1{
width:30px;
height:30px;
background-image:url('../images/loader-white1.gif');
background-image:url('../../gallery/images/loader-white1.gif');
}
.ug-slider-preloader.ug-loader1.ug-loader-black{
background-image:url('../images/loader-black1.gif');
background-image:url('../../gallery/images/loader-black1.gif');
}
.ug-slider-preloader.ug-loader2{
width:32px;
height:32px;
background-image:url('../images/loader-white2.gif');
background-image:url('../../gallery/images/loader-white2.gif');
}
.ug-slider-preloader.ug-loader2.ug-loader-black{
background-image:url('../images/loader-black2.gif');
background-image:url('../../gallery/images/loader-black2.gif');
}
.ug-slider-preloader.ug-loader3{
width:38px;
height:38px;
background-image:url('../images/loader-white3.gif');
background-image:url('../../gallery/images/loader-white3.gif');
}
.ug-slider-preloader.ug-loader3.ug-loader-black{
background-image:url('../images/loader-black3.gif');
background-image:url('../../gallery/images/loader-black3.gif');
}
.ug-slider-preloader.ug-loader4{
width:32px;
height:32px;
background-image:url('../images/loader-white4.gif');
background-image:url('../../gallery/images/loader-white4.gif');
background-color:white;
}
.ug-slider-preloader.ug-loader4.ug-loader-black{
background-image:url('../images/loader-black4.gif');
background-image:url('../../gallery/images/loader-black4.gif');
}
.ug-slider-preloader.ug-loader5{
width:60px;
height:8px;
background-image:url('../images/loader-white5.gif');
background-image:url('../../gallery/images/loader-white5.gif');
background-color:white;
border:none;
border-radius:0px;
}
.ug-slider-preloader.ug-loader5.ug-loader-black{
background-image:url('../images/loader-black5.gif');
background-image:url('../../gallery/images/loader-black5.gif');
border:2px solid #000000;
}
.ug-slider-preloader.ug-loader6{
width:32px;
height:32px;
background-image:url('../images/loader-white6.gif');
background-image:url('../../gallery/images/loader-white6.gif');
}
.ug-slider-preloader.ug-loader6.ug-loader-black{
background-image:url('../images/loader-black6.gif');
background-image:url('../../gallery/images/loader-black6.gif');
}
.ug-slider-preloader.ug-loader7{
width:32px;
height:10px;
background-image:url('../images/loader-white7.gif');
background-image:url('../../gallery/images/loader-white7.gif');
border-width:3px;
border-radius:3px;
}
.ug-slider-preloader.ug-loader7.ug-loader-black{
background-image:url('../images/loader-black7.gif');
background-image:url('../../gallery/images/loader-black7.gif');
}
.ug-slider-preloader.ug-loader-black{
@@ -243,7 +243,7 @@
.ug-slider-wrapper .ug-button-videoplay.ug-type-square{
width:86px;
height:66px;
background-image:url('../images/play-button-square.png');
background-image:url('../../gallery/images/play-button-square.png');
background-position:0px -66px;
}
@@ -255,7 +255,7 @@
.ug-slider-wrapper .ug-button-videoplay.ug-type-round{
width:76px;
height:76px;
background-image:url('../images/play-button-round.png');
background-image:url('../../gallery/images/play-button-round.png');
opacity:0.9;
filter: alpha(opacity = 90);
transition: all 0.3s ease 0s !important;
@@ -275,7 +275,7 @@
position:absolute;
z-index:100;
background-color:#000000;
background-image:url('../images/loader-black1.gif');
background-image:url('../../gallery/images/loader-black1.gif');
background-repeat:no-repeat;
background-position:center center;
box-sizing:border-box;
@@ -286,7 +286,7 @@
width:100%;
height:100%;
background-color:#000000;
background-image:url('../images/loader-black1.gif');
background-image:url('../../gallery/images/loader-black1.gif');
background-repeat:no-repeat;
background-position:center center;
}
@@ -296,7 +296,7 @@
position:absolute;
height:64px;
width:64px;
background-image:url('../images/button-close.png');
background-image:url('../../gallery/images/button-close.png');
cursor:pointer;
z-index:1000;
}
@@ -372,15 +372,15 @@
}
.ug-thumb-wrapper.ug-thumb-generated .ug-thumb-loader-dark{
background-image:url('../images/loader.gif');
background-image:url('../../gallery/images/loader.gif');
}
.ug-thumb-wrapper.ug-thumb-generated .ug-thumb-loader-bright{
background-image:url('../images/loader_bright.gif');
background-image:url('../../gallery/images/loader_bright.gif');
}
.ug-thumb-wrapper.ug-thumb-generated .ug-thumb-error{
background-image:url('../images/not_loaded.png');
background-image:url('../../gallery/images/not_loaded.png');
}
.ug-thumb-wrapper.ug-thumb-generated img{
@@ -572,7 +572,7 @@ img.ug-sepia-effect{
background-color:#000000;
opacity: 0.3;
filter: alpha(opacity=30);
background-image:url('../images/cover-grid.png');
background-image:url('../../gallery/images/cover-grid.png');
}
@@ -695,15 +695,15 @@ img.ug-sepia-effect{
}
.ug-thumb-wrapper.ug-tile .ug-tile-icon.ug-icon-link{
background-image:url('../images/icon-link32.png');
background-image:url('../../gallery/images/icon-link32.png');
}
.ug-thumb-wrapper.ug-tile .ug-tile-icon.ug-icon-zoom{
background-image:url('../images/icon-zoom32.png');
background-image:url('../../gallery/images/icon-zoom32.png');
}
.ug-thumb-wrapper.ug-tile .ug-tile-icon.ug-icon-play{
background-image:url('../images/icon-play32.png');
background-image:url('../../gallery/images/icon-play32.png');
}
.ug-thumb-wrapper.ug-tile .ug-tile-icon:hover{
@@ -805,14 +805,14 @@ img.ug-sepia-effect{
width:50px;
height:55px;
background-repeat:no-repeat;
background-image:url('../images/lightbox-arrow-left.png');
background-image:url('../../gallery/images/lightbox-arrow-left.png');
background-position:0px 0px;
z-index:3;
cursor:pointer;
}
.ug-lightbox .ug-lightbox-arrow-right{
background-image:url('../images/lightbox-arrow-right.png');
background-image:url('../../gallery/images/lightbox-arrow-right.png');
}
.ug-lightbox .ug-lightbox-button-close{
@@ -820,7 +820,7 @@ img.ug-sepia-effect{
width:36px;
height:36px;
background-repeat:no-repeat;
background-image:url('../images/lightbox-icon-close.png');
background-image:url('../../gallery/images/lightbox-icon-close.png');
background-position:0px 0px;
z-index:4;
cursor:pointer;
@@ -830,7 +830,7 @@ img.ug-sepia-effect{
.ug-lightbox-compact .ug-lightbox-button-close{
width:45px;
height:41px;
background-image:url('../images/lightbox-icon-close-compact2.png');
background-image:url('../../gallery/images/lightbox-icon-close-compact2.png');
}
@@ -14,7 +14,7 @@
.ug-theme-default .ug-default-button-fullscreen{
position:absolute;
background-image:url('images/button_fullscreen.png');
background-image:url('../../gallery/themes/default/images/button_fullscreen.png');
width:53px;
height:50px;
cursor:pointer;
@@ -39,7 +39,7 @@
.ug-theme-default .ug-default-button-fullscreen-single{
position:absolute;
background-image:url('images/button_fullscreen_single.png');
background-image:url('../../gallery/themes/default/images/button_fullscreen_single.png');
width:52px;
height:50px;
cursor:pointer;
@@ -64,7 +64,7 @@
.ug-theme-default .ug-default-button-play{
position:absolute;
background-image:url('images/button_playpause.png');
background-image:url('../../gallery/themes/default/images/button_playpause.png');
width:51px;
height:50px;
cursor:pointer;
@@ -88,7 +88,7 @@
.ug-theme-default .ug-default-button-play-single{
position:absolute;
background-image:url('images/button_playpause_single.png');
background-image:url('../../gallery/themes/default/images/button_playpause_single.png');
width:50px;
height:50px;
cursor:pointer;
@@ -136,7 +136,7 @@
width:7px;
height:7px;
background-repeat:no-repeat;
background-image:url('images/arrow_down_up.png');
background-image:url('../../gallery/themes/default/images/arrow_down_up.png');
background-position: 0px 0px;
z-index:2;
}
-37
View File
@@ -12,40 +12,3 @@
<div id="gallery" style="display:none;">
</div>
</div>
%= stylesheet '/gallery/css/unite-gallery.css'
%= stylesheet '/gallery/themes/default/ug-theme-default.css'
%= javascript '/gallery/js/unitegallery.js'
%= javascript '/gallery/themes/tiles/ug-theme-tiles.js'
%= javascript '/js/jszip.min.js'
%= javascript '/js/FileSaver.min.js'
%= javascript begin
$(document).ready(function() {
var absUrl = '<%= url_for('/') %>';
var key = window.location.hash.substring(1); // Get key
// First, strip everything after the equal sign (=) which signals end of base64 string.
i = key.indexOf('='); if (i>-1) { key = key.substring(0,i+1); }
// If the equal sign was not present, some parameters may remain:
i = key.indexOf('&'); if (i>-1) { key = key.substring(0,i); }
var keys = key.split(',');
$('#download-all').attr('href', $('#download-all').attr('href')+keys.join('&i='));
var items = [];
keys.forEach(function(element, index, array) {
if (!element.match('xcf')) {
$('#gallery').append(
[
'<img src="', absUrl+element, '" data-image="', absUrl+element, '" data-description="" alt="">'
].join('')
);
}
});
var api = $("#gallery").unitegallery({
gallery_theme: "tiles",
tiles_max_columns: 4,
lightbox_overlay_color: "#DDD"
});
});
% end
-3
View File
@@ -207,6 +207,3 @@
</form>
</div>
<!-- /D&D Zone -->
%= include 'partial/common', format => 'js'
%= include 'partial/lutim', format => 'js', d => \%d
@@ -27,6 +27,12 @@
%= asset 'about.css'
% } else {
%= asset 'index.css'
% }
% if (current_route 'gallery') {
%= asset 'gallery.css'
% }
% if (!(current_route 'about')) {
%= javascript '/js/jquery-2.1.0.min.js'
% }
</head>
<body>
@@ -67,18 +73,34 @@
<strong><%= stash('stop_upload') %></strong>
</div>
% }
<%= content %>
</div>
%= javascript begin
var manifestUrl = '<%== url_for('manifest.webapp')->to_abs() %>';
% end
% if (defined(config('piwik_img'))) {
<img src="<%== config('piwik_img') %>" style="border:0" alt="">
% }
% if (current_route 'stats') {
%= asset 'stats.js'
% } elsif (!(current_route 'about')) {
%= asset 'index.js'
% }
<%= content %>
</div>
% if (defined(config('piwik_img'))) {
<img src="<%== config('piwik_img') %>" style="border:0" alt="" />
% if (current_route 'index') {
%= javascript '/partial/common.js'
%= javascript '/partial/lutim.js'
% }
% if (current_route 'gallery') {
%= javascript '/gallery/js/unitegallery.js'
%= javascript '/gallery/themes/tiles/ug-theme-tiles.js'
%= javascript '/js/jszip.min.js'
%= javascript '/js/FileSaver.min.js'
%= javascript '/partial/gallery.js'
% }
% if (current_route 'myfiles') {
%= javascript '/partial/common.js'
%= javascript '/js/moment-with-locales.min.js'
%= javascript '/partial/myfiles.js'
% }
</body>
</html>
-65
View File
@@ -62,68 +62,3 @@
</div>
<%= link_to url_for('/') => ( class => "btn btn-primary btn-lg" ) => begin %><%= l('Back to homepage') %><% end%>
%= include 'partial/common', format => 'js'
%= javascript begin
function onCheck(e, short, ext) {
if (e.is(':checked')) {
addToShortHash(short+'.'+ext);
addToZipHash(short);
} else {
rmFromShortHash(short+'.'+ext);
rmFromZipHash(short);
}
}
function populateFilesTable() {
var files = JSON.parse(localStorage.getItem('images'));
files.reverse();
files.forEach(function(element, index, array) {
var real_short = element.real_short;
var vlink = link(element.short+'.'+element.ext, '');
var del_view = (element.del_at_view) ? '<span class="icon icon-ok"></span>' : '<span class="icon icon-cancel"></span>';
var dlink = link(real_short, 'dl', element.token, false, true);
var limit = (element.limit === 0) ? '<%= l('No limit') %>' : moment.unix(element.limit * 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 id="alert-',real_short,'">',
'<td><span class="checkbox"><label><input type="checkbox" onChange="onCheck($(this), \'', element.short, '\', \'', element.ext, '\');"><label></span></td>',
'<td>', element.filename.replace(/</g, '&lt;').replace(/>/g, '&gt;'), '</td>',
'<td><a href="',vlink,'">',vlink,'</a></td>',
'<td id="count-',real_short,'" class="text-center"></td>',
'<td class="text-center">', del_view, '</td>',
'<td>', created_at, '</td>',
'<td>', limit, '</td>',
'<td><a id="del-',real_short,'" data-short="',real_short,'" data-token="',element.token,'" href="#">',dlink,'</a></td>',
'</tr>'
].join('');
$('#myfiles').append(tr);
$('#del-'+real_short).on('click', delImage);
$.ajax({
url : '<%== url_for('counter') %>',
type : 'POST',
data : {
'short': real_short,
'token': element.token
},
success: function(data) {
if (data.success) {
if (data.enabled) {
$('#count-'+real_short).text(data.counter);
} else {
delItem(real_short);
$('#alert-'+real_short).remove();
}
} else {
alert(data.msg);
}
},
error: function() {
alert(element.filename+'<%= l(': Error while trying to get the counter.') %>');
}
});
});
}
% end
%= javascript '/js/moment-with-locales.min.js'
+142 -144
View File
@@ -1,161 +1,159 @@
% # vim:set sw=4 ts=4 sts=4 ft=javascript expandtab:
%= javascript begin
window.gallery_url = '<%= url_for('gallery')->to_abs %>#';
window.zip_url = '<%= url_for('zip')->to_abs %>?i=';
window.short_hash = {};
window.zip_hash = {};
function addToShortHash(short) {
window.short_hash[short] = 1;
console.debug(window.short_hash);
if (Object.keys(window.short_hash).length > 0) {
$('#gallery-url').removeClass('hidden');
$('#gallery-url-input').val(window.gallery_url+Object.keys(window.short_hash).join(','));
$('#gallery-url-link').attr('href', window.gallery_url+Object.keys(window.short_hash).join(','));
}
}
function rmFromShortHash(short) {
delete window.short_hash[short];
window.gallery_url = '<%= url_for('gallery')->to_abs %>#';
window.zip_url = '<%= url_for('zip')->to_abs %>?i=';
window.short_hash = {};
window.zip_hash = {};
function addToShortHash(short) {
window.short_hash[short] = 1;
console.debug(window.short_hash);
if (Object.keys(window.short_hash).length > 0) {
$('#gallery-url').removeClass('hidden');
$('#gallery-url-input').val(window.gallery_url+Object.keys(window.short_hash).join(','));
$('#gallery-url-link').attr('href', window.gallery_url+Object.keys(window.short_hash).join(','));
if (Object.keys(window.short_hash).length === 0) {
$('#gallery-url').addClass('hidden');
}
}
function addToZipHash(short) {
window.zip_hash[short] = 1;
if (Object.keys(window.zip_hash).length > 0) {
$('#zip-url').removeClass('hidden');
$('#zip-url-input').val(window.zip_url+Object.keys(window.zip_hash).join('&i='));
$('#zip-url-link').attr('href', window.zip_url+Object.keys(window.zip_hash).join('&i='));
}
}
function rmFromShortHash(short) {
delete window.short_hash[short];
$('#gallery-url-input').val(window.gallery_url+Object.keys(window.short_hash).join(','));
$('#gallery-url-link').attr('href', window.gallery_url+Object.keys(window.short_hash).join(','));
if (Object.keys(window.short_hash).length === 0) {
$('#gallery-url').addClass('hidden');
}
function rmFromZipHash(short) {
delete window.zip_hash[short];
}
function addToZipHash(short) {
window.zip_hash[short] = 1;
if (Object.keys(window.zip_hash).length > 0) {
$('#zip-url').removeClass('hidden');
$('#zip-url-input').val(window.zip_url+Object.keys(window.zip_hash).join('&i='));
$('#zip-url-link').attr('href', window.zip_url+Object.keys(window.zip_hash).join('&i='));
if (Object.keys(window.zip_hash).length === 0) {
$('#zip-url').addClass('hidden');
}
}
function rmFromZipHash(short) {
delete window.zip_hash[short];
$('#zip-url-input').val(window.zip_url+Object.keys(window.zip_hash).join('&i='));
$('#zip-url-link').attr('href', window.zip_url+Object.keys(window.zip_hash).join('&i='));
if (Object.keys(window.zip_hash).length === 0) {
$('#zip-url').addClass('hidden');
}
}
/* Stolen from https://github.com/mozilla-services/push-dev-dashboard/blob/3ad4de737380d0842f40c82301d1f748c1b20f2b/push/static/js/validation.js */
function createNode(text) {
var node = document.createElement('pre');
node.style.width = '1px';
node.style.height = '1px';
node.style.position = 'fixed';
node.style.top = '5px';
node.textContent = text;
return node;
}
function copyNode(node) {
var selection = getSelection();
selection.removeAllRanges();
var range = document.createRange();
range.selectNodeContents(node);
selection.addRange(range);
var success = document.execCommand('copy');
selection.removeAllRanges();
return success;
}
function copyText(text) {
var node = createNode(text);
document.body.appendChild(node);
var success = copyNode(node);
document.body.removeChild(node);
return success;
}
function copyInput(node) {
node.select();
var success = document.execCommand('copy');
getSelection().removeAllRanges();
return success;
}
function copyToClipboard(el) {
el = el.siblings('input');
try {
var successful = copyInput(el);
var msg = successful ? 'successful' : 'unsuccessful';
console.debug('Copying text command was ' + msg);
if (!successful) {
throw new Error('Copying text command was ' + msg);
}
} catch (err) {
prompt('<%= l('Hit Ctrl+C, then Enter to copy the short link') %>', el.val());
}
/* Stolen from https://github.com/mozilla-services/push-dev-dashboard/blob/3ad4de737380d0842f40c82301d1f748c1b20f2b/push/static/js/validation.js */
function createNode(text) {
var node = document.createElement('pre');
node.style.width = '1px';
node.style.height = '1px';
node.style.position = 'fixed';
node.style.top = '5px';
node.textContent = text;
return node;
}
}
function copyAllToClipboard() {
var text = new Array();
$('.view-link-input').each(function(index) {
text.push($(this).val());
});
function copyNode(node) {
var selection = getSelection();
selection.removeAllRanges();
var range = document.createRange();
range.selectNodeContents(node);
selection.addRange(range);
var success = document.execCommand('copy');
selection.removeAllRanges();
return success;
}
function copyText(text) {
var node = createNode(text);
document.body.appendChild(node);
var success = copyNode(node);
document.body.removeChild(node);
return success;
}
function copyInput(node) {
node.select();
var success = document.execCommand('copy');
getSelection().removeAllRanges();
return success;
}
function copyToClipboard(el) {
el = el.siblings('input');
try {
var successful = copyInput(el);
var msg = successful ? 'successful' : 'unsuccessful';
console.debug('Copying text command was ' + msg);
if (!successful) {
throw new Error('Copying text command was ' + msg);
}
} catch (err) {
prompt('<%= l('Hit Ctrl+C, then Enter to copy the short link') %>', el.val());
try {
var successful = copyText(text.join("\n"));
var msg = successful ? 'successful' : 'unsuccessful';
console.debug('Copying text command was ' + msg);
if (!successful) {
throw new Error('Copying text command was ' + msg);
}
} catch (err) {
prompt('<%= l('Hit Ctrl+C, then Enter to copy the short link') %>', text.join(" "));
}
function copyAllToClipboard() {
var text = new Array();
$('.view-link-input').each(function(index) {
text.push($(this).val());
});
try {
var successful = copyText(text.join("\n"));
var msg = successful ? 'successful' : 'unsuccessful';
console.debug('Copying text command was ' + msg);
if (!successful) {
throw new Error('Copying text command was ' + msg);
}
function delImage() {
var short = $(this).attr('data-short');
var token = $(this).attr('data-token');
$.ajax({
url: '<%= url_for('/') %>d/'+short+'/'+token,
method: 'GET',
data: {
format: 'json'
},
success: function(data) {
if (data.success) {
$('#alert-'+short).remove();
evaluateCopyAll();
delItem(short);
} else {
alert(data.msg);
}
} catch (err) {
prompt('<%= l('Hit Ctrl+C, then Enter to copy the short link') %>', text.join(" "));
},
error: function() {
},
complete: function() {
}
}
function delImage() {
var short = $(this).attr('data-short');
var token = $(this).attr('data-token');
$.ajax({
url: '<%= url_for('/') %>d/'+short+'/'+token,
method: 'GET',
data: {
format: 'json'
},
success: function(data) {
if (data.success) {
$('#alert-'+short).remove();
evaluateCopyAll();
delItem(short);
} else {
alert(data.msg);
}
},
error: function() {
},
complete: function() {
}
});
}
function link(url, dl, token, modify, only_url) {
if (token !== undefined) {
if (modify !== undefined && modify === true) {
return '<%== url_for('/m/')->to_abs() %>'+url+'/'+token;
}
var link = '<%== url_for('/')->to_abs() %>d/'+url+'/'+token;
if (only_url !== undefined && only_url === true) {
return link;
}
return [
'<label class="sr-only" for="link-del-', url, '"><%= l('Deletion link') %></label>',
'<div class="input-group input-group-sm">',
'<div class="input-group-btn">',
'<a class="btn btn-default text-danger" href="#" title="<%= l('Deletion link') %>" id="del-', url, '" data-short="', url, '" data-token="', token, '">',
'<span class="icon icon-trash"></span> ',
'</a>',
'</div>',
'<input type="text" class="form-control" id="link-del-', url, '" value="', link, '" readonly>',
'<a href="#" onClick="event.preventDefault();copyToClipboard($(this));" class="input-group-addon" title="<%= l('Copy to clipboard') %>">',
'<span class="icon icon-clipboard"></span>',
});
}
function link(url, dl, token, modify, only_url) {
if (token !== undefined) {
if (modify !== undefined && modify === true) {
return '<%== url_for('/m/')->to_abs() %>'+url+'/'+token;
}
var link = '<%== url_for('/')->to_abs() %>d/'+url+'/'+token;
if (only_url !== undefined && only_url === true) {
return link;
}
return [
'<label class="sr-only" for="link-del-', url, '"><%= l('Deletion link') %></label>',
'<div class="input-group input-group-sm">',
'<div class="input-group-btn">',
'<a class="btn btn-default text-danger" href="#" title="<%= l('Deletion link') %>" id="del-', url, '" data-short="', url, '" data-token="', token, '">',
'<span class="icon icon-trash"></span> ',
'</a>',
'</div>'
].join('');
} else if (dl !== '') {
url = url+'?'+dl;
}
return '<%== url_for('/')->to_abs() %>'+url;
'</div>',
'<input type="text" class="form-control" id="link-del-', url, '" value="', link, '" readonly>',
'<a href="#" onClick="event.preventDefault();copyToClipboard($(this));" class="input-group-addon" title="<%= l('Copy to clipboard') %>">',
'<span class="icon icon-clipboard"></span>',
'</a>',
'</div>'
].join('');
} else if (dl !== '') {
url = url+'?'+dl;
}
% end
return '<%== url_for('/')->to_abs() %>'+url;
}
@@ -0,0 +1,30 @@
% # vim:set sw=4 ts=4 sts=4 ft=javascript expandtab:
$(document).ready(function() {
var absUrl = '<%= url_for('/') %>';
var key = window.location.hash.substring(1); // Get key
// First, strip everything after the equal sign (=) which signals end of base64 string.
i = key.indexOf('='); if (i>-1) { key = key.substring(0,i+1); }
// If the equal sign was not present, some parameters may remain:
i = key.indexOf('&'); if (i>-1) { key = key.substring(0,i); }
var keys = key.split(',');
$('#download-all').attr('href', $('#download-all').attr('href')+keys.join('&i='));
var items = [];
keys.forEach(function(element, index, array) {
if (!element.match('xcf')) {
$('#gallery').append(
[
'<img src="', absUrl+element, '" data-image="', absUrl+element, '" data-description="" alt="">'
].join('')
);
}
});
var api = $("#gallery").unitegallery({
gallery_theme: "tiles",
tiles_max_columns: 4,
lightbox_overlay_color: "#DDD"
});
});
+409 -411
View File
@@ -1,470 +1,468 @@
% # vim:set sw=4 ts=4 sts=4 ft=javascript expandtab:
%= javascript begin
function selectInput() {
$(this).select();
function selectInput() {
$(this).select();
}
function cleanName(name, empty) {
if (empty !== undefined && empty !== null && empty) {
return name.replace(/&(l|g)t;/g, '').replace(/"/g, '\'');
} else {
return name.replace(/</g, '&lt;').replace(/>/g, '&gt;');
}
function cleanName(name, empty) {
if (empty !== undefined && empty !== null && empty) {
return name.replace(/&(l|g)t;/g, '').replace(/"/g, '\'');
} else {
return name.replace(/</g, '&lt;').replace(/>/g, '&gt;');
}
}
function tw_url(url) {
var btn = [
'<a title="<%= l('Tweet it!') %>" target="_blank" href="https://twitter.com/share?url=<%== url_for('/')->to_abs() %>', url, '?t" class="btn btn-default">',
'<span class="icon icon-twitter"></span>',
}
function tw_url(url) {
var btn = [
'<a title="<%= l('Tweet it!') %>" target="_blank" href="https://twitter.com/share?url=<%== url_for('/')->to_abs() %>', url, '?t" class="btn btn-default">',
'<span class="icon icon-twitter"></span>',
'</a>'
].join('');
if (navigator.mozSetMessageHandler !== undefined) {
btn = btn+[
'<a title="<%= l('Share it!') %>" target="_blank" href="" onclick="share(\'<%== url_for('/')->to_abs() %>', url, '?t\');return false;">',
'<span class="icon icon-share"></span>',
'</a>'
].join('');
if (navigator.mozSetMessageHandler !== undefined) {
btn = btn+[
'<a title="<%= l('Share it!') %>" target="_blank" href="" onclick="share(\'<%== url_for('/')->to_abs() %>', url, '?t\');return false;">',
'<span class="icon icon-share"></span>',
'</a>'
].join('');
}
return btn
}
function modify(url, short) {
var limit = $('#day-'+short).val();
var del_at_view = ($('#first-view-'+short).prop('checked')) ? 1 : 0;
$.ajax({
url : url,
type : 'POST',
data : {
'image_url' : '<%== url_for('/')->to_abs() %>'+short,
'format' : 'json',
'delete-day' : limit,
'first-view' : del_at_view
},
success: function(data) {
updateItem(short, limit, del_at_view);
alert(data.msg);
},
error: function() {
alert('<%= l('Error while trying to modify the image.') %>');
}
return btn
}
function modify(url, short) {
var limit = $('#day-'+short).val();
var del_at_view = ($('#first-view-'+short).prop('checked')) ? 1 : 0;
$.ajax({
url : url,
type : 'POST',
data : {
'image_url' : '<%== url_for('/')->to_abs() %>'+short,
'format' : 'json',
'delete-day' : limit,
'first-view' : del_at_view
},
success: function(data) {
updateItem(short, limit, del_at_view);
alert(data.msg);
},
error: function() {
alert('<%= l('Error while trying to modify the image.') %>');
}
});
}
});
}
function buildMessage(success, msg) {
if(success) {
var s_url = link([msg.short, '.', msg.ext].join(''), '');
var thumb = (msg.thumb !== null) ? [
'<div class="col-sm-1">',
'<a href="', s_url, '" target="_blank">',
'<img class="thumbnail img-responsive" alt="', cleanName(msg.filename, true), ' thumbnail" src="', msg.thumb, '">',
'</a>',
'</div>'
].join('') : ''
return [
'<div class="alert alert-success" id="alert-', msg.real_short, '">',
'<button type="button" class="close" data-dismiss="alert" aria-hidden="true" onclick="rmFromShortHash(\'', msg.short, '.', msg.ext, '\');rmFromZipHash(\'', msg.short, '\');">&times;</button>',
'<div class="row">', thumb,
'<div class="col-sm-11">',
'<h4>',
'<a href="', s_url, '" target="_blank">',
msg.filename,
'</a>',
'</h4>',
'<form class="form">',
'<div class="form-group">',
'<label class="sr-only" for="view', msg.real_short, '"><%= l('View link') %></label>',
'<div class="input-group input-group-sm col-sm-6">',
'<div class="input-group-btn adjust-addon">',
'<a href="', s_url, '" target="_blank" class="btn btn-default">',
'<span class="icon icon-eye" title=" <%= l('View link') %>"></span>',
'</a>',
'</div>',
'<input type="text" class="form-control view-link-input" id="view', msg.real_short, '" value="', s_url, '" readonly>',
'<a href="#" onClick="event.preventDefault();copyToClipboard($(this));" class="input-group-addon" title="<%= l('Copy to clipboard') %>">',
'<span class="icon icon-clipboard"></span>',
function buildMessage(success, msg) {
if(success) {
var s_url = link([msg.short, '.', msg.ext].join(''), '');
var thumb = (msg.thumb !== null) ? [
'<div class="col-sm-1">',
'<a href="', s_url, '" target="_blank">',
'<img class="thumbnail img-responsive" alt="', cleanName(msg.filename, true), ' thumbnail" src="', msg.thumb, '">',
'</a>',
'</div>'
].join('') : ''
return [
'<div class="alert alert-success" id="alert-', msg.real_short, '">',
'<button type="button" class="close" data-dismiss="alert" aria-hidden="true" onclick="rmFromShortHash(\'', msg.short, '.', msg.ext, '\');rmFromZipHash(\'', msg.short, '\');">&times;</button>',
'<div class="row">', thumb,
'<div class="col-sm-11">',
'<h4>',
'<a href="', s_url, '" target="_blank">',
msg.filename,
'</a>',
'</h4>',
'<form class="form">',
'<div class="form-group">',
'<label class="sr-only" for="view', msg.real_short, '"><%= l('View link') %></label>',
'<div class="input-group input-group-sm col-sm-6">',
'<div class="input-group-btn adjust-addon">',
'<a href="', s_url, '" target="_blank" class="btn btn-default">',
'<span class="icon icon-eye" title=" <%= l('View link') %>"></span>',
'</a>',
'</div>',
'<input type="text" class="form-control view-link-input" id="view', msg.real_short, '" value="', s_url, '" readonly>',
'<a href="#" onClick="event.preventDefault();copyToClipboard($(this));" class="input-group-addon" title="<%= l('Copy to clipboard') %>">',
'<span class="icon icon-clipboard"></span>',
'</a>',
'</div>',
'<div class="form-group">',
'<label class="sr-only" for="markdown', msg.real_short, '"><%= l('Markdown syntax') %></label>',
'<div class="input-group input-group-sm col-sm-6">',
'<div class="input-group-addon adjust-addon">',
'<span class="markdown-mark-solid" title="<%= l('Markdown syntax') %>"></span>',
'</div>',
'<input type="text" class="form-control" id="markdown', msg.real_short, '" value="![](', link(msg.short, ''), ')" readonly>',
'<a href="#" onClick="event.preventDefault();copyToClipboard($(this));" class="input-group-addon" title="<%= l('Copy to clipboard') %>">',
'<span class="icon icon-clipboard"></span>',
'</div>',
'<div class="form-group">',
'<label class="sr-only" for="markdown', msg.real_short, '"><%= l('Markdown syntax') %></label>',
'<div class="input-group input-group-sm col-sm-6">',
'<div class="input-group-addon adjust-addon">',
'<span class="markdown-mark-solid" title="<%= l('Markdown syntax') %>"></span>',
'</div>',
'<input type="text" class="form-control" id="markdown', msg.real_short, '" value="![](', link(msg.short, ''), ')" readonly>',
'<a href="#" onClick="event.preventDefault();copyToClipboard($(this));" class="input-group-addon" title="<%= l('Copy to clipboard') %>">',
'<span class="icon icon-clipboard"></span>',
'</a>',
'</div>',
'</div>',
'<div class="form-group">',
'<label class="sr-only" for="download', msg.real_short, '"><%= l('Download link') %></label>',
'<div class="input-group input-group-sm col-sm-6">',
'<div class="input-group-btn adjust-addon">',
'<a href="', link(msg.short, 'dl'), '" class="btn btn-default">',
'<span class="icon icon-download" title="<%= l('Download link') %>"></span>',
'</a>',
'</div>',
'<input type="text" class="form-control" id="download', msg.real_short, '" value="', link(msg.short, 'dl'), '" readonly>',
'<a href="#" onClick="event.preventDefault();copyToClipboard($(this));" class="input-group-addon" title="<%= l('Copy to clipboard') %>">',
'<span class="icon icon-clipboard"></span>',
'</a>',
'</div>',
'<div class="form-group">',
'<label class="sr-only" for="download', msg.real_short, '"><%= l('Download link') %></label>',
'<div class="input-group input-group-sm col-sm-6">',
'<div class="input-group-btn adjust-addon">',
'<a href="', link(msg.short, 'dl'), '" class="btn btn-default">',
'<span class="icon icon-download" title="<%= l('Download link') %>"></span>',
'</a>',
'</div>',
'<input type="text" class="form-control" id="download', msg.real_short, '" value="', link(msg.short, 'dl'), '" readonly>',
'<a href="#" onClick="event.preventDefault();copyToClipboard($(this));" class="input-group-addon" title="<%= l('Copy to clipboard') %>">',
'<span class="icon icon-clipboard"></span>',
'</div>',
'<div class="form-group">',
'<label class="sr-only" for="share', msg.real_short, '"><%= l('Link for share on social networks') %></label>',
'<div class="input-group input-group-sm col-sm-6">',
'<div class="input-group-btn adjust-addon">',
'<a href="', link(msg.short, 't'), '" target="_blank" class="btn btn-default">',
'<span class="icon icon-share" title="<%= l('Link for share on social networks') %>"></span>',
'</a>',
tw_url(msg.short),
'</div>',
'<input type="text" class="form-control" id="share', msg.real_short, '" value="', link(msg.short, 't'), '" readonly>',
'<a href="#" onClick="event.preventDefault();copyToClipboard($(this));" class="input-group-addon" title="<%= l('Copy to clipboard') %>">',
'<span class="icon icon-clipboard"></span>',
'</a>',
'</div>',
'<div class="form-group">',
'<label class="sr-only" for="share', msg.real_short, '"><%= l('Link for share on social networks') %></label>',
'<div class="input-group input-group-sm col-sm-6">',
'<div class="input-group-btn adjust-addon">',
'<a href="', link(msg.short, 't'), '" target="_blank" class="btn btn-default">',
'<span class="icon icon-share" title="<%= l('Link for share on social networks') %>"></span>',
'</a>',
tw_url(msg.short),
'</div>',
'<input type="text" class="form-control" id="share', msg.real_short, '" value="', link(msg.short, 't'), '" readonly>',
'<a href="#" onClick="event.preventDefault();copyToClipboard($(this));" class="input-group-addon" title="<%= l('Copy to clipboard') %>">',
'<span class="icon icon-clipboard"></span>',
'</a>',
'</div>',
'</div>',
'<div class="form-group">',
'<div class="input-group col-sm-6 col-xs-12">',
'<span class="form-control-static">', link(msg.real_short, '', msg.token), '</span>',
'</div>',
'<div class="form-group">',
'<div class="input-group col-sm-6 col-xs-12">',
'<span class="form-control-static">', link(msg.real_short, '', msg.token), '</span>',
'</div>',
'</div>',
'</form>',
'</div>',
'</div>',
'</form>',
'</div>',
'<div class="row">',
'<form class="form col-sm-11 col-sm-offset-1" role="form" method="POST" action="', link(msg.real_short, '', msg.token, true), '">',
'<div class="form-group form-inline">',
'<select id="day-', msg.real_short, '" name="delete-day" class="form-control">',
'</div>',
'<div class="row">',
'<form class="form col-sm-11 col-sm-offset-1" role="form" method="POST" action="', link(msg.real_short, '', msg.token, true), '">',
'<div class="form-group form-inline">',
'<select id="day-', msg.real_short, '" name="delete-day" class="form-control">',
% for my $delay (qw/0 1 7 30 365/) {
% my $text = ($delay == 7 || $delay == 30) ? l('%1 days', $delay) : $d->{'delay_'.$delay};
% if (config('max_delay')) {
% if ($delay) {
% if ($delay < config('max_delay')) {
'<option value="<%= $delay %>" <%== is_selected($delay) %>><%= $text %></option>',
'<option value="<%= $delay %>" <%== is_selected($delay) %>><%= $text %></option>',
% } elsif ($delay == config('max_delay')) {
'<option value="<%= $delay %>" <%== is_selected($delay) %>><%= $text %></option>',
'<option value="<%= $delay %>" <%== is_selected($delay) %>><%= $text %></option>',
% last;
% } else {
% my $text = ($delay == 1) ? l('24 hours') : l('%1 days', $delay);
'<option value="<%= config('max_delay') %>" <%== is_selected(config('max_delay')) %>><%= l('%1 days', config('max_delay')) %></option>',
'<option value="<%= config('max_delay') %>" <%== is_selected(config('max_delay')) %>><%= l('%1 days', config('max_delay')) %></option>',
% last;
% }
% }
% } else {
'<option value="<%= $delay %>" <%== is_selected($delay) %>><%= $text %></option>',
'<option value="<%= $delay %>" <%== is_selected($delay) %>><%= $text %></option>',
% }
% }
'</select>&nbsp;',
'<div class="checkbox">',
'<label>',
'<input id="first-view-', msg.real_short, '" type="checkbox" name="first-view"> <%= l('Delete at first view?') %>',
'</label>',
'</div>&nbsp;',
'<a href="#" onclick="modify(\'', link(msg.real_short, '', msg.token, true), '\', \'', msg.real_short, '\');return false;" class="btn btn-sm btn-default btn-primary">',
'<%= l('Let\'s go!') %>',
'</a>',
'</div>',
'</form>',
'</div>',
'</div>'
].join('');
} else {
return [
'<div class="alert alert-danger">',
'<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>',
'<strong><%= l('Something bad happened') %></strong><br>',
msg.filename,
'<br>',
msg.msg,
'</div>'
].join('');
}
}
function bindddz(firstview, deleteday) {
$('#drag-and-drop-zone').dmUploader({
url: '<%== url_for('/') %>',
dataType: 'json',
allowedTypes: 'image/*',
maxFileSize: <%= $max_file_size %>,
onNewFile: function(id, file){
$('.messages').append([
'<div id="', id, '-div">',
cleanName(file.name), '<br>',
'<div class="progress">',
'<div id="', id, '"class="progress-bar progress-striped active" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">',
'<span id="', id, '-text" class="pull-left" style="padding-left: 10px;"> 0%</span>',
'</div>',
'</select>&nbsp;',
'<div class="checkbox">',
'<label>',
'<input id="first-view-', msg.real_short, '" type="checkbox" name="first-view"> <%= l('Delete at first view?') %>',
'</label>',
'</div>&nbsp;',
'<a href="#" onclick="modify(\'', link(msg.real_short, '', msg.token, true), '\', \'', msg.real_short, '\');return false;" class="btn btn-sm btn-default btn-primary">',
'<%= l('Let\'s go!') %>',
'</a>',
'</div>',
'</div>'
].join(''));
},
onUploadProgress: function(id, percent){
var percentStr = ' '+percent+'%';
$('#'+id).prop('aria-valuenow', percent);
$('#'+id).prop('style', 'width: '+percent+'%;');
$('#'+id+'-text').html(percentStr);
},
onUploadSuccess: function(id, data){
data.msg.filename = cleanName(data.msg.filename);
$('#'+id+'-div').remove();
if ($('#copy-all').length === 0 && data.success) {
$('.messages').prepend(
[
'<div class="col-xs-12 col-sm-11 col-sm-offset-1">',
'<a id="copy-all" href="#" class="btn btn-info" onClick="event.preventDefault();copyAllToClipboard();">',
'<%= l('Copy all view links to clipboard') %>',
'</a>',
'</div>'
].join('')
);
}
$('.messages').append(buildMessage(data.success, data.msg));
$('#del-'+data.msg.real_short).on('click', function() {
rmFromShortHash(data.msg.short+'.'+data.msg.ext)
rmFromZipHash(data.msg.short);
});
$('#del-'+data.msg.real_short).on('click', delImage);
if (data.success) {
addToShortHash(data.msg.short+'.'+data.msg.ext);
addToZipHash(data.msg.short);
$('.close').unbind('click', evaluateCopyAll);
$('.close').on('click', evaluateCopyAll);
$('input[type=\'text\']').unbind("click", selectInput);
$('input[type=\'text\']').on("click", selectInput);
addItem(data.msg);
}
},
onUploadError: function(id, message){
$('.messages').append(buildMessage(false, ''));
},
onFileSizeError: function(file){
$('.messages').append(buildMessage(false, { filename: file.name, msg: '<%= l('The file exceed the size limit (%1)', $max_file_size) %>'}));
}
});
}
function upload_url() {
var val = $('#lutim-file-url').val();
if (val !== undefined && val !== '') {
$('#lutim-file-url').prop('disabled', 'disabled');
$('.hidden-spin').css('display', 'block');
$.ajax({
url : '<%== url_for('/') %>',
type : 'POST',
data : {
'lutim-file-url' : val,
'format' : 'json',
'first-view' : ($('#first-view').prop('checked')) ? 1 : 0,
'crypt' : ($('#crypt').prop('checked')) ? 1 : 0,
'delete-day' : $('#delete-day').val()
},
success: function(data) {
data.msg.filename = cleanName(data.msg.filename);
$('.messages').append(buildMessage(data.success, data.msg));
if (data.success) {
if ($('#copy-all').length === 0) {
$('.messages').prepend([
'<div class="col-xs-12 col-sm-11 col-sm-offset-1">',
'<a id="copy-all" href="#" class="btn btn-info" onClick="event.preventDefault();copyAllToClipboard();">',
'<%= l('Copy all view links to clipboard') %>',
'</a>',
'</div>'
].join(''));
}
$('#lutim-file-url').val('');
addToShortHash(data.msg.short+'.'+data.msg.ext);
addToZipHash(data.msg.short);
$('.close').unbind('click', evaluateCopyAll);
$('.close').on('click', evaluateCopyAll);
addItem(data.msg);
}
},
error: function() {
$('.messages').append(buildMessage(false, ''));
},
complete: function() {
$('#lutim-file-url').prop('disabled', '');
$('.hidden-spin').css('display', 'none');
}
});
}
}
function fileUpload(file) {
var fd = new FormData();
fd.append('file', file);
fd.append('format', 'json');
fd.append('first-view', ($('#first-view').prop('checked')) ? 1 : 0);
fd.append('crypt', ($('#crypt').prop('checked')) ? 1 : 0);
fd.append('delete-day', ($('#delete-day').val()));
$('.messages').append([
'<div id="1-div">', cleanName(file.name), '<br>',
'<div class="progress">',
'<div id="1"class="progress-bar progress-striped active" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">',
'<span id="1-text" class="pull-left" style="padding-left: 10px;"> 0%</span>',
'</div>',
'</form>',
'</div>',
'</div>'
].join(''));
// Ajax Submit
$.ajax({
url: '<%== url_for('/') %>',
type: 'POST',
dataType: 'json',
data: fd,
cache: false,
contentType: false,
processData: false,
forceSync: false,
xhr: function(){
var xhrobj = $.ajaxSettings.xhr();
if(xhrobj.upload){
xhrobj.upload.addEventListener('progress', function(event) {
var percent = 0;
var position = event.loaded || event.position;
var total = event.total || e.totalSize;
if(event.lengthComputable){
percent = Math.ceil(position / total * 100);
}
var percentStr = ' '+percent+'%';
$('#1').prop('aria-valuenow', percent);
$('#1').prop('style', 'width: '+percent+'%;');
$('#1-text').html(percentStr);
}, false);
}
return xhrobj;
},
success: function (data, message, xhr){
$('#1-div').remove();
if ($('#copy-all').length === 0 && data.success) {
$('.messages').prepend([
].join('');
} else {
return [
'<div class="alert alert-danger">',
'<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>',
'<strong><%= l('Something bad happened') %></strong><br>',
msg.filename,
'<br>',
msg.msg,
'</div>'
].join('');
}
}
function bindddz(firstview, deleteday) {
$('#drag-and-drop-zone').dmUploader({
url: '<%== url_for('/') %>',
dataType: 'json',
allowedTypes: 'image/*',
maxFileSize: <%= config('max_file_size') %>,
onNewFile: function(id, file){
$('.messages').append([
'<div id="', id, '-div">',
cleanName(file.name), '<br>',
'<div class="progress">',
'<div id="', id, '"class="progress-bar progress-striped active" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">',
'<span id="', id, '-text" class="pull-left" style="padding-left: 10px;"> 0%</span>',
'</div>',
'</div>',
'</div>'
].join(''));
},
onUploadProgress: function(id, percent){
var percentStr = ' '+percent+'%';
$('#'+id).prop('aria-valuenow', percent);
$('#'+id).prop('style', 'width: '+percent+'%;');
$('#'+id+'-text').html(percentStr);
},
onUploadSuccess: function(id, data){
data.msg.filename = cleanName(data.msg.filename);
$('#'+id+'-div').remove();
if ($('#copy-all').length === 0 && data.success) {
$('.messages').prepend(
[
'<div class="col-xs-12 col-sm-11 col-sm-offset-1">',
'<a id="copy-all" href="#" class="btn btn-info" onClick="event.preventDefault();copyAllToClipboard();">',
'<%= l('Copy all view links to clipboard') %>',
'</a>',
'</div>'
].join(''));
}
].join('')
);
}
$('.messages').append(buildMessage(data.success, data.msg));
$('#del-'+data.msg.real_short).on('click', function() {
rmFromShortHash(data.msg.short+'.'+data.msg.ext)
rmFromZipHash(data.msg.short);
});
$('#del-'+data.msg.real_short).on('click', delImage);
if (data.success) {
addToShortHash(data.msg.short+'.'+data.msg.ext);
addToZipHash(data.msg.short);
$('.close').unbind('click', evaluateCopyAll);
$('.close').on('click', evaluateCopyAll);
$('input[type=\'text\']').unbind("click", selectInput);
$('input[type=\'text\']').on("click", selectInput);
addItem(data.msg);
}
},
onUploadError: function(id, message){
$('.messages').append(buildMessage(false, ''));
},
onFileSizeError: function(file){
$('.messages').append(buildMessage(false, { filename: file.name, msg: '<%= l('The file exceed the size limit (%1)', config('max_file_size')) %>'}));
}
});
}
function upload_url() {
var val = $('#lutim-file-url').val();
if (val !== undefined && val !== '') {
$('#lutim-file-url').prop('disabled', 'disabled');
$('.hidden-spin').css('display', 'block');
$.ajax({
url : '<%== url_for('/') %>',
type : 'POST',
data : {
'lutim-file-url' : val,
'format' : 'json',
'first-view' : ($('#first-view').prop('checked')) ? 1 : 0,
'crypt' : ($('#crypt').prop('checked')) ? 1 : 0,
'delete-day' : $('#delete-day').val()
},
success: function(data) {
data.msg.filename = cleanName(data.msg.filename);
$('.messages').append(buildMessage(data.success, data.msg));
if (data.success) {
if ($('#copy-all').length === 0) {
$('.messages').prepend([
'<div class="col-xs-12 col-sm-11 col-sm-offset-1">',
'<a id="copy-all" href="#" class="btn btn-info" onClick="event.preventDefault();copyAllToClipboard();">',
'<%= l('Copy all view links to clipboard') %>',
'</a>',
'</div>'
].join(''));
}
$('#lutim-file-url').val('');
addToShortHash(data.msg.short+'.'+data.msg.ext);
addToZipHash(data.msg.short);
$('.close').unbind('click', evaluateCopyAll);
$('.close').on('click', evaluateCopyAll);
addItem(data.msg);
}
},
error: function (xhr, status, errMsg){
error: function() {
$('.messages').append(buildMessage(false, ''));
},
complete: function() {
$('#lutim-file-url').prop('disabled', '');
$('.hidden-spin').css('display', 'none');
}
});
}
}
function fileUpload(file) {
var fd = new FormData();
fd.append('file', file);
fd.append('format', 'json');
fd.append('first-view', ($('#first-view').prop('checked')) ? 1 : 0);
fd.append('crypt', ($('#crypt').prop('checked')) ? 1 : 0);
fd.append('delete-day', ($('#delete-day').val()));
$('.messages').append([
'<div id="1-div">', cleanName(file.name), '<br>',
'<div class="progress">',
'<div id="1"class="progress-bar progress-striped active" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">',
'<span id="1-text" class="pull-left" style="padding-left: 10px;"> 0%</span>',
'</div>',
'</div>',
'</div>'
].join(''));
// Ajax Submit
$.ajax({
url: '<%== url_for('/') %>',
type: 'POST',
dataType: 'json',
data: fd,
cache: false,
contentType: false,
processData: false,
forceSync: false,
xhr: function(){
var xhrobj = $.ajaxSettings.xhr();
if(xhrobj.upload){
xhrobj.upload.addEventListener('progress', function(event) {
var percent = 0;
var position = event.loaded || event.position;
var total = event.total || e.totalSize;
if(event.lengthComputable){
percent = Math.ceil(position / total * 100);
}
var percentStr = ' '+percent+'%';
$('#1').prop('aria-valuenow', percent);
$('#1').prop('style', 'width: '+percent+'%;');
$('#1-text').html(percentStr);
}, false);
}
return xhrobj;
},
success: function (data, message, xhr){
$('#1-div').remove();
if ($('#copy-all').length === 0 && data.success) {
$('.messages').prepend([
'<div class="col-xs-12 col-sm-11 col-sm-offset-1">',
'<a id="copy-all" href="#" class="btn btn-info" onClick="event.preventDefault();copyAllToClipboard();">',
'<%= l('Copy all view links to clipboard') %>',
'</a>',
'</div>'
].join(''));
}
data.msg.filename = cleanName(data.msg.filename);
$('.messages').append(buildMessage(data.success, data.msg));
if (data.success) {
$('.close').unbind('click', evaluateCopyAll);
$('.close').on('click', evaluateCopyAll);
addItem(data.msg);
}
},
error: function (xhr, status, errMsg){
$('.messages').append(buildMessage(false, ''));
},
});
}
function initPaste() {
/*
actually FF and Chrome doesn't handle paste events the same way...
for ff we need to create a editable div and register an event to it.
When user paste, the image is "really" pasted in the div. Then, we need to iterate throught
the div childs to get images. Previsouly FF didn't have the paste event so it was esay to figure on wich browser we were.
But firefox now have a paste event so I test it...
on Chrome the file object is directlyt in the clipboard.
*/
var b = 'FF';
try {
//FF
var cbe = new ClipboardEvent('hop');
} catch(hop) {
//under webkkit Clipboard doesn't have arguments...
b = 'WK'
}
if (b === 'FF') {
var pasteDiv = document.createElement('div');
pasteDiv.addEventListener('paste', onPasteFF);
pasteDiv.setAttribute('class', 'pasteZone');
pasteDiv.setAttribute('contenteditable', true);
document.getElementsByTagName('body')[0].appendChild(pasteDiv);
pasteDiv.focus();
document.addEventListener('click', function(event) {
var t = $(event.target);
switch (t[0].nodeName.toUpperCase()) {
case 'A':
case 'BUTTON':
case 'INPUT':
case 'SELECT':
case 'SPAN':
case 'LABEL':
break;
default:
if (t[0].parentNode.nodeName.toUpperCase() !== 'SELECT') {
pasteDiv.focus();
}
}
});
} else {
document.addEventListener('paste', onPaste);
}
}
function waitforpastedata(elem, savedcontent) {
if (elem.childNodes && elem.childNodes.length > 0) {
processpaste(elem, savedcontent);
} else {
var that = {
e: elem,
s: savedcontent
};
that.callself = function () {
waitforpastedata(that.e, that.s);
}
setTimeout(that.callself, 20);
}
}
function processpaste(elem, savedcontent) {
var pasteZone = document.getElementsByClassName('pasteZone')[0];
var f = new Image();
f.onload = function(){
var canvas = document.createElement('canvas');
canvas.width = f.width;
canvas.height = f.height;
var ctx = canvas.getContext('2d');
ctx.drawImage(f, 0, 0, canvas.width, canvas.height);
canvas.toBlob(function(blob) {
var url = window.URL.createObjectURL(blob);
fileUpload(blob);
});
}
function initPaste() {
/*
actually FF and Chrome doesn't handle paste events the same way...
for ff we need to create a editable div and register an event to it.
When user paste, the image is "really" pasted in the div. Then, we need to iterate throught
the div childs to get images. Previsouly FF didn't have the paste event so it was esay to figure on wich browser we were.
But firefox now have a paste event so I test it...
f.src = pasteZone.childNodes[0].src;
on Chrome the file object is directlyt in the clipboard.
*/
var b = 'FF';
try {
//FF
var cbe = new ClipboardEvent('hop');
} catch(hop) {
//under webkkit Clipboard doesn't have arguments...
b = 'WK'
}
if (b === 'FF') {
var pasteDiv = document.createElement('div');
pasteDiv.addEventListener('paste', onPasteFF);
pasteDiv.setAttribute('class', 'pasteZone');
pasteDiv.setAttribute('contenteditable', true);
pasteZone.innerHTML = '';
}
document.getElementsByTagName('body')[0].appendChild(pasteDiv);
pasteDiv.focus();
function onPasteFF(e) {
var pasteZone = document.getElementsByClassName('pasteZone')[0];
waitforpastedata(pasteZone, 'savedcontent');
}
document.addEventListener('click', function(event) {
var t = $(event.target);
switch (t[0].nodeName.toUpperCase()) {
case 'A':
case 'BUTTON':
case 'INPUT':
case 'SELECT':
case 'SPAN':
case 'LABEL':
break;
default:
if (t[0].parentNode.nodeName.toUpperCase() !== 'SELECT') {
pasteDiv.focus();
}
}
});
function onPaste(e) {
var items = e.clipboardData.items;
for(var i = 0; i < items.length; i++) {
var item = items[i];
if (/image/.test(item.type)) {
var file = item.getAsFile();
fileUpload(file);
} else {
document.addEventListener('paste', onPaste);
//not image..
}
}
function waitforpastedata(elem, savedcontent) {
if (elem.childNodes && elem.childNodes.length > 0) {
processpaste(elem, savedcontent);
} else {
var that = {
e: elem,
s: savedcontent
};
that.callself = function () {
waitforpastedata(that.e, that.s);
}
setTimeout(that.callself, 20);
}
}
function processpaste(elem, savedcontent) {
var pasteZone = document.getElementsByClassName('pasteZone')[0];
var f = new Image();
f.onload = function(){
var canvas = document.createElement('canvas');
canvas.width = f.width;
canvas.height = f.height;
var ctx = canvas.getContext('2d');
ctx.drawImage(f, 0, 0, canvas.width, canvas.height);
canvas.toBlob(function(blob) {
var url = window.URL.createObjectURL(blob);
fileUpload(blob);
});
}
f.src = pasteZone.childNodes[0].src;
pasteZone.innerHTML = '';
}
function onPasteFF(e) {
var pasteZone = document.getElementsByClassName('pasteZone')[0];
waitforpastedata(pasteZone, 'savedcontent');
}
function onPaste(e) {
var items = e.clipboardData.items;
for(var i = 0; i < items.length; i++) {
var item = items[i];
if (/image/.test(item.type)) {
var file = item.getAsFile();
fileUpload(file);
} else {
//not image..
}
}
}
% end
}
@@ -0,0 +1,61 @@
% # vim:set sw=4 ts=4 sts=4 ft=javascript expandtab:
function onCheck(e, short, ext) {
if (e.is(':checked')) {
addToShortHash(short+'.'+ext);
addToZipHash(short);
} else {
rmFromShortHash(short+'.'+ext);
rmFromZipHash(short);
}
}
function populateFilesTable() {
var files = JSON.parse(localStorage.getItem('images'));
files.reverse();
files.forEach(function(element, index, array) {
var real_short = element.real_short;
var vlink = link(element.short+'.'+element.ext, '');
var del_view = (element.del_at_view) ? '<span class="icon icon-ok"></span>' : '<span class="icon icon-cancel"></span>';
var dlink = link(real_short, 'dl', element.token, false, true);
var limit = (element.limit === 0) ? '<%= l('No limit') %>' : moment.unix(element.limit * 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 id="alert-',real_short,'">',
'<td><span class="checkbox"><label><input type="checkbox" onChange="onCheck($(this), \'', element.short, '\', \'', element.ext, '\');"><label></span></td>',
'<td>', element.filename.replace(/</g, '&lt;').replace(/>/g, '&gt;'), '</td>',
'<td><a href="',vlink,'">',vlink,'</a></td>',
'<td id="count-',real_short,'" class="text-center"></td>',
'<td class="text-center">', del_view, '</td>',
'<td>', created_at, '</td>',
'<td>', limit, '</td>',
'<td><a id="del-',real_short,'" data-short="',real_short,'" data-token="',element.token,'" href="#">',dlink,'</a></td>',
'</tr>'
].join('');
$('#myfiles').append(tr);
$('#del-'+real_short).on('click', delImage);
$.ajax({
url : '<%== url_for('counter') %>',
type : 'POST',
data : {
'short': real_short,
'token': element.token
},
success: function(data) {
if (data.success) {
if (data.enabled) {
$('#count-'+real_short).text(data.counter);
} else {
delItem(real_short);
$('#alert-'+real_short).remove();
}
} else {
alert(data.msg);
}
},
error: function() {
alert(element.filename+'<%= l(': Error while trying to get the counter.') %>');
}
});
});
}