nosToolbar

$container.nosToolbar([method[, options[, ...]]])

Manage back-office’s toolbars. This is a function with sub-functions.

Arguments:
  • method (mixed) – The sub-function name, add (default) or create. If omitted, this is the first parameter of the default sub-function nosToolbar.add().
  • options (mixed) – Parameters of the sub-function.

nosToolbar(‘add’)

nosToolbar.add(element[, right_side])

Adds an element to the toolbar of the current js:data::$container. If no toolbar exists, creates a new one on-the-fly.

Arguments:
  • element (mixed) – Can be HTML code, a DOM element or a jQuery container.
  • right_side (boolean) – Default false, if true element added at the right side of the toolbar.
$(domContext).nosToolbar('add', element, right_side);

\\ or
$(domContext).nosToolbar(element, right_side);

\\ Add a button, right side of toolbar
$(domContext).nosToolbar('<button>Exemple</button>', true);

\\ Add a link, left side of toolbar
var $a = $('<a href="#">Exemple</a>');
$(domContext).nosToolbar($a);

nosToolbar(‘create’)

nosToolbar.create()

Creates a toolbar in the current js:data::$container.

$(domContext).nosToolbar('create');