From 016924504517d4f607fa6458606b87ca1440ae9f Mon Sep 17 00:00:00 2001 From: llj Date: Thu, 4 May 2017 16:32:47 +0800 Subject: [PATCH] [dir view] new dir/file: close the dropdown menu after clicking a menu item --- static/scripts/app/views/dir.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static/scripts/app/views/dir.js b/static/scripts/app/views/dir.js index 27afb372f0..d334bef689 100644 --- a/static/scripts/app/views/dir.js +++ b/static/scripts/app/views/dir.js @@ -552,6 +552,7 @@ define([ // Directory Operations events: { + 'click #add-new li a': 'closeNewDropdown', 'click #add-new-dir': 'newDir', 'click #add-new-file': 'newCommonFile', 'click #add-new-md-file': 'newMdFile', @@ -587,6 +588,10 @@ define([ return false; }, + closeNewDropdown: function() { + this.new_dropdown.hide(); + }, + newDir: function() { var form = $(this.newDirTemplate()), form_id = form.attr('id'),