Index: lams_tool_laqa/web/authoring/BasicContent.jsp
===================================================================
diff -u -rfb9d13eb115f5281b03ab1624ec10a22ba3b81b7 -r320934945c495ab0832be6fb547d83812ac3152a
--- lams_tool_laqa/web/authoring/BasicContent.jsp (.../BasicContent.jsp) (revision fb9d13eb115f5281b03ab1624ec10a22ba3b81b7)
+++ lams_tool_laqa/web/authoring/BasicContent.jsp (.../BasicContent.jsp) (revision 320934945c495ab0832be6fb547d83812ac3152a)
@@ -6,92 +6,66 @@
* Launches the popup window for the instruction files
*/
function showMessage(url) {
- var area=document.getElementById("messageArea");
- if(area != null){
- area.style.width="95%";
- area.src=url;
- area.style.display="block";
- }
- var elem = document.getElementById("saveCancelButtons");
- if (elem != null) {
- elem.style.display="none";
- }
+ $("#messageArea").load(url, function() {
+ $(this).show();
+ $('#saveCancelButtons').hide();
+ });
location.hash = "messageArea";
}
function hideMessage(){
- var area=document.getElementById("messageArea");
- if(area != null){
- area.style.width="0px";
- area.style.height="0px";
- area.style.display="none";
- }
- var elem = document.getElementById("saveCancelButtons");
- if (elem != null) {
- elem.style.display="block";
- }
+ $("#messageArea").hide();
+ $('#saveCancelButtons').show();
}
- function removeQuestion(questionIndex)
- {
+ function removeQuestion(questionIndex){
document.QaAuthoringForm.questionIndex.value=questionIndex;
submitMethod('removeQuestion');
}
- function removeMonitoringQuestion(questionIndex)
- {
- document.QaMonitoringForm.questionIndex.value=questionIndex;
- submitMonitoringMethod('removeQuestion');
- }
-
- function resizeIframe(heightOffSet)
- {
- var iframe = document.getElementById("messageArea");
- iframe.style.height = parseInt(iframe.style.height) + heightOffSet + "px";
- }
+ function submitMessage(){
+ if ( typeof CKEDITOR !== 'undefined' ) {
+ for ( instance in CKEDITOR.instances )
+ CKEDITOR.instances[instance].updateElement();
+ }
+ var formData = new FormData(document.getElementById("newQuestionForm"));
+
+ $.ajax({ // create an AJAX call...
+ data: formData,
+ processData: false, // tell jQuery not to process the data
+ contentType: false, // tell jQuery not to set contentType
+ type: $("#newQuestionForm").attr('method'),
+ url: $("#newQuestionForm").attr('action'),
+ success: function(data) {
+ $('#resourceListArea').html($(data).find('#itemList'));
+ hideMessage();
+ }
+ });
+ }
-
-
- |
- |
-
-
- |
-
+
-- -
+ \ No newline at end of file