Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c994ef13 authored by Scott Main's avatar Scott Main Committed by android-build-merger
Browse files

Merge "fix dashboards page. the src attributes were being modified by the...

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: 486f792d am: 9ad92619 am: ccf143ea am: eaad66b6 am: 7422c51f
am: 35fbe190

* commit '35fbe190':
  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: I1b9918789a3f88e59dbb47667c96a46a058a029b
parents 31e3f5c6 35fbe190
Loading
Loading
Loading
Loading
+13 −3
Original line number Diff line number Diff line
@@ -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);
  });

});