event-handling

SharePoint Document or Item Download/View Event Handler?

亡梦爱人 提交于 2019-12-05 22:35:04
Is there any way to capture document download or item view actions in SharePoint 2010/2007? Thanks. I had a similar requirement in that I had to send an email when a document was downloaded. In WSS 3.0, I wrote an Http Module that looked at the request url and if the prefix of the request matched my document library URL, I captured that download/view. Go to Site Settings > Site Collection Administration > Site collection audit settings. Under Documents and Items, check Opening or downloading documents, viewing items in lists, or viewing item properties. 来源: https://stackoverflow.com/questions

How can I make the up and down arrow keys navigate a table's rows, and programmatically apply the sudo :hover to those rows?

大兔子大兔子 提交于 2019-12-05 21:57:10
I have an input of type text that is used to perform asynchronous table row searches using jquery. I have an .on function attached to the search input and on key down, I'm calling a function called hoverDown(). What I would like to happen when the down arrow key is pressed, is to hover over the table rows. And when a table row is hovered over with the arrow key, and the user hits enter, I would like for the href to fire and take the user to that related page. I am able to detect the e.keyCode but that's about as far as I've been able to get and I really don't know where to take it from here.

Use of ckeditor “key” CKEDITOR.instances.editor.on('key', function (e){

故事扮演 提交于 2019-12-05 21:41:55
I realize there are questions about how to implement an event handler for CKEDITOR 4. I am able to use this code to get the key-down data, but I can't seem to get the data after a key-up: CKEDITOR.instances.editor.on('key', function (e){ document.getElementById("preview").innerHTML = CKEDITOR.instances.editor.getData(); }); So when I type a string like "aaa" into the text editor field, the first character is never fetched. So my div id="preview" will only show "aa". I've iterated over the e object, which is quite complex, but nothing there strikes me as useful to solving this. I also don't see

Let parent View assume MotionEvents if child returns false

大憨熊 提交于 2019-12-05 21:40:32
I have a application that need event handling on a unusual way. For my question, let me first explain a simple case that the current event handling system of Android don't fits for me. Supposing that I have a FrameLayout (that I'll call ViewSwiper since now) that all Views added on it are MATCH_PARENT X MATCH_PARENT (that I'll call PageView), it's handles events by translating the actual View and replace it based on the direction of moving. This component I already have done and work properly ( Using Animation to swipe views ). But the problem is on that PageView I add on top of it, in case of

event.pageX not working in Firefox, but does in Chrome

孤者浪人 提交于 2019-12-05 21:36:00
I am having what I thought was a simple problem, but after about a week of searching for the solution I can't seem to find the reason behind it. Basically I am calling the function below every time the mouse is clicked, and it works fine in Chrome, but in Firefox the alert("This is not called") never gets called. I know the problem is in the two lines of code: x = event.pageX - canvas.offsetLeft; y = event.pageY - canvas.offsetTop; but can't seem to find whats wrong. Mozillas site says that event.pageX is a legitimate command to call, and as well the canvas.offsetLeft . But the function still

Should I use EventHandler<T> and/or the EventArgs delegate pattern?

ε祈祈猫儿з 提交于 2019-12-05 21:33:27
问题 Reading my C# book, it talks about using events/delegates (I am assuming I am right in thinking an event is the equivalent of a public delegate which has no member variable access) in a pattern liked by MS: public delegate Something(object o, EventArgs e) And then goes onto explain about EventArgs<T> which basically removes the need for the delegate declaration: public EventHandler<SomeEventArgs> events Which is the same as (I think) private delegate Something(object o, SomeEventArgs e);

How to add events to the individual sections(arcs) of a pie chart created out of d3.js?

半世苍凉 提交于 2019-12-05 21:10:00
This is a basic code to create a pie chart for protocol distribution. In my .csv file, I have two columns viz., protocol name and the percentage.I want to add events on individual arcs. For example, when i click only on the arc containing TCP stats, it should lead to another page. Please help how can i do this. I was able to add click event for the pie chart as whole. <!DOCTYPE html> <meta charset="utf-8"> <style> body { font: 10px sans-serif; } .arc path { stroke: #fff; } </style> <body> <script src="http://d3js.org/d3.v3.min.js"></script> <script> var width = 960, height = 500, radius = Math

Add/Remove handler to textbox

无人久伴 提交于 2019-12-05 20:28:27
问题 I am adding a handler to textbox using the following code: private void frmLogin_Load(object sender, EventArgs e) { foreach (Control tb in this.Controls) { if (tb is TextBox) { TextBox tb1 = (TextBox)tb; tb1.KeyDown += new KeyEventHandler(TextBox_KeyDown); } } } I am also removing handler using the following code: private void frmLogin_FormClosed(object sender, FormClosedEventArgs e) { foreach (Control tb in this.Controls) { if (tb is TextBox) { TextBox tb1 = (TextBox)tb; tb1.KeyDown -= new

Delphi idle handler only fires when I move the mouse

无人久伴 提交于 2019-12-05 20:02:49
I have an OnIdle handler in my D2006 app. With this code: procedure TMainForm.ApplicationEvents1Idle(Sender: TObject; var Done: Boolean); begin Inc (IdleCalls) ; Sleep (10) ; Done := False ; end ; the app runs smoothly, the idle handler is called 100 times per second, and the CPU usage is next to zero. I then added a TActionList and connected up some controls to actions, coded an Execute and Update handler. procedure TMainForm.ActionNewButtonExecute(Sender: TObject); begin DoNewProject ; end ; procedure TMainForm.ActionNewButtonUpdate(Sender: TObject); begin ActionNewButton.Enabled :=

How to remove all eventhandler

邮差的信 提交于 2019-12-05 18:47:13
问题 Lets say we have a delegate public delegate void MyEventHandler(string x); and an event handler public event MyEventHandler Something; we add multiple events.. for(int x = 0; x <10; x++) { this.Something += HandleSomething; } My question is .. how would one remove all methods from the eventhandler presuming one doesn't know its been added 10 (or more or less) times? 回答1: Simply set the event to null : this.Something = null; It will unregister all event handlers. 回答2: As pseudo idea: C#5 <