Skip to content

Commit

Permalink
Not fixed - working around to fix the details/summary issue on IE and…
Browse files Browse the repository at this point in the history
… firefox, work fine on Chrome
  • Loading branch information
duboisp committed Aug 2, 2012
1 parent 699deed commit 0412443
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build/js/css/pe-ap-ie-min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/js/css/pe-ap-min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/js/pe-ap-min.js

Large diffs are not rendered by default.

41 changes: 41 additions & 0 deletions src/js/sass/details.scss
@@ -0,0 +1,41 @@
@charset "utf-8";
/*
* Web Experience Toolkit (WET) / Boîte à outils de l'expérience Web (BOEW)
* www.tbs.gc.ca/ws-nw/wet-boew/terms / www.sct.gc.ca/ws-nw/wet-boew/conditions
*/

/* details polyfill */

/* <details> and <summary> are block level elements */
details, summary {
display: block;
}

/* Add focus styles (for keyboard accessibility) */
summary:hover, summary:focus, summary:active {
background: #ddd;
}

/* The following styles will only get applied if JavaScript is enabled and <details> is not natively supported */

/* Add the close pointer */
details.polyfill > summary:before {
content: "\25BA\a0";
}

/* Add the open pointer */
details.polyfill.open > summary:before {
content: "\25BC\a0";
}

/* The following styles are not really needed, since the jQuery script takes care of hiding/displaying the elements. */

/* Make sure summary remains visible */
details summary {
display: block; background: transparent
}

/* Apply a pointer cursor upon hover to indicate it’s a clickable element. These styles can be applied regardless of whether the fallback is needed */
summary {
cursor: pointer;
}
11 changes: 6 additions & 5 deletions src/js/workers/charts.js
Expand Up @@ -4097,7 +4097,8 @@ charts.graph2dAxis = {
setAccessiblity();

if(!parser.param.noenhancement){
var tblSrcContainer = $('<details />').appendTo(paperContainer);
var tblSrcContainer = $('<details />');
$(tblSrcContainer).appendTo(paperContainer);
var tblSrcContainerSummary = $('<summary />');
$(tblSrcContainerSummary).text(_pe.dic.get('%table-source')) // Text for the ability to show the table as a data source
.appendTo(tblSrcContainer)
Expand All @@ -4107,10 +4108,10 @@ charts.graph2dAxis = {

// Make this new details elements working

if($.fn.details) {
//if($.fn.details && !$.fn.details.support) {
// We need to run the pollyfill for this new details elements
$(tblSrcContainer).details();
}
// $(tblSrcContainer).details();
//}
}


Expand Down Expand Up @@ -4144,7 +4145,7 @@ charts.graph2dAxis = {



$(self).data().tBodySeries = parser.tBodySeries;
// $(self).data().tBodySeries = parser.tBodySeries;



Expand Down

0 comments on commit 0412443

Please sign in to comment.