Merge branch 'master' into develop

This commit is contained in:
Torkel Ödegaard
2017-10-09 16:01:54 +02:00
176 changed files with 5940 additions and 2717 deletions

View File

@@ -602,6 +602,7 @@ Licensed under the MIT license.
tickColor: null, // color for the ticks, e.g. "rgba(0,0,0,0.15)"
margin: 0, // distance from the canvas edge to the grid
labelMargin: 5, // in pixels
eventSectionHeight: 0, // space for event section
axisMargin: 8, // in pixels
borderWidth: 2, // in pixels
minBorderMargin: null, // in pixels, null means taken from points radius
@@ -1450,6 +1451,7 @@ Licensed under the MIT license.
tickLength = axis.options.tickLength,
axisMargin = options.grid.axisMargin,
padding = options.grid.labelMargin,
eventSectionPadding = options.grid.eventSectionHeight,
innermost = true,
outermost = true,
first = true,
@@ -1490,7 +1492,9 @@ Licensed under the MIT license.
padding += +tickLength;
if (isXAxis) {
// Add space for event section
lh += padding;
lh += eventSectionPadding;
if (pos == "bottom") {
plotOffset.bottom += lh + axisMargin;
@@ -1518,6 +1522,7 @@ Licensed under the MIT license.
axis.position = pos;
axis.tickLength = tickLength;
axis.box.padding = padding;
axis.box.eventSectionPadding = eventSectionPadding;
axis.innermost = innermost;
}
@@ -2225,7 +2230,7 @@ Licensed under the MIT license.
halign = "center";
x = plotOffset.left + axis.p2c(tick.v);
if (axis.position == "bottom") {
y = box.top + box.padding;
y = box.top + box.padding + box.eventSectionPadding;
} else {
y = box.top + box.height - box.padding;
valign = "bottom";

View File

@@ -28,15 +28,14 @@
this.$element = $(element);
this.$element.hide();
this.widthClass = options.widthClass || 'width-9';
this.isSelect = (element.tagName === 'SELECT');
this.multiple = (this.isSelect && element.hasAttribute('multiple'));
this.objectItems = options && options.itemValue;
this.placeholderText = element.hasAttribute('placeholder') ? this.$element.attr('placeholder') : '';
this.inputSize = Math.max(1, this.placeholderText.length);
this.$container = $('<div class="bootstrap-tagsinput"></div>');
this.$input = $('<input class="gf-form-input" size="' +
this.inputSize + '" type="text" placeholder="' + this.placeholderText + '"/>').appendTo(this.$container);
this.$input = $('<input class="gf-form-input ' + this.widthClass + '" type="text" placeholder="' + this.placeholderText + '"/>').appendTo(this.$container);
this.$element.after(this.$container);
@@ -292,6 +291,13 @@
self.$input.focus();
}, self));
self.$container.on('blur', 'input', $.proxy(function(event) {
var $input = $(event.target);
self.add($input.val());
$input.val('');
event.preventDefault();
}, self));
self.$container.on('keydown', 'input', $.proxy(function(event) {
var $input = $(event.target),
$inputWrapper = self.findInputWrapper();