Index: lams_tool_imscc/src/java/org/lamsfoundation/lams/tool/commonCartridge/CommonCartridgeConstants.java =================================================================== diff -u -rf2b535f5f5e5134c69b47e2f813e05009afdbe4d -r4dba5dfd3c1a3802a3354b772a8449378d1dc3b5 --- lams_tool_imscc/src/java/org/lamsfoundation/lams/tool/commonCartridge/CommonCartridgeConstants.java (.../CommonCartridgeConstants.java) (revision f2b535f5f5e5134c69b47e2f813e05009afdbe4d) +++ lams_tool_imscc/src/java/org/lamsfoundation/lams/tool/commonCartridge/CommonCartridgeConstants.java (.../CommonCartridgeConstants.java) (revision 4dba5dfd3c1a3802a3354b772a8449378d1dc3b5) @@ -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 =================================================================== diff -u -rf2b535f5f5e5134c69b47e2f813e05009afdbe4d -r4dba5dfd3c1a3802a3354b772a8449378d1dc3b5 --- lams_tool_imscc/src/java/org/lamsfoundation/lams/tool/commonCartridge/web/action/AuthoringAction.java (.../AuthoringAction.java) (revision f2b535f5f5e5134c69b47e2f813e05009afdbe4d) +++ lams_tool_imscc/src/java/org/lamsfoundation/lams/tool/commonCartridge/web/action/AuthoringAction.java (.../AuthoringAction.java) (revision 4dba5dfd3c1a3802a3354b772a8449378d1dc3b5) @@ -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 =================================================================== 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(); - } Index: lams_tool_imscc/web/pages/authoring/basic.jsp =================================================================== diff -u -rf2b535f5f5e5134c69b47e2f813e05009afdbe4d -r4dba5dfd3c1a3802a3354b772a8449378d1dc3b5 --- lams_tool_imscc/web/pages/authoring/basic.jsp (.../basic.jsp) (revision f2b535f5f5e5134c69b47e2f813e05009afdbe4d) +++ lams_tool_imscc/web/pages/authoring/basic.jsp (.../basic.jsp) (revision 4dba5dfd3c1a3802a3354b772a8449378d1dc3b5) @@ -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 =================================================================== diff -u -rf2b535f5f5e5134c69b47e2f813e05009afdbe4d -r4dba5dfd3c1a3802a3354b772a8449378d1dc3b5 --- lams_tool_imscc/web/pages/authoring/parts/addcommoncartridge.jsp (.../addcommoncartridge.jsp) (revision f2b535f5f5e5134c69b47e2f813e05009afdbe4d) +++ lams_tool_imscc/web/pages/authoring/parts/addcommoncartridge.jsp (.../addcommoncartridge.jsp) (revision 4dba5dfd3c1a3802a3354b772a8449378d1dc3b5) @@ -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 =================================================================== diff -u -r7f68f72a3d80b8e24ba596d34ccea104ca285d05 -r4dba5dfd3c1a3802a3354b772a8449378d1dc3b5 --- lams_tool_imscc/web/pages/authoring/parts/itemlist.jsp (.../itemlist.jsp) (revision 7f68f72a3d80b8e24ba596d34ccea104ca285d05) +++ lams_tool_imscc/web/pages/authoring/parts/itemlist.jsp (.../itemlist.jsp) (revision 4dba5dfd3c1a3802a3354b772a8449378d1dc3b5) @@ -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 =================================================================== diff -u -rf2b535f5f5e5134c69b47e2f813e05009afdbe4d -r4dba5dfd3c1a3802a3354b772a8449378d1dc3b5 --- lams_tool_imscc/web/pages/authoring/parts/selectResources.jsp (.../selectResources.jsp) (revision f2b535f5f5e5134c69b47e2f813e05009afdbe4d) +++ lams_tool_imscc/web/pages/authoring/parts/selectResources.jsp (.../selectResources.jsp) (revision 4dba5dfd3c1a3802a3354b772a8449378d1dc3b5) @@ -15,12 +15,12 @@ -