Skip to content

Commit

Permalink
SAK-42189: Improve the resource picker (sakaiproject#7148)
Browse files Browse the repository at this point in the history
SAK-42189: Resource Picker: Improve the resource picker
  • Loading branch information
AntonioJordan authored and Miguel Pellicer committed Jul 25, 2019
1 parent a661d80 commit 2883d4d
Show file tree
Hide file tree
Showing 3 changed files with 385 additions and 380 deletions.
2 changes: 2 additions & 0 deletions content/content-tool/tool/src/bundle/helper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,5 @@ gen.copycomf = Confirm copyright
viewing = Viewing
of = of
items = items

att.resource=Select from resources
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ public class FilePickerAction extends PagedResourceHelperAction
protected static final String STATE_SHOW_ALL_SITES = PREFIX + "show_all_sites";
protected static final String STATE_SHOW_OTHER_SITES = PREFIX + "show_other_sites";
public static final String SAK_PROP_SHOW_ALL_SITES = PREFIX + "show_all_collections";
protected static final String STATE_NAVIGATING_RESOURCES = "navigating_resources";

/** The sort by */
private static final String STATE_SORT_BY = PREFIX + "sort_by";
Expand Down Expand Up @@ -1192,6 +1193,7 @@ public void doAttachitem(RunData data)
}

toolSession.setAttribute(STATE_FILEPICKER_MODE, MODE_ATTACHMENT_SELECT_INIT);
state.removeAttribute(STATE_NAVIGATING_RESOURCES);

} // doAttachitem

Expand Down Expand Up @@ -1366,6 +1368,7 @@ else if(fileContentStream != null)
}

toolSession.setAttribute(STATE_FILEPICKER_MODE, MODE_ATTACHMENT_SELECT_INIT);
state.removeAttribute(STATE_NAVIGATING_RESOURCES);

} // doAttachupload

Expand Down Expand Up @@ -1485,6 +1488,7 @@ public void doAttachurl(RunData data)
}

toolSession.setAttribute(STATE_FILEPICKER_MODE, MODE_ATTACHMENT_SELECT_INIT);
state.removeAttribute(STATE_NAVIGATING_RESOURCES);

} // doAttachurl

Expand Down Expand Up @@ -3205,6 +3209,7 @@ public void doNavigate ( RunData data )
if (state.getAttribute(STATE_MESSAGE) == null)
{
state.setAttribute(STATE_COLLECTION_ID, collectionId);
state.setAttribute(STATE_NAVIGATING_RESOURCES, true);
Set<String> currentMap = getExpandedCollections(toolSession);
SortedSet<String> newCurrentMap = new TreeSet<String>();
for(String id: currentMap)
Expand Down
Loading

0 comments on commit 2883d4d

Please sign in to comment.