157 lines
4.4 KiB
HTML
157 lines
4.4 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
#include("/common/header.html")
|
|
<link id="bootstrap-style" href="/css/chart.css" rel="stylesheet">
|
|
<style>
|
|
table {
|
|
table-layout: fixed;
|
|
border-collapse: collapse;
|
|
width: 100%;
|
|
line-height: 35px;
|
|
}
|
|
th {
|
|
text-align: center;
|
|
}
|
|
.horizontal {
|
|
text-align: center;
|
|
}
|
|
.vertical {
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
vertical-align: middle !important;
|
|
}
|
|
</style>
|
|
<script>
|
|
$(document).ready(function(){
|
|
$(".sub").each(function(){
|
|
$(this).click(function(){
|
|
var tr = $(this).parent().parent();
|
|
var confValue = tr.find("[name=confValue]").val();
|
|
if(!confValue) {
|
|
top.myAlert("#(_res.get('column')) \"#(_res.get('value'))\" #(_res.get('isRequired'))");
|
|
tr.find("[name=confValue]").focus();
|
|
return;
|
|
}
|
|
top.$("#dialog").text("#(_res.get('confirm.update'))");
|
|
top.$("#dialog").dialog({
|
|
dialogClass: "no-close",
|
|
modal:true,
|
|
buttons: {
|
|
Yes: function() {
|
|
var tempName = tr.find("[name=tempName]").val();
|
|
var id = tr.find("[name=id]").val();
|
|
$.ajax({
|
|
data:{tempName:tempName, id:id, confValue:confValue},
|
|
dataType:'text',
|
|
type:'POST',
|
|
url:'/softConfig/update',
|
|
success:function(res) {
|
|
if(res == 1) {
|
|
top.myAlert("#(_res.get('handle.success'))");
|
|
} else {
|
|
top.myAlert("#(_res.get('handle.error'))");
|
|
}
|
|
},
|
|
error:function() {
|
|
top.myAlert("#(_res.get('handle.error'))");
|
|
location.href = "/softConfig/index";
|
|
}
|
|
})
|
|
top.$("#dialog").dialog("close");
|
|
},
|
|
No: function() {
|
|
top.$("#dialog").dialog("close");
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
})
|
|
|
|
function myup(obj) {
|
|
$(obj).attr("class", "my-button-up");
|
|
}
|
|
|
|
function mydown(obj) {
|
|
$(obj).attr("class", "my-button-down");
|
|
}
|
|
</script>
|
|
</head>
|
|
<body class="bcColor noScroll-y aC">
|
|
<!--中间部分右边开始-->
|
|
<div class="container-fluid-full">
|
|
<div class="row-fluid">
|
|
<noscript>
|
|
<div class="alert alert-block span10">
|
|
<h4 class="alert-heading">Warning!</h4>
|
|
<p>
|
|
You need to have <a href="http://en.wikipedia.org/wiki/JavaScript"
|
|
target="_blank">JavaScript</a> enabled to use this site.
|
|
</p>
|
|
</div>
|
|
</noscript>
|
|
<div id="content" class="span10">
|
|
<div class="row-fluid" style="margin-top: 10px">
|
|
<div class="box span12">
|
|
<div class="box-header" data-original-title>
|
|
<h2>
|
|
<i class="halflings-icon align-justify"></i><span class="break"></span>
|
|
</h2>
|
|
</div>
|
|
<div class="box-content lianxiang">
|
|
<table class="table table-striped table-bordered" id="info">
|
|
<thead>
|
|
<tr>
|
|
<th width="10%">#(_res.get("monitor.card"))</th>
|
|
<th width="12%">#(_res.get("softConfig.key"))</th>
|
|
<th width="20%">#(_res.get("value"))</th>
|
|
<th width="30%">#(_res.get("description"))</th>
|
|
<th width="5%"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
#set(flag = 0)
|
|
#for(x : result.keySet())
|
|
#for(y : result.get(x))
|
|
<tr>
|
|
<input type="hidden" name="id" value="#(y.id)"/>
|
|
<input type="hidden" name="tempName" value="#(y.tempName)"/>
|
|
#if(flag == 0)
|
|
<td class="horizontal vertical" rowspan="#(result.get(x).size())" title="#(x)">#(x)</td>
|
|
#set(flag = 1)
|
|
#end
|
|
<td class="horizontal vertical" title="#(y.userField)">#(y.userField)</td>
|
|
<td class="horizontal vertical">
|
|
#if(y.error == 1)
|
|
<span style="color:red;" title="#(_res.get('softConfig.error')):#(y.confFile)">#(_res.get('softConfig.error')):#(y.confFile)</span>
|
|
#else
|
|
#if(y.isModify == 1)
|
|
<input name="confValue" style="padding:0 6px;height:26px;" value="#(y.confValue)"/>
|
|
#else
|
|
<span title="#(y.confValue)">#(y.confValue)</span>
|
|
#end
|
|
#end
|
|
</td>
|
|
<td class="vertical" title="#(y.userTip)">#(y.userTip)</td>
|
|
<td class="horizontal vertical">
|
|
#if(y.isModify == 1 && y.error != 1)
|
|
<div class="my-button-up sub" onmousedown="mydown(this)" onmouseup="myup(this)"><span class="icon-arrow-up"></span></div>
|
|
#end
|
|
</td>
|
|
</tr>
|
|
#end
|
|
#set(flag = 0)
|
|
#end
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |