j-Approve
- Singleton
- Funktioniert mit Bootstrap
- unterstützt den Dark-Modus
- modal
Konfiguration:
cancel{String} eine Bezeichnung für die Schaltfläche „Abbrechen“ (Standard:Cancel)- NEU:
style{Number} ändert den Stil (unterstützter Stil1(Standard) und2)
Methoden:
component.show(message, approve_button_label, [cancel_button_label], callback, [callback_cancel])
Verwendung:
SETTER('approve/show', message, 'Yes', function() {
});Eine einfache Gestaltung von Schaltflächen
// "Remove" button will be with Font-Awesome icon called: "trash-o"
SETTER('approve/show', 'Are you sure you want to remove selected item?', ':trash-o: Remove', REMOVE_FUNCTION);
// "Confirm" button will be "green" with Font-Awesome icon called: "checked-circle"
SETTER('approve/show', 'Are you sure you want to confirm selected items?', ':checked-circle: Confirm #2BA433', REMOVE_FUNCTION);Verwenden Sie es mit <ui-component name="approve">. Wenn die Komponente noch nicht geladen ist, lädt jComponent sie bei der ersten Verwendung von der Adresse in DEF.fallback herunter (standardmäßig das CDN Componentator). Autor: Peter Širka. Quelle: Componentator-Komponenten-Repository, MIT-Lizenz.
<ui-component name="approve"></ui-component>
<script>
SETTER(true, 'approve/show', 'Do you want to remove React/Vue/Angular.js from your device?', ':check-circle: OK', function() {
alert('Thank you for using of jComponent library');
});
</script>