bootstrap-datepicker-rails 0.6.31 → 0.6.32

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module BootstrapDatepickerRails
2
2
  module Rails
3
- VERSION = "0.6.31"
3
+ VERSION = "0.6.32"
4
4
  end
5
5
  end
@@ -101,8 +101,10 @@
101
101
  this.weekEnd = ((this.weekStart + 6) % 7);
102
102
  this.startDate = -Infinity;
103
103
  this.endDate = Infinity;
104
+ this.daysOfWeekDisabled = [];
104
105
  this.setStartDate(options.startDate||this.element.data('date-startdate'));
105
106
  this.setEndDate(options.endDate||this.element.data('date-enddate'));
107
+ this.setDaysOfWeekDisabled(options.daysOfWeekDisabled||this.element.data('date-days-of-week-disabled'));
106
108
  this.fillDow();
107
109
  this.fillMonths();
108
110
  this.update();
@@ -130,7 +132,7 @@
130
132
  [this.element.find('input'), {
131
133
  focus: $.proxy(this.show, this),
132
134
  keyup: $.proxy(this.update, this),
133
- keydown: $.proxy(this.keydown, this),
135
+ keydown: $.proxy(this.keydown, this)
134
136
  }],
135
137
  [this.component, {
136
138
  click: $.proxy(this.show, this)
@@ -252,6 +254,18 @@
252
254
  this.updateNavArrows();
253
255
  },
254
256
 
257
+ setDaysOfWeekDisabled: function(daysOfWeekDisabled){
258
+ this.daysOfWeekDisabled = daysOfWeekDisabled||[];
259
+ if (!$.isArray(this.daysOfWeekDisabled)) {
260
+ this.daysOfWeekDisabled = this.daysOfWeekDisabled.split(/,\s*/);
261
+ }
262
+ this.daysOfWeekDisabled = $.map(this.daysOfWeekDisabled, function (d) {
263
+ return parseInt(d, 10);
264
+ });
265
+ this.update();
266
+ this.updateNavArrows();
267
+ },
268
+
255
269
  place: function(){
256
270
  var zIndex = parseInt(this.element.parents().filter(function() {
257
271
  return $(this).css('z-index') != 'auto';
@@ -312,7 +326,7 @@
312
326
  .text(dates[this.language].months[month]+' '+year);
313
327
  this.picker.find('tfoot th.today')
314
328
  .text(dates[this.language].today)
315
- .toggle(this.todayBtn);
329
+ .toggle(this.todayBtn !== false);
316
330
  this.updateNavArrows();
317
331
  this.fillMonths();
318
332
  var prevMonth = UTCDate(year, month-1, 28,0,0,0,0),
@@ -344,7 +358,8 @@
344
358
  if (prevMonth.valueOf() == currentDate) {
345
359
  clsName += ' active';
346
360
  }
347
- if (prevMonth.valueOf() < this.startDate || prevMonth.valueOf() > this.endDate) {
361
+ if (prevMonth.valueOf() < this.startDate || prevMonth.valueOf() > this.endDate ||
362
+ $.inArray(prevMonth.getUTCDay(), this.daysOfWeekDisabled) !== -1) {
348
363
  clsName += ' disabled';
349
364
  }
350
365
  html.push('<td class="day'+clsName+'">'+prevMonth.getUTCDate() + '</td>');
@@ -8,6 +8,6 @@
8
8
  daysShort: ["일", "월", "화", "수", "목", "금", "토", "일"],
9
9
  daysMin: ["일", "월", "화", "수", "목", "금", "토", "일"],
10
10
  months: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"],
11
- monthsShort: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"],
11
+ monthsShort: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"]
12
12
  };
13
13
  }(jQuery));
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Romanian translation for bootstrap-datepicker
3
+ * Cristian Vasile <cristi.mie@gmail.com>
4
+ */
5
+ ;(function($){
6
+ $.fn.datepicker.dates['ro'] = {
7
+ days: ["Duminică", "Luni", "Marţi", "Miercuri", "Joi", "Vineri", "Sâmbătă", "Duminică"],
8
+ daysShort: ["Dum", "Lun", "Mar", "Mie", "Joi", "Vin", "Sâm", "Dum"],
9
+ daysMin: ["Du", "Lu", "Ma", "Mi", "Jo", "Vi", "Sâ", "Du"],
10
+ months: ["Ianuarie", "Februarie", "Martie", "Aprilie", "Mai", "Iunie", "Iulie", "August", "Septembrie", "Octombrie", "Noiembrie", "Decembrie"],
11
+ monthsShort: ["Ian", "Feb", "Mar", "Apr", "Mai", "Iun", "Iul", "Aug", "Sep", "Oct", "Nov", "Dec"],
12
+ today: "Astăzi",
13
+ weekStart: 1
14
+ };
15
+ }(jQuery));
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Slovak translation for bootstrap-datepicker
3
+ * Marek Lichtner <marek@licht.sk>
4
+ */
5
+ ;(function($){
6
+ $.fn.datepicker.dates["sk"] = {
7
+ days: ["Nedeľa", "Pondelok", "Utorok", "Streda", "Štvrtok", "Piatok", "Sobota", "Nedeľa"],
8
+ daysShort: ["Ne", "Po", "Ut", "St", "Št", "Pi", "So", "Ne"],
9
+ daysMin: ["Ne", "Po", "Ut", "St", "Št", "Pi", "So", "Ne"],
10
+ months: ["Január", "Február", "Marec", "Apríl", "Máj", "Jún", "Júl", "August", "September", "Október", "November", "December"],
11
+ monthsShort: ["Jan", "Feb", "Mar", "Apr", "Máj", "Jún", "Júl", "Aug", "Sep", "Okt", "Nov", "Dec"],
12
+ today: "Dnes"
13
+ };
14
+ }(jQuery));
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: 0.6.31
4
+ version: 0.6.32
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: 2012-11-28 00:00:00.000000000 Z
12
+ date: 2012-12-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -99,7 +99,9 @@ files:
99
99
  - vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.pl.js
100
100
  - vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.pt-BR.js
101
101
  - vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.pt.js
102
+ - vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.ro.js
102
103
  - vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.ru.js
104
+ - vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.sk.js
103
105
  - vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.sl.js
104
106
  - vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.sv.js
105
107
  - vendor/assets/javascripts/bootstrap-datepicker/locales/bootstrap-datepicker.th.js
@@ -121,7 +123,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
121
123
  version: '0'
122
124
  segments:
123
125
  - 0
124
- hash: 4213993866824750986
126
+ hash: 2699915547247827324
125
127
  required_rubygems_version: !ruby/object:Gem::Requirement
126
128
  none: false
127
129
  requirements:
@@ -130,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
132
  version: '0'
131
133
  segments:
132
134
  - 0
133
- hash: 4213993866824750986
135
+ hash: 2699915547247827324
134
136
  requirements: []
135
137
  rubyforge_project:
136
138
  rubygems_version: 1.8.24