Applied coffee lint.

This commit is contained in:
Martin Edenhofer 2015-11-23 14:13:15 +01:00
parent df90a8f9d6
commit 8cefc82d8a
23 changed files with 83 additions and 81 deletions

View file

@ -555,10 +555,10 @@ class App.Controller extends Spine.Controller
renderScreenUnauthorized: (data) -> renderScreenUnauthorized: (data) ->
@html App.view('generic/error/unauthorized')(data) @html App.view('generic/error/unauthorized')(data)
metaTaskUpdate: => metaTaskUpdate: ->
App.Delay.set( App.Delay.set(
-> App.Event.trigger 'task:render' -> App.Event.trigger 'task:render'
250 450
'meta-task-update' 'meta-task-update'
) )
@ -638,7 +638,7 @@ class App.ControllerModalNice extends App.Controller
@$('.modal-dialog').replaceWith(modal) @$('.modal-dialog').replaceWith(modal)
@post() @post()
post: => post: ->
# nothing # nothing
render: => render: =>

View file

@ -269,7 +269,7 @@ class App.ControllerGenericDestroyConfirm extends App.ControllerModalNice
buttonClass: 'btn--danger' buttonClass: 'btn--danger'
head: 'Confirm' head: 'Confirm'
content: => content: ->
App.i18n.translateContent('Sure to delete this object?') App.i18n.translateContent('Sure to delete this object?')
onSubmit: => onSubmit: =>
@ -422,14 +422,14 @@ class App.ControllerNavSidbar extends App.ControllerContent
executeController: (selectedItem) => executeController: (selectedItem) =>
# in case of rerendering # in case of rerendering
if @activeController && @activeController.render if @activeController && @activeController.render
@activeController.render() @activeController.render()
return return
@activeController = new selectedItem.controller( @activeController = new selectedItem.controller(
el: @$('.main') el: @$('.main')
) )
class App.GenericHistory extends App.ControllerModalNice class App.GenericHistory extends App.ControllerModalNice
buttonClose: true buttonClose: true

View file

@ -426,9 +426,9 @@ class App.ControllerTable extends App.Controller
@adjustHeaderWidths() @adjustHeaderWidths()
@tableHead.each (i, el) => @tableHead.each (i, el) =>
el.style.width = @headers[i].displayWidth + "px" el.style.width = @headers[i].displayWidth + 'px'
stopPropagation: (event) => stopPropagation: (event) ->
event.stopPropagation() event.stopPropagation()
onColResizeMousedown: (event) => onColResizeMousedown: (event) =>

View file

@ -16,7 +16,7 @@ class Index extends App.ControllerContent
#@interval(@load, 60000) #@interval(@load, 60000)
#@load() #@load()
load: => load: ->
# @startLoading() # @startLoading()
# @ajax( # @ajax(
# id: 'twitter_index' # id: 'twitter_index'
@ -55,7 +55,7 @@ class Index extends App.ControllerContent
shown: true shown: true
button: 'Connect' button: 'Connect'
cancel: true cancel: true
onSubmit: () => onSubmit: =>
@html App.view('twitter/list')() @html App.view('twitter/list')()
modal.close() modal.close()
@ -87,7 +87,7 @@ class Index extends App.ControllerContent
# large: true # large: true
# ) # )
delete: (e) => delete: (e) ->
# e.preventDefault() # e.preventDefault()
# id = $(e.target).closest('.action').data('id') # id = $(e.target).closest('.action').data('id')
# item = App.Twitter.find(id) # item = App.Twitter.find(id)

View file

@ -156,7 +156,7 @@ class ImageCropper extends App.ControllerModalNice
'.imageCropper-image': 'image' '.imageCropper-image': 'image'
'.imageCropper-holder': 'holder' '.imageCropper-holder': 'holder'
content: => content: ->
App.view('profile/imageCropper')() App.view('profile/imageCropper')()
post: => post: =>
@ -242,7 +242,7 @@ class Camera extends App.ControllerModalNice
events: events:
'click .js-shoot:not(.is-disabled)': 'onShootClick' 'click .js-shoot:not(.is-disabled)': 'onShootClick'
content: => content: ->
App.view('profile/camera')() App.view('profile/camera')()
post: => post: =>

View file

@ -16,10 +16,10 @@ class App.UiElement.date
# apply date widgets # apply date widgets
$.fn.datepicker.dates['custom'] = $.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')], 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')], 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')], 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'), today: App.i18n.translateInline('today'),
clear: App.i18n.translateInline('clear') clear: App.i18n.translateInline('clear')
currentDate = undefined currentDate = undefined

