Commit fe517cc4 authored by smestry's avatar smestry

Updated the js file of product wizard for look and feel and removed minor bugs


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@103969 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ce6df6cb
...@@ -590,4 +590,55 @@ ...@@ -590,4 +590,55 @@
} }
function searchData(textObj, eve)
\ No newline at end of file {
var dataFound = false;
var searchIndex = "*";
keyCnt = 0
var tableObj = document.getElementById("Details");
var searchStr = textObj.value.trim();
if(searchStr.indexOf("|")!=-1){
searchIndex = searchStr.substring(0,searchStr.indexOf("|"));
if(searchIndex < 1 || searchIndex > (tableObj.rows[0].cells.length-1))
{
searchIndex = "*";
}
}
console.log("searchIndex["+searchIndex+"]");
if(eve.keyCode == 32 && !filterSet && !isNaN(searchStr) && searchStr.length > 0)
{
textObj.value = (searchStr).toUpperCase() + "|";
filterSet = true;
}
var searchValue = "";
var rowCnt = tableObj.rows.length;
searchValue = searchStr.indexOf("|")!=-1?searchStr.substring(searchStr.indexOf("|")+1):searchStr;
console.log("searchValue["+searchValue+"]");
for(var i=1; i<rowCnt; i++){
var cellData = tableObj.rows[i].cells;
var cellDataStr = "";
if(searchIndex == "*")
{
for(var j=1; j<cellData.length; j++)
{
cellDataStr += cellData[j].innerHTML.trim() + "~";
}
}
else
{
cellDataStr = tableObj.rows[i].cells[searchIndex].innerHTML.trim();
}
if(cellDataStr.toUpperCase().indexOf(searchValue.trim().toUpperCase()) != -1){
tableObj.rows[i].style.display = "table-row";
}
else if(searchValue.trim() != ""){
tableObj.rows[i].style.display = "none";
}
}
}
\ No newline at end of file
...@@ -2691,4 +2691,58 @@ ...@@ -2691,4 +2691,58 @@
{ {
setCheckedRow( event, element ); setCheckedRow( event, element );
selectValue(); selectValue();
} }
\ No newline at end of file
function searchData(textObj, eve)
{
var dataFound = false;
var searchIndex = "*";
keyCnt = 0
var tableObj = document.getElementById("Details");
var searchStr = textObj.value.trim();
if(searchStr.indexOf("|")!=-1){
searchIndex = searchStr.substring(0,searchStr.indexOf("|"));
if(searchIndex < 1 || searchIndex > (tableObj.rows[0].cells.length-1))
{
searchIndex = "*";
}
}
console.log("searchIndex["+searchIndex+"]");
if(eve.keyCode == 32 && !filterSet && !isNaN(searchStr) && searchStr.length > 0)
{
textObj.value = (searchStr).toUpperCase() + "|";
filterSet = true;
}
var searchValue = "";
var rowCnt = tableObj.rows.length;
searchValue = searchStr.indexOf("|")!=-1?searchStr.substring(searchStr.indexOf("|")+1):searchStr;
console.log("searchValue["+searchValue+"]");
for(var i=1; i<rowCnt; i++){
var cellData = tableObj.rows[i].cells;
var cellDataStr = "";
if(searchIndex == "*")
{
for(var j=1; j<cellData.length; j++)
{
cellDataStr += cellData[j].innerHTML.trim() + "~";
}
}
else
{
cellDataStr = tableObj.rows[i].cells[searchIndex].innerHTML.trim();
}
if(cellDataStr.toUpperCase().indexOf(searchValue.trim().toUpperCase()) != -1){
tableObj.rows[i].style.display = "table-row";
}
else if(searchValue.trim() != ""){
tableObj.rows[i].style.display = "none";
}
}
}
\ No newline at end of file
...@@ -605,6 +605,12 @@ ...@@ -605,6 +605,12 @@
document.getElementById("Detail1.1.size_codes").focus(); document.getElementById("Detail1.1.size_codes").focus();
return false; return false;
}*/ }*/
else if(document.getElementById("Detail1.1.size_codes").value == "")
{
alert("Size Availiability cannot be blank. Please Select Size.");
document.getElementById("Detail1.1.size_ava_pophelp").focus();
return false;
}
else if (document.getElementById("Detail1.1.size_codes").value != "" && document.getElementById("Detail1.1.size_type").value == "") else if (document.getElementById("Detail1.1.size_codes").value != "" && document.getElementById("Detail1.1.size_type").value == "")
{ {
alert("Please Select Size."); alert("Please Select Size.");
......
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