Skip to content

Commit 20e4914

Browse files
committed
disable sidecar datatables upload options & organize upload page
1 parent 9f5f6e1 commit 20e4914

File tree

5 files changed

+37
-39
lines changed

5 files changed

+37
-39
lines changed

static/datatable/src/model/candidate.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,12 @@ export default class Candidate {
166166
null, candidate.candidateName, editorParams.sidecarOnly,
167167
placeholder);
168168
candidateName.classList.add("candidate-name-input");
169-
const moreInfoButton = Candidate.getMoreInfoButton(editor, candidate,
170-
cell, candidateName, success, cancel,
171-
onRendered, editorParams);
172-
editor.appendChild(document.createElement("br"));
173-
editor.appendChild(moreInfoButton);
169+
// TODO - reinstate "More Info" button when working
170+
// const moreInfoButton = Candidate.getMoreInfoButton(editor, candidate,
171+
// cell, candidateName, success, cancel,
172+
// onRendered, editorParams);
173+
// editor.appendChild(document.createElement("br"));
174+
// editor.appendChild(moreInfoButton);
174175

175176
return editor;
176177
};

static/settings/src/upload.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,19 @@ function hideManualEntryShowError() {
5454
}
5555

5656
function hideManualEntryErrorShowMainButton() {
57-
getManuallyEditSidecarButton().style.display = "inline";
58-
getManuallyEditSidecarErrorButton().style.display = "none";
57+
// DISABLED TEMPORARILY
58+
// getManuallyEditSidecarButton().style.display = "inline";
59+
// getManuallyEditSidecarErrorButton().style.display = "none";
5960
}
6061

6162
function showManualOptionsHideTable(redraw = true) {
62-
getOptionsForManualSidecarEntry().style.display = 'block';
63-
getDatatableOuterWrapper().style.display = 'none';
64-
document.removeEventListener('formdata', formListener);
65-
if (redraw) {
66-
redrawOptions();
67-
}
63+
// DISABLED TEMPORARILY
64+
// getOptionsForManualSidecarEntry().style.display = 'block';
65+
// getDatatableOuterWrapper().style.display = 'none';
66+
// document.removeEventListener('formdata', formListener);
67+
// if (redraw) {
68+
// redrawOptions();
69+
// }
6870
}
6971

7072
export function uploadSidecarInstead(e: MouseEvent) {

templates/settings/base.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,4 @@
8686

8787
{% block afterOptions %}
8888
{% endblock %}
89-
90-
{% include "settings/settings-candidate-modal.html" %}
9189
</body>

templates/settings/settings-upload.html

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,6 @@ <h1 class="page-section-heading text-center narrowbox">Customization Options</h1
4747
{% endblock %}
4848

4949
{% block additionalOptions %}
50-
<button class="collapsible">▶ Text Options</button>
51-
52-
<div class="optionscontent" id="globalOptions">
53-
<div class="container mt-3 mb-3">
54-
<label for="customText" class="d-block">Custom text to display with visualization title:</label>
55-
<textarea id="customText" name="customText" maxlength="256" placeholder="The results of a ranked choice voting election"></textarea>
56-
</div>
57-
</div>
58-
5950
<button class="collapsible">▶ Data Options</button>
6051

6152
<div class="optionscontent" id="data-options">
@@ -96,6 +87,7 @@ <h1 class="page-section-heading text-center narrowbox">Customization Options</h1
9687

9788
</p>
9889
</div>
90+
<!--
9991
<button class="collapsible">▶ Candidate Details</button>
10092
<div class="optionscontent" id="candidate-options">
10193
<div class="container">
@@ -160,20 +152,25 @@ <h3>Modify data from uploaded file</h3>
160152
</div>
161153
</div>
162154
</div>
155+
-->
163156

164-
<button class="collapsible">▶ Global visualization options</button>
165-
166-
<div class="optionscontent" id="globalOptions">
167-
<p class="mt-3">
168-
<input type="hidden" name="hideDecimals"/><!-- To be sent in GET/POST if unchecked -->
169-
<label>
170-
<input type="checkbox" name="hideDecimals"/> Hide decimal places
171-
</label>
172-
<br/>
173-
<small>By default, we'll show up to two decimal places.</small></label>
174-
<br/><br/>
175-
</p>
176-
</div>
157+
<button class="collapsible">▶ Global visualization options</button>
158+
<div class="optionscontent" id="globalOptions">
159+
<div class="container mt-3 mb-3">
160+
<label for="customText" class="d-block">Custom text to display with visualization title:</label>
161+
<textarea id="customText" name="customText" maxlength="256" placeholder="The results of a ranked choice voting election"></textarea>
162+
</div>
163+
164+
<p class="mt-3">
165+
<input type="hidden" name="hideDecimals"/><!-- To be sent in GET/POST if unchecked -->
166+
<label>
167+
<input type="checkbox" name="hideDecimals"/> Hide decimal places
168+
</label>
169+
<br/>
170+
<small>By default, we'll show up to two decimal places.</small></label>
171+
<br/><br/>
172+
</p>
173+
</div>
177174

178175
{% endblock %}
179176

visualizer/tests/testLiveBrowserWithHead.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,15 @@ def test_settings_tab(self):
146146
# Check the box (the second one, which isn't hidden)
147147
self.browser.find_elements(By.NAME, "hideSankey")[1].click()
148148
self.browser.find_elements(By.ID, "updateSettings")[0].click() # Hit submit
149-
assert self._is_visible("sankey-tab")
149+
self._ensure_eventually_asserts(lambda: self._is_visible("sankey-tab"))
150150

151151
# Finally, toggle it back off
152152
self._go_to_tab("settings-tab")
153153
self.browser.find_elements(By.ID, "sankeyOptions")[0].click() # Open the dropdown
154154
# Check the box (the second one, which isn't hidden)
155155
self.browser.find_elements(By.NAME, "hideSankey")[1].click()
156156
self.browser.find_elements(By.ID, "updateSettings")[0].click() # Hit submit
157-
assert not self._is_visible("sankey-tab")
157+
self._ensure_eventually_asserts(lambda: not self._is_visible("sankey-tab"))
158158

159159
self._assert_log_len(0)
160160

0 commit comments

Comments
 (0)