Index: lams_tool_imscc/src/java/org/lamsfoundation/lams/tool/commonCartridge/CommonCartridgeConstants.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_imscc/src/java/org/lamsfoundation/lams/tool/commonCartridge/CommonCartridgeConstants.java,v diff -u -r1.2 -r1.3 --- lams_tool_imscc/src/java/org/lamsfoundation/lams/tool/commonCartridge/CommonCartridgeConstants.java 7 Jun 2011 20:58:39 -0000 1.2 +++ lams_tool_imscc/src/java/org/lamsfoundation/lams/tool/commonCartridge/CommonCartridgeConstants.java 8 Jun 2011 12:31:16 -0000 1.3 @@ -115,7 +115,8 @@ public static final String ATTR_USER_FINISHED = "userFinished"; public static final String ATTR_ITEM = "item"; - public static final String ATTR_REMOTE_TOOL_URL = "toolUrl"; + public static final String ATTR_LAUNCH_URL = "launchUrl"; + public static final String ATTR_SECURE_LAUNCH_URL = "secureLaunchUrl"; public static final String ATTR_REMOTE_TOOL_KEY = "toolKey"; public static final String ATTR_REMOTE_TOOL_SECRET = "toolSecret"; public static final String ATTR_BUTTON_TEXT = "buttonText"; Index: lams_tool_imscc/src/java/org/lamsfoundation/lams/tool/commonCartridge/web/action/AuthoringAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_imscc/src/java/org/lamsfoundation/lams/tool/commonCartridge/web/action/AuthoringAction.java,v diff -u -r1.2 -r1.3 --- lams_tool_imscc/src/java/org/lamsfoundation/lams/tool/commonCartridge/web/action/AuthoringAction.java 7 Jun 2011 20:58:39 -0000 1.2 +++ lams_tool_imscc/src/java/org/lamsfoundation/lams/tool/commonCartridge/web/action/AuthoringAction.java 8 Jun 2011 12:31:16 -0000 1.3 @@ -325,8 +325,10 @@ CommonCartridgeItem resource = uploadedCartridgeResources.get(i); - String launchUrl = request.getParameter(CommonCartridgeConstants.ATTR_REMOTE_TOOL_URL + i); + String launchUrl = request.getParameter(CommonCartridgeConstants.ATTR_LAUNCH_URL + i); resource.setLaunchUrl(launchUrl); + String secureLaunchUrl = request.getParameter(CommonCartridgeConstants.ATTR_SECURE_LAUNCH_URL + i); + resource.setSecureLaunchUrl(secureLaunchUrl); String toolKey = request.getParameter(CommonCartridgeConstants.ATTR_REMOTE_TOOL_KEY + i); resource.setKey(toolKey); String toolSecret = request.getParameter(CommonCartridgeConstants.ATTR_REMOTE_TOOL_SECRET + i); @@ -1049,11 +1051,13 @@ */ private ActionErrors validateCommonCartridgeItem(CommonCartridgeItemForm itemForm) { ActionErrors errors = new ActionErrors(); - if (StringUtils.isBlank(itemForm.getTitle())) { -// errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(CommonCartridgeConstants.ERROR_MSG_TITLE_BLANK)); - } if (itemForm.getItemType() == CommonCartridgeConstants.RESOURCE_TYPE_BASIC_LTI) { + if (StringUtils.isBlank(itemForm.getTitle())) { + errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage( + CommonCartridgeConstants.ERROR_MSG_TITLE_BLANK)); + } + if (StringUtils.isBlank(itemForm.getUrl())) { errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage( CommonCartridgeConstants.ERROR_MSG_URL_BLANK)); Index: lams_tool_imscc/web/includes/javascript/commonCartridgeItem.js =================================================================== RCS file: /usr/local/cvsroot/lams_tool_imscc/web/includes/javascript/commonCartridgeItem.js,v diff -u -r1.1 -r1.2 --- lams_tool_imscc/web/includes/javascript/commonCartridgeItem.js 28 May 2011 18:03:49 -0000 1.1 +++ lams_tool_imscc/web/includes/javascript/commonCartridgeItem.js 8 Jun 2011 12:31:16 -0000 1.2 @@ -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(); - } Index: lams_tool_imscc/web/pages/authoring/basic.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_imscc/web/pages/authoring/basic.jsp,v diff -u -r1.2 -r1.3 --- lams_tool_imscc/web/pages/authoring/basic.jsp 7 Jun 2011 20:58:39 -0000 1.2 +++ lams_tool_imscc/web/pages/authoring/basic.jsp 8 Jun 2011 12:31:16 -0000 1.3 @@ -1,48 +1,14 @@ <%@ include file="/common/taglibs.jsp"%> - + + + + - + + +
<%@ include file="/common/messages.jsp"%> @@ -80,14 +96,17 @@ +
- + + + + - - - -
+ + +
Index: lams_tool_imscc/web/pages/authoring/parts/addcommoncartridge.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_imscc/web/pages/authoring/parts/addcommoncartridge.jsp,v diff -u -r1.2 -r1.3 --- lams_tool_imscc/web/pages/authoring/parts/addcommoncartridge.jsp 7 Jun 2011 20:58:39 -0000 1.2 +++ lams_tool_imscc/web/pages/authoring/parts/addcommoncartridge.jsp 8 Jun 2011 12:31:16 -0000 1.3 @@ -11,27 +11,32 @@ -
+
<%@ include file="/common/messages.jsp"%> -

+

-

-
+
<%@ include file="/pages/authoring/parts/itemattachment.jsp"%> -
-

+ + + + + + + + + +
-
Index: lams_tool_imscc/web/pages/authoring/parts/itemlist.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_imscc/web/pages/authoring/parts/itemlist.jsp,v diff -u -r1.1 -r1.2 --- lams_tool_imscc/web/pages/authoring/parts/itemlist.jsp 28 May 2011 18:03:43 -0000 1.1 +++ lams_tool_imscc/web/pages/authoring/parts/itemlist.jsp 8 Jun 2011 12:31:16 -0000 1.2 @@ -25,15 +25,20 @@ ${commonCartridge.title} - + - " - onclick="editItem(${status.index},'${sessionMapID}')" /> + + + ?sessionMapID=${sessionMapID}&itemIndex=${status.index}&KeepThis=true&TB_iframe=true&height=540&width=850&modal=true + + + " style="border-style: none;"/> + Index: lams_tool_imscc/web/pages/authoring/parts/selectResources.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_imscc/web/pages/authoring/parts/selectResources.jsp,v diff -u -r1.1 -r1.2 --- lams_tool_imscc/web/pages/authoring/parts/selectResources.jsp 7 Jun 2011 20:58:39 -0000 1.1 +++ lams_tool_imscc/web/pages/authoring/parts/selectResources.jsp 8 Jun 2011 12:31:16 -0000 1.2 @@ -15,12 +15,12 @@ -