Skip to content

Commit

Permalink
Prevent window scrolling when clicking on view group title - but Wifi…
Browse files Browse the repository at this point in the history
… still bugs (?)
  • Loading branch information
soif committed Oct 18, 2024
1 parent a035e3e commit ef1570a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/www/static/js/toh_main.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ $(document).ready(function () {


// one view click (or change) ----------------------
$('#custom-content').on('click change','INPUT',function(e){
$('#custom-content').on('click viewchanged','INPUT',function(e){
var field=$(this).val();
if($(this).is(":checked")){
table.showColumn(field);
Expand All @@ -334,14 +334,16 @@ $(document).ready(function () {

// view group click ----------------------
$('#custom-content').on('click','.group-title A',function(e){
e.preventDefault();
//e.stopPropagation();
$('#head-loading').show();
var checked =$(this).parents('.view-group').find('LI INPUT:checked').length;
var inputs =$(this).parents('.view-group').find('LI INPUT');
if(checked==0){
inputs.prop('checked', true).trigger('change');
inputs.prop('checked', true).trigger('viewchanged');
}
else{
inputs.prop('checked', false).trigger('change');
inputs.prop('checked', false).trigger('viewchanged');
}
groupsUpdateIcon();
});
Expand All @@ -352,6 +354,8 @@ $(document).ready(function () {
// });

$('#custom-content').on('click','.devToggle',function(e){
e.preventDefault();
e.stopPropagation();
$('#custom-content SMALL').toggle();
});
});
Expand Down

0 comments on commit ef1570a

Please sign in to comment.