Index: /pro-bachkim-filespace/sourcecode/application/modules/ajax/controllers/privatecontent.php
===================================================================
--- /pro-bachkim-filespace/sourcecode/application/modules/ajax/controllers/privatecontent.php	(revision 14)
+++ /pro-bachkim-filespace/sourcecode/application/modules/ajax/controllers/privatecontent.php	(revision 15)
@@ -36,5 +36,5 @@
 	
 	public function getContent () {
-		$aryData = array('DIRECTORIES' =>  $this->objDirectory->getAllDirectory() , 'FILES' => $this->objDirectory->getAllFile());
+		$aryData = array('DIRECTORIES' =>  $this->objDirectory->getAllDirectory() , 'FILES' => $this->objDirectory->getAllFile(), 'ENCRYPT' => md5('abcdef'));
 		echo json_encode($aryData);
 	}
Index: /pro-bachkim-filespace/sourcecode/application/views/layout/footer.php
===================================================================
--- /pro-bachkim-filespace/sourcecode/application/views/layout/footer.php	(revision 14)
+++ /pro-bachkim-filespace/sourcecode/application/views/layout/footer.php	(revision 15)
@@ -1,2 +1,22 @@
+<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>
+
 <script type="text/javascript">
 	window.jQuery || document.write("<script src='assets/js/jquery/jquery-1.11.1.min.js'>"+"<"+"/script>");
@@ -8,10 +28,11 @@
 <script src="assets/js/bootstrap/bootstrap.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/vsgrid.js"></script>
+<script src="assets/js/vstree.js"></script>
 
-<script src="assets/js/jquery/jqueryFileTree.js"></script>
-<script src="assets/js/jquery/jquery.easing.1.3"></script>
-<script src="assets/js/vsfiletree.js"></script>
-<script src="assets/js/vsfilemanager.js"></script>
-<script src="assets/js/vscontextmenu.js"></script>
+<!-- <script src="assets/js/vscontextmenu.js"></script>
+<script src="assets/js/jquery/jqueryFileTree.js"></script> -->
 
 <script type="text/javascript" src="assets/js/filemanager/filemanager.js">
