Bootstrap-MVC #5
Open
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.
I was just going to send the html helpers but I have also included the other commits aswell as the T4 templates have been updated to use these new helpers.
There are some new editor templates (@Html.EditorFor) found under Views\Shared\EditorTemplates. The DateTime template will generate a jquery calendar picker. The string template checks the StringLength attribute and changes the size of the text box to fit.
There is a new HelperText attribute which will generate a @Html.BootstrapFormHelpTextBlockFor (maps to a Bootstrap "help-block")
Example model :-
The jquery calendar is using a twitter bootstrap theme. The bootstrap-datepicker-format.js file is currently set to dd/mm/yyyy format. Its simple to change to support other formats.
There is a new datatables (http://datatables.net) template called List-DataTables.tt. The original List.tt file still exists as an alternative.
The validation has been changed to use the bootstrap class names rather than copying the css into the equivalent asp.net mvc css classes. This is just to make maintenance easier when upgrading bootstrap. The labels also change colour when validation fails.
Anyway if you just want the extensions then that is fine.