Skip to content

Commit f149778

Browse files
Release Candidate
1 parent 24272c4 commit f149778

File tree

7 files changed

+700
-7
lines changed

7 files changed

+700
-7
lines changed

.gitignore

Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
## Ignore Visual Studio temporary files, build results, and
2+
## files generated by popular Visual Studio add-ons.
3+
4+
# User-specific files
5+
*.suo
6+
*.user
7+
*.userosscache
8+
*.sln.docstates
9+
10+
# User-specific files (MonoDevelop/Xamarin Studio)
11+
*.userprefs
12+
node_modules/
13+
bower_components/
14+
# Build results
15+
[Dd]ebug/
16+
[Dd]ebugPublic/
17+
[Rr]elease/
18+
[Rr]eleases/
19+
x64/
20+
x86/
21+
build/
22+
bld/
23+
[Bb]in/
24+
[Oo]bj/
25+
settings.json
26+
# Visual Studio 2015 cache/options directory
27+
.vs/
28+
29+
# MSTest test Results
30+
[Tt]est[Rr]esult*/
31+
[Bb]uild[Ll]og.*
32+
33+
# NUNIT
34+
*.VisualState.xml
35+
TestResult.xml
36+
37+
# Build Results of an ATL Project
38+
[Dd]ebugPS/
39+
[Rr]eleasePS/
40+
dlldata.c
41+
42+
# DNX
43+
project.lock.json
44+
artifacts/
45+
46+
*_i.c
47+
*_p.c
48+
*_i.h
49+
*.ilk
50+
*.meta
51+
*.obj
52+
*.pch
53+
*.pdb
54+
*.pgc
55+
*.pgd
56+
*.rsp
57+
*.sbr
58+
*.tlb
59+
*.tli
60+
*.tlh
61+
*.tmp
62+
*.tmp_proj
63+
*.log
64+
*.vspscc
65+
*.vssscc
66+
.builds
67+
*.pidb
68+
*.svclog
69+
*.scc
70+
71+
# Chutzpah Test files
72+
_Chutzpah*
73+
74+
# Visual C++ cache files
75+
ipch/
76+
*.aps
77+
*.ncb
78+
*.opensdf
79+
*.sdf
80+
*.cachefile
81+
82+
# Visual Studio profiler
83+
*.psess
84+
*.vsp
85+
*.vspx
86+
87+
# TFS 2012 Local Workspace
88+
$tf/
89+
90+
# Guidance Automation Toolkit
91+
*.gpState
92+
93+
# ReSharper is a .NET coding add-in
94+
_ReSharper*/
95+
*.[Rr]e[Ss]harper
96+
*.DotSettings.user
97+
98+
# JustCode is a .NET coding add-in
99+
.JustCode
100+
101+
# TeamCity is a build add-in
102+
_TeamCity*
103+
104+
# DotCover is a Code Coverage Tool
105+
*.dotCover
106+
107+
# NCrunch
108+
_NCrunch_*
109+
.*crunch*.local.xml
110+
111+
# MightyMoose
112+
*.mm.*
113+
AutoTest.Net/
114+
115+
# Web workbench (sass)
116+
.sass-cache/
117+
118+
# Installshield output folder
119+
[Ee]xpress/
120+
121+
# DocProject is a documentation generator add-in
122+
DocProject/buildhelp/
123+
DocProject/Help/*.HxT
124+
DocProject/Help/*.HxC
125+
DocProject/Help/*.hhc
126+
DocProject/Help/*.hhk
127+
DocProject/Help/*.hhp
128+
DocProject/Help/Html2
129+
DocProject/Help/html
130+
131+
# Click-Once directory
132+
publish/
133+
134+
# Publish Web Output
135+
*.[Pp]ublish.xml
136+
*.azurePubxml
137+
## TODO: Comment the next line if you want to checkin your
138+
## web deploy settings but do note that will include unencrypted
139+
## passwords
140+
#*.pubxml
141+
142+
*.publishproj
143+
144+
# NuGet Packages
145+
*.nupkg
146+
# The packages folder can be ignored because of Package Restore
147+
**/packages/*
148+
# except build/, which is used as an MSBuild target.
149+
!**/packages/build/
150+
# Uncomment if necessary however generally it will be regenerated when needed
151+
#!**/packages/repositories.config
152+
153+
# Windows Azure Build Output
154+
csx/
155+
*.build.csdef
156+
157+
# Windows Store app package directory
158+
AppPackages/
159+
160+
# Visual Studio cache files
161+
# files ending in .cache can be ignored
162+
*.[Cc]ache
163+
# but keep track of directories ending in .cache
164+
!*.[Cc]ache/
165+
166+
# Others
167+
ClientBin/
168+
[Ss]tyle[Cc]op.*
169+
~$*
170+
*~
171+
*.dbmdl
172+
*.dbproj.schemaview
173+
*.pfx
174+
*.publishsettings
175+
node_modules/
176+
orleans.codegen.cs
177+
178+
# RIA/Silverlight projects
179+
Generated_Code/
180+
181+
# Backup & report files from converting an old project file
182+
# to a newer Visual Studio version. Backup files are not needed,
183+
# because we have git ;-)
184+
_UpgradeReport_Files/
185+
Backup*/
186+
UpgradeLog*.XML
187+
UpgradeLog*.htm
188+
189+
# SQL Server files
190+
*.mdf
191+
*.ldf
192+
193+
# Business Intelligence projects
194+
*.rdl.data
195+
*.bim.layout
196+
*.bim_*.settings
197+
198+
# Microsoft Fakes
199+
FakesAssemblies/
200+
201+
# Node.js Tools for Visual Studio
202+
.ntvs_analysis.dat
203+
204+
# Visual Studio 6 build log
205+
*.plg
206+
207+
# Visual Studio 6 workspace options file
208+
*.opt
209+
210+
# LightSwitch generated files
211+
GeneratedArtifacts/
212+
_Pvt_Extensions/
213+
ModelManifest.xml

