Browse Source

提交选择框对象。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.7.1
zouap 3 years ago
parent
commit
eebd74f770
1 changed files with 7 additions and 9 deletions
  1. +7
    -9
      templates/repo/modelmanage/index.tmpl

+ 7
- 9
templates/repo/modelmanage/index.tmpl View File

@@ -169,7 +169,7 @@


<div class="unite min_title inline field required"> <div class="unite min_title inline field required">
<label>模型文件</label> <label>模型文件</label>
<input id="citySel" type="text" style="width: 83%;" readonly value="" onclick="showMenu();" name="modelfile" >
<input id="modelSelectedFile" type="text" style="width: 83%;" readonly value="" onclick="showMenu();" name="modelSelectedFile" >
</div> </div>


<div class="inline field"> <div class="inline field">
@@ -205,7 +205,7 @@


<script type="text/javascript" src="/self/ztree/js/jquery.ztree.core.js"></script> <script type="text/javascript" src="/self/ztree/js/jquery.ztree.core.js"></script>
<script type="text/javascript" src="/self/ztree/js/jquery.ztree.excheck.js"></script> <script type="text/javascript" src="/self/ztree/js/jquery.ztree.excheck.js"></script>
<SCRIPT type="text/javascript">
<script type="text/javascript">
var setting = { var setting = {
check: { check: {
@@ -285,13 +285,13 @@
v += nodes[i].name + ";"; v += nodes[i].name + ";";
} }
if (v.length > 0 ) v = v.substring(0, v.length-1); if (v.length > 0 ) v = v.substring(0, v.length-1);
var cityObj = $("#citySel");
var cityObj = $("#modelSelectedFile");
cityObj.attr("value", v); cityObj.attr("value", v);
} }


function showMenu() { function showMenu() {
var cityObj = $("#citySel");
var cityOffset = $("#citySel").offset();
var cityObj = $("#modelSelectedFile");
var cityOffset = $("#modelSelectedFile").offset();
$("#menuContent").css({left:cityOffset.left + "px", top:cityOffset.top + cityObj.outerHeight() + "px"}).slideDown("fast"); $("#menuContent").css({left:cityOffset.left + "px", top:cityOffset.top + cityObj.outerHeight() + "px"}).slideDown("fast");


$("body").bind("mousedown", onBodyDown); $("body").bind("mousedown", onBodyDown);
@@ -301,7 +301,7 @@
$("body").unbind("mousedown", onBodyDown); $("body").unbind("mousedown", onBodyDown);
} }
function onBodyDown(event) { function onBodyDown(event) {
if (!(event.target.id == "menuBtn" || event.target.id == "citySel" || event.target.id == "menuContent" || $(event.target).parents("#menuContent").length>0)) {
if (!(event.target.id == "menuBtn" || event.target.id == "modelSelectedFile" || event.target.id == "menuContent" || $(event.target).parents("#menuContent").length>0)) {
hideMenu(); hideMenu();
} }
} }
@@ -310,9 +310,7 @@
$.fn.zTree.init($("#treeDemo"), setting, zNodes); $.fn.zTree.init($("#treeDemo"), setting, zNodes);
}); });
</SCRIPT>

<script>
let repolink = {{.RepoLink }} let repolink = {{.RepoLink }}
let repoId = {{ $repository }} let repoId = {{ $repository }}
const { _AppSubUrl, _StaticUrlPrefix, csrf } = window.config; const { _AppSubUrl, _StaticUrlPrefix, csrf } = window.config;


Loading…
Cancel
Save