Skip to content
Branch: master
Find file History

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
component.css
component.js
component.json
dependencies.html
example.html
picture.jpg
readme.md

readme.md

j-Snackbar

  • singleton
  • success message SETTER('notifybar', 'success', 'MESSAGE')
  • warning message SETTER('notifybar', 'warning', 'MESSAGE')
  • info message SETTER('notifybar', 'info', 'MESSAGE', '[BUTTON_LABEL]', [callback_dismiss])

Configuration:

  • timeout {Number} A timeout in milliseconds (default: 4000)

Methods:

  • component.success(message) appends success message
  • component.warning(message) appends warning message
  • component.info(message) appends info message
  • component.hide() hides the bar
  • component.show() shows last message

Works with ASETTER:

  • errors are handled automatically
// Without callback
AJAX('POST /api/profile/', userprofile, ASETTER('notifybar', 'response', 'Profile has been saved successfully'));

// Or with a callback
AJAX('POST /api/profile/', userprofile, ASETTER('notifybar', 'response', 'Profile has been saved successfully', function(response) {
	console.log(response);
}));

// Or with a callback and without message
AJAX('POST /api/profile/', userprofile, ASETTER('notifybar', 'response', function(response) {
	console.log(response);
}));

Author

You can’t perform that action at this time.