cgkineo / adapt-close Goto Github PK
View Code? Open in Web Editor NEWAn extension to add a close button and/or prompts
License: GNU General Public License v3.0
An extension to add a close button and/or prompts
License: GNU General Public License v3.0
The nav button float
style is no longer required since the plugin was updated to support data-order
.
Core also overrides any .nav__btn
float
styles.
Allowed the sorting of navigation elements according to a data-order attribute in the dom
adaptlearning/adapt-contrib-core#61
Because Chrome disallows synchronous XHR the module cannot report the progress with normal close.
I solved the problem by adding the LMS close part to normal close.
The progress is reported properly.
Didn't see and side effects with the LMSes we are using ILIAS and Moodle.
if (config._button._closeViaLMSFinish) {
var scorm = require('extensions/adapt-contrib-spoor/js/scorm/wrapper');
if (scorm) scorm.getInstance().finish();
} else {
var scorm = require('extensions/adapt-contrib-spoor/js/scorm/wrapper');
if (scorm) scorm.getInstance().finish();
top.window.close();
}
No side effects with simple web use as well.
I think this can be safely changed in the plugin.
May be a new name of the parameter should be invented, because now the close is always with LMS Finish, but one case closes the window, the other one not.
Typically it's generally displayed as the last item in the navbar - so by prepending it to the .navigation-inner
div (current behaviour), the tab order won't match the display order.
Until the Adapt FW adds a proper method for ordering buttons in the navigation bar, it's probably best to change the code that adds the close button so that it appends it.
in the hbs template you can add a style depending on the course.json "_layout" key (left or right) since no less files is provided with it, it have no effect, I added a less file for my version but i was wondering if it make sense to add it to the repo as well, If yes I'll make a PR for this, if not, feel free to close this issue.
Not a bug, but more housecleaning. Looking to ensure all icons in every template are uniform and set up with the same structure with the appropriate aria hidden label.
<span className="component-item__icon" aria-label="ARIA Description.">
<span className="icon" aria-hidden="true"></span>
</span>
Not sure if this is related to the existing issue, but the close button disappears when the Language Picker (https://github.com/adaptlearning/adapt-contrib-languagePicker) is also used.
The close button is initially is shown, but if the languages are changed using the language picker in the nav bar the close button either disappears from the nav bar or is hidden by the language picker button.
Thanks
The close extension is missing the tooltip label feature now available in core.
Component needs to be updated to ES6 classes
The globals need to be nested inside an _extensions object (in legacy AAT this was added automatically).
If you have both the notify and the browser prompt enabled (a useful setup for single page courses that gives you a PIP-style style warning on exit if you haven't completed) then you get a double warning... first the notify then the browser prompt.
Needs amending to ensure that clicking confirm in the notify prompt deactivates the browser prompt
one of the assigned classes is naviation-core-item
, should this not be navigation-core-item
?
When either/both browserPromptIfIncomplete
/browserPromptIfComplete
config options are set: because the spoor plugin also handles the beforeunload
event, it will trigger its SCOFinish
routine which terminates the SCORM 'session'. So if the learner selects 'stay on page' in the browser prompt the course will stay open but won't be able to track.
needs updating to be compatible with Adapt's language-switching functionality
Close will need updating to support PR - adaptlearning/adapt_framework#2864
Avoid targeting nav items for render e.g. $el.insertAfter($('.js-nav-back-btn'))
as this will render elements within the .nav__item
containers used to control the navigation layout. With CGKineo navigation plugins we started targeting Drawer or Back button as a way of controlling the dom order but this will no longer be needed. Suggest generic $el.appendTo('.nav__inner')
as per contrib plugins like languagePicker.
Nav plugins that aren't updated to support nav item management but are rendered into .nav__inner
will just display last inside the nav bar.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.