Merge branch 'develop' of github.com:martini/zammad into develop

This commit is contained in:
Martin Edenhofer 2015-01-14 23:08:29 +01:00
commit 7513fd4f8a
18 changed files with 105 additions and 77 deletions

View file

@ -233,7 +233,8 @@ class App.Controller extends Spine.Controller
trigger: 'hover'
container: 'body'
html: true
delay: { show: 400, hide: 800 }
animation: false
delay: 100
placement: position
title: ->
ticket_id = $(@).data('id')
@ -270,7 +271,8 @@ class App.Controller extends Spine.Controller
trigger: 'hover'
container: 'body'
html: true
delay: { show: 400, hide: 800 }
animation: false
delay: 100
placement: "auto #{position}"
title: ->
user_id = $(@).data('id')
@ -326,7 +328,8 @@ class App.Controller extends Spine.Controller
trigger: 'hover'
container: 'body'
html: true
delay: { show: 400, hide: 800 }
animation: false
delay: 100
placement: "auto #{position}"
title: ->
organization_id = $(@).data('id')
@ -379,7 +382,8 @@ class App.Controller extends Spine.Controller
trigger: 'hover'
container: 'body'
html: true
delay: { show: 500, hide: 5200 }
animation: false
delay: 100
placement: "auto #{data.position}"
title: ->
$(@).find('[title="*"]').val()

View file

@ -11,9 +11,9 @@ App.Config.set( 'layout_ref', Index, 'Routes' )
class Content extends App.ControllerContent
events:
'hide.bs.dropdown .js-recipientDropdown': 'hideOrganisationMembers'
'click .js-organisation': 'showOrganisationMembers'
'click .js-back': 'hideOrganisationMembers'
'hide.bs.dropdown .js-recipientDropdown': 'hideOrganizationMembers'
'click .js-organization': 'showOrganizationMembers'
'click .js-back': 'hideOrganizationMembers'
constructor: ->
super
@ -46,21 +46,21 @@ class Content extends App.ControllerContent
render: ->
@html App.view('layout_ref/content')()
showOrganisationMembers: (e) =>
showOrganizationMembers: (e) =>
e.stopPropagation()
listEntry = $(e.currentTarget)
organisationId = listEntry.data('organisation-id')
organizationId = listEntry.data('organization-id')
@recipientList = @$('.recipientList')
@organisationList = @$("##{ organisationId }")
@organizationList = @$("##{ organizationId }")
# move organisation-list to the right and slide it in
# move organization-list to the right and slide it in
$.Velocity.hook(@organisationList, 'translateX', '100%')
@organisationList.removeClass('hide')
$.Velocity.hook(@organizationList, 'translateX', '100%')
@organizationList.removeClass('hide')
@organisationList.velocity
@organizationList.velocity
properties:
translateX: 0
options:
@ -73,12 +73,12 @@ class Content extends App.ControllerContent
translateX: '-100%'
options:
speed: 300
complete: => @recipientList.height(@organisationList.height())
complete: => @recipientList.height(@organizationList.height())
hideOrganisationMembers: (e) =>
hideOrganizationMembers: (e) =>
e && e.stopPropagation()
return if !@organisationList
return if !@organizationList
# fade list back in
@ -92,13 +92,13 @@ class Content extends App.ControllerContent
@recipientList.height('')
# slide out organisation-list and hide it
@organisationList.velocity
# slide out organization-list and hide it
@organizationList.velocity
properties:
translateX: '100%'
options:
speed: 300
complete: => @organisationList.addClass('hide')
complete: => @organizationList.addClass('hide')
App.Config.set( 'layout_ref/content', Content, 'Routes' )

View file

@ -173,9 +173,9 @@ class App.Navigation extends App.Controller
data =
display: "#{organization.displayName()}"
id: organization.id
class: "organisation organization-popover"
class: "organization organization-popover"
url: organization.uiUrl()
iconClass: "organisation"
iconClass: "organization"
area.result.push data
@renderResult(result)

View file

