Next coffeelint level.

This commit is contained in:
Martin Edenhofer 2015-09-24 15:04:45 +02:00
parent 76bf001564
commit df61622e3e
32 changed files with 88 additions and 83 deletions

View file

@ -94,7 +94,7 @@ class App.Controller extends Spine.Controller
if window.clipboardData # IE if window.clipboardData # IE
window.clipboardData.setData( 'Text', text ) window.clipboardData.setData( 'Text', text )
else else
window.prompt( "Copy to clipboard: Ctrl+C, Enter", text ) window.prompt( 'Copy to clipboard: Ctrl+C, Enter', text )
# disable all delay's and interval's # disable all delay's and interval's
disconnectClient: -> disconnectClient: ->
@ -144,6 +144,7 @@ class App.Controller extends Spine.Controller
try try
element.css( 'position', 'static' ) element.css( 'position', 'static' )
catch e catch e
console.log 'error', e
position = [ 15, 30, 15, 0, -15, -30, -15, 0 ] position = [ 15, 30, 15, 0, -15, -30, -15, 0 ]
position = position.concat( position.concat( position ) ) position = position.concat( position.concat( position ) )
@ -486,7 +487,7 @@ class App.Controller extends Spine.Controller
item.title = '???' item.title = '???'
# convert backend name space to local name space # convert backend name space to local name space
item.object = item.object.replace("::", '') item.object = item.object.replace('::', '')
# lookup real data # lookup real data
if App[item.object] && App[item.object].exists( item.o_id ) if App[item.object] && App[item.object].exists( item.o_id )
@ -659,7 +660,7 @@ class App.SessionMessage extends App.ControllerModal
window.location.href = window.location.href window.location.href = window.location.href
return true return true
throw "Cant reload page!" throw 'Cant reload page!'
class App.UpdateHeader extends App.Controller class App.UpdateHeader extends App.Controller
constructor: -> constructor: ->

View file

@ -1,3 +1,4 @@
# coffeelint: disable=no_unnecessary_double_quotes
class App.ChannelForm extends App.Controller class App.ChannelForm extends App.Controller
events: events:
'change form.js-params': 'updateParams' 'change form.js-params': 'updateParams'

View file

@ -318,7 +318,7 @@ class App.FirstStepsClues extends App.Controller
perform: (actions, container) -> perform: (actions, container) ->
for action in actions for action in actions
if action.indexOf(" ") < 0 if action.indexOf(' ') < 0
# 'click' # 'click'
eventName = action eventName = action
target = container target = container

View file

@ -365,7 +365,7 @@ class Camera extends App.ControllerModal
# cache raw video data # cache raw video data
@cacheScreenshot() @cacheScreenshot()
catch e catch e
if e.name is "NS_ERROR_NOT_AVAILABLE" if e.name is 'NS_ERROR_NOT_AVAILABLE'
setTimeout @updatePreview, 200 setTimeout @updatePreview, 200
else else
throw e throw e

View file

@ -1,4 +1,4 @@
# coffeelint: disable=camel_case_classes # coffeelint: disable=camel_case_classes,no_interpolation_in_single_quotes
class App.UiElement.autocompletion class App.UiElement.autocompletion
@render: (attribute, params) -> @render: (attribute, params) ->

View file

@ -88,7 +88,7 @@ class App.UiElement.richtext
# Called during upload progress, first parameter # Called during upload progress, first parameter
# is decimal value from 0 to 100. # is decimal value from 0 to 100.
onProgress: (progress, fileSize, uploadedBytes) => onProgress: (progress, fileSize, uploadedBytes) =>
@progressBar.width(parseInt(progress) + "%") @progressBar.width(parseInt(progress) + '%')
@progressText.text(parseInt(progress)) @progressText.text(parseInt(progress))
# hide cancel on 90% # hide cancel on 90%
if parseInt(progress) >= 90 if parseInt(progress) >= 90

View file

