fix the bug in script.js and result.jsp

This commit is contained in:
xiaoran 2013-10-21 11:01:08 +08:00
parent d79d4125a4
commit e0b4fb9e6a
3 changed files with 12 additions and 11 deletions

View File

@ -79,7 +79,7 @@ journal=Journal
profile=Profile
logout=Logout
visitsite=Visit Site
testResul=TestResult
testResult=TestResult
scipt=Script
sut=SUT
selectscripts=Select Script

View File

@ -52,8 +52,8 @@ body {
<div class="span2 main-menu-span">
<div class="well nav-collapse sidebar-nav">
<ul id="testresult" class="filetree treeview-famfamfam">
<li><span> <fmt:message key="testResult" /><
/span>
<li><span> <fmt:message key="testResult" />
</span>
<ul>
<li><span> <fmt:message key="script" /></span>
<ul id="scripts" class="filetree treeview-famfamfam">

View File

@ -36,19 +36,20 @@ function savescript() {
function loadscript() {
$('#scripttab').dataTable().fnClearTable();
$.post("loadscript", {}, function(data) {
var jsonObject = eval(data);
for ( var i = 0; i < jsonObject.length; i++) {
var time = new Date(jsonObject[i].createDateTime);
time.setTime(jsonObject[i].createDateTime);
addtablerow(jsonObject[i].name, jsonObject[i].ID, time);
for ( var i = 0; i < data.length; i++) {
var time = new Date(data[i].createDateTime);
time.setTime(data[i].createDateTime);
addtablerow(data[i].name, data[i].id, time);
$('#scripttab >tbody').children("tr").eq(i).attr("id",
jsonObject[i].ID);
data[i].id);
$('#scripttab >tbody').children("tr").eq(i).attr("name",
jsonObject[i].name);
data[i].name);
}
});
},"json");
}
function editscript(obj) {
var row = obj.parentNode.parentNode;
var scriptName = $('#scripttab>tbody').children("tr").eq(row.rowIndex - 1)