AnanthaKN / jquery-in-place-editor

Automatically exported from code.google.com/p/jquery-in-place-editor
Other
0 stars 0 forks source link

Enhancements I Needed #53

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I am coming to your plugin in as a replacement to Script.aculo.us in place
editor.  As such your plugin lacked two things I was currently using in my
project, and I expanded the code to include these changes.

I'm submitting it for your possible inclusion in future versions.

1. I added a "input_size" setting for allowing users to define the size of
the input field.

2. I added a "full_callback" setting for allowing users to completely
replace the standard actions once the user has submitted, including
updating the original element.

I hope this helps your project, as your project has definitely helped me.

Original issue reported on code.google.com by super...@gmail.com on 7 May 2010 at 8:50

Attachments:

GoogleCodeExporter commented 8 years ago
I didn't mean for this to show up as a defect, but couldn't figure out how to 
list it
as anything else.

Original comment by super...@gmail.com on 7 May 2010 at 10:27

GoogleCodeExporter commented 8 years ago

Original comment by mhaec...@gmail.com on 11 May 2010 at 7:35

GoogleCodeExporter commented 8 years ago
I've changed it to enhancement, thanks for the patch - could you please also 
provide a unittest to go along with 
it?

I would definitely like to provide more callbacks to give the user more control 
over what is happening, so I'd love 
your input what you would like to control from the outside.

Regards!

Original comment by mhaec...@gmail.com on 11 May 2010 at 7:36

GoogleCodeExporter commented 8 years ago
I've never written a unit test for javascript or jquery.  Do you have an example
someplace I can build on?

Original comment by super...@gmail.com on 11 May 2010 at 10:28

GoogleCodeExporter commented 8 years ago
Sure, just enhance spec/unit/spec.js in the download! (For maximum comfort you 
need jspec installed, otherwise 
you can just open spec/dom.html in any browser to execute the suite.

Original comment by mhaec...@gmail.com on 13 May 2010 at 4:48

GoogleCodeExporter commented 8 years ago
So when I went looking for the unit test stuff, I realized that there had been 
an
update to the editInPlace.  I have updated my changes and integrated them into 
v2.1.1.

I have updated the spec/unit/spec.js to test my changes.

I also fixed an issue with a mozilla specific test, that failed since it hadn't 
been
updated to include a url, or callback option.

I'm not sure why but the test suite did not like running on FF3.59 @ kubuntu 
9.10. 
It never seemed to grab the right versions of the files.  Not sure if this is a
setting on my part or not.  It did work fine in Safari 4 public beta @ WinXP 
SP3.

On a side note, in the über mich section of your personal page:

http://haecker.me/trac/wiki/AboutMe

Your link to liquid democracy is out dated.  It probably should be:

http://liqd.net/static/about.html

Original comment by super...@gmail.com on 17 May 2010 at 8:32

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for the hint about the url. :-)

Original comment by mhaec...@gmail.com on 22 May 2010 at 6:15

GoogleCodeExporter commented 8 years ago
Ah, the mozilla test, yeah, i definitely need more people who are willing to 
run the tests in their browsers now 
and then. (I only have mac browsers here).

Would you be willing to step up for that that once in a while? :-)

Original comment by mhaec...@gmail.com on 22 May 2010 at 6:38

GoogleCodeExporter commented 8 years ago
I've applied the change to make input field sizeable - however I renamed the 
option to text_size to have more 
onsistency for the textarea_rows and textarea_cols settings. Thanks for that 
patch!

Original comment by mhaec...@gmail.com on 22 May 2010 at 6:40

GoogleCodeExporter commented 8 years ago
As for the full_callback part of the patch, I'm thinking about controlling the 
dom_reset with an option so you 
can do it in the normal callback. What do you think about that?

On another note, I just committed a set of delegate calls (shouldClose, 
willClose, didClose that give you the 
same level of control - though split about multiple methods.

Would that also work for you?

Regards,
Martin

Original comment by mhaec...@gmail.com on 22 May 2010 at 6:43

GoogleCodeExporter commented 8 years ago
Ok, I've applied your patch by changing it a bit. I've added the setting 
callback_skip_dom_reset that disables the 
internal dom manipulations of the editor so the callback can all do it himself.

Thanks again for your contribution and the tests. :-)

Original comment by mhaec...@gmail.com on 22 May 2010 at 7:20

GoogleCodeExporter commented 8 years ago
The didClose seems to be close to what I want to do.  Basically currently, when 
the
editor closes, I make an ajax call to save the changes, and then redraw the 
entire
div containing the element.  The total redraw is not a must, but its safer for 
my
app.  If I understand the didClose() that would give me the same basic option of
doing my ajax call after the update has been made, but would be marginally 
slower
than my current method, since I don't bother to update the original element
individually.  Thanks for adding the callback_skip_dom_reset.  I'll be sure to
integrate the next release in my app.

I'd also be willing to help test the releases in FF.  In general test I test my 
app
including your plugin in FF3.59 Kubuntu 9.10 and then do pre-release 
functionality
checks in a WinXP Virtual Machine using Chrome, Safari, IE6/7/8, and FF2.0, as 
well
as Konqueror occasionally.  I

Original comment by super...@gmail.com on 22 May 2010 at 7:26