From 7b837066ec75ee8361e0cb8fa14097291cd20eb3 Mon Sep 17 00:00:00 2001 From: Lars Jung Date: Sat, 6 Dec 2014 23:54:31 +0100 Subject: [PATCH] Update notification and fix selection. --- src/_h5ai/client/css/inc/l10n.less | 0 src/_h5ai/client/css/inc/notify.less | 5 ++--- src/_h5ai/client/js/inc/ext/select.js | 14 ++++---------- 3 files changed, 6 insertions(+), 13 deletions(-) delete mode 100644 src/_h5ai/client/css/inc/l10n.less diff --git a/src/_h5ai/client/css/inc/l10n.less b/src/_h5ai/client/css/inc/l10n.less deleted file mode 100644 index e69de29b..00000000 diff --git a/src/_h5ai/client/css/inc/notify.less b/src/_h5ai/client/css/inc/notify.less index 9416e156..879c8098 100644 --- a/src/_h5ai/client/css/inc/notify.less +++ b/src/_h5ai/client/css/inc/notify.less @@ -2,13 +2,12 @@ #notify { position: fixed; left: 50%; - top: 3px; width: 200px; margin-left: -100px; z-index: 100; - padding: 2px 6px 2px 6px; + padding: 3px 6px 6px 6px; color: #fff; background-color: rgba(0, 0, 0, 0.2); - border-radius: 4px; + border-radius: 0 0 4px 4px; text-align: center; } diff --git a/src/_h5ai/client/js/inc/ext/select.js b/src/_h5ai/client/js/inc/ext/select.js index 7d0b5745..4c9b6ff2 100644 --- a/src/_h5ai/client/js/inc/ext/select.js +++ b/src/_h5ai/client/js/inc/ext/select.js @@ -104,20 +104,14 @@ modulejs.define('ext/select', ['_', '$', 'core/settings', 'core/resource', 'core function selectionStart(event) { - window.console.log(event); - - var $window = $(window); - var viewRight = $window.scrollLeft() + $window.width(); - var viewBottom = $window.scrollTop() + $window.height(); + // only on left button and don't block scrollbar + if (event.button !== 0 || event.offsetX >= $('#content').width() - 14) { + return; + } x = event.pageX; y = event.pageY; - // only on left button and don't block the scrollbars - if (event.button !== 0 || x >= viewRight || y >= viewBottom) { - return; - } - $(':focus').blur(); if (!event.ctrlKey && !event.metaKey) { $('#items .item').removeClass('selected');