Skip to content
This repository has been archived by the owner on Oct 11, 2018. It is now read-only.

Add support for ordering of tagged organisations and people #66

Merged
merged 7 commits into from May 14, 2015

Conversation

tekin
Copy link
Contributor

@tekin tekin commented May 13, 2015

This makes it possible to tag organisations and people to policies with a specific order.

This switches from select2 to selectize for the JS enhancement to the select fields as this has built-in support for both ordered selects and re-ordering.

Trello: https://trello.com/c/e2D56dvT/267-set-order-of-organisations-on-a-given-policy

organisation-ordering

tekin added 5 commits May 13, 2015 10:34
This makes them easier to use in the specs as well as the features
Both Policy#organisations and Policy#people should return the things ordered
according to the order in which they were tagged.
We need the order of selected organisations to be maintained and correctly
persisted.
govuk_admin_template defines a highlight class that we need to override for
highlighted selectize results
By explicitly ordering select options such that those that have been selected
are rendered first and in order of selection, we ensure that they are listed in
the correct order between requests.
@elliotcm
Copy link
Contributor

Could you screenshots?

When I set the tagged people to "Another Person" and "A Person"
Then the policy people should appear in the order "Another Person" and "A Person"


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whitespace.

tekin added 2 commits May 13, 2015 16:45
This includes extra options that allow further configuration of the select field
behaviour.
@elliotcm
Copy link
Contributor

👍 code
👍 gif

tekin added a commit that referenced this pull request May 14, 2015
Add support for ordering of tagged organisations and people
@tekin tekin merged commit 6d11560 into master May 14, 2015
@tekin tekin deleted the fix-tagging-ordering branch May 14, 2015 09:13
bishboria added a commit to alphagov/publisher that referenced this pull request Jul 15, 2015
The list of tags is not orderable, but is shown during editing in the order that the tags were added. However, when the draft is saved and then re-displayed, the tags appear in alphabetical order. This has caused some confusion in the past amongst editors.

Similar solution to: alphagov/policy-publisher#66
bishboria added a commit to alphagov/publisher that referenced this pull request Jul 15, 2015
The list of tags is not orderable, but is shown during editing in the order that the tags were added. However, when the draft is saved and then re-displayed, the tags appear in alphabetical order. This has caused some confusion in the past amongst editors.

Similar solution to: alphagov/policy-publisher#66
bishboria added a commit to alphagov/publisher that referenced this pull request Jul 16, 2015
The list of tags is not orderable, but is shown during editing in the order that the tags were added. However, when the draft is saved and then re-displayed, the tags appear in alphabetical order. This has caused some confusion in the past amongst editors.

Similar solution to: alphagov/policy-publisher#66
bishboria added a commit to alphagov/publisher that referenced this pull request Jul 16, 2015
The list of tags is not orderable, but is shown during editing in the order that the tags were added. However, when the draft is saved and then re-displayed, the tags appear in alphabetical order. This has caused some confusion in the past amongst editors.

Similar solution to: alphagov/policy-publisher#66
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants