[LON-CAPA-cvs] cvs: loncom /homework edit.pm

raeburn raeburn@source.lon-capa.org
Wed, 10 Dec 2008 21:02:01 -0000


raeburn		Wed Dec 10 21:02:01 2008 EDT

  Modified files:              
    /loncom/homework	edit.pm 
  Log:
  - Replace <nobr> with <span class="LC_nobreak">
  
  
Index: loncom/homework/edit.pm
diff -u loncom/homework/edit.pm:1.118 loncom/homework/edit.pm:1.119
--- loncom/homework/edit.pm:1.118	Tue Nov 18 19:14:28 2008
+++ loncom/homework/edit.pm	Wed Dec 10 21:02:01 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # edit mode helpers
 #
-# $Id: edit.pm,v 1.118 2008/11/18 19:14:28 jms Exp $
+# $Id: edit.pm,v 1.119 2008/12/10 21:02:01 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -842,15 +842,15 @@
 	    $text=$option;
 	    $value='value="'.$option.'"';
 	}
-	$result.="<nobr><label><input type=\"checkbox\" $value name=\"".
-	    &html_element_name($name)."\"";
+	$result.='<span class="LC_nobreak"><label><input type="checkbox" '.$value.' name="'.
+	    &html_element_name($name).'"';
 	foreach my $selected (split(/,/,$allselected)) {
 	    if ( $selected eq $option ) {
-		$result.=" checked=\"checked\" ";
+		$result.=' checked="checked" ';
 		last;
 	    }
 	}
-	$result.=&element_change_detection()." />$text</label></nobr>\n";
+	$result.=&element_change_detection().' />'.$text.'</label></span>'."\n";
     }
     return $result;
 }
@@ -863,7 +863,7 @@
     $result=&mt($description).'&nbsp;<input name="'.&html_element_name($name).
 	'" type="text" value="'.$arg.'" size="'.$size.'" '.
 	&element_change_detection().'/>';
-    return '<nobr>'.$result.'</nobr>';
+    return '<span class="LC_nobreak">'.$result.'</span>';
 }
 
 sub select_arg {
@@ -887,10 +887,10 @@
 	    $optionlist.="<option $value >".&mt($text)."</option>\n";
 	}
     }
-    $result.='<nobr>'.&mt($description).'&nbsp;<select name="'.
+    $result.='<span class="LC_nobreak>'.&mt($description).'&nbsp;<select name="'.
 	&html_element_name($name).'" '.&element_change_detection().' >
        '.$optionlist.'
-      </select></nobr>';
+      </select></span>';
     return $result;
 }
 
@@ -936,7 +936,7 @@
     $description=&mt($description);
 #
     return (<<ENDSELECTORTYPE);
-<nobr>
+<span class="LC_nobreak">
 $description
 &nbsp;<select name="$selectelement"
 onChange="if ($selectedvalue!='TYPEDINVALUE') { $hiddenvalue=$selectedvalue; $typedinvalue=''; }" >
@@ -947,7 +947,7 @@
 onChange="$hiddenvalue=$typedinvalue;"
 onFocus="$selectedindex=$selecttypeinindex-1;" />
 <input type="hidden" name="$element" value="$selected" $change_code />
-</nobr>
+</span>
 ENDSELECTORTYPE
 }