Commit f9852251 authored by smestry's avatar smestry

Updated xsl for product wizard


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@104057 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 7a43285e
......@@ -7,9 +7,12 @@
<html>
<script type="text/javascript" src="/ibase/webitm/js/prodWiz_Common.js"></script>
<script type="text/javascript" src="/ibase/webitm/js/prodWiz_Form_I.js"></script>
<script type="text/javascript" src="/ibase/webitm/js/prodWiz_Popup.js"></script>
<script type="text/javascript" src="/ibase/webitm/js/e12PluginWrapper.js"></script>
<!-- <script type="text/javascript" src="/ibase/webitm/js/ITMWizardCalendar.js"></script> -->
<!-- <script type="text/javascript" src="/ibase/webitm/js/jquery.ui.datepicker.js"></script> -->
......@@ -35,6 +38,27 @@
<link type="text/css" rel="stylesheet" href="/ibase/webitm/css/jquery.datetimepicker.css"/>
<style>
.attachedFile
{
border: 1px solid grey;
}
.attachedNewFile
{
height: 25px;
width: 25px;
}
.wordWrap
{
word-wrap: break-word;
overflow: hidden;
}
</style>
<script>
<![CDATA[
$(function() {
......@@ -46,7 +70,7 @@
]]>
</script>
<body onload="getAppDateFormat(); setCustItemRef();">
<body onload="getAppDateFormat(); setCustItemRef(); defaultValues();">
<form name="prodWizFormI" METHOD="post" ACTION="/ibase/ITMWizardHandlerServlet" class="formClass" >
<!-- <div id="header">
......@@ -208,14 +232,16 @@
<xsl:variable name="tax_chap"><xsl:value-of select="tax_chap"/></xsl:variable>
<!--Added by wasim on 14-07-2015 to get login site code [START] -->
<!-- Changed by Sneha on 26-09-2016, to add new field trade mark [Start] -->
<xsl:variable name="trade_mark"><xsl:value-of select="trade_mark"/></xsl:variable>
<!-- Changed by Sneha on 26-09-2016, to add new field trade mark [End] -->
<xsl:variable name="trade_mark"><xsl:value-of select="trade_mark"/></xsl:variable> <!-- Changed by Sneha on 26-09-2016, to add new field trade mark -->
<xsl:variable name="item_commodity"><xsl:value-of select="item_commodity"/></xsl:variable> <!-- Changed by Sneha on 24-11-2016, to add new field commodity no -->
<xsl:variable name="dbID"><xsl:value-of select="@domID"/></xsl:variable>
<input type="hidden" name="Detail1.{normalize-space($dbID)}.login_code" id="Detail1.{normalize-space($dbID)}.login_code"
value="{$login_code}" ISCHANGED="false" readOnly = "1" />
<input type="hidden" name="default_value_status" id="default_value_status" ISCHANGED="false" readOnly = "1" onkeypress="return disableEnter()"/>
<tr>
<td class="td_rightAlign" nowrap="true">
......@@ -225,7 +251,7 @@
<td class="td_leftAlign">
<input type="text" class="input_editable" value="{$item_parnt}" name="Detail1.{normalize-space($dbID)}.item_parnt"
id="Detail1.{normalize-space($dbID)}.item_parnt" maxlength="10" style="width: 100%"
onkeyup = "return specialCharValidate(this.id);" onchange = "setCustItemRef();" />
onkeyup = "return specialCharValidate(this.id);" onchange = "setCustItemRef();" onblur="uploadImg(this)"/>
</td>
<td colspan="2">
......@@ -299,7 +325,7 @@
<strong>Long Description: </strong>
</td>
<td class="td_leftAlign" colspan="3">
<textarea rows="1" class="input_editable" name="Detail1.{normalize-space($dbID)}.long_desc"
<textarea rows="3" class="input_editable" name="Detail1.{normalize-space($dbID)}.long_desc"
id="Detail1.{normalize-space($dbID)}.long_desc" maxlength="490" style="width: 100%; resize: none;"
onkeyup = "return specialCharValidate(this.id);" >
<xsl:value-of select="long_desc"/>
......@@ -357,7 +383,7 @@
</td>
<td class="td_leftAlign" colspan="3">
<input type="text" class="input_editable" value="{descr}" name="Detail1.{normalize-space($dbID)}.descr"
id="Detail1.{normalize-space($dbID)}.descr" maxlength="70" style="width: 100%"
id="Detail1.{normalize-space($dbID)}.descr" maxlength="70" style="width: 100%" onchange = "setLanguageDescr();"
onkeyup = "return specialCharValidate(this.id);" /> <!-- Changed by Sneha on 23-06-2016, for special character validation --><!--Changed by Parikshit Kumbhar on 22/06/2015 [D15CKAT031] [maxlength added] -->
</td>
</tr>
......@@ -827,6 +853,16 @@
</td>
<!-- Added By Samadhan on 21/12/2015 for Limited Edition End -->
</tr>
<tr>
<td class="td_rightAlign" nowrap="true">
<strong>Commodity No.: </strong>
</td>
<td class="td_leftAlign" >
<input type="text" class="input_editable" value="{$item_commodity}" name="Detail1.{normalize-space($dbID)}.item_commodity" style="text-align: left;width: 85%;"
id="Detail1.{normalize-space($dbID)}.item_commodity" maxlength="20" onkeyup = "return specialCharValidate(this.id);" />
</td>
</tr>
<!-- Changed by Sneha on 04-11-2016, to add new to upload images [Start] -->
<tr>
......@@ -834,18 +870,18 @@
<strong>Upload Images: </strong>
</td>
<td class="td_leftAlign">
<input type="button" style="cursor:hand" value="Attach Images" class="button" title='Attach Images' id="Detail1.{normalize-space($dbID)}.upload_img" onclick ="javascript:uploadImg('item');"/>
</td>
<td class="td_rightAlign" id="attachmentsTarget" colspan="1" >
<!-- <input type="button" style="cursor:hand" value="Attach Images" class="button" title='Attach Images' id="Detail1.{normalize-space($dbID)}.upload_img" onclick ="javascript:uploadImg('item');"/>
--></td>
</tr>
<!-- <td class="td_leftAlign">
<a href="javascript:uploadImg('dd_productWiz');" id="Detail1.{normalize-space($dbID)}.upload_img_pophelp" >
<img src="/ibase/webitm/images/pophelp.png" title="Select Upload Image" />
</a>
</td> -->
</tr>
<!-- Changed by Sneha on 04-11-2016, to add new to upload images [End] -->
<!-- <tr style="height: 10px;"></tr>
<tr>
<td>
......@@ -994,6 +1030,74 @@
</table>
</form>
<script>
<![CDATA[
function uploadImg(inputElem)
{
try
{
var val = inputElem.value;
console.log("######### : " + val);
var targetDiv = document.querySelector('td#attachmentsTarget');
if (! val)
{
targetDiv.innerHTML = "";
return;
}
if (! window.getAttachmentsPluginUI) throw "getAttachmentsPluginUI method not found";
var pWindow = window;
if (! window.e12plugin)
{
pWindow = window.parent;
if (! pWindow.e12plugin) throw "e12plugin defination not found."
}
var ContentType = pWindow.e12plugin.enums.ContentType;
var MetadataKey = pWindow.e12plugin.enums.MetadataKey;
var MetadataValue = pWindow.e12plugin.metadata.MetadataValue;
var PluginMetadata = pWindow.e12plugin.metadata.PluginMetadata;
var types = [ ContentType.IMAGE ];
var attachmentPluginElem = window.getAttachmentsPluginUI({
OBJ_NAME : "item",
REF_SER : "M-ITEM",
REF_ID : val,
HOST_URL : "",
DOC_TYPE : "Attachments",
UI : "E",
THUMBNAIL_WIDTH : "50px",
THUMBNAIL_HEIGHT : "50px",
MAX_WIDTH : "300px",
LAYOUT : "T",
MIN_REQUIRED : 0,
MAX_ALLOWED : 5,
CONTENT_TYPE : types
});
if (targetDiv)
{
targetDiv.innerHTML = "";
targetDiv.appendChild(attachmentPluginElem);
targetDiv.style.width = "90%";
targetDiv.style.overflowX = "auto";
}
}
catch (ex)
{
window.alert(ex);
}
}
]]>
</script>
</body>
</html>
......
......@@ -99,7 +99,7 @@
<!-- <body style="height: 100%; overflow: auto;" onload="getAppDateFormat(); setCustItemRef();"> -->
<body onload="getAppDateFormat(); setCustItemRef();">
<body onload="getAppDateFormat(); setCustItemRef(); defaultBarcodeFlag();">
<form name="prodWizFormII" id="prodWizFormII" METHOD="post" ACTION="/ibase/ITMWizardHandlerServlet">
<TABLE border="0" width="99%" height="2%" class="header_td header_table" cellpadding="0" cellspacing="0" >
......@@ -279,7 +279,7 @@
<table id="sizeDtl" border="0" width="30%" style="text-align: center; visibility: hidden;" class="body_table1"></table>
</div> -->
<div id="sizeDtlDiv" style=" border: none !important; height:auto !important">
<div id="sizeDtlDiv" style=" border: none !important; height:auto !important; width: 99%;">
<table id="sizeDtl" class="headertableClass" style="border-top-style: none; "></table>
</div>
......@@ -389,7 +389,7 @@
<!-- Changed by Sneha on 24-10-2016, to add new field customer item references [End] -->
<input type="hidden" name="cust_item_ref_status" id="cust_item_ref_status" ISCHANGED="false" readOnly = "1" onkeypress="return disableEnter()"/> <!-- Changed by Sneha on 28-10-2016, for cust_item_ref_status -->
<input type="hidden" name="barcode_flag" id="barcode_flag" ISCHANGED="false" readOnly = "1" onkeypress="return disableEnter()"/> <!-- Changed by Sneha on 24-11-2016, for barcode flag -->
</xsl:if>
</xsl:for-each>
</div>
......
......@@ -6,7 +6,8 @@
<xsl:template match="/">
<html>
<!-- <link href="/ibase/webitm/css/DD/ProductWizard.css" rel="stylesheet"/>
<!--
<link href="/ibase/webitm/css/DD/ProductWizard.css" rel="stylesheet"/>
<link href="/ibase/webitm/css/DD/jquery-ui-1.10.4.custom.min.css" rel="stylesheet"/>
-->
<link type="text/css" rel="stylesheet" href="/ibase/webitm/css/htmlWizard.css"/>
......@@ -16,7 +17,29 @@
<script type="text/javascript" src="/ibase/webitm/js/prodWiz_Edit.js"></script>
<script type="text/javascript" src="/ibase/webitm/js/jquery-1.10.2.js"></script>
<script type="text/javascript" src="/ibase/webitm/js/jquery-ui-1.10.4.custom.min.js"></script>
<script type="text/javascript" src="/ibase/webitm/js/e12PluginWrapper.js"></script>
<style>
.attachedFile
{
border: 1px solid grey;
}
.attachedNewFile
{
height: 25px;
width: 25px;
}
.wordWrap
{
word-wrap: break-word;
overflow: hidden;
}
</style>
<script>
<![CDATA[
......@@ -41,7 +64,8 @@ function setActionVal( value )
}
]]>
</script>
<body onload="getAppDateFormat(); setCustItemRef();">
<body onload="getAppDateFormat(); setCustItemRef(); ">
<form name="prodWizEditFormII" METHOD="post" ACTION="/ibase/ITMWizardHandlerServlet">
<!-- <div id="header">
......@@ -223,8 +247,8 @@ function setActionVal( value )
</td>
<td class="td_leftAlign">
<input type="text" class="input_editable" value="{$item_code}" name="Detail2.{normalize-space($dbID)}.item_code"
id="Detail2.{normalize-space($dbID)}.item_code" maxlength="10" style="width: 100%" readonly="1"
onkeypress="return disableEnter()" />
id="Detail2.{normalize-space($dbID)}.item_code" maxlength="10" style="width: 100%" readonly="1" focus="true"
onkeypress="return disableEnter()" />
</td>
<td colspan="2">
......@@ -263,11 +287,11 @@ function setActionVal( value )
</tr>
<tr>
<td class="td_rightAlign" nowrap="true">
<td class="td_rightAlign" nowrap="true" valign="top">
<strong>Long Description: </strong>
</td>
<td class="td_leftAlign" colspan="3">
<textarea rows="1" name="Detail2.{normalize-space($dbID)}.long_descr" id="Detail2.{normalize-space($dbID)}.long_descr"
<textarea rows="3" name="Detail2.{normalize-space($dbID)}.long_descr" id="Detail2.{normalize-space($dbID)}.long_descr"
class="input_editable" maxlength="490" style="width: 100%; resize: none;" onkeyup = "return specialCharValidate(this.id);"
onkeypress="return disableEnter()" >
<xsl:value-of select="long_descr"/>
......@@ -581,8 +605,8 @@ function setActionVal( value )
<strong>Upload Images: </strong>
</td>
<td class="td_leftAlign">
<input type="button" style="cursor:hand" value="Attach Images" class="button" title='Attach Images' id="Detail2.{normalize-space($dbID)}.upload_img" onclick ="javascript:uploadImg('item');"/>
<td class="td_leftAlign" id="attachmentsTarget" >
<!-- <input type="button" style="cursor:hand" value="Attach Images" class="button" title='Attach Images' id="Detail2.{normalize-space($dbID)}.upload_img" onclick ="javascript:uploadImg('item');"/> -->
</td>
<!-- <td class="td_leftAlign">
<a href="javascript:uploadImg('dd_productWiz');"
......@@ -652,6 +676,64 @@ function setActionVal( value )
</form>
<script>
<![CDATA[
try
{
var targetDiv = document.querySelector('td#attachmentsTarget');
if (! window.getAttachmentsPluginUI) throw "getAttachmentsPluginUI method not found";
var pWindow = window;
if (! window.e12plugin)
{
pWindow = window.parent;
if (! pWindow.e12plugin) throw "e12plugin defination not found."
}
var ContentType = pWindow.e12plugin.enums.ContentType;
var MetadataKey = pWindow.e12plugin.enums.MetadataKey;
var MetadataValue = pWindow.e12plugin.metadata.MetadataValue;
var PluginMetadata = pWindow.e12plugin.metadata.PluginMetadata;
var types = [ ContentType.IMAGE ];
var refId = document.getElementById("Detail2.1.item_code").value;
var attachmentPluginElem = window.getAttachmentsPluginUI({
OBJ_NAME : "item",
REF_SER : "M-ITEM",
REF_ID : refId,
HOST_URL : "",
DOC_TYPE : "Attachments",
UI : "E",
THUMBNAIL_WIDTH : "50px",
THUMBNAIL_HEIGHT : "50px",
MAX_WIDTH : "300px",
LAYOUT : "T",
MIN_REQUIRED : 0,
MAX_ALLOWED : 5,
CONTENT_TYPE : types
});
if (targetDiv)
{
targetDiv.innerHTML = "";
targetDiv.appendChild(attachmentPluginElem);
targetDiv.style.width = "90%";
targetDiv.style.overflowX = "auto";
}
}
catch (ex)
{
window.alert(ex);
}
]]>
</script>
</body>
</html>
......
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