chat designer: add load button to preview

This commit is contained in:
Felix Niklas 2015-11-25 15:09:03 +01:00
parent 3000d06a2b
commit d1d16f1706
2 changed files with 8 additions and 7 deletions

View file

@ -6,7 +6,7 @@ class App.ChannelChat extends App.Controller
'click .js-widget': 'widget' 'click .js-widget': 'widget'
'change .js-params': 'updateParams' 'change .js-params': 'updateParams'
'keyup .js-params': 'updateParams' 'keyup .js-params': 'updateParams'
'submit .js-testurl': 'changeDemoWebsite' 'submit .js-demo-head': 'changeDemoWebsite'
'blur .js-testurl-input': 'changeDemoWebsite' 'blur .js-testurl-input': 'changeDemoWebsite'
'click .js-selectBrowserWidth': 'selectBrowserWidth' 'click .js-selectBrowserWidth': 'selectBrowserWidth'
'click .js-swatch': 'usePaletteColor' 'click .js-swatch': 'usePaletteColor'
@ -204,7 +204,7 @@ class App.ChannelChat extends App.Controller
if !@url.startsWith('http') if !@url.startsWith('http')
@url = "http://#{ @url }" @url = "http://#{ @url }"
@urlInput.addClass('is-loading') @urlInput.addClass('is-loading').focus()
@palette.empty() @palette.empty()

View file

@ -60,12 +60,13 @@
<label for="preview-iframe" class="formGroup-label"><%- @T('Preview') %></label> <label for="preview-iframe" class="formGroup-label"><%- @T('Preview') %></label>
<div class="browser chat-demo js-browser"> <div class="browser chat-demo js-browser">
<div class="browser-head js-demo-head"> <form class="browser-head js-demo-head" novalidate>
<form class="browser-input js-testurl" novalidate> <div class="browser-input">
<input type="url" class="js-testurl-input" id="preview-iframe" placeholder="zammad.org"> <input type="url" class="js-testurl-input" id="preview-iframe" placeholder="zammad.org">
<div class="loading icon small muted"></div> <div class="loading icon small muted"></div>
</form> </div>
</div> <input type="submit" class="btn" value="<%- @T('Load') %>">
</form>
<div class="browser-body js-browserBody"> <div class="browser-body js-browserBody">
<div class="browser-website js-website"> <div class="browser-website js-website">
<iframe class="js-iframe" sandbox="allow-scripts allow-same-origin"></iframe> <iframe class="js-iframe" sandbox="allow-scripts allow-same-origin"></iframe>
@ -73,7 +74,7 @@
</div> </div>
<style>@import "/assets/chat/chat.css";</style> <style>@import "/assets/chat/chat.css";</style>
<div class="chat-demo-animationHolder"> <div class="chat-demo-animationHolder">
<div class="js-chat zammad-chat zammad-chat-is-open zammad-chat-is-visible is-open"> <div class="js-chat zammad-chat zammad-chat-is-shown zammad-chat-is-visible is-open">
<div class="zammad-chat-header js-toggle-chat js-backgroundColor js-chatHeader"> <div class="zammad-chat-header js-toggle-chat js-backgroundColor js-chatHeader">
<div class="zammad-chat-header-controls"> <div class="zammad-chat-header-controls">
<span class="zammad-chat-agent-status" data-status="online"><%- @T('Online') %></span> <span class="zammad-chat-agent-status" data-status="online"><%- @T('Online') %></span>