Fixes #3444: Caller Log: Incoming calls move tabs out of Browser context
This commit is contained in:
parent
b26fdfd216
commit
fc61d799d5
3 changed files with 78 additions and 71 deletions
|
@ -39,10 +39,8 @@ class App.CTI extends App.Controller
|
||||||
)
|
)
|
||||||
@controllerBind('menu:render', (data) =>
|
@controllerBind('menu:render', (data) =>
|
||||||
return if @switch() isnt true
|
return if @switch() isnt true
|
||||||
localHtml = ''
|
localHtml = App.view('navigation/menu_cti_ringing')(
|
||||||
for item in @ringingCalls()
|
item: @ringingCalls()
|
||||||
localHtml += App.view('navigation/menu_cti_ringing')(
|
|
||||||
item: item
|
|
||||||
)
|
)
|
||||||
$('.js-phoneMenuItem').after(localHtml)
|
$('.js-phoneMenuItem').after(localHtml)
|
||||||
$('.call-widget').find('.js-newUser').bind('click', (e) =>
|
$('.call-widget').find('.js-newUser').bind('click', (e) =>
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
<div class="call-widget">
|
<div class="call-widgets">
|
||||||
|
<% for item in @item: %>
|
||||||
|
<div class="call-widget">
|
||||||
<div class="call-widget-header">
|
<div class="call-widget-header">
|
||||||
<%- @Icon('status', "neutral") %>
|
<%- @Icon('status', "neutral") %>
|
||||||
<div class="label"><%- @T('Inbound Call') %></div>
|
<div class="label"><%- @T('Inbound Call') %></div>
|
||||||
|
@ -10,8 +12,8 @@
|
||||||
<div class="horizontal center">
|
<div class="horizontal center">
|
||||||
<% user = undefined %>
|
<% user = undefined %>
|
||||||
<% shown = false %>
|
<% shown = false %>
|
||||||
<% if @item.preferences.from && !_.isEmpty(@item.preferences.from): %>
|
<% if item.preferences.from && !_.isEmpty(item.preferences.from): %>
|
||||||
<% for caller_id in @item.preferences.from: %>
|
<% for caller_id in item.preferences.from: %>
|
||||||
<% if caller_id.user_id && App.User.exists(caller_id.user_id): %>
|
<% if caller_id.user_id && App.User.exists(caller_id.user_id): %>
|
||||||
<% user = App.User.fullLocal(caller_id.user_id) %>
|
<% user = App.User.fullLocal(caller_id.user_id) %>
|
||||||
<% classes = ['user-popover', 'u-textTruncate'] %>
|
<% classes = ['user-popover', 'u-textTruncate'] %>
|
||||||
|
@ -20,7 +22,7 @@
|
||||||
<div class="user-card">
|
<div class="user-card">
|
||||||
<a href="<%- user.uiUrl() %>"><%- user.avatar() %></a>
|
<a href="<%- user.uiUrl() %>"><%- user.avatar() %></a>
|
||||||
<div class="<%= classes.join(' ') %>" data-id="<%- user.id %>"><% if caller_id.level isnt 'known': %><%- @T('maybe') %>: <% end %><%= user.displayNameLong() %></div>
|
<div class="<%= classes.join(' ') %>" data-id="<%- user.id %>"><% if caller_id.level isnt 'known': %><%- @T('maybe') %>: <% end %><%= user.displayNameLong() %></div>
|
||||||
<span class="text-muted"><%= @item.from_pretty %></span>
|
<span class="text-muted"><%= item.from_pretty %></span>
|
||||||
</div>
|
</div>
|
||||||
<% shown = true %>
|
<% shown = true %>
|
||||||
<% else if !_.isEmpty(caller_id.comment): %>
|
<% else if !_.isEmpty(caller_id.comment): %>
|
||||||
|
@ -28,33 +30,35 @@
|
||||||
<div class="user-card">
|
<div class="user-card">
|
||||||
<%- @unique_avatar(caller_id.comment, caller_id.comment.split(" ").map((name) -> name[0]).join("")) %>
|
<%- @unique_avatar(caller_id.comment, caller_id.comment.split(" ").map((name) -> name[0]).join("")) %>
|
||||||
<%- @T('maybe') %>: <%= caller_id.comment %><br>
|
<%- @T('maybe') %>: <%= caller_id.comment %><br>
|
||||||
<span class="text-muted"><%= @item.from_pretty %></span>
|
<span class="text-muted"><%= item.from_pretty %></span>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if !shown && !_.isEmpty(@item.from_comment): %>
|
<% if !shown && !_.isEmpty(item.from_comment): %>
|
||||||
<% shown = true %>
|
<% shown = true %>
|
||||||
<div class="user-card">
|
<div class="user-card">
|
||||||
<%- @unique_avatar(@item.from_comment, @item.from_comment.split(" ").map((name) -> name[0]).join("")) %>
|
<%- @unique_avatar(item.from_comment, item.from_comment.split(" ").map((name) -> name[0]).join("")) %>
|
||||||
<%= @item.from_comment %><br>
|
<%= item.from_comment %><br>
|
||||||
<span class="text-muted"><%= @item.from_pretty %></span>
|
<span class="text-muted"><%= item.from_pretty %></span>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if !shown: %>
|
<% if !shown: %>
|
||||||
<div class="user-card">
|
<div class="user-card">
|
||||||
<%- @unique_avatar(@item.from_pretty || @item.from, '??') %>
|
<%- @unique_avatar(item.from_pretty || item.from, '??') %>
|
||||||
<% if !_.isEmpty(@item.from_pretty): %>
|
<% if !_.isEmpty(item.from_pretty): %>
|
||||||
<a class="inherit-color" href="<%- App.Utils.phoneify(@item.from_pretty) %>"><%= @item.from_pretty %></a>
|
<a class="inherit-color" href="<%- App.Utils.phoneify(item.from_pretty) %>"><%= item.from_pretty %></a>
|
||||||
<% if @item.direction is 'in': %>
|
<% if item.direction is 'in': %>
|
||||||
<div class="btn btn--text btn--create no-padding js-newUser" href="#" data-phone="<%= @item.from_pretty %>"><%- @Icon('plus-small') %> <span><%- @T('New User') %></div>
|
<div class="btn btn--text btn--create no-padding js-newUser" href="#" data-phone="<%= item.from_pretty %>"><%- @Icon('plus-small') %> <span><%- @T('New User') %></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else: %>
|
<% else: %>
|
||||||
<a class="inherit-color" href="<%- App.Utils.phoneify(@item.from) %>"><%= @item.from %></a>
|
<a class="inherit-color" href="<%- App.Utils.phoneify(item.from) %>"><%= item.from %></a>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="flex-spacer"></div>
|
<div class="flex-spacer"></div>
|
||||||
<div class="btn btn--small btn--quad btn--create space-left js-newTicket" title="<%- @Ti('New Ticket') %>" data-user-id="<% if user: %><%- user.id %><% end %>"><%- @Icon('plus') %></div>
|
<div class="btn btn--small btn--quad btn--create space-left js-newTicket" title="<%- @Ti('New Ticket') %>" data-user-id="<% if user: %><%- user.id %><% end %>"><%- @Icon('plus') %></div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
|
@ -4154,6 +4154,11 @@ footer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.call-widgets {
|
||||||
|
overflow-y: auto;
|
||||||
|
max-height: 30vh;
|
||||||
|
}
|
||||||
|
|
||||||
.call-widget {
|
.call-widget {
|
||||||
background: hsl(228,17%,91%);
|
background: hsl(228,17%,91%);
|
||||||
padding: 8px 10px;
|
padding: 8px 10px;
|
||||||
|
|
Loading…
Reference in a new issue