Index: pro-bachkim-filespace/sourcecode/application/config/autoload.php
===================================================================
--- pro-bachkim-filespace/sourcecode/application/config/autoload.php	(revision 65)
+++ pro-bachkim-filespace/sourcecode/application/config/autoload.php	(revision 66)
@@ -65,5 +65,5 @@
 */
 
-$autoload['helper'] = array('url','text');
+$autoload['helper'] = array('url','text','file');
 
 
Index: pro-bachkim-filespace/sourcecode/application/config/foreign_chars.php
===================================================================
--- pro-bachkim-filespace/sourcecode/application/config/foreign_chars.php	(revision 65)
+++ pro-bachkim-filespace/sourcecode/application/config/foreign_chars.php	(revision 66)
@@ -17,6 +17,15 @@
 	'/Ã|Ã|Ã|Ã|Ã|Ã
 |Çº|Ä|Ä|Ä|Ç/' => 'A',
+	'/Ã|Ã|áº |áº¢|áºŠ|áº€|áºš|áºª|áº¬|áº°|áº®|áº²|áºª|áº¶/' => 'A',
 	'/Ã |Ã¡|Ã¢|Ã£|Ã¥|Ç»|Ä|Ä|Ä
 |Ç|Âª/' => 'a',
+	'/aÌ|aÌ|Ã£|áº¡|áº£|Ã¢Ì|áº¥|áº©|áº«|Ã¢Ì£|áº±|áº¯|áº³|áºµ|áº·|aÌ£/' => 'a',
+	'/nháº­t/' => 'nhat',
+	'/Nháº­t/' => 'Nhat',
+	'/láº§n/' => 'lan',
+	'/Láº§n/' => 'Lan',
+	'/táº­p/' => 'tap',
+	'/Táº­p/' => 'Tap',
+	'/\|/' => '-',
 	'/Ã|Ä|Ä|Ä|Ä/' => 'C',
 	'/Ã§|Ä|Ä|Ä|Ä/' => 'c',
@@ -24,11 +33,14 @@
 	'/Ã°|Ä|Ä/' => 'd',
 	'/Ã|Ã|Ã|Ã|Ä|Ä|Ä|Ä|Ä/' => 'E',
+	'/Ã|Ã|áºº|áºž|áºŒ|á»|áºŸ|á»|á»|á»/' => 'E',
 	'/Ãš|Ã©|Ãª|Ã«|Ä|Ä|Ä|Ä|Ä/' => 'e',
+	'/Ãš|Ã©|áº»|áºœ|áº¹|á»|áº¿|á»|á»
+|á»|ÃªÌ|eÌ|eÌ/' => 'e',
 	'/Ä|Ä|Ä |Ä¢/' => 'G',
 	'/Ä|Ä|Ä¡|Ä£/' => 'g',
 	'/Ä€|ÄŠ/' => 'H',
 	'/Ä¥|Ä§/' => 'h',
-	'/Ã|Ã|Ã|Ã|Äš|Äª|Ä¬|Ç|Ä®|Ä°/' => 'I',
-	'/Ã¬|Ã­|Ã®|Ã¯|Ä©|Ä«|Ä­|Ç|Ä¯|Ä±/' => 'i',
+	'/Ã|Ã|Ã|Ã|Äš|Äª|Ä¬|Ç|Ä®|Ä°|á»|á»/' => 'I',
+	'/Ã¬|Ã­|Ã®|Ã¯|Ä©|Ä«|Ä­|Ç|Ä¯|Ä±|á»|á»/' => 'i',
 	'/ÄŽ/' => 'J',
 	'/Äµ/' => 'j',
@@ -41,5 +53,7 @@
 	'/Ã±|Å|Å|Å|Å/' => 'n',
 	'/Ã|Ã|Ã|Ã|Å|Å|Ç|Å|Æ |Ã|ÇŸ/' => 'O',
+	'/Ã|Ã|á»|Ã|á»|Ã|á»|á»|á»|á»|á»|Æ |á»|á»|á»|á» |á»¢/' => 'O',
 	'/Ã²|Ã³|ÃŽ|Ãµ|Å|Å|Ç|Å|Æ¡|Ãž|Ç¿|Âº/' => 'o',
+	'/Ã²|Ã³|á»|Ãµ|á»|ÃŽ|á»|á»|á»|á»|á»|Æ¡|á»|á»|Æ¡Ì|á»¡|á»£|oÌ|oÌ|oÌ£/' => 'o',
 	'/Å|Å|Å/' => 'R',
 	'/Å|Å|Å/' => 'r',
@@ -48,8 +62,9 @@
 	'/Å¢|Å€|ÅŠ/' => 'T',
 	'/Å£|Å¥|Å§/' => 't',
-	'/Ã|Ã|Ã|Åš|Åª|Å¬|Å®|Å°|Å²|Æ¯|Ç|Ç|Ç|Ç|Ç/' => 'U',
-	'/Ã¹|Ãº|Ã»|Å©|Å«|Å­|Å¯|Å±|Å³|Æ°|Ç|Ç|Ç|Ç|Ç/' => 'u',
-	'/Ã|Åž|Å¶/' => 'Y',
-	'/Ãœ|Ã¿|Å·/' => 'y',
+	'/Ã|Ã|Ã|Åš|Åª|Å¬|Å®|Å°|Å²|Æ¯|Ç|Ç|Ç|Ç|Ç|Åš|á»Š|á»€|á»ª|á»š|á»¬|á»®|á»°/' => 'U',
+	'/Ã¹|Ãº|Ã»|Å©|Å«|Å­|Å¯|Å±|Å³|Æ°|Ç|Ç|Ç|Ç|Ç|uÌ|á»§|á»¥|á»«|á»©|á»­|Æ°Ì|á»±|Æ°Ì|uÌ|uÌ/' => 'u',
+	'/uÌ/' => 'u',
+	'/Ã|Åž|Å¶|á»ž|á»¶|á»Ž|á»²/' => 'Y',
+	'/Ãœ|Ã¿|Å·|á»¹|á»·|á»µ|á»³/' => 'y',
 	'/ÅŽ/' => 'W',
 	'/Åµ/' => 'w',
@@ -61,5 +76,6 @@
 	'/Ä³/' => 'ij',
 	'/Å/' => 'OE',
-	'/Æ/' => 'f'
+	'/Æ/' => 'f',
+	'/: |\//' => ' - ',
 );
 
Index: pro-bachkim-filespace/sourcecode/application/libraries/vservices.php
===================================================================
--- pro-bachkim-filespace/sourcecode/application/libraries/vservices.php	(revision 65)
+++ pro-bachkim-filespace/sourcecode/application/libraries/vservices.php	(revision 66)
@@ -6,4 +6,5 @@
 	private $_curlObj;
 	private $_userId;
+	private $_password;
 	
 	public function __construct() {
@@ -23,4 +24,8 @@
 	}
 	
+	public function setPassword ($password) {
+		$this->_password = $password;
+	}
+	
 	public function getPrivateTree () {
 		$this->_curlObj->create($this->_apiUrl. 'space/dir/isgetall/1');
@@ -30,4 +35,20 @@
 		$post = array('userid' => $this->_userId);
 		$this->_curlObj->post($post);
+		return $this->_curlObj->execute();
+	}
+	
+	/**
+	 * $aryParams
+	 * 
+	 * @param unknown $action
+	 * @param unknown $aryParams
+	 */
+	public function actionExecute ($action, $aryParams = array()) {
+		$this->_curlObj->create($this->_apiUrl. 'space/'.$action);
+		$this->_curlObj->option(CURLOPT_BUFFERSIZE, 10);
+		$this->_curlObj->options(array(CURLOPT_BUFFERSIZE => 10));
+		
+		$aryParams['userid'] = $this->_userId;
+		$this->_curlObj->post($aryParams);
 		return $this->_curlObj->execute();
 	}
