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 startupSearch = "<?=$_GET['search'] ?? ""?>";
var iconHoverTimer;
var wheelActive = false;
var swipeBounce = false;
var wheelActive = false;
$(function(){
window.onerror = function(msg,url,lineNo,columnNo, error) {
@ -726,29 +724,16 @@ $(function(){
var name = $(this).data("name");
removeApp(path,name);
});
addEventListener("wheel",swipePage);
function swipePage(event) {
console.log(event.deltaX);
<?if ($cfg['wheelPage'] == "no"):?>
addEventListener("wheel",function(event){
if (wheelActive)
return;
if ( $(".sidebar").is(":visible") )
return;
if ($("body").width() < 1260 ) return; // dynamix coding
if ($("body").width() < 1260 ) return; // dynamix coding
event.stopPropagation();
event.preventDefault();
/* if (event.deltaX < 100 && event.deltaX > -100) {
setTimeout(function() {
wheelActive = false;
},200);
return;
} */
if ( $(".pageRight").is(":visible") ) {
if (event.deltaX >50) {
if ( !$(".pageRight").hasClass("pageNavNoClick")) {
wheelActive = true;
@ -757,7 +742,6 @@ $(function(){
},1000);
$(".pageRight").click();
}
}
if (event.deltaX < -50) {
if (! $(".pageLeft").hasClass("pageNavNoClick")) {
@ -769,13 +753,10 @@ $(function(){
$(".pageLeft").click();
}
}
} else
wheelActive = false;
}
});
<?endif;?>
<? if ($cfg['sidebarOpen'] == "yes"):?>
$("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
eb1f0ee4148747c0473e73e4e973994f ./ca_settings.page
e8d29607ec792ddf9f6832b10ee70fdc ./default.cfg
39053aadf8ec0771de1e2c2dd47e9058 ./ca_settings.page
01ed7990078dee7cecfeda9a4e49377e ./default.cfg
7e22b781295bbf10fe0089378b9ba76b ./include/exec.php
6315b71595f089a310861ef2e1954d84 ./include/helpers.php
3f6ae4c4fef3077dd2ca45117f780846 ./include/paths.php
12d7ee42aadd961dbbc436ae2fd73d9a ./javascript/libraries.js
532fffdf939594c143e679da02bd841e ./javascript/libraries.js
71f911a818d88d3d567f8a2898094ee2 ./README.md
ec075d8b9758ba00bda9b02c4692f972 ./scripts/checkForUpdates.php
99a9d58a49a7f6812f18bd4be2b563b9 ./scripts/checkForUpdates.sh

View File

@ -89,6 +89,15 @@ function debug() {
> <?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:");?>
: <select name='notifications' size='1'>
<?=mk_option($cfg['notifications'],"yes",tr("Yes",true))?>

View File

@ -7,3 +7,4 @@ updateCheck="yes"
dev="no"
maxPerPage="24"
sidebarOpen="yes"
wheelPage="no"