diff options
| author | 2016-05-20 00:05:01 +0000 | |
|---|---|---|
| committer | 2016-05-20 00:05:01 +0000 | |
| commit | 9ad92619dc455a42c40e5b102e2fdf65c2787549 (patch) | |
| tree | 18b920957ec1bee938af16994193fa759d32cad1 | |
| parent | 73cf8224cbd97918d6407aac79a97c6ef70b9a30 (diff) | |
| parent | 486f792d4448819c47c7e18dfd4ccb40133df528 (diff) | |
Merge "fix dashboards page. the src attributes were being modified by the devsite parser, so i renamed those attributes then rename them again at runtime. bug: 28801246" into mnc-mr-docs
am: 486f792d44
* commit '486f792d4448819c47c7e18dfd4ccb40133df528':
fix dashboards page. the src attributes were being modified by the devsite parser, so i renamed those attributes then rename them again at runtime. bug: 28801246
Change-Id: Iffb768397f425b34c1e297d40c9b1077d1e7ad5d
| -rw-r--r-- | docs/html/about/dashboards/index.jd | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/docs/html/about/dashboards/index.jd b/docs/html/about/dashboards/index.jd index 227c7758f597..5990abd6ea95 100644 --- a/docs/html/about/dashboards/index.jd +++ b/docs/html/about/dashboards/index.jd @@ -384,7 +384,7 @@ $(document).ready(function(){ }); // create chart image - var $chart = $('<img style="margin-left:30px" alt="" src="' + set.chart + '" />'); + var $chart = $('<img style="margin-left:30px" alt="" data-dac-src="' + set.chart + '" />'); // stack up and insert the elements $divtable.append($table); @@ -451,9 +451,9 @@ $(document).ready(function(){ $table.append($tr); // create charts - var $sizechart = $('<img style="float:left;width:380px" alt="" src="' + var $sizechart = $('<img style="float:left;width:380px" alt="" data-dac-src="' + set.layoutchart + '" />'); - var $densitychart = $('<img style="float:left;width:380px" alt="" src="' + var $densitychart = $('<img style="float:left;width:380px" alt="" data-dac-src="' + set.densitychart + '" />'); // stack up and insert the elements @@ -461,6 +461,16 @@ $(document).ready(function(){ $("#screens-chart").append($div); }); + // TODO (akassay): Remove this. + // I replaced the src attributes in the javascript above with data-dac-src + // so the value would not be molested by the DevSite parser. So this code here + // moves that src value into a real src attribute at runtime. This should be + // removed once we either move this script out of the content body or update + // the parser to not modify src attributes in <script> tags. + $('img[data-dac-src]').each(function() { + var src = $(this).attr('data-dac-src'); + $(this).attr('src', src); + }); }); |