ngx-monitorias-uniandes-lib
Version:
This library is used for Monitorias-Uniandes system.
65 lines • 19.6 kB
JavaScript
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var core_1 = require("@angular/core");
var ngx_bootstrap_1 = require("ngx-bootstrap");
var combo_box_1 = require("../../../../combo-box/combo-box");
var combo_box_modeldata_1 = require("../../../../combo-box/model-data/combo-box.modeldata");
var api_1 = require("api-angular-monitorias-dto/api");
var MonitoriasCertificatesEventsComponent = /** @class */ (function (_super) {
__extends(MonitoriasCertificatesEventsComponent, _super);
function MonitoriasCertificatesEventsComponent() {
return _super.call(this) || this;
}
MonitoriasCertificatesEventsComponent.prototype.setData = function () {
var _this = this;
this.data = [];
var bruteData = api_1.Monitorias_Certificates_Events.getAllEnumValues();
bruteData = bruteData ? bruteData : [];
this.selectionParamsBeforeReset();
bruteData.forEach(function (element) {
var nmodeldata = new combo_box_modeldata_1.ComboBoxModelData(false, false, true, element.nameid, element);
_this.data.push(nmodeldata);
});
this.selectionParamsAfterReset();
};
MonitoriasCertificatesEventsComponent.prototype.openDialogMulti = function () {
this.modalDirectiveMulti.show();
};
MonitoriasCertificatesEventsComponent.prototype.closeDialogMulti = function () {
this.modalDirectiveMulti.hide();
};
/* protected region developer's' code on begin */
/* protected region developer's' code end */
/* protected region developer's' code on begin */
/* protected region developer's' code end */
MonitoriasCertificatesEventsComponent.prototype.ngOnInit = /* protected region developer's' code on begin */
/* protected region developer's' code end */
function () {
this.setData();
};
MonitoriasCertificatesEventsComponent.decorators = [
{ type: core_1.Component, args: [{
selector: 'app-monitorias-certificates-events',
template: "\n <ng-template [ngIf]=\"(compact && !multiSelect)\">\n <div>\n <select [disabled]=\"disabled\" id=\"{{id !== ''? id : 'monitoriascertificateeventscombobox1'}}\"\n class=\"combobox form-control\" [(ngModel)]=\"selectedSingle\" (change)=\"onSelectionChange()\">\n <option [(hidden)]=\"element.hidden\" *ngFor=\"let element of data\" [ngValue]=\"element\">{{(element.object ==\n null?\"UNASIGNED\":element.object.nameid)| translate }}</option>\n </select>\n </div>\n <!-- protected region developer's' code on begin -->\n <!-- protected region developer's' code end -->\n </ng-template>\n\n\n <ng-template #checkmonitoriascertificateevents [ngIf]=\"(!compact && multiSelect)\">\n\n <div [(hidden)]=\"!enableSelectionState\" class=\"selectOption\">\n <div>\n <input [disabled]=\"!disabled\" [checked]=\"selectStates == ComboBoxReference.ALL\" class=\"regular-radio\" type=\"radio\"\n name=\"{{'monitoriascertificateeventsoptionsselectmdradiogroup'+optionInstance}}\"\n id=\"{{'radiomonitoriascertificateeventsselectmd'+optionInstance}}\" />\n <label (click)=\"changeSelectionState(ComboBoxReference.ALL)\"\n for=\"{{'radiomonitoriascertificateeventsselectmd'+optionInstance}}\">{{'allElements'| translate }}</label>\n </div>\n <div>\n <input [disabled]=\"!disabled\" [checked]=\"selectStates == ComboBoxReference.NONE\" class=\"regular-radio\"\n type=\"radio\" name=\"{{'monitoriascertificateeventsoptionsselectmdradiogroup'+optionInstance}}\"\n id=\"{{'radiomonitoriascertificateeventsselectmd'+optionInstance}}\" />\n <label (click)=\"changeSelectionState(ComboBoxReference.NONE)\"\n for=\"{{'radiomonitoriascertificateeventsselectmd'+optionInstance}}\">{{ 'notypeElements' | translate }}</label>\n </div>\n <div>\n <input [disabled]=\"!disabled\" [checked]=\"selectStates == ComboBoxReference.SELECT\" class=\"regular-radio\"\n type=\"radio\" name=\"{{'monitoriascertificateeventsoptionsselectmdradiogroup'+optionInstance}}\"\n id=\"{{'radiomonitoriascertificateeventsselectmd'+optionInstance}}\" />\n <label (click)=\"changeSelectionState(ComboBoxReference.SELECT)\"\n for=\"{{'radiomonitoriascertificateeventsselectmd'+optionInstance}}\">{{ 'select'| translate }}</label>\n </div>\n </div>\n <div class=\"comboselectlist\">\n <table\n [class]=\"(disabled||selectStates != ComboBoxReference.SELECT?'table-list-disabled':'')+' table table-list table-filter'\">\n <tbody>\n <tr [(hidden)]=\"element.hidden\" *ngFor=\"let element of data\">\n <td>\n <div>\n <input (change)=\"onMultipleListElementClicked(element)\"\n [disabled]=\"disabled || selectStates != ComboBoxReference.SELECT\" [checked]=\"element.selected\"\n type=\"checkbox\"\n id=\"{{'checkmonitoriascertificateevents'+(element.object!=null?element.object.nameid:'-1')}}\" />\n <label for=\"{{'checkmonitoriascertificateevents'+(element.object!=null?element.object.nameid:'-1')}}\">\n {{(element.object != null?element.object.nameid:\"selectAll\")| translate }}</label>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <!-- protected region developer's' code on begin -->\n <!-- protected region developer's' code end -->\n </ng-template>\n\n <ng-template #optionmonitoriascertificateevents [ngIf]=\"(!compact && !multiSelect)\">\n <div class=\"comboradiolist\">\n <table\n [class]=\"(disabled || selectStates != ComboBoxReference.SELECT?'table-list-disabled':'')+' table table-list table-filter'\">\n <tbody>\n <tr [(hidden)]=\"element.hidden\" *ngFor=\"let element of data\">\n <td>\n <div>\n <input [disabled]=\"disabled\" [checked]=\"element.selected\" type=\"radio\"\n name=\"{{'monitoriascertificateeventsradiogroup'+optionInstance}}\"\n id=\"{{'radiomonitoriascertificateevents'+(element.object!=null?element.object.nameid:'-1')+optionInstance}}\" />\n <label (click)=\"onSelectSingleElement(element)\"\n for=\"{{'radiomonitoriascertificateevents'+(element.object!=null?element.object.nameid:'-1')+optionInstance}}\">{{(element.object\n != null?element.object.nameid:\"UNASIGNED\")| translate }}</label>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <!-- protected region developer's' code on begin -->\n <!-- protected region developer's' code end -->\n </ng-template>\n\n\n <ng-template #checkmonitoriascertificateeventscpt [ngIf]=\"(compact && multiSelect)\">\n\n <p>{{'selectMonitoriascertificateEvents' | translate}}: \n <button [disabled]=\"disabled\" class=\"btn btn-default\" (click)=\"openDialogMulti()\">{{'select'| translate}}</button>\n </p>\n <ul [(hidden)]=\"disableCheckBoxesSelection\">\n <li *ngFor=\"let element of selectedElements\">{{element.nameid | translate}}</li>\n </ul>\n <ul [(hidden)]=\"!disableCheckBoxesSelection\">\n <li [(hidden)]=\"selectStates != ComboBoxReference.ALL\">{{'allElements' | translate}}</li>\n <li [(hidden)]=\"selectStates != ComboBoxReference.NONE\">{{'notypeElements' | translate}}</li>\n </ul>\n\n <div class=\"modal fade\" [config]=\"{backdrop: 'static'}\" bsModal #monitoriascertificateeventsdialogmulti=\"bs-modal\"\n tabindex=\"-1\" role=\"dialog\">\n <div class=\"modal-dialog\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <table class=\"table-list\">\n <tr>\n <td>\n <b>{{'selectRoles' | translate}}</b>\n </td>\n <td>\n <button (click)=\"closeDialogMulti()\" type=\"button\" class=\"close\" data-dismiss=\"modal\"\n aria-label=\"Close\">\n <span aria-hidden=\"true\">×</span>\n </button>\n </td>\n\n </tr>\n </table>\n </div>\n <div align=\"center\" class=\"modal-body\">\n\n\n <div [(hidden)]=\"!enableSelectionState\" class=\"selectOption\">\n <div>\n <input [disabled]=\"!disabled\" [checked]=\"selectStates == ComboBoxReference.ALL\" class=\"regular-radio\"\n type=\"radio\" name=\"{{'monitoriascertificateeventsoptionsselectmdradiogroup'+optionInstance}}\"\n id=\"{{'radiomonitoriascertificateeventsselectmd'+optionInstance}}\" />\n <label (click)=\"changeSelectionState(ComboBoxReference.ALL)\"\n for=\"{{'radiomonitoriascertificateeventsselectmd'+optionInstance}}\">{{'allElements'| translate }}</label>\n </div>\n <div>\n <input [disabled]=\"!disabled\" [checked]=\"selectStates == ComboBoxReference.NONE\" class=\"regular-radio\"\n type=\"radio\" name=\"{{'monitoriascertificateeventsoptionsselectmdradiogroup'+optionInstance}}\"\n id=\"{{'radiomonitoriascertificateeventsselectmd'+optionInstance}}\" />\n <label (click)=\"changeSelectionState(ComboBoxReference.NONE)\"\n for=\"{{'radiomonitoriascertificateeventsselectmd'+optionInstance}}\">{{ 'notypeElements' | translate }}</label>\n </div>\n <div>\n <input [disabled]=\"!disabled\" [checked]=\"selectStates == ComboBoxReference.SELECT\" class=\"regular-radio\"\n type=\"radio\" name=\"{{'monitoriascertificateeventsoptionsselectmdradiogroup'+optionInstance}}\"\n id=\"{{'radiomonitoriascertificateeventsselectmd'+optionInstance}}\" />\n <label (click)=\"changeSelectionState(ComboBoxReference.SELECT)\"\n for=\"{{'radiomonitoriascertificateeventsselectmd'+optionInstance}}\">{{ 'select'| translate }}</label>\n </div>\n </div>\n\n\n\n <div class=\"comboselectlist\">\n <table\n [class]=\"(disabled || selectStates != ComboBoxReference.SELECT?'table-list-disabled':'')+' table table-list table-filter'\">\n <tbody>\n <tr [(hidden)]=\"element.hidden\" *ngFor=\"let element of data\">\n <td>\n\n <div>\n <input (change)=\"onMultipleListElementClicked(element)\"\n [disabled]=\"disabled || selectStates != ComboBoxReference.SELECT\" [checked]=\"element.selected\"\n type=\"checkbox\"\n id=\"{{'checkmonitoriascertificateevents'+(element.object!=null?element.object.nameid:'-1')}}\" />\n <label\n for=\"{{'checkmonitoriascertificateevents'+(element.object!=null?element.object.nameid:'-1')}}\">{{(element.object\n != null?element.object.nameid:\"selectAll\")| translate }}</label>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n\n\n\n </div>\n <div align=\"center\" class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-lg btn-uniandes-main\" (click)=\"closeDialogMulti()\">{{'select' |\n translate}}</button>\n </div>\n </div>\n\n </div>\n </div>\n\n <!-- protected region developer's' code on begin -->\n <!-- protected region developer's' code end -->\n\n </ng-template>\n ",
styles: ["\n label{\n margin: 0;\n width: 100%;\n text-align: left;\n }\n .label-candidates{\n padding-left: 5%;\n padding-right: 5%;\n font-style: italic;\n padding-bottom: 18px;\n }\n .panel {\n border: 1px solid #ddd;\n background-color: #fcfcfc;\n }\n .panel .btn-group {\n margin: 15px 0 30px;\n }\n .panel .btn-group .btn {\n transition: background-color .3s ease;\n }\n .table{\n margin: 0;\n }\n .table-list{\n width: 90%;\n }\n\n .table-list-disabled{\n background-color: #f9f9f9 !important;\n }\n\n .table-filter {\n background-color: #fff;\n border-bottom: 1px solid #eee;\n }\n .table-filter tbody tr:hover {\n cursor: pointer;\n background-color: #eee;\n }\n .table-filter tbody tr td {\n padding-top: 5px;\n padding-right: 0px;\n padding-bottom:5px;\n vertical-align: middle;\n border-top-color: #eee;\n }\n .table-filter tr td:first-child {\n width: 15px;\n }\n .table-filter tr td:nth-child(2) {\n width: 15px;\n }\n\n .table-filter .star {\n color: #ccc;\n text-align: center;\n display: block;\n }\n .table-filter .star.star-checked {\n color: #F0AD4E;\n }\n .table-filter .star:hover {\n color: #ccc;\n }\n .table-filter .star.star-checked:hover {\n color: #F0AD4E;\n }\n .table-filter .media-photo {\n width: 35px;\n }\n\n .table-filter .media-body {\n display: block;\n width: 100%;\n /* Had to use this style to force the div to expand (wasn't necessary with my bootstrap version 3.3.6) */\n }\n .table-filter .media-meta {\n font-size: 11px;\n color: #999;\n }\n .table-filter .media .title {\n color: #000000;\n font-size: 14px;\n line-height: normal;\n margin: 0;\n }\n .table-filter .media .title span {\n font-size: .8em;\n margin-right: 20px;\n }\n .table-filter .media .title span.green {\n color: #5cb85c;\n }\n .table-filter .media .title span.yellow {\n color: #f0ad4e;\n }\n .table-filter .media .title span.red {\n color: #d9534f;\n }\n .table-filter .media .summary {\n font-size: 14px;\n }\n .table-list{\n\n width: 100%;\n }\n .comboyear{\n width: 90px;\n }\n\n .labelyear{\n width: 85px;\n text-align: right;\n padding-right: 5px;\n font-size: 13px;\n padding-top: 5px;\n \n }\n\n .modal-body{\n padding: 0px !important;\n margin: 0px !important;\n\n max-height: 70vh !important;\n overflow-y: auto;\n }\n .modal-footer{\n display: block;\n padding: 10px;\n }\n\n .selectOption{\n display: grid;\n grid-template-columns: 1fr 1fr 1fr;\n padding-top: 20px;\n padding-left: 5px;\n padding-right: 5px;\n padding-bottom: 20px;\n background-color: #f7f7f7;\n }\n\n .selectOption div{\n align-items: center;\n justify-content: center;\n justify-items: center;\n padding-left: 15px;\n }\n\n .selectOption label{\n margin: 0;\n }\n\n\n [type=\"radio\"]:checked,\n [type=\"radio\"]:not(:checked) {\n position: absolute;\n display: none;\n }\n [type=\"radio\"]:checked + label,\n [type=\"radio\"]:not(:checked) + label\n {\n position: relative;\n padding-left: 28px;\n cursor: pointer;\n line-height: 20px;\n display: inline-block;\n color: #666;\n }\n [type=\"radio\"]:checked + label:before,\n [type=\"radio\"]:not(:checked) + label:before {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n width: 18px;\n height: 18px;\n border: 1px solid #bbb;\n border-radius: 2px;\n }\n [type=\"radio\"]:checked + label:after,\n [type=\"radio\"]:not(:checked) + label:after {\n content: '';\n width: 12px;\n height: 12px;\n background: black;\n position: absolute;\n top: 3px;\n left: 3px;\n border-radius: 100%;\n \n\n }\n [type=\"radio\"]:not(:checked) + label:after {\n opacity: 0;\n -webkit-transform: scale(0);\n transform: scale(0);\n }\n [type=\"radio\"]:checked + label:after {\n opacity: 1;\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n\n\n\n\n\n [type=\"checkbox\"]:checked,\n [type=\"checkbox\"]:not(:checked) {\n position: absolute;\n display: none;\n }\n [type=\"checkbox\"]:checked + label,\n [type=\"checkbox\"]:not(:checked) + label\n {\n position: relative;\n padding-left: 28px;\n cursor: pointer;\n line-height: 20px;\n display: inline-block;\n color: #666;\n }\n [type=\"checkbox\"]:checked + label:before,\n [type=\"checkbox\"]:not(:checked) + label:before {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n width: 18px;\n height: 18px;\n border: 1px solid #bbb;\n border-radius: 2px;\n }\n [type=\"checkbox\"]:checked + label:after,\n [type=\"checkbox\"]:not(:checked) + label:after {\n font-family: 'Material Icons';\n content: 'check';\n font-weight: bold;\n width: 18px;\n height: 18px;\n color: black;\n font-size: 16px;\n position: absolute;\n top: 0px;\n left: 1px;\n border-radius: 100%;\n \n\n }\n [type=\"checkbox\"]:not(:checked) + label:after {\n opacity: 0;\n -webkit-transform: scale(0);\n transform: scale(0);\n }\n [type=\"checkbox\"]:checked + label:after {\n opacity: 1;\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n\n\n /* protected region developer's' code on begin */\n /* protected region developer's' code end */\n "]
},] },
];
/** @nocollapse */
MonitoriasCertificatesEventsComponent.ctorParameters = function () { return []; };
MonitoriasCertificatesEventsComponent.propDecorators = {
"modalDirectiveMulti": [{ type: core_1.ViewChild, args: ['monitoriascertificateeventsdialogmulti',] },],
};
return MonitoriasCertificatesEventsComponent;
}(combo_box_1.ComboBox));
exports.MonitoriasCertificatesEventsComponent = MonitoriasCertificatesEventsComponent;
//# sourceMappingURL=monitorias.certificates.events.component.js.map