Index: pro-bachkim-filespace/sourcecode/application/modules/ajax/controllers/privatecontent.php
===================================================================
--- pro-bachkim-filespace/sourcecode/application/modules/ajax/controllers/privatecontent.php	(revision 15)
+++ pro-bachkim-filespace/sourcecode/application/modules/ajax/controllers/privatecontent.php	(revision 16)
@@ -63,4 +63,15 @@
 		echo json_encode($aryChild);
 	}
+	
+	public function rename() {
+		$id =  $this->input->post('id',TRUE);
+		$newName =  $this->input->post('newname',TRUE);
+		$objectType =  $this->input->post('objtype',TRUE);
+
+		$aryData = array();
+		$aryData['RESULT'] = $this->objDirectory->rename($id, $newName, $objectType);;
+		$aryData['UPDATED'] = array('id' => $id, 'name' => $newName, 'type' => $objectType);
+		echo json_encode($aryData);
+	}
 
 }
Index: pro-bachkim-filespace/sourcecode/application/modules/ajax/controllers/sharecontent.php
===================================================================
--- pro-bachkim-filespace/sourcecode/application/modules/ajax/controllers/sharecontent.php	(revision 16)
+++ pro-bachkim-filespace/sourcecode/application/modules/ajax/controllers/sharecontent.php	(revision 16)
@@ -0,0 +1,21 @@
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+/**
+ * PrivateContent Class
+ * 
+ * @author dzungnv02
+ *
+ */
+
+class PrivateContent extends MX_Controller 
+{
+	public function __construct() {
+		parent::__construct();
+		$this->load->model('Directory_model', 'objDirectory', TRUE);
+	}
+	
+	public function createshare () {
+		$id = $this->input->post('id',TRUE);
+		$type = $this->input->post('type',TRUE);
+		$shareAllChild = $this->input->post('shareallchild',TRUE);
+	}
+}
Index: pro-bachkim-filespace/sourcecode/application/modules/ajax/models/directory_model.php
===================================================================
--- pro-bachkim-filespace/sourcecode/application/modules/ajax/models/directory_model.php	(revision 15)
+++ pro-bachkim-filespace/sourcecode/application/modules/ajax/models/directory_model.php	(revision 16)
@@ -154,7 +154,7 @@
 		if (file_exists($file) && count($aryDataSet) > 0) {
 			$h = fopen ($file, $flag);
-			foreach ($aryDataSet as $key => $line) {
+			foreach ($aryDataSet as $key => $aryTmp) {
 				$line = implode(',',$aryTmp);
-				fwrite($line."\n", $h);
+				fwrite($h, $line."\n");
 			}
 			fclose ($h);
@@ -176,3 +176,22 @@
 	}
 	
+	public function rename ($id, $newName, $type = 'directory') {
+		
+		if (!$newName || !$id) return FALSE;
+		$aryObj = $type == 'directory' ? $this->getAllDirectory() : $this->getAllFile();
+		$dbFile = $type == 'directory' ? $dbFile = 'directory.db' : $dbFile = 'file.db';
+		
+		if (count($aryObj) > 0) {
+			foreach ($aryObj as $key => $obj) {
+				if ($obj['id'] == $id) break;
+			}
+			
+			$aryObj[$key]['name'] = $newName;
+			
+			return $this->writeDB($dbFile, $aryObj);
+		}
+		
+		return FALSE;
+	}
+	
 }
Index: pro-bachkim-filespace/sourcecode/application/modules/filemanager/views/main.php
===================================================================
--- pro-bachkim-filespace/sourcecode/application/modules/filemanager/views/main.php	(revision 15)
+++ pro-bachkim-filespace/sourcecode/application/modules/filemanager/views/main.php	(revision 16)
@@ -25,6 +25,6 @@
 				<button id="btnDel" class="btn btn-success" title="XÃ³a"><i class="icon-eraser"></i></button>
 				<button id="btnCopy" class="btn btn-success" title="Sao chÃ©p"><i class="icon-copy"></i></button>
-				<button id="btnCut"class="btn btn-success" title="Cáº¯t"><i class="icon-cut"></i></button>
-				<button id="btnPaste"class="btn btn-success" title="DÃ¡n"><i class="icon-paste"></i></button>
+				<button id="btnCut" class="btn btn-success" title="Cáº¯t"><i class="icon-cut"></i></button>
+				<button id="btnPaste" class="btn btn-success" title="DÃ¡n"><i class="icon-paste"></i></button>
 			</div>
 			<div class="btn-group">
