Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Commit

Permalink
Fit select to width and add fullscreen support to the trend plot.
Browse files Browse the repository at this point in the history
  • Loading branch information
cpatrick committed Jan 15, 2016
1 parent 7eae9a9 commit 1f6729e
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/tracker/public/css/trend/trend.view.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions modules/tracker/public/js/trend/trend.view.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,19 @@ $(window).load(function () {
midas.tracker.renderChartArea(curveData, false);
});

$('a.toggleFullscreen').click(function () {
var elem = document.getElementById("chartDiv");
if (elem.requestFullscreen) {
elem.requestFullscreen();
} else if (elem.msRequestFullscreen) {
elem.msRequestFullscreen();
} else if (elem.mozRequestFullScreen) {
elem.mozRequestFullScreen();
} else if (elem.webkitRequestFullscreen) {
elem.webkitRequestFullscreen();
}
});

});

midas.tracker.trendDeleted = function (resp) {
Expand Down
9 changes: 9 additions & 0 deletions modules/tracker/public/scss/trend/trend.view.scss
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,12 @@ button.add-branchfilter {
a.removeBranchFilter {
margin-left: 10px;
}

#chartDiv:-webkit-full-screen {
width: 100%;
height: 100%;
}

select {
width:100%
}
6 changes: 6 additions & 0 deletions modules/tracker/views/trend/view.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ $this->headScript()->appendFile($this->coreWebroot.'/public/js/jquery/jqplot/jqp
<div class="toggleUnofficialIcon toHide"></div>
<span class="linkText">Hide unofficial submissions</a>
</li>
<li>
<a class="toggleFullscreen">
<img src="<?php echo $this->coreWebroot; ?>/public/images/icons/view.png"/>
Make plot fullscreen
</a>
</li>
</ul>
</div>
<div class="sideElement viewInfo">
Expand Down

0 comments on commit 1f6729e

Please sign in to comment.