@ -5,11 +5,11 @@ class App.UiElement.textarea
item = $( App.view('generic/textarea')( attribute: attribute ) + '<div class="file-uploader ' + attribute.class + '" id="' + fileUploaderId + '"></div>' ) item = $( App.view('generic/textarea')( attribute: attribute ) + '<div class="file-uploader ' + attribute.class + '" id="' + fileUploaderId + '"></div>' )
a = -> a = ->
visible = $( item[0] ).is(":visible") visible = $( item[0] ).is(':visible')
if visible && !$( item[0] ).expanding('active') if visible && !$( item[0] ).expanding('active')
$( item[0] ).expanding() $( item[0] ).expanding()
$( item[0] ).on('focus', -> $( item[0] ).on('focus', ->
visible = $( item[0] ).is(":visible") visible = $( item[0] ).is(':visible')
if visible && !$( item[0] ).expanding('active') if visible && !$( item[0] ).expanding('active')
$( item[0] ).expanding().focus() $( item[0] ).expanding().focus()
) )

View file

@ -448,7 +448,7 @@ class App.TicketCreate extends App.Controller
return return
# if not, show start screen # if not, show start screen
ui.navigate "#" ui.navigate '#'
fail: -> fail: ->
ui.log 'save failed!' ui.log 'save failed!'

View file

@ -314,7 +314,7 @@ class Base extends App.Wizard
logoUrl: logoUrl logoUrl: logoUrl
organization: organization organization: organization
) )
@$("input, select").first().focus() @$('input, select').first().focus()
onLogoPick: (event) => onLogoPick: (event) =>
reader = new FileReader() reader = new FileReader()

View file

