Browse Source

MSPB-135: Fix group buy-in numbers inerstion target (#270)

* Drop dead code

This legacy code used to list spare numbers along assigned numbers, task
that is now taken care of by numbers' common control spare dialog
selector.

* Fix group buy-in numbers insertion target
4.3
Joris Tirado 5 years ago
committed by GitHub
parent
commit
4fa245eb82
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 63 deletions
  1. +0
    -9
      submodules/groups/groups.css
  2. +2
    -54
      submodules/groups/groups.js

+ 0
- 9
submodules/groups/groups.css View File

@ -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;
}


+ 2
- 54
submodules/groups/groups.js View File

@ -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);
});
}
}


Loading…
Cancel
Save