메뉴 건너뛰기

modules/editor/tpl.js/uploader.js

Average Rating:
 0명 참여
Rate this page:
평점 한줄평 글쓴이 작성날짜



xe/modules/editor/tpl.js/uploader.js



function previewFiles(event, file_srl) {
 var $opt, $select, $preview, fileinfo, filename, match, html, $=jQuery;

 if(!file_srl) {
  $opt = $(event.target).parent().addBack().filter('select').find('>option:selected');
  if(!$opt.length) return;

  file_srl = $opt.attr('value');
 }

 if(!file_srl || !is_def(fileinfo=uploadedFiles[file_srl])) return;

 $preview = $('#'+fileinfo.previewAreaID).html(' ');
 if(!$preview.length) return;

 filename = fileinfo.download_url || '';
 match    = filename.match(/\.(?:(flv)|(swf)|(wmv|avi|mpe?g|as[fx]|mp3)|(jpe?g|png|gif))$/i);

 if(fileinfo.direct_download != 'Y' || !match) {
  html = '<img src="'+request_uri+'modules/editor/tpl/images/files.gif" border="0" width="100%" height="100%" />';
 } else if(match[1]) { // flash video file
  html = '<embed src="'+request_uri+'common/img/flvplayer.swf?autoStart=false&file='+uploaded_filename+'" width="100%" height="100%" type="application/x-shockwave-flash" />';
 } else if(match[2]) { // shockwave flash file
  html = '<embed src="'+request_uri+filename+'" width="100%" height="100%" type="application/x-shockwave-flash"  />';
 } else if(match[3]) { // movie file
  html = '<embed src="'+request_uri+filename+'" width="100%" height="100%" autostart="true" showcontrols="0" />';
 } else if(match[4]) { // image file
  html = '<img src="'+request_uri.replace("http://1sam.kr/","")+filename+'" border="0" width="100%" height="100%" />';
 }

 if(html) $preview.html(html);
}




위의 함수를 나중에 검토해야함.



<img src="'+request_uri.replace('http://'+document.domain+'/xe/',"")

제목 날짜
Star Rating 별점 위젯 업데이트 정보   2014.03.09
modules/editor/tpl.js/uploader.js  
Zeroclipboard 적용하기   file
    10
xe jQuery 최신버전 사용하기 CDN  
    10
http://www.bootstrapcdn.com/   file
태그 목록