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 {
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;
}

View file

@ -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');