CC-3505 : Timeline: Remove repeating date if "end date" is the same as the "Start date"
This commit is contained in:
parent
db1287d6ec
commit
079862d2f2
|
@ -169,8 +169,12 @@ class Application_Model_ShowBuilder {
|
||||||
|
|
||||||
$row["header"] = true;
|
$row["header"] = true;
|
||||||
$row["starts"] = $showStartDT->format("Y-m-d H:i");
|
$row["starts"] = $showStartDT->format("Y-m-d H:i");
|
||||||
|
$row["startDate"] = $showStartDT->format("Y-m-d");
|
||||||
|
$row["startTime"] = $showStartDT->format("H:i");
|
||||||
$row["refresh"] = floatval($showStartDT->format("U.u")) - $this->epoch_now;
|
$row["refresh"] = floatval($showStartDT->format("U.u")) - $this->epoch_now;
|
||||||
$row["ends"] = $showEndDT->format("Y-m-d H:i");
|
$row["ends"] = $showEndDT->format("Y-m-d H:i");
|
||||||
|
$row["endDate"] = $showEndDT->format("Y-m-d");
|
||||||
|
$row["endTime"] = $showEndDT->format("H:i");
|
||||||
$row["duration"] = floatval($showEndDT->format("U.u")) - floatval($showStartDT->format("U.u"));
|
$row["duration"] = floatval($showEndDT->format("U.u")) - floatval($showStartDT->format("U.u"));
|
||||||
$row["title"] = $p_item["show_name"];
|
$row["title"] = $p_item["show_name"];
|
||||||
$row["instance"] = intval($p_item["si_id"]);
|
$row["instance"] = intval($p_item["si_id"]);
|
||||||
|
|
|
@ -219,6 +219,13 @@ table.datatable tr.sb-header.odd:hover td, table.datatable tr.sb-header.even:hov
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin: 0 8px;
|
margin: 0 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.show-date {
|
||||||
|
font-size:12px;
|
||||||
|
color: #363636;
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.show-time {
|
.show-time {
|
||||||
font-size:12px;
|
font-size:12px;
|
||||||
color: #363636;
|
color: #363636;
|
||||||
|
|
|
@ -261,7 +261,9 @@ $(document).ready(function() {
|
||||||
ignoreRightClick: true,
|
ignoreRightClick: true,
|
||||||
|
|
||||||
build: function($el, e) {
|
build: function($el, e) {
|
||||||
var request, data, items, callback;
|
var data,
|
||||||
|
items,
|
||||||
|
callback;
|
||||||
|
|
||||||
data = $el.data("event");
|
data = $el.data("event");
|
||||||
|
|
||||||
|
@ -284,9 +286,11 @@ $(document).ready(function() {
|
||||||
if (oItems.clear !== undefined) {
|
if (oItems.clear !== undefined) {
|
||||||
|
|
||||||
callback = function() {
|
callback = function() {
|
||||||
$.post(oItems.clear.url, {format: "json", id: data.id}, function(json){
|
if (confirm("Remove all content?")) {
|
||||||
scheduleRefetchEvents(json);
|
$.post(oItems.clear.url, {format: "json", id: data.id}, function(json){
|
||||||
});
|
scheduleRefetchEvents(json);
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
oItems.clear.callback = callback;
|
oItems.clear.callback = callback;
|
||||||
}
|
}
|
||||||
|
@ -378,7 +382,7 @@ $(document).ready(function() {
|
||||||
items = oItems;
|
items = oItems;
|
||||||
}
|
}
|
||||||
|
|
||||||
request = $.ajax({
|
$.ajax({
|
||||||
url: "/schedule/make-context-menu",
|
url: "/schedule/make-context-menu",
|
||||||
type: "GET",
|
type: "GET",
|
||||||
data: {id : data.id, format: "json"},
|
data: {id : data.id, format: "json"},
|
||||||
|
|
|
@ -256,7 +256,19 @@ var AIRTIME = (function(AIRTIME){
|
||||||
cl = 'sb-header';
|
cl = 'sb-header';
|
||||||
|
|
||||||
sSeparatorHTML = '<span class="show-title">'+aData.title+'</span>';
|
sSeparatorHTML = '<span class="show-title">'+aData.title+'</span>';
|
||||||
sSeparatorHTML += '<span class="push-right"><span class="show-time">'+aData.starts+'</span>-<span class="show-time">'+aData.ends+'</span></span>';
|
sSeparatorHTML += '<span class="push-right">';
|
||||||
|
|
||||||
|
if (aData.startDate === aData.endDate) {
|
||||||
|
sSeparatorHTML += '<span class="show-date">'+aData.startDate+'</span><span class="show-time">'+aData.startTime+'</span>';
|
||||||
|
sSeparatorHTML +='-<span class="show-time">'+aData.endTime+'</span>';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
sSeparatorHTML += '<span class="show-date">'+aData.startDate+'</span><span class="show-time">'+aData.startTime+'</span>';
|
||||||
|
sSeparatorHTML +='-<span class="show-date">'+aData.endDate+'</span><span class="show-time">'+aData.endTime+'</span>';
|
||||||
|
}
|
||||||
|
|
||||||
|
sSeparatorHTML += '</span>';
|
||||||
|
|
||||||
fnPrepareSeparatorRow(sSeparatorHTML, cl, 1);
|
fnPrepareSeparatorRow(sSeparatorHTML, cl, 1);
|
||||||
}
|
}
|
||||||
else if (aData.footer === true) {
|
else if (aData.footer === true) {
|
||||||
|
|
Loading…
Reference in New Issue