From cc7d9ee91207080962fae28d98cd61335c17c86d Mon Sep 17 00:00:00 2001 From: Lars Jung Date: Sat, 11 Aug 2012 13:36:51 +0200 Subject: [PATCH] Fixes selection update for deleted entries. --- src/_h5ai/config.js | 2 +- src/_h5ai/css/inc/context-menu.less | 9 ++------- src/_h5ai/js/inc/ext/select.js | 8 ++++++++ 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/_h5ai/config.js b/src/_h5ai/config.js index 1ce1e655..0ec20073 100644 --- a/src/_h5ai/config.js +++ b/src/_h5ai/config.js @@ -40,7 +40,7 @@ var H5AI_CONFIG = { Set parent folder labels to real folder names. */ "view": { - "modes": ["details", "list", "icons"], + "modes": ["details", "icons"], "setParentFolderLabels": true }, diff --git a/src/_h5ai/css/inc/context-menu.less b/src/_h5ai/css/inc/context-menu.less index 25b8ff91..6014e527 100644 --- a/src/_h5ai/css/inc/context-menu.less +++ b/src/_h5ai/css/inc/context-menu.less @@ -6,12 +6,10 @@ right: 0; top: 0; background-color: rgb(241,241,241); - // border: 1px solid rgb(210,210,210); - border: 2px solid rgb(210,210,210); + border: 1px solid rgb(210,210,210); color: #999; z-index: 10; font-size: 0.9em; - .border-radius(4px); ul { margin: 0; @@ -20,12 +18,10 @@ text-align: left; li { - // padding: 8px 12px 10px 12px; - padding: 4px 4px 4px 4px; + padding: 8px 12px 10px 12px; white-space: nowrap; border-top: 1px solid rgb(231,231,231); .transition(all 0.2s ease-in-out); - .border-radius(4px); &:hover { color: #e80; @@ -34,4 +30,3 @@ } } } - diff --git a/src/_h5ai/js/inc/ext/select.js b/src/_h5ai/js/inc/ext/select.js index 6d89af00..f88f171c 100644 --- a/src/_h5ai/js/inc/ext/select.js +++ b/src/_h5ai/js/inc/ext/select.js @@ -125,6 +125,14 @@ modulejs.define('ext/select', ['_', '$', 'core/settings', 'core/event'], functio $selectionRect.hide().appendTo('body'); + event.sub('entry.removed', function (entry) { + + if (entry.$extended && entry.$extended.hasClass('selected')) { + entry.$extended.removeClass('selected'); + publish(); + } + }); + $document .on('mousedown', '.noSelection', noSelection) .on('mousedown', '.noSelectionUnlessCtrl,input,a', noSelectionUnlessCtrl)