@ -180,9 +180,9 @@ class LayoutRefCommunicationReply extends App.ControllerContent
if @content is 'no_content' if @content is 'no_content'
@content = '' @content = ''
else if @content is 'content' else if @content is 'content'
@content = "some content la la la la" @content = 'some content la la la la'
else else
@content = "<p>some</p><p>multiline content</p>1<p>2</p><p>3</p>" @content = '<p>some</p><p>multiline content</p>1<p>2</p><p>3</p>'
@render() @render()
@ -255,7 +255,7 @@ class LayoutRefCommunicationReply extends App.ControllerContent
@attachmentPlaceholder.velocity @attachmentPlaceholder.velocity
properties: properties:
translateX: -@attachmentInputHolder.position().left + "px" translateX: -@attachmentInputHolder.position().left + 'px'
options: options:
duration: duration duration: duration
easing: 'easeOutQuad' easing: 'easeOutQuad'
@ -358,7 +358,7 @@ class LayoutRefCommunicationReply extends App.ControllerContent
return ( size / Math.pow(1024, i) ).toFixed(2) * 1 + ' ' + ['B', 'kB', 'MB', 'GB', 'TB'][i] return ( size / Math.pow(1024, i) ).toFixed(2) * 1 + ' ' + ['B', 'kB', 'MB', 'GB', 'TB'][i]
updateUploadProgress: (progress) => updateUploadProgress: (progress) =>
@progressBar.width(progress + "%") @progressBar.width(progress + '%')
@progressText.text(progress) @progressText.text(progress)
if progress is 100 if progress is 100
@ -553,7 +553,7 @@ class App.ControllerWizard extends App.ControllerContent
button = $(e.currentTarget) button = $(e.currentTarget)
switch button.attr('data-action') switch button.attr('data-action')
when "reveal" then @showNextButton button when 'reveal' then @showNextButton button
showNextButton: (sibling) -> showNextButton: (sibling) ->
sibling.parents('.wizard-slide').find('.btn.hide').removeClass('hide') sibling.parents('.wizard-slide').find('.btn.hide').removeClass('hide')
@ -587,7 +587,7 @@ class ImportWizard extends App.ControllerWizard
@otrsLink.on 'input', _.debounce(@checkOtrsLink, 600) @otrsLink.on 'input', _.debounce(@checkOtrsLink, 600)
checkOtrsLink: (e) => checkOtrsLink: (e) =>
if @otrsLink.val() is "" if @otrsLink.val() is ''
@inputFeedback.attr('data-state', '') @inputFeedback.attr('data-state', '')
return return
@ -802,28 +802,28 @@ class TicketZoomRef extends App.ControllerContent
colors: [ colors: [
{ {
name: 'Yellow' name: 'Yellow'
color: "#f7e7b2" color: '#f7e7b2'
}, },
{ {
name: 'Green' name: 'Green'
color: "#bce7b6" color: '#bce7b6'
}, },
{ {
name: 'Blue' name: 'Blue'
color: "#b3ddf9" color: '#b3ddf9'
}, },
{ {
name: 'Pink' name: 'Pink'
color: "#fea9c5" color: '#fea9c5'
}, },
{ {
name: 'Purple' name: 'Purple'
color: "#eac5ee" color: '#eac5ee'
} }
] ]
activeColorIndex: 0 activeColorIndex: 0
highlightClassPrefix: "highlight-" highlightClassPrefix: 'highlight-'
constructor: -> constructor: ->
super super
@ -1244,7 +1244,7 @@ class CluesRef extends App.ControllerContent
perform: (actions, container) -> perform: (actions, container) ->
for action in actions for action in actions
if action.indexOf(" ") < 0 if action.indexOf(' ') < 0
# 'click' # 'click'
eventName = action eventName = action
target = container target = container
@ -1398,7 +1398,7 @@ class SchedulersRef extends App.ControllerContent
for hour in hours for hour in hours
# split off am/pm # split off am/pm
[hour, suffix] = hour.split(" ") [hour, suffix] = hour.split(' ')
for minute in minutes for minute in minutes
combined = "#{ hour }:#{ minute }" combined = "#{ hour }:#{ minute }"
@ -1434,7 +1434,7 @@ class InputsRef extends App.ControllerContent
name: 'project-name' name: 'project-name'
id: 'project-name-123' id: 'project-name-123'
placeholder: 'Enter Project Name' placeholder: 'Enter Project Name'
options: [{"value":0,"name":"Apple"},{"value":1,"name":"Microsoft","selected":true},{"value":2,"name":"Google"},{"value":3,"name":"Deutsche Bahn"},{"value":4,"name":"Sparkasse"},{"value":5,"name":"Deutsche Post"},{"value":6,"name":"Mitfahrzentrale"},{"value":7,"name":"Starbucks"},{"value":8,"name":"Mac Donalds"},{"value":9,"name":"Flixbus"},{"value":10,"name":"Betahaus"},{"value":11,"name":"Bruno Banani"},{"value":12,"name":"Alpina"},{"value":13,"name":"Samsung"},{"value":14,"name":"ChariTea"},{"value":15,"name":"fritz-kola"},{"value":16,"name":"Vitamin Water"},{"value":17,"name":"Znuny"},{"value":18,"name":"Max & Moritz"}] options: [{value:0,name:'Apple'},{value:1,name:'Microsoft',selected:true},{value:2,name:'Google'},{value:3,name:'Deutsche Bahn'},{value:4,name:'Sparkasse'},{value:5,name:'Deutsche Post'},{value:6,name:'Mitfahrzentrale'},{value:7,name:'Starbucks'},{value:8,name:'Mac Donalds'},{value:9,name:'Flixbus'},{value:10,name:'Betahaus'},{value:11,name:'Bruno Banani'},{value:12,name:'Alpina'},{value:13,name:'Samsung'},{value:14,name:'ChariTea'},{value:15,name:'fritz-kola'},{value:16,name:'Vitamin Water'},{value:17,name:'Znuny'},{value:18,name:'Max & Moritz'}]
@$('.searchableSelectPlaceholder').replaceWith( searchableSelectObject.element() ) @$('.searchableSelectPlaceholder').replaceWith( searchableSelectObject.element() )
# selectable search # selectable search
@ -1493,7 +1493,7 @@ class CalendarSubscriptionsRef extends App.ControllerContent
if data.length is 0 if data.length is 0
@output @output
.attr 'disabled', true .attr 'disabled', true
.text "No subscriptions active" .text 'No subscriptions active'
return return
# check if all my tickets got selected # check if all my tickets got selected
@ -1502,21 +1502,21 @@ class CalendarSubscriptionsRef extends App.ControllerContent
if own.length > 0 if own.length > 0
if own.length is optionCount if own.length is optionCount
modules.push "all my tickets" modules.push 'all my tickets'
else else
modules.push.apply modules, own.map (entry) -> modules.push.apply modules, own.map (entry) ->
[option, value] = entry.name.split('/') [option, value] = entry.name.split('/')
return "#{ translationTable[value] } #{ translationTable[option] }" return "#{ translationTable[value] } #{ translationTable[option] }"
modules[modules.length-1] += " tickets" modules[modules.length-1] += ' tickets'
if not_assigned.length > 0 if not_assigned.length > 0
if not_assigned.length is optionCount if not_assigned.length is optionCount
modules.push "all not assigned tickets" modules.push 'all not assigned tickets'
else else
modules.push.apply modules, not_assigned.map (entry) -> modules.push.apply modules, not_assigned.map (entry) ->
[option, value] = entry.name.split('/') [option, value] = entry.name.split('/')
return "#{ translationTable[value] } #{ translationTable[option] }" return "#{ translationTable[value] } #{ translationTable[option] }"
modules[modules.length-1] += " tickets" modules[modules.length-1] += ' tickets'
@output @output
.attr 'disabled', false .attr 'disabled', false

