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

Kaynağa Gözat

Fixed intermittently occurred draft contents remaining issue

tags/v1.10.0
Wonju Jeon Suwon Chae 2 yıl önce
ebeveyn
işleme
f691b8ac72
2 değiştirilmiş dosya ile 12 ekleme ve 5 silme
  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 Dosyayı Görüntüle

@@ -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 Dosyayı Görüntüle

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


Yükleniyor…
İptal
Kaydet