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

chore(tree): make bhima-nav a component #179

Merged
merged 1 commit into from
Mar 11, 2016

Conversation

jniles
Copy link
Collaborator

@jniles jniles commented Mar 8, 2016

This commit migrates the bhimaNav directive to a component
architecture. The navigation component is now called bhNavigation and
has been migrated to the components/ directory.

One additional improvement has been implemented from #44. The tree now
searches through all paths for a match to the current url on change
using a String.includes() to search for matches. Credit to @sfount
for this suggestion.

@jniles jniles force-pushed the improve-tree-navigation branch 2 times, most recently from ad6a844 to 77ffba9 Compare March 10, 2016 08:15
}

function selectUnit(unit) {

// Clear previous selection if it exists
if (vm.selectedUnit) {
vm.selectedUnit.selected = false;
if ($ctrl.selectedUnit) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we must have one selected unit at a time, why not to do :

unit.selected = true;
$ctrl.selectedUnit = unit;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we must have one selected unit at a time, why not to do :

unit.selected = true;
$ctrl.selectedUnit = unit;

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code does do what you suggest. See lines 85 and 86, right below this check. This if statement is trying to make sure the previous unit.selected is false.

Or am I misunderstanding?

@DedrickEnc
Copy link
Contributor

This comment will not block the PR, however this PR needs a rebase.

This commit migrates the `bhimaNav` directive to a component
architecture.  The navigation component is now called `bhNavigation` and
has been migrated to the `components/` directory.

One additional improvement has been implemented from #44.  The tree now
searches through all paths for a match to the current url on change
using a `String.includes()` to search for matches.  Credit to @sfount
for this suggestion.
@jniles
Copy link
Collaborator Author

jniles commented Mar 11, 2016

@DedrickEnc, rebased.

DedrickEnc added a commit that referenced this pull request Mar 11, 2016
chore(tree): make bhima-nav a component
@DedrickEnc DedrickEnc merged commit 59a927e into IMA-WorldHealth:master Mar 11, 2016
@jniles jniles deleted the improve-tree-navigation branch March 11, 2016 13:39
jniles referenced this pull request in jniles/bhima Jan 26, 2017
This commit fixes the cash registry filter bar to give greater visual
surface area when there are no filters present on the page.

Closes #179.
DedrickEnc pushed a commit to DedrickEnc/bhima-2.X that referenced this pull request Jan 27, 2017
This commit fixes the cash registry filter bar to give greater visual
surface area when there are no filters present on the page.

Closes IMA-WorldHealth#179.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants