summaryrefslogtreecommitdiff
path: root/includes/planner.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/planner.inc')
-rw-r--r--includes/planner.inc132
1 files changed, 89 insertions, 43 deletions
diff --git a/includes/planner.inc b/includes/planner.inc
index 225fca4..a5782a5 100644
--- a/includes/planner.inc
+++ b/includes/planner.inc
@@ -84,7 +84,9 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis
?>
<tr class="planner-day" id="planner-header-<?= $diff ?>" <?php if ($disabled): ?>style="opacity: .75; pointer-events: none;"<?php endif; ?>>
- <td colspan="10"><?= $display ?></td>
+ <td colspan="10" style="border:none;padding:0;">
+ <div style="padding:5px 10px;margin:-0.5px;border-top:1px solid #404040;border-left:1px solid #404040;border-right:1px solid #404040;border-top-left-radius: 10px; border-top-right-radius: 10px;"><?= $display ?></div>
+ </td>
<?php
if (!isset($cloudburst[date('Y-m-d', time() + (86400 * $diff))])) $cloudburst[date('Y-m-d', time() + (86400 * $diff))] = [];
@@ -100,96 +102,110 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis
?>
</tr>
<tr class="planner-header" <?php if ($disabled): ?>style="opacity: .75; pointer-events: none;"<?php endif; ?>>
- <td colspan="5">Cloudburst System</td>
- <td colspan="5">Raindrops System</td>
+ <td colspan="5" style="border-top-color:transparent;border-right-color: transparent;">Cloudburst System</td>
+ <td colspan="5" style="border-top-color:transparent;border-left-color: transparent;">Raindrops System</td>
</tr>
<?php for ($i = 0; $i <= $biggest; $i++): ?>
<tr class="planner-member" <?php if ($disabled): ?>style="opacity: .75; pointer-events: none;"<?php endif; ?>>
<?php if (isset($dayCloudburst[$index])): ?>
- <td class="planner-member-id">
+ <td class="planner-member-id" style="border-right-color: transparent;border-bottom-color: transparent;">
<?= $index + 1 ?>
</td>
- <td class="planner-link" style="width:50vw;" <?php if (!isset($dayCloudburst[$index][1])): ?>colspan="3" <?php else: ?>colspan="2"<?php endif; ?>>
+ <td class="planner-link" style="width:50vw;border-right-color: transparent;border-bottom-color: transparent;" <?php if (!isset($dayCloudburst[$index][1])): ?>colspan="3" <?php else: ?>colspan="2"<?php endif; ?>>
<?php $member = getMemberWithoutSystem($dayCloudburst[$index][0]); ?>
<?php if ($member["name"] === "fusion"): ?>
- <a class="member-link" onclick="openEditFronter('cloudburst', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><img src="/assets/logo/logo.png" style="width:24px;"> <span class="member-link-text"><span class="text-muted merge-desktop">Multiple merged members</span><span class="text-muted merge-mobile">Merge</span></span></a>
+ <a class="member-link" onclick="openEditFronter('cloudburst', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><span class="member-link-inner"><img src="/assets/logo/newlogo.png" style="filter:grayscale(1);width:24px;"> <span class="member-link-text"><span class="merge-desktop" style="opacity:.75;">Multiple merged members</span></span></span></a>
+ <?php elseif ($member["name"] === "unknown"): ?>
+ <a class="member-link" onclick="openEditFronter('cloudburst', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><span class="member-link-inner"><img src="/assets/logo/newlogo.png" style="filter:grayscale(1);width:24px;"> <span class="member-link-text"><span class="merge-desktop" style="opacity:.75;">Other/unknown/fallback pony</span></span></span></a>
<?php else: ?>
- <a class="member-link" onclick="openEditFronter('cloudburst', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><img src="<?= getAsset($member["system"], $member["id"], "heads") ?>" style="width:24px;"> <span class="member-link-text"><?= getMiniName($member["display_name"] ?? $member["name"]) ?></span></a>
+ <a class="member-link" onclick="openEditFronter('cloudburst', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><span class="member-link-inner"><img src="<?= getAsset($member["system"], $member["id"], "heads") ?>" style="width:24px;"> <span class="member-link-text"><?= !isset($dayCloudburst[$index][1]) ? $member["display_name"] ?? $member["name"] : getMiniName($member["display_name"] ?? $member["name"]) ?></span></span></a>
<?php endif; ?>
</td>
<?php if (!isset($dayCloudburst[$index][1])): ?>
- <td class="planner-cofronter-inner planner-link" style="width:5%;text-align:center;">
- <a onclick="addCofronter('cloudburst', <?= $diff ?>, <?= $index ?>);" class="planner-add-link">
- <img src="/assets/icons/add.svg" alt="" class="planner-add-icon">
+ <td class="planner-cofronter-inner planner-link" style="width:5%;text-align:center;border-left-color: transparent;border-bottom-color: transparent;">
+ <a onclick="addCofronter('cloudburst', <?= $diff ?>, <?= $index ?>);" class="planner-add-link planner-add-link-cofronter">
+ <span class="planner-add-link-cofronter-inner"><img src="/assets/icons/add.svg" alt="" class="planner-add-icon"></span>
</a>
</td>
<?php else: ?>
- <td class="planner-link" style="width:41.35vw;" colspan="2">
+ <td class="planner-link" style="border-bottom-color: transparent;width:41.35vw;" colspan="2">
<?php $member = getMemberWithoutSystem($dayCloudburst[$index][1]); ?>
<?php if ($member["name"] === "fusion"): ?>
- <a class="member-link" onclick="openEditCofronter('cloudburst', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><img src="/assets/logo/logo.png" style="width:24px;"> <span class="member-link-text"><span class="text-muted merge-desktop">Multiple merged members</span><span class="text-muted merge-mobile">Merge</span></span></a>
+ <a class="member-link" onclick="openEditCofronter('cloudburst', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><span class="member-link-inner"><img src="/assets/logo/newlogo.png" style="filter:grayscale(1);width:24px;"> <span class="member-link-text"><span class="merge-desktop" style="opacity:.75;">Multiple merged members</span></span></span></a>
+ <?php elseif ($member["name"] === "unknown"): ?>
+ <a class="member-link" onclick="openEditCofronter('cloudburst', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><span class="member-link-inner"><img src="/assets/logo/newlogo.png" style="filter:grayscale(1);width:24px;"> <span class="member-link-text"><span class="merge-desktop" style="opacity:.75;">Other/unknown/fallback pony</span></span></span></a>
<?php else: ?>
- <a class="member-link" onclick="openEditCofronter('cloudburst', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><img src="<?= getAsset($member["system"], $member["id"], "heads") ?>" style="width:24px;"> <span class="member-link-text"><?= getMiniName($member["display_name"] ?? $member["name"]) ?></span></a>
+ <a class="member-link" onclick="openEditCofronter('cloudburst', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><span class="member-link-inner"><img src="<?= getAsset($member["system"], $member["id"], "heads") ?>" style="width:24px;"> <span class="member-link-text"><?= !isset($dayCloudburst[$index][1]) ? $member["display_name"] ?? $member["name"] : getMiniName($member["display_name"] ?? $member["name"]) ?></span></span></a>
<?php endif; ?>
</td>
<?php endif; ?>
<?php elseif ($index === count($dayCloudburst)): ?>
- <td class="planner-add-inner planner-link" colspan="5">
+ <td class="planner-add-inner planner-link" colspan="5" style="border-top-color: transparent;border-bottom-color: transparent;">
<a onclick="addFronter('cloudburst', <?= $diff ?>, <?= $index ?>);" id="planner-add-link-cloudburst-<?= $diff ?>" class="planner-add-link">
- <img src="/assets/icons/add.svg" alt="" class="planner-add-icon">
- <span class="planner-add-text">Add new fronter</span>
+ <div class="planner-add-link-inner">
+ <img src="/assets/icons/add.svg" alt="" class="planner-add-icon">
+ <span class="planner-add-text">Add new fronter</span>
+ </div>
</a>
</td>
<?php else: ?>
- <td colspan="5" class="planner-empty"></td>
+ <td colspan="5" class="planner-empty" style="border-top-color:transparent;border-bottom-color:transparent;"></td>
<?php endif; ?>
<?php if (isset($dayRaindrops[$index])): ?>
- <td class="planner-member-id">
+ <td class="planner-member-id" style="border-bottom-color: transparent;border-right-color: transparent;">
<?= $index + 1 ?>
</td>
<?php $member = getMemberWithoutSystem($dayRaindrops[$index][0]); ?>
- <td class="planner-link" style="width:50vw;" <?php if (!isset($dayRaindrops[$index][1])): ?>colspan="3" <?php else: ?>colspan="2"<?php endif; ?>>
+ <td class="planner-link" style="border-right-color:transparent;border-bottom-color: transparent;width:50vw;" <?php if (!isset($dayRaindrops[$index][1])): ?>colspan="3" <?php else: ?>colspan="2"<?php endif; ?>>
<?php if ($member["name"] === "fusion"): ?>
- <a class="member-link" onclick="openEditFronter('raindrops', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><img src="/assets/logo/logo.png" style="width:24px;"> <span class="member-link-text"><span class="text-muted merge-desktop">Multiple merged members</span><span class="text-muted merge-mobile">Merge</span></span></a>
+ <a class="member-link" onclick="openEditFronter('raindrops', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><span class="member-link-inner"><img src="/assets/logo/newlogo.png" style="filter:grayscale(1);width:24px;"> <span class="member-link-text"><span class="merge-desktop" style="opacity:.75;">Multiple merged members</span></span></span></a>
+ <?php elseif ($member["name"] === "unknown"): ?>
+ <a class="member-link" onclick="openEditFronter('raindrops', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><span class="member-link-inner"><img src="/assets/logo/newlogo.png" style="filter:grayscale(1);width:24px;"> <span class="member-link-text"><span class="merge-desktop" style="opacity:.75;">Other/unknown/fallback pony</span></span></span></a>
<?php else: ?>
- <a class="member-link" onclick="openEditFronter('raindrops', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><img src="<?= getAsset($member["system"], $member["id"], "heads") ?>" style="width:24px;"> <span class="member-link-text"><?= getMiniName($member["display_name"] ?? $member["name"]) ?></span></a>
+ <a class="member-link" onclick="openEditFronter('raindrops', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><span class="member-link-inner"><img src="<?= getAsset($member["system"], $member["id"], "heads") ?>" style="width:24px;"> <span class="member-link-text"><?= !isset($dayRaindrops[$index][1]) ? $member["display_name"] ?? $member["name"] : getMiniName($member["display_name"] ?? $member["name"]) ?></span></span></a>
<?php endif; ?>
</td>
<?php if (!isset($dayRaindrops[$index][1])): ?>
- <td class="planner-cofronter-inner planner-link" style="width:5%;text-align:center;">
- <a onclick="addCofronter('raindrops', <?= $diff ?>, <?= $index ?>);" class="planner-add-link">
- <img src="/assets/icons/add.svg" alt="" class="planner-add-icon">
+ <td class="planner-cofronter-inner planner-link" style="border-bottom-color: transparent;border-left-color: transparent;width:5%;text-align:center;">
+ <a onclick="addCofronter('raindrops', <?= $diff ?>, <?= $index ?>);" class="planner-add-link planner-add-link-cofronter">
+ <span class="planner-add-link-cofronter-inner"><img src="/assets/icons/add.svg" alt="" class="planner-add-icon"></span>
</a>
</td>
<?php else: ?>
<td class="planner-link" style="width:41.35vw;" colspan="2">
<?php $member = getMemberWithoutSystem($dayRaindrops[$index][1]); ?>
<?php if ($member["name"] === "fusion"): ?>
- <a class="member-link" onclick="openEditCofronter('raindrops', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><img src="/assets/logo/logo.png" style="width:24px;"> <span class="member-link-text"><span class="text-muted merge-desktop">Multiple merged members</span><span class="text-muted merge-mobile">Merge</span></span></a>
+ <a class="member-link" onclick="openEditCofronter('raindrops', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><span class="member-link-inner"><img src="/assets/logo/newlogo.png" style="filter:grayscale(1);width:24px;"> <span class="member-link-text"><span class="merge-desktop" style="opacity:.75;">Multiple merged members</span></span></span></a>
+ <?php elseif ($member["name"] === "unknown"): ?>
+ <a class="member-link" onclick="openEditCofronter('raindrops', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><span class="member-link-inner"><img src="/assets/logo/newlogo.png" style="filter:grayscale(1);width:24px;"> <span class="member-link-text"><span class="merge-desktop" style="opacity:.75;">Other/unknown/fallback pony</span></span></span></a>
<?php else: ?>
- <a class="member-link" onclick="openEditCofronter('raindrops', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><img src="<?= getAsset($member["system"], $member["id"], "heads") ?>" style="width:24px;"> <span class="member-link-text"><?= getMiniName($member["display_name"] ?? $member["name"]) ?></span></a>
+ <a class="member-link" onclick="openEditCofronter('raindrops', <?= $index ?>, '<?= date('Y-m-d', time() + (86400 * $diff)) ?>')"><span class="member-link-inner"><img src="<?= getAsset($member["system"], $member["id"], "heads") ?>" style="width:24px;"> <span class="member-link-text"><?= !isset($dayRaindrops[$index][1]) ? $member["display_name"] ?? $member["name"] : getMiniName($member["display_name"] ?? $member["name"]) ?></span></span></a>
<?php endif; ?>
</td>
<?php endif; ?>
<?php elseif ($index === count($dayRaindrops)): ?>
- <td class="planner-add-inner planner-link" colspan="5">
+ <td class="planner-add-inner planner-link" colspan="5" style="border-top-color: transparent;border-bottom-color: transparent;">
<a onclick="addFronter('raindrops', <?= $diff ?>, <?= $index ?>);" id="planner-add-link-raindrops-<?= $diff ?>" class="planner-add-link">
- <img src="/assets/icons/add.svg" alt="" class="planner-add-icon">
- <span class="planner-add-text">Add new fronter</span>
+ <div class="planner-add-link-inner">
+ <img src="/assets/icons/add.svg" alt="" class="planner-add-icon">
+ <span class="planner-add-text">Add new fronter</span>
+ </div>
</a>
</td>
<?php else: ?>
- <td colspan="5" class="planner-empty"></td>
+ <td colspan="5" class="planner-empty" style="border-top-color:transparent;border-bottom-color:transparent;"></td>
<?php endif; ?>
</tr>
<?php $index++; endfor; ?>
<tr class="planner-day planner-end-of-day" <?php if ($disabled): ?>style="opacity: .75; pointer-events: none;"<?php endif; ?>>
- <td colspan="10">
- <?php if (count($dayCloudburst) > 0 && count($dayRaindrops) > 0): ?>
- <?= getMiniName(getMemberWithoutSystem($dayCloudburst[count($dayCloudburst) - 1][0])["display_name"] ?? getMemberWithoutSystem($dayCloudburst[count($dayCloudburst) - 1][0])["name"]) ?> will sleep with <?= getMiniName(getMemberWithoutSystem($dayRaindrops[count($dayRaindrops) - 1][0])["display_name"] ?? getMemberWithoutSystem($dayRaindrops[count($dayRaindrops) - 1][0])["name"]) ?>
- <?php else: ?>
- Unable to calculate who will sleep with who
- <?php endif; ?>
+ <td colspan="10" style="padding: 0;border:none;">
+ <div style="padding: 5px 10px;border: 1px solid #404040;margin:-1px;border-bottom-left-radius: 10px;border-bottom-right-radius: 10px;">
+ <?php if (count($dayCloudburst) > 0 && count($dayRaindrops) > 0): ?>
+ <?= getMiniName(getMemberWithoutSystem($dayCloudburst[count($dayCloudburst) - 1][0])["display_name"] ?? getMemberWithoutSystem($dayCloudburst[count($dayCloudburst) - 1][0])["name"]) ?> will sleep with <?= getMiniName(getMemberWithoutSystem($dayRaindrops[count($dayRaindrops) - 1][0])["display_name"] ?? getMemberWithoutSystem($dayRaindrops[count($dayRaindrops) - 1][0])["name"]) ?>
+ <?php else: ?>
+ Unable to calculate who will sleep with who
+ <?php endif; ?>
+ </div>
</td>
</tr>
<tr class="planner-separator"></tr>
@@ -358,6 +374,33 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis
}
}
+ .member-link, .planner-link {
+ background-color: transparent !important;
+ }
+
+ .member-link-inner, .planner-add-link-inner, .planner-add-link-cofronter-inner {
+ display: block;
+ padding: 3px 7px;
+ border-radius: 5px;
+ }
+
+ .planner-add-link-cofronter-inner {
+ border-radius: 100%;
+ }
+
+ .planner-add-link-cofronter-inner .planner-add-icon {
+ margin-top: -2px;
+ }
+
+ .member-link, .planner-add-link-inner, .planner-add-link-cofronter-inner {
+ padding: 2px 3px !important;
+ }
+
+ .member-link:hover .member-link-inner, .planner-add-link:hover .planner-add-link-inner, .planner-add-link-cofronter:hover .planner-add-link-cofronter-inner {
+ background-color: rgba(255, 255, 255, .125);
+ /*background-color: rgba(255, 255, 255, .25);*/
+ }
+
</style>
<!--suppress JSUnresolvedVariable, JSUnresolvedFunction -->
@@ -394,14 +437,16 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis
let otherPony = window.fronting[window.addSystem === "gdapd" ? "cloudburst" : "raindrops"][window.currentWorkingDate][window.addIndex][0];
let availablePonies = window.relations[window.fronting[window.addSystem === "gdapd" ? "cloudburst" : "raindrops"][window.currentWorkingDate][window.addIndex][0]];
- document.getElementById("associated-results").innerHTML = "";
+ if (availablePonies) {
+ document.getElementById("associated-results").innerHTML = "";
- for (let pony of availablePonies) {
- document.getElementById("associated-results").innerHTML += document.getElementById("list-pony-" + pony).outerHTML;
- }
+ for (let pony of availablePonies) {
+ document.getElementById("associated-results").innerHTML += document.getElementById("list-pony-" + pony).outerHTML;
+ }
- document.getElementById("list").style.display = "none";
- document.getElementById("associated-results").style.display = "";
+ document.getElementById("list").style.display = "none";
+ document.getElementById("associated-results").style.display = "";
+ }
}
}
@@ -687,7 +732,8 @@ function day($display, $diff): void { if ($diff < 0) $disabled = true; else $dis
<?php foreach (scoreOrderGlobal() as $member): ?>
<a id="list-pony-<?= $member['id'] ?>" onclick="confirmFronterAdd(window.addSystem, '<?= $member['id'] ?>');" class="new-fronter-link member-link list-group-item list-group-item-action"><img src="<?= getAsset($member["system"], $member["id"], "heads") ?>" style="width:24px;"> <?= getMiniName($member["display_name"] ?? $member["name"]) ?><peh-schedule-add></peh-schedule-add></a>
<?php endforeach; $member = getSystemMember("gdapd", "irxyh") ?>
- <a onclick="confirmFronterAdd(window.addSystem, 'irxyh');" class="new-fronter-link member-link list-group-item list-group-item-action"><img src="/assets/logo/logo.png" style="width:24px;"> <span class="text-muted">Multiple merged members</span></a>
+ <a onclick="confirmFronterAdd(window.addSystem, 'irxyh');" class="new-fronter-link member-link list-group-item list-group-item-action"><img src="/assets/logo/newlogo.png" style="filter:grayscale(1);width:24px;"> <span style="opacity:.75">Multiple merged members</span></a>
+ <a onclick="confirmFronterAdd(window.addSystem, 'zdtsg');" class="new-fronter-link member-link list-group-item list-group-item-action"><img src="/assets/logo/newlogo.png" style="filter:grayscale(1);width:24px;"> <span style="opacity:.75">Other/unknown/fallback pony</span></a>
</div>
</div>