Index: lams_central/conf/language/lams/ApplicationResources.properties
===================================================================
diff -u -rba0851141528de8337c1c8b8111b7614887bc8ed -r365d015a0a78d8a4cceed841e5c5f660369887ad
--- lams_central/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision ba0851141528de8337c1c8b8111b7614887bc8ed)
+++ lams_central/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 365d015a0a78d8a4cceed841e5c5f660369887ad)
@@ -456,6 +456,7 @@
authoring.fla.gate.activity.label =STOP
authoring.fla.branching.start.suffix =start
authoring.fla.branching.end.suffix =end
+authoring.fla.activity.dialog.title.suffix = Authoring
authoring.fla.remove.activity.confirm =Are you sure you want to remove the whole branching activity?
authoring.fla.branching.create.confirm =Transition from this activity already exists.\\nDo you want to create branching here?
authoring.fla.transition.to.exists.error =Transition to this activity already exists.
@@ -497,6 +498,7 @@
authoring.fla.preview.lesson.default.title =Preview
authoring.fla.save.dialog.title =Save sequence
authoring.fla.open.dialog.title =Open sequence
+authoring.fla.import.dialog.title =Import Learning Design
authoring.fla.import.part.dialog.title =Import activities
authoring.fla.run.sequences.folder =
authoring.fla.arrange.confirm =There are annotations on the canvas.\\n\
Index: lams_central/web/authoring/authoring.jsp
===================================================================
diff -u -rd68cf5c3211f63bf06f77a7c3ec6340561d120db -r365d015a0a78d8a4cceed841e5c5f660369887ad
--- lams_central/web/authoring/authoring.jsp (.../authoring.jsp) (revision d68cf5c3211f63bf06f77a7c3ec6340561d120db)
+++ lams_central/web/authoring/authoring.jsp (.../authoring.jsp) (revision 365d015a0a78d8a4cceed841e5c5f660369887ad)
@@ -16,11 +16,13 @@
+
+
@@ -60,6 +62,8 @@
BRANCHING_START_SUFFIX : '',
BRANCHING_END_SUFFIX : '',
+
+ ACTIVITY_DIALOG_TITLE_SUFFIX : '',
REMOVE_ACTIVITY_CONFIRM : decoderDiv.html('').text(),
@@ -150,6 +154,8 @@
SAVE_DIALOG_TITLE : '',
OPEN_DIALOG_TITLE : '',
+
+ IMPORT_DIALOG_TITLE : '',
IMPORT_PART_DIALOG_TITLE : '',
Index: lams_central/web/css/authoring.css
===================================================================
diff -u -rff01a6c237cefc4a5186889bf46041152cfc37ae -r365d015a0a78d8a4cceed841e5c5f660369887ad
--- lams_central/web/css/authoring.css (.../authoring.css) (revision ff01a6c237cefc4a5186889bf46041152cfc37ae)
+++ lams_central/web/css/authoring.css (.../authoring.css) (revision 365d015a0a78d8a4cceed841e5c5f660369887ad)
@@ -14,11 +14,22 @@
font-size: 12px !important;
}
+/* For jQuery Dialogextend */
+.ui-dialog .ui-dialog-titlebar-buttonpane a {
+ margin-right: 3px;
+}
+
div.dialogContainer, .ldChoiceDependentCanvasElement,
.dialog-no-title .ui-dialog-titlebar {
display: none;
}
+.dialogContainer iframe {
+ width: 100%;
+ height: 99%;
+ border: none;
+}
+
div.dialogTitle {
padding: 5px 0px 5px 0px;
font-weight: bold;
@@ -134,7 +145,6 @@
div#ldStoreDialog div#ldStoreDialogCanvasDiv {
overflow: auto;
- /* height: 665px; */
}
div#ldStoreDialog img#ldScreenshotLoading {
@@ -269,7 +279,7 @@
div#toolbar {
padding: 3px;
- width: 1220px;
+ width: 1010px;
height: 27px;
}
@@ -327,7 +337,6 @@
div.templateContainer {
display: none;
- height: 740px;
overflow: auto;
border: black thin solid;
background-color: rgb(219, 230, 252);
@@ -408,6 +417,5 @@
#canvas {
overflow: auto;
- height: 725px;
vertical-align: top;
}
\ No newline at end of file
Index: lams_central/web/css/index.css
===================================================================
diff -u -rce0e0a90db83dcadc1bf4eaa837ec94dc8cb93c0 -r365d015a0a78d8a4cceed841e5c5f660369887ad
--- lams_central/web/css/index.css (.../index.css) (revision ce0e0a90db83dcadc1bf4eaa837ec94dc8cb93c0)
+++ lams_central/web/css/index.css (.../index.css) (revision 365d015a0a78d8a4cceed841e5c5f660369887ad)
@@ -28,7 +28,7 @@
.dialogContainer iframe {
width: 100%;
- height: 100%;
+ height: 99.5%;
border: none;
}
Index: lams_central/web/includes/javascript/authoring/authoringActivity.js
===================================================================
diff -u -r0c1f66c648e0405319e5061e1dcf85de077ee2f0 -r365d015a0a78d8a4cceed841e5c5f660369887ad
--- lams_central/web/includes/javascript/authoring/authoringActivity.js (.../authoringActivity.js) (revision 0c1f66c648e0405319e5061e1dcf85de077ee2f0)
+++ lams_central/web/includes/javascript/authoring/authoringActivity.js (.../authoringActivity.js) (revision 365d015a0a78d8a4cceed841e5c5f660369887ad)
@@ -1166,9 +1166,23 @@
}
if (activity.authorURL) {
- window.open(activity.authorURL, 'activityAuthoring' + activity.id,
- "HEIGHT=800,WIDTH=1024,resizable=yes,scrollbars=yes,status=false," +
- "menubar=no,toolbar=no");
+ showDialog("dialogActivity" + activity.toolContentID, {
+ 'height' : 800,
+ 'width' : 1024,
+ 'resizable' : true,
+ 'title' : activity.title + LABELS.ACTIVITY_DIALOG_TITLE_SUFFIX,
+ 'open' : function() {
+ var dialog = $(this);
+ // load contents after opening the dialog
+ $('iframe', dialog).attr('src', activity.authorURL).load(function(){
+ // override the close function so it works with the dialog, not window
+ this.contentWindow.closeWindow = function(){
+ dialog.dialog('close');
+ }
+ });
+ }
+ }, true);
+
GeneralLib.setModified(true);
}
},
Index: lams_central/web/includes/javascript/authoring/authoringGeneral.js
===================================================================
diff -u -r0ee600fbfa1d4af67789805d03bc3d883413c27a -r365d015a0a78d8a4cceed841e5c5f660369887ad
--- lams_central/web/includes/javascript/authoring/authoringGeneral.js (.../authoringGeneral.js) (revision 0ee600fbfa1d4af67789805d03bc3d883413c27a)
+++ lams_central/web/includes/javascript/authoring/authoringGeneral.js (.../authoringGeneral.js) (revision 365d015a0a78d8a4cceed841e5c5f660369887ad)
@@ -1965,7 +1965,14 @@
if (!paper) {
return;
}
-
+
+ var windowHeight = $(window).height();
+ // height of window minus toolbar, padding...
+ $('.templateContainer').height(windowHeight - 81);
+ $('#canvas').height(windowHeight - 75)
+ // width of window minus templates on the left; minimum is toolbar width so it does not collapse
+ .width(Math.max($('#toolbar').width() - 160, $(window).width() - 170));
+
if (!width || !height) {
var width = 0,
height = 0;
@@ -1987,8 +1994,6 @@
height = Math.max(height + (isReadOnlyMode ? 20 : 50), canvas.height()) - 20;
paper.setSize(width, height);
- $('#templateContainer').height($('#ldDescriptionDiv').height()
- + $('#canvas').height() - 10);
if (!isReadOnlyMode){
if (layout.bin) {
Index: lams_central/web/includes/javascript/authoring/authoringMenu.js
===================================================================
diff -u -re15d2e51298e68fff7ee35cd7d85e34faf1951a2 -r365d015a0a78d8a4cceed841e5c5f660369887ad
--- lams_central/web/includes/javascript/authoring/authoringMenu.js (.../authoringMenu.js) (revision e15d2e51298e68fff7ee35cd7d85e34faf1951a2)
+++ lams_central/web/includes/javascript/authoring/authoringMenu.js (.../authoringMenu.js) (revision 365d015a0a78d8a4cceed841e5c5f660369887ad)
@@ -585,19 +585,33 @@
* Opens a pop up for importing LD. Loads the imported LD to canvas.
*/
importLearningDesign : function(){
- var importWindow = window.open(LAMS_URL + 'authoring/importToolContent.do?method=import','Import',
- 'width=800,height=298,resize=yes,status=yes,scrollbar=no,menubar=no,toolbar=no'),
+ var dialog = showDialog("dialogImportLearningDesign", {
+ 'height' : 315,
+ 'width' : 850,
+ 'title' : LABELS.IMPORT_DIALOG_TITLE,
+ 'open' : function() {
+ var dialog = $(this);
+ // load contents after opening the dialog
+ $('iframe', dialog).attr('src', LAMS_URL + 'authoring/importToolContent.do?method=import').load(function(){
+ // override the close function so it works with the dialog, not window
+ this.contentWindow.closeWin = function(){
+ dialog.dialog('close');
+ }
+ });
+ },
+ 'close' : function(){
+ // stop checking in LD was imported
+ clearInterval(loadCheckInterval);
+ // completely delete the dialog
+ $(this).remove();
+ }
+ }),
currentLearningDesignID = null,
regEx = /learningDesignID=(\d+)/g,
// since window.onload does not really work after submitting a form inside the window,
// this trick checks periodically for changes
loadCheckInterval = setInterval(function(){
- if (!importWindow){
- // window was closed
- clearInterval(loadCheckInterval);
- return;
- }
- var body = $('body', importWindow.document).html(),
+ var body = $('body', $('iframe', dialog).contents()).html(),
match = regEx.exec(body);
// check if ID was found and it's not the same as previously set
if (match && match[1] != currentLearningDesignID) {
@@ -816,7 +830,7 @@
toggleDescriptionDiv: function() {
$('#ldDescriptionDetails').slideToggle(function(){
$('#ldDescriptionHideTip').text($(this).is(':visible') ? '▲' : '▼');
- $('#templateContainer').height($('#ldDescriptionDiv').height() + $('#canvas').height() - 10);
+ $('.templateContainer').height($('#ldDescriptionDiv').height() + $('#canvas').height() - 10);
});
}
Index: lams_central/web/includes/javascript/dialog.js
===================================================================
diff -u
--- lams_central/web/includes/javascript/dialog.js (revision 0)
+++ lams_central/web/includes/javascript/dialog.js (revision 365d015a0a78d8a4cceed841e5c5f660369887ad)
@@ -0,0 +1,62 @@
+var dialogTemplate = $('
').append('');
+
+/**
+ * Checks if the dialog is already opened.
+ * If not, creates a new dialog with the given ID and init parameters.
+ */
+function showDialog(id, initParams, extraButtons) {
+ var dialog = $('#' + id);
+ if (dialog.length > 0) {
+ // is it open already?
+ dialog.dialog('moveToTop');
+ return;
+ }
+
+ // create a new dialog by cloning a template
+ dialog = dialogTemplate.clone();
+ dialog.attr('id', id);
+
+ // use initParams to overwrite default behaviour of the newly created dialog
+ dialog.dialog($.extend({
+ 'autoOpen' : true,
+ 'modal' : false,
+ 'draggable' : true,
+ 'resizable' : false,
+ 'hide' : 'fold',
+ 'beforeClose' : function(){
+ $('iframe', this).attr('src', null);
+ },
+ 'close' : function() {
+ // completely delete the dialog
+ $(this).remove();
+ }
+ }, initParams));
+
+ if (extraButtons) {
+ dialog.dialogExtend({
+ "closable" : true,
+ "maximizable" : true,
+ "minimizable" : true,
+ "collapsable" : true,
+ "dblclick" : "collapse",
+ "minimizeLocation" : "right",
+ "icons" : {
+ "close" : "ui-icon-close",
+ "maximize" : "ui-icon-arrow-4-diag",
+ "minimize" : "ui-icon-minus",
+ "collapse" : "ui-icon-triangle-1-s",
+ "restore" : "ui-icon-newwin"
+ }
+ });
+ }
+
+ return dialog;
+}
+
+
+/**
+ * Focuses on the dialog. Called from within the contained iframe.
+ */
+function moveDialogToTop(id) {
+ $('#' + id).dialog('moveToTop');
+}
\ No newline at end of file
Index: lams_central/web/includes/javascript/groupDisplay.js
===================================================================
diff -u -rce0e0a90db83dcadc1bf4eaa837ec94dc8cb93c0 -r365d015a0a78d8a4cceed841e5c5f660369887ad
--- lams_central/web/includes/javascript/groupDisplay.js (.../groupDisplay.js) (revision ce0e0a90db83dcadc1bf4eaa837ec94dc8cb93c0)
+++ lams_central/web/includes/javascript/groupDisplay.js (.../groupDisplay.js) (revision 365d015a0a78d8a4cceed841e5c5f660369887ad)
@@ -149,68 +149,7 @@
}
-/**
- * Checks if the dialog is already opened.
- * If not, creates a new dialog with the given ID and init parameters.
- */
-function showDialog(id, initParams, extraButtons) {
- var dialog = $('#' + id);
- if (dialog.length > 0) {
- // is it open already?
- dialog.dialog('moveToTop');
- return;
- }
-
- // create a new dialog by cloning a template
- dialog = $('#dialogContainer').clone();
- dialog.attr('id', id);
-
- // use initParams to overwrite default behaviour of the newly created dialog
- dialog.dialog($.extend({
- 'autoOpen' : true,
- 'modal' : false,
- 'draggable' : true,
- 'resizable' : false,
- 'hide' : 'fold',
- 'beforeClose' : function(){
- $('iframe', this).attr('src', null);
- },
- 'close' : function() {
- // completely delete the dialog
- $(this).remove();
- }
- }, initParams));
-
- if (extraButtons) {
- dialog.dialogExtend({
- "closable" : true,
- "maximizable" : true,
- "minimizable" : true,
- "collapsable" : true,
- "dblclick" : "collapse",
- "minimizeLocation" : "right",
- "icons" : {
- "close" : "ui-icon-close",
- "maximize" : "ui-icon-arrow-4-diag",
- "minimize" : "ui-icon-minus",
- "collapse" : "ui-icon-triangle-1-s",
- "restore" : "ui-icon-newwin"
- }
- });
- }
-
- return dialog;
-}
-
-/**
- * Focuses on the dialog. Called from within the contained iframe.
- */
-function moveDialogToTop(id) {
- $('#' + id).dialog('moveToTop');
-}
-
-
function showMonitorLessonDialog(lessonID) {
var id = "dialogMonitorLesson" + lessonID,
dialog = showDialog(id, {
@@ -441,6 +380,7 @@
showDialog('dialogFlashlessAuthoring', {
'height' : 865,
'width' : 1280,
+ 'resizable' : true,
'title' : 'Authoring',
'open' : function() {
var orgID = $(this).dialog('option', 'orgID');
Index: lams_central/web/main.jsp
===================================================================
diff -u -rce0e0a90db83dcadc1bf4eaa837ec94dc8cb93c0 -r365d015a0a78d8a4cceed841e5c5f660369887ad
--- lams_central/web/main.jsp (.../main.jsp) (revision ce0e0a90db83dcadc1bf4eaa837ec94dc8cb93c0)
+++ lams_central/web/main.jsp (.../main.jsp) (revision 365d015a0a78d8a4cceed841e5c5f660369887ad)
@@ -37,8 +37,9 @@
-
+
+