Merge branch 'develop' of github.com:martini/zammad into develop
This commit is contained in:
commit
b338e10610
2 changed files with 18 additions and 5 deletions
|
@ -25,6 +25,14 @@ class App.ColumnSelect extends Spine.Controller
|
|||
super
|
||||
@render()
|
||||
|
||||
@throttledRemove = _.throttle =>
|
||||
@remove @pickedValue
|
||||
, 300, {trailing: false}
|
||||
|
||||
@throttledSelect = _.throttle =>
|
||||
@select @pickedValue
|
||||
, 300, {trailing: false}
|
||||
|
||||
render: ->
|
||||
@values = []
|
||||
_.each @options.attribute.options, (option) =>
|
||||
|
@ -43,7 +51,8 @@ class App.ColumnSelect extends Spine.Controller
|
|||
# , 0
|
||||
|
||||
onSelect: (event) ->
|
||||
@select $(event.currentTarget).attr('data-value')
|
||||
@pickedValue = $(event.currentTarget).attr('data-value')
|
||||
@throttledSelect()
|
||||
|
||||
select: (value) ->
|
||||
@selected.find("[data-value='#{value}']").removeClass 'is-hidden'
|
||||
|
@ -58,7 +67,8 @@ class App.ColumnSelect extends Spine.Controller
|
|||
@clear()
|
||||
|
||||
onRemove: (event) ->
|
||||
@remove $(event.currentTarget).attr('data-value')
|
||||
@pickedValue = $(event.currentTarget).attr('data-value')
|
||||
@throttledRemove()
|
||||
|
||||
remove: (value) ->
|
||||
@pool.find("[data-value='#{value}']").removeClass 'is-hidden'
|
||||
|
@ -91,6 +101,9 @@ class App.ColumnSelect extends Spine.Controller
|
|||
onFilterKeydown: (event) ->
|
||||
return if event.keyCode != 13
|
||||
|
||||
event.stopPropagation()
|
||||
event.preventDefault()
|
||||
|
||||
firstVisibleOption = @poolOptions.not('.is-filtered').not('.is-hidden').first()
|
||||
if firstVisibleOption
|
||||
@select firstVisibleOption.attr('data-value')
|
|
@ -23,9 +23,9 @@
|
|||
<% for chat in @chats: %>
|
||||
<tr>
|
||||
<td><%= chat.name %>
|
||||
<td><label class="inline-label"><input name="chat::phrase::<%- chat.id %>" value="<%= @preferences.chat.phrase[chat.id] %>" class="form-control form-control--small" placeholder="<%- @T('Hello, my name is %s, what can I do for you?', App.Session.get('firstname')) %>"/></label>
|
||||
<td>
|
||||
<label class="inline-label checkbox-replacement">
|
||||
<td class="settings-list-control-cell"><label class="inline-label"><input name="chat::phrase::<%- chat.id %>" value="<%= @preferences.chat.phrase[chat.id] %>" class="form-control form-control--small" placeholder="<%- @T('Hello, my name is %s, what can I do for you?', App.Session.get('firstname')) %>"/></label>
|
||||
<td class="u-positionOrigin">
|
||||
<label class="checkbox-replacement checkbox-replacement--fullscreen">
|
||||
<input type="checkbox" name="chat::active::<%- chat.id %>" <% if @preferences.chat.active[chat.id]: %>checked<% end %>>
|
||||
<%- @Icon('checkbox', 'icon-unchecked') %>
|
||||
<%- @Icon('checkbox-checked', 'icon-checked') %>
|
||||
|
|
Loading…
Reference in a new issue