Merge branch 'develop' of https://github.com/martini/zammad into develop

This commit is contained in:
Johannes Nickel 2015-01-13 22:12:18 +01:00
commit b16edda8d4
11 changed files with 277 additions and 81 deletions

View file

@ -3,10 +3,10 @@ class App.TicketCreate extends App.Controller
'.tabsSidebar' : 'sidebar' '.tabsSidebar' : 'sidebar'
events: events:
'click .type-tabs .tab': 'changeFormType' 'click .type-tabs .tab': 'changeFormType'
'submit form': 'submit' 'submit form': 'submit'
'click .submit': 'submit' 'click .submit': 'submit'
'click .cancel': 'cancel' 'click .cancel': 'cancel'
constructor: (params) -> constructor: (params) ->
super super
@ -87,6 +87,9 @@ class App.TicketCreate extends App.Controller
# update form # update form
@el.find('[name="formSenderType"]').val(type) @el.find('[name="formSenderType"]').val(type)
# force changing signature
@el.find('[name="group_id"]').trigger('change')
meta: => meta: =>
text = '' text = ''
if @articleAttributes if @articleAttributes
@ -167,10 +170,10 @@ class App.TicketCreate extends App.Controller
a = App.TicketArticle.find( params.article_id ) a = App.TicketArticle.find( params.article_id )
# reset owner # reset owner
t.owner_id = 0 t.owner_id = 0
t.customer_id_autocompletion = a.from t.customer_id_completion = a.from
t.subject = a.subject || t.title t.subject = a.subject || t.title
t.body = a.body t.body = a.body
# render page # render page
@render( options: t ) @render( options: t )
@ -191,10 +194,10 @@ class App.TicketCreate extends App.Controller
@form_id = App.ControllerForm.formId() @form_id = App.ControllerForm.formId()
@html App.view('agent_ticket_create')( @html App.view('agent_ticket_create')(
head: 'New Ticket' head: 'New Ticket'
agent: @isRole('Agent') agent: @isRole('Agent')
admin: @isRole('Admin') admin: @isRole('Admin')
form_id: @form_id form_id: @form_id
) )
formChanges = (params, attribute, attributes, classname, form, ui) => formChanges = (params, attribute, attributes, classname, form, ui) =>
@ -220,6 +223,44 @@ class App.TicketCreate extends App.Controller
# replace new option list # replace new option list
form.find('[name="' + fieldNameToChange + '"]').closest('.form-group').replaceWith( newElement ) form.find('[name="' + fieldNameToChange + '"]').closest('.form-group').replaceWith( newElement )
signatureChanges = (params, attribute, attributes, classname, form, ui) =>
if attribute && attribute.name is 'group_id'
signature = undefined
if params['group_id']
group = App.Group.find( params['group_id'] )
if group && group.signature_id
signature = App.Signature.find( group.signature_id )
# check if signature need to be added
type = @$('[name="formSenderType"]').val()
if signature isnt undefined && signature.body && type is 'email-out'
signatureFinished = App.Utils.text2html(
App.Utils.replaceTags( signature.body, { user: App.Session.get() } )
)
# get current body
body = @$('[data-name="body"]').html() || ''
if App.Utils.signatureCheck( body, signatureFinished )
# if signature has changed, replace it
signature_id = @$('[data-signature=true]').data('signature-id')
if signature_id && signature_id.toString() isnt signature.id.toString()
# remove old signature
@$('[data-signature="true"]').remove()
body = @$('[data-name="body"]').html() || ''
if !App.Utils.lastLineEmpty(body)
body = body + '<br>'
body = body + "<div data-signature=\"true\" data-signature-id=\"#{signature.id}\">#{signatureFinished}</div>"
@$('[data-name="body"]').html(body)
# remove old signature
else
@$('[data-name="body"]').find('[data-signature=true]').remove()
new App.ControllerForm( new App.ControllerForm(
el: @el.find('.ticket-form-top') el: @el.find('.ticket-form-top')
form_id: @form_id form_id: @form_id
@ -228,7 +269,8 @@ class App.TicketCreate extends App.Controller
events: events:
'change [name=customer_id]': @localUserInfo 'change [name=customer_id]': @localUserInfo
handlers: [ handlers: [
formChanges formChanges,
signatureChanges,
] ]
filter: @form_meta.filter filter: @form_meta.filter
autofocus: true autofocus: true
@ -236,21 +278,22 @@ class App.TicketCreate extends App.Controller
) )
new App.ControllerForm( new App.ControllerForm(
el: @el.find('.article-form-top') el: @el.find('.article-form-top')
form_id: @form_id form_id: @form_id
model: App.TicketArticle model: App.TicketArticle
screen: 'create_top' screen: 'create_top'
params: params params: params
) )
new App.ControllerForm( new App.ControllerForm(
el: @el.find('.ticket-form-middle') el: @el.find('.ticket-form-middle')
form_id: @form_id form_id: @form_id
model: App.Ticket model: App.Ticket
screen: 'create_middle' screen: 'create_middle'
events: events:
'change [name=customer_id]': @localUserInfo 'change [name=customer_id]': @localUserInfo
handlers: [ handlers: [
formChanges formChanges,
signatureChanges,
] ]
filter: @form_meta.filter filter: @form_meta.filter
params: params params: params
@ -264,7 +307,8 @@ class App.TicketCreate extends App.Controller
events: events:
'change [name=customer_id]': @localUserInfo 'change [name=customer_id]': @localUserInfo
handlers: [ handlers: [
formChanges formChanges,
signatureChanges,
] ]
filter: @form_meta.filter filter: @form_meta.filter
params: params params: params
@ -330,7 +374,7 @@ class App.TicketCreate extends App.Controller
if sender.name is 'Customer' if sender.name is 'Customer'
params['article'] = { params['article'] = {
to: (group && group.name) || '' to: (group && group.name) || ''
from: params.customer_id_autocompletion from: params.customer_id_completion
cc: params.cc cc: params.cc
subject: params.subject subject: params.subject
body: params.body body: params.body
@ -342,7 +386,7 @@ class App.TicketCreate extends App.Controller
else else
params['article'] = { params['article'] = {
from: (group && group.name) || '' from: (group && group.name) || ''
to: params.customer_id_autocompletion to: params.customer_id_completion
cc: params.cc cc: params.cc
subject: params.subject subject: params.subject
body: params.body body: params.body

View file

@ -18,10 +18,9 @@ class App.TicketZoom extends App.Controller
@navupdate '#' @navupdate '#'
@form_meta = undefined @form_meta = undefined
@ticket_id = params.ticket_id @ticket_id = params.ticket_id
@article_id = params.article_id @article_id = params.article_id
@signature = undefined
@key = 'ticket::' + @ticket_id @key = 'ticket::' + @ticket_id
cache = App.Store.get( @key ) cache = App.Store.get( @key )
@ -137,9 +136,6 @@ class App.TicketZoom extends App.Controller
# get edit form attributes # get edit form attributes
@form_meta = data.form_meta @form_meta = data.form_meta
# get signature
@signature = data.signature
# load assets # load assets
App.Collection.loadAssets( data.assets ) App.Collection.loadAssets( data.assets )
@ -860,14 +856,15 @@ class Edit extends App.Controller
if data.ticket.id is @ticket.id if data.ticket.id is @ticket.id
#@setArticleType(data.type.name) #@setArticleType(data.type.name)
# preselect article type
@setArticleType( 'email' )
@open_textarea(null, true) @open_textarea(null, true)
for key, value of data.article for key, value of data.article
if key is 'body' if key is 'body'
@$('[data-name="' + key + '"]').html(value) @$('[data-name="' + key + '"]').html(value)
else else
@$('[name="' + key + '"]').val(value) @$('[name="' + key + '"]').val(value)
# preselect article type
@setArticleType( 'email' )
) )
isIE10: -> isIE10: ->
@ -905,7 +902,7 @@ class Edit extends App.Controller
@$('[data-name="body"]').ce({ @$('[data-name="body"]').ce({
mode: 'richtext' mode: 'richtext'
multiline: true multiline: true
maxlength: 2500 maxlength: 5000
}) })
html5Upload.initialize( html5Upload.initialize(
@ -1075,10 +1072,29 @@ class Edit extends App.Controller
# show/hide attributes # show/hide attributes
for articleType in @articleTypes for articleType in @articleTypes
if articleType.name is type if articleType.name is type
@$(".form-group").addClass('hide') @$('.form-group').addClass('hide')
for name in articleType.attributes for name in articleType.attributes
@$("[name=#{name}]").closest('.form-group').removeClass('hide') @$("[name=#{name}]").closest('.form-group').removeClass('hide')
# check if signature need to be added
body = @$('[data-name="body"]').html() || ''
signature = undefined
if @ticket.group.signature_id
signature = App.Signature.find( @ticket.group.signature_id )
if signature && signature.body && @type is 'email'
signatureFinished = App.Utils.text2html(
App.Utils.replaceTags( signature.body, { user: App.Session.get(), ticket: @ticket } )
)
if App.Utils.signatureCheck( body, signatureFinished )
if !App.Utils.lastLineEmpty(body)
body = body + '<br>'
body = body + "<div data-signature=\"true\" data-signature-id=\"#{signature.id}\">#{signatureFinished}</div>"
@$('[data-name="body"]').html(body)
# remove old signature
else
@$('[data-name="body"]').find("[data-signature=true]").remove()
detect_empty_textarea: => detect_empty_textarea: =>
if !@textarea.text().trim() if !@textarea.text().trim()
@add_textarea_catcher() @add_textarea_catcher()
@ -1246,7 +1262,7 @@ class ArticleView extends App.Controller
'click .show_toogle': 'show_toogle' 'click .show_toogle': 'show_toogle'
'click [data-type=reply]': 'reply' 'click [data-type=reply]': 'reply'
'click [data-type=replyAll]': 'replyAll' 'click [data-type=replyAll]': 'replyAll'
'click .text-bubble': 'toggle_meta' 'click .text-bubble': 'toggle_meta_with_delay'
'click .text-bubble a': 'stopPropagation' 'click .text-bubble a': 'stopPropagation'
constructor: -> constructor: ->
@ -1311,7 +1327,17 @@ class ArticleView extends App.Controller
stopPropagation: (e) -> stopPropagation: (e) ->
e.stopPropagation() e.stopPropagation()
toggle_meta: (e) -> toggle_meta_with_delay: (e) =>
# allow double click select
# by adding a delay to the toggle
if @lastClick and +new Date - @lastClick < 150
clearTimeout(@toggleMetaTimeout)
else
@toggleMetaTimeout = setTimeout(@toggle_meta, 150, e)
@lastClick = +new Date
toggle_meta: (e) =>
e.preventDefault() e.preventDefault()
animSpeed = 300 animSpeed = 300
@ -1488,12 +1514,6 @@ class ArticleView extends App.Controller
# get current body # get current body
body = @ui.el.find('[data-name="body"]').html() || '' body = @ui.el.find('[data-name="body"]').html() || ''
# check if signature need to be added
if @ui.signature && @ui.signature.body && type.name is 'email'
signature = App.Utils.text2html( @ui.signature.body )
if App.Utils.signatureCheck( body, signature )
body = body + signature
# check if quote need to be added # check if quote need to be added
selectedText = App.ClipBoard.getSelected() selectedText = App.ClipBoard.getSelected()
if selectedText if selectedText

View file

@ -166,3 +166,27 @@ class App.Utils
else else
true true
# textReplaced = App.Utils.replaceTags( template, { user: { firstname: 'Bob', lastname: 'Smith' } } )
@replaceTags: (template, objects) ->
template = template.replace( /#\{\s{0,2}(.+?)\s{0,2}\}/g, ( index, key ) ->
levels = key.split(/\./)
dataRef = objects
for level in levels
if dataRef[level]
dataRef = dataRef[level]
if typeof dataRef is 'function'
value = dataRef()
else if typeof dataRef is 'string'
value = dataRef
else
value = ''
#console.log( "tag replacement #{key}, #{value} env: ", objects)
value
)
# true|false = App.Utils.lastLineEmpty( message )
@lastLineEmpty: (message) ->
messageCleanup = message.replace(/>\s+</g, '><').replace(/(\n|\r|\t)/g, '').trim()
return true if messageCleanup.match(/<(br|\s+?|\/)>$/im)
return true if messageCleanup.match(/<div(|\s.+?)><\/div>$/im)
false

View file

@ -2041,10 +2041,6 @@ footer {
text-decoration: none; text-decoration: none;
} }
.task .modified.priority.icon {
margin-right: 8px;
}
.task.active { .task.active {
background: #389ed9; background: #389ed9;
} }

View file

@ -59,7 +59,7 @@ class LongPollingController < ApplicationController
user_id = session[:user_id] user_id = session[:user_id]
user = {} user = {}
if user_id if user_id
user = User.find( user_id ) user = User.find( user_id ).attributes
end end
log 'notice', "send auth login (user_id #{user_id})", client_id log 'notice', "send auth login (user_id #{user_id})", client_id
Sessions.create( client_id, user, { :type => 'ajax' } ) Sessions.create( client_id, user, { :type => 'ajax' } )

View file

@ -228,22 +228,6 @@ class TicketsController < ApplicationController
ticket = Ticket.find( params[:id] ) ticket = Ticket.find( params[:id] )
return if !ticket_permission( ticket ) return if !ticket_permission( ticket )
# get signature
signature = {}
if ticket.group.signature
signature = ticket.group.signature.attributes
# replace tags
signature['body'] = NotificationFactory.build(
:locale => current_user.preferences[:locale],
:string => signature['body'],
:objects => {
:ticket => ticket,
:user => current_user,
}
)
end
# get attributes to update # get attributes to update
attributes_to_change = Ticket::ScreenOptions.attributes_to_change( :user => current_user, :ticket => ticket ) attributes_to_change = Ticket::ScreenOptions.attributes_to_change( :user => current_user, :ticket => ticket )
@ -292,7 +276,6 @@ class TicketsController < ApplicationController
render :json => { render :json => {
:ticket_id => ticket.id, :ticket_id => ticket.id,
:ticket_article_ids => article_ids, :ticket_article_ids => article_ids,
:signature => signature,
:assets => assets, :assets => assets,
:links => link_list, :links => link_list,
:tags => tags, :tags => tags,

View file

@ -37,7 +37,7 @@ returns
:user => session, :user => session,
:meta => meta, :meta => meta,
} }
file.write Marshal.dump(data) file.write data.to_json
} }
# send update to browser # send update to browser
@ -195,7 +195,7 @@ returns
path = @path + '/' + client_id.to_s path = @path + '/' + client_id.to_s
data[:meta][:last_ping] = Time.new.to_i.to_s data[:meta][:last_ping] = Time.new.to_i.to_s
File.open( path + '/session', 'wb' ) { |file| File.open( path + '/session', 'wb' ) { |file|
file.write Marshal.dump(data) file.write data.to_json
} }
true true
end end
@ -234,7 +234,11 @@ returns
file.flock( File::LOCK_EX ) file.flock( File::LOCK_EX )
all = file.read all = file.read
file.flock( File::LOCK_UN ) file.flock( File::LOCK_UN )
data = Marshal.load( all ) dataJSON = JSON.parse( all )
if dataJSON
data = self.symbolize_keys(dataJSON)
data[:user] = dataJSON['user'] # for compat. reasons
end
} }
rescue Exception => e rescue Exception => e
puts e.inspect puts e.inspect
@ -567,4 +571,19 @@ returns
puts "/LOOP #{client_id} - #{try_count}" puts "/LOOP #{client_id} - #{try_count}"
end end
def self.symbolize_keys(hash)
hash.inject({}){|result, (key, value)|
new_key = case key
when String then key.to_sym
else key
end
new_value = case value
when Hash then symbolize_keys(value)
else value
end
result[new_key] = new_value
result
}
end
end end

View file

@ -48,11 +48,11 @@
<path d="M302.175676,150.983471 C302.783784,150.586777 303.290541,149.991736 303.594595,149.297521 C302.986486,149.694215 302.277027,149.892562 301.567568,149.991736 C300.959459,149.396694 300.148649,149 299.337838,149 C297.614865,149 296.195946,150.38843 296.195946,152.07438 C296.195946,152.272727 296.195946,152.570248 296.297297,152.768595 C293.662162,152.669421 291.432432,151.380165 289.912162,149.595041 C289.608108,150.090909 289.506757,150.586777 289.506757,151.082645 C289.506757,152.173554 290.013514,153.066116 290.925676,153.661157 C290.418919,153.661157 289.912162,153.46281 289.506757,153.264463 C289.506757,154.752066 290.621622,155.942149 292.040541,156.239669 C291.736486,156.338843 291.533784,156.338843 291.22973,156.338843 C291.027027,156.338843 290.824324,156.338843 290.621622,156.239669 C291.027027,157.429752 292.141892,158.322314 293.560811,158.322314 C292.445946,159.115702 291.128378,159.61157 289.709459,159.61157 L289,159.61157 C290.418919,160.504132 292.040541,161 293.763514,161 C299.540541,161 302.581081,156.338843 302.581081,152.371901 L302.581081,151.975207 C303.087838,151.578512 303.594595,151.082645 304,150.487603 C303.391892,150.68595 302.885135,150.884298 302.175676,150.983471 L302.175676,150.983471 L302.175676,150.983471 Z" id="white-twitter" fill="#FFFFFF" sketch:type="MSShapeGroup"></path> <path d="M302.175676,150.983471 C302.783784,150.586777 303.290541,149.991736 303.594595,149.297521 C302.986486,149.694215 302.277027,149.892562 301.567568,149.991736 C300.959459,149.396694 300.148649,149 299.337838,149 C297.614865,149 296.195946,150.38843 296.195946,152.07438 C296.195946,152.272727 296.195946,152.570248 296.297297,152.768595 C293.662162,152.669421 291.432432,151.380165 289.912162,149.595041 C289.608108,150.090909 289.506757,150.586777 289.506757,151.082645 C289.506757,152.173554 290.013514,153.066116 290.925676,153.661157 C290.418919,153.661157 289.912162,153.46281 289.506757,153.264463 C289.506757,154.752066 290.621622,155.942149 292.040541,156.239669 C291.736486,156.338843 291.533784,156.338843 291.22973,156.338843 C291.027027,156.338843 290.824324,156.338843 290.621622,156.239669 C291.027027,157.429752 292.141892,158.322314 293.560811,158.322314 C292.445946,159.115702 291.128378,159.61157 289.709459,159.61157 L289,159.61157 C290.418919,160.504132 292.040541,161 293.763514,161 C299.540541,161 302.581081,156.338843 302.581081,152.371901 L302.581081,151.975207 C303.087838,151.578512 303.594595,151.082645 304,150.487603 C303.391892,150.68595 302.885135,150.884298 302.175676,150.983471 L302.175676,150.983471 L302.175676,150.983471 Z" id="white-twitter" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
<path d="M321.477026,147.553638 L315.974463,153.109896 L317.159843,154.306505 L322.662407,148.750246 L321.477026,147.553638 L321.477026,147.553638 Z M314.68,154.365057 L314.68,155.542857 L315.88896,155.542857 L316.48144,154.953957 L315.28432,153.826257 L314.68,154.365057 L314.68,154.365057 Z M317.07408,156.592857 L313.56,156.592857 L313.56,153.254007 L318.84,148.253907 L318.84,147.142857 L311.8,147.142857 L311.8,151.642857 L307,151.642857 L307,162.142857 L318.84,162.142857 L318.84,154.920657 L317.07408,156.592857 L317.07408,156.592857 Z M307,150.442857 L310.52,150.442857 L310.52,147.142857 L307,150.442857 L307,150.442857 Z" id="white-note" fill="#FFFFFF" sketch:type="MSShapeGroup"></path> <path d="M321.477026,147.553638 L315.974463,153.109896 L317.159843,154.306505 L322.662407,148.750246 L321.477026,147.553638 L321.477026,147.553638 Z M314.68,154.365057 L314.68,155.542857 L315.88896,155.542857 L316.48144,154.953957 L315.28432,153.826257 L314.68,154.365057 L314.68,154.365057 Z M317.07408,156.592857 L313.56,156.592857 L313.56,153.254007 L318.84,148.253907 L318.84,147.142857 L311.8,147.142857 L311.8,151.642857 L307,151.642857 L307,162.142857 L318.84,162.142857 L318.84,154.920657 L317.07408,156.592857 L317.07408,156.592857 Z M307,150.442857 L310.52,150.442857 L310.52,147.142857 L307,150.442857 L307,150.442857 Z" id="white-note" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
<path d="M331.405533,156.216441 C328.929541,153.8896 328.929541,152.776762 328.929541,152.776762 L330.683368,150.955756 C330.373869,149.235917 329.23904,146.40324 327.27888,147.111409 C325.31872,147.718411 324.596556,150.551088 325.215554,152.270927 C328.310543,160.465456 335.429019,161.982961 336.460682,161.982961 C339.03984,162.185295 340.690501,160.566623 341,158.138614 C341,158.239781 338.317676,156.621109 337.07968,156.418775 L335.016354,158.442115 C335.016354,158.442115 333.881524,158.543282 331.405533,156.216441 L331.405533,156.216441 Z" id="white-phone" fill="#FFFFFF" sketch:type="MSShapeGroup"></path> <path d="M331.405533,156.216441 C328.929541,153.8896 328.929541,152.776762 328.929541,152.776762 L330.683368,150.955756 C330.373869,149.235917 329.23904,146.40324 327.27888,147.111409 C325.31872,147.718411 324.596556,150.551088 325.215554,152.270927 C328.310543,160.465456 335.429019,161.982961 336.460682,161.982961 C339.03984,162.185295 340.690501,160.566623 341,158.138614 C341,158.239781 338.317676,156.621109 337.07968,156.418775 L335.016354,158.442115 C335.016354,158.442115 333.881524,158.543282 331.405533,156.216441 L331.405533,156.216441 Z" id="white-phone" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
<path d="M60.1875,168.146809 C60.1875,167.330851 60.125,166.57766 60,165.761702 C59.75,164.192553 58.9375,163.376596 57.3125,163.188298 C56.75,163.125532 56.125,163.062766 55.5625,163.062766 L4.6875,163.062766 C3.875,163.062766 3.125,163.188298 2.3125,163.31383 C1.125,163.502128 0.4375,164.318085 0.1875,165.510638 C0.0625,166.26383 0,166.954255 0,167.707447 L0,201.475532 L0,202.417021 C0.125,204.92766 1.0625,205.869149 3.5625,205.869149 C6.875,205.931915 10.375,205.931915 13.75,205.931915 C14.4375,205.931915 15.5625,205.994681 15.5625,205.994681 L15.5625,207.061702 C15.5625,211.204255 15.625,215.346808 15.625,219.489362 C15.625,220.305319 15.625,221.246808 16.5625,221.68617 C17.5,222.062766 18.0625,221.309574 18.625,220.744681 C23.8125,215.974468 28.9375,211.267021 34.125,206.559574 C34.625,206.120213 35.0625,205.994681 35.6875,205.994681 L54.6875,205.994681 C55.5,205.994681 56.25,205.931915 57.0625,205.869149 C58.9375,205.680851 59.75,204.990425 60,203.107447 C60.0625,202.542553 60.125,201.914894 60.125,201.35 C60.1875,190.303191 60.1875,179.256383 60.1875,168.146809 L60.1875,168.146809 L60.1875,168.146809 Z M45.6875,183.587234 C46.3125,187.290425 44.75,189.487234 42.3125,189.926596 C39.9375,190.365957 37.625,188.796808 37,185.093617 L45.6875,183.587234 L45.6875,183.587234 Z M18.25,189.989362 C15.875,189.55 14.25,187.353191 14.875,183.65 L23.5625,185.156383 C22.875,188.859574 20.625,190.365957 18.25,189.989362 L18.25,189.989362 L18.25,189.989362 Z M38,197.897872 C38.4375,198.4 38.4375,199.215957 37.9375,199.655319 C37.4375,200.094681 36.625,200.094681 36.1875,199.592553 C34.5625,197.835106 32.4375,196.893617 30.0625,196.893617 C27.75,196.893617 25.5,197.897872 23.9375,199.592553 C23.6875,199.843617 23.375,199.969149 23,199.969149 C22.6875,199.969149 22.375,199.843617 22.125,199.655319 C21.625,199.215957 21.5625,198.4 22.0625,197.897872 C24.125,195.638298 27,194.382979 30,194.382979 C33,194.382979 35.9375,195.638298 38,197.897872 L38,197.897872 L38,197.897872 Z" id="super-bad" fill="#F35910" sketch:type="MSShapeGroup"></path> <path d="M60,168.107871 C60,167.288089 59.9376947,166.531367 59.8130841,165.711585 C59.5638629,164.135082 58.7538941,163.315301 57.1339564,163.12612 C56.5732087,163.06306 55.9501558,163 55.3894081,163 L4.6728972,163 C3.86292835,163 3.1152648,163.12612 2.30529595,163.252241 C1.12149533,163.441421 0.436137072,164.261202 0.186915888,165.459345 C0.062305296,166.216067 0,166.909727 0,167.66645 L0,201.592798 L0,202.538699 C0.124610592,205.061105 1.05919003,206.007006 3.55140187,206.007006 C6.85358255,206.070067 10.3426791,206.070067 13.7071651,206.070067 C14.3925234,206.070067 15.5140187,206.133127 15.5140187,206.133127 L15.5140187,207.205149 C15.5140187,211.367117 15.576324,215.529085 15.576324,219.691054 C15.576324,220.510835 15.576324,221.456737 16.5109034,221.898158 C17.4454829,222.276519 18.0062305,221.519797 18.5669782,220.952256 C23.7383178,216.159687 28.847352,211.430177 34.0186916,206.700667 C34.517134,206.259247 34.953271,206.133127 35.576324,206.133127 L54.517134,206.133127 C55.3271028,206.133127 56.0747664,206.070067 56.8847352,206.007006 C58.7538941,205.817826 59.5638629,205.124164 59.8130841,203.232361 C59.8753894,202.664819 59.9376947,202.034219 59.9376947,201.466677 C60,190.368094 60,179.269513 60,168.107871 L60,168.107871 L60,168.107871 Z M45.6875,183.587234 C46.3125,187.290425 44.75,189.487234 42.3125,189.926596 C39.9375,190.365957 37.625,188.796808 37,185.093617 L45.6875,183.587234 L45.6875,183.587234 Z M18.25,189.989362 C15.875,189.55 14.25,187.353191 14.875,183.65 L23.5625,185.156383 C22.875,188.859574 20.625,190.365957 18.25,189.989362 L18.25,189.989362 L18.25,189.989362 Z M38,197.897872 C38.4375,198.4 38.4375,199.215957 37.9375,199.655319 C37.4375,200.094681 36.625,200.094681 36.1875,199.592553 C34.5625,197.835106 32.4375,196.893617 30.0625,196.893617 C27.75,196.893617 25.5,197.897872 23.9375,199.592553 C23.6875,199.843617 23.375,199.969149 23,199.969149 C22.6875,199.969149 22.375,199.843617 22.125,199.655319 C21.625,199.215957 21.5625,198.4 22.0625,197.897872 C24.125,195.638298 27,194.382979 30,194.382979 C33,194.382979 35.9375,195.638298 38,197.897872 L38,197.897872 L38,197.897872 Z" id="super-bad" fill="#F35910" sketch:type="MSShapeGroup"></path>
<path d="M121.202991,168.146809 C121.202991,167.330851 121.140491,166.57766 121.015491,165.761702 C120.765491,164.192553 119.952991,163.376596 118.327991,163.188298 C117.765491,163.125532 117.140491,163.062766 116.577991,163.062766 L65.7029905,163.062766 C64.8904905,163.062766 64.1404905,163.188298 63.3279905,163.31383 C62.1404905,163.502128 61.4529905,164.318085 61.2029905,165.510638 C61.0779905,166.26383 61.0154905,166.954255 61.0154905,167.707447 L61.0154905,201.475532 L61.0154905,202.417021 C61.1404905,204.92766 62.0779905,205.869149 64.5779905,205.869149 C67.8904905,205.931915 71.3904905,205.931915 74.7654905,205.931915 C75.4529905,205.931915 76.5779905,205.994681 76.5779905,205.994681 L76.5779905,207.061702 C76.5779905,211.204255 76.6404905,215.346808 76.6404905,219.489362 C76.6404905,220.305319 76.6404905,221.246808 77.5779905,221.68617 C78.5154905,222.062766 79.0779905,221.309574 79.6404905,220.744681 C84.8279905,215.974468 89.9529905,211.267021 95.1404905,206.559574 C95.6404905,206.120213 96.0779905,205.994681 96.7029905,205.994681 L115.702991,205.994681 C116.515491,205.994681 117.265491,205.931915 118.077991,205.869149 C119.952991,205.680851 120.765491,204.990425 121.015491,203.107447 C121.077991,202.542553 121.140491,201.914894 121.140491,201.35 C121.202991,190.303191 121.202991,179.256383 121.202991,168.146809 L121.202991,168.146809 L121.202991,168.146809 Z M96.0154905,196.893617 C96.0154905,197.584043 95.4529905,198.148936 94.7654905,198.148936 L87.2654905,198.148936 C86.5779905,198.148936 86.0154905,197.584043 86.0154905,196.893617 C86.0154905,196.203192 86.5779905,195.638298 87.2654905,195.638298 L94.7654905,195.638298 C95.4529905,195.638298 96.0154905,196.203192 96.0154905,196.893617 L96.0154905,196.893617 L96.0154905,196.893617 Z M98.4529905,182.457447 L107.265491,182.457447 C107.265491,186.223404 105.265491,188.106383 102.890491,188.106383 C100.51549,188.106383 98.4529905,186.223404 98.4529905,182.457447 L98.4529905,182.457447 L98.4529905,182.457447 Z M75.3279905,182.457447 L84.1404905,182.457447 C84.1404905,186.223404 82.1404905,188.106383 79.7654905,188.106383 C77.3904905,188.106383 75.3279905,186.223404 75.3279905,182.457447 L75.3279905,182.457447 L75.3279905,182.457447 Z" id="bad" fill="#F6820B" sketch:type="MSShapeGroup"></path> <path d="M121,168.107871 C121,167.288089 120.937695,166.531367 120.813084,165.711585 C120.563863,164.135082 119.753894,163.315301 118.133956,163.12612 C117.573209,163.06306 116.950156,163 116.389408,163 L65.6728972,163 C64.8629283,163 64.1152648,163.12612 63.3052959,163.252241 C62.1214953,163.441421 61.4361371,164.261202 61.1869159,165.459345 C61.0623053,166.216067 61,166.909727 61,167.66645 L61,201.592798 L61,202.538699 C61.1246106,205.061105 62.05919,206.007006 64.5514018,206.007006 C67.8535825,206.070067 71.342679,206.070067 74.707165,206.070067 C75.3925232,206.070067 76.5140186,206.133127 76.5140186,206.133127 L76.5140186,207.205149 C76.5140186,211.367117 76.5763239,215.529085 76.5763239,219.691054 C76.5763239,220.510835 76.5763239,221.456737 77.5109033,221.898158 C78.4454827,222.276519 79.0062304,221.519797 79.566978,220.952256 C84.7383176,216.159687 89.8473518,211.430177 95.0186913,206.700667 C95.5171337,206.259247 95.9532707,206.133127 96.5763237,206.133127 L115.517134,206.133127 C116.327103,206.133127 117.074766,206.070067 117.884735,206.007006 C119.753894,205.817826 120.563863,205.124164 120.813084,203.232361 C120.875389,202.664819 120.937695,202.034219 120.937695,201.466677 C121,190.368094 121,179.269513 121,168.107871 L121,168.107871 L121,168.107871 Z M96.0154905,196.893617 C96.0154905,197.584043 95.4529905,198.148936 94.7654905,198.148936 L87.2654905,198.148936 C86.5779905,198.148936 86.0154905,197.584043 86.0154905,196.893617 C86.0154905,196.203192 86.5779905,195.638298 87.2654905,195.638298 L94.7654905,195.638298 C95.4529905,195.638298 96.0154905,196.203192 96.0154905,196.893617 L96.0154905,196.893617 L96.0154905,196.893617 Z M98.4529905,182.457447 L107.265491,182.457447 C107.265491,186.223404 105.265491,188.106383 102.890491,188.106383 C100.51549,188.106383 98.4529905,186.223404 98.4529905,182.457447 L98.4529905,182.457447 L98.4529905,182.457447 Z M75.3279905,182.457447 L84.1404905,182.457447 C84.1404905,186.223404 82.1404905,188.106383 79.7654905,188.106383 C77.3904905,188.106383 75.3279905,186.223404 75.3279905,182.457447 L75.3279905,182.457447 L75.3279905,182.457447 Z" id="bad" fill="#F6820B" sketch:type="MSShapeGroup"></path>
<path d="M182.218481,168.146809 C182.218481,167.330851 182.155981,166.57766 182.030981,165.761702 C181.780981,164.192553 180.968481,163.376596 179.343481,163.188298 C178.780981,163.125532 178.155981,163.062766 177.593481,163.062766 L126.718481,163.062766 C125.905981,163.062766 125.155981,163.188298 124.343481,163.31383 C123.155981,163.502128 122.468481,164.318085 122.218481,165.510638 C122.093481,166.26383 122.030981,166.954255 122.030981,167.707447 L122.030981,201.475532 L122.030981,202.417021 C122.155981,204.92766 123.093481,205.869149 125.593481,205.869149 C128.905981,205.931915 132.405981,205.931915 135.780981,205.931915 C136.468481,205.931915 137.593481,205.994681 137.593481,205.994681 L137.593481,207.061702 C137.593481,211.204255 137.655981,215.346808 137.655981,219.489362 C137.655981,220.305319 137.655981,221.246808 138.593481,221.68617 C139.530981,222.062766 140.093481,221.309574 140.655981,220.744681 C145.843481,215.974468 150.968481,211.267021 156.155981,206.559574 C156.655981,206.120213 157.093481,205.994681 157.718481,205.994681 L176.718481,205.994681 C177.530981,205.994681 178.280981,205.931915 179.093481,205.869149 C180.968481,205.680851 181.780981,204.990425 182.030981,203.107447 C182.093481,202.542553 182.155981,201.914894 182.155981,201.35 C182.218481,190.303191 182.218481,179.256383 182.218481,168.146809 L182.218481,168.146809 L182.218481,168.146809 Z M144.718481,181.453192 C144.718481,183.901064 142.718481,185.846809 140.343481,185.846809 C137.905981,185.846809 135.968481,183.838298 135.968481,181.453192 C135.968481,179.005319 137.968481,177.059574 140.343481,177.059574 C142.718481,176.996808 144.718481,179.005319 144.718481,181.453192 L144.718481,181.453192 L144.718481,181.453192 Z M167.843481,181.453192 C167.843481,183.901064 165.843481,185.846809 163.468481,185.846809 C161.030981,185.846809 159.093481,183.838298 159.093481,181.453192 C159.093481,179.005319 161.093481,177.059574 163.468481,177.059574 C165.843481,176.996808 167.843481,179.005319 167.843481,181.453192 L167.843481,181.453192 L167.843481,181.453192 Z M160.155981,193.755319 C160.155981,194.445745 159.593481,195.010638 158.905981,195.010638 L145.155981,195.010638 C144.468481,195.010638 143.905981,194.445745 143.905981,193.755319 C143.905981,193.064894 144.468481,192.5 145.155981,192.5 L158.905981,192.5 C159.593481,192.5 160.155981,193.064894 160.155981,193.755319 L160.155981,193.755319 L160.155981,193.755319 Z" id="ok" fill="#FAAB00" sketch:type="MSShapeGroup"></path> <path d="M182,168.107871 C182,167.288089 181.937695,166.531367 181.813084,165.711585 C181.563863,164.135082 180.753894,163.315301 179.133956,163.12612 C178.573209,163.06306 177.950156,163 177.389408,163 L126.672897,163 C125.862928,163 125.115265,163.12612 124.305296,163.252241 C123.121495,163.441421 122.436137,164.261202 122.186916,165.459345 C122.062305,166.216067 122,166.909727 122,167.66645 L122,201.592798 L122,202.538699 C122.124611,205.061105 123.05919,206.007006 125.551402,206.007006 C128.853583,206.070067 132.342679,206.070067 135.707165,206.070067 C136.392523,206.070067 137.514019,206.133127 137.514019,206.133127 L137.514019,207.205149 C137.514019,211.367117 137.576324,215.529085 137.576324,219.691054 C137.576324,220.510835 137.576324,221.456737 138.510903,221.898158 C139.445483,222.276519 140.006231,221.519797 140.566978,220.952256 C145.738318,216.159687 150.847352,211.430177 156.018692,206.700667 C156.517134,206.259247 156.953271,206.133127 157.576324,206.133127 L176.517134,206.133127 C177.327103,206.133127 178.074766,206.070067 178.884735,206.007006 C180.753894,205.817826 181.563863,205.124164 181.813084,203.232361 C181.875389,202.664819 181.937695,202.034219 181.937695,201.466677 C182,190.368094 182,179.269513 182,168.107871 L182,168.107871 L182,168.107871 Z M144.718481,181.453192 C144.718481,183.901064 142.718481,185.846809 140.343481,185.846809 C137.905981,185.846809 135.968481,183.838298 135.968481,181.453192 C135.968481,179.005319 137.968481,177.059574 140.343481,177.059574 C142.718481,176.996808 144.718481,179.005319 144.718481,181.453192 L144.718481,181.453192 L144.718481,181.453192 Z M167.843481,181.453192 C167.843481,183.901064 165.843481,185.846809 163.468481,185.846809 C161.030981,185.846809 159.093481,183.838298 159.093481,181.453192 C159.093481,179.005319 161.093481,177.059574 163.468481,177.059574 C165.843481,176.996808 167.843481,179.005319 167.843481,181.453192 L167.843481,181.453192 L167.843481,181.453192 Z M160.155981,193.755319 C160.155981,194.445745 159.593481,195.010638 158.905981,195.010638 L145.155981,195.010638 C144.468481,195.010638 143.905981,194.445745 143.905981,193.755319 C143.905981,193.064894 144.468481,192.5 145.155981,192.5 L158.905981,192.5 C159.593481,192.5 160.155981,193.064894 160.155981,193.755319 L160.155981,193.755319 L160.155981,193.755319 Z" id="ok" fill="#FAAB00" sketch:type="MSShapeGroup"></path>
<path d="M243.218481,168.146809 C243.218481,167.330851 243.155981,166.57766 243.030981,165.761702 C242.780981,164.192553 241.968481,163.376596 240.343481,163.188298 C239.780981,163.125532 239.155981,163.062766 238.593481,163.062766 L187.718481,163.062766 C186.905981,163.062766 186.155981,163.188298 185.343481,163.31383 C184.155981,163.502128 183.468481,164.318085 183.218481,165.510638 C183.093481,166.26383 183.030981,166.954255 183.030981,167.707447 L183.030981,201.475532 L183.030981,202.417021 C183.155981,204.92766 184.093481,205.869149 186.593481,205.869149 C189.905981,205.931915 193.343481,205.931915 196.655981,205.931915 C197.343481,205.931915 198.405981,205.994681 198.405981,205.994681 L198.405981,207.061702 C198.405981,211.204255 198.530981,215.346808 198.593481,219.489362 C198.593481,220.305319 198.655981,221.246808 199.593481,221.68617 C200.530981,222.062766 201.093481,221.309574 201.655981,220.744681 C206.843481,215.974468 211.968481,211.267021 217.155981,206.559574 C217.655981,206.120213 218.093481,205.994681 218.718481,205.994681 L237.718481,205.994681 C238.530981,205.994681 239.280981,205.931915 240.093481,205.869149 C241.968481,205.680851 242.780981,204.990425 243.030981,203.107447 C243.093481,202.542553 243.155981,201.914894 243.155981,201.35 C243.218481,190.303191 243.218481,179.256383 243.218481,168.146809 L243.218481,168.146809 L243.218481,168.146809 Z M201.780981,183.33617 C199.343481,183.33617 197.405981,181.32766 197.405981,178.942553 C197.405981,176.494681 199.405981,174.548936 201.780981,174.548936 C204.218481,174.548936 206.155981,176.557447 206.155981,178.942553 C206.218481,181.32766 204.218481,183.33617 201.780981,183.33617 L201.780981,183.33617 L201.780981,183.33617 Z M229.343481,178.942553 C229.343481,181.390425 227.343481,183.33617 224.968481,183.33617 C222.530981,183.33617 220.593481,181.32766 220.593481,178.942553 C220.593481,176.494681 222.593481,174.548936 224.968481,174.548936 C227.343481,174.48617 229.343481,176.494681 229.343481,178.942553 L229.343481,178.942553 L229.343481,178.942553 Z M221.093481,190.303191 C221.593481,190.742553 221.655981,191.558511 221.155981,192.060638 C219.093481,194.320213 216.218481,195.575532 213.155981,195.575532 C210.093481,195.575532 207.218481,194.320213 205.155981,192.060638 C204.718481,191.558511 204.718481,190.742553 205.218481,190.303191 C205.718481,189.86383 206.530981,189.86383 206.968481,190.365957 C208.593481,192.123404 210.718481,193.064894 213.093481,193.064894 C215.405981,193.064894 217.655981,192.060638 219.218481,190.365957 C219.780981,189.86383 220.593481,189.86383 221.093481,190.303191 L221.093481,190.303191 L221.093481,190.303191 Z" id="happy" fill="#A9AC41" sketch:type="MSShapeGroup"></path> <path d="M243,168.107871 C243,167.288089 242.937695,166.531367 242.813084,165.711585 C242.563863,164.135082 241.753894,163.315301 240.133956,163.12612 C239.573209,163.06306 238.950156,163 238.389408,163 L187.672897,163 C186.862928,163 186.115265,163.12612 185.305296,163.252241 C184.121495,163.441421 183.436137,164.261202 183.186916,165.459345 C183.062305,166.216067 183,166.909727 183,167.66645 L183,201.592798 L183,202.538699 C183.124611,205.061105 184.05919,206.007006 186.551402,206.007006 C189.853583,206.070067 193.280374,206.070067 196.582555,206.070067 C197.267913,206.070067 198.327103,206.133127 198.327103,206.133127 L198.327103,207.205149 C198.327103,211.367117 198.451713,215.529085 198.514019,219.691054 C198.514019,220.510835 198.576324,221.456737 199.510903,221.898158 C200.445483,222.276519 201.006231,221.519797 201.566978,220.952256 C206.738318,216.159687 211.847352,211.430177 217.018692,206.700667 C217.517134,206.259247 217.953271,206.133127 218.576324,206.133127 L237.517134,206.133127 C238.327103,206.133127 239.074766,206.070067 239.884735,206.007006 C241.753894,205.817826 242.563863,205.124164 242.813084,203.232361 C242.875389,202.664819 242.937695,202.034219 242.937695,201.466677 C243,190.368094 243,179.269513 243,168.107871 L243,168.107871 L243,168.107871 Z M201.780981,183.33617 C199.343481,183.33617 197.405981,181.32766 197.405981,178.942553 C197.405981,176.494681 199.405981,174.548936 201.780981,174.548936 C204.218481,174.548936 206.155981,176.557447 206.155981,178.942553 C206.218481,181.32766 204.218481,183.33617 201.780981,183.33617 L201.780981,183.33617 L201.780981,183.33617 Z M229.343481,178.942553 C229.343481,181.390425 227.343481,183.33617 224.968481,183.33617 C222.530981,183.33617 220.593481,181.32766 220.593481,178.942553 C220.593481,176.494681 222.593481,174.548936 224.968481,174.548936 C227.343481,174.48617 229.343481,176.494681 229.343481,178.942553 L229.343481,178.942553 L229.343481,178.942553 Z M221.093481,190.303191 C221.593481,190.742553 221.655981,191.558511 221.155981,192.060638 C219.093481,194.320213 216.218481,195.575532 213.155981,195.575532 C210.093481,195.575532 207.218481,194.320213 205.155981,192.060638 C204.718481,191.558511 204.718481,190.742553 205.218481,190.303191 C205.718481,189.86383 206.530981,189.86383 206.968481,190.365957 C208.593481,192.123404 210.718481,193.064894 213.093481,193.064894 C215.405981,193.064894 217.655981,192.060638 219.218481,190.365957 C219.780981,189.86383 220.593481,189.86383 221.093481,190.303191 L221.093481,190.303191 L221.093481,190.303191 Z" id="happy" fill="#A9AC41" sketch:type="MSShapeGroup"></path>
<path d="M304.003335,168.146809 C304.003335,167.330851 303.940835,166.57766 303.815835,165.761702 C303.565835,164.192553 302.753335,163.376596 301.128335,163.188298 C300.565835,163.125532 299.940835,163.062766 299.378335,163.062766 L248.503335,163.062766 C247.690835,163.062766 246.940835,163.188298 246.128335,163.31383 C244.940835,163.502128 244.253335,164.318085 244.003335,165.510638 C243.878335,166.26383 243.815835,166.954255 243.815835,167.707447 L243.815835,201.475532 L243.815835,202.417021 C243.940835,204.92766 244.878335,205.869149 247.378335,205.869149 C250.690835,205.931915 254.128335,205.931915 257.440835,205.931915 C258.128335,205.931915 259.190835,205.994681 259.190835,205.994681 L259.190835,207.061702 C259.190835,211.204255 259.315835,215.346808 259.378335,219.489362 C259.378335,220.305319 259.440835,221.246808 260.378335,221.68617 C261.315835,222.062766 261.878335,221.309574 262.440835,220.744681 C267.628335,215.974468 272.753335,211.267021 277.940835,206.559574 C278.440835,206.120213 278.878335,205.994681 279.503335,205.994681 L298.503335,205.994681 C299.315835,205.994681 300.065835,205.931915 300.878335,205.869149 C302.753335,205.680851 303.565835,204.990425 303.815835,203.107447 C303.878335,202.542553 303.940835,201.914894 303.940835,201.35 C304.003335,190.303191 304.003335,179.256383 304.003335,168.146809 L304.003335,168.146809 L304.003335,168.146809 Z M263.315835,183.712766 L284.565835,183.712766 C284.565835,188.734043 279.815835,193.943617 273.940835,193.943617 C268.065835,193.943617 263.315835,188.734043 263.315835,183.712766 L263.315835,183.712766 L263.315835,183.712766 Z M267.440835,178.691489 L257.440835,178.691489 C256.753335,178.691489 256.190835,178.126596 256.190835,177.43617 C256.190835,176.745745 256.753335,176.180851 257.440835,176.180851 L258.065835,176.180851 C258.440835,173.230851 260.253335,171.787234 262.378335,171.787234 C264.503335,171.787234 266.315835,173.293617 266.690835,176.180851 L267.440835,176.180851 C268.128335,176.180851 268.690835,176.745745 268.690835,177.43617 C268.690835,178.126596 268.128335,178.691489 267.440835,178.691489 L267.440835,178.691489 L267.440835,178.691489 Z M291.815835,177.43617 C291.815835,178.126596 291.253335,178.691489 290.565835,178.691489 L280.565835,178.691489 C279.878335,178.691489 279.315835,178.126596 279.315835,177.43617 C279.315835,176.745745 279.878335,176.180851 280.565835,176.180851 L281.190835,176.180851 C281.565835,173.230851 283.378335,171.787234 285.503335,171.787234 C287.628335,171.787234 289.440835,173.293617 289.815835,176.180851 L290.565835,176.180851 C291.253335,176.180851 291.815835,176.745745 291.815835,177.43617 L291.815835,177.43617 L291.815835,177.43617 Z" id="super-happy" fill="#38AE6A" sketch:type="MSShapeGroup"></path> <path d="M304,168.107871 C304,167.288089 303.937695,166.531367 303.813084,165.711585 C303.563863,164.135082 302.753894,163.315301 301.133956,163.12612 C300.573209,163.06306 299.950156,163 299.389408,163 L248.672897,163 C247.862928,163 247.115265,163.12612 246.305296,163.252241 C245.121495,163.441421 244.436137,164.261202 244.186916,165.459345 C244.062305,166.216067 244,166.909727 244,167.66645 L244,201.592798 L244,202.538699 C244.124611,205.061105 245.05919,206.007006 247.551402,206.007006 C250.853583,206.070067 254.280374,206.070067 257.582555,206.070067 C258.267913,206.070067 259.327103,206.133127 259.327103,206.133127 L259.327103,207.205149 C259.327103,211.367117 259.451713,215.529085 259.514019,219.691054 C259.514019,220.510835 259.576324,221.456737 260.510903,221.898158 C261.445483,222.276519 262.006231,221.519797 262.566978,220.952256 C267.738318,216.159687 272.847352,211.430177 278.018692,206.700667 C278.517134,206.259247 278.953271,206.133127 279.576324,206.133127 L298.517134,206.133127 C299.327103,206.133127 300.074766,206.070067 300.884735,206.007006 C302.753894,205.817826 303.563863,205.124164 303.813084,203.232361 C303.875389,202.664819 303.937695,202.034219 303.937695,201.466677 C304,190.368094 304,179.269513 304,168.107871 L304,168.107871 L304,168.107871 Z M263.315835,183.712766 L284.565835,183.712766 C284.565835,188.734043 279.815835,193.943617 273.940835,193.943617 C268.065835,193.943617 263.315835,188.734043 263.315835,183.712766 L263.315835,183.712766 L263.315835,183.712766 Z M267.440835,178.691489 L257.440835,178.691489 C256.753335,178.691489 256.190835,178.126596 256.190835,177.43617 C256.190835,176.745745 256.753335,176.180851 257.440835,176.180851 L258.065835,176.180851 C258.440835,173.230851 260.253335,171.787234 262.378335,171.787234 C264.503335,171.787234 266.315835,173.293617 266.690835,176.180851 L267.440835,176.180851 C268.128335,176.180851 268.690835,176.745745 268.690835,177.43617 C268.690835,178.126596 268.128335,178.691489 267.440835,178.691489 L267.440835,178.691489 L267.440835,178.691489 Z M291.815835,177.43617 C291.815835,178.126596 291.253335,178.691489 290.565835,178.691489 L280.565835,178.691489 C279.878335,178.691489 279.315835,178.126596 279.315835,177.43617 C279.315835,176.745745 279.878335,176.180851 280.565835,176.180851 L281.190835,176.180851 C281.565835,173.230851 283.378335,171.787234 285.503335,171.787234 C287.628335,171.787234 289.440835,173.293617 289.815835,176.180851 L290.565835,176.180851 C291.253335,176.180851 291.815835,176.745745 291.815835,177.43617 L291.815835,177.43617 L291.815835,177.43617 Z" id="super-happy" fill="#38AE6A" sketch:type="MSShapeGroup"></path>
<g id="stopwatch" sketch:type="MSLayerGroup" transform="translate(0.000000, 223.000000)"> <g id="stopwatch" sketch:type="MSLayerGroup" transform="translate(0.000000, 223.000000)">
<path d="M10.5,24.8 C9.5,23.9 8.4,22.9 7.5,22 L13.7,15.8 C14.5,16.7 15.4,17.7 16.3,18.7 C17.1,18.1 17.7,17.6 18.3,17.2 C22.2,14.3 26.5,12.3 31.2,11.2 C31.9,11 32.1,10.8 32.1,10.1 C32,8.4 32.1,6.7 32.1,4.9 L47.5,4.9 L47.5,10.9 C60.3,14.2 69.4,21.8 74,34.1 C77.6,43.7 77,53.3 72.6,62.5 C63.7,81.1 41.2,88.4 22.7,78.7 C3.7,68.8 -3.2,43.3 10.5,24.8 L10.5,24.8 L10.5,24.8 Z M40.0481625,75 C55.1817335,75 67.6921523,62.8930829 67.9948237,47.5576545 C68.2974951,31.4150983 55.282624,19.3081812 40.5526149,19.0055082 C25.3181533,18.7028353 12.2023918,30.9106434 12.0006108,46.5487447 C11.8997204,62.489519 24.3092486,75 40.0481625,75 L40.0481625,75 L40.0481625,75 Z M14.9,12.4 C14.6,12.9 14.5,13.5 14.1,13.9 C11.2,16.8 8.3,19.7 5.5,22.6 C4.8,23.3 4,23.4 3.1,23.1 C1.8,22.7 1,21.8 0.6,20.6 C0.3,19.7 0.4,18.9 1.1,18.1 L9.7,9.5 C10.3,8.9 11.1,8.7 11.9,8.9 C13.4,9.2 14.7,10.8 14.9,12.4 L14.9,12.4 L14.9,12.4 Z M33.7,3.9 C33.5,2.5 34,1.3 35.3,0.8 C38.2,-0.3 41.2,-0.3 44.2,0.8 C45.4,1.2 46,2.4 45.9,3.9 L33.7,3.9 L33.7,3.9 Z" id="Shape" fill="#A9BCC4" sketch:type="MSShapeGroup"></path> <path d="M10.5,24.8 C9.5,23.9 8.4,22.9 7.5,22 L13.7,15.8 C14.5,16.7 15.4,17.7 16.3,18.7 C17.1,18.1 17.7,17.6 18.3,17.2 C22.2,14.3 26.5,12.3 31.2,11.2 C31.9,11 32.1,10.8 32.1,10.1 C32,8.4 32.1,6.7 32.1,4.9 L47.5,4.9 L47.5,10.9 C60.3,14.2 69.4,21.8 74,34.1 C77.6,43.7 77,53.3 72.6,62.5 C63.7,81.1 41.2,88.4 22.7,78.7 C3.7,68.8 -3.2,43.3 10.5,24.8 L10.5,24.8 L10.5,24.8 Z M40.0481625,75 C55.1817335,75 67.6921523,62.8930829 67.9948237,47.5576545 C68.2974951,31.4150983 55.282624,19.3081812 40.5526149,19.0055082 C25.3181533,18.7028353 12.2023918,30.9106434 12.0006108,46.5487447 C11.8997204,62.489519 24.3092486,75 40.0481625,75 L40.0481625,75 L40.0481625,75 Z M14.9,12.4 C14.6,12.9 14.5,13.5 14.1,13.9 C11.2,16.8 8.3,19.7 5.5,22.6 C4.8,23.3 4,23.4 3.1,23.1 C1.8,22.7 1,21.8 0.6,20.6 C0.3,19.7 0.4,18.9 1.1,18.1 L9.7,9.5 C10.3,8.9 11.1,8.7 11.9,8.9 C13.4,9.2 14.7,10.8 14.9,12.4 L14.9,12.4 L14.9,12.4 Z M33.7,3.9 C33.5,2.5 34,1.3 35.3,0.8 C38.2,-0.3 41.2,-0.3 44.2,0.8 C45.4,1.2 46,2.4 45.9,3.9 L33.7,3.9 L33.7,3.9 Z" id="Shape" fill="#A9BCC4" sketch:type="MSShapeGroup"></path>
<circle id="inlay" opacity="0.3" sketch:type="MSShapeGroup" cx="39.9019608" cy="46.9019608" r="24.9019608"></circle> <circle id="inlay" opacity="0.3" sketch:type="MSShapeGroup" cx="39.9019608" cy="46.9019608" r="24.9019608"></circle>

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 110 KiB

View file

@ -439,4 +439,92 @@ test( "check signature", function() {
}); });
// replace tags
test( "check replace tags", function() {
var message = "<div>#{user.firstname} #{user.lastname}</div>"
var result = '<div>Bob Smith</div>'
var data = {
user: {
firstname: 'Bob',
lastname: 'Smith',
},
}
var verify = App.Utils.replaceTags( message, data )
equal( verify, result )
message = "<div>#{user.firstname} #{user.lastname}</div>"
result = '<div>Bob Smith</div>'
data = {
user: {
firstname: function() { return 'Bob' },
lastname: function() { return 'Smith' },
},
}
verify = App.Utils.replaceTags( message, data )
equal( verify, result )
message = "<div>#{user.firstname} #{user.lastname}</div>"
result = '<div>Bob </div>'
data = {
user: {
firstname: 'Bob',
},
}
verify = App.Utils.replaceTags( message, data )
equal( verify, result )
});
// check if last line is a empty line
test( "check if last line is a empty line", function() {
var message = "123"
var result = false
var verify = App.Utils.lastLineEmpty( message )
equal( verify, result, message )
message = "<div>123</div>"
result = false
verify = App.Utils.lastLineEmpty( message )
equal( verify, result, message )
message = "<p><div>123 </div></p>"
result = false
verify = App.Utils.lastLineEmpty( message )
equal( verify, result, message )
message = "<div></div>"
result = true
verify = App.Utils.lastLineEmpty( message )
equal( verify, result, message )
message = "<div class=\"some_class\"></div>"
result = true
verify = App.Utils.lastLineEmpty( message )
equal( verify, result, message )
message = "<div class=\"some_class\"></div> "
result = true
verify = App.Utils.lastLineEmpty( message )
equal( verify, result, message )
message = "<div class=\"some_class\"></div> \n \n\t"
result = true
verify = App.Utils.lastLineEmpty( message )
equal( verify, result, message )
message = "<div class=\"some_class\"> </div> \n \n\t"
result = true
verify = App.Utils.lastLineEmpty( message )
equal( verify, result, message )
message = "<div class=\"some_class\"\n> \n</div> \n \n\t"
result = true
verify = App.Utils.lastLineEmpty( message )
equal( verify, result, message )
});
} }

