Update the forms file, add placeholder support#1330
Open
deed02392 wants to merge 5 commits intovolosoft:masterfrom
Open
Update the forms file, add placeholder support#1330deed02392 wants to merge 5 commits intovolosoft:masterfrom
deed02392 wants to merge 5 commits intovolosoft:masterfrom
Conversation
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
Checkbox bug fix
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.