日期:2014-05-16 浏览次数:20401 次
<h1>success.vm</h1>
$webResourceManager.requireResource("com.shan.PipeLine:PipeLineResource")
<form method='post' id='Form1'>
<table class="aui" width="700">
<div class="search-container">
<a href="#" class="aui-button" id="newID" onclick="javascript:newone()">new</a>
</div>
<thead >
<tr >
<th width="120" align="left" heigth="8">
Date
</th>
<th width="120" align="left" heigth="8">
Plan
</th>
<th width="120" align="left" heigth="8">
Actual
</th>
<th width="120" align="left" heigth="8">
Operation
</th>
</tr>
</thead>
<tbody >
#foreach($l in $list)
<tr id="data$l.getID()">
<td id="date$l.getID()" >
#set($year=$l.getPipelineDate().getYear()+1900)
#set($minus='-')
#if($month<9)
#set($month="0$month")
#end
#set($yearmonth=" $year$minus$month")
$yearmonth
</td>
<td id="plan$l.getID()">
$l.getPipelinePlan()
</td>
<td id="actual$l.getID()">
$l.getPipelineActual()
</td>
<td >
<input class="aui-button" id="editID" type="button" onclick="javascript:edit($l.getID())" value="Edit">
<input type="button" id="deleteID" class="aui-button" onclick="javascript:deletes($l.getID())" value="Delete" />
</td>
</tr>
#end
</tbody>
</table>
</form>
<img src="/download/resources/com.shan.PipeLine:PipeLineResource/images/example.png" />
<script type="text/javascript">
function newone() {
if (window['added'] == 0) {
var s = inputstring(-1);
$('tbody').html(s + $('tbody').html());
window['added'] = 1;
window['edited'] = 1;
window['deleted'] = 1;
}
document.getElementById('newID').disabled = false;
$('input[id="editID"]').attr('disabled',true);
$('input[id="deleteID"]').attr('disabled',true);
}
window['added'] = 0;
window['edited'] = 0;
window['deleted'] = 0;