<%@ taglib uri="webwork" prefix="webwork" %>
<%@ taglib uri="webwork" prefix="ui" %>
<%@ taglib uri="sitemesh-page" prefix="page" %>

<html>
<head>
    <title>Func Master 3000</title>
    <script language="JavaScript" type="text/javascript" src="<%=request.getContextPath()%>/includes/js/effects/prototype.js"></script>
    <script language="JavaScript" type="text/javascript" src="<%=request.getContextPath()%>/includes/js/effects/scriptaculous.js"></script>
    <script language="JavaScript" type="text/javascript" src="<%=request.getContextPath()%>/includes/js/jira-global.js"></script>
    <script language="JavaScript" type="text/javascript" src="<%=request.getContextPath()%>/func/func.js"></script>
    <script language="JavaScript" type="text/javascript" src="<%=request.getContextPath()%>/func/obj.js"></script>
    <link type="text/css" rel="StyleSheet" href="<%= request.getContextPath() %>/func/func.css" />
</head>
<body>

<form id="urlForm" method="post" action="#" onsubmit="return loadPage();">
    <input type="text" name="currentUrl" id="currentUrl" />
</form>

<div id="commands">
    <a class="deleteLink" href="#" onclick="removeAllCommands();return false">remove all</a>
    <a class="deleteLink" href="#" onclick="extractCommands();return false">extract</a>
    <h2>Commands Executed</h2>
    &nbsp;
    <ol id="commandsList">
    </ol>
    &nbsp;
    <textarea id="commandsText" style="display:none;"></textarea>
</div>

<div id="frameHolderHolder" >
    <iframe id="frameHolder" name="frameHolder" src="<%=request.getContextPath()%>/secure/Dashboard.jspa">
    </iframe>
</div>
<script language="JavaScript" type="text/javascript">
<!--
    loadUrl();
//-->
</script>

<div class="othercrap">
    <div class="tools">
        <a href="#" onclick="assertPresent();return false;">Assert present</a> |
        <a href="#" onclick="assertBefore();return false;" id="assertBefore">Assert before..</a> |
        <a href="#" onclick="displayAllIssues(); return false;">displayAllIssues()</a> |
        <a href="#" onclick="saveUrl(); return false;">Save current url</a>
    </div>

    <%@include file="/debug/jsdebug.jsp"%>


    <iframe id="hiddenIFrame" name="hiddenIFrame"  class="hidden">
    </iframe>
</div>

<script language="JavaScript" type="text/javascript">
<!--
<webwork:iterator value="./allEvents" status="'status'">
<webwork:if test="./alternativeHandlerMethod">
addEventsToListen('<webwork:property value="./tagName" />' , '<webwork:property value="./eventType" />', <webwork:property value="alternativeHandlerMethod" />);
</webwork:if>
<webwork:else>
addEventsToListen('<webwork:property value="./tagName" />' , '<webwork:property value="./eventType" />');
</webwork:else>
</webwork:iterator>

addEventsToListen('textarea' , 'blur', handleInput);
addEventsToListen('input' , 'click', handleSubmit);

//-->
</script>

</body>
</html>