12345678910111213141516171819202122232425262728293031323334353637 |
- // @codekit-prepend "gui.js"
- (function($) {
- $('#search-api-page-search-form-grid').bind('submit', function(event) {
- trace('search submited', event);
- var keys = $(this).find('input[name*="keys"]').val(),
- id = $(this).find('input[name="id"]').val();
- trace('keys', keys);
- trace('form_id', id);
- $.getJSON('/materiobaseajax/search/'+id+'/'+keys,
- // {form_id: "theform_id", keys: "thekeys"},
- function(json){
- trace('json', json);
- if(json.return){
- $('#content').html(json.return);
- }
- });
-
- return false;
- });
-
- // select event need a patch http://drupal.org/node/365241#comment-5374686
-
- // $("input.form-text", '#search-api-page-search-form-grid').bind('autocomplete_select', function(event) {
- // trace('val', $(this).val());
- // var $form = $(this).parent('form');
- // // setTimeout(function(){
- // // $form.submit();
- // // }, 10);
- // });
- function navigate(){
-
- };
-
- })(jQuery);
|