View file

@ -99,7 +99,7 @@ class Index extends App.ControllerContent
# reset # reset
@Config.set( 'requested_url', '' ) @Config.set( 'requested_url', '' )
else else
@log 'notice', "REDIRECT to -#/-" @log 'notice', 'REDIRECT to -#/-'
@navigate '#/' @navigate '#/'
error: (xhr, statusText, error) => error: (xhr, statusText, error) =>

View file

@ -1,3 +1,4 @@
# coffeelint: disable=duplicate_key
class Index extends App.ControllerTabs class Index extends App.ControllerTabs
header: 'Object Manager' header: 'Object Manager'
constructor: -> constructor: ->

View file

@ -67,7 +67,7 @@ class App.TaskbarWidget extends App.Controller
for item in items for item in items
key = $(item).data('key') key = $(item).data('key')
if !key if !key
throw "No such key attributes found for task item" throw 'No such key attributes found for task item'
order.push key order.push key
App.TaskManager.reorder( order ) App.TaskManager.reorder( order )
@ -78,7 +78,7 @@ class App.TaskbarWidget extends App.Controller
if !key if !key
key = $(e.target).parents('a').data('key') key = $(e.target).parents('a').data('key')
if !key if !key
throw "No such key attributes found for task item" throw 'No such key attributes found for task item'
# check if input has changed # check if input has changed
worker = App.TaskManager.worker( key ) worker = App.TaskManager.worker( key )

View file

@ -511,7 +511,7 @@ class App.TicketZoom extends App.Controller
# validate article # validate article
articleParams = @formParam( @$('.article-add') ) articleParams = @formParam( @$('.article-add') )
console.log "submit article", articleParams console.log 'submit article', articleParams
if articleParams['body'] if articleParams['body']
articleParams.from = @Session.get().displayName() articleParams.from = @Session.get().displayName()
articleParams.ticket_id = ticket.id articleParams.ticket_id = ticket.id

View file

