Index: lams_central/web/author2.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/Attic/author2.jsp,v diff -u -r1.25 -r1.26 --- lams_central/web/author2.jsp 11 Apr 2014 09:33:37 -0000 1.25 +++ lams_central/web/author2.jsp 14 Apr 2014 14:40:40 -0000 1.26 @@ -38,7 +38,7 @@ initContentFolderID = '${contentFolderID}'; - +
New @@ -150,10 +150,11 @@
Untitled +
Description: - (click to hide) +

+ onClick="javascript:window.open('authoring/author.do?method=openAuthoring', 'FlashlessAuthoring','resizable=yes,scrollbars=yes,left=10,top=10,width=1280,height=800');"> <%=Configuration.get(ConfigurationKeys.VERSION)%> Index: lams_central/web/css/authoring.css =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/css/authoring.css,v diff -u -r1.17 -r1.18 --- lams_central/web/css/authoring.css 11 Apr 2014 09:33:38 -0000 1.17 +++ lams_central/web/css/authoring.css 14 Apr 2014 14:40:40 -0000 1.18 @@ -169,8 +169,8 @@ /**** Main authoring styles ****/ div#toolbar { - width: 1035px; padding: 3px; + width: 1235px; height: 27px; } @@ -198,7 +198,7 @@ } table#authoringTable { - table-layout: fixedf; + table-layout: fixed; width: 100%; } @@ -209,14 +209,14 @@ td#templateContainerCell { width: 150px; - border: black thin solid; vertical-align: top; - background-color: rgb(219, 230, 252); } div#templateContainer { - height: 720px; + height: 740px; overflow: auto; + border: black thin solid; + background-color: rgb(219, 230, 252); } div.template { @@ -232,9 +232,9 @@ div.template div { float: right; width: 89px; - padding-top: 11px; - font-size: 10pt; - font-family: serif; + padding-top: 14px; + font-size: 12px; + font-family: "Lucida Console", Monaco, monospace; } #ldDescriptionDiv { @@ -244,26 +244,25 @@ } #ldDescriptionDiv #ldDescriptionTitleContainer { - font-size: 10pt; - font-family: serif; + padding: 2px 0 0 0; + font-family: "Lucida Console", Monaco, monospace; + font-size: 12px; cursor: pointer; } #ldDescriptionDiv #ldDescriptionHideTip { - display: none; float: right; margin-right: 10px; - cursor: pointer; } #ldDescriptionDiv #ldDescriptionDetails { display: none; } #ldDescriptionDiv #ldDescriptionLabelDescription { + font-family: "Lucida Console", Monaco, monospace; text-align: left; - font-size: 10pt; - font-family: serif; + font-size: 12px; } #ldDescriptionDiv #ldDescriptionEditorContainer { @@ -272,7 +271,6 @@ #canvas { overflow: auto; - width: 900px; - height: 720px; + height: 725px; vertical-align: top; } \ No newline at end of file Index: lams_central/web/includes/javascript/authoring/authoringActivity.js =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/authoring/authoringActivity.js,v diff -u -r1.23 -r1.24 --- lams_central/web/includes/javascript/authoring/authoringActivity.js 11 Apr 2014 09:33:38 -0000 1.23 +++ lams_central/web/includes/javascript/authoring/authoringActivity.js 14 Apr 2014 14:40:40 -0000 1.24 @@ -30,11 +30,13 @@ /** * Constructor for a Tool Activity. */ - ToolActivity : function(id, uiid, toolContentID, toolID, x, y, title, supportsOutputs) { + ToolActivity : function(id, uiid, toolContentID, toolID, authorURL, + x, y, title, supportsOutputs) { this.id = +id; this.uiid = +uiid || ++layout.ld.maxUIID; this.toolContentID = toolContentID; this.toolID = +toolID; + this.authorURL = authorURL; this.title = title; this.supportsOutputs = supportsOutputs; this.transitions = { Index: lams_central/web/includes/javascript/authoring/authoringGeneral.js =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/authoring/authoringGeneral.js,v diff -u -r1.24 -r1.25 --- lams_central/web/includes/javascript/authoring/authoringGeneral.js 11 Apr 2014 09:33:38 -0000 1.24 +++ lams_central/web/includes/javascript/authoring/authoringGeneral.js 14 Apr 2014 14:40:40 -0000 1.25 @@ -143,8 +143,8 @@ // if a tool's name is too long and gets broken into two lines // make some adjustments to layout var toolName = $('div', this); - if (toolName.text().length > 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 =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/authoring/authoringHandler.js,v diff -u -r1.11 -r1.12 --- lams_central/web/includes/javascript/authoring/authoringHandler.js 10 Apr 2014 11:14:07 -0000 1.11 +++ lams_central/web/includes/javascript/authoring/authoringHandler.js 14 Apr 2014 14:40:40 -0000 1.12 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/authoring/authoringMenu.js,v diff -u -r1.21 -r1.22 --- lams_central/web/includes/javascript/authoring/authoringMenu.js 11 Apr 2014 09:33:38 -0000 1.21 +++ lams_central/web/includes/javascript/authoring/authoringMenu.js 14 Apr 2014 14:40:40 -0000 1.22 @@ -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(); },