NicolasCARPi / jquery_jeditable

jQuery edit in place plugin. Extendable via plugin architecture. Plugins for plugin. Really.
https://jeditable.elabftw.net
MIT License
1.74k stars 459 forks source link

2.0.1 -- inputcssclass not working #171

Closed thezoggy closed 6 years ago

thezoggy commented 6 years ago

setting inputcssclass does not work in 2.0.1. (actually looks like it was broke when you took over, 1.8.0+) Works fine in 1.7.3.

thezoggy commented 6 years ago

example: http://jsfiddle.net/L8a12den/

thezoggy commented 6 years ago

also to note, you never 'released' the 2.0.2 version on git, so cdnjs only goes upto 2.0.1 but nodejs you have 2.0.2 :/ https://www.npmjs.com/package/jquery-jeditable

NicolasCARPi commented 6 years ago

Hello,

First, I released 2.0.2 on github, thanks for telling me.

Second, the option inputcssclass doesn't seem to exist in the source code, in latest version or 1.7.3 I don't find the string inputcssclass, so I'm not sure why you think this option exists.

cssclass will be applied to the form element and works as expected as you can see in the demo.

thezoggy commented 6 years ago

yeah, i dont need to stylize the form i need to do the input field... but i can always apply css to the form then use > input to target the input. digging into my 1.7.3, it looks like I had a forked version which had some updates/pulls..

  * @param String  options[cssclass]  CSS class to apply to input form. 'inherit' to copy from parent. **
  * @param String  options[inputcssclass]  CSS class to apply to input. 'inherit' to copy from parent. ** // **hack** [132] css input
                // **hack** [132] css input
                if (settings.inputcssclass) {
                    if ('inherit' == settings.inputcssclass) {
                        input.attr('class', $(self).attr('class'));
                    } else {
                        input.attr('class', settings.inputcssclass);
                    }
                }
NicolasCARPi commented 6 years ago

digging into my 1.7.3, it looks like I had a forked version which had some updates/pulls..

Ok that makes sense :)

I think instead of adding yet another option it's better to use css selectors as you suggested. But if you make a PR with that code I'll accept it ;)

thezoggy commented 6 years ago

ok i'll submit it