Index: pro-violet-viettel/www/deploy/20150304/assets/css/space/style2.css
===================================================================
--- pro-violet-viettel/www/deploy/20150304/assets/css/space/style2.css	(revision 909)
+++ pro-violet-viettel/www/deploy/20150304/assets/css/space/style2.css	(revision 910)
@@ -254,6 +254,7 @@
 
 
-
-
+.bootbox-body DIV.error-message {
+	color: #F36969;
+}
 
 /* --------------------------------Fix something from .css ---------------------------*/
Index: pro-violet-viettel/www/deploy/20150304/assets/js/manager.js
===================================================================
--- pro-violet-viettel/www/deploy/20150304/assets/js/manager.js	(revision 909)
+++ pro-violet-viettel/www/deploy/20150304/assets/js/manager.js	(revision 910)
@@ -1,3 +1,3 @@
-if (jQuery) 
+if (jQuery)
     (function ($) {
         $
@@ -412,13 +412,13 @@
                                     uploadInit();
 
-                                } 
+                                }
 
                                 var btnDownloadClick = function () {
                                     var items = o.oGrid.getHighLightItem();
-                                   
+
 
                                     for (var i = 0; i < items.length; i++) {
                                         if (items[i].type == 'directory') {
-                                            
+
                                             items[i] = self.getAllDirChilds(items[i]);
                                         }
@@ -551,9 +551,23 @@
                                         },
                                         callback: function (result) {
-                                            if (result === null) {
-                                            } else {
-                                                createFolder(treeCurrentNode,
-                                                        result);
+
+                                        	var folderName = result === null ? null:result.trim();
+                                        	var errMessage = '';
+
+                                        	if (folderName === null) return true;
+
+                                            if (folderName === '') {
+                                            	errMessage = 'HÃ£y nháº­p tÃªn thÆ° má»¥c cáº§n táº¡o!';
                                             }
+
+                                            if (errMessage !== '') {
+                                            	$(this.message).parent().find('.error-message').remove();
+                                            	var error = $('<div></div>',{'class':'error-message', text:errMessage}).insertBefore(this.message);
+                                            	$(this.message).find('input').focus();
+                                            	return false;
+
+                                            }
+
+                                            createFolder(treeCurrentNode,folderName);
                                         }
                                     };
@@ -583,6 +597,5 @@
                                         },
                                         onEscape: function () {
-                                            uploadDone(self
-                                                    .getTreeCurrentNode());
+                                            uploadDone(self.getTreeCurrentNode());
                                         }
                                     };
@@ -610,14 +623,14 @@
                                 var previewFile = function (node) {
                                     var content = "";
-                                  
+
                                     $ext = node.fileurl.split('.').pop();
                                     $ext = $ext.toLowerCase();
                                     if ($.inArray($ext, ["jpg", "jpeg", "png","gif","tiff","dvg","bmp"]) >= 0) {
-                                       
+
                                         content = "<img style='width:100%' src='"
                                                 + node.fileurl
                                                 + "' /><br />"
                                                 + node.name;
-                                        bootbox.alert(content);
+                                        bootbox.alert({message:content, className:'preview'});
                                         return false;
                                     }
@@ -639,5 +652,4 @@
                                                             textStatus,
                                                             errorThrown) {
-
                                                     }
                                                 });
@@ -716,41 +728,16 @@
                                                             var tpl = $('<li class="working"><input type="text" value="0" data-width="48" data-height="48"'
                                                                     + ' data-fgColor="#0788a5" data-readOnly="1" data-bgColor="#3e4043" /><p></p><span></span></li>');
-                                                            tpl
-                                                                    .find('p')
-                                                                    .text(
-                                                                            data.files[0].name)
-                                                                    .append(
-                                                                            '<i>'
-                                                                            + formatFileSize(data.files[0].size)
-                                                                            + '</i>');
-                                                            data.context = tpl
-                                                                    .appendTo(ul);
-                                                            tpl.find('input')
-                                                                    .knob();
-                                                            tpl
-                                                                    .find(
-                                                                            'span')
-                                                                    .click(
-                                                                            function () {
-
-                                                                                if (tpl
-                                                                                        .hasClass('working')) {
-                                                                                    jqXHR
-                                                                                            .abort();
-                                                                                }
-
-                                                                                tpl
-                                                                                        .fadeOut(function () {
-                                                                                            tpl
-                                                                                                    .remove();
-                                                                                        });
-
+                                                            tpl.find('p').text(data.files[0].name).append('<i>'+ formatFileSize(data.files[0].size)+ '</i>');
+                                                            data.context = tpl.appendTo(ul);
+                                                            tpl.find('input').knob();
+                                                            tpl.find('span').click(
+	                                                                            function () {
+	                                                                                if (tpl.hasClass('working')) {jqXHR.abort();
+	                                                                             }
+	                                                                             tpl.fadeOut(function () {tpl.remove();});
                                                                             });
-
-                                                            var jqXHR = data
-                                                                    .submit();
+                                                            var jqXHR = data.submit();
                                                         },
-                                                        progress: function (e,
-                                                                data) {
+                                                        progress: function (e, data) {
 
                                                             // Calculate the
@@ -758,9 +745,5 @@
                                                             // percentage of the
                                                             // upload
-                                                            var progress = parseInt(
-                                                                    data.loaded
-                                                                    / data.total
-                                                                    * 100,
-                                                                    10);
+                                                            var progress = parseInt(data.loaded / data.total * 100, 10);
 
                                                             // Update the hidden
@@ -771,15 +754,7 @@
                                                             // plugin knows to
                                                             // update the dial
-                                                            data.context
-                                                                    .find(
-                                                                            'input')
-                                                                    .val(
-                                                                            progress)
-                                                                    .change();
-
+                                                            data.context.find('input').val(progress).change();
                                                             if (progress == 100) {
-                                                                data.context
-                                                                        .removeClass('working');
-
+                                                                data.context.removeClass('working');
                                                             }
                                                         },
@@ -787,9 +762,7 @@
                                                             // Something has
                                                             // gone wrong!
-                                                            data.context
-                                                                    .addClass('error');
+                                                            data.context.addClass('error');
                                                         },
                                                         done: function (e, data) {
-
                                                             var newFileData = data.result;
                                                             newFileData = $.parseJSON(data.result);
@@ -797,7 +770,6 @@
                                                                 for (var i = 0; i < $(newFileData.FILES).length; i++) {
                                                                     var file = newFileData.FILES[i];
-                                                                   
+
                                                                     var node = {
-                                                                       
                                                                         thumbnail: o.filedomain+"/"+file.thumbnail,
                                                                         id: file.id,
@@ -814,5 +786,4 @@
                                                                 for (var i = 0; i < $(newFileData.DIRECTORIES).length; i++) {
                                                                     var file = newFileData.DIRECTORIES[i];
-                                                        
                                                                     var node = {
                                                                         id: file.id,
@@ -1005,5 +976,5 @@
                                                 },
                                                 callback: function (result) {
-                                                	console.log(result);
+                                                	console.log(items);
                                                 }
                                         }
