diff --git a/app/assets/javascripts/app/controllers/_application_controller.js.coffee b/app/assets/javascripts/app/controllers/_application_controller.js.coffee index 99c94b222..a27163a49 100644 --- a/app/assets/javascripts/app/controllers/_application_controller.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller.js.coffee @@ -295,13 +295,13 @@ class App.Controller extends Spine.Controller title: -> ticket_id = $(@).data('id') ticket = App.Ticket.retrieve( ticket_id ) - ticket.title + App.i18n.escape( ticket.title ) content: -> ticket_id = $(@).data('id') ticket = App.Ticket.retrieve( ticket_id ) ticket.humanTime = ui.humanTime(ticket.created_at) # insert data - App.view('ticket_info_small')( + App.view('popover/ticket')( ticket: ticket, ) ) @@ -321,7 +321,7 @@ class App.Controller extends Spine.Controller title: -> user_id = $(@).data('id') user = App.User.find( user_id ) - user.displayName() + App.i18n.escape( user.displayName() ) content: -> user_id = $(@).data('id') user = App.User.find( user_id ) @@ -346,7 +346,7 @@ class App.Controller extends Spine.Controller data.push item # insert data - App.view('user_info_small')( + App.view('popover/user')( user: user, data: data, ) @@ -367,12 +367,12 @@ class App.Controller extends Spine.Controller title: -> organization_id = $(@).data('id') organization = App.Organization.find( organization_id ) - organization.name + App.i18n.escape( organization.name ) content: -> organization_id = $(@).data('id') organization = App.Organization.find( organization_id ) # insert data - App.view('organization_info_small')( + App.view('popover/organization')( organization: organization, ) ) @@ -417,7 +417,7 @@ class App.Controller extends Spine.Controller ticket.humanTime = controller.humanTime(ticket.created_at) # insert data - App.view('user_ticket_info_small')( + App.view('popover/user_ticket_list')( tickets: data, ) ) diff --git a/app/assets/javascripts/app/controllers/chat_widget.js.coffee b/app/assets/javascripts/app/controllers/chat_widget.js.coffee index 33dd3893d..01d89c03d 100644 --- a/app/assets/javascripts/app/controllers/chat_widget.js.coffee +++ b/app/assets/javascripts/app/controllers/chat_widget.js.coffee @@ -173,7 +173,7 @@ class App.ChatWidget extends App.Controller shown = false if @isShown shown = true - @html App.view('chat_widget')( + @html App.view('widget/chat')( messages: @messageLog isShown: shown ) diff --git a/app/assets/javascripts/app/controllers/organization_widget.js.coffee b/app/assets/javascripts/app/controllers/organization_widget.js.coffee index 7b4240e4f..341f27c73 100644 --- a/app/assets/javascripts/app/controllers/organization_widget.js.coffee +++ b/app/assets/javascripts/app/controllers/organization_widget.js.coffee @@ -44,7 +44,7 @@ class App.OrganizationWidget extends App.Controller organizationData.push item # insert userData - @html App.view('organization_widget')( + @html App.view('widget/organization')( organization: organization organizationData: organizationData ) diff --git a/app/assets/javascripts/app/controllers/tag_widget.js.coffee b/app/assets/javascripts/app/controllers/tag_widget.js.coffee index b609252dc..c799ac05d 100644 --- a/app/assets/javascripts/app/controllers/tag_widget.js.coffee +++ b/app/assets/javascripts/app/controllers/tag_widget.js.coffee @@ -26,7 +26,7 @@ class App.TagWidget extends App.Controller render: (tags) => # insert data - @html App.view('tag_widget')( + @html App.view('widget/tag')( tags: tags || [], tag_id: @attribute_id ) diff --git a/app/assets/javascripts/app/controllers/user_widget.js.coffee b/app/assets/javascripts/app/controllers/user_widget.js.coffee index 297cb3765..b892ed7bc 100644 --- a/app/assets/javascripts/app/controllers/user_widget.js.coffee +++ b/app/assets/javascripts/app/controllers/user_widget.js.coffee @@ -45,7 +45,7 @@ class App.UserWidget extends App.ControllerDrox # insert userData @html @template( - file: 'user_widget' + file: 'widget/user' header: 'Customer' edit: true params: diff --git a/app/assets/javascripts/app/views/organization_info_small.jst.eco b/app/assets/javascripts/app/views/popover/organization.jst.eco similarity index 100% rename from app/assets/javascripts/app/views/organization_info_small.jst.eco rename to app/assets/javascripts/app/views/popover/organization.jst.eco diff --git a/app/assets/javascripts/app/views/ticket_info_small.jst.eco b/app/assets/javascripts/app/views/popover/ticket.jst.eco similarity index 100% rename from app/assets/javascripts/app/views/ticket_info_small.jst.eco rename to app/assets/javascripts/app/views/popover/ticket.jst.eco diff --git a/app/assets/javascripts/app/views/user_info_small.jst.eco b/app/assets/javascripts/app/views/popover/user.jst.eco similarity index 92% rename from app/assets/javascripts/app/views/user_info_small.jst.eco rename to app/assets/javascripts/app/views/popover/user.jst.eco index e56a78d72..006a5553a 100644 --- a/app/assets/javascripts/app/views/user_info_small.jst.eco +++ b/app/assets/javascripts/app/views/popover/user.jst.eco @@ -1,31 +1,24 @@ <% for row in @data: %> <% if @user[row.name]: %> -