Open comments in board view with a modal dialog instead of tooltip
This commit is contained in:
2
assets/css/app.min.css
vendored
2
assets/css/app.min.css
vendored
File diff suppressed because one or more lines are too long
6
assets/js/app.min.js
vendored
6
assets/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
29
assets/js/components/board-task-click.js
Normal file
29
assets/js/components/board-task-click.js
Normal file
@@ -0,0 +1,29 @@
|
||||
(function () {
|
||||
function redirectToTaskView(e) {
|
||||
var ignoreParentElement = KB.dom(e.target).parent('a, .task-board-change-assignee');
|
||||
if (ignoreParentElement) {
|
||||
return;
|
||||
}
|
||||
|
||||
var taskElement = KB.dom(e.target).parent('.task-board');
|
||||
if (taskElement) {
|
||||
var taskUrl = KB.dom(taskElement).data('taskUrl');
|
||||
|
||||
if (taskUrl) {
|
||||
window.location = taskUrl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function openEditTask(e) {
|
||||
var baseElement = KB.dom(e.target).parent('.task-board-change-assignee');
|
||||
var url = KB.dom(baseElement).data('url');
|
||||
|
||||
if (url) {
|
||||
KB.modal.open(url, 'medium', false);
|
||||
}
|
||||
}
|
||||
|
||||
KB.onClick('.task-board *', redirectToTaskView);
|
||||
KB.onClick('.task-board-change-assignee *', openEditTask);
|
||||
}());
|
||||
@@ -1,20 +0,0 @@
|
||||
Kanboard.BoardTask = function(app) {
|
||||
this.app = app;
|
||||
};
|
||||
|
||||
// TODO: rewrite this code
|
||||
Kanboard.BoardTask.prototype.listen = function() {
|
||||
var self = this;
|
||||
|
||||
$(document).on("click", ".task-board-change-assignee", function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
KB.modal.open($(this).data("url"), "medium", false);
|
||||
});
|
||||
|
||||
$(document).on("click", ".task-board", function(e) {
|
||||
if (e.target.tagName != "A" && e.target.tagName != "IMG") {
|
||||
window.location = $(this).data("task-url");
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -26,7 +26,6 @@
|
||||
.comment-title
|
||||
border-bottom: 1px dotted #eee
|
||||
margin-left: 55px
|
||||
margin-bottom: 10px
|
||||
|
||||
.comment-date
|
||||
color: color('light')
|
||||
@@ -34,8 +33,8 @@
|
||||
|
||||
.comment-actions
|
||||
font-size: size('small')
|
||||
margin-left: 55px
|
||||
margin-top: 8px
|
||||
margin-bottom: 10px
|
||||
text-align: right
|
||||
li
|
||||
display: inline
|
||||
a
|
||||
@@ -47,3 +46,10 @@
|
||||
|
||||
.comment-content
|
||||
margin-left: 55px
|
||||
|
||||
.comments
|
||||
.text-editor
|
||||
textarea
|
||||
height: 90px
|
||||
.text-editor-preview-area
|
||||
height: 90px
|
||||
|
||||
@@ -9,12 +9,14 @@
|
||||
span
|
||||
opacity: 0.5
|
||||
margin-left: 4px
|
||||
a:hover, span:hover
|
||||
opacity: 1.0
|
||||
a
|
||||
&:hover
|
||||
opacity: 1.0
|
||||
font-weight: bold
|
||||
.task-board-icons-row
|
||||
line-height: 22px
|
||||
.task-score
|
||||
font-weight: 500
|
||||
font-weight: bold
|
||||
|
||||
.flag-milestone
|
||||
color: green
|
||||
|
||||
Reference in New Issue
Block a user