Skip to content

Commit

Permalink
HDX-10171 add less button
Browse files Browse the repository at this point in the history
  • Loading branch information
ccataalin committed Dec 19, 2024
1 parent 5bfa00e commit ed079b2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ $(document).ready(function() {
$('.more-dates').toggleClass('d-none');
});

$('#show-extra-fields').on('click', function(e) {
$('#show-extra-fields, #hide-extra-fields').on('click', function(e) {
e.preventDefault();
var $wrapper = $(this).parent();
var $extraFields = $wrapper.parent().find('.additional-info-extra-fields');
$wrapper.remove();
$extraFields.removeClass('d-none');
$('#show-extra-fields, #hide-extra-fields').toggleClass('d-none');
$('.additional-info-extra-fields').toggleClass('d-none');
});

$('#showDatasetActivity').on('change', function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ $(document).ready(function() {
$('.more-dates').toggleClass('d-none');
});

$('#show-extra-fields').on('click', function(e) {
$('#show-extra-fields, #hide-extra-fields').on('click', function(e) {
e.preventDefault();
var $wrapper = $(this).parent();
var $extraFields = $wrapper.parent().find('.additional-info-extra-fields');
$wrapper.remove();
$extraFields.removeClass('d-none');
$('#show-extra-fields, #hide-extra-fields').toggleClass('d-none');
$('.additional-info-extra-fields').toggleClass('d-none');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,6 @@ $('document').ready(function(){
$('.show-extra-dates, .hide-extra-dates', parent).toggleClass('d-none');
$('.more-dates', parent).toggleClass('d-none');
});

$('#show-extra-fields').on('click', function(e) {
e.preventDefault();
var $wrapper = $(this).parent();
var $extraFields = $wrapper.parent().find('.additional-info-extra-fields');
$wrapper.remove();
$extraFields.removeClass('d-none');
});
});

function process_title(title, termList){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,10 @@
</div>
{% endif %}
{% endif %}

<div class="mb-3">
<a href="#" class="d-none" id="hide-extra-fields">{{ _('Less') }}</a>
</div>
</div>

<div class="mb-3">
Expand Down

0 comments on commit ed079b2

Please sign in to comment.