materialize-sass 0.98.2 → 0.99.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/README.md +10 -1
  4. data/Rakefile +21 -3
  5. data/app/assets/fonts/roboto/Roboto-Bold.woff +0 -0
  6. data/app/assets/fonts/roboto/Roboto-Bold.woff2 +0 -0
  7. data/app/assets/fonts/roboto/Roboto-Light.woff +0 -0
  8. data/app/assets/fonts/roboto/Roboto-Light.woff2 +0 -0
  9. data/app/assets/fonts/roboto/Roboto-Medium.woff +0 -0
  10. data/app/assets/fonts/roboto/Roboto-Medium.woff2 +0 -0
  11. data/app/assets/fonts/roboto/Roboto-Regular.woff +0 -0
  12. data/app/assets/fonts/roboto/Roboto-Regular.woff2 +0 -0
  13. data/app/assets/fonts/roboto/Roboto-Thin.woff +0 -0
  14. data/app/assets/fonts/roboto/Roboto-Thin.woff2 +0 -0
  15. data/app/assets/javascripts/materialize-sprockets.js +2 -1
  16. data/app/assets/javascripts/materialize.js +9045 -5
  17. data/app/assets/javascripts/materialize/buttons.js +1 -1
  18. data/app/assets/javascripts/materialize/cards.js +13 -3
  19. data/app/assets/javascripts/materialize/carousel.js +33 -12
  20. data/app/assets/javascripts/materialize/character_counter.js +1 -1
  21. data/app/assets/javascripts/materialize/chips.js +8 -5
  22. data/app/assets/javascripts/materialize/collapsible.js +1 -1
  23. data/app/assets/javascripts/materialize/date_picker/picker.date.js +137 -136
  24. data/app/assets/javascripts/materialize/date_picker/picker.js +0 -1
  25. data/app/assets/javascripts/materialize/date_picker/picker.time.js +686 -0
  26. data/app/assets/javascripts/materialize/dropdown.js +17 -10
  27. data/app/assets/javascripts/materialize/extras/nouislider.js +1 -1
  28. data/app/assets/javascripts/materialize/extras/nouislider.min.js +1 -1
  29. data/app/assets/javascripts/materialize/forms.js +18 -12
  30. data/app/assets/javascripts/materialize/init.js +1 -0
  31. data/app/assets/javascripts/materialize/jquery.easing.1.4.js +166 -0
  32. data/app/assets/javascripts/materialize/materialbox.js +26 -17
  33. data/app/assets/javascripts/materialize/modal.js +2 -1
  34. data/app/assets/javascripts/materialize/scrollspy.js +11 -6
  35. data/app/assets/javascripts/materialize/sideNav.js +43 -13
  36. data/app/assets/javascripts/materialize/slider.js +3 -3
  37. data/app/assets/javascripts/materialize/tabs.js +10 -3
  38. data/app/assets/javascripts/materialize/tooltip.js +1 -1
  39. data/app/assets/javascripts/materialize/transitions.js +3 -3
  40. data/app/assets/javascripts/materialize/waves.js +1 -1
  41. data/app/assets/stylesheets/materialize.scss +0 -1
  42. data/app/assets/stylesheets/materialize/components/_buttons.scss +3 -8
  43. data/app/assets/stylesheets/materialize/components/_collapsible.scss +1 -0
  44. data/app/assets/stylesheets/materialize/components/_color.scss +1 -1
  45. data/app/assets/stylesheets/materialize/components/_global.scss +20 -20
  46. data/app/assets/stylesheets/materialize/components/_modal.scss +2 -2
  47. data/app/assets/stylesheets/materialize/components/_sideNav.scss +2 -0
  48. data/app/assets/stylesheets/materialize/components/_variables.scss +13 -4
  49. data/app/assets/stylesheets/materialize/components/date_picker/_default.date.scss +48 -27
  50. data/app/assets/stylesheets/materialize/components/date_picker/_default.scss +10 -0
  51. data/app/assets/stylesheets/materialize/components/date_picker/_default.time.scss +155 -13
  52. data/app/assets/stylesheets/materialize/components/forms/_input-fields.scss +12 -11
  53. data/app/assets/stylesheets/materialize/components/forms/_switches.scss +30 -17
  54. data/app/assets/stylesheets/materialize/extras/nouislider.css +1 -1
  55. data/lib/materialize-sass/version.rb +1 -1
  56. metadata +4 -14
  57. data/app/assets/fonts/roboto/Roboto-Bold.eot +0 -0
  58. data/app/assets/fonts/roboto/Roboto-Bold.ttf +0 -0
  59. data/app/assets/fonts/roboto/Roboto-Light.eot +0 -0
  60. data/app/assets/fonts/roboto/Roboto-Light.ttf +0 -0
  61. data/app/assets/fonts/roboto/Roboto-Medium.eot +0 -0
  62. data/app/assets/fonts/roboto/Roboto-Medium.ttf +0 -0
  63. data/app/assets/fonts/roboto/Roboto-Regular.eot +0 -0
  64. data/app/assets/fonts/roboto/Roboto-Regular.ttf +0 -0
  65. data/app/assets/fonts/roboto/Roboto-Thin.eot +0 -0
  66. data/app/assets/fonts/roboto/Roboto-Thin.ttf +0 -0
  67. data/app/assets/javascripts/materialize/jquery.easing.1.3.js +0 -205
  68. data/app/assets/stylesheets/materialize/components/_prefixer.scss +0 -384
