Skip to content

Commit

Permalink
LSNBLDR-751; UI fixes for forums conversation widget (sakaiproject#3645)
Browse files Browse the repository at this point in the history
  • Loading branch information
clhedrick authored Nov 30, 2016
1 parent 0c7d8b4 commit 55844ed
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2840,14 +2840,10 @@ public int compare(SimpleStudentPage o1, SimpleStudentPage o2) {
UIOutput.make(tableRow, "forum-summary-groups-titles", itemGroupTitles);
}
if(canSeeAll || simplePageBean.isItemAvailable(i)) {
//get widget height from the item attribute
String height = i.getAttribute("height") != null ? i.getAttribute("height") : "" ;
String divHeight = "height:" + height +"px;";
//create html for forum-summary widget
String html = "<div align=\"left\" class=\"forum-summary-div\"></div>";
UIVerbatim.make(tableRow, "content", html);
UIOutput.make(tableRow, "forum-summary-id", String.valueOf(i.getId()));
UIOutput.make(tableRow, "forum-summary-widget-height", height);
//setting forums-messages url to get all recent messages for the site
UIOutput.make(tableRow, "forum-summary-site-url", myUrl() + "/direct/forums/messages/" + simplePageBean.getCurrentSiteId());
//setting the url such that request goes to ShowItemProducer to display forum conversations inside Lessons tool
Expand Down Expand Up @@ -3676,13 +3672,12 @@ private void createForumSummaryDialog(UIContainer tofill, SimplePage currentPage
return;
}
UIInput.make(form, "forumSummaryEditId", "#{simplePageBean.itemId}");
UIInput.make(form, "forum-summary-height", "#{simplePageBean.forumSummaryHeight}");
UIOutput.make(form, "forum-summary-height-label", messageLocator.getMessage("simplepage.forum-summary.height_label"));
String[] options = {"5", "10", "15", "20", "30", "50"};
String[] labels = {"5", "10", "15", "20", "30", "50"};
UIOutput.make(form, "forumNumberDropdownLabel", messageLocator.getMessage("simplepage.forum-number-dropdown-label"));
UISelect.make(form, "forumNumberDropdown", options, labels, "#{simplePageBean.forumSummaryDropDown}", "5");
UICommand.make(form, "forum-summary-add-item", messageLocator.getMessage("simplepage.save_message"), "#{simplePageBean.addForumSummary}");
UIInput.make(form, "forum-summary-add-before", "#{simplePageBean.addBefore}");
UICommand.make(form, "forum-summary-cancel", messageLocator.getMessage("simplepage.cancel"), null);
UICommand.make(form, "delete-forum-summary-item", messageLocator.getMessage("simplepage.delete"), "#{simplePageBean.deleteItem}");
}
Expand Down
1 change: 1 addition & 0 deletions lessonbuilder/tool/src/webapp/js/show-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -1279,6 +1279,7 @@ $(document).ready(function() {
$("#forumSummaryEditId").val("-1");
$("#forum-summary-height").val("");
$("#forumNumberDropdown-selection").val("5");
$("#forum-summary-add-before").val(addAboveItem);
$("#add-forum-summary-dialog").dialog("open");
setupdialog($("#add-forum-summary-dialog"));
return false;
Expand Down
11 changes: 4 additions & 7 deletions lessonbuilder/tool/src/webapp/templates/ShowPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,6 @@ <h3 id="toolbar-label" rsf:id="msg=simplepage.toolbar" class="offscreen"></h3>
<li>
<a role="menuitem button" href="#" rsf:id="add-text" class="add-text-link add-before-param" ><span rsf:id="msg.simplepage.text"></span></a>
</li>
<li rsf:id="forum-summary-li">
<a role="menuitem" href="#" rsf:id="forum-summary-link" class="forum-summary-link"><span rsf:id="msg=simplepage.forumSummaryLinkText"></span></a>
</li>
<li>
<a role="menuitem button" aria-haspopup="dialog" aria-controls="add-multimedia-dialog" href="#" rsf:id="add-multimedia" class="add-multimedia add-before-param"><span rsf:id="msg.simplepage.multimedia"></span></a>
</li>
Expand Down Expand Up @@ -294,6 +291,9 @@ <h3 id="toolbar-label" rsf:id="msg=simplepage.toolbar" class="offscreen"></h3>
<li rsf:id="announcements-li">
<a role="menuitem" href="#" rsf:id="announcements-link" class="announcements-link"><span rsf:id="msg=simplepage.announcementsLinkText"></span></a>
</li>
<li rsf:id="forum-summary-li">
<a role="menuitem" href="#" rsf:id="forum-summary-link" class="forum-summary-link"><span rsf:id="msg=simplepage.forumSummaryLinkText"></span></a>
</li>
<hr style="border:none"/>
<li rsf:id="checklist-li">
<a role="menuitem button" class="add-checklist-link add-before-param" href="#" rsf:id="add-checklist"><span rsf:id="msg.simplepage.checklist"></span></a>
Expand Down Expand Up @@ -1917,16 +1917,13 @@ <h3 class="questionText" rsf:id="questionText"></h3>
</div>
</div>
<div class="forum-summary-content">
<p class="required">
<label rsf:id="forum-summary-height-label" class="pageTitle" for="forum-summary-height"></label>
<input style="margin-left: 104px;" type="text" name="forum-summary-height" rsf:id="forum-summary-height" id="forum-summary-height" maxlength="99" size="20"/>&nbsp;<span id="forumSummaryHeightErrmsg"></span>
</p>
<label for="forumNumberDropdown" rsf:id="forumNumberDropdownLabel"></label>
<select style="margin-left: 93px;" rsf:id="forumNumberDropdown" id="forumNumberDropdown" name="forumNumberDropdown">
<option rsf:id="forumOption:"><span rsf:id="forumOptionText"></span></option>
</select><br/>
<p class="act">
<input class="bold" type="submit" id="forum-summary-add-item" rsf:id="forum-summary-add-item" />
<input type="hidden" rsf:id="forum-summary-add-before" id="forum-summary-add-before"/>
<input type="submit" rsf:id="forum-summary-cancel" onclick="closeForumSummaryDialog(); return false" />
<span id="forum-summary-delete-span" style="display:none"><input type="submit" class="deleteButton" rsf:id="delete-forum-summary-item" id="delete-forum-summary-item" /></span><br/>
</p>
Expand Down

0 comments on commit 55844ed

Please sign in to comment.