@@ -42,4 +63,14 @@
 		return $this->_curlObj->execute();
 	}
+	
+	public function deleteDir ($dirId) {
+		$this->_curlObj->create($this->_apiUrl. 'space/delete');
+		$this->_curlObj->option(CURLOPT_BUFFERSIZE, 10);
+		$this->_curlObj->options(array(CURLOPT_BUFFERSIZE => 10));
+		
+		$post = array('userid' => $this->_userId, 'type' => 'folder', 'id' => $dirId);
+		$this->_curlObj->post($post);
+		return $this->_curlObj->execute();
+	}
 		
 	public function __destruct() {
Index: pro-bachkim-filespace/sourcecode/application/modules/ajax/controllers/privatecontent.php
===================================================================
--- pro-bachkim-filespace/sourcecode/application/modules/ajax/controllers/privatecontent.php	(revision 65)
+++ pro-bachkim-filespace/sourcecode/application/modules/ajax/controllers/privatecontent.php	(revision 66)
@@ -42,27 +42,38 @@
 		$xmlData = $this->vservices->getPrivateTree();
 		$this->xml->parse($xmlData);
-
 		$aryDirs = array();
 		$aryFiles = array();
+		write_file('log.txt', var_export($xmlData, true));
 		
-		$aryError = array('err' => $this->xml->tree->_param['err'], 'errCode' => $this->xml->tree->_param['errCode']);
+		if (!isset($this->xml->tree)) {
+			$aryError = array('err' => 'KhÃŽng thá» káº¿t ná»i Äáº¿n mÃ¡y chá»§!', 'errCode' => '-1');
+			$aryData = array('DIRECTORIES' =>  array() , 'FILES' => array(), 'ERROR' => $aryError);
+			echo json_encode($aryData);
+			return;
+		}
 		
-		if (is_array($this->xml->tree->folderlist->folder)) {
-			foreach($this->xml->tree->folderlist->folder as $key=>$value){
-				$aryDirs[] = array('id' => $value->_param['id'], 'name' => $value->_value, 'parentID' => $value->_param['parentid'] == -1 ? 0:$value->_param['parentid']);
+		$aryError = array('err' => $this->xml->tree->_param['err'], 'errCode' => (int)$this->xml->tree->_param['errCode']);
+		
+		if (isset($this->xml->tree->folderlist->folder)) {
+			if (is_array($this->xml->tree->folderlist->folder)) {
+				foreach($this->xml->tree->folderlist->folder as $key=>$value){
+					$aryDirs[] = array('id' => $value->_param['id'], 'name' => $value->_value, 'parentID' => $value->_param['parentid'] == -1 ? 0:$value->_param['parentid']);
+				}
+			}
+			else {
+				$folder = $this->xml->tree->folderlist->folder;
+				$aryDirs[] = array('id' => $folder->_param['id'], 'name' => $folder->_value,'parentID' => $folder->_param['parentid'] == -1 ? 0:$folder->_param['parentid']);
 			}
 		}
-		else if (isset($this->xml->tree->folderlist->folder)) {
-			$folder = $this->xml->tree->folderlist->folder;
-			$aryDirs[] = array('id' => $folder->_param['id'], 'name' => $folder->_value,'parentID' => $folder->_param['parentid'] == -1 ? 0:$folder->_param['parentid']);
-		}
 		
-		if (is_array($this->xml->tree->filelist->file)) {
-			foreach($this->xml->tree->filelist->file as $key=>$value){
-				$aryFiles[] = array('id' => $value->_param['id'], 'name' => $value->_value, 'parentID' => $value->_param['parentid'] == -1 ? 0:$value->_param['parentid'], 'minetype' => $value->_param['filetype']);
+		if (isset($this->xml->tree->filelist->file)) {
+			if (is_array($this->xml->tree->filelist->file)) {
+				foreach($this->xml->tree->filelist->file as $key=>$value){
+					$aryFiles[] = array('id' => $value->_param['id'], 'name' => $value->_value, 'parentID' => $value->_param['parentid'] == -1 ? 0:$value->_param['parentid'], 'minetype' => $value->_param['filetype']);
+				}
+			}else {
+				$file = $this->xml->tree->filelist->file;
+				$aryFiles[] = array('id' => $file->_param['id'], 'name' => $file->_value,'parentID' => $file->_param['parentid'] == -1 ? 0:$file->_param['parentid'], 'minetype' => $file->_param['filetype']);
 			}
-		}else if (isset($this->xml->tree->filelist->file)) {
-			$file = $this->xml->tree->filelist->file;
-			$aryFiles[] = array('id' => $file->_param['id'], 'name' => $file->_value,'parentID' => $file->_param['parentid'] == -1 ? 0:$file->_param['parentid'], 'minetype' => $file->_param['filetype']);
 		}
 		
@@ -74,8 +85,8 @@
 		$parentDir =  $this->input->post('fparentid',TRUE);
 		$name =  $this->input->post('fname',TRUE);
-		$xmlData = $this->vservices->actionExecute('mkdir',array('name' => $name, 'parent_id' => $parentDir));
+		$xmlData = $this->vservices->actionExecute('mkdir',array('name' => $name, 'parent_id' => $parentDir == 0 ? -1:$parentDir));
 		
 		$this->xml->parse($xmlData);
-		$aryError = array('err' => $this->xml->status->_param['err'], 'errCode' => $this->xml->status->_param['errCode']);
+		$aryError = array('err' => $this->xml->status->_param['err'], 'errCode' => (int)$this->xml->status->_param['errCode']);
 		$aryData = array('id' => $this->xml->status->_param['id'], 'name' => $name, 'parentID' => $parentDir, 'ERROR' => $aryError);
 		echo json_encode($aryData);
@@ -83,14 +94,10 @@
 	
 	public function deleteDir () {
-		$dirID =  $this->input->post('id',TRUE);
-		$xmlData = $this->vservices->actionExecute('delete',array('id' => $dirID, 'type' => 'folder'));
-		
-		
-		/* $delAllChild = $this->input->post('delallchild',TRUE);
-		
-		$aryChild = $this->objDirectory->getAllDirChild($dirID);
-		$aryResult = array('isSuccess' => TRUE);
-		
-		echo json_encode($aryChild); */
+		$delobj =  $this->input->post('delobj',TRUE);
+		$xmlData = $this->vservices->actionExecute('deletemulti',array('delobj' => $delobj));
+		$this->xml->parse($xmlData);
+		$aryError = array('err' => $this->xml->tree->_param['err'], 'errCode' => (int)$this->xml->tree->_param['errCode']);
+		$aryData = array('ERROR' => $aryError);
+		echo json_encode($aryData);
 	}
 	
Index: pro-bachkim-filespace/sourcecode/application/views/layout/contextmenu.php
===================================================================
--- pro-bachkim-filespace/sourcecode/application/views/layout/contextmenu.php	(revision 65)
+++ pro-bachkim-filespace/sourcecode/application/views/layout/contextmenu.php	(revision 66)
@@ -7,6 +7,5 @@
 	<li class="rename separator"><a href="#rename">Äá»i tÃªn</a></li>
 </ul>
-
-<ul id="gridMenu" class="contextMenu">
+<ul id="gridMenuDir" class="contextMenu">
 	<li class="open"><a href="#open">Má»</a></li>
 	<li class="preview"><a href="#preview">Xem trÆ°á»c</a></li>
@@ -18,5 +17,14 @@
 	<li class="rename separator"><a href="#rename">Äá»i tÃªn</a></li>
 </ul>
-
+<ul id="gridMenuFile" class="contextMenu">
+	<li class="open"><a href="#open">Má»</a></li>
+	<li class="preview"><a href="#preview">Xem trÆ°á»c</a></li>
+	<li class="newfolder separator"><a href="#newfolder">Táº¡o thÆ° má»¥c má»i</a></li>
+	<li class="share separator"><a href="#share">Chia sáº»</a></li>
+	<li class="copy separator"><a href="#copy">Sao chÃ©p Äáº¿n ...</a></li>
+	<li class="cut"><a href="#cut">Di chuyá»n Äáº¿n...</a></li>
+	<li class="delete"><a href="#delete">XÃ³a</a></li>
+	<li class="rename separator"><a href="#rename">Äá»i tÃªn</a></li>
+</ul>
 <ul id="gridMenuParent" class="contextMenu">
 	<li class="open"><a href="#open">Má»</a></li>
Index: pro-bachkim-filespace/sourcecode/application/views/layout/footer.php
===================================================================
--- pro-bachkim-filespace/sourcecode/application/views/layout/footer.php	(revision 65)
+++ pro-bachkim-filespace/sourcecode/application/views/layout/footer.php	(revision 66)
@@ -3,5 +3,5 @@
 $this->load->view('layout/modalform');
 ?>
-<script type="text/javascript">
+<!-- <script type="text/javascript">
 	window.jQuery || document.write("<script src='assets/js/jquery/jquery-1.11.1.min.js'>"+"<"+"/script>");
 </script>
@@ -23,11 +23,30 @@
 <script src="assets/js/vsgrid.js"></script>
 <script src="assets/js/vstree.js"></script>
+<script type="text/javascript" src="assets/js/filemanager/filemanager.js"></script> -->
 
-<!-- <script src="assets/js/vscontextmenu.js"></script>
-<script src="assets/js/jquery/jqueryFileTree.js"></script> -->
+<script src="assets/js/jquery/jquery-1.11.1.min.js"></script>
+<script src="assets/js/jquery/jquery-ui-1.10.4.min.js"></script>
+<script src="assets/js/jquery/jquery.contextMenu.js"></script>
+<script src="assets/js/bootstrap/bootstrap.min.js"></script>
+<script src="assets/js/bootstrap/bootbox.min.js"></script>
 
-<script type="text/javascript" src="assets/js/filemanager/filemanager.js">
-
-</script>
+<script src="assets/js/tree.js"></script>
+<script src="assets/js/grid.js"></script>
+<script src="assets/js/manager.js"></script>
+	<script type="text/javascript">
+		var data = {"DIRECTORIES":[{"id":"1","name":"Dir1","parentID":0},{"id":"2","name":"E1","parentID":0},{"id":"4","name":"Th\u01b0 m\u1ee5c c\u1ee7a D\u0169ng","parentID":0},{"id":"3","name":"E1.1","parentID":"2"},{"id":"5","name":"D\u0169ng 1","parentID":"4"},{"id":"8","name":"D\u0169ng 2","parentID":"4"},{"id":"6","name":"Dir 3","parentID":"5"},{"id":"7","name":"Dir3.1","parentID":"6"}],"FILES":[{"id":"1","name":"File 1","parentID":"1","minetype":"text"},{"id":"2","name":"File in root 1","parentID":0,"minetype":"text"}],"ERROR":{"err":"","errCode":""}}
+		if(jQuery){
+			var manager = $().violetFileManager({
+				tree: 'treeview-container',
+				grid: 'file-container',
+				maincontainer: 'main-content',
+				titlebar: 'title-bar',
+				toolsbar: 'tools-bar',
+				statusbar: 'status-bar',
+				datasource: 'ajax'/* 'json' ,
+				data: data*/
+			});
+		}
+	</script>
 </body>
 </html>
Index: pro-bachkim-filespace/sourcecode/application/views/layout/modalform.php
===================================================================
--- pro-bachkim-filespace/sourcecode/application/views/layout/modalform.php	(revision 65)
+++ pro-bachkim-filespace/sourcecode/application/views/layout/modalform.php	(revision 66)
@@ -141,42 +141,2 @@
 </div>
 <!-- END:UPLOAD modal box -->
-
-<!-- BEGIN:New folder box -->
-<div id="box-newfolder" class="modal" tabindex="-1">
-	<div class="modal-dialog">
-		<div class="modal-content">
-			<div class="modal-header">
-				<button type="button" class="close" data-dismiss="modal">&times;</button>
-				<h4 class="blue bigger">Táº¡o thÆ° má»¥c má»i</h4>
-			</div>
-			<div class="modal-body overflow-visible">
-				<form id="frm-newfolder">
-					<div class="row">
-						<div class="col-xs-12">
-							<div class="input-group">
-								<div class="radio">
-									<label for="f-newfoldername">TÃªn thÆ° má»¥c</label>
-									<div>
-										<input type="text" id="f-newfoldername" name="fname" class="form-control" style="width:525px">
-										<input type="hidden" id="f-parentid" name="fparentid">
-									</div>
-								</div>
-							</div>
-						</div>
-					</div>
-				</form>
-			</div>
-			<div class="modal-footer">
-				<button id="btn-submit-newfolder" class="btn btn-sm btn-primary">
-					<i class="icon-folder-close"></i>
-					OK
-				</button>
-				<button class="btn btn-sm" data-dismiss="modal">
-					<i class="icon-remove"></i>
-					ÄÃ³ng
-				</button>
-			</div>
-		</div>
-	</div>
-</div>
-<!-- END:New folder box -->
Index: pro-bachkim-filespace/sourcecode/assets/css/space/grid.css
===================================================================
--- pro-bachkim-filespace/sourcecode/assets/css/space/grid.css	(revision 66)
+++ pro-bachkim-filespace/sourcecode/assets/css/space/grid.css	(revision 66)
@@ -0,0 +1,65 @@
+@CHARSET "UTF-8";
+
+#file-container UL.vsgrid {
+	list-style: none outside none; 
+	font-family: Verdana, sans-serif;
+	font-size: 12px;
+	padding: 10px;
+	margin: 0px;
+}
+
+#file-container UL.vsgrid LI.vscell {
+	display:block;
+	width:120px;
+	height:80px;
+	padding-bottom:10px;
+	padding-left: 5px;
+	padding-right: 5px;
+	spacing
+	cursor:default;
+	overflow:hidden;
+	float: left;
+	text-align: center;
+}
+
+#file-container UL.vsgrid LI.vscell DIV[class^="icon-"] {
+	width:64px;
+	height:54px;
+	-moz-border-radius:3px;
+	-webkit-border-radius:3px;
+	border-radius:3px;
+	background: url(../../images/file-icon.png) left top no-repeat;
+	background-position: center;
+}
+
+#file-container UL.vsgrid LI.vscell DIV[class^="icon-"].selected{
+	background-color: #5eaee5;
+}
+
+#file-container UL.vsgrid LI.vscell DIV.icon-directory {
+	background: url(../../images/folder-icon.png) left top no-repeat;
+	background-position: center;
+}
+
+#file-container UL.vsgrid LI.vscell DIV.file-name a{
+	text-decoration: none;
+	color: #000;
+}
+
+#file-container UL.vsgrid LI.vscell DIV.file-name {
+	display: block;
+	text-align:center;
+	white-space:pre;
+	overflow:hidden;
+	text-overflow:ellipsis;
+	-o-text-overflow:ellipsis;
+	margin:1px 1px 0;
+	padding:1px;
+	-moz-border-radius:3px;
+	-webkit-border-radius:3px;
+	border-radius:3px;
+}
+
+#file-container UL.vsgrid LI.vscell DIV.file-name.selected {
+	background-color: #5eaee5;
+}
Index: pro-bachkim-filespace/sourcecode/assets/css/space/style.css
===================================================================
--- pro-bachkim-filespace/sourcecode/assets/css/space/style.css	(revision 65)
+++ pro-bachkim-filespace/sourcecode/assets/css/space/style.css	(revision 66)
@@ -3,8 +3,8 @@
 @import "../jquery/jquery-ui-1.10.4.min.css";
 @import "../jquery/jquery.contextmenu_new.css";
