Skip to content

Commit

Permalink
Enabled test mode on live stream info too
Browse files Browse the repository at this point in the history
  • Loading branch information
tdiam committed Mar 22, 2018
1 parent 1029c8b commit 7206c6e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/CurrentEventController.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function index(Request $request) {
$where = [['visible', true]];
}

if(date('Y-m-d') == '2018-03-24') {
if($request->testLive == "yes" || date('Y-m-d') == '2018-03-24') {
$events = Schedule :: where(array_merge($where, [['type', '!=', 'workshop']]))
-> orderBy('hour', 'asc')
-> get();
Expand Down
3 changes: 3 additions & 0 deletions public/js/home-animations.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,15 @@ window.homeAnimations = function () {
}, 5000);
}

var testLiveVal = typeof window.URL === "function" ? new URL(location.href).searchParams.get("testLive") : undefined;

var update = function update() {
if ($("#live").length > 0) {
$.ajax({
type: "GET",
url: "/currentEvent",
dataType: "html",
data: { testLive: testLiveVal },
success: function success(data) {
if (data != $("#hero .liveInfo").html()) {
$("#hero .liveInfo").fadeOut(200, function () {
Expand Down
3 changes: 3 additions & 0 deletions resources/assets/js/home-animations.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,15 @@ window.homeAnimations = function() {
}, 5000)
}

let testLiveVal = typeof(window.URL) === "function" ? new URL(location.href).searchParams.get("testLive") : undefined

let update = function() {
if($("#live").length > 0) {
$.ajax({
type: "GET",
url: "/currentEvent",
dataType: "html",
data: {testLive: testLiveVal},
success: function(data) {
if(data != $("#hero .liveInfo").html()) {
$("#hero .liveInfo").fadeOut(200, function() {
Expand Down

0 comments on commit 7206c6e

Please sign in to comment.