Only show request for comments button after a delay
This commit is contained in:
@@ -13,6 +13,7 @@ $(function() {
|
|||||||
var THEME = 'ace/theme/textmate';
|
var THEME = 'ace/theme/textmate';
|
||||||
var REMEMBER_TAB = false;
|
var REMEMBER_TAB = false;
|
||||||
var AUTOSAVE_INTERVAL = 15 * 1000;
|
var AUTOSAVE_INTERVAL = 15 * 1000;
|
||||||
|
var REQUEST_FOR_COMMENTS_DELAY = 5 * 60 * 1000;
|
||||||
var NONE = 0;
|
var NONE = 0;
|
||||||
var WEBSOCKET = 1;
|
var WEBSOCKET = 1;
|
||||||
var SERVER_SEND_EVENT = 2;
|
var SERVER_SEND_EVENT = 2;
|
||||||
@@ -477,11 +478,17 @@ $(function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var initializeRequestForComments = function () {
|
var initializeRequestForComments = function () {
|
||||||
$('#requestCommentsButton').on('click', function() {
|
var button = $('#requestCommentsButton');
|
||||||
|
button.hide();
|
||||||
|
button.on('click', function() {
|
||||||
$('#comment-modal').modal('show');
|
$('#comment-modal').modal('show');
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#askForCommentsButton').on('click', requestComments);
|
$('#askForCommentsButton').on('click', requestComments);
|
||||||
|
|
||||||
|
setTimeout(function() {
|
||||||
|
button.fadeIn();
|
||||||
|
}, REQUEST_FOR_COMMENTS_DELAY);
|
||||||
};
|
};
|
||||||
|
|
||||||
var isActiveFileBinary = function() {
|
var isActiveFileBinary = function() {
|
||||||
|
@@ -14,6 +14,6 @@
|
|||||||
.editor-content.hidden data-file-id=file.ancestor_id = file.content
|
.editor-content.hidden data-file-id=file.ancestor_id = file.content
|
||||||
.editor data-file-id=file.ancestor_id data-indent-size=file.file_type.indent_size data-mode=file.file_type.editor_mode data-read-only=file.read_only data-id=file.id
|
.editor data-file-id=file.ancestor_id data-indent-size=file.file_type.indent_size data-mode=file.file_type.editor_mode data-read-only=file.read_only data-id=file.id
|
||||||
|
|
||||||
button.btn class='btn-primary' id='requestCommentsButton' type='button'
|
button.btn.btn-primary id='requestCommentsButton' type='button'
|
||||||
i.fa.fa-comment-o
|
i.fa.fa-comment-o
|
||||||
= t('exercises.editor.requestComments')
|
= t('exercises.editor.requestComments')
|
Reference in New Issue
Block a user