diff options
author | zheng_wenlong <wenlong_zheng@nexty-ele.com> | 2019-04-16 11:20:38 +0900 |
---|---|---|
committer | zheng_wenlong <wenlong_zheng@nexty-ele.com> | 2019-05-13 17:50:04 +0900 |
commit | 3b55d06b89bf64873e685c3d78fce5affbba3d17 (patch) | |
tree | 2adcff0087f4757107d2bf1e50c85ea649f04f94 /warehouse/src/main/webapp/WEB-INF/pages/app/createApp.jsp |
Add warehouse server source code.icefish_8.99.5icefish_8.99.4icefish_8.99.3icefish_8.99.2icefish_8.99.1icefish/8.99.5icefish/8.99.4icefish/8.99.3icefish/8.99.2icefish/8.99.1halibut_8.0.6halibut_8.0.5halibut_8.0.4halibut_8.0.3halibut_8.0.2halibut_8.0.1halibut_8.0.0halibut_7.99.3halibut_7.99.2halibut_7.99.1halibut/8.0.6halibut/8.0.5halibut/8.0.4halibut/8.0.3halibut/8.0.2halibut/8.0.1halibut/8.0.0halibut/7.99.3halibut/7.99.2halibut/7.99.18.99.58.99.48.99.38.99.28.99.18.0.68.0.58.0.48.0.38.0.28.0.18.0.07.99.37.99.27.99.1halibut
[Patch Set 2] Add ReadMe.md
Change-Id: I6ade52d2490f5ca4ba107c1a27ed6d5b39048725
Signed-off-by: zheng_wenlong <wenlong_zheng@nexty-ele.com>
Diffstat (limited to 'warehouse/src/main/webapp/WEB-INF/pages/app/createApp.jsp')
-rw-r--r-- | warehouse/src/main/webapp/WEB-INF/pages/app/createApp.jsp | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/warehouse/src/main/webapp/WEB-INF/pages/app/createApp.jsp b/warehouse/src/main/webapp/WEB-INF/pages/app/createApp.jsp new file mode 100644 index 0000000..d323d2e --- /dev/null +++ b/warehouse/src/main/webapp/WEB-INF/pages/app/createApp.jsp @@ -0,0 +1,112 @@ +<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<% +String path = request.getContextPath(); +String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path; +%> +<style type="text/css"> + #e_appTypeId {height:auto;} + .box{height:50px;border-style:solid; border-width:1px; border-color:#F0F0F0;text-align:center;line-height:50px;color:white;} + .device_type{position: relative;left:7%;width:950px;} + .style_button{width:300px;height:100px;margin-top:10px;margin-left:10px;white-space: normal;font-size:20px;} + .file-btn{z-index:0;filter:alpha(opacity=1);opacity:0.8;} + #e_position{z-index:100;} + .create-schedule{border:2px solid #E0E0E0;} + .create-scheduling{border:2px solid #29e62d;} +</style> +<!-- navigationDialog dialog --> +<jsp:include page="../navigationDialog.jsp" flush="true"></jsp:include> +<c:choose> + <c:when test="${not empty modelErrors}"> + <div class="alert alert-danger" id="modalErrorArea" role="alert"> + ${modelErrors} + </div> + </c:when> + <c:otherwise> + <div class="card mb-3" style="height:auto;"> + <div class="col-md-12 box"> + <div class="form-group row" > + <img src="image/insertAppCreate.PNG" style="height:100%;width:100%"/> + </div> + <div class="form-group row" style="margin-top:-15px"> + <div class="col-md-4 create-scheduling"></div> + <div class="col-md-4 create-schedule"></div> + <div class="col-md-4 create-schedule"></div> + </div> + </div> + <div class="card-body card-change-password pt0"> + <div class="alert alert-danger" id="modalErrorArea" role="alert"<c:choose> + <c:when test="${not empty modelErrors}">style="display: block"</c:when> + <c:otherwise>style="display: none"</c:otherwise> + </c:choose>> + <c:if test="${not empty modelErrors}"> + ${modelErrors} + </c:if> + </div> + <p style="font-size:25px;margin-top:10px;">Choose device type</p> + <div class="form-group row device_type"> + <c:forEach var="list" items="${appDeviceTypeList}"> + <div id="e_deviceTypeId" class="btn btn-info style_button" style="line-height:80px;" onclick="saveAppForm(${list.value})">${list.label}</div> + </c:forEach> + </div> + </div> + </div> + </c:otherwise> +</c:choose> + +<script src="<%=basePath%>/js/constant.js"></script> +<script> +var $errorArea = $('#modalErrorArea'); +var appForm = function() { + this.appDeviceTypeId = ''; +}; + +var saveAppForm = function(value) { + $("#e_deviceTypeId").attr('disabled',true); + var tf = new appForm(); + tf.appDeviceTypeId = value; + var formData = new FormData(); + formData.append("form", JSON.stringify(tf)); + + try { + $.ajax({ + url: '<%=basePath%>/app/createApp', + cache: false, + type: 'POST', + async:true, + processData:false, + contentType:false, + data: formData, + success: function (data) { + var json = JSON.parse(data); + if(200 == json.result) { + Commons.showContent('<%=basePath%>' + json.forward+'?appId='+json.message.appId+'&modifyFlag='+0); + } else if(401 == json.result) { + $("#btn-save-edit").attr('disabled',false); + var errorContent = ''; + for (var i in json.message) { + errorContent += '<div>' + json.message[i] + '</div>'; + } + $errorArea.empty().append(errorContent); + $errorArea.css("display", "block"); + } else{ + var errorContent = ''; + for (var i in json.message) { + errorContent += '<div>' + json.message[i] + '</div>'; + } + $errorArea.empty().append(errorContent); + $errorArea.css("display", "block"); + $("#btn-save-edit").attr('disabled',false); + } + + }, + error: function (jqXHR, textStatus, errorThrown) { + /*错误信息处理*/ + } + }); + } catch(e) { + console.log(e); + } +}; + +</script>
\ No newline at end of file |