[英]Sharepoint 2010: Tracking Clicks on Link to a Document Content Type: Store and Update Values in a Custom List by using jQuery.
Due to several system limitations (IE8, structure of our sharepoint setup, etc...) we are unable to use the standard site analytics webpart featured in SP2010 to generate a ranking of most viewed files within any given scope of a site collection. 由于一些系统限制(IE8,我们的共享点设置的结构等),我们无法使用SP2010中提供的标准网站分析Web部件来生成网站集任何给定范围内查看最多的文件的排名。 Additionaly, all of our sharepoint libraries that are publicly visible are only accessible by means of a shortcut, ie they are all of the "link to a document file type".
另外,我们所有公开可见的共享点库都只能通过快捷方式访问,即它们都是“指向文档文件类型的链接”。 I was wondering, if anyone has experience in accomplishing the following by means of jQuery or Javascript:
我想知道,是否有人有通过jQuery或Javascript完成以下操作的经验:
The goal is to provide users with a top 10 list regarding most frequently viewed files on any given sharepoint site. 目标是向用户提供有关任何给定共享点站点上最常查看的文件的前十名列表。
Thanks upfront for any support at all! 非常感谢您的全力支持!
I would create a JavaScript file and reference it in the master page you are using to accomplish what you just described. 我将创建一个JavaScript文件,并在您用来完成您刚刚描述的内容的母版页中引用它。
Register an event on the button click, find the item in the list with the url of the link to new item, if it exists, add 1 to them value of clicks, if not then create the item with value of Clicks to 1. 在按钮单击上注册一个事件,在列表中找到具有新项目链接的URL的项目(如果存在),向其添加1的clicks值,如果不存在,则创建Clicks值为1的项目。
The sorting would be achieved by creating a view (in list settings) which sorts the list by the value of clicks, descending. 可以通过创建一个视图(在列表设置中)来实现排序,该视图按点击值(降序)对列表进行排序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.