--- loncom/html/res/adm/pages/annotator/admannotations.pm 2008/09/11 20:44:54 1.28 +++ loncom/html/res/adm/pages/annotator/admannotations.pm 2009/03/20 10:04:53 1.35 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # This will take annotations and then plug them into a page. # -# $Id: admannotations.pm,v 1.28 2008/09/11 20:44:54 tempelho Exp $ +# $Id: admannotations.pm,v 1.35 2009/03/20 10:04:53 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -27,6 +27,7 @@ # ################## + package Apache::admannotations; use strict; @@ -40,8 +41,7 @@ use Apache::lonlocal; sub write_annotation { my ($symb, $enc, $annotation) = @_; - - $annotation=~s/$^\s*$//; + $annotation=~s/^\s*$//; my $key = $symb; if (!$enc) { $key = @@ -75,6 +75,12 @@ sub construct_editor { my $get_symb = &js_get_symb(); + my %lt = &Apache::lonlocal::texthash( + 'close no save' => 'Close', + 'save' => 'Save', + 'cancel' => 'Cancel', + ); + my $js = < var timeout; @@ -89,6 +95,11 @@ function changed() { } timeout=setTimeout('changed();','1000'); } + +function renameButton(){ + document.getElementById("close").value="$lt{'cancel'}"; +} + ENDJS @@ -102,20 +113,17 @@ ENDJS my $end_page = &Apache::loncommon::end_page(); - my %lt = ( 'close no save' => "Close (no save)", - 'save' => "Save and Update",); - %lt = &Apache::lonlocal::texthash(%lt); return(<
-
+
-
@@ -139,9 +147,10 @@ ENDJS {'only_body' => 1,}); my $end_page = &Apache::loncommon::end_page(); - my %lt = ( 'close' => "Close", - 'button' => $button_name,); - %lt = &Apache::lonlocal::texthash(%lt); + my %lt = &Apache::lonlocal::texthash( + 'close' => 'Close', + 'button' => $button_name, + ); return(<