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; + } + + +
@@ -107,6 +109,7 @@ var chat = new ZammadChat({ chatId: 1, host: 'ws://localhost:6042', + cssUrl: 'http://localhost:3000/assets/chat/chat.css', debug: true, background: '#494d52', flat: true, @@ -144,4 +147,6 @@ } } }); - \ No newline at end of file + + + \ No newline at end of file diff --git a/test/fixtures/mail34.box b/test/fixtures/mail34.box new file mode 100644 index 000000000..36b39af43 --- /dev/null +++ b/test/fixtures/mail34.box @@ -0,0 +1,29 @@ +From: "Bay" +Subject: strange email with empty text/plain +To: bay@example.com +Date: 11 Nov 2015 12:07:51 +0000 +Priority: normal +X-Priority: 3 (Normal) +Importance: normal +X-David-SYM: 0 +X-David-Flags: 0 +Message-ID: <7ca10659-214c-4bd0-8438-b935a01c7601@stange> +MIME-Version: 1.0 +Content-Type: multipart/alternative; boundary="----_=_NextPart_000_06409CFC.56433DA7" + +This message is in MIME format. Since your mail reader does not understand +this format, some or all of this message may not be legible. + +------_=_NextPart_000_06409CFC.56433DA7 +Content-Type: text/plain; charset=iso-8859-1 +Content-Transfer-Encoding: quoted-printable + + + +------_=_NextPart_000_06409CFC.56433DA7 +Content-Type: text/html; charset=utf-8 +Content-Transfer-Encoding: quoted-printable + +some html text + +------_=_NextPart_000_06409CFC.56433DA7 diff --git a/test/unit/email_parser_test.rb b/test/unit/email_parser_test.rb index 7b3c723cf..5f01bef5a 100644 --- a/test/unit/email_parser_test.rb +++ b/test/unit/email_parser_test.rb @@ -308,7 +308,7 @@ Hof # spam email { data: IO.read('test/fixtures/mail15.box'), - body_md5: 'd41d8cd98f00b204e9800998ecf8427e', + body_md5: '5872ddcdfdf6bfe40f36cd0408fca667', attachments: [ # :preferences=>{"Message-ID"=>"", "Content-Type"=>"application/octet-stream; name=\"\xBC\xA8\xD0\xA7\xB9\xDC\xC0\xED,\xBE\xBF\xBE\xB9\xCB\xAD\xB4\xED\xC1\xCB.xls\"", "Mime-Type"=>"application/octet-stream", "Charset"=>"UTF-8"}} # mutt c1abb5fb77a9d2ab2017749a7987c074 @@ -466,14 +466,14 @@ Freemont and pulling out several minutes. }, { data: IO.read('test/fixtures/mail24.box'), - body_md5: 'd41d8cd98f00b204e9800998ecf8427e', + body_md5: '5872ddcdfdf6bfe40f36cd0408fca667', params: { from: 'oracle@IG0-1-DB01.example.com', from_email: 'oracle@IG0-1-DB01.example.com', from_display_name: '', subject: 'Regelsets im Test-Status gefunden: 1', to: 'support@example.com', - body: '', + body: 'no visible content', }, attachments: [ { @@ -672,9 +672,24 @@ Weil wir die Echtheit oder Vollständigkeit der in dieserNachricht enthaltenen I to: 'info@znuny.inc', }, }, + { + data: IO.read('test/fixtures/mail34.box'), + body_md5: 'b6e46176404ec81b3ab412fe71dff0f0', + params: { + from: 'Bay ', + from_email: 'memberbay+12345@members.somewhat', + from_display_name: 'Bay', + subject: 'strange email with empty text/plain', + to: 'bay@example.com', + body: 'some html text', + }, + }, ] + count = 0 files.each { |file| + count += 1 + #p "Count: #{count}" parser = Channel::EmailParser.new data = parser.parse( file[:data] )