diff --git a/app/assets/javascripts/app/controllers/_application_controller.coffee b/app/assets/javascripts/app/controllers/_application_controller.coffee index d73b90ef3..230beb8c4 100644 --- a/app/assets/javascripts/app/controllers/_application_controller.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller.coffee @@ -586,7 +586,7 @@ class App.ControllerContent extends App.Controller $('#content').removeClass('hide') @navShow() -class App.ControllerModalNice extends App.Controller +class App.ControllerModal extends App.Controller backdrop: true keyboard: true large: false @@ -714,7 +714,7 @@ class App.ControllerModalNice extends App.Controller e.preventDefault() @onSubmit(e) -class App.SessionMessage extends App.ControllerModalNice +class App.SessionMessage extends App.ControllerModal onCancel: (e) => if @forceReload @reload(e) diff --git a/app/assets/javascripts/app/controllers/_application_controller_generic.coffee b/app/assets/javascripts/app/controllers/_application_controller_generic.coffee index 090d1a0d4..24f37a45b 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_generic.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_generic.coffee @@ -1,4 +1,4 @@ -class App.ControllerGenericNew extends App.ControllerModalNice +class App.ControllerGenericNew extends App.ControllerModal buttonClose: true buttonCancel: true buttonSubmit: true @@ -44,7 +44,7 @@ class App.ControllerGenericNew extends App.ControllerModalNice ui.close() ) -class App.ControllerGenericEdit extends App.ControllerModalNice +class App.ControllerGenericEdit extends App.ControllerModal buttonClose: true buttonCancel: true buttonSubmit: true @@ -208,7 +208,7 @@ class App.ControllerGenericIndex extends App.Controller container: @container ) -class App.ControllerGenericDescription extends App.ControllerModalNice +class App.ControllerGenericDescription extends App.ControllerModal buttonClose: true buttonCancel: false buttonSubmit: 'Close' @@ -262,7 +262,7 @@ class App.ControllerModalLoading extends App.Controller return App.Delay.set(remove, delay * 1000) -class App.ControllerGenericDestroyConfirm extends App.ControllerModalNice +class App.ControllerGenericDestroyConfirm extends App.ControllerModal buttonClose: true buttonCancel: true buttonSubmit: 'yes' @@ -431,7 +431,7 @@ class App.ControllerNavSidbar extends App.ControllerContent el: @$('.main') ) -class App.GenericHistory extends App.ControllerModalNice +class App.GenericHistory extends App.ControllerModal buttonClose: true buttonCancel: false buttonSubmit: false diff --git a/app/assets/javascripts/app/controllers/_channel/email.coffee b/app/assets/javascripts/app/controllers/_channel/email.coffee index d41e41aa2..927328365 100644 --- a/app/assets/javascripts/app/controllers/_channel/email.coffee +++ b/app/assets/javascripts/app/controllers/_channel/email.coffee @@ -73,7 +73,7 @@ With Filters you can e. g. dispatch new Tickets into certain groups or set a cer container: @el.closest('.content') ) -class App.ChannelEmailFilterEdit extends App.ControllerModalNice +class App.ChannelEmailFilterEdit extends App.ControllerModal buttonClose: true buttonCancel: true buttonSubmit: true @@ -169,7 +169,7 @@ Once you have created a signature here, you need also to edit the groups where y container: @el.closest('.content') ) -class App.ChannelEmailSignatureEdit extends App.ControllerModalNice +class App.ChannelEmailSignatureEdit extends App.ControllerModal buttonClose: true buttonCancel: true buttonSubmit: true @@ -245,12 +245,8 @@ class App.ChannelEmailAccountOverview extends App.Controller url: @apiPath + '/channels/email_index' processData: true success: (data, status, xhr) => - @stopLoading() - - # load assets App.Collection.loadAssets(data.assets) - @render(data) ) @@ -391,7 +387,7 @@ class App.ChannelEmailAccountOverview extends App.Controller channelDriver: @channelDriver ) -class App.ChannelEmailEdit extends App.ControllerModalNice +class App.ChannelEmailEdit extends App.ControllerModal buttonClose: true buttonCancel: true buttonSubmit: true diff --git a/app/assets/javascripts/app/controllers/_channel/twitter.coffee b/app/assets/javascripts/app/controllers/_channel/twitter.coffee index cde8748eb..f026d9c71 100644 --- a/app/assets/javascripts/app/controllers/_channel/twitter.coffee +++ b/app/assets/javascripts/app/controllers/_channel/twitter.coffee @@ -17,17 +17,17 @@ class Index extends App.ControllerContent #@load() load: -> - # @startLoading() - # @ajax( - # id: 'twitter_index' - # type: 'GET' - # url: @apiPath + '/twitter' - # processData: true - # success: (data, status, xhr) => - # App.Collection.loadAssets(data.assets) - # @stopLoading() - # @render(data) - # ) + @startLoading() + @ajax( + id: 'twitter_index' + type: 'GET' + url: @apiPath + '/channels/twitter_index' + processData: true + success: (data, status, xhr) => + @stopLoading() + App.Collection.loadAssets(data.assets) + @render(data) + ) render: => # accounts = App.Twitter.search( @@ -48,7 +48,7 @@ class Index extends App.ControllerContent # description: description createApp: -> - modal = new App.ControllerModalNice + modal = new App.ControllerModal head: 'Connect Twitter App' container: @el.parents('.content') content: App.view('twitter/app_create') diff --git a/app/assets/javascripts/app/controllers/_profile/avatar.coffee b/app/assets/javascripts/app/controllers/_profile/avatar.coffee index df958e6de..2bef5772f 100644 --- a/app/assets/javascripts/app/controllers/_profile/avatar.coffee +++ b/app/assets/javascripts/app/controllers/_profile/avatar.coffee @@ -146,7 +146,7 @@ class Index extends App.Controller App.Config.set( 'Avatar', { prio: 1100, name: 'Avatar', parent: '#profile', target: '#profile/avatar', controller: Index }, 'NavBarProfile' ) -class ImageCropper extends App.ControllerModalNice +class ImageCropper extends App.ControllerModal buttonClose: true buttonCancel: true buttonSubmit: 'Save' @@ -221,7 +221,7 @@ class ImageCropper extends App.ControllerModalNice @close() -class Camera extends App.ControllerModalNice +class Camera extends App.ControllerModal buttonClose: true buttonCancel: true buttonSubmit: 'Save' diff --git a/app/assets/javascripts/app/controllers/agent_ticket_merge.coffee b/app/assets/javascripts/app/controllers/agent_ticket_merge.coffee index d93339929..352fe8443 100644 --- a/app/assets/javascripts/app/controllers/agent_ticket_merge.coffee +++ b/app/assets/javascripts/app/controllers/agent_ticket_merge.coffee @@ -1,4 +1,4 @@ -class App.TicketMerge extends App.ControllerModalNice +class App.TicketMerge extends App.ControllerModal buttonClose: true buttonCancel: true buttonSubmit: true diff --git a/app/assets/javascripts/app/controllers/chat.coffee b/app/assets/javascripts/app/controllers/chat.coffee index 37ff951af..f0349f984 100644 --- a/app/assets/javascripts/app/controllers/chat.coffee +++ b/app/assets/javascripts/app/controllers/chat.coffee @@ -513,7 +513,7 @@ class ChatWindow extends App.Controller scrollToBottom: -> @scrollHolder.scrollTop(@scrollHolder.prop('scrollHeight')) -class Setting extends App.ControllerModalNice +class Setting extends App.ControllerModal buttonClose: true buttonCancel: true buttonSubmit: true diff --git a/app/assets/javascripts/app/controllers/layout_ref.coffee b/app/assets/javascripts/app/controllers/layout_ref.coffee index b19701837..4afe730f1 100644 --- a/app/assets/javascripts/app/controllers/layout_ref.coffee +++ b/app/assets/javascripts/app/controllers/layout_ref.coffee @@ -411,7 +411,7 @@ class ContentSidebarRightSidebarOptional extends App.ControllerContent App.Config.set( 'layout_ref/content_sidebar_right_sidebar_optional', ContentSidebarRightSidebarOptional, 'Routes' ) -class ModalForm extends App.ControllerModalNice +class ModalForm extends App.ControllerModal head: '123 some title' content: -> @@ -432,7 +432,7 @@ class ModalForm extends App.ControllerModalNice App.Config.set( 'layout_ref/modal_form', ModalForm, 'Routes' ) -class ModalText extends App.ControllerModalNice +class ModalText extends App.ControllerModal content: -> App.view('layout_ref/content')() @@ -1364,7 +1364,7 @@ class SlaRef extends App.ControllerContent checkbox.closest('tr').toggleClass('is-active', checkbox.prop('checked')) createNew: => - @newItemModal = new App.ControllerModalNice + @newItemModal = new App.ControllerModal head: 'Service Level Agreement (SLA)' headPrefox: 'New' contentInline: App.view('layout_ref/sla_modal')() @@ -1404,7 +1404,7 @@ class SchedulersRef extends App.ControllerContent .text(if isInactive then 'Enable' else 'Disable') createNew: => - new App.ControllerModalNice + new App.ControllerModal head: 'Scheduler' headPrefix: 'New' buttonSubmit: 'Create' @@ -1641,7 +1641,7 @@ class MergeCustomerRef extends App.ControllerContent render: -> @html App.view('layout_ref/merge_customer_view') - new App.ControllerModalNice + new App.ControllerModal large: true head: "#{@mergeSource.firstname} #{@mergeSource.lastname}" headPrefix: 'Merge' diff --git a/app/assets/javascripts/app/controllers/object_manager.coffee b/app/assets/javascripts/app/controllers/object_manager.coffee index decbb12ab..8cad32ae6 100644 --- a/app/assets/javascripts/app/controllers/object_manager.coffee +++ b/app/assets/javascripts/app/controllers/object_manager.coffee @@ -152,7 +152,7 @@ class Items extends App.ControllerContent @load() ) -class Edit extends App.ControllerModalNice +class Edit extends App.ControllerModal buttonClose: true buttonCancel: true buttonSubmit: true diff --git a/app/assets/javascripts/app/controllers/taskbar_widget.coffee b/app/assets/javascripts/app/controllers/taskbar_widget.coffee index 56d51396f..77e7ee921 100644 --- a/app/assets/javascripts/app/controllers/taskbar_widget.coffee +++ b/app/assets/javascripts/app/controllers/taskbar_widget.coffee @@ -120,7 +120,7 @@ class App.TaskbarWidget extends App.Controller @navigate '#' -class Remove extends App.ControllerModalNice +class Remove extends App.ControllerModal buttonClose: true buttonCancel: true buttonSubmit: 'Discared changes' diff --git a/app/assets/javascripts/app/controllers/ticket_customer.coffee b/app/assets/javascripts/app/controllers/ticket_customer.coffee index 8d95effa9..d4a843455 100644 --- a/app/assets/javascripts/app/controllers/ticket_customer.coffee +++ b/app/assets/javascripts/app/controllers/ticket_customer.coffee @@ -1,4 +1,4 @@ -class App.TicketCustomer extends App.ControllerModalNice +class App.TicketCustomer extends App.ControllerModal buttonClose: true buttonCancel: true buttonSubmit: true diff --git a/app/assets/javascripts/app/controllers/ticket_overview.coffee b/app/assets/javascripts/app/controllers/ticket_overview.coffee index 85aee83da..8b3a74ddd 100644 --- a/app/assets/javascripts/app/controllers/ticket_overview.coffee +++ b/app/assets/javascripts/app/controllers/ticket_overview.coffee @@ -631,7 +631,7 @@ class BulkForm extends App.Controller msg: App.i18n.translateContent('Bulk-Action executed!') } -class App.OverviewSettings extends App.ControllerModalNice +class App.OverviewSettings extends App.ControllerModal buttonClose: true buttonCancel: true buttonSubmit: true diff --git a/app/assets/javascripts/app/controllers/ticket_zoom.coffee b/app/assets/javascripts/app/controllers/ticket_zoom.coffee index 0ae59037f..45e53b83a 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom.coffee @@ -571,7 +571,7 @@ class App.TicketZoom extends App.Controller # check if attachment exists but no body attachmentCount = @$('.article-add .textBubble .attachments .attachment').length if !articleParams['body'] && attachmentCount > 0 - new App.ControllerModalNice( + new App.ControllerModal( head: 'Text missing' buttonCancel: 'Cancel' buttonCancelClass: 'btn--danger' diff --git a/app/assets/javascripts/app/controllers/widget/link.coffee b/app/assets/javascripts/app/controllers/widget/link.coffee index 57778f59c..2fb116a40 100644 --- a/app/assets/javascripts/app/controllers/widget/link.coffee +++ b/app/assets/javascripts/app/controllers/widget/link.coffee @@ -80,7 +80,7 @@ class App.WidgetLink extends App.Controller container: @container ) -class App.LinkAdd extends App.ControllerModalNice +class App.LinkAdd extends App.ControllerModal buttonClose: true buttonCancel: true buttonSubmit: true diff --git a/app/assets/javascripts/app/controllers/widget/translation_support.coffee b/app/assets/javascripts/app/controllers/widget/translation_support.coffee index ac9c7efa6..3fe212c02 100644 --- a/app/assets/javascripts/app/controllers/widget/translation_support.coffee +++ b/app/assets/javascripts/app/controllers/widget/translation_support.coffee @@ -32,7 +32,7 @@ class TranslationSupport extends App.Controller App.Config.set( 'translaton_support', TranslationSupport, 'Widgets' ) -class Modal extends App.ControllerModalNice +class Modal extends App.ControllerModal buttonClose: true buttonCancel: 'No Thanks!' buttonSubmit: 'Complete translations' @@ -55,8 +55,8 @@ class Modal extends App.ControllerModalNice onCancel: => App.LocalStorage.set('translation_support_no', true, @Session.get('id')) - @onClose() + @close() onSubmit: => @navigate '#system/translation' - @onClose() + @close() diff --git a/app/assets/javascripts/app/lib/app_post/ajax.coffee b/app/assets/javascripts/app/lib/app_post/ajax.coffee index 956b9e40f..4d949f3dc 100644 --- a/app/assets/javascripts/app/lib/app_post/ajax.coffee +++ b/app/assets/javascripts/app/lib/app_post/ajax.coffee @@ -73,7 +73,7 @@ class _ajaxSingleton return if status is 502 # show error message - new App.ControllerModalNice( + new App.ControllerModal( head: 'StatusCode: ' + status contentInline: '
' + App.Utils.htmlEscape(detail) + '' buttonClose: true diff --git a/app/assets/javascripts/app/lib/app_post/browser.coffee.coffee b/app/assets/javascripts/app/lib/app_post/browser.coffee.coffee index f5a1077ab..0fc6882da 100644 --- a/app/assets/javascripts/app/lib/app_post/browser.coffee.coffee +++ b/app/assets/javascripts/app/lib/app_post/browser.coffee.coffee @@ -76,7 +76,7 @@ class App.Browser localStorage.setItem('fingerprint', fingerprint) fingerprint -class Modal extends App.ControllerModalNice +class Modal extends App.ControllerModal buttonClose: false buttonCancel: false buttonSubmit: false diff --git a/app/assets/javascripts/app/lib/app_post/user_organization_autocompletion.coffee b/app/assets/javascripts/app/lib/app_post/user_organization_autocompletion.coffee index 2570dad15..4fae4b5cc 100644 --- a/app/assets/javascripts/app/lib/app_post/user_organization_autocompletion.coffee +++ b/app/assets/javascripts/app/lib/app_post/user_organization_autocompletion.coffee @@ -289,7 +289,7 @@ class App.UserOrganizationAutocompletion extends App.Controller container: @el.closest('.content') ) -class UserNew extends App.ControllerModalNice +class UserNew extends App.ControllerModal buttonClose: true buttonCancel: true buttonSubmit: true diff --git a/app/assets/javascripts/app/lib/app_post/websocket.coffee b/app/assets/javascripts/app/lib/app_post/websocket.coffee index 0fa0f6cdd..4dea52455 100644 --- a/app/assets/javascripts/app/lib/app_post/websocket.coffee +++ b/app/assets/javascripts/app/lib/app_post/websocket.coffee @@ -363,7 +363,7 @@ class _webSocketSingleton extends App.Controller @_ajaxReceiveWorking = false ) -class Modal extends App.ControllerModalNice +class Modal extends App.ControllerModal buttonClose: false buttonCancel: false buttonSubmit: false