-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/episode_media_tab
- Loading branch information
Showing
83 changed files
with
740 additions
and
435 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.prx-show-busy { | ||
display: none !important; | ||
} | ||
.prx-visible-busy { | ||
visibility: hidden !important; | ||
} | ||
turbo-frame[busy] { | ||
.prx-show-busy { | ||
display: initial !important; | ||
} | ||
.prx-hide-busy { | ||
display: none !important; | ||
} | ||
.prx-visible-busy { | ||
visibility: initial !important; | ||
} | ||
.prx-invisible-busy { | ||
visibility: hidden !important; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { Controller } from "@hotwired/stimulus" | ||
|
||
export default class extends Controller { | ||
static targets = ["adBreaks", "button", "count", "counter", "label"] | ||
static values = { datesCount: Number } | ||
|
||
datesCountValueChanged() { | ||
this.recount() | ||
} | ||
|
||
setMedium(event) { | ||
if (event.target.value === "video") { | ||
this.adBreaksTarget.value = "" | ||
this.adBreaksTarget.disabled = true | ||
} else { | ||
this.adBreaksTarget.disabled = false | ||
} | ||
this.recount() | ||
} | ||
|
||
setAdBreaks(event) { | ||
this.recount() | ||
} | ||
|
||
recount() { | ||
const num = this.countSelectedTargets() | ||
|
||
// update label | ||
this.countTarget.innerHTML = num | ||
if (num === 1) { | ||
this.labelTarget.innerHTML = this.labelTarget.dataset.singular | ||
} else { | ||
this.labelTarget.innerHTML = this.labelTarget.dataset.plural | ||
} | ||
|
||
// enable button IF we have > 1 selected and a adBreak count | ||
if (num > 0 && (this.adBreaksTarget.disabled || parseInt(this.adBreaksTarget.value) >= 0)) { | ||
this.buttonTarget.disabled = false | ||
} else { | ||
this.buttonTarget.disabled = true | ||
} | ||
} | ||
|
||
countSelectedTargets() { | ||
const selectedTargets = this.counterTargets.filter((el) => { | ||
return !el.disabled | ||
}) | ||
return selectedTargets.length | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Controller } from "@hotwired/stimulus" | ||
|
||
export default class extends Controller { | ||
static targets = ["toggle"] | ||
|
||
toggleTargetConnected(el) { | ||
const action = el.dataset.action || "" | ||
el.dataset.action = `${action} change->toggle-blank#toggle` | ||
} | ||
|
||
toggle(event) { | ||
if (event.target.value) { | ||
for (const target of this.toggleTargets) { | ||
if (target !== event.target) { | ||
target.value = "" | ||
target.dispatchEvent(new Event("blur")) | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.