Web UI component: j-Approve


  • Info
  • HTML
  • JS
  • CSS
  • Meta

j-Approve

  • easy usage
  • singleton
  • works with Bootstrap
  • supports dark mode
  • modal

Configuration:

  • cancel {String} a label for cancel button (default: Cancel)

Methods:

  • component.show(message, approve_button_label, [cancel_button_label], callback)

Usage:

SETTER('approve/show', message, 'Yes', function() {

});

A simple styling of buttons

// "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);

Author