From 128bf64e008ee91d5d5a71335d54b7976bf3ec51 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Sun, 21 Apr 2013 10:14:23 -0400 Subject: [PATCH] fixed bug with getting back to directory where file was removed --- ChangeLog | 6 +++++- ChangeLog.rus.md | 1 + lib/client/dom.js | 8 +++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8c8d8524..65146bfd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -87,7 +87,11 @@ is pressed and current file is directory. * Fixed header of api fs GET. -* Fixed bug with sending response on query other then json on /fs url. +* Fixed bug with sending response on +query other then json on /fs url. + +* Fixed bug with getting back to +directory where file was removed. 2012.03.01, v0.1.9 diff --git a/ChangeLog.rus.md b/ChangeLog.rus.md index f28cb31b..84ba0b4f 100644 --- a/ChangeLog.rus.md +++ b/ChangeLog.rus.md @@ -35,6 +35,7 @@ - Стиль выделения в Опере. - Заголовок выдачи REST-фукнции fs метода GET. - Отправка данных в ответ на запрос отличный от ?json в пути /url. +- Возвращение в папку, из которой был удален файл. **Обновлены:** - jquery до версии v2.0.0 diff --git a/lib/client/dom.js b/lib/client/dom.js index d5c4c31f..2584addd 100644 --- a/lib/client/dom.js +++ b/lib/client/dom.js @@ -496,9 +496,15 @@ var CloudCommander, Util, DOM = {}, CloudFunc; if(lCurrent || lSelected) DOM.RESTfull.delete(lUrl, lSelected, function(){ if(n > 1) - DOM.deleteSelected(lFiles); + DOM.deleteSelected(lFiles); else DOM.deleteCurrent(lCurrent); + + var lDir = CloudFunc.removeLastSlash( + DOM.getCurrentDirPath() + ); + + DOM.Cache.remove(lDir); }, lQuery); return lCurrent;