From 4998faf343cbe89ee25ad1567dc1e8544fdafc9e Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Fri, 8 Nov 2013 13:15:48 +0100 Subject: [PATCH] Added JS event for when the user changes the directory This enables apps to detect directory changes which might be caused by the user using the browser back button. --- apps/files/js/filelist.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 24a7fd2ee4..0a94657c2d 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -170,6 +170,12 @@ var FileList={ return; } FileList.setCurrentDir(targetDir, changeUrl); + $('#fileList').trigger( + jQuery.Event('changeDirectory', { + dir: targetDir, + previousDir: currentDir + } + )); FileList.reload(); }, linkTo: function(dir) {