View file

@ -16,10 +16,10 @@ class App.UiElement.datetime
# apply date widgets # apply date widgets
$.fn.datepicker.dates['custom'] = $.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')], 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')], 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')], 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'), today: App.i18n.translateInline('today'),
clear: App.i18n.translateInline('clear') clear: App.i18n.translateInline('clear')
currentDate = undefined currentDate = undefined

View file

@ -18,7 +18,7 @@ class App.UiElement.textarea
if attribute.upload if attribute.upload
# add file uploader # add file uploader
u = => u = ->
# only add upload item if html element exists # only add upload item if html element exists
if $('#' + fileUploaderId )[0] if $('#' + fileUploaderId )[0]

View file

@ -246,7 +246,7 @@ class App.UiElement.ticket_selector
elementRow.find('.js-value').addClass('hide') elementRow.find('.js-value').addClass('hide')
toggle() toggle()
elementRow.find('.js-preCondition select').bind('change', (e) => elementRow.find('.js-preCondition select').bind('change', (e) ->
toggle() toggle()
) )

View file

@ -136,7 +136,7 @@ class App.CustomerChat extends App.Controller
addChat: (session) -> addChat: (session) ->
return if @chatWindows[session.session_id] return if @chatWindows[session.session_id]
chat = new chatWindow chat = new ChatWindow
name: "#{session.created_at}" name: "#{session.created_at}"
session: session session: session
removeCallback: @removeChat removeCallback: @removeChat
@ -183,7 +183,7 @@ class CustomerChatRouter extends App.ControllerPermanent
persistent: true persistent: true
) )
class chatWindow extends App.Controller class ChatWindow extends App.Controller
@extend Spine.Events @extend Spine.Events
className: 'chat-window' className: 'chat-window'
@ -283,8 +283,8 @@ class chatWindow extends App.Controller
@resetUnreadMessages() @resetUnreadMessages()
onKeydown: (event) => onKeydown: (event) =>
TABKEY = 9; TABKEY = 9
ENTERKEY = 13; ENTERKEY = 13
if event.keyCode isnt TABKEY && event.keyCode isnt ENTERKEY if event.keyCode isnt TABKEY && event.keyCode isnt ENTERKEY
App.WebSocket.send( App.WebSocket.send(

View file

@ -843,7 +843,7 @@ class TicketZoomRef extends App.ControllerContent
@$('.js-datepicker').datepicker @$('.js-datepicker').datepicker
todayHighlight: true 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() container: @$('.js-datepicker').parent()
@$('.js-timepicker').timepicker() @$('.js-timepicker').timepicker()
@ -938,7 +938,7 @@ class TicketZoomRef extends App.ControllerContent
# selection.anchorNode = element in which the selection started # selection.anchorNode = element in which the selection started
# selection.focusNode = element in which the selection ended # selection.focusNode = element in which the selection ended
# #
# check if the start node is inside of the article or the article itself # check if the start node is inside of the article or the article itself
startNode = @$(selection.anchorNode) startNode = @$(selection.anchorNode)
@ -966,7 +966,7 @@ class TicketZoomRef extends App.ControllerContent
$(document).unbind 'click.buttonDropdown' $(document).unbind 'click.buttonDropdown'
performTicketMacro: (event) => performTicketMacro: (event) =>
console.log "perform action", @$(event.currentTarget).text() console.log 'perform action', @$(event.currentTarget).text()
@closeDropdown() @closeDropdown()
onActionMouseEnter: (event) => onActionMouseEnter: (event) =>
@ -1675,60 +1675,60 @@ class App.CustomerChatRef extends App.Controller
questions: [ questions: [
{ {
question: "Der dümmste Bauer hat die dicksten ..?" question: 'Der dümmste Bauer hat die dicksten ..?'
answers: ["Kartoffeln"] answers: ['Kartoffeln']
}, },
{ {
question: "Welchen Wein besang einst Udo Jürgens?" question: 'Welchen Wein besang einst Udo Jürgens?'
answers: ["griechisch"] answers: ['griechisch']
}, },
{ {
question: "Was behandelt ein Logopäde?" question: 'Was behandelt ein Logopäde?'
answers: ["Sprachstörung"] answers: ['Sprachstörung']
}, },
{ {
question: "In welcher Stadt ist das Porsche Stammwerk?" question: 'In welcher Stadt ist das Porsche Stammwerk?'
answers: ["Stuttgart"] answers: ['Stuttgart']
}, },
{ {
question: "Wer erfand den legendären C64-Computer?" question: 'Wer erfand den legendären C64-Computer?'
answers: ["Commodore"] answers: ['Commodore']
}, },
{ {
question: 'Im Englischen steht "Lost And Found" für ..?' 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?' 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 .."?' 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"?' 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 ..?' 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?' question: 'Welches internationale Autokennzeichen hat Spanien?'
answers: ["ES"] answers: ['ES']
}, },
{ {
question: 'Wenn man sich ärgert sagt man "Verdammt und .."?' 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?' question: 'Bei welchem Spiel muss man ohne zu zittern Stäbchen sammeln?'
answers: ["Mikado"] answers: ['Mikado']
}, },
{ {
question: 'Wann wurde Znuny gegründet?' question: 'Wann wurde Znuny gegründet?'
answers: ["2012"] answers: ['2012']
} }
] ]
@ -1741,7 +1741,7 @@ class App.CustomerChatRef extends App.Controller
@answered = 0 @answered = 0
@correct = 0 @correct = 0
@wrong = 0 @wrong = 0
@maxChats = 4; @maxChats = 4
@render() @render()
@ -1772,7 +1772,7 @@ class App.CustomerChatRef extends App.Controller
counter: => counter: =>
@randomCounter(0,100) @randomCounter(0,100)
switch: (state = undefined) => switch: (state = undefined) ->
# read state # read state
if state is undefined if state is undefined
@ -1795,7 +1795,7 @@ class App.CustomerChatRef extends App.Controller
chat.addMessage text, if i % 2 then 'customer' else 'agent' chat.addMessage text, if i % 2 then 'customer' else 'agent'
addChat: -> addChat: ->
chat = new chatWindowRef chat = new ChatWindowRef
name: "Quizmaster-#{ ++@i }" name: "Quizmaster-#{ ++@i }"
@on 'layout-has-changed', @propagateLayoutChange @on 'layout-has-changed', @propagateLayoutChange
@ -1811,12 +1811,12 @@ class App.CustomerChatRef extends App.Controller
initQuiz: -> initQuiz: ->
@chatWindows[0].addStatusMessage('To start the quiz type <strong>Start</strong>') @chatWindows[0].addStatusMessage('To start the quiz type <strong>Start</strong>')
@chatWindows[0].bind "answer", @startQuiz @chatWindows[0].bind 'answer', @startQuiz
startQuiz: (answer) => startQuiz: (answer) =>
return false unless answer is "Start" return false unless answer is 'Start'
@chatWindows[0].unbind "answer" @chatWindows[0].unbind 'answer'
@nextQuestion() @nextQuestion()
@ -1824,7 +1824,7 @@ class App.CustomerChatRef extends App.Controller
if not @questions.length if not @questions.length
@currentChat.addStatusMessage("Du hast #{ @correct } von #{ @totalQuestions } Fragen richtig beantwortet!") @currentChat.addStatusMessage("Du hast #{ @correct } von #{ @totalQuestions } Fragen richtig beantwortet!")
for chat in @chatWindows for chat in @chatWindows
chat.unbind "answer" chat.unbind 'answer'
if chat is not @currentChat if chat is not @currentChat
chat.goOffline() chat.goOffline()
return return
@ -1832,7 +1832,7 @@ class App.CustomerChatRef extends App.Controller
if @chatWindows.length < @maxChats and Math.random() < 0.2 if @chatWindows.length < @maxChats and Math.random() < 0.2
@addChat() @addChat()
randomWindowId = @chatWindows.length-1 randomWindowId = @chatWindows.length-1
else else
# maybe take a chat offline # maybe take a chat offline
if @chatWindows.length > 1 and Math.random() > 0.85 if @chatWindows.length > 1 and Math.random() > 0.85
randomWindowId = Math.floor(Math.random()*@chatWindows.length) randomWindowId = Math.floor(Math.random()*@chatWindows.length)
@ -1850,9 +1850,9 @@ class App.CustomerChatRef extends App.Controller
messageDelay = 500 messageDelay = 500
if newChat != @currentChat if newChat != @currentChat
@currentChat.unbind("answer") if @currentChat @currentChat.unbind('answer') if @currentChat
@currentChat = newChat @currentChat = newChat
@currentChat.bind "answer", @onQuestionAnswer @currentChat.bind 'answer', @onQuestionAnswer
messageDelay = 1500 messageDelay = 1500
@currentChat.showWritingLoader() @currentChat.showWritingLoader()
@ -1899,7 +1899,7 @@ class CustomerChatRouter extends App.ControllerPermanent
#App.Config.set( 'CustomerChatRef', { controller: 'CustomerChatRef', authentication: true }, 'permanentTask' ) #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' ) #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 @extend Spine.Events
className: 'chat-window' className: 'chat-window'
@ -1941,7 +1941,7 @@ class chatWindowRef extends Spine.Controller
# make sure animation will run # make sure animation will run
setTimeout (=> @el.addClass('is-open')), 0 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) => onTransitionend: (event) =>
# chat window is done with animation - adjust scroll-bars # chat window is done with animation - adjust scroll-bars
@ -1964,17 +1964,17 @@ class chatWindowRef extends Spine.Controller
@updateModified(false) @updateModified(false)
onKeydown: (event) => onKeydown: (event) =>
TABKEY = 9; TABKEY = 9
ENTERKEY = 13; ENTERKEY = 13
switch event.keyCode switch event.keyCode
when TABKEY when TABKEY
allChatInputs = $('.js-customerChatInput').not('[disabled="disabled"]') allChatInputs = $('.js-customerChatInput').not('[disabled="disabled"]')
chatCount = allChatInputs.size() chatCount = allChatInputs.size()
index = allChatInputs.index(@input) index = allChatInputs.index(@input)
if chatCount > 1 if chatCount > 1
switch index switch index
when chatCount-1 when chatCount-1
if !event.shiftKey if !event.shiftKey
# State: tab without shift on last input # State: tab without shift on last input
@ -1998,7 +1998,7 @@ class chatWindowRef extends Spine.Controller
@addMessage @input.html(), 'agent' @addMessage @input.html(), 'agent'
@trigger "answer", @input.html() @trigger 'answer', @input.html()
@input.html('') @input.html('')
@ -2012,7 +2012,7 @@ class chatWindowRef extends Spine.Controller
@addMessage(message, 'customer', !isFocused) @addMessage(message, 'customer', !isFocused)
if !isFocused if !isFocused
@updateModified(true) @updateModified(true)
@sound.message.play() @sound.message.play()
addMessage: (message, sender, isNew) => addMessage: (message, sender, isNew) =>
@ -2054,7 +2054,7 @@ class chatWindowRef extends Spine.Controller
@updateLastTimestamp label, time @updateLastTimestamp label, time
@lastTimestamp = timestamp @lastTimestamp = timestamp
else else
@addTimestamp label, time @addTimestamp label, time
@lastTimestamp = timestamp @lastTimestamp = timestamp
@lastAddedType = 'timestamp' @lastAddedType = 'timestamp'
@ -2124,7 +2124,7 @@ class TwitterConversationRef extends App.ControllerContent
updateLetterCount: (event) => updateLetterCount: (event) =>
textLength = @maxTextLength - @textarea.text().length - @signature.text().length - 2 textLength = @maxTextLength - @textarea.text().length - @signature.text().length - 2
className = switch className = switch
when textLength < 0 then 'label-danger' when textLength < 0 then 'label-danger'
when textLength < @warningTextLength then 'label-warning' when textLength < @warningTextLength then 'label-warning'
else '' else ''

View file

@ -82,7 +82,7 @@ class App.Navigation extends App.ControllerWidgetPermanent
) )
# bind on switch changes and execute it on controller # 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') val = $(e.target).prop('checked')
key = $(e.target).closest('.menu-item').data('key') key = $(e.target).closest('.menu-item').data('key')
return if !key return if !key

