Index: lams_tool_larsrc/conf/xdoclet/struts-actions.xml =================================================================== diff -u -r36d1e75abd559af0c4ec769ee5dd353f9ed4ffb7 -r22c9fac3e900de26984ff64416f30a373fc05658 --- lams_tool_larsrc/conf/xdoclet/struts-actions.xml (.../struts-actions.xml) (revision 36d1e75abd559af0c4ec769ee5dd353f9ed4ffb7) +++ lams_tool_larsrc/conf/xdoclet/struts-actions.xml (.../struts-actions.xml) (revision 22c9fac3e900de26984ff64416f30a373fc05658) @@ -16,4 +16,19 @@ validate="false"> - \ No newline at end of file + + + + + + + + + + \ No newline at end of file Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/ApplicationResources.properties =================================================================== diff -u -rf3709b5af90ca8439a64e65b0c971bc547b1eb3a -r22c9fac3e900de26984ff64416f30a373fc05658 --- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/ApplicationResources.properties (.../ApplicationResources.properties) (revision f3709b5af90ca8439a64e65b0c971bc547b1eb3a) +++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/ApplicationResources.properties (.../ApplicationResources.properties) (revision 22c9fac3e900de26984ff64416f30a373fc05658) @@ -37,7 +37,8 @@ label.authoring.basic.resource.add.instruction=Add Instruction label.authoring.basic.resource.instructions=Instructions -label.authoring.basic.resource.title.input=Description +label.authoring.basic.resource.title.input=Title +label.authoring.basic.resource.url.input=URL label.authoring.basic.resource.file.input=Description label.authoring.basic.resource.description.input=Description label.authoring.basic.resource.zip.file.input=Zip file: Index: lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/web/action/AuthoringAction.java =================================================================== diff -u -r36d1e75abd559af0c4ec769ee5dd353f9ed4ffb7 -r22c9fac3e900de26984ff64416f30a373fc05658 --- lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/web/action/AuthoringAction.java (.../AuthoringAction.java) (revision 36d1e75abd559af0c4ec769ee5dd353f9ed4ffb7) +++ lams_tool_larsrc/src/java/org/lamsfoundation/lams/tool/rsrc/web/action/AuthoringAction.java (.../AuthoringAction.java) (revision 22c9fac3e900de26984ff64416f30a373fc05658) @@ -22,6 +22,7 @@ import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -30,6 +31,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.commons.lang.math.NumberUtils; import org.apache.log4j.Logger; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; @@ -48,6 +50,7 @@ * @version $Revision$ */ public class AuthoringAction extends Action { + private static final int INIT_INSTRUCTION_COUNT = 2; private static Logger log = Logger.getLogger(AuthoringAction.class); public ActionForward execute(ActionMapping mapping, ActionForm form, @@ -78,10 +81,17 @@ // if (param.equals("deleteOfflineFile")) { // return deleteOfflineFile(mapping, form, request, response); // } -// //-----------------------Topic function --------------------------- -// if (param.equals("newTopic")) { -// return newTopic(mapping, form, request, response); -// } + //----------------------- Add resource function --------------------------- + if (param.equals("addUrl")) { + return addUrl(mapping, form, request, response); + } + if (param.equals("removeUrl")) { + return removeUrl(mapping, form, request, response); + } + //-----------------------Instruction function --------------------------- + if (param.equals("newInstruction")) { + return newInstruction(mapping, form, request, response); + } // if (param.equals("createTopic")) { // return createTopic(mapping, form, request, response); // } @@ -108,6 +118,43 @@ // } return mapping.findForward(ResourceConstants.ERROR); } + private ActionForward addUrl(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { + List instructionList = new ArrayList(INIT_INSTRUCTION_COUNT); + for(int idx=0;idx -

Index: lams_tool_larsrc/web/pages/authoring/basic.jsp =================================================================== diff -u -rf3709b5af90ca8439a64e65b0c971bc547b1eb3a -r22c9fac3e900de26984ff64416f30a373fc05658 --- lams_tool_larsrc/web/pages/authoring/basic.jsp (.../basic.jsp) (revision f3709b5af90ca8439a64e65b0c971bc547b1eb3a) +++ lams_tool_larsrc/web/pages/authoring/basic.jsp (.../basic.jsp) (revision 22c9fac3e900de26984ff64416f30a373fc05658) @@ -6,14 +6,14 @@ * Launches the popup window for the instruction files */ function showMessage(url) { - var area=document.getElementById("itemArea"); + var area=document.getElementById("reourceInputArea"); area.style.width="100%"; area.style.height="100%"; area.src=url; area.style.display="block"; } function hideMessage(){ - var area=document.getElementById("itemArea"); + var area=document.getElementById("reourceInputArea"); area.style.width="0px"; area.style.height="0px"; area.style.display="none"; @@ -43,7 +43,7 @@ @@ -69,7 +69,7 @@ Index: lams_tool_larsrc/web/pages/authoring/parts/addurl.jsp =================================================================== diff -u -rf3709b5af90ca8439a64e65b0c971bc547b1eb3a -r22c9fac3e900de26984ff64416f30a373fc05658 --- lams_tool_larsrc/web/pages/authoring/parts/addurl.jsp (.../addurl.jsp) (revision f3709b5af90ca8439a64e65b0c971bc547b1eb3a) +++ lams_tool_larsrc/web/pages/authoring/parts/addurl.jsp (.../addurl.jsp) (revision 22c9fac3e900de26984ff64416f30a373fc05658) @@ -1,42 +1,118 @@ <%@ include file="/common/taglibs.jsp" %> + + + + + - -
- ');"> + ');">
-
-
+ + + + + -
+ - - + + + + + +

+

- - - - - - -
+
+ + + + + +
+ <%@ include file="instructions.jsp" %> + + " class="buttonStyle"> +
+
- - + \ No newline at end of file Index: lams_tool_larsrc/web/pages/authoring/parts/instructions.jsp =================================================================== diff -u --- lams_tool_larsrc/web/pages/authoring/parts/instructions.jsp (revision 0) +++ lams_tool_larsrc/web/pages/authoring/parts/instructions.jsp (revision 22c9fac3e900de26984ff64416f30a373fc05658) @@ -0,0 +1,35 @@ +<%@ include file="/common/taglibs.jsp" %> + +
+
+ + + + + + + + + + + + + + +
+ + " class="buttonStyle"> + +
${status.index} + + + +
+
+
+ +