Skip to content

Commit

Permalink
Add default image in all conditions fixes #45
Browse files Browse the repository at this point in the history
  • Loading branch information
deltanetdan committed Jan 11, 2023
1 parent 51909cc commit d418bbe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Several menu-related elements are assigned a label using the [aria-label](https:
No known limitations.

----------------------------
**Version number:** 4.2.3
**Version number:** 4.2.4
**Framework versions:** 5.8+
**Author / maintainer:** Forked from [Adapt Core](https://github.com/adaptlearning/adapt-contrib-boxmenu) / DeltaNet
**Accessibility support:** WAI AA
Expand Down
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "adapt-contrib-deltaboxMenu",
"version": "4.2.3",
"version": "4.2.4",
"framework": ">=5.8",
"homepage": "https://github.com/deltanet/adapt-contrib-deltaboxmenu",
"issues": "https://github.com/deltanet/adapt-contrib-deltaboxmenu/issues",
Expand All @@ -14,4 +14,4 @@
],
"license": "GPL-3.0",
"targetAttribute": "_deltaBoxMenu"
}
}
4 changes: 4 additions & 0 deletions templates/deltaBoxMenuItem.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,24 @@

{{#if _assessment}}
{{#if _assessmentPassed}}
<img class="image-default" src="{{_graphic.src}}" aria-hidden="true">
<img class="image-visited" src="{{#if _deltaBoxMenu._graphic.passed}}{{_deltaBoxMenu._graphic.passed}}{{else}}{{#if _deltaBoxMenu._graphic.visited}}{{_deltaBoxMenu._graphic.visited}}{{else}}{{_graphic.src}}{{/if}}{{/if}}" aria-hidden="true"/>
<img class="image-hover" src="{{#if _deltaBoxMenu._graphic.hover}}{{_deltaBoxMenu._graphic.hover}}{{else}}{{#if _deltaBoxMenu._graphic.visited}}{{_deltaBoxMenu._graphic.visited}}{{else}}{{_graphic.src}}{{/if}}{{/if}}" aria-hidden="true">
{{else}}
<img class="image-default" src="{{_graphic.src}}" aria-hidden="true">
<img class="image-visited" src="{{#if _deltaBoxMenu._graphic.failed}}{{_deltaBoxMenu._graphic.failed}}{{else}}{{#if _deltaBoxMenu._graphic.visited}}{{_deltaBoxMenu._graphic.visited}}{{else}}{{_graphic.src}}{{/if}}{{/if}}" aria-hidden="true"/>
<img class="image-hover" src="{{#if _deltaBoxMenu._graphic.hover}}{{_deltaBoxMenu._graphic.hover}}{{else}}{{#if _deltaBoxMenu._graphic.visited}}{{_deltaBoxMenu._graphic.visited}}{{else}}{{_graphic.src}}{{/if}}{{/if}}" aria-hidden="true">
{{/if}}
{{else}}
<img class="image-default" src="{{_graphic.src}}" aria-hidden="true">
<img class="image-visited" src="{{#if _deltaBoxMenu._graphic.complete}}{{_deltaBoxMenu._graphic.complete}}{{else}}{{#if _deltaBoxMenu._graphic.visited}}{{_deltaBoxMenu._graphic.visited}}{{else}}{{_graphic.src}}{{/if}}{{/if}}" aria-hidden="true"/>
<img class="image-hover" src="{{#if _deltaBoxMenu._graphic.hover}}{{_deltaBoxMenu._graphic.hover}}{{else}}{{#if _deltaBoxMenu._graphic.visited}}{{_deltaBoxMenu._graphic.visited}}{{else}}{{_graphic.src}}{{/if}}{{/if}}" aria-hidden="true">
{{/if}}

{{else}}

{{#if _isVisited}}
<img class="image-default" src="{{_graphic.src}}" aria-hidden="true">
<img class="image-visited" src="{{#if _deltaBoxMenu._graphic.visited}}{{_deltaBoxMenu._graphic.visited}}{{else}}{{_graphic.src}}{{/if}}"{{#if _deltaBoxMenu._graphic.alt}} aria-label="{{_deltaBoxMenu._graphic.alt}}"{{else}} aria-hidden="true"{{/if}} />
<img class="image-hover" src="{{#if _deltaBoxMenu._graphic.hover}}{{_deltaBoxMenu._graphic.hover}}{{else}}{{#if _deltaBoxMenu._graphic.visited}}{{_deltaBoxMenu._graphic.visited}}{{else}}{{_graphic.src}}{{/if}}{{/if}}" aria-hidden="true">
{{else}}
Expand Down

0 comments on commit d418bbe

Please sign in to comment.