Skip to content

Commit

Permalink
align UI tabviews to the right
Browse files Browse the repository at this point in the history
  • Loading branch information
rkrenn committed Feb 29, 2024
1 parent ac0a3ed commit ae63421
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 14 deletions.
2 changes: 1 addition & 1 deletion web/src/main/webapp/course/course.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
dynamic="true" cache="false"
widgetVar="courseTabView"
onTabShow="handleCourseTabChange(transposeTabIndex(index.index()))"
orientation="#{sessionScopeBean.courseVisibleTabSet.size() > 5 ? 'left' : 'top'}"
orientation="top"
styleClass="ctsms-tabview">
<p:tab
id="coursemain"
Expand Down
2 changes: 1 addition & 1 deletion web/src/main/webapp/inputfield/inputField.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
dynamic="true" cache="false"
widgetVar="inputFieldTabView"
onTabShow="handleInputFieldTabChange(transposeTabIndex(index.index()))"
orientation="#{sessionScopeBean.inputFieldVisibleTabSet.size() > 5 ? 'left' : 'top'}"
orientation="#{sessionScopeBean.inputFieldVisibleTabSet.size() >= 5 ? 'right' : 'top'}"
styleClass="ctsms-tabview">
<p:tab
id="inputfieldmain"
Expand Down
2 changes: 1 addition & 1 deletion web/src/main/webapp/inventory/inventory.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
dynamic="true" cache="false"
widgetVar="inventoryTabView"
onTabShow="handleInventoryTabChange(transposeTabIndex(index.index()))"
orientation="#{sessionScopeBean.inventoryVisibleTabSet.size() > 5 ? 'left' : 'top'}"
orientation="#{sessionScopeBean.inventoryVisibleTabSet.size() >= 5 ? 'right' : 'top'}"
styleClass="ctsms-tabview">
<p:tab
id="inventorymain"
Expand Down
2 changes: 1 addition & 1 deletion web/src/main/webapp/massmail/massMail.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
dynamic="true" cache="false"
widgetVar="massMailTabView"
onTabShow="handleMassMailTabChange(transposeTabIndex(index.index()))"
orientation="#{sessionScopeBean.massMailVisibleTabSet.size() > 5 ? 'left' : 'top'}"
orientation="#{sessionScopeBean.massMailVisibleTabSet.size() >= 5 ? 'right' : 'top'}"
styleClass="ctsms-tabview">
<p:tab
id="massMailmain"
Expand Down
2 changes: 1 addition & 1 deletion web/src/main/webapp/proband/proband.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
dynamic="true" cache="false"
widgetVar="probandTabView"
onTabShow="handleProbandTabChange(transposeTabIndex(index.index()))"
orientation="#{sessionScopeBean.probandVisibleTabSet.size() > 5 ? 'left' : 'top'}"
orientation="#{sessionScopeBean.probandVisibleTabSet.size() >= 5 ? 'right' : 'top'}"
styleClass="ctsms-tabview">
<p:tab
id="probandmain"
Expand Down
27 changes: 21 additions & 6 deletions web/src/main/webapp/resources/css/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -109,23 +109,38 @@ td .ui-selectonemenu {
}

.ui-tabs-left > .ui-tabs-nav {
width: 200px;
padding: 2px 0px;
height: 100%;
}
width: 200px !important;
padding: 2px 0px !important;
height: 100% !important;
}

.ui-tabs-right > .ui-tabs-nav {
width: 200px !important;
padding: 2px 0px !important;
height: 100% !important;
}

.ui-tabs-left > .ui-tabs-panels {
width: calc(100% - 200px);
width: calc(100% - 200px) !important;
}

.ui-tabs-right > .ui-tabs-panels {
width: calc(100% - 200px) !important;
}

.ui-tabs .ui-tabs-panel {
padding: 0px 2px;
padding: 0px 0px;
}

.ui-tabs.ui-tabs-left > .ui-tabs-nav li {
border-right: 1px solid #aaa;
}

.ui-tabs.ui-tabs-right > .ui-tabs-nav li {
border-left: 1px solid #aaa;
}


.ui-tabs .ui-tabs-nav li a {
font-size: inherit;
}
Expand Down
2 changes: 1 addition & 1 deletion web/src/main/webapp/staff/staff.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
dynamic="true" cache="false"
widgetVar="staffTabView"
onTabShow="handleStaffTabChange(transposeTabIndex(index.index()))"
orientation="#{sessionScopeBean.staffVisibleTabSet.size() > 5 ? 'left' : 'top'}"
orientation="#{sessionScopeBean.staffVisibleTabSet.size() >= 5 ? 'right' : 'top'}"
styleClass="ctsms-tabview">
<p:tab
id="staffmain"
Expand Down
2 changes: 1 addition & 1 deletion web/src/main/webapp/trial/trial.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<p:tabView id="tabView" dynamic="true" cache="false"
widgetVar="trialTabView"
onTabShow="handleTrialTabChange(transposeTabIndex(index.index()))"
orientation="#{sessionScopeBean.trialVisibleTabSet.size() > 5 ? 'left' : 'top'}"
orientation="#{sessionScopeBean.trialVisibleTabSet.size() >= 5 ? 'right' : 'top'}"
styleClass="ctsms-tabview">
<p:tab id="trialmain" disabled="false"
titleStyleClass="#{!trialBean.created ? 'ctsms-tabtitle-emphasized' : 'ctsms-tabtitle'}"
Expand Down
2 changes: 1 addition & 1 deletion web/src/main/webapp/user/user.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
dynamic="true" cache="false"
widgetVar="userTabView"
onTabShow="handleUserTabChange(transposeTabIndex(index.index()))"
orientation="#{sessionScopeBean.userVisibleTabSet.size() > 5 ? 'left' : 'top'}"
orientation="#{sessionScopeBean.userVisibleTabSet.size() >= 5 ? 'right' : 'top'}"
styleClass="ctsms-tabview">
<p:tab
id="usermain"
Expand Down

0 comments on commit ae63421

Please sign in to comment.