-@import "../jquery/tinyscrollbar.css";
 @import "../font-awesome.min.css";
 @import "../ace.min.css";
 @import "vsgrid.css";
+@import "grid.css";
 @import "contextmenu.css";
 @import "../uploadfile.min.css";
@@ -142,6 +142,6 @@
 #file-container {
 	padding-left: 10px;
-	padding-right: 5px;
-	padding-top: 15px;
+	padding-right: 10px;
+	padding-top: 10px;
 	display: block;
 	width:100%;
Index: pro-bachkim-filespace/sourcecode/assets/js/filemanager/filemanager.js
===================================================================
--- pro-bachkim-filespace/sourcecode/assets/js/filemanager/filemanager.js	(revision 65)
+++ pro-bachkim-filespace/sourcecode/assets/js/filemanager/filemanager.js	(revision 66)
@@ -72,10 +72,8 @@
 	    });
 		
-		/*$('#btnNewFolder').click (function(){
-			var curDir = privateTree.getCurrentDir();
-			privateTree.createDir(curDir);
+		$('#btnNewFolder').click (function(){
 		});
 		
-		$('#btnCopy').click (function(){
+		/*$('#btnCopy').click (function(){
 			privateTree.copy();
 		});*/
Index: pro-bachkim-filespace/sourcecode/assets/js/grid.js
===================================================================
--- pro-bachkim-filespace/sourcecode/assets/js/grid.js	(revision 66)
+++ pro-bachkim-filespace/sourcecode/assets/js/grid.js	(revision 66)
@@ -0,0 +1,140 @@
+if(jQuery) (function($){
+	$.extend($.fn, {
+		violetGrid : function (o) {
+			if( !o ) var o = {};
+			if( o.data == undefined ) o.data = null;
+			if( o.draggable == undefined ) o.draggable = false;
+			if( o.manager ==  undefined) o.manager = null;
+			
+			var oContainer = this;
+			
+			var createNode = function (node) {
+				if( !node ) var node = {};
+				if( node.item == undefined ) node.item = null; //item.id, item.name, item.parentID
+				if( node.isDirectory == undefined ) node.isDirectory = false;
+				if( node.showContextMenu == undefined ) node.showContextMenu = true;
+				
+				var icon = (node.item.minetype != undefined) ? 'icon-' + node.item.minetype: 'icon-directory';
+				var type = (node.item.minetype != undefined) ? node.item.minetype: 'directory';
+				var div = $('<div></div>',{'class':icon});
+				
+				var inputID = $('<input />',{'class':'id', type:'hidden',value:node.item.id});
+				var inputName = $('<input />',{'class':'name',type:'hidden',value:node.item.name});
+				var inputType = $('<input />',{'class':'type',type:'hidden',value:type});
+				
+				var a = $('<a></a>',{id: node.item.id,href: '#',rel: node.item.name,text: node.item.name});
+				var divLink = $('<div></div>',{'class':'file-name'}).append(a,inputID,inputName,inputType);
+				var li = $('<li></li>',{'class':'vscell'}).append(div, divLink);
+				
+				bindNodeEvents(li);
+				
+				return li;
+			}
+			
+			var bindNodeEvents = function (node) {
+				$(node).bind("click", function (e){
+					if(e.button == 0)nodeClick(this,e);return false;});
+			}
+			
+			var nodeClick = function (node, event) {
+				if (event.ctrlKey) {
+					if (!isHightLight(node))
+						hightlightNode(node);
+					else
+						clearHightLightNode(node);
+				}
+				else if (event.shiftKey) {
+					var firstItem = $(oContainer).find('> UL > LI > DIV[class^="icon-"][class$="selected"]:first-child').parent();
+					var aryNode = $(oContainer).find('> UL > LI > DIV[class^="icon-"]').parent();
+					var start = aryNode.index(firstItem);
+					var finish = aryNode.index(node);
+					aryNode.slice(Math.min(start, finish), Math.max(start, finish) + 1).each( function (i,o){hightlightNode(o);});
+				}
+				else {
+					clearAllHightLightNode(node);
+					hightlightNode(node);
+				}
+			}
+			
+			var nodeDblClick = function (node) {
+				
+			}
+			
+			var hightlightNode = function (node) {
+				$(node).find('> DIV').addClass('selected');
+			}
+			
+			var isHightLight = function (node) {
+				return $(node).find('> DIV').hasClass('selected');
+			}
+			
+			var clearAllHightLightNode = function () {
+				$(oContainer).find('> UL > LI > DIV').removeClass('selected');
+			}
+			
+			var clearHightLightNode = function (node) {
+				$(node).find('> DIV').removeClass('selected');
+			}
+			
+			var initGrid = function () {
+				var ul = $('<ul></ul>',{'class':'vsgrid'});
+				var parentDirID = o.manager.getTreeCurrentNode();
+				if (o.data.DIRECTORIES.length > 0) {
+					for (var i = 0; i < o.data.DIRECTORIES.length; i++) {
+						if (o.data.DIRECTORIES[i].parentID == parentDirID) {
+							var li = createNode ({item: o.data.DIRECTORIES[i]});
+							$(ul).append(li);
+						}
+					}
+				}
+				
+				if (o.data.FILES.length > 0) {
+					for (var i = 0; i < o.data.FILES.length; i++) {
+						if (o.data.FILES[i].parentID == parentDirID) {
+							var li = createNode ({item: o.data.FILES[i]});
+							$(ul).append(li);
+						}
+					}
+				}
+				
+				$(oContainer).find ('UL').remove();
+				$(oContainer).append(ul);
+				
+				$(oContainer).attr('unselectable','on')
+			     .css({'-moz-user-select':'-moz-none',
+			           '-moz-user-select':'none',
+			           '-o-user-select':'none',
+			           '-khtml-user-select':'none',
+			           '-webkit-user-select':'none',
+			           '-ms-user-select':'none',
+			           'user-select':'none'
+			     }).bind('selectstart', function(){ return false; 
+			     }).bind('click', function(){ clearAllHightLightNode(); return false; });
+			}
+			
+			this.reloadGrid = function (nodeID) {
+				initGrid();
+			}
+			
+			this.setData = function (data) {
+				o.data = data;
+			}
+			
+			this.rename = function (item) {
+				console.log('rename');
+				console.log(item);
+			}
+			
+			this.deletion = function (id) {
+				
+			}
+			
+			this.initialize = function () {
+				initGrid();
+				return this;
+			};
+			
+			return this.initialize();
+		}
+	});
+})(jQuery);
Index: pro-bachkim-filespace/sourcecode/assets/js/jquery/jquery.contextMenu.js
===================================================================
--- pro-bachkim-filespace/sourcecode/assets/js/jquery/jquery.contextMenu.js	(revision 65)
+++ pro-bachkim-filespace/sourcecode/assets/js/jquery/jquery.contextMenu.js	(revision 66)
@@ -26,4 +26,5 @@
 			
 			if( o.disabledItems == undefined ) o.disabledItems = null;