README.md

Lines changed: 46 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,65 @@
11
# Bootstrap Htmg fallback
22
A Twitter Bootstrap based Html5 input fallback. It adds Bootstrap widgets to the
33
[mvcct-enhancer](https://github.com/MvcControlsToolkit/mvcct-enhancer) basic Html5 input fallback module.
4-
Thus it depends on both the mvcct.enhancer.js, and mvcct.enhancer.input.basic.js [mvcct-enhancer](https://github.com/MvcControlsToolkit/mvcct-enhancer) modules.
4+
Thus it depends on both the `mvcct.enhancer.js `, and `mvcct.enhancer.input.basic.js` [mvcct-enhancer](https://github.com/MvcControlsToolkit/mvcct-enhancer) modules.
55
It is enough to load the bootstrap.html5.fallback.js, and the selected bootstrap widgets (listed below) to enrich mvcct-enhancer html5 fallback with botsstrap modules.
66
More specifically, date-picker, date-time-picker, numeric-range, and color-picker
7-
widgets are added as needed to the falled back Html5 inputs.
7+
widgets are added as needed to the falled back Html5 inputs. Please, don't forget that Html5 inputs fallback is activated
8+
bya calling the `mvcct.enhancer.addBasicInput` method and passing it a [Globalize](https://github.com/jquery/globalize) object.
89

910
Widget options are added to the overall mvcct-enhancer options object.
1011
Please refer to the [mvcct-enhancer](https://github.com/MvcControlsToolkit/mvcct-enhancer)
1112
for the usage of the mvcct-enhancer module. Below, all selected bootstrap widgets, and the loacation theyr options are placed.
1213
All widgets(as well as mvcct-enhancer) are registered as dependencies, so if you use either nmp, or bower you will them have
13-
automatically installed when you install bootstrap-html5-fallback:
14+
automatically installed when you install `bootstrap-html5-fallback`:
1415

1516
1. Date-picker: [smalot-bootstrap-datetimepicker](https://github.com/smalot/bootstrap-datetimepicker). Options placed in options property: `html5FallbackWidgets.date`
1617
2. Time-picker: [smalot-bootstrap-datetimepicker](https://github.com/smalot/bootstrap-datetimepicker). Options placed in options property: `html5FallbackWidgets.time`
1718
3. Date-time-picker: [smalot-bootstrap-datetimepicker](https://github.com/smalot/bootstrap-datetimepicker). Options placed in options property: `html5FallbackWidgets.datetime`
18-
4. Color-picker: [mjolnic-bootstrap-colorpicker](https://github.com/mjolnic/bootstrap-colorpicker).Options placed in options property: `html5FallbackWidgets.color`
19-
5. Numeric-range [seiyria-bootstrap-slider](https://github.com/seiyria/bootstrap-slider).Options placed in options property: `html5FallbackWidgets.range`
19+
4. Week-picker: [smalot-bootstrap-datetimepicker](https://github.com/smalot/bootstrap-datetimepicker). Options placed in options property: `html5FallbackWidgets.week`
20+
5. Month-picker: [smalot-bootstrap-datetimepicker](https://github.com/smalot/bootstrap-datetimepicker). Options placed in options property: `html5FallbackWidgets.month`
21+
6. Color-picker: [mjolnic-bootstrap-colorpicker](https://github.com/mjolnic/bootstrap-colorpicker).Options placed in options property: `html5FallbackWidgets.color`.
22+
**Important**, we added a new option to the colorpicker, namely: `makeComponent` that when `true` transforms the input fields into a bootstrap component,
23+
so that the selected color is shown to the right of it. As a default this option is `false`;
24+
7. Numeric-range [seiyria-bootstrap-slider](https://github.com/seiyria/bootstrap-slider).Options placed in options property: `html5FallbackWidgets.range`
25+
26+
The enhancemet of a falled back Html5 input with one of the above widget may be prevented by setting to `null` its associated `enhance` property in the `mvcct-enhancer` options object:
27+
28+
```
29+
var options = {};
30+
options.browserSupport = {
31+
cookie: "_browser_basic_capabilities",
32+
forms: null,
33+
fallbacks: {
34+
number: {
35+
force: true
36+
}
37+
...
38+
...
39+
},
40+
handlers: {
41+
enhance: {
42+
datetime: null
43+
}
44+
}
45+
};
46+
47+
mvcct.enhancer.waitAsync(options);
48+
```
49+
50+
For more information about the `mvcct-enhancer` options object please refer to [mvcct-enhancer documentation](https://github.com/MvcControlsToolkit/mvcct-enhancer).
51+
52+
**Important**, when using this module please avoid specifying two different formats for dates end datetimes in the mvcc-enhancer .editFormats
53+
options property since date/time pickers just support one format, so the usage of the second format might create problems
54+
with these widgets.
2055

2156
Some options property, when supported by the widgets are outomatically
2257
filled by the fallback module. Namely:
23-
* date and time formats, if possible, are extracted from the options `editFormats` and from the current locale.
58+
* date and time formats, are extracted from the options `editFormats` and from the current locale.
2459
* initial input value, and min/max/ step property when supported by the widget are automatically filled
2560
with the original Html5 input corresponding property values.
26-
(converted in the current locale when needed by the widget).
61+
(converted in the current locale when needed by the widget).
62+
* the range/slider widget formatter property has been used to localize the numbers shown in labels.
63+
However, the developer may override this function.
64+
* the color-picker format is set to hexadecimal (hex) since this is the format used by native pickers.
65+
However, the developer may override this setting.

0 commit comments

Comments
 (0)