chat designer: add flat design api description
This commit is contained in:
parent
778fe5b538
commit
eb8ff4200b
1 changed files with 12 additions and 1 deletions
|
@ -66,6 +66,12 @@ class App.ChannelChat extends App.Controller
|
|||
type: 'String'
|
||||
description: 'CSS font-size with a unit like 12px, 1.5em. If left to undefined it inherits the font-size of the website.'
|
||||
}
|
||||
{
|
||||
name: 'flat'
|
||||
default: 'false'
|
||||
type: 'boolean'
|
||||
description: 'Removes the shadows for a flat look.'
|
||||
}
|
||||
{
|
||||
name: 'buttonClass'
|
||||
default: "'open-zammad-chat'"
|
||||
|
@ -267,6 +273,11 @@ class App.ChannelChat extends App.Controller
|
|||
if parseInt(params.fontSize, 10) > 2
|
||||
@chat.css('font-size', params.fontSize)
|
||||
@chatBackground.css('background', params.background)
|
||||
if params.flat is 'on'
|
||||
@chat.addClass('zammad-chat--flat')
|
||||
params.flat = true
|
||||
else
|
||||
@chat.removeClass('zammad-chat--flat')
|
||||
|
||||
if @permanent
|
||||
for key, value of @permanent
|
||||
|
@ -278,7 +289,7 @@ class App.ChannelChat extends App.Controller
|
|||
# coffeelint: disable=no_unnecessary_double_quotes
|
||||
paramString += ",\n"
|
||||
# coffeelint: enable=no_unnecessary_double_quotes
|
||||
if value == 'true' || value == 'false' || _.isNumber(value)
|
||||
if value == true || value == false || _.isNumber(value)
|
||||
paramString += " #{key}: #{value}"
|
||||
else
|
||||
paramString += " #{key}: '#{quote(value)}'"
|
||||
|
|
Loading…
Reference in a new issue