From 6963045e9ff30a699aeb9d5aa2471b274a2af57d Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Wed, 18 Sep 2013 21:37:19 +0200 Subject: [PATCH] Renamed widget namespace. --- .../app/controllers/_application_controller.js.coffee | 2 +- .../app/controllers/agent_ticket_create.js.coffee | 4 ++-- .../javascripts/app/controllers/ticket_zoom.js.coffee | 8 ++++---- .../{chat_widget.js.coffee => widget/chat.js.coffee} | 4 ++-- .../{link_info_widget.js.coffee => widget/link.js.coffee} | 2 +- .../maintenance.js.coffee} | 4 ++-- .../organization.js.coffee} | 2 +- .../{tag_widget.js.coffee => widget/tag.js.coffee} | 2 +- .../template.js.coffee} | 2 +- .../text_module.js.coffee} | 4 ++-- .../{user_widget.js.coffee => widget/user.js.coffee} | 4 ++-- 11 files changed, 19 insertions(+), 19 deletions(-) rename app/assets/javascripts/app/controllers/{chat_widget.js.coffee => widget/chat.js.coffee} (97%) rename app/assets/javascripts/app/controllers/{link_info_widget.js.coffee => widget/link.js.coffee} (98%) rename app/assets/javascripts/app/controllers/{maintenance_widget.js.coffee => widget/maintenance.js.coffee} (84%) rename app/assets/javascripts/app/controllers/{organization_widget.js.coffee => widget/organization.js.coffee} (97%) rename app/assets/javascripts/app/controllers/{tag_widget.js.coffee => widget/tag.js.coffee} (97%) rename app/assets/javascripts/app/controllers/{template_widget.js.coffee => widget/template.js.coffee} (97%) rename app/assets/javascripts/app/controllers/{text_module_widget.js.coffee => widget/text_module.js.coffee} (98%) rename app/assets/javascripts/app/controllers/{user_widget.js.coffee => widget/user.js.coffee} (96%) diff --git a/app/assets/javascripts/app/controllers/_application_controller.js.coffee b/app/assets/javascripts/app/controllers/_application_controller.js.coffee index a27163a49..e1f575c56 100644 --- a/app/assets/javascripts/app/controllers/_application_controller.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller.js.coffee @@ -244,7 +244,7 @@ class App.Controller extends Spine.Controller el.unbind() # start customer info controller - new App.UserWidget( + new App.WidgetUser( el: el user_id: data.user_id callback: data.callback 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 c32ea136c..63d89fbd1 100644 --- a/app/assets/javascripts/app/controllers/agent_ticket_create.js.coffee +++ b/app/assets/javascripts/app/controllers/agent_ticket_create.js.coffee @@ -191,7 +191,7 @@ class App.TicketCreate extends App.Controller @el.find('textarea').trigger('change') # show template UI - new App.TemplateUI( + new App.WidgetTemplate( el: @el.find('.ticket_template') template_id: template['id'] ) @@ -199,7 +199,7 @@ class App.TicketCreate extends App.Controller @formDefault = @formParam( @el.find('.ticket-create') ) # show text module UI - @textModule = new App.TextModuleUI( + @textModule = new App.WidgetTextModule( el: @el.find('.ticket-create').find('textarea') ) diff --git a/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee b/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee index 1a3de87f8..98af16b75 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee @@ -156,7 +156,7 @@ class App.TicketZoom extends App.Controller # show text module UI if !@isRole('Customer') - new App.TextModuleUI( + new App.WidgetTextModule( el: @el.find('textarea') data: ticket: @ticket @@ -265,7 +265,7 @@ class TicketInfo extends App.ControllerDrox # start tag controller if !@isRole('Customer') - new App.TagWidget( + new App.WidgetTag( el: @el.find('.tag_info') object_type: 'Ticket' object: @ticket @@ -288,7 +288,7 @@ class TicketWidgets extends App.Controller # start customer info controller if !@isRole('Customer') - new App.UserWidget( + new App.WidgetUser( el: @el.find('.customer_info') user_id: @ticket.customer_id ticket: @ticket @@ -296,7 +296,7 @@ class TicketWidgets extends App.Controller # start link info controller if !@isRole('Customer') - new App.LinkInfo( + new App.WidgetLink( el: @el.find('.link_info') object_type: 'Ticket' object: @ticket diff --git a/app/assets/javascripts/app/controllers/chat_widget.js.coffee b/app/assets/javascripts/app/controllers/widget/chat.js.coffee similarity index 97% rename from app/assets/javascripts/app/controllers/chat_widget.js.coffee rename to app/assets/javascripts/app/controllers/widget/chat.js.coffee index 01d89c03d..802337153 100644 --- a/app/assets/javascripts/app/controllers/chat_widget.js.coffee +++ b/app/assets/javascripts/app/controllers/widget/chat.js.coffee @@ -1,4 +1,4 @@ -class App.ChatWidget extends App.Controller +class Widget extends App.Controller events: 'submit #chat_form': 'submitMessage' 'focusin [name=chat_message]': 'focusIn' @@ -212,4 +212,4 @@ class App.ChatWidget extends App.Controller ) @render() -App.Config.set( 'chat', App.ChatWidget, 'Widgets' ) +App.Config.set( 'chat', Widget, 'Widgets' ) diff --git a/app/assets/javascripts/app/controllers/link_info_widget.js.coffee b/app/assets/javascripts/app/controllers/widget/link.js.coffee similarity index 98% rename from app/assets/javascripts/app/controllers/link_info_widget.js.coffee rename to app/assets/javascripts/app/controllers/widget/link.js.coffee index b485e4d21..4231c9da1 100644 --- a/app/assets/javascripts/app/controllers/link_info_widget.js.coffee +++ b/app/assets/javascripts/app/controllers/widget/link.js.coffee @@ -1,4 +1,4 @@ -class App.LinkInfo extends App.ControllerDrox +class App.WidgetLink extends App.ControllerDrox events: 'click [data-type=add]': 'add', 'click [data-type=edit]': 'toggle', diff --git a/app/assets/javascripts/app/controllers/maintenance_widget.js.coffee b/app/assets/javascripts/app/controllers/widget/maintenance.js.coffee similarity index 84% rename from app/assets/javascripts/app/controllers/maintenance_widget.js.coffee rename to app/assets/javascripts/app/controllers/widget/maintenance.js.coffee index e28b5e8a2..125a5f127 100644 --- a/app/assets/javascripts/app/controllers/maintenance_widget.js.coffee +++ b/app/assets/javascripts/app/controllers/widget/maintenance.js.coffee @@ -1,4 +1,4 @@ -class App.MaintenanceWidget extends App.Controller +class Widget extends App.Controller constructor: -> super @@ -31,4 +31,4 @@ class Message extends App.ControllerModal forceReload: message.reload ) -App.Config.set( 'maintenance', App.MaintenanceWidget, 'Widgets' ) +App.Config.set( 'maintenance', Widget, 'Widgets' ) diff --git a/app/assets/javascripts/app/controllers/organization_widget.js.coffee b/app/assets/javascripts/app/controllers/widget/organization.js.coffee similarity index 97% rename from app/assets/javascripts/app/controllers/organization_widget.js.coffee rename to app/assets/javascripts/app/controllers/widget/organization.js.coffee index 341f27c73..1809536c9 100644 --- a/app/assets/javascripts/app/controllers/organization_widget.js.coffee +++ b/app/assets/javascripts/app/controllers/widget/organization.js.coffee @@ -1,4 +1,4 @@ -class App.OrganizationWidget extends App.Controller +class App.WidgetOrganization extends App.Controller events: 'focusout [data-type=update-org]': 'update', 'click [data-type=edit-org]': 'edit' diff --git a/app/assets/javascripts/app/controllers/tag_widget.js.coffee b/app/assets/javascripts/app/controllers/widget/tag.js.coffee similarity index 97% rename from app/assets/javascripts/app/controllers/tag_widget.js.coffee rename to app/assets/javascripts/app/controllers/widget/tag.js.coffee index c799ac05d..e67b48a0b 100644 --- a/app/assets/javascripts/app/controllers/tag_widget.js.coffee +++ b/app/assets/javascripts/app/controllers/widget/tag.js.coffee @@ -1,4 +1,4 @@ -class App.TagWidget extends App.Controller +class App.WidgetTag extends App.Controller constructor: -> super @load() diff --git a/app/assets/javascripts/app/controllers/template_widget.js.coffee b/app/assets/javascripts/app/controllers/widget/template.js.coffee similarity index 97% rename from app/assets/javascripts/app/controllers/template_widget.js.coffee rename to app/assets/javascripts/app/controllers/widget/template.js.coffee index 68f0f93a6..c2da4003e 100644 --- a/app/assets/javascripts/app/controllers/template_widget.js.coffee +++ b/app/assets/javascripts/app/controllers/widget/template.js.coffee @@ -1,4 +1,4 @@ -class App.TemplateUI extends App.ControllerDrox +class App.WidgetTemplate extends App.ControllerDrox events: 'click [data-type=template_save]': 'create', 'click [data-type=template_select]': 'select', diff --git a/app/assets/javascripts/app/controllers/text_module_widget.js.coffee b/app/assets/javascripts/app/controllers/widget/text_module.js.coffee similarity index 98% rename from app/assets/javascripts/app/controllers/text_module_widget.js.coffee rename to app/assets/javascripts/app/controllers/widget/text_module.js.coffee index 54971e58e..eca0d8b79 100644 --- a/app/assets/javascripts/app/controllers/text_module_widget.js.coffee +++ b/app/assets/javascripts/app/controllers/widget/text_module.js.coffee @@ -1,4 +1,4 @@ -class App.TextModuleUI extends App.Controller +class App.WidgetTextModule extends App.Controller constructor: -> super @@ -59,7 +59,7 @@ class App.TextModuleUI extends App.Controller return values -class App.TextModuleUIOld extends App.Controller +class App.WidgetTextModuleOld extends App.Controller events: 'click [data-type=save]': 'create', 'click [data-type=text_module_delete]': 'delete', diff --git a/app/assets/javascripts/app/controllers/user_widget.js.coffee b/app/assets/javascripts/app/controllers/widget/user.js.coffee similarity index 96% rename from app/assets/javascripts/app/controllers/user_widget.js.coffee rename to app/assets/javascripts/app/controllers/widget/user.js.coffee index b892ed7bc..9016b5023 100644 --- a/app/assets/javascripts/app/controllers/user_widget.js.coffee +++ b/app/assets/javascripts/app/controllers/widget/user.js.coffee @@ -1,4 +1,4 @@ -class App.UserWidget extends App.ControllerDrox +class App.WidgetUser extends App.ControllerDrox events: 'focusout [data-type=update]': 'update', 'click [data-type=edit]': 'edit' @@ -62,7 +62,7 @@ class App.UserWidget extends App.ControllerDrox if user.organization_id @el.append('
') - new App.OrganizationWidget( + new App.WidgetOrganization( organization_id: user.organization_id el: @el.find('.org-info') )