Skip to content

Commit 9fe8e8b

Browse files
author
Christopher Green
committed
Hides capacity column and filter Refs #10
1 parent 0551f90 commit 9fe8e8b

File tree

4 files changed

+19
-11
lines changed

4 files changed

+19
-11
lines changed

app/lib/hide-capacity.es6

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
// Hides the 'Capacity column'
21
export function hideCapacity () {
3-
2+
// Hide the 'Capacity column'
43
document.querySelectorAll('.fc-resource-area.fc-widget-header .fc-content .fc-widget-header')[1].remove()
54

65
document.querySelectorAll('.fc-resource-area.fc-widget-header .fc-content colgroup col')[1].remove()
76

87
let rows = document.querySelectorAll('.fc-resource-area.fc-widget-content .fc-content tr')
98

109
for (let i = 0; i < rows.length; i++) {
11-
rows[i].children[1].remove()
10+
if (rows[i].children.length > 1) {
11+
rows[i].children[1].remove()
12+
}
1213
}
1314

1415
document.querySelectorAll('.fc-resource-area.fc-widget-content .fc-content colgroup col')[1].remove()
16+
17+
// Hide the 'Capacity' filter
18+
document.querySelectorAll('#s-lc-eq-navform .form-inline .form-group')[2].remove()
1519
}

app/main.es6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {hideTinyFooter} from './lib/hide-tiny-footer'
77
import {showHeader, showFooter} from './lib/template'
88

99
document.addEventListener('DOMContentLoaded', () => {
10-
// hideCapacity()
10+
hideCapacity()
1111
// hideRoomInfo()
1212

1313
showHeader()

dist/bundle.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ return /******/ (function(modules) { // webpackBootstrap
7070
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
7171
/******/
7272
/******/ // __webpack_public_path__
73-
/******/ __webpack_require__.p = "https://bexidsojed.localtunnel.me/";
73+
/******/ __webpack_require__.p = "https://xbbziloico.localtunnel.me/";
7474
/******/
7575
/******/ // Load entry module and return exports
7676
/******/ return __webpack_require__(__webpack_require__.s = 7);
@@ -93,21 +93,25 @@ function hideBreadcrumbs () {
9393
/***/ (function(module, __webpack_exports__, __webpack_require__) {
9494

9595
"use strict";
96-
/* unused harmony export hideCapacity */
97-
// Hides the 'Capacity column'
96+
/* harmony export (immutable) */ __webpack_exports__["a"] = hideCapacity;
9897
function hideCapacity () {
99-
98+
// Hide the 'Capacity column'
10099
document.querySelectorAll('.fc-resource-area.fc-widget-header .fc-content .fc-widget-header')[1].remove()
101100

102101
document.querySelectorAll('.fc-resource-area.fc-widget-header .fc-content colgroup col')[1].remove()
103102

104103
let rows = document.querySelectorAll('.fc-resource-area.fc-widget-content .fc-content tr')
105104

106105
for (let i = 0; i < rows.length; i++) {
107-
rows[i].children[1].remove()
106+
if (rows[i].children.length > 1) {
107+
rows[i].children[1].remove()
108+
}
108109
}
109110

110111
document.querySelectorAll('.fc-resource-area.fc-widget-content .fc-content colgroup col')[1].remove()
112+
113+
// Hide the 'Capacity' filter
114+
document.querySelectorAll('#s-lc-eq-navform .form-inline .form-group')[2].remove()
111115
}
112116

113117

@@ -17350,7 +17354,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
1735017354

1735117355

1735217356
document.addEventListener('DOMContentLoaded', () => {
17353-
// hideCapacity()
17357+
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__lib_hide_capacity__["a" /* hideCapacity */])()
1735417358
// hideRoomInfo()
1735517359

1735617360
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__lib_template__["a" /* showHeader */])()

dist/bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)