@ -8,7 +8,7 @@ class App.TicketCustomer extends App.ControllerModal
@button = true
configure_attributes = [
{ name: 'customer_id', display: 'Customer', tag: 'user_autocompletion', null: false, placeholder: 'Enter Person or Organisation/Company', minLengt: 2, disableCreateUser: true },
{ name: 'customer_id', display: 'Customer', tag: 'user_autocompletion', null: false, placeholder: 'Enter Person or Organization/Company', minLengt: 2, disableCreateUser: true },
]
controller = new App.ControllerForm(

View file

@ -907,7 +907,7 @@ class Edit extends App.Controller
@setArticleType(@type)
configure_attributes = [
{ name: 'customer_id', display: 'Recipients', tag: 'user_autocompletion', null: false, placeholder: 'Enter Person or Organisation/Company', minLengt: 2, disableCreateUser: false },
{ name: 'customer_id', display: 'Recipients', tag: 'user_autocompletion', null: false, placeholder: 'Enter Person or Organization/Company', minLengt: 2, disableCreateUser: false },
]
controller = new App.ControllerForm(

View file

@ -1,9 +1,9 @@
class App.UserOrganizationAutocompletion extends App.Controller
className: 'dropdown js-recipientDropdown zIndex-2'
events:
'hide.bs.dropdown .js-recipientDropdown': 'hideOrganisationMembers'
'click .js-organisation': 'showOrganisationMembers'
'click .js-back': 'hideOrganisationMembers'
'hide.bs.dropdown .js-recipientDropdown': 'hideOrganizationMembers'
'click .js-organization': 'showOrganizationMembers'
'click .js-back': 'hideOrganizationMembers'
'click .js-user': 'selectUser'
'click .js-user-new': 'newUser'
'focus input': 'open'
@ -148,9 +148,9 @@ class App.UserOrganizationAutocompletion extends App.Controller
e.preventDefault()
userId = @$('.recipientList').find('li.is-active').data('user-id')
if !userId
organisationId = @$('.recipientList').find('li.is-active').data('organisation-id')
if organisationId
@showOrganisationMembers(undefined, @$('.recipientList').find('li.is-active'))
organizationId = @$('.recipientList').find('li.is-active').data('organization-id')
if organizationId
@showOrganizationMembers(undefined, @$('.recipientList').find('li.is-active'))
return
if userId is 'new'
@newUser()
@ -217,24 +217,24 @@ class App.UserOrganizationAutocompletion extends App.Controller
emptyResultList: =>
@$('.recipientList').empty()
@$('.recipientList-organisationMembers').remove()
@$('.recipientList-organizationMembers').remove()
showOrganisationMembers: (e,listEntry) =>
showOrganizationMembers: (e,listEntry) =>
if e
e.stopPropagation()
listEntry = $(e.currentTarget)
organisationId = listEntry.data('organisation-id')
organizationId = listEntry.data('organization-id')
@recipientList = @$('.recipientList')
@organisationList = @$("##{ organisationId }")
@organizationList = @$("##{ organizationId }")
# move organisation-list to the right and slide it in
# move organization-list to the right and slide it in
$.Velocity.hook(@organisationList, 'translateX', '100%')
@organisationList.removeClass('hide')
$.Velocity.hook(@organizationList, 'translateX', '100%')
@organizationList.removeClass('hide')
@organisationList.velocity
@organizationList.velocity
properties:
translateX: 0
options:
@ -246,12 +246,12 @@ class App.UserOrganizationAutocompletion extends App.Controller
translateX: '-100%'
options:
speed: 300
complete: => @recipientList.height(@organisationList.height())
complete: => @recipientList.height(@organizationList.height())
hideOrganisationMembers: (e) =>
hideOrganizationMembers: (e) =>
e && e.stopPropagation()
return if !@organisationList
return if !@organizationList
# fade list back in
@recipientList.velocity
@ -264,13 +264,13 @@ class App.UserOrganizationAutocompletion extends App.Controller
@recipientList.height('')
# slide out organisation-list and hide it
@organisationList.velocity
# slide out organization-list and hide it
@organizationList.velocity
properties:
translateX: '100%'
options:
speed: 300
complete: => @organisationList.addClass('hide')
complete: => @organizationList.addClass('hide')
newUser: (e) =>
if e

View file

@ -0,0 +1,23 @@
/* from here http://jsfiddle.net/WojtekKruszewski/Zf3m7/22/ */
var originalLeave = $.fn.popover.Constructor.prototype.leave;
$.fn.popover.Constructor.prototype.leave = function(obj){
var self = obj instanceof this.constructor ?
obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type)
var container, timeout;
originalLeave.call(this, obj);
if(obj.currentTarget) {
container = $('body .popover');
timeout = self.timeout;
container.one('mouseenter', function(){
//We entered the actual popover call off the dogs
clearTimeout(timeout);
//Let's monitor popover content instead
container.one('mouseleave', function(){
$.fn.popover.Constructor.prototype.leave.call(self, self);
});
})
}
};

View file

@ -18,7 +18,7 @@ class App.Organization extends App.Model
'#organization/profile/' + @id
icon: (user) ->
"organisation icon"
"organization icon"
@_fillUp: (data) ->

View file

@ -1,6 +1,6 @@
<li class="recipientList-entry u-clickable horizontal center js-organisation" data-organisation-id="<%- @organization.id %>">
<li class="recipientList-entry u-clickable horizontal center js-organization" data-organization-id="<%- @organization.id %>">
<div class="recipientList-iconSpacer centered">
<div class="white organisation icon"></div>
<div class="white organization icon"></div>
</div>
<div class="recipientList-name flex u-textTruncat">
<%= @organization.displayName() %>

View file

@ -1,4 +1,4 @@
<ul class="recipientList-organisationMembers hide" id="<%- @organization.id %>">
<ul class="recipientList-organizationMembers hide" id="<%- @organization.id %>">
<li class="recipientList-controls u-clickable js-back">
<div class="recipientList-backClickArea centered">
<div class="recipientList-backButton">

View file

@ -80,24 +80,24 @@
<div class="dropdown js-recipientDropdown">
<div class="dropdown-toggle u-positionOrigin" data-toggle="dropdown">
<input id="customer_id_autocompletion2" name="customer_id_autocompletion" class="ui-autocomplete-input form-control" autocapitalize="off" placeholder="Enter Person or Organisation/Company" autocomplete="off" role="textbox" aria-autocomplete="list" aria-haspopup="true">
<input id="customer_id_autocompletion2" name="customer_id_autocompletion" class="ui-autocomplete-input form-control" autocapitalize="off" placeholder="Enter Person or Organization/Company" autocomplete="off" role="textbox" aria-autocomplete="list" aria-haspopup="true">
<span class="select-arrow icon"></span>
</div>
<div class="dropdown-menu" aria-labelledby="customer_id">
<ul class="recipientList" role="menu">
<li class="recipientList-entry u-clickable horizontal center js-organisation" data-organisation-id="AlbrechtBertschlerGmbG">
<li class="recipientList-entry u-clickable horizontal center js-organization" data-organization-id="AlbrechtBertschlerGmbG">
<div class="recipientList-iconSpacer centered">
<div class="white organisation icon"></div>
<div class="white organization icon"></div>
</div>
<div class="recipientList-name flex u-textTruncat">
Albrecht &amp; Bertschler GmbH
<span class="recipientList-detail">- 4 Personen</span>
</div>
<div class="white right arrow icon"></div> <li class="recipientList-entry u-clickable horizontal center js-organisation" data-organisation-id="BENCHMARKhumanresources">
<div class="white right arrow icon"></div> <li class="recipientList-entry u-clickable horizontal center js-organization" data-organization-id="BENCHMARKhumanresources">
<div class="recipientList-iconSpacer centered">
<div class="white organisation icon"></div>
<div class="white organization icon"></div>
</div>
<div class="recipientList-name flex u-textTruncat">
BENCHMARK human resources
@ -134,14 +134,14 @@
<li class="recipientList-entry u-clickable horizontal center">
<div class="recipientList-iconSpacer centered">
<div class="white organisation icon"></div>
<div class="white organization icon"></div>
</div>
<div class="recipientList-name flex u-textTruncat">
Benteler SGL Composite Technology GmbH
<span class="recipientList-detail"></span>
</div>
<li class="recipientList-entry u-clickable horizontal center js-organisation">
<li class="recipientList-entry u-clickable horizontal center js-organization">
<div class="recipientList-iconSpacer centered">
<div class="white team icon"></div>
</div>
@ -151,9 +151,9 @@
</div>
<div class="white right arrow icon"></div>
<li class="recipientList-entry u-clickable horizontal center js-organisation">
<li class="recipientList-entry u-clickable horizontal center js-organization">
<div class="recipientList-iconSpacer centered">
<div class="white organisation icon"></div>
<div class="white organization icon"></div>
</div>
<div class="recipientList-name flex u-textTruncat">
Bernecker + Rainer Industrie-Elektronik Ges.m.b.H.
@ -161,9 +161,9 @@
</div>
<div class="white right arrow icon"></div>
<li class="recipientList-entry u-clickable horizontal center js-organisation">
<li class="recipientList-entry u-clickable horizontal center js-organization">
<div class="recipientList-iconSpacer centered">
<div class="white organisation icon"></div>
<div class="white organization icon"></div>
</div>
<div class="recipientList-name flex u-textTruncat">
Bertsch Ecopower GmbH
@ -178,7 +178,7 @@
<div class="recipientList-name flex u-textTruncat">
<%- @T('Create new Customer') %>
</div>
</ul> <ul class="recipientList-organisationMembers hide" id="AlbrechtBertschlerGmbG">
</ul> <ul class="recipientList-organizationMembers hide" id="AlbrechtBertschlerGmbG">
<li class="recipientList-controls u-clickable js-back">
<div class="recipientList-backClickArea centered">
<div class="recipientList-backButton">
@ -222,7 +222,7 @@
Katharina Nussman
<span class="recipientList-detail">- Albrecht &amp; Bertschler GmbG</span>
</div>
</ul> <ul class="recipientList-organisationMembers hide" id="BENCHMARKhumanresources">
</ul> <ul class="recipientList-organizationMembers hide" id="BENCHMARKhumanresources">
<li class="recipientList-controls u-clickable js-back">
<div class="recipientList-backClickArea centered">
<div class="recipientList-backButton">

View file

@ -16,7 +16,7 @@
</ul>
</div>
<div class="profile-organizationIcon">
<div class="organisation icon"></div>
<div class="organization icon"></div>
</div>
<h1>Steuerbüro C. Kaik</h1>
</div>

View file

@ -26,7 +26,7 @@
<a href="mailto:doreen.kubiak@gmail.com">doreen.kubiak@gmail.com</a>
</div>
<div class="profile-detailsEntry">
<label>Organisation</label>
<label>Organization</label>
Steuerbüro C. Kaik
</div>
<div class="profile-detailsEntry">
@ -56,10 +56,10 @@
</div>
</div>
<div class="profile-section">
<!-- if user has organisation -->
<!-- if user has organization -->
<div class="tabs wide-tabs horizontal">
<div class="tab js-userTickets active">Tickets von Doreen Kubiak</div>
<div class="tab js-organisationTickets">Tickets von Steuerbüro C. Kaik</div>
<div class="tab js-organizationTickets">Tickets von Steuerbüro C. Kaik</div>
</div>
<!-- endif -->
<div class="profile-ticketLists horizontal">

View file

@ -4,7 +4,7 @@
<div class="profile-section vertical centered">
<div class="align-right profile-action js-action"></div>
<div class="profile-organizationIcon">
<div class="organisation icon"></div>
<div class="organization icon"></div>
</div>
<h1><%= @organization.displayName() %></h1>
</div>

View file

@ -6,7 +6,7 @@
<%- @user.avatar("80") %>
<h1><%= @user.displayName() %></h1>
<% if @user.organization: %>
<div class="profile-organisation"><a href="<%- @user.organization.uiUrl() %>"><%= @user.organization.displayName() %></a></div>
<div class="profile-organization"><a href="<%- @user.organization.uiUrl() %>"><%= @user.organization.displayName() %></a></div>
<% end %>
</div>

View file

@ -25,6 +25,7 @@
//= require ./app/lib/bootstrap/dropdown.js
//= require ./app/lib/bootstrap/tooltip.js
//= require ./app/lib/bootstrap/popover.js
//= require ./app/lib/bootstrap/popover-enhance.js
//= require ./app/lib/bootstrap/modal.js
//= require ./app/lib/bootstrap/tab.js
//= require ./app/lib/bootstrap/transition.js

View file

@ -1294,15 +1294,15 @@ ol.tabs li {
@-moz-keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.organisation.icon {
.organization.icon {
height: 13px;
width: 14px;
background-position: 0 -118px;
}
.icon-switch:hover .organisation.icon,
.task.active .organisation.icon,
.white.organisation.icon {
.icon-switch:hover .organization.icon,
.task.active .organization.icon,
.white.organization.icon {
background-position: 0 -132px;
}
@ -2614,7 +2614,7 @@ footer {
background: white;
}
.popover .person .organisation {
.popover .person .organization {
color: #a1a4a7;
}
@ -2622,8 +2622,8 @@ footer {
margin: 8px 0;
}
.popover .person .organisation:before { content: '('; }
.popover .person .organisation:after { content: ')'; }
.popover .person .organization:before { content: '('; }
.popover .person .organization:after { content: ')'; }
.popover .column h3 {
margin: 8px 0 1px;
@ -4073,7 +4073,7 @@ footer {
}
.recipientList,
.recipientList-organisationMembers {
.recipientList-organizationMembers {
list-style: none;
padding: 0;
}
@ -4143,7 +4143,7 @@ footer {
margin-bottom: -2px;
}
.recipientList-organisationMembers {
.recipientList-organizationMembers {
position: absolute;
top: 0;
left: 0;

View file

@ -34,7 +34,7 @@ class CreateObjectManager < ActiveRecord::Migration
:multiple => false,
:null => false,
:limit => 200,
:placeholder => 'Enter Person or Organisation/Company',
:placeholder => 'Enter Person or Organization/Company',
:minLengt => 2,
:translate => false,
},