Index: lams_tool_larsrc/web/includes/javascript/rsrcresourceitem.js
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_larsrc/web/includes/javascript/rsrcresourceitem.js,v
diff -u -r1.1 -r1.2
--- lams_tool_larsrc/web/includes/javascript/rsrcresourceitem.js 31 Mar 2006 06:02:01 -0000 1.1
+++ lams_tool_larsrc/web/includes/javascript/rsrcresourceitem.js 6 Apr 2006 06:58:12 -0000 1.2
@@ -2,6 +2,7 @@
This is Resource Item instrcution area.
*/
var instructionTargetDiv = "instructionArea";
+ var itemAttachmentTargetDiv = "itemAttachmentArea";
// Please set these 2 variables in JSP file for using tag reason:
// var removeInstructionUrl = "";
// var addInstructionUrl = "";
@@ -23,6 +24,24 @@
}
);
}
+ function removeItemAttachment(idx){
+ //var id = "instructionItem" + idx;
+ //Element.remove(id);
+ var url= removeItemAttachmentUrl;
+ var reqIDVar = new Date();
+ var param = "reqID="+reqIDVar.getTime();
+ removeItemAttachmentLoading();
+ var myAjax = new Ajax.Updater(
+ itemAttachmentTargetDiv,
+ url,
+ {
+ method:'get',
+ parameters:param,
+ onComplete:removeItemAttachmentComplete,
+ evalScripts:true
+ }
+ );
+ }
function addInstruction(){
var url= addInstructionUrl;
var reqIDVar = new Date();
@@ -63,8 +82,13 @@
}
function removeInstructionComplete(){
hideBusy(instructionTargetDiv);
-
}
+ function removeItemAttachmentLoading(){
+ showBusy(itemAttachmentTargetDiv);
+ }
+ function removeItemAttachmentComplete(){
+ hideBusy(itemAttachmentTargetDiv);
+ }
function addInstructionLoading(){
showBusy(instructionTargetDiv);
}
@@ -86,4 +110,9 @@
function submitResourceItem(){
$("instructionList").value = Form.serialize("instructionForm");
$(resourceItemForm).submit();
+ //after submit, it direct to itemlist.jsp,
+ // then refresh "basic tab" resourcelist and close this window.
}
+ function cancelResourceItem(){
+ window.top.hideMessage();
+ }