Index: lams_central/web/authoring/authoring.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/authoring/authoring.jsp,v diff -u -r1.6.2.38 -r1.6.2.39 --- lams_central/web/authoring/authoring.jsp 17 Nov 2016 04:15:37 -0000 1.6.2.38 +++ lams_central/web/authoring/authoring.jsp 28 Nov 2016 16:28:16 -0000 1.6.2.39 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/css/authoring.css,v diff -u -r1.30.2.22 -r1.30.2.23 --- lams_central/web/css/authoring.css 23 Nov 2016 09:27:05 -0000 1.30.2.22 +++ lams_central/web/css/authoring.css 28 Nov 2016 16:28:16 -0000 1.30.2.23 @@ -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/dialog.js =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/dialog.js,v diff -u -r1.1.2.18 -r1.1.2.19 --- lams_central/web/includes/javascript/dialog.js 10 Nov 2016 11:26:29 -0000 1.1.2.18 +++ lams_central/web/includes/javascript/dialog.js 28 Nov 2016 16:28:16 -0000 1.1.2.19 @@ -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 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.51.2.51 -r1.51.2.52 --- lams_central/web/includes/javascript/authoring/authoringGeneral.js 17 Nov 2016 03:05:51 -0000 1.51.2.51 +++ lams_central/web/includes/javascript/authoring/authoringGeneral.js 28 Nov 2016 16:28:16 -0000 1.51.2.52 @@ -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,