Renamed popover classes.

This commit is contained in:
Martin Edenhofer 2013-09-20 16:56:45 +02:00
parent 93ebce021a
commit 5b21435f04
10 changed files with 28 additions and 25 deletions

View file

@ -145,11 +145,11 @@ class App.Controller extends Spine.Controller
all_attributes = [
{ name: 'number', link: true, title: 'title' },
{ name: 'title', link: true, title: 'title' },
{ name: 'customer', class: 'user-data', data: { id: true } },
{ name: 'customer', class: 'user-popover', data: { id: true } },
{ name: 'ticket_state', translate: true, title: true },
{ name: 'ticket_priority', translate: true, title: true },
{ name: 'group', title: 'group' },
{ name: 'owner', class: 'user-data', data: { id: true } },
{ name: 'owner', class: 'user-popover', data: { id: true } },
{ name: 'created_at', callback: @frontendTime },
{ name: 'last_contact', callback: @frontendTime },
{ name: 'last_contact_agent', callback: @frontendTime },
@ -282,11 +282,11 @@ class App.Controller extends Spine.Controller
ticketPopups: (position = 'right') ->
# remove old popovers
$('.popover-inner').parent().remove()
$('.popover').remove()
# show ticket popup
ui = @
$('.ticket-data').popover(
@el.find('.ticket-popover').popover(
trigger: 'hover'
container: 'body'
html: true
@ -309,10 +309,10 @@ class App.Controller extends Spine.Controller
userPopups: (position = 'right') ->
# remove old popovers
$('.popover-inner').parent().remove()
$('.popover').remove()
# show user popup
$('.user-data').popover(
@el.find('.user-popover').popover(
trigger: 'hover'
container: 'body'
html: true
@ -355,10 +355,10 @@ class App.Controller extends Spine.Controller
organizationPopups: (position = 'right') ->
# remove old popovers
$('.popover-inner').parent().remove()
$('.popover').remove()
# show organization popup
$('.organization-data').popover(
@el.find('.organization-popover').popover(
trigger: 'hover'
container: 'body'
html: true
@ -380,7 +380,7 @@ class App.Controller extends Spine.Controller
userTicketPopups: (data) ->
# remove old popovers
$('.popover-inner').parent().remove()
$('.popover').remove()
# get data
tickets = {}
@ -400,7 +400,7 @@ class App.Controller extends Spine.Controller
# show user popup
controller = @
$(data.selector).popover(
@el.find(data.selector).popover(
trigger: 'hover'
container: 'body'
html: true

View file

@ -22,11 +22,11 @@ class App.ControllerTable extends App.Controller
overview_extended: [
{ name: 'number', link: true },
{ name: 'title', link: true },
{ name: 'customer', class: 'user-data', data: { id: true } },
{ name: 'customer', class: 'user-popover', data: { id: true } },
{ name: 'ticket_state', translate: true },
{ name: 'ticket_priority', translate: true },
{ name: 'group' },
{ name: 'owner', class: 'user-data', data: { id: true } },
{ name: 'owner', class: 'user-popover', data: { id: true } },
{ name: 'created_at', callback: @frontendTime },
{ name: 'last_contact', callback: @frontendTime },
{ name: 'last_contact_agent', callback: @frontendTime },

View file

@ -1,4 +1,4 @@
class App.TicketMerge extends App.ControllerModal
class App.TicketMerge extends App.ControllerModal
constructor: ->
super
@fetch()
@ -39,11 +39,11 @@ class App.TicketMerge extends App.ControllerModal
overview_extended: [
{ name: 'number', link: true },
{ name: 'title', link: true },
# { name: 'customer', class: 'user-data', data: { id: true } },
# { name: 'customer', class: 'user-popover', data: { id: true } },
{ name: 'ticket_state', translate: true },
# { name: 'ticket_priority', translate: true },
{ name: 'group' },
# { name: 'owner', class: 'user-data', data: { id: true } },
# { name: 'owner', class: 'user-popover', data: { id: true } },
{ name: 'created_at', callback: @humanTime },
# { name: 'last_contact', callback: @frontendTime },
# { name: 'last_contact_agent', callback: @frontendTime },
@ -66,11 +66,11 @@ class App.TicketMerge extends App.ControllerModal
overview_extended: [
{ name: 'number', link: true },
{ name: 'title', link: true },
# { name: 'customer', class: 'user-data', data: { id: true } },
# { name: 'customer', class: 'user-popover', data: { id: true } },
{ name: 'ticket_state', translate: true },
# { name: 'ticket_priority', translate: true },
{ name: 'group' },
# { name: 'owner', class: 'user-data', data: { id: true } },
# { name: 'owner', class: 'user-popover', data: { id: true } },
{ name: 'created_at', callback: @humanTime },
# { name: 'last_contact', callback: @frontendTime },
# { name: 'last_contact_agent', callback: @frontendTime },

View file

@ -112,7 +112,7 @@ class App.Navigation extends App.Controller
data =
display: "##{ticket.number} - #{ticket.title} - #{ticket.humanTime}"
id: ticket.id
class: "ticket-data"
class: "ticket-popover"
url: "#ticket/zoom/#{ticket.id}"
area.result.push data
else if area.name is 'User'
@ -122,7 +122,7 @@ class App.Navigation extends App.Controller
data =
display: "#{user.displayName()}"
id: user.id
class: "user-data"
class: "user-popover"
url: "#users/#{user.id}"
area.result.push data
else if area.name is 'Organization'
@ -132,7 +132,7 @@ class App.Navigation extends App.Controller
data =
display: "#{organization.displayName()}"
id: organization.id
class: "organization-data"
class: "organization-popover"
url: "#organizations/#{ticket.id}"
area.result.push data

View file

@ -21,7 +21,7 @@
<% open = true %>
<% last_user = object['created_by_id'] %>
<% lasttime = object['created_at'] %>
<span class="user-data" data-id="<%= object.created_by.id %>"><%= object.created_by.displayName() %></span> -
<span class="user-popover" data-id="<%= object.created_by.id %>"><%= object.created_by.displayName() %></span> -
<span class="humanTimeFromNow" data-time="<%- object.created_at %>">?</span>
<ul>
<% end %>

View file

@ -11,7 +11,7 @@
<input type="checkbox" value="<%= ticket.id %>" name="bulk" class="pull-left"/>
</td>
<td class="span1">
<img class="thumbnail user-data" data-id="<%= ticket.customer_id %>" src="<%= ticket.customer.image %>" alt="">
<img class="thumbnail user-popover" data-id="<%= ticket.customer_id %>" src="<%= ticket.customer.image %>" alt="">
</td>
<td class="span10">
<h3><a href="#" data-type="edit"><%= ticket.title %></a> <small><%= ticket.number %> <span class="humanTimeFromNow" data-time="<%= ticket.created_at %>">?</span></small></h3>

View file

@ -2,7 +2,7 @@
<h2 class="can-move"><%- @T( @head ) %></h2>
<dl>
<% for item in @items: %>
<dt><span class="user-data" data-id="<%= item.updated_by_id %>">"<%= item.updated_by.displayName() %>"</span></dt>
<dt><span class="user-popover" data-id="<%= item.updated_by_id %>">"<%= item.updated_by.displayName() %>"</span></dt>
<dd><%- @T( item.history_type ) %> <a href="<%- item.link %>"><%= item.type %><% if item.title: %> (<%= item.title %>)<% end %></a>.</dd>
<% end %>
</dl>

View file

@ -1,7 +1,7 @@
<% for article in @articles: %>
<div class="article clearfix" data-id="<%= article.id %>" id="article-<%= article.id %>">
<div class="avatar thumbnails">
<img class="thumbnail user-data" data-id="<%= article.created_by_id %>" src="<%= article.created_by.image %>" alt="">
<img class="thumbnail user-popover" data-id="<%= article.created_by_id %>" src="<%= article.created_by.image %>" alt="">
<ul>
<li style="font-size: 10px;"><%- @T(article.article_type.name) %></li>
<% if article.article_type.name is 'email': %><li style="font-size: 10px;"><a href="<%= App.Config.get('api_path') %>/ticket_article_plain/<%= article.id %>"><%- @T( 'raw' ) %></a></li><% end %>

View file

@ -1,6 +1,6 @@
<div class="article clearfix">
<div class="avatar thumbnails">
<img class="thumbnail user-data" data-id="<%= @S('id') %>" src="<%- @S('image') %>" alt="">
<img class="thumbnail user-popover" data-id="<%= @S('id') %>" src="<%- @S('image') %>" alt="">
</div>
<div class="well edit-ticket article-message <% if @formChanged: %>form-changed<% end %>">
<div class="edit-title article-content">

View file

@ -74,6 +74,9 @@ table th, table td {
border-bottom: 1px solid #eeeeee;
}
.popover {
z-index: 1110;
}
.hero-two {
width: 100%;
}