Commit 5543dd16 authored by smestry's avatar smestry

Updated the js for product wizard changes


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@104158 ce508802-f39f-4f6c-b175-0d175dae99d5
parent d4152c8e
...@@ -845,7 +845,7 @@ ...@@ -845,7 +845,7 @@
"</td>"+*/ "</td>"+*/
"<td class='td_leftAlign'>" + "<td class='td_leftAlign'>" +
"<input type='text' id=dtFrom"+no+" class='input_editable' size='8' style='text-align: left;' disabled />" + "<input type='text' id=dtFrom"+no+" class='input_editable' size='8' style='text-align: left;' disabled />" +
"<img src='/ibase/webitm/images/calender.png' id='dtFrom"+no+"' name='dtFrom"+no+"' onClick=javascript:setDate('dtFrom"+no+"'); border='0' style='margin-bottom: -5px;' /> " + "<img src='/ibase/webitm/images/calender.png' id='dtFrom"+no+"' name='dtFrom"+no+"' onClick=javascript:setDate('dtFrom"+no+"'); border='0' style='margin-bottom: -5px;' /> " +
"</td>"+ "</td>"+
...@@ -1450,12 +1450,12 @@ ...@@ -1450,12 +1450,12 @@
"</td>" + "</td>" +
"<td class='td_leftAlign'>" + "<td class='td_leftAlign'>" +
"<input type='text' class='input_editable' id=SuppDtFrom"+num+" size='8' style='text-align: left;' readonly='1' />" + "<input type='text' class='input_editable' id=SuppDtFrom"+num+" size='8' style='text-align: left;' disabled />" +
"<img src='/ibase/webitm/images/calender.png' id='SuppDtFrom"+num+"' name='SuppDtFrom"+num+"' onClick=javascript:setDate('SuppDtFrom"+num+"'); border='0' style='margin-bottom: -5px;' /> " + "<img src='/ibase/webitm/images/calender.png' id='SuppDtFrom"+num+"' name='SuppDtFrom"+num+"' onClick=javascript:setDate('SuppDtFrom"+num+"'); border='0' style='margin-bottom: -5px;' /> " +
"</td>"+ "</td>"+
"<td class='td_leftAlign'>" + "<td class='td_leftAlign'>" +
"<input type='text' class='input_editable' id=SuppDtTo"+num+" size='8' style='text-align: left;' readonly='1' />" + "<input type='text' class='input_editable' id=SuppDtTo"+num+" size='8' style='text-align: left;' disabled />" +
"<img src='/ibase/webitm/images/calender.png' id='SuppDtTo"+num+"' name='SuppDtTo"+num+"' onClick=javascript:setDate('SuppDtTo"+num+"'); border='0' style='margin-bottom: -5px;' /> " + "<img src='/ibase/webitm/images/calender.png' id='SuppDtTo"+num+"' name='SuppDtTo"+num+"' onClick=javascript:setDate('SuppDtTo"+num+"'); border='0' style='margin-bottom: -5px;' /> " +
"</td>"+ "</td>"+
...@@ -2688,10 +2688,32 @@ ...@@ -2688,10 +2688,32 @@
} }
function showcalender(id) function showcalender(id)
{ {
var date_format = "d/m/y"; var dateFormat = "";
if (document.getElementById('date_format') != null)
{
global_date_format = document.getElementById("date_format").value;
}
if ( global_date_format == "dd/MM/yy" )
{
dateFormat = "d/m/y";
}
else if ( global_date_format == "dd-MMM-yyyy" )
{
dateFormat = "d/M/y";
}
else if ( global_date_format == "MM/dd/yy" )
{
dateFormat = "m/d/y";
}
else
{
dateFormat = "d/m/y";
}
$( "#"+id).datetimepicker({ $( "#"+id).datetimepicker({
timepicker:false, timepicker:false,
format:date_format, format:dateFormat,
defaultTime:'10:00', defaultTime:'10:00',
minDate:0, minDate:0,
step:1 step:1
......
...@@ -959,10 +959,32 @@ ...@@ -959,10 +959,32 @@
} }
function showcalender(id) function showcalender(id)
{ {
var date_format = "d/m/y"; var dateFormat = "";
if (document.getElementById('date_format') != null)
{
global_date_format = document.getElementById("date_format").value;
}
if ( global_date_format == "dd/MM/yy" )
{
dateFormat = "d/m/y";
}
else if ( global_date_format == "dd-MMM-yyyy" )
{
dateFormat = "d/M/y";
}
else if ( global_date_format == "MM/dd/yy" )
{
dateFormat = "m/d/y";
}
else
{
dateFormat = "d/m/y";
}
$( "#"+id).datetimepicker({ $( "#"+id).datetimepicker({
timepicker:false, timepicker:false,
format:date_format, format:dateFormat,
defaultTime:'10:00', defaultTime:'10:00',
minDate:0, minDate:0,
step:1 step:1
......
...@@ -127,64 +127,66 @@ ...@@ -127,64 +127,66 @@
function createPriceListTab(site, no, idNum, siteDesc) function createPriceListTab(site, no, idNum, siteDesc)
{ {
$("#SKUPriceListId tbody").append( $("#SKUPriceListId tbody").append(
"<tr>"+
"<td class='td_leftAlign'><input type='checkbox' checked='checked' id=chksite"+no+" onclick='checkPriceList(this)' /></td>"+
"<td class='td_leftAlign' onclick=chkPriceRows('chksite"+no+"')><input type='hidden' id=prodSite"+no+" value="+ site +" /><lable id=lblSites"+no+">"+ site +"</lable></td>"+
"<td class='td_leftAlign'>" +
"<div style='position:relative; width: 100%;'>" +
"<input type='hidden' id=prodPriceList"+no+" class='input_editable' style='width: 90%;' readonly='1' />" +
" <lable id=lblPrices"+no+"></lable> "+//Changed by Parikshit Kumbhar on 08/07/15 [added lable]
/*"<div style='width:2%; float: right'>" +
"<img src='/ibase/webitm/images/DD/popup1.png' id=priceList"+no+" style='margin-left: -5px;' />" +
"</div>" +*/
"</div>" +
"</td>"+
"<td><input type='hidden' id=prodsCurr"+no+" value='' /><lable id=lblcurrcode"+no+"></lable></td>"+
"<td>" +
"<input type='text' id=prodRate"+no+" class='input_editable' size='10' maxlength='11' style='text-align: right;' onchange='return isNumeric2(this)' />" +
"</td>"+ // Added by parikshit Kumbhar on 27/06/2015 [Maxlength added] [D15CKAT031]
/*"<td>" + "<tr>"+
"<input type='text' id=prodCost"+no+" class='editInputClass' size='10' style='text-align: right;' onchange='return isValidCost(this)' />" +
"</td>"+*/
"<td>" + "<td class='td_leftAlign' width='5%'><input type='checkbox' checked='checked' id=chksite"+no+" onclick='checkPriceList(this)' /></td>"+
"<input type='text' id=dtFrom"+no+" class='input_editable' size='8' style='text-align: left;' readonly='1' />" +
"</td>"+ "<td class='td_leftAlign' onclick=chkPriceRows('chksite"+no+"')><input type='hidden' id=prodSite"+no+" value="+ site +" /><lable id=lblSites"+no+">"+ site +"</lable></td>"+
"<td class='td_leftAlign' width='5%'>" +
"<div style='position:relative; >" +
"<input type='hidden' id=prodPriceList"+no+" class='input_editable' style='width: 90%;' readonly='1' />" +
" <lable id=lblPrices"+no+"></lable> "+//Changed by Parikshit Kumbhar on 08/07/15 [added lable]
/*"<div style='width:2%; float: right'>" +
"<img src='/ibase/webitm/images/DD/popup1.png' id=priceList"+no+" style='margin-left: -5px;' />" +
"</div>" +*/
"</div>" +
"</td>"+
"<td width='5%'><input type='hidden' id=prodsCurr"+no+" value='' /><lable id=lblcurrcode"+no+"></lable></td>"+
"<td width='5%'>" +
"<input type='text' id=prodRate"+no+" class='input_editable' size='10' maxlength='11' style='text-align: right;' onchange='return isNumeric2(this)' />" +
"</td>"+ // Added by parikshit Kumbhar on 27/06/2015 [Maxlength added] [D15CKAT031]
/*"<td>" +
"<input type='text' id=prodCost"+no+" class='editInputClass' size='10' style='text-align: right;' onchange='return isValidCost(this)' />" +
"</td>"+*/
"<td width='15%'>" +
"<input type='text' id=dtFrom"+no+" class='input_editable' size='8' style='text-align: left;' disabled />" +
"<img src='/ibase/webitm/images/calender.png' id='dtFrom"+no+"' name='dtFrom"+no+"' onClick=javascript:setDate('dtFrom"+no+"'); border='0' style='margin-bottom: -5px;' /> " +
"</td>"+
"<td width='15%'>" +
"<input type='text' id=dtTo"+no+" class='input_editable' size='8' style='text-align: left;' disabled />" +
"<img src='/ibase/webitm/images/calender.png' id='dtTo"+no+"' name='dtTo"+no+"' onClick=javascript:setDate('dtTo"+no+"'); border='0' style='margin-bottom: -5px;' /> " +
"</td>"+
"<td>" + "</tr>"
"<input type='text' id=dtTo"+no+" class='input_editable' size='8' style='text-align: left;' readonly='1' />" + );
"</td>"+
"</tr>" $( "#dtFrom"+no ).datepicker(
); { minDate: 0, changeMonth: true, changeYear: true, dateFormat : global_date_format,
onSelect: function( selectedDate ) {
$( "#dtFrom"+no ).datepicker( $( "#dtTo"+no ).datepicker( "option", "minDate", selectedDate );
{ minDate: 0, changeMonth: true, changeYear: true, dateFormat : global_date_format, $( "#dtTo"+no ).datepicker( "option", "dateFormat", global_date_format );
onSelect: function( selectedDate ) { }
$( "#dtTo"+no ).datepicker( "option", "minDate", selectedDate ); });
$( "#dtTo"+no ).datepicker( "option", "dateFormat", global_date_format );
} $( "#dtTo"+no ).datepicker(
}); { minDate: 0, changeMonth: true, changeYear: true, dateFormat : global_date_format,
onSelect: function( selectedDate ) {
$( "#dtTo"+no ).datepicker( $( "#dtFrom"+no ).datepicker( "option", "maxDate", selectedDate );
{ minDate: 0, changeMonth: true, changeYear: true, dateFormat : global_date_format, $( "#dtFrom"+no ).datepicker( "option", "dateFormat", global_date_format );
onSelect: function( selectedDate ) { }
$( "#dtFrom"+no ).datepicker( "option", "maxDate", selectedDate ); });
$( "#dtFrom"+no ).datepicker( "option", "dateFormat", global_date_format );
} document.getElementById("lblSites"+no).title = siteDesc;
});
/*document.getElementById("fromDt"+no).setAttribute("onclick", "selectedObj = 'dtFrom"+no+"'; javascript:show_calendar('dtFrom"+no+"','','','DD/MM/YY');");*/
document.getElementById("lblSites"+no).title = siteDesc; //document.getElementById("prodPriceList"+no).setAttribute("onkeydown", "javascript:openSearchPopup(event, '{normalize-space($dbID)}','{normalize-space($login_code)}','pricelist', 'Price List', '"+ no +"');");
//document.getElementById("priceList"+no).setAttribute("onclick", "javascript:callListJSP('{normalize-space($dbID)}','{normalize-space($login_code)}','pricelist', 'Price List', '"+ no +"');");
/*document.getElementById("fromDt"+no).setAttribute("onclick", "selectedObj = 'dtFrom"+no+"'; javascript:show_calendar('dtFrom"+no+"','','','DD/MM/YY');");*/ }
//document.getElementById("prodPriceList"+no).setAttribute("onkeydown", "javascript:openSearchPopup(event, '{normalize-space($dbID)}','{normalize-space($login_code)}','pricelist', 'Price List', '"+ no +"');");
//document.getElementById("priceList"+no).setAttribute("onclick", "javascript:callListJSP('{normalize-space($dbID)}','{normalize-space($login_code)}','pricelist', 'Price List', '"+ no +"');");
}
function displaySKUPriceDetails(prodDescId) function displaySKUPriceDetails(prodDescId)
{ {
...@@ -424,25 +426,31 @@ ...@@ -424,25 +426,31 @@
"<tr class='trClass'>"+ "<tr class='trClass'>"+
"<td class='td_centAlign'><input type='checkbox' checked='checked' id=chkSupp"+num+" onclick='checkSuppList(this)' /></td>"+ "<td width='5%' class='td_centAlign'><input type='checkbox' checked='checked' id=chkSupp"+num+" onclick='checkSuppList(this)' /></td>"+
"<td class='td_leftAlign' onclick=chkSuppRows('chkSupp"+num+"')><input type='hidden' id=Supp"+num+" value='' /><lable id=lblSupp"+num+">"+ supplier +"</lable></td>"+ "<td class='td_leftAlign' onclick=chkSuppRows('chkSupp"+num+"')><input type='hidden' id=Supp"+num+" value='' /><lable id=lblSupp"+num+">"+ supplier +"</lable></td>"+
"<td class='td_leftAlign' onclick=chkSuppRows('chkSupp"+num+"')>" + "<td width='5%' class='td_leftAlign' onclick=chkSuppRows('chkSupp"+num+"')>" +
"<input type='hidden' class='input_editable' id=SuppPriceList"+num+" value='"+ price +"' /><lable id=lblSuppPriceList"+num+">"+ price +"</lable>" + "<input type='hidden' class='input_editable' id=SuppPriceList"+num+" value='"+ price +"' /><lable id=lblSuppPriceList"+num+">"+ price +"</lable>" +
"</td>"+ "</td>"+
"<td class='td_leftAlign'><input type='hidden' id=prodsCurr"+num+" value="+ currcode +" /><lable id=lblcurr"+num+">"+ currcode +"</lable></td>"+
"<td class='td_leftAlign'>" + "<td width='5%' class='td_leftAlign'><input type='hidden' id=prodsCurr"+num+" value="+ currcode +" /><lable id=lblcurr"+num+">"+ currcode +"</lable></td>"+
"<td width='5%' class='td_leftAlign'>" +
"<input type='text' class='input_editable' id=SuppProdCost"+num+" size='10' value='0.00' maxlength='11' style='text-align: right;' " + "<input type='text' class='input_editable' id=SuppProdCost"+num+" size='10' value='0.00' maxlength='11' style='text-align: right;' " +
" onchange='return isNumeric2(this)' />" +// Added by parikshit Kumbhar on 27/06/2015 [Maxlength added] [D15CKAT031] " onchange='return isNumeric2(this)' />" +// Added by parikshit Kumbhar on 27/06/2015 [Maxlength added] [D15CKAT031]
"</td>" + "</td>" +
"<td class='td_leftAlign'>" + "<td width='15%' class='td_leftAlign'>" +
"<input type='text' class='input_editable' id=SuppDtFrom"+num+" size='8' style='text-align: left;' readonly='1' />" + "<input type='text' class='input_editable' id=SuppDtFrom"+num+" size='8' maxlength='8' style='text-align: left;' ISCHANGED='false' disabled />" +
"</td class='td_leftAlign'>"+
"<img src='/ibase/webitm/images/calender.png' id='SuppDtFrom' name='SuppDtFrom' onClick=javascript:setDate('SuppDtFrom"+num+"'); " +
" border='0' style='margin-bottom: -5px;'/> " +
"</td>"+
"<td class='td_leftAlign'>" + "<td width='15%' class='td_leftAlign'>" +
"<input type='text' class='input_editable' id=SuppDtTo"+num+" size='8' style='text-align: left;' readonly='1' />" + "<input type='text' class='input_editable' id=SuppDtTo"+num+" size='8' maxlength='8' style='text-align: left;' ISCHANGED='false' disabled />" +
"<img src='/ibase/webitm/images/calender.png' id='SuppDtTo"+num+"' name='SuppDtTo"+num+"' onClick=javascript:setDate('SuppDtTo"+num+"'); border='0' style='margin-bottom: -5px;'/> " +
"</td>"+ "</td>"+
"</tr>" "</tr>"
...@@ -850,7 +858,7 @@ ...@@ -850,7 +858,7 @@
xmlString = xmlString + "</Detail1></Root>"; xmlString = xmlString + "</Detail1></Root>";
document.getElementById("PRE_FORM_VAL").value = xmlString; document.getElementById("PRE_FORM_VAL").value = xmlString;
console.log("xmlString========>>"+xmlString); //console.log("xmlString========>>"+xmlString);
setActionVal( "previous" ); setActionVal( "previous" );
document.getElementById("prev").style.pointerEvents = 'none'; document.getElementById("prev").style.pointerEvents = 'none';
...@@ -870,8 +878,47 @@ ...@@ -870,8 +878,47 @@
document.getElementById(str).style.display = 'none'; document.getElementById(str).style.display = 'none';
} }
function setDate(id)
{
showcalender(id);
}
\ No newline at end of file function showcalender(id)
{
var dateFormat = "";
if (document.getElementById('date_format') != null)
{
global_date_format = document.getElementById("date_format").value;
}
if ( global_date_format == "dd/MM/yy" )
{
dateFormat = "d/m/y";
}
else if ( global_date_format == "dd-MMM-yyyy" )
{
dateFormat = "d/M/y";
}
else if ( global_date_format == "MM/dd/yy" )
{
dateFormat = "m/d/y";
}
else
{
dateFormat = "d/m/y";
}
$( "#"+id).datetimepicker({
timepicker:false,
format:dateFormat,
defaultTime:'10:00',
minDate:0,
step:1
});
if(!$("#filter_date").datetimepicker( "widget" ).is(":visible"))
{
$( "#"+id ).datetimepicker("show");
}
}
\ No newline at end of file
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