From 768bf6485cc73ad9b508b227fed8b3fcc3c6b65f Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 5 Aug 2013 19:40:09 +0200 Subject: Add history page with thumbnails of images Signed-off-by: Florian Pritz --- data/css/style.css | 21 +++++++++++++++++++++ data/js/script.js | 16 ++++++++++++++++ 2 files changed, 37 insertions(+) (limited to 'data') diff --git a/data/css/style.css b/data/css/style.css index 15860db83..ad956c57f 100644 --- a/data/css/style.css +++ b/data/css/style.css @@ -217,6 +217,27 @@ body { z-index: 1500; } +.popover { + word-break: break-word; + word-wrap: normal; +} + +.upload_history_thumbnails { + margin: 0 auto; + padding-bottom: 50px; +} + +.upload_history_thumbnails img.thumb, +.upload_history_thumbnails a { + width: 150px; + height: 150px; +} + +.upload_history_thumbnails a { + margin: 1px; + display: inline-block; +} + /* highlighting theme */ .hll { background-color: #ffffcc } diff --git a/data/js/script.js b/data/js/script.js index a7cf3aa54..f747941e5 100644 --- a/data/js/script.js +++ b/data/js/script.js @@ -62,6 +62,22 @@ function fixedEncodeURIComponent (str) { window.lines_wrapped = !window.lines_wrapped; }); + $('.upload_history_thumbnails a').popover({ + trigger: "hover", + placement: "bottom", + html: true, + }); + + function handle_resize() { + var div = $('.upload_history_thumbnails'); + div.width(div.parent().width() - (div.parent().width() % div.find('a').outerWidth(true))); + } + + $(window).resize(function() { + handle_resize(); + }); + handle_resize(); + // check file size before uploading if browser support html5 if (window.File && window.FileList) { function checkFileUpload(evt) { -- cgit v1.2.3-24-g4f1b