Index: /pro-bachkim-filespace/sourcecode/assets/css/jquery/jquery.contextMenu.css
===================================================================
--- /pro-bachkim-filespace/sourcecode/assets/css/jquery/jquery.contextMenu.css	(revision 15)
+++ /pro-bachkim-filespace/sourcecode/assets/css/jquery/jquery.contextMenu.css	(revision 15)
@@ -0,0 +1,141 @@
+/*!
+ * jQuery contextMenu - Plugin for simple contextMenu handling
+ *
+ * Version: git-master
+ *
+ * Authors: Rodney Rehm, Addy Osmani (patches for FF)
+ * Web: http://medialize.github.com/jQuery-contextMenu/
+ *
+ * Licensed under
+ *   MIT License http://www.opensource.org/licenses/mit-license
+ *   GPL v3 http://opensource.org/licenses/GPL-3.0
+ *
+ */
+
+.context-menu-list {
+    margin:0; 
+    padding:0;
+    min-width: 120px;
+    max-width: 250px;
+    display: inline-block;
+    position: absolute;
+    list-style-type: none;
+    
+    border: 1px solid #DDD;
+    background: #EEE;
+    
+    -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
+       -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
+        -ms-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
+         -o-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
+            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
+    
+    font-family: Verdana, Arial, Helvetica, sans-serif;
+    font-size: 11px;
+}
+
+.context-menu-item {
+    padding: 2px 2px 2px 24px;
+    background-color: #EEE;
+    position: relative;
+    -webkit-user-select: none;
+       -moz-user-select: -moz-none;
+        -ms-user-select: none;
+            user-select: none;
+}
+
+.context-menu-separator {
+    padding-bottom:0;
+    border-bottom: 1px solid #DDD;
+}
+
+.context-menu-item > label > input,
+.context-menu-item > label > textarea {
+    -webkit-user-select: text;
+       -moz-user-select: text;
+        -ms-user-select: text;
+            user-select: text;
+}
+
+.context-menu-item.hover {
+    cursor: pointer;
+    background-color: #39F;
+}
+
+.context-menu-item.disabled {
+    color: #666;
+}
+
+.context-menu-input.hover,
+.context-menu-item.disabled.hover {
+    cursor: default;
+    background-color: #EEE;
+}
+
+.context-menu-submenu:after {
+    content: ">";
+    color: #666;
+    position: absolute;
+    top: 0;
+    right: 3px;
+    z-index: 1;
+}
+
+/* icons
+    #protip:
+    In case you want to use sprites for icons (which I would suggest you do) have a look at
+    http://css-tricks.com/13224-pseudo-spriting/ to get an idea of how to implement 
+    .context-menu-item.icon:before {}
+ */
+.context-menu-item.icon { min-height: 18px; background-repeat: no-repeat; background-position: 4px 2px; }
+.context-menu-item.icon-edit { background-image: url(images/page_white_edit.png); }
+.context-menu-item.icon-cut { background-image: url(images/cut.png); }
+.context-menu-item.icon-copy { background-image: url(images/page_white_copy.png); }
+.context-menu-item.icon-paste { background-image: url(images/page_white_paste.png); }
+.context-menu-item.icon-delete { background-image: url(images/page_white_delete.png); }
+.context-menu-item.icon-add { background-image: url(images/page_white_add.png); }
+.context-menu-item.icon-quit { background-image: url(images/door.png); }
+
+/* vertically align inside labels */
+.context-menu-input > label > * { vertical-align: top; }
+
+/* position checkboxes and radios as icons */
+.context-menu-input > label > input[type="checkbox"],
+.context-menu-input > label > input[type="radio"] {
+    margin-left: -17px;
+}
+.context-menu-input > label > span {
+    margin-left: 5px;
+}
+
+.context-menu-input > label,
+.context-menu-input > label > input[type="text"],
+.context-menu-input > label > textarea,
+.context-menu-input > label > select {
+    display: block;
+    width: 100%;
+    
+    -webkit-box-sizing: border-box;
+       -moz-box-sizing: border-box;
+        -ms-box-sizing: border-box;
+         -o-box-sizing: border-box;
+            box-sizing: border-box;
+}
+
+.context-menu-input > label > textarea {
+    height: 100px;
+}
+.context-menu-item > .context-menu-list {
+    display: none;
+    /* re-positioned by js */
+    right: -5px;
+    top: 5px;
+}
+
+.context-menu-item.hover > .context-menu-list {
+    display: block;
+}
+
+.context-menu-accesskey {
+    text-decoration: underline;
+}
Index: /pro-bachkim-filespace/sourcecode/assets/css/jquery/jquery.contextmenu_new.css
===================================================================
--- /pro-bachkim-filespace/sourcecode/assets/css/jquery/jquery.contextmenu_new.css	(revision 15)
+++ /pro-bachkim-filespace/sourcecode/assets/css/jquery/jquery.contextmenu_new.css	(revision 15)
@@ -0,0 +1,72 @@
+@CHARSET "UTF-8";
+
+/* Generic context menu styles */
+.contextMenu {
+	position: absolute;
+	width: 130px;
+	z-index: 99999;
+	border: solid 1px #CCC;
+	background: #EEE;
+	padding: 0px;
+	margin: 0px;
+	display: none;
+}
+
+.contextMenu LI {
+	list-style: none;
+	padding: 0px;
+	margin: 0px;
+	padding-top: 1px;
+	padding-bottom: 1px;
+	padding-left: 3px;
+}
+
+.contextMenu A {
+	color: #333;
+	text-decoration: none;
+	display: block;
+	line-height: 20px;
+	height: 25px;
+	background-position: 6px center;
+	background-repeat: no-repeat;
+	outline: none;
+	padding: 1px 5px;
+	padding-left: 28px;
+}
+
+.contextMenu LI.hover A {
+	color: #FFF;
+	background-color: #3399FF;
+}
+
+.contextMenu LI.disabled A {
+	color: #AAA;
+	cursor: default;
+}
+
+.contextMenu LI.hover.disabled A {
+	background-color: transparent;
+}
+
+.contextMenu LI.separator {
+	border-top: solid 1px #CCC;
+}
+
+/*
+	Adding Icons
+	
+	You can add icons to the context menu by adding
+	classes to the respective LI element(s)
+*/
+
+.contextMenu LI.preview A { background-image: url(images/preview.png); }
+.contextMenu LI.open A { background-image: url(images/folder_open.png); }
+.contextMenu LI.share A { background-image: url(images/share.png); }
+.contextMenu LI.rename A { background-image: url(images/rename.png); }
+
+.contextMenu LI.edit A { background-image: url(images/page_white_edit.png); }
+.contextMenu LI.cut A { background-image: url(images/cut.png); }
+.contextMenu LI.copy A { background-image: url(images/page_white_copy.png); }
+.contextMenu LI.paste A { background-image: url(images/page_white_paste.png); }
+.contextMenu LI.delete A { background-image: url(images/page_white_delete.png); }
+.contextMenu LI.quit A { background-image: url(images/door.png); }
Index: /pro-bachkim-filespace/sourcecode/assets/css/space/style.css
===================================================================
--- /pro-bachkim-filespace/sourcecode/assets/css/space/style.css	(revision 14)
+++ /pro-bachkim-filespace/sourcecode/assets/css/space/style.css	(revision 15)
@@ -2,5 +2,6 @@
 @import "../bootstrap/bootstrap.min.css";
 @import "../jquery/jquery-ui-1.10.4.min.css";
-@import "../jquery/jqueryFileTree.css";
+/* @import "../jquery/jquery.contextMenu.css"; */
+@import "../jquery/jquery.contextmenu_new.css";
 @import "../font-awesome.min.css";
 @import "../ace.min.css";
Index: /pro-bachkim-filespace/sourcecode/assets/css/space/vsgrid.css
===================================================================
--- /pro-bachkim-filespace/sourcecode/assets/css/space/vsgrid.css	(revision 14)
+++ /pro-bachkim-filespace/sourcecode/assets/css/space/vsgrid.css	(revision 15)
@@ -158,4 +158,14 @@
 }
 
+DIV.vsgrid DIV.vscell DIV.file-name INPUT.rename {
+	width:100%;
+	height: 18px;
+	border: 1px #5eaee5 solid;
+	padding: 0px;
+	text-overflow: initial;
+	font-family: Verdana, sans-serif;
+	font-size: 12px;
+}
+
 DIV.vsgrid DIV.vscell DIV.selector DIV.icon-directory,
 DIV.vsgrid DIV.vscell DIV.selector DIV.icon-text,
Index: o-bachkim-filespace/sourcecode/assets/js/vsfilemanager.js
===================================================================
--- /pro-bachkim-filespace/sourcecode/assets/js/vsfilemanager.js	(revision 14)
+++ 	(revision )
@@ -1,381 +1,0 @@
-if(jQuery) (function($){
-	
-	$.extend($.fn, {
-		violetTree: function(o) {
-			if( !o ) var o = {};
-			if( o.user == undefined ) o.user = null;
-			if( o.homeDirNameDisplay == undefined ) o.homeDirNameDisplay = 'Home';
-			if( o.host == undefined ) o.host = 'http://localhost/';
-			if( o.script == undefined ) o.script = 'ajax/privatecontent/getcontent';
-			if( o.container == undefined ) o.container = $(this);
-			if( o.dirIDprefix == undefined ) o.dirIDprefix = 'vsdir_';
-
-			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.directoryTreeData == undefined ) o.directoryTreeData = null;
-			if( o.grid == undefined ) o.grid = null;
-			
-			// PRIVATE methods
-			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) {
-					$.post(o.host + p.script, p.postdata, function (data){
-						if (data) {
-							parseData = $.parseJSON(data);
-						}
-
-						if (p.callbackSuccess != null) {
-							p.callbackSuccess(parseData);
-						}
-
-					}).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);});
-				}
-			}
-
-			var loadTree = function () {
-				sendCommand ({postdata:null,callbackSuccess:renderTree});
-			};
-
-			var renderTree = function  (parseData) {
-
-				o.directoryTreeData = parseData;				
-				var directoryData = parseData.DIRECTORIES;
-
-				var homeNode = createNode({
-					id:0,
-					name:o.homeDirNameDisplay,
-				});
-
-				selectDir($(homeNode).find('> A'));
-				if (directoryData != null) {
-					for (var i = 0; i < directoryData.length ; i++) {
-						var node = createNode ({
-							id: directoryData[i].id,
-							name: directoryData[i].name,
-							curentNode: $('#' + o.dirIDprefix + directoryData[i].parentID).find('> A'),
-							hidden: (directoryData[i].parentID > 0) ? true : false
-						})
-					};
-				}
-			};
-
-			//Create a node of Tree
-			var createNode = function (d) {
-				if( !d ) var d = {};
-				if( d.id == undefined ) d.id = null;
-				if( d.name == undefined ) d.name = null;
-				if( d.curentNode == undefined ) d.curentNode = null;
-				if( d.hidden == undefined ) d.hidden = true;
-				if( d.clickEvent == undefined ) d.clickEvent = openDir;
-				if( d.customEvent == undefined ) d.customEvent = null; //customEvent.eventName, customEvent.eventTrigger
-				if( d.addToJSONData == undefined ) d.addToJSONData = false;
-				
-				if (d.curentNode != null) {
-					var strHTML = '<ul class="vstree"><li id="' + o.dirIDprefix + d.id + '" class="directory collapsed"><a href="#" rel="' + d.name + '">' + d.name + '</a></li></ul>';
-
-					$(d.curentNode).parent().append(strHTML);
-					if (d.hidden == true) 
-						$('#' + o.dirIDprefix + d.id).parent().css('display','none');
-					
-				}else if (d.id == 0){
-					var strHTML = '<ul class="vstree"><li id="' + o.dirIDprefix + d.id + '" class="home"><a href="#" rel="' + d.name + '">' + d.name + '</a></li></ul>';
-					$(o.container).append(strHTML);
-				}
-
-				//bind new node to data
-				if (d.addToJSONData == true) {
-					//o.directoryTreeData.DIRECTORIES.length
-					var newdir = {};
-					newdir.id = d.id;
-					newdir.name = d.name;
-					newdir.parentID = $(d.curentNode).parent().attr('id').substring(o.dirIDprefix.length, $(d.curentNode).parent().attr('id').length);
-					o.directoryTreeData.DIRECTORIES.push(newdir);
-					sendtoGrid();
-				}
-				
-				//bind event on new node
-				$('#' + o.dirIDprefix + d.id).find('a').bind("click", function(e){d.clickEvent(this);return false;});
-				
-				$('#' + o.dirIDprefix + d.id).find('a').contextMenu({
-					menu: 'treeMenu'
-				}, function(action, el, pos) {
-					alert(
-						'Action: ' + action + '\n\n' +
-						'Element text: ' + $(el).text() + '\n\n' + 
-						'X: ' + pos.x + '  Y: ' + pos.y + ' (relative to element)\n\n' + 
-						'X: ' + pos.docX + '  Y: ' + pos.docY+ ' (relative to document)'
-						);
-				});
-				
-				if (d.customEvent != null) 
-					$('#' + o.dirIDprefix + d.id).find('a').bind(d.customEvent.eventName, function(e){d.customEvent.eventTrigger(this)});
-
-				return $('#' + o.dirIDprefix + d.id);
-			}
-			//END - Create a node of Tree
-
-			var deleteNode = function (parsedData) {
-				if (parsedData.isSuccess == false) return false;
-				if (!$('#' + o.dirIDprefix + parsedData.id).hasClass('home'))
-					$('#' + o.dirIDprefix + parsedData.id).parent().remove();
-			}
-
-			var isHome = function (n) {
-				return $(n).parent().hasClass('home');
-			}
-
-			var countNodeChild = function (n) {
-				var parent = $(n).parent();
-				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 selectDir = function (c) {
-				$('.currentDir').removeClass('currentDir');
-				$(c).addClass('currentDir');
-				sendtoGrid();
-			}
-
-			var sendtoGrid = function () {
-				o.grid.getData({
-								directoryTreeData: o.directoryTreeData,
-								curentParent:$(o.container).find('.currentDir').parent().attr('id'),
-								dirIDprefix: o.dirIDprefix
-							});
-			}
-
-			loadTree();
-			// END - PRIVATE methods
-
-
-			this.expandAll = function() {
-				$(o.container).find('UL:hidden').slideDown({ duration: o.expandSpeed, easing: o.expandEasing });
-			};
-
-			this.getCurrentDirName = function() {
-				return $(o.container).find('.currentDir').attr('rel');
-			};
-
-			this.getCurrentDir = function() {
-				return $(o.container).find('.currentDir');
-			};
-
-			this.createDir = function(c) {
-				var cid = $(c).parent().attr('id');
-				var pid = cid.substring(o.dirIDprefix.length, cid.length);
-
-				var dirName = prompt("Please enter new directory name", "");
-				var script = 'ajax/privatecontent/createdir';
-
-				if (dirName != null && dirName.length != 0) {
-					sendCommand({
-						script: script,
-						postdata:{parentID:pid,name:dirName},
-						callbackSuccess: function (parsedData) {createNode({
-											id: parsedData.id,
-											name: parsedData.name,
-											curentNode: c,
-											hidden: false,
-											addToJSONData:true});
-										}
-					});
-				}
-			}
-
-			this.deleteDir = function (c) {
-				var childExisted = (countNodeChild(c) > 0) ? true:false;
-				var confirmDel = false;
-				var confirmChild = true;
-
-				var cid = $(c).parent().attr('id');
-				var pid = cid.substring(o.dirIDprefix.length, cid.length);
-
-				if (isHome(c)) return;
-
-				confirmDel = confirm('Are you sure you want to delete this Directory?');
-
-				if (childExisted > 0 && confirmDel)
-					confirmChild = confirm('This node has childs, you still want to delete it?');
-
-				if (confirmDel && confirmChild) {
-					var postdata = {id:pid,delallchild:true}
-					sendCommand({
-						script:'ajax/privatecontent/deletedir',
-						postdata:postdata,
-						callbackSuccess: function (parsedData) {deleteNode(parsedData)}
-					});
-				}
-			}
-
-			this.copy = function () {
-				alert ('copy');
-			}
-
-			this.paste = function () {
-				alert ('paste');
-			}
-
-			this.initialize = function() {
-        		return this;
-    		};
-
-			return this.initialize();
-		},
-
-		violetGrid: function (o) {
-			if( !o ) var o = {};
-			if( o.container == undefined ) o.container = $(this);
-			if( o.defaultViewMode == undefined ) o.defaultViewMode = 'thumbnail';//or 'list'
-			if( o.directoryTreeData == undefined ) o.directoryTreeData = null;
-			if( o.dirIDprefix == undefined ) o.dirIDprefix = null;
-			
-			var createNode = function (d) {
-				if( !d ) var d = {};
-				if( d.id == undefined ) d.id = null;
-				if( d.name == undefined ) d.name = null;
-				if( d.minetype == undefined ) d.minetype = 'directory';
-				if( d.parentID == undefined ) d.parentID = null;
-				if( d.clickEvent == undefined ) d.clickEvent = null;
-				if( d.customEvent == undefined ) d.customEvent = null;
-
-				var strHTML = '<div class="vscell" rel="id:' + d.id + '">';
-					strHTML += '<div class="selector unselected">';
-					strHTML += 	'<div class="icon-' + d.minetype + '"></div>';
-					strHTML += '</div>';
-					strHTML += '<div class="file-name unselected">' + d.name + '</div>';
-					strHTML += '</div>';
-				
-				var disabledItemsList = null;
-				
-				if (d.minetype == 'directory') {
-					disabledItemsList = ['preview'];
-				}
-				
-				$(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
-				}, function(action, el, pos) {
-				
-					switch(action) {
-						case 'rename':
-							itemClick(el);
-							rename(el);
-							break;
-						default:
-							break;
-					}
-					
-				});
-			}
-			
-			var keyboardRename = function () {
-				$(document).keypress( function(e) {
-					var selectedItem = $('.selector.selected').parent();
-					switch( e.keyCode ) {
-						case 113:
-							rename(selectedItem);
-							break;
-						default:
-							break;
-					}
-					return false;
-				});
-			}
-
-			var itemClick = function (i) {
-				$(i).parent().find('.selector').removeClass('selected');
-				$(i).parent().find('.selector').addClass('unselected');
-				$(i).parent().find('.file-name').removeClass('selected');
-				$(i).parent().find('.file-name').addClass('unselected');
-
-				$(i).find('.file-name').removeClass('unselected');
-				$(i).find('.file-name').addClass('selected');
-				$(i).find('.selector').removeClass('unselected');
-				$(i).find('.selector').addClass('selected');
-			}
-
-			var renderGrid = function (o) {
-				$(o.container).find ('.vscell').remove();
-				
-				var childDir = o.directoryTreeData.DIRECTORIES;
-				var childFile = o.directoryTreeData.FILES;
-				var curentDirID = o.curentParent.substring(o.dirIDprefix.length, o.curentParent.length);
-				
-				for (var i = 0 ; i < childDir.length; i++) {
-					if (childDir[i].parentID != curentDirID) continue;
-					createNode ({
-						id: childDir[i].id,
-						name: childDir[i].name,
-						parentID: curentDirID,
-					});
-				}
-
-				for (var i = 0 ; i < childFile.length; i++) {
-					if (childFile[i].parentID != curentDirID) continue;
-					createNode ({
-						id: childFile[i].id,
-						name: childFile[i].name,
-						parentID: curentDirID,
-						minetype: childFile[i].minetype,
-					});
-				}
-			}
-			
-			var rename = function (e) {
-				var nameObj = $(e).find('.file-name');
-				var oldName = $(nameObj).text();
-				var editor = document.createElement ('INPUT');
-				editor.type = 'text';
-				editor.className = 'rename';
-				editor.value = oldName;
-				
-				$(nameObj).text('');
-				$(nameObj).append(editor);
-				editor.focus();
-				$(editor).select();
-			}
-			
-			var cancelRename = function () {
-				
-			}
-
-			this.getData = function (data) {
-				o.directoryTreeData = data.directoryTreeData;
-				o.curentParent = data.curentParent;
-				o.dirIDprefix = data.dirIDprefix
-				renderGrid(o);
-				keyboardRename();
-			}
-
-			this.initialize = function() {
-        		return this;
-    		};
-
-			return this.initialize();
-		}
-	});
-
-})(jQuery);
Index: /pro-bachkim-filespace/sourcecode/assets/js/vsgrid.js
===================================================================
--- /pro-bachkim-filespace/sourcecode/assets/js/vsgrid.js	(revision 14)
+++ /pro-bachkim-filespace/sourcecode/assets/js/vsgrid.js	(revision 15)
@@ -0,0 +1,146 @@
+if(jQuery) (function($){
+	
+	$.extend($.fn, {
+		violetGrid: function (o) {
+			if( !o ) var o = {};
+			if( o.container == undefined ) o.container = $(this);
+			if( o.defaultViewMode == undefined ) o.defaultViewMode = 'thumbnail';//or 'list'
+			if( o.directoryTreeData == undefined ) o.directoryTreeData = null;
+			if( o.dirIDprefix == undefined ) o.dirIDprefix = null;
+			
+			var createNode = function (d) {
+				if( !d ) var d = {};
+				if( d.id == undefined ) d.id = null;
+				if( d.name == undefined ) d.name = null;
+				if( d.minetype == undefined ) d.minetype = 'directory';
+				if( d.parentID == undefined ) d.parentID = null;
+				if( d.clickEvent == undefined ) d.clickEvent = null;
+				if( d.customEvent == undefined ) d.customEvent = null;
+
+				var strHTML = '<div class="vscell" rel="id:' + d.id + '">';
+					strHTML += '<div class="selector unselected">';
+					strHTML += 	'<div class="icon-' + d.minetype + '"></div>';
+					strHTML += '</div>';
+					strHTML += '<div class="file-name unselected">' + d.name + '</div>';
+					strHTML += '</div>';
+				
+				var disabledItemsList = null;
+				
+				if (d.minetype == 'directory') {
+					disabledItemsList = ['preview'];
+				}
+				
+				$(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
+				}, function(action, el, pos) {
+				
+					switch(action) {
+						case 'rename':
+							itemClick(el);
+							rename(el);
+							break;
+						default:
+							break;
+					}
+					
+				});
+			}
+			
+			var keyboardRename = function () {
+				$(document).keypress( function(e) {
+					var selectedItem = $('.selector.selected').parent();
+					switch( e.keyCode ) {
+						case 113:
+							rename(selectedItem);
+							break;
+						case 32:
+							cancelRename(selectedItem);
+							break;
+						default:
+							break;
+					}
+					return false;
+				});
+			}
+
+			var itemClick = function (i) {
+				$(i).parent().find('.selector').removeClass('selected');
+				$(i).parent().find('.selector').addClass('unselected');
+				$(i).parent().find('.file-name').removeClass('selected');
+				$(i).parent().find('.file-name').addClass('unselected');
+
+				$(i).find('.file-name').removeClass('unselected');
+				$(i).find('.file-name').addClass('selected');
+				$(i).find('.selector').removeClass('unselected');
+				$(i).find('.selector').addClass('selected');
+			}
+
+			var renderGrid = function (o) {
+				$(o.container).find ('.vscell').remove();
+				
+				var childDir = o.directoryTreeData.DIRECTORIES;
+				var childFile = o.directoryTreeData.FILES;
+				var curentDirID = o.curentParent.substring(o.dirIDprefix.length, o.curentParent.length);
+				
+				for (var i = 0 ; i < childDir.length; i++) {
+					if (childDir[i].parentID != curentDirID) continue;
+					createNode ({
+						id: childDir[i].id,
+						name: childDir[i].name,
+						parentID: curentDirID,
+					});
+				}
+
+				for (var i = 0 ; i < childFile.length; i++) {
+					if (childFile[i].parentID != curentDirID) continue;
+					createNode ({
+						id: childFile[i].id,
+						name: childFile[i].name,
+						parentID: curentDirID,
+						minetype: childFile[i].minetype,
+					});
+				}
+			}
+			
+			var rename = function (e) {
+				var nameObj = $(e).find('.file-name');
+				var oldName = $(nameObj).text();
+				var editor = document.createElement ('INPUT');
+				editor.type = 'text';
+				editor.className = 'rename';
+				editor.value = oldName;
+				
+				$(nameObj).text('');
+				$(nameObj).append(editor);
+				editor.focus();
+				$(editor).select();
+			}
+			
+			var cancelRename = function (e) {
+				var oldName = $(e).find('INPUT.rename').attr('value');
+				$(e).find('INPUT.rename').remove();
+				$(e).find('.file-name').text(oldName);
+				
+			}
+
+			this.getData = function (data) {
+				o.directoryTreeData = data.directoryTreeData;
+				o.curentParent = data.curentParent;
+				o.dirIDprefix = data.dirIDprefix
+				renderGrid(o);
+				keyboardRename();
+			}
+
+			this.initialize = function() {
+        		return this;
+    		};
+
+			return this.initialize();
+		}
+	});
+
+})(jQuery);
Index: /pro-bachkim-filespace/sourcecode/assets/js/vstree.js
===================================================================
--- /pro-bachkim-filespace/sourcecode/assets/js/vstree.js	(revision 15)
+++ /pro-bachkim-filespace/sourcecode/assets/js/vstree.js	(revision 15)
@@ -0,0 +1,246 @@
+if(jQuery) (function($){
+	
+	$.extend($.fn, {
+		violetTree: function(o) {
+			if( !o ) var o = {};
+			if( o.user == undefined ) o.user = null;
+			if( o.homeDirNameDisplay == undefined ) o.homeDirNameDisplay = 'Home';
+			if( o.host == undefined ) o.host = 'http://localhost/';
+			if( o.script == undefined ) o.script = 'ajax/privatecontent/getcontent';
+			if( o.container == undefined ) o.container = $(this);
+			if( o.dirIDprefix == undefined ) o.dirIDprefix = 'vsdir_';
+
+			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.directoryTreeData == undefined ) o.directoryTreeData = null;
+			if( o.grid == undefined ) o.grid = null;
+			
+			// PRIVATE methods
+			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) {
+					$.post(o.host + p.script, p.postdata, function (data){
+						if (data) {
+							parseData = $.parseJSON(data);
+						}
+
+						if (p.callbackSuccess != null) {
+							p.callbackSuccess(parseData);
+						}
+
+					}).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);});
+				}
+			}
+
+			var loadTree = function () {
+				sendCommand ({postdata:null,callbackSuccess:renderTree});
+			};
+
+			var renderTree = function  (parseData) {
+
+				o.directoryTreeData = parseData;				
+				var directoryData = parseData.DIRECTORIES;
+
+				var homeNode = createNode({
+					id:0,
+					name:o.homeDirNameDisplay,
+				});
+
+				selectDir($(homeNode).find('> A'));
+				if (directoryData != null) {
+					for (var i = 0; i < directoryData.length ; i++) {
+						var node = createNode ({
+							id: directoryData[i].id,
+							name: directoryData[i].name,
+							curentNode: $('#' + o.dirIDprefix + directoryData[i].parentID).find('> A'),
+							hidden: (directoryData[i].parentID > 0) ? true : false
+						})
+					};
+				}
+			};
+
+			//Create a node of Tree
+			var createNode = function (d) {
+				if( !d ) var d = {};
+				if( d.id == undefined ) d.id = null;
+				if( d.name == undefined ) d.name = null;
+				if( d.curentNode == undefined ) d.curentNode = null;
+				if( d.hidden == undefined ) d.hidden = true;
+				if( d.clickEvent == undefined ) d.clickEvent = openDir;
+				if( d.customEvent == undefined ) d.customEvent = null; //customEvent.eventName, customEvent.eventTrigger
+				if( d.addToJSONData == undefined ) d.addToJSONData = false;
+				
+				if (d.curentNode != null) {
+					var strHTML = '<ul class="vstree"><li id="' + o.dirIDprefix + d.id + '" class="directory collapsed"><a href="#" rel="' + d.name + '">' + d.name + '</a></li></ul>';
+
+					$(d.curentNode).parent().append(strHTML);
+					if (d.hidden == true) 
+						$('#' + o.dirIDprefix + d.id).parent().css('display','none');
+					
+				}else if (d.id == 0){
+					var strHTML = '<ul class="vstree"><li id="' + o.dirIDprefix + d.id + '" class="home"><a href="#" rel="' + d.name + '">' + d.name + '</a></li></ul>';
+					$(o.container).append(strHTML);
+				}
+
+				//bind new node to data
+				if (d.addToJSONData == true) {
+					//o.directoryTreeData.DIRECTORIES.length
+					var newdir = {};
+					newdir.id = d.id;
+					newdir.name = d.name;
+					newdir.parentID = $(d.curentNode).parent().attr('id').substring(o.dirIDprefix.length, $(d.curentNode).parent().attr('id').length);
+					o.directoryTreeData.DIRECTORIES.push(newdir);
+					sendtoGrid();
+				}
+				
+				//bind event on new node
+				$('#' + o.dirIDprefix + d.id).find('a').bind("click", function(e){d.clickEvent(this);return false;});
+				
+				$('#' + o.dirIDprefix + d.id).find('a').contextMenu({
+					menu: 'treeMenu'
+				}, function(action, el, pos) {
+					alert(
+						'Action: ' + action + '\n\n' +
+						'Element text: ' + $(el).text() + '\n\n' + 
+						'X: ' + pos.x + '  Y: ' + pos.y + ' (relative to element)\n\n' + 
+						'X: ' + pos.docX + '  Y: ' + pos.docY+ ' (relative to document)'
+						);
+				});
+				
+				if (d.customEvent != null) 
+					$('#' + o.dirIDprefix + d.id).find('a').bind(d.customEvent.eventName, function(e){d.customEvent.eventTrigger(this)});
+
+				return $('#' + o.dirIDprefix + d.id);
+			}
+			//END - Create a node of Tree
+
+			var deleteNode = function (parsedData) {
+				if (parsedData.isSuccess == false) return false;
+				if (!$('#' + o.dirIDprefix + parsedData.id).hasClass('home'))
+					$('#' + o.dirIDprefix + parsedData.id).parent().remove();
+			}
+
+			var isHome = function (n) {
+				return $(n).parent().hasClass('home');
+			}
+
+			var countNodeChild = function (n) {
+				var parent = $(n).parent();
+				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 selectDir = function (c) {
+				$('.currentDir').removeClass('currentDir');
+				$(c).addClass('currentDir');
+				sendtoGrid();
+			}
+
+			var sendtoGrid = function () {
+				o.grid.getData({
+								directoryTreeData: o.directoryTreeData,
+								curentParent:$(o.container).find('.currentDir').parent().attr('id'),
+								dirIDprefix: o.dirIDprefix
+							});
+			}
+
+			loadTree();
+			// END - PRIVATE methods
+
+
+			this.expandAll = function() {
+				$(o.container).find('UL:hidden').slideDown({ duration: o.expandSpeed, easing: o.expandEasing });
+			};
+
+			this.getCurrentDirName = function() {
+				return $(o.container).find('.currentDir').attr('rel');
+			};
+
+			this.getCurrentDir = function() {
+				return $(o.container).find('.currentDir');
+			};
+
+			this.createDir = function(c) {
+				var cid = $(c).parent().attr('id');
+				var pid = cid.substring(o.dirIDprefix.length, cid.length);
+
+				var dirName = prompt("Please enter new directory name", "");
+				var script = 'ajax/privatecontent/createdir';
+
+				if (dirName != null && dirName.length != 0) {
+					sendCommand({
+						script: script,
+						postdata:{parentID:pid,name:dirName},
+						callbackSuccess: function (parsedData) {createNode({
+											id: parsedData.id,
+											name: parsedData.name,
+											curentNode: c,
+											hidden: false,
+											addToJSONData:true});
+										}
+					});
+				}
+			}
+
+			this.deleteDir = function (c) {
+				var childExisted = (countNodeChild(c) > 0) ? true:false;
+				var confirmDel = false;
+				var confirmChild = true;
+
+				var cid = $(c).parent().attr('id');
+				var pid = cid.substring(o.dirIDprefix.length, cid.length);
+
+				if (isHome(c)) return;
+
+				confirmDel = confirm('Are you sure you want to delete this Directory?');
+
+				if (childExisted > 0 && confirmDel)
+					confirmChild = confirm('This node has childs, you still want to delete it?');
+
+				if (confirmDel && confirmChild) {
+					var postdata = {id:pid,delallchild:true}
+					sendCommand({
+						script:'ajax/privatecontent/deletedir',
+						postdata:postdata,
+						callbackSuccess: function (parsedData) {deleteNode(parsedData)}
+					});
+				}
+			}
+
+			this.copy = function () {
+				alert ('copy');
+			}
+
+			this.paste = function () {
+				alert ('paste');
+			}
+
+			this.initialize = function() {
+        		return this;
+    		};
+
+			return this.initialize();
+		}
+	});
+
+})(jQuery);
