From 3a5a0150974506334932fd8039a5a4d76b092f8f Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Mon, 24 Nov 2014 07:12:45 -0800 Subject: [PATCH] [Common UI] Generalize click-away behavior Add a general-purpose controller for UI elements which have 'click-away' behavior; that is, they should be deactivated on document clicks. This generalizes existing behavior added for the Create menu, such that it may be used on other, similar menus and UI elements. Part of ongoing transition of common user interface components, WTD-574. --- .../browse/res/templates/create-button.html | 6 +- platform/commonUI/general/bundle.json | 5 ++ .../general/src/ClickAwayController.js | 80 +++++++++++++++++++ 3 files changed, 88 insertions(+), 3 deletions(-) create mode 100644 platform/commonUI/general/src/ClickAwayController.js diff --git a/platform/commonUI/browse/res/templates/create-button.html b/platform/commonUI/browse/res/templates/create-button.html index f8c6d50303..d9e48dddc3 100644 --- a/platform/commonUI/browse/res/templates/create-button.html +++ b/platform/commonUI/browse/res/templates/create-button.html @@ -1,8 +1,8 @@ -