bootstrap-datepicker-rails 1.0.0 → 1.0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -58,19 +58,12 @@ You can fine tune the included files to suit your needs.
58
58
 
59
59
  Just call datepicker() with any selector.
60
60
 
61
- ```javascript
62
- $('.datepicker').datepicker()
63
- ```
64
-
65
- You can also use unobtrusive javascript like this:
66
-
67
- ```javascript
68
- $(document).on("focus", "[data-behaviour~='datepicker']", function(e){
69
- $(this).datepicker({"format": "yyyy-mm-dd", "weekStart": 1, "autoclose": true});
70
- });
61
+ ```html
62
+ <script type="text/javascript">
63
+ $('[data-behaviour~=datepicker]').datepicker()
64
+ </script>
71
65
 
72
66
  <input type="text" data-behaviour='datepicker' >
73
-
74
67
  ```
75
68
 
76
69
  Here is a live example:
@@ -1,5 +1,5 @@
1
1
  module BootstrapDatepickerRails
2
2
  module Rails
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.0.1"
4
4
  end
5
5
  end
@@ -57,14 +57,13 @@
57
57
 
58
58
 
59
59
  this.picker = $(DPGlobal.template)
60
- .appendTo(this.isInline ? this.element : 'body')
61
60
  .on({
62
61
  click: $.proxy(this.click, this),
63
62
  mousedown: $.proxy(this.mousedown, this)
64
63
  });
65
64
 
66
65
  if(this.isInline) {
67
- this.picker.addClass('datepicker-inline');
66
+ this.picker.addClass('datepicker-inline').appendTo(this.element);
68
67
  } else {
69
68
  this.picker.addClass('datepicker-dropdown dropdown-menu');
70
69
  }
@@ -215,6 +214,8 @@
215
214
  },
216
215
 
217
216
  show: function(e) {
217
+ if (!this.isInline)
218
+ this.picker.appendTo('body');
218
219
  this.picker.show();
219
220
  this.height = this.component ? this.component.outerHeight() : this.element.outerHeight();
220
221
  this.place();
@@ -231,7 +232,7 @@
231
232
  hide: function(e){
232
233
  if(this.isInline) return;
233
234
  if (!this.picker.is(':visible')) return;
234
- this.picker.hide();
235
+ this.picker.hide().detach();
235
236
  $(window).off('resize', this.place);
236
237
  this.viewMode = this.startViewMode;
237
238
  this.showMode();
metadata CHANGED
@@ -1,7 +1,7 @@
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.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-26 00:00:00.000000000 Z
12
+ date: 2013-03-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -186,7 +186,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
186
186
  version: '0'
187
187
  segments:
188
188
  - 0
189
- hash: 1762768020851591761
189
+ hash: -3904933935366444967
190
190
  required_rubygems_version: !ruby/object:Gem::Requirement
191
191
  none: false
192
192
  requirements:
@@ -195,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
195
195
  version: '0'
196
196
  segments:
197
197
  - 0
198
- hash: 1762768020851591761
198
+ hash: -3904933935366444967
199
199
  requirements: []
200
200
  rubyforge_project:
201
201
  rubygems_version: 1.8.25