<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="org.wdk.WDKConstant"%>
<%@ page import="org.wdk.WDKCore"%>
<%@ page import="org.wdk.WDK"%>
<%@ page import="com.noblelift.imp.platform.module.portal.source.SessionUser"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
	String WDK_ROOT = WDKCore.WDK_ROOT;
	SessionUser su = (SessionUser)WDK.getSessionUser(request, response);
	WDK.writeSessionUser(out, su);
%>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! -->
		
		<base href="<%=basePath%>" target="_self">
		<title>周选择控件</title>
		<script type="text/javascript" src="<%=WDK_ROOT%>/theme/je/core/js/wdk.js"></script>
		<script type="text/javascript" src="platform/report/js/pf.report.js"></script>
		<script type="text/javascript">
	  	<% if(null==su){%>    
	  		$.timeout();
	  	<%}%>
	  		 $(function(){
	  		 	//_alert($.fn.weekcalendar.defaults.firstDay);
	  		 	$('#cc').weekcalendar({
	  		 		onSelect:function(week){
	  		 			//console.log(week);
	  		 		}
	  		 	});

	  		 	$('#olddt').datebox({
	  		 		onSelect:function(week){
	  		 			alert(1);
	  		 		}
	  		 	});
	  		 	 

	  		 	$('#ff').weekbox({
	  		 		firstDay:0,
					onSelect:function(week){
						console.log('您选择的周为:');
	  		 			console.log(week);
	  		 		}
	  		 	});

	  		 });
	  		 function setValye(){

	  		 	$('#ff').weekbox('setValue',{year:2016,week:11});
	  		 }
	  	function lastWeek(){
	  		var aa = $('#ff').weekbox('getValue');
	  		var newVal = $.getLastWeek(aa,1);
	  		console.log(newVal);
	  	}
		function getValye(){
			var aa = $('#ff').weekbox('getValue');
			console.log(aa);
		}	
  
		</script>	
		 

	</head>
	
	<body  class="easyui-layout" data-options="fit:true">
		<div data-options="region:'west',border:false,collapsed:false" class="page-title" style="overflow:hidden;width: 500px;">
			 <input id="ff"  type="text" style="width:200px;height: 35px;"></input>  
			  <input type="button" value="取值" onclick="getValye()"></input>
		  <input type="button" value="设置值" onclick="setValye()"></input>
		  <input type="button" value="上一周" onclick="lastWeek()"></input>
		  <br><br>

		  <input id="olddt"  type="text" style="width:200px;height: 35px;"></input> 
		</div>
		<div data-options="region:'center',border:false,collapsed:false" class="page-title">
			 <div id="cc" style="width:201px;height:180px;"></div>  

		  <br><br><br>
		  <div id="ee" style="width:180px;height:180px;"></div>  

		</div>
		  
		 
		 
	</body>
</html>