<commit_before><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="im"%>
<%@ taglib uri="http://flymine.org/imutil" prefix="imutil" %>

<!-- exportOptions.jsp -->
<html:xhtml/>

<link rel="stylesheet" href="css/exportOptions.css" type="text/css" />
<script src="js/jquery-1.2.6.js" type="text/javascript" ></script>
<script src="js/exportoptions.js" type="text/javascript" ></script>
<script src="js/jquery-ui-personalized-1.5.2.min.js" type="text/javascript"></script>

<script type="text/javascript">
  jQuery.noConflict();
  // Use jQuery via jQuery(...)
  jQuery(document).ready(function(){
    jQuery('#pathsList').sortable({
            revert: true
        });
  });
</script>

<style type="text/css" media="screen">
    #pathsList {
        list-style-position: inside; 
        cursor: hand; 
        cursor: pointer;
    }
    #pathsList li{
        float:left;
        list-style: none;
        border:1px solid #bbbbbb;
        background:#FFF;
        padding:5px;
        margin:5px 1px 10px 1px;
    }
</style>

<tiles:get name="objectTrail.tile"/>

<fmt:message var="exportSubmitMessage" key="export.submit"/>

<div align="center">
<div style="clear:both;width:60%" class="body" align="left">
<html:form action="/${type}ExportAction" onsubmit="updatePathsString();">
<fieldset>
<legend><c:choose>
  <c:when test="${type == 'csv' || type == 'excel'}">
    <fmt:message key="exporter.${type}.description">
      <fmt:param value="${WEB_PROPERTIES['max.excel.export.size']}"/>
    </fmt:message>
    <fmt:message var="exportReorderMessage" key="export.reorder.columns"/>
  </c:when>
  <c:otherwise>
    <fmt:message var="exportReorderMessage" key="export.reorder"/>
    <fmt:setBundle basename="model"/>
    <fmt:message key="exporter.${type}.description"/>
  </c:otherwise>
</c:choose></legend>

<!-- exporting type: ${type} -->
<ol>
  <li><fieldset><c:choose>
    <c:when test="${type == 'csv'}">
      <legend>Choose a format:</legend>
      <ol>
        <li><html:radio property="format" value="csv"/><label>Comma separated values</label></li>
        <li><html:radio property="format" value="tab"/><label>Tab separated values</label></li>
      </ol>
    </c:when>
    <c:when test="${type == 'excel'}">
      <%-- no extra options --%>
    </c:when>
    <c:otherwise>
      <c:set var="tileName" value="${type}ExportOptions.tile"/>
      <tiles:insert name="${tileName}"/>
    </c:otherwise>
  </c:choose></fieldset></li>

  <html:hidden property="pathsString" styleId="pathsString" value="${pathsString}"/>
  <html:hidden property="table" value="${table}"/>
  <html:hidden property="type" value="${type}"/>

  <li><label>Add column:</label> &nbsp;
  <tiles:insert name="availableColumns.tile">
     <tiles:put name="table" value="${table}" />
  </tiles:insert>
  &nbsp;
  <button type="button" onclick="javascript:addSelectedPath()">Add</button></li>    

  <li><label>${exportReorderMessage}:</label>
  <ul id="pathsList">
  </ul>
  
  <script type="text/javascript">
      pathIndex = 1;
      
	  <c:forEach var="path" items="${pathsMap}">
	     addPathElement("${path.key}", "${path.value}");
	  </c:forEach>
  </script></li>
</ol>
</fieldset>
  <fieldset class="submit"><html:submit property="submit">${exportSubmitMessage}</html:submit></fieldset>
</html:form>
</div>
</div>
<!-- /exportOptions.jsp -->
<commit_msg>remove object trail from export page because it's buggy<commit_after><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="im"%>
<%@ taglib uri="http://flymine.org/imutil" prefix="imutil" %>

<!-- exportOptions.jsp -->
<html:xhtml/>

