disable it in settings

This commit is contained in:
Squidly271 2023-05-06 08:28:26 -04:00
parent 0d65644ce1
commit 2326a42bc0
6 changed files with 24 additions and 61 deletions

Binary file not shown.

View File

@ -184,9 +184,7 @@ var resizeTimer;
var portsInUse = []; var portsInUse = [];
var startupSearch = "<?=$_GET['search'] ?? ""?>"; var startupSearch = "<?=$_GET['search'] ?? ""?>";
var iconHoverTimer; var iconHoverTimer;
var wheelActive = false; var wheelActive = false;
var swipeBounce = false;
$(function(){ $(function(){
window.onerror = function(msg,url,lineNo,columnNo, error) { window.onerror = function(msg,url,lineNo,columnNo, error) {
@ -726,38 +724,24 @@ $(function(){
var name = $(this).data("name"); var name = $(this).data("name");
removeApp(path,name); removeApp(path,name);
}); });
<?if ($cfg['wheelPage'] == "no"):?>
addEventListener("wheel",swipePage); addEventListener("wheel",function(event){
function swipePage(event) {
console.log(event.deltaX);
if (wheelActive) if (wheelActive)
return; return;
if ( $(".sidebar").is(":visible") ) if ( $(".sidebar").is(":visible") )
return; return;
if ($("body").width() < 1260 ) return; // dynamix coding if ($("body").width() < 1260 ) return; // dynamix coding
event.stopPropagation(); event.stopPropagation();
event.preventDefault();
/* if (event.deltaX < 100 && event.deltaX > -100) {
setTimeout(function() {
wheelActive = false;
},200);
return;
} */
if ( $(".pageRight").is(":visible") ) { if ( $(".pageRight").is(":visible") ) {
if (event.deltaX >50) { if (event.deltaX >50) {
if ( !$(".pageRight").hasClass("pageNavNoClick")) { if ( !$(".pageRight").hasClass("pageNavNoClick")) {
wheelActive = true; wheelActive = true;
setTimeout(function() { setTimeout(function() {
wheelActive = false; wheelActive = false;
},1000); },1000);
$(".pageRight").click(); $(".pageRight").click();
} }
} }
if (event.deltaX < -50) { if (event.deltaX < -50) {
if (! $(".pageLeft").hasClass("pageNavNoClick")) { if (! $(".pageLeft").hasClass("pageNavNoClick")) {
@ -769,13 +753,10 @@ $(function(){
$(".pageLeft").click(); $(".pageLeft").click();
} }
} }
} else
} else
wheelActive = false; wheelActive = false;
});
<?endif;?>
}
<? if ($cfg['sidebarOpen'] == "yes"):?> <? if ($cfg['sidebarOpen'] == "yes"):?>
$("body").on("mouseover",".ca_displayIcon,.infoButton,.displayIcon,.card_readmore",function() { $("body").on("mouseover",".ca_displayIcon,.infoButton,.displayIcon,.card_readmore",function() {

View File

@ -1,11 +1,11 @@
649eb1afe81b06e1d93b7431bcc71687 ./Apps.page 6643ff499b587226a3f672e97b03da31 ./Apps.page
106b521c1feebda4d7b3f558cc016cda ./CA_notices.page 106b521c1feebda4d7b3f558cc016cda ./CA_notices.page
eb1f0ee4148747c0473e73e4e973994f ./ca_settings.page 39053aadf8ec0771de1e2c2dd47e9058 ./ca_settings.page
e8d29607ec792ddf9f6832b10ee70fdc ./default.cfg 01ed7990078dee7cecfeda9a4e49377e ./default.cfg
7e22b781295bbf10fe0089378b9ba76b ./include/exec.php 7e22b781295bbf10fe0089378b9ba76b ./include/exec.php
6315b71595f089a310861ef2e1954d84 ./include/helpers.php 6315b71595f089a310861ef2e1954d84 ./include/helpers.php
3f6ae4c4fef3077dd2ca45117f780846 ./include/paths.php 3f6ae4c4fef3077dd2ca45117f780846 ./include/paths.php
12d7ee42aadd961dbbc436ae2fd73d9a ./javascript/libraries.js 532fffdf939594c143e679da02bd841e ./javascript/libraries.js
71f911a818d88d3d567f8a2898094ee2 ./README.md 71f911a818d88d3d567f8a2898094ee2 ./README.md
ec075d8b9758ba00bda9b02c4692f972 ./scripts/checkForUpdates.php ec075d8b9758ba00bda9b02c4692f972 ./scripts/checkForUpdates.php
99a9d58a49a7f6812f18bd4be2b563b9 ./scripts/checkForUpdates.sh 99a9d58a49a7f6812f18bd4be2b563b9 ./scripts/checkForUpdates.sh

View File

@ -89,6 +89,15 @@ function debug() {
> <?tr("This setting enables CA to check for updates to applications");?> > <?tr("This setting enables CA to check for updates to applications");?>
<?tr("Disable Mouse Wheel Page Changes:");?>
: <select name="wheelPage" size="1">
<?=mk_option($cfg['wheelPage'],"no",tr("No",true))?>
<?=mk_option($cfg['wheelPage'],"yes",tr("Yes",true))?>
</select>
> <?tr("This setting disables using left or right on a mouse wheel to change the page");?>
<?tr("Allow CA to send any emergency notifications:");?> <?tr("Allow CA to send any emergency notifications:");?>
: <select name='notifications' size='1'> : <select name='notifications' size='1'>
<?=mk_option($cfg['notifications'],"yes",tr("Yes",true))?> <?=mk_option($cfg['notifications'],"yes",tr("Yes",true))?>

View File

@ -6,4 +6,5 @@ debugging="no"
updateCheck="yes" updateCheck="yes"
dev="no" dev="no"
maxPerPage="24" maxPerPage="24"
sidebarOpen="yes" sidebarOpen="yes"
wheelPage="no"