View file

@ -295,7 +295,7 @@ EventMachine.run {
idle_time_in_min = 4 idle_time_in_min = 4
# web sockets # close unused web socket sessions
@clients.each { |client_id, client| @clients.each { |client_id, client|
if ( client[:last_ping] + ( 60 * idle_time_in_min ) ) < Time.now if ( client[:last_ping] + ( 60 * idle_time_in_min ) ) < Time.now
log 'notice', "closing idle websocket connection", client_id log 'notice', "closing idle websocket connection", client_id
@ -312,10 +312,10 @@ EventMachine.run {
end end
} }
# close unused sessions # close unused ajax long polling sessions
clients = Sessions.destory_idle_sessions(idle_time_in_min) clients = Sessions.destory_idle_sessions(idle_time_in_min)
clients.each { |client_id| clients.each { |client_id|
log 'notice', "closing idle connection", client_id log 'notice', "closing idle long polling connection", client_id
} }
end end

View file

@ -2050,6 +2050,28 @@ Some Text',
}, },
}, },
}, },
{
:data => 'From: Some Body <somebody@example.com>
To: Bob <bod@example.com>
Cc: any@example.com
Subject: some subject
Some Text',
:trusted => false,
:success => true,
:result => {
0 => {
:group => group2.name,
:priority => '2 normal',
:title => 'some subject',
},
1 => {
:sender => 'Customer',
:type => 'email',
:internal => true,
},
},
},
] ]
process(files) process(files)
PostmasterFilter.destroy_all PostmasterFilter.destroy_all