<link rel="stylesheet" href="css/exportOptions.css" type="text/css" />
<script src="js/jquery-1.2.6.js" type="text/javascript" ></script>
<script src="js/exportoptions.js" type="text/javascript" ></script>
<script src="js/jquery-ui-personalized-1.5.2.min.js" type="text/javascript"></script>

<script type="text/javascript">
  jQuery.noConflict();
  // Use jQuery via jQuery(...)
  jQuery(document).ready(function(){
    jQuery('#pathsList').sortable({
            revert: true
        });
  });
</script>

<style type="text/css" media="screen">
    #pathsList {
        list-style-position: inside;
        cursor: hand;
        cursor: pointer;
    }
    #pathsList li{
        float:left;
        list-style: none;
        border:1px solid #bbbbbb;
        background:#FFF;
        padding:5px;
        margin:5px 1px 10px 1px;
    }
</style>
<%-- TODO FIXME
<tiles:get name="objectTrail.tile"/>
 --%>
<fmt:message var="exportSubmitMessage" key="export.submit"/>

<div align="center">
<div style="clear:both;width:60%" class="body" align="left">
<html:form action="/${type}ExportAction" onsubmit="updatePathsString();">
<fieldset>
<legend><c:choose>
  <c:when test="${type == 'csv' || type == 'excel'}">
    <fmt:message key="exporter.${type}.description">
      <fmt:param value="${WEB_PROPERTIES['max.excel.export.size']}"/>
    </fmt:message>
    <fmt:message var="exportReorderMessage" key="export.reorder.columns"/>
  </c:when>
  <c:otherwise>
    <fmt:message var="exportReorderMessage" key="export.reorder"/>
    <fmt:setBundle basename="model"/>
    <fmt:message key="exporter.${type}.description"/>
  </c:otherwise>
</c:choose></legend>

<!-- exporting type: ${type} -->
<ol>
  <li><fieldset><c:choose>
    <c:when test="${type == 'csv'}">
      <legend>Choose a format:</legend>
      <ol>
        <li><html:radio property="format" value="csv"/><label>Comma separated values</label></li>
        <li><html:radio property="format" value="tab"/><label>Tab separated values</label></li>
      </ol>
    </c:when>
    <c:when test="${type == 'excel'}">
      <%-- no extra options --%>
    </c:when>
    <c:otherwise>
      <c:set var="tileName" value="${type}ExportOptions.tile"/>
      <tiles:insert name="${tileName}"/>
    </c:otherwise>
  </c:choose></fieldset></li>

  <html:hidden property="pathsString" styleId="pathsString" value="${pathsString}"/>
  <html:hidden property="table" value="${table}"/>
  <html:hidden property="type" value="${type}"/>

  <li><label>Add column:</label> &nbsp;
  <tiles:insert name="availableColumns.tile">
     <tiles:put name="table" value="${table}" />
  </tiles:insert>
  &nbsp;
  <button type="button" onclick="javascript:addSelectedPath()">Add</button></li>

  <li><label>${exportReorderMessage}:</label>
  <ul id="pathsList">
  </ul>

  <script type="text/javascript">
      pathIndex = 1;

    <c:forEach var="path" items="${pathsMap}">
       addPathElement("${path.key}", "${path.value}");
    </c:forEach>
  </script></li>
</ol>
</fieldset>
  <fieldset class="submit"><html:submit property="submit">${exportSubmitMessage}</html:submit></fieldset>
</html:form>
</div>
</div>
<!-- /exportOptions.jsp -->

{'fraction_non_alphanumeric': 0.22305287481310318, 'fraction_numerical': 0.00434959902134022, 'mean_word_length': 4.120389700765483, 'pattern_counts': {'":': 0, '<': 212, '<?xml version=': 0, '>': 212, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4889267', 'n_tokens_mistral': 2610, 'n_tokens_neox': 2515, 'n_words': 414}