From 9c361a7a255ba4651d3446d10964cf11036c27e8 Mon Sep 17 00:00:00 2001 From: felmer <franz-josef.elmer@id.ethz.ch> Date: Tue, 28 Aug 2018 08:25:25 +0200 Subject: [PATCH] SSDM-7071: BlockScrollUtil not needed because extra blocking scrolling of main window isn't needed --- .../eln-lims/html/js/util/BlockScrollUtil.js | 61 ------------------- 1 file changed, 61 deletions(-) delete mode 100644 openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/BlockScrollUtil.js diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/BlockScrollUtil.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/BlockScrollUtil.js deleted file mode 100644 index 03f8e8b8e60..00000000000 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/BlockScrollUtil.js +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2014 ETH Zuerich, Scientific IT Services - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// Based on http://stackoverflow.com/questions/4770025/how-to-disable-scrolling-temporarily - -// left: 37, up: 38, right: 39, down: 40, -// spacebar: 32, pageup: 33, pagedown: 34, end: 35, home: 36 -var BlockScrollUtil = new function() { - this.keys = [37, 38, 39, 40]; - - this.preventDefault = function(e) { - e = e || window.event; - if (e.preventDefault) - e.preventDefault(); - e.returnValue = false; - } - - this.keydown = function(e) { - for (var i = BlockScrollUtil.keys.length; i--;) { - if (e.keyCode === BlockScrollUtil.keys[i]) { - BlockScrollUtil.preventDefault(e); - return; - } - } - } - - this.wheel = function(e) { - BlockScrollUtil.preventDefault(e); - } - - this.disable_scroll = function() { - if (window.addEventListener) { - window.addEventListener('DOMMouseScroll', BlockScrollUtil.wheel, false); - } - window.onmousewheel = document.onmousewheel = BlockScrollUtil.wheel; - - document.onkeydown = function(e) { - BlockScrollUtil.keydown(e); - }; - } - - this.enable_scroll = function() { - if (window.removeEventListener) { - window.removeEventListener('DOMMouseScroll', BlockScrollUtil.wheel, false); - } - window.onmousewheel = document.onmousewheel = document.onkeydown = null; - } - } -- GitLab