Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the forms file, add placeholder support #1330

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

deed02392
Copy link

Sorry this is not in separate pull requests. I've updated the forms file so you can rebuild jtable from parts.

I've also added the ability to specify a placeholder attribute value to input type text and password fields. See commit for details.

This commit fixes a bug in form dialogues where the checkbox property is not actually toggled back a second time when using the label text. The issue is caused by the use of the `checked` attribute (`.attr('checked'`) because changing this attribute is not guarenteed to update the element `checked` property. Attached is an image proving how this can arise in an updated version of Chrome. See how the attribute is present but the property does not match. This was after clicking the `span` element a second time.

Using the `.prop` method of the jQuery we use fixes this issue totally. It is suggested other usage of `attr` on checkboxes is revised.

Proof: http://i.imgur.com/KGM9LUd.png
Remove extra line space
Now the new complete file can be built
TODO: Minify and update documentation.

Added field placeholder property,

eg

```javascript
username: {
title: 'Username',
width: '20%',
create: true,
placeholder: "Optional",
key: true,
sorting: false
},

```
Tested safe back to IE6 (placeholder attribute not supported but is
simply ignored). Works on IE10+. Also tested on Chrome and several
mobile browsers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant