New folders block nav
++ search field : select on focus Signed-off-by: bachy <git@g-u-i.net>
This commit is contained in:
@@ -14,7 +14,6 @@ MaterioSearchApiAjax = function(){
|
||||
|
||||
initSearchAjax();
|
||||
initViewMode();
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -33,9 +32,13 @@ MaterioSearchApiAjax = function(){
|
||||
});
|
||||
|
||||
// /!\ AUTOCOMPLETE SELECT EVENT need a patch http://drupal.org/node/365241#comment-5374686
|
||||
$("#edit-searchfield").bind('autocompleteSelect', function(event) {
|
||||
$(this).parents('.form').trigger('submit');
|
||||
});
|
||||
$("#edit-searchfield")
|
||||
.bind('autocompleteSelect', function(event) {
|
||||
$(this).parents('.form').trigger('submit');
|
||||
})
|
||||
.bind('focus', function(event){
|
||||
$(this).select();
|
||||
});
|
||||
|
||||
$(document)
|
||||
.bind('init-scroller-pager', onInitScrollerPager)
|
||||
@@ -79,14 +82,6 @@ MaterioSearchApiAjax = function(){
|
||||
_isloadingresults = true;
|
||||
$('#materio-search-api-search-form').addClass('loading');
|
||||
|
||||
// google analytics
|
||||
$.event.trigger({
|
||||
type : "record-stat",
|
||||
categorie : 'Search event',
|
||||
action : 'Search',
|
||||
label : 'keys :'+ keys +' | filters : '+ stringTypes.join(' ,')
|
||||
});
|
||||
|
||||
// TODO: record ajax path in a variable from materio_search_api_ajax_init
|
||||
$.getJSON(Drupal.settings.basePath+Drupal.settings.pathPrefix+'materio_search_api_ajax/search/'+keys,
|
||||
{'types':types},
|
||||
@@ -96,6 +91,15 @@ MaterioSearchApiAjax = function(){
|
||||
_isloadingresults = false;
|
||||
$('#materio-search-api-search-form').removeClass('loading');
|
||||
|
||||
// google analytics
|
||||
$.event.trigger({
|
||||
type : "record-stat",
|
||||
categorie : 'Search',
|
||||
action : keys,
|
||||
label : 'filters : '+ stringTypes.join(' ,'),
|
||||
value : json.count
|
||||
});
|
||||
|
||||
changeContent(json);
|
||||
});
|
||||
}
|
||||
@@ -133,7 +137,7 @@ MaterioSearchApiAjax = function(){
|
||||
|
||||
$.event.trigger({
|
||||
type : 'new-history-page',
|
||||
path : Drupal.settings.basePath + Drupal.settings.pathPrefix + json.search_path + '/' + json.keys,
|
||||
path : Drupal.settings.basePath + Drupal.settings.pathPrefix + json.path,
|
||||
title : json.title,
|
||||
content : json.return
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user