Fixed a slight issue where we could click the change folders button rather than the dropdown arrow #1189

This commit is contained in:
tidusjar 2017-02-25 22:52:28 +00:00
commit 5095d30a3c
2 changed files with 10 additions and 5 deletions

View file

@ -567,16 +567,21 @@ $(document).on("click", ".change-root-folder", function (e) {
e.preventDefault();
var $this = $(this);
var $button = $this.parents('.btn-split').children('.change').first();
var rootFolderId = e.target.id
var rootFolderId = e.target.id;
var $form = $this.parents('form').first();
var requestId = $button.attr('id');
if ($button.text() === " Loading...") {
return;
}
loadingButton($button.attr('id'), "success");
loadingButton(requestId, "success");
changeRootFolder($form, rootFolderId, function () {
if ($('#' + requestId + "rootPathMain").length) {
$('#' + requestId + "currentRootPath").text($this.text);
}
});
});