diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-02-01 15:57:32 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-02-01 15:57:32 +0100 |
commit | d514b1d92d7dad93ddb640829e4598fb6f49fa84 (patch) | |
tree | b650be0a3cf85194bdd92b97697ad7cc7936f62e /apps/bookmarks/js/bookmarksearch.js | |
parent | 0124809a42dd72d9c6d9b550687fa0013a88b6da (diff) | |
parent | 6583d30e26d752c5ddccb1e350e075f59b7ba75d (diff) | |
download | nextcloud-server-d514b1d92d7dad93ddb640829e4598fb6f49fa84.tar.gz nextcloud-server-d514b1d92d7dad93ddb640829e4598fb6f49fa84.zip |
Merge branch 'master' into filesystem
Diffstat (limited to 'apps/bookmarks/js/bookmarksearch.js')
-rw-r--r-- | apps/bookmarks/js/bookmarksearch.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/apps/bookmarks/js/bookmarksearch.js b/apps/bookmarks/js/bookmarksearch.js new file mode 100644 index 00000000000..e7a4fb18393 --- /dev/null +++ b/apps/bookmarks/js/bookmarksearch.js @@ -0,0 +1,22 @@ +/** + * 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(){ + OC.search.customResults['Bookm.'] = function(row,item){ + 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({ + url: jsFileLocation + 'ajax/recordClick.php', + data: 'url=' + encodeURI($(this).attr('href')), + }); +} |