View file

@ -246,7 +246,7 @@ class Edit extends App.ControllerModalNice
content.find('[name=data_type]').on( content.find('[name=data_type]').on(
'change', 'change',
(e) => (e) ->
dataType = $( e.target ).val() dataType = $( e.target ).val()
content.find('.js-middle > div').addClass('hide') content.find('.js-middle > div').addClass('hide')
content.find(".js-#{dataType}").removeClass('hide') content.find(".js-#{dataType}").removeClass('hide')

View file

@ -294,7 +294,7 @@ class Download extends App.Controller
downloadBackendSelected: @params.downloadBackendSelected downloadBackendSelected: @params.downloadBackendSelected
) )
processData: true processData: true
success: (data) => success: (data) ->
App.Collection.loadAssets(data.assets) App.Collection.loadAssets(data.assets)
ticket_collection = [] ticket_collection = []
if data.ticket_ids if data.ticket_ids

View file

@ -121,7 +121,7 @@ class Remove extends App.ControllerModalNice
buttonClass: 'btn--danger' buttonClass: 'btn--danger'
head: 'Confirm' head: 'Confirm'
content: => content: ->
App.i18n.translateContent('Tab has changed, you really want to close it?') App.i18n.translateContent('Tab has changed, you really want to close it?')
onSubmit: (e) => onSubmit: (e) =>

