Skip to content

Commit

Permalink
SAK-50493 Lessons remove Print All and further refine Lessons printing (
Browse files Browse the repository at this point in the history
  • Loading branch information
ottenhoff authored Oct 13, 2024
1 parent d12a8e7 commit 9212ee0
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 25 deletions.
3 changes: 1 addition & 2 deletions lessonbuilder/api/src/resources/lessons.properties
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,7 @@ simplepage.edit_youtubelink=Edit YouTube Link
simplepage.edit_youtube=Edit YouTube Link Below
simplepage.edit_movie=Edit Item Below
simplepage.open_new_window=Open in new window
simplepage.print_view=Print view
simplepage.print_all=Print all
simplepage.print_view=Print
simplepage.edititems=Edit Items
simplepage.itemstatus=Item Status
simplepage.items=Items
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -688,8 +688,6 @@ public void fillComponents(UIContainer tofill, ViewParameters viewParams, Compon
showAll.setSource("summary");
UIInternalLink.make(tofill, "print-view", showAll)
.decorate(new UITooltipDecorator(messageLocator.getMessage("simplepage.print_view")));
UIInternalLink.make(tofill, "print-all", showAll)
.decorate(new UITooltipDecorator(messageLocator.getMessage("simplepage.print_all")));
UIInternalLink.make(tofill, "show-pages", showAll)
.decorate(new UITooltipDecorator(messageLocator.getMessage("simplepage.showallpages")));

Expand Down
18 changes: 3 additions & 15 deletions lessonbuilder/tool/src/webapp/js/show-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,9 @@ $(window).load(function () {
}

// Print the current page
document.getElementById('print-view').addEventListener('click', function() {
const url = printView(window.location.href);
const win = window.open(url, '_blank');
win.focus();
win.print();
return false;
});

// Print all pages
document.getElementById('print-all').addEventListener('click', function() {
const url = printViewWithParameter(window.location.href);
const win = window.open(url, '_blank');
win.focus();
win.print();
return false;
document.getElementById('print-view').addEventListener('click', function(event) {
event.preventDefault();
window.print();
});

});
Expand Down
6 changes: 0 additions & 6 deletions lessonbuilder/tool/src/webapp/templates/ShowPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,6 @@ <h2 id="toolbar-label" rsf:id="msg=simplepage.toolbar" class="lb-offscreen"></h2
<span class="bi-printer" aria-hidden="true"></span>
</a>
</span>
<span class="contentButton">
<a role="button" href="#" rsf:id="print-all" id="print-all" class="btn btn-link my-1 Mrphs-toolTitleNav__link top-icon">
<span rsf:id="msg=simplepage.print_all" class="Mrphs-itemTitle me-1 d-none d-xl-inline-block"></span>
<span class="bi-printer-fill" aria-hidden="true"></span>
</a>
</span>
<span class="contentButton">
<a role="button" href="#" rsf:id="show-pages" id="show-pages" class="btn btn-link my-1 Mrphs-toolTitleNav__link top-icon">
<span rsf:id="msg=simplepage.showallpages" class="Mrphs-itemTitle me-1 d-none d-lg-inline-block"></span>
Expand Down
2 changes: 2 additions & 0 deletions library/src/skins/default/src/sass/print.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ footer,
.jump-to-top,
nav.sakai-pageNav,
.actionToolBar,
.modal-dialog,
sakai-picture-changer,
#select-site-sidebar,
#portal-nav-sidebar,
Expand Down Expand Up @@ -70,6 +71,7 @@ div.portletBody {
.sectionedit,
img.question-image,
.editsection,

.showPollGraph {
display: none !important;
}
Expand Down

0 comments on commit 9212ee0

Please sign in to comment.