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

Bladeren bron

Fixed intermittently occurred draft contents remaining issue

pull/408/head
Wonju Jeon 2 jaren geleden
committed by Suwon Chae
bovenliggende
commit
f691b8ac72
2 gewijzigde bestanden met toevoegingen van 12 en 5 verwijderingen
  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 Bestand weergeven

@ -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 Bestand weergeven

@ -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');

Laden…
Annuleren
Opslaan