Picture of Saral Sharma
Download button component
by Saral Sharma - Tuesday, 16 February 2021, 4:14 PM
 

Hi guys,

I have created a new Download button that downloads the file such as PDF without opening it in new Window or Tab. It also shows a Arrow pointing to the downloading file.

Not sure how to add the component in this website(ADAPT Plugin collection).

Git hub link is

https://github.com/saralsharma/adapt-download-button

Cheers,


Picture of Matt Leathes
Re: Download button component
by Matt Leathes - Tuesday, 16 February 2021, 5:36 PM
 

There's a guide to registering a plugin here.

a few things that I thought might be worth mentioning:

  • you might point out in the README.md that IE11 has no support for the 'download' attribute
  • you've got no _setCompletionOn setting in either your example.json or properties.schema so this code will never execute.
  • If you do want to include support for 'inview' completion, note that setupInviewCompletion was only added to Adapt in v3.3.0 but you've set your minimum Framework dependency as >=2.1.0
  • instead of this you can just do this.setCompletionStatus();
  • you don't need to use the 'link' role on an <a> element
  • (minor) in bower.json, the correct format for the licence is "GPL-3.0"
  • (minor) in Firefox, the user can customise the position of the download button in the toolbar so Arrow.js won't necessarily point at the right location
Picture of Saral Sharma
Re: Download button component
by Saral Sharma - Tuesday, 16 February 2021, 6:30 PM
 

Thanks Matt for your feedback, I will update these.

Picture of Saral Sharma
Re: Download button component
by Saral Sharma - Wednesday, 17 February 2021, 7:26 PM
 

Hi Matt,

I have made these changes and component is working fine.

But I am getting following error while registering to the repository, any idea what is wrong?

 


Picture of Matt Leathes
Re: Download button component
by Matt Leathes - Friday, 19 February 2021, 11:04 AM
 

Not sure, that URL is definitely valid:

Are you perhaps on a network that doesn't allow the git:// protocol? Try running this from your command line:

git ls-remote --tags --heads git://github.com/saralsharma/adapt-download-button.git

Picture of Saral Sharma
Re: Download button component
by Saral Sharma - Wednesday, 24 February 2021, 2:04 PM
 

Thanks Matt,

It was my firewall, I have listed this and an extension "Exit button" in the Adapt Plugin browser.

Cheers,

Saral