Skip to content

Commit

Permalink
Merge pull request sakaiproject#451 from clhedrick/LSNBLDR-491
Browse files Browse the repository at this point in the history
LSNBLDR-491; fix print view for inline tool
  • Loading branch information
clhedrick committed Apr 24, 2015
2 parents 4b16383 + 65d1812 commit 2631952
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions lessonbuilder/tool/src/webapp/js/show-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -2763,3 +2763,12 @@ function toggleShortUrlOutput(defaultUrl, checkbox, textbox) {
}
}

function printView(url) {
var i = url.indexOf("/site/");
if (i < 0)
return url;
var j = url.indexOf("/tool/");
if (j < 0)
return url;
return url.substring(0, i) + url.substring(j);
}
2 changes: 1 addition & 1 deletion lessonbuilder/tool/src/webapp/templates/ShowPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ <h2>
</h2>
</div>
<div class="action">
<a style="background:none" href="#" rsf:id="print-view" id="print-view" onclick="window.open(window.location.href);return false" role="note"></a> |
<a style="background:none" href="#" rsf:id="print-view" id="print-view" onclick="window.open(printView(window.location.href));return false" role="note"></a> |
<a style="background:none" href="#" rsf:id="show-pages" id="show-pages" role="note"></a>

<span rsf:id="gradingSpan" class="gradingarea">
Expand Down

0 comments on commit 2631952

Please sign in to comment.