From b60443ec9b14b81c47fd1520e12d0d6647b127f2 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 18 Apr 2016 13:40:48 -0400 Subject: [PATCH] fix directory picker --- dashboard-ui/scripts/dashboardgeneral.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/dashboard-ui/scripts/dashboardgeneral.js b/dashboard-ui/scripts/dashboardgeneral.js index 5681cfa87d..847dbe9050 100644 --- a/dashboard-ui/scripts/dashboardgeneral.js +++ b/dashboard-ui/scripts/dashboardgeneral.js @@ -146,6 +146,25 @@ }); }); + $('#btnSelectDashboardSourcePath', view).on("click.selectDirectory", function () { + + require(['directorybrowser'], function (directoryBrowser) { + + var picker = new directoryBrowser(); + + picker.show({ + + callback: function (path) { + + if (path) { + view.querySelector('#txtDashboardSourcePath').value = path; + } + picker.close(); + } + }); + }); + }); + $('.dashboardGeneralForm', view).off('submit', onSubmit).on('submit', onSubmit); view.addEventListener('viewshow', function () {