Showing
1 changed file
with
25 additions
and
4 deletions
@@ -120,10 +120,10 @@ | @@ -120,10 +120,10 @@ | ||
120 | <div id="infoTableDiv"> | 120 | <div id="infoTableDiv"> |
121 | <ul class="nav nav-tabs" role="tablist"> | 121 | <ul class="nav nav-tabs" role="tablist"> |
122 | <li role="presentation" class="active"> | 122 | <li role="presentation" class="active"> |
123 | - <a href="#javaConfigPart" id="javaConfigPartShow" aria-controls="ipPart" role="tab" data-toggle="tab">Java Config</a> | 123 | + <a href="#javaConfigPart" id="javaConfigPartShow" aria-controls="ipPart" role="tab" data-toggle="tab">application</a> |
124 | </li> | 124 | </li> |
125 | <li role="presentation" > | 125 | <li role="presentation" > |
126 | - <a href="#applicationPart" aria-controls="totalPart" role="tab" data-toggle="tab">Application</a> | 126 | + <a href="#applicationPart" style="display: none" id="commonPartShow" aria-controls="totalPart" role="tab" data-toggle="tab">Application</a> |
127 | </li> | 127 | </li> |
128 | </ul> | 128 | </ul> |
129 | <div class="tab-content" style="padding-top:10px"> | 129 | <div class="tab-content" style="padding-top:10px"> |
@@ -160,7 +160,7 @@ | @@ -160,7 +160,7 @@ | ||
160 | <div class="form-group"> | 160 | <div class="form-group"> |
161 | <label class="col-sm-2 control-label">应用:</label> | 161 | <label class="col-sm-2 control-label">应用:</label> |
162 | <div class="col-sm-8"> | 162 | <div class="col-sm-8"> |
163 | - <select id="application" name="application" class="form-control"> | 163 | + <select id="application" name="application" class="form-control select2" style="width:300px;"> |
164 | <c:forEach items="${appSelected}" var="javaApp"> | 164 | <c:forEach items="${appSelected}" var="javaApp"> |
165 | <option value="${javaApp}">${javaApp}</option> | 165 | <option value="${javaApp}">${javaApp}</option> |
166 | </c:forEach> | 166 | </c:forEach> |
@@ -304,14 +304,30 @@ | @@ -304,14 +304,30 @@ | ||
304 | tags: true | 304 | tags: true |
305 | }); | 305 | }); |
306 | 306 | ||
307 | + $("#application").select2({ | ||
308 | + dropdownParent:$("#uploadModal"), | ||
309 | + tags: true | ||
310 | + }); | ||
307 | 311 | ||
308 | 312 | ||
313 | + $("#cloudType").change(function(){ | ||
314 | + var selectname_begin = $("#cloudType").val(); | ||
315 | + $("#javaConfigPartShow").text(selectname_begin); | ||
316 | + if("application"==selectname_begin){ | ||
317 | + $("#commonPartShow").prop("style","display:none"); | ||
318 | + }else{ | ||
319 | + $("#commonPartShow").removeAttr("style") | ||
320 | + } | ||
321 | + btnSearch(); | ||
322 | + //添加所需要执行的操作代码display:none | ||
323 | + }) | ||
309 | }); | 324 | }); |
310 | 325 | ||
311 | 326 | ||
312 | 327 | ||
313 | 328 | ||
314 | 329 | ||
330 | + | ||
315 | $('input[id=file]').change(function () { | 331 | $('input[id=file]').change(function () { |
316 | $('#filepath').val($(this).val()); | 332 | $('#filepath').val($(this).val()); |
317 | }); | 333 | }); |
@@ -499,14 +515,18 @@ | @@ -499,14 +515,18 @@ | ||
499 | function editAuthModule(id, name, cname, modulegroup) { | 515 | function editAuthModule(id, name, cname, modulegroup) { |
500 | $("#uploadModal #messageAlert").hide(); | 516 | $("#uploadModal #messageAlert").hide(); |
501 | $("#uploadModal").modal('show'); | 517 | $("#uploadModal").modal('show'); |
518 | + var selectname_begin = $("#cloudType").val(); | ||
519 | + $("#application").val(selectname_begin).trigger('change'); | ||
520 | + | ||
502 | } | 521 | } |
503 | 522 | ||
504 | function locadconfigmodal(application_modal, key_modal, default_value, az1_value, az2_value) { | 523 | function locadconfigmodal(application_modal, key_modal, default_value, az1_value, az2_value) { |
524 | + var selectname_begin = $("#cloudType").val(); | ||
505 | if (key_modal != null && key_modal != "") { | 525 | if (key_modal != null && key_modal != "") { |
506 | $("input[name='default_value']").val(default_value); | 526 | $("input[name='default_value']").val(default_value); |
507 | $("input[name='az1_value']").val(az1_value); | 527 | $("input[name='az1_value']").val(az1_value); |
508 | $("input[name='az2_value']").val(az2_value); | 528 | $("input[name='az2_value']").val(az2_value); |
509 | - $("#application_modal").val(application_modal); | 529 | + $("#application_modal").val(application_modal).trigger('change'); |
510 | $("#key_modal").val(key_modal); | 530 | $("#key_modal").val(key_modal); |
511 | $("#key_modal").prop("readonly",true); | 531 | $("#key_modal").prop("readonly",true); |
512 | $("#application_modal").prop("disabled","disabled"); | 532 | $("#application_modal").prop("disabled","disabled"); |
@@ -514,6 +534,7 @@ | @@ -514,6 +534,7 @@ | ||
514 | }else { | 534 | }else { |
515 | $("#key_modal").prop("readonly",false); | 535 | $("#key_modal").prop("readonly",false); |
516 | $("#application_modal").removeAttr("disabled"); | 536 | $("#application_modal").removeAttr("disabled"); |
537 | + $("#application_modal").val(selectname_begin).trigger('change'); | ||
517 | $("#myModalLabel").text("新增配置信息"); | 538 | $("#myModalLabel").text("新增配置信息"); |
518 | $("input[name='default_value']").val(""); | 539 | $("input[name='default_value']").val(""); |
519 | $("input[name='az1_value']").val(""); | 540 | $("input[name='az1_value']").val(""); |
-
Please register or login to post a comment