Skip to content

Commit

Permalink
Merge pull request sakaiproject#1864 from clhedrick/LSNBLDR-566a
Browse files Browse the repository at this point in the history
LSNBLDR-566; move genertion of title and breadcrums to avoid page cha…
  • Loading branch information
clhedrick committed Mar 4, 2016
2 parents b9eac64 + 2e714db commit f5cdc06
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
11 changes: 0 additions & 11 deletions lessonbuilder/tool/src/webapp/js/show-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,7 @@ var blankRubricTemplate, blankRubricRow;
// Note from Chuck S. - Is there a strong reason to do this before ready()?
// $(function() {
$(document).ready(function() {
var breadcrumbs = $(".breadcrumbs span");
// if we're in morpheus, move breadcrums into top bar, and generate an H2 with the title
if ($(".oldPortal").size() === 0) {
var title = $(".title span:last").text();
if (breadcrumbs.size() > 0) {
$(".Mrphs-siteHierarchy").append($(".breadcrumbs span").slice(1));
}
$(".Mrphs-siteHierarchy").append($(".action"));
$(".Mrphs-siteHierarchy").append("<br style='clear:both'/>");
$(".neoPortletTitleWrap").before('<h2 class="genTitle"></h2>');
$(".genTitle").text(title);
}

// This is called in comments.js as well, however this may be faster.
//if(sakai.editor.editors.ckeditor==undefined) {
Expand Down
14 changes: 14 additions & 0 deletions lessonbuilder/tool/src/webapp/templates/ShowPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,20 @@ <h2>
</div>
</div>

<script type="text/javascript">
var breadcrumbs = jQuery(".breadcrumbs span");
// if we're in morpheus, move breadcrums into top bar, and generate an H2 with the title
if (jQuery(".oldPortal").size() === 0) {
var title = jQuery(".title span:last").text();
if (breadcrumbs.size() > 0) {
jQuery(".Mrphs-siteHierarchy").append(jQuery(".breadcrumbs span").slice(1));
}
jQuery(".Mrphs-siteHierarchy").append(jQuery(".action"));
// jQuery(".Mrphs-siteHierarchy").append("<br style='clear:both'/>");
jQuery(".neoPortletTitleWrap").before('<h2 class="genTitle"></h2>');
jQuery(".genTitle").text(title);
}
</script>

<div rsf:id="tool-bar:" class="navIntraTool" role="application" style="z-index:100000" aria-labelledby="tool-bar::toolbar-label">
<h3 id="toolbar-label" rsf:id="msg=simplepage.toolbar" class="offscreen"></h3>
Expand Down

0 comments on commit f5cdc06

Please sign in to comment.