Skip to content

Instantly share code, notes, and snippets.

@gboudreau
Created June 13, 2011 13:25
Show Gist options
  • Save gboudreau/1022760 to your computer and use it in GitHub Desktop.
Save gboudreau/1022760 to your computer and use it in GitHub Desktop.
SABconnect++ new popup w graph
<html>
<head>
<link rel="stylesheet" type="text/css" href="third_party/jquery/ui-lightness/jquery-ui-1.8.13.custom.css" />
<link rel="stylesheet" type="text/css" href="css/popup.css" />
<script type="text/javascript" src="third_party/jquery/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="third_party/jquery/jquery-ui-1.8.13.custom.min.js"></script>
<script type="text/javascript" src="third_party/jquery/jquery.jqote2.min.js"></script>
<script type="text/javascript" src="third_party/fancy-settings/lib/store.js"></script>
<script type="text/javascript" src="scripts/pages/common.js"></script>
<script type="text/javascript" src="scripts/pages/popup.js"></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'DateTime');
data.addColumn('number', 'Speed');
data.addRows(4);
data.setValue(0, 0, '17:05');
data.setValue(0, 1, 1000);
data.setValue(1, 0, '17:10');
data.setValue(1, 1, 1170);
data.setValue(2, 0, '17:20');
data.setValue(2, 1, 860);
data.setValue(3, 0, '17:25');
data.setValue(3, 1, 1030);
var chart = new google.visualization.LineChart(document.getElementById('chart_div'));
chart.draw(data, {width: 400, height: 100, legend: 'none', vAxis: {title: 'KBps'}, backgroundColor: {fill: '#f5f5f5'}});
}
</script>
</head>
<body>
<script id="list-item" type="text/x-jqote-template">
<![CDATA[
<li class="list-item">
<span class="item-title">Title of NZB download</span>
<div class="controller" id="cancel"/>
<% if( this.paused ) { %>
<div class="controller" id="pause"/>
<% } else { %>
<div class="controller" id="play"/>
<% } %>
<div class="progress-bar"/>
</li>
]]>
</script>
<div id="chart_div"></div>
<div id="list-container">
<ul id="list"/>
</div>
<div id="button-container">
<div id="button-margin">
<button id="toggle_pause" type="button">Pause All</button>
<button id="sabnzbd" type="button">SABnzbd+</button>
<button id="refresh" type="button">Refresh</button>
<button id="options" type="button">Options</button>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment