TreeContent moved to external JS
This commit is contained in:
parent
84a3ab25fe
commit
57d2db4c07
2 changed files with 4 additions and 7 deletions
|
@ -373,6 +373,9 @@ import PerformanceBar from './performance_bar';
|
|||
shortcut_handler = new ShortcutsNavigation();
|
||||
new TreeView();
|
||||
new BlobViewer();
|
||||
$('#tree-slider').waitForImages(function() {
|
||||
gl.utils.ajaxGet(document.querySelector('.js-tree-content').dataset.logsPath);
|
||||
});
|
||||
break;
|
||||
case 'projects:find_file:show':
|
||||
shortcut_handler = true;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.tree-content-holder
|
||||
.tree-content-holder.js-tree-content{ 'data-logs-path': escape_javascript(@logs_path)}
|
||||
.table-holder
|
||||
%table.table#tree-slider{ class: "table_#{@hex_path} tree-table" }
|
||||
%thead
|
||||
|
@ -22,9 +22,3 @@
|
|||
- if can_edit_tree?
|
||||
= render 'projects/blob/upload', title: _('Upload New File'), placeholder: _('Upload New File'), button_title: _('Upload file'), form_path: project_create_blob_path(@project, @id), method: :post
|
||||
= render 'projects/blob/new_dir'
|
||||
|
||||
:javascript
|
||||
// Load last commit log for each file in tree
|
||||
$('#tree-slider').waitForImages(function() {
|
||||
gl.utils.ajaxGet("#{escape_javascript(@logs_path)}");
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue