Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #507: Adding resources from multiple pages in the library now works #517

Merged
merged 1 commit into from
Aug 1, 2016

Conversation

seav
Copy link
Contributor

@seav seav commented Jul 30, 2016

Proposed changes in this pull request

  • Fix Adding resources not on page 1 of library broken #507:
    • Add a script that on add-resources-from-library form submission, checks which resources are selected in the library regardless of pagination state and then dynamically insert hidden input fields corresponding to the selected resources. Checked checkbox input fields are also unchecked to prevent conflicts with the hidden fields. This script is located at resources/script_add_lib.html
    • Include this new script on all pages that use the resources/modal_add_lib.html template
    • Rename the resources/scripts.html template into resources/script_upload.html because there are now two resources-related scripts
  • Other improvements:
    • Rename form_script template block into location_extra_script to reflect that this block is for additional scripts on a page with a Leaflet map. (I think this block was named form_script before in order to add form.media links but this block is no longer exclusive for that)
    • Remove the form_script block from party/relationship_detail.html since this page does not need any additional scripts or media
    • The location resource modal templates should have extended spatial/location_detail.html instead of spatial/location_wrapper.html

When should this PR be merged

  • No dependencies needed for merging

Risks

  • None foreseen

Follow-up actions

  • None

@seav
Copy link
Contributor Author

seav commented Jul 30, 2016

BTW, if in the future we switch to AJAX-powered DataTables, this new script needs to be adapted depending on how we solve the problem where connected resources in the library has not yet been loaded to the HTML table.

@ian-ross ian-ross merged commit d6319cb into master Aug 1, 2016
@ian-ross ian-ross deleted the bugfix/#507 branch August 1, 2016 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants