﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
  <xsl:include href="../Version_2_0/PopUpHeader.xslt"/>

  <xsl:output method="xml" indent="yes"/>

  <xsl:template match="/">
    <xsl:variable name="PortalItemID" select="AjaxRequest/Params/PortalItemID"></xsl:variable>
    <xsl:variable name="SourceID" select="AjaxRequest/Params/SourceID"></xsl:variable>
    <xsl:variable name="TemplateURL" select="AjaxRequest/TemplateURL"></xsl:variable>
    <xsl:variable name="DestXML" select="AjaxRequest/DestXML/."></xsl:variable>


    <xsl:call-template name="PopUpHeader">
      <xsl:with-param name="ItemID" select="$PortalItemID"></xsl:with-param>
      <xsl:with-param name="TemplateURL" select="$TemplateURL"></xsl:with-param>
      <xsl:with-param name="HeaderText">
        <xsl:text>Add New Column</xsl:text>
      </xsl:with-param>
    </xsl:call-template>

    <table class="tableMaster" cellpadding="5" cellspacing="5">
      <tr>
        <td width="20%">
          <span class="packageTitle">Column Name</span>
        </td>
        <td width="80%">
          <input id="txtColName_{$PortalItemID}" type="text" style="width:200px;"></input>
        </td>
      </tr>
      <tr>
        <td>
          <span class="packageTitle">Dest</span>
        </td>
        <td>
          <select id="opt_Dest_{$PortalItemID}" class="smallDropdown">
            <option value="-99">-Select-</option>
            <xsl:for-each select="$DestXML/Dest">
              <option value="{RawColID}">
                <xsl:value-of select="RawCol"/>
              </option>
            </xsl:for-each>
          </select>
        </td>
      </tr>
      <tr>
        <td>
          <span class="packageTitle">Comments</span>
        </td>
        <td>
          <textarea id="txtComments_{$PortalItemID}" style="width:350px;height:50px;"
                    onFocus="removeWhiteSpace('txtComments_{$PortalItemID}');"></textarea>
        </td>
      </tr>
      <tr>
        <td></td>
        <td>
          <div class="verticallyMiddle onMouseOver divBrowseGradient spanBrowseGradientTextGray" style="width:70px;line-height:22px;"
           onmouseover="document.getElementById('img_AddSource').src='{$TemplateURL}Web/Images/Ver_2_0/icon_add_over.png';"
           onmouseout="document.getElementById('img_AddSource').src='{$TemplateURL}Web/Images/Ver_2_0/icon_Add.png';"
           onclick="SaveDataXSourceColumn('{$SourceID}','{$PortalItemID}','txtColName_{$PortalItemID}','opt_Dest_{$PortalItemID}','txtComments_{$PortalItemID}');">
            <img id="img_AddSource" src="{$TemplateURL}Web/Images/Ver_2_0/icon_Add.png" align="absmiddle" style="padding-left:8px;" class="marginRight5"></img>
            <span id="span_saveSource" class="capitalFont">save</span>
          </div>
        </td>
      </tr>
    </table>
  </xsl:template>
</xsl:stylesheet>
