Compare commits
2 Commits
9f9da4e191
...
39e6c2b5af
| Author | SHA1 | Date | |
|---|---|---|---|
|
39e6c2b5af
|
|||
|
832fb654ec
|
@@ -210,10 +210,14 @@ const processPostedEventLineupEntries = (body, eventLineupEntries, eventLineup)
|
|||||||
const lineupEntryFlags = body.flags[i]
|
const lineupEntryFlags = body.flags[i]
|
||||||
if (lineupEntryId != '' && lineupEntryLabel != '') {
|
if (lineupEntryId != '' && lineupEntryLabel != '') {
|
||||||
// Update lineup entry
|
// Update lineup entry
|
||||||
|
try {
|
||||||
const eventLineupEntry = eventLineupEntries.find((e)=>e.id==Number(lineupEntryId))
|
const eventLineupEntry = eventLineupEntries.find((e)=>e.id==Number(lineupEntryId))
|
||||||
eventLineupEntry.sequence = lineupEntrySequence
|
eventLineupEntry.sequence = lineupEntrySequence
|
||||||
eventLineupEntry.label = compilePositionLabel(lineupEntryLabel, lineupEntryFlags)
|
eventLineupEntry.label = compilePositionLabel(lineupEntryLabel, lineupEntryFlags)
|
||||||
newEventLineupEntries.push(eventLineupEntry)
|
newEventLineupEntries.push(eventLineupEntry)
|
||||||
|
} catch {
|
||||||
|
console.log
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (lineupEntryId != '') {
|
else if (lineupEntryId != '') {
|
||||||
// Delete lineup entry
|
// Delete lineup entry
|
||||||
|
|||||||
@@ -7104,8 +7104,6 @@ div[id^=event-lineup] .Panel.position-only .Panel-cell:has(.sequence), div[id^=e
|
|||||||
@media (max-width: 480px) {
|
@media (max-width: 480px) {
|
||||||
.Panel--full {
|
.Panel--full {
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
margin-right: -16px;
|
|
||||||
margin-left: -16px;
|
|
||||||
border-right: none;
|
border-right: none;
|
||||||
border-left: none;
|
border-left: none;
|
||||||
}
|
}
|
||||||
@@ -7143,4 +7141,8 @@ div[id^=event-lineup] .Panel.position-only .Panel-cell:has(.sequence), div[id^=e
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.scroll-horizontal {
|
||||||
|
overflow-x: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
/*# sourceMappingURL=application.css.map */
|
/*# sourceMappingURL=application.css.map */
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -252,6 +252,7 @@ function copyEmailTable(itemEl, subject, recipients) {
|
|||||||
|
|
||||||
function emailModal(el, url) {
|
function emailModal(el, url) {
|
||||||
form = el.closest("form");
|
form = el.closest("form");
|
||||||
|
console.log(form)
|
||||||
data = new FormData(form);
|
data = new FormData(form);
|
||||||
|
|
||||||
fetch(url, {
|
fetch(url, {
|
||||||
@@ -598,10 +599,23 @@ function insertLineup(direction, teamId, eventId, element) {
|
|||||||
const parser = new DOMParser();
|
const parser = new DOMParser();
|
||||||
const new_lineup_doc = parser.parseFromString(html, 'text/html')
|
const new_lineup_doc = parser.parseFromString(html, 'text/html')
|
||||||
const new_lineup_doc_node = new_lineup_doc.firstElementChild.querySelector('[id*=event-lineup]')
|
const new_lineup_doc_node = new_lineup_doc.firstElementChild.querySelector('[id*=event-lineup]')
|
||||||
const lineup_container = document.querySelector("#lineup-container")
|
const main = document.querySelector("main")
|
||||||
|
|
||||||
|
direction > 0 ? main.appendChild(new_lineup_doc_node) : main.insertBefore(new_lineup_doc_node, element.closest('[id*=event-lineup]'))
|
||||||
|
|
||||||
|
main.classList.remove(...main.classList)
|
||||||
|
main.classList.add('scroll-horizontal', 'u-spaceSidesSm', 'u-flex')
|
||||||
|
|
||||||
|
Array.from(document.querySelectorAll("[id^=event-lineup]")).forEach((bcLineup) => {
|
||||||
|
// main.classList.remove('.u-max1200', 'u-flexExpandSides')
|
||||||
|
bcLineup.classList.remove('u-spaceSidesNone', 'u-sm-spaceSidesAuto')
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
Array.from(document.querySelectorAll("[id^=event-lineup] .Panel")).forEach((bcLineupPanel) => {
|
||||||
|
bcLineupPanel.classList.remove('Panel--full')
|
||||||
|
})
|
||||||
|
|
||||||
direction > 0 ? lineup_container.appendChild(new_lineup_doc_node) : lineup_container.insertBefore(new_lineup_doc_node, element.closest('[id*=event-lineup]'))
|
|
||||||
initPage();
|
initPage();
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -311,8 +311,8 @@ div[id^="event-lineup"] .Panel {
|
|||||||
@media (max-width: 480px){
|
@media (max-width: 480px){
|
||||||
.Panel--full {
|
.Panel--full {
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
margin-right: -16px;
|
// margin-right: -16px;
|
||||||
margin-left: -16px;
|
// margin-left: -16px;
|
||||||
border-right: none;
|
border-right: none;
|
||||||
border-left: none;
|
border-left: none;
|
||||||
}}
|
}}
|
||||||
@@ -359,3 +359,7 @@ div[id^="event-lineup"] .Panel {
|
|||||||
// border-bottom: 1px solid #d6d6d6;
|
// border-bottom: 1px solid #d6d6d6;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.scroll-horizontal {
|
||||||
|
overflow-x: scroll;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<div class="u-flex" id="lineup-container">
|
<div class="u-spaceSidesNone u-sm-spaceSidesAuto" id="event-lineup-{{event.id}}" data-event-lineup-id="{{event_lineup.id}}" data-event-id="{{event.id}}">
|
||||||
<div class="u-spaceSidessAuto" id="event-lineup-{{event.id}}" data-event-lineup-id="{{event_lineup.id}}" data-event-id="{{event.id}}">
|
|
||||||
<form onsubmit="onSubmit(this,event)" action="#">
|
<form onsubmit="onSubmit(this,event)" action="#">
|
||||||
<input type="hidden" name="event_lineup_id" value="{{event_lineup.id}}">
|
<input type="hidden" name="event_lineup_id" value="{{event_lineup.id}}">
|
||||||
{{!-- <input type="hidden" name="_csrf" value="{{csrfToken}}"> --}}
|
{{!-- <input type="hidden" name="_csrf" value="{{csrfToken}}"> --}}
|
||||||
@@ -120,5 +119,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="u-flexGrow1"></div>
|
<div class="u-flexGrow1"></div>
|
||||||
<div class="position-label-flags">
|
<div class="position-label-flags u-textNoWrap">
|
||||||
<div class="Checkbox Checkbox--inline">
|
<div class="Checkbox Checkbox--inline">
|
||||||
<input class="Checkbox-input" type="checkbox" name="flag-drd" id="flag-drd-{{member.id}}-{{member.benchcoach.eventLineupEntry.id}}" onclick="refreshLineup()">
|
<input class="Checkbox-input" type="checkbox" name="flag-drd" id="flag-drd-{{member.id}}-{{member.benchcoach.eventLineupEntry.id}}" onclick="refreshLineup()">
|
||||||
<label class="Checkbox-label" for="flag-drd-{{member.id}}-{{member.benchcoach.eventLineupEntry.id}}">DR<small>d</small></label>
|
<label class="Checkbox-label" for="flag-drd-{{member.id}}-{{member.benchcoach.eventLineupEntry.id}}">DR<small>d</small></label>
|
||||||
|
|||||||
@@ -21,15 +21,13 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header class="u-spaceBottomMd">
|
||||||
{{> navbar }}
|
{{> navbar }}
|
||||||
{{{_sections.header}}}
|
{{{_sections.header}}}
|
||||||
</header>
|
</header>
|
||||||
<div class="u-padSidesMd u-xs-padSidesLg">
|
<main class="">
|
||||||
<div class="u-max1200 u-flexExpandSides u-xs-size5of6 u-sm-size2of3 u-md-sizeFull u-padEndsLg u-sm-padEndsXl">
|
|
||||||
{{{ body }}}
|
{{{ body }}}
|
||||||
</div>
|
</main>
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
{{{script_tags scripts}}}
|
{{{script_tags scripts}}}
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user