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
|
super
|
||||||
@render()
|
@render()
|
||||||
|
|
||||||
|
@throttledRemove = _.throttle =>
|
||||||
|
@remove @pickedValue
|
||||||
|
, 300, {trailing: false}
|
||||||
|
|
||||||
|
@throttledSelect = _.throttle =>
|
||||||
|
@select @pickedValue
|
||||||
|
, 300, {trailing: false}
|
||||||
|
|
||||||
render: ->
|
render: ->
|
||||||
@values = []
|
@values = []
|
||||||
_.each @options.attribute.options, (option) =>
|
_.each @options.attribute.options, (option) =>
|
||||||
|
@ -43,7 +51,8 @@ class App.ColumnSelect extends Spine.Controller
|
||||||
# , 0
|
# , 0
|
||||||
|
|
||||||
onSelect: (event) ->
|
onSelect: (event) ->
|
||||||
@select $(event.currentTarget).attr('data-value')
|
@pickedValue = $(event.currentTarget).attr('data-value')
|
||||||
|
@throttledSelect()
|
||||||
|
|
||||||
select: (value) ->
|
select: (value) ->
|
||||||
@selected.find("[data-value='#{value}']").removeClass 'is-hidden'
|
@selected.find("[data-value='#{value}']").removeClass 'is-hidden'
|
||||||
|
@ -58,7 +67,8 @@ class App.ColumnSelect extends Spine.Controller
|
||||||
@clear()
|
@clear()
|
||||||
|
|
||||||
onRemove: (event) ->
|
onRemove: (event) ->
|
||||||
@remove $(event.currentTarget).attr('data-value')
|
@pickedValue = $(event.currentTarget).attr('data-value')
|
||||||
|
@throttledRemove()
|
||||||
|
|
||||||
remove: (value) ->
|
remove: (value) ->
|
||||||
@pool.find("[data-value='#{value}']").removeClass 'is-hidden'
|
@pool.find("[data-value='#{value}']").removeClass 'is-hidden'
|
||||||
|
@ -91,6 +101,9 @@ class App.ColumnSelect extends Spine.Controller
|
||||||
onFilterKeydown: (event) ->
|
onFilterKeydown: (event) ->
|
||||||
return if event.keyCode != 13
|
return if event.keyCode != 13
|
||||||
|
|
||||||
|
event.stopPropagation()
|
||||||
|
event.preventDefault()
|
||||||
|
|
||||||
firstVisibleOption = @poolOptions.not('.is-filtered').not('.is-hidden').first()
|
firstVisibleOption = @poolOptions.not('.is-filtered').not('.is-hidden').first()
|
||||||
if firstVisibleOption
|
if firstVisibleOption
|
||||||
@select firstVisibleOption.attr('data-value')
|
@select firstVisibleOption.attr('data-value')
|
|
@ -23,9 +23,9 @@
|
||||||
<% for chat in @chats: %>
|
<% for chat in @chats: %>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= chat.name %>
|
<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 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>
|
<td class="u-positionOrigin">
|
||||||
<label class="inline-label checkbox-replacement">
|
<label class="checkbox-replacement checkbox-replacement--fullscreen">
|
||||||
<input type="checkbox" name="chat::active::<%- chat.id %>" <% if @preferences.chat.active[chat.id]: %>checked<% end %>>
|
<input type="checkbox" name="chat::active::<%- chat.id %>" <% if @preferences.chat.active[chat.id]: %>checked<% end %>>
|
||||||
<%- @Icon('checkbox', 'icon-unchecked') %>
|
<%- @Icon('checkbox', 'icon-unchecked') %>
|
||||||
<%- @Icon('checkbox-checked', 'icon-checked') %>
|
<%- @Icon('checkbox-checked', 'icon-checked') %>
|
||||||
|
|
Loading…
Reference in a new issue