From 874c311f473dfa973ff63617d15757a43832d7b0 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 31 Jul 2012 03:30:53 -0400 Subject: [PATCH] added ability rename files --- client.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/client.js b/client.js index 4b9eaeda..a3edc350 100644 --- a/client.js +++ b/client.js @@ -256,10 +256,19 @@ CloudClient._setCurrent=(function(){ if(this.className!=='path' && this.className!=='fm_header'){ - lCurrentFile[0].className=''; - /* устанавливаем курсор на файл, - * на который нажали */ - this.className=CloudClient.CURRENT_FILE; + if (this.className === CloudClient.CURRENT_FILE){ + var lA = this.getEgetElementsByTagName('a'); + if (lA.length){ + lA[0].contentEditable = true; + CloudCommander.keyBinding = false; + } + } + else{ + lCurrentFile[0].className=''; + /* устанавливаем курсор на файл, + * на который нажали */ + this.className = CloudClient.CURRENT_FILE; + } } } /* если мы попали сюда с энтера*/