mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-01-19 06:47:56 -05:00
Updated bootstrap-daterangepicker to vs 2.1.20, regen dist files
This commit is contained in:
@@ -66,10 +66,10 @@
|
||||
<!-- start mincss template tags -->
|
||||
<link rel="stylesheet" type="text/css" href="dist/bootstrap.min.css?rel=50ab19585f"/>
|
||||
<link rel="stylesheet" type="text/css" href="dist/jquery-ui.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="dist/opensourcepos.min.css?rel=7b24652f16"/>
|
||||
<link rel="stylesheet" type="text/css" href="dist/opensourcepos.min.css?rel=a9769acab5"/>
|
||||
<!-- end mincss template tags -->
|
||||
<!-- start minjs template tags -->
|
||||
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=8713aef0cc" language="javascript"></script>
|
||||
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=ac10c15522" language="javascript"></script>
|
||||
<!-- end minjs template tags -->
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
"smalot-bootstrap-datetimepicker": "^2.3.11",
|
||||
"bootstrap-select": "^1.10.0",
|
||||
"bootstrap-table": "^1.10.1",
|
||||
"bootstrap-daterangepicker": "^2.1.19",
|
||||
"bootstrap-daterangepicker": "^2.1.20",
|
||||
"table-export": "*",
|
||||
"jquery.base64": "https://raw.githubusercontent.com/carlo/jquery-base64/master/jquery.base64.js",
|
||||
"chartist": "^0.9.7",
|
||||
|
||||
126
dist/opensourcepos.js
vendored
126
dist/opensourcepos.js
vendored
@@ -15048,41 +15048,33 @@ return jQuery;
|
||||
|
||||
}));
|
||||
/**
|
||||
* @version: 2.1.19
|
||||
* @version: 2.1.20
|
||||
* @author: Dan Grossman http://www.dangrossman.info/
|
||||
* @copyright: Copyright (c) 2012-2015 Dan Grossman. All rights reserved.
|
||||
* @copyright: Copyright (c) 2012-2016 Dan Grossman. All rights reserved.
|
||||
* @license: Licensed under the MIT license. See http://www.opensource.org/licenses/mit-license.php
|
||||
* @website: https://www.improvely.com/
|
||||
*/
|
||||
|
||||
(function(root, factory) {
|
||||
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(['moment', 'jquery', 'exports'], function(momentjs, $, exports) {
|
||||
root.daterangepicker = factory(root, exports, momentjs, $);
|
||||
});
|
||||
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
var momentjs = require('moment');
|
||||
var jQuery = (typeof window != 'undefined') ? window.jQuery : undefined; //isomorphic issue
|
||||
if (!jQuery) {
|
||||
try {
|
||||
jQuery = require('jquery');
|
||||
if (!jQuery.fn) jQuery.fn = {}; //isomorphic issue
|
||||
} catch (err) {
|
||||
if (!jQuery) throw new Error('jQuery dependency not found');
|
||||
}
|
||||
}
|
||||
|
||||
factory(root, exports, momentjs, jQuery);
|
||||
|
||||
// Finally, as a browser global.
|
||||
} else {
|
||||
root.daterangepicker = factory(root, {}, root.moment || moment, (root.jQuery || root.Zepto || root.ender || root.$));
|
||||
}
|
||||
|
||||
}(this || {}, function(root, daterangepicker, moment, $) { // 'this' doesn't exist on a server
|
||||
|
||||
// Follow the UMD template https://github.com/umdjs/umd/blob/master/templates/returnExportsGlobal.js
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Make globaly available as well
|
||||
define(['moment', 'jquery'], function (moment, jquery) {
|
||||
return (root.daterangepicker = factory(moment, jquery));
|
||||
});
|
||||
} else if (typeof module === 'object' && module.exports) {
|
||||
// Node / Browserify
|
||||
//isomorphic issue
|
||||
var jQuery = (typeof window != 'undefined') ? window.jQuery : undefined;
|
||||
if (!jQuery) {
|
||||
jQuery = require('jquery');
|
||||
if (!jQuery.fn) jQuery.fn = {};
|
||||
}
|
||||
module.exports = factory(require('moment'), jQuery);
|
||||
} else {
|
||||
// Browser globals
|
||||
root.daterangepicker = factory(root.moment, root.jQuery);
|
||||
}
|
||||
}(this, function(moment, $) {
|
||||
var DateRangePicker = function(element, options, cb) {
|
||||
|
||||
//default settings for options
|
||||
@@ -15120,6 +15112,7 @@ return jQuery;
|
||||
this.cancelClass = 'btn-default';
|
||||
|
||||
this.locale = {
|
||||
direction: 'ltr',
|
||||
format: 'MM/DD/YYYY',
|
||||
separator: ' - ',
|
||||
applyLabel: 'Apply',
|
||||
@@ -15151,7 +15144,7 @@ return jQuery;
|
||||
options.template = '<div class="daterangepicker dropdown-menu">' +
|
||||
'<div class="calendar left">' +
|
||||
'<div class="daterangepicker_input">' +
|
||||
'<input class="input-mini" type="text" name="daterangepicker_start" value="" />' +
|
||||
'<input class="input-mini form-control" type="text" name="daterangepicker_start" value="" />' +
|
||||
'<i class="fa fa-calendar glyphicon glyphicon-calendar"></i>' +
|
||||
'<div class="calendar-time">' +
|
||||
'<div></div>' +
|
||||
@@ -15162,7 +15155,7 @@ return jQuery;
|
||||
'</div>' +
|
||||
'<div class="calendar right">' +
|
||||
'<div class="daterangepicker_input">' +
|
||||
'<input class="input-mini" type="text" name="daterangepicker_end" value="" />' +
|
||||
'<input class="input-mini form-control" type="text" name="daterangepicker_end" value="" />' +
|
||||
'<i class="fa fa-calendar glyphicon glyphicon-calendar"></i>' +
|
||||
'<div class="calendar-time">' +
|
||||
'<div></div>' +
|
||||
@@ -15188,6 +15181,9 @@ return jQuery;
|
||||
|
||||
if (typeof options.locale === 'object') {
|
||||
|
||||
if (typeof options.locale.direction === 'string')
|
||||
this.locale.direction = options.locale.direction;
|
||||
|
||||
if (typeof options.locale.format === 'string')
|
||||
this.locale.format = options.locale.format;
|
||||
|
||||
@@ -15216,6 +15212,7 @@ return jQuery;
|
||||
this.locale.customRangeLabel = options.locale.customRangeLabel;
|
||||
|
||||
}
|
||||
this.container.addClass(this.locale.direction);
|
||||
|
||||
if (typeof options.startDate === 'string')
|
||||
this.startDate = moment(options.startDate, this.locale.format);
|
||||
@@ -15309,6 +15306,9 @@ return jQuery;
|
||||
if (typeof options.isInvalidDate === 'function')
|
||||
this.isInvalidDate = options.isInvalidDate;
|
||||
|
||||
if (typeof options.isCustomDate === 'function')
|
||||
this.isCustomDate = options.isCustomDate;
|
||||
|
||||
if (typeof options.alwaysShowCalendars === 'boolean')
|
||||
this.alwaysShowCalendars = options.alwaysShowCalendars;
|
||||
|
||||
@@ -15364,16 +15364,17 @@ return jQuery;
|
||||
start = this.minDate.clone();
|
||||
|
||||
var maxDate = this.maxDate;
|
||||
if (this.dateLimit && start.clone().add(this.dateLimit).isAfter(maxDate))
|
||||
if (this.dateLimit && maxDate && start.clone().add(this.dateLimit).isAfter(maxDate))
|
||||
maxDate = start.clone().add(this.dateLimit);
|
||||
if (maxDate && end.isAfter(maxDate))
|
||||
end = maxDate.clone();
|
||||
|
||||
// If the end of the range is before the minimum or the start of the range is
|
||||
// after the maximum, don't display this range option at all.
|
||||
if ((this.minDate && end.isBefore(this.minDate)) || (maxDate && start.isAfter(maxDate)))
|
||||
if ((this.minDate && end.isBefore(this.minDate, this.timepicker ? 'minute' : 'day'))
|
||||
|| (maxDate && start.isAfter(maxDate, this.timepicker ? 'minute' : 'day')))
|
||||
continue;
|
||||
|
||||
|
||||
//Support unicode chars in the range names.
|
||||
var elem = document.createElement('textarea');
|
||||
elem.innerHTML = range;
|
||||
@@ -15416,7 +15417,7 @@ return jQuery;
|
||||
this.container.find('.calendar.left').addClass('single');
|
||||
this.container.find('.calendar.left').show();
|
||||
this.container.find('.calendar.right').hide();
|
||||
this.container.find('.daterangepicker_input input, .daterangepicker_input i').hide();
|
||||
this.container.find('.daterangepicker_input input, .daterangepicker_input > i').hide();
|
||||
if (!this.timePicker) {
|
||||
this.container.find('.ranges').hide();
|
||||
}
|
||||
@@ -15430,10 +15431,7 @@ return jQuery;
|
||||
|
||||
//swap the position of the predefined ranges if opens right
|
||||
if (typeof options.ranges !== 'undefined' && this.opens == 'right') {
|
||||
var ranges = this.container.find('.ranges');
|
||||
var html = ranges.clone();
|
||||
ranges.remove();
|
||||
this.container.find('.calendar.left').parent().prepend(html);
|
||||
this.container.find('.ranges').prependTo( this.container.find('.calendar.left').parent() );
|
||||
}
|
||||
|
||||
//apply CSS classes and labels to buttons
|
||||
@@ -15469,7 +15467,7 @@ return jQuery;
|
||||
.on('mouseenter.daterangepicker', 'li', $.proxy(this.hoverRange, this))
|
||||
.on('mouseleave.daterangepicker', 'li', $.proxy(this.updateFormInputs, this));
|
||||
|
||||
if (this.element.is('input')) {
|
||||
if (this.element.is('input') || this.element.is('button')) {
|
||||
this.element.on({
|
||||
'click.daterangepicker': $.proxy(this.show, this),
|
||||
'focus.daterangepicker': $.proxy(this.show, this),
|
||||
@@ -15511,11 +15509,17 @@ return jQuery;
|
||||
if (this.timePicker && this.timePickerIncrement)
|
||||
this.startDate.minute(Math.round(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement);
|
||||
|
||||
if (this.minDate && this.startDate.isBefore(this.minDate))
|
||||
if (this.minDate && this.startDate.isBefore(this.minDate)) {
|
||||
this.startDate = this.minDate;
|
||||
if (this.timePicker && this.timePickerIncrement)
|
||||
this.startDate.minute(Math.round(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement);
|
||||
}
|
||||
|
||||
if (this.maxDate && this.startDate.isAfter(this.maxDate))
|
||||
if (this.maxDate && this.startDate.isAfter(this.maxDate)) {
|
||||
this.startDate = this.maxDate;
|
||||
if (this.timePicker && this.timePickerIncrement)
|
||||
this.startDate.minute(Math.floor(this.startDate.minute() / this.timePickerIncrement) * this.timePickerIncrement);
|
||||
}
|
||||
|
||||
if (!this.isShowing)
|
||||
this.updateElement();
|
||||
@@ -15557,6 +15561,10 @@ return jQuery;
|
||||
return false;
|
||||
},
|
||||
|
||||
isCustomDate: function() {
|
||||
return false;
|
||||
},
|
||||
|
||||
updateView: function() {
|
||||
if (this.timePicker) {
|
||||
this.renderTimePicker('left');
|
||||
@@ -15597,13 +15605,17 @@ return jQuery;
|
||||
} else {
|
||||
this.rightCalendar.month = this.startDate.clone().date(2).add(1, 'month');
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
if (this.leftCalendar.month.format('YYYY-MM') != this.startDate.format('YYYY-MM') && this.rightCalendar.month.format('YYYY-MM') != this.startDate.format('YYYY-MM')) {
|
||||
this.leftCalendar.month = this.startDate.clone().date(2);
|
||||
this.rightCalendar.month = this.startDate.clone().date(2).add(1, 'month');
|
||||
}
|
||||
}
|
||||
if (this.maxDate && this.linkedCalendars && this.rightCalendar.month > this.maxDate) {
|
||||
this.rightCalendar.month = this.maxDate.clone().date(2);
|
||||
this.leftCalendar.month = this.maxDate.clone().date(2).subtract(1, 'month');
|
||||
}
|
||||
},
|
||||
|
||||
updateCalendars: function() {
|
||||
@@ -15719,6 +15731,7 @@ return jQuery;
|
||||
var minDate = side == 'left' ? this.minDate : this.startDate;
|
||||
var maxDate = this.maxDate;
|
||||
var selected = side == 'left' ? this.startDate : this.endDate;
|
||||
var arrow = this.locale.direction == 'ltr' ? {left: 'chevron-left', right: 'chevron-right'} : {left: 'chevron-right', right: 'chevron-left'};
|
||||
|
||||
var html = '<table class="table-condensed">';
|
||||
html += '<thead>';
|
||||
@@ -15729,7 +15742,7 @@ return jQuery;
|
||||
html += '<th></th>';
|
||||
|
||||
if ((!minDate || minDate.isBefore(calendar.firstDay)) && (!this.linkedCalendars || side == 'left')) {
|
||||
html += '<th class="prev available"><i class="fa fa-chevron-left glyphicon glyphicon-chevron-left"></i></th>';
|
||||
html += '<th class="prev available"><i class="fa fa-' + arrow.left + ' glyphicon glyphicon-' + arrow.left + '"></i></th>';
|
||||
} else {
|
||||
html += '<th></th>';
|
||||
}
|
||||
@@ -15771,7 +15784,7 @@ return jQuery;
|
||||
|
||||
html += '<th colspan="5" class="month">' + dateHtml + '</th>';
|
||||
if ((!maxDate || maxDate.isAfter(calendar.lastDay)) && (!this.linkedCalendars || side == 'right' || this.singleDatePicker)) {
|
||||
html += '<th class="next available"><i class="fa fa-chevron-right glyphicon glyphicon-chevron-right"></i></th>';
|
||||
html += '<th class="next available"><i class="fa fa-' + arrow.right + ' glyphicon glyphicon-' + arrow.right + '"></i></th>';
|
||||
} else {
|
||||
html += '<th></th>';
|
||||
}
|
||||
@@ -15849,6 +15862,15 @@ return jQuery;
|
||||
if (this.endDate != null && calendar[row][col] > this.startDate && calendar[row][col] < this.endDate)
|
||||
classes.push('in-range');
|
||||
|
||||
//apply custom classes for this date
|
||||
var isCustom = this.isCustomDate(calendar[row][col]);
|
||||
if (isCustom !== false) {
|
||||
if (typeof isCustom === 'string')
|
||||
classes.push(isCustom);
|
||||
else
|
||||
Array.prototype.push.apply(classes, isCustom);
|
||||
}
|
||||
|
||||
var cname = '', disabled = false;
|
||||
for (var i = 0; i < classes.length; i++) {
|
||||
cname += classes[i] + ' ';
|
||||
@@ -15904,7 +15926,7 @@ return jQuery;
|
||||
if (selected.isBefore(this.startDate))
|
||||
selected = this.startDate.clone();
|
||||
|
||||
if (selected.isAfter(maxDate))
|
||||
if (maxDate && selected.isAfter(maxDate))
|
||||
selected = maxDate.clone();
|
||||
|
||||
}
|
||||
@@ -16203,7 +16225,7 @@ return jQuery;
|
||||
this.container.find('input[name=daterangepicker_start]').val(dates[0].format(this.locale.format));
|
||||
this.container.find('input[name=daterangepicker_end]').val(dates[1].format(this.locale.format));
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
clickRange: function(e) {
|
||||
@@ -16289,7 +16311,7 @@ return jQuery;
|
||||
var cal = $(el).parents('.calendar');
|
||||
var dt = cal.hasClass('left') ? leftCalendar.calendar[row][col] : rightCalendar.calendar[row][col];
|
||||
|
||||
if (dt.isAfter(startDate) && dt.isBefore(date)) {
|
||||
if ((dt.isAfter(startDate) && dt.isBefore(date)) || dt.isSame(date, 'day')) {
|
||||
$(el).addClass('in-range');
|
||||
} else {
|
||||
$(el).removeClass('in-range');
|
||||
@@ -16335,7 +16357,7 @@ return jQuery;
|
||||
this.endDate = null;
|
||||
this.setStartDate(date.clone());
|
||||
} else if (!this.endDate && date.isBefore(this.startDate)) {
|
||||
//special case: clicking the same date for start/end,
|
||||
//special case: clicking the same date for start/end,
|
||||
//but the time of the end date is before the start date
|
||||
this.setEndDate(this.startDate.clone());
|
||||
} else {
|
||||
@@ -16585,7 +16607,7 @@ return jQuery;
|
||||
});
|
||||
return this;
|
||||
};
|
||||
|
||||
|
||||
return DateRangePicker;
|
||||
|
||||
}));
|
||||
|
||||
2
dist/opensourcepos.min.css
vendored
2
dist/opensourcepos.min.css
vendored
File diff suppressed because one or more lines are too long
39
dist/opensourcepos.min.js
vendored
39
dist/opensourcepos.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -60,11 +60,11 @@
|
||||
<link rel="stylesheet" type="text/css" href="templates/spacelab/css/bootstrap.min.css?rel=50ab19585f"/>
|
||||
<!-- start mincss template tags -->
|
||||
<link rel="stylesheet" type="text/css" href="dist/jquery-ui.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="dist/opensourcepos.min.css?rel=7b24652f16"/>
|
||||
<link rel="stylesheet" type="text/css" href="dist/opensourcepos.min.css?rel=a9769acab5"/>
|
||||
<!-- end mincss template tags -->
|
||||
<link rel="stylesheet" type="text/css" href="templates/spacelab/css/style.css"/>
|
||||
<!-- start minjs template tags -->
|
||||
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=8713aef0cc" language="javascript"></script>
|
||||
<script type="text/javascript" src="dist/opensourcepos.min.js?rel=ac10c15522" language="javascript"></script>
|
||||
<!-- end minjs template tags -->
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user