Index: lams_tool_imscc/web/includes/javascript/commonCartridgeItem.js =================================================================== diff -u -r7f68f72a3d80b8e24ba596d34ccea104ca285d05 -r4dba5dfd3c1a3802a3354b772a8449378d1dc3b5 --- lams_tool_imscc/web/includes/javascript/commonCartridgeItem.js (.../commonCartridgeItem.js) (revision 7f68f72a3d80b8e24ba596d34ccea104ca285d05) +++ lams_tool_imscc/web/includes/javascript/commonCartridgeItem.js (.../commonCartridgeItem.js) (revision 4dba5dfd3c1a3802a3354b772a8449378d1dc3b5) @@ -5,14 +5,6 @@ var itemAttachmentTargetDiv = "itemAttachmentArea"; var singleInstructionHeight = 40; - function removeInstruction(idx){ - var param = $("#instructionForm").serialize() + "&removeIdx="+idx; - removeInstructionLoading(); - $.post(removeInstructionUrl, param, function(xml) { - removeInstructionComplete(); - document.getElementById("instructionArea").innerHTML = xml; - }); - } function removeItemAttachment(idx){ removeItemAttachmentLoading(); $("#" + itemAttachmentTargetDiv).load( @@ -22,65 +14,15 @@ } ); } - function addInstruction(){ - var param = $("#instructionForm").serialize(); - addInstructionLoading(); - $.post(addInstructionUrl, param, function(xml) { - addInstructionComplete(); - document.getElementById("instructionArea").innerHTML = xml; - }); - return false; - - } - function adjustInstructionsDisplayAreaHeight(adjustAmount){ - var obj = window.top.document.getElementById('reourceInputArea'); - obj.style.height=obj.contentWindow.document.body.scrollHeight+adjustAmount+'px'; - } - function upItem(itemIdx){ - if(itemIdx == 0) - return; - var currId = "instructionItemDesc" + itemIdx; - var repId = "instructionItemDesc" + (--itemIdx); - switchValue(currId,repId); - } - function downItem(itemIdx,maxSize){ - if(itemIdx == (maxSize -1)) - return; - var currId = "instructionItemDesc" + itemIdx; - var repId = "instructionItemDesc" + (++itemIdx); - switchValue(currId,repId); - } - function switchValue(currId,repId){ - var temp = document.getElementById(repId).value; - document.getElementById(repId).value = document.getElementById(currId).value; - document.getElementById(currId).value = temp; - } - function removeInstructionLoading(){ - showBusy(instructionTargetDiv); - } - function removeInstructionComplete(){ - hideBusy(instructionTargetDiv); - adjustInstructionsDisplayAreaHeight(-singleInstructionHeight); - } function removeItemAttachmentLoading(){ showBusy(itemAttachmentTargetDiv); } function removeItemAttachmentComplete(){ hideBusy(itemAttachmentTargetDiv); } - function addInstructionLoading(){ - showBusy(instructionTargetDiv); - } - function addInstructionComplete(){ - hideBusy(instructionTargetDiv); - adjustInstructionsDisplayAreaHeight(singleInstructionHeight); - } function submitCommonCartridgeItem(){ $("#commonCartridgeItemForm").submit(); // after submit, it direct to itemlist.jsp, // then refresh "basic tab" commonCartridgelist and close this window. } - function cancelCommonCartridgeItem(){ - window.top.hideMessage(); - }