2012-01-29 18:32:33 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2012 David Iwanowitsch <david at unclouded dot de>
|
|
|
|
* This file is licensed under the Affero General Public License version 3 or
|
|
|
|
* later.
|
|
|
|
* See the COPYING-README file.
|
|
|
|
*/
|
|
|
|
$(document).ready(function(){
|
2012-01-30 17:14:09 +00:00
|
|
|
OC.search.customResults['Bookm.'] = function(row,item){
|
2012-01-29 18:32:33 +00:00
|
|
|
var a=row.find('a');
|
|
|
|
a.attr('target','_blank');
|
|
|
|
a.click(recordClick);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
function recordClick(event) {
|
|
|
|
var jsFileLocation = $('script[src*=bookmarksearch]').attr('src');
|
|
|
|
jsFileLocation = jsFileLocation.replace('js/bookmarksearch.js', '');
|
|
|
|
$.ajax({
|
2012-06-10 21:38:26 +00:00
|
|
|
type: 'POST',
|
2012-01-29 18:32:33 +00:00
|
|
|
url: jsFileLocation + 'ajax/recordClick.php',
|
|
|
|
data: 'url=' + encodeURI($(this).attr('href')),
|
|
|
|
});
|
|
|
|
}
|