diff --git a/submodules/groups/groups.css b/submodules/groups/groups.css index 70f675c..ef8cb8f 100644 --- a/submodules/groups/groups.css +++ b/submodules/groups/groups.css @@ -304,11 +304,6 @@ background: #FFF; } -#groups_container .list-unassigned-items{ - overflow: auto; - max-height: 211px; -} - #groups_container .unassigned-list-header { padding: 10px; height: 32px; @@ -384,10 +379,6 @@ margin-right: 46px; } -#groups_container .list-wrapper .list-unassigned-items .features-block { - display: none; -} - #groups_container .list-wrapper .features-block .dropdown { margin-top: -4px; } diff --git a/submodules/groups/groups.js b/submodules/groups/groups.js index 7b96652..54d4eed 100644 --- a/submodules/groups/groups.js +++ b/submodules/groups/groups.js @@ -1210,43 +1210,8 @@ define(function(require) { groupsBindNumbers: function(template, data) { var self = this, toastrMessages = self.i18n.active().groups.toastrMessages, - currentNumberSearch = '', extraSpareNumbers = []; - // template.on('click', '.list-assigned-items .remove-number', function() { - // var row = $(this).parents('.item-row'), - // spare = template.find('.count-spare'), - // countSpare = spare.data('count') + 1, - // unassignedList = template.find('.list-unassigned-items'); - - // /* Alter the html */ - // row.hide(); - - // row.find('button') - // .removeClass('remove-number btn-danger') - // .addClass('add-number btn-primary') - // .text(self.i18n.active().add); - - // unassignedList.append(row); - // unassignedList.find('.empty-row').hide(); - - // spare - // .html(countSpare) - // .data('count', countSpare); - - // var rows = template.find('.list-assigned-items .item-row'); - // /* If no rows beside the clicked one, display empty row */ - // if (rows.is(':visible') === false) { - // template.find('.list-assigned-items .empty-row').show(); - // } - - // /* If it matches the search string, show it */ - // if (row.data('search').indexOf(currentNumberSearch) >= 0) { - // row.show(); - // unassignedList.find('.empty-search-row').hide(); - // } - // }); - template.on('click', '.list-assigned-items .remove-number', function() { var $this = $(this), row = $this.parents('.item-row'); @@ -1264,23 +1229,6 @@ define(function(require) { }); }); - template.on('keyup', '.list-wrapper .unassigned-list-header .search-query', function() { - var rows = template.find('.list-unassigned-items .item-row'), - emptySearch = template.find('.list-unassigned-items .empty-search-row'), - currentRow; - - currentNumberSearch = $(this).val().toLowerCase(); - - _.each(rows, function(row) { - currentRow = $(row); - currentRow.data('search').toLowerCase().indexOf(currentNumberSearch) < 0 ? currentRow.hide() : currentRow.show(); - }); - - if (rows.size() > 0) { - rows.is(':visible') ? emptySearch.hide() : emptySearch.show(); - } - }); - template.on('click', '.actions .spare-link:not(.disabled)', function(e) { e.preventDefault(); @@ -1359,8 +1307,8 @@ define(function(require) { monster.ui.tooltips(rowTemplate); - template.find('.list-unassigned-items .empty-row').hide(); - template.find('.list-unassigned-items').append(rowTemplate); + template.find('.list-assigned-items .empty-row').hide(); + template.find('.list-assigned-items').append(rowTemplate); }); } }