/*
* JTSage-DateBox-5.3.3 (foundation6)
* For: {"bootstrap-v4":"4.3.1","bootstrap-v3":"3.4.1","zurb-foundation":"6.5.3","bulma":"0.8.0","jquery-mobile":"1.4.5","fomantic-ui":"2.7.2","uikit":"3.2.0","noframe":"0.0.1"}
* Date: 2019-11-25T16:43:41.748Z
* http://datebox.jtsage.dev/
* https://github.com/jtsage/jtsage-datebox
*
* Copyright 2010, 2019 JTSage. and other contributors
* Released under the MIT license.
* https://github.com/jtsage/jtsage-datebox/blob/master/LICENSE.txt
*
*/
(function(factory) {
if (typeof define === "function" && define.amd) {
define([ "jquery" ], factory);
} else {
factory(jQuery);
}
})(function($) {
if (typeof $.widget !== "undefined") {
return false;
}
var widgetUuid = 0, widgetSlice = Array.prototype.slice;
$.widget = function(name, base, prototype) {
var existingConstructor, constructor, basePrototype;
var proxiedPrototype = {};
var namespace = name.split(".")[0];
name = name.split(".")[1];
var fullName = namespace + "-" + name;
if (!prototype) {
prototype = base;
base = $.Widget;
}
if ($.isArray(prototype)) {
prototype = $.extend.apply(null, [ {} ].concat(prototype));
}
$.expr[":"][fullName.toLowerCase()] = function(elem) {
return !!$.data(elem, fullName);
};
$[namespace] = $[namespace] || {};
existingConstructor = $[namespace][name];
constructor = $[namespace][name] = function(options, element) {
if (!this._createWidget) {
return new constructor(options, element);
}
if (arguments.length) {
this._createWidget(options, element);
}
};
$.extend(constructor, existingConstructor, {
version: prototype.version,
_proto: $.extend({}, prototype),
_childConstructors: []
});
basePrototype = new base();
basePrototype.options = $.widget.extend({}, basePrototype.options);
$.each(prototype, function(prop, value) {
if (typeof value !== "function") {
proxiedPrototype[prop] = value;
return;
}
proxiedPrototype[prop] = function() {
function _super() {
return base.prototype[prop].apply(this, arguments);
}
function _superApply(args) {
return base.prototype[prop].apply(this, args);
}
return function() {
var __super = this._super;
var __superApply = this._superApply;
var returnValue;
this._super = _super;
this._superApply = _superApply;
returnValue = value.apply(this, arguments);
this._super = __super;
this._superApply = __superApply;
return returnValue;
};
}();
});
constructor.prototype = $.widget.extend(basePrototype, {
widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix || name : name
}, proxiedPrototype, {
constructor: constructor,
namespace: namespace,
widgetName: name,
widgetFullName: fullName
});
if (existingConstructor) {
$.each(existingConstructor._childConstructors, function(i, child) {
var childPrototype = child.prototype;
$.widget(childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto);
});
delete existingConstructor._childConstructors;
} else {
base._childConstructors.push(constructor);
}
$.widget.bridge(name, constructor);
return constructor;
};
$.widget.extend = function(target) {
var input = widgetSlice.call(arguments, 1);
var inputIndex = 0;
var inputLength = input.length;
var key;
var value;
for (;inputIndex < inputLength; inputIndex++) {
for (key in input[inputIndex]) {
value = input[inputIndex][key];
if (input[inputIndex].hasOwnProperty(key) && value !== undefined) {
if ($.isPlainObject(value)) {
target[key] = $.isPlainObject(target[key]) ? $.widget.extend({}, target[key], value) : $.widget.extend({}, value);
} else {
target[key] = value;
}
}
}
}
return target;
};
$.widget.bridge = function(name, object) {
var fullName = object.prototype.widgetFullName || name;
$.fn[name] = function(options) {
var isMethodCall = typeof options === "string";
var args = widgetSlice.call(arguments, 1);
var returnValue = this;
if (isMethodCall) {
if (!this.length && options === "instance") {
returnValue = undefined;
} else {
this.each(function() {
var methodValue;
var instance = $.data(this, fullName);
if (options === "instance") {
returnValue = instance;
return false;
}
if (!instance) {
return false;
}
if (typeof instance[options] !== "function" || options.charAt(0) === "_") {
return false;
}
methodValue = instance[options].apply(instance, args);
if (methodValue !== instance && methodValue !== undefined) {
returnValue = methodValue && methodValue.jquery ? returnValue.pushStack(methodValue.get()) : methodValue;
return false;
}
});
}
} else {
if (args.length) {
options = $.widget.extend.apply(null, [ options ].concat(args));
}
this.each(function() {
var instance = $.data(this, fullName);
if (instance) {
instance.option(options || {});
if (instance._init) {
instance._init();
}
} else {
$.data(this, fullName, new object(options, this));
}
});
}
return returnValue;
};
};
$.Widget = function() {};
$.Widget._childConstructors = [];
$.Widget.prototype = {
widgetName: "widget",
widgetEventPrefix: "",
defaultElement: "
",
options: {
classes: {},
disabled: false,
create: null
},
_createWidget: function(options, element) {
element = $(element || this.defaultElement || this)[0];
this.element = $(element);
this.uuid = widgetUuid++;
this.eventNamespace = "." + this.widgetName + this.uuid;
this.bindings = $();
this.hoverable = $();
this.focusable = $();
this.classesElementLookup = {};
if (element !== this) {
$.data(element, this.widgetFullName, this);
this.document = $(element.style ? element.ownerDocument : element.document || element);
this.window = $(this.document[0].defaultView || this.document[0].parentWindow);
}
this.options = $.widget.extend({}, this.options, this._getCreateOptions(), options);
this._create();
this._trigger("create", null, this._getCreateEventData());
this._init();
},
_getCreateOptions: function() {
return {};
},
_getCreateEventData: $.noop,
_create: $.noop,
_init: $.noop,
destroy: function() {
this._destroy();
this.element.off(this.eventNamespace).removeData(this.widgetFullName);
this.widget().off(this.eventNamespace).removeAttr("aria-disabled");
this.bindings.off(this.eventNamespace);
},
_destroy: $.noop,
widget: function() {
return this.element;
},
option: function(key, value) {
var options = key;
var parts;
var curOption;
var i;
if (arguments.length === 0) {
return $.widget.extend({}, this.options);
}
if (typeof key === "string") {
options = {};
parts = key.split(".");
key = parts.shift();
if (parts.length) {
curOption = options[key] = $.widget.extend({}, this.options[key]);
for (i = 0; i < parts.length - 1; i++) {
curOption[parts[i]] = curOption[parts[i]] || {};
curOption = curOption[parts[i]];
}
key = parts.pop();
if (arguments.length === 1) {
return curOption[key] === undefined ? null : curOption[key];
}
curOption[key] = value;
} else {
if (arguments.length === 1) {
return this.options[key] === undefined ? null : this.options[key];
}
options[key] = value;
}
}
this._setOptions(options);
return this;
},
_setOptions: function(options) {
var key;
for (key in options) {
this._setOption(key, options[key]);
}
return this;
},
_setOption: function(key, value) {
this.options[key] = value;
return this;
},
enable: function() {
return this._setOptions({
disabled: false
});
},
disable: function() {
return this._setOptions({
disabled: true
});
},
_trigger: function(type, event, data) {
var prop, orig;
var callback = this.options[type];
data = data || {};
event = $.Event(event);
event.type = (type === this.widgetEventPrefix ? type : this.widgetEventPrefix + type).toLowerCase();
event.target = this.element[0];
orig = event.originalEvent;
if (orig) {
for (prop in orig) {
if (!(prop in event)) {
event[prop] = orig[prop];
}
}
}
this.element.trigger(event, data);
return !(typeof callback === "function" && callback.apply(this.element[0], [ event ].concat(data)) === false || event.isDefaultPrevented());
}
};
var widget = $.widget;
});
(function($) {
$.widget("jtsage.datebox", {
initSelector: "input[data-role='datebox']",
options: {
mode: false,
hideInput: false,
lockInput: true,
safeEdit: true,
controlWidth: "320px",
controlWidthImp: "",
breakpointWidth: "567px",
zindex: "1100",
clickEvent: "click",
disableWheel: false,
useKinetic: true,
flipSizeOverride: false,
defaultValue: false,
showInitialValue: false,
linkedField: false,
linkedFieldFormat: "%J",
displayMode: "dropdown",
displayDropdownPosition: "bottomRight",
displayInlinePosition: "center",
displayForcePosition: false,
dismissOutsideClick: true,
dismissOnEscape: false,
useHeader: true,
useImmediate: false,
useButton: true,
buttonIcon: false,
useFocus: false,
useSetButton: true,
useCancelButton: false,
useTodayButton: false,
closeTodayButton: false,
useTomorrowButton: false,
closeTomorrowButton: false,
useClearButton: false,
useCollapsedBut: false,
usePlaceholder: false,
headerFollowsPlaceholder: true,
headerFollowsTitle: true,
headerFollowsLabel: true,
beforeOpenCallback: false,
beforeOpenCallbackArgs: [],
openCallback: false,
openCallbackArgs: [],
closeCallback: false,
closeCallbackArgs: [],
runOnBlurCallback: false,
startOffsetYears: false,
startOffsetMonths: false,
startOffsetDays: false,
afterToday: false,
beforeToday: false,
notToday: false,
maxDate: false,
minDate: false,
maxDays: false,
minDays: false,
maxYear: false,
minYear: false,
blackDates: false,
blackDatesRec: false,
blackDatesPeriod: false,
blackDays: false,
whiteDates: false,
enableDates: false,
validHours: false,
minHour: false,
maxHour: false,
minTime: false,
maxTime: false,
maxDur: false,
minDur: false,
minuteStep: 1,
minuteStepRound: 0,
twoDigitYearCutoff: 38,
flipboxLensAdjust: false,
rolloverMode: {
m: true,
d: true,
h: true,
i: true,
s: true
},
useLang: "default",
lang: {
default: {
setDateButtonLabel: "Set Date",
setTimeButtonLabel: "Set Time",
setDurationButtonLabel: "Set Duration",
todayButtonLabel: "Jump to Today",
tomorrowButtonLabel: "Jump to Tomorrow",
titleDateDialogLabel: "Set Date",
titleTimeDialogLabel: "Set Time",
daysOfWeek: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ],
daysOfWeekShort: [ "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" ],
monthsOfYear: [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ],
monthsOfYearShort: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ],
durationLabel: [ "Days", "Hours", "Minutes", "Seconds" ],
durationDays: [ "Day", "Days" ],
timeFormat: 24,
headerFormat: "%A, %B %-d, %Y",
tooltip: "Open Date Picker",
nextMonth: "Next Month",
prevMonth: "Previous Month",
dateFieldOrder: [ "m", "d", "y" ],
timeFieldOrder: [ "h", "i", "a" ],
datetimeFieldOrder: [ "y", "m", "d", "h", "i", "s", "a" ],
slideFieldOrder: [ "y", "m", "d" ],
dateFormat: "%Y-%m-%d",
datetimeFormat: "%Y-%m-%dT%k:%M:%S",
useArabicIndic: false,
isRTL: false,
calStartDay: 0,
clearButton: "Clear",
cancelButton: "Cancel",
durationOrder: [ "d", "h", "i", "s" ],
meridiem: [ "AM", "PM" ],
timeOutput: "%k:%M",
durationFormat: "%Dd %DA, %Dl:%DM:%DS",
calDateListLabel: "Other Dates",
calHeaderFormat: "%B %Y"
}
},
theme_clearBtn: [ "clear", "secondary" ],
theme_closeBtn: [ "check", "secondary" ],
theme_cancelBtn: [ "cancel", "secondary" ],
theme_tomorrowBtn: [ "goto", "secondary" ],
theme_todayBtn: [ "goto", "secondary" ],
theme_dropdownContainer: "card",
theme_modalContainer: "card",
theme_inlineContainer: "card",
theme_headerTheme: "bg-dark",
theme_headerBtn: [ "cancel", false ],
theme_openButton: "",
theme_cal_Today: "primary",
theme_cal_DayHigh: "warning",
theme_cal_Selected: "success",
theme_cal_DateHigh: "warning",
theme_cal_DateHighAlt: "alert",
theme_cal_DateHighRec: "warning",
theme_cal_Default: "hollow primary",
theme_cal_OutOfBounds: "clear secondary",
theme_cal_NextBtn: [ "next", "hollow secondary" ],
theme_cal_PrevBtn: [ "prev", "hollow secondary" ],
theme_cal_Pickers: false,
theme_cal_DateList: false,
theme_dbox_NextBtn: [ "plus", "hollow seconday" ],
theme_dbox_PrevBtn: [ "minus", "hollow seconday" ],
theme_dbox_Inputs: false,
theme_fbox_Selected: "success",
theme_fbox_Default: "primary",
theme_fbox_Forbidden: "danger",
theme_fbox_RollHeight: "135px",
theme_slide_Today: "primary",
theme_slide_DayHigh: "warning",
theme_slide_Selected: "success",
theme_slide_DateHigh: "warning",
theme_slide_DateHighAlt: "danger",
theme_slide_DateHighRec: "warning",
theme_slide_Default: "hollow secondary",
theme_slide_NextBtn: [ "plus", "clear secondary" ],
theme_slide_PrevBtn: [ "minus", "clear secondary" ],
theme_slide_NextDateBtn: [ "next", "clear secondary" ],
theme_slide_PrevDateBtn: [ "prev", "clear secondary" ],
theme_slide_Pickers: false,
theme_slide_DateList: false,
theme_backgroundMask: {
position: "fixed",
left: 0,
top: 0,
right: 0,
bottom: 0,
backgroundColor: "rgba(0,0,0,.4)"
},
theme_headStyle: false,
theme_spanStyle: "card-section",
buttonIconDate: "calendar",
buttonIconTime: "clock",
disabledState: "disabled",
tranDone: "webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",
calHighToday: true,
calHighPick: true,
calHighOutOfBounds: true,
calSelectedOutOfBounds: true,
calShowDays: true,
calOnlyMonth: false,
calShowWeek: false,
calUsePickers: false,
calNoHeader: false,
calYearPickMin: -6,
calYearPickMax: 6,
calYearPickRelative: true,
calFormatter: false,
calBeforeAppendFunc: function(t) {
return t;
},
highDays: false,
highDates: false,
highDatesRec: false,
highDatesPeriod: false,
highDatesAlt: false,
calDateList: false,
calShowDateList: false,
durationStep: 1,
durationSteppers: {
d: 1,
h: 1,
i: 1,
s: 1
},
flen: {
y: 25,
m: 24,
d: 40,
h: 24,
i: 30,
s: 30,
a: 30
},
fboxNatural: "default",
slideHighToday: true,
slideHighPick: true,
slideUsePickers: false,
slideNoHeader: false,
slideYearPickMin: -6,
slideYearPickMax: 6,
slideYearPickRelative: true,
slideDateList: false,
slideShowDateList: false
},
icons: {
getIcon: function(name) {
var w = this, icnF = w.options.iconFactory;
if (name === false) {
return false;
}
if (typeof icnF === "function") {
return icnF.call(w, name);
}
if (name.substr(0, 4) === "
',
prev: '
',
plus: '
',
minus: '
',
check: '
',
cancel: '
',
goto: '
',
clear: '
',
clock: '
',
calendar: '
'
},
styleFunctions: {},
_getLongOptions: function(element) {
var key, temp, returnObj = {}, prefix = "datebox", prefixLength = 7;
for (key in element.data()) {
if (key.substr(0, prefixLength) === prefix && key.length > prefixLength) {
temp = key.substr(prefixLength);
temp = temp.charAt(0).toLowerCase() + temp.slice(1);
if (temp !== "options") {
returnObj[temp] = element.data(key);
}
}
}
return returnObj;
},
_setOption: function() {
$.Widget.prototype._setOption.apply(this, arguments);
this.refresh();
},
getOption: function(opt) {
var i18nTester = this.__(opt);
if (i18nTester !== "Err:NotFound") {
return i18nTester;
} else {
return this.options[opt];
}
},
style_attach: function(isInline) {
var w = this, last, exitLoop = 0, possibleAttach = w.d.wrap, hardAttachPoint = $("body").find("#" + w.baseID + "-dbAttach");
if (hardAttachPoint.length === 1) {
return hardAttachPoint;
}
if (!isInline) {
return $("body");
}
last = possibleAttach;
for (;;) {
exitLoop++;
possibleAttach = possibleAttach.parent();
if (possibleAttach.is("form")) {
return last;
}
if (exitLoop > 20) {
return $("body");
}
last = possibleAttach;
}
},
style_btn: function(theme, contents, styleOverride) {
var retty, style = "";
contents = typeof contents === "undefined" ? "" : contents;
if (typeof styleOverride !== "undefined" && styleOverride !== "") {
style = "style='" + styleOverride + "'";
}
retty = "
";
retty += theme[0] !== false ? "" + this.icons.getIcon.call(this, theme[0]) + " " : "";
retty += contents + "";
return retty;
},
style_btnGrp: function(collapse) {
var cls = collapse === true ? "button-group small expanded" : "button-group stacked small";
return $("
");
},
style_inWrap: function(originalInput) {
originalInput.addClass("input-group-field");
return originalInput.wrap("