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/account |
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/account')
3 files changed, 483 insertions, 0 deletions
diff --git a/warehouse/src/main/webapp/WEB-INF/pages/account/detail.jsp b/warehouse/src/main/webapp/WEB-INF/pages/account/detail.jsp new file mode 100644 index 0000000..096c6a5 --- /dev/null +++ b/warehouse/src/main/webapp/WEB-INF/pages/account/detail.jsp @@ -0,0 +1,80 @@ +<%@ 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"> + label{ + margin-top:15px; + } + /* .col-sm-4 { + margin-top:-16px; + } */ + #e_au { + height:auto; + } + .div-label{ + margin-top:-10px; + } +</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" id="defaultForm"> + <div class="card-body card-change-password pt0"> + <!-- <div class="card-header"></div> --> + <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> + <div class="card-body" style="min-height:530px;"> + <form id="registerForm" class="was-validated" action = "accountList"> + <input type="hidden" id="e_userId" value="${appInfo.userId}"> + <input type="hidden" id="e_userId" value="${appInfo.userPw}"> + <div class="form-group row"> + <div class="col-md-3 div-label"><label for="e_userName" class="notNull">User name </label></div> + <div class="col-md-9"> + <input class="form-control" title="This field is required" placeholder="This field is required" id="e_userName" name="e_userName" type="text" value="${appInfo.userName}" required disabled> + </div> + </div> + <div class="form-group row"> + <div class="col-md-3 div-label"><label for="e_mailAddress" class="notNull">Mail address</label></div> + <div class="col-md-9"> + <input class="form-control" title="This field is required" id="e_mailAddress" placeholder="This field is required" name="e_mailAddress" type="email" value="${appInfo.mailAddress}" required disabled> + </div> + </div> + <div class="form-group row"> + <div class="col-md-3 div-label"><label for="e_au" class="notNull">Authority</label></div> + <div class="col-md-9"> + <input class="form-control" id="e_au" name="e_au" type="text" value="${appInfo.auName}" required disabled> + </div> + </div> + <div class="form-group row"> + <div class="col-md-3 div-label"><label for="e_au" class="notNull">Create date</label></div> + <div class="col-md-9"> + <input class="form-control" id="e_createDate" name="e_au" type="text" value="${createDate}" required disabled> + </div> + </div> + <div class="form-group row"> + <div class="col-md-3 div-label"><label for="e_au" class="notNull">Update date</label></div> + <div class="col-md-9"> + <input class="form-control" id="e_updateDate" name="e_au" type="text" value="${updateDate}" required disabled> + </div> + </div> + </form> + </div> + </div> + </div> + </c:otherwise> +</c:choose>
\ No newline at end of file diff --git a/warehouse/src/main/webapp/WEB-INF/pages/account/list.jsp b/warehouse/src/main/webapp/WEB-INF/pages/account/list.jsp new file mode 100644 index 0000000..d6da7aa --- /dev/null +++ b/warehouse/src/main/webapp/WEB-INF/pages/account/list.jsp @@ -0,0 +1,225 @@ +<%@ 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"> + div.dataTables_wrapper div.dataTables_info { + padding-top: 0.3em; + white-space: nowrap; + margin-left:120px; +} + a.page-link{ + height:calc(1.8125rem + 4px); + } + .styleTable{ + text-align:center; + } +</style> +<div class="alert alert-secondary" role="alert"> + <div style="display:inline-block">User</div> +</div> +<div id="mouse" style="width:200px;border:1px solid #D0D0D0;position:absolute;z-index:999;background:#F0F0F0;margin-left:180px;margin-top:-110px;display:none"> + <c:forEach var="list" items="${authorityList}"> + <option value="${list.value}" >${list.label}</option> + </c:forEach> +</div> +<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="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> + <div class="card mb-3"> + <div class="card-header"> + <div class=""> + <div class="row"> + <div style="display:none"> + <div class="form-group" > + <label class="control-label" for="s_createDate">CreateDate</label> + <div class="input-group date date_yyyymmdd" data-date="" data-date-format="yyyy/mm/dd" data-link-field="s_begin_06020101" data-link-format="yyyy/mm/dd"> + <input class="form-control" size="10" type="text" placeholder="please choose" readonly id="s_createDate" style="width:150px;height:38px"> + <span class="input-group-addon"><span class="glyphicon glyphicon-remove fa fa-window-close"></span></span> + <span class="input-group-addon"><span class="glyphicon glyphicon-calendar fa fa-calendar"></span></span> + </div> + <input type="hidden" id="s_begin_06020101"/> + </div> + </div> + <div class="col"> + <div class="form-group" > + <label class="control-label" for="s_authority">Authority</label> + <select id="s_authority" class="form-control"> + <c:forEach var="list" items="${authorityList}"> + <option value="${list.value}" >${list.label}</option> + </c:forEach> + </select> + </div> + </div> + <div class="col"> + <div style="position:absolute;right:20px;top:40px;cursor:pointer;display:none;" class="input_clear"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> + </div> + <label class="control-label" for="t_userName">KeyWord</label> + <input type="text" class="form-control style-height" id="t_keyWord" name="t_userName" placeholder="please enter"> + </div> + <div class="col" style="visibility:hidden"> + <div style="position:absolute;right:20px;top:40px;cursor:pointer;display:none;" class="input_clear"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> + </div> + <label class="control-label" for="t_mailAddress">MailAddress</label> + <input type="email" class="form-control style-height" id="t_mailAddress" name="s_mailAddress" placeholder="please enter"> + </div> + <div class="col" style="visibility:hidden"> + <div class="form-group"> + <label class="control-label" for="t_mailAddress">*******</label> + <input type="email" class="form-control style-height" id="t_mailAddress" name="s_mailAddress" placeholder="please enter"> + </div> + </div> + </div> + </div> + <div class="row"> + <div class="col" style="text-align:right"> + <button type="button" class="btn btn-primary pl20 pr20" id="btn-save-edit" onclick="Commons.showContent('<%=basePath%>/account/modify')">Create</button> + <button type="button" title="step2 development" class="btn btn-success pl20 pr20 ml10" id="btn-save-edit" onclick="$table.DataTable().ajax.reload();">Search</button> + </div> + </div> + </div> + <div class="card-body"> + <div class="table-responsive" id="div-table-container"> + <table id="example" class="table table-bordered hover table-striped" cellspacing="0" width="100%"> + <thead> + <tr> + <th style="text-align:left;">No.</th> + <th>UserName</th> + <th>MailAddress</th> + <th>CreateDate</th> + <th>Authority</th> + <th>Operation</th> + </tr> + </thead> + </table> + <div style="height:20px;"></div> + </div> + </div> + </div> + </c:otherwise> +</c:choose> +<script> +$(function() { + $("input").focus(function(){ + $(this).parent().children(".input_clear").show(); + }); + $("input").blur(function(){ + if($(this).val()==''){ + $(this).parent().children(".input_clear").hide(); + } + }); + $(".input_clear").click(function(){ + $(this).parent().find('input').val(''); + $(this).hide(); + }); + $(".card-body").css({ + minHeight:($(window).height()-500) + }) + Commons.bindDateControl(); + Commons.appendRedAsterisk(); + initTable(); + bingDateControl(); +}); + +var $table = $('#example'); +var $errorArea = $('#modalErrorArea'); + +var queryParam = function(param) { + param.orderColumn = param.order[0].column; + param.orderDir = param.order[0].dir; + param.keyWord = $('#t_keyWord').val(); + param.mailAddress = $('#t_mailAddress').val(); + param.auId = $('#s_authority').val(); + param.createDate = $('#s_createDate').val(); + return param; +}; + +function initTable() { + $table.DataTable({ + order: [[ 1, 'asc' ]], + ajax: { + url: '<%=basePath%>/account/search', + data: queryParam, + type: 'GET', + dataFilter: function(data){ + $errorArea.empty(); + $errorArea.css("display", "none"); + var json = $.parseJSON(data); + for(var i= 0;i<json.data.length;i++){ + json.data[i].createDate = Commons.format(json.data[i].createDate); + } + + if (json.statusCode && json.statusCode != null) { + $errorArea.empty().append('<div>' + json.statusText + '</div>'); + $errorArea.css("display", "block"); + } + var data = JSON.stringify(json) + return data; // return JSON string + } + }, + columns: [ + { + orderable : false, + /* style : "text-align:center", */ + class : 'styleTable', + width : '30px', + render : function(data, type, row, meta) { + return meta.row+1; + } + }, + { + data : 'userName', + width : '150px' + }, + { + data : 'mailAddress', + width : '150px' + }, + { + data : 'createDate', + width : '120px' + }, + { + data : 'auName', + orderable : false, + width : '120px' + }, + { + className : 'td-operation', + data: null, + defaultContent:'', + orderable : false, + width : '80px', + render: function(data, type, row, meta) { + var context = '<a href="javascript:void(0)" style="color:rgba(134, 142, 150, 1);" title="REVISE" onclick="Commons.showContent(\'<%=basePath%>/account/modify?isDetail=false&userId='+data.userId+'\')"><i class="fa fa-pencil" aria-hidden="true"></i></a> '; + if (data.isDel == 0){ + context += '<a href="javascript:void(0)" style="color:rgba(134, 142, 150, 1);padding:15px;" title="DELETE" class="data-delete" data-data-id="'+data.userId+'" style="margin-left:0.5em"><i class="fa fa-trash" aria-hidden="true"></i></a>'; + context += '<a href="javascript:void(0)" style="color:rgba(134, 142, 150, 1);" title="DETAIL" onclick="Commons.showContent(\'<%=basePath%>/account/modify?isDetail=true&userId='+data.userId+'\')"><i class="fa fa-search-plus" aria-hidden="true"></i></a> '; + + } + return context; + } + } + ], + drawCallback: function(settings) { + TableListDeletePlugin.init('example', '<%=basePath%>/account/search', '<%=basePath%>/account/delete'); + } + }); +} +</script>
\ No newline at end of file diff --git a/warehouse/src/main/webapp/WEB-INF/pages/account/modify.jsp b/warehouse/src/main/webapp/WEB-INF/pages/account/modify.jsp new file mode 100644 index 0000000..79937cf --- /dev/null +++ b/warehouse/src/main/webapp/WEB-INF/pages/account/modify.jsp @@ -0,0 +1,178 @@ +<%@ 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"> + label{ + margin-top:15px; + } + /* .col-sm-4 { + margin-top:-16px; + } */ + #e_au { + height:auto; + } + .div-label{ + margin-top:-10px; + } +</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" id="defaultForm"> + <div class="card-body card-change-password pt0"> + <!-- <div class="card-header"></div> --> + <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> + <div class="card-body" style="min-height:530px;"> + <div class="alert alert-danger" style="display:none" id="modalErrorArea" role="alert"></div> + <form id="registerForm" class="was-validated" action = "accountList"> + <input type="hidden" id="e_userId" value="${appInfo.userId}"> + <div class="form-group row"> + <div class="col-md-3 div-label"><label for="e_userName" class="notNull">User Name </label></div> + <div class="col-md-9"> + <input class="form-control style-height" maxlength="32" placeholder="Maximum length is 32 characters" id="e_userName" name="e_userName" type="text" value="${appInfo.userName}" required> + </div> + </div> + <c:if test="${empty appInfo.userId}"> + <div class="form-group row"> + <div class="col-md-3 div-label"><label for="e_userPw" class="notNull">Password</label></div> + <div class="col-md-9"> + <input class="form-control input-color style-height" id="e_userPw" name="e_userPw" type="password" maxlength="32" placeholder="Between 6 and 32 characters" value="${appInfo.userPw}" required> + </div> + </div> + <div class="form-group row"> + <div class="col-md-3 div-label"><label for="e_reuserPw" class="notNull">Password Confirmation</label></div> + <div class="col-md-9"> + <input class="form-control input-color style-height" id="e_reuserPw" name="e_reuserPw" type="password" maxlength="32" placeholder="The same as the password above" value="${appInfo.reuserPw}" required> + </div> + </div> + </c:if> + <div class="form-group row"> + <div class="col-md-3 div-label"><label for="e_mailAddress" class="notNull">Mail Address</label></div> + <div class="col-md-9"> + <input class="form-control input-color style-height" id="e_mailAddress" maxlength="32" placeholder="Only letters, numbers, and underlines can be used" name="e_mailAddress" value="${appInfo.mailAddress}" required> + </div> + </div> + <div class="form-group row"> + <div class="col-md-3 div-label"><label for="e_au" class="notNull">Authority</label></div> + <div class="col-md-9"> + <select id="e_au" class="form-control" required> + <c:forEach var="list" items="${authorityList}"> + <option value="${list.value}" <c:if test="${list.value eq appInfo.auId}">selected="selected"</c:if>>${list.label}</option> + </c:forEach> + </select> + </div> + </div> + </form> + <div style="float:right" class="col-md-0"> + <button type="button" class="btn btn-primary form-btn-w-70" id="btn-save-edit" onclick="saveaccountForm()">save</button> + <%-- <button type="button" class="btn btn-cancel form-btn-w-70" Style="background-Color:gray" onclick="Commons.showContent('<%=basePath%>/account/')">back</button> --%> + </div> + </div> + </div> + </div> + </c:otherwise> +</c:choose> + +<script src="<%=basePath%>/js/constant.js"></script> +<script> +$(function(){ + Commons.appendRedAsterisk(); + var e_userId = $('#e_userId').val(); + if(e_userId !== ""){ + $('#e_mailAddress')[0].style.border = "1px solid #28a745"; + } + $('#e_userPw').bind('input propertychange', function() { + if($('#e_userPw').val().length > 5 ){ + $('#e_userPw')[0].style.border = "1px solid #28a745"; + }else{ + $('#e_userPw')[0].style.border = "1px solid red"; + } + }); + $('#e_reuserPw').bind('input propertychange', function() { + if($('#e_reuserPw').val().length > 5 ){ + $('#e_reuserPw')[0].style.border = "1px solid #28a745"; + }else{ + $('#e_reuserPw')[0].style.border = "1px solid red"; + } + }); + $('#e_mailAddress').bind('input propertychange', function() { + var szReg=/^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/; + + if(!szReg.test($('#e_mailAddress').val())){ + $('#e_mailAddress')[0].style.border = "1px solid red"; + }else{ + $('#e_mailAddress')[0].style.border = "1px solid #28a745"; + } + }); +}); +var accountForm = function() { + this.userId = ''; + this.userPw = ''; + this.userName = ''; + this.auId = ''; + this.mailAddress = ''; + this.userPw = ''; + this.reuserPw = ''; +}; + +var $errorArea = $('#modalErrorArea'); +var saveaccountForm = function() { + $("#btn-save-edit").attr('disabled',true); + $errorArea.empty(); + $errorArea.css("display", "none"); + var tf = new accountForm(); + tf.userId = $('#e_userId').val(); + tf.reuserPw = $('#e_reuserPw').val(); + tf.userPw = $('#e_userPw').val(); + tf.userName = $('#e_userName').val(); + tf.auId = $('#e_au').val(); + tf.mailAddress = $('#e_mailAddress').val(); + + $.ajax({ + url: '<%=basePath%>/account/update', + cache: false, + type: 'POST', + data: {form: JSON.stringify(tf)}, + success: function (data) { + var json = JSON.parse(data); + if(200 == json.result) { + Commons.showContent('<%=basePath%>' + json.forward); + } else if(401 == json.result) { + 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); + } else if(500 == json.result) { + 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); + } + } + }); + /* } + } */ +}; +</script>
\ No newline at end of file |