AnanthaKN / jquery-in-place-editor

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

PATCH: add text_maxlength attribute to field_type = text #49

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Currently, there is no maxlength attribute for field_type=text, while there
are textarea_cols and textarea_rows for field_type=textarea

This patch add this attribute, setting a default of maxlength=30.

Example of usage:
$("#myelement").editInPlace({
   input_maxlength: 10
})

Another way to do it would be to set the text_maxlength variable to False,
and add settings.maxlength to the field only if its value is not False
(this means that if the user doesn't specify text_maxlength, no maxlength
attribute will be inserted).

Thank you for your work,
Roberto

Original issue reported on code.google.com by roberto....@gmail.com on 26 Apr 2010 at 11:17

Attachments:

GoogleCodeExporter commented 8 years ago
I've added a width css property to the .inplace_field class to do the same 
thing.
Works without needing to patch any code.

Great script btw!

Thanks,
Paul Catlin

Original comment by pcat...@gmail.com on 17 May 2010 at 2:35

GoogleCodeExporter commented 8 years ago
Thanks pcatlin!

I'd also recommend to go the css route.

@reporter: Please feel free to reopen this issue if you can't achieve what you 
want with css.

Original comment by mhaec...@gmail.com on 22 May 2010 at 4:55