Commit af7a034a authored by steurwadkar's avatar steurwadkar

Bug fixing for Item Type wizard


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@105229 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 181ad2d0
......@@ -464,6 +464,10 @@ function isNumeric(evt)
function getItemAttData(tableID)
{
MakePopup();
//Added by Santosh on 04/04/2017 [Start]
document.getElementById("dropDownVal").value = 'Y';
document.getElementById("p_active_yn_value").selectedIndex = 0;
//Added by Santosh on 04/04/2017 [End]
$('#itemAttDiv').show();
$("#someID").append(document.getElementById("itemAttDiv"));
document.getElementById("p_attrib_id").value = "";
......@@ -481,15 +485,34 @@ function openRowData(attId,desc,shDesc,active,sortOrder,idnum)
{
MakePopup();
$('#itemAttDiv').show();
var tableObj = document.getElementById("ItemTypeDetail");
var curRow = tableObj.rows[idnum];
$("#someID").append(document.getElementById("itemAttDiv"));
document.getElementById("idNumPack").value = idnum;
document.getElementById("p_attrib_id").value = attId;
/*document.getElementById("p_attrib_id").value = attId;
document.getElementById('p_attrib_id').readOnly = true;
document.getElementById("p_descr").value = desc;
document.getElementById("p_sh_descr").value = shDesc;
document.getElementById("p_active_yn").value = active;
document.getElementById("p_sort_order").value = sortOrder;
document.getElementById("p_sh_descr").value = shDesc;*/
document.getElementById("p_attrib_id").value = curRow.cells[0].innerHTML;
document.getElementById('p_attrib_id').readOnly = true;
document.getElementById("p_descr").value = curRow.cells[1].innerHTML;
document.getElementById("p_sh_descr").value = curRow.cells[2].innerHTML;
//Changed by Santosh on 04/04/2017 to set dropdown value
//document.getElementById("p_active_yn").value = active;
document.getElementById("dropDownVal").value = curRow.cells[3].innerHTML;
document.getElementById("p_sort_order").value = curRow.cells[4].innerHTML;
document.getElementById("editflag").value = "E";
//Added by Santosh on 04/04/2017 [Start]
var selElem = document.getElementById("p_active_yn_value");
for(var i = 0; i<selElem.length; i++)
{
if(selElem.options[i].value == curRow.cells[3].innerHTML)
{
document.getElementById("p_active_yn_value").selectedIndex = i;
}
}
//Added by Santosh on 04/04/2017 [End]
var overlay = document.getElementById( "overlay" );
overlay.setAttribute( "style", "position: fixed; top: 0; right: 0; bottom: 0; left: 0; background-color:#000; opacity: .45; z-index:1003; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;");
......@@ -501,7 +524,9 @@ function insertItemAtt(attcode,tableID,idnum)
var attId = document.getElementById("p_attrib_id").value;
var desc = document.getElementById("p_descr").value;
var shDesc = document.getElementById("p_sh_descr").value;
var active = document.getElementById("p_active_yn").value;
//Changed by Santosh on 04/04/2017 to set dropdown value
//var active = document.getElementById("p_active_yn").value;
var active = document.getElementById("dropDownVal").value;
var sortOrder = document.getElementById("p_sort_order").value;
var editflag = document.getElementById("editflag").value;
var group = document.getElementById("p_group_type").value;
......@@ -639,7 +664,9 @@ function processResponse( setColumnValues,idnum )
var attId = document.getElementById("p_attrib_id").value;
var desc = document.getElementById("p_descr").value;
var shDesc = document.getElementById("p_sh_descr").value;
var active = document.getElementById("p_active_yn").value;
//Changed by Santosh on 04/04/2017
//var active = document.getElementById("p_active_yn").value;
var active = document.getElementById("dropDownVal").value;
var sortOrder = document.getElementById("p_sort_order").value;
var editflag = document.getElementById("editflag").value;
var idnum = document.getElementById("editflag").value;
......@@ -792,4 +819,11 @@ function setValues(retVal)
document.getElementById("Detail1.1.phy_attrib_3").value = att3;
document.getElementById("Detail1.1.phy_attrib_8").value = att4;
document.getElementById("Detail1.1.phy_attrib_9").value = att5;
}
\ No newline at end of file
}
//Added by Santosh on 04/04/2017 to set drop down value [Start]
function setDropDownVal()
{
var selElem = document.getElementById("p_active_yn_value");
document.getElementById("dropDownVal").value = selElem.options[selElem.selectedIndex].value;
}
//Added by Santosh on 04/04/2017 to set drop down value [End]
\ No newline at end of file
......@@ -136,23 +136,23 @@
-->
<td >
<input type="hidden" class="input_editable" value="{$attrib_id}" name="Detail2.{normalize-space($dbID)}.attrib_id" id="Detail2.{normalize-space($dbID)}.attrib_id" maxlength="10" />
<!-- <input type="hidden" class="input_editable" value="{$attrib_id}" name="Detail2.{normalize-space($dbID)}.attrib_id" id="Detail2.{normalize-space($dbID)}.attrib_id" maxlength="10" /> -->
<xsl:value-of select="attrib_id" />
</td>
<td >
<input type="hidden" class="input_editable" value="{$descr}" name="Detail2.{normalize-space($dbID)}.descr" id="Detail2.{normalize-space($dbID)}.descr" maxlength="10" />
<!-- <input type="hidden" class="input_editable" value="{$descr}" name="Detail2.{normalize-space($dbID)}.descr" id="Detail2.{normalize-space($dbID)}.descr" maxlength="10" /> -->
<xsl:value-of select="descr" />
</td>
<td >
<input type="hidden" class="input_editable" value="{$sh_descr}" name="Detail2.{normalize-space($dbID)}.sh_descr" id="Detail2.{normalize-space($dbID)}.sh_descr" maxlength="10" />
<!-- <input type="hidden" class="input_editable" value="{$sh_descr}" name="Detail2.{normalize-space($dbID)}.sh_descr" id="Detail2.{normalize-space($dbID)}.sh_descr" maxlength="10" /> -->
<xsl:value-of select="sh_descr" />
</td>
<td >
<input type="hidden" class="input_editable" value="{$active_yn}" name="Detail2.{normalize-space($dbID)}.active_yn" id="Detail2.{normalize-space($dbID)}.active_yn" maxlength="10" />
<!-- <input type="hidden" class="input_editable" value="{$active_yn}" name="Detail2.{normalize-space($dbID)}.active_yn" id="Detail2.{normalize-space($dbID)}.active_yn" maxlength="10" /> -->
<xsl:value-of select="active_yn" />
</td>
<td >
<input type="hidden" class="input_editable" value="{$sort_order}" name="Detail2.{normalize-space($dbID)}.sort_order" id="Detail2.{normalize-space($dbID)}.sort_order" maxlength="10" />
<!-- <input type="hidden" class="input_editable" value="{$sort_order}" name="Detail2.{normalize-space($dbID)}.sort_order" id="Detail2.{normalize-space($dbID)}.sort_order" maxlength="10" /> -->
<xsl:value-of select="sort_order" />
</td>
<!--<td>
......@@ -281,8 +281,9 @@
</tr>
<tr>
<td class="td_rightAlign" nowrap="true">Active :
<select class="input_editable" id = "p_active_yn" style="width: 35%">
<!-- Added by Santosh on 04/04/2017 to set dropdown value -->
<input type="hidden" value="Y" id="dropDownVal" />
<select class="input_editable" id = "p_active_yn_value" style="width: 35%" onchange="setDropDownVal();">
<xsl:choose>
<xsl:when test="p_active_yn ='Y'">
<option value="Y" selected="selected" >Yes </option>
......@@ -338,10 +339,17 @@
class="button red-Btn pophelp-okcancel" value="Cancel" title='Cancel'
onclick="javascript:closePopup()" />
<input type="button" style="margin-top:inherit;"
class="button green-Btn pophelp-okcancel" value="Save" title='Save'
onclick="javascript:insertItemAtt('COLOR','ItemTypeDetail',idNumPack)" />
<!--Added and changed by Santosh on 04/04/2017 for dynamic labels Start -->
<xsl:for-each select="//Detail2">
<xsl:variable name="dbID"><xsl:value-of select="@domID"/></xsl:variable>
<xsl:if test="$dbID = 0">
<xsl:variable name="phyAttribVal"><xsl:value-of select="phy_attrib_1"/></xsl:variable>
<xsl:variable name="upperCaseValue"><xsl:value-of select="translate($phyAttribVal,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/></xsl:variable>
<input type="button" style="margin-top:inherit;"
class="button green-Btn pophelp-okcancel" value="Save" title='Save'
onclick="javascript:insertItemAtt('{$upperCaseValue}','ItemTypeDetail',idNumPack)" />
</xsl:if>
</xsl:for-each>
</div>
</div>
</div>
......
......@@ -124,23 +124,23 @@
-->
<td >
<input type="hidden" class="input_editable" value="{$attrib_id}" name="Detail3.{normalize-space($dbID)}.attrib_id" id="Detail3.{normalize-space($dbID)}.attrib_id" maxlength="10" />
<!-- <input type="hidden" class="input_editable" value="{$attrib_id}" name="Detail3.{normalize-space($dbID)}.attrib_id" id="Detail3.{normalize-space($dbID)}.attrib_id" maxlength="10" /> -->
<xsl:value-of select="attrib_id" />
</td>
<td >
<input type="hidden" class="input_editable" value="{$descr}" name="Detail3.{normalize-space($dbID)}.descr" id="Detail3.{normalize-space($dbID)}.descr" maxlength="10" />
<!-- <input type="hidden" class="input_editable" value="{$descr}" name="Detail3.{normalize-space($dbID)}.descr" id="Detail3.{normalize-space($dbID)}.descr" maxlength="10" /> -->
<xsl:value-of select="descr" />
</td>
<td >
<input type="hidden" class="input_editable" value="{$sh_descr}" name="Detail3.{normalize-space($dbID)}.sh_descr" id="Detail3.{normalize-space($dbID)}.sh_descr" maxlength="10" />
<!-- <input type="hidden" class="input_editable" value="{$sh_descr}" name="Detail3.{normalize-space($dbID)}.sh_descr" id="Detail3.{normalize-space($dbID)}.sh_descr" maxlength="10" /> -->
<xsl:value-of select="sh_descr" />
</td>
<td >
<input type="hidden" class="input_editable" value="{$active_yn}" name="Detail3.{normalize-space($dbID)}.active_yn" id="Detail3.{normalize-space($dbID)}.active_yn" maxlength="10" />
<!-- <input type="hidden" class="input_editable" value="{$active_yn}" name="Detail3.{normalize-space($dbID)}.active_yn" id="Detail3.{normalize-space($dbID)}.active_yn" maxlength="10" /> -->
<xsl:value-of select="active_yn" />
</td>
<td >
<input type="hidden" class="input_editable" value="{$sort_order}" name="Detail3.{normalize-space($dbID)}.sort_order" id="Detail3.{normalize-space($dbID)}.sort_order" maxlength="10" />
<!-- <input type="hidden" class="input_editable" value="{$sort_order}" name="Detail3.{normalize-space($dbID)}.sort_order" id="Detail3.{normalize-space($dbID)}.sort_order" maxlength="10" /> -->
<xsl:value-of select="sort_order" />
</td>
<!--<td>
......@@ -269,8 +269,9 @@
</tr>
<tr>
<td class="td_rightAlign" nowrap="true">Active :
<select class="input_editable" id = "p_active_yn" style="width: 35%">
<!-- Added by Santosh on 04/04/2017 to set dropdown value -->
<input type="hidden" value="Y" id="dropDownVal" />
<select class="input_editable" id = "p_active_yn_value" style="width: 35%" onchange="setDropDownVal();">
<xsl:choose>
<xsl:when test="p_active_yn ='Y'">
<option value="Y" selected="selected" >Yes </option>
......@@ -324,11 +325,17 @@
<input type="submit" style="margin-top:inherit;"
class="button red-Btn pophelp-okcancel" value="Cancel" title='Cancel'
onclick="javascript:closePopup()" />
<input type="button" style="margin-top:inherit;"
class="button green-Btn pophelp-okcancel" value="Save" title='Save'
onclick="javascript:insertItemAtt('SIZE','ItemTypeDetail',idNumPack)" />
<!--Added and changed by Santosh on 04/04/2017 for dynamic labels Start -->
<xsl:for-each select="//Detail3">
<xsl:variable name="dbID"><xsl:value-of select="@domID"/></xsl:variable>
<xsl:if test="$dbID = 0">
<xsl:variable name="phyAttribVal"><xsl:value-of select="phy_attrib_2"/></xsl:variable>
<xsl:variable name="upperCaseValue"><xsl:value-of select="translate($phyAttribVal,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/></xsl:variable>
<input type="button" style="margin-top:inherit;"
class="button green-Btn pophelp-okcancel" value="Save" title='Save'
onclick="javascript:insertItemAtt('{$upperCaseValue}','ItemTypeDetail',idNumPack)" />
</xsl:if>
</xsl:for-each>
</div>
</div>
</div>
......
......@@ -123,23 +123,23 @@
-->
<td >
<input type="hidden" class="input_editable" value="{$attrib_id}" name="Detail4.{normalize-space($dbID)}.attrib_id" id="Detail4.{normalize-space($dbID)}.attrib_id" maxlength="10" />
<!-- <input type="hidden" class="input_editable" value="{$attrib_id}" name="Detail4.{normalize-space($dbID)}.attrib_id" id="Detail4.{normalize-space($dbID)}.attrib_id" maxlength="10" /> -->
<xsl:value-of select="attrib_id" />
</td>
<td >
<input type="hidden" class="input_editable" value="{$descr}" name="Detail4.{normalize-space($dbID)}.descr" id="Detail4.{normalize-space($dbID)}.descr" maxlength="10" />
<!-- <input type="hidden" class="input_editable" value="{$descr}" name="Detail4.{normalize-space($dbID)}.descr" id="Detail4.{normalize-space($dbID)}.descr" maxlength="10" /> -->
<xsl:value-of select="descr" />
</td>
<td >
<input type="hidden" class="input_editable" value="{$sh_descr}" name="Detail4.{normalize-space($dbID)}.sh_descr" id="Detail4.{normalize-space($dbID)}.sh_descr" maxlength="10" />
<!-- <input type="hidden" class="input_editable" value="{$sh_descr}" name="Detail4.{normalize-space($dbID)}.sh_descr" id="Detail4.{normalize-space($dbID)}.sh_descr" maxlength="10" /> -->
<xsl:value-of select="sh_descr" />
</td>
<td >
<input type="hidden" class="input_editable" value="{$active_yn}" name="Detail4.{normalize-space($dbID)}.active_yn" id="Detail4.{normalize-space($dbID)}.active_yn" maxlength="10" />
<!-- <input type="hidden" class="input_editable" value="{$active_yn}" name="Detail4.{normalize-space($dbID)}.active_yn" id="Detail4.{normalize-space($dbID)}.active_yn" maxlength="10" /> -->
<xsl:value-of select="active_yn" />
</td>
<td >
<input type="hidden" class="input_editable" value="{$sort_order}" name="Detail4.{normalize-space($dbID)}.sort_order" id="Detail4.{normalize-space($dbID)}.sort_order" maxlength="10" />
<!-- <input type="hidden" class="input_editable" value="{$sort_order}" name="Detail4.{normalize-space($dbID)}.sort_order" id="Detail4.{normalize-space($dbID)}.sort_order" maxlength="10" /> -->
<xsl:value-of select="sort_order" />
</td>
<!--<td>
......@@ -268,8 +268,9 @@
</tr>
<tr>
<td class="td_rightAlign" nowrap="true">Active :
<select class="input_editable" id = "p_active_yn" style="width: 26%">
<!-- Added by Santosh on 04/04/2017 to set dropdown value -->
<input type="hidden" value="Y" id="dropDownVal" />
<select class="input_editable" id = "p_active_yn_value" style="width: 26%" onchange="setDropDownVal();">
<xsl:choose>
<xsl:when test="p_active_yn ='Y'">
<option value="Y" selected="selected" >Yes </option>
......@@ -324,9 +325,17 @@
class="button red-Btn pophelp-okcancel" value="Cancel" title='Cancel'
onclick="javascript:closePopup()" />
<input type="button" style="margin-top:inherit;"
class="button green-Btn pophelp-okcancel" value="Save" title='Save'
onclick="javascript:insertItemAtt('DIMENSION','ItemTypeDetail',idNumPack)" />
<!--Added and changed by Santosh on 04/04/2017 for dynamic labels Start -->
<xsl:for-each select="//Detail4">
<xsl:variable name="dbID"><xsl:value-of select="@domID"/></xsl:variable>
<xsl:if test="$dbID = 0">
<xsl:variable name="phyAttribVal"><xsl:value-of select="phy_attrib_3"/></xsl:variable>
<xsl:variable name="upperCaseValue"><xsl:value-of select="translate($phyAttribVal,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/></xsl:variable>
<input type="button" style="margin-top:inherit;"
class="button green-Btn pophelp-okcancel" value="Save" title='Save'
onclick="javascript:insertItemAtt('{$upperCaseValue}','ItemTypeDetail',idNumPack)" />
</xsl:if>
</xsl:for-each>
</div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment