Merge branch 'feature-25999/C4_cleanup_tablewidget' into feature-25999/C4_cleanup

This commit is contained in:
Harald Bamberger
2024-11-19 08:48:06 +01:00
14 changed files with 980 additions and 941 deletions
@@ -76,12 +76,11 @@ if (defined("CIS4")) {
<!--Titel-->
<div class="page-header">
<h3><?php echo $this->p->t('anrechnung', 'anrechnungenVerwalten'); ?></h3>
<h3><?php echo $this->p->t('anrechnung', 'anrechnungenVerwalten')
. ' - ' . $this->p->t('anrechnung', 'anrechnungszeitraumFestlegen'); ?>
</h3>
</div><br>
<!--Untertitel-->
<h4><?php echo $this->p->t('anrechnung', 'anrechnungszeitraumFestlegen'); ?></h4><br>
<div class="row">
<div class="col-xs-4">
<button class="btn btn-primary azrOpenModal" data-toggle="modal" data-target="#azrModal">
@@ -43,5 +43,9 @@ $filterWidgetArray = array(
insertvon: {visible: false, headerFilter:"input"}
}'
);
echo $this->widgetlib->widget('TableWidget', $filterWidgetArray);
?>
<div class="tabulator-initialfontsize">
<?php
echo $this->widgetlib->widget('TableWidget', $filterWidgetArray);
?>
</div>
@@ -49,7 +49,7 @@ $includesArray = array(
'customJSs' => array(
'public/js/bootstrapper.js',
'public/js/lehre/anrechnung/reviewAnrechnungDetail.js'
)
)
);
@@ -176,7 +176,7 @@ $this->load->view(
<!-- tabulator data table -->
<div class="row">
<div class="col-lg-12">
<div class="col-lg-12 tabulator-initialfontsize">
<?php $this->load->view('lehre/lehrauftrag/approveLehrauftragData.php'); ?>
</div>
</div>
@@ -178,7 +178,9 @@ $this->load->view(
</div>
<!-- tabulator data table -->
<div class="tabulator-initialfontsize">
<?php $this->load->view('lehre/lehrauftrag/orderLehrauftragData.php'); ?>
</div>
<!-- filter buttons & bestell-button -->
<div class="row">
@@ -187,14 +189,14 @@ $this->load->view(
<div class="btn-toolbar" role="toolbar">
<div class="btn-group" role="group">
<button id="show-all" class="btn btn-default btn-lehrauftrag" type="button" data-toggle="tooltip" data-placement="left" title="<?php echo $this->p->t('ui', 'alleAnzeigen'); ?>"><i class='fa fa-users'></i></button>
<button id="show-newAndChanged" class="btn btn-default btn-lehrauftrag" type="button" data-toggle="tooltip" data-placement="left" title="<?php echo $this->p->t('ui', 'neuUndGeaenderteAnzeigen'); ?>"><i style="margin-right:10px" class='fa fa-user-plus'></i><i style="margin-right:10px" class="fa fa-ellipsis-vertical"></i>&nbsp;<i class='fa fa-user-pen'></i></button>
<button id="show-newAndChanged" class="btn btn-default btn-lehrauftrag active focus" type="button" data-toggle="tooltip" data-placement="left" title="<?php echo $this->p->t('ui', 'neuUndGeaenderteAnzeigen'); ?>"><i style="margin-right:10px" class='fa fa-user-plus'></i><i style="margin-right:10px" class="fa fa-ellipsis-vertical"></i>&nbsp;<i class='fa fa-user-pen'></i></button>
</div>
<div class="btn-group" role="group" style="margin-left: 20px;">
<button id="show-new" class="btn btn-default btn-lehrauftrag active focus" type="button" data-toggle="tooltip" data-placement="left" title="<?php echo $this->p->t('ui', 'nurNeueAnzeigen'); ?>"><i class='fa fa-user-plus'></i></button>
<button id="show-new" class="btn btn-default btn-lehrauftrag" type="button" data-toggle="tooltip" data-placement="left" title="<?php echo $this->p->t('ui', 'nurNeueAnzeigen'); ?>"><i class='fa fa-user-plus'></i></button>
<button id="show-ordered" class="btn btn-default btn-lehrauftrag" type="button" data-toggle="tooltip" data-placement="left" title="<?php echo $this->p->t('ui', 'nurBestellteAnzeigen'); ?>"><i class='fa fa-user-tag'></i></button>
<button id="show-approved" class="btn btn-default btn-lehrauftrag" type="button" data-toggle="tooltip" data-placement="left" title="<?php echo $this->p->t('ui', 'nurErteilteAnzeigen'); ?>"><i class='fa fa-user-check'></i></button>
<button id="show-accepted" class="btn btn-default btn-lehrauftrag" type="button" data-toggle="tooltip" data-placement="left" title="<?php echo $this->p->t('ui', 'nurAngenommeneAnzeigen'); ?>"><i class='fa-regular fa-handshake'></i></button>
<button id="show-changed" class="btn btn-default btn-lehrauftrag active focus" type="button" data-toggle="tooltip" data-placement="left" title="<?php echo $this->p->t('ui', 'nurGeaenderteAnzeigen'); ?>"><i class='fa fa-user-pen'></i></button></button>
<button id="show-changed" class="btn btn-default btn-lehrauftrag" type="button" data-toggle="tooltip" data-placement="left" title="<?php echo $this->p->t('ui', 'nurGeaenderteAnzeigen'); ?>"><i class='fa fa-user-pen'></i></button></button>
</div>
<div class="btn-group" role="group" style="margin-left: 20px;">
<button id="show-dummies" class="btn btn-default btn-lehrauftrag" type="button" data-toggle="tooltip" data-placement="left" title="<?php echo $this->p->t('ui', 'nurDummiesAnzeigen'); ?>"><i class='fa fa-user-secret'></i></button>
@@ -63,7 +63,9 @@ $filterWidgetArray = array(
bezeichnung: {visible: true, headerFilter:"input"}
}', // col properties
);
echo $this->widgetlib->widget('TableWidget', $filterWidgetArray);
?>
?>
<div class="tabulator-initialfontsize">
<?php
echo $this->widgetlib->widget('TableWidget', $filterWidgetArray);
?>
</div>
+17
View File
@@ -108,6 +108,23 @@
font-size: 1rem;
}
.tabulator-initialfontsize .tabulator {
font-size: 14px;
}
.tabulator-row.tabulator-unselectable .tabulator-cell {
pointer-events: all;
}
.tabulator-tooltip {
color: #fff;
background-color: #000;
}
.tabulator-row.tabulator-unselectable:not(.tabulator-calcs) {
color: #777 !important;
}
.tabulator-cell .btn {
padding: 0 .7rem;
min-height: 25px;
+9
View File
@@ -142,3 +142,12 @@ h6, .h6 {
.fhc-container .tabulator .tabulator-cell {
border-right: 1px solid #dee2e6;
}
/* lehrauftrag begin */
.bg-success-bs3 {
background-color: #dff0d8 !important;
}
.bg-warning-bs3 {
background-color: #fcf8e3 !important;
}
/* lehrauftrag end */
+918 -913
View File
File diff suppressed because it is too large Load Diff
@@ -258,10 +258,9 @@ var adminAnrechnung = {
if (FHC_AjaxClient.hasData(data)) {
let row = $("#tableWidgetTabulator").tabulator(
"getRow",
"deleteRow",
anrechnungszeitraum_id
);
row.delete(anrechnungszeitraum_id);
// Success message
FHC_DialogLib.alertSuccess(FHC_PhrasesLib.t("ui", "geloescht"));
@@ -129,11 +129,11 @@ function func_rowFormatter(row) {
(bestellt != null && betrag != vertrag_betrag) ||
(bestellt != null && stunden != vertrag_stunden)
) {
cell.getElement().classList.add("bg-warning"); // geaenderte
cell.getElement().classList.add("bg-warning-bs3"); // geaenderte
} else if (bestellt != null && erteilt != null && akzeptiert == null) {
return; // bestellte + erteilte
} else if (bestellt != null && erteilt != null && akzeptiert != null) {
cell.getElement().classList.add("bg-success"); // akzeptierte
cell.getElement().classList.add("bg-success-bs3"); // akzeptierte
}
});
}
@@ -172,7 +172,7 @@ function func_tableBuilt(table) {
field: "status",
width: 40,
hozAlign: "center",
downloadTitle: "Status",
titleDownload: "Status",
formatter: status_formatter,
tooltip: status_tooltip,
},
@@ -477,6 +477,7 @@ $(function () {
default:
break;
}
tabulatorInstance.redraw(true);
});
var canPromise = !!window.Promise;
@@ -216,7 +216,7 @@ function func_tableBuilt(table) {
field: "status",
width: 40,
hozAlign: "center",
downloadTitle: "Status",
titleDownload: "Status",
formatter: status_formatter,
tooltip: status_tooltip,
},
@@ -488,6 +488,7 @@ $(function () {
$("#tableWidgetTabulator").tabulator("on", "rowUpdated", (row) =>
func_rowUpdated(row)
);
$("#tableWidgetTabulator").tabulator("redraw", true);
});
// Redraw table on resize to fit tabulators height to windows height
@@ -245,7 +245,7 @@ function func_tableBuilt(table) {
field: "status",
width: 40,
hozAlign: "center",
downloadTitle: "Status",
titleDownload: "Status",
formatter: status_formatter,
tooltip: status_tooltip,
},
@@ -548,10 +548,10 @@ $(function () {
func_renderStarted(tabulatorInstance);
});
// event dataLoaded needs to be attached as a callback to the tableBuilt event in tabulator5
$("#tableWidgetTabulator").tabulator("on", "dataLoaded", (data) => {
func_dataLoaded(data, tabulatorInstance);
});
// set initial filter
func_dataLoaded(null, tabulatorInstance);
$("#tableWidgetTabulator").tabulator("redraw", true);
});
// Redraw table on resize to fit tabulators height to windows height
+2 -2
View File
@@ -113,8 +113,8 @@ $(function(){
if (FHC_AjaxClient.hasData(data)) {
// Delete row
let row = $('#tableWidgetTabulator').tabulator('getRow', zeitsperre_id);
row.delete(zeitsperre_id);
$('#tableWidgetTabulator').tabulator('deleteRow', zeitsperre_id);
// Reset form
Zverfueg.resetFormFields();