Update notification and fix selection.

This commit is contained in:
Lars Jung 2014-12-06 23:54:31 +01:00
parent 1670528bec
commit 7b837066ec
3 changed files with 6 additions and 13 deletions

View file

@ -2,13 +2,12 @@
#notify { #notify {
position: fixed; position: fixed;
left: 50%; left: 50%;
top: 3px;
width: 200px; width: 200px;
margin-left: -100px; margin-left: -100px;
z-index: 100; z-index: 100;
padding: 2px 6px 2px 6px; padding: 3px 6px 6px 6px;
color: #fff; color: #fff;
background-color: rgba(0, 0, 0, 0.2); background-color: rgba(0, 0, 0, 0.2);
border-radius: 4px; border-radius: 0 0 4px 4px;
text-align: center; text-align: center;
} }

View file

@ -104,20 +104,14 @@ modulejs.define('ext/select', ['_', '$', 'core/settings', 'core/resource', 'core
function selectionStart(event) { function selectionStart(event) {
window.console.log(event); // only on left button and don't block scrollbar
if (event.button !== 0 || event.offsetX >= $('#content').width() - 14) {
var $window = $(window); return;
var viewRight = $window.scrollLeft() + $window.width(); }
var viewBottom = $window.scrollTop() + $window.height();
x = event.pageX; x = event.pageX;
y = event.pageY; y = event.pageY;
// only on left button and don't block the scrollbars
if (event.button !== 0 || x >= viewRight || y >= viewBottom) {
return;
}
$(':focus').blur(); $(':focus').blur();
if (!event.ctrlKey && !event.metaKey) { if (!event.ctrlKey && !event.metaKey) {
$('#items .item').removeClass('selected'); $('#items .item').removeClass('selected');