bootstrap-datepicker-rails 1.0.0.6 → 1.0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19104dfe3f94c50ba9fbd11789fbf7212bd1db27
|
4
|
+
data.tar.gz: 6e77b100cd5d0b9762e24917a3f0aebb74c8bd67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8714d1d79e78e68fb349779aaa3e69a3221db879eac25e340df87aae8251a92758856d417ab3a1adf9f32717f45eec7d68ccf36a989c60cfc9f1b5f14d9fcddc
|
7
|
+
data.tar.gz: 32529e4389a5b4ebe7e46336b27030a22470d0dd974858f1d0cc9fb57d22902f794542409a00571c2e1f9fecf0d2a0dfe0741bbfc4b04747baf87decf214a760
|
data/Rakefile
CHANGED
@@ -2,8 +2,7 @@
|
|
2
2
|
|
3
3
|
desc "Update assets"
|
4
4
|
task :update do
|
5
|
-
|
6
|
-
if Dir.exist?('bootstrap-datepicker-src')
|
5
|
+
if Dir.exist?('bootstrap-datepicker-src')
|
7
6
|
system("cd bootstrap-datepicker-src && git pull && cd ..")
|
8
7
|
else
|
9
8
|
system("git clone git://github.com/eternicode/bootstrap-datepicker.git bootstrap-datepicker-src")
|
@@ -11,17 +10,19 @@ task :update do
|
|
11
10
|
system("cp bootstrap-datepicker-src/css/datepicker.css vendor/assets/stylesheets/bootstrap-datepicker.css")
|
12
11
|
system("cp bootstrap-datepicker-src/js/bootstrap-datepicker.js vendor/assets/javascripts/bootstrap-datepicker/core.js")
|
13
12
|
system("cp -R bootstrap-datepicker-src/js/locales/ vendor/assets/javascripts/bootstrap-datepicker/locales/")
|
14
|
-
system("git status")
|
13
|
+
system("git status")
|
15
14
|
end
|
16
15
|
|
17
16
|
desc "Build"
|
18
|
-
task "build" do
|
17
|
+
task "build" do
|
19
18
|
system("gem build bootstrap-datepicker-rails.gemspec")
|
20
19
|
end
|
21
20
|
|
22
21
|
desc "Build and publish the gem"
|
23
|
-
task :publish => :build do
|
22
|
+
task :publish => :build do
|
24
23
|
require File.expand_path('../lib/bootstrap-datepicker-rails/version', __FILE__)
|
25
|
-
|
26
|
-
system("git
|
24
|
+
tags = `git tag`
|
25
|
+
system("git tag #{BootstrapDatepickerRails::Rails::VERSION}") unless tags =~ /#{BootstrapDatepickerRails::Rails::VERSION}/
|
26
|
+
system("gem push bootstrap-datepicker-rails-#{BootstrapDatepickerRails::Rails::VERSION}.gem")
|
27
|
+
system("git push --tags")
|
27
28
|
end
|
@@ -235,6 +235,21 @@
|
|
235
235
|
_detachSecondaryEvents: function(){
|
236
236
|
this._unapplyEvents(this._secondaryEvents);
|
237
237
|
},
|
238
|
+
_trigger: function(event, altdate){
|
239
|
+
var date = altdate || this.date;
|
240
|
+
date = new Date(date.getTime() + (date.getTimezoneOffset()*60000));
|
241
|
+
|
242
|
+
this.element.trigger({
|
243
|
+
type: event,
|
244
|
+
date: date,
|
245
|
+
format: $.proxy(function(altformat){
|
246
|
+
var format = this.format;
|
247
|
+
if (altformat)
|
248
|
+
format = DPGlobal.parseFormat(altformat);
|
249
|
+
return DPGlobal.formatDate(date, format, this.language);
|
250
|
+
}, this)
|
251
|
+
});
|
252
|
+
},
|
238
253
|
|
239
254
|
show: function(e) {
|
240
255
|
if (!this.isInline)
|
@@ -246,10 +261,7 @@
|
|
246
261
|
if (e) {
|
247
262
|
e.preventDefault();
|
248
263
|
}
|
249
|
-
this.
|
250
|
-
type: 'show',
|
251
|
-
date: this.date
|
252
|
-
});
|
264
|
+
this._trigger('show');
|
253
265
|
},
|
254
266
|
|
255
267
|
hide: function(e){
|
@@ -268,10 +280,7 @@
|
|
268
280
|
)
|
269
281
|
)
|
270
282
|
this.setValue();
|
271
|
-
this.
|
272
|
-
type: 'hide',
|
273
|
-
date: this.date
|
274
|
-
});
|
283
|
+
this._trigger('hide');
|
275
284
|
},
|
276
285
|
|
277
286
|
remove: function() {
|
@@ -641,10 +650,7 @@
|
|
641
650
|
var month = target.parent().find('span').index(target);
|
642
651
|
var year = this.viewDate.getUTCFullYear();
|
643
652
|
this.viewDate.setUTCMonth(month);
|
644
|
-
this.
|
645
|
-
type: 'changeMonth',
|
646
|
-
date: this.viewDate
|
647
|
-
});
|
653
|
+
this._trigger('changeMonth', this.viewDate);
|
648
654
|
if ( this.minViewMode == 1 ) {
|
649
655
|
this._setDate(UTCDate(year, month, day,0,0,0,0));
|
650
656
|
}
|
@@ -653,10 +659,7 @@
|
|
653
659
|
var day = 1;
|
654
660
|
var month = 0;
|
655
661
|
this.viewDate.setUTCFullYear(year);
|
656
|
-
this.
|
657
|
-
type: 'changeYear',
|
658
|
-
date: this.viewDate
|
659
|
-
});
|
662
|
+
this._trigger('changeYear', this.viewDate);
|
660
663
|
if ( this.minViewMode == 2 ) {
|
661
664
|
this._setDate(UTCDate(year, month, day,0,0,0,0));
|
662
665
|
}
|
@@ -699,10 +702,7 @@
|
|
699
702
|
this.viewDate = date;
|
700
703
|
this.fill();
|
701
704
|
this.setValue();
|
702
|
-
this.
|
703
|
-
type: 'changeDate',
|
704
|
-
date: this.date
|
705
|
-
});
|
705
|
+
this._trigger('changeDate');
|
706
706
|
var element;
|
707
707
|
if (this.isInput) {
|
708
708
|
element = this.element;
|
@@ -838,10 +838,7 @@
|
|
838
838
|
break;
|
839
839
|
}
|
840
840
|
if (dateChanged){
|
841
|
-
this.
|
842
|
-
type: 'changeDate',
|
843
|
-
date: this.date
|
844
|
-
});
|
841
|
+
this._trigger('changeDate');
|
845
842
|
var element;
|
846
843
|
if (this.isInput) {
|
847
844
|
element = this.element;
|
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.7
|
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-05-
|
11
|
+
date: 2013-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: pry
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
description: A date picker for Twitter Bootstrap
|
56
70
|
email:
|
57
71
|
- siotopo@gmail.com
|