aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2010-12-18 21:12:30 -0500
committerEugeniy Mikhailov <evgmik@gmail.com>2010-12-18 21:12:30 -0500
commit501aedcaefa447d317b01199cced0e6c683dbff3 (patch)
tree29f0227141725b4565ada3fbfb60e98d87432ecc
parenta008bb25da7f9be158f00ee070fe269a275c999f (diff)
downloadGradeBook-501aedcaefa447d317b01199cced0e6c683dbff3.tar.gz
GradeBook-501aedcaefa447d317b01199cced0e6c683dbff3.zip
added error msg and grade table styles
darcs-hash:20101219021230-067c0-75aa53bfdf81a02de0f994451667b60841890b43.gz
-rw-r--r--GradeBook.css18
-rwxr-xr-xGradeBook.tcl22
2 files changed, 29 insertions, 11 deletions
diff --git a/GradeBook.css b/GradeBook.css
index ec8411c..4e2454b 100644
--- a/GradeBook.css
+++ b/GradeBook.css
@@ -41,6 +41,24 @@ div.controls {
margin-bottom: 15px;
}
+table.gradestable {
+ /*border-bottom: 2px solid black;*/
+ background-color: #ffcc99;
+ padding-top: 5px;
+ padding-bottom: 5px;
+ margin-bottom: 15px;
+}
+
+div.errormsg {
+ /*border-bottom: 2px solid black;*/
+ background-color: #ff0000;
+ padding-top: 5px;
+ padding-bottom: 5px;
+ margin-bottom: 15px;
+}
+
+
+
div.footer {
/*border-bottom: 2px solid black;*/
background-color: #ffcc99;
diff --git a/GradeBook.tcl b/GradeBook.tcl
index 4bc6eef..339552c 100755
--- a/GradeBook.tcl
+++ b/GradeBook.tcl
@@ -109,7 +109,7 @@ proc htmlDBout {db permission_list {sort_col {}}} {
db eval $eval_str v {
if { $show_header } {
set show_header 0
- puts {<table border="1">}
+ puts {<table class="gradestable" border="1">}
puts "<tr>"
foreach col $v(*) {
puts -nonewline "<th><a href=$script_name?action=sort&sortCol=$col>$col</a>"
@@ -287,14 +287,14 @@ proc UpdateGrades { permission_list user } {
db eval $sql_str
} errStat2 ]
if { $err2 } {
- puts "the following error happen: $errStat2"
+ puts "<div class=\"errormsg\">the following error happen: $errStat2</div>"
dbg "the following error happen: $errStat2" 3
}
}
} errStat ]
if { $err } {
- puts "the following error happen: $errStat"
+ puts "<div class=\"errormsg\">the following error happen: $errStat</div>"
dbg "the following error happen: $errStat" 3
}
}
@@ -317,7 +317,7 @@ proc ChangeGrades { permission_list user } {
db eval $eval_str v {
if { $show_header } {
set show_header 0
- puts {<table border="1">}
+ puts {<table class="gradestable" border="1">}
puts "<tr>"
foreach col $v(*) {
puts -nonewline "<th>$col</th>"
@@ -341,7 +341,7 @@ proc ChangeGrades { permission_list user } {
} errStat ]
puts "</table>"
if { $err } {
- puts "the following error happen: $errStat"
+ puts "<div class=\"errormsg\">the following error happen: $errStat</div>"
dbg "the following error happen: $errStat" 3
}
puts {<input type="hidden" name="action" value="updategrades"/>}
@@ -352,7 +352,7 @@ proc ChangeGrades { permission_list user } {
puts "<a href=\"$script_name\">Cancel changes</a>"
} else {
- puts "error: empty column names are not permitted"
+ puts "<div class=\"errormsg\">error: empty column names are not permitted</div>"
}
}
@@ -381,11 +381,11 @@ proc DeleteColumn { permission_list user } {
COMMIT;"
set err [catch {db eval $eval_str } errStat]
if { $err } {
- puts "the following error happen: $errStat"
+ puts "<div class=\"errormsg\">the following error happen: $errStat</div>"
dbg "the following error happen: $errStat" 3
}
} else {
- puts "error: empty column names are not permitted"
+ puts "<div class=\"errormsg\">error: empty column names are not permitted</div>"
}
}
@@ -398,12 +398,12 @@ proc AddColumn { permission_list user } {
set eval_str [concat ALTER TABLE GradesTable ADD \"$columnname2add\" real]
set err [catch {db eval $eval_str } errStat]
if { $err } {
- puts "the following error happen: $errStat"
+ puts "<div class=\"errormsg\">the following error happen: $errStat</div>"
dbg "the following error happen: $errStat" 3
}
} else {
- puts "error: empty column names are not permitted"
+ puts "<div class=\"errormsg\">error: empty column names are not permitted</div>"
}
}
@@ -466,7 +466,7 @@ proc htmlStudentGrades { db user } {
db eval $eval_str v {
if { $show_header } {
set show_header 0
- puts {<table border="1">}
+ puts {<table class="gradestable" border="1">}
puts "<tr>"
foreach col $v(*) {
puts -nonewline "<th>$col</th>"