|
@@ -34,7 +34,8 @@
|
|
|
</a>
|
|
|
<ul class="dropdown-menu">
|
|
|
<!-- loop allconArray -->
|
|
|
- <li><a href="{{rootUrl}}project/{{currproArray.pid}}/section">{{allconArray' value.stname}}</a></li>
|
|
|
+ <li><a href="{{rootUrl}}project/{{currproArray.pid}}/section">{{allconArray'
|
|
|
+ value.stname}}</a></li>
|
|
|
<!-- endloop -->
|
|
|
</ul>
|
|
|
</li>
|
|
@@ -117,7 +118,8 @@
|
|
|
<td width="">{{formatDate(itemMeasureArray' value.intime,'Y-m-d')}}</td>
|
|
|
<td>
|
|
|
<div class="btn-group">
|
|
|
- <a class="btn btn-mini dropdown-toggle" data-toggle="dropdown" href="#">
|
|
|
+ <a imnid="{{itemMeasureArray' value.imnid}}" id="dropdown_{{itemMeasureArray' value.imnid}}"
|
|
|
+ class="btn btn-mini dropdown-toggle" data-toggle="dropdown" href="#">
|
|
|
<span class="caret"></span>
|
|
|
</a>
|
|
|
<ul class="dropdown-menu">
|
|
@@ -143,7 +145,7 @@
|
|
|
</ul>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="filesDetail">
|
|
|
+ <div class="filesDetail hide">
|
|
|
<table class="table table-striped">
|
|
|
<thead>
|
|
|
<tr>
|
|
@@ -180,7 +182,7 @@
|
|
|
data-toggle="modal"><i class="icon-time icon-white"></i>历史版本
|
|
|
</button>
|
|
|
|
|
|
- <button id="deletefile" class="btn btn-mini btn-danger" type="button" href="#file-del"
|
|
|
+ <button id="del_{{itemMeasureArray' value.imnid}}" imnid="{{itemMeasureArray' value.imnid}}" class="btn btn-mini btn-danger" type="button" href="#file-del"
|
|
|
data-toggle="modal"><i class="icon-remove icon-white"></i>删除
|
|
|
</button>
|
|
|
</td>
|
|
@@ -203,17 +205,17 @@
|
|
|
<div class="modal-body">
|
|
|
<div class="form">
|
|
|
<form class="form-horizontal">
|
|
|
+ <input type="hidden" id="upimnid" name="upimnid" value=""/>
|
|
|
<div class="control-group">
|
|
|
<label class="control-label" for="inputEmail">文件名称</label>
|
|
|
<div class="controls">
|
|
|
- <input name="filename" id="filename" type="text">
|
|
|
+ <input name="upfilename" id="upfilename" type="text"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
<div class="control-group">
|
|
|
<label class="control-label" for="inputEmail">备注/描述</label>
|
|
|
<div class="controls">
|
|
|
- <textarea name="filedesc" id="filedesc"></textarea>
|
|
|
+ <textarea name="upfiledesc" id="upfiledesc"></textarea>
|
|
|
</div>
|
|
|
</div>
|
|
|
</form>
|
|
@@ -221,7 +223,7 @@
|
|
|
</div>
|
|
|
<div class="modal-footer">
|
|
|
<button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
|
|
|
- <button class="btn btn-primary">确定修改</button>
|
|
|
+ <button id="updateFileDesc" class="btn btn-primary">确定修改</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 编辑弹出 -->
|
|
@@ -316,9 +318,46 @@
|
|
|
$("#intime").html(intime);
|
|
|
$("#tips").html(tips);
|
|
|
$("#numpname").html(numpname);
|
|
|
+ $(".filesDetail").show();
|
|
|
+ });
|
|
|
+
|
|
|
+ $("a[id^='dropdown_']").click(function () {
|
|
|
+ var imnid = $(this).attr('imnid');
|
|
|
+ $("#upimnid").val(imnid);
|
|
|
+ });
|
|
|
+
|
|
|
+ $("button[id^='del_']").click(function () {
|
|
|
+ var imnid = $(this).attr('imnid');
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ dataType: "json",
|
|
|
+ cache: false,
|
|
|
+ data: {"imnid": imnid, "optype": 'del'},
|
|
|
+ url: "/project/{{pid}}/section/{{pmid}}/files",
|
|
|
+ success: function (data) {
|
|
|
+ if (data['status'] == 1) {
|
|
|
+ window.location.href = "{{rootUrl}}project/{{pid}}/section/{{pmid}}/files";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
});
|
|
|
- $("#deletefile").click(function () {
|
|
|
|
|
|
+ $("#updateFileDesc").click(function () {
|
|
|
+ var upfilename = $("#upfilename").val();
|
|
|
+ var upfiledesc = $("#upfiledesc").val();
|
|
|
+ var imnid = $("#upimnid").val();
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ dataType: "json",
|
|
|
+ cache: false,
|
|
|
+ data: {"upimnid": imnid, "filename": upfilename, "filedesc": upfiledesc},
|
|
|
+ url: "/project/{{pid}}/section/{{pmid}}/files",
|
|
|
+ success: function (data) {
|
|
|
+ if (data['status'] == 1) {
|
|
|
+ window.location.href = "{{rootUrl}}project/{{pid}}/section/{{pmid}}/files";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
});
|
|
|
});
|
|
|
</script>
|