diff --git a/src/pfwbged/theme/diazo_resources/static/main.css b/src/pfwbged/theme/diazo_resources/static/main.css index f20f8e8..73133a6 100644 --- a/src/pfwbged/theme/diazo_resources/static/main.css +++ b/src/pfwbged/theme/diazo_resources/static/main.css @@ -831,3 +831,17 @@ tr.row-state-finished a[href$="/edit"] { box-shadow: none; } } + +#preview-doc { + position: fixed; + bottom: 2%; + right: 2%; + width: 30%; + z-index: 54321; + box-shadow: 0 2px 2px black; + background: white; +} + +#preview-doc img { + width: 100%; +} diff --git a/src/pfwbged/theme/diazo_resources/static/main.js b/src/pfwbged/theme/diazo_resources/static/main.js index 83b7f1f..e3619a6 100644 --- a/src/pfwbged/theme/diazo_resources/static/main.js +++ b/src/pfwbged/theme/diazo_resources/static/main.js @@ -42,4 +42,17 @@ $(function() { } return false; }); + $('.ResultsTasksTable tr a').hover(function() { + $('#preview-doc').remove(); + $.getJSON($(this).attr('href') + '/@@preview', + function (data) { + $('#preview-doc').remove(); + if (data.thumbnail_url) { + $('body').append('
'); + $('#preview-doc').append(''); + } + }); + }, function() { + $('#preview-doc').remove(); + }); });