Commit 19ae6b29 authored by bbaer's avatar bbaer
Browse files

Added Comment Marker

parent 9b298896
Pipeline #1444 passed with stage
in 2 minutes and 10 seconds
...@@ -58,6 +58,7 @@ var QfqNS = QfqNS || {}; ...@@ -58,6 +58,7 @@ var QfqNS = QfqNS || {};
this.language = this.$parent.data("highlight") || "typo3conf/ext/qfq/Resources/Public/Json/javascript.json"; this.language = this.$parent.data("highlight") || "typo3conf/ext/qfq/Resources/Public/Json/javascript.json";
console.log(this.data); console.log(this.data);
this.currentUser = $container.data("uid"); this.currentUser = $container.data("uid");
console.log(this.currentUser);
var that = this; var that = this;
if (this.$target.val()) { if (this.$target.val()) {
var jImport = $.parseJSON(this.$target.val()); var jImport = $.parseJSON(this.$target.val());
...@@ -142,17 +143,21 @@ var QfqNS = QfqNS || {}; ...@@ -142,17 +143,21 @@ var QfqNS = QfqNS || {};
var $hook = this.$rows[annotation.lineNumber]; var $hook = this.$rows[annotation.lineNumber];
var commentController = this._buildCommentContainer($hook); var commentController = this._buildCommentContainer($hook);
commentController.importComments(annotation.comments, this.users); commentController.importComments(annotation.comments, this.users);
$hook.append(this._getCommentMarker(annotation.comments.length));
this._setListeners(commentController); this._setListeners(commentController);
this._setCommentController(annotation.lineNumber, commentController); this._setCommentController(annotation.lineNumber, commentController);
} }
}; };
n.CodeCorrection.prototype._setCommentMarker = function($hook, numberOfComments) { n.CodeCorrection.prototype._getCommentMarker = function(numberOfComments) {
var container = $('<span/>', { var container = $('<span/>', {
class: "badge", class: "badge qfq-comment-marker",
text: numberOfComments text: numberOfComments + ' '
}); });
container.append($('<span/>', {
class: "glyphicon glyphicon-comment"
}));
return container;
}; };
/** /**
......
...@@ -173,6 +173,12 @@ select.qfq-locked:invalid { ...@@ -173,6 +173,12 @@ select.qfq-locked:invalid {
width: 44px; width: 44px;
} }
.qfq-comment-marker {
position: absolute;
right: 22px;
z-index: 2;
}
.nav-pills>li>a { .nav-pills>li>a {
border-radius: 0; border-radius: 0;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment