Changeset 807


Ignore:
Timestamp:
Mar 20, 2015 10:56:47 AM (10 years ago)
Author:
quyenla
Message:

preview

Location:
pro-violet-viettel/www/deploy/20150304
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/www/deploy/20150304/application/modules/ajax/controllers/preview.php

    r803 r807  
    1313        }
    1414       
    15         public function getPreview () {
     15        public function getFilePreview () {
    1616            $fileId =  $this->uri->segment(4);
    1717            $data = $this->vservices->getPreview($fileId);
     
    2727            }
    2828        }
     29        public function getVideoPreview () {
     30            $data=$this->input->post();
     31           
     32            $this->load->view('preview/video', $data);
     33           
     34        }
    2935
    3036}
  • pro-violet-viettel/www/deploy/20150304/assets/js/manager.js

    r806 r807  
    462462                    if($.inArray( $ext, [ "flv", "mp4","avi"])>=0)
    463463                   {
    464                         content='<a style="display:none" id="preview'+node.id+'" href="'+node.fileurl+'" class="html5lightbox" data-width="480" data-height="320" title="'+node.name+'">'+node.fileurl+'</a>';
    465                         $("#video_preview").after(content);
    466                         $(".html5lightbox").html5lightbox();       
    467                         $("#preview"+node.id).click();
     464                        $.ajax({
     465                            url: o.host+"preview/getVideoPreview/",
     466                            type: "POST",
     467                            data: {fileurl:node.fileurl,name:node.name},
     468                            success: function(data, textStatus, jqXHR)
     469                            {
     470                                bootbox.alert(data);
     471                            }
     472                            ,
     473                            error: function(jqXHR, textStatus, errorThrown)
     474                            {
     475
     476                            }
     477                        });
    468478                    }
    469479                   
     
    488498                         
    489499                            $.ajax({
    490                             url: o.host+"preview/getPreview/"+node.id,
     500                            url: o.host+"preview/getFilePreview/"+node.id,
    491501                            type: "POST",
    492502                            data: {},
Note: See TracChangeset for help on using the changeset viewer.