Index: lams_central/web/authoring/authoring.jsp
===================================================================
diff -u -r3da98a1b1c7bcd2df24329ed436a4b6b8cdf5ca8 -r37beffb2324fb31d56f3c25ebc8b3c644427b55c
--- lams_central/web/authoring/authoring.jsp (.../authoring.jsp) (revision 3da98a1b1c7bcd2df24329ed436a4b6b8cdf5ca8)
+++ lams_central/web/authoring/authoring.jsp (.../authoring.jsp) (revision 37beffb2324fb31d56f3c25ebc8b3c644427b55c)
@@ -187,8 +187,6 @@
ANNOTATION_LABEL_PLACE_PROMPT : decoderDiv.html('').text(),
OPTIONAL_ACTIVITY_PLACE_PROMPT : decoderDiv.html('').text(),
-
- SUPPORT_ACTIVITY_PLACE_PROMPT : decoderDiv.html('').text(),
TRANSITION_PLACE_PROMPT : decoderDiv.html('').text(),
@@ -383,7 +381,6 @@
@@ -534,6 +531,25 @@
+
+
+
Index: lams_central/web/images/svg/floating.svg
===================================================================
diff -u
--- lams_central/web/images/svg/floating.svg (revision 0)
+++ lams_central/web/images/svg/floating.svg (revision 37beffb2324fb31d56f3c25ebc8b3c644427b55c)
@@ -0,0 +1 @@
+
\ No newline at end of file
Index: lams_central/web/includes/javascript/authoring/authoringActivity.js
===================================================================
diff -u -r4e46528786b82a794844edf3d31958da538f9f14 -r37beffb2324fb31d56f3c25ebc8b3c644427b55c
--- lams_central/web/includes/javascript/authoring/authoringActivity.js (.../authoringActivity.js) (revision 4e46528786b82a794844edf3d31958da538f9f14)
+++ lams_central/web/includes/javascript/authoring/authoringActivity.js (.../authoringActivity.js) (revision 37beffb2324fb31d56f3c25ebc8b3c644427b55c)
@@ -46,7 +46,8 @@
'Forum and Scribe' : 5,
'grouping' : 1,
- 'gate' : 1
+ 'gate' : 1,
+ 'floating' : 1
},
ActivityDefs = {
@@ -1711,8 +1712,7 @@
if (activity instanceof ActivityDefs.FloatingActivity) {
layout.floatingActivity = null;
// re-enable the button, as the only possible Floating Activity is gone now
- $('#floatingActivityButton').attr('disabled', null)
- .css('opacity', 1);
+ $('.template[learningLibraryId="floating"]').slideDown();
} else {
// remove the transitions
// need to use slice() to copy the array as it gets modified in removeTransition()
Index: lams_central/web/includes/javascript/authoring/authoringGeneral.js
===================================================================
diff -u -r4e46528786b82a794844edf3d31958da538f9f14 -r37beffb2324fb31d56f3c25ebc8b3c644427b55c
--- lams_central/web/includes/javascript/authoring/authoringGeneral.js (.../authoringGeneral.js) (revision 4e46528786b82a794844edf3d31958da538f9f14)
+++ lams_central/web/includes/javascript/authoring/authoringGeneral.js (.../authoringGeneral.js) (revision 37beffb2324fb31d56f3c25ebc8b3c644427b55c)
@@ -210,6 +210,7 @@
$('.template', templateContainerCell).each(function(){
let learningLibraryID = $(this).attr('learningLibraryId'),
+ isFlowActivity = isNaN(+learningLibraryID),
activityCategoryID = layout.toolMetadata[learningLibraryID].activityCategoryID;
$('#collapse-tool-category-' + activityCategoryID, templateContainerCell).append(this);
@@ -224,15 +225,15 @@
'helper' : function(){
let helper = null;
// build a simple helper
- if (learningLibraryID == 'gate'){
+ if (isFlowActivity){
helper = $('img', this).clone();
} else {
helper = $(this).clone();
}
return helper.addClass('template-drag-helper');
},
- 'cursorAt' : isNaN(+learningLibraryID) ? {
+ 'cursorAt' : isFlowActivity ? {
'right' : 20,
'bottom': 45
} : false
@@ -263,6 +264,11 @@
activity = new ActivityDefs.GroupingActivity(null, null, x, y)
} else if (learningLibraryID == 'gate'){
activity = new ActivityDefs.GateActivity(null, null, x, y + 30);
+ } else if (learningLibraryID == 'floating') {
+ activity = new ActivityDefs.FloatingActivity(null, null, x, y);
+
+ // there can be only one floating activity on canvas
+ $('.template[learningLibraryId="floating"]').slideUp();
}
} else if (activityCategoryID === 5) {
// construct child activities out of previously referenced HTML templates
Index: lams_central/web/includes/javascript/authoring/authoringMenu.js
===================================================================
diff -u -r3da98a1b1c7bcd2df24329ed436a4b6b8cdf5ca8 -r37beffb2324fb31d56f3c25ebc8b3c644427b55c
--- lams_central/web/includes/javascript/authoring/authoringMenu.js (.../authoringMenu.js) (revision 3da98a1b1c7bcd2df24329ed436a4b6b8cdf5ca8)
+++ lams_central/web/includes/javascript/authoring/authoringMenu.js (.../authoringMenu.js) (revision 37beffb2324fb31d56f3c25ebc8b3c644427b55c)
@@ -85,39 +85,7 @@
});
},
-
/**
- * Creates a new floating activity.
- */
- addFloatingActivity : function() {
- if (layout.floatingActivity) {
- // there can be only one
- return;
- }
- HandlerLib.resetCanvasMode();
-
- layout.infoDialog.data('show')(LABELS.SUPPORT_ACTIVITY_PLACE_PROMPT, true);
-
- canvas.css('cursor', 'pointer').click(function(event){
- layout.infoDialog.modal('hide');
- var translatedEvent = GeneralLib.translateEventOnCanvas(event),
- x = translatedEvent[0],
- y = translatedEvent[1];
-
- GeneralLib.setModified(true);
- HandlerLib.resetCanvasMode(true);
-
- // do not add it to layout.activities as it behaves differently
- new ActivityDefs.FloatingActivity(null, null, x, y);
-
- // there can be only one, so disable the button
- $('#floatingActivityButton').attr('disabled', 'disabled')
- .css('opacity', 0.2);
- });
- },
-
-
- /**
* Creates a new optional activity.
*/
addOptionalActivity : function() {
|