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