I wanted a populate function like this and it didn't work that way.
populate: function(value) { return doc[ this.id ] },
So, I came up with the patch below. It looks like the rest of the
options functions get called the way I changed it, so I am not sure if
there was a specific reason that one got to be different, but I like it
better this way.
l8rZ,
--
andrew - ICQ# 253198 - Jabber: [email protected] - Twitter: @AFreshOne
Adding manpower to a late software project makes it later.
Index: share/www/script/jquery.editinline.js
===================================================================
--- share/www/script/jquery.editinline.js (revision 1022364)
+++ share/www/script/jquery.editinline.js (working copy)
@@ -15,7 +15,7 @@
function startEditing(elem, options) {
var editable = $(elem);
var origHtml = editable.html();
- var origText = options.populate($.trim(editable.text()));
+ var origText = options.populate.apply(elem, [$.trim(editable.text())]);
if (!options.begin.apply(elem, [origText])) {
return;