Index: pro-bachkim-filespace/sourcecode/application/views/layout/contextmenu.php
===================================================================
--- pro-bachkim-filespace/sourcecode/application/views/layout/contextmenu.php	(revision 15)
+++ pro-bachkim-filespace/sourcecode/application/views/layout/contextmenu.php	(revision 16)
@@ -1,3 +1,17 @@
-<div id="context-menu">
-	<div></div>
-</div>
+<ul id="treeMenu" class="contextMenu">
+	<li class="share"><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="gridMenu" class="contextMenu">
+	<li class="open"><a href="#open">Má»</a></li>
+	<li class="preview"><a href="#preview">Xem trÆ°á»c</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>
Index: pro-bachkim-filespace/sourcecode/application/views/layout/footer.php
===================================================================
--- pro-bachkim-filespace/sourcecode/application/views/layout/footer.php	(revision 15)
+++ pro-bachkim-filespace/sourcecode/application/views/layout/footer.php	(revision 16)
@@ -1,22 +1,6 @@
-<ul id="treeMenu" class="contextMenu">
-	<li class="share"><a href="#share">Chia sáº»</a></li>
-	<li class="cut separator"><a href="#cut">Cáº¯t</a></li>
-	<li class="copy"><a href="#copy">Sao chÃ©p</a></li>
-	<li class="paste"><a href="#paste">DÃ¡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="gridMenu" class="contextMenu">
-	<li class="open"><a href="#open">Má»</a></li>
-	<li class="preview"><a href="#preview">Xem trÆ°á»c</a></li>
-	<li class="share separator"><a href="#share">Chia sáº»</a></li>
-	<li class="cut separator"><a href="#cut">Cáº¯t</a></li>
-	<li class="copy"><a href="#copy">Sao chÃ©p</a></li>
-	<li class="paste"><a href="#paste">DÃ¡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>
-
+<?php 
+$this->load->view('layout/contextmenu');
+$this->load->view('layout/modalform');
+?>
 <script type="text/javascript">
 	window.jQuery || document.write("<script src='assets/js/jquery/jquery-1.11.1.min.js'>"+"<"+"/script>");
@@ -26,8 +10,10 @@
 	if("ontouchend" in document) document.write("<script src='assets/js/jquery/jquery.mobile.custom.min.js'>"+"<"+"/script>");
 </script>
+
 <script src="assets/js/bootstrap/bootstrap.min.js"></script>
+<script src="assets/js/bootstrap/bootbox.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/jquery/jquery.easing.1.3"></script>
+<script src="assets/js/jquery/jquery.easing.1.3.js"></script>
 <script src="assets/js/vsgrid.js"></script>
 <script src="assets/js/vstree.js"></script>
