diff --git a/Gemfile.lock b/Gemfile.lock index 37a4047d..1884f2e5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -304,7 +304,7 @@ GEM activesupport (= 4.0.4) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (10.1.1) + rake (10.2.2) rest-client (1.6.7) mime-types (>= 1.16) rqrcode (0.4.2) diff --git a/app/assets/javascripts/supplier/app/templates/active_list.emblem b/app/assets/javascripts/supplier/app/templates/active_list.emblem index 1902b15c..ca6271ff 100644 --- a/app/assets/javascripts/supplier/app/templates/active_list.emblem +++ b/app/assets/javascripts/supplier/app/templates/active_list.emblem @@ -1,4 +1,4 @@ -td.list-status +td.status-icons if view.content.needs_help span.icon.needs-help if view.content.needs_payment @@ -11,9 +11,9 @@ td.actions if view.content.needs_help button.mark_list_as_helped{ action markListAsHelped view.content.id} span.fa-stack - i.fa.fa-bell.fa-stack-1x + /i.fa.fa-bell.fa-stack-1x i.fa.fa-ban.fa-stack-2x.revoke - span.button-text=t 'list.is_helped_button' + /span.button-text=t 'list.is_helped_button' button.close_list{ action closeList view.content.id} span.fa.fa-times.fa-2x span.button-text=t 'list.close_list' diff --git a/app/assets/javascripts/supplier/app/templates/active_order.emblem b/app/assets/javascripts/supplier/app/templates/active_order.emblem index 225fc00d..bb0afd75 100644 --- a/app/assets/javascripts/supplier/app/templates/active_order.emblem +++ b/app/assets/javascripts/supplier/app/templates/active_order.emblem @@ -7,13 +7,13 @@ td.section_title {{view.content.section.title}} td.currency {{currency view.content.total }} td.actions if view.content.placed - button{ action markOrderActive view.content.id} + button.mark_order_active{ action markOrderActive view.content.id} span.fa.fa-check.fa-2x span.button-text=t 'order.being_processed' button.hide.mark-order-active{ action markOrderActive view.content.id} span.button-icon span.button-text=t 'order.being_processed' - button{ action markOrderDelivered view.content.id} + button.mark_order_delivered{ action markOrderDelivered view.content.id} span.fa-shifted-stack i.fa.fa-check.fa-2x i.fa.fa-check.fa-2x diff --git a/app/assets/javascripts/supplier/foundation1/initializer.js.coffee b/app/assets/javascripts/supplier/foundation1/initializer.js.coffee index baad98cc..80864547 100644 --- a/app/assets/javascripts/supplier/foundation1/initializer.js.coffee +++ b/app/assets/javascripts/supplier/foundation1/initializer.js.coffee @@ -125,3 +125,8 @@ $ -> else menu.show().animate left: 0 toggle.animate left: 222 - 30, -> $(@).addClass('open') + + # Hide alert boxes on click + $(document).on 'click', '.general-alerts .alert-box', -> $(@).slideUp() + + $(document).on 'click', '.supplier-is-closed', -> $(@).slideUp() diff --git a/app/assets/javascripts/supplier/foundation1/qsupplier.js.coffee b/app/assets/javascripts/supplier/foundation1/qsupplier.js.coffee index 5a23dce5..707e9dbf 100644 --- a/app/assets/javascripts/supplier/foundation1/qsupplier.js.coffee +++ b/app/assets/javascripts/supplier/foundation1/qsupplier.js.coffee @@ -47,6 +47,10 @@ root.Qsupplier= else if e.event == 'order_being_delivered' $('.order-row-'+e.data.id).remove() $('.section-table-list-'+e.data.list_id).removeClass('active_order') + else if e.event == 'orders_in_process_count' + $('.supplier-orders-in-process-count').text e.data.count + else if e.event == 'orders_placed_count' + $('.supplier-orders-placed-count').text e.data.count else if e.event == 'list_changed_table' Qsupplier.App && Qsupplier.App.List.updateOrAdd(e.data.list) @@ -69,7 +73,6 @@ root.Qsupplier= #to_table.addClass('needs_payment') if list.needs_payment() #to_table.addClass('active_order') if list.has_active_orders() #from_table.removeClass('occupied needs_help needs_payment active_order section-table-list-'+list.id()) - console.log(e) false move_table_to_active_section: (table_id)-> table_container = $('#section-table-'+table_id) diff --git a/app/assets/stylesheets/supplier/foundation1/dashboard.css.sass b/app/assets/stylesheets/supplier/foundation1/dashboard.css.sass new file mode 100644 index 00000000..91ee5536 --- /dev/null +++ b/app/assets/stylesheets/supplier/foundation1/dashboard.css.sass @@ -0,0 +1,15 @@ +@import foundation_and_overrides + +.active-lists-table + width: 100% + .mark_list_as_helped + +button-icon-only + .close_list + +button-icon-only + +.active-orders-table + width: 100% + .mark_order_active + +button-icon-only + .mark_order_delivered + +button-icon-only diff --git a/app/assets/stylesheets/supplier/foundation1/menu_main.css.sass b/app/assets/stylesheets/supplier/foundation1/menu_main.css.sass index 8842a7c9..8d325328 100644 --- a/app/assets/stylesheets/supplier/foundation1/menu_main.css.sass +++ b/app/assets/stylesheets/supplier/foundation1/menu_main.css.sass @@ -24,6 +24,8 @@ header.top-menu float: left @media #{$medium-up} padding-left: 14px + a + padding-left: 16px &.extra-info float: right .supplier-info-row diff --git a/app/assets/stylesheets/supplier/foundation1/menu_side.css.sass b/app/assets/stylesheets/supplier/foundation1/menu_side.css.sass index 9034f44e..e0396574 100644 --- a/app/assets/stylesheets/supplier/foundation1/menu_side.css.sass +++ b/app/assets/stylesheets/supplier/foundation1/menu_side.css.sass @@ -7,6 +7,7 @@ aside.side-menu top: 0 width: 222px height: 100% + z-index: 50 > ul list-style: none a diff --git a/app/assets/stylesheets/supplier/foundation1/product_categories.css.sass b/app/assets/stylesheets/supplier/foundation1/product_categories.css.sass index 4fc13fdc..bee7500f 100644 --- a/app/assets/stylesheets/supplier/foundation1/product_categories.css.sass +++ b/app/assets/stylesheets/supplier/foundation1/product_categories.css.sass @@ -20,7 +20,7 @@ // Full day active is not special, highlight when not active, // because it indicates the being active of a time range color: #444 - + #sub-day-container display: inline-block &.hide diff --git a/app/assets/stylesheets/supplier/foundation1/structure.css.sass b/app/assets/stylesheets/supplier/foundation1/structure.css.sass index b5f6f46b..c3137ba1 100644 --- a/app/assets/stylesheets/supplier/foundation1/structure.css.sass +++ b/app/assets/stylesheets/supplier/foundation1/structure.css.sass @@ -1,6 +1,9 @@ $side-spacing: 0px @import constants @import ./foundation_and_overrides +@mixin table-fit + width: 1px + white-space: nowrap html body label @@ -11,9 +14,16 @@ body &.number width: 40px .supplier-is-closed - .alert - form - margin: 0 + +alert($bg: $secondary-color) + .close + +alert-close + .open-supplier-button + +button($padding: $button-tny) + margin: 0 + margin-left: 20px + form + margin: 0 + display: inline-block .location_picker_search float: left .draggable @@ -54,3 +64,12 @@ main.main-section .hide, .hidden display: none +table + &.table + // Bootstrap behaviour + width: 100% + td.actions, th.actions + text-align: right + +table-fit + th.status-icons, td.status-icons + +table-fit diff --git a/app/models/list.rb b/app/models/list.rb index 7b77482c..4c3c531e 100644 --- a/app/models/list.rb +++ b/app/models/list.rb @@ -11,7 +11,7 @@ class List property :price, type: Float property :is_paid, type: :boolean, default: false property :paid_at, type: Time - property :user_requests_closing, :boolean, default: false + property :user_requests_closing, type: :boolean, default: false has_many :orders, dependent: :destroy belongs_to :table diff --git a/app/views/layouts/tablet.html.slim b/app/views/layouts/tablet.html.slim index 2246661f..dfb7b11c 100644 --- a/app/views/layouts/tablet.html.slim +++ b/app/views/layouts/tablet.html.slim @@ -21,22 +21,21 @@ html lang="en" main.main-section .container .content.main-content - - if flash[:alert].present? - .alert.alert-error - a.close data-dismiss="alert" × - div= flash[:alert] - - if flash[:notice].present? - .alert.alert-success - a.close data-dismiss="alert" × - div= flash[:notice] + .general-alerts + - if flash[:alert].present? + .alert-box.warning + div= flash[:alert] + a.close data-dismiss="alert" × + - if flash[:notice].present? + .alert-box + div= flash[:notice] + a.close data-dismiss="alert" × - if current_supplier.closed? - .row.supplier-is-closed - .span12 - .alert.alert-block - button.close{data-dismiss="alert"} x - p = t('supplier.you_are_currently_closed_alert') - = form_tag supplier_mark_as_open_path do - = submit_tag t('supplier.mark_as_open_button'), class: [:btn, 'btn-primary'] + .supplier-is-closed + = t('supplier.you_are_currently_closed_alert') + = form_tag supplier_mark_as_open_path do + = submit_tag t('supplier.mark_as_open_button'), class: ['open-supplier-button'] + a.close{data-dismiss="alert"} × .row .span12 = content_for?(:content) ? yield(:content) : yield diff --git a/lib/qwaiter/counter.rb b/lib/qwaiter/counter.rb index ba01f7a4..bdd4b2fd 100644 --- a/lib/qwaiter/counter.rb +++ b/lib/qwaiter/counter.rb @@ -4,20 +4,21 @@ module Qwaiter # mainly for testing purposes def self.set(key, value) - connection.set(key, value) + connection.set(key, value) rescue value end def self.get(key) - connection.get(key, quiet: true).to_i + connection.get(key, quiet: true).to_i rescue 0 end def self.incr(key, options = {}) options[:initial] ||= 0 - connection.incr(key, options) + connection.incr(key, options) rescue 1 end def self.decr(key, options = {}) - connection.decr(key, options) + options[:initial] ||= 0 + connection.decr(key, options) rescue 0 end end end diff --git a/vendor/assets/pickdate/pickdate.css.sass b/vendor/assets/pickdate/pickdate.css.sass new file mode 100644 index 00000000..3d03a12d --- /dev/null +++ b/vendor/assets/pickdate/pickdate.css.sass @@ -0,0 +1,3 @@ +//= require ./themes/default +//= require ./themes/default.date +//= require ./themes/default.time diff --git a/vendor/assets/pickdate/pickdate.js.coffee b/vendor/assets/pickdate/pickdate.js.coffee new file mode 100644 index 00000000..467f2b45 --- /dev/null +++ b/vendor/assets/pickdate/pickdate.js.coffee @@ -0,0 +1,6 @@ +#= require_self +#= require ./picker +#= require ./picker.date +#= require ./picker.time +#= require_directory ./translations +@$pickadate_translations = {} diff --git a/vendor/assets/pickdate/picker.date.js b/vendor/assets/pickdate/picker.date.js new file mode 100644 index 00000000..ffc15fd8 --- /dev/null +++ b/vendor/assets/pickdate/picker.date.js @@ -0,0 +1,1276 @@ + +/*! + * Date picker for pickadate.js v3.4.0 + * http://amsul.github.io/pickadate.js/date.htm + */ + +(function ( factory ) { + + // Register as an anonymous module. + if ( typeof define == 'function' && define.amd ) + define( ['picker','jquery'], factory ) + + // Or using browser globals. + else factory( Picker, jQuery ) + +}(function( Picker, $ ) { + + +/** + * Globals and constants + */ +var DAYS_IN_WEEK = 7, + WEEKS_IN_CALENDAR = 6, + _ = Picker._ + + + +/** + * The date picker constructor + */ +function DatePicker( picker, settings ) { + + var calendar = this, + elementValue = picker.$node[ 0 ].value, + elementDataValue = picker.$node.data( 'value' ), + valueString = elementDataValue || elementValue, + formatString = elementDataValue ? settings.formatSubmit : settings.format, + isRTL = function() { + return getComputedStyle( picker.$root[0] ).direction === 'rtl' + } + + calendar.settings = settings + calendar.$node = picker.$node + + // The queue of methods that will be used to build item objects. + calendar.queue = { + min: 'measure create', + max: 'measure create', + now: 'now create', + select: 'parse create validate', + highlight: 'parse navigate create validate', + view: 'parse create validate viewset', + disable: 'deactivate', + enable: 'activate' + } + + // The component's item object. + calendar.item = {} + + calendar.item.disable = ( settings.disable || [] ).slice( 0 ) + calendar.item.enable = -(function( collectionDisabled ) { + return collectionDisabled[ 0 ] === true ? collectionDisabled.shift() : -1 + })( calendar.item.disable ) + + calendar. + set( 'min', settings.min ). + set( 'max', settings.max ). + set( 'now' ) + + // When there’s a value, set the `select`, which in turn + // also sets the `highlight` and `view`. + if ( valueString ) { + calendar.set( 'select', valueString, { + format: formatString, + fromValue: !!elementDataValue + }) + } + + // If there’s no value, default to highlighting “today”. + else { + calendar. + set( 'select', null ). + set( 'highlight', calendar.item.now ) + } + + + // The keycode to movement mapping. + calendar.key = { + 40: 7, // Down + 38: -7, // Up + 39: function() { return isRTL() ? -1 : 1 }, // Right + 37: function() { return isRTL() ? 1 : -1 }, // Left + go: function( timeChange ) { + var highlightedObject = calendar.item.highlight, + targetDate = new Date( highlightedObject.year, highlightedObject.month, highlightedObject.date + timeChange ) + calendar.set( + 'highlight', + [ targetDate.getFullYear(), targetDate.getMonth(), targetDate.getDate() ], + { interval: timeChange } + ) + this.render() + } + } + + + // Bind some picker events. + picker. + on( 'render', function() { + picker.$root.find( '.' + settings.klass.selectMonth ).on( 'change', function() { + var value = this.value + if ( value ) { + picker.set( 'highlight', [ picker.get( 'view' ).year, value, picker.get( 'highlight' ).date ] ) + picker.$root.find( '.' + settings.klass.selectMonth ).trigger( 'focus' ) + } + }) + picker.$root.find( '.' + settings.klass.selectYear ).on( 'change', function() { + var value = this.value + if ( value ) { + picker.set( 'highlight', [ value, picker.get( 'view' ).month, picker.get( 'highlight' ).date ] ) + picker.$root.find( '.' + settings.klass.selectYear ).trigger( 'focus' ) + } + }) + }). + on( 'open', function() { + picker.$root.find( 'button, select' ).attr( 'disabled', false ) + }). + on( 'close', function() { + picker.$root.find( 'button, select' ).attr( 'disabled', true ) + }) + +} //DatePicker + + +/** + * Set a datepicker item object. + */ +DatePicker.prototype.set = function( type, value, options ) { + + var calendar = this, + calendarItem = calendar.item + + // If the value is `null` just set it immediately. + if ( value === null ) { + calendarItem[ type ] = value + return calendar + } + + // Otherwise go through the queue of methods, and invoke the functions. + // Update this as the time unit, and set the final value as this item. + // * In the case of `enable`, keep the queue but set `disable` instead. + // And in the case of `flip`, keep the queue but set `enable` instead. + calendarItem[ ( type == 'enable' ? 'disable' : type == 'flip' ? 'enable' : type ) ] = calendar.queue[ type ].split( ' ' ).map( function( method ) { + value = calendar[ method ]( type, value, options ) + return value + }).pop() + + // Check if we need to cascade through more updates. + if ( type == 'select' ) { + calendar.set( 'highlight', calendarItem.select, options ) + } + else if ( type == 'highlight' ) { + calendar.set( 'view', calendarItem.highlight, options ) + } + else if ( type.match( /^(flip|min|max|disable|enable)$/ ) ) { + if ( calendarItem.select && calendar.disabled( calendarItem.select ) ) { + calendar.set( 'select', calendarItem.select, options ) + } + if ( calendarItem.highlight && calendar.disabled( calendarItem.highlight ) ) { + calendar.set( 'highlight', calendarItem.highlight, options ) + } + } + + return calendar +} //DatePicker.prototype.set + + +/** + * Get a datepicker item object. + */ +DatePicker.prototype.get = function( type ) { + return this.item[ type ] +} //DatePicker.prototype.get + + +/** + * Create a picker date object. + */ +DatePicker.prototype.create = function( type, value, options ) { + + var isInfiniteValue, + calendar = this + + // If there’s no value, use the type as the value. + value = value === undefined ? type : value + + + // If it’s infinity, update the value. + if ( value == -Infinity || value == Infinity ) { + isInfiniteValue = value + } + + // If it’s an object, use the native date object. + else if ( $.isPlainObject( value ) && _.isInteger( value.pick ) ) { + value = value.obj + } + + // If it’s an array, convert it into a date and make sure + // that it’s a valid date – otherwise default to today. + else if ( $.isArray( value ) ) { + value = new Date( value[ 0 ], value[ 1 ], value[ 2 ] ) + value = _.isDate( value ) ? value : calendar.create().obj + } + + // If it’s a number or date object, make a normalized date. + else if ( _.isInteger( value ) || _.isDate( value ) ) { + value = calendar.normalize( new Date( value ), options ) + } + + // If it’s a literal true or any other case, set it to now. + else /*if ( value === true )*/ { + value = calendar.now( type, value, options ) + } + + // Return the compiled object. + return { + year: isInfiniteValue || value.getFullYear(), + month: isInfiniteValue || value.getMonth(), + date: isInfiniteValue || value.getDate(), + day: isInfiniteValue || value.getDay(), + obj: isInfiniteValue || value, + pick: isInfiniteValue || value.getTime() + } +} //DatePicker.prototype.create + + +/** + * Create a range limit object using an array, date object, + * literal “true”, or integer relative to another time. + */ +DatePicker.prototype.createRange = function( from, to ) { + + var calendar = this, + createDate = function( date ) { + if ( date === true || $.isArray( date ) || _.isDate( date ) ) { + return calendar.create( date ) + } + return date + } + + // Create objects if possible. + if ( !_.isInteger( from ) ) { + from = createDate( from ) + } + if ( !_.isInteger( to ) ) { + to = createDate( to ) + } + + // Create relative dates. + if ( _.isInteger( from ) && $.isPlainObject( to ) ) { + from = [ to.year, to.month, to.date + from ]; + } + else if ( _.isInteger( to ) && $.isPlainObject( from ) ) { + to = [ from.year, from.month, from.date + to ]; + } + + return { + from: createDate( from ), + to: createDate( to ) + } +} //DatePicker.prototype.createRange + + +/** + * Check if a date unit falls within a date range object. + */ +DatePicker.prototype.withinRange = function( range, dateUnit ) { + range = this.createRange(range.from, range.to) + return dateUnit.pick >= range.from.pick && dateUnit.pick <= range.to.pick +} + + +/** + * Check if two date range objects overlap. + */ +DatePicker.prototype.overlapRanges = function( one, two ) { + + var calendar = this + + // Convert the ranges into comparable dates. + one = calendar.createRange( one.from, one.to ) + two = calendar.createRange( two.from, two.to ) + + return calendar.withinRange( one, two.from ) || calendar.withinRange( one, two.to ) || + calendar.withinRange( two, one.from ) || calendar.withinRange( two, one.to ) +} + + +/** + * Get the date today. + */ +DatePicker.prototype.now = function( type, value, options ) { + value = new Date() + if ( options && options.rel ) { + value.setDate( value.getDate() + options.rel ) + } + return this.normalize( value, options ) +} + + +/** + * Navigate to next/prev month. + */ +DatePicker.prototype.navigate = function( type, value, options ) { + + var targetDateObject, + targetYear, + targetMonth, + targetDate, + isTargetArray = $.isArray( value ), + isTargetObject = $.isPlainObject( value ), + viewsetObject = this.item.view/*, + safety = 100*/ + + + if ( isTargetArray || isTargetObject ) { + + if ( isTargetObject ) { + targetYear = value.year + targetMonth = value.month + targetDate = value.date + } + else { + targetYear = +value[0] + targetMonth = +value[1] + targetDate = +value[2] + } + + // If we’re navigating months but the view is in a different + // month, navigate to the view’s year and month. + if ( options && options.nav && viewsetObject && viewsetObject.month !== targetMonth ) { + targetYear = viewsetObject.year + targetMonth = viewsetObject.month + } + + // Figure out the expected target year and month. + targetDateObject = new Date( targetYear, targetMonth + ( options && options.nav ? options.nav : 0 ), 1 ) + targetYear = targetDateObject.getFullYear() + targetMonth = targetDateObject.getMonth() + + // If the month we’re going to doesn’t have enough days, + // keep decreasing the date until we reach the month’s last date. + while ( /*safety &&*/ new Date( targetYear, targetMonth, targetDate ).getMonth() !== targetMonth ) { + targetDate -= 1 + /*safety -= 1 + if ( !safety ) { + throw 'Fell into an infinite loop while navigating to ' + new Date( targetYear, targetMonth, targetDate ) + '.' + }*/ + } + + value = [ targetYear, targetMonth, targetDate ] + } + + return value +} //DatePicker.prototype.navigate + + +/** + * Normalize a date by setting the hours to midnight. + */ +DatePicker.prototype.normalize = function( value/*, options*/ ) { + value.setHours( 0, 0, 0, 0 ) + return value +} + + +/** + * Measure the range of dates. + */ +DatePicker.prototype.measure = function( type, value/*, options*/ ) { + + var calendar = this + + // If it's anything false-y, remove the limits. + if ( !value ) { + value = type == 'min' ? -Infinity : Infinity + } + + // If it's an integer, get a date relative to today. + else if ( _.isInteger( value ) ) { + value = calendar.now( type, value, { rel: value } ) + } + + return value +} ///DatePicker.prototype.measure + + +/** + * Create a viewset object based on navigation. + */ +DatePicker.prototype.viewset = function( type, dateObject/*, options*/ ) { + return this.create([ dateObject.year, dateObject.month, 1 ]) +} + + +/** + * Validate a date as enabled and shift if needed. + */ +DatePicker.prototype.validate = function( type, dateObject, options ) { + + var calendar = this, + + // Keep a reference to the original date. + originalDateObject = dateObject, + + // Make sure we have an interval. + interval = options && options.interval ? options.interval : 1, + + // Check if the calendar enabled dates are inverted. + isFlippedBase = calendar.item.enable === -1, + + // Check if we have any enabled dates after/before now. + hasEnabledBeforeTarget, hasEnabledAfterTarget, + + // The min & max limits. + minLimitObject = calendar.item.min, + maxLimitObject = calendar.item.max, + + // Check if we’ve reached the limit during shifting. + reachedMin, reachedMax, + + // Check if the calendar is inverted and at least one weekday is enabled. + hasEnabledWeekdays = isFlippedBase && calendar.item.disable.filter( function( value ) { + + // If there’s a date, check where it is relative to the target. + if ( $.isArray( value ) ) { + var dateTime = calendar.create( value ).pick + if ( dateTime < dateObject.pick ) hasEnabledBeforeTarget = true + else if ( dateTime > dateObject.pick ) hasEnabledAfterTarget = true + } + + // Return only integers for enabled weekdays. + return _.isInteger( value ) + }).length/*, + + safety = 100*/ + + + + // Cases to validate for: + // [1] Not inverted and date disabled. + // [2] Inverted and some dates enabled. + // [3] Not inverted and out of range. + // + // Cases to **not** validate for: + // • Navigating months. + // • Not inverted and date enabled. + // • Inverted and all dates disabled. + // • ..and anything else. + if ( !options || !options.nav ) if ( + /* 1 */ ( !isFlippedBase && calendar.disabled( dateObject ) ) || + /* 2 */ ( isFlippedBase && calendar.disabled( dateObject ) && ( hasEnabledWeekdays || hasEnabledBeforeTarget || hasEnabledAfterTarget ) ) || + /* 3 */ ( !isFlippedBase && (dateObject.pick <= minLimitObject.pick || dateObject.pick >= maxLimitObject.pick) ) + ) { + + + // When inverted, flip the direction if there aren’t any enabled weekdays + // and there are no enabled dates in the direction of the interval. + if ( isFlippedBase && !hasEnabledWeekdays && ( ( !hasEnabledAfterTarget && interval > 0 ) || ( !hasEnabledBeforeTarget && interval < 0 ) ) ) { + interval *= -1 + } + + + // Keep looping until we reach an enabled date. + while ( /*safety &&*/ calendar.disabled( dateObject ) ) { + + /*safety -= 1 + if ( !safety ) { + throw 'Fell into an infinite loop while validating ' + dateObject.obj + '.' + }*/ + + + // If we’ve looped into the next/prev month with a large interval, return to the original date and flatten the interval. + if ( Math.abs( interval ) > 1 && ( dateObject.month < originalDateObject.month || dateObject.month > originalDateObject.month ) ) { + dateObject = originalDateObject + interval = interval > 0 ? 1 : -1 + } + + + // If we’ve reached the min/max limit, reverse the direction, flatten the interval and set it to the limit. + if ( dateObject.pick <= minLimitObject.pick ) { + reachedMin = true + interval = 1 + dateObject = calendar.create([ minLimitObject.year, minLimitObject.month, minLimitObject.date - 1 ]) + } + else if ( dateObject.pick >= maxLimitObject.pick ) { + reachedMax = true + interval = -1 + dateObject = calendar.create([ maxLimitObject.year, maxLimitObject.month, maxLimitObject.date + 1 ]) + } + + + // If we’ve reached both limits, just break out of the loop. + if ( reachedMin && reachedMax ) { + break + } + + + // Finally, create the shifted date using the interval and keep looping. + dateObject = calendar.create([ dateObject.year, dateObject.month, dateObject.date + interval ]) + } + + } //endif + + + // Return the date object settled on. + return dateObject +} //DatePicker.prototype.validate + + +/** + * Check if a date is disabled. + */ +DatePicker.prototype.disabled = function( dateToVerify ) { + + var + calendar = this, + + // Filter through the disabled dates to check if this is one. + isDisabledMatch = calendar.item.disable.filter( function( dateToDisable ) { + + // If the date is a number, match the weekday with 0index and `firstDay` check. + if ( _.isInteger( dateToDisable ) ) { + return dateToVerify.day === ( calendar.settings.firstDay ? dateToDisable : dateToDisable - 1 ) % 7 + } + + // If it’s an array or a native JS date, create and match the exact date. + if ( $.isArray( dateToDisable ) || _.isDate( dateToDisable ) ) { + return dateToVerify.pick === calendar.create( dateToDisable ).pick + } + + // If it’s an object, match a date within the “from” and “to” range. + if ( $.isPlainObject( dateToDisable ) ) { + return calendar.withinRange( dateToDisable, dateToVerify ) + } + }) + + // If this date matches a disabled date, confirm it’s not inverted. + isDisabledMatch = isDisabledMatch.length && !isDisabledMatch.filter(function( dateToDisable ) { + return $.isArray( dateToDisable ) && dateToDisable[3] == 'inverted' || + $.isPlainObject( dateToDisable ) && dateToDisable.inverted + }).length + + // Check the calendar “enabled” flag and respectively flip the + // disabled state. Then also check if it’s beyond the min/max limits. + return calendar.item.enable === -1 ? !isDisabledMatch : isDisabledMatch || + dateToVerify.pick < calendar.item.min.pick || + dateToVerify.pick > calendar.item.max.pick + +} //DatePicker.prototype.disabled + + +/** + * Parse a string into a usable type. + */ +DatePicker.prototype.parse = function( type, value, options ) { + + var calendar = this, + parsingObject = {}, + monthIndex + + if ( !value || _.isInteger( value ) || $.isArray( value ) || _.isDate( value ) || $.isPlainObject( value ) && _.isInteger( value.pick ) ) { + return value + } + + // We need a `.format` to parse the value with. + if ( !( options && options.format ) ) { + options = options || {} + options.format = calendar.settings.format + } + + // Calculate the month index to adjust with. + monthIndex = typeof value == 'string' && !options.fromValue ? 1 : 0 + + // Convert the format into an array and then map through it. + calendar.formats.toArray( options.format ).map( function( label ) { + + var + // Grab the formatting label. + formattingLabel = calendar.formats[ label ], + + // The format length is from the formatting label function or the + // label length without the escaping exclamation (!) mark. + formatLength = formattingLabel ? _.trigger( formattingLabel, calendar, [ value, parsingObject ] ) : label.replace( /^!/, '' ).length + + // If there's a format label, split the value up to the format length. + // Then add it to the parsing object with appropriate label. + if ( formattingLabel ) { + parsingObject[ label ] = value.substr( 0, formatLength ) + } + + // Update the value as the substring from format length to end. + value = value.substr( formatLength ) + }) + + // If it’s parsing a user provided month value, compensate for month 0index. + return [ + parsingObject.yyyy || parsingObject.yy, + +( parsingObject.mm || parsingObject.m ) - monthIndex, + parsingObject.dd || parsingObject.d + ] +} //DatePicker.prototype.parse + + +/** + * Various formats to display the object in. + */ +DatePicker.prototype.formats = (function() { + + // Return the length of the first word in a collection. + function getWordLengthFromCollection( string, collection, dateObject ) { + + // Grab the first word from the string. + var word = string.match( /\w+/ )[ 0 ] + + // If there's no month index, add it to the date object + if ( !dateObject.mm && !dateObject.m ) { + dateObject.m = collection.indexOf( word ) + } + + // Return the length of the word. + return word.length + } + + // Get the length of the first word in a string. + function getFirstWordLength( string ) { + return string.match( /\w+/ )[ 0 ].length + } + + return { + + d: function( string, dateObject ) { + + // If there's string, then get the digits length. + // Otherwise return the selected date. + return string ? _.digits( string ) : dateObject.date + }, + dd: function( string, dateObject ) { + + // If there's a string, then the length is always 2. + // Otherwise return the selected date with a leading zero. + return string ? 2 : _.lead( dateObject.date ) + }, + ddd: function( string, dateObject ) { + + // If there's a string, then get the length of the first word. + // Otherwise return the short selected weekday. + return string ? getFirstWordLength( string ) : this.settings.weekdaysShort[ dateObject.day ] + }, + dddd: function( string, dateObject ) { + + // If there's a string, then get the length of the first word. + // Otherwise return the full selected weekday. + return string ? getFirstWordLength( string ) : this.settings.weekdaysFull[ dateObject.day ] + }, + m: function( string, dateObject ) { + + // If there's a string, then get the length of the digits + // Otherwise return the selected month with 0index compensation. + return string ? _.digits( string ) : dateObject.month + 1 + }, + mm: function( string, dateObject ) { + + // If there's a string, then the length is always 2. + // Otherwise return the selected month with 0index and leading zero. + return string ? 2 : _.lead( dateObject.month + 1 ) + }, + mmm: function( string, dateObject ) { + + var collection = this.settings.monthsShort + + // If there's a string, get length of the relevant month from the short + // months collection. Otherwise return the selected month from that collection. + return string ? getWordLengthFromCollection( string, collection, dateObject ) : collection[ dateObject.month ] + }, + mmmm: function( string, dateObject ) { + + var collection = this.settings.monthsFull + + // If there's a string, get length of the relevant month from the full + // months collection. Otherwise return the selected month from that collection. + return string ? getWordLengthFromCollection( string, collection, dateObject ) : collection[ dateObject.month ] + }, + yy: function( string, dateObject ) { + + // If there's a string, then the length is always 2. + // Otherwise return the selected year by slicing out the first 2 digits. + return string ? 2 : ( '' + dateObject.year ).slice( 2 ) + }, + yyyy: function( string, dateObject ) { + + // If there's a string, then the length is always 4. + // Otherwise return the selected year. + return string ? 4 : dateObject.year + }, + + // Create an array by splitting the formatting string passed. + toArray: function( formatString ) { return formatString.split( /(d{1,4}|m{1,4}|y{4}|yy|!.)/g ) }, + + // Format an object into a string using the formatting options. + toString: function ( formatString, itemObject ) { + var calendar = this + return calendar.formats.toArray( formatString ).map( function( label ) { + return _.trigger( calendar.formats[ label ], calendar, [ 0, itemObject ] ) || label.replace( /^!/, '' ) + }).join( '' ) + } + } +})() //DatePicker.prototype.formats + + + + +/** + * Check if two date units are the exact. + */ +DatePicker.prototype.isDateExact = function( one, two ) { + + var calendar = this + + // When we’re working with weekdays, do a direct comparison. + if ( + ( _.isInteger( one ) && _.isInteger( two ) ) || + ( typeof one == 'boolean' && typeof two == 'boolean' ) + ) { + return one === two + } + + // When we’re working with date representations, compare the “pick” value. + if ( + ( _.isDate( one ) || $.isArray( one ) ) && + ( _.isDate( two ) || $.isArray( two ) ) + ) { + return calendar.create( one ).pick === calendar.create( two ).pick + } + + // When we’re working with range objects, compare the “from” and “to”. + if ( $.isPlainObject( one ) && $.isPlainObject( two ) ) { + return calendar.isDateExact( one.from, two.from ) && calendar.isDateExact( one.to, two.to ) + } + + return false +} + + +/** + * Check if two date units overlap. + */ +DatePicker.prototype.isDateOverlap = function( one, two ) { + + var calendar = this + + // When we’re working with a weekday index, compare the days. + if ( _.isInteger( one ) && ( _.isDate( two ) || $.isArray( two ) ) ) { + return one === calendar.create( two ).day + 1 + } + if ( _.isInteger( two ) && ( _.isDate( one ) || $.isArray( one ) ) ) { + return two === calendar.create( one ).day + 1 + } + + // When we’re working with range objects, check if the ranges overlap. + if ( $.isPlainObject( one ) && $.isPlainObject( two ) ) { + return calendar.overlapRanges( one, two ) + } + + return false +} + + +/** + * Flip the “enabled” state. + */ +DatePicker.prototype.flipEnable = function(val) { + var itemObject = this.item + itemObject.enable = val || (itemObject.enable == -1 ? 1 : -1) +} + + +/** + * Mark a collection of dates as “disabled”. + */ +DatePicker.prototype.deactivate = function( type, datesToDisable ) { + + var calendar = this, + disabledItems = calendar.item.disable.slice(0) + + + // If we’re flipping, that’s all we need to do. + if ( datesToDisable == 'flip' ) { + calendar.flipEnable() + } + + else if ( datesToDisable === false ) { + calendar.flipEnable(1) + disabledItems = [] + } + + else if ( datesToDisable === true ) { + calendar.flipEnable(-1) + disabledItems = [] + } + + // Otherwise go through the dates to disable. + else { + + datesToDisable.map(function( unitToDisable ) { + + var matchFound + + // When we have disabled items, check for matches. + // If something is matched, immediately break out. + for ( var index = 0; index < disabledItems.length; index += 1 ) { + if ( calendar.isDateExact( unitToDisable, disabledItems[index] ) ) { + matchFound = true + break + } + } + + // If nothing was found, add the validated unit to the collection. + if ( !matchFound ) { + if ( + _.isInteger( unitToDisable ) || + _.isDate( unitToDisable ) || + $.isArray( unitToDisable ) || + ( $.isPlainObject( unitToDisable ) && unitToDisable.from && unitToDisable.to ) + ) { + disabledItems.push( unitToDisable ) + } + } + }) + } + + // Return the updated collection. + return disabledItems +} //DatePicker.prototype.deactivate + + +/** + * Mark a collection of dates as “enabled”. + */ +DatePicker.prototype.activate = function( type, datesToEnable ) { + + var calendar = this, + disabledItems = calendar.item.disable, + disabledItemsCount = disabledItems.length + + // If we’re flipping, that’s all we need to do. + if ( datesToEnable == 'flip' ) { + calendar.flipEnable() + } + + else if ( datesToEnable === true ) { + calendar.flipEnable(1) + disabledItems = [] + } + + else if ( datesToEnable === false ) { + calendar.flipEnable(-1) + disabledItems = [] + } + + // Otherwise go through the disabled dates. + else { + + datesToEnable.map(function( unitToEnable ) { + + var matchFound, + disabledUnit, + index, + isExactRange + + // Go through the disabled items and try to find a match. + for ( index = 0; index < disabledItemsCount; index += 1 ) { + + disabledUnit = disabledItems[index] + + // When an exact match is found, remove it from the collection. + if ( calendar.isDateExact( disabledUnit, unitToEnable ) ) { + matchFound = disabledItems[index] = null + isExactRange = true + break + } + + // When an overlapped match is found, add the “inverted” state to it. + else if ( calendar.isDateOverlap( disabledUnit, unitToEnable ) ) { + if ( $.isPlainObject( unitToEnable ) ) { + unitToEnable.inverted = true + matchFound = unitToEnable + } + else if ( $.isArray( unitToEnable ) ) { + matchFound = unitToEnable + if ( !matchFound[3] ) matchFound.push( 'inverted' ) + } + else if ( _.isDate( unitToEnable ) ) { + matchFound = [ unitToEnable.getFullYear(), unitToEnable.getMonth(), unitToEnable.getDate(), 'inverted' ] + } + break + } + } + + // If a match was found, remove a previous duplicate entry. + if ( matchFound ) for ( index = 0; index < disabledItemsCount; index += 1 ) { + if ( calendar.isDateExact( disabledItems[index], unitToEnable ) ) { + disabledItems[index] = null + break + } + } + + // In the event that we’re dealing with an exact range of dates, + // make sure there are no “inverted” dates because of it. + if ( isExactRange ) for ( index = 0; index < disabledItemsCount; index += 1 ) { + if ( calendar.isDateOverlap( disabledItems[index], unitToEnable ) ) { + disabledItems[index] = null + break + } + } + + // If something is still matched, add it into the collection. + if ( matchFound ) { + disabledItems.push( matchFound ) + } + }) + } + + // Return the updated collection. + return disabledItems.filter(function( val ) { return val != null }) +} //DatePicker.prototype.activate + + +/** + * Create a string for the nodes in the picker. + */ +DatePicker.prototype.nodes = function( isOpen ) { + + var + calendar = this, + settings = calendar.settings, + calendarItem = calendar.item, + nowObject = calendarItem.now, + selectedObject = calendarItem.select, + highlightedObject = calendarItem.highlight, + viewsetObject = calendarItem.view, + disabledCollection = calendarItem.disable, + minLimitObject = calendarItem.min, + maxLimitObject = calendarItem.max, + + + // Create the calendar table head using a copy of weekday labels collection. + // * We do a copy so we don't mutate the original array. + tableHead = (function( collection ) { + + // If the first day should be Monday, move Sunday to the end. + if ( settings.firstDay ) { + collection.push( collection.shift() ) + } + + // Create and return the table head group. + return _.node( + 'thead', + _.node( + 'tr', + _.group({ + min: 0, + max: DAYS_IN_WEEK - 1, + i: 1, + node: 'th', + item: function( counter ) { + return [ + collection[ counter ], + settings.klass.weekdays + ] + } + }) + ) + ) //endreturn + })( ( settings.showWeekdaysFull ? settings.weekdaysFull : settings.weekdaysShort ).slice( 0 ) ), //tableHead + + + // Create the nav for next/prev month. + createMonthNav = function( next ) { + + // Otherwise, return the created month tag. + return _.node( + 'div', + ' ', + settings.klass[ 'nav' + ( next ? 'Next' : 'Prev' ) ] + ( + + // If the focused month is outside the range, disabled the button. + ( next && viewsetObject.year >= maxLimitObject.year && viewsetObject.month >= maxLimitObject.month ) || + ( !next && viewsetObject.year <= minLimitObject.year && viewsetObject.month <= minLimitObject.month ) ? + ' ' + settings.klass.navDisabled : '' + ), + 'data-nav=' + ( next || -1 ) + ) //endreturn + }, //createMonthNav + + + // Create the month label. + createMonthLabel = function( monthsCollection ) { + + // If there are months to select, add a dropdown menu. + if ( settings.selectMonths ) { + + return _.node( 'select', _.group({ + min: 0, + max: 11, + i: 1, + node: 'option', + item: function( loopedMonth ) { + + return [ + + // The looped month and no classes. + monthsCollection[ loopedMonth ], 0, + + // Set the value and selected index. + 'value=' + loopedMonth + + ( viewsetObject.month == loopedMonth ? ' selected' : '' ) + + ( + ( + ( viewsetObject.year == minLimitObject.year && loopedMonth < minLimitObject.month ) || + ( viewsetObject.year == maxLimitObject.year && loopedMonth > maxLimitObject.month ) + ) ? + ' disabled' : '' + ) + ] + } + }), settings.klass.selectMonth, isOpen ? '' : 'disabled' ) + } + + // If there's a need for a month selector + return _.node( 'div', monthsCollection[ viewsetObject.month ], settings.klass.month ) + }, //createMonthLabel + + + // Create the year label. + createYearLabel = function() { + + var focusedYear = viewsetObject.year, + + // If years selector is set to a literal "true", set it to 5. Otherwise + // divide in half to get half before and half after focused year. + numberYears = settings.selectYears === true ? 5 : ~~( settings.selectYears / 2 ) + + // If there are years to select, add a dropdown menu. + if ( numberYears ) { + + var + minYear = minLimitObject.year, + maxYear = maxLimitObject.year, + lowestYear = focusedYear - numberYears, + highestYear = focusedYear + numberYears + + // If the min year is greater than the lowest year, increase the highest year + // by the difference and set the lowest year to the min year. + if ( minYear > lowestYear ) { + highestYear += minYear - lowestYear + lowestYear = minYear + } + + // If the max year is less than the highest year, decrease the lowest year + // by the lower of the two: available and needed years. Then set the + // highest year to the max year. + if ( maxYear < highestYear ) { + + var availableYears = lowestYear - minYear, + neededYears = highestYear - maxYear + + lowestYear -= availableYears > neededYears ? neededYears : availableYears + highestYear = maxYear + } + + return _.node( 'select', _.group({ + min: lowestYear, + max: highestYear, + i: 1, + node: 'option', + item: function( loopedYear ) { + return [ + + // The looped year and no classes. + loopedYear, 0, + + // Set the value and selected index. + 'value=' + loopedYear + ( focusedYear == loopedYear ? ' selected' : '' ) + ] + } + }), settings.klass.selectYear, isOpen ? '' : 'disabled' ) + } + + // Otherwise just return the year focused + return _.node( 'div', focusedYear, settings.klass.year ) + } //createYearLabel + + + // Create and return the entire calendar. + return _.node( + 'div', + createMonthNav() + createMonthNav( 1 ) + + createMonthLabel( settings.showMonthsShort ? settings.monthsShort : settings.monthsFull ) + + createYearLabel(), + settings.klass.header + ) + _.node( + 'table', + tableHead + + _.node( + 'tbody', + _.group({ + min: 0, + max: WEEKS_IN_CALENDAR - 1, + i: 1, + node: 'tr', + item: function( rowCounter ) { + + // If Monday is the first day and the month starts on Sunday, shift the date back a week. + var shiftDateBy = settings.firstDay && calendar.create([ viewsetObject.year, viewsetObject.month, 1 ]).day === 0 ? -7 : 0 + + return [ + _.group({ + min: DAYS_IN_WEEK * rowCounter - viewsetObject.day + shiftDateBy + 1, // Add 1 for weekday 0index + max: function() { + return this.min + DAYS_IN_WEEK - 1 + }, + i: 1, + node: 'td', + item: function( targetDate ) { + + // Convert the time date from a relative date to a target date. + targetDate = calendar.create([ viewsetObject.year, viewsetObject.month, targetDate + ( settings.firstDay ? 1 : 0 ) ]) + + var isSelected = selectedObject && selectedObject.pick == targetDate.pick, + isHighlighted = highlightedObject && highlightedObject.pick == targetDate.pick, + isDisabled = disabledCollection && calendar.disabled( targetDate ) || targetDate.pick < minLimitObject.pick || targetDate.pick > maxLimitObject.pick + + return [ + _.node( + 'div', + targetDate.date, + (function( klasses ) { + + // Add the `infocus` or `outfocus` classes based on month in view. + klasses.push( viewsetObject.month == targetDate.month ? settings.klass.infocus : settings.klass.outfocus ) + + // Add the `today` class if needed. + if ( nowObject.pick == targetDate.pick ) { + klasses.push( settings.klass.now ) + } + + // Add the `selected` class if something's selected and the time matches. + if ( isSelected ) { + klasses.push( settings.klass.selected ) + } + + // Add the `highlighted` class if something's highlighted and the time matches. + if ( isHighlighted ) { + klasses.push( settings.klass.highlighted ) + } + + // Add the `disabled` class if something's disabled and the object matches. + if ( isDisabled ) { + klasses.push( settings.klass.disabled ) + } + + return klasses.join( ' ' ) + })([ settings.klass.day ]), + 'data-pick=' + targetDate.pick + ' ' + _.ariaAttr({ + role: 'button', + controls: calendar.$node[0].id, + checked: isSelected && calendar.$node.val() === _.trigger( + calendar.formats.toString, + calendar, + [ settings.format, targetDate ] + ) ? true : null, + activedescendant: isHighlighted ? true : null, + disabled: isDisabled ? true : null + }) + ) + ] //endreturn + } + }) + ] //endreturn + } + }) + ), + settings.klass.table + ) + + + // * For Firefox forms to submit, make sure to set the buttons’ `type` attributes as “button”. + _.node( + 'div', + _.node( 'button', settings.today, settings.klass.buttonToday, 'type=button data-pick=' + nowObject.pick + ( isOpen ? '' : ' disabled' ) ) + + _.node( 'button', settings.clear, settings.klass.buttonClear, 'type=button data-clear=1' + ( isOpen ? '' : ' disabled' ) ), + settings.klass.footer + ) //endreturn +} //DatePicker.prototype.nodes + + + + +/** + * The date picker defaults. + */ +DatePicker.defaults = (function( prefix ) { + + return { + + // Months and weekdays + monthsFull: [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ], + monthsShort: [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ], + weekdaysFull: [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ], + weekdaysShort: [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' ], + + // Today and clear + today: 'Today', + clear: 'Clear', + + // The format to show on the `input` element + format: 'd mmmm, yyyy', + + // Classes + klass: { + + table: prefix + 'table', + + header: prefix + 'header', + + navPrev: prefix + 'nav--prev', + navNext: prefix + 'nav--next', + navDisabled: prefix + 'nav--disabled', + + month: prefix + 'month', + year: prefix + 'year', + + selectMonth: prefix + 'select--month', + selectYear: prefix + 'select--year', + + weekdays: prefix + 'weekday', + + day: prefix + 'day', + disabled: prefix + 'day--disabled', + selected: prefix + 'day--selected', + highlighted: prefix + 'day--highlighted', + now: prefix + 'day--today', + infocus: prefix + 'day--infocus', + outfocus: prefix + 'day--outfocus', + + footer: prefix + 'footer', + + buttonClear: prefix + 'button--clear', + buttonToday: prefix + 'button--today' + } + } +})( Picker.klasses().picker + '__' ) + + + + + +/** + * Extend the picker to add the date picker. + */ +Picker.extend( 'pickadate', DatePicker ) + + +})); + + + diff --git a/vendor/assets/pickdate/picker.js b/vendor/assets/pickdate/picker.js new file mode 100644 index 00000000..5316bc5d --- /dev/null +++ b/vendor/assets/pickdate/picker.js @@ -0,0 +1,958 @@ + +/*! + * pickadate.js v3.4.0, 2014/02/15 + * By Amsul, http://amsul.ca + * Hosted on http://amsul.github.io/pickadate.js + * Licensed under MIT + */ + +(function ( factory ) { + + // Register as an anonymous module. + if ( typeof define === 'function' && define.amd ) + define( 'picker', ['jquery'], factory ) + + // Or using browser globals. + else this.Picker = factory( jQuery ) + +}(function( $ ) { + +var $document = $( document ) + + +/** + * The picker constructor that creates a blank picker. + */ +function PickerConstructor( ELEMENT, NAME, COMPONENT, OPTIONS ) { + + // If there’s no element, return the picker constructor. + if ( !ELEMENT ) return PickerConstructor + + + var + // The state of the picker. + STATE = { + id: ELEMENT.id || 'P' + Math.abs( ~~(Math.random() * new Date()) ) + }, + + + // Merge the defaults and options passed. + SETTINGS = COMPONENT ? $.extend( true, {}, COMPONENT.defaults, OPTIONS ) : OPTIONS || {}, + + + // Merge the default classes with the settings classes. + CLASSES = $.extend( {}, PickerConstructor.klasses(), SETTINGS.klass ), + + + // The element node wrapper into a jQuery object. + $ELEMENT = $( ELEMENT ), + + + // Pseudo picker constructor. + PickerInstance = function() { + return this.start() + }, + + + // The picker prototype. + P = PickerInstance.prototype = { + + constructor: PickerInstance, + + $node: $ELEMENT, + + + /** + * Initialize everything + */ + start: function() { + + // If it’s already started, do nothing. + if ( STATE && STATE.start ) return P + + + // Update the picker states. + STATE.methods = {} + STATE.start = true + STATE.open = false + STATE.type = ELEMENT.type + + + // Confirm focus state, convert into text input to remove UA stylings, + // and set as readonly to prevent keyboard popup. + ELEMENT.autofocus = ELEMENT == document.activeElement + ELEMENT.type = 'text' + ELEMENT.readOnly = !SETTINGS.editable + ELEMENT.id = ELEMENT.id || STATE.id + + + // Create a new picker component with the settings. + P.component = new COMPONENT(P, SETTINGS) + + + // Create the picker root with a holder and then prepare it. + P.$root = $( PickerConstructor._.node('div', createWrappedComponent(), CLASSES.picker, 'id="' + ELEMENT.id + '_root"') ) + prepareElementRoot() + + + // If there’s a format for the hidden input element, create the element. + if ( SETTINGS.formatSubmit ) { + prepareElementHidden() + } + + + // Prepare the input element. + prepareElement() + + + // Insert the root as specified in the settings. + if ( SETTINGS.container ) $( SETTINGS.container ).append( P.$root ) + else $ELEMENT.after( P.$root ) + + + // Bind the default component and settings events. + P.on({ + start: P.component.onStart, + render: P.component.onRender, + stop: P.component.onStop, + open: P.component.onOpen, + close: P.component.onClose, + set: P.component.onSet + }).on({ + start: SETTINGS.onStart, + render: SETTINGS.onRender, + stop: SETTINGS.onStop, + open: SETTINGS.onOpen, + close: SETTINGS.onClose, + set: SETTINGS.onSet + }) + + + // If the element has autofocus, open the picker. + if ( ELEMENT.autofocus ) { + P.open() + } + + + // Trigger queued the “start” and “render” events. + return P.trigger( 'start' ).trigger( 'render' ) + }, //start + + + /** + * Render a new picker + */ + render: function( entireComponent ) { + + // Insert a new component holder in the root or box. + if ( entireComponent ) P.$root.html( createWrappedComponent() ) + else P.$root.find( '.' + CLASSES.box ).html( P.component.nodes( STATE.open ) ) + + // Trigger the queued “render” events. + return P.trigger( 'render' ) + }, //render + + + /** + * Destroy everything + */ + stop: function() { + + // If it’s already stopped, do nothing. + if ( !STATE.start ) return P + + // Then close the picker. + P.close() + + // Remove the hidden field. + if ( P._hidden ) { + P._hidden.parentNode.removeChild( P._hidden ) + } + + // Remove the root. + P.$root.remove() + + // Remove the input class, remove the stored data, and unbind + // the events (after a tick for IE - see `P.close`). + $ELEMENT.removeClass( CLASSES.input ).removeData( NAME ) + setTimeout( function() { + $ELEMENT.off( '.' + STATE.id ) + }, 0) + + // Restore the element state + ELEMENT.type = STATE.type + ELEMENT.readOnly = false + + // Trigger the queued “stop” events. + P.trigger( 'stop' ) + + // Reset the picker states. + STATE.methods = {} + STATE.start = false + + return P + }, //stop + + + /* + * Open up the picker + */ + open: function( dontGiveFocus ) { + + // If it’s already open, do nothing. + if ( STATE.open ) return P + + // Add the “active” class. + $ELEMENT.addClass( CLASSES.active ) + aria( ELEMENT, 'expanded', true ) + + // Add the “opened” class to the picker root. + P.$root.addClass( CLASSES.opened ) + aria( P.$root[0], 'hidden', false ) + + // If we have to give focus, bind the element and doc events. + if ( dontGiveFocus !== false ) { + + // Set it as open. + STATE.open = true + + // Pass focus to the element’s jQuery object. + $ELEMENT.trigger( 'focus' ) + + // Bind the document events. + $document.on( 'click.' + STATE.id + ' focusin.' + STATE.id, function( event ) { + + var target = event.target + + // If the target of the event is not the element, close the picker picker. + // * Don’t worry about clicks or focusins on the root because those don’t bubble up. + // Also, for Firefox, a click on an `option` element bubbles up directly + // to the doc. So make sure the target wasn't the doc. + // * In Firefox stopPropagation() doesn’t prevent right-click events from bubbling, + // which causes the picker to unexpectedly close when right-clicking it. So make + // sure the event wasn’t a right-click. + if ( target != ELEMENT && target != document && event.which != 3 ) { + + // If the target was the holder that covers the screen, + // keep the element focused to maintain tabindex. + P.close( target === P.$root.children()[0] ) + } + + }).on( 'keydown.' + STATE.id, function( event ) { + + var + // Get the keycode. + keycode = event.keyCode, + + // Translate that to a selection change. + keycodeToMove = P.component.key[ keycode ], + + // Grab the target. + target = event.target + + + // On escape, close the picker and give focus. + if ( keycode == 27 ) { + P.close( true ) + } + + + // Check if there is a key movement or “enter” keypress on the element. + else if ( target == ELEMENT && ( keycodeToMove || keycode == 13 ) ) { + + // Prevent the default action to stop page movement. + event.preventDefault() + + // Trigger the key movement action. + if ( keycodeToMove ) { + PickerConstructor._.trigger( P.component.key.go, P, [ PickerConstructor._.trigger( keycodeToMove ) ] ) + } + + // On “enter”, if the highlighted item isn’t disabled, set the value and close. + else if ( !P.$root.find( '.' + CLASSES.highlighted ).hasClass( CLASSES.disabled ) ) { + P.set( 'select', P.component.item.highlight ).close() + } + } + + + // If the target is within the root and “enter” is pressed, + // prevent the default action and trigger a click on the target instead. + else if ( $.contains( P.$root[0], target ) && keycode == 13 ) { + event.preventDefault() + target.click() + } + }) + } + + // Trigger the queued “open” events. + return P.trigger( 'open' ) + }, //open + + + /** + * Close the picker + */ + close: function( giveFocus ) { + + // If we need to give focus, do it before changing states. + if ( giveFocus ) { + // ....ah yes! It would’ve been incomplete without a crazy workaround for IE :| + // The focus is triggered *after* the close has completed - causing it + // to open again. So unbind and rebind the event at the next tick. + $ELEMENT.off( 'focus.' + STATE.id ).trigger( 'focus' ) + setTimeout( function() { + $ELEMENT.on( 'focus.' + STATE.id, focusToOpen ) + }, 0 ) + } + + // Remove the “active” class. + $ELEMENT.removeClass( CLASSES.active ) + aria( ELEMENT, 'expanded', false ) + + // Remove the “opened” and “focused” class from the picker root. + P.$root.removeClass( CLASSES.opened + ' ' + CLASSES.focused ) + aria( P.$root[0], 'hidden', true ) + aria( P.$root[0], 'selected', false ) + + // If it’s already closed, do nothing more. + if ( !STATE.open ) return P + + // Set it as closed. + STATE.open = false + + // Unbind the document events. + $document.off( '.' + STATE.id ) + + // Trigger the queued “close” events. + return P.trigger( 'close' ) + }, //close + + + /** + * Clear the values + */ + clear: function() { + return P.set( 'clear' ) + }, //clear + + + /** + * Set something + */ + set: function( thing, value, options ) { + + var thingItem, thingValue, + thingIsObject = $.isPlainObject( thing ), + thingObject = thingIsObject ? thing : {} + + // Make sure we have usable options. + options = thingIsObject && $.isPlainObject( value ) ? value : options || {} + + if ( thing ) { + + // If the thing isn’t an object, make it one. + if ( !thingIsObject ) { + thingObject[ thing ] = value + } + + // Go through the things of items to set. + for ( thingItem in thingObject ) { + + // Grab the value of the thing. + thingValue = thingObject[ thingItem ] + + // First, if the item exists and there’s a value, set it. + if ( thingItem in P.component.item ) { + P.component.set( thingItem, thingValue, options ) + } + + // Then, check to update the element value and broadcast a change. + if ( thingItem == 'select' || thingItem == 'clear' ) { + $ELEMENT.val( thingItem == 'clear' ? + '' : P.get( thingItem, SETTINGS.format ) + ).trigger( 'change' ) + } + } + + // Render a new picker. + P.render() + } + + // When the method isn’t muted, trigger queued “set” events and pass the `thingObject`. + return options.muted ? P : P.trigger( 'set', thingObject ) + }, //set + + + /** + * Get something + */ + get: function( thing, format ) { + + // Make sure there’s something to get. + thing = thing || 'value' + + // If a picker state exists, return that. + if ( STATE[ thing ] != null ) { + return STATE[ thing ] + } + + // Return the value, if that. + if ( thing == 'value' ) { + return ELEMENT.value + } + + // Check if a component item exists, return that. + if ( thing in P.component.item ) { + if ( typeof format == 'string' ) { + return PickerConstructor._.trigger( + P.component.formats.toString, + P.component, + [ format, P.component.get( thing ) ] + ) + } + return P.component.get( thing ) + } + }, //get + + + + /** + * Bind events on the things. + */ + on: function( thing, method ) { + + var thingName, thingMethod, + thingIsObject = $.isPlainObject( thing ), + thingObject = thingIsObject ? thing : {} + + if ( thing ) { + + // If the thing isn’t an object, make it one. + if ( !thingIsObject ) { + thingObject[ thing ] = method + } + + // Go through the things to bind to. + for ( thingName in thingObject ) { + + // Grab the method of the thing. + thingMethod = thingObject[ thingName ] + + // Make sure the thing methods collection exists. + STATE.methods[ thingName ] = STATE.methods[ thingName ] || [] + + // Add the method to the relative method collection. + STATE.methods[ thingName ].push( thingMethod ) + } + } + + return P + }, //on + + + + /** + * Unbind events on the things. + */ + off: function() { + var i, thingName, + names = arguments; + for ( i = 0, namesCount = names.length; i < namesCount; i += 1 ) { + thingName = names[i] + if ( thingName in STATE.methods ) { + delete STATE.methods[thingName] + } + } + return P + }, + + + /** + * Fire off method events. + */ + trigger: function( name, data ) { + var methodList = STATE.methods[ name ] + if ( methodList ) { + methodList.map( function( method ) { + PickerConstructor._.trigger( method, P, [ data ] ) + }) + } + return P + } //trigger + } //PickerInstance.prototype + + + /** + * Wrap the picker holder components together. + */ + function createWrappedComponent() { + + // Create a picker wrapper holder + return PickerConstructor._.node( 'div', + + // Create a picker wrapper node + PickerConstructor._.node( 'div', + + // Create a picker frame + PickerConstructor._.node( 'div', + + // Create a picker box node + PickerConstructor._.node( 'div', + + // Create the components nodes. + P.component.nodes( STATE.open ), + + // The picker box class + CLASSES.box + ), + + // Picker wrap class + CLASSES.wrap + ), + + // Picker frame class + CLASSES.frame + ), + + // Picker holder class + CLASSES.holder + ) //endreturn + } //createWrappedComponent + + + + /** + * Prepare the input element with all bindings. + */ + function prepareElement() { + + $ELEMENT. + + // Store the picker data by component name. + data(NAME, P). + + // Add the “input” class name. + addClass(CLASSES.input). + + // If there’s a `data-value`, update the value of the element. + val( $ELEMENT.data('value') ? + P.get('select', SETTINGS.format) : + ELEMENT.value + ). + + // On focus/click, open the picker and adjust the root “focused” state. + on('focus.' + STATE.id + ' click.' + STATE.id, focusToOpen) + + + // Only bind keydown events if the element isn’t editable. + if ( !SETTINGS.editable ) { + + // Handle keyboard event based on the picker being opened or not. + $ELEMENT.on('keydown.' + STATE.id, function(event) { + + var keycode = event.keyCode, + + // Check if one of the delete keys was pressed. + isKeycodeDelete = /^(8|46)$/.test(keycode) + + // For some reason IE clears the input value on “escape”. + if ( keycode == 27 ) { + P.close() + return false + } + + // Check if `space` or `delete` was pressed or the picker is closed with a key movement. + if ( keycode == 32 || isKeycodeDelete || !STATE.open && P.component.key[keycode] ) { + + // Prevent it from moving the page and bubbling to doc. + event.preventDefault() + event.stopPropagation() + + // If `delete` was pressed, clear the values and close the picker. + // Otherwise open the picker. + if ( isKeycodeDelete ) { P.clear().close() } + else { P.open() } + } + }) + } + + + // Update the aria attributes. + aria(ELEMENT, { + haspopup: true, + expanded: false, + readonly: false, + owns: ELEMENT.id + '_root' + (P._hidden ? ' ' + P._hidden.id : '') + }) + } + + + /** + * Prepare the root picker element with all bindings. + */ + function prepareElementRoot() { + + P.$root. + + on({ + + // When something within the root is focused, stop from bubbling + // to the doc and remove the “focused” state from the root. + focusin: function( event ) { + P.$root.removeClass( CLASSES.focused ) + aria( P.$root[0], 'selected', false ) + event.stopPropagation() + }, + + // When something within the root holder is clicked, stop it + // from bubbling to the doc. + 'mousedown click': function( event ) { + + var target = event.target + + // Make sure the target isn’t the root holder so it can bubble up. + if ( target != P.$root.children()[ 0 ] ) { + + event.stopPropagation() + + // * For mousedown events, cancel the default action in order to + // prevent cases where focus is shifted onto external elements + // when using things like jQuery mobile or MagnificPopup (ref: #249 & #120). + // Also, for Firefox, don’t prevent action on the `option` element. + if ( event.type == 'mousedown' && !$( target ).is( ':input' ) && target.nodeName != 'OPTION' ) { + + event.preventDefault() + + // Re-focus onto the element so that users can click away + // from elements focused within the picker. + ELEMENT.focus() + } + } + } + }). + + // If there’s a click on an actionable element, carry out the actions. + on( 'click', '[data-pick], [data-nav], [data-clear]', function() { + + var $target = $( this ), + targetData = $target.data(), + targetDisabled = $target.hasClass( CLASSES.navDisabled ) || $target.hasClass( CLASSES.disabled ), + + // * For IE, non-focusable elements can be active elements as well + // (http://stackoverflow.com/a/2684561). + activeElement = document.activeElement + activeElement = activeElement && ( activeElement.type || activeElement.href ) && activeElement + + // If it’s disabled or nothing inside is actively focused, re-focus the element. + if ( targetDisabled || activeElement && !$.contains( P.$root[0], activeElement ) ) { + ELEMENT.focus() + } + + // If something is superficially changed, update the `highlight` based on the `nav`. + if ( targetData.nav && !targetDisabled ) { + P.set( 'highlight', P.component.item.highlight, { nav: targetData.nav } ) + } + + // If something is picked, set `select` then close with focus. + else if ( PickerConstructor._.isInteger( targetData.pick ) && !targetDisabled ) { + P.set( 'select', targetData.pick ).close( true ) + } + + // If a “clear” button is pressed, empty the values and close with focus. + else if ( targetData.clear ) { + P.clear().close( true ) + } + }) //P.$root + + aria( P.$root[0], 'hidden', true ) + } + + + /** + * Prepare the hidden input element along with all bindings. + */ + function prepareElementHidden() { + + var id = [ + typeof SETTINGS.hiddenPrefix == 'string' ? SETTINGS.hiddenPrefix : '', + typeof SETTINGS.hiddenSuffix == 'string' ? SETTINGS.hiddenSuffix : '_submit' + ] + + P._hidden = $( + '' + )[0] + + $ELEMENT. + + // If the value changes, update the hidden input with the correct format. + on('change.' + STATE.id, function() { + P._hidden.value = ELEMENT.value ? + P.get('select', SETTINGS.formatSubmit) : + '' + }). + + // Insert the hidden input after the element. + after(P._hidden) + } + + + // Separated for IE + function focusToOpen( event ) { + + // Stop the event from propagating to the doc. + event.stopPropagation() + + // If it’s a focus event, add the “focused” class to the root. + if ( event.type == 'focus' ) { + P.$root.addClass( CLASSES.focused ) + aria( P.$root[0], 'selected', true ) + } + + // And then finally open the picker. + P.open() + } + + + // Return a new picker instance. + return new PickerInstance() +} //PickerConstructor + + + +/** + * The default classes and prefix to use for the HTML classes. + */ +PickerConstructor.klasses = function( prefix ) { + prefix = prefix || 'picker' + return { + + picker: prefix, + opened: prefix + '--opened', + focused: prefix + '--focused', + + input: prefix + '__input', + active: prefix + '__input--active', + + holder: prefix + '__holder', + + frame: prefix + '__frame', + wrap: prefix + '__wrap', + + box: prefix + '__box' + } +} //PickerConstructor.klasses + + + +/** + * PickerConstructor helper methods. + */ +PickerConstructor._ = { + + /** + * Create a group of nodes. Expects: + * ` + { + min: {Integer}, + max: {Integer}, + i: {Integer}, + node: {String}, + item: {Function} + } + * ` + */ + group: function( groupObject ) { + + var + // Scope for the looped object + loopObjectScope, + + // Create the nodes list + nodesList = '', + + // The counter starts from the `min` + counter = PickerConstructor._.trigger( groupObject.min, groupObject ) + + + // Loop from the `min` to `max`, incrementing by `i` + for ( ; counter <= PickerConstructor._.trigger( groupObject.max, groupObject, [ counter ] ); counter += groupObject.i ) { + + // Trigger the `item` function within scope of the object + loopObjectScope = PickerConstructor._.trigger( groupObject.item, groupObject, [ counter ] ) + + // Splice the subgroup and create nodes out of the sub nodes + nodesList += PickerConstructor._.node( + groupObject.node, + loopObjectScope[ 0 ], // the node + loopObjectScope[ 1 ], // the classes + loopObjectScope[ 2 ] // the attributes + ) + } + + // Return the list of nodes + return nodesList + }, //group + + + /** + * Create a dom node string + */ + node: function( wrapper, item, klass, attribute ) { + + // If the item is false-y, just return an empty string + if ( !item ) return '' + + // If the item is an array, do a join + item = $.isArray( item ) ? item.join( '' ) : item + + // Check for the class + klass = klass ? ' class="' + klass + '"' : '' + + // Check for any attributes + attribute = attribute ? ' ' + attribute : '' + + // Return the wrapped item + return '<' + wrapper + klass + attribute + '>' + item + '' + }, //node + + + /** + * Lead numbers below 10 with a zero. + */ + lead: function( number ) { + return ( number < 10 ? '0': '' ) + number + }, + + + /** + * Trigger a function otherwise return the value. + */ + trigger: function( callback, scope, args ) { + return typeof callback == 'function' ? callback.apply( scope, args || [] ) : callback + }, + + + /** + * If the second character is a digit, length is 2 otherwise 1. + */ + digits: function( string ) { + return ( /\d/ ).test( string[ 1 ] ) ? 2 : 1 + }, + + + /** + * Tell if something is a date object. + */ + isDate: function( value ) { + return {}.toString.call( value ).indexOf( 'Date' ) > -1 && this.isInteger( value.getDate() ) + }, + + + /** + * Tell if something is an integer. + */ + isInteger: function( value ) { + return {}.toString.call( value ).indexOf( 'Number' ) > -1 && value % 1 === 0 + }, + + + /** + * Create ARIA attribute strings. + */ + ariaAttr: ariaAttr +} //PickerConstructor._ + + + +/** + * Extend the picker with a component and defaults. + */ +PickerConstructor.extend = function( name, Component ) { + + // Extend jQuery. + $.fn[ name ] = function( options, action ) { + + // Grab the component data. + var componentData = this.data( name ) + + // If the picker is requested, return the data object. + if ( options == 'picker' ) { + return componentData + } + + // If the component data exists and `options` is a string, carry out the action. + if ( componentData && typeof options == 'string' ) { + PickerConstructor._.trigger( componentData[ options ], componentData, [ action ] ) + return this + } + + // Otherwise go through each matched element and if the component + // doesn’t exist, create a new picker using `this` element + // and merging the defaults and options with a deep copy. + return this.each( function() { + var $this = $( this ) + if ( !$this.data( name ) ) { + new PickerConstructor( this, name, Component, options ) + } + }) + } + + // Set the defaults. + $.fn[ name ].defaults = Component.defaults +} //PickerConstructor.extend + + + +function aria(element, attribute, value) { + if ( $.isPlainObject(attribute) ) { + for ( var key in attribute ) { + ariaSet(element, key, attribute[key]) + } + } + else { + ariaSet(element, attribute, value) + } +} +function ariaSet(element, attribute, value) { + element.setAttribute( + (attribute == 'role' ? '' : 'aria-') + attribute, + value + ) +} +function ariaAttr(attribute, data) { + if ( !$.isPlainObject(attribute) ) { + attribute = { attribute: data } + } + data = '' + for ( var key in attribute ) { + var attr = (key == 'role' ? '' : 'aria-') + key, + attrVal = attribute[key] + data += attrVal == null ? '' : attr + '="' + attribute[key] + '"' + } + return data +} + + + +// Expose the picker constructor. +return PickerConstructor + + +})); + + + diff --git a/vendor/assets/pickdate/picker.time.js b/vendor/assets/pickdate/picker.time.js new file mode 100644 index 00000000..93d600f7 --- /dev/null +++ b/vendor/assets/pickdate/picker.time.js @@ -0,0 +1,985 @@ + +/*! + * Time picker for pickadate.js v3.4.0 + * http://amsul.github.io/pickadate.js/time.htm + */ + +(function ( factory ) { + + // Register as an anonymous module. + if ( typeof define == 'function' && define.amd ) + define( ['picker','jquery'], factory ) + + // Or using browser globals. + else factory( Picker, jQuery ) + +}(function( Picker, $ ) { + + +/** + * Globals and constants + */ +var HOURS_IN_DAY = 24, + MINUTES_IN_HOUR = 60, + HOURS_TO_NOON = 12, + MINUTES_IN_DAY = HOURS_IN_DAY * MINUTES_IN_HOUR, + _ = Picker._ + + + +/** + * The time picker constructor + */ +function TimePicker( picker, settings ) { + + var clock = this, + elementValue = picker.$node[ 0 ].value, + elementDataValue = picker.$node.data( 'value' ), + valueString = elementDataValue || elementValue, + formatString = elementDataValue ? settings.formatSubmit : settings.format + + clock.settings = settings + clock.$node = picker.$node + + // The queue of methods that will be used to build item objects. + clock.queue = { + interval: 'i', + min: 'measure create', + max: 'measure create', + now: 'now create', + select: 'parse create validate', + highlight: 'parse create validate', + view: 'parse create validate', + disable: 'deactivate', + enable: 'activate' + } + + // The component's item object. + clock.item = {} + + clock.item.interval = settings.interval || 30 + clock.item.disable = ( settings.disable || [] ).slice( 0 ) + clock.item.enable = -(function( collectionDisabled ) { + return collectionDisabled[ 0 ] === true ? collectionDisabled.shift() : -1 + })( clock.item.disable ) + + clock. + set( 'min', settings.min ). + set( 'max', settings.max ). + set( 'now' ) + + // When there’s a value, set the `select`, which in turn + // also sets the `highlight` and `view`. + if ( valueString ) { + clock.set( 'select', valueString, { + format: formatString, + fromValue: !!elementValue + }) + } + + // If there’s no value, default to highlighting “today”. + else { + clock. + set( 'select', null ). + set( 'highlight', clock.item.now ) + } + + // The keycode to movement mapping. + clock.key = { + 40: 1, // Down + 38: -1, // Up + 39: 1, // Right + 37: -1, // Left + go: function( timeChange ) { + clock.set( + 'highlight', + clock.item.highlight.pick + timeChange * clock.item.interval, + { interval: timeChange * clock.item.interval } + ) + this.render() + } + } + + + // Bind some picker events. + picker. + on( 'render', function() { + var $pickerHolder = picker.$root.children(), + $viewset = $pickerHolder.find( '.' + settings.klass.viewset ) + if ( $viewset.length ) { + $pickerHolder[ 0 ].scrollTop = ~~$viewset.position().top - ( $viewset[ 0 ].clientHeight * 2 ) + } + }). + on( 'open', function() { + picker.$root.find( 'button' ).attr( 'disable', false ) + }). + on( 'close', function() { + picker.$root.find( 'button' ).attr( 'disable', true ) + }) + +} //TimePicker + + +/** + * Set a timepicker item object. + */ +TimePicker.prototype.set = function( type, value, options ) { + + var clock = this, + clockItem = clock.item + + // If the value is `null` just set it immediately. + if ( value === null ) { + clockItem[ type ] = value + return clock + } + + // Otherwise go through the queue of methods, and invoke the functions. + // Update this as the time unit, and set the final value as this item. + // * In the case of `enable`, keep the queue but set `disable` instead. + // And in the case of `flip`, keep the queue but set `enable` instead. + clockItem[ ( type == 'enable' ? 'disable' : type == 'flip' ? 'enable' : type ) ] = clock.queue[ type ].split( ' ' ).map( function( method ) { + value = clock[ method ]( type, value, options ) + return value + }).pop() + + // Check if we need to cascade through more updates. + if ( type == 'select' ) { + clock.set( 'highlight', clockItem.select, options ) + } + else if ( type == 'highlight' ) { + clock.set( 'view', clockItem.highlight, options ) + } + else if ( type == 'interval' ) { + clock. + set( 'min', clockItem.min, options ). + set( 'max', clockItem.max, options ) + } + else if ( type.match( /^(flip|min|max|disable|enable)$/ ) ) { + if ( type == 'min' ) { + clock.set( 'max', clockItem.max, options ) + } + if ( clockItem.select && clock.disabled( clockItem.select ) ) { + clock.set( 'select', clockItem.select, options ) + } + if ( clockItem.highlight && clock.disabled( clockItem.highlight ) ) { + clock.set( 'highlight', clockItem.highlight, options ) + } + } + + return clock +} //TimePicker.prototype.set + + +/** + * Get a timepicker item object. + */ +TimePicker.prototype.get = function( type ) { + return this.item[ type ] +} //TimePicker.prototype.get + + +/** + * Create a picker time object. + */ +TimePicker.prototype.create = function( type, value, options ) { + + var clock = this + + // If there’s no value, use the type as the value. + value = value === undefined ? type : value + + // If it’s a date object, convert it into an array. + if ( _.isDate( value ) ) { + value = [ value.getHours(), value.getMinutes() ] + } + + // If it’s an object, use the “pick” value. + if ( $.isPlainObject( value ) && _.isInteger( value.pick ) ) { + value = value.pick + } + + // If it’s an array, convert it into minutes. + else if ( $.isArray( value ) ) { + value = +value[ 0 ] * MINUTES_IN_HOUR + (+value[ 1 ]) + } + + // If no valid value is passed, set it to “now”. + else if ( !_.isInteger( value ) ) { + value = clock.now( type, value, options ) + } + + // If we’re setting the max, make sure it’s greater than the min. + if ( type == 'max' && value < clock.item.min.pick ) { + value += MINUTES_IN_DAY + } + + // If the value doesn’t fall directly on the interval, + // add one interval to indicate it as “passed”. + if ( type != 'min' && type != 'max' && (value - clock.item.min.pick) % clock.item.interval !== 0 ) { + value += clock.item.interval + } + + // Normalize it into a “reachable” interval. + value = clock.normalize( type, value, options ) + + // Return the compiled object. + return { + + // Divide to get hours from minutes. + hour: ~~( HOURS_IN_DAY + value / MINUTES_IN_HOUR ) % HOURS_IN_DAY, + + // The remainder is the minutes. + mins: ( MINUTES_IN_HOUR + value % MINUTES_IN_HOUR ) % MINUTES_IN_HOUR, + + // The time in total minutes. + time: ( MINUTES_IN_DAY + value ) % MINUTES_IN_DAY, + + // Reference to the “relative” value to pick. + pick: value + } +} //TimePicker.prototype.create + + +/** + * Create a range limit object using an array, date object, + * literal “true”, or integer relative to another time. + */ +TimePicker.prototype.createRange = function( from, to ) { + + var clock = this, + createTime = function( time ) { + if ( time === true || $.isArray( time ) || _.isDate( time ) ) { + return clock.create( time ) + } + return time + } + + // Create objects if possible. + if ( !_.isInteger( from ) ) { + from = createTime( from ) + } + if ( !_.isInteger( to ) ) { + to = createTime( to ) + } + + // Create relative times. + if ( _.isInteger( from ) && $.isPlainObject( to ) ) { + from = [ to.hour, to.mins + ( from * clock.settings.interval ) ]; + } + else if ( _.isInteger( to ) && $.isPlainObject( from ) ) { + to = [ from.hour, from.mins + ( to * clock.settings.interval ) ]; + } + + return { + from: createTime( from ), + to: createTime( to ) + } +} //TimePicker.prototype.createRange + + +/** + * Check if a time unit falls within a time range object. + */ +TimePicker.prototype.withinRange = function( range, timeUnit ) { + range = this.createRange(range.from, range.to) + return timeUnit.pick >= range.from.pick && timeUnit.pick <= range.to.pick +} + + +/** + * Check if two time range objects overlap. + */ +TimePicker.prototype.overlapRanges = function( one, two ) { + + var clock = this + + // Convert the ranges into comparable times. + one = clock.createRange( one.from, one.to ) + two = clock.createRange( two.from, two.to ) + + return clock.withinRange( one, two.from ) || clock.withinRange( one, two.to ) || + clock.withinRange( two, one.from ) || clock.withinRange( two, one.to ) +} + + +/** + * Get the time relative to now. + */ +TimePicker.prototype.now = function( type, value/*, options*/ ) { + + var interval = this.item.interval, + date = new Date(), + nowMinutes = date.getHours() * MINUTES_IN_HOUR + date.getMinutes(), + isValueInteger = _.isInteger( value ), + isBelowInterval + + // Make sure “now” falls within the interval range. + nowMinutes -= nowMinutes % interval + + // Check if the difference is less than the interval itself. + isBelowInterval = value < 0 && interval * value + nowMinutes <= -interval + + // Add an interval because the time has “passed”. + nowMinutes += type == 'min' && isBelowInterval ? 0 : interval + + // If the value is a number, adjust by that many intervals. + if ( isValueInteger ) { + nowMinutes += interval * ( + isBelowInterval && type != 'max' ? + value + 1 : + value + ) + } + + // Return the final calculation. + return nowMinutes +} //TimePicker.prototype.now + + +/** + * Normalize minutes to be “reachable” based on the min and interval. + */ +TimePicker.prototype.normalize = function( type, value/*, options*/ ) { + + var interval = this.item.interval, + minTime = this.item.min && this.item.min.pick || 0 + + // If setting min time, don’t shift anything. + // Otherwise get the value and min difference and then + // normalize the difference with the interval. + value -= type == 'min' ? 0 : ( value - minTime ) % interval + + // Return the adjusted value. + return value +} //TimePicker.prototype.normalize + + +/** + * Measure the range of minutes. + */ +TimePicker.prototype.measure = function( type, value, options ) { + + var clock = this + + // If it’s anything false-y, set it to the default. + if ( !value ) { + value = type == 'min' ? [ 0, 0 ] : [ HOURS_IN_DAY - 1, MINUTES_IN_HOUR - 1 ] + } + + // If it’s a literal true, or an integer, make it relative to now. + else if ( value === true || _.isInteger( value ) ) { + value = clock.now( type, value, options ) + } + + // If it’s an object already, just normalize it. + else if ( $.isPlainObject( value ) && _.isInteger( value.pick ) ) { + value = clock.normalize( type, value.pick, options ) + } + + return value +} ///TimePicker.prototype.measure + + +/** + * Validate an object as enabled. + */ +TimePicker.prototype.validate = function( type, timeObject, options ) { + + var clock = this, + interval = options && options.interval ? options.interval : clock.item.interval + + // Check if the object is disabled. + if ( clock.disabled( timeObject ) ) { + + // Shift with the interval until we reach an enabled time. + timeObject = clock.shift( timeObject, interval ) + } + + // Scope the object into range. + timeObject = clock.scope( timeObject ) + + // Do a second check to see if we landed on a disabled min/max. + // In that case, shift using the opposite interval as before. + if ( clock.disabled( timeObject ) ) { + timeObject = clock.shift( timeObject, interval * -1 ) + } + + // Return the final object. + return timeObject +} //TimePicker.prototype.validate + + +/** + * Check if an object is disabled. + */ +TimePicker.prototype.disabled = function( timeToVerify ) { + + var clock = this, + + // Filter through the disabled times to check if this is one. + isDisabledMatch = clock.item.disable.filter( function( timeToDisable ) { + + // If the time is a number, match the hours. + if ( _.isInteger( timeToDisable ) ) { + return timeToVerify.hour == timeToDisable + } + + // If it’s an array, create the object and match the times. + if ( $.isArray( timeToDisable ) || _.isDate( timeToDisable ) ) { + return timeToVerify.pick == clock.create( timeToDisable ).pick + } + + // If it’s an object, match a time within the “from” and “to” range. + if ( $.isPlainObject( timeToDisable ) ) { + return clock.withinRange( timeToDisable, timeToVerify ) + } + }) + + // If this time matches a disabled time, confirm it’s not inverted. + isDisabledMatch = isDisabledMatch.length && !isDisabledMatch.filter(function( timeToDisable ) { + return $.isArray( timeToDisable ) && timeToDisable[2] == 'inverted' || + $.isPlainObject( timeToDisable ) && timeToDisable.inverted + }).length + + // If the clock is "enabled" flag is flipped, flip the condition. + return clock.item.enable === -1 ? !isDisabledMatch : isDisabledMatch || + timeToVerify.pick < clock.item.min.pick || + timeToVerify.pick > clock.item.max.pick +} //TimePicker.prototype.disabled + + +/** + * Shift an object by an interval until we reach an enabled object. + */ +TimePicker.prototype.shift = function( timeObject, interval ) { + + var clock = this, + minLimit = clock.item.min.pick, + maxLimit = clock.item.max.pick/*, + safety = 1000*/ + + interval = interval || clock.item.interval + + // Keep looping as long as the time is disabled. + while ( /*safety &&*/ clock.disabled( timeObject ) ) { + + /*safety -= 1 + if ( !safety ) { + throw 'Fell into an infinite loop while shifting to ' + timeObject.hour + ':' + timeObject.mins + '.' + }*/ + + // Increase/decrease the time by the interval and keep looping. + timeObject = clock.create( timeObject.pick += interval ) + + // If we've looped beyond the limits, break out of the loop. + if ( timeObject.pick <= minLimit || timeObject.pick >= maxLimit ) { + break + } + } + + // Return the final object. + return timeObject +} //TimePicker.prototype.shift + + +/** + * Scope an object to be within range of min and max. + */ +TimePicker.prototype.scope = function( timeObject ) { + var minLimit = this.item.min.pick, + maxLimit = this.item.max.pick + return this.create( timeObject.pick > maxLimit ? maxLimit : timeObject.pick < minLimit ? minLimit : timeObject ) +} //TimePicker.prototype.scope + + +/** + * Parse a string into a usable type. + */ +TimePicker.prototype.parse = function( type, value, options ) { + + var hour, minutes, isPM, item, parseValue, + clock = this, + parsingObject = {} + + if ( !value || _.isInteger( value ) || $.isArray( value ) || _.isDate( value ) || $.isPlainObject( value ) && _.isInteger( value.pick ) ) { + return value + } + + // We need a `.format` to parse the value with. + if ( !( options && options.format ) ) { + options = options || {} + options.format = clock.settings.format + } + + // Convert the format into an array and then map through it. + clock.formats.toArray( options.format ).map( function( label ) { + + var + substring, + + // Grab the formatting label. + formattingLabel = clock.formats[ label ], + + // The format length is from the formatting label function or the + // label length without the escaping exclamation (!) mark. + formatLength = formattingLabel ? + _.trigger( formattingLabel, clock, [ value, parsingObject ] ) : + label.replace( /^!/, '' ).length + + // If there's a format label, split the value up to the format length. + // Then add it to the parsing object with appropriate label. + if ( formattingLabel ) { + substring = value.substr( 0, formatLength ) + parsingObject[ label ] = substring.match(/^\d+$/) ? +substring : substring + } + + // Update the time value as the substring from format length to end. + value = value.substr( formatLength ) + }) + + // Grab the hour and minutes from the parsing object. + for ( item in parsingObject ) { + parseValue = parsingObject[item] + if ( _.isInteger(parseValue) ) { + if ( item.match(/^(h|hh)$/i) ) { + hour = parseValue + if ( item == 'h' || item == 'hh' ) { + hour %= 12 + } + } + else if ( item == 'i' ) { + minutes = parseValue + } + } + else if ( item.match(/^a$/i) && parseValue.match(/^p/i) && ('h' in parsingObject || 'hh' in parsingObject) ) { + isPM = true + } + } + + // Calculate it in minutes and return. + return (isPM ? hour + 12 : hour) * MINUTES_IN_HOUR + minutes +} //TimePicker.prototype.parse + + +/** + * Various formats to display the object in. + */ +TimePicker.prototype.formats = { + + h: function( string, timeObject ) { + + // If there's string, then get the digits length. + // Otherwise return the selected hour in "standard" format. + return string ? _.digits( string ) : timeObject.hour % HOURS_TO_NOON || HOURS_TO_NOON + }, + hh: function( string, timeObject ) { + + // If there's a string, then the length is always 2. + // Otherwise return the selected hour in "standard" format with a leading zero. + return string ? 2 : _.lead( timeObject.hour % HOURS_TO_NOON || HOURS_TO_NOON ) + }, + H: function( string, timeObject ) { + + // If there's string, then get the digits length. + // Otherwise return the selected hour in "military" format as a string. + return string ? _.digits( string ) : '' + ( timeObject.hour % 24 ) + }, + HH: function( string, timeObject ) { + + // If there's string, then get the digits length. + // Otherwise return the selected hour in "military" format with a leading zero. + return string ? _.digits( string ) : _.lead( timeObject.hour % 24 ) + }, + i: function( string, timeObject ) { + + // If there's a string, then the length is always 2. + // Otherwise return the selected minutes. + return string ? 2 : _.lead( timeObject.mins ) + }, + a: function( string, timeObject ) { + + // If there's a string, then the length is always 4. + // Otherwise check if it's more than "noon" and return either am/pm. + return string ? 4 : MINUTES_IN_DAY / 2 > timeObject.time % MINUTES_IN_DAY ? 'a.m.' : 'p.m.' + }, + A: function( string, timeObject ) { + + // If there's a string, then the length is always 2. + // Otherwise check if it's more than "noon" and return either am/pm. + return string ? 2 : MINUTES_IN_DAY / 2 > timeObject.time % MINUTES_IN_DAY ? 'AM' : 'PM' + }, + + // Create an array by splitting the formatting string passed. + toArray: function( formatString ) { return formatString.split( /(h{1,2}|H{1,2}|i|a|A|!.)/g ) }, + + // Format an object into a string using the formatting options. + toString: function ( formatString, itemObject ) { + var clock = this + return clock.formats.toArray( formatString ).map( function( label ) { + return _.trigger( clock.formats[ label ], clock, [ 0, itemObject ] ) || label.replace( /^!/, '' ) + }).join( '' ) + } +} //TimePicker.prototype.formats + + + + +/** + * Check if two time units are the exact. + */ +TimePicker.prototype.isTimeExact = function( one, two ) { + + var clock = this + + // When we’re working with minutes, do a direct comparison. + if ( + ( _.isInteger( one ) && _.isInteger( two ) ) || + ( typeof one == 'boolean' && typeof two == 'boolean' ) + ) { + return one === two + } + + // When we’re working with time representations, compare the “pick” value. + if ( + ( _.isDate( one ) || $.isArray( one ) ) && + ( _.isDate( two ) || $.isArray( two ) ) + ) { + return clock.create( one ).pick === clock.create( two ).pick + } + + // When we’re working with range objects, compare the “from” and “to”. + if ( $.isPlainObject( one ) && $.isPlainObject( two ) ) { + return clock.isTimeExact( one.from, two.from ) && clock.isTimeExact( one.to, two.to ) + } + + return false +} + + +/** + * Check if two time units overlap. + */ +TimePicker.prototype.isTimeOverlap = function( one, two ) { + + var clock = this + + // When we’re working with an integer, compare the hours. + if ( _.isInteger( one ) && ( _.isDate( two ) || $.isArray( two ) ) ) { + return one === clock.create( two ).hour + } + if ( _.isInteger( two ) && ( _.isDate( one ) || $.isArray( one ) ) ) { + return two === clock.create( one ).hour + } + + // When we’re working with range objects, check if the ranges overlap. + if ( $.isPlainObject( one ) && $.isPlainObject( two ) ) { + return clock.overlapRanges( one, two ) + } + + return false +} + + +/** + * Flip the “enabled” state. + */ +TimePicker.prototype.flipEnable = function(val) { + var itemObject = this.item + itemObject.enable = val || (itemObject.enable == -1 ? 1 : -1) +} + + +/** + * Mark a collection of times as “disabled”. + */ +TimePicker.prototype.deactivate = function( type, timesToDisable ) { + + var clock = this, + disabledItems = clock.item.disable.slice(0) + + + // If we’re flipping, that’s all we need to do. + if ( timesToDisable == 'flip' ) { + clock.flipEnable() + } + + else if ( timesToDisable === false ) { + clock.flipEnable(1) + disabledItems = [] + } + + else if ( timesToDisable === true ) { + clock.flipEnable(-1) + disabledItems = [] + } + + // Otherwise go through the times to disable. + else { + + timesToDisable.map(function( unitToDisable ) { + + var matchFound + + // When we have disabled items, check for matches. + // If something is matched, immediately break out. + for ( var index = 0; index < disabledItems.length; index += 1 ) { + if ( clock.isTimeExact( unitToDisable, disabledItems[index] ) ) { + matchFound = true + break + } + } + + // If nothing was found, add the validated unit to the collection. + if ( !matchFound ) { + if ( + _.isInteger( unitToDisable ) || + _.isDate( unitToDisable ) || + $.isArray( unitToDisable ) || + ( $.isPlainObject( unitToDisable ) && unitToDisable.from && unitToDisable.to ) + ) { + disabledItems.push( unitToDisable ) + } + } + }) + } + + // Return the updated collection. + return disabledItems +} //TimePicker.prototype.deactivate + + +/** + * Mark a collection of times as “enabled”. + */ +TimePicker.prototype.activate = function( type, timesToEnable ) { + + var clock = this, + disabledItems = clock.item.disable, + disabledItemsCount = disabledItems.length + + // If we’re flipping, that’s all we need to do. + if ( timesToEnable == 'flip' ) { + clock.flipEnable() + } + + else if ( timesToEnable === true ) { + clock.flipEnable(1) + disabledItems = [] + } + + else if ( timesToEnable === false ) { + clock.flipEnable(-1) + disabledItems = [] + } + + // Otherwise go through the disabled times. + else { + + timesToEnable.map(function( unitToEnable ) { + + var matchFound, + disabledUnit, + index, + isRangeMatched + + // Go through the disabled items and try to find a match. + for ( index = 0; index < disabledItemsCount; index += 1 ) { + + disabledUnit = disabledItems[index] + + // When an exact match is found, remove it from the collection. + if ( clock.isTimeExact( disabledUnit, unitToEnable ) ) { + matchFound = disabledItems[index] = null + isRangeMatched = true + break + } + + // When an overlapped match is found, add the “inverted” state to it. + else if ( clock.isTimeOverlap( disabledUnit, unitToEnable ) ) { + if ( $.isPlainObject( unitToEnable ) ) { + unitToEnable.inverted = true + matchFound = unitToEnable + } + else if ( $.isArray( unitToEnable ) ) { + matchFound = unitToEnable + if ( !matchFound[2] ) matchFound.push( 'inverted' ) + } + else if ( _.isDate( unitToEnable ) ) { + matchFound = [ unitToEnable.getFullYear(), unitToEnable.getMonth(), unitToEnable.getDate(), 'inverted' ] + } + break + } + } + + // If a match was found, remove a previous duplicate entry. + if ( matchFound ) for ( index = 0; index < disabledItemsCount; index += 1 ) { + if ( clock.isTimeExact( disabledItems[index], unitToEnable ) ) { + disabledItems[index] = null + break + } + } + + // In the event that we’re dealing with an overlap of range times, + // make sure there are no “inverted” times because of it. + if ( isRangeMatched ) for ( index = 0; index < disabledItemsCount; index += 1 ) { + if ( clock.isTimeOverlap( disabledItems[index], unitToEnable ) ) { + disabledItems[index] = null + break + } + } + + // If something is still matched, add it into the collection. + if ( matchFound ) { + disabledItems.push( matchFound ) + } + }) + } + + // Return the updated collection. + return disabledItems.filter(function( val ) { return val != null }) +} //TimePicker.prototype.activate + + +/** + * The division to use for the range intervals. + */ +TimePicker.prototype.i = function( type, value/*, options*/ ) { + return _.isInteger( value ) && value > 0 ? value : this.item.interval +} + + +/** + * Create a string for the nodes in the picker. + */ +TimePicker.prototype.nodes = function( isOpen ) { + + var + clock = this, + settings = clock.settings, + selectedObject = clock.item.select, + highlightedObject = clock.item.highlight, + viewsetObject = clock.item.view, + disabledCollection = clock.item.disable + + return _.node( + 'ul', + _.group({ + min: clock.item.min.pick, + max: clock.item.max.pick, + i: clock.item.interval, + node: 'li', + item: function( loopedTime ) { + loopedTime = clock.create( loopedTime ) + var timeMinutes = loopedTime.pick, + isSelected = selectedObject && selectedObject.pick == timeMinutes, + isHighlighted = highlightedObject && highlightedObject.pick == timeMinutes, + isDisabled = disabledCollection && clock.disabled( loopedTime ) + return [ + _.trigger( clock.formats.toString, clock, [ _.trigger( settings.formatLabel, clock, [ loopedTime ] ) || settings.format, loopedTime ] ), + (function( klasses ) { + + if ( isSelected ) { + klasses.push( settings.klass.selected ) + } + + if ( isHighlighted ) { + klasses.push( settings.klass.highlighted ) + } + + if ( viewsetObject && viewsetObject.pick == timeMinutes ) { + klasses.push( settings.klass.viewset ) + } + + if ( isDisabled ) { + klasses.push( settings.klass.disabled ) + } + + return klasses.join( ' ' ) + })( [ settings.klass.listItem ] ), + 'data-pick=' + loopedTime.pick + ' ' + _.ariaAttr({ + role: 'button', + controls: clock.$node[0].id, + checked: isSelected && clock.$node.val() === _.trigger( + clock.formats.toString, + clock, + [ settings.format, loopedTime ] + ) ? true : null, + activedescendant: isHighlighted ? true : null, + disabled: isDisabled ? true : null + }) + ] + } + }) + + + // * For Firefox forms to submit, make sure to set the button’s `type` attribute as “button”. + _.node( + 'li', + _.node( + 'button', + settings.clear, + settings.klass.buttonClear, + 'type=button data-clear=1' + ( isOpen ? '' : ' disable' ) + ) + ), + settings.klass.list + ) +} //TimePicker.prototype.nodes + + + + + + + +/* ========================================================================== + Extend the picker to add the component with the defaults. + ========================================================================== */ + +TimePicker.defaults = (function( prefix ) { + + return { + + // Clear + clear: 'Clear', + + // The format to show on the `input` element + format: 'h:i A', + + // The interval between each time + interval: 30, + + // Classes + klass: { + + picker: prefix + ' ' + prefix + '--time', + holder: prefix + '__holder', + + list: prefix + '__list', + listItem: prefix + '__list-item', + + disabled: prefix + '__list-item--disabled', + selected: prefix + '__list-item--selected', + highlighted: prefix + '__list-item--highlighted', + viewset: prefix + '__list-item--viewset', + now: prefix + '__list-item--now', + + buttonClear: prefix + '__button--clear' + } + } +})( Picker.klasses().picker ) + + + + + +/** + * Extend the picker to add the time picker. + */ +Picker.extend( 'pickatime', TimePicker ) + + +})); + + + diff --git a/vendor/assets/pickdate/themes/classic.css b/vendor/assets/pickdate/themes/classic.css new file mode 100644 index 00000000..d7f63e24 --- /dev/null +++ b/vendor/assets/pickdate/themes/classic.css @@ -0,0 +1,109 @@ +/* ========================================================================== + $BASE-PICKER + ========================================================================== */ +/** + * Note: the root picker element should *NOT* be styled more than what’s here. + */ +.picker { + font-size: 16px; + text-align: left; + line-height: 1.2; + color: #000000; + position: absolute; + z-index: 10000; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +/** + * The picker input element. + */ +.picker__input { + cursor: default; +} +/** + * When the picker is opened, the input element is “activated”. + */ +.picker__input.picker__input--active { + border-color: #0089ec; +} +/** + * The holder is the only “scrollable” top-level container element. + */ +.picker__holder { + width: 100%; + overflow-y: auto; + -webkit-overflow-scrolling: touch; +} + +/*! + * Classic picker styling for pickadate.js + * Demo: http://amsul.github.io/pickadate.js + */ +/** + * Note: the root picker element should *NOT* be styled more than what’s here. + */ +.picker { + width: 100%; +} +/** + * The holder is the base of the picker. + */ +.picker__holder { + position: absolute; + background: #ffffff; + border: 1px solid #aaaaaa; + border-top-width: 0; + border-bottom-width: 0; + -webkit-border-radius: 0 0 5px 5px; + -moz-border-radius: 0 0 5px 5px; + border-radius: 0 0 5px 5px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + min-width: 176px; + max-width: 466px; + max-height: 0; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + filter: alpha(opacity=0); + -moz-opacity: 0; + opacity: 0; + -webkit-transform: translateY(-1em) perspective(600px) rotateX(10deg); + -moz-transform: translateY(-1em) perspective(600px) rotateX(10deg); + transform: translateY(-1em) perspective(600px) rotateX(10deg); + -webkit-transition: all 0.15s ease-out, max-height 0 0.15s, border-width 0 0.15s; + -moz-transition: all 0.15s ease-out, max-height 0 0.15s, border-width 0 0.15s; + transition: all 0.15s ease-out, max-height 0 0.15s, border-width 0 0.15s; +} +/** + * The frame and wrap work together to ensure that + * clicks within the picker don’t reach the holder. + */ +.picker__frame { + padding: 1px; +} +.picker__wrap { + margin: -1px; +} +/** + * When the picker opens... + */ +.picker--opened .picker__holder { + max-height: 25em; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; + filter: alpha(opacity=100); + -moz-opacity: 1; + opacity: 1; + border-top-width: 1px; + border-bottom-width: 1px; + -webkit-transform: translateY(0) perspective(600px) rotateX(0); + -moz-transform: translateY(0) perspective(600px) rotateX(0); + transform: translateY(0) perspective(600px) rotateX(0); + -webkit-transition: all 0.15s ease-out, max-height 0, border-width 0; + -moz-transition: all 0.15s ease-out, max-height 0, border-width 0; + transition: all 0.15s ease-out, max-height 0, border-width 0; + -webkit-box-shadow: 0 6px 18px 1px rgba(0, 0, 0, 0.12); + -moz-box-shadow: 0 6px 18px 1px rgba(0, 0, 0, 0.12); + box-shadow: 0 6px 18px 1px rgba(0, 0, 0, 0.12); +} diff --git a/vendor/assets/pickdate/themes/classic.date.css b/vendor/assets/pickdate/themes/classic.date.css new file mode 100644 index 00000000..dc595309 --- /dev/null +++ b/vendor/assets/pickdate/themes/classic.date.css @@ -0,0 +1,277 @@ +/* ========================================================================== + $BASE-DATE-PICKER + ========================================================================== */ +/** + * The picker box. + */ +.picker__box { + padding: 0 1em; +} +/** + * The header containing the month and year stuff. + */ +.picker__header { + text-align: center; + position: relative; + margin-top: .75em; +} +/** + * The month and year labels. + */ +.picker__month, +.picker__year { + font-weight: 500; + display: inline-block; + margin-left: .25em; + margin-right: .25em; +} +.picker__year { + color: #999999; + font-size: .8em; + font-style: italic; +} +/** + * The month and year selectors. + */ +.picker__select--month, +.picker__select--year { + border: 1px solid #b7b7b7; + height: 2.5em; + padding: .5em .25em; + margin-left: .25em; + margin-right: .25em; + font-size: .6em; +} +@media (min-width: 24.5em) { + .picker__select--month, + .picker__select--year { + font-size: .8em; + margin-top: -0.5em; + } +} +.picker__select--month { + width: 35%; +} +.picker__select--year { + width: 22.5%; +} +.picker__select--month:focus, +.picker__select--year:focus { + border-color: #0089ec; +} +/** + * The month navigation buttons. + */ +.picker__nav--prev, +.picker__nav--next { + position: absolute; + padding: .5em 1.25em; + width: 1em; + height: 1em; + top: -0.25em; +} +@media (min-width: 24.5em) { + .picker__nav--prev, + .picker__nav--next { + top: -0.33em; + } +} +.picker__nav--prev { + left: -1em; + padding-right: 1.25em; +} +@media (min-width: 24.5em) { + .picker__nav--prev { + padding-right: 1.5em; + } +} +.picker__nav--next { + right: -1em; + padding-left: 1.25em; +} +@media (min-width: 24.5em) { + .picker__nav--next { + padding-left: 1.5em; + } +} +.picker__nav--prev:before, +.picker__nav--next:before { + content: " "; + border-top: .5em solid transparent; + border-bottom: .5em solid transparent; + border-right: 0.75em solid #000000; + width: 0; + height: 0; + display: block; + margin: 0 auto; +} +.picker__nav--next:before { + border-right: 0; + border-left: 0.75em solid #000000; +} +.picker__nav--prev:hover, +.picker__nav--next:hover { + cursor: pointer; + color: #000000; + background: #b1dcfb; +} +.picker__nav--disabled, +.picker__nav--disabled:hover, +.picker__nav--disabled:before, +.picker__nav--disabled:before:hover { + cursor: default; + background: none; + border-right-color: #f5f5f5; + border-left-color: #f5f5f5; +} +/** + * The calendar table of dates + */ +.picker__table { + text-align: center; + border-collapse: collapse; + border-spacing: 0; + table-layout: fixed; + font-size: inherit; + width: 100%; + margin-top: .75em; + margin-bottom: .5em; +} +@media (min-height: 33.875em) { + .picker__table { + margin-bottom: .75em; + } +} +.picker__table td { + margin: 0; + padding: 0; +} +/** + * The weekday labels + */ +.picker__weekday { + width: 14.285714286%; + font-size: .75em; + padding-bottom: .25em; + color: #999999; + font-weight: 500; + /* Increase the spacing a tad */ +} +@media (min-height: 33.875em) { + .picker__weekday { + padding-bottom: .5em; + } +} +/** + * The days on the calendar + */ +.picker__day { + padding: .3125em 0; + font-weight: 200; + border: 1px solid transparent; +} +.picker__day--today { + color: #0089ec; + position: relative; +} +.picker__day--today:before { + content: " "; + position: absolute; + top: 2px; + right: 2px; + width: 0; + height: 0; + border-top: 0.5em solid #0059bc; + border-left: .5em solid transparent; +} +.picker__day--selected, +.picker__day--selected:hover { + border-color: #0089ec; +} +.picker__day--highlighted { + background: #b1dcfb; +} +.picker__day--disabled:before { + border-top-color: #aaaaaa; +} +.picker__day--outfocus { + color: #dddddd; +} +.picker__day--infocus:hover, +.picker__day--outfocus:hover { + cursor: pointer; + color: #000000; + background: #b1dcfb; +} +.picker__day--highlighted:hover, +.picker--focused .picker__day--highlighted { + background: #0089ec; + color: #ffffff; +} +.picker__day--disabled, +.picker__day--disabled:hover { + background: #f5f5f5; + border-color: #f5f5f5; + color: #dddddd; + cursor: default; +} +.picker__day--highlighted.picker__day--disabled, +.picker__day--highlighted.picker__day--disabled:hover { + background: #bbbbbb; +} +/** + * The footer containing the "today" and "clear" buttons. + */ +.picker__footer { + text-align: center; +} +.picker__button--today, +.picker__button--clear { + border: 1px solid #ffffff; + background: #ffffff; + font-size: .8em; + padding: .66em 0; + font-weight: bold; + width: 50%; + display: inline-block; + vertical-align: bottom; +} +.picker__button--today:hover, +.picker__button--clear:hover { + cursor: pointer; + color: #000000; + background: #b1dcfb; + border-bottom-color: #b1dcfb; +} +.picker__button--today:focus, +.picker__button--clear:focus { + background: #b1dcfb; + border-color: #0089ec; + outline: none; +} +.picker__button--today:before, +.picker__button--clear:before { + position: relative; + display: inline-block; + height: 0; +} +.picker__button--today:before { + content: " "; + margin-right: .45em; + top: -0.05em; + width: 0; + border-top: 0.66em solid #0059bc; + border-left: .66em solid transparent; +} +.picker__button--clear:before { + content: "\D7"; + margin-right: .35em; + top: -0.1em; + color: #ee2200; + vertical-align: top; + font-size: 1.1em; +} + +/* ========================================================================== + $CLASSIC-DATE-PICKER + ========================================================================== */ diff --git a/vendor/assets/pickdate/themes/classic.time.css b/vendor/assets/pickdate/themes/classic.time.css new file mode 100644 index 00000000..8067820c --- /dev/null +++ b/vendor/assets/pickdate/themes/classic.time.css @@ -0,0 +1,128 @@ +/* ========================================================================== + $BASE-TIME-PICKER + ========================================================================== */ +/** + * The list of times. + */ +.picker__list { + list-style: none; + padding: 0.75em 0 4.2em; + margin: 0; +} +/** + * The times on the clock. + */ +.picker__list-item { + border-bottom: 1px solid #dddddd; + border-top: 1px solid #dddddd; + margin-bottom: -1px; + position: relative; + background: #ffffff; + padding: .75em 1.25em; +} +@media (min-height: 46.75em) { + .picker__list-item { + padding: .5em 1em; + } +} +/* Hovered time */ +.picker__list-item:hover { + cursor: pointer; + color: #000000; + background: #b1dcfb; + border-color: #0089ec; + z-index: 10; +} +/* Selected time */ +.picker__list-item--selected, +.picker__list-item--selected:hover { + border-color: #0089ec; + z-index: 10; +} +/* Highlighted time */ +.picker__list-item--highlighted { + background: #b1dcfb; +} +/* Highlighted and hovered/focused time */ +.picker__list-item--highlighted:hover, +.picker--focused .picker__list-item--highlighted { + background: #0089ec; + color: #ffffff; +} +/* Disabled time */ +.picker__list-item--disabled, +.picker__list-item--disabled:hover, +.picker--focused .picker__list-item--disabled { + background: #f5f5f5; + border-color: #f5f5f5; + color: #dddddd; + cursor: default; + border-color: #dddddd; + z-index: auto; +} +/** + * The clear button + */ +.picker--time .picker__button--clear { + display: block; + width: 80%; + margin: 1em auto 0; + padding: 1em 1.25em; + background: none; + border: 0; + font-weight: 500; + font-size: .67em; + text-align: center; + text-transform: uppercase; + color: #666; +} +.picker--time .picker__button--clear:hover, +.picker--time .picker__button--clear:focus { + color: #000000; + background: #b1dcfb; + background: #ee2200; + border-color: #ee2200; + cursor: pointer; + color: #ffffff; + outline: none; +} +.picker--time .picker__button--clear:before { + top: -0.25em; + color: #666; + font-size: 1.25em; + font-weight: bold; +} +.picker--time .picker__button--clear:hover:before, +.picker--time .picker__button--clear:focus:before { + color: #ffffff; +} + +/* ========================================================================== + $CLASSIC-TIME-PICKER + ========================================================================== */ +/** + * Note: the root picker element should __NOT__ be styled + * more than what’s here. Style the `.picker__holder` instead. + */ +.picker--time { + min-width: 256px; + max-width: 320px; +} +/** + * The holder is the base of the picker. + */ +.picker--time .picker__holder { + background: #f2f2f2; +} +@media (min-height: 40.125em) { + .picker--time .picker__holder { + font-size: .875em; + } +} +/** + * The box contains the list of times. + */ +.picker--time .picker__box { + padding: 0; + position: relative; +} diff --git a/vendor/assets/pickdate/themes/default.css b/vendor/assets/pickdate/themes/default.css new file mode 100644 index 00000000..cc903d55 --- /dev/null +++ b/vendor/assets/pickdate/themes/default.css @@ -0,0 +1,174 @@ +/* ========================================================================== + $BASE-PICKER + ========================================================================== */ +/** + * Note: the root picker element should *NOT* be styled more than what’s here. + */ +.picker { + font-size: 16px; + text-align: left; + line-height: 1.2; + color: #000000; + position: absolute; + z-index: 10000; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +/** + * The picker input element. + */ +.picker__input { + cursor: default; +} +/** + * When the picker is opened, the input element is “activated”. + */ +.picker__input.picker__input--active { + border-color: #0089ec; +} +/** + * The holder is the only “scrollable” top-level container element. + */ +.picker__holder { + width: 100%; + overflow-y: auto; + -webkit-overflow-scrolling: touch; +} + +/*! + * Default mobile-first, responsive styling for pickadate.js + * Demo: http://amsul.github.io/pickadate.js + */ +/** + * Note: the root picker element should *NOT* be styled more than what’s here. + */ +/** + * Make the holder and frame fullscreen. + */ +.picker__holder, +.picker__frame { + bottom: 0; + left: 0; + right: 0; + top: 100%; +} +/** + * The holder should overlay the entire screen. + */ +.picker__holder { + position: fixed; + -webkit-transition: background 0.15s ease-out, top 0s 0.15s; + -moz-transition: background 0.15s ease-out, top 0s 0.15s; + transition: background 0.15s ease-out, top 0s 0.15s; +} +/** + * The frame that bounds the box contents of the picker. + */ +.picker__frame { + position: absolute; + margin: 0 auto; + min-width: 256px; + max-width: 666px; + width: 100%; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + filter: alpha(opacity=0); + -moz-opacity: 0; + opacity: 0; + -webkit-transition: all 0.15s ease-out; + -moz-transition: all 0.15s ease-out; + transition: all 0.15s ease-out; +} +@media (min-height: 33.875em) { + .picker__frame { + overflow: visible; + top: auto; + bottom: -100%; + max-height: 80%; + } +} +@media (min-height: 40.125em) { + .picker__frame { + margin-bottom: 7.5%; + } +} +/** + * The wrapper sets the stage to vertically align the box contents. + */ +.picker__wrap { + display: table; + width: 100%; + height: 100%; +} +@media (min-height: 33.875em) { + .picker__wrap { + display: block; + } +} +/** + * The box contains all the picker contents. + */ +.picker__box { + background: #ffffff; + display: table-cell; + vertical-align: middle; +} +@media (min-height: 26.5em) { + .picker__box { + font-size: 1.25em; + } +} +@media (min-height: 33.875em) { + .picker__box { + display: block; + font-size: 1.33em; + border: 1px solid #777777; + border-top-color: #898989; + border-bottom-width: 0; + -webkit-border-radius: 5px 5px 0 0; + -moz-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; + -webkit-box-shadow: 0 12px 36px 16px rgba(0, 0, 0, 0.24); + -moz-box-shadow: 0 12px 36px 16px rgba(0, 0, 0, 0.24); + box-shadow: 0 12px 36px 16px rgba(0, 0, 0, 0.24); + } +} +@media (min-height: 40.125em) { + .picker__box { + font-size: 1.5em; + border-bottom-width: 1px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + } +} +/** + * When the picker opens... + */ +.picker--opened .picker__holder { + top: 0; + background: transparent; + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#1E000000,endColorstr=#1E000000)"; + zoom: 1; + background: rgba(0, 0, 0, 0.32); + -webkit-transition: background 0.15s ease-out; + -moz-transition: background 0.15s ease-out; + transition: background 0.15s ease-out; +} +.picker--opened .picker__frame { + top: 0; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; + filter: alpha(opacity=100); + -moz-opacity: 1; + opacity: 1; +} +@media (min-height: 33.875em) { + .picker--opened .picker__frame { + top: auto; + bottom: 0; + } +} +/** + * For `large` screens, transform into an inline picker. + */ diff --git a/vendor/assets/pickdate/themes/default.date.css b/vendor/assets/pickdate/themes/default.date.css new file mode 100644 index 00000000..94d06597 --- /dev/null +++ b/vendor/assets/pickdate/themes/default.date.css @@ -0,0 +1,278 @@ +/* ========================================================================== + $BASE-DATE-PICKER + ========================================================================== */ +/** + * The picker box. + */ +.picker__box { + padding: 0 1em; +} +/** + * The header containing the month and year stuff. + */ +.picker__header { + text-align: center; + position: relative; + margin-top: .75em; +} +/** + * The month and year labels. + */ +.picker__month, +.picker__year { + font-weight: 500; + display: inline-block; + margin-left: .25em; + margin-right: .25em; +} +.picker__year { + color: #999999; + font-size: .8em; + font-style: italic; +} +/** + * The month and year selectors. + */ +.picker__select--month, +.picker__select--year { + border: 1px solid #b7b7b7; + height: 2.5em; + padding: .5em .25em; + margin-left: .25em; + margin-right: .25em; + font-size: .6em; +} +@media (min-width: 24.5em) { + .picker__select--month, + .picker__select--year { + font-size: .8em; + margin-top: -0.5em; + } +} +.picker__select--month { + width: 35%; +} +.picker__select--year { + width: 22.5%; +} +.picker__select--month:focus, +.picker__select--year:focus { + border-color: #0089ec; +} +/** + * The month navigation buttons. + */ +.picker__nav--prev, +.picker__nav--next { + position: absolute; + padding: .5em 1.25em; + width: 1em; + height: 1em; + top: -0.25em; +} +@media (min-width: 24.5em) { + .picker__nav--prev, + .picker__nav--next { + top: -0.33em; + } +} +.picker__nav--prev { + left: -1em; + padding-right: 1.25em; +} +@media (min-width: 24.5em) { + .picker__nav--prev { + padding-right: 1.5em; + } +} +.picker__nav--next { + right: -1em; + padding-left: 1.25em; +} +@media (min-width: 24.5em) { + .picker__nav--next { + padding-left: 1.5em; + } +} +.picker__nav--prev:before, +.picker__nav--next:before { + content: " "; + border-top: .5em solid transparent; + border-bottom: .5em solid transparent; + border-right: 0.75em solid #000000; + width: 0; + height: 0; + display: block; + margin: 0 auto; +} +.picker__nav--next:before { + border-right: 0; + border-left: 0.75em solid #000000; +} +.picker__nav--prev:hover, +.picker__nav--next:hover { + cursor: pointer; + color: #000000; + background: #b1dcfb; +} +.picker__nav--disabled, +.picker__nav--disabled:hover, +.picker__nav--disabled:before, +.picker__nav--disabled:before:hover { + cursor: default; + background: none; + border-right-color: #f5f5f5; + border-left-color: #f5f5f5; +} +/** + * The calendar table of dates + */ +.picker__table { + text-align: center; + border-collapse: collapse; + border-spacing: 0; + table-layout: fixed; + font-size: inherit; + width: 100%; + margin-top: .75em; + margin-bottom: .5em; +} +@media (min-height: 33.875em) { + .picker__table { + margin-bottom: .75em; + } +} +.picker__table td { + margin: 0; + padding: 0; +} +/** + * The weekday labels + */ +.picker__weekday { + width: 14.285714286%; + font-size: .75em; + padding-bottom: .25em; + color: #999999; + font-weight: 500; + /* Increase the spacing a tad */ +} +@media (min-height: 33.875em) { + .picker__weekday { + padding-bottom: .5em; + } +} +/** + * The days on the calendar + */ +.picker__day { + padding: .3125em 0; + font-weight: 200; + border: 1px solid transparent; +} +.picker__day--today { + color: #0089ec; + position: relative; +} +.picker__day--today:before { + content: " "; + position: absolute; + top: 2px; + right: 2px; + width: 0; + height: 0; + border-top: 0.5em solid #0059bc; + border-left: .5em solid transparent; +} +.picker__day--selected, +.picker__day--selected:hover { + border-color: #0089ec; +} +.picker__day--highlighted { + background: #b1dcfb; +} +.picker__day--disabled:before { + border-top-color: #aaaaaa; +} +.picker__day--outfocus { + color: #dddddd; +} +.picker__day--infocus:hover, +.picker__day--outfocus:hover { + cursor: pointer; + color: #000000; + background: #b1dcfb; +} +.picker__day--highlighted:hover, +.picker--focused .picker__day--highlighted { + background: #0089ec; + color: #ffffff; +} +.picker__day--disabled, +.picker__day--disabled:hover { + background: #f5f5f5; + border-color: #f5f5f5; + color: #dddddd; + cursor: default; +} +.picker__day--highlighted.picker__day--disabled, +.picker__day--highlighted.picker__day--disabled:hover { + background: #bbbbbb; +} +/** + * The footer containing the "today" and "clear" buttons. + */ +.picker__footer { + text-align: center; +} +.picker__button--today, +.picker__button--clear { + border: 1px solid #ffffff; + background: #ffffff; + color: #555; + font-size: .8em; + padding: .66em 0; + font-weight: bold; + width: 50%; + display: inline-block; + vertical-align: bottom; +} +.picker__button--today:hover, +.picker__button--clear:hover { + cursor: pointer; + color: #000000; + background: #b1dcfb; + border-bottom-color: #b1dcfb; +} +.picker__button--today:focus, +.picker__button--clear:focus { + background: #b1dcfb; + border-color: #0089ec; + outline: none; +} +.picker__button--today:before, +.picker__button--clear:before { + position: relative; + display: inline-block; + height: 0; +} +.picker__button--today:before { + content: " "; + margin-right: .45em; + top: -0.05em; + width: 0; + border-top: 0.66em solid #0059bc; + border-left: .66em solid transparent; +} +.picker__button--clear:before { + content: "\D7"; + margin-right: .35em; + top: -0.1em; + color: #ee2200; + vertical-align: top; + font-size: 1.1em; +} + +/* ========================================================================== + $DEFAULT-DATE-PICKER + ========================================================================== */ diff --git a/vendor/assets/pickdate/themes/default.time.css b/vendor/assets/pickdate/themes/default.time.css new file mode 100644 index 00000000..026ee50f --- /dev/null +++ b/vendor/assets/pickdate/themes/default.time.css @@ -0,0 +1,122 @@ +/* ========================================================================== + $BASE-TIME-PICKER + ========================================================================== */ +/** + * The list of times. + */ +.picker__list { + list-style: none; + padding: 0.75em 0 4.2em; + margin: 0; +} +/** + * The times on the clock. + */ +.picker__list-item { + border-bottom: 1px solid #dddddd; + border-top: 1px solid #dddddd; + margin-bottom: -1px; + position: relative; + background: #ffffff; + padding: .75em 1.25em; +} +@media (min-height: 46.75em) { + .picker__list-item { + padding: .5em 1em; + } +} +/* Hovered time */ +.picker__list-item:hover { + cursor: pointer; + color: #000000; + background: #b1dcfb; + border-color: #0089ec; + z-index: 10; +} +/* Selected time */ +.picker__list-item--selected, +.picker__list-item--selected:hover { + border-color: #0089ec; + z-index: 10; +} +/* Highlighted time */ +.picker__list-item--highlighted { + background: #b1dcfb; +} +/* Highlighted and hovered/focused time */ +.picker__list-item--highlighted:hover, +.picker--focused .picker__list-item--highlighted { + background: #0089ec; + color: #ffffff; +} +/* Disabled time */ +.picker__list-item--disabled, +.picker__list-item--disabled:hover, +.picker--focused .picker__list-item--disabled { + background: #f5f5f5; + border-color: #f5f5f5; + color: #dddddd; + cursor: default; + border-color: #dddddd; + z-index: auto; +} +/** + * The clear button + */ +.picker--time .picker__button--clear { + display: block; + width: 80%; + margin: 1em auto 0; + padding: 1em 1.25em; + background: none; + border: 0; + font-weight: 500; + font-size: .67em; + text-align: center; + text-transform: uppercase; + color: #666; +} +.picker--time .picker__button--clear:hover, +.picker--time .picker__button--clear:focus { + color: #000000; + background: #b1dcfb; + background: #ee2200; + border-color: #ee2200; + cursor: pointer; + color: #ffffff; + outline: none; +} +.picker--time .picker__button--clear:before { + top: -0.25em; + color: #666; + font-size: 1.25em; + font-weight: bold; +} +.picker--time .picker__button--clear:hover:before, +.picker--time .picker__button--clear:focus:before { + color: #ffffff; +} + +/* ========================================================================== + $DEFAULT-TIME-PICKER + ========================================================================== */ +/** + * The frame the bounds the time picker. + */ +.picker--time .picker__frame { + min-width: 256px; + max-width: 320px; +} +/** + * The picker box. + */ +.picker--time .picker__box { + font-size: 1em; + background: #f2f2f2; + padding: 0; +} +@media (min-height: 40.125em) { + .picker--time .picker__box { + margin-bottom: 5em; + } +} diff --git a/vendor/assets/pickdate/themes/rtl.css b/vendor/assets/pickdate/themes/rtl.css new file mode 100644 index 00000000..6de48202 --- /dev/null +++ b/vendor/assets/pickdate/themes/rtl.css @@ -0,0 +1,29 @@ +/*! + * Styling for RTL (right-to-left) languages using pickadate.js + */ +/** + * Switch the direction - only really necessary if + * it hasn’t already been applied higher up in the DOM. + */ +.picker { + direction: rtl; +} +/** + * Flip around the “next” and “previous” buttons. + */ +.picker__nav--next { + right: auto; + left: -1em; +} +.picker__nav--prev { + left: auto; + right: -1em; +} +.picker__nav--next:before { + border-left: 0; + border-right: 0.75em solid #000000; +} +.picker__nav--prev:before { + border-right: 0; + border-left: 0.75em solid #000000; +} diff --git a/vendor/assets/pickdate/translations/NAMING.md b/vendor/assets/pickdate/translations/NAMING.md new file mode 100644 index 00000000..2376d6f7 --- /dev/null +++ b/vendor/assets/pickdate/translations/NAMING.md @@ -0,0 +1,21 @@ +### The following convention is used for naming the translation files: + +``` +LANGUAGE_COUNTRY.js +``` + +#### Where: + +``` +LANGUAGE = The lowercase ISO 639-1 language code. +``` + +> See http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes + +``` +COUNTRY = The uppercase ISO 3166-1 country code. +``` + +> See http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements + +When there is no `COUNTRY` in the filename, it is assumed the generic language is used in multiple countries. diff --git a/vendor/assets/pickdate/translations/ar.js b/vendor/assets/pickdate/translations/ar.js new file mode 100644 index 00000000..613ca253 --- /dev/null +++ b/vendor/assets/pickdate/translations/ar.js @@ -0,0 +1,13 @@ +// Arabic + +$pickadate_translations['ar'] = { + monthsFull: [ 'يناير', 'فبراير', 'مارس', 'ابريل', 'مايو', 'يونيو', 'يوليو', 'اغسطس', 'سبتمبر', 'اكتوبر', 'نوفمبر', 'ديسمبر' ], + monthsShort: [ 'يناير', 'فبراير', 'مارس', 'ابريل', 'مايو', 'يونيو', 'يوليو', 'اغسطس', 'سبتمبر', 'اكتوبر', 'نوفمبر', 'ديسمبر' ], + weekdaysFull: [ 'الاحد', 'الاثنين', 'الثلاثاء', 'الاربعاء', 'الخميس', 'الجمعة', 'السبت' ], + weekdaysShort: [ 'الاحد', 'الاثنين', 'الثلاثاء', 'الاربعاء', 'الخميس', 'الجمعة', 'السبت' ], + today: 'اليوم', + clear: 'مسح', + format: 'yyyy-mm-dd', + displayFormat: 'yyyy mmmm dd', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/bg.js b/vendor/assets/pickdate/translations/bg.js new file mode 100644 index 00000000..dd52b72a --- /dev/null +++ b/vendor/assets/pickdate/translations/bg.js @@ -0,0 +1,14 @@ +// Bulgarian + +$pickadate_translations['bg'] = { + monthsFull: [ 'януари','февруари','март','април','май','юни','юли','август','септември','октомври','ноември','декември' ], + monthsShort: [ 'янр','фев','мар','апр','май','юни','юли','авг','сеп','окт','ное','дек' ], + weekdaysFull: [ 'неделя', 'понеделник', 'вторник', 'сряда', 'четвъртък', 'петък', 'събота' ], + weekdaysShort: [ 'нд', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб' ], + today: 'днес', + clear: 'изтривам', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'd mmmm yyyy г.', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/bs.js b/vendor/assets/pickdate/translations/bs.js new file mode 100644 index 00000000..ddb72212 --- /dev/null +++ b/vendor/assets/pickdate/translations/bs.js @@ -0,0 +1,14 @@ +// Bosnian + +$pickadate_translations['bs'] = { + monthsFull: [ 'januar', 'februar', 'mart', 'april', 'maj', 'juni', 'juli', 'august', 'septembar', 'oktobar', 'novembar', 'decembar' ], + monthsShort: [ 'jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec' ], + weekdaysFull: [ 'nedjelja', 'ponedjeljak', 'utorak', 'srijeda', 'cetvrtak', 'petak', 'subota' ], + weekdaysShort: [ 'ne', 'po', 'ut', 'sr', 'če', 'pe', 'su' ], + today: 'danas', + clear: 'izbrisati', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'dd. mmmm yyyy.', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/ca.js b/vendor/assets/pickdate/translations/ca.js new file mode 100644 index 00000000..8b2ee07b --- /dev/null +++ b/vendor/assets/pickdate/translations/ca.js @@ -0,0 +1,14 @@ +// Catalan + +$pickadate_translations['ca'] = { + monthsFull: [ 'Gener', 'Febrer', 'Març', 'Abril', 'Maig', 'juny', 'Juliol', 'Agost', 'Setembre', 'Octubre', 'Novembre', 'Desembre' ], + monthsShort: [ 'Gen', 'Feb', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Oct', 'Nov', 'Des' ], + weekdaysFull: [ 'diumenge', 'dilluns', 'dimarts', 'dimecres', 'dijous', 'divendres', 'dissabte' ], + weekdaysShort: [ 'diu', 'dil', 'dim', 'dmc', 'dij', 'div', 'dis' ], + today: 'avui', + clear: 'esborrar', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'dddd d !de mmmm !de yyyy', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/cs.js b/vendor/assets/pickdate/translations/cs.js new file mode 100644 index 00000000..a690f790 --- /dev/null +++ b/vendor/assets/pickdate/translations/cs.js @@ -0,0 +1,14 @@ +// Czech + +$pickadate_translations['cs'] = { + monthsFull: [ 'leden', 'únor', 'březen', 'duben', 'květen', 'červen', 'červenec', 'srpen', 'září', 'říjen', 'listopad', 'prosinec' ], + monthsShort: [ 'led', 'úno', 'bře', 'dub', 'kvě', 'čer', 'čvc', 'srp', 'zář', 'říj', 'lis', 'pro' ], + weekdaysFull: [ 'neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota' ], + weekdaysShort: [ 'ne', 'po', 'út', 'st', 'čt', 'pá', 'so' ], + today: 'dnes', + clear: 'vymazat', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'd. mmmm yyyy', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/da.js b/vendor/assets/pickdate/translations/da.js new file mode 100644 index 00000000..2c76060c --- /dev/null +++ b/vendor/assets/pickdate/translations/da.js @@ -0,0 +1,14 @@ +// Danish + +$pickadate_translations['da'] = { + monthsFull: [ 'januar', 'februar', 'marts', 'april', 'maj', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'december' ], + monthsShort: [ 'jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec' ], + weekdaysFull: [ 'søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag' ], + weekdaysShort: [ 'søn', 'man', 'tir', 'ons', 'tor', 'fre', 'lør' ], + today: 'i dag', + clear: 'slet', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'd. mmmm yyyy', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/de.js b/vendor/assets/pickdate/translations/de.js new file mode 100644 index 00000000..dc327274 --- /dev/null +++ b/vendor/assets/pickdate/translations/de.js @@ -0,0 +1,14 @@ +// German + +$pickadate_translations['de'] = { + monthsFull: [ 'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember' ], + monthsShort: [ 'Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez' ], + weekdaysFull: [ 'Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag' ], + weekdaysShort: [ 'So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa' ], + today: 'Heute', + clear: 'Löschen', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'dddd, dd. mmmm yyyy', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/el.js b/vendor/assets/pickdate/translations/el.js new file mode 100644 index 00000000..e3fac06b --- /dev/null +++ b/vendor/assets/pickdate/translations/el.js @@ -0,0 +1,14 @@ +// Greek + +$pickadate_translations['el'] = { + monthsFull: [ 'Ιανουάριος', 'Φεβρουάριος', 'Μάρτιος', 'Απρίλιος', 'Μάιος', 'Ιούνιος', 'Ιούλιος', 'Αύγουστος', 'Σεπτέμβριος', 'Οκτώβριος', 'Νοέμβριος', 'Δεκέμβριος' ], + monthsShort: [ 'Ιαν', 'Φεβ', 'Μαρ', 'Απρ', 'Μαι', 'Ιουν', 'Ιουλ', 'Αυγ', 'Σεπ', 'Οκτ', 'Νοε', 'Δεκ' ], + weekdaysFull: [ 'Κυριακή', 'Δευτέρα', 'Τρίτη', 'Τετάρτη', 'Πέμπτη', 'Παρασκευή', 'Σάββατο' ], + weekdaysShort: [ 'Κυρ', 'Δευ', 'Τρι', 'Τετ', 'Πεμ', 'Παρ', 'Σαβ' ], + today: 'σήμερα', + clear: 'Διαγραφή', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'd mmmm yyyy', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/en.js b/vendor/assets/pickdate/translations/en.js new file mode 100644 index 00000000..b6c57840 --- /dev/null +++ b/vendor/assets/pickdate/translations/en.js @@ -0,0 +1,14 @@ +// English + +$pickadate_translations['en'] = { + monthsFull: [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ], + monthsShort: [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ], + weekdaysFull: [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ], + weekdaysShort: [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' ], + today: 'Today', + clear: 'Clear', + format: 'yyyy-mm-dd', + displayFormat: 'd mmmm, yyyy', + firstDay: 1, + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/es.js b/vendor/assets/pickdate/translations/es.js new file mode 100644 index 00000000..ba750c9d --- /dev/null +++ b/vendor/assets/pickdate/translations/es.js @@ -0,0 +1,14 @@ +// Spanish + +$pickadate_translations['es'] = { + monthsFull: [ 'enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre' ], + monthsShort: [ 'ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic' ], + weekdaysFull: [ 'domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado' ], + weekdaysShort: [ 'dom', 'lun', 'mar', 'mié', 'jue', 'vie', 'sáb' ], + today: 'hoy', + clear: 'borrar', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'dddd d !de mmmm !de yyyy', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/et.js b/vendor/assets/pickdate/translations/et.js new file mode 100644 index 00000000..27500e65 --- /dev/null +++ b/vendor/assets/pickdate/translations/et.js @@ -0,0 +1,14 @@ +// Estonian + +$pickadate_translations['et'] = { + monthsFull: [ 'jaanuar', 'veebruar', 'märts', 'aprill', 'mai', 'juuni', 'juuli', 'august', 'september', 'oktoober', 'november', 'detsember' ], + monthsShort: [ 'jaan', 'veebr', 'märts', 'apr', 'mai', 'juuni', 'juuli', 'aug', 'sept', 'okt', 'nov', 'dets' ], + weekdaysFull: [ 'pühapäev', 'esmaspäev', 'teisipäev', 'kolmapäev', 'neljapäev', 'reede', 'laupäev' ], + weekdaysShort: [ 'püh', 'esm', 'tei', 'kol', 'nel', 'ree', 'lau' ], + today: 'täna', + clear: 'kustutama', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'd. mmmm yyyy. a', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/eu.js b/vendor/assets/pickdate/translations/eu.js new file mode 100644 index 00000000..24c6a498 --- /dev/null +++ b/vendor/assets/pickdate/translations/eu.js @@ -0,0 +1,14 @@ +// Basque + +$pickadate_translations['eu'] = { + monthsFull: [ 'urtarrila', 'otsaila', 'martxoa', 'apirila', 'maiatza', 'ekaina', 'uztaila', 'abuztua', 'iraila', 'urria', 'azaroa', 'abendua' ], + monthsShort: [ 'urt', 'ots', 'mar', 'api', 'mai', 'eka', 'uzt', 'abu', 'ira', 'urr', 'aza', 'abe' ], + weekdaysFull: [ 'igandea', 'astelehena', 'asteartea', 'asteazkena', 'osteguna', 'ostirala', 'larunbata' ], + weekdaysShort: [ 'ig.', 'al.', 'ar.', 'az.', 'og.', 'or.', 'lr.' ], + today: 'gaur', + clear: 'garbitu', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'dddd, yyyy(e)ko mmmmren da', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/fi.js b/vendor/assets/pickdate/translations/fi.js new file mode 100644 index 00000000..f22e1096 --- /dev/null +++ b/vendor/assets/pickdate/translations/fi.js @@ -0,0 +1,14 @@ +// Finnish + +$pickadate_translations['fi'] = { + monthsFull: [ 'tammikuu', 'helmikuu', 'maaliskuu', 'huhtikuu', 'toukokuu', 'kesäkuu', 'heinäkuu', 'elokuu', 'syyskuu', 'lokakuu', 'marraskuu', 'joulukuu' ], + monthsShort: [ 'tammi', 'helmi', 'maalis', 'huhti', 'touko', 'kesä', 'heinä', 'elo', 'syys', 'loka', 'marras', 'joulu' ], + weekdaysFull: [ 'sunnuntai', 'maanantai', 'tiistai', 'keskiviikko', 'torstai', 'perjantai', 'lauantai' ], + weekdaysShort: [ 'su', 'ma', 'ti', 'ke', 'to', 'pe', 'la' ], + today: 'tänään', + clear: 'tyhjennä', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'd.m.yyyy', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/fr.js b/vendor/assets/pickdate/translations/fr.js new file mode 100644 index 00000000..60076411 --- /dev/null +++ b/vendor/assets/pickdate/translations/fr.js @@ -0,0 +1,14 @@ +// French + +$pickadate_translations['fr'] = { + monthsFull: [ 'Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre' ], + monthsShort: [ 'Jan', 'Fev', 'Mar', 'Avr', 'Mai', 'Juin', 'Juil', 'Aou', 'Sep', 'Oct', 'Nov', 'Dec' ], + weekdaysFull: [ 'Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi' ], + weekdaysShort: [ 'Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam' ], + today: 'Aujourd\'hui', + clear: 'Effacer', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'dd mmmm yyyy', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/gl.js b/vendor/assets/pickdate/translations/gl.js new file mode 100644 index 00000000..502a013d --- /dev/null +++ b/vendor/assets/pickdate/translations/gl.js @@ -0,0 +1,14 @@ +// Galician + +$pickadate_translations['gl'] = { + monthsFull: [ 'Xaneiro', 'Febreiro', 'Marzo', 'Abril', 'Maio', 'Xuño', 'Xullo', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Decembro' ], + monthsShort: [ 'xan', 'feb', 'mar', 'abr', 'mai', 'xun', 'xul', 'ago', 'sep', 'out', 'nov', 'dec' ], + weekdaysFull: [ 'domingo', 'luns', 'martes', 'mércores', 'xoves', 'venres', 'sábado' ], + weekdaysShort: [ 'dom', 'lun', 'mar', 'mér', 'xov', 'ven', 'sab' ], + today: 'hoxe', + clear: 'borrar', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'dddd d !de mmmm !de yyyy', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/he.js b/vendor/assets/pickdate/translations/he.js new file mode 100644 index 00000000..d763c0d0 --- /dev/null +++ b/vendor/assets/pickdate/translations/he.js @@ -0,0 +1,13 @@ +// Hebrew + +$pickadate_translations['he'] = { + monthsFull: [ 'ינואר', 'פברואר', 'מרץ', 'אפריל', 'מאי', 'יוני', 'יולי', 'אוגוסט', 'ספטמבר', 'אוקטובר', 'נובמבר', 'דצמבר' ], + monthsShort: [ 'ינו', 'פבר', 'מרץ', 'אפר', 'מאי', 'יונ', 'יול', 'אוג', 'ספט', 'אוק', 'נוב', 'דצמ' ], + weekdaysFull: [ 'יום ראשון', 'יום שני', 'יום שלישי', 'יום רביעי', 'יום חמישי', 'יום ששי', 'יום שבת' ], + weekdaysShort: [ 'א', 'ב', 'ג', 'ד', 'ה', 'ו', 'ש' ], + today: 'היום', + clear: 'למחוק', + format: 'yyyy-mm-dd', + displayFormat: 'yyyy mmmmב d dddd', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/hr.js b/vendor/assets/pickdate/translations/hr.js new file mode 100644 index 00000000..8b7808cd --- /dev/null +++ b/vendor/assets/pickdate/translations/hr.js @@ -0,0 +1,14 @@ +// Croatian + +$pickadate_translations['hr'] = { + monthsFull: [ 'sijećanj', 'veljača', 'ožujak', 'travanj', 'svibanj', 'lipanj', 'srpanj', 'kolovoz', 'rujan', 'listopad', 'studeni', 'prosinac' ], + monthsShort: [ 'sij', 'velj', 'ožu', 'tra', 'svi', 'lip', 'srp', 'kol', 'ruj', 'lis', 'stu', 'pro' ], + weekdaysFull: [ 'nedjelja', 'ponedjeljak', 'utorak', 'srijeda', 'četvrtak', 'petak', 'subota' ], + weekdaysShort: [ 'ned', 'pon', 'uto', 'sri', 'čet', 'pet', 'sub' ], + today: 'danas', + clear: 'izbrisati', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'd. mmmm yyyy.', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/hu.js b/vendor/assets/pickdate/translations/hu.js new file mode 100644 index 00000000..ce94caca --- /dev/null +++ b/vendor/assets/pickdate/translations/hu.js @@ -0,0 +1,14 @@ +// Hungarian + +$pickadate_translations['hu'] = { + monthsFull: [ 'január', 'február', 'március', 'aprilis', 'május', 'június', 'július', 'augusztus', 'szeptember', 'október', 'november', 'december' ], + monthsShort: [ 'jan', 'febr', 'márc', 'apr', 'máj', 'jún', 'júl', 'aug', 'szept', 'okt', 'nov', 'dec' ], + weekdaysFull: [ 'vasámap', 'hétfö', 'kedd', 'szerda', 'csütörtök', 'péntek', 'szombat' ], + weekdaysShort: [ 'V', 'H', 'K', 'SZ', 'CS', 'P', 'SZ' ], + today: 'ma', + clear: 'töröl', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'yyyy. mmmm dd.', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/id.js b/vendor/assets/pickdate/translations/id.js new file mode 100644 index 00000000..c5955369 --- /dev/null +++ b/vendor/assets/pickdate/translations/id.js @@ -0,0 +1,14 @@ +// Indonesian + +$pickadate_translations['id'] = { + monthsFull: [ 'Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember' ], + monthsShort: [ 'Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Agu', 'Sep', 'Okt', 'Nov', 'Des' ], + weekdaysFull: [ 'Minggu', 'Senin', 'Selasa', 'Rabu', 'Kamis', 'Jumat', 'Sabtu' ], + weekdaysShort: [ 'Min', 'Sen', 'Sel', 'Rab', 'Kam', 'Jum', 'Sab' ], + today: 'hari ini', + clear: 'menghapus', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'd mmmm yyyy', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/is.js b/vendor/assets/pickdate/translations/is.js new file mode 100644 index 00000000..dfe0f69a --- /dev/null +++ b/vendor/assets/pickdate/translations/is.js @@ -0,0 +1,14 @@ +// Icelandic + +$pickadate_translations['is'] = { + monthsFull: [ 'janúar', 'febrúar', 'mars', 'apríl', 'maí', 'júní', 'júlí', 'ágúst', 'september', 'október', 'nóvember', 'desember' ], + monthsShort: [ 'jan', 'feb', 'mar', 'apr', 'maí', 'jún', 'júl', 'ágú', 'sep', 'okt', 'nóv', 'des' ], + weekdaysFull: [ 'sunnudagur', 'mánudagur', 'þriðjudagur', 'miðvikudagur', 'fimmtudagur', 'föstudagur', 'laugardagur' ], + weekdaysShort: [ 'sun', 'mán', 'þri', 'mið', 'fim', 'fös', 'lau' ], + today: 'Í dag', + clear: 'Hreinsa', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'dd. mmmm yyyy', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/it.js b/vendor/assets/pickdate/translations/it.js new file mode 100644 index 00000000..c75d87cf --- /dev/null +++ b/vendor/assets/pickdate/translations/it.js @@ -0,0 +1,14 @@ +// Italian + +$pickadate_translations['it'] = { + monthsFull: [ 'gennaio', 'febbraio', 'marzo', 'aprile', 'maggio', 'giugno', 'luglio', 'agosto', 'settembre', 'ottobre', 'novembre', 'dicembre' ], + monthsShort: [ 'gen', 'feb', 'mar', 'apr', 'mag', 'giu', 'lug', 'ago', 'set', 'ott', 'nov', 'dic' ], + weekdaysFull: [ 'domenica', 'lunedì', 'martedì', 'mercoledì', 'giovedì', 'venerdì', 'sabato' ], + weekdaysShort: [ 'dom', 'lun', 'mar', 'mer', 'gio', 'ven', 'sab' ], + today: 'oggi', + clear: 'cancellare', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'dddd d mmmm yyyy', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/ja.js b/vendor/assets/pickdate/translations/ja.js new file mode 100644 index 00000000..4bf1eb84 --- /dev/null +++ b/vendor/assets/pickdate/translations/ja.js @@ -0,0 +1,14 @@ +// Japanese + +$pickadate_translations['ja'] = { + monthsFull: [ '1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月' ], + monthsShort: [ '1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月' ], + weekdaysFull: [ '日曜日', '月曜日', '火曜日', '水曜日', '木曜日', '金曜日', '土曜日' ], + weekdaysShort: [ '日曜日', '月曜日', '火曜日', '水曜日', '木曜日', '金曜日', '土曜日' ], + today: '今日', + clear: '消去', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'yyyy mm dd', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/ko.js b/vendor/assets/pickdate/translations/ko.js new file mode 100644 index 00000000..4e7a32c6 --- /dev/null +++ b/vendor/assets/pickdate/translations/ko.js @@ -0,0 +1,14 @@ +// Korean + +$pickadate_translations['ko'] = { + monthsFull: [ '1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월' ], + monthsShort: [ '1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월' ], + weekdaysFull: [ '일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일' ], + weekdaysShort: [ '일', '월', '화', '수', '목', '금', '토' ], + today: '오늘', + clear: '취소', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'yyyy 년 mm 월 dd 일', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/nl.js b/vendor/assets/pickdate/translations/nl.js new file mode 100644 index 00000000..3b59deba --- /dev/null +++ b/vendor/assets/pickdate/translations/nl.js @@ -0,0 +1,14 @@ +// Dutch + +$pickadate_translations['nl'] = { + monthsFull: [ 'januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december' ], + monthsShort: [ 'jan', 'feb', 'maa', 'apr', 'mei', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec' ], + weekdaysFull: [ 'zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag' ], + weekdaysShort: [ 'zo', 'ma', 'di', 'wo', 'do', 'vr', 'za' ], + today: 'vandaag', + clear: 'verwijderen', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'dddd d mmmm yyyy', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/no.js b/vendor/assets/pickdate/translations/no.js new file mode 100644 index 00000000..8087adee --- /dev/null +++ b/vendor/assets/pickdate/translations/no.js @@ -0,0 +1,14 @@ +// Norwegian + +$pickadate_translations['no'] = { + monthsFull: [ 'januar', 'februar', 'mars', 'april', 'mai', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'desember' ], + monthsShort: [ 'jan', 'feb', 'mar', 'apr', 'mai', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'des' ], + weekdaysFull: [ 'søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag' ], + weekdaysShort: [ 'søn','man','tir', 'ons', 'tor', 'fre', 'lør' ], + today: 'i dag', + clear: 'nullstill', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'dd. mmm. yyyy', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/original/ar.js.orig b/vendor/assets/pickdate/translations/original/ar.js.orig new file mode 100644 index 00000000..564d2861 --- /dev/null +++ b/vendor/assets/pickdate/translations/original/ar.js.orig @@ -0,0 +1,12 @@ +// Arabic + +$.extend( $.fn.pickadate.defaults, { + monthsFull: [ 'يناير', 'فبراير', 'مارس', 'ابريل', 'مايو', 'يونيو', 'يوليو', 'اغسطس', 'سبتمبر', 'اكتوبر', 'نوفمبر', 'ديسمبر' ], + monthsShort: [ 'يناير', 'فبراير', 'مارس', 'ابريل', 'مايو', 'يونيو', 'يوليو', 'اغسطس', 'سبتمبر', 'اكتوبر', 'نوفمبر', 'ديسمبر' ], + weekdaysFull: [ 'الاحد', 'الاثنين', 'الثلاثاء', 'الاربعاء', 'الخميس', 'الجمعة', 'السبت' ], + weekdaysShort: [ 'الاحد', 'الاثنين', 'الثلاثاء', 'الاربعاء', 'الخميس', 'الجمعة', 'السبت' ], + today: 'اليوم', + clear: 'مسح', + format: 'yyyy mmmm dd', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/bg_BG.js.orig b/vendor/assets/pickdate/translations/original/bg_BG.js.orig new file mode 100644 index 00000000..a7b9295f --- /dev/null +++ b/vendor/assets/pickdate/translations/original/bg_BG.js.orig @@ -0,0 +1,13 @@ +// Bulgarian + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'януари','февруари','март','април','май','юни','юли','август','септември','октомври','ноември','декември' ], + monthsShort: [ 'янр','фев','мар','апр','май','юни','юли','авг','сеп','окт','ное','дек' ], + weekdaysFull: [ 'неделя', 'понеделник', 'вторник', 'сряда', 'четвъртък', 'петък', 'събота' ], + weekdaysShort: [ 'нд', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб' ], + today: 'днес', + clear: 'изтривам', + firstDay: 1, + format: 'd mmmm yyyy г.', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/bs_BA.js.orig b/vendor/assets/pickdate/translations/original/bs_BA.js.orig new file mode 100644 index 00000000..cf2a6172 --- /dev/null +++ b/vendor/assets/pickdate/translations/original/bs_BA.js.orig @@ -0,0 +1,13 @@ +// Bosnian + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'januar', 'februar', 'mart', 'april', 'maj', 'juni', 'juli', 'august', 'septembar', 'oktobar', 'novembar', 'decembar' ], + monthsShort: [ 'jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec' ], + weekdaysFull: [ 'nedjelja', 'ponedjeljak', 'utorak', 'srijeda', 'cetvrtak', 'petak', 'subota' ], + weekdaysShort: [ 'ne', 'po', 'ut', 'sr', 'če', 'pe', 'su' ], + today: 'danas', + clear: 'izbrisati', + firstDay: 1, + format: 'dd. mmmm yyyy.', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/ca_ES.js.orig b/vendor/assets/pickdate/translations/original/ca_ES.js.orig new file mode 100644 index 00000000..03b8197e --- /dev/null +++ b/vendor/assets/pickdate/translations/original/ca_ES.js.orig @@ -0,0 +1,13 @@ +// Catalan + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'Gener', 'Febrer', 'Març', 'Abril', 'Maig', 'juny', 'Juliol', 'Agost', 'Setembre', 'Octubre', 'Novembre', 'Desembre' ], + monthsShort: [ 'Gen', 'Feb', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Oct', 'Nov', 'Des' ], + weekdaysFull: [ 'diumenge', 'dilluns', 'dimarts', 'dimecres', 'dijous', 'divendres', 'dissabte' ], + weekdaysShort: [ 'diu', 'dil', 'dim', 'dmc', 'dij', 'div', 'dis' ], + today: 'avui', + clear: 'esborrar', + firstDay: 1, + format: 'dddd d !de mmmm !de yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/cs_CZ.js.orig b/vendor/assets/pickdate/translations/original/cs_CZ.js.orig new file mode 100644 index 00000000..2c69b85d --- /dev/null +++ b/vendor/assets/pickdate/translations/original/cs_CZ.js.orig @@ -0,0 +1,13 @@ +// Czech + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'leden', 'únor', 'březen', 'duben', 'květen', 'červen', 'červenec', 'srpen', 'září', 'říjen', 'listopad', 'prosinec' ], + monthsShort: [ 'led', 'úno', 'bře', 'dub', 'kvě', 'čer', 'čvc', 'srp', 'zář', 'říj', 'lis', 'pro' ], + weekdaysFull: [ 'neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota' ], + weekdaysShort: [ 'ne', 'po', 'út', 'st', 'čt', 'pá', 'so' ], + today: 'dnes', + clear: 'vymazat', + firstDay: 1, + format: 'd. mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/da_DK.js.orig b/vendor/assets/pickdate/translations/original/da_DK.js.orig new file mode 100644 index 00000000..12defbf4 --- /dev/null +++ b/vendor/assets/pickdate/translations/original/da_DK.js.orig @@ -0,0 +1,13 @@ +// Danish + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'januar', 'februar', 'marts', 'april', 'maj', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'december' ], + monthsShort: [ 'jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec' ], + weekdaysFull: [ 'søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag' ], + weekdaysShort: [ 'søn', 'man', 'tir', 'ons', 'tor', 'fre', 'lør' ], + today: 'i dag', + clear: 'slet', + firstDay: 1, + format: 'd. mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/de_DE.js.orig b/vendor/assets/pickdate/translations/original/de_DE.js.orig new file mode 100644 index 00000000..c42fbc77 --- /dev/null +++ b/vendor/assets/pickdate/translations/original/de_DE.js.orig @@ -0,0 +1,13 @@ +// German + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember' ], + monthsShort: [ 'Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez' ], + weekdaysFull: [ 'Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag' ], + weekdaysShort: [ 'So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa' ], + today: 'Heute', + clear: 'Löschen', + firstDay: 1, + format: 'dddd, dd. mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/el_GR.js.orig b/vendor/assets/pickdate/translations/original/el_GR.js.orig new file mode 100644 index 00000000..4997296b --- /dev/null +++ b/vendor/assets/pickdate/translations/original/el_GR.js.orig @@ -0,0 +1,13 @@ +// Greek + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'Ιανουάριος', 'Φεβρουάριος', 'Μάρτιος', 'Απρίλιος', 'Μάιος', 'Ιούνιος', 'Ιούλιος', 'Αύγουστος', 'Σεπτέμβριος', 'Οκτώβριος', 'Νοέμβριος', 'Δεκέμβριος' ], + monthsShort: [ 'Ιαν', 'Φεβ', 'Μαρ', 'Απρ', 'Μαι', 'Ιουν', 'Ιουλ', 'Αυγ', 'Σεπ', 'Οκτ', 'Νοε', 'Δεκ' ], + weekdaysFull: [ 'Κυριακή', 'Δευτέρα', 'Τρίτη', 'Τετάρτη', 'Πέμπτη', 'Παρασκευή', 'Σάββατο' ], + weekdaysShort: [ 'Κυρ', 'Δευ', 'Τρι', 'Τετ', 'Πεμ', 'Παρ', 'Σαβ' ], + today: 'σήμερα', + clear: 'Διαγραφή', + firstDay: 1, + format: 'd mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/es_ES.js.orig b/vendor/assets/pickdate/translations/original/es_ES.js.orig new file mode 100644 index 00000000..e6ba56bf --- /dev/null +++ b/vendor/assets/pickdate/translations/original/es_ES.js.orig @@ -0,0 +1,13 @@ +// Spanish + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre' ], + monthsShort: [ 'ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic' ], + weekdaysFull: [ 'domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado' ], + weekdaysShort: [ 'dom', 'lun', 'mar', 'mié', 'jue', 'vie', 'sáb' ], + today: 'hoy', + clear: 'borrar', + firstDay: 1, + format: 'dddd d !de mmmm !de yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/et_EE.js.orig b/vendor/assets/pickdate/translations/original/et_EE.js.orig new file mode 100644 index 00000000..9fb3f76f --- /dev/null +++ b/vendor/assets/pickdate/translations/original/et_EE.js.orig @@ -0,0 +1,13 @@ +// Estonian + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'jaanuar', 'veebruar', 'märts', 'aprill', 'mai', 'juuni', 'juuli', 'august', 'september', 'oktoober', 'november', 'detsember' ], + monthsShort: [ 'jaan', 'veebr', 'märts', 'apr', 'mai', 'juuni', 'juuli', 'aug', 'sept', 'okt', 'nov', 'dets' ], + weekdaysFull: [ 'pühapäev', 'esmaspäev', 'teisipäev', 'kolmapäev', 'neljapäev', 'reede', 'laupäev' ], + weekdaysShort: [ 'püh', 'esm', 'tei', 'kol', 'nel', 'ree', 'lau' ], + today: 'täna', + clear: 'kustutama', + firstDay: 1, + format: 'd. mmmm yyyy. a', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/eu_ES.js.orig b/vendor/assets/pickdate/translations/original/eu_ES.js.orig new file mode 100644 index 00000000..19d3ad7a --- /dev/null +++ b/vendor/assets/pickdate/translations/original/eu_ES.js.orig @@ -0,0 +1,13 @@ +// Basque + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'urtarrila', 'otsaila', 'martxoa', 'apirila', 'maiatza', 'ekaina', 'uztaila', 'abuztua', 'iraila', 'urria', 'azaroa', 'abendua' ], + monthsShort: [ 'urt', 'ots', 'mar', 'api', 'mai', 'eka', 'uzt', 'abu', 'ira', 'urr', 'aza', 'abe' ], + weekdaysFull: [ 'igandea', 'astelehena', 'asteartea', 'asteazkena', 'osteguna', 'ostirala', 'larunbata' ], + weekdaysShort: [ 'ig.', 'al.', 'ar.', 'az.', 'og.', 'or.', 'lr.' ], + today: 'gaur', + clear: 'garbitu', + firstDay: 1, + format: 'dddd, yyyy(e)ko mmmmren da', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/fi_FI.js.orig b/vendor/assets/pickdate/translations/original/fi_FI.js.orig new file mode 100644 index 00000000..702e2469 --- /dev/null +++ b/vendor/assets/pickdate/translations/original/fi_FI.js.orig @@ -0,0 +1,13 @@ +// Finnish + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'tammikuu', 'helmikuu', 'maaliskuu', 'huhtikuu', 'toukokuu', 'kesäkuu', 'heinäkuu', 'elokuu', 'syyskuu', 'lokakuu', 'marraskuu', 'joulukuu' ], + monthsShort: [ 'tammi', 'helmi', 'maalis', 'huhti', 'touko', 'kesä', 'heinä', 'elo', 'syys', 'loka', 'marras', 'joulu' ], + weekdaysFull: [ 'sunnuntai', 'maanantai', 'tiistai', 'keskiviikko', 'torstai', 'perjantai', 'lauantai' ], + weekdaysShort: [ 'su', 'ma', 'ti', 'ke', 'to', 'pe', 'la' ], + today: 'tänään', + clear: 'tyhjennä', + firstDay: 1, + format: 'd.m.yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/fr_FR.js.orig b/vendor/assets/pickdate/translations/original/fr_FR.js.orig new file mode 100644 index 00000000..a0561479 --- /dev/null +++ b/vendor/assets/pickdate/translations/original/fr_FR.js.orig @@ -0,0 +1,13 @@ +// French + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre' ], + monthsShort: [ 'Jan', 'Fev', 'Mar', 'Avr', 'Mai', 'Juin', 'Juil', 'Aou', 'Sep', 'Oct', 'Nov', 'Dec' ], + weekdaysFull: [ 'Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi' ], + weekdaysShort: [ 'Dim', 'Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam' ], + today: 'Aujourd\'hui', + clear: 'Effacer', + firstDay: 1, + format: 'dd mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}); diff --git a/vendor/assets/pickdate/translations/original/gl_ES.js.orig b/vendor/assets/pickdate/translations/original/gl_ES.js.orig new file mode 100644 index 00000000..09f213c9 --- /dev/null +++ b/vendor/assets/pickdate/translations/original/gl_ES.js.orig @@ -0,0 +1,13 @@ +// Galician + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'Xaneiro', 'Febreiro', 'Marzo', 'Abril', 'Maio', 'Xuño', 'Xullo', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Decembro' ], + monthsShort: [ 'xan', 'feb', 'mar', 'abr', 'mai', 'xun', 'xul', 'ago', 'sep', 'out', 'nov', 'dec' ], + weekdaysFull: [ 'domingo', 'luns', 'martes', 'mércores', 'xoves', 'venres', 'sábado' ], + weekdaysShort: [ 'dom', 'lun', 'mar', 'mér', 'xov', 'ven', 'sab' ], + today: 'hoxe', + clear: 'borrar', + firstDay: 1, + format: 'dddd d !de mmmm !de yyyy', + formatSubmit: 'yyyy/mm/dd' +}); diff --git a/vendor/assets/pickdate/translations/original/he_IL.js.orig b/vendor/assets/pickdate/translations/original/he_IL.js.orig new file mode 100644 index 00000000..7a2a1d52 --- /dev/null +++ b/vendor/assets/pickdate/translations/original/he_IL.js.orig @@ -0,0 +1,12 @@ +// Hebrew + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'ינואר', 'פברואר', 'מרץ', 'אפריל', 'מאי', 'יוני', 'יולי', 'אוגוסט', 'ספטמבר', 'אוקטובר', 'נובמבר', 'דצמבר' ], + monthsShort: [ 'ינו', 'פבר', 'מרץ', 'אפר', 'מאי', 'יונ', 'יול', 'אוג', 'ספט', 'אוק', 'נוב', 'דצמ' ], + weekdaysFull: [ 'יום ראשון', 'יום שני', 'יום שלישי', 'יום רביעי', 'יום חמישי', 'יום ששי', 'יום שבת' ], + weekdaysShort: [ 'א', 'ב', 'ג', 'ד', 'ה', 'ו', 'ש' ], + today: 'היום', + clear: 'למחוק', + format: 'yyyy mmmmב d dddd', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/hr_HR.js.orig b/vendor/assets/pickdate/translations/original/hr_HR.js.orig new file mode 100644 index 00000000..4334ea66 --- /dev/null +++ b/vendor/assets/pickdate/translations/original/hr_HR.js.orig @@ -0,0 +1,13 @@ +// Croatian + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'sijećanj', 'veljača', 'ožujak', 'travanj', 'svibanj', 'lipanj', 'srpanj', 'kolovoz', 'rujan', 'listopad', 'studeni', 'prosinac' ], + monthsShort: [ 'sij', 'velj', 'ožu', 'tra', 'svi', 'lip', 'srp', 'kol', 'ruj', 'lis', 'stu', 'pro' ], + weekdaysFull: [ 'nedjelja', 'ponedjeljak', 'utorak', 'srijeda', 'četvrtak', 'petak', 'subota' ], + weekdaysShort: [ 'ned', 'pon', 'uto', 'sri', 'čet', 'pet', 'sub' ], + today: 'danas', + clear: 'izbrisati', + firstDay: 1, + format: 'd. mmmm yyyy.', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/hu_HU.js.orig b/vendor/assets/pickdate/translations/original/hu_HU.js.orig new file mode 100644 index 00000000..f618d407 --- /dev/null +++ b/vendor/assets/pickdate/translations/original/hu_HU.js.orig @@ -0,0 +1,13 @@ +// Hungarian + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'január', 'február', 'március', 'aprilis', 'május', 'június', 'július', 'augusztus', 'szeptember', 'október', 'november', 'december' ], + monthsShort: [ 'jan', 'febr', 'márc', 'apr', 'máj', 'jún', 'júl', 'aug', 'szept', 'okt', 'nov', 'dec' ], + weekdaysFull: [ 'vasámap', 'hétfö', 'kedd', 'szerda', 'csütörtök', 'péntek', 'szombat' ], + weekdaysShort: [ 'V', 'H', 'K', 'SZ', 'CS', 'P', 'SZ' ], + today: 'ma', + clear: 'töröl', + firstDay: 1, + format: 'yyyy. mmmm dd.', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/id_ID.js.orig b/vendor/assets/pickdate/translations/original/id_ID.js.orig new file mode 100644 index 00000000..f83efa83 --- /dev/null +++ b/vendor/assets/pickdate/translations/original/id_ID.js.orig @@ -0,0 +1,13 @@ +// Indonesian + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember' ], + monthsShort: [ 'Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Agu', 'Sep', 'Okt', 'Nov', 'Des' ], + weekdaysFull: [ 'Minggu', 'Senin', 'Selasa', 'Rabu', 'Kamis', 'Jumat', 'Sabtu' ], + weekdaysShort: [ 'Min', 'Sen', 'Sel', 'Rab', 'Kam', 'Jum', 'Sab' ], + today: 'hari ini', + clear: 'menghapus', + firstDay: 1, + format: 'd mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/is_IS.js.orig b/vendor/assets/pickdate/translations/original/is_IS.js.orig new file mode 100644 index 00000000..89afa732 --- /dev/null +++ b/vendor/assets/pickdate/translations/original/is_IS.js.orig @@ -0,0 +1,13 @@ +// Icelandic + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'janúar', 'febrúar', 'mars', 'apríl', 'maí', 'júní', 'júlí', 'ágúst', 'september', 'október', 'nóvember', 'desember' ], + monthsShort: [ 'jan', 'feb', 'mar', 'apr', 'maí', 'jún', 'júl', 'ágú', 'sep', 'okt', 'nóv', 'des' ], + weekdaysFull: [ 'sunnudagur', 'mánudagur', 'þriðjudagur', 'miðvikudagur', 'fimmtudagur', 'föstudagur', 'laugardagur' ], + weekdaysShort: [ 'sun', 'mán', 'þri', 'mið', 'fim', 'fös', 'lau' ], + today: 'Í dag', + clear: 'Hreinsa', + firstDay: 1, + format: 'dd. mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/it_IT.js.orig b/vendor/assets/pickdate/translations/original/it_IT.js.orig new file mode 100644 index 00000000..77df696e --- /dev/null +++ b/vendor/assets/pickdate/translations/original/it_IT.js.orig @@ -0,0 +1,13 @@ +// Italian + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'gennaio', 'febbraio', 'marzo', 'aprile', 'maggio', 'giugno', 'luglio', 'agosto', 'settembre', 'ottobre', 'novembre', 'dicembre' ], + monthsShort: [ 'gen', 'feb', 'mar', 'apr', 'mag', 'giu', 'lug', 'ago', 'set', 'ott', 'nov', 'dic' ], + weekdaysFull: [ 'domenica', 'lunedì', 'martedì', 'mercoledì', 'giovedì', 'venerdì', 'sabato' ], + weekdaysShort: [ 'dom', 'lun', 'mar', 'mer', 'gio', 'ven', 'sab' ], + today: 'oggi', + clear: 'cancellare', + firstDay: 1, + format: 'dddd d mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/ja_JP.js.orig b/vendor/assets/pickdate/translations/original/ja_JP.js.orig new file mode 100644 index 00000000..bc9133ff --- /dev/null +++ b/vendor/assets/pickdate/translations/original/ja_JP.js.orig @@ -0,0 +1,13 @@ +// Japanese + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ '1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月' ], + monthsShort: [ '1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月' ], + weekdaysFull: [ '日曜日', '月曜日', '火曜日', '水曜日', '木曜日', '金曜日', '土曜日' ], + weekdaysShort: [ '日曜日', '月曜日', '火曜日', '水曜日', '木曜日', '金曜日', '土曜日' ], + today: '今日', + clear: '消去', + firstDay: 1, + format: 'yyyy mm dd', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/ko_KR.js.orig b/vendor/assets/pickdate/translations/original/ko_KR.js.orig new file mode 100644 index 00000000..fb525f09 --- /dev/null +++ b/vendor/assets/pickdate/translations/original/ko_KR.js.orig @@ -0,0 +1,13 @@ +// Korean + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ '1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월' ], + monthsShort: [ '1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월' ], + weekdaysFull: [ '일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일' ], + weekdaysShort: [ '일', '월', '화', '수', '목', '금', '토' ], + today: '오늘', + clear: '취소', + firstDay: 1, + format: 'yyyy 년 mm 월 dd 일', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/nl_NL.js.orig b/vendor/assets/pickdate/translations/original/nl_NL.js.orig new file mode 100644 index 00000000..757b887d --- /dev/null +++ b/vendor/assets/pickdate/translations/original/nl_NL.js.orig @@ -0,0 +1,13 @@ +// Dutch + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december' ], + monthsShort: [ 'jan', 'feb', 'maa', 'apr', 'mei', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec' ], + weekdaysFull: [ 'zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag' ], + weekdaysShort: [ 'zo', 'ma', 'di', 'wo', 'do', 'vr', 'za' ], + today: 'vandaag', + clear: 'verwijderen', + firstDay: 1, + format: 'dddd d mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/no_NO.js.orig b/vendor/assets/pickdate/translations/original/no_NO.js.orig new file mode 100644 index 00000000..e2e06872 --- /dev/null +++ b/vendor/assets/pickdate/translations/original/no_NO.js.orig @@ -0,0 +1,13 @@ +// Norwegian + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'januar', 'februar', 'mars', 'april', 'mai', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'desember' ], + monthsShort: [ 'jan', 'feb', 'mar', 'apr', 'mai', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'des' ], + weekdaysFull: [ 'søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag' ], + weekdaysShort: [ 'søn','man','tir', 'ons', 'tor', 'fre', 'lør' ], + today: 'i dag', + clear: 'nullstill', + firstDay: 1, + format: 'dd. mmm. yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/pl_PL.js.orig b/vendor/assets/pickdate/translations/original/pl_PL.js.orig new file mode 100644 index 00000000..cefbf5a3 --- /dev/null +++ b/vendor/assets/pickdate/translations/original/pl_PL.js.orig @@ -0,0 +1,13 @@ +// Polish + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'styczeń', 'luty', 'marzec', 'kwiecień', 'maj', 'czerwiec', 'lipiec', 'sierpień', 'wrzesień', 'październik', 'listopad', 'grudzień' ], + monthsShort: [ 'sty', 'lut', 'mar', 'kwi', 'maj', 'cze', 'lip', 'sie', 'wrz', 'paź', 'lis', 'gru' ], + weekdaysFull: [ 'niedziela', 'poniedziałek', 'wtorek', 'środa', 'czwartek', 'piątek', 'sobota' ], + weekdaysShort: [ 'N', 'Pn', 'Wt', 'Śr', 'Cz', 'Pt', 'So' ], + today: 'dzisiaj', + clear: 'usunąć', + firstDay: 1, + format: 'd mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/pt_BR.js.orig b/vendor/assets/pickdate/translations/original/pt_BR.js.orig new file mode 100644 index 00000000..b8523e3b --- /dev/null +++ b/vendor/assets/pickdate/translations/original/pt_BR.js.orig @@ -0,0 +1,12 @@ +// Brazilian Portuguese + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'janeiro', 'fevereiro', 'março', 'abril', 'maio', 'junho', 'julho', 'agosto', 'setembro', 'outubro', 'novembro', 'dezembro' ], + monthsShort: [ 'jan', 'fev', 'mar', 'abr', 'mai', 'jun', 'jul', 'ago', 'set', 'out', 'nov', 'dez' ], + weekdaysFull: [ 'domingo', 'segunda-feira', 'terça-feira', 'quarta-feira', 'quinta-feira', 'sexta-feira', 'sábado' ], + weekdaysShort: [ 'dom', 'seg', 'ter', 'qua', 'qui', 'sex', 'sab' ], + today: 'hoje', + clear: 'excluir', + format: 'dddd, d !de mmmm !de yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/pt_PT.js.orig b/vendor/assets/pickdate/translations/original/pt_PT.js.orig new file mode 100644 index 00000000..fddbc96c --- /dev/null +++ b/vendor/assets/pickdate/translations/original/pt_PT.js.orig @@ -0,0 +1,12 @@ +// Portuguese + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'janeiro', 'fevereiro', 'março', 'abril', 'maio', 'junho', 'julho', 'agosto', 'setembro', 'outubro', 'novembro', 'dezembro' ], + monthsShort: [ 'jan', 'fev', 'mar', 'abr', 'mai', 'jun', 'jul', 'ago', 'set', 'out', 'nov', 'dez' ], + weekdaysFull: [ 'domingo', 'segunda', 'terça', 'quarta', 'quinta', 'sexta', 'sábado' ], + weekdaysShort: [ 'dom', 'seg', 'ter', 'qua', 'qui', 'sex', 'sab' ], + today: 'hoje', + clear: 'excluir', + format: 'd !de mmmm !de yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/ro_RO.js.orig b/vendor/assets/pickdate/translations/original/ro_RO.js.orig new file mode 100644 index 00000000..f06f1c03 --- /dev/null +++ b/vendor/assets/pickdate/translations/original/ro_RO.js.orig @@ -0,0 +1,13 @@ +// Romanian + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'ianuarie', 'februarie', 'martie', 'aprilie', 'mai', 'iunie', 'iulie', 'august', 'septembrie', 'octombrie', 'noiembrie', 'decembrie' ], + monthsShort: [ 'ian', 'feb', 'mar', 'apr', 'mai', 'iun', 'iul', 'aug', 'sep', 'oct', 'noi', 'dec' ], + weekdaysFull: [ 'duminică', 'luni', 'marţi', 'miercuri', 'joi', 'vineri', 'sâmbătă' ], + weekdaysShort: [ 'D', 'L', 'Ma', 'Mi', 'J', 'V', 'S' ], + today: 'azi', + clear: 'șterge', + firstDay: 1, + format: 'dd mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/ru_RU.js.orig b/vendor/assets/pickdate/translations/original/ru_RU.js.orig new file mode 100644 index 00000000..984dc1ff --- /dev/null +++ b/vendor/assets/pickdate/translations/original/ru_RU.js.orig @@ -0,0 +1,13 @@ +// Russian + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'Января', 'Февраля', 'Марта', 'Апреля', 'Мая', 'Июня', 'Июля', 'Августа', 'Сентября', 'Октября', 'Ноября', 'Декабря' ], + monthsShort: [ 'Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн', 'Июл', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек' ], + weekdaysFull: [ 'воскресенье', 'понедельник', 'вторник', 'среда', 'четверг', 'пятница', 'суббота' ], + weekdaysShort: [ 'вс', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб' ], + today: 'сегодня', + clear: 'удалить', + firstDay: 1, + format: 'd mmmm yyyy г.', + formatSubmit: 'yyyy/mm/dd' +}); diff --git a/vendor/assets/pickdate/translations/original/sk_SK.js.orig b/vendor/assets/pickdate/translations/original/sk_SK.js.orig new file mode 100644 index 00000000..e243c48e --- /dev/null +++ b/vendor/assets/pickdate/translations/original/sk_SK.js.orig @@ -0,0 +1,13 @@ +// Slovak + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'január', 'február', 'marec', 'apríl', 'máj', 'jún', 'júl', 'august', 'september', 'október', 'november', 'december' ], + monthsShort: [ 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X', 'XI', 'XII' ], + weekdaysFull: [ 'nedeļľa', 'pondelok', 'utorok', 'streda', 'š̌švrtok', 'piatok', 'sobota' ], + weekdaysShort: [ 'Ne', 'Po', 'Ut', 'St', 'Št', 'Pi', 'So' ], + today: 'dnes', + clear: 'vymazať', + firstDay: 1, + format: 'd. mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/sl_SI.js.orig b/vendor/assets/pickdate/translations/original/sl_SI.js.orig new file mode 100644 index 00000000..d20256f1 --- /dev/null +++ b/vendor/assets/pickdate/translations/original/sl_SI.js.orig @@ -0,0 +1,13 @@ +// Slovenian + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'januar', 'februar', 'marec', 'april', 'maj', 'junij', 'julij', 'avgust', 'september', 'oktober', 'november', 'december' ], + monthsShort: [ 'jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'avg', 'sep', 'okt', 'nov', 'dec' ], + weekdaysFull: [ 'nedelja', 'ponedeljek', 'torek', 'sreda', 'četrtek', 'petek', 'sobota' ], + weekdaysShort: [ 'ned', 'pon', 'tor', 'sre', 'čet', 'pet', 'sob' ], + today: 'danes', + clear: 'izbriši', + firstDay: 1, + format: 'd. mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/sv_SE.js.orig b/vendor/assets/pickdate/translations/original/sv_SE.js.orig new file mode 100644 index 00000000..ddb9be15 --- /dev/null +++ b/vendor/assets/pickdate/translations/original/sv_SE.js.orig @@ -0,0 +1,13 @@ +// Swedish + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'januari', 'februari', 'mars', 'april', 'maj', 'juni', 'juli', 'augusti', 'september', 'oktober', 'november', 'december' ], + monthsShort: [ 'jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec' ], + weekdaysFull: [ 'söndag', 'måndag', 'tisdag', 'onsdag', 'torsdag', 'fredag', 'lördag' ], + weekdaysShort: [ 'sön', 'mån', 'tis', 'ons', 'tor', 'fre', 'lör' ], + today: 'i dag', + clear: 'bort', + firstDay: 1, + format: 'd/m yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/th_TH.js.orig b/vendor/assets/pickdate/translations/original/th_TH.js.orig new file mode 100644 index 00000000..ff27dfdf --- /dev/null +++ b/vendor/assets/pickdate/translations/original/th_TH.js.orig @@ -0,0 +1,12 @@ +// Thai + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'มกราคม', 'กุมภาพันธ์', 'มีนาคม', 'เมษายน', 'พฤษภาคม', 'มิถุนายน', 'กรกฎาคม', 'สิงหาคม', 'กันยายน', 'ตุลาคม', 'พฤศจิกายน', 'ธันวาคม' ], + monthsShort: [ 'ม.ค.', 'ก.พ.', 'มี.ค.', 'เม.ย.', 'พ.ค.', 'มิ.ย.', 'ก.ค.', 'ส.ค.', 'ก.ย.', 'ต.ค.', 'พ.ย.', 'ธ.ค.' ], + weekdaysFull: [ 'อาทติย', 'จันทร', 'องัคาร', 'พุธ', 'พฤหสั บดี', 'ศกุร', 'เสาร' ], + weekdaysShort: [ 'อ.', 'จ.', 'อ.', 'พ.', 'พฤ.', 'ศ.', 'ส.' ], + today: 'วันนี้', + clear: 'ลบ', + format: 'd mmmm yyyy', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/tr_TR.js.orig b/vendor/assets/pickdate/translations/original/tr_TR.js.orig new file mode 100644 index 00000000..c97a97ea --- /dev/null +++ b/vendor/assets/pickdate/translations/original/tr_TR.js.orig @@ -0,0 +1,13 @@ +// Turkish + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'Ocak', 'Şubat', 'Mart', 'Nisan', 'Mayıs', 'Haziran', 'Temmuz', 'Ağustos', 'Eylül', 'Ekim', 'Kasım', 'Aralık' ], + monthsShort: [ 'Oca', 'Şub', 'Mar', 'Nis', 'May', 'Haz', 'Tem', 'Ağu', 'Eyl', 'Eki', 'Kas', 'Ara' ], + weekdaysFull: [ 'Pazar', 'Pazartesi', 'Salı', 'Çarşamba', 'Perşembe', 'Cuma', 'Cumartesi' ], + weekdaysShort: [ 'Pzr', 'Pzt', 'Sal', 'Çrş', 'Prş', 'Cum', 'Cmt' ], + today: 'bugün', + clear: 'sil', + firstDay: 1, + format: 'dd mmmm yyyy dddd', + formatSubmit: 'yyyy/mm/dd' +}); diff --git a/vendor/assets/pickdate/translations/original/uk_UA.js.orig b/vendor/assets/pickdate/translations/original/uk_UA.js.orig new file mode 100644 index 00000000..c224401e --- /dev/null +++ b/vendor/assets/pickdate/translations/original/uk_UA.js.orig @@ -0,0 +1,13 @@ +// Ukrainian + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ 'січень', 'лютий', 'березень', 'квітень', 'травень', 'червень', 'липень', 'серпень', 'вересень', 'жовтень', 'листопад', 'грудень' ], + monthsShort: [ 'січ', 'лют', 'бер', 'кві', 'тра', 'чер', 'лип', 'сер', 'вер', 'жов', 'лис', 'гру' ], + weekdaysFull: [ 'неділя', 'понеділок', 'вівторок', 'середа', 'четвер', 'п‘ятниця', 'субота' ], + weekdaysShort: [ 'нд', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб' ], + today: 'сьогодні', + clear: 'викреслити', + firstDay: 1, + format: 'dd mmmm yyyy p.', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/zh_CN.js.orig b/vendor/assets/pickdate/translations/original/zh_CN.js.orig new file mode 100644 index 00000000..65e857d9 --- /dev/null +++ b/vendor/assets/pickdate/translations/original/zh_CN.js.orig @@ -0,0 +1,13 @@ +// Simplified Chinese + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ '一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月' ], + monthsShort: [ '一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二' ], + weekdaysFull: [ '星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六' ], + weekdaysShort: [ '日', '一', '二', '三', '四', '五', '六' ], + today: '今日', + clear: '删', + firstDay: 1, + format: 'yyyy 年 mm 月 dd 日', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/original/zh_TW.js.orig b/vendor/assets/pickdate/translations/original/zh_TW.js.orig new file mode 100644 index 00000000..f7651d32 --- /dev/null +++ b/vendor/assets/pickdate/translations/original/zh_TW.js.orig @@ -0,0 +1,13 @@ +// Traditional Chinese + +jQuery.extend( jQuery.fn.pickadate.defaults, { + monthsFull: [ '一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月' ], + monthsShort: [ '一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二' ], + weekdaysFull: [ '星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六' ], + weekdaysShort: [ '日', '一', '二', '三', '四', '五', '六' ], + today: '今天', + clear: '清除', + firstDay: 1, + format: 'yyyy 年 mm 月 dd 日', + formatSubmit: 'yyyy/mm/dd' +}); \ No newline at end of file diff --git a/vendor/assets/pickdate/translations/pl.js b/vendor/assets/pickdate/translations/pl.js new file mode 100644 index 00000000..2ab316b0 --- /dev/null +++ b/vendor/assets/pickdate/translations/pl.js @@ -0,0 +1,14 @@ +// Polish + +$pickadate_translations['pl'] = { + monthsFull: [ 'styczeń', 'luty', 'marzec', 'kwiecień', 'maj', 'czerwiec', 'lipiec', 'sierpień', 'wrzesień', 'październik', 'listopad', 'grudzień' ], + monthsShort: [ 'sty', 'lut', 'mar', 'kwi', 'maj', 'cze', 'lip', 'sie', 'wrz', 'paź', 'lis', 'gru' ], + weekdaysFull: [ 'niedziela', 'poniedziałek', 'wtorek', 'środa', 'czwartek', 'piątek', 'sobota' ], + weekdaysShort: [ 'N', 'Pn', 'Wt', 'Śr', 'Cz', 'Pt', 'So' ], + today: 'dzisiaj', + clear: 'usunąć', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'd mmmm yyyy', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/pt.js b/vendor/assets/pickdate/translations/pt.js new file mode 100644 index 00000000..b57e3b33 --- /dev/null +++ b/vendor/assets/pickdate/translations/pt.js @@ -0,0 +1,13 @@ +// Portuguese + +$pickadate_translations['pt'] = { + monthsFull: [ 'janeiro', 'fevereiro', 'março', 'abril', 'maio', 'junho', 'julho', 'agosto', 'setembro', 'outubro', 'novembro', 'dezembro' ], + monthsShort: [ 'jan', 'fev', 'mar', 'abr', 'mai', 'jun', 'jul', 'ago', 'set', 'out', 'nov', 'dez' ], + weekdaysFull: [ 'domingo', 'segunda', 'terça', 'quarta', 'quinta', 'sexta', 'sábado' ], + weekdaysShort: [ 'dom', 'seg', 'ter', 'qua', 'qui', 'sex', 'sab' ], + today: 'hoje', + clear: 'excluir', + format: 'yyyy-mm-dd', + displayFormat: 'd !de mmmm !de yyyy', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/ro.js b/vendor/assets/pickdate/translations/ro.js new file mode 100644 index 00000000..abb21824 --- /dev/null +++ b/vendor/assets/pickdate/translations/ro.js @@ -0,0 +1,14 @@ +// Romanian + +$pickadate_translations['ro'] = { + monthsFull: [ 'ianuarie', 'februarie', 'martie', 'aprilie', 'mai', 'iunie', 'iulie', 'august', 'septembrie', 'octombrie', 'noiembrie', 'decembrie' ], + monthsShort: [ 'ian', 'feb', 'mar', 'apr', 'mai', 'iun', 'iul', 'aug', 'sep', 'oct', 'noi', 'dec' ], + weekdaysFull: [ 'duminică', 'luni', 'marţi', 'miercuri', 'joi', 'vineri', 'sâmbătă' ], + weekdaysShort: [ 'D', 'L', 'Ma', 'Mi', 'J', 'V', 'S' ], + today: 'azi', + clear: 'șterge', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'dd mmmm yyyy', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/ru.js b/vendor/assets/pickdate/translations/ru.js new file mode 100644 index 00000000..cb77aea8 --- /dev/null +++ b/vendor/assets/pickdate/translations/ru.js @@ -0,0 +1,14 @@ +// Russian + +$pickadate_translations['ru'] = { + monthsFull: [ 'Января', 'Февраля', 'Марта', 'Апреля', 'Мая', 'Июня', 'Июля', 'Августа', 'Сентября', 'Октября', 'Ноября', 'Декабря' ], + monthsShort: [ 'Янв', 'Фев', 'Мар', 'Апр', 'Май', 'Июн', 'Июл', 'Авг', 'Сен', 'Окт', 'Ноя', 'Дек' ], + weekdaysFull: [ 'воскресенье', 'понедельник', 'вторник', 'среда', 'четверг', 'пятница', 'суббота' ], + weekdaysShort: [ 'вс', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб' ], + today: 'сегодня', + clear: 'удалить', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'd mmmm yyyy г.', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/sk.js b/vendor/assets/pickdate/translations/sk.js new file mode 100644 index 00000000..aa7452a5 --- /dev/null +++ b/vendor/assets/pickdate/translations/sk.js @@ -0,0 +1,14 @@ +// Slovak + +$pickadate_translations['sk'] = { + monthsFull: [ 'január', 'február', 'marec', 'apríl', 'máj', 'jún', 'júl', 'august', 'september', 'október', 'november', 'december' ], + monthsShort: [ 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X', 'XI', 'XII' ], + weekdaysFull: [ 'nedeļľa', 'pondelok', 'utorok', 'streda', 'š̌švrtok', 'piatok', 'sobota' ], + weekdaysShort: [ 'Ne', 'Po', 'Ut', 'St', 'Št', 'Pi', 'So' ], + today: 'dnes', + clear: 'vymazať', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'd. mmmm yyyy', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/sl.js b/vendor/assets/pickdate/translations/sl.js new file mode 100644 index 00000000..31600729 --- /dev/null +++ b/vendor/assets/pickdate/translations/sl.js @@ -0,0 +1,14 @@ +// Slovenian + +$pickadate_translations['sl'] = { + monthsFull: [ 'januar', 'februar', 'marec', 'april', 'maj', 'junij', 'julij', 'avgust', 'september', 'oktober', 'november', 'december' ], + monthsShort: [ 'jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'avg', 'sep', 'okt', 'nov', 'dec' ], + weekdaysFull: [ 'nedelja', 'ponedeljek', 'torek', 'sreda', 'četrtek', 'petek', 'sobota' ], + weekdaysShort: [ 'ned', 'pon', 'tor', 'sre', 'čet', 'pet', 'sob' ], + today: 'danes', + clear: 'izbriši', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'd. mmmm yyyy', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/sv.js b/vendor/assets/pickdate/translations/sv.js new file mode 100644 index 00000000..1759b14e --- /dev/null +++ b/vendor/assets/pickdate/translations/sv.js @@ -0,0 +1,14 @@ +// Swedish + +$pickadate_translations['sv'] = { + monthsFull: [ 'januari', 'februari', 'mars', 'april', 'maj', 'juni', 'juli', 'augusti', 'september', 'oktober', 'november', 'december' ], + monthsShort: [ 'jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec' ], + weekdaysFull: [ 'söndag', 'måndag', 'tisdag', 'onsdag', 'torsdag', 'fredag', 'lördag' ], + weekdaysShort: [ 'sön', 'mån', 'tis', 'ons', 'tor', 'fre', 'lör' ], + today: 'i dag', + clear: 'bort', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'd/m yyyy', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/th.js b/vendor/assets/pickdate/translations/th.js new file mode 100644 index 00000000..fec3f793 --- /dev/null +++ b/vendor/assets/pickdate/translations/th.js @@ -0,0 +1,13 @@ +// Thai + +$pickadate_translations['th'] = { + monthsFull: [ 'มกราคม', 'กุมภาพันธ์', 'มีนาคม', 'เมษายน', 'พฤษภาคม', 'มิถุนายน', 'กรกฎาคม', 'สิงหาคม', 'กันยายน', 'ตุลาคม', 'พฤศจิกายน', 'ธันวาคม' ], + monthsShort: [ 'ม.ค.', 'ก.พ.', 'มี.ค.', 'เม.ย.', 'พ.ค.', 'มิ.ย.', 'ก.ค.', 'ส.ค.', 'ก.ย.', 'ต.ค.', 'พ.ย.', 'ธ.ค.' ], + weekdaysFull: [ 'อาทติย', 'จันทร', 'องัคาร', 'พุธ', 'พฤหสั บดี', 'ศกุร', 'เสาร' ], + weekdaysShort: [ 'อ.', 'จ.', 'อ.', 'พ.', 'พฤ.', 'ศ.', 'ส.' ], + today: 'วันนี้', + clear: 'ลบ', + format: 'yyyy-mm-dd', + displayFormat: 'd mmmm yyyy', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/tr.js b/vendor/assets/pickdate/translations/tr.js new file mode 100644 index 00000000..f9f7d64e --- /dev/null +++ b/vendor/assets/pickdate/translations/tr.js @@ -0,0 +1,14 @@ +// Turkish + +$pickadate_translations['tr'] = { + monthsFull: [ 'Ocak', 'Şubat', 'Mart', 'Nisan', 'Mayıs', 'Haziran', 'Temmuz', 'Ağustos', 'Eylül', 'Ekim', 'Kasım', 'Aralık' ], + monthsShort: [ 'Oca', 'Şub', 'Mar', 'Nis', 'May', 'Haz', 'Tem', 'Ağu', 'Eyl', 'Eki', 'Kas', 'Ara' ], + weekdaysFull: [ 'Pazar', 'Pazartesi', 'Salı', 'Çarşamba', 'Perşembe', 'Cuma', 'Cumartesi' ], + weekdaysShort: [ 'Pzr', 'Pzt', 'Sal', 'Çrş', 'Prş', 'Cum', 'Cmt' ], + today: 'bugün', + clear: 'sil', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'dd mmmm yyyy dddd', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/transform_translation_files.rb b/vendor/assets/pickdate/translations/transform_translation_files.rb new file mode 100644 index 00000000..0b695eb5 --- /dev/null +++ b/vendor/assets/pickdate/translations/transform_translation_files.rb @@ -0,0 +1,11 @@ +base_dir = File.dirname(File.expand_path(__FILE__)) +Dir.glob(File.join(base_dir, 'original','*.js.orig')).each do |orig_file| + content = File.read(orig_file) + locale = File.basename(orig_file)[0,2] + content.gsub!(/^ /, ' ') + content.sub!(/(jQuery|\$).extend\( (jQuery|\$).fn.pickadate.defaults, /, "$pickadate_translations['#{locale}'] = ") + content.sub!(/format: '([^']+)',$/){ "format: 'yyyy-mm-dd',\n displayFormat: '#{Regexp.last_match[1]}',"} + content.sub! '});', '};' + content.sub! "formatSubmit: 'yyyy/mm/dd'", "formatSubmit: 'yyyy-mm-dd'" + File.open(File.join(base_dir, "#{locale}.js"), 'w+'){|f| f.puts content} +end diff --git a/vendor/assets/pickdate/translations/uk.js b/vendor/assets/pickdate/translations/uk.js new file mode 100644 index 00000000..f2a3123f --- /dev/null +++ b/vendor/assets/pickdate/translations/uk.js @@ -0,0 +1,14 @@ +// Ukrainian + +$pickadate_translations['uk'] = { + monthsFull: [ 'січень', 'лютий', 'березень', 'квітень', 'травень', 'червень', 'липень', 'серпень', 'вересень', 'жовтень', 'листопад', 'грудень' ], + monthsShort: [ 'січ', 'лют', 'бер', 'кві', 'тра', 'чер', 'лип', 'сер', 'вер', 'жов', 'лис', 'гру' ], + weekdaysFull: [ 'неділя', 'понеділок', 'вівторок', 'середа', 'четвер', 'п‘ятниця', 'субота' ], + weekdaysShort: [ 'нд', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб' ], + today: 'сьогодні', + clear: 'викреслити', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'dd mmmm yyyy p.', + formatSubmit: 'yyyy-mm-dd' +}; diff --git a/vendor/assets/pickdate/translations/zh.js b/vendor/assets/pickdate/translations/zh.js new file mode 100644 index 00000000..90106600 --- /dev/null +++ b/vendor/assets/pickdate/translations/zh.js @@ -0,0 +1,14 @@ +// Traditional Chinese + +$pickadate_translations['zh'] = { + monthsFull: [ '一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月' ], + monthsShort: [ '一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '十一', '十二' ], + weekdaysFull: [ '星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六' ], + weekdaysShort: [ '日', '一', '二', '三', '四', '五', '六' ], + today: '今天', + clear: '清除', + firstDay: 1, + format: 'yyyy-mm-dd', + displayFormat: 'yyyy 年 mm 月 dd 日', + formatSubmit: 'yyyy-mm-dd' +};