Index: lams_bb_integration/web/links/admin.jsp
===================================================================
diff -u -r46f6e2a2d8c2b6552718747c373df53efd0cfc42 -rb4a4a2a44c27e0307086d3405993f9febe39f13b
--- lams_bb_integration/web/links/admin.jsp (.../admin.jsp) (revision 46f6e2a2d8c2b6552718747c373df53efd0cfc42)
+++ lams_bb_integration/web/links/admin.jsp (.../admin.jsp) (revision b4a4a2a44c27e0307086d3405993f9febe39f13b)
@@ -47,8 +47,13 @@
<%-- Monitor Button --%>
+
+
+
@@ -61,22 +66,7 @@
// Open the LAMS Seuence Monitor Window
function cloneLessons() {
//block #buttons
- $j('#buttons').block({
- message: 'Please, wait. Lessons are getting copied now.
',
- baseZ: 1000000,
- fadeIn: 0,
- css: {
- border: 'none',
- padding: $j('#buttons').height() + 'px',
- backgroundColor: '#000',
- '-webkit-border-radius': '10px',
- '-moz-border-radius': '10px',
- opacity: .98
- },
- overlayCSS: {
- opacity: 0
- }
- });
+ blockButtons();
$j.ajax({
async: true,
@@ -98,6 +88,49 @@
return false;
}
+ function importLessons() {
+ //block #buttons
+ blockButtons();
+
+ $j.ajax({
+ async: true,
+ url: '../ImportLessons',
+ data : 'courseId=<%=ctx.getCourse().getCourseId()%>',
+ type: 'post',
+ success: function (response) {
+ $j("#buttons").unblock();
+ alert(response);
+ },
+ error: function (request, status, error) {
+ $j("#buttons").unblock();
+ alert(error);
+ }
+ });
+
+ return false;
+ }
+
+ //auxiliary method to block #buttons element
+ function blockButtons(){
+
+ $j('#buttons').block({
+ message: 'Please, wait. Lessons are getting copied now.
',
+ baseZ: 1000000,
+ fadeIn: 0,
+ css: {
+ border: 'none',
+ padding: $j('#buttons').height() + 'px',
+ backgroundColor: '#000',
+ '-webkit-border-radius': '10px',
+ '-moz-border-radius': '10px',
+ opacity: .98
+ },
+ overlayCSS: {
+ opacity: 0
+ }
+ });
+ }
+