Skip to content
This repository has been archived by the owner on Jan 7, 2020. It is now read-only.

Custom Sort Docs #239

Merged
merged 1 commit into from
Sep 1, 2017
Merged

Custom Sort Docs #239

merged 1 commit into from
Sep 1, 2017

Conversation

bryan-gilbert
Copy link
Contributor

This modal dialog allows users to set the default sort order for a folder. They can say the default is sort by Name or Date (asc or desc) and they can apply this setting to all subfolders. Or they can elect to custom sort the folder's content using drag and drop.

The drag and drop collections are disabled if the sorting option is anything but custom.
Selecting items is only enabled if custom is selected.
If any number of, say, folder objects are selected and the user clicks on a document all the folders are unselected.
If custom is selected and some items are selected these items are de-selected when the user changes the sorting option away from custom.

If the user changes the sorting option away from custom they are first given a confirmation dialog. If they select cancel they keep the custom sort order. If they select to proceed with the change the folder and document lists are immediately sorted based on the selected sort option (this is nearly instant as the sorting is done entirely on the client side).

If the sort option was any of the Name or Date choices the "Apply to children" checkbox label reflects the sorting choice. For example "Apply name ascending to all subfolders". This clearly informs the user as to what action this checkbox will invoke when they Save.

If the user selects custom and the "Apply to subfolders" option was checked then the code un-checks the "Apply to subfolders" option.
While the Custom option is selected the "Apply to subfolders" option is disabled and it's label is disabled.

When Custom is active and the user starts a drag operation on one of the lists, say folders, then the other list's drag and drop is disabled. (Otherwise the user could drop a folder into documents or visa versa.)

Initialization of the UI is based on the saved sorting options for the folder. Includes set the sorting option controls based on the incoming setting and includes disabling the Apply to Subfolders if custom is selected or update the label of the Apply control based on the Name/Date selection. Of course, sort the lists by the sorting option.

On Save, if the Apply to Subfolders option is checked then confirm the action with the user. If they cancel return to the UI. Otherwise:

  • save the sorting options for the folder
  • apply to all children if checked.
  • if custom sorting then update the sort order of all folders and documents

Note the "apply to all subfolders" is not saved to the database; just the effect is that all subfolders have default sort option set.

Also note that as new documents and folders are added they always will be at the end of custom sort lists.

When custom sorting is select the UI shows move icons to indicate the drag and drop is active.

If custom sorting ask user before cancelling to confirm. Prevent background click or ESC to trigger cancel.

Add spinner when busy

EPIC code use document upload date rather than documentDate used by MEM
hide debug

This modal dialog allows users to set the default sort order for a folder. They can say the default is sort by Name or Date (asc or desc) and they can apply this setting to all subfolders.  Or they can elect to custom sort the folder's content using drag and drop.

The drag and drop collections are disabled if the sorting option is anything but custom.
Selecting items is only enabled if custom is selected.
If any number of, say, folder objects are selected and the user clicks on a document all the folders are unselected.
If custom is selected and some items are selected these items are de-selected when the user changes the sorting option away from custom.

If the user changes the sorting option away from custom they are first given a confirmation dialog. If they select cancel they keep the custom sort order. If they select to proceed with the change the folder and document lists are immediately sorted based on the selected sort option (this is nearly instant as the sorting is done entirely on the client side).

If the sort option was any of the Name or Date choices the "Apply to children" checkbox label reflects the sorting choice. For example "Apply name ascending to all subfolders". This clearly informs the user as to what action this checkbox will invoke when they Save.

If the user selects custom and the "Apply to subfolders" option was checked then the code un-checks the "Apply to subfolders" option.
While the Custom option is selected the "Apply to subfolders" option is disabled and it's label is disabled.

When Custom is active and the user starts a drag operation on one of the lists, say folders, then the other list's drag and drop is disabled. (Otherwise the user could drop a folder into documents or visa versa.)

Initialization of the UI is based on the saved sorting options for the folder. Includes set the sorting option controls based on the incoming setting and includes disabling the Apply to Subfolders if custom is selected or update the label of the Apply control based on the Name/Date selection.  Of course, sort the lists by the sorting option.

On Save, if the Apply to Subfolders option is checked then confirm the action with the user. If they cancel return to the UI. Otherwise:
* save the sorting options for the folder
* apply to all children if checked.
* if custom sorting then update the sort order of all folders and documents

Note the "apply to all subfolders" is not saved to the database; just the effect is that all subfolders have default sort option set.

Also note that as new documents and folders are added they always will be at the end of custom sort lists.

When custom sorting is select the UI shows move icons to indicate the drag and drop is active.

If custom sorting ask user before cancelling to confirm. Prevent background click or ESC to trigger cancel.

Add spinner when busy

EPIC code use document upload date rather than documentDate used by MEM
hide debug
@marklise marklise merged commit ab6dae9 into bcgov:master Sep 1, 2017
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.

2 participants