Changeset - 1ecfb8ecc634
[Not reviewed]
default
0 1 0
Mads Kiilerich - 10 years ago 2016-01-20 01:47:11
madski@unity3d.com
comments: drop delayed activation of new comments

It is unclear what it fixed and we have tested this and haven't heard any complaints.
1 file changed with 4 insertions and 5 deletions:
0 comments (0 inline, 0 general)
kallithea/public/js/base.js
Show inline comments
 
@@ -724,30 +724,29 @@ function _comment_div_append_form($comme
 
                comment_div_state($comment_div, f_path, line_no, false);
 
                location.reload(true);
 
            }
 
        };
 
        ajaxPOST(AJAX_COMMENT_URL, postData, success);
 
    });
 

	
 
    // create event for hide button
 
    $form.find('.hide-inline-form').click(function(e) {
 
        comment_div_state($comment_div, f_path, line_no);
 
    });
 

	
 
    setTimeout(function() {
 
        // callbacks
 
        tooltip_activate();
 
        MentionsAutoComplete($textarea, $mentions_container, _USERS_AC_DATA);
 
    tooltip_activate();
 
    MentionsAutoComplete($textarea, $mentions_container, _USERS_AC_DATA);
 
    if (f_path) {
 
        $textarea.focus();
 
    }, 10);
 
    }
 
}
 

	
 

	
 
function deleteComment(comment_id) {
 
    var url = AJAX_COMMENT_DELETE_URL.replace('__COMMENT_ID__', comment_id);
 
    var postData = {'_method': 'delete'};
 
    var success = function(o) {
 
        $('#comment-'+comment_id).remove();
 
        // Ignore that this might leave a stray Add button (or have a pending form with another comment) ...
 
    }
 
    ajaxPOST(url, postData, success);
 
}
0 comments (0 inline, 0 general)