diff --git a/docsearch/static/css/custom.css b/docsearch/static/css/custom.css index c607301..ab0be4a 100644 --- a/docsearch/static/css/custom.css +++ b/docsearch/static/css/custom.css @@ -155,3 +155,7 @@ footer a.dropdown-item { .invalid-feedback { display: block; } + +.edit-form-tooltip { + color: #445721; +} diff --git a/docsearch/static/js/tooltips/flatdrawings.js b/docsearch/static/js/tooltips/flatdrawings.js new file mode 100644 index 0000000..99fb49d --- /dev/null +++ b/docsearch/static/js/tooltips/flatdrawings.js @@ -0,0 +1,114 @@ +const allFieldLabels = document.querySelectorAll("[id^='div_id_'] label") +const fieldDescriptions = { + "Area": ` +

Area number that project is located in.

Public Land Survey System term indicating a grided system of squares no larger than 6 miles × 6 miles. The numbering of Township Areas starts in the northwest end of the county, runs east to the lake and then starts back at the west end of the county. This number also represents the first number of the Cook County Property Identification Number – PIN.

+

Click here for an interactive map of Areas

+

Note: if project contains multiple locations, duplicate entries should be made for each separate Area-Section combination.

+ `, + "Section": ` +

Section number that project is located in.

+

Public Land Survey System term indicating a grided subsystem of squares 1 mile × 1 mile (36 Sections = 1 Township Area). The numbering of Sections starts in the northeast corner of the Township Area, runs West to 6, then East to 12, then West to 18, and so on, back and forth, until they end with Section 36 in the southeast corner. This number represents the second number of the Property Identification Number – PIN.

+

Click here for an interactive map of Sections

+

Note: if project contains multiple locations, duplicate entries should be made for each separate Area-Section combination.

+ `, + "Map number": ` +

Do not complete for new document additions. Historical Planning and Development map numbering system for filing purposes.

+

These numbers were written on the original drawings typically below the title blocks. The filing number sequence on the sheets is in reverse order of the drawing sheets – i.e. the last sheet of the drawing set has the lowest Map Number and the first sheet of the drawing set has the largest. Map numbers were sequential for projects that were contained in the same Area-Section drawers.

+ `, + "Location": ` +

Official FPCC name for project location.

+

For new entries, please refer to map.fpdcc.com or consult with GIS team for current official preserve names. For buildings, typical naming convention is: [preserve complex] – [building_name] and , if applicable, [grove_number].

+

Names are not currently standardized and can change over time so be aware of this restriction when searching for records.

+ `, + "Building ID": ` +

Unique number assigned by GIS to each building in the Forest Preserves.

+

Please contact the GIS team if you do not know how to determine building ID or need an ID generated for a new building.

+ `, + "Description": ` +

General description of project following the format of [Activity] of [Component] for [building_name] at [complex].

+

The [building_name] and [preserve complex] are repeated as necessary where multiple locations are encompassed in the drawings.

+

Please note when drawings are “As-Builts” or if drawing sheets are missing. Please note if the project was done in cooperation with another entity. See below for samples of Activity & Component terms:

+ +

When updating historical documents, preserve names that are no longer recognized should be placed in the description text and location name should be updated to reflect current official names.

+ `, + "Job number": ` +

Historical Planning and Development project numbering system.

+ `, + "Number of sheets": ` +

Number of sheets in set of drawings.

+

Please note some sets of historical drawings were improperly scanned as individual sheets. These individual sheets should be combined into their respective sets, when discovered, and the number of sheets corrected to the set total.

+ `, + "Date": ` +

Date on the drawing sheets.

+ `, + "Cross ref area": ` +

Do not complete for new document additions.

+

This field is a holdover from the paper indexing of historical projects used to indicate multiple locations. Note that the area and section values need to be null for any revisions to the indexing to be saved.

+ `, + "Cross ref section": ` +

Do not complete for new document additions.

+

This field is a holdover from the paper indexing of historical projects used to indicate multiple locations. Note that the area and section values need to be null for any revisions to the indexing to be saved.

+ `, + "Cross ref map number": ` +

Do not complete for new document additions.

+

This field is a holdover from the paper indexing of historical projects used to indicate multiple locations. Note that the area and section values need to be null for any revisions to the indexing to be saved.

+ `, + "Hash": undefined, + "CAD file": ` +

Final CAD drawing of record can be uploaded here for archival purposes, if available.

+ `, + "Source file": ` +

Final PDF drawing of record to be uploaded for archival purposes.

+ `, +} + +// Create and insert all tooltip modals +for (const label of allFieldLabels) { + const labelText = label.innerText.trim().replace("*", "") + const fieldDivId = label.parentNode.id + + if (fieldDescriptions[labelText] == undefined) { + continue + } + + const tooltipStr = ` + + ` + const modalStr = ` + + ` + label.insertAdjacentHTML("afterend", tooltipStr + modalStr) +} + +// Prevent a11y warnings from hidden modal +document.querySelectorAll(".modal").forEach((modal) => { + // Attach onto bootstrap's jquery custom events + $('.modal').on('hide.bs.modal', function () { + document.activeElement.blur() + }) +}) diff --git a/docsearch/templates/docsearch/flatdrawings/form.html b/docsearch/templates/docsearch/flatdrawings/form.html index c5d8fbf..6288f51 100644 --- a/docsearch/templates/docsearch/flatdrawings/form.html +++ b/docsearch/templates/docsearch/flatdrawings/form.html @@ -1 +1,6 @@ {% extends "docsearch/base_form.html" %} +{% load static %} + +{% block extra_js %} + +{% endblock %}