Only show request for comments button after a delay

This commit is contained in:
Maximilian Grundke
2016-04-30 14:25:47 +02:00
parent ee164b9e68
commit 651609b673
2 changed files with 9 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ $(function() {
var THEME = 'ace/theme/textmate';
var REMEMBER_TAB = false;
var AUTOSAVE_INTERVAL = 15 * 1000;
var REQUEST_FOR_COMMENTS_DELAY = 5 * 60 * 1000;
var NONE = 0;
var WEBSOCKET = 1;
var SERVER_SEND_EVENT = 2;
@@ -477,11 +478,17 @@ $(function() {
};
var initializeRequestForComments = function () {
$('#requestCommentsButton').on('click', function() {
var button = $('#requestCommentsButton');
button.hide();
button.on('click', function() {
$('#comment-modal').modal('show');
});
$('#askForCommentsButton').on('click', requestComments);
setTimeout(function() {
button.fadeIn();
}, REQUEST_FOR_COMMENTS_DELAY);
};
var isActiveFileBinary = function() {