You are here

function rooms_availability_modal_style in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7

Define modal JS style and dependencies.

2 calls to rooms_availability_modal_style()
rooms_availability_bulk_unit_management in modules/rooms_availability/rooms_availability.module
Form for the Bulk Availability Management.
rooms_availability_page in modules/rooms_availability/rooms_availability.module
Callback for admin/rooms/units/unit/%unit/availability - builds availability page by adding calendar and pulling events from availability table.

File

modules/rooms_availability/rooms_availability.module, line 679
Manages availability for Bookable Units and displaying dates on the jquery FullCalendar plugin.

Code

function rooms_availability_modal_style() {

  // Include libraries.
  ctools_include('modal');
  ctools_include('ajax');
  ctools_modal_add_js();

  // Styles to use for the modal.
  $modal_style = array(
    'rooms-modal-style' => array(
      'modalSize' => array(
        'type' => 'fixed',
        'width' => 400,
        'height' => 400,
        'addWidth' => 0,
        'addHeight' => 0,
      ),
      'modalOptions' => array(
        'opacity' => 0.0,
        'background-color' => '#000',
      ),
      'animation' => 'fadeIn',
    ),
  );

  // Add the ctool modal configuration to settings.
  drupal_add_js($modal_style, 'setting');

  // Add the ctools modal stylesheet.
  drupal_add_css(drupal_get_path('module', 'rooms') . '/css/rooms_modal.css');
}