mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
fixes the acceptLehrauftrag view with bootstrap5 and tabulator5
This commit is contained in:
@@ -126,7 +126,8 @@ $this->load->view(
|
||||
),
|
||||
array(
|
||||
'name' => 'studiensemester',
|
||||
'id' => 'studiensemester'
|
||||
'id' => 'studiensemester',
|
||||
'class' => 'form-select w-auto ',
|
||||
)
|
||||
);
|
||||
?>
|
||||
@@ -181,19 +182,19 @@ $this->load->view(
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-3 col-md-offset-2 col-md-2">
|
||||
<div class="col-3 offset-md-2 col-md-2">
|
||||
<div class="btn-group dropup float-end">
|
||||
<button type="button" class="btn btn-outline-secondary dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<?php echo $this->p->t('global', 'dokumentePDF'); ?> <i class="fa fa-arrow-down"></i> <span class="caret"></span>
|
||||
</button>
|
||||
<ul id="ul-download-pdf" class="dropdown-menu">
|
||||
<li value="etw"><a href="#"><?php echo $this->p->t('global', 'PDFLehrauftraegeFH'); ?></a></li>
|
||||
<li value="lehrgang"><a href="#"><?php echo $this->p->t('global', 'PDFLehrauftraegeLehrgaenge'); ?></a></li>
|
||||
<li value="etw"><a class="dropdown-item" href="#"><?php echo $this->p->t('global', 'PDFLehrauftraegeFH'); ?></a></li>
|
||||
<li value="lehrgang"><a class="dropdown-item" href="#"><?php echo $this->p->t('global', 'PDFLehrauftraegeLehrgaenge'); ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-4 col-md-offset-0 col-md-4">
|
||||
<div class="col-4 offset-md-0 col-md-4">
|
||||
<div class="input-group">
|
||||
<input id="username" autocomplete="username" style="position: absolute; opacity: 0;"><!-- this is to prevent Chrome autofilling a random input field with the username-->
|
||||
<input id="password" type="password" autocomplete="new-password" class="form-control" placeholder="CIS-<?php echo ucfirst($this->p->t('password', 'password')); ?>">
|
||||
|
||||
@@ -50,6 +50,7 @@ $query = '
|
||||
|
||||
$tableWidgetArray = array(
|
||||
'query' => $query,
|
||||
'bootstrapVersion' => 5,
|
||||
'tableUniqueId' => 'cancelledLehrauftrag',
|
||||
'requiredPermissions' => 'lehre/lehrauftrag_akzeptieren',
|
||||
'datasetRepresentation' => 'tabulator',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--CollapseHTML 'Help'-->
|
||||
<div class="row">
|
||||
<div class="col-lg-12 collapse" id="tabulatorHelp-<?php echo $tableUniqueId; ?>">
|
||||
<div class="mb-4 "
|
||||
<div class="mb-2 "
|
||||
style="<?php
|
||||
if(isset($bootstrapVersion) && $bootstrapVersion==5)
|
||||
{
|
||||
|
||||
@@ -800,7 +800,7 @@ function _renderTabulatorHeaderHTML(tableWidgetDiv) {
|
||||
|
||||
var tabulatorHeaderHTML = "";
|
||||
tabulatorHeaderHTML += `<div class="btn-toolbar ${
|
||||
_bootstrapVersion == 3 ? "pull-right" : "float-end"
|
||||
_bootstrapVersion == 3 ? "pull-right" : "d-flex justify-content-end mb-2"
|
||||
}" role="toolbar">
|
||||
<div class="btn-group" role="group">
|
||||
<!-- CSV Download button -->
|
||||
@@ -832,7 +832,6 @@ function _renderTabulatorHeaderHTML(tableWidgetDiv) {
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</br>
|
||||
`;
|
||||
|
||||
return tabulatorHeaderHTML;
|
||||
@@ -867,8 +866,8 @@ function _renderTabulatorHeaderCollapseHTML(
|
||||
<div class="panel-body">
|
||||
<div class="btn-group" role="group">`;
|
||||
} else {
|
||||
tabulatorHeaderCollapseHTML += `<div class="row my-4">
|
||||
<div class="col-12 collapse" id="tabulatorSettings-${tableUniqueId}">
|
||||
tabulatorHeaderCollapseHTML += `<div class="row ">
|
||||
<div class="col-12 mb-2 collapse" id="tabulatorSettings-${tableUniqueId}">
|
||||
<div class="accordion" id="accordion" role="tablist" aria-multiselectable="true">
|
||||
<div class="accordion-item">
|
||||
<h5 class=" accordion-header" role="tab" id="headingOne">
|
||||
|
||||
@@ -195,7 +195,7 @@ function func_tableBuilt(table) {
|
||||
);
|
||||
|
||||
// fully redrawing the table after adding the Details column
|
||||
table.tabulator("redraw", true);
|
||||
table.redraw(true);
|
||||
}
|
||||
|
||||
// Sets status values into column status
|
||||
@@ -474,9 +474,11 @@ $(function () {
|
||||
func_tableBuilt(tabulatorInstance);
|
||||
|
||||
// using the tabulator instance instead of the jquery object because the site loads two different tabulator tables
|
||||
console.log("instance",tabulatorInstance)
|
||||
let uniqueTableID =
|
||||
tabulatorInstance.parentElement.parentElement.parentElement.attributes
|
||||
tabulatorInstance.element.parentElement.parentElement.parentElement.attributes
|
||||
.tableUniqueId.value;
|
||||
|
||||
switch (uniqueTableID) {
|
||||
case "cancelledLehrauftrag":
|
||||
tabulatorInstance.on("renderComplete", () => {
|
||||
|
||||
Reference in New Issue
Block a user