Sha256: 07412b4ab971397ef8264dd1cff697be1a597a0fe1f836b1c60e194dd4b4ccd3

Contents?: true

Size: 595 Bytes

Versions: 3

Compression:

Stored size: 595 Bytes

Contents

(function() {
    "use strict";
    window.Suricate = window.Suricate || {};

    Suricate.WidgetsContainer = function(container) {
        this.container = container;
    };

    /*
     * Public
     */

    // Is widget present on the page ?
    Suricate.WidgetsContainer.prototype.isWidgetPresent = function(id) {
        return this.getWidgetContainer(id).length > 0;
    };

    // Get the DOM element associated to widget with id
    Suricate.WidgetsContainer.prototype.getWidgetContainer = function(id) {
        return this.container.find("[data-widget-id='" + id + "']");
    };
}());

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
suricate-0.0.4 lib/suricate/generator/assets/javascript/widgets-container.js
suricate-0.0.3 lib/suricate/generator/assets/javascript/widgets-container.js
suricate-0.0.2 lib/suricate/generator/assets/javascript/widgets-container.js