diff --git a/app/assets/javascripts/app/controllers/_application_controller.coffee b/app/assets/javascripts/app/controllers/_application_controller.coffee index 2f1833f85..34c765d8a 100644 --- a/app/assets/javascripts/app/controllers/_application_controller.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller.coffee @@ -443,26 +443,12 @@ class App.Controller extends Spine.Controller } processData: true, success: (data, status, xhr) -> - App.SessionStorage.set( "user-ticket-popover::#{params.user_id}", data ) - - # load assets App.Collection.loadAssets( data.assets ) - show( params, { open: data.ticket_ids_open, closed: data.ticket_ids_closed } ) ) # get data - data = App.SessionStorage.get( "user-ticket-popover::#{params.user_id}" ) - if data - show( params, { open: data.ticket_ids_open, closed: data.ticket_ids_closed } ) - @delay( - -> - fetch(params) - 1000 - 'fetch' - ) - else - fetch(params) + fetch(params) userTicketPopupsDestroy: => if @userTicketPopupsList diff --git a/app/assets/javascripts/app/controllers/_channel/chat.coffee b/app/assets/javascripts/app/controllers/_channel/chat.coffee index 5fd4f65fd..e24caaa72 100644 --- a/app/assets/javascripts/app/controllers/_channel/chat.coffee +++ b/app/assets/javascripts/app/controllers/_channel/chat.coffee @@ -1,9 +1,5 @@ class App.ChannelChat extends App.Controller events: - 'click .js-add': 'new' - 'click .js-edit': 'edit' - 'click .js-remove': 'remove' - 'click .js-widget': 'widget' 'change .js-params': 'updateParams' 'input .js-params': 'updateParams' 'submit .js-demo-head': 'onUrlSubmit' @@ -11,6 +7,7 @@ class App.ChannelChat extends App.Controller 'click .js-selectBrowserWidth': 'selectBrowserWidth' 'click .js-swatch': 'usePaletteColor' 'click .js-toggle-chat': 'toggleChat' + 'click .js-chatSetting': 'toggleChatSetting' elements: '.js-browser': 'browser' @@ -27,13 +24,14 @@ class App.ChannelChat extends App.Controller '.js-code': 'code' '.js-palette': 'palette' '.js-color': 'colorField' + '.js-chatSetting': 'chatSetting' apiOptions: [ { - name: 'channel' - default: "'default'" - type: 'String' - description: 'Name of the chat-channel.' + name: 'chatId' + default: '1' + type: 'Number' + description: 'Identifier of the chat-topic.' } { name: 'show' @@ -54,18 +52,18 @@ class App.ChannelChat extends App.Controller description: "If left empty, the host gets auto-detected - in this case %s. The auto-detection reads out the host from the + .mockup { + vertical-align: bottom; + } + .settings { + position: fixed; + left: 20px; + top: 20px; + background: white; + font-size: 14px; + padding: 10px; + border-radius: 5px; + box-shadow: 0 3px 10px rgba(0,0,0,.3); + } + + .settings input { + vertical-align: middle; + } + .settings input + input { + margin-right: 3px; + } + + table td:first-child { + text-align: right; + padding-right: 0; + } + + td { + padding: 5px; + } + + h2 { + font-size: 1em; + margin: 0; + } + + @media only screen and (max-width: 768px) { + .settings { + display: none; + } + } + + .Box { + background: hsl(0,0%,91%); + width: 26px; + height: 24px; + color: hsl(0,0%,47%); + float: left; + } + .Box.Active { + background: hsl(0,0%,36%); + color: white; + } + + +