+			if( o.enabledItems == undefined ) o.enabledItems = null;
 			
 			// Loop each context menu
@@ -82,8 +83,12 @@
 							});
 							
-							
 							if (o.disabledItems != null) {
 								for (var i = 0; i < o.disabledItems.length; i ++) {
 									$(menu).find('LI.' + o.disabledItems[i]).addClass('disabled');
+								}
+							}
+							else if (o.enabledItems != null) {
+								for (var i = 0; i < o.enabledItems.length; i ++) {
+									$(menu).find('LI.' + o.enabledItems[i]).removeClass('disabled');
 								}
 							}
Index: pro-bachkim-filespace/sourcecode/assets/js/manager.js
===================================================================
--- pro-bachkim-filespace/sourcecode/assets/js/manager.js	(revision 66)
+++ pro-bachkim-filespace/sourcecode/assets/js/manager.js	(revision 66)
@@ -0,0 +1,355 @@
+if(jQuery) (function($){
+	$.extend($.fn, {
+		violetFileManager : function (o) {
+			if( !o ) var o = {};
+			if( o.tree == undefined ) o.tree = null;
+			if( o.grid == undefined ) o.grid = null;
+			
+			if( o.maincontainer == undefined ) o.maincontainer = null;
+			if( o.titlebar == undefined ) o.titlebar = null;
+			if( o.toolsbar == undefined ) o.toolsbar = null;
+			if( o.statusbar == undefined ) o.statusbar = null;
+			
+			if( o.oTree == undefined ) o.oTree = null;
+			if( o.oGrid == undefined ) o.oGrid = null;
+			if( o.host == undefined ) o.host = 'http://localhost/ajax/';
+			if( o.hostmodule == undefined ) o.hostmodule = 'privatecontent/';
+			if( o.script == undefined ) o.script = 'getcontent';
+			if( o.data == undefined ) o.data = null;
+			if( o.datasource == undefined ) o.datasource = 'ajax';
+			
+			var oContainer = this;
+			var tree = [];
+			var totalItem = 0;
+			var countItem = 0;
+			var maxWidth = 0;
+			var treeCurrentNode = null;
+			
+			var sendCommand = function (p) {
+				if( p.postdata == undefined ) p.postdata = null;
+				if( p.script == undefined ) p.script = o.script;
+				if( p.callbackSuccess == undefined ) p.callbackSuccess = null;
+				if( p.callbackDone == undefined ) p.callbackDone = null;
+				if( p.callbackFail == undefined ) p.callbackFail = null;
+				if( p.callbackAlways == undefined ) p.callbackAlways = null;
+
+				if (p.script != null && o.datasource == 'ajax') {
+					$.post(o.host + o.hostmodule + p.script, p.postdata, function (data){
+						if (data) {
+							parseData = $.parseJSON(data);
+						}
+
+						if (p.callbackSuccess != null) {
+							if (parseInt(parseData.ERROR.errCode) === 0)
+								p.callbackSuccess(parseData);
+							else {
+								p.callbackFail(parseData.ERROR);
+							}
+						}
+
+					}).done(function() {if (p.callbackDone != null)p.callbackDone(this);}).fail(function() {if (p.callbackFail != null)p.callbackFail(this);}).always(function() {if (p.callbackAlways != null)p.callbackAlways(this);});
+				}
+				else if (o.datasource == 'json'){
+					if (p.callbackSuccess != null) p.callbackSuccess(o.data);
+					if (p.callbackDone != null)	p.callbackDone(this);
+				}
+				
+			};
+			
+			var getDirTreeMaxWidth = function  () {
+				var scrWidth = $(o.maincontainer).width();
+				return parseInt(scrWidth / 2);
+			}
+			
+			var layoutRender = function () {
+				var scrWidth = $('#' + o.maincontainer).width();
+				var scrHeght = $(window).height();
+				var dirTreeHeight = scrHeght - $('#' + o.titlebar).height() - $('#' + o.toolsbar).height() - $('#' + o.statusbar).height() - 2;
+				$('#' + o.tree).parent().height(dirTreeHeight);
+				$('#' + o.grid).parent().height(dirTreeHeight);
+				$('#' + o.grid).parent().width('calc(100% - ' + ($('#' + o.tree).parent().width() + 8) + 'px)');
+				var scollWidth = $('#' + o.grid).parent().width();
+				maxWidth = getDirTreeMaxWidth();
+				$(o.tree).height(dirTreeHeight - 5);
+			}
+			
+			var createFileManager = function (parseData) {
+				o.data = parseData;
+				totalItem = o.data.DIRECTORIES.length;
+				o.oTree = $('#' + o.tree).violetTree({data:o.data.DIRECTORIES,manager:oContainer});
+				o.oGrid = $('#' + o.grid).violetGrid({data:o.data,manager:oContainer});
+			};
+
+			var getAllDirChild = function (parentID, aryChild) {
+				parentID = parentID == null ? 0:parentID;
+				var dirList = searchItemsByParent(parentID,'directory');
+				var index = aryChild.length;
+				aryChild[index] = parentID;
+				if (dirList.length > 0) {
+					for (var i = 0; i < dirList.length; i++) {
+						getAllDirChild(dirList[i].id, aryChild);
+					}
+				}
+			}
+			
+			var checkChildExisted = function (id) {
+				var dirList = searchItemsByParent(id,'directory');
+				var fileList = searchItemsByParent(id,'file');
+				return (dirList.length > 0) || (fileList.length > 0);
+			}
+			
+			var doneInit = function () {
+			};
+			
+			var failInit = function (er) {
+				bootbox.alert(er.err);
+			} 
+			
+			var init = function () {
+				layoutRender ();
+
+				$('#' + o.tree).parent().resizable({
+					maxWidth: maxWidth,
+					minWidth: 220,
+					handles: "e",
+					resize: function (event, ui) {
+						layoutRender ();
+					}
+				});
+
+				$(window).resize (function() {layoutRender ();$('#' + o.tree).parent().resizable({maxWidth: maxWidth});});
+				
+				sendCommand ({postdata:null,callbackSuccess:createFileManager,callbackDone:doneInit,callbackFail:failInit});
+			};
+			
+			var searchItemByID = function (id, type) {
+				var data = {};
+				switch (type) {
+					case 'directory':
+						data = o.data.DIRECTORIES;
+						break;
+					case 'file':
+						data = o.data.FILES;
+						break;
+					default:
+						break;
+				}
+				
+				for (var i = 0; i < data.length; i++) {
+					if (data[i].id == id) return i;
+				}
+			}
+			
+			var searchItemsByParent = function (parentID, type) {
+				var data = {};
+				var aryItem = [];
+				var index = aryItem.length;
+				
+				switch (type) {
+					case 'directory':
+						data = o.data.DIRECTORIES;
+						break;
+					case 'file':
+						data = o.data.FILES;
+						break;
+					default:
+						break;
+				}
+				
+				for (var i = 0; i < data.length; i++) {
+					if (data[i].parentID == parentID) {
+						aryItem[index] = data[i];
+						index ++;
+					}
+				}
+				
+				return aryItem;
+			}
+			
+			/*******************************
+			 * CREATE FOLDER - START *
+			 *******************************/
+			var createFolder = function (parent) {
+				var postdata = {delobj:delobj};
+				var script = 'createdir';
+				sendCommand ({
+					postdata:postdata,
+					script:script,
+					callbackSuccess:function(parseData){console.log(parseData);},
+					callbackFail: function(){}
+				});
+			}
+			
+			var createFolderCallBack = function (parent) {
+				
+			}
+			/*******************************
+			 * CREATE FOLDER - END *
+			 *******************************/
+			
+			/*******************************
+			 * CLIPBOARD - START *
+			 *******************************/
+			var oClipBoard = {item:null, act:null};
+			
+			var addToClipboard = function (item, act) {
+				oClipboard = {item:item,act:act};
+			}
+			
+			var clearClipboard = function () {
+				oClipBoard = {item:null, act:null};
+			}
+			
+			/*******************************
+			 * CLIPBOARD - START *
+			 *******************************/
+			this.deleteItem = function (item) {
+				var confirmText = 'Báº¡n cÃ³ muá»n xÃ³a ';
+				
+				if ($.isArray(item) && item.length > 1) {
+					confirmText += 'cÃ¡c thÆ° má»¥c (file) vÃ  cÃ¡c thÆ° má»¥c (file) con ÄÃ£ chá»n ?';
+				}
+				else if (item.length == 1) {
+					if (item[0].id == 0) return false;
+					confirmText += (item[0].type == 'directory')?'thÆ° má»¥c':'file';
+					confirmText += ' <span style="font-weight:bold">' + item[0].name + "</span> khÃŽng?";
+				}
+				
+				for (var i = 0; i < item.length; i++) {
+					if (item[i].type == 'directory') {
+						var aryChildDirTmp = [];
+						var aryChildDirID = [];
+						var aryChildFiles = searchItemsByParent(item[i].id, 'file');
+						var aryChildDirs = [];
+						
+						getAllDirChild (item[i].id, aryChildDirTmp);
+						for(var d = 1; d < aryChildDirTmp.length; d++) {
+							aryChildDirID[d-1] = aryChildDirTmp[d];
+						}
+						
+						for (var j = 0; j < aryChildDirID.length; j++) {
+							if (o.data.DIRECTORIES[searchItemByID(aryChildDirID[j],'directory')] != undefined)
+								aryChildDirs[aryChildDirs.length] = o.data.DIRECTORIES[searchItemByID(aryChildDirID[j],'directory')];
+							
+							var aryTmp = searchItemsByParent(aryChildDirID[j], 'file');
+							if (aryTmp.length > 0)
+								for(var f in aryTmp) {
+									aryChildFiles[aryChildFiles.length] = aryTmp[f];
+								}
+						}
+						
+						item[i].childDirs = aryChildDirs;
+						item[i].childFiles = aryChildFiles;
+					}
+				}
+				
+				var confirmOptions = {
+						  message:confirmText,
+						  buttons: {
+						    confirm: {
+						      label: "XÃ³a"
+						    },
+						    cancel: {
+						      label: "KhÃŽng xÃ³a"	
+						    }
+						  },
+						  callback: function(result) {                
+							  if (result) {
+									var delobj = JSON.stringify(item);
+									var postdata = {delobj:delobj};
+									var script = 'deletedir';
+									sendCommand ({
+										postdata:postdata,
+										script:script,
+										callbackSuccess:function(parseData){console.log(parseData);},
+										callbackFail: function(){}
+									});
+								}
+						    }
+						};
+				
+				bootbox.confirm(confirmOptions);
+				
+			}
+			
+			this.setTreeCurrentNode = function (treeNode) {
+				//fire when click a node on Tree
+				//then fire action of Grid
+				treeCurrentNode = treeNode;
+				if (o.oGrid) o.oGrid.reloadGrid(treeNode);
+			};
+			
+			this.getTreeCurrentNode = function () {
+				return treeCurrentNode;
+			}
+			
+			this.gridNodeClick = function (gridNode) {
+				//fire when click a node on Grid
+				//then fire action of Tree
+			};
+			
+			this.createNewFolder = function () {
+				var promptOptions = {
+						  title: "Táº¡o thÆ° má»¥c má»i",
+						  buttons: {
+						    confirm: {
+						      label: "LÆ°u"
+						    },
+						    cancel: {
+						      label: "Há»§y"	
+						    }
+						  },
+						  callback: function(result) {                
+						      if (result === null) {                                             
+						        console.log("Prompt dismissed");                              
+						      } else {
+						        console.log("Hi "+result);                          
+						      }
+						    }
+						};
+
+				bootbox.prompt(promptOptions);
+			}
+			
+			this.updateData = function (p) {
+				if( p.item == undefined ) p.item = null;
+				if( p.from == undefined ) p.from = null;
+				if( p.type == undefined ) p.type = null;
+				if( p.callback == undefined ) p.callback = null;
+				
+				var obj = p.from == 'tree' ? o.oGrid : o.oTree;
+				
+				var index = searchItemByID(p.item.id, p.type);
+				switch (p.type) {
+					case 'directory':
+						o.data.DIRECTORIES[index].name = p.item.name;
+						o.data.DIRECTORIES[index].parentID = p.item.parentID;
+						break;
+					case 'file':
+						o.data.FILES[index].name = p.item.name;
+						o.data.FILES[index].parentID = p.item.parentID;
+						o.data.FILES[index].minetype = p.item.minetype;
+						break;
+					default:
+						break;
+				}
+				
+				o.oTree.setData (o.data.DIRECTORIES);
+				o.oGrid.setData (o.data);
+				
+				if (p.callback != null) {
+					eval('obj.' + p.callback + '(p.item);')
+				}
+				
+				//call sendCommand
+			}
+			
+			this.initialize = function () {
+				init();
+				return this;
+			};
+			
+			return this.initialize();
+		}
+	});
+})(jQuery);
Index: pro-bachkim-filespace/sourcecode/assets/js/tree.js
===================================================================
--- pro-bachkim-filespace/sourcecode/assets/js/tree.js	(revision 66)
+++ pro-bachkim-filespace/sourcecode/assets/js/tree.js	(revision 66)
@@ -0,0 +1,285 @@
+if(jQuery) (function($){
+	$.extend($.fn, {
+		violetTree : function (o) {
+			if( !o ) var o = {};
+			if( o.data == undefined ) o.data = null;
+			if( o.rootName == undefined ) o.rootName = 'ThÆ° má»¥c gá»c';
+			
+			if( o.draggable == undefined ) o.draggable = false;
+			
+			if( o.expandSpeed == undefined ) o.expandSpeed= 500;
+			if( o.collapseSpeed == undefined ) o.collapseSpeed= 500;
+			if( o.expandEasing == undefined ) o.expandEasing = null;
+			if( o.collapseEasing == undefined ) o.collapseEasing = null;
+			if( o.manager ==  undefined) o.manager = null;
+			
+			var treeNodes = [];
+			var oContainer = this;
+			var selectedNode = null;
+			var documentBoundEvent = false;
+			
+			var createNode = function (node) {
+				if( !node ) var node = {};
+				if( node.item == undefined ) node.item = null; //item.id, item.name, item.parentID
+				if( node.isRoot == undefined ) node.isRoot = false;
+				if( node.defaultStatus == undefined ) node.defaultStatus = 0; //0: collapsed; 1:expanded;
+				if( node.showContextMenu == undefined ) node.showContextMenu = true; //0: collapsed; 1:expanded;
+				
+				var parentNode = node.isRoot == true ? oContainer : $(oContainer).find('UL.vstree > LI[rel="folder"] > A#' + node.item.parentID);
+				var nodeClass = node.isRoot == true ? 'home':'directory';
+				var hidden = (node.isRoot == true || node.item.parentID == 0 ) ? null:'display:none';
+				var defaulState = (node.isRoot == false && node.defaultStatus == 1 ) ? 'expanded' : 'collapsed';
+				
+				var a = $('<a></a>',{id: node.item.id,href: '#',rel: node.item.name,text: node.item.name});
+				var li = $('<li></li>',{'class': nodeClass,rel: 'folder'}).append(a);			
+				var ul = $('<ul></ul>',{'class':'vstree',style:hidden}).append(li);
+				$(li).addClass(defaulState);
+				
+				bindNodeEvents(a);
+				
+				treeNodes[node.item.id] = {id:node.item.id, name:node.item.name, parentID:node.item.parentID, html:ul, status:defaulState, isRoot:node.isRoot};
+
+				if (node.isRoot == false) $(parentNode).parent().append(ul); else $(parentNode).append(ul);
+				return (parentNode.length == 1);
+			};
+			
+			var bindNodeEvents = function (node) {
+				if (node == null) return false;
+								
+				//click event
+				$(node).bind("click", function (e){if(e.button == 0)nodeClick(this);return false;});
+								
+				//Press F2 to rename, ESC to cancel rename
+				if (documentBoundEvent == false) {
+					$(oContainer).bind('keydown','keypress', function(e) {
+						switch( e.keyCode ) {
+						case 113:
+							renameInit(selectedNode);
+							break;
+						case 27:
+							renameCancel(selectedNode);
+							break;
+						case 46:
+							var dirID = $(selectedNode).attr('id');
+							var dirObj = {};
+							dirObj.id = treeNodes[dirID].id;
+							dirObj.name = treeNodes[dirID].name;
+							dirObj.parentID = treeNodes[dirID].parentID;
+							dirObj.type = 'directory';
+							if (e.keyCode == 46) o.manager.deleteItem([dirObj]);
+							break;
+						case 13:
+						default:
+							break;
+					}
+					});
+					
+					documentBoundEvent = true;
+				}
+				
+				disabledItemsList = [];
+				
+				$(node).contextMenu({menu: 'treeMenu',disabledItems: disabledItemsList}, 
+					function(action, el, pos) {
+						var dirID = $(el).attr('id');
+						var item = $(treeNodes[dirID].html).find('> LI > A#' + dirID);
+						var dirObj = {};
+						dirObj.id = treeNodes[dirID].id;
+						dirObj.name = treeNodes[dirID].name;
+						dirObj.parentID = treeNodes[dirID].parentID;
+						dirObj.type = 'directory';
+						
+						switch(action) {
+							case 'rename':
+								renameInit(item);
+								break;
+							case 'newfolder':
+								o.manager.createNewFolder();
+								break;
+							case 'share':
+							case 'copy':
+							case 'cut':
+								break;
+							case 'delete':
+								o.manager.deleteItem([dirObj]);
+								break;
+							default:
+								break;
+						}
+				});
+				
+			};
+			
+			var nodeClick = function (node) {
+				var folderID = $(node).attr('id');
+				selectedNode = hightlightNode(node);
+				o.manager.setTreeCurrentNode(folderID);
+				
+				if (treeNodes[folderID].isRoot) {
+					return;
+				}
+				if (treeNodes[folderID].status == 'collapsed') {
+					expandNode(node);
+					treeNodes[folderID].status = 'expanded';
+				}
+				else {
+					collapNode(node);
+					treeNodes[folderID].status = 'collapsed';
+				}
+			};
+			
+			var hightlightNode = function (node) {
+				$(oContainer).find('.currentDir').removeClass('currentDir');
+				$(node).addClass('currentDir');
+				$(node).select();
+				return node;
+			}
+			
+			var expandNode = function (node) {
+				var li = $(node).parent();
+				$(li).find('> UL:hidden').slideDown({ duration: o.expandSpeed, easing: o.expandEasing });
+				$(li).removeClass('collapsed').addClass('expanded');
+			};
+			
+			var collapNode = function (node) {
+				var li = $(node).parent();
+				$(li).find('> UL').slideUp({ duration: o.expandSpeed, easing: o.expandEasing });
+				$(li).removeClass('expanded').addClass('collapsed');
+			};
+			
+			var initTree = function () {
+				if (o.data == null) {
+					console.error(o.data, 'No directory to display!');
+					return;
+				}
+				$(oContainer).find ('.vstree').remove();
+				var homeNode = createNode({
+					item: {id:0, name:o.rootName, parentID:-1},
+					isRoot: true
+				});
+				if (homeNode && o.data.length > 0) {
+					for (var i = 0; i < o.data.length; i++) {
+						createNode ({item: o.data[i]});
+					}
+				}
+				o.manager.setTreeCurrentNode(0);
+				
+				$(oContainer).attr('unselectable','on')
+			     .css({'-moz-user-select':'-moz-none',
+			           '-moz-user-select':'none',
+			           '-o-user-select':'none',
+			           '-khtml-user-select':'none',
+			           '-webkit-user-select':'none',
+			           '-ms-user-select':'none',
+			           'user-select':'none'
+			     }).bind('selectstart', function(){ return false;}); 
+			};
+			
+			/******************
+			 * RENAME - START *
+			 ******************/
+			
+			var renameInit = function (node) {
+				var editor = $('<input>',{class:'rename', type: 'text', value:$(node).text()});
+				$(editor).bind('focusout', function(e){renameCancel(node)});
+				$(editor).bind('keypress', function(e){
+						var keycode = (e.keyCode ? e.keyCode : e.which);
+						if(keycode == '13') renameComplete(node);
+						e.stopPropagation();
+					});
+				
+				$(node).text('');
+				$(node).append(editor);
+				$(editor).focus();
+				$(editor).select();
+			}
+			
+			var renameCancel = function (node) {
+				var dirID = $(node).attr('id');
+				$(node).find('>INPUT').remove();
+				$(node).text(treeNodes[dirID].name);
+				$(node).select();
+			}
+			
+			var renameComplete = function (node) {
+				var editor = $(node).find('>INPUT');
+				var dirID = $(node).attr('id');
+				var newName = $(editor).val();
+				$(node).attr('rel', newName);
+				$(node).text(newName);
+				$(node).find('>INPUT').remove();
+				treeNodes[dirID].name = newName;
+				updateData(dirID, 'rename');
+			}
+			
+			/******************
+			 * RENAME - END *
+			 ******************/
+			
+			/******************
+			 * DELTE - START *
+			 ******************/
+			var destroyNode = function (node) {
+				var dirID = $(node).attr('id');
+				$(node).parent().parent().remove();
+				delete treeNodes[dirID];
+			}
+			/******************
+			 * DELTE - END *
+			 ******************/
+			/*******************************
+			 * COPY & PASTE & MOVE - START *
+			 *******************************/
+			var copyNode = function (source){
+
+			}
+			
+			var pasteNode = function (destination) {
+				
+			}
+			
+			var moveNode = function (source, destination) {
+				
+			}
+			/*****************************
+			 * COPY & PASTE & MOVE - END *
+			 *****************************/
+			
+			var updateData = function (id, act) {
+				for (var i = 0; i < o.data.length; i++) {
+					if (o.data[i].id == id) {
+						if(act == 'deletion') {
+							delete o.data[i];
+						}
+						else {
+							o.data[i].name = treeNodes[id].name
+							o.data[i].parentID = treeNodes[id].parentID;
+						}
+						break;
+					}
+				}
+				
+				o.manager.updateData({item:treeNodes[id], from:'tree', type:'directory', callback:act});
+			}
+			
+			this.deletion = function (id) {
+				destroyNode($(oContainer).find('A#'+id));
+			}
+			
+			this.setData = function (data) {
+				o.data = data;
+			}
+			
+			this.getRoot = function () {
+				return treeNodes[0];
+			}
+
+			this.initialize = function () {
+				initTree();
+				return this;
+			};
+			
+			return this.initialize();
+		}
+	});
+})(jQuery);
Index: pro-bachkim-filespace/sourcecode/assets/js/vsgrid.js
===================================================================
--- pro-bachkim-filespace/sourcecode/assets/js/vsgrid.js	(revision 65)
+++ pro-bachkim-filespace/sourcecode/assets/js/vsgrid.js	(revision 66)
@@ -26,5 +26,5 @@
 				if( d.customEvent == undefined ) d.customEvent = null;
 
