Index: lams_central/conf/language/lams/ApplicationResources.properties
===================================================================
diff -u -r69c6461c4d7ce761966f0e5b4da23e34c1810fa2 -r573045a3e475060269af01d4de73dc5956809591
--- lams_central/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 69c6461c4d7ce761966f0e5b4da23e34c1810fa2)
+++ lams_central/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 573045a3e475060269af01d4de73dc5956809591)
@@ -552,7 +552,6 @@
authoring.fla.sequence.not.selected.error =Please choose a sequence
authoring.fla.sequence.load.error =Error while loading the sequence
authoring.fla.transition.from.exists.error =Transition from this activity already exists
-authoring.fla.export.image.dialog.title =Image export
authoring.fla.export.sequence.dialog.title =Sequence export
authoring.fla.activity.copy.title.prefix =Copy [0] of
authoring.fla.preview.lesson.default.title =Preview
@@ -619,10 +618,7 @@
authoring.fla.page.menu.import.part =Import part
authoring.fla.page.menu.save =Save
authoring.fla.page.menu.saveas =Save as
-authoring.fla.page.menu.export =Export
-authoring.fla.page.menu.export.lams =Sequence LAMS
-authoring.fla.page.menu.export.png =Image PNG
-authoring.fla.page.menu.export.svg =Image SVG
+authoring.fla.page.menu.export.lams =Export
authoring.fla.page.menu.copy =Copy
authoring.fla.page.menu.paste =Paste
authoring.fla.page.menu.transition =Transition
Index: lams_central/web/authoring/authoring.jsp
===================================================================
diff -u -r3750d4ca838633d6f19b1f4e1a8e13d9fc41d7c7 -r573045a3e475060269af01d4de73dc5956809591
--- lams_central/web/authoring/authoring.jsp (.../authoring.jsp) (revision 3750d4ca838633d6f19b1f4e1a8e13d9fc41d7c7)
+++ lams_central/web/authoring/authoring.jsp (.../authoring.jsp) (revision 573045a3e475060269af01d4de73dc5956809591)
@@ -142,8 +142,6 @@
LIVEEDIT_REMOVE_TRANSITION_ERROR : '',
// MenuLib
-
- EXPORT_IMAGE_DIALOG_TITLE : '',
EXPORT_SEQUENCE_DIALOG_TITLE : '',
@@ -304,10 +302,7 @@
Index: lams_central/web/includes/javascript/authoring/authoringGeneral.js
===================================================================
diff -u -r2b618cc66073acd40963abf44f27703a855fac4c -r573045a3e475060269af01d4de73dc5956809591
--- lams_central/web/includes/javascript/authoring/authoringGeneral.js (.../authoringGeneral.js) (revision 2b618cc66073acd40963abf44f27703a855fac4c)
+++ lams_central/web/includes/javascript/authoring/authoringGeneral.js (.../authoringGeneral.js) (revision 573045a3e475060269af01d4de73dc5956809591)
@@ -13,7 +13,6 @@
// in read-only mode (SVG generator), some parts are not necessary and not loaded
GeneralInitLib.initLayout();
PropertyLib.init();
- MenuLib.init();
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){
$('.desktopButton').hide();
@@ -1376,6 +1375,7 @@
layout.conf.readOnlyFilter = paper.filter(Snap.filter.grayscale(1));
GeneralLib.resizePaper();
+ GeneralLib.setModified(false);
} else {
// do not prompt again
window.onbeforeunload = null;
@@ -1930,7 +1930,7 @@
layout.liveEdit = true;
// remove unnecessary buttons, show Cancel, move Open after Save and Cancel
- $('#newButton, #importSequenceButton, #saveAsButton, #exportLamsButton, #exportImsButton, #previewButton').remove();
+ $('#newButton, #importSequenceButton, #saveAsButton, #exportLamsButton, #previewButton').remove();
$('#cancelLiveEditButton').show()
.after($('#openButton').parent().parent());
}
@@ -2574,40 +2574,15 @@
return;
}
layout.modified = modified;
- var activitiesExist = layout.activities.length > 0,
- enableExportButton = false;
- if (!modified && activitiesExist) {
+ if (!modified && layout.activities.length > 0) {
$('#previewButton').prop('disabled', layout.ld.invalid);
- $('.exportSequenceButton').attr('disabled', null)
- .css('opacity', 1);
+ $('#exportLamsButton').removeClass('disabled');
$('#ldDescriptionFieldModified').text('');
- enableExportButton = true;
} else {
$('#previewButton').prop('disabled', true);
- $('.exportSequenceButton').attr('disabled', 'disabled')
- .css('opacity', 0.2);
+ $('#exportLamsButton').addClass('disabled');
$('#ldDescriptionFieldModified').text('*');
}
-
- // if the browser does not support HTML5 "download" attribute,
- // the image can only be received from the LD saved on the server
- if ((!modified || layout.conf.supportsDownloadAttribute) && activitiesExist) {
- $('.exportImageButton').attr('disabled', null)
- .css('opacity', 1);
- enableExportButton = true;
- } else {
- $('.exportImageButton').attr('disabled', 'disabled')
- .css('opacity', 0.2);
- }
-
- // disabled the whole export button if all children are disabled
- if (enableExportButton) {
- $('#exportButton').attr('disabled', null)
- .css('opacity', 1);
- } else {
- $('#exportButton').attr('disabled', 'disabled')
- .css('opacity', 0.2);
- }
},
Index: lams_central/web/includes/javascript/authoring/authoringMenu.js
===================================================================
diff -u -r453fa20b88356706f1959cbd6a492ed4ff26a6db -r573045a3e475060269af01d4de73dc5956809591
--- lams_central/web/includes/javascript/authoring/authoringMenu.js (.../authoringMenu.js) (revision 453fa20b88356706f1959cbd6a492ed4ff26a6db)
+++ lams_central/web/includes/javascript/authoring/authoringMenu.js (.../authoringMenu.js) (revision 573045a3e475060269af01d4de73dc5956809591)
@@ -3,24 +3,6 @@
*/
var MenuLib = {
-
- init : function(){
- // dialog allowing to save canvas as SVG or PNG image
- layout.exportImageDialog = showDialog('exportImageDialog',{
- 'autoOpen' : false,
- 'width' : 350,
- 'draggable': false,
- 'resizable': false,
- 'modal' : true,
- 'title' : LABELS.EXPORT_IMAGE_DIALOG_TITLE,
- 'close' : null
- }, false);
-
- $('.modal-body', layout.exportImageDialog).empty().append($('#exportImageDialogContents').show());
- layout.dialogs.push(layout.exportImageDialog);
- },
-
-
/**
* Creates a new annotation label.
*/
@@ -303,50 +285,27 @@
* Creates a SVG image out of current SVG contents.
*/
exportSVG : function(download){
-
ActivityLib.removeSelectEffect();
- var imageCode = null;
- if (!download || layout.conf.supportsDownloadAttribute) {
- var crop = MenuLib.getCanvasCrop();
- if (crop.x >= crop.x2) {
- return;
- }
- // set viewBox so content is nicely aligned
- var width = crop.x2 - crop.x + 2,
- height = crop.y2 - crop.y + 2;
- svg = $('svg', crop.canvasClone)[0];
-
- // need to set attributes using pure JS as jQuery sets them with lower case, which is unacceptable in SVG
- svg.setAttribute('viewBox', crop.x + ' ' + crop.y + ' ' + width + ' ' + height);
- svg.setAttribute('preserveAspectRatio', 'xMinYMin slice');
- svg.setAttribute('width', width);
- svg.setAttribute('height', height);
-
-
- // reset any cursor=pointer styles
- $('*[style*="cursor"]', svg).css('cursor', 'default');
-
- imageCode = crop.canvasClone.html();
+ var crop = MenuLib.getCanvasCrop();
+ if (crop.x >= crop.x2) {
+ return;
}
+ // set viewBox so content is nicely aligned
+ var width = crop.x2 - crop.x + 2,
+ height = crop.y2 - crop.y + 2;
+ svg = $('svg', crop.canvasClone)[0];
+
+ // need to set attributes using pure JS as jQuery sets them with lower case, which is unacceptable in SVG
+ svg.setAttribute('viewBox', crop.x + ' ' + crop.y + ' ' + width + ' ' + height);
+ svg.setAttribute('preserveAspectRatio', 'xMinYMin slice');
+ svg.setAttribute('width', width);
+ svg.setAttribute('height', height);
- if (download) {
- var anchor = $('a', layout.exportImageDialog);
- if (layout.conf.supportsDownloadAttribute) {
- anchor.attr({
- 'href' : 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(imageCode),
- 'download' : (layout.ld.title ? layout.ld.title : 'Untitled') + '.svg'
- });
- } else {
- anchor.attr({
- 'href' : LD_THUMBNAIL_URL_BASE + layout.ld.learningDesignID
- + '&download=true&_=' + new Date().getTime()
- });
- }
- layout.exportImageDialog.modal('show');
- } else {
- return imageCode;
- }
+ // reset any cursor=pointer styles
+ $('*[style*="cursor"]', svg).css('cursor', 'default');
+
+ return crop.canvasClone.html();
},