1. 내일까지 방과후 신청서 가져오기 2. 안내장-급식안내, 미세먼지, 정보대학 등 3. 건강조사 설문지 목요일까지 써서 가져오기(어른과 함께 쓰기) 4. 마스크 쓰기 차,사람,미세먼지 조심. 교통질서 지키기. 집으로 바로 가세 - 파일 1개 당 최대 1GB, 전체 1GB까지 첨부가 가능합니다.
var photoUrl = "/_cmm/editor/mPhoto/class/naesu-e/2019/G02020303/351505";
nhn.husky.SE2M_AttachQuickPhoto.prototype.makePopupURL = function() {
return photoUrl;
}
nhn.husky.SE2M_AttachQuickMovie.prototype.makePopupURL = function() {
return "/_cmm/editor/movie/class/naesu-e/2019/G02020303/351505";
}
nhn.husky.SE2M_AttachQuickFile.prototype.makePopupURL = function() {
return "/_cmm/editor/file/class/naesu-e/2019/G02020303/351505";
}
nhn.husky.SE2M_Configuration.SE2B_CSSLoader = {
sCSSBaseURI : "/www/seditor/css"
};
nhn.husky.SE2M_Configuration.SE_EditingAreaManager = {
sCSSBaseURI : "/www/seditor/css", // smart_editor2_inputarea.html 파일의 상대경로
sBlankPageURL : "/www/seditor/smart_editor2_inputarea.html",
sBlankPageURL_EmulateIE7 : "/www/seditor/smart_editor2_inputarea_ie8.html",
aAddtionalEmulateIE7 : [] // IE8 default 사용, IE9 ~ 선택적 사용
};
var oEditor;
var bUseModeChanger = true;
var bUseVerticalResizer = true;
var editingAreaManager;
function createEditor() {
$j("#smart_editor2").show();
oEditor = createSEditor2(jindo.$(elPlaceHolder), {
bUseToolbar : bUseToolbar,
bUseVerticalResizer : bUseVerticalResizer,
bUseModeChanger : bUseModeChanger,
//aAdditionalFontList : [["MS UI Gothic", "MS UI Gothic"], ["Comic Sans MS", "Comic Sans MS"],["TEST","TEST"]], // 추가 글꼴 목록
fOnBeforeUnload : function(){
//return "내용이 변경되었습니다.";
}
})
oEditor.run({
fnOnAppReady: function(){
for(var i=0;i;i++) {
if( oEditor.aPlugins[i].name == "SE_EditingAreaManager" ) {
editingAreaManager = oEditor.aPlugins[i];
}
}
}
});
}
$j(document).ready(function() {
var css = $j("");
css.attr({
rel: "stylesheet",
type: "text/css",
href: "/www/seditor/css/smart_editor2.css"
});
$j("head").append(css);
var agent = navigator.userAgent.toLowerCase();
var isSafari = false;
if (agent.indexOf("applewebkit") != -1 && agent.indexOf("chrome") == -1) {
isSafari = true;
}
if( !isSafari ) {
css.load(function() {
createEditor();
});
} else {
createEditor();
}
if( typeof fileButtonUse === "undefined" || !fileButtonUse ) {
var btn = $j('.tch-file');
if( btn ) {
btn.hide();
}
}
if( typeof photoButtonUse === "undefined" || !photoButtonUse ) {
var btn = $j('.husky_seditor_ui_photo_attach');
if( btn ) {
btn.hide();
}
}
if( typeof movieButtonUse === "undefined" || !movieButtonUse ) {
var btn = $j('.husky_seditor_ui_movie_attach');
if( btn ) {
btn.hide();
}
}
photoUrl = "/_cmm/editor/photo/class/naesu-e/2019/G02020303/351505";
$j(".se2_usm_tools").hide();
$j(".se2_conversion_mode").hide();
var oldFiles = [];
$j.each( oldFiles, function( key, value ) {
attachFiles(value, true);
});
var isMobile = navigator.userAgent.indexOf('Mobile') != -1;
var acceptExts = $j("input[type='file']").attr("accept");
if( isMobile ) {
var $file = $j("input[type='file']");
$file.removeAttr("accept");
$file.removeAttr("multiple");
}
fileUpload = new FileUpload("/files",$j("input[name='files']"),"#fileList",20,1073741824,1073741824,acceptExts);
$j("input[name='files']").change(function() {
if(isMobile) {
var fileName = $file[0].files[0].name;
var ext = fileName.substring(fileName.lastIndexOf("."));
if(acceptExts.indexOf(ext) == -1) {
alert("허용되지 않은 파일입니다.");
return false;
}
}
fileUpload.fileLoad($j(this)[0].files,function(data){});
return false;
});
$j(document).on("change","input[name='files']",function(e) {
fileUpload.fileLoad($j(this)[0].files,function(data){});
return false;
});
$j("#registBtn").click(function(e) {
if ( checkForm() ) {
if( typeof submitWebFilter == 'function' ) {
wf_btn = 'registBtn';
if(wf_flag == 'off'){
submitWebFilter("boardForm");
}else{
if( submitted ) {
alert( "전송중입니다." );
return false;
} else {
submitted = true;
}
fileUpload.submit();
}
} else {
if( submitted ) {
alert( "전송중입니다." );
return false;
} else {
submitted = true;
}
fileUpload.submit();
}
}
});
$j(function() {
$j("form input").keypress(function (e) {
if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) {
return false;
} else {
return true;
}
});
});
});
function isEditorContentsChanged() {
return editingAreaManager.getRawContents() != editingAreaManager.sCurrentRawContents;
}
function submitContents(t) {
getFiles();
oEditor.exec("UPDATE_CONTENTS_FIELD", []);
var $holder = $j("textarea[name='" + elPlaceHolder + "']");
var val = $holder.val();
if(val == " ") {
$holder.val("");
val = "";
if(t != "" ) {
alert(t + "를 입력해주세요" );
return false;
}
}
/*
val = val.replace(//g, "_E_VIDEO_");
val = val.replace(//g,'')
val = val.replace("_S_VIDEO_", "");
*/
$holder.val(val);
return true;
}
function countFiles() {
var count = 0;
var lis = $j("#usm-attachFiles ul").children();
for(var i=0; i; i++ ) {
if( !$j(lis[i]).hasClass("usm-ed-old") ) {
count++;
}
}
return count;
}
function attachFiles(data, old) {
if(countFiles() == 0 ) {
$j("#usm-attachFiles h4").show();
$j("#usm-attachFiles").css("padding", "5px");
}
var liTag = "- " + data.fileName + "
- " + humanFileSize(data.fileSize) + "usm-btn usm-sm\">
";
var li = $j(liTag);
$j("#usm-attachFiles ul").append(li);
$j(document).on("click",".ed_btn_delete",function(event){
var parent = $j(this).parent().parent().parent().parent();
if( parent.hasClass("usm-ed-old") ) {
if( parent.is(":visible")) {
parent.attr("id", "-"+parent.attr("id"));
parent.hide();
}
} else {
parent.remove();
}
if(countFiles() == 0 ) {
$j("#usm-attachFiles h4").hide();
$j("#usm-attachFiles").css("padding", "0");
}
event.preventDefault();
});
}
function getFiles() {
var list = $j("#usm-attachFiles ul").children();
var delFiles = [];
var newFiles = [];
$j.each(list, function() {
var id = $j(this).attr("id");
if( id.charAt(0) == '-' ) {
if( $j(this).hasClass("usm-ed-old") ) {
delFiles.push(id);
}
} else {
if( !$j(this).hasClass("usm-ed-old") ) {
newFiles.push(id);
}
}
})
var parent = $j("textarea[name='" + elPlaceHolder + "']").parent();
var delInput = $j("")
var newInput = $j("")
parent.append(delInput);
parent.append(newInput);
}
function attachEditorFiles(data) {
var item = $j("input[name='newEdtFiles']");
if( item.val() == "" ) {
item.val(data.fid);
} else {
item.val(item.val()+","+data.fid);
}
}
function getContents() {
oEditor.exec("UPDATE_CONTENTS_FIELD", []);
}
| 댓글 | |
---|
|