Class: EnableView

settings/js/controls/enable-view. EnableView

new EnableView(options)

Utility control for widgets which may be disabled

Parameters:
Name Type Description
options EnableViewOptions
Source:

Extends

  • Backbone.View

Members

className

Classname for view. Override if using Bootstrap 3

Default Value:
  • control-group
Source:

Methods

getConfig() → {boolean}

Returns the current state of the view

Source:
Returns:

True if the widget is enabled; false otherwise

Type
boolean

render()

Renders the view

Source:

toggleEnabled()

Changes the enabled state to its negation and calls updateFormatting

Source:
Fires:
  • event:change Event fired with the new state of the view

updateConfig(config)

Set the state of the view. Calls updateFormatting

Parameters:
Name Type Description
config boolean

True if the view is enabled; false otherwise

Source:

updateFormatting()

Updates the formatting of the view.

If the view is enabled, sets the CSS class of the button to btn-danger, the icon to icon-remove, the button
text to this.strings.disable, and the label to this.strings.enabled.

If the view is disabled, sets the CSS class of the button to btn-success, the icon to options.enableIcon, the
button text to this.strings.enable and the label to this.strings.disabled

Source:
Copyright 2013--2018 Micro Focus International plc. Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
Documentation generated by JSDoc 3.4.3 on Fri Jun 22nd 14:40 2018 using the DocStrap template.