function selectFabricPopup(type, postFnName, params) { if (!postFnName) { postFnName = ""; } if (!params) { params = ""; } var div = document.getElementById("selectProductionDiv"); if (!div) { div = document.createElement("div"); div.id = "selectProductionDiv"; div.style.position = "absolute"; div.style.zIndex = "9"; div.style.background = "rgba(8, 8, 8, .8)"; div.style.left = 0; div.style.top = 0; div.style.width = "100%"; var height = document.body.scrollHeight; if(height < 500) { height = 500; } div.style.height = height + "px"; div.className = "opacity"; document.body.appendChild(div); $("#selectProductionDiv").click(function(){ $("#selectProductionDiv").hide(); }); } showObj("selectProductionDiv", true); var scrollTop = document.body.scrollTop; var swidth = window.screen.availWidth - 100; var sheight = window.screen.availHeight - 200; if(scrollTop == 0) { scrollTop = document.documentElement.scrollTop; } scrollTop += 50; var html = "
" html += '
'; html += '
'; html += ""; html += "
"; html += "
"; div.innerHTML = html; } function refreshFabricDesc (id, descId) { var fabricId = $("#" + id).val(); if (isNaN(fabricId )) { return; } $("#" + descId).html( "loading..." ); PublicAjaxHelper.getFabric( fabricId, function(data) { if (data) { var desc = data.title + "(" + data.code + ")"; $("#" + descId).html( desc + " " ); } else { $("#" + descId).html( "" ); } }); } function closeFabricPopup() { showObj("selectProductionDiv", false); }