Added tooltip to request-comments button.

Added locale for all new texts.
This commit is contained in:
Alexander Kastius
2016-09-01 16:27:40 +02:00
parent 0ca1cbaa14
commit e42330cf1b
7 changed files with 28 additions and 41 deletions

View File

@ -14,6 +14,8 @@ var CodeOceanEditor = {
REMEMBER_TAB: false,
AUTOSAVE_INTERVAL: 15 * 1000,
REQUEST_FOR_COMMENTS_DELAY: 3 * 60 * 1000,
REQUEST_TOOLTIP_TIME: 5000,
NONE: 0,
WEBSOCKET: 1,
SERVER_SEND_EVENT: 2,
@ -328,7 +330,7 @@ var CodeOceanEditor = {
initializeRequestForComments: function () {
var button = $('#requestComments');
button.hide();
button.prop('disabled', true);
button.on('click', function () {
$('#comment-modal').modal('show');
});
@ -336,8 +338,12 @@ var CodeOceanEditor = {
$('#askForCommentsButton').on('click', this.requestComments);
setTimeout(function () {
button.fadeIn();
}, this.REQUEST_FOR_COMMENTS_DELAY);
button.prop('disabled', false);
button.tooltip('show');
setTimeout(function() {
button.tooltip('hide');
}, this.REQUEST_TOOLTIP_TIME);
}.bind(this), this.REQUEST_FOR_COMMENTS_DELAY);
},
isActiveFileRenderable: function () {

View File

@ -59,8 +59,8 @@ CodeOceanEditorFlowr = {
this.createSubmission($('.requestCommentsButton'), null, createRequestForComments.bind(this));
$('#comment-modal').modal('hide');
var button = $('.requestCommentsButton');
button.fadeOut();
var button = $('#requestComments');
button.prop('disabled', true);
},
//tODO move codepilot out of here.