@ -202,7 +202,7 @@ class App.TicketZoomArticleNew extends App.Controller
# Called during upload progress, first parameter # Called during upload progress, first parameter
# is decimal value from 0 to 100. # is decimal value from 0 to 100.
onProgress: (progress, fileSize, uploadedBytes) => onProgress: (progress, fileSize, uploadedBytes) =>
@progressBar.width(parseInt(progress) + "%") @progressBar.width(parseInt(progress) + '%')
@progressText.text(parseInt(progress)) @progressText.text(parseInt(progress))
# hide cancel on 90% # hide cancel on 90%
if parseInt(progress) >= 90 if parseInt(progress) >= 90
@ -250,7 +250,7 @@ class App.TicketZoomArticleNew extends App.Controller
@recipientListArrow.css('top', arrowCenter) @recipientListArrow.css('top', arrowCenter)
@recipientList.css('top', top) @recipientList.css('top', top)
$.Velocity.hook(@recipientList, 'transformOriginX', "0") $.Velocity.hook(@recipientList, 'transformOriginX', '0')
$.Velocity.hook(@recipientList, 'transformOriginY', "#{ arrowCenter }px") $.Velocity.hook(@recipientList, 'transformOriginY', "#{ arrowCenter }px")
@recipientList.velocity @recipientList.velocity
@ -288,7 +288,7 @@ class App.TicketZoomArticleNew extends App.Controller
add_recipient: (e) -> add_recipient: (e) ->
e.stopPropagation() e.stopPropagation()
e.preventDefault() e.preventDefault()
console.log "add recipient", e console.log 'add recipient', e
# store recipient # store recipient
toggleVisibility: -> toggleVisibility: ->
@ -297,14 +297,14 @@ class App.TicketZoomArticleNew extends App.Controller
.removeClass 'is-public' .removeClass 'is-public'
.addClass 'is-internal' .addClass 'is-internal'
@$('[name="internal"]').val 'true' @$('[name=internal]').val 'true'
else else
@articleNewEdit @articleNewEdit
.addClass 'is-public' .addClass 'is-public'
.removeClass 'is-internal' .removeClass 'is-internal'
@$('[name="internal"]').val '' @$('[name=internal]').val ''
showSelectableArticleType: => showSelectableArticleType: =>
@el.find('.js-articleTypes').removeClass('is-hidden') @el.find('.js-articleTypes').removeClass('is-hidden')
@ -328,7 +328,7 @@ class App.TicketZoomArticleNew extends App.Controller
setArticleType: (type) -> setArticleType: (type) ->
typeIcon = @$('.js-selectedType') typeIcon = @$('.js-selectedType')
@type = type @type = type
@$('[name="type"]').val(type) @$('[name=type]').val(type)
@articleNewEdit.attr('data-type', type) @articleNewEdit.attr('data-type', type)
typeIcon.find('use').attr 'xlink:href', "#icon-#{@type}" typeIcon.find('use').attr 'xlink:href', "#icon-#{@type}"
@ -340,7 +340,7 @@ class App.TicketZoomArticleNew extends App.Controller
@$("[name=#{name}]").closest('.form-group').removeClass('hide') @$("[name=#{name}]").closest('.form-group').removeClass('hide')
# check if signature need to be added # check if signature need to be added
body = @$('[data-name="body"]').html() || '' body = @$('[data-name=body]').html() || ''
signature = undefined signature = undefined
if @ticket.group.signature_id if @ticket.group.signature_id
signature = App.Signature.find( @ticket.group.signature_id ) signature = App.Signature.find( @ticket.group.signature_id )
@ -352,11 +352,11 @@ class App.TicketZoomArticleNew extends App.Controller
if !App.Utils.lastLineEmpty(body) if !App.Utils.lastLineEmpty(body)
body = body + '<br>' body = body + '<br>'
body = body + "<div data-signature=\"true\" data-signature-id=\"#{signature.id}\">#{signatureFinished}</div>" body = body + "<div data-signature=\"true\" data-signature-id=\"#{signature.id}\">#{signatureFinished}</div>"
@$('[data-name="body"]').html(body) @$('[data-name=body]').html(body)
# remove old signature # remove old signature
else else
@$('[data-name="body"]').find("[data-signature=true]").remove() @$('[data-name=body]').find('[data-signature=true]').remove()
detectEmptyTextarea: => detectEmptyTextarea: =>
if !@textarea.text().trim() if !@textarea.text().trim()
@ -389,7 +389,7 @@ class App.TicketZoomArticleNew extends App.Controller
easing: 'easeOutQuad' easing: 'easeOutQuad'
# scroll to bottom # scroll to bottom
@textarea.velocity "scroll", @textarea.velocity 'scroll',
container: @textarea.scrollParent() container: @textarea.scrollParent()
offset: 99999 offset: 99999
duration: 300 duration: 300
@ -411,7 +411,7 @@ class App.TicketZoomArticleNew extends App.Controller
# move attachment text to the left bottom (bottom happens automatically) # move attachment text to the left bottom (bottom happens automatically)
@attachmentPlaceholder.velocity @attachmentPlaceholder.velocity
properties: properties:
translateX: -@attachmentInputHolder.position().left + "px" translateX: -@attachmentInputHolder.position().left + 'px'
options: options:
duration: duration duration: duration
easing: 'easeOutQuad' easing: 'easeOutQuad'

