Index: lams_central/web/author2.jsp =================================================================== diff -u -rcb22fc8bbf9e4678f8769262d02d86ba5a4ee75b -r8a39e73cf38d5f62bf4be88f765da4a23da49fff --- lams_central/web/author2.jsp (.../author2.jsp) (revision cb22fc8bbf9e4678f8769262d02d86ba5a4ee75b) +++ lams_central/web/author2.jsp (.../author2.jsp) (revision 8a39e73cf38d5f62bf4be88f765da4a23da49fff) @@ -38,7 +38,7 @@ initContentFolderID = '${contentFolderID}'; - +
New @@ -150,10 +150,11 @@
Untitled +
Description: - (click to hide) +
15){ - toolName.css('padding-top', '4px'); + if (toolName.text().length > 12){ + toolName.css('padding-top', '8px'); } // allow dragging a template to canvas @@ -197,18 +197,19 @@ var toolActivityLibraryID = +$(this).attr('learningLibraryId'), toolLabel = $('div', this).text(), childActivity = new ActivityLib.ToolActivity(null, null, null, - toolActivityLibraryID, x, y, toolLabel); + toolActivityLibraryID, null, x, y, toolLabel); layout.activities.push(childActivity); childActivities.push(childActivity); }); activity = new ActivityLib.ParallelActivity(null, null, learningLibraryID, x, y, label, childActivities); } else { - activity = new ActivityLib.ToolActivity(null, null, null, learningLibraryID, x, y, label); + activity = new ActivityLib.ToolActivity(null, null, null, learningLibraryID, null, x, y, label); } layout.activities.push(activity); + HandlerLib.dropObject(activity); ActivityLib.dropActivity(activity, eventX, eventY); } }); @@ -249,7 +250,7 @@ 'of' : 'body' }, 'resizable' : false, - 'width' : 1000, + 'width' : 1240, 'height' : 785, 'draggable' : false, 'buttonsLoad' : [ @@ -458,6 +459,9 @@ activityData.activityUIID, activityData.toolContentID, activityData.toolID, + LAMS_URL + activityData.authoringURL + + '?toolContentID=' + activityData.toolContentID + + '&contentFolderID=' + layout.ld.contentFolderID, activityData.xCoord ? activityData.xCoord : 1, activityData.yCoord ? activityData.yCoord : 1, activityData.activityTitle, @@ -1255,13 +1259,24 @@ return; } - if (!width) { - width = canvas.width() - 5; + if (!width || !height) { + var width = 0, + height = 0; + $.each(layout.activities, function(){ + // find new dimensions of paper + var activityBox = this.items.shape.getBBox(); + if (activityBox.x2 + 30 > width) { + width = activityBox.x2 + 30; + } + if (activityBox.y2 + 30 > height) { + height = activityBox.y2 + 30; + } + }); } - if (!height || (height == canvas.height() - 5)) { - // take into account the horizontal scrollbar - height = canvas.height() - 5 - (width > canvas.width() - 5 ? 20 : 0); - } + + width = Math.max(width, canvas.width()) - 20; + height = Math.max(height, canvas.height()) - 20; + paper.setSize(width, height); if (layout.items.bin) { Index: lams_central/web/includes/javascript/authoring/authoringHandler.js =================================================================== diff -u -rdec21a402fc7b42adcf84c15b644228d46a140c7 -r8a39e73cf38d5f62bf4be88f765da4a23da49fff --- lams_central/web/includes/javascript/authoring/authoringHandler.js (.../authoringHandler.js) (revision dec21a402fc7b42adcf84c15b644228d46a140c7) +++ lams_central/web/includes/javascript/authoring/authoringHandler.js (.../authoringHandler.js) (revision 8a39e73cf38d5f62bf4be88f765da4a23da49fff) @@ -536,6 +536,9 @@ object.draw(x + transformation[0][1], y + transformation[0][2]); } + + // add space if dropped object is next to border + resizePaper(); }, Index: lams_central/web/includes/javascript/authoring/authoringMenu.js =================================================================== diff -u -rcb22fc8bbf9e4678f8769262d02d86ba5a4ee75b -r8a39e73cf38d5f62bf4be88f765da4a23da49fff --- lams_central/web/includes/javascript/authoring/authoringMenu.js (.../authoringMenu.js) (revision cb22fc8bbf9e4678f8769262d02d86ba5a4ee75b) +++ lams_central/web/includes/javascript/authoring/authoringMenu.js (.../authoringMenu.js) (revision 8a39e73cf38d5f62bf4be88f765da4a23da49fff) @@ -753,7 +753,8 @@ // draw the new activity next to the existing one var x = activity.items.shape.getBBox().x + 10, y = activity.items.shape.getBBox().y + 10, - newActivity = new ActivityLib.ToolActivity(null, null, null, activity.toolID, x, y, title); + newActivity = new ActivityLib.ToolActivity(null, null, null, activity.toolID, + null, x, y, title); layout.activities.push(newActivity); if (activity.grouping) { @@ -811,9 +812,8 @@ toggleDescriptionDiv: function() { $('#ldDescriptionDetails').slideToggle(function(){ - ldDescriptionHideTip + $('#ldDescriptionHideTip').text($(this).is(':visible') ? '▲' : '▼'); }); - $('#ldDescriptionHideTip').toggle(); }, Index: lams_central/web/main.jsp =================================================================== diff -u -rcb22fc8bbf9e4678f8769262d02d86ba5a4ee75b -r8a39e73cf38d5f62bf4be88f765da4a23da49fff --- lams_central/web/main.jsp (.../main.jsp) (revision cb22fc8bbf9e4678f8769262d02d86ba5a4ee75b) +++ lams_central/web/main.jsp (.../main.jsp) (revision 8a39e73cf38d5f62bf4be88f765da4a23da49fff) @@ -246,7 +246,7 @@