bootstrap-datepicker-rails 1.0.0.4 → 1.0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -11
- data/lib/bootstrap-datepicker-rails/version.rb +1 -1
- data/vendor/assets/javascripts/bootstrap-datepicker/core.js +20 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ba1abfa642e1eacd1a1b297808b2bbb44416e8f
|
4
|
+
data.tar.gz: 9fc76aff52838f120efea7b1a0a5c21eda58d143
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f88ac51f05dfce7edd5bdd99e326dbaa57c737dfe3925ed46348e5eb6b1df9b00c3ae73fa89edb0343df4f7bbad1ae5c66ff23586d2d41224d4044ec5711dbdf
|
7
|
+
data.tar.gz: e40798409f4aa4ccbf936ab87c284391571c7da76e1a690f6a1dffcbb3a8be6900f0963836901617094e29df2609469cfe4d70bb7708820bb5510a0863b36dd9
|
data/README.md
CHANGED
@@ -1,19 +1,9 @@
|
|
1
1
|
# Bootstrap Datepicker for Rails
|
2
|
-
Bootstrap is a toolkit from Twitter designed to kickstart development of webapps and sites.
|
3
|
-
It includes base CSS and HTML for typography, forms, buttons, tables, grids, navigation, and more.
|
4
2
|
|
5
|
-
|
6
|
-
|
7
|
-
Bootstrap Datepicker is a plugin for Bootstrap designed by Stefan Petre. It provides a stylish date picker for Bootstrap.
|
8
|
-
|
9
|
-
http://www.eyecon.ro/bootstrap-datepicker/
|
10
|
-
|
11
|
-
bootstrap-datepicker-rails project integrates Datepicker with Rails 3 assets pipeline.
|
3
|
+
bootstrap-datepicker-rails project integrates a datepicker with Rails 3 assets pipeline.
|
12
4
|
|
13
5
|
http://github.com/Nerian/bootstrap-datepicker-rails
|
14
6
|
|
15
|
-
It also integrates the improvements made by Andrew Rowls.
|
16
|
-
|
17
7
|
https://github.com/eternicode/bootstrap-datepicker
|
18
8
|
|
19
9
|
## Rails > 3.1
|
@@ -133,6 +133,7 @@
|
|
133
133
|
this.startDate = -Infinity;
|
134
134
|
this.endDate = Infinity;
|
135
135
|
this.daysOfWeekDisabled = [];
|
136
|
+
this.beforeShowDay = options.beforeShowDay || $.noop;
|
136
137
|
this.setStartDate(options.startDate||this.element.data('date-startdate'));
|
137
138
|
this.setEndDate(options.endDate||this.element.data('date-enddate'));
|
138
139
|
this.setDaysOfWeekDisabled(options.daysOfWeekDisabled||this.element.data('date-days-of-week-disabled'));
|
@@ -466,7 +467,8 @@
|
|
466
467
|
startMonth = this.startDate !== -Infinity ? this.startDate.getUTCMonth() : -Infinity,
|
467
468
|
endYear = this.endDate !== Infinity ? this.endDate.getUTCFullYear() : Infinity,
|
468
469
|
endMonth = this.endDate !== Infinity ? this.endDate.getUTCMonth() : Infinity,
|
469
|
-
currentDate = this.date && this.date.valueOf()
|
470
|
+
currentDate = this.date && this.date.valueOf(),
|
471
|
+
tooltip;
|
470
472
|
this.picker.find('.datepicker-days thead th.datepicker-switch')
|
471
473
|
.text(dates[this.language].months[month]+' '+year);
|
472
474
|
this.picker.find('tfoot th.today')
|
@@ -504,7 +506,23 @@
|
|
504
506
|
}
|
505
507
|
clsName = this.getClassNames(prevMonth);
|
506
508
|
clsName.push('day');
|
507
|
-
|
509
|
+
|
510
|
+
var before = this.beforeShowDay(prevMonth);
|
511
|
+
if (before === undefined)
|
512
|
+
before = {};
|
513
|
+
else if (typeof(before) === 'boolean')
|
514
|
+
before = {enabled: before};
|
515
|
+
else if (typeof(before) === 'string')
|
516
|
+
before = {classes: before};
|
517
|
+
if (before.enabled === false)
|
518
|
+
clsName.push('disabled');
|
519
|
+
if (before.classes)
|
520
|
+
clsName = clsName.concat(before.classes.split(/\s+/));
|
521
|
+
if (before.tooltip)
|
522
|
+
tooltip = before.tooltip;
|
523
|
+
|
524
|
+
clsName = $.unique(clsName);
|
525
|
+
html.push('<td class="'+clsName.join(' ')+'"' + (tooltip ? ' title="'+tooltip+'"' : '') + '>'+prevMonth.getUTCDate() + '</td>');
|
508
526
|
if (prevMonth.getUTCDay() == this.weekEnd) {
|
509
527
|
html.push('</tr>');
|
510
528
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootstrap-datepicker-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gonzalo Rodríguez-Baltanás Díaz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -184,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
184
184
|
version: '0'
|
185
185
|
requirements: []
|
186
186
|
rubyforge_project:
|
187
|
-
rubygems_version: 2.0.
|
187
|
+
rubygems_version: 2.0.2
|
188
188
|
signing_key:
|
189
189
|
specification_version: 4
|
190
190
|
summary: A date picker for Twitter Bootstrap
|