View file

@ -192,7 +192,7 @@ class ArticleViewItem extends App.Controller
article.removeClass('state--folde-out') article.removeClass('state--folde-out')
# scroll back up # scroll back up
article.velocity "scroll", article.velocity 'scroll',
container: article.scrollParent() container: article.scrollParent()
offset: -article.offset().top - metaTop.outerHeight() offset: -article.offset().top - metaTop.outerHeight()
duration: animSpeed duration: animSpeed
@ -224,7 +224,7 @@ class ArticleViewItem extends App.Controller
metaTop.removeClass('hide') metaTop.removeClass('hide')
# balance out the top meta height by scrolling down # balance out the top meta height by scrolling down
article.velocity("scroll", article.velocity('scroll',
container: article.scrollParent() container: article.scrollParent()
offset: -article.offset().top + metaTop.outerHeight() offset: -article.offset().top + metaTop.outerHeight()
duration: animSpeed duration: animSpeed

View file

@ -15,6 +15,6 @@ class Widget
| Your Zammad Team! | Your Zammad Team!
| |
""" """
console.log(banner, "text-decoration: underline;", "text-decoration: none;") console.log(banner, 'text-decoration: underline;', 'text-decoration: none;')
App.Config.set('hello_banner', Widget, 'Widgets') App.Config.set('hello_banner', Widget, 'Widgets')

View file

@ -164,7 +164,7 @@ class App.OnlineNotificationWidget extends App.Controller
container: 'body' container: 'body'
html: true html: true
placement: 'right' placement: 'right'
viewport: { "selector": "#app", "padding": 10 } viewport: { selector: '#app', padding: 10 }
template: App.view('widget/online_notification')() template: App.view('widget/online_notification')()
title: ' ' title: ' '
content: ' ' content: ' '

View file

@ -26,11 +26,11 @@ class App.TicketStats extends App.Controller
load: (object) => load: (object) =>
if @organization if @organization
ajaxKey = "org_" + @organization.id ajaxKey = "org_#{@organization.id}"
data = data =
organization_id: @organization.id organization_id: @organization.id
else else
ajaxKey = "user_" + @user.id ajaxKey = "user_#{@user.id}"
data = data =
user_id: @user.id user_id: @user.id
organization_id: @user.organization_id organization_id: @user.organization_id

View file

@ -95,7 +95,7 @@ class _Singleton
if !@moduleColorsMap[module] if !@moduleColorsMap[module]
@moduleColorsMap[module]= @yieldColor() @moduleColorsMap[module]= @yieldColor()
color = @moduleColorsMap[module] color = @moduleColorsMap[module]
colorString = "color: hsl(" + (color) + ",99%,40%); font-weight: bold" colorString = 'color: hsl(' + (color) + ',99%,40%); font-weight: bold'
logArgs = [prefix, colorString].concat(args) logArgs = [prefix, colorString].concat(args)
else else
logArgs = [prefix].concat(args) logArgs = [prefix].concat(args)

View file

@ -130,7 +130,7 @@ class _trackSingleton
newDataNew.push item newDataNew.push item
catch e catch e
# nothing console.log 'error', e
App.Ajax.request( App.Ajax.request(
type: 'POST' type: 'POST'

View file

@ -12,11 +12,11 @@ class App.PrettyDate
if diff > 0 if diff > 0
escalated = '-' escalated = '-'
if diff >= 0 if diff >= 0
style = "class=\"label label-danger\"" style = 'class="label label-danger"'
else if diff > -60 * 60 else if diff > -60 * 60
style = "class=\"label label-warning\"" style = 'class="label label-warning"'
else else
style = "class=\"label label-success\"" style = 'class="label label-success"'
# remember past/future # remember past/future
direction = 'future' direction = 'future'

View file

@ -1,3 +1,4 @@
# coffeelint: disable=no_unnecessary_double_quotes
class App.Utils class App.Utils
# textCleand = App.Utils.textCleanup( rawText ) # textCleand = App.Utils.textCleanup( rawText )

View file

@ -272,7 +272,7 @@ class _webSocketSingleton extends App.Controller
App.Delay.set @connect, 4500, 'websocket-try-reconnect-after-x-sec', 'ws' App.Delay.set @connect, 4500, 'websocket-try-reconnect-after-x-sec', 'ws'
@ws.onerror = (e) => @ws.onerror = (e) =>
@log 'debug', "ws:onerror", e @log 'debug', 'ws:onerror', e
_receiveMessage: (data = []) => _receiveMessage: (data = []) =>
@ -289,17 +289,17 @@ class _webSocketSingleton extends App.Controller
# fill collection # fill collection
if item['collection'] if item['collection']
@log 'debug', "onmessage collection:" + item['collection'] @log 'debug', 'onmessage collection:' + item['collection']
App.Store.write( item['collection'], item['data'] ) App.Store.write( item['collection'], item['data'] )
# fire event # fire event
if item['event'] if item['event']
if typeof item['event'] is 'object' if typeof item['event'] is 'object'
for event in item['event'] for event in item['event']
@log 'debug', "onmessage event:" + event @log 'debug', 'onmessage event:' + event
App.Event.trigger( event, item['data'] ) App.Event.trigger( event, item['data'] )
else else
@log 'debug', "onmessage event:" + item['event'] @log 'debug', 'onmessage event:' + item['event']
App.Event.trigger( item['event'], item['data'] ) App.Event.trigger( item['event'], item['data'] )
_ajaxInit: (data = {}) => _ajaxInit: (data = {}) =>

View file

@ -1,4 +1,4 @@
# coffeelint: disable=no_this,indentation # coffeelint: disable=no_this,indentation,no_unnecessary_double_quotes
Spine = @Spine or require('spine') Spine = @Spine or require('spine')
$ = Spine.$ $ = Spine.$
Model = Spine.Model Model = Spine.Model

View file

@ -1,3 +1,4 @@
# coffeelint: disable=,arrow_spacing
Spine = @Spine or require('spine') Spine = @Spine or require('spine')
Spine.Model.Local = Spine.Model.Local =

View file

@ -1,4 +1,4 @@
# coffeelint: disable=no_this,indentation # coffeelint: disable=no_this,indentation,arrow_spacing
Spine = @Spine or require('spine') Spine = @Spine or require('spine')
$ = Spine.$ $ = Spine.$

View file

@ -1,4 +1,4 @@
# coffeelint: disable=no_this # coffeelint: disable=no_this,arrow_spacing,no_unnecessary_double_quotes
### ###
Spine.js MVC library Spine.js MVC library
Released under the MIT License Released under the MIT License

View file

@ -42,6 +42,6 @@ Mit **Organisationen** können Sie Kunden **gruppieren**. Dies hat u. a. zwei be
searchResultAttributes: -> searchResultAttributes: ->
display: "#{@displayName()}" display: "#{@displayName()}"
id: @id id: @id
class: "organization organization-popover" class: 'organization organization-popover'
url: @uiUrl() url: @uiUrl()
iconClass: "organization" iconClass: 'organization'

View file

@ -56,4 +56,4 @@ class App.Ticket extends App.Model
id: @id id: @id
class: "level-#{@level()} ticket-popover" class: "level-#{@level()} ticket-popover"
url: @uiUrl() url: @uiUrl()
iconClass: "priority" iconClass: 'priority'

View file

@ -82,7 +82,7 @@ class App.User extends App.Model
vip = false vip = false
data = "data-id=\"#{@id}\"" data = "data-id=\"#{@id}\""
else else
cssClass += " user-popover" cssClass += ' user-popover'
data = "data-id=\"#{@id}\"" data = "data-id=\"#{@id}\""
else else
vip = false vip = false
@ -129,6 +129,6 @@ class App.User extends App.Model
searchResultAttributes: -> searchResultAttributes: ->
display: "#{@displayName()}" display: "#{@displayName()}"
id: @id id: @id
class: "user user-popover" class: 'user user-popover'
url: @uiUrl() url: @uiUrl()
iconClass: "user" iconClass: 'user'

View file

@ -1,6 +1,6 @@
{ {
"arrow_spacing": { "arrow_spacing": {
"level": "ignore" "level": "error"
}, },
"braces_spacing": { "braces_spacing": {
"level": "ignore", "level": "ignore",
@ -31,7 +31,7 @@
"level": "ignore" "level": "ignore"
}, },
"ensure_comprehensions": { "ensure_comprehensions": {
"level": "warn" "level": "error"
}, },
"eol_last": { "eol_last": {
"level": "ignore" "level": "ignore"
@ -41,7 +41,7 @@
"level": "error" "level": "error"
}, },
"line_endings": { "line_endings": {
"level": "ignore", "level": "error",
"value": "unix" "value": "unix"
}, },
"max_line_length": { "max_line_length": {
@ -61,14 +61,14 @@
"level": "error" "level": "error"
}, },
"no_debugger": { "no_debugger": {
"level": "warn", "level": "error",
"console": false "console": false
}, },
"no_empty_functions": { "no_empty_functions": {
"level": "ignore" "level": "ignore"
}, },
"no_empty_param_list": { "no_empty_param_list": {
"level": "warn" "level": "error"
}, },
"no_implicit_braces": { "no_implicit_braces": {
"level": "ignore", "level": "ignore",
@ -79,16 +79,16 @@
"level": "ignore" "level": "ignore"
}, },
"no_interpolation_in_single_quotes": { "no_interpolation_in_single_quotes": {
"level": "warn" "level": "error"
}, },
"no_nested_string_interpolation": { "no_nested_string_interpolation": {
"level": "warn" "level": "error"
}, },
"no_plusplus": { "no_plusplus": {
"level": "ignore" "level": "ignore"
}, },
"no_private_function_fat_arrows": { "no_private_function_fat_arrows": {
"level": "warn" "level": "error"
}, },
"no_stand_alone_at": { "no_stand_alone_at": {
"level": "ignore" "level": "ignore"
@ -97,7 +97,7 @@
"level": "error" "level": "error"
}, },
"no_this": { "no_this": {
"level": "warn" "level": "error"
}, },
"no_throwing_strings": { "no_throwing_strings": {
"level": "ignore" "level": "ignore"
@ -111,10 +111,10 @@
"allowed_in_empty_lines": true "allowed_in_empty_lines": true
}, },
"no_unnecessary_double_quotes": { "no_unnecessary_double_quotes": {
"level": "ignore" "level": "error"
}, },
"no_unnecessary_fat_arrows": { "no_unnecessary_fat_arrows": {
"level": "warn" "level": "error"
}, },
"non_empty_constructor_needs_parens": { "non_empty_constructor_needs_parens": {
"level": "ignore" "level": "ignore"
@ -130,6 +130,6 @@
"level": "ignore" "level": "ignore"
}, },
"transform_messes_up_line_numbers": { "transform_messes_up_line_numbers": {
"level": "warn" "level": "error"
} }
} }