-				var strHTML = '<div class="vscell" rel="id:' + d.id + '">';
+				var strHTML = '<div class="vscell '+ d.minetype +'" rel="id:' + d.id + '">';
 					strHTML += '<div class="selector unselected">';
 					strHTML += 	'<div class="icon-' + d.minetype + '"></div>';
@@ -34,16 +34,27 @@
 				
 				var disabledItemsList = null;
+				var enabledItemsList = null;
+				var menuName = '';
 				
 				if (d.minetype == 'directory') {
 					disabledItemsList = ['preview'];
+					menuName = 'gridMenuDir';
+				}
+				else {
+					disabledItemsList = ['newfolder'];
+					menuName = 'gridMenuFile';
 				}
 				
 				$(o.container).append(strHTML);
 
-				$('div[rel="id:'+ d.id +'"]').bind('click',function(e){itemClick(this)});
-				
-				$('div[rel="id:'+ d.id +'"]').contextMenu({
-					menu: 'gridMenu',
-					disabledItems: disabledItemsList
+				$('div[rel="id:'+ d.id +'"].' + d.minetype).bind('click',function(e){itemClick(this)});
+				$('div[rel="id:'+ d.id +'"].' + d.minetype).bind('dblclick',function(e){doubleClick(this)});
+				
+				$('div[rel="id:'+ d.id +'"].' + d.minetype).draggable({ containment: "parent",helper: "original" });
+				
+				$('div[rel="id:'+ d.id +'"].' + d.minetype).contextMenu({
+					menu: menuName,
+					disabledItems: disabledItemsList,
+					enabledItems: enabledItemsList
 				}, function(action, el, pos) {
 					itemClick(el);
@@ -106,5 +117,4 @@
 				$('#box-newfolder').on('show.bs.modal', function () {
 					$('#box-newfolder').find('#frm-newfolder').get(0).reset();
-					
 				});
 				
@@ -211,4 +221,14 @@
 			}
 			
+			var doubleClick = function (i) {
+				var rel = $(i).attr('rel');
+				if ($(i).hasClass('directory'))	{				
+					var id = rel.substring(3, rel.length);
+					o.curentParent = o.dirIDprefix + id;
+					renderGrid(o);
+					o.tree.openTreeOffset(id);
+				}
+			}
+			
 			var searchItemByID = function (itemID, type) {
 				var source = (type == 'directory') ? o.directoryTreeData.DIRECTORIES : (type == 'file') ? o.directoryTreeData.FILES : null;
@@ -241,5 +261,5 @@
 				var disabledItemsList = ['preview','rename','copy','cut','delete','open'];
 				var item = searchItemByID(currentDirID,'directory');
-				console.log(item);
+				
 				$(o.container).contextMenu({
 					menu: 'gridMenuParent',
@@ -380,4 +400,8 @@
 				}
 			}
+			
+			this.searchItem = function (id, type) {
+				return searchItemByID (id, type);
+			}
 
 			this.initialize = function() {
Index: pro-bachkim-filespace/sourcecode/assets/js/vstree.js
===================================================================
--- pro-bachkim-filespace/sourcecode/assets/js/vstree.js	(revision 65)
+++ pro-bachkim-filespace/sourcecode/assets/js/vstree.js	(revision 66)
@@ -56,5 +56,5 @@
 				o.directoryTreeData = parseData;				
 				var directoryData = parseData.DIRECTORIES;
-
+				
 				var homeNode = createNode({
 					id:0,
@@ -64,11 +64,16 @@
 				selectDir($(homeNode).find('> A'));
 				if (directoryData != null) {
+					var count = 0;
 					for (var i = 0; i < directoryData.length ; i++) {
+						var htmlNode = $(o.container).find('#' + o.dirIDprefix + directoryData[i].parentID);
+						
 						var node = createNode ({
 							id: directoryData[i].id,
 							name: directoryData[i].name,
-							currentNode: $(o.container).find('#' + o.dirIDprefix + directoryData[i].parentID).find('> A'),
+							currentNode: $(htmlNode).find('> A'),
 							hidden: (directoryData[i].parentID > 0) ? true : false
 						})
+						
+						count ++;
 					};
 				}
@@ -104,11 +109,7 @@
 				//bind new node to data
 				if (d.addToJSONData == true) {
-					//o.directoryTreeData.DIRECTORIES.length
 					var newdir = {};
 					newdir.id = d.id;
 					newdir.name = d.name;
-					
-					console.log(d.currentNode);
-					
 					newdir.parentID = $(o.container).find(d.currentNode).parent().attr('id').substring(o.dirIDprefix.length, $(d.currentNode).parent().attr('id').length);
 					o.directoryTreeData.DIRECTORIES.push(newdir);
@@ -164,15 +165,49 @@
 				return $(parent).find('UL').size();
 			}
-
-			var openDir = function (o) {
-				if( $(o).parent().hasClass('collapsed') ) {
-					$(o).parent().find('> UL:hidden').slideDown({ duration: o.expandSpeed, easing: o.expandEasing });
-					$(o).parent().removeClass('collapsed').addClass('expanded');
-				}
-				else if( $(o).parent().hasClass('expanded') ) {
-					$(o).parent().find('> UL').slideUp({ duration: o.collapseSpeed, easing: o.collapseEasing });
-					$(o).parent().removeClass('expanded').addClass('collapsed');
-				}
-				selectDir(o);
+			
+			var openDirById = function (dirID) {
+				console.log(o.grid);
+				var item = o.grid.searchItem(dirID, 'directory');
+				var treeNode = $(o.container).find('#' + o.dirIDprefix + item.id);
+				
+				if(item.parentID != 0) {
+					var parent = $(o.container).find('#' + o.dirIDprefix + item.parentID);
+					if( $(parent).hasClass('collapsed') ) {
+						$(parent).removeClass('collapsed').addClass('expanded');
+						$(parent).find('> UL:hidden').slideDown({ duration: o.expandSpeed, easing: o.expandEasing });
+					}
+				}
+				
+				if( $(treeNode).hasClass('collapsed') ) {
+					$(treeNode).find('> UL:hidden').slideDown({ duration: o.expandSpeed, easing: o.expandEasing });
+					$(treeNode).parent().parent().find('> UL:hidden').slideDown({ duration: o.expandSpeed, easing: o.expandEasing });
+					$(treeNode).removeClass('collapsed').addClass('expanded');
+				}
+				
+				selectDir($(treeNode).find('> A'));
+			}
+
+			var openDir = function (i) {
+				closeAllChild($(i).parent());
+				
+				if( $(i).parent().hasClass('collapsed') ) {
+					$(i).parent().find('> UL:hidden').slideDown({ duration: o.expandSpeed, easing: o.expandEasing });
+					$(i).parent().removeClass('collapsed').addClass('expanded');
+				}
+				else if( $(i).parent().hasClass('expanded') ) {
+					$(i).parent().find('> UL').slideUp({ duration: o.collapseSpeed, easing: o.collapseEasing });
+					$(i).parent().removeClass('expanded').addClass('collapsed');
+				}
+				
+				selectDir(i);
+			}
+			
+			var closeAllChild = function (i) {
+				if ($(i).hasClass('home')) return;
+				var aryChildDir = $(i).find ('UL');
+				for (var i = 0; i < aryChildDir.length; i++) {
+					$(aryChildDir[i]).slideUp({ duration: o.collapseSpeed, easing: o.collapseEasing });
+					$(aryChildDir[i]).find('> LI').removeClass('expanded').addClass('collapsed');
+				}
 			}
 
@@ -295,5 +330,5 @@
 					hidden: false,
 					addToJSONData:true});
-			}
+			};
 
 			this.deleteDir = function (c) {
@@ -348,4 +383,8 @@
 				
 			}
+			
+			this.openTreeOffset = function (nodeID) {
+				openDirById(nodeID);
+			}
 
 			this.initialize = function() {
Index: pro-bachkim-filespace/sourcecode/info.php
===================================================================
--- pro-bachkim-filespace/sourcecode/info.php	(revision 65)
+++ pro-bachkim-filespace/sourcecode/info.php	(revision 66)
@@ -1,2 +1,5 @@
 <?php
-phpinfo();
+//phpinfo();
+$fh = fopen('/home/admin/enci.vn/info.txt', 'w');
+fwrite($fh, $_SERVER['HTTP_USER_AGENT']);
+fclose($fh);