View file

@ -4,7 +4,7 @@ class App.TicketCustomer extends App.ControllerModalNice
buttonSubmit: true buttonSubmit: true
head: 'Change Customer' head: 'Change Customer'
content: => content: ->
configure_attributes = [ configure_attributes = [
{ name: 'customer_id', display: 'Customer', tag: 'user_autocompletion', null: false, placeholder: 'Enter Person or Organization/Company', minLengt: 2, disableCreateUser: true }, { name: 'customer_id', display: 'Customer', tag: 'user_autocompletion', null: false, placeholder: 'Enter Person or Organization/Company', minLengt: 2, disableCreateUser: true },
] ]

View file

@ -105,7 +105,7 @@ class Navbar extends App.Controller
if @vertical if @vertical
$(window).on 'resize.navbar', @autoFoldTabs $(window).on 'resize.navbar', @autoFoldTabs
navigateTo: (event) => navigateTo: (event) ->
location.hash = $(event.currentTarget).attr('data-target') location.hash = $(event.currentTarget).attr('data-target')
onDropdownShow: => onDropdownShow: =>

View file

@ -126,9 +126,11 @@ class ArticleViewItem extends App.Controller
body = @article.body body = @article.body
if @article.preferences && @article.preferences.signature_detection if @article.preferences && @article.preferences.signature_detection
signatureDetected = '########SIGNATURE########' signatureDetected = '########SIGNATURE########'
# coffeelint: disable=no_unnecessary_double_quotes
body = body.split("\n") body = body.split("\n")
body.splice(@article.preferences.signature_detection, 0, signatureDetected) body.splice(@article.preferences.signature_detection, 0, signatureDetected)
body = body.join("\n") body = body.join("\n")
# coffeelint: enable=no_unnecessary_double_quotes
if signatureDetected if signatureDetected
body = App.Utils.textCleanup(body) body = App.Utils.textCleanup(body)
@article['html'] = App.Utils.text2html(body) @article['html'] = App.Utils.text2html(body)

