diff --git a/app/assets/images/sprite.svg b/app/assets/images/sprite.svg
index b2d570a41..5bef08338 100644
--- a/app/assets/images/sprite.svg
+++ b/app/assets/images/sprite.svg
@@ -103,15 +103,15 @@
-
-
-
-
+
+
+
+
-
-
+
+
@@ -166,5 +166,7 @@
+
+
\ No newline at end of file
diff --git a/app/assets/javascripts/app/controllers/agent_ticket_create.js.coffee b/app/assets/javascripts/app/controllers/agent_ticket_create.js.coffee
index 2dfc3b78d..75bfd4392 100644
--- a/app/assets/javascripts/app/controllers/agent_ticket_create.js.coffee
+++ b/app/assets/javascripts/app/controllers/agent_ticket_create.js.coffee
@@ -1,6 +1,6 @@
class App.TicketCreate extends App.Controller
elements:
- '.tabsSidebar' : 'sidebar'
+ '.tabsSidebar' : 'sidebar'
events:
'click .type-tabs .tab': 'changeFormType'
@@ -8,6 +8,9 @@ class App.TicketCreate extends App.Controller
'submit form': 'submit'
'click .submit': 'submit'
'click .cancel': 'cancel'
+ 'hide.bs.dropdown .js-recipientDropdown': 'hideOrganisationMembers'
+ 'click .js-organisation': 'showOrganisationMembers'
+ 'click .js-back': 'hideOrganisationMembers'
constructor: (params) ->
super
@@ -37,6 +40,58 @@ class App.TicketCreate extends App.Controller
@log 'notice', 'error', defaults
@render(defaults)
+ showOrganisationMembers: (e) =>
+ e.stopPropagation()
+
+ list = @$('.recipientList')
+ organisationList = @$('.recipientList-organisationMembers')
+
+ # move organisation-list to the right and slide it in
+
+ $.Velocity.hook(organisationList, 'translateX', '100%')
+ organisationList.removeClass('hide')
+
+ organisationList.velocity
+ properties:
+ translateX: 0
+ options:
+ speed: 300
+
+ # fade out list
+
+ list.velocity
+ properties:
+ translateX: '-100%'
+ options:
+ speed: 300
+ complete: -> list.height(organisationList.height())
+
+ hideOrganisationMembers: (e) =>
+ e && e.stopPropagation()
+ list = @$('.recipientList')
+ organisationList = @$('.recipientList-organisationMembers')
+
+ # fade list back in
+
+ list.velocity
+ properties:
+ translateX: 0
+ options:
+ speed: 300
+
+ # reset list height
+
+ list.height('')
+
+ # slide out organisation-list and hide it
+
+ organisationList.velocity
+ properties:
+ translateX: '100%'
+ options:
+ speed: 300
+ complete: -> organisationList.addClass('hide')
+
changeFormType: (e) =>
type = $(e.target).data('type')
if !type
diff --git a/app/assets/javascripts/app/views/agent_ticket_create.jst.eco b/app/assets/javascripts/app/views/agent_ticket_create.jst.eco
index c7649b624..d0ad3f11e 100644
--- a/app/assets/javascripts/app/views/agent_ticket_create.jst.eco
+++ b/app/assets/javascripts/app/views/agent_ticket_create.jst.eco
@@ -27,129 +27,154 @@