|
|
|
@ -49,21 +49,34 @@ g {
|
|
|
|
|
<tspan x="160" id="calls_freetime">Free time</tspan>
|
|
|
|
|
<tspan x="190" id="calls_cost">Cost</tspan>
|
|
|
|
|
</text>
|
|
|
|
|
<!--[%calls_height_start = 135-%]-->
|
|
|
|
|
<!--[% FOR call IN zonecalls_rs.all -%]-->
|
|
|
|
|
<!--[% total_number = total_number + call.get_column('number') -%]-->
|
|
|
|
|
<!--[% total_duration = total_duration + call.get_column('duration') -%]-->
|
|
|
|
|
<!--[% total_free_time = total_free_time + call.get_column('free_time') -%]-->
|
|
|
|
|
<!--[% total_cost = total_cost + call.get_column('cost') -%]-->
|
|
|
|
|
<!--[% calls_height_start + ( 10 * ( loop.count - 1 ) ) %]-->
|
|
|
|
|
<text y="10" text-anchor="end" id="calls[%loop.count-%]">
|
|
|
|
|
<tspan y="10" x="5" id="calls_zone[%loop.count-%]" text-anchor="start"><!--{[% call.get_column('zone') %]}--><!--[%#-->Example zone<!--%]--></tspan>
|
|
|
|
|
<tspan y="10" x="95" id="calls_number[%loop.count-%]"><!--{[% call.get_column('number') %]}--><!--[%#-->0<!--%]--></tspan>
|
|
|
|
|
<tspan y="10" x="130" id="calls_duration[%loop.count-%]"><!--{[% call.get_column('duration')|format('%.3f') %]}--><!--[%#-->0.000<!--%]--></tspan>
|
|
|
|
|
<tspan y="10" x="160" id="calls_freetime[%loop.count-%]"><!--{[% call.get_column('free_time')|format('%d') %]}--><!--[%#-->0.0<!--%]--></tspan>
|
|
|
|
|
<tspan y="10" x="190" id="calls_cost[%loop.count-%]"><!--{[% ( call.get_column('cost') / 100 ) |format('%.2f') %]}--><!--[%#-->0.00<!--%]--></tspan>
|
|
|
|
|
<!--{[%calls_height_start = 135-%]}-->
|
|
|
|
|
<!--{[% FOR call IN zonecalls_rs.all -%]}-->
|
|
|
|
|
<!--{[% total_number = total_number + call.get_column('number') -%]}-->
|
|
|
|
|
<!--{[% total_duration = total_duration + call.get_column('duration') -%]}-->
|
|
|
|
|
<!--{[% total_free_time = total_free_time + call.get_column('free_time') -%]}-->
|
|
|
|
|
<!--{[% total_cost = total_cost + call.get_column('cost') -%]}-->
|
|
|
|
|
<!--{[% calls_height_start + ( 10 * ( loop.count - 1 ) ) %]}-->
|
|
|
|
|
<text y="10" text-anchor="end" id="calls[%loop.count-%]" class="datarow">
|
|
|
|
|
<tspan x="5" id="calls_zone[%loop.count-%]" text-anchor="start"><!--{[% call.get_column('zone') %]}--><!--[%#-->Example zone<!--%]--></tspan>
|
|
|
|
|
<tspan x="95" id="calls_number[%loop.count-%]"><!--{[% call.get_column('number') %]}--><!--[%#-->0<!--%]--></tspan>
|
|
|
|
|
<tspan x="130" id="calls_duration[%loop.count-%]"><!--{[% call.get_column('duration')|format('%.3f') %]}--><!--[%#-->0.000<!--%]--></tspan>
|
|
|
|
|
<tspan x="160" id="calls_freetime[%loop.count-%]"><!--{[% call.get_column('free_time')|format('%d') %]}--><!--[%#-->0.0<!--%]--></tspan>
|
|
|
|
|
<tspan x="190" id="calls_cost[%loop.count-%]"><!--{[% ( call.get_column('cost') / 100 ) |format('%.2f') %]}--><!--[%#-->0.00<!--%]--></tspan>
|
|
|
|
|
</text>
|
|
|
|
|
<!--[%END -%]-->
|
|
|
|
|
<!--{[%rows=loop.count%]}-->
|
|
|
|
|
<!--{[%END -%]}-->
|
|
|
|
|
<script language="Javascript">
|
|
|
|
|
//var rows = $(".datarow").toArray();
|
|
|
|
|
var yStart = document.getElementById('calls1').getAttribute('y');
|
|
|
|
|
for(var i=1; i < [%rows + 1%]; i++){
|
|
|
|
|
var row = document.getElementById('calls'+i);
|
|
|
|
|
alert('i='+i+'; row='+row+'; y='+ ( i*10 + parseInt(yStart) ) );
|
|
|
|
|
if(row){
|
|
|
|
|
row.setAttribute( 'y', ( i*10 + parseInt(yStart) ) );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//rows=document.getElementsById;
|
|
|
|
|
</script>
|
|
|
|
|
</g>
|
|
|
|
|
</g>
|
|
|
|
|
<g id="bgpage">
|
|
|
|
|