Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 1242

Přidáno uživatelem Ondřej Fibich před asi 13 roky(ů)

Opravy:

- oprava nacitani scriptu pro graf provozu clena

Zobrazit rozdíly:

freenetis/branches/testing/application/controllers/js.php
$this->google_jsapi();
}
private function _js_ulogd()
{
$this->google_jsapi();
}
private function stats()
{
$this->google_jsapi();
freenetis/branches/testing/application/controllers/ulogd.php
$view->title = __('Traffic of member').' '.$member->name;
$view->breadcrumbs = $breadcrumbs->html();
$view->content->member = $member;
$view->content->title = __('Traffic of member').' '.$member->name;
$view->content->total_traffics = $total_traffics;
$view->content->current_unit_id = $current_unit_id;
$view->content->grid = $grid;
freenetis/branches/testing/application/views/js/__pieces/google_jsapi.php
?>
// load script
$.getScript('https://www.google.com/jsapi');
// load script
$.getScript('https://www.google.com/jsapi');
freenetis/branches/testing/application/views/ulogd_show_by_member.php
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript"><!--
<?php if ($total_traffics > 1): ?>
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart()
google.setOnLoadCallback(function ()
{
var data = new google.visualization.DataTable();
data.addColumn("string", "Traffic");
data.addColumn("number", "Upload (<?php echo __('in') ?> <?php echo Ulogd_Controller::$units[$current_unit_id] ?>)");
data.addColumn("number", "Download (<?php echo __('in') ?> <?php echo Ulogd_Controller::$units[$current_unit_id] ?>)");
data.addRows([<?php echo $js_data_array_str ?>]);
var chart = new google.visualization.AreaChart(document.getElementById("chart"));
chart.draw(data, {
width: 700,
height: 640,
title: "<?php echo __('Graph of transmitted data of member') ?>",
hAxis: {title: "'.$title.'"},
hAxis: {title: "<?php echo htmlspecialchars($title) ?>"},
vAxis: {title: "Data (<?php echo __('in') ?> <?php echo Ulogd_Controller::$units[$current_unit_id] ?>)", format:"#,###"}
});
}
});
<?php endif ?>
$(document).ready(function()

Také k dispozici: Unified diff