CC-4035: Timeline -> Filter by show: please let the setting automatically takes effect without clicking the button out of the 'box'
-done
This commit is contained in:
parent
082eafb13d
commit
61fc269b13
|
@ -83,6 +83,34 @@ AIRTIME = (function(AIRTIME) {
|
||||||
oTable.fnDraw();
|
oTable.fnDraw();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showSearchSubmit() {
|
||||||
|
var fn,
|
||||||
|
oRange,
|
||||||
|
op,
|
||||||
|
oTable = $('#show_builder_table').dataTable();
|
||||||
|
|
||||||
|
//reset timestamp value since input values could have changed.
|
||||||
|
AIRTIME.showbuilder.resetTimestamp();
|
||||||
|
|
||||||
|
oRange = AIRTIME.utilities.fnGetScheduleRange(dateStartId, timeStartId, dateEndId, timeEndId);
|
||||||
|
|
||||||
|
fn = oTable.fnSettings().fnServerData;
|
||||||
|
fn.start = oRange.start;
|
||||||
|
fn.end = oRange.end;
|
||||||
|
|
||||||
|
op = $("div.sb-advanced-options");
|
||||||
|
if (op.is(":visible")) {
|
||||||
|
|
||||||
|
if (fn.ops === undefined) {
|
||||||
|
fn.ops = {};
|
||||||
|
}
|
||||||
|
fn.ops.showFilter = op.find("#sb_show_filter").val();
|
||||||
|
fn.ops.myShows = op.find("#sb_my_shows").is(":checked") ? 1 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
oTable.fnDraw();
|
||||||
|
}
|
||||||
|
|
||||||
mod.onReady = function() {
|
mod.onReady = function() {
|
||||||
//define module vars.
|
//define module vars.
|
||||||
|
@ -118,33 +146,7 @@ AIRTIME = (function(AIRTIME) {
|
||||||
|
|
||||||
$builder.find('.dataTables_scrolling').css("max-height", widgetHeight - 95);
|
$builder.find('.dataTables_scrolling').css("max-height", widgetHeight - 95);
|
||||||
|
|
||||||
$builder.on("click", "#sb_submit", function(ev){
|
$builder.on("click", "#sb_submit", showSearchSubmit);
|
||||||
var fn,
|
|
||||||
oRange,
|
|
||||||
op,
|
|
||||||
oTable = $('#show_builder_table').dataTable();
|
|
||||||
|
|
||||||
//reset timestamp value since input values could have changed.
|
|
||||||
AIRTIME.showbuilder.resetTimestamp();
|
|
||||||
|
|
||||||
oRange = AIRTIME.utilities.fnGetScheduleRange(dateStartId, timeStartId, dateEndId, timeEndId);
|
|
||||||
|
|
||||||
fn = oTable.fnSettings().fnServerData;
|
|
||||||
fn.start = oRange.start;
|
|
||||||
fn.end = oRange.end;
|
|
||||||
|
|
||||||
op = $("div.sb-advanced-options");
|
|
||||||
if (op.is(":visible")) {
|
|
||||||
|
|
||||||
if (fn.ops === undefined) {
|
|
||||||
fn.ops = {};
|
|
||||||
}
|
|
||||||
fn.ops.showFilter = op.find("#sb_show_filter").val();
|
|
||||||
fn.ops.myShows = op.find("#sb_my_shows").is(":checked") ? 1 : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
oTable.fnDraw();
|
|
||||||
});
|
|
||||||
|
|
||||||
$builder.on("click","#sb_edit", function (ev){
|
$builder.on("click","#sb_edit", function (ev){
|
||||||
var schedTable = $("#show_builder_table").dataTable();
|
var schedTable = $("#show_builder_table").dataTable();
|
||||||
|
@ -229,6 +231,9 @@ AIRTIME = (function(AIRTIME) {
|
||||||
if ($(this).val() !== 0) {
|
if ($(this).val() !== 0) {
|
||||||
$(ev.delegateTarget).find('#sb_my_shows').attr("checked", false);
|
$(ev.delegateTarget).find('#sb_my_shows').attr("checked", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
showSearchSubmit();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function checkScheduleUpdates(){
|
function checkScheduleUpdates(){
|
||||||
|
|
Loading…
Reference in New Issue