todolist panel (frontend part), by clicking on the TODO the relatve file is opened in a tab and the cursor is placed at the right line
This commit is contained in:
@@ -3,6 +3,11 @@
|
||||
.CodeMirror-fullscreen {
|
||||
z-index: 1030;
|
||||
}
|
||||
.CodeMirror {
|
||||
border-top: 1px solid #ddd;
|
||||
/*border-left: 1px solid #ddd;*/
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
/* BREAKPOINTS */
|
||||
|
||||
|
||||
@@ -248,7 +248,7 @@ function keepalive(url) {
|
||||
});
|
||||
}
|
||||
|
||||
function load_file(url) {
|
||||
function load_file(url, lineno) {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
contentType: 'application/json',
|
||||
@@ -263,13 +263,13 @@ function load_file(url) {
|
||||
var tab_header = '<li><a title="'+ json['filename'] +'" href="#' + json['id'] + '" data-toggle="tab"><button type="button" class="close">×</button>' + json['realfilename'] + '</a></li>';
|
||||
var tab_body = '<div id="' + json['id'] + '" class="tab-pane fade in " >' + json['plain_html'] + '</div>';
|
||||
if(json['force'] === false) {
|
||||
$('#filesTab').append($(tab_header));
|
||||
$('#myTabContent').append($(tab_body));
|
||||
$('#myTabContent').append($(tab_body)); // First load the body
|
||||
$('#filesTab').append($(tab_header)); // Then load the header which trigger the shown event
|
||||
} else {
|
||||
$('#' + json['id']).html($(tab_body));
|
||||
}
|
||||
}
|
||||
$("a[href='#" + json['id'] + "']").click();
|
||||
$("a[href='#" + json['id'] + "']").trigger('click', lineno);
|
||||
}
|
||||
},
|
||||
error: function (x) {
|
||||
|
||||
Reference in New Issue
Block a user