<%@ page import="org.apache.commons.lang.StringUtils" %>
<%@ page import="org.migor.shared.enums.CacheArea" %>
<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <%-- Force IE8 Content Type --%>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <%-- ############### CSS ############### --%>
    <title>migor</title>

    <% boolean debug = !"true".equalsIgnoreCase(request.getHeader("debug")); %>  <%-- TODO: reset --%>
    <% if (debug) { %>
    <link href="css/migor.css" rel="stylesheet" type="text/css"/>
    <link href="css/jquery-ui-1.10.3.custom.css" rel="stylesheet" type="text/css"/>
    <link href="css/jquery.dataTables_themeroller.css" rel="stylesheet" type="text/css"/>
    <%--<link href="css/tinyeditor.css" rel="stylesheet" type="text/css"/>--%>
    <link href="css/jquery.cleditor.css" rel="stylesheet" type="text/css"/>
    <% } else { %>
    <link href="css/migor-comb.min.css" rel="stylesheet" type="text/css"/>
    <% } %>


    <%-- ############### JS ############### --%>
    <%-- RESReasy Stub; on this userLocation you can find all js requst methods generated by RESTeasy --%>
    <%--suppress JspAbsolutePathInspection, HtmlUnknownTarget --%>
    <script type="text/javascript" src="/migor/services/rest/js"></script>

    <%-- Plugins --%>
    <script type="text/javascript" src="js/plugins/jquery-1.10.2.js"></script>
    <script type="text/javascript" src="js/plugins/jquery-ui-1.10.3.custom.js"></script>
    <script type="text/javascript" src="js/plugins/jquery.dataTables-1.9.4.js"></script>
    <script type="text/javascript" src="js/plugins/jquery.dataTables.plugin.columnFilter.js"></script>
    <script type="text/javascript" src="js/plugins/jquery.form.js"></script>
    <script type="text/javascript" src="js/plugins/jquery.blockUI-2.64.0.js"></script>
    <%--<script type="text/javascript" src="js/plugins/tiny.editor.js"></script>--%>
    <script type="text/javascript" src="js/plugins/jquery.cleditor.js"></script>
    <script type="text/javascript" src="js/plugins/jquery.datetimepicker-0.9.6.js"></script>
    <script type="text/javascript" src="js/plugins/khtml_all.js"></script>


    <% if (debug) { %>
    <script type="text/javascript" src="js/widgets/widget-geoLocation.js"></script>
    <script type="text/javascript" src="js/widgets/widget-components.js"></script>
    <script type="text/javascript" src="js/widgets/widget-titleBar.js"></script>
    <script type="text/javascript" src="js/widgets/widget-menuBar.js"></script>
    <script type="text/javascript" src="js/widgets/widget-form.js"></script>
    <script type="text/javascript" src="js/widgets/widget-map.js"></script>

    <script type="text/javascript" src="js/config.js"></script>
    <script type="text/javascript" src="js/utils.js"></script>
    <script type="text/javascript" src="js/init.js"></script>
    <script type="text/javascript" src="js/rest.js"></script>
    <script type="text/javascript" src="js/dialogs.js"></script>

    <%--Pages--%>
    <script type="text/javascript" src="js/pages/page-customerConfiguration.js"></script>
    <script type="text/javascript" src="js/pages/page-cacheEntries.js"></script>
    <script type="text/javascript" src="js/pages/page-nodeStatus.js"></script>
    <script type="text/javascript" src="js/pages/page-locationEntries.js"></script>
    <% } else { %>
    <script type="text/javascript" src="js/migor-comb.min.js"></script>
    <% } %>
    <%-- Widgets --%>

    <script type="text/javascript ">

    </script>


    <!-- EXECUTE INIT SCRIPT -->
    <script type="text/javascript">
        $(document).ready(function () {
            migor.bootstrap.init();
        });

        version = '${project.version}';
        buildNumber = '${buildNumber}';

        try {
            timestamp = new Date(${timestamp});
        } catch (exception) {
            // ignore
        }

        cacheAreas = ['<%= CacheArea.USERS %>', '<%= CacheArea.LOCATIONS %>', '<%= CacheArea.NODE_STATUS %>'];
    </script>
</head>
<body>
<div id="migor-titleBar"></div>

<div id="migor-menu">
    <ul id="migor-menuBar">

    </ul>
</div>

<div id="migor-content">
    <ul>

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