Skip to content

Commit

Permalink
LSNBLDR-775: announcements item in listing is all squashed up (sakaip…
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaswilson100 authored and ottenhoff committed Feb 8, 2017
1 parent 8bd25d5 commit fec7d2e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lessonbuilder/tool/src/webapp/css/Simplepagetool.css
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,7 @@ img {
color:#000;
font-weight: normal;
}
.forumSummaryList{
.forumSummaryList, .announcementSummaryList{
list-style: none;
padding: 0 15px;
font-family: 'Segoe UI', Segoe, Tahoma, Helvetica, Arial, sans-serif;
Expand Down Expand Up @@ -1641,7 +1641,7 @@ font-size: 12px;
margin-bottom:0px;
}

.forumSummaryItem{
.forumSummaryItem, .announcementSummaryItem{
margin-bottom: 10px;
}

Expand Down
10 changes: 5 additions & 5 deletions lessonbuilder/tool/src/webapp/js/announcements.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function showAnnouncements(url, tool_href, number, announcementsDiv){
//get the announcement tool url
var link_to_tool = tool_href.split("?", 1);
var title = msg("simplepage.announcements-header-title");
var text_for_announcements = '<div class="announcementsHeaderDiv"><h3 class="announcementSummaryHeader"><span aria-hidden="true" class="fa-item-text icon-sakai--sakai-announcements"></span><a href="'+link_to_tool+'" target="_top" class="announcementLink" title ="'+title+'">'+title+'</a></h3></div><div class="announcementList">';
var text_for_announcements = '<div class="announcementsHeaderDiv"><h3 class="announcementSummaryHeader"><span aria-hidden="true" class="fa-item-text icon-sakai--sakai-announcements"></span><a href="'+link_to_tool+'" target="_top" class="announcementLink" title ="'+title+'">'+title+'</a></h3></div><ul class="announcementSummaryList">';
//Get announcements
$.ajax({
url: announcementsUrl,
Expand All @@ -36,16 +36,16 @@ function showAnnouncements(url, tool_href, number, announcementsDiv){
var min = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes();
//using javascript's toLocaleDateString() to include user's locale and local time zone
date_time = hour +":"+min+ " " + date.toLocaleDateString();
text_for_announcements += '<div class="itemDiv">';
text_for_announcements += '<li class="itemDiv announcementSummaryItem">';
var href = tool_href + this["announcementId"]+"&sakai_action=doShowmetadata";
var entityTitle = this["entityTitle"].replace(/&/g, '&amp;').replace(/>/g, '&gt;').replace(/</g, '&lt;').replace(/"/g, '&quot;');
var createdByDisplayName = this["createdByDisplayName"].replace(/&/g, '&amp;').replace(/>/g, '&gt;').replace(/</g, '&lt;').replace(/"/g, '&quot;');
text_for_announcements += '<div class="itemTitle"><a href="'+href+'" target="_top">'+ entityTitle +'</a> by '+ createdByDisplayName +'</div>';
text_for_announcements += '<div><a href="'+href+'" target="_top">'+ entityTitle +'</a> by '+ createdByDisplayName +'</div>';
text_for_announcements += '<div class="itemDate">'+date_time+'</div>';
text_for_announcements += '</div>';
text_for_announcements += '</li>';
});
}
text_for_announcements += '</div>';
text_for_announcements += '</ul>';
announcementsDiv.html(text_for_announcements);
},
error: function(xhr, textStatus, errorThrown){
Expand Down

0 comments on commit fec7d2e

Please sign in to comment.