materiobaseajax module
first ajax geed results + 2 different custom autocomplete func (not used for now) - deselect - searchapi Signed-off-by: bachy <git@g-u-i.net>
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* This is the file description for Materiobaseajax module.
|
||||
*
|
||||
* In this more verbose, multi-line description, you can specify what this
|
||||
* file does exactly. Make sure to wrap your documentation in column 78 so
|
||||
* that the file can be displayed nicely in default-sized consoles.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_init().
|
||||
*/
|
||||
function materiobaseajax_init() {
|
||||
drupal_add_js(drupal_get_path('module', 'materiobaseajax').'/materiobaseajax-ck.js');
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_menu().
|
||||
*/
|
||||
function materiobaseajax_menu() {
|
||||
$items = array();
|
||||
|
||||
$items['materiobaseajax/search'] = array(
|
||||
'title' => 'Matrio base ajax',
|
||||
'page callback' => 'materiobaseajax_search_ajax',
|
||||
'page arguments' => array(2, 3),
|
||||
// 'access callback' => TRUE,
|
||||
'access arguments' => array('access search_api_page'),
|
||||
'file' => 'materiobaseajax.pages.inc',
|
||||
'type' => MENU_CALLBACK,
|
||||
);
|
||||
|
||||
return $items;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Implements hook_search_api_ajax_settings().
|
||||
*/
|
||||
function materiobaseajax_search_api_ajax_settings() {
|
||||
$settings = array(
|
||||
|
||||
// CSS id for main content (search results html)
|
||||
// format: content => CSS id
|
||||
'content' => '#content',
|
||||
|
||||
// CSS id's for regions containing search blocks
|
||||
// check your region names in mytheme.info
|
||||
// format: region_name => CSS id
|
||||
'regions' => array(
|
||||
'headerblock_left' => '#headerblock-left',
|
||||
// 'sidebar_second' => '#sidebar-second',
|
||||
),
|
||||
|
||||
// OPTIONAL: if you want to provide an AJAX spinner
|
||||
// this paht is for a default spinner path provided with this module
|
||||
// @note: see the search_api_ajax.css
|
||||
'spinner' => drupal_get_path('module', 'search_api_ajax') .'/spinner.gif',
|
||||
|
||||
// OPTIONAL: if you want to use scroll-to-top functionality when paging
|
||||
// scroll target div
|
||||
// 'scrolltarget' => '#main-content',
|
||||
// 'scrollspeed' => 1000,
|
||||
|
||||
// OPTIONAL: if you want to fade search results when Ajaxing
|
||||
// please set to 1 for TRUE
|
||||
'fade' => 1,
|
||||
'opacity' => 0.3,
|
||||
);
|
||||
|
||||
return $settings;
|
||||
}
|
||||
Reference in New Issue
Block a user