Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature : create a new component to display tree views #307

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
6a31e69
Add tree link component and refactor the code
SirineMhedhbi Dec 11, 2023
613439d
update concept controller to use the tree component and remove old code
syphax-bouazzouni Dec 11, 2023
43ca9d2
use tree link component for concept list by date and collection
syphax-bouazzouni Dec 11, 2023
c088775
remove old code no more used
syphax-bouazzouni Dec 12, 2023
0502cda
update tree link component to be have more generic arguments
syphax-bouazzouni Jan 2, 2024
ac9cd00
update tree view component to use tree link component
syphax-bouazzouni Jan 2, 2024
2bbcacb
add tree component helper
syphax-bouazzouni Jan 2, 2024
677ba2b
make tree_infinite_scroll use tree view component
syphax-bouazzouni Jan 2, 2024
693833f
add concept tree view helper and use in concept controller to show tree
syphax-bouazzouni Jan 2, 2024
5d9e4f4
update concept list and date sorted views to use tree view component
syphax-bouazzouni Jan 2, 2024
5ee94df
add a card style to the schemes and collection tree views
syphax-bouazzouni Jan 2, 2024
33e1866
use the tree view component for the schemes and collections
syphax-bouazzouni Jan 2, 2024
4c015d0
migrate properties tree to the ruby tree view component
syphax-bouazzouni Jan 2, 2024
60a5475
remove no more used properties tree js code
syphax-bouazzouni Jan 2, 2024
45bfedf
put again the removed splitter assets blocking history to work
syphax-bouazzouni Jan 2, 2024
19489a3
remove this usage of histroy.js and replace with the native one
syphax-bouazzouni Jan 2, 2024
4ba616c
remove jquery simple tree dependency
syphax-bouazzouni Jan 2, 2024
3a4e1f0
add tree view links controller tests
syphax-bouazzouni Jan 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
//= require bp_mappings
//= require bp_admin
//= require bp_recommender
//= require bp_property_tree
//= require concepts
//= require_tree ./helpers
//= require_tree ./components
Expand Down
334 changes: 0 additions & 334 deletions app/assets/javascripts/bp_property_tree.js

This file was deleted.

31 changes: 15 additions & 16 deletions app/assets/javascripts/bp_search.js.erb
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
"use strict";

// History and navigation management
(function(window, undefined) {
// Establish Variables
var History = window.History;
// History.debug.enable = true;

// Abort it not right page
var path = currentPathArray();
(() => {
// Abort if not the right page
const path = currentPathArray();
if (path[0] !== "search") {
return;
return;
}

// Bind to State Change
History.Adapter.bind(window, 'statechange', function() {
var state = History.getState();
autoSearch();
});
}(window));
// Function to get current path array
function currentPathArray() {
// Implement the logic to get the current path array
// Replace the following line with your actual logic
return window.location.pathname.split('/');
}

})();

var showAdditionalResults = function(obj, resultSelector) {
var ontAcronym = jQuery(obj).attr("data-bp_ont");
Expand Down Expand Up @@ -174,7 +171,9 @@ jQuery(document).ready(function() {
// Perform search
jQuery("#search_button").click(function(event) {
event.preventDefault();
History.pushState(currentSearchParams(), document.title, "/search?" + objToQueryString(currentSearchParams()));
history.pushState(currentSearchParams(), document.title, "/search?" + objToQueryString(currentSearchParams()));
var state = history.state || {};
autoSearch()
});

// Search on enter
Expand Down
Loading