So far I have really loved using jEditable for my website.  So much so
that I am(attempting) to use it to replace the normal form interface
for a CakePHP site.  What I'm trying to do is just show the user the
normal webpage but if they want to edit anything they just click it
(jEditable).

The rub is that I will be using this a lot on any given page.  I am
having trouble trying to figure out how to code all the info jEditable
needs into each html item (<div><td> etc etc) that needs to be
jEditable.  I've included a code sample below.  Anything with 'opts.'
in front of it is a variable which can change from editable item to
editable item.    For a sense of scale I'm talking about anywhere from
20-50 items per page that might need to be editable in some way.  The
code below only shows it for a select version.

Has anyone attempted to use this on this kind of scale before?  Am I
perhaps approaching something the wrong way and making this too
difficult for myself?

I'm open to any and all help.

Thanks.

obj.editable(
                                "/cake/index.php/"+opts.saveCont+"/ajaxEdit?
isSelect=true&model="+opts.model+"&field="+opts.dispField,
                                {
                                 id             : 
'data['+opts.assocModel+'][id]',
                                 name           : 
'data['+opts.assocModel+']['+opts.field+']',
                                 type           : 'select',
                                 cancel         : '',
                                 submit         : '',
                                 tooltip        : 'Click to edit',
                                 onblur         : 'submit',
                                 style          : 'inherit',
                                 loadurl        : 
"/cake/index.php/"+opts.queryCont+"/
ajaxSelectGet?model="+opts.assocModel,
                                 submitdata : {}
                        }
                     );

Reply via email to