MYNOTE_HEAD.jsp 11.1 KB
Newer Older
Thitichaipun Wutthisak committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249
<!--Edit by Markung-->
<%//request.setAttribute("PORTAL", "1");%>
<%@page contentType="text/html; charset=UTF-8"%>
<%@page import="com.csc.library.util.MyNoteMenu"%>
<%@page import="com.csc.library.session.InitialEnvironment"%>
<%@page import="com.csc.library.utilities.CscCalendar" %>
<%@page import="com.csc.library.utilities.CheckNull" %>

<%request.setCharacterEncoding("UTF-8");%>

<jsp:useBean id="MYNOTE_HEAD" class="com.csc.library.system.Task" scope="page"/>

<%
MYNOTE_HEAD.setChannel(request, response);
MYNOTE_HEAD.checkProfile();
if( MYNOTE_HEAD.getUProfile() != null ){

//	MYNOTE_HEAD.getUProfile().set("appname","WORKFLOW");
	InitialEnvironment environment = new InitialEnvironment("GLOBAL");
	String XMLPath = environment.getValue("workflow_menu-dir");
	String XMLFile = environment.getValue("workflow_menu-file");
	MYNOTE_HEAD.getUProfile().set("menu","workflow_menu");
	MyNoteMenu menu = new MyNoteMenu();

	String news = "";
	String news_swap = "";
	String inbox = "";
	String inbox_swap = "";
	String sharebox = "";
	String sharebox_swap = "";
	String sentbox = "";
	String sentbox_swap = "";
	String delete = "";
	String delete_swap = "";
	String transfer = "";
	String transfer_swap = "";
	String systemm = "";
	String systemm_swap = "";
	String back = "";
	String back_swap = "";
	String exit = "";
	String exit_swap = "";
	String changelang = "";
	String changelang_swap = "";
	String nowlang = MYNOTE_HEAD.getUProfile().get("lang");
	String newlang = "";
	if (nowlang.equalsIgnoreCase("tha")){
		newlang = "eng";
	}else if (nowlang.equalsIgnoreCase("eng")){
		newlang = "tha";
	}


	if(MYNOTE_HEAD.getUProfile().get("lang").equals("eng")){
		news = "../IMAGES/MYNOTE/ICON/NEW.gif";
		news_swap = "../IMAGES/MYNOTE/ICON/NEW_SWAP.gif";
		inbox = "../IMAGES/MYNOTE/ICON/INBOX2.gif";
		inbox_swap = "../IMAGES/MYNOTE/ICON/INBOX2_SWAP.gif";
		sharebox = "../IMAGES/MYNOTE/ICON/SHAREBOX.gif";
		sharebox_swap = "../IMAGES/MYNOTE/ICON/SHAREBOX_SWAP.gif";
		sentbox = "../IMAGES/MYNOTE/ICON/SENTBOX.gif";
		sentbox_swap = "../IMAGES/MYNOTE/ICON/SENTBOX_SWAP.gif";
		delete = "../IMAGES/MYNOTE/ICON/DELETE.gif";
		delete_swap = "../IMAGES/MYNOTE/ICON/DELETE_SWAP.gif";
		transfer = "../IMAGES/MYNOTE/ICON/TRANSFERS.gif";
		transfer_swap = "../IMAGES/MYNOTE/ICON/TRANSFERS_SWAP.gif";
		systemm = "../IMAGES/MYNOTE/ICON/SYSTEM.gif";
		systemm_swap = "../IMAGES/MYNOTE/ICON/SYSTEM_SWAP.gif";
		back = "../IMAGES/MYNOTE/ICON/BACK.gif";
		back_swap = "../IMAGES/MYNOTE/ICON/BACK_SWAP.gif";
		exit = "../IMAGES/MYNOTE/ICON/EXIT.gif";
		exit_swap = "../IMAGES/MYNOTE/ICON/EXIT_SWAP.gif";
		changelang = "../IMAGES/MYNOTE/ICON/THAI.gif";
		changelang_swap = "../IMAGES/MYNOTE/ICON/THAI_SWAP.gif";
	}else{
		news = "../IMAGES/MYNOTE/ICON/NEW_TH.gif";
		news_swap = "../IMAGES/MYNOTE/ICON/NEW_SWAP_TH.gif";
		inbox = "../IMAGES/MYNOTE/ICON/INBOX_TH.gif";
		inbox_swap = "../IMAGES/MYNOTE/ICON/INBOX_SWAP_TH.gif";
		sharebox = "../IMAGES/MYNOTE/ICON/SHAREBOX_TH.gif";
		sharebox_swap = "../IMAGES/MYNOTE/ICON/SHAREBOX_SWAP_TH.gif";
		sentbox = "../IMAGES/MYNOTE/ICON/SENTBOX_TH.gif";
		sentbox_swap = "../IMAGES/MYNOTE/ICON/SENTBOX_SWAP_TH.gif";
		delete = "../IMAGES/MYNOTE/ICON/DELETE_TH.gif";
		delete_swap = "../IMAGES/MYNOTE/ICON/DELETE_SWAP_TH.gif";
		transfer = "../IMAGES/MYNOTE/ICON/TRANSFERS_TH.gif";
		transfer_swap = "../IMAGES/MYNOTE/ICON/TRANSFERS_SWAP_TH.gif";
		systemm = "../IMAGES/MYNOTE/ICON/SYSTEMS_TH.gif";
		systemm_swap = "../IMAGES/MYNOTE/ICON/SYSTEMS_SWAP_TH.gif";
		back = "../IMAGES/MYNOTE/ICON/BACK_TH.gif";
		back_swap = "../IMAGES/MYNOTE/ICON/BACK_SWAP_TH.gif";
		exit = "../IMAGES/MYNOTE/ICON/EXIT_TH.gif";
		exit_swap = "../IMAGES/MYNOTE/ICON/EXIT_SWAP_TH.gif";
		changelang = "../IMAGES/MYNOTE/ICON/ENG.gif";
		changelang_swap = "../IMAGES/MYNOTE/ICON/ENG_SWAP.gif";
	}
%>
<%

	String csdate="";
	String cstime="";
	CscCalendar cs = new CscCalendar();

	if( "ENG".equalsIgnoreCase((String)MYNOTE_HEAD.getUProfile().get("lang"))) {
	    csdate = cs.getEngFull();
	}else{
	    csdate = cs.getThaiFull();
	}
	cstime = cs.getHHMM();
%>
<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="/hr/CSS/Bootstrap/css/bootstrap.css">
	<script type="text/javascript" src="../JS/jquery-2.1.3.min.js"></script>
	<script type="text/javascript" src="../CSS/Bootstrap/js/bootstrap.min.js"></script>
	<script src="../JS/angular-1.3.15/angular.js" type="text/javascript"></script>
	<script src="../JS/ANGULAR/SCREEN_ANGULAR.js" type="text/javascript"></script>
	<script type='text/javascript'>
	function changeLang(lang,now_lang){
		if (now_lang!=lang){
			$.ajax({
				type:"POST",
				url:"<%=request.getContextPath()%>/EMPVIEW/EMV_SETLANG.jsp",
				cache: false,
				data: "lang="+lang,
				success: function(){
					location.reload();
				}
			});
		}
	}
	</script>
<section ng-app>
<% if(!new CheckNull().chkNullString(request.getParameter("__cancellation")).equalsIgnoreCase("true")){ %>
<div align="center">
	<TABLE WIDTH=950 BORDER="0" ALIGN="center" CELLPADDING="0" CELLSPACING="0">

		<!--tr>
			<td width=168><img src="../IMAGES/MYNOTE/HEAD_NSTDA_01.gif" width="168" height="77" alt=""></td>
		  <td width=782><img src="../IMAGES/MYNOTE/HEAD_NSTDA_02.gif" width="612" height="77" alt=""><img src="../IMAGES/MYNOTE/HEAD_NSTDA_03.gif" width="170" height="77" alt=""></td>
		</tr-->
		<TR>
			<TD ><jsp:include page="BANNER.jsp" flush="true" /></TD>
		</TR>
		<TR>
			<TD WIDTH=950  VALIGN="top" BACKGROUND="../IMAGES/MYNOTE/BPM_06.jpg"  COLSPAN="2">
				<TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="txt01">
					<TR height="28">
					 	<TD background="../IMAGES/EMPVIEW/BG_MENU.gif"colspan = "2" ALIGN = "LEFT" >&nbsp;&nbsp;&nbsp;
					 		<font color="#000">
					 			<STRONG>
					 				<span swlang code='SW007878'>User</span> :</STRONG> <STRONG><%=MYNOTE_HEAD.getUProfile().get("fullname")%>
					 			</STRONG>
					 		</font>
					 	</TD>
						<td width="40%" background="../IMAGES/EMPVIEW/BG_MENU.gif"><div align="center"><strong><img src="../IMAGES/HEADER/ED.png" /></strong></div>
						</td>
					  	<TD  background="../IMAGES/EMPVIEW/BG_MENU.gif" ALIGN="right" ><STRONG><font color="#000"><span swlang code='SW000002'>Date</span>  : <%=csdate%>&nbsp;
		               		<span swlang code='SW000283'>Time</span> : <%=cstime%>&nbsp;</font></STRONG>
		           		</TD>
					</TR>
		            <TR height="1">
		            	<TD></TD>
		            </TR>

				</TABLE>
				<div style="width:100%;height:50px;margin-bottom:40px;">
					<!-- <a HREF="#" onClick="MM_openBrWindow('../MYNOTE/FORM_LIST.jsp','','SCROLLBARS=yes,STATUS=yes,RESIZABLE=yes,WIDTH=750,HEIGHT=450')" class="wf-icon">
		                <img SRC="<%=news%>" alt="" border="0" name="Image21" border="0" id="Image21" onmouseover="MM_swapImage('Image21','','<%=news_swap%>',1)" onmouseout="MM_swapImgRestore()">
					</a> -->
					<button type="button" data-toggle="modal" data-target="#myModal" style="border:0px;">
						<img SRC="<%=news%>" alt="" border="0" name="Image21" border="0" id="Image21" onmouseover="MM_swapImage('Image21','','<%=news_swap%>',1)" onmouseout="MM_swapImgRestore()">
					</button>
					<a HREF="../MYNOTE/INBOX.jsp" id="INBOX" style="display:none;" class="wf-icon">
						<img SRC="<%=inbox%>" alt="" border="0" name="Image23" border="0" id="Image23" onmouseover="MM_swapImage('Image23','','<%=inbox_swap%>',1)" onmouseout="MM_swapImgRestore()">
					</a>
					<a HREF="../MYNOTE/SHAREBOX_MENU.jsp" class="wf-icon" id="SHAREBOX" style="display:none;">
						<img SRC="<%=sharebox%>" alt="" border="0" name="Image24" border="0" id="Image24" onmouseover="MM_swapImage('Image24','','<%=sharebox_swap%>',1)" onmouseout="MM_swapImgRestore()">
					</a>
					<a HREF="../MYNOTE/SENT_BOX.jsp" id="SENTBOX" style="display:none;" class="wf-icon">
						<img SRC="<%=sentbox%>" alt="" border="0" name="Image25" border="0" id="Image25" onmouseover="MM_swapImage('Image25','','<%=sentbox_swap%>',1)" onmouseout="MM_swapImgRestore()">
					</a>
					<a href="JavaScript:goDelete();" class="wf-icon">
						<img SRC="<%=delete%>" alt="" border="0" name="Image30" border="0" id="Image30" onmouseover="MM_swapImage('Image30','','<%=delete_swap%>',1)" onmouseout="MM_swapImgRestore()">
					</a>
					<a HREF="../WORKFLOW/USER_PROFILE_WORKFLOW_MENU.jsp" class="wf-icon">
						<img SRC="<%=transfer%>" alt="" border="0" name="Image22" border="0" id="Image22" onmouseover="MM_swapImage('Image22','','<%=transfer_swap%>',1)" onmouseout="MM_swapImgRestore()">
					</a>
					<a HREF="../WORKFLOW_ADMIN/WORKFLOW_ADMIN_MENU.jsp" id="SYSTEM" style="display:none;" class="wf-icon">
						<img SRC="<%=systemm%>" alt="" border="0" name="Image26" border="0" id="Image26" onmouseover="MM_swapImage('Image26','','<%=systemm_swap%>',1)" onmouseout="MM_swapImgRestore()">
					</a>
					<a HREF="JavaScript:logOut();" class="wf-icon">
						<img SRC="<%=back%>" alt="" border="0" name="Image27" border="0" id="Image27" onmouseover="MM_swapImage('Image27','','<%=back_swap%>',1)" onmouseout="MM_swapImgRestore()">
					</a>
					<a HREF="../LOGOUT.jsp" class="wf-icon">
						<img SRC="<%=exit%>" alt="" border="0" name="Image28" border="0" id="Image28" onmouseover="MM_swapImage('Image28','','<%=exit_swap%>',1)" onmouseout="MM_swapImgRestore()">
					</a>
					<a href="JavaScript:changeLang('<%=newlang%>', '<%=nowlang%>');" id="mylang">
						<img src="<%=changelang%>" border="0" name="Image29" id="Image29" onmouseover="MM_swapImage('Image29','','<%=changelang_swap%>',1)" onmouseout="MM_swapImgRestore()" align="right"></img>
					</a>
				</div>
<!-- Modal -->
<div id="myModal" class="modal fade" role="dialog" >
	<div class="modal-dialog" style="min-width:50%;">
		<!-- Modal content-->
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">&times;</button>
				<h4 class="modal-title" swlang code='SW012784'>Workflow Menu</h4>
			</div>
			<div class="modal-body" ng-init='list =<%=menu.getJson(XMLPath,XMLFile,MYNOTE_HEAD.getUProfile()).toString()%>'>
				<div id="menu">
						<div class="panel list-group" ng-repeat=" item in list " style="margin:3px;">
							<a href="#"  class="list-group-item" data-toggle="collapse" data-target="{{ '#'+$index }}" data-parent="#menu" style="background:linear-gradient(141deg, #0fb8ad 0%, #1fc8db 51%, #2cb5e8 75%);border-color:#00BFA5;color:#484848;font-weight:bold;">
								{{ item.name }}
								<span class="badge">{{ item.child.length }}</span>
							</a>
							<div id="{{ $index }}" class="sublinks {{ ($index==1)?'in':'collapse' }}">
								<a class="list-group-item small" ng-repeat=" child in item.child" href="{{ child.link }}" ><span class="glyphicon glyphicon-link"></span> <span>{{ (child.swlang != '')?child.swlang:child.name }}</span></a>
							</div>
						</div>
				</div>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
			</div>
		</div>
	</div>
</div>
<% } %>
</section>
<style>
	.wf-icon {
		text-decoration: none !important;
	}
</style>
<script>
	var arr = <%=menu.getDataMenu(XMLPath,XMLFile,MYNOTE_HEAD.getUProfile())%>;
	for(var i=0;i<arr.length;i++){
		if(document.getElementById( arr[i].ename )){
			document.getElementById( arr[i].ename ).style.display = "";
		}
	}
</script>
<%
}
%>


<!--2016-->