From 8cefc82d8a9b60a347c633d7118db1475d4888d5 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 23 Nov 2015 14:13:15 +0100 Subject: [PATCH] Applied coffee lint. --- .../_application_controller.coffee | 6 +- .../_application_controller_generic.coffee | 16 ++-- .../_application_controller_table.coffee | 4 +- .../app/controllers/_channel/twitter.coffee | 6 +- .../app/controllers/_profile/avatar.coffee | 4 +- .../app/controllers/_ui_element/date.coffee | 4 +- .../controllers/_ui_element/datetime.coffee | 4 +- .../controllers/_ui_element/textarea.coffee | 2 +- .../_ui_element/ticket_selector.coffee | 2 +- .../javascripts/app/controllers/chat.coffee | 8 +- .../app/controllers/layout_ref.coffee | 84 +++++++++---------- .../app/controllers/navigation.coffee | 2 +- .../app/controllers/object_manager.coffee | 2 +- .../app/controllers/report.js.coffee | 2 +- .../app/controllers/taskbar_widget.coffee | 2 +- .../app/controllers/ticket_customer.coffee | 2 +- .../app/controllers/ticket_overview.coffee | 2 +- .../ticket_zoom/article_view.coffee | 2 + .../app/controllers/translation.coffee | 2 +- .../app/controllers/widget/notify.coffee | 2 +- .../widget/online_notification.coffee | 2 +- .../widget/translation_inline.coffee | 2 +- .../app/lib/app_post/task_manager.coffee | 2 +- 23 files changed, 83 insertions(+), 81 deletions(-) diff --git a/app/assets/javascripts/app/controllers/_application_controller.coffee b/app/assets/javascripts/app/controllers/_application_controller.coffee index 484231493..2f1833f85 100644 --- a/app/assets/javascripts/app/controllers/_application_controller.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller.coffee @@ -555,10 +555,10 @@ class App.Controller extends Spine.Controller renderScreenUnauthorized: (data) -> @html App.view('generic/error/unauthorized')(data) - metaTaskUpdate: => + metaTaskUpdate: -> App.Delay.set( -> App.Event.trigger 'task:render' - 250 + 450 'meta-task-update' ) @@ -638,7 +638,7 @@ class App.ControllerModalNice extends App.Controller @$('.modal-dialog').replaceWith(modal) @post() - post: => + post: -> # nothing render: => diff --git a/app/assets/javascripts/app/controllers/_application_controller_generic.coffee b/app/assets/javascripts/app/controllers/_application_controller_generic.coffee index fb2394aab..090d1a0d4 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_generic.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_generic.coffee @@ -269,7 +269,7 @@ class App.ControllerGenericDestroyConfirm extends App.ControllerModalNice buttonClass: 'btn--danger' head: 'Confirm' - content: => + content: -> App.i18n.translateContent('Sure to delete this object?') onSubmit: => @@ -422,14 +422,14 @@ class App.ControllerNavSidbar extends App.ControllerContent executeController: (selectedItem) => - # in case of rerendering - if @activeController && @activeController.render - @activeController.render() - return + # in case of rerendering + if @activeController && @activeController.render + @activeController.render() + return - @activeController = new selectedItem.controller( - el: @$('.main') - ) + @activeController = new selectedItem.controller( + el: @$('.main') + ) class App.GenericHistory extends App.ControllerModalNice buttonClose: true diff --git a/app/assets/javascripts/app/controllers/_application_controller_table.coffee b/app/assets/javascripts/app/controllers/_application_controller_table.coffee index 3c9f6fa4b..72b42bfdb 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_table.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_table.coffee @@ -426,9 +426,9 @@ class App.ControllerTable extends App.Controller @adjustHeaderWidths() @tableHead.each (i, el) => - el.style.width = @headers[i].displayWidth + "px" + el.style.width = @headers[i].displayWidth + 'px' - stopPropagation: (event) => + stopPropagation: (event) -> event.stopPropagation() onColResizeMousedown: (event) => diff --git a/app/assets/javascripts/app/controllers/_channel/twitter.coffee b/app/assets/javascripts/app/controllers/_channel/twitter.coffee index 03916b86e..cde8748eb 100644 --- a/app/assets/javascripts/app/controllers/_channel/twitter.coffee +++ b/app/assets/javascripts/app/controllers/_channel/twitter.coffee @@ -16,7 +16,7 @@ class Index extends App.ControllerContent #@interval(@load, 60000) #@load() - load: => + load: -> # @startLoading() # @ajax( # id: 'twitter_index' @@ -55,7 +55,7 @@ class Index extends App.ControllerContent shown: true button: 'Connect' cancel: true - onSubmit: () => + onSubmit: => @html App.view('twitter/list')() modal.close() @@ -87,7 +87,7 @@ class Index extends App.ControllerContent # large: true # ) - delete: (e) => + delete: (e) -> # e.preventDefault() # id = $(e.target).closest('.action').data('id') # item = App.Twitter.find(id) diff --git a/app/assets/javascripts/app/controllers/_profile/avatar.coffee b/app/assets/javascripts/app/controllers/_profile/avatar.coffee index 9707d3a71..df958e6de 100644 --- a/app/assets/javascripts/app/controllers/_profile/avatar.coffee +++ b/app/assets/javascripts/app/controllers/_profile/avatar.coffee @@ -156,7 +156,7 @@ class ImageCropper extends App.ControllerModalNice '.imageCropper-image': 'image' '.imageCropper-holder': 'holder' - content: => + content: -> App.view('profile/imageCropper')() post: => @@ -242,7 +242,7 @@ class Camera extends App.ControllerModalNice events: 'click .js-shoot:not(.is-disabled)': 'onShootClick' - content: => + content: -> App.view('profile/camera')() post: => diff --git a/app/assets/javascripts/app/controllers/_ui_element/date.coffee b/app/assets/javascripts/app/controllers/_ui_element/date.coffee index 841b94adc..f5967f614 100644 --- a/app/assets/javascripts/app/controllers/_ui_element/date.coffee +++ b/app/assets/javascripts/app/controllers/_ui_element/date.coffee @@ -16,10 +16,10 @@ class App.UiElement.date # apply date widgets $.fn.datepicker.dates['custom'] = days: [App.i18n.translateInline('Sunday'), App.i18n.translateInline('Monday'), App.i18n.translateInline('Tuesday'), App.i18n.translateInline('Wednesday'), App.i18n.translateInline('Thursday'), App.i18n.translateInline('Friday'), App.i18n.translateInline('Saturday'), App.i18n.translateInline('Sunday')], - daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], + daysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], daysMin: [App.i18n.translateInline('Su'), App.i18n.translateInline('Mo'), App.i18n.translateInline('Tu'), App.i18n.translateInline('We'), App.i18n.translateInline('Th'), App.i18n.translateInline('Fr'), App.i18n.translateInline('Sa'), App.i18n.translateInline('Su')], months: [App.i18n.translateInline('January'), App.i18n.translateInline('February'), App.i18n.translateInline('March'), App.i18n.translateInline('April'), App.i18n.translateInline('May'), App.i18n.translateInline('June'), App.i18n.translateInline('July'), App.i18n.translateInline('August'), App.i18n.translateInline('September'), App.i18n.translateInline('October'), App.i18n.translateInline('November'), App.i18n.translateInline('December')], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], today: App.i18n.translateInline('today'), clear: App.i18n.translateInline('clear') currentDate = undefined diff --git a/app/assets/javascripts/app/controllers/_ui_element/datetime.coffee b/app/assets/javascripts/app/controllers/_ui_element/datetime.coffee index a3b8a4069..7391903e3 100644 --- a/app/assets/javascripts/app/controllers/_ui_element/datetime.coffee +++ b/app/assets/javascripts/app/controllers/_ui_element/datetime.coffee @@ -16,10 +16,10 @@ class App.UiElement.datetime # apply date widgets $.fn.datepicker.dates['custom'] = days: [App.i18n.translateInline('Sunday'), App.i18n.translateInline('Monday'), App.i18n.translateInline('Tuesday'), App.i18n.translateInline('Wednesday'), App.i18n.translateInline('Thursday'), App.i18n.translateInline('Friday'), App.i18n.translateInline('Saturday'), App.i18n.translateInline('Sunday')], - daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], + daysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], daysMin: [App.i18n.translateInline('Su'), App.i18n.translateInline('Mo'), App.i18n.translateInline('Tu'), App.i18n.translateInline('We'), App.i18n.translateInline('Th'), App.i18n.translateInline('Fr'), App.i18n.translateInline('Sa'), App.i18n.translateInline('Su')], months: [App.i18n.translateInline('January'), App.i18n.translateInline('February'), App.i18n.translateInline('March'), App.i18n.translateInline('April'), App.i18n.translateInline('May'), App.i18n.translateInline('June'), App.i18n.translateInline('July'), App.i18n.translateInline('August'), App.i18n.translateInline('September'), App.i18n.translateInline('October'), App.i18n.translateInline('November'), App.i18n.translateInline('December')], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + monthsShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], today: App.i18n.translateInline('today'), clear: App.i18n.translateInline('clear') currentDate = undefined diff --git a/app/assets/javascripts/app/controllers/_ui_element/textarea.coffee b/app/assets/javascripts/app/controllers/_ui_element/textarea.coffee index db45308b0..f0e7fc601 100644 --- a/app/assets/javascripts/app/controllers/_ui_element/textarea.coffee +++ b/app/assets/javascripts/app/controllers/_ui_element/textarea.coffee @@ -18,7 +18,7 @@ class App.UiElement.textarea if attribute.upload # add file uploader - u = => + u = -> # only add upload item if html element exists if $('#' + fileUploaderId )[0] diff --git a/app/assets/javascripts/app/controllers/_ui_element/ticket_selector.coffee b/app/assets/javascripts/app/controllers/_ui_element/ticket_selector.coffee index 4feafa450..a71e02224 100644 --- a/app/assets/javascripts/app/controllers/_ui_element/ticket_selector.coffee +++ b/app/assets/javascripts/app/controllers/_ui_element/ticket_selector.coffee @@ -246,7 +246,7 @@ class App.UiElement.ticket_selector elementRow.find('.js-value').addClass('hide') toggle() - elementRow.find('.js-preCondition select').bind('change', (e) => + elementRow.find('.js-preCondition select').bind('change', (e) -> toggle() ) diff --git a/app/assets/javascripts/app/controllers/chat.coffee b/app/assets/javascripts/app/controllers/chat.coffee index 3b129bd8f..b9db911ef 100644 --- a/app/assets/javascripts/app/controllers/chat.coffee +++ b/app/assets/javascripts/app/controllers/chat.coffee @@ -136,7 +136,7 @@ class App.CustomerChat extends App.Controller addChat: (session) -> return if @chatWindows[session.session_id] - chat = new chatWindow + chat = new ChatWindow name: "#{session.created_at}" session: session removeCallback: @removeChat @@ -183,7 +183,7 @@ class CustomerChatRouter extends App.ControllerPermanent persistent: true ) -class chatWindow extends App.Controller +class ChatWindow extends App.Controller @extend Spine.Events className: 'chat-window' @@ -283,8 +283,8 @@ class chatWindow extends App.Controller @resetUnreadMessages() onKeydown: (event) => - TABKEY = 9; - ENTERKEY = 13; + TABKEY = 9 + ENTERKEY = 13 if event.keyCode isnt TABKEY && event.keyCode isnt ENTERKEY App.WebSocket.send( diff --git a/app/assets/javascripts/app/controllers/layout_ref.coffee b/app/assets/javascripts/app/controllers/layout_ref.coffee index 61650b992..a691c9ee0 100644 --- a/app/assets/javascripts/app/controllers/layout_ref.coffee +++ b/app/assets/javascripts/app/controllers/layout_ref.coffee @@ -843,7 +843,7 @@ class TicketZoomRef extends App.ControllerContent @$('.js-datepicker').datepicker todayHighlight: true - startDate: new Date().toLocaleDateString("en-US") # returns 9/25/2015 + startDate: new Date().toLocaleDateString('en-US') # returns 9/25/2015 container: @$('.js-datepicker').parent() @$('.js-timepicker').timepicker() @@ -938,7 +938,7 @@ class TicketZoomRef extends App.ControllerContent # selection.anchorNode = element in which the selection started # selection.focusNode = element in which the selection ended - # + # # check if the start node is inside of the article or the article itself startNode = @$(selection.anchorNode) @@ -966,7 +966,7 @@ class TicketZoomRef extends App.ControllerContent $(document).unbind 'click.buttonDropdown' performTicketMacro: (event) => - console.log "perform action", @$(event.currentTarget).text() + console.log 'perform action', @$(event.currentTarget).text() @closeDropdown() onActionMouseEnter: (event) => @@ -1675,60 +1675,60 @@ class App.CustomerChatRef extends App.Controller questions: [ { - question: "Der dümmste Bauer hat die dicksten ..?" - answers: ["Kartoffeln"] + question: 'Der dümmste Bauer hat die dicksten ..?' + answers: ['Kartoffeln'] }, { - question: "Welchen Wein besang einst Udo Jürgens?" - answers: ["griechisch"] + question: 'Welchen Wein besang einst Udo Jürgens?' + answers: ['griechisch'] }, { - question: "Was behandelt ein Logopäde?" - answers: ["Sprachstörung"] + question: 'Was behandelt ein Logopäde?' + answers: ['Sprachstörung'] }, { - question: "In welcher Stadt ist das Porsche Stammwerk?" - answers: ["Stuttgart"] + question: 'In welcher Stadt ist das Porsche Stammwerk?' + answers: ['Stuttgart'] }, { - question: "Wer erfand den legendären C64-Computer?" - answers: ["Commodore"] + question: 'Wer erfand den legendären C64-Computer?' + answers: ['Commodore'] }, { question: 'Im Englischen steht "Lost And Found" für ..?' - answers: ["Fundbüro"] + answers: ['Fundbüro'] }, { question: 'Welches Möbelstück ist und war besonders in Sigmund Freuds Arbeitszimmer bekannt?' - answers: ["Couch"] + answers: ['Couch'] }, { question: 'Wenn es einem gut geht, lebt man "wie die Made im .."?' - answers: ["Speck"] + answers: ['Speck'] }, { question: 'Von welcher Sportart handelt der US-amerikanische Film "Rocky"?' - answers: ["Boxen"] + answers: ['Boxen'] }, { question: 'Wo soll man hingehen, wenn man sich weit entfernen soll? Dahin wo ..?' - answers: ["Pfeffer", "wächst"] + answers: ['Pfeffer', 'wächst'] }, { question: 'Welches internationale Autokennzeichen hat Spanien?' - answers: ["ES"] + answers: ['ES'] }, { question: 'Wenn man sich ärgert sagt man "Verdammt und .."?' - answers: ["zugenäht"] + answers: ['zugenäht'] }, { question: 'Bei welchem Spiel muss man ohne zu zittern Stäbchen sammeln?' - answers: ["Mikado"] + answers: ['Mikado'] }, { question: 'Wann wurde Znuny gegründet?' - answers: ["2012"] + answers: ['2012'] } ] @@ -1741,7 +1741,7 @@ class App.CustomerChatRef extends App.Controller @answered = 0 @correct = 0 @wrong = 0 - @maxChats = 4; + @maxChats = 4 @render() @@ -1772,7 +1772,7 @@ class App.CustomerChatRef extends App.Controller counter: => @randomCounter(0,100) - switch: (state = undefined) => + switch: (state = undefined) -> # read state if state is undefined @@ -1795,7 +1795,7 @@ class App.CustomerChatRef extends App.Controller chat.addMessage text, if i % 2 then 'customer' else 'agent' addChat: -> - chat = new chatWindowRef + chat = new ChatWindowRef name: "Quizmaster-#{ ++@i }" @on 'layout-has-changed', @propagateLayoutChange @@ -1811,12 +1811,12 @@ class App.CustomerChatRef extends App.Controller initQuiz: -> @chatWindows[0].addStatusMessage('To start the quiz type Start') - @chatWindows[0].bind "answer", @startQuiz + @chatWindows[0].bind 'answer', @startQuiz startQuiz: (answer) => - return false unless answer is "Start" + return false unless answer is 'Start' - @chatWindows[0].unbind "answer" + @chatWindows[0].unbind 'answer' @nextQuestion() @@ -1824,7 +1824,7 @@ class App.CustomerChatRef extends App.Controller if not @questions.length @currentChat.addStatusMessage("Du hast #{ @correct } von #{ @totalQuestions } Fragen richtig beantwortet!") for chat in @chatWindows - chat.unbind "answer" + chat.unbind 'answer' if chat is not @currentChat chat.goOffline() return @@ -1832,7 +1832,7 @@ class App.CustomerChatRef extends App.Controller if @chatWindows.length < @maxChats and Math.random() < 0.2 @addChat() randomWindowId = @chatWindows.length-1 - else + else # maybe take a chat offline if @chatWindows.length > 1 and Math.random() > 0.85 randomWindowId = Math.floor(Math.random()*@chatWindows.length) @@ -1850,9 +1850,9 @@ class App.CustomerChatRef extends App.Controller messageDelay = 500 if newChat != @currentChat - @currentChat.unbind("answer") if @currentChat + @currentChat.unbind('answer') if @currentChat @currentChat = newChat - @currentChat.bind "answer", @onQuestionAnswer + @currentChat.bind 'answer', @onQuestionAnswer messageDelay = 1500 @currentChat.showWritingLoader() @@ -1899,7 +1899,7 @@ class CustomerChatRouter extends App.ControllerPermanent #App.Config.set( 'CustomerChatRef', { controller: 'CustomerChatRef', authentication: true }, 'permanentTask' ) #App.Config.set( 'CustomerChatRef', { prio: 1200, parent: '', name: 'Customer Chat', target: '#layout_ref/customer_chat', key: 'CustomerChatRef', role: ['Agent'], class: 'chat' }, 'NavBar' ) -class chatWindowRef extends Spine.Controller +class ChatWindowRef extends Spine.Controller @extend Spine.Events className: 'chat-window' @@ -1941,7 +1941,7 @@ class chatWindowRef extends Spine.Controller # make sure animation will run setTimeout (=> @el.addClass('is-open')), 0 - # @addMessage 'Hello. My name is Roger, how can I help you?', 'agent' + # @addMessage 'Hello. My name is Roger, how can I help you?', 'agent' onTransitionend: (event) => # chat window is done with animation - adjust scroll-bars @@ -1964,17 +1964,17 @@ class chatWindowRef extends Spine.Controller @updateModified(false) onKeydown: (event) => - TABKEY = 9; - ENTERKEY = 13; + TABKEY = 9 + ENTERKEY = 13 - switch event.keyCode + switch event.keyCode when TABKEY allChatInputs = $('.js-customerChatInput').not('[disabled="disabled"]') chatCount = allChatInputs.size() index = allChatInputs.index(@input) if chatCount > 1 - switch index + switch index when chatCount-1 if !event.shiftKey # State: tab without shift on last input @@ -1998,7 +1998,7 @@ class chatWindowRef extends Spine.Controller @addMessage @input.html(), 'agent' - @trigger "answer", @input.html() + @trigger 'answer', @input.html() @input.html('') @@ -2012,7 +2012,7 @@ class chatWindowRef extends Spine.Controller @addMessage(message, 'customer', !isFocused) if !isFocused - @updateModified(true) + @updateModified(true) @sound.message.play() addMessage: (message, sender, isNew) => @@ -2054,7 +2054,7 @@ class chatWindowRef extends Spine.Controller @updateLastTimestamp label, time @lastTimestamp = timestamp else - @addTimestamp label, time + @addTimestamp label, time @lastTimestamp = timestamp @lastAddedType = 'timestamp' @@ -2124,7 +2124,7 @@ class TwitterConversationRef extends App.ControllerContent updateLetterCount: (event) => textLength = @maxTextLength - @textarea.text().length - @signature.text().length - 2 - className = switch + className = switch when textLength < 0 then 'label-danger' when textLength < @warningTextLength then 'label-warning' else '' diff --git a/app/assets/javascripts/app/controllers/navigation.coffee b/app/assets/javascripts/app/controllers/navigation.coffee index 9bb96260b..dadba0be7 100644 --- a/app/assets/javascripts/app/controllers/navigation.coffee +++ b/app/assets/javascripts/app/controllers/navigation.coffee @@ -82,7 +82,7 @@ class App.Navigation extends App.ControllerWidgetPermanent ) # bind on switch changes and execute it on controller - @$('.js-menu .js-switch').bind('change', (e) => + @$('.js-menu .js-switch').bind('change', (e) -> val = $(e.target).prop('checked') key = $(e.target).closest('.menu-item').data('key') return if !key diff --git a/app/assets/javascripts/app/controllers/object_manager.coffee b/app/assets/javascripts/app/controllers/object_manager.coffee index 02a66d007..decbb12ab 100644 --- a/app/assets/javascripts/app/controllers/object_manager.coffee +++ b/app/assets/javascripts/app/controllers/object_manager.coffee @@ -246,7 +246,7 @@ class Edit extends App.ControllerModalNice content.find('[name=data_type]').on( 'change', - (e) => + (e) -> dataType = $( e.target ).val() content.find('.js-middle > div').addClass('hide') content.find(".js-#{dataType}").removeClass('hide') diff --git a/app/assets/javascripts/app/controllers/report.js.coffee b/app/assets/javascripts/app/controllers/report.js.coffee index 6db120716..737230cad 100644 --- a/app/assets/javascripts/app/controllers/report.js.coffee +++ b/app/assets/javascripts/app/controllers/report.js.coffee @@ -294,7 +294,7 @@ class Download extends App.Controller downloadBackendSelected: @params.downloadBackendSelected ) processData: true - success: (data) => + success: (data) -> App.Collection.loadAssets(data.assets) ticket_collection = [] if data.ticket_ids diff --git a/app/assets/javascripts/app/controllers/taskbar_widget.coffee b/app/assets/javascripts/app/controllers/taskbar_widget.coffee index 0470ec61a..e8ac0b281 100644 --- a/app/assets/javascripts/app/controllers/taskbar_widget.coffee +++ b/app/assets/javascripts/app/controllers/taskbar_widget.coffee @@ -121,7 +121,7 @@ class Remove extends App.ControllerModalNice buttonClass: 'btn--danger' head: 'Confirm' - content: => + content: -> App.i18n.translateContent('Tab has changed, you really want to close it?') onSubmit: (e) => diff --git a/app/assets/javascripts/app/controllers/ticket_customer.coffee b/app/assets/javascripts/app/controllers/ticket_customer.coffee index 88b784275..8d95effa9 100644 --- a/app/assets/javascripts/app/controllers/ticket_customer.coffee +++ b/app/assets/javascripts/app/controllers/ticket_customer.coffee @@ -4,7 +4,7 @@ class App.TicketCustomer extends App.ControllerModalNice buttonSubmit: true head: 'Change Customer' - content: => + content: -> configure_attributes = [ { name: 'customer_id', display: 'Customer', tag: 'user_autocompletion', null: false, placeholder: 'Enter Person or Organization/Company', minLengt: 2, disableCreateUser: true }, ] diff --git a/app/assets/javascripts/app/controllers/ticket_overview.coffee b/app/assets/javascripts/app/controllers/ticket_overview.coffee index e77a38a5b..10e5eaac2 100644 --- a/app/assets/javascripts/app/controllers/ticket_overview.coffee +++ b/app/assets/javascripts/app/controllers/ticket_overview.coffee @@ -105,7 +105,7 @@ class Navbar extends App.Controller if @vertical $(window).on 'resize.navbar', @autoFoldTabs - navigateTo: (event) => + navigateTo: (event) -> location.hash = $(event.currentTarget).attr('data-target') onDropdownShow: => diff --git a/app/assets/javascripts/app/controllers/ticket_zoom/article_view.coffee b/app/assets/javascripts/app/controllers/ticket_zoom/article_view.coffee index 7133018be..371f4c2ab 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom/article_view.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom/article_view.coffee @@ -126,9 +126,11 @@ class ArticleViewItem extends App.Controller body = @article.body if @article.preferences && @article.preferences.signature_detection signatureDetected = '########SIGNATURE########' + # coffeelint: disable=no_unnecessary_double_quotes body = body.split("\n") body.splice(@article.preferences.signature_detection, 0, signatureDetected) body = body.join("\n") + # coffeelint: enable=no_unnecessary_double_quotes if signatureDetected body = App.Utils.textCleanup(body) @article['html'] = App.Utils.text2html(body) diff --git a/app/assets/javascripts/app/controllers/translation.coffee b/app/assets/javascripts/app/controllers/translation.coffee index 6ff9354d9..ac931f473 100644 --- a/app/assets/javascripts/app/controllers/translation.coffee +++ b/app/assets/javascripts/app/controllers/translation.coffee @@ -19,7 +19,7 @@ class Index extends App.ControllerContent @bind('i18n:translation_update_list', => @load('i18n:translation_update_list') ) - @bind('i18n:translation_update', => + @bind('i18n:translation_update ui:rerender', => @load() ) diff --git a/app/assets/javascripts/app/controllers/widget/notify.coffee b/app/assets/javascripts/app/controllers/widget/notify.coffee index d791410f0..7f4ad870b 100644 --- a/app/assets/javascripts/app/controllers/widget/notify.coffee +++ b/app/assets/javascripts/app/controllers/widget/notify.coffee @@ -40,7 +40,7 @@ class App.Notify extends App.ControllerWidgetPermanent text: data.msg type: data.type template: App.view('notify') - type: data.type + type: data.type animation: open: 'animated fadeInDown' close: 'animated fadeOutDown' diff --git a/app/assets/javascripts/app/controllers/widget/online_notification.coffee b/app/assets/javascripts/app/controllers/widget/online_notification.coffee index a61b22b92..3e2b5c5e9 100644 --- a/app/assets/javascripts/app/controllers/widget/online_notification.coffee +++ b/app/assets/javascripts/app/controllers/widget/online_notification.coffee @@ -200,5 +200,5 @@ class App.OnlineNotificationWidget extends App.Controller resetHeight: -> notificationsContainer = $('.js-notificationsContainer') - notificationsContainer.find('.popover-content').css('height', "auto") + notificationsContainer.find('.popover-content').css('height', 'auto') diff --git a/app/assets/javascripts/app/controllers/widget/translation_inline.coffee b/app/assets/javascripts/app/controllers/widget/translation_inline.coffee index a6eeaa8d1..d131adb0d 100644 --- a/app/assets/javascripts/app/controllers/widget/translation_inline.coffee +++ b/app/assets/javascripts/app/controllers/widget/translation_inline.coffee @@ -36,7 +36,7 @@ class Widget extends App.Controller element = $(e.target) element.data 'before', element.text() element - .on 'blur.translation', '.translation', (e) => + .on 'blur.translation', '.translation', (e) -> console.log('blur') element = $(e.target) source = element.attr('title') diff --git a/app/assets/javascripts/app/lib/app_post/task_manager.coffee b/app/assets/javascripts/app/lib/app_post/task_manager.coffee index b42ab1523..5b024923a 100644 --- a/app/assets/javascripts/app/lib/app_post/task_manager.coffee +++ b/app/assets/javascripts/app/lib/app_post/task_manager.coffee @@ -103,7 +103,7 @@ class _taskManagerSingleton extends App.Controller # sort by prio @allTasks = _(@allTasks).sortBy( (task) -> - return task.prio; + return task.prio ) return @allTasks