Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
fsfahrttool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fsini-informatik
fsfahrttool
Commits
2d4e949a
Commit
2d4e949a
authored
8 years ago
by
Tim Repke
Browse files
Options
Downloads
Patches
Plain Diff
colourcoding admin list
parent
4866834c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
registration-system/admin/pages_list.php
+33
-6
33 additions, 6 deletions
registration-system/admin/pages_list.php
registration-system/view/admin_style.css
+13
-3
13 additions, 3 deletions
registration-system/view/admin_style.css
with
46 additions
and
9 deletions
registration-system/admin/pages_list.php
+
33
−
6
View file @
2d4e949a
...
...
@@ -182,8 +182,15 @@ class AdminListPage extends AdminPage {
$(document).ready(function(){
ltab = $("#mlist").DataTable({
"rowCallback": function (row, data, index) {
if (data['
.
$buttoncol
.
'].split(",")[2] != 0) {
var spl = data['
.
$buttoncol
.
'].split(",");
if (spl[2] != 0) {
$("td", row).addClass("list-backstepped");
} else if (spl[0] != 0 && spl[1] != 0) {
$("td", row).addClass("list-repaid");
} else if (spl[0] != 0) {
$("td", row).addClass("list-paid");
} else if (spl[0] == 0) {
$("td", row).addClass("list-unpaid");
}
},
"columnDefs": [
...
...
@@ -242,15 +249,35 @@ class AdminListPage extends AdminPage {
var newstate = (((state-1)<0) ? 1 : 0);
$.get("index.php?page=list&ajax=ajax&update="+type+"&hash="+hash+"&nstate="+newstate ,"",
function(){
if(newstate === 1 && type === "backstepped") {
$("td", $(that).parent().parent()).addClass("list-backstepped");
} else {
$("td", $(that).parent().parent()).removeClass("list-backstepped");
}
that.className="btn btn-"+type+"-"+newstate;
that.setAttribute("onclick", "btnclick(this, \'"+type+"\', \'"+hash+"\', "+newstate+")");
var p = $("div", $(that).parent())[0].className;
var r = $("div", $(that).parent())[1].className;
var b = $("div", $(that).parent())[2].className;
if (b == "btn btn-backstepped-1") {
updateClass(that, "list-backstepped");
} else if (p == "btn btn-paid-1" && r == "btn btn-repaid-1") {
updateClass(that, "list-repaid");
} else if (p == "btn btn-paid-1") {
updateClass(that, "list-paid");
} else if (p == "btn btn-paid-0") {
updateClass(that, "list-unpaid");
} else {
updateClass(that);
}
});
}
function updateClass(that, nClass = null) {
$("td", $(that).parent().parent()).removeClass("list-backstepped")
.removeClass("list-repaid")
.removeClass("list-paid")
.removeClass("list-unpaid");
if(nClass != null)
$("td", $(that).parent().parent()).addClass(nClass);
}
</script>'
;
}
...
...
This diff is collapsed.
Click to expand it.
registration-system/view/admin_style.css
+
13
−
3
View file @
2d4e949a
...
...
@@ -63,11 +63,21 @@ form table tr td{
padding
:
0
5px
;
}
.list-backstepped
{
.list-backstepped
,
.list-backstepped
a
{
color
:
#d3d3d3
!important
;
}
.list-backstepped
a
{
color
:
#d3d3d3
!important
;
.list-unpaid
,
.list-unpaid
a
{
background-color
:
#ffc6c1
;
}
.list-paid
,
.list-paid
a
{
background-color
:
#e5ffc7
;
}
.list-repaid
,
.list-repaid
a
{
background-color
:
#1bffbe
;
color
:
grey
!important
;
}
.cost-table
{
padding
:
5px
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment