Index: pro-bachkim-filespace/sourcecode/assets/js/filemanager/filemanager.js
===================================================================
--- pro-bachkim-filespace/sourcecode/assets/js/filemanager/filemanager.js	(revision 16)
+++ pro-bachkim-filespace/sourcecode/assets/js/filemanager/filemanager.js	(revision 17)
@@ -52,4 +52,5 @@
 		
 		var privateTree =  $('#treeview-container').violetTree({
+			container: $('#treeview-container'),
 			expandEasing: 'easeOutBounce', 
 			collapseEasing: 'easeOutBounce',
@@ -57,6 +58,19 @@
 			grid: privateGrid
 		});
-
-		$('#btnNewFolder').click (function(){
+		
+		/*var selectTree = $('#select-destination-tree').violetTree({
+			container: $('#select-destination-tree'),
+			expandEasing: 'easeOutBounce', 
+			collapseEasing: 'easeOutBounce',
+			homeDirNameDisplay: "ThÆ° má»¥c gá»c"
+		});*/
+		
+		$('#select-destination-tree').slimScroll({
+	        height: '250px',
+	        alwaysVisible: true,
+	        disableFadeOut: true
+	    });
+		
+		/*$('#btnNewFolder').click (function(){
 			var curDir = privateTree.getCurrentDir();
 			privateTree.createDir(curDir);
@@ -70,5 +84,5 @@
 		$('#btnCopy').click (function(){
 			privateTree.copy();
-		});
+		});*/
 
 		/**
Index: pro-bachkim-filespace/sourcecode/assets/js/jquery/jquery.slimscroll.min.js
===================================================================
--- pro-bachkim-filespace/sourcecode/assets/js/jquery/jquery.slimscroll.min.js	(revision 16)
+++ pro-bachkim-filespace/sourcecode/assets/js/jquery/jquery.slimscroll.min.js	(revision 17)
@@ -3,6 +3,14 @@
  * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
  *
- * Version: 1.2.0
+ * Version: 1.3.0
  *
  */
-(function(a){jQuery.fn.extend({slimScroll:function(b){var c={width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:0.4,alwaysVisible:false,disableFadeOut:false,railVisible:false,railColor:"#333",railOpacity:0.2,railDraggable:true,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:false,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"};var d=a.extend(c,b);this.each(function(){var w,r,k,p,z,s,o,j,l="<div></div>",t=30,q=false;var A=a(this);if(A.parent().hasClass(d.wrapperClass)){var h=A.scrollTop();u=A.parent().find("."+d.barClass);e=A.parent().find("."+d.railClass);B();if(a.isPlainObject(b)){if("height" in b&&b.height=="auto"){A.parent().css("height","auto");A.css("height","auto");var n=A.parent().parent().height();A.parent().css("height",n);A.css("height",n)}if("scrollTo" in b){h=parseInt(d.scrollTo)}else{if("scrollBy" in b){h+=parseInt(d.scrollBy)}else{if("destroy" in b){u.remove();e.remove();A.unwrap();return}}}v(h,false,true)}return}d.height=(d.height=="auto")?A.parent().height():d.height;var i=a(l).addClass(d.wrapperClass).css({position:"relative",overflow:"hidden",width:d.width,height:d.height});A.css({overflow:"hidden",width:d.width,height:d.height});var e=a(l).addClass(d.railClass).css({width:d.size,height:"100%",position:"absolute",top:0,display:(d.alwaysVisible&&d.railVisible)?"block":"none","border-radius":d.railBorderRadius,background:d.railColor,opacity:d.railOpacity,zIndex:90});var u=a(l).addClass(d.barClass).css({background:d.color,width:d.size,position:"absolute",top:0,opacity:d.opacity,display:d.alwaysVisible?"block":"none","border-radius":d.borderRadius,BorderRadius:d.borderRadius,MozBorderRadius:d.borderRadius,WebkitBorderRadius:d.borderRadius,zIndex:99});var f=(d.position=="right")?{right:d.distance}:{left:d.distance};e.css(f);u.css(f);A.wrap(i);A.parent().append(u);A.parent().append(e);if(d.railDraggable&&a.ui&&typeof(a.ui.draggable)=="function"){u.draggable({axis:"y",containment:"parent",start:function(){k=true},stop:function(){k=false;m()},drag:function(C){v(0,a(this).position().top,false)}})}e.hover(function(){g()},function(){m()});u.hover(function(){r=true},function(){r=false});A.hover(function(){w=true;g();m()},function(){w=false;m()});A.bind("touchstart",function(D,C){if(D.originalEvent.touches.length){z=D.originalEvent.touches[0].pageY}});A.bind("touchmove",function(D){D.originalEvent.preventDefault();if(D.originalEvent.touches.length){var C=(z-D.originalEvent.touches[0].pageY)/d.touchScrollStep;v(C,true)}});if(d.start==="bottom"){u.css({top:A.outerHeight()-u.outerHeight()});v(0,true)}else{if(d.start!=="top"){v(a(d.start).position().top,null,true);if(!d.alwaysVisible){u.hide()}}}x();B();function y(D){if(!w){return}var D=D||window.event;var E=0;if(D.wheelDelta){E=-D.wheelDelta/120}if(D.detail){E=D.detail/3}var C=D.target||D.srcTarget||D.srcElement;if(a(C).closest("."+d.wrapperClass).is(A.parent())){v(E,true)}if(D.preventDefault&&!q){D.preventDefault()}if(!q){D.returnValue=false}}function v(H,E,C){var G=H;var F=A.outerHeight()-u.outerHeight();if(E){G=parseInt(u.css("top"))+H*parseInt(d.wheelStep)/100*u.outerHeight();G=Math.min(Math.max(G,0),F);G=(H>0)?Math.ceil(G):Math.floor(G);u.css({top:G+"px"})}o=parseInt(u.css("top"))/(A.outerHeight()-u.outerHeight());G=o*(A[0].scrollHeight-A.outerHeight());if(C){G=H;var D=G/A[0].scrollHeight*A.outerHeight();D=Math.min(Math.max(D,0),F);u.css({top:D+"px"})}A.scrollTop(G);A.trigger("slimscrolling",~~G);g();m()}function x(){if(window.addEventListener){this.addEventListener("DOMMouseScroll",y,false);this.addEventListener("mousewheel",y,false)}else{document.attachEvent("onmousewheel",y)}}function B(){s=Math.max((A.outerHeight()/A[0].scrollHeight)*A.outerHeight(),t);u.css({height:s+"px"});var C=s==A.outerHeight()?"none":"block";u.css({display:C})}function g(){B();clearTimeout(p);if(o==~~o){q=d.allowPageScroll;if(j!=o){var C=(~~o==0)?"top":"bottom";A.trigger("slimscroll",C)}}else{q=false}j=o;if(s>=A.outerHeight()){q=true;return}u.stop(true,true).fadeIn("fast");if(d.railVisible){e.stop(true,true).fadeIn("fast")}}function m(){if(!d.alwaysVisible){p=setTimeout(function(){if(!(d.disableFadeOut&&w)&&!r&&!k){u.fadeOut("slow");e.fadeOut("slow")}},1000)}}});return this}});jQuery.fn.extend({slimscroll:jQuery.fn.slimScroll})})(jQuery);
+(function(f){jQuery.fn.extend({slimScroll:function(h){var a=f.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:0.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:0.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},h);this.each(function(){function r(d){if(s){d=d||
+window.event;var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);f(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&m(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}}function m(d,f,h){k=!1;var e=d,g=b.outerHeight()-c.outerHeight();f&&(e=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),e=Math.min(Math.max(e,0),g),e=0<d?Math.ceil(e):Math.floor(e),c.css({top:e+"px"}));l=parseInt(c.css("top"))/(b.outerHeight()-c.outerHeight());
+e=l*(b[0].scrollHeight-b.outerHeight());h&&(e=d,d=e/b[0].scrollHeight*b.outerHeight(),d=Math.min(Math.max(d,0),g),c.css({top:d+"px"}));b.scrollTop(e);b.trigger("slimscrolling",~~e);v();p()}function C(){window.addEventListener?(this.addEventListener("DOMMouseScroll",r,!1),this.addEventListener("mousewheel",r,!1),this.addEventListener("MozMousePixelScroll",r,!1)):document.attachEvent("onmousewheel",r)}function w(){u=Math.max(b.outerHeight()/b[0].scrollHeight*b.outerHeight(),D);c.css({height:u+"px"});
+var a=u==b.outerHeight()?"none":"block";c.css({display:a})}function v(){w();clearTimeout(A);l==~~l?(k=a.allowPageScroll,B!=l&&b.trigger("slimscroll",0==~~l?"top":"bottom")):k=!1;B=l;u>=b.outerHeight()?k=!0:(c.stop(!0,!0).fadeIn("fast"),a.railVisible&&g.stop(!0,!0).fadeIn("fast"))}function p(){a.alwaysVisible||(A=setTimeout(function(){a.disableFadeOut&&s||(x||y)||(c.fadeOut("slow"),g.fadeOut("slow"))},1E3))}var s,x,y,A,z,u,l,B,D=30,k=!1,b=f(this);if(b.parent().hasClass(a.wrapperClass)){var n=b.scrollTop(),
+c=b.parent().find("."+a.barClass),g=b.parent().find("."+a.railClass);w();if(f.isPlainObject(h)){if("height"in h&&"auto"==h.height){b.parent().css("height","auto");b.css("height","auto");var q=b.parent().parent().height();b.parent().css("height",q);b.css("height",q)}if("scrollTo"in h)n=parseInt(a.scrollTo);else if("scrollBy"in h)n+=parseInt(a.scrollBy);else if("destroy"in h){c.remove();g.remove();b.unwrap();return}m(n,!1,!0)}}else{a.height="auto"==a.height?b.parent().height():a.height;n=f("<div></div>").addClass(a.wrapperClass).css({position:"relative",
+overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",width:a.width,height:a.height});var g=f("<div></div>").addClass(a.railClass).css({width:a.size,height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=f("<div></div>").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible?
+"block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,WebkitBorderRadius:a.borderRadius,zIndex:99}),q="right"==a.position?{right:a.distance}:{left:a.distance};g.css(q);c.css(q);b.wrap(n);b.parent().append(c);b.parent().append(g);a.railDraggable&&c.bind("mousedown",function(a){var b=f(document);y=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);m(0,c.position().top,!1)});
+b.bind("mouseup.slimscroll",function(a){y=!1;p();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",function(a){a.stopPropagation();a.preventDefault();return!1});g.hover(function(){v()},function(){p()});c.hover(function(){x=!0},function(){x=!1});b.hover(function(){s=!0;v();p()},function(){s=!1;p()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(z=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&&
+(m((z-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),z=b.originalEvent.touches[0].pageY)});w();"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}),m(0,!0)):"top"!==a.start&&(m(f(a.start).position().top,null,!0),a.alwaysVisible||c.hide());C()}});return this}});jQuery.fn.extend({slimscroll:jQuery.fn.slimScroll})})(jQuery);
Index: pro-bachkim-filespace/sourcecode/assets/js/vsgrid.js
===================================================================
--- pro-bachkim-filespace/sourcecode/assets/js/vsgrid.js	(revision 16)
+++ pro-bachkim-filespace/sourcecode/assets/js/vsgrid.js	(revision 17)
@@ -55,8 +55,6 @@
 							break;
 						case 'copy':
-							showCopyModal();
-							break;
 						case 'cut':
-							showMoveModal();
+							showCopyModal(currentObj, action);
 							break;
 						default:
@@ -91,12 +89,51 @@
 			}
 			
-			var showCopyModal = function () {
+			var showCopyModal = function (obj, action) {
+				var modalTitle = action == 'copy' ? 'Sao chÃ©p ' + (obj.type == 'directory'?'thÆ° má»¥c':'file') + ' [' + obj.name + ']':'Di chuyá»n ' + (obj.type == 'directory'?'thÆ° má»¥c':'file') + ' [' + obj.name + ']'
+				var submitTitle = action == 'copy' ? 'Sao chÃ©p' : 'Di chuyá»n';
+				var submitIcon = action == 'copy' ? '<i class="icon-copy"></i>' : '<i class="icon-cut"></i>';
+						
+				//btn-primary
 				$(o.copymodal).modal('show');
-				/*$(o.copymodal).find('INPUT#txtSelectedObj').val(currentObj.name);
-				$(o.copymodal).find('.modal-header').text('Chia sáº» ' + (currentObj.type == 'directory'?'thÆ° má»¥c':'file') + ' [' + currentObj.name + ']');*/
-			}
-			
-			var showMoveModal = function () {
-				$(o.movemodal).modal('show');
+				$(o.copymodal).find('INPUT#txtSelectedObj').val(obj.name);
+				$(o.copymodal).find('.modal-header').text(modalTitle);
+				$(o.copymodal).find('.btn-primary').empty();
+				$(o.copymodal).find('.btn-primary').append(submitIcon + "\n" + submitTitle);
+				
+				var selectTree = $(o.copymodal).find('#select-destination-tree').violetTree({
+					container: $('#select-destination-tree'),
+					expandEasing: 'easeOutBounce', 
+					collapseEasing: 'easeOutBounce',
+					homeDirNameDisplay: "ThÆ° má»¥c gá»c",
+					contextmenuON: false
+				});
+				
+				$(o.copymodal).find('.btn-primary').button().click(function() {excuteCopy(obj, selectTree, action)})
+				
+				$(o.copymodal).on('hide.bs.modal', function () {
+					$(o.copymodal).find('.btn-primary').unbind('click');
+				});
+			}
+			
+			var excuteCopy = function (obj, tree, action) {
+				var destObj = tree.getSelectedObj();
+				//alert(action + ' ' + obj.type + ' ' + obj.name + ' to ' + destObj.type + ' ' + destObj.name);
+				
+				//sendCommand
+				var postdata = {sourceid:obj.id,
+						sourcetype:obj.type,
+						destid: destObj.id,
+						desttype: destObj.type,
+						flag:action}
+				
+				sendCommand({
+					script:'ajax/privatecontent/copy',
+					postdata:postdata,
+					callbackSuccess: function (parsedData) {
+						if (parsedData.RESULT == true) {
+							//please add code here
+						}else return false;
+					}
+				});
 			}
 
@@ -117,5 +154,4 @@
 				currentObj.id = $(i).attr('rel').substring(3);
 				currentObj.type = $(i).find('>div>div').hasClass('icon-directory') ? 'directory':'file';
-				console.log(currentObj.type);
 			}
 
@@ -229,9 +265,9 @@
 			}
 			
-			this.showModal = function (act, obj) {
+			this.showModal = function (obj, act) {
 				switch( act ) {
 					case 'copy':
-						break;
-					case 'move':
+					case 'cut':
+						showCopyModal(obj, act);
 						break;
 					case 'share':
Index: pro-bachkim-filespace/sourcecode/assets/js/vstree.js
===================================================================
--- pro-bachkim-filespace/sourcecode/assets/js/vstree.js	(revision 16)
+++ pro-bachkim-filespace/sourcecode/assets/js/vstree.js	(revision 17)
@@ -8,5 +8,5 @@
 			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.container == undefined ) o.container = null;
 			if( o.dirIDprefix == undefined ) o.dirIDprefix = 'vsdir_';
 
@@ -18,6 +18,8 @@
 			if( o.directoryTreeData == undefined ) o.directoryTreeData = null;
 			if( o.grid == undefined ) o.grid = null;
+			if( o.contextmenuON == undefined ) o.contextmenuON = true;
 			
 			var currentObj = {};
+			if ( currentObj.type == undefined ) currentObj.type = 'directory';
 			
 			// PRIVATE methods
@@ -49,4 +51,6 @@
 
 			var renderTree = function  (parseData) {
+				$(o.container).find ('.vstree').remove();
+				
 				o.directoryTreeData = parseData;				
 				var directoryData = parseData.DIRECTORIES;
@@ -56,5 +60,5 @@
 					name:o.homeDirNameDisplay,
 				});
-
+				
 				selectDir($(homeNode).find('> A'));
 				if (directoryData != null) {
@@ -63,5 +67,5 @@
 							id: directoryData[i].id,
 							name: directoryData[i].name,
-							curentNode: $('#' + o.dirIDprefix + directoryData[i].parentID).find('> A'),
+							currentNode: $(o.container).find('#' + o.dirIDprefix + directoryData[i].parentID).find('> A'),
 							hidden: (directoryData[i].parentID > 0) ? true : false
 						})
@@ -75,5 +79,5 @@
 				if( d.id == undefined ) d.id = null;
 				if( d.name == undefined ) d.name = null;
-				if( d.curentNode == undefined ) d.curentNode = null;
+				if( d.currentNode == undefined ) d.currentNode = null;
 				if( d.hidden == undefined ) d.hidden = true;
 				if( d.clickEvent == undefined ) d.clickEvent = openDir;
@@ -85,10 +89,10 @@
 					disabledItemsList = ['cut','delete'];
 				
-				if (d.curentNode != null) {
+				if (d.currentNode != 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);
+					$(d.currentNode).parent().append(strHTML);
 					if (d.hidden == true) 
-						$('#' + o.dirIDprefix + d.id).parent().css('display','none');
+						$(o.container).find('#' + o.dirIDprefix + d.id).parent().css('display','none');
 					
 				}else if (d.id == 0){
@@ -103,5 +107,5 @@
 					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);
+					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);
 					sendtoGrid();
@@ -109,27 +113,31 @@
 				
 				//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',
-					disabledItems: disabledItemsList
-				}, function(action, el, pos) {
-					selectDir(el);
-					switch(action) {
-						case 'rename':
-							rename(el);
-							break;
-						case 'share':
-							o.grid.showModal(action, currentObj);
-							break;
-						default:
-							break;
-					}
-				});
+				$(o.container).find('#' + o.dirIDprefix + d.id).find('a').bind("click", function(e){d.clickEvent(this);return false;});
+				
+				if (o.contextmenuON) {
+					$(o.container).find('#' + o.dirIDprefix + d.id).find('a').contextMenu({
+						menu: 'treeMenu',
+						disabledItems: disabledItemsList
+					}, function(action, el, pos) {
+						selectDir(el);
+						switch(action) {
+							case 'rename':
+								rename(el);
+								break;
+							case 'share':
+							case 'copy':
+							case 'cut':
+								o.grid.showModal(currentObj, action);
+								break;
+							default:
+								break;
+						}
+					});
+				}
 				
 				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);
+					$(o.container).find('#' + o.dirIDprefix + d.id).find('a').bind(d.customEvent.eventName, function(e){d.customEvent.eventTrigger(this)});
+
+				return $(o.container).find('#' + o.dirIDprefix + d.id);
 			}
 			//END - Create a node of Tree
@@ -178,4 +186,6 @@
 
 			var sendtoGrid = function () {
+				if (o.grid == null) return false;
+				
 				o.grid.getData({
 								directoryTreeData: o.directoryTreeData,
@@ -327,4 +337,8 @@
         		return this;
     		};
+    		
+    		this.getSelectedObj = function () {
+    			return currentObj;
+    		}
 
 			return this.initialize();
