Index: lams_tool_laqa/web/authoring/BasicContent.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/web/authoring/BasicContent.jsp,v
diff -u -r1.42.2.1 -r1.42.2.2
--- lams_tool_laqa/web/authoring/BasicContent.jsp 12 Sep 2014 21:20:36 -0000 1.42.2.1
+++ lams_tool_laqa/web/authoring/BasicContent.jsp 25 May 2016 16:25:18 -0000 1.42.2.2
@@ -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