You are here

function asset_widget_library in Asset 7

Implements hook_library().

File

modules/asset_widget/asset_widget.module, line 319
Code for the Asset widget module.

Code

function asset_widget_library() {
  $libraries['asset_widget'] = array(
    'title' => 'Asset widget library',
    'version' => '1.0',
    'js' => array(
      ASSET_WIDGET_MODULE_PATH . '/js/jquery.mousewheel.min.js' => array(
        'weight' => 4,
      ),
      ASSET_WIDGET_MODULE_PATH . '/js/jquery.jscrollpane.min.js' => array(
        'weight' => 4,
      ),
      ASSET_WIDGET_MODULE_PATH . '/js/jquery.ui.selectmenu.min.js' => array(
        'weight' => 4,
      ),
      ASSET_WIDGET_MODULE_PATH . '/js/jquery.multiSelect.min.js' => array(
        'weight' => 4,
      ),
      // Add our main script at the end to be sure that we add our Ajax.commands.
      ASSET_WIDGET_MODULE_PATH . '/js/asset-widget.js' => array(
        'weight' => 5,
        'group' => JS_THEME,
      ),
    ),
    // Note that we add our css last, after all THEME styles to avoid overrides.
    'css' => array(
      ASSET_WIDGET_MODULE_PATH . '/css/asset-widget.css' => array(
        'weight' => 10,
        'group' => CSS_THEME,
      ),
      ASSET_WIDGET_MODULE_PATH . '/css/asset-widget-custom.css' => array(
        'weight' => 11,
        'group' => CSS_THEME,
      ),
    ),
    'dependencies' => array(
      array(
        'system',
        'ui.draggable',
      ),
      array(
        'system',
        'ui.droppable',
      ),
      array(
        'system',
        'ui.datepicker',
      ),
      array(
        'system',
        'drupal.ajax',
      ),
    ),
  );
  $libraries['asset_widget_inner_form'] = array(
    'title' => 'Asset widget inner form library',
    'version' => '1.0',
    'js' => array(
      ASSET_WIDGET_MODULE_PATH . '/js/jquery.mousewheel.min.js' => array(
        'weight' => 4,
      ),
      ASSET_WIDGET_MODULE_PATH . '/js/jquery.jscrollpane.min.js' => array(
        'weight' => 4,
      ),
      ASSET_WIDGET_MODULE_PATH . '/js/asset-widget-inner-form.js' => array(
        'weight' => 10,
        'group' => JS_THEME,
      ),
    ),
    // Note that we add our css last, after all THEME styles to avoid overrides.
    'css' => array(
      ASSET_WIDGET_MODULE_PATH . '/css/asset-widget-inner-form.css' => array(
        'weight' => 10,
        'group' => CSS_THEME,
      ),
    ),
  );
  $libraries['asset_widget_tooltip'] = array(
    'title' => 'Asset widget tooltip library',
    'version' => '1.0',
    'js' => array(
      ASSET_WIDGET_MODULE_PATH . '/js/jquery.mousewheel.min.js' => array(
        'weight' => 4,
      ),
      ASSET_WIDGET_MODULE_PATH . '/js/jquery.jscrollpane.min.js' => array(
        'weight' => 4,
      ),
      ASSET_WIDGET_MODULE_PATH . '/js/asset-widget-inner-tooltip.js' => array(
        'weight' => 10,
        'group' => JS_THEME,
      ),
    ),
    // Note that we add our css last, after all THEME styles to avoid overrides.
    'css' => array(
      ASSET_WIDGET_MODULE_PATH . '/css/asset-widget-inner-tooltip.css' => array(
        'weight' => 10,
        'group' => CSS_THEME,
      ),
    ),
  );
  return $libraries;
}