--- loncom/interface/lonspeller.pm 2005/04/07 06:56:23 1.11 +++ loncom/interface/lonspeller.pm 2006/03/23 23:43:13 1.15 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Interface routines for Aspell # -# $Id: lonspeller.pm,v 1.11 2005/04/07 06:56:23 albertel Exp $ +# $Id: lonspeller.pm,v 1.15 2006/03/23 23:43:13 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -66,12 +66,20 @@ sub textsection { my $suggestions=join(' ',$speller->suggest($word)); $suggestions=~s/\'/\\\'/gs; if (($suggestions) && (!$insidelink)) { - my $html=&Apache::lonxml::xmlbegin('encode'); + my $start_page= + &Apache::loncommon::start_page('Speller Suggestions',undef, + {'only_body' => 1, + 'js_ready' => 1, + 'html_encode' => 1, + 'bgcolor' => '#FFFFFF'}); + my $end_page= + &Apache::loncommon::end_page({'js_ready' => 1, + 'html_encode' => 1,}); $output.=''; + 'spellwin.'.&Apache::lonhtmlcommon::javascript_docopen().';spellwin.document.writeln(\''.$start_page.'

'.$word. + '

'.$suggestions.$end_page.'\');spellwin.document.close();spellwin.focus()">'; } $output.=''.$word.''; if (($suggestions) && (!$insidelink)) { $output.='
'; } @@ -128,13 +136,14 @@ sub handler { &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}); &initspeller(); - my $html=&Apache::lonxml::xmlbegin(); - $r->print($html.''. - &mt('Spell Checker'). - ''. + my $start_page = + &Apache::loncommon::start_page('Spell Checker',undef, + {'only_body' => 1, + 'bgcolor' => '#DDDDDD'}); + $r->print($start_page. &Apache::lontexconvert::msgtexconverted( &markeduptext($env{'form.text'})). - ''); + &Apache::loncommon::end_page()); return OK; }