THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

소스 검색

Fixed intermittently occurred draft contents remaining issue

pull/408/head
Wonju Jeon 2 년 전
committed by Suwon Chae
부모
커밋
f691b8ac72
2개의 변경된 파일12개의 추가작업 그리고 5개의 파일을 삭제
  1. +11
    -4
      public/javascripts/common/yobi.CommentForm.js
  2. +1
    -1
      public/javascripts/service/yobi.milestone.Write.js

+ 11
- 4
public/javascripts/common/yobi.CommentForm.js 파일 보기

@ -32,7 +32,7 @@ $(function(){
* Attach event handlers
*/
function _attachEvent(){
elements.commentForm.on("submit", onSubmitCommentForm);
elements.commentForm.submit(onSubmitCommentForm);
$(window).on("keydown", onKeydownWindow);
$(window).on("beforeunload", onBeforeUnloadWindow);
temprarySaveHandler(elements.textarea);
@ -43,7 +43,10 @@ $(function(){
*
* @returns {boolean}
*/
function onSubmitCommentForm(){
function onSubmitCommentForm(event){
event.preventDefault();
var that = this;
if(isCommentBodyEmpty()){
$yobi.notify(Messages("post.comment.empty"), 3000);
elements.textarea.focus();
@ -55,10 +58,14 @@ $(function(){
}
elements.commentForm.data("onsubmit", true);
NProgress.start();
removeCurrentPageTemprarySavedContent();
return true;
NProgress.start();
setTimeout(function () {
that.submit();
}, 100);
}
/**

+ 1
- 1
public/javascripts/service/yobi.milestone.Write.js 파일 보기

@ -37,7 +37,7 @@
* initialize element variables
*/
function _initElement(htOptions){
htElement.welForm = $("form.nm");
htElement.welForm = $("#milestone-form");
htElement.welDatePicker = $(htOptions.elDatePicker);
htElement.welInputDueDate = $(htOptions.elDueDate);
htElement.welInputTitle = $('#title');

불러오는 중...
취소
저장