Folder controller and javascript to move resources between