[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface/spreadsheet lonspreadsheet.pm

raeburn raeburn at source.lon-capa.org
Fri Aug 9 19:05:18 EDT 2013


raeburn		Fri Aug  9 23:05:18 2013 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface/spreadsheet	lonspreadsheet.pm 
  Log:
  - For 2.11
    - Backport 1.62, 1.63, 1.64, 1.65
  
  
Index: loncom/interface/spreadsheet/lonspreadsheet.pm
diff -u loncom/interface/spreadsheet/lonspreadsheet.pm:1.61.6.1 loncom/interface/spreadsheet/lonspreadsheet.pm:1.61.6.2
--- loncom/interface/spreadsheet/lonspreadsheet.pm:1.61.6.1	Thu May 10 20:20:07 2012
+++ loncom/interface/spreadsheet/lonspreadsheet.pm	Fri Aug  9 23:05:18 2013
@@ -1,5 +1,5 @@
 #
-# $Id: lonspreadsheet.pm,v 1.61.6.1 2012/05/10 20:20:07 raeburn Exp $
+# $Id: lonspreadsheet.pm,v 1.61.6.2 2013/08/09 23:05:18 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -345,10 +345,10 @@
     ##
     my $js;
     if ($allowed_to_edit) {
-	my %lt=(
+	my %lt=&Apache::lonlocal::texthash(
 		'ce' => 'Cell',
-		'ac' => 'Accept',
-		'dc' => 'Discard Changes'
+		'ac' => 'Save',
+		'dc' => 'Cancel'
 	);
         my $extra_javascript = 
             &Apache::loncommon::browser_and_searcher_javascript();
@@ -377,14 +377,14 @@
         // cellformula may contain less-than and greater-than symbols, so
         // we need to escape them?  
         edit_text +='$cell_edit_start';
-        edit_text += '<form name="editwinform">';
+        edit_text += '<form name="editwinform" action="">';
         edit_text += '<center><h3>$lt{'ce'} '+cellname+'</h3>';
         edit_text += '<textarea id="LC_newformula" name="newformula" ';
         edit_text += ' cols="60" rows="12"; wrap="off" style="width:100%">';
 	edit_text += cellformula+'</textarea>';
         edit_text += '<div id="LC_aftertextarea"><br />';
         edit_text += '<input type="button" name="accept" value="$lt{'ac'}"';
-        edit_text += ' onClick=\\\'javascript:';
+        edit_text += ' onclick=\\\'javascript:';
         edit_text += 'opener.document.sheet.cell.value=';
         edit_text +=     '"'+cellname+'";';
         edit_text += 'opener.document.sheet.newformula.value=';
@@ -394,7 +394,7 @@
         edit_text += '      ';
         edit_text += '<input type="button" name="abort" ';
         edit_text +=     'value="$lt{'dc'}"';
-        edit_text += ' onClick="javascript:self.close()" />';
+        edit_text += ' onclick="javascript:self.close()" />';
         edit_text += '</center></div></form>$cell_edit_end';
 
         if (editwin != null && !(editwin.closed) ) {
@@ -532,14 +532,11 @@
                   '</td>'.
                   '<td valign="center">'.$html."</td></tr></table>\n");
         if ($action_message ne '') {
-            $r->print(<<END);
-<table>
-<tr><td valign="top"><b>Last Action:</b></td>
-    <td> </td>
-    <td>$action_message</td>
-</tr>
-</table>
-END
+            $r->print(
+                &Apache::loncommon::confirmwrapper(
+                    &mt('Last Action:')
+                   .$action_message)
+            );
         }
         $r->rflush();
     } else {
@@ -555,13 +552,13 @@
     if ($allowed_to_view) {
         $r->print('<td>'.
                   &Apache::loncommon::help_open_topic("Spreadsheet_About",
-                                                      'Spreadsheet Help').
+                                                      &mt('Spreadsheet Help')).
                   '</td>');
     }
     if ($allowed_to_edit) {
         $r->print('<td>'.
                   &Apache::loncommon::help_open_topic("Spreadsheet_Editing",
-                                                      'Editing Help').
+                                                      &mt('Editing Help')).
                   '</td>');
     }
     $r->print('</tr></table>');




More information about the LON-CAPA-cvs mailing list