formating the date start/end of each show in the accordian.

This commit is contained in:
Naomi Aro 2013-08-30 01:06:59 -04:00
parent 15e27f8166
commit 2c88d1e0a0
2 changed files with 39 additions and 8 deletions

View File

@ -41,3 +41,29 @@ table.dataTable tbody tr {
.his-selected.odd {
background-color: rgba(255, 136, 56, 1);
}
.show-title, .show-time {
display:inline-block;
font-size:13px;
}
.show-title {
font-weight: bold;
margin: 0 8px;
}
.show-date {
font-size:12px;
color: #363636;
margin: 0 5px;
}
.show-time {
font-size:12px;
color: #363636;
margin: 0 5px;
}
.push-right {
float:right;
margin-right:5px;
}

View File

@ -180,15 +180,17 @@ var AIRTIME = (function(AIRTIME) {
template =
"<h3>" +
"<a href='#'>" +
"<span><%= name %></span>" +
"<span><%= starts %></span>" +
"<span><%= ends %></span>" +
"<span class='show-title'><%= name %></span>" +
"<span class='push-right'>" +
"<span class='show-date'><%= date %></span>" +
"<span class='show-time'><%= startTime %></span>" +
"-" +
"<span class='show-time'><%= endTime %></span>" +
"</span>" +
"</a>" +
"</h3>" +
"<div " +
"data-instance='<%= instance %>' " +
"data-starts='<%= starts %>' " +
"data-ends='<%= ends %>'" +
"></div>";
template = _.template(template);
@ -220,7 +222,8 @@ var AIRTIME = (function(AIRTIME) {
i,
len,
$accordSection,
show;
show,
tmp;
$showList
.accordion( "destroy" )
@ -228,12 +231,14 @@ var AIRTIME = (function(AIRTIME) {
for (i = 0, len = oShows.length; i < len; i++) {
show = oShows[i];
tmp = show.starts.split(" ");
$accordSection = createShowAccordSection({
instance: show.instance_id,
name: show.name,
starts: show.starts,
ends: show.ends
date: tmp[0],
startTime: tmp[1],
endTime: show.ends.split(" ").pop()
});
$showList.append($accordSection);