에디터 별 익스플로러 안내문 추가
This commit is contained in:
@ -439,7 +439,7 @@ function fileFilterError(file) {
|
||||
|
||||
function explorerFileFilterError(file) {
|
||||
alert("선택하신 '" + file + "' 파일은 전송할 수 없습니다.\n" +
|
||||
"익스플로러 10 이하의 환경에서는 gif, png, jpg 사진 파일만 \n전송할 수 있습니다.");
|
||||
"익스플로러 환경에서는 gif, png, jpg 사진 파일만 \n전송할 수 있습니다.");
|
||||
}
|
||||
|
||||
function imgComplete(img, imgSize, boxId) {
|
||||
@ -967,9 +967,9 @@ DoUpload.prototype = {
|
||||
file = files[i];
|
||||
|
||||
if (!file.type.match(fileTypeRe)) {
|
||||
// 엣지(ie 11)를 제외한 ie브라우저인지 체크
|
||||
// 엣지를 제외한 ie브라우저인지 체크
|
||||
var agent = navigator.userAgent.toLowerCase();
|
||||
if ( !(navigator.appName == 'Netscape' && navigator.userAgent.search('Trident') != -1) && (agent.indexOf("msie") != -1) ) {
|
||||
if (agent.indexOf('trident') != -1 || agent.indexOf("msie") != -1) {
|
||||
explorerFileFilterError(file.name);
|
||||
} else {
|
||||
FileFilterError(file.name);
|
||||
|
||||
@ -439,7 +439,7 @@ function fileFilterError(file) {
|
||||
|
||||
function explorerFileFilterError(file) {
|
||||
alert("선택하신 '" + file + "' 파일은 전송할 수 없습니다.\n" +
|
||||
"익스플로러 10 이하의 환경에서는 gif, png, jpg 사진 파일만 전송할 수 있습니다.");
|
||||
"익스플로러 환경에서는 gif, png, jpg 사진 파일만 \n전송할 수 있습니다.");
|
||||
}
|
||||
|
||||
function imgComplete(img, imgSize, boxId) {
|
||||
@ -967,9 +967,9 @@ DoUpload.prototype = {
|
||||
file = files[i];
|
||||
|
||||
if (!file.type.match(fileTypeRe)) {
|
||||
// 엣지(ie 11)를 제외한 ie브라우저인지 체크
|
||||
// 엣지를 제외한 ie브라우저인지 체크
|
||||
var agent = navigator.userAgent.toLowerCase();
|
||||
if ( !(navigator.appName == 'Netscape' && navigator.userAgent.search('Trident') != -1) && (agent.indexOf("msie") != -1) ) {
|
||||
if (agent.indexOf('trident') != -1 || agent.indexOf("msie") != -1) {
|
||||
explorerFileFilterError(file.name);
|
||||
} else {
|
||||
FileFilterError(file.name);
|
||||
|
||||
@ -69,10 +69,16 @@
|
||||
if ( !uploadUrl ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Handle images which are available in the dataTransfer.
|
||||
fileTools.addUploadWidget( editor, 'uploadimage', {
|
||||
supportedTypes: /image\/(jpeg|png|gif|bmp|webp)/,
|
||||
var supportedType = '';
|
||||
var agent = navigator.userAgent.toLowerCase();
|
||||
if (agent.indexOf('trident') != -1 || agent.indexOf("msie") != -1) {
|
||||
supportedType = '';
|
||||
} else {
|
||||
supportedType = /image\/(jpeg|png|gif|bmp|webp)/;
|
||||
}
|
||||
// Handle images which are available in the dataTransfer.
|
||||
fileTools.addUploadWidget( editor, 'uploadimage', {
|
||||
supportedTypes: supportedType,
|
||||
|
||||
uploadUrl: uploadUrl,
|
||||
fileDialog: fileDialog,
|
||||
@ -107,8 +113,14 @@
|
||||
|
||||
editor.on("fileUploadRequest", function( evt ) {
|
||||
// 이미지 업로드 시작 체크
|
||||
if(typeof(editor_chk_upload) != "undefined") {
|
||||
editor_chk_upload = false;
|
||||
var fileLoader = evt.data.fileLoader;
|
||||
if(fileLoader.file.type.match(/image\/(jpeg|png|gif|bmp|webp)/) == null){
|
||||
this.showNotification('익스플로러 환경에서는 jpg / gif / png 파일만 업로드 가능합니다.','warning');
|
||||
return false;
|
||||
}else {
|
||||
if(typeof(editor_chk_upload) != "undefined") {
|
||||
editor_chk_upload = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@ -124,7 +136,6 @@
|
||||
img.setAttribute( 'src', res.url );
|
||||
if(typeof(res.width) != 'undefined') img.setAttribute( 'width', res.width );
|
||||
if(typeof(res.height) != 'undefined') img.setAttribute( 'height', res.height );
|
||||
|
||||
editor.insertElement(img);
|
||||
|
||||
uploadType = ''; // 구분값 초기화
|
||||
|
||||
@ -85,8 +85,11 @@ jQuery(function ($) {
|
||||
data.context = $('<li/>').addClass("sort_list").appendTo(this.dreg_area_list);
|
||||
$.each(data.files, function (index, file) {
|
||||
if (!preload && !othis.filter.test(file.type)) {
|
||||
var agent = navigator.userAgent.toLowerCase();
|
||||
var msg = '';
|
||||
msg = (agent.indexOf('trident') != -1 || agent.indexOf("msie") != -1)? "익스플로러 환경에서는 gif, png, jpg 파일만 \n전송할 수 있습니다.":"이미지만 허용합니다.";
|
||||
data.context.remove();
|
||||
alert('이미지만 허용합니다.');
|
||||
alert(msg);
|
||||
return true;
|
||||
}
|
||||
var node = $('<div/>')
|
||||
|
||||
Reference in New Issue
Block a user