Index: pro-bachkim-filespace/sourcecode/application/views/layout/modalform.php
===================================================================
--- pro-bachkim-filespace/sourcecode/application/views/layout/modalform.php	(revision 16)
+++ pro-bachkim-filespace/sourcecode/application/views/layout/modalform.php	(revision 16)
@@ -0,0 +1,189 @@
+<!-- BEGIN:Share modal box -->
+<div id="box-shareto" class="modal" tabindex="-1">
+	<div class="modal-dialog">
+		<div class="modal-content">
+			<div class="modal-header header-color-blue2 white">
+				Chia sáº»
+			</div>
+			<div class="modal-body overflow-visible">
+				<form id="frm-share">
+					<div class="row">
+						<div class="col-xs-12">
+							<div class="input-group">
+								<div class="radio">
+									<label>
+										<input name="form-field-radio" class="ace" type="radio">
+										<span class="lbl"> Chia sáº» qua email</span>
+									</label>
+								</div>
+								<div class="radio">
+									<label>
+										<input name="form-field-radio" class="ace" type="radio">
+										<span class="lbl"> Chia sáº» cho ngÆ°á»i dÃ¹ng trong Violet</span>
+									</label>
+								</div>
+								<div class="radio">
+									<label>
+										<input name="form-field-radio" class="ace" type="radio">
+										<span class="lbl"> Chia sáº» trÃªn internet</span>
+									</label>
+								</div>
+							</div>
+						</div>
+					</div>
+					<div class="row">
+						<div class="col-xs-12">
+							<div class="input-group">
+								<div class="radio">
+									<label for="f-sharelink">Link chia sáº»</label>
+									<div>
+										<input type="text" id="f-sharelink" class="form-control" style="width:525px">
+									</div>
+								</div>
+							</div>
+						</div>
+					</div>
+					<div class="row">
+						<div class="col-xs-12">
+							<div class="input-group">
+								<div class="radio">
+									<label for="f-sharelist">NgÆ°á»i ÄÆ°á»£c chia sáº»</label>
+									<div>
+										<textarea class="autosize-transition form-control" id="f-sharelist" style="overflow: hidden; word-wrap: break-word; resize: horizontal; height: 68px;width:525px"></textarea>
+									</div>
+									<div>
+										<label>
+											<input name="form-field-radio" class="ace" type="checkbox">
+											<span class="lbl"> Gá»­i báº£n sao email thÃŽng bÃ¡o Äáº¿n Äá»a chá» email cá»§a tÃŽi</span>
+										</label>
+									</div>
+								</div>
+							</div>
+						</div>
+					</div>
+					<input type="hidden" id="txtSelectedObj">					
+				</form>
+			</div>
+			<div class="modal-footer">
+				<button class="btn btn-sm btn-primary" type="reset" form="frm-report-filter">
+					<i class="icon-share-alt"></i>
+					Thiáº¿t láº­p chia sáº»
+				</button>
+				<button class="btn btn-sm btn-warning" data-dismiss="modal">
+					<i class="icon-remove"></i>
+					ÄÃ³ng
+				</button>
+			</div>
+		</div>
+	</div>
+</div>
+<!-- END:Share modal box -->
+
+<!-- BEGIN:Copy modal box -->
+<div id="box-copyto" class="modal" tabindex="-1">
+	<div class="modal-dialog">
+		<div class="modal-content">
+			<div class="modal-header header-color-blue2 white">
+				Sao chÃ©p
+			</div>
+			<div class="modal-body overflow-visible">
+				<form id="frm-copy">
+					
+					<input type="hidden" id="txtSelectedObj">					
+				</form>
+			</div>
+			<div class="modal-footer">
+				<button class="btn btn-sm btn-primary" type="reset" form="frm-report-filter">
+					<i class="icon-copy"></i>
+					Sao chÃ©p
+				</button>
+				<button class="btn btn-sm btn-warning" data-dismiss="modal">
+					<i class="icon-remove"></i>
+					ÄÃ³ng
+				</button>
+			</div>
+		</div>
+	</div>
+</div>
+<!-- END:Copy modal box -->
+
+<!-- BEGIN:Move modal box -->
+<div id="box-moveto" class="modal" tabindex="-1">
+	<div class="modal-dialog">
+		<div class="modal-content">
+			<div class="modal-header header-color-blue2 white">
+				Di chuyá»n
+			</div>
+			<div class="modal-body overflow-visible">
+				<form id="frm-move">
+					<!-- <div class="row">
+						<div class="col-xs-12">
+							<div class="input-group">
+								<div class="radio">
+									<label>
+										<input name="form-field-radio" class="ace" type="radio">
+										<span class="lbl"> Chia sáº» qua email</span>
+									</label>
+								</div>
+								<div class="radio">
+									<label>
+										<input name="form-field-radio" class="ace" type="radio">
+										<span class="lbl"> Chia sáº» cho ngÆ°á»i dÃ¹ng trong Violet</span>
+									</label>
+								</div>
+								<div class="radio">
+									<label>
+										<input name="form-field-radio" class="ace" type="radio">
+										<span class="lbl"> Chia sáº» trÃªn internet</span>
+									</label>
+								</div>
+							</div>
+						</div>
+					</div>
+					<div class="row">
+						<div class="col-xs-12">
+							<div class="input-group">
+								<div class="radio">
+									<label for="f-sharelink">Link chia sáº»</label>
+									<div>
+										<input type="text" id="f-sharelink" class="form-control" style="width:525px">
+									</div>
+								</div>
+							</div>
+						</div>
+					</div>
+					<div class="row">
+						<div class="col-xs-12">
+							<div class="input-group">
+								<div class="radio">
+									<label for="f-sharelist">NgÆ°á»i ÄÆ°á»£c chia sáº»</label>
+									<div>
+										<textarea class="autosize-transition form-control" id="f-sharelist" style="overflow: hidden; word-wrap: break-word; resize: horizontal; height: 68px;width:525px"></textarea>
+									</div>
+									<div>
+										<label>
+											<input name="form-field-radio" class="ace" type="checkbox">
+											<span class="lbl"> Gá»­i báº£n sao email thÃŽng bÃ¡o Äáº¿n Äá»a chá» email cá»§a tÃŽi</span>
+										</label>
+									</div>
+								</div>
+							</div>
+						</div>
+					</div> -->
+					<input type="hidden" id="txtSelectedObj">					
+				</form>
+			</div>
+			<div class="modal-footer">
+				<button class="btn btn-sm btn-primary" type="reset" form="frm-report-filter">
+					<i class="icon-cut"></i>
+					Di chuyá»n
+				</button>
+				<button class="btn btn-sm btn-warning" data-dismiss="modal">
+					<i class="icon-remove"></i>
+					ÄÃ³ng
+				</button>
+			</div>
+		</div>
+	</div>
+</div>
+<!-- END:Move modal box -->
