-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added features: Sends component completion when Trickle is enabled in the block. Calculate open height at component initialisation.
- Loading branch information
1 parent
4d0fad2
commit 5d893ba
Showing
4 changed files
with
138 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
{ | ||
"name": "adapt-img-text-reveal", | ||
"version": "1.0.7", | ||
"framework": ">=2.1.0", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/saralsharma/adapt-img-text-reveal.git" | ||
}, | ||
"framework": ">=2.1.0", | ||
|
||
"homepage": "https://github.com/saralsharma/adapt-img-text-reveal", | ||
"version": "1.0.5", | ||
"authors": [ | ||
"Saral Sharma <[email protected]>" | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,98 +1,105 @@ | ||
{ | ||
"type":"object", | ||
"type": "object", | ||
"$schema": "http://json-schema.org/draft-04/schema", | ||
"id": "http://jsonschema.net", | ||
"$ref": "http://localhost/plugins/content/component/model.schema", | ||
"globals": { | ||
"ariaRegion": { | ||
"type": "string", | ||
"required": true, | ||
"default": "", | ||
"inputType": "Text", | ||
"validators": [], | ||
"translatable": true | ||
} | ||
}, | ||
"properties":{ | ||
"ariaRegion": { | ||
"type": "string", | ||
"required": true, | ||
"default": "", | ||
"inputType": "Text", | ||
"validators": [], | ||
"translatable": true | ||
} | ||
}, | ||
"properties": { | ||
"_supportedLayout": { | ||
"type": "string", | ||
"required": true, | ||
"enum": ["full-width", "half-width", "both"], | ||
"enum": [ | ||
"full-width", | ||
"half-width", | ||
"both" | ||
], | ||
"default": "both", | ||
"editorOnly": true | ||
}, | ||
"instruction": { | ||
"type": "string", | ||
"required": false, | ||
"default": "", | ||
"inputType": "Text", | ||
"validators": [], | ||
"help": "Enter the instruction text for this component.", | ||
"translatable": true | ||
}, | ||
"type": "string", | ||
"required": false, | ||
"default": "", | ||
"inputType": "Text", | ||
"validators": [], | ||
"help": "Enter the instruction text for this component.", | ||
"translatable": true | ||
}, | ||
"_graphic": { | ||
"type": "object", | ||
"title": "Image", | ||
"properties":{ | ||
"large": { | ||
"type": "string", | ||
"required": true, | ||
"default": "", | ||
"title": "Select large image", | ||
"inputType": "Asset:image", | ||
"validators": ["required"], | ||
"help": "Learner will click this image to reveal the text." | ||
}, | ||
"small": { | ||
"type": "string", | ||
"required": false, | ||
"default": "", | ||
"title": "Select small image", | ||
"inputType": "Asset:image", | ||
"validators": ["required"], | ||
"help": "This image will be shown on mobile devices if supplied. Learner will click this image to reveal the text." | ||
}, | ||
"alt": { | ||
"type": "string", | ||
"required": false, | ||
"default": "", | ||
"title": "Alternative Text", | ||
"inputType": "Text", | ||
"validators": [], | ||
"help": "Alternative text for this items image", | ||
"translatable": true | ||
}, | ||
"attribution": { | ||
"type": "string", | ||
"required": false, | ||
"default": "", | ||
"inputType": "Text", | ||
"validators": [], | ||
"help": "Text to be displayed as an attribution", | ||
"translatable": true | ||
} | ||
} | ||
}, | ||
"textToReveal": { | ||
"type": "string", | ||
"required": true, | ||
"default": "Enter your text here.", | ||
"title": "Text to reveal", | ||
"inputType": "TextArea", | ||
"validators": [], | ||
"help": "Enter text here which will slide down under the image, once the image is clicked.", | ||
"translatable": true | ||
}, | ||
"duration": { | ||
"type": "string", | ||
"required": false, | ||
"default": "", | ||
"title": "Duration of slide down animation.", | ||
"inputType": "Text", | ||
"validators": [], | ||
"help": "Durations are given in milliseconds; higher values indicate slower animations, not faster ones. The strings 'fast' and 'slow' can be supplied to indicate durations of 200 and 600 milliseconds, respectively. If any other string is supplied, or if the duration parameter is omitted, the default duration of 400 milliseconds is used.", | ||
"translatable": true | ||
} | ||
|
||
} | ||
} | ||
"type": "object", | ||
"title": "Image", | ||
"properties": { | ||
"large": { | ||
"type": "string", | ||
"required": true, | ||
"default": "", | ||
"title": "Select large image", | ||
"inputType": "Asset:image", | ||
"validators": [ | ||
"required" | ||
], | ||
"help": "Learner will click this image to reveal the text." | ||
}, | ||
"small": { | ||
"type": "string", | ||
"required": false, | ||
"default": "", | ||
"title": "Select small image", | ||
"inputType": "Asset:image", | ||
"validators": [ | ||
"required" | ||
], | ||
"help": "This image will be shown on mobile devices if supplied. Learner will click this image to reveal the text." | ||
}, | ||
"alt": { | ||
"type": "string", | ||
"required": false, | ||
"default": "", | ||
"title": "Alternative Text", | ||
"inputType": "Text", | ||
"validators": [], | ||
"help": "Alternative text for this items image", | ||
"translatable": true | ||
}, | ||
"attribution": { | ||
"type": "string", | ||
"required": false, | ||
"default": "", | ||
"inputType": "Text", | ||
"validators": [], | ||
"help": "Text to be displayed as an attribution", | ||
"translatable": true | ||
} | ||
} | ||
}, | ||
"textToReveal": { | ||
"type": "string", | ||
"required": true, | ||
"default": "Enter your text here.", | ||
"title": "Text to reveal", | ||
"inputType": "TextArea", | ||
"validators": [], | ||
"help": "Enter text here which will slide down under the image, once the image is clicked.", | ||
"translatable": true | ||
}, | ||
"duration": { | ||
"type": "string", | ||
"required": false, | ||
"default": "400", | ||
"title": "Duration of slide down animation.", | ||
"inputType": "Text", | ||
"validators": [], | ||
"help": "Durations are given in milliseconds; higher values indicate slower animations, not faster ones. The strings 'fast' and 'slow' can be supplied to indicate durations of 200 and 600 milliseconds, respectively. If any other string is supplied, or if the duration parameter is omitted, the default duration of 400 milliseconds is used.", | ||
"translatable": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
<div class="imageTextReveal-inner component-inner"> | ||
<div class="imageTextReveal-inner component-inner" id="{{_id}}-imageTextRevealContainer"> | ||
{{> component this}} | ||
|
||
<div class="graphic-widget component-widget{{#if _graphic.attribution}} graphic-widget-attribution{{/if}}"> | ||
<img src="{{_graphic.src}}" data-large="{{_graphic.large}}" data-small="{{_graphic.small}}" {{#if _graphic.alt}}aria-label="{{_graphic.alt}}"{{else}}aria-hidden="true"{{/if}} /> | ||
<img src="{{_graphic.src}}" data-large="{{_graphic.large}}" data-small="{{_graphic.small}}" {{#if | ||
_graphic.alt}}aria-label="{{_graphic.alt}}" {{else}}aria-hidden="true" {{/if}} /> | ||
</div> | ||
{{#if _graphic.attribution}} | ||
<div class="graphic-attribution">{{{_graphic.attribution}}}</div> | ||
<div class="graphic-attribution">{{{_graphic.attribution}}}</div> | ||
{{/if}} | ||
<div class="imageTextReveal-item-revealText" id="{{_id}}-revealTxt">{{{textToReveal}}}</div> | ||
<div id="{{_id}}-revealTxtContainer"> | ||
<div class="imageTextReveal-item-revealText" id="{{_id}}-revealTxt">{{{textToReveal}}}</div> | ||
</div> | ||
|
||
</div> | ||
</div> |