I am using jQuery editinPlace plugin, the default way of doing edit in place is using a click event on a selector, but the way I am trying to do is through context menu which calls a function "rename();". So how do I block the inline edit on click event. Please share some idea on how to do this...
$('.context').editInPlace({
callback: function(idOfEditor) {
var renameUrl = "http://www.google.com/"+tablerowId+"/"+enteredText+"";
return enteredText;
}
});
Open the /jquery.editinplace.js source file. (Online version > http://code.google.com/p/jquery-in-place-editor/source/browse/trunk/lib/jquery.editinplace.js)
In the first function declaration
$.fn.editInPlace
Line#26, change the following line :into >
Now inside the click event of your context menu function, call this >
make sure the pass the 'e' into it.
and in the rename function >
works like a charm !
EDIT:
To ensure that you don't allow user to active editor by clicking on the para itself > use this code :
and add the delegates in your initialization>