ferngully-aurelia-tools
Version:
Ferngully Tools for Aurelia
63 lines • 3.09 kB
JavaScript
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { autoinject, containerless } from "aurelia-framework";
import { EditableInputElementService } from "../editable-input-element-service";
import { DateService } from "../../../services/date-service";
import "./editable-inline-calendar.css";
var EditableInlineCalendar = (function () {
function EditableInlineCalendar(editableInputElementService, dateService) {
this.editableInputElementService = editableInputElementService;
this.dateService = dateService;
}
EditableInlineCalendar.prototype.bind = function () {
this.editableInputElementService.editor = $(this.calendar);
};
EditableInlineCalendar.prototype.show = function (element, config, currentValue, onKeyPress, onSave) {
var _this = this;
this.editableInputElementService._show(element);
this.format = config ? config.DisplayFormat || 'table' : 'table';
this.value = currentValue;
this.onSave = onSave;
this.onKeyPress = onKeyPress;
setTimeout(function () { return _this.datepicker_vm.show(); }, 0);
};
EditableInlineCalendar.prototype.onDropdownHide = function (viewmodel) {
this.onSave();
};
EditableInlineCalendar.prototype.onKeydown = function (event, viewmodel) {
return this.onKeyPress(event);
};
EditableInlineCalendar.prototype.hide = function () {
this.datepicker_vm.hide();
this.editableInputElementService._hide();
};
Object.defineProperty(EditableInlineCalendar.prototype, "maxLength", {
get: function () {
return this.editableInputElementService.maxLength;
},
enumerable: true,
configurable: true
});
EditableInlineCalendar.prototype.detached = function () {
this.editableInputElementService.detached();
};
EditableInlineCalendar.prototype.attached = function () {
this.editableInputElementService.attached();
};
EditableInlineCalendar = __decorate([
containerless,
autoinject,
__metadata("design:paramtypes", [EditableInputElementService,
DateService])
], EditableInlineCalendar);
return EditableInlineCalendar;
}());
export { EditableInlineCalendar };
//# sourceMappingURL=editable-inline-calendar.js.map