@@ -1,5 +1,5 @@
1
1
  (function ($) {
2
- $(document).on('turbolinks:load', function() {
2
+ $(document).on('ready turbolinks:load', function() {
3
3
 
4
4
  // jQuery reverse
5
5
  $.fn.reverse = [].reverse;
@@ -1,8 +1,15 @@
1
1
  (function ($) {
2
- $(document).on('turbolinks:load', function() {
2
+ $(document).on('ready turbolinks:load', function() {
3
3
 
4
4
  $(document).on('click.card', '.card', function (e) {
5
5
  if ($(this).find('> .card-reveal').length) {
6
+ var $card = $(e.target).closest('.card');
7
+ if ($card.data('initialOverflow') === undefined) {
8
+ $card.data(
9
+ 'initialOverflow',
10
+ $card.css('overflow') === undefined ? '' : $card.css('overflow')
11
+ );
12
+ }
6
13
  if ($(e.target).is($('.card-reveal .card-title')) || $(e.target).is($('.card-reveal .card-title i'))) {
7
14
  // Make Reveal animate down and display none
8
15
  $(this).find('.card-reveal').velocity(
@@ -10,13 +17,16 @@
10
17
  duration: 225,
11
18
  queue: false,
12
19
  easing: 'easeInOutQuad',
13
- complete: function() { $(this).css({ display: 'none'}); }
20
+ complete: function() {
21
+ $(this).css({ display: 'none'});
22
+ $card.css('overflow', $card.data('initialOverflow'));
23
+ }
14
24
  }
15
25
  );
16
26
  }
17
27
  else if ($(e.target).is($('.card .activator')) ||
18
28
  $(e.target).is($('.card .activator i')) ) {
19
- $(e.target).closest('.card').css('overflow', 'hidden');
29
+ $card.css('overflow', 'hidden');
20
30
  $(this).find('.card-reveal').css({ display: 'block'}).velocity("stop", false).velocity({translateY: '-100%'}, {duration: 300, queue: false, easing: 'easeInOutQuad'});
21
31
  }
22
32
  }
@@ -24,6 +24,7 @@
24
24
  xform, frame, timestamp, ticker, dragged, vertical_dragged;
25
25
  var $indicators = $('<ul class="indicators"></ul>');
26
26
  var scrollingTimeout = null;
27
+ var oneTimeCallback = null;
27
28
 
28
29
 
29
30
  // Initialize
@@ -267,6 +268,12 @@
267
268
  var $curr_item = view.find('.carousel-item').eq(wrap(center));
268
269
  options.onCycleTo.call(this, $curr_item, dragged);
269
270
  }
271
+
272
+ // One time callback
273
+ if (typeof(oneTimeCallback) === "function") {
274
+ oneTimeCallback.call(this, $curr_item, dragged);
275
+ oneTimeCallback = null;
276
+ }
270
277
  }
271
278
 
272
279
  function track() {
@@ -306,7 +313,7 @@
306
313
 
307
314
  } else if (!options.fullWidth) {
308
315
  var clickedIndex = $(e.target).closest('.carousel-item').index();
309
- var diff = (center % count) - clickedIndex;
316
+ var diff = wrap(center) - clickedIndex;
310
317
 
311
318
  // Disable clicks if carousel was shifted by click
312
319
  if (diff !== 0) {
@@ -340,7 +347,9 @@
340
347
  }
341
348
 
342
349
  function tap(e) {
343
- e.preventDefault();
350
+ if (e.type === 'mousedown') {
351
+ e.preventDefault();
352
+ }
344
353
  pressed = true;
345
354
  dragged = false;
346
355
  vertical_dragged = false;
@@ -449,10 +458,14 @@
449
458
  setupEvents();
450
459
  scroll(offset);
451
460
 
452
- $(this).on('carouselNext', function(e, n) {
461
+ $(this).on('carouselNext', function(e, n, callback) {
453
462
  if (n === undefined) {
454
463
  n = 1;
455
464
  }
465
+ if (typeof(callback) === "function") {
466
+ oneTimeCallback = callback;
467
+ }
468
+
456
469
  target = (dim * Math.round(offset / dim)) + (dim * n);
457
470
  if (offset !== target) {
458
471
  amplitude = target - offset;
@@ -461,10 +474,14 @@
461
474
  }
462
475
  });
463
476
 
464
- $(this).on('carouselPrev', function(e, n) {
477
+ $(this).on('carouselPrev', function(e, n, callback) {
465
478
  if (n === undefined) {
466
479
  n = 1;
467
480
  }
481
+ if (typeof(callback) === "function") {
482
+ oneTimeCallback = callback;
483
+ }
484
+
468
485
  target = (dim * Math.round(offset / dim)) - (dim * n);
469
486
  if (offset !== target) {
470
487
  amplitude = target - offset;
@@ -473,10 +490,14 @@
473
490
  }
474
491
  });
475
492
 
476
- $(this).on('carouselSet', function(e, n) {
493
+ $(this).on('carouselSet', function(e, n, callback) {
477
494
  if (n === undefined) {
478
495
  n = 0;
479
496
  }
497
+ if (typeof(callback) === "function") {
498
+ oneTimeCallback = callback;
499
+ }
500
+
480
501
  cycleTo(n);
481
502
  });
482
503
 
@@ -485,14 +506,14 @@
485
506
 
486
507
 
487
508
  },
488
- next : function(n) {
489
- $(this).trigger('carouselNext', [n]);
509
+ next : function(n, callback) {
510
+ $(this).trigger('carouselNext', [n, callback]);
490
511
  },
491
- prev : function(n) {
492
- $(this).trigger('carouselPrev', [n]);
512
+ prev : function(n, callback) {
513
+ $(this).trigger('carouselPrev', [n, callback]);
493
514
  },
494
- set : function(n) {
495
- $(this).trigger('carouselSet', [n]);
515
+ set : function(n, callback) {
516
+ $(this).trigger('carouselSet', [n, callback]);
496
517
  }
497
518
  };
498
519
 
@@ -507,4 +528,4 @@
507
528
  $.error( 'Method ' + methodOrOptions + ' does not exist on jQuery.carousel' );
508
529
  }
509
530
  }; // Plugin end
510
- }( jQuery ));
531
+ }( jQuery ));
@@ -65,7 +65,7 @@
65
65
  }
66
66
  }
67
67
 
68
- $(document).on('turbolinks:load', function(){
68
+ $(document).on('ready turbolinks:load', function(){
69
69
  $('input, textarea').characterCounter();
70
70
  });
71
71
 
@@ -6,7 +6,7 @@
6
6
  autocompleteOptions: {},
7
7
  };
8
8
 
9
- $(document).on('turbolinks:load', function() {
9
+ $(document).on('ready turbolinks:load', function() {
10
10
  // Handle removal of static chips.
11
11
  $(document).on('click', '.chip .close', function(e){
12
12
  var $chips = $(this).closest('.chips');
@@ -149,7 +149,7 @@
149
149
  $currChips.removeClass('focus');
150
150
 
151
151
  // Remove active if empty
152
- if (!$currChips.data('chips').length) {
152
+ if ($currChips.data('chips') === undefined || !$currChips.data('chips').length) {
153
153
  $currChips.siblings('label').removeClass('active');
154
154
  }
155
155
  $currChips.siblings('.prefix').removeClass('active');
@@ -208,7 +208,7 @@
208
208
  if (label.length) {
209
209
  label.attr('for', chipId);
210
210
 
211
- if ($chips.data('chips').length) {
211
+ if ($chips.data('chips')!== undefined && $chips.data('chips').length) {
212
212
  label.addClass('active');
213
213
  }
214
214
  }
@@ -235,15 +235,18 @@
235
235
 
236
236
  var $renderedChip = $('<div class="chip"></div>');
237
237
  $renderedChip.text(elem.tag);
238
+ if (elem.image) {
239
+ $renderedChip.prepend($('<img />').attr('src', elem.image))
240
+ }
238
241
  $renderedChip.append($('<i class="material-icons close">close</i>'));
239
242
  return $renderedChip;
240
243
  };
241
244
 
242
245
  this.setPlaceholder = function($chips) {
243
- if ($chips.data('chips').length && curr_options.placeholder) {
246
+ if ($chips.data('chips') !== undefined && $chips.data('chips').length && curr_options.placeholder) {
244
247
  $chips.find('input').prop('placeholder', curr_options.placeholder);
245
248
 
246
- } else if (!$chips.data('chips').length && curr_options.secondaryPlaceholder) {
249
+ } else if (($chips.data('chips') === undefined || !$chips.data('chips').length) && curr_options.secondaryPlaceholder) {
247
250
  $chips.find('input').prop('placeholder', curr_options.secondaryPlaceholder);
248
251
  }
249
252
  };
@@ -177,7 +177,7 @@
177
177
  });
178
178
  };
179
179
 
180
- $(document).on('turbolinks:load', function(){
180
+ $(document).on('ready turbolinks:load', function(){
181
181
  $('.collapsible').collapsible();
182
182
  });
183
183
  }( jQuery ));
@@ -24,7 +24,7 @@
24
24
  */
25
25
  var DAYS_IN_WEEK = 7,
26
26
  WEEKS_IN_CALENDAR = 6,
27
- _ = Picker._
27
+ _ = Picker._;
28
28
 
29
29
 
30
30
 
@@ -1089,8 +1089,8 @@ DatePicker.prototype.nodes = function( isOpen ) {
1089
1089
  // Materialize modified
1090
1090
  if (override == "short_months")
1091
1091
  if (selectedObject != null)
1092
- return _.node( 'div', monthsCollection[ selectedObject.month ] );
1093
- else return _.node( 'div', monthsCollection[ viewsetObject.month ] );
1092
+ return monthsCollection[ selectedObject.month ];
1093
+ else return monthsCollection[ viewsetObject.month ];
1094
1094
 
1095
1095
  // If there's a need for a month selector
1096
1096
  return _.node( 'div', monthsCollection[ viewsetObject.month ], settings.klass.month )
@@ -1172,8 +1172,8 @@ DatePicker.prototype.nodes = function( isOpen ) {
1172
1172
  // Materialize modified
1173
1173
  createDayLabel = function() {
1174
1174
  if (selectedObject != null)
1175
- return _.node( 'div', selectedObject.date)
1176
- else return _.node( 'div', nowObject.date)
1175
+ return selectedObject.date
1176
+ else return nowObject.date
1177
1177
  }
1178
1178
  createWeekdayLabel = function() {
1179
1179
  var display_day;
@@ -1182,155 +1182,158 @@ DatePicker.prototype.nodes = function( isOpen ) {
1182
1182
  display_day = selectedObject.day;
1183
1183
  else
1184
1184
  display_day = nowObject.day;
1185
- var weekday = settings.weekdaysFull[ display_day ]
1185
+ var weekday = settings.weekdaysShort[ display_day ];
1186
1186
  return weekday
1187
1187
  }
1188
1188
 
1189
1189
 
1190
- // Create and return the entire calendar.
1190
+ // Create and return the entire calendar.
1191
+
1191
1192
  return _.node(
1192
1193
  // Date presentation View
1193
1194
  'div',
1194
1195
  _.node(
1196
+ // Div for Year
1195
1197
  'div',
1196
- createWeekdayLabel(),
1198
+ createYearLabel("raw") ,
1199
+ settings.klass.year_display
1200
+ )+
1201
+ _.node(
1202
+ 'span',
1203
+ createWeekdayLabel() + ', ',
1197
1204
  "picker__weekday-display"
1198
1205
  )+
1199
1206
  _.node(
1200
1207
  // Div for short Month
1201
- 'div',
1202
- createMonthLabel("short_months"),
1208
+ 'span',
1209
+ createMonthLabel("short_months") + ' ',
1203
1210
  settings.klass.month_display
1204
1211
  )+
1205
1212
  _.node(
1206
- // Div for Day
1207
- 'div',
1208
- createDayLabel() ,
1209
- settings.klass.day_display
1210
- )+
1211
- _.node(
1212
- // Div for Year
1213
- 'div',
1214
- createYearLabel("raw") ,
1215
- settings.klass.year_display
1213
+ // Div for Day
1214
+ 'span',
1215
+ createDayLabel() ,
1216
+ settings.klass.day_display
1216
1217
  ),
1217
1218
  settings.klass.date_display
1218
1219
  )+
1219
1220
  // Calendar container
1220
1221
  _.node('div',
1221
- _.node('div',
1222
- ( settings.selectYears ? createMonthLabel() + createYearLabel() : createMonthLabel() + createYearLabel() ) +
1223
- createMonthNav() + createMonthNav( 1 ),
1224
- settings.klass.header
1225
- ) + _.node(
1226
- 'table',
1227
- tableHead +
1228
- _.node(
1229
- 'tbody',
1230
- _.group({
1231
- min: 0,
1232
- max: WEEKS_IN_CALENDAR - 1,
1233
- i: 1,
1234
- node: 'tr',
1235
- item: function( rowCounter ) {
1236
-
1237
- // If Monday is the first day and the month starts on Sunday, shift the date back a week.
1238
- var shiftDateBy = settings.firstDay && calendar.create([ viewsetObject.year, viewsetObject.month, 1 ]).day === 0 ? -7 : 0
1239
-
1240
- return [
1241
- _.group({
1242
- min: DAYS_IN_WEEK * rowCounter - viewsetObject.day + shiftDateBy + 1, // Add 1 for weekday 0index
1243
- max: function() {
1244
- return this.min + DAYS_IN_WEEK - 1
1245
- },
1246
- i: 1,
1247
- node: 'td',
1248
- item: function( targetDate ) {
1249
-
1250
- // Convert the time date from a relative date to a target date.
1251
- targetDate = calendar.create([ viewsetObject.year, viewsetObject.month, targetDate + ( settings.firstDay ? 1 : 0 ) ])
1252
-
1253
- var isSelected = selectedObject && selectedObject.pick == targetDate.pick,
1254
- isHighlighted = highlightedObject && highlightedObject.pick == targetDate.pick,
1255
- isDisabled = disabledCollection && calendar.disabled( targetDate ) || targetDate.pick < minLimitObject.pick || targetDate.pick > maxLimitObject.pick,
1256
- formattedDate = _.trigger( calendar.formats.toString, calendar, [ settings.format, targetDate ] )
1257
-
1258
- return [
1259
- _.node(
1260
- 'div',
1261
- targetDate.date,
1262
- (function( klasses ) {
1263
-
1264
- // Add the `infocus` or `outfocus` classes based on month in view.
1265
- klasses.push( viewsetObject.month == targetDate.month ? settings.klass.infocus : settings.klass.outfocus )
1266
-
1267
- // Add the `today` class if needed.
1268
- if ( nowObject.pick == targetDate.pick ) {
1269
- klasses.push( settings.klass.now )
1270
- }
1271
-
1272
- // Add the `selected` class if something's selected and the time matches.
1273
- if ( isSelected ) {
1274
- klasses.push( settings.klass.selected )
1275
- }
1276
-
1277
- // Add the `highlighted` class if something's highlighted and the time matches.
1278
- if ( isHighlighted ) {
1279
- klasses.push( settings.klass.highlighted )
1280
- }
1281
-
1282
- // Add the `disabled` class if something's disabled and the object matches.
1283
- if ( isDisabled ) {
1284
- klasses.push( settings.klass.disabled )
1285
- }
1286
-
1287
- return klasses.join( ' ' )
1288
- })([ settings.klass.day ]),
1289
- 'data-pick=' + targetDate.pick + ' ' + _.ariaAttr({
1290
- role: 'gridcell',
1291
- label: formattedDate,
1292
- selected: isSelected && calendar.$node.val() === formattedDate ? true : null,
1293
- activedescendant: isHighlighted ? true : null,
1294
- disabled: isDisabled ? true : null
1295
- })
1296
- ),
1297
- '',
1298
- _.ariaAttr({ role: 'presentation' })
1299
- ] //endreturn
1300
- }
1301
- })
1302
- ] //endreturn
1303
- }
1304
- })
1305
- ),
1306
- settings.klass.table,
1307
- 'id="' + calendar.$node[0].id + '_table' + '" ' + _.ariaAttr({
1308
- role: 'grid',
1309
- controls: calendar.$node[0].id,
1310
- readonly: true
1311
- })
1312
- )
1313
- , settings.klass.calendar_container) // end calendar
1314
-
1315
- +
1316
-
1317
- // * For Firefox forms to submit, make sure to set the buttons’ `type` attributes as “button”.
1318
- _.node(
1319
- 'div',
1320
- _.node( 'button', settings.today, "btn-flat picker__today",
1321
- 'type=button data-pick=' + nowObject.pick +
1322
- ( isOpen && !calendar.disabled(nowObject) ? '' : ' disabled' ) + ' ' +
1323
- _.ariaAttr({ controls: calendar.$node[0].id }) ) +
1324
- _.node( 'button', settings.clear, "btn-flat picker__clear",
1325
- 'type=button data-clear=1' +
1326
- ( isOpen ? '' : ' disabled' ) + ' ' +
1327
- _.ariaAttr({ controls: calendar.$node[0].id }) ) +
1328
- _.node('button', settings.close, "btn-flat picker__close",
1329
- 'type=button data-close=true ' +
1330
- ( isOpen ? '' : ' disabled' ) + ' ' +
1331
- _.ariaAttr({ controls: calendar.$node[0].id }) ),
1332
- settings.klass.footer
1333
- ) //endreturn
1222
+ _.node('div',
1223
+ _.node('div',
1224
+ ( settings.selectYears ? createMonthLabel() + createYearLabel() : createMonthLabel() + createYearLabel() ) +
1225
+ createMonthNav() + createMonthNav( 1 ),
1226
+ settings.klass.header
1227
+ ) + _.node(
1228
+ 'table',
1229
+ tableHead +
1230
+ _.node(
1231
+ 'tbody',
1232
+ _.group({
1233
+ min: 0,
1234
+ max: WEEKS_IN_CALENDAR - 1,
1235
+ i: 1,
1236
+ node: 'tr',
1237
+ item: function( rowCounter ) {
1238
+
1239
+ // If Monday is the first day and the month starts on Sunday, shift the date back a week.
1240
+ var shiftDateBy = settings.firstDay && calendar.create([ viewsetObject.year, viewsetObject.month, 1 ]).day === 0 ? -7 : 0
1241
+
1242
+ return [
1243
+ _.group({
1244
+ min: DAYS_IN_WEEK * rowCounter - viewsetObject.day + shiftDateBy + 1, // Add 1 for weekday 0index
1245
+ max: function() {
1246
+ return this.min + DAYS_IN_WEEK - 1
1247
+ },
1248
+ i: 1,
1249
+ node: 'td',
1250
+ item: function( targetDate ) {
1251
+
1252
+ // Convert the time date from a relative date to a target date.
1253
+ targetDate = calendar.create([ viewsetObject.year, viewsetObject.month, targetDate + ( settings.firstDay ? 1 : 0 ) ])
1254
+
1255
+ var isSelected = selectedObject && selectedObject.pick == targetDate.pick,
1256
+ isHighlighted = highlightedObject && highlightedObject.pick == targetDate.pick,
1257
+ isDisabled = disabledCollection && calendar.disabled( targetDate ) || targetDate.pick < minLimitObject.pick || targetDate.pick > maxLimitObject.pick,
1258
+ formattedDate = _.trigger( calendar.formats.toString, calendar, [ settings.format, targetDate ] )
1259
+
1260
+ return [
1261
+ _.node(
1262
+ 'div',
1263
+ targetDate.date,
1264
+ (function( klasses ) {
1265
+
1266
+ // Add the `infocus` or `outfocus` classes based on month in view.
1267
+ klasses.push( viewsetObject.month == targetDate.month ? settings.klass.infocus : settings.klass.outfocus )
1268
+
1269
+ // Add the `today` class if needed.
1270
+ if ( nowObject.pick == targetDate.pick ) {
1271
+ klasses.push( settings.klass.now )
1272
+ }
1273
+
1274
+ // Add the `selected` class if something's selected and the time matches.
1275
+ if ( isSelected ) {
1276
+ klasses.push( settings.klass.selected )
1277
+ }
1278
+
1279
+ // Add the `highlighted` class if something's highlighted and the time matches.
1280
+ if ( isHighlighted ) {
1281
+ klasses.push( settings.klass.highlighted )
1282
+ }
1283
+
1284
+ // Add the `disabled` class if something's disabled and the object matches.
1285
+ if ( isDisabled ) {
1286
+ klasses.push( settings.klass.disabled )
1287
+ }
1288
+
1289
+ return klasses.join( ' ' )
1290
+ })([ settings.klass.day ]),
1291
+ 'data-pick=' + targetDate.pick + ' ' + _.ariaAttr({
1292
+ role: 'gridcell',
1293
+ label: formattedDate,
1294
+ selected: isSelected && calendar.$node.val() === formattedDate ? true : null,
1295
+ activedescendant: isHighlighted ? true : null,
1296
+ disabled: isDisabled ? true : null
1297
+ })
1298
+ ),
1299
+ '',
1300
+ _.ariaAttr({ role: 'presentation' })
1301
+ ] //endreturn
1302
+ }
1303
+ })
1304
+ ] //endreturn
1305
+ }
1306
+ })
1307
+ ),
1308
+ settings.klass.table,
1309
+ 'id="' + calendar.$node[0].id + '_table' + '" ' + _.ariaAttr({
1310
+ role: 'grid',
1311
+ controls: calendar.$node[0].id,
1312
+ readonly: true
1313
+ })
1314
+ )
1315
+ , settings.klass.calendar_container) // end calendar
1316
+
1317
+ +
1318
+
1319
+ // * For Firefox forms to submit, make sure to set the buttons’ `type` attributes as “button”.
1320
+ _.node(
1321
+ 'div',
1322
+ _.node( 'button', settings.today, "btn-flat picker__today waves-effect",
1323
+ 'type=button data-pick=' + nowObject.pick +
1324
+ ( isOpen && !calendar.disabled(nowObject) ? '' : ' disabled' ) + ' ' +
1325
+ _.ariaAttr({ controls: calendar.$node[0].id }) ) +
1326
+ _.node( 'button', settings.clear, "btn-flat picker__clear waves-effect",
1327
+ 'type=button data-clear=1' +
1328
+ ( isOpen ? '' : ' disabled' ) + ' ' +
1329
+ _.ariaAttr({ controls: calendar.$node[0].id }) ) +
1330
+ _.node('button', settings.close, "btn-flat picker__close waves-effect",
1331
+ 'type=button data-close=true ' +
1332
+ ( isOpen ? '' : ' disabled' ) + ' ' +
1333
+ _.ariaAttr({ controls: calendar.$node[0].id }) ),
1334
+ settings.klass.footer
1335
+ ), 'picker__container__wrapper'
1336
+ ) //endreturn
1334
1337
  } //DatePicker.prototype.nodes
1335
1338
 
1336
1339
 
@@ -1363,7 +1366,7 @@ DatePicker.defaults = (function( prefix ) {
1363
1366
  // Today and clear
1364
1367
  today: 'Today',
1365
1368
  clear: 'Clear',
1366
- close: 'Close',
1369
+ close: 'Ok',
1367
1370
 
1368
1371
  // The format to show on the `input` element
1369
1372
  format: 'd mmmm, yyyy',
@@ -1426,5 +1429,3 @@ Picker.extend( 'pickadate', DatePicker )
1426
1429
 
1427
1430
 
1428
1431
  }));
1429
-
1430
-