diff --git a/docs/HISTORY.txt b/docs/HISTORY.txt index 4b1611e..29242e1 100644 --- a/docs/HISTORY.txt +++ b/docs/HISTORY.txt @@ -3,6 +3,8 @@ Changelog 6.1-dev - (unreleased) ---------------------- +* Feature: Display image when javascript is disabled + [szabozo0 refs #9562] * Upgrade step: Within "Plone > Site setup > Add-ons" click on upgrade button available for eea.app.visualization * Feature: Added utilities to get and convert external URL to diff --git a/eea/app/visualization/browser/css/view.css b/eea/app/visualization/browser/css/view.css index e586a92..9f5fe02 100644 --- a/eea/app/visualization/browser/css/view.css +++ b/eea/app/visualization/browser/css/view.css @@ -81,3 +81,18 @@ ul.chart-tabs li:first-of-type a:hover { clear: both; visibility: hidden; } + +/* noscript */ +.daviz-tab-view-noscript { + display:none; +} + +.daviz-tab-view-noscript:target { + display:block; +} + +.daviz-tab-norealchart { + border:1px solid red; + color:red; + float:left; +} diff --git a/eea/app/visualization/browser/js/view.js b/eea/app/visualization/browser/js/view.js index 006178c..51f4c1a 100644 --- a/eea/app/visualization/browser/js/view.js +++ b/eea/app/visualization/browser/js/view.js @@ -44,4 +44,6 @@ jQuery(document).ready(function(){ return false; }); + jQuery(".daviz-tab-view-noscript").removeClass("daviz-tab-view-noscript"); + }); diff --git a/eea/app/visualization/views/view.py b/eea/app/visualization/views/view.py index 279ae04..df8611e 100644 --- a/eea/app/visualization/views/view.py +++ b/eea/app/visualization/views/view.py @@ -32,7 +32,9 @@ def tabs(self): {'name': self.__name__, 'title': self.label, 'css': tabname, - 'tabname': tabname + 'tabname': tabname, + 'fallback-image': self.context.absolute_url() + \ + "/++resource++" + self.__name__ + ".preview.png" }, ]