Releases: dealfonso/power-buttons
2.2.0
What's Changed
- add classes for dialog, focus element, and sourcemap files by @dealfonso in #14
Full Changelog: 2.1.2...2.2.0
2.1.2
Add the override
actions that may enable to stop the execution of the actions chain if a condition is met. E.g. a button that checks that a file does not exists and if exists... it will prompt the user to overwrite the file.
<button type="button" data-override="window.fileExists()" data-confirm="Are you sure you want to overwrite the file?" onclick="alert('file overwritten')">upload file</button>
Full Changelog: 2.1.1...2.1.2
2.1.1
2.1.0
Add the discover
method, the function overload for powerButtons
to enable powerButtons(pluginName, el, options)
and powerButtons(el, options)
and remove the dependency from the window to follow the workflow from jsweblibrary
What's Changed
- remove dependency from window by @dealfonso in #10
- add the discover method and enhance the default function by @dealfonso
Full Changelog: 2.0.1...2.1.0
2.0.1
What's Changed
- correct bug in devel and add the plugin list by @dealfonso in #5
- add support for using the form in which the button is, and inputs wit… by @dealfonso in #6
- remove messages in console by @dealfonso in #7
- add the docs for readthedocs by @dealfonso in #8
Full Changelog: 2.0.0...2.0.1
2.0.0
The new version of the library has been entirely rewritten (almost from scratch), allowing the creation of plugins.
Now, the library not only enables to confirm click actions in the DOM before executing them (i.e. confirm pressing a button or confirm clicking a link). It also enables to verify javascript code, showing a message and others.
This version contains the following plugins:
- verify button that verifies that one condition is valid before executing the function that it should execute. If the condition is not met, show a modal dialog to inform the user and interrupt its action. It is useful for (e.g.) FORM verification.
- confirm button that makes a button show a confirmation modal dialog before executing the function that it should execute. It is useful for (e.g.) confirming the action of submitting a form or deleting entries in a database.
- asynctask button that executes an asynchronous task before executing its real action and will show a modal dialog while it is being executed. It is useful for (e.g.) executing a long task before submitting a form.
- showmessage button that shows a modal dialog with a message before executing its real action. It is useful for (e.g.) showing the user a message when submitting a form.
- formset button, which sets the values of a set of form fields before executing its real action. It is useful for (e.g.) setting a hidden field in a form before submitting it or pre-filling a FORM.
- formbutton button that substitutes the button with a form that will contain the button. It can also add hidden fields to the form to be submitted along with the button. It is useful to avoid creating unnecessary forms in the HTML code.
What's Changed
- PowerButtons by @dealfonso in #4
New Contributors
- @dealfonso made their first contribution in #4
Full Changelog: 1.2.0...2.0.0
1.2.0
jsconfirm-buttons
This version does not need jQuery nor Bootstrap.
- in the case of jQuery:
jsconfirm-buttons
does not need jQuery at all, but provides $(...).confirmButton if jQuery is detected. - in the case of Bootstrap:
jsconfirm-buttons
makes use of bootstrap, but if it is not detected, there is a fallback to the window.confirm function.
Other features
- global configuration for the library (e.g. setting texts, default functions, etc.)
- easing internationalization
- bug correction
jsconfirm-buttons
This is a plugin for jQuery that depends on Bootstrap. The plugin does not need any specific version of each of them.
The plugin makes that any button show a confirmation modal dialog prior to executing the function that it should execute. It is useful for (e.g.) confirm submitting a dialog or deleting entries in a database.
The basic syntax to use this plugin is to include a tag such as the next one:
<button confirm="Are you sure?">clickme</button>
Please see the README.md for more information.