From 200952f691961adbe7137dd6fb0b74399496d490 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sat, 5 Apr 2014 09:34:52 +0200 Subject: [PATCH] Added expanding to note boxes. --- .../app/controllers/widget/organization.js.coffee | 7 +++++++ .../javascripts/app/controllers/widget/user.js.coffee | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/app/controllers/widget/organization.js.coffee b/app/assets/javascripts/app/controllers/widget/organization.js.coffee index 1809536c9..529d88c8d 100644 --- a/app/assets/javascripts/app/controllers/widget/organization.js.coffee +++ b/app/assets/javascripts/app/controllers/widget/organization.js.coffee @@ -49,6 +49,13 @@ class App.WidgetOrganization extends App.Controller organizationData: organizationData ) + a = => + @el.find('textarea').expanding() + @el.find('textarea').on('focus', => + @el.find('textarea').expanding() + ) + @delay( a, 80 ) + ### @userTicketPopups( selector: '.user-tickets' diff --git a/app/assets/javascripts/app/controllers/widget/user.js.coffee b/app/assets/javascripts/app/controllers/widget/user.js.coffee index 7428a165d..27ce2da85 100644 --- a/app/assets/javascripts/app/controllers/widget/user.js.coffee +++ b/app/assets/javascripts/app/controllers/widget/user.js.coffee @@ -51,13 +51,19 @@ class App.WidgetUser extends App.ControllerDrox userData: userData ) + a = => + @el.find('textarea').expanding() + @el.find('textarea').on('focus', => + @el.find('textarea').expanding() + ) + @delay( a, 80 ) + @userTicketPopups( selector: '.user-tickets' user_id: user.id position: 'right' ) - if user.organization_id @el.append('
') new App.WidgetOrganization(