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]
|
||||
if (lineupEntryId != '' && lineupEntryLabel != '') {
|
||||
// Update lineup entry
|
||||
try {
|
||||
const eventLineupEntry = eventLineupEntries.find((e)=>e.id==Number(lineupEntryId))
|
||||
eventLineupEntry.sequence = lineupEntrySequence
|
||||
eventLineupEntry.label = compilePositionLabel(lineupEntryLabel, lineupEntryFlags)
|
||||
newEventLineupEntries.push(eventLineupEntry)
|
||||
} catch {
|
||||
console.log
|
||||
}
|
||||
}
|
||||
else if (lineupEntryId != '') {
|
||||
// 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) {
|
||||
.Panel--full {
|
||||
border-radius: 0;
|
||||
margin-right: -16px;
|
||||
margin-left: -16px;
|
||||
border-right: none;
|
||||
border-left: none;
|
||||
}
|
||||
@@ -7143,4 +7141,8 @@ div[id^=event-lineup] .Panel.position-only .Panel-cell:has(.sequence), div[id^=e
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.scroll-horizontal {
|
||||
overflow-x: scroll;
|
||||
}
|
||||
|
||||
/*# 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) {
|
||||
form = el.closest("form");
|
||||
console.log(form)
|
||||
data = new FormData(form);
|
||||
|
||||
fetch(url, {
|
||||
@@ -598,10 +599,23 @@ function insertLineup(direction, teamId, eventId, element) {
|
||||
const parser = new DOMParser();
|
||||
const new_lineup_doc = parser.parseFromString(html, 'text/html')
|
||||
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();
|
||||
})
|
||||
|
||||
|
||||
@@ -311,8 +311,8 @@ div[id^="event-lineup"] .Panel {
|
||||
@media (max-width: 480px){
|
||||
.Panel--full {
|
||||
border-radius: 0;
|
||||
margin-right: -16px;
|
||||
margin-left: -16px;
|
||||
// margin-right: -16px;
|
||||
// margin-left: -16px;
|
||||
border-right: none;
|
||||
border-left: none;
|
||||
}}
|
||||
@@ -359,3 +359,7 @@ div[id^="event-lineup"] .Panel {
|
||||
// border-bottom: 1px solid #d6d6d6;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.scroll-horizontal {
|
||||
overflow-x: scroll;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<div class="u-flex" id="lineup-container">
|
||||
<div class="u-spaceSidessAuto" id="event-lineup-{{event.id}}" data-event-lineup-id="{{event_lineup.id}}" data-event-id="{{event.id}}">
|
||||
<div class="u-spaceSidesNone u-sm-spaceSidesAuto" id="event-lineup-{{event.id}}" data-event-lineup-id="{{event_lineup.id}}" data-event-id="{{event.id}}">
|
||||
<form onsubmit="onSubmit(this,event)" action="#">
|
||||
<input type="hidden" name="event_lineup_id" value="{{event_lineup.id}}">
|
||||
{{!-- <input type="hidden" name="_csrf" value="{{csrfToken}}"> --}}
|
||||
@@ -120,5 +119,5 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="u-flexGrow1"></div>
|
||||
<div class="position-label-flags">
|
||||
<div class="position-label-flags u-textNoWrap">
|
||||
<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()">
|
||||
<label class="Checkbox-label" for="flag-drd-{{member.id}}-{{member.benchcoach.eventLineupEntry.id}}">DR<small>d</small></label>
|
||||
|
||||
@@ -21,15 +21,13 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<header class="u-spaceBottomMd">
|
||||
{{> navbar }}
|
||||
{{{_sections.header}}}
|
||||
</header>
|
||||
<div class="u-padSidesMd u-xs-padSidesLg">
|
||||
<div class="u-max1200 u-flexExpandSides u-xs-size5of6 u-sm-size2of3 u-md-sizeFull u-padEndsLg u-sm-padEndsXl">
|
||||
<main class="">
|
||||
{{{ body }}}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
{{{script_tags scripts}}}
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user