From 501aedcaefa447d317b01199cced0e6c683dbff3 Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Sat, 18 Dec 2010 21:12:30 -0500 Subject: added error msg and grade table styles darcs-hash:20101219021230-067c0-75aa53bfdf81a02de0f994451667b60841890b43.gz --- GradeBook.css | 18 ++++++++++++++++++ GradeBook.tcl | 22 +++++++++++----------- 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 {} + puts {
} puts "" foreach col $v(*) { puts -nonewline "
$col" @@ -287,14 +287,14 @@ proc UpdateGrades { permission_list user } { db eval $sql_str } errStat2 ] if { $err2 } { - puts "the following error happen: $errStat2" + puts "
the following error happen: $errStat2
" dbg "the following error happen: $errStat2" 3 } } } errStat ] if { $err } { - puts "the following error happen: $errStat" + puts "
the following error happen: $errStat
" 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 {} + puts {
} puts "" foreach col $v(*) { puts -nonewline "" @@ -341,7 +341,7 @@ proc ChangeGrades { permission_list user } { } errStat ] puts "
$col
" if { $err } { - puts "the following error happen: $errStat" + puts "
the following error happen: $errStat
" dbg "the following error happen: $errStat" 3 } puts {} @@ -352,7 +352,7 @@ proc ChangeGrades { permission_list user } { puts "Cancel changes" } else { - puts "error: empty column names are not permitted" + puts "
error: empty column names are not permitted
" } } @@ -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 "
the following error happen: $errStat
" dbg "the following error happen: $errStat" 3 } } else { - puts "error: empty column names are not permitted" + puts "
error: empty column names are not permitted
" } } @@ -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 "
the following error happen: $errStat
" dbg "the following error happen: $errStat" 3 } } else { - puts "error: empty column names are not permitted" + puts "
error: empty column names are not permitted
" } } @@ -466,7 +466,7 @@ proc htmlStudentGrades { db user } { db eval $eval_str v { if { $show_header } { set show_header 0 - puts {} + puts {
} puts "" foreach col $v(*) { puts -nonewline "" -- cgit v1.2.3
$col