Skip to content

Commit

Permalink
Fully support data limit
Browse files Browse the repository at this point in the history
  • Loading branch information
remdex committed Oct 4, 2021
1 parent 3ab5d99 commit 630598c
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 8 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion lhc_web/design/defaulttheme/js/lh.js
Expand Up @@ -4410,7 +4410,13 @@ $.fn.makeDropdown = function() {
var presentId = 0;
if ($(this).is(':checked')) {
if (selectedItems.find('.delete-item[data-value="'+$(this).val()+'"]').length == 0) {
selectedItems.prepend('<div class="fs12"><a data-stoppropagation="true" class="delete-item" data-value="' + $(this).val() + '"><input type="hidden" value="' + $(this).val() + '" name="'+_thisItem.find('.btn-block-department-filter > input').attr('data-scope')+'[]" /><i class="material-icons chat-unread">delete</i>' + $(this).parent().text().trim() + "</a></div>");
selectedItems.prepend('<div class="fs12"><a data-stoppropagation="true" class="delete-item" data-value="' + $(this).val() + '"><input type="hidden" value="' + $(this).val() + '" name="'+_thisItem.find('.btn-block-department-filter > input').attr('data-scope')+(limitMax == 0 || limitMax > 1 ? '[]' : '')+'" /><i class="material-icons chat-unread">delete</i>' + $(this).parent().text().trim() + "</a></div>");
}
if (limitMax > 0) {
selectedItems.find('.delete-item:gt('+(limitMax - 1)+')').each(function(){
$(this).parent().remove();
$('.search-option-item > label > input[value='+$(this).attr('data-value')+']').prop('checked',false);
});
}
} else {
selectedItems.find('.delete-item[data-value="'+$(this).val()+'"]').remove();
Expand Down
2 changes: 1 addition & 1 deletion lhc_web/design/defaulttheme/js/lh.min.js

Large diffs are not rendered by default.

0 comments on commit 630598c

Please sign in to comment.