--- loncom/interface/lonpreferences.pm 2012/10/04 13:41:10 1.199 +++ loncom/interface/lonpreferences.pm 2012/10/08 10:26:34 1.200 @@ -1,7 +1,7 @@ # The LearningOnline Network # Preferences # -# $Id: lonpreferences.pm,v 1.199 2012/10/04 13:41:10 bisitz Exp $ +# $Id: lonpreferences.pm,v 1.200 2012/10/08 10:26:34 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1227,12 +1227,9 @@ sub colorschanger { foreach my $item (sort(keys(%colortypes))) { my $curcol=&Apache::loncommon::designparm($function.'.'.$item,$domain); $chtable.=&Apache::loncommon::start_data_table_row(). - ''.$colortypes{$item}.'      '.&mt('Select').''. + ''.$colortypes{$item}.''. &Apache::loncommon::end_data_table_row()."\n"; } my $end_data_table = &Apache::loncommon::end_data_table(); @@ -1240,27 +1237,13 @@ sub colorschanger { my $savebutton = &mt('Save'); my $resetbutton = &mt('Reset All'); my $resetbuttondesc = &mt('Reset All Colors to Default'); + my $colorchooser=&Apache::lonhtmlcommon::color_picker(); + $r-print(' +'); $r->print(< - - $pjump_def - - function psub() { - modalWindow.close(); - if (document.parmform.pres_marker.value!='') { - if (document.parmform.pres_type.value!='') { - eval('document.prefs.'+ - document.parmform.pres_marker.value+ - '.value=document.parmform.pres_value.value;'); - } - } else { - document.parmform.pres_value.value=''; - document.parmform.pres_marker.value=''; - } - } - -
@@ -1299,6 +1282,9 @@ sub verify_and_change_colors { my $message=''; foreach my $item (keys %colortypes) { my $color=$env{'form.'.$item}; + if (!($color =~ /^#/)) { + $color = '#' . $color; + } my $entry='color.'.$function.'.'.$item; if (($color=~/^\#[0-9A-Fa-f]{6}$/) && (!$env{'form.resetall'})) { &Apache::lonnet::put('environment',{$entry => $color});