Skip to content

Commit

Permalink
MDL-47915 theme: use id='page-content' rather than 'content'.
Browse files Browse the repository at this point in the history
Also added JS fallback for themes using copied layouts in scorm
  • Loading branch information
Mary Evans authored and danpoltawski committed Nov 18, 2014
1 parent af14ef6 commit a263396
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
3 changes: 3 additions & 0 deletions mod/scorm/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,9 @@ M.mod_scorm.connectPrereqCallback = {
}
var el_new_tree = document.createElement('div');
var pagecontent = document.getElementById("page-content");
if (!pagecontent) {
pagecontent = document.getElementById("content");
}
el_new_tree.setAttribute('id','scormtree123');
el_new_tree.innerHTML = o.responseText;
// Make sure it does not show.
Expand Down
2 changes: 1 addition & 1 deletion theme/base/layout/embedded.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

<!-- END OF HEADER -->

<div id="content" class="clearfix">
<div id="page-content" class="clearfix">
<?php echo $OUTPUT->main_content() ?>
</div>

Expand Down
2 changes: 1 addition & 1 deletion theme/base/style/core.css
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,7 @@ x#fitem_id_availabilityconditionsjson input[type=text] {
audio.mediaplugin_html5audio {width: 300px}

/* TinyMCE moodle media preview frame should not have padding */
.core_media_preview.pagelayout-embedded #content {padding:0;}
.core_media_preview.pagelayout-embedded #page-content {padding:0;}
.core_media_preview.pagelayout-embedded #maincontent {height:0;}
.core_media_preview.pagelayout-embedded .mediaplugin {margin:0;}

Expand Down
2 changes: 1 addition & 1 deletion theme/canvas/layout/embedded.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

<!-- END OF HEADER -->

<div id="content" class="clearfix">
<div id="page-content" class="clearfix">
<?php echo $OUTPUT->main_content() ?>
</div>

Expand Down
2 changes: 1 addition & 1 deletion theme/canvas/style/core.css
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ body {
background-image: none;
}

.pagelayout-embedded #content {
.pagelayout-embedded #page-content {
padding-top: 30px;
}

Expand Down
3 changes: 2 additions & 1 deletion theme/upgrade.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ This files describes API changes in /theme/* themes,
information provided here is intended especially for theme designer.

=== 2.8 ===

* Themes Base and Canvas layout/embedded.php has changed.
The div id="content" has been changed to id="page-content" - see MDL-47915.
* All mod_assign CSS selectors have been qualified with ".path-mod-assign". This means any custom CSS
rules for mod_assign in a theme may need to be updated.
* The following render methods were renamed, if you have overridden any of these you will need to update your renderer:
Expand Down

0 comments on commit a263396

Please sign in to comment.