|
|
@ -43,7 +43,6 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</form>
|
|
|
|
<div class="hr-line-dashed"></div>
|
|
|
|
<div class="hr-line-dashed"></div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="ydxbd" id="formlists" style="display: block;">
|
|
|
|
<div class="ydxbd" id="formlists" style="display: block;">
|
|
|
|
<p id="tags_p" class="mgl-5 c02">选择需要修改属性</p>
|
|
|
|
<p id="tags_p" class="mgl-5 c02">选择需要修改属性</p>
|
|
|
|
<div class="tagBtnList">
|
|
|
|
<div class="tagBtnList">
|
|
|
@ -67,7 +66,6 @@
|
|
|
|
<a onclick="AddForm(this,'id_comment')" class="tagBtn2 label label-default" name="changebtn">备注</a>
|
|
|
|
<a onclick="AddForm(this,'id_comment')" class="tagBtn2 label label-default" name="changebtn">备注</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<input name="assets_ids" type="hidden" value="111" >
|
|
|
|
<input name="assets_ids" type="hidden" value="111" >
|
|
|
|
<input name="assets_ids" type="hidden" value="112" >
|
|
|
|
<input name="assets_ids" type="hidden" value="112" >
|
|
|
|
<div class="hr-line-dashed"></div>
|
|
|
|
<div class="hr-line-dashed"></div>
|
|
|
@ -130,15 +128,15 @@
|
|
|
|
$('.select2').select2();
|
|
|
|
$('.select2').select2();
|
|
|
|
$("#id_tags").select2({
|
|
|
|
$("#id_tags").select2({
|
|
|
|
tags: true,
|
|
|
|
tags: true,
|
|
|
|
maximumSelectionLength: 8, //最多能够选择的个数
|
|
|
|
maximumSelectionLength: 8 //最多能够选择的个数
|
|
|
|
//closeOnSelect: false
|
|
|
|
//closeOnSelect: false
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
}
|
|
|
|
function AddForm(obj,id_form) {
|
|
|
|
function AddForm(obj,id_form) {
|
|
|
|
var oHiddenForms = document.getElementById("ridd");
|
|
|
|
var oHiddenForms = document.getElementById("ridd");
|
|
|
|
var parentElem = document.getElementById("add_form");
|
|
|
|
var parentElem = document.getElementById("add_form");
|
|
|
|
var oH = document.getElementById(id_form);
|
|
|
|
var oH = document.getElementById(id_form);
|
|
|
|
var oNew = oH.parentNode.parentNode
|
|
|
|
var oNew = oH.parentNode.parentNode;
|
|
|
|
var aDiv = parentElem.getElementsByClassName('form-group');
|
|
|
|
var aDiv = parentElem.getElementsByClassName('form-group');
|
|
|
|
if(oNew.parentNode.id=='ridd') {
|
|
|
|
if(oNew.parentNode.id=='ridd') {
|
|
|
|
obj.className="tagBtn2 label label-warning";
|
|
|
|
obj.className="tagBtn2 label label-warning";
|
|
|
@ -148,15 +146,15 @@
|
|
|
|
oHiddenForms.appendChild(oNew);
|
|
|
|
oHiddenForms.appendChild(oNew);
|
|
|
|
obj.className="tagBtn2 label label-default";
|
|
|
|
obj.className="tagBtn2 label label-default";
|
|
|
|
SetSelect2();
|
|
|
|
SetSelect2();
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function ChangeBtnCss(class_var){
|
|
|
|
function ChangeBtnCss(class_var){
|
|
|
|
var changebtns = $("#formlists").find("a[name='changebtn']")
|
|
|
|
var changebtns = $("#formlists").find("a[name='changebtn']");
|
|
|
|
for (var i=0; i<changebtns.length;i++){
|
|
|
|
for (var i=0; i<changebtns.length;i++){
|
|
|
|
changebtns[i].className=class_var;
|
|
|
|
changebtns[i].className=class_var;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
function AddAllForm(obj) {
|
|
|
|
function AddAllForm(obj) {
|
|
|
|
var oHiddenForms = document.getElementById("ridd");
|
|
|
|
var oHiddenForms = document.getElementById("ridd");
|
|
|
|
var parentElem = document.getElementById("add_form");
|
|
|
|
var parentElem = document.getElementById("add_form");
|
|
|
@ -167,18 +165,18 @@
|
|
|
|
if(oHidden_len == 0 || obj.innerText == "取消全选"){
|
|
|
|
if(oHidden_len == 0 || obj.innerText == "取消全选"){
|
|
|
|
for(var i=0;i<aDiv_len-1;i++){
|
|
|
|
for(var i=0;i<aDiv_len-1;i++){
|
|
|
|
oHiddenForms.appendChild(aDiv[0]);
|
|
|
|
oHiddenForms.appendChild(aDiv[0]);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
ChangeBtnCss("tagBtn2 label label-default");
|
|
|
|
ChangeBtnCss("tagBtn2 label label-default");
|
|
|
|
$('#changeall').text("全选");
|
|
|
|
$('#changeall').text("全选");
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
for(var i=0;i<oHidden_len;i++){
|
|
|
|
for(var i=0;i<oHidden_len;i++){
|
|
|
|
parentElem.insertBefore(oHiddenForms.children[0],bFormBtn);
|
|
|
|
parentElem.insertBefore(oHiddenForms.children[0],bFormBtn);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
ChangeBtnCss("tagBtn2 label label-warning");
|
|
|
|
ChangeBtnCss("tagBtn2 label label-warning");
|
|
|
|
$('#changeall').text("取消全选");
|
|
|
|
$('#changeall').text("取消全选");
|
|
|
|
SetSelect2();
|
|
|
|
SetSelect2();
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function fsubmit(){
|
|
|
|
function fsubmit(){
|
|
|
@ -202,11 +200,11 @@
|
|
|
|
for(var i=0;i<m.length;i++){
|
|
|
|
for(var i=0;i<m.length;i++){
|
|
|
|
alert(m[0].value);
|
|
|
|
alert(m[0].value);
|
|
|
|
oForm.appendChild(m[0]);
|
|
|
|
oForm.appendChild(m[0]);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
action="/assets/asset/"+assets_id[0].value+"/update";
|
|
|
|
action="/assets/asset/"+assets_id[0].value+"/update";
|
|
|
|
oForm.action=action;
|
|
|
|
oForm.action=action;
|
|
|
|
oForm.submit();
|
|
|
|
oForm.submit();
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
{% endblock %}
|
|
|
|
{% endblock %}
|
|
|
|