<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>工作日历管理</title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
    <style>
        *{
            margin:0;
            padding: 0;
        }
        .daylist{
            width: 400px;
        }
        a{
            text-decoration: none;
            color:#000;
        }
        .dayHead{
            width: 100%;
            height: 45px;
            line-height: 45px;
            background: #0f92fb;
            position: absolute;
            top:-10px;
            left:-10px;
            color:#fff;
            text-align: left;
            padding-left: 5%;
            font-family: '微软雅黑';
        }
        #fancybox-close{
            position: absolute;
            top:10px;
            right:0;
            background-image: none;
            font-size: 25px;
            color:#fff;
        }
        .daycont{
            width: 100%;
            margin-top: 55px;
        }
        .cltime{
            width: 10%;
            float:left;
            height: 10px;
        }
        .clcon{
            width:85%;
            margin-left:5%;
            text-align: left;
            display: inline-block;
        }
    </style>
    <script type="text/javascript">
        function openDialogDelete(title,url,width,height,target) {

            if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端，就使用自适应大小弹窗
                width = 'auto';
                height = 'auto';
            } else {//如果是PC端，根据用户设置的width和height显示。

            }

            top.layer.open({
                type: 2,
                area: [width, height],
                title: title,
                maxmin: true, //开启最大化最小化按钮
                content: url,
                btn: ['删除', '关闭'],
                yes: function (index, layero) {
                    var body = top.layer.getChildFrame('body', index);
                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象，执行iframe页的方法：iframeWin.method();
                    var inputForm = body.find('#inputForm');
                    var top_iframe;
                    if (target) {
                        top_iframe = target;//如果指定了iframe，则在改frame中跳转
                    } else {
                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
                    }
                    inputForm.attr("target", top_iframe);//表单提交成功后，从服务器返回的url在当前tab中展示

                    if (iframeWin.contentWindow.doSubmit()) {
                        // top.layer.close(index);//关闭对话框。
                        setTimeout(function () {
                            top.layer.close(index)
                        }, 100);//延时0.1秒，对应360 7.1版本bug
                    }

                },
                btn2: function (index) {
                }
            });
        }
        $('#fancybox-close').text('×');
    </script>
</head>
<body>
<div>
<%--<div><fmt:formatDate value="${workCalendar.startDate}" pattern="MM-dd"/></div>--%>
<div class="daylist">
    <h3 class="dayHead">主题</h3>
    <div class="daycont">
        <c:forEach items="${list}" var="calendar">
            <div style="width: inherit;">
                <a class="attention-info" href=javascript:void(0); onclick="openDialogDelete('查看工作日历', '${ctx}/workcalendar/workCalendar/view?id=${calendar.id}','95%','95%')">
                    <span class="cltime"><fmt:formatDate value="${calendar.remindTime}" pattern="HH:mm"/></span>
                    <span class="clcon">${calendar.subject}</span>
                </a><div style="clear: both;"></div>
            </div>
        </c:forEach>
    </div>

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