nosTabs

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

Manages back-office’s tabs. This is a function with sub-functions.

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

nosTabs(‘open’)

nosTabs.open(tab[, dialogOptions])

Open a new tab or re-open an existing tab if it has the same URL.

Arguments:
  • tab (mixed) –

    JSON definition of tab.

    url:Required. Tab URL.
    iframe:If true, open tab in an iframe. Default false.
    label:Tab label.
    labelDisplay:If false, don’t display the label, only the icon. Default true.
    iconUrl:Icon URL.
    iconSize:Icon size in pixel (square icon). Default 16.
  • dialogOptions (JSON) – Within a popup, a tab will rather open another new popup instead (by calling $container.nosDialog()). This parameter set options for $container.nosDialog().
$(domContext).nosTabs('open', {
        url: 'path/url',
        iframe: false,
        label: 'title',
        labelDisplay: true,
        iconUrl: 'path/icon.png',
        iconSize: 16
});

// Call simplified
$(domContext).nosTabs({
        url: 'path/url',
        iframe: false,
        label: 'title',
        labelDisplay: true,
        iconUrl: 'path/icon.png',
        iconSize: 16
});

nosTabs(‘add’)

nosTabs.add(tab[, dialogOptions, position])

Adds a new tab, even if an existing has the same URL.

Arguments:
  • tab (mixed) –

    JSON definition of tab.

    url:Required. Tab URL.
    iframe:If true, open tab in an iframe. Default false.
    label:Tab label.
    labelDisplay:If false, don’t display the label, only the icon. Default true.
    iconUrl:Icon URL.
    iconSize:Icon size in pixel (square icon). Default 16.
  • position (string) – Position of the new tab. Can be end, before or after the current tab of the js:data::jQuery $container <$container>.
  • dialogOptions (JSON) – If DOM element in jQuery container is in popup, open a new popup by calling $container.nosDialog() instead of a tab. This parameter set options for $container.nosDialog().
$(domContext).nosTabs(
        'add',
        {
                url: 'path/url',
                iframe: false,
                label: 'title',
                labelDisplay: true,
                iconUrl: 'path/icon.png',
                iconSize: 16
        },
        'end'
);

nosTabs(‘close’)

nosTabs.close()

Close current tab (compared to the tab where is the DOM element in jQuery container).

$(domContext).nosTabs('close');

nosTabs(‘update’)

nosTabs.update(tab)

Update current js:data::$container tab. Can load a new URL.

Arguments:
  • tab (mixed) –

    JSON definition of tab.

    url:Required. Tab URL.
    label:Tab label.
    labelDisplay:If false, don’t display the label, only the icon. Default true.
    iconUrl:Icon URL.
    iconSize:Icon size in pixel (square icon). Default 16.
    reload:If true and url is set, load the new URL in the current tab. Default false.
     $(domContext).nosTabs('update', {
             url: 'path/url',
             label: 'Title',
             labelDisplay: true,
             iconUrl: 'path/icon.png',
             iconSize: 16
             reload: true
     });

nosTabs(‘current’)

nosTabs.current(tab)
Returns:Index of the current js:data::$container tab.
var current = $(domContext).nosTabs('current');