View file

@ -19,7 +19,7 @@ class Index extends App.ControllerContent
@bind('i18n:translation_update_list', => @bind('i18n:translation_update_list', =>
@load('i18n:translation_update_list') @load('i18n:translation_update_list')
) )
@bind('i18n:translation_update', => @bind('i18n:translation_update ui:rerender', =>
@load() @load()
) )

View file

@ -40,7 +40,7 @@ class App.Notify extends App.ControllerWidgetPermanent
text: data.msg text: data.msg
type: data.type type: data.type
template: App.view('notify') template: App.view('notify')
type: data.type type: data.type
animation: animation:
open: 'animated fadeInDown' open: 'animated fadeInDown'
close: 'animated fadeOutDown' close: 'animated fadeOutDown'

View file

@ -200,5 +200,5 @@ class App.OnlineNotificationWidget extends App.Controller
resetHeight: -> resetHeight: ->
notificationsContainer = $('.js-notificationsContainer') notificationsContainer = $('.js-notificationsContainer')
notificationsContainer.find('.popover-content').css('height', "auto") notificationsContainer.find('.popover-content').css('height', 'auto')

View file

@ -36,7 +36,7 @@ class Widget extends App.Controller
element = $(e.target) element = $(e.target)
element.data 'before', element.text() element.data 'before', element.text()
element element
.on 'blur.translation', '.translation', (e) => .on 'blur.translation', '.translation', (e) ->
console.log('blur') console.log('blur')
element = $(e.target) element = $(e.target)
source = element.attr('title') source = element.attr('title')

View file

@ -103,7 +103,7 @@ class _taskManagerSingleton extends App.Controller
# sort by prio # sort by prio
@allTasks = _(@allTasks).sortBy( (task) -> @allTasks = _(@allTasks).sortBy( (task) ->
return task.prio; return task.prio
) )
return @allTasks return @allTasks