Index: /pro-violet-viettel/www/deploy/20150304/application/libraries/vservices.php
===================================================================
--- /pro-violet-viettel/www/deploy/20150304/application/libraries/vservices.php	(revision 787)
+++ /pro-violet-viettel/www/deploy/20150304/application/libraries/vservices.php	(revision 788)
@@ -37,9 +37,9 @@
 		return $this->_curlObj->execute();
 	}
-        public function getPreview () {
+        public function getPreview ($fileId) {
 		$this->_curlObj->create($this->_apiUrl. 'space/preview/');
 		$this->_curlObj->option(CURLOPT_BUFFERSIZE, 10);
 		$this->_curlObj->options(array(CURLOPT_BUFFERSIZE => 10));
-                $post =  $this->_userId ? array('fileid' => 575) : array();
+                $post =  $this->_userId ? array('fileId' => $fileId,'userId' => $this->_userId) : array();
 		$this->_curlObj->post($post);
 		return $this->_curlObj->execute();
Index: /pro-violet-viettel/www/deploy/20150304/application/views/layout/footer.php
===================================================================
--- /pro-violet-viettel/www/deploy/20150304/application/views/layout/footer.php	(revision 787)
+++ /pro-violet-viettel/www/deploy/20150304/application/views/layout/footer.php	(revision 788)
@@ -24,4 +24,5 @@
 <script src="<?php echo $base_url;?>assets/js/grid.js"></script>
 <script src="<?php echo $base_url;?>assets/js/manager.js"></script>
+<script src="<?php echo base_url();?>assets/js/jquery.slides.js" ></script> 
 <script type="text/javascript">
 if (jQuery) {
Index: /pro-violet-viettel/www/deploy/20150304/application/views/layout/header.php
===================================================================
--- /pro-violet-viettel/www/deploy/20150304/application/views/layout/header.php	(revision 787)
+++ /pro-violet-viettel/www/deploy/20150304/application/views/layout/header.php	(revision 788)
@@ -11,4 +11,5 @@
 <link rel="stylesheet" href="<?php echo base_url();?>assets/css/style2.css" />
 <script src="<?php echo base_url();?>assets/js/jwplayer.js" ></script> 
+
                 <script>jwplayer.key="0Wkdd5AMtD70O47y3hnZXqCG9CjnX1csi7+foQ==";</script>
 	</head>
Index: /pro-violet-viettel/www/deploy/20150304/assets/js/manager.js
===================================================================
--- /pro-violet-viettel/www/deploy/20150304/assets/js/manager.js	(revision 787)
+++ /pro-violet-viettel/www/deploy/20150304/assets/js/manager.js	(revision 788)
@@ -448,9 +448,8 @@
                         items = [item];
                     }
-                    previewFile(items[0]);
+                    previewFile(items[0]); 
                 }
                 
                 var previewFile = function(node) {
-                    alert ("ja");
                     var content="";
                     $ext=node.fileurl.split('.').pop();
@@ -489,9 +488,23 @@
                         bootbox.alert(content); 
                     }
-                    if($.inArray( $ext, [ "xls","ppt","doc","docs","pdf","txt"])>=0)
+                    if($.inArray( $ext, ["ppt","xls","doc","pdf","docx","pptx","xlsx"])>=0)
 		   {
-                        content='<iframe src="http://docs.google.com/gview?url='+node.fileurl+'&embedded=true" style="width:100%; height:400px;" frameborder="0"></iframe>'+node.name;
                         
-                        bootbox.alert(content); 
+                            $.ajax({
+                            url: o.host+"preview/getPreview",
+                            type: "POST",
+                            data: {'fileId':node.id},
+                            success: function(data, textStatus, jqXHR)
+                            {
+                                content='<div id="preview">'+data+'</div>';
+                        
+                                bootbox.alert(content);
+                            }
+                            ,
+                            error: function(jqXHR, textStatus, errorThrown)
+                            {
+
+                            }
+                        });
                     }
 
