Index: lams_central/web/authoring/authoring.jsp =================================================================== diff -u -r630da8c73ca578964a31b9966307a522a0564be7 -r2d93f89a71df0d0d377702f08e33faac1753515d --- lams_central/web/authoring/authoring.jsp (.../authoring.jsp) (revision 630da8c73ca578964a31b9966307a522a0564be7) +++ lams_central/web/authoring/authoring.jsp (.../authoring.jsp) (revision 2d93f89a71df0d0d377702f08e33faac1753515d) @@ -266,15 +266,15 @@ initAccess = ${access}; - + <%-- "loading..." screen, gets removed on page full load --%>
- @@ -284,11 +284,11 @@ - -
-
+
-
+
- Index: lams_central/web/css/authoring.css =================================================================== diff -u -rcb8e277e18279b2a13363288ad8748fb5570ff94 -r2d93f89a71df0d0d377702f08e33faac1753515d --- lams_central/web/css/authoring.css (.../authoring.css) (revision cb8e277e18279b2a13363288ad8748fb5570ff94) +++ lams_central/web/css/authoring.css (.../authoring.css) (revision 2d93f89a71df0d0d377702f08e33faac1753515d) @@ -387,7 +387,6 @@ overflow: auto; border: 0.5px solid #a9a9a9; border-radius: 3px; - // background-color: rgb(219, 230, 252); } div.template { Index: lams_central/web/includes/javascript/authoring/authoringGeneral.js =================================================================== diff -u -rc976bb102230ab07da3f2fdb28405ea05291ba9c -r2d93f89a71df0d0d377702f08e33faac1753515d --- lams_central/web/includes/javascript/authoring/authoringGeneral.js (.../authoringGeneral.js) (revision c976bb102230ab07da3f2fdb28405ea05291ba9c) +++ lams_central/web/includes/javascript/authoring/authoringGeneral.js (.../authoringGeneral.js) (revision 2d93f89a71df0d0d377702f08e33faac1753515d) @@ -8,13 +8,16 @@ */ $(document).ready(function() { canvas = $('#canvas'); - GeneralInitLib.initTemplates(); if (!isReadOnlyMode) { // 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(); + } } GeneralLib.newLearningDesign(true); @@ -179,6 +182,9 @@ }); if (!isReadOnlyMode){ + // store the initial window height now as on iPad the iframe grows when templates are show, + // reporting incorrect window height to the first resizePaper() run + layout.initWindowHeight = $(window).height(); // create list of learning libraries for each group var templateContainerCell = $('#templateContainerCell'), learningLibraryGroupSelect = $('select', templateContainerCell), @@ -1935,9 +1941,12 @@ return; } - var windowHeight = $(window).height(); + // the inital window height was saved just before templates were displayed + var windowHeight = layout.initWindowHeight ? layout.initWindowHeight : $(window).height(); + // next runs use the regular window height + layout.initWindowHeight = null; // height of window minus toolbar, padding... - $('.templateContainer').height(windowHeight - 81); + $('.templateContainer').height(windowHeight - 80); $('#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() - 180, $(window).width() - 190)); @@ -1960,7 +1969,7 @@ // -20 so Chrome does not create unnecessary scrollbars when dropping a tool template to canvas // +50 so there is space for rubbish bin width = Math.max(0, width, canvas.width() - 20); - height = Math.max(0, height + (isReadOnlyMode ? 20 : 50), canvas.height() - 20); + height = Math.max(0, height + (isReadOnlyMode ? 20 : 48), canvas.height() - 22); paper.attr({ 'width' : width, Index: lams_central/web/includes/javascript/dialog.js =================================================================== diff -u -rcb4d21bab9428253cb4b4fe98ddfb092676aeb40 -r2d93f89a71df0d0d377702f08e33faac1753515d --- lams_central/web/includes/javascript/dialog.js (.../dialog.js) (revision cb4d21bab9428253cb4b4fe98ddfb092676aeb40) +++ lams_central/web/includes/javascript/dialog.js (.../dialog.js) (revision 2d93f89a71df0d0d377702f08e33faac1753515d) @@ -274,7 +274,7 @@ //used by both main.jsp and /lti/addlesson.jsp pages function showAuthoringDialog(learningDesignID){ - showDialog('dialogAuthoring', { + var dialog = showDialog('dialogAuthoring', { 'height' : Math.max(300, $(window).height() - 30), 'width' : Math.max(600, Math.min(1280, $(window).width() - 60)), 'title' : LABELS.AUTHORING_TITLE, @@ -301,4 +301,9 @@ $('iframe', this).attr('src', url); } }, true); + + // resize the paper when dialog is resized + $('.modal-content', dialog).on('resizestop', function() { + $('iframe', this)[0].contentWindow.GeneralLib.resizePaper(); + }); } \ No newline at end of file