Index: lams_central/web/qb/collection.jsp
===================================================================
diff -u -r9846a1d61f34b45ba6db0e6a7daf2a620e607c83 -r21555f88fd0c63a4a9eb3ae288a2e1d48452aa4b
--- lams_central/web/qb/collection.jsp (.../collection.jsp) (revision 9846a1d61f34b45ba6db0e6a7daf2a620e607c83)
+++ lams_central/web/qb/collection.jsp (.../collection.jsp) (revision 21555f88fd0c63a4a9eb3ae288a2e1d48452aa4b)
@@ -1,10 +1,7 @@
-<%@ page contentType="text/html; charset=utf-8" language="java"%>
-<%@ taglib uri="tags-lams" prefix="lams"%>
-<%@ taglib uri="tags-fmt" prefix="fmt"%>
-<%@ taglib uri="tags-core" prefix="c"%>
+
+<%@ include file="/common/taglibs.jsp"%>
-
@@ -199,7 +196,7 @@
$('#collection-name').editable({
type: 'text',
pk: ${collection.uid},
- url: "qb/collection/changeCollectionName.do",
+ url: "qb/collection/changeCollectionName.do?",
validate: function(value) {
//close editing area on validation failure
if (!value.trim()) {
@@ -322,7 +319,8 @@
'type' : 'POST',
'dataType' : 'text',
'data' : {
- 'collectionUid' : ${collection.uid}
+ 'collectionUid' : ${collection.uid},
+ "" : ""
},
'cache' : false
}).done(function(){
@@ -341,7 +339,8 @@
'dataType' : 'text',
'data' : {
'collectionUid' : ${collection.uid},
- 'organisationId': organisationId
+ 'organisationId' : organisationId,
+ "" : ""
},
'cache' : false
}).done(function(){
@@ -359,7 +358,8 @@
'dataType' : 'text',
'data' : {
'collectionUid' : ${collection.uid},
- 'organisationId': organisationId
+ 'organisationId' : organisationId,
+ "" : ""
},
'cache' : false
}).done(function(){
@@ -375,23 +375,29 @@
function saveQTI(formHTML, formName) {
var form = $($.parseHTML(formHTML));
$.ajax({
- type: "POST",
- url: '?collectionUid=${collection.uid}',
+ url: '?&collectionUid=${collection.uid}',
data: form.serializeArray(),
+ type: "POST",
success: function() {
location.reload();
}
});
}
function exportQTI(){
- var frame = document.getElementById("downloadFileDummyIframe");
- frame.src = '?collectionUid=${collection.uid}';
+ //dynamically create a form and submit it
+ var exportExcelUrl = '?&collectionUid=${collection.uid}';
+ var form = $('');
+ $(document.body).append(form);
+ form.submit();
}
- function exportQuestionsXml(){
- var reqIDVar = new Date();
- location.href="?collectionUid=${collection.uid}&reqID="+reqIDVar.getTime();
+ function exportQuestionsXml(){
+ //dynamically create a form and submit it
+ var exportExcelUrl = "?&collectionUid=${collection.uid}&reqID="+(new Date()).getTime();
+ var form = $('');
+ $(document.body).append(form);
+ form.submit();
}
//create proper href for "Create question" button
@@ -560,12 +566,9 @@
-
-
-