<%@ page language="java" pageEncoding="utf-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>阅卷平台高校版</title>
    <link href="${ctxStatic}/mark-track/css/bootstrap.css" rel="stylesheet" type="text/css"/>
    <link href="${ctxStatic}/mark-track/css/style.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="${ctxStatic}/utils/image-utils.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-track/js/json2.js"></script>
    
    <script type="text/javascript" src="${ctxStatic}/mark-track/js/jquery.min.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-track/js/jquery-ui.min.js "></script>
    <script type="text/javascript" src="${ctxStatic}/mark-track/js/jquery.mousewheel.min.js"></script>
    
    <script src="${ctxStatic}/i18n/jquery.i18n.properties.js" type="text/javascript"></script>
    <script src="${ctxStatic}/i18n/load.js" type="text/javascript"></script>
    
    <script type="text/javascript" src="${ctxStatic}/mark-track/js/mark-control.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-new/js/task-control.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-track/js/modules/object-view.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-track/js/modules/sheet-view.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/slice-view.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-track/js/modules/mark-board.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/mark-history.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/mark-status.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/image-builder.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/warning-info.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/thumbnail.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-track/js/modules/single-image-view.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/change-name.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/view-sidebar.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/specialTag.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/problem-process.js"></script>
    <script type="text/javascript" src="${ctxStatic}/mark-new/js/modules/switch-group.js"></script>
</head>
<body ondragstart="return false;" ondrop="return false;">
<div class="container-fluid" id="container"></div>
<script type="text/javascript">
    $(document).ajaxError(function (evt, req, settings) {
        if (req.status == 401) {
            alert("账号已在其他地方登录！");
            window.location.href = '/mark-login';
        }
    });

    $(document).ready(function () {
        var mc = new MarkControl({
            container: $('#container'),
            staticServer: '${ctxStatic}',
            imageServer: '${fileServer}',
            userId: '${marker.id}',
            userName: '${web_user.name}',
            logoutUrl: '${ctx}/mark/logout',
            //clearUrl: '${ctx}/mark/clear',
            <c:if test="${forceMode==false}">
            switchCommonUrl: '${ctx}/mark/index?mode=common',
            </c:if>
            forceSpecialTag: eval('${forceSpecialTag}'.toLowerCase()),
            <c:if test="${defaultSetting!=null}">
            defaultSetting: '${defaultSetting}',
            </c:if>
            settingSyncUrl: '${ctx}/mark/update-setting',
            modules: {
                'single-image-view': {},
                'image-builder': {
                    splitConfig: [${properties['slice.split.config']}]
                },
                'mark-status': {
                    simple: false,
                    subjectSelectUrl: '${ctx}/mark/subject-select',
                    subjectName: '${subject.displayName}_${marker.groupNumber}'
                },
                'mark-history': {
                    pageSize: 10
                },
                'mark-board': {
                    showScoreBoard: false,
                    autoSubmit: false,
                    needConfirm: false,
                    showTotalScore: true
                    <c:if test="${enableAllZero==true}">
                    , enableAllZero: true
                    </c:if>
                },
                'warning-info': {},
                <c:if test="${isFormal==true}">
                'problem-process': {
                    problemTypes: '${problemTypes}'
                },
                </c:if>
                'change-name': {
                    url: '${ctx}/mark/change-name'
                },
                'switch-group': {
                    url: '${ctx}/mark/subject-select',
                    groups: '${groups}'
                },
                'specialTag': {},
                'slice-view': {
                    server: '${fileServer}'
                },
                <c:if test="${sheetView==true}">
                'sheet-view': {
                    server: '${fileServer}',
                    sheetConfig: '${sheetConfig}'
                },
                </c:if>
                'thumbnail': {},
                'object-view': {
                    list: [
                        {
                            title: getMessage('mark.sidebar.paper'),
                            url: '<c:if test="${subject.paperUrl!=null}">${fileServer}${subject.paperUrl}</c:if>'
                        },
                        {
                            title: getMessage('mark.sidebar.answer'),
                            url: '<c:if test="${subject.answerUrl!=null}">${fileServer}${subject.answerUrl}</c:if>'
                        }
                    ]
                }
            }
        });
        mc.start({
            mode: 'loop',
            statusUrl: '${ctx}/mark/status',
            getUrl: '${ctx}/mark/gettask',
            historyUrl: '${ctx}/mark/gethistory',
            submitUrl: '${ctx}/mark/savetask'
            //clearUrl : '${ctx}/mark/clear'
        });
    });
</script>
</body>
</html>