[LON-CAPA-cvs] cvs: loncom /homework edit.pm matchresponse.pm radiobuttonresponse.pm /interface loncommon.pm

bisitz bisitz at source.lon-capa.org
Thu Apr 25 13:58:40 EDT 2013


bisitz		Thu Apr 25 17:58:40 2013 EDT

  Modified files:              
    /loncom/homework	edit.pm matchresponse.pm radiobuttonresponse.pm 
    /loncom/interface	loncommon.pm 
  Log:
  Improved spacing in colorful editor:
  - More and consistent spacing between options
  - Minimize missunderstanding to which element a help icon belongs to
  - Less needed total window width in editor
  
  
  
Index: loncom/homework/edit.pm
diff -u loncom/homework/edit.pm:1.142 loncom/homework/edit.pm:1.143
--- loncom/homework/edit.pm:1.142	Tue Aug  7 14:54:10 2012
+++ loncom/homework/edit.pm	Thu Apr 25 17:58:32 2013
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # edit mode helpers
 #
-# $Id: edit.pm,v 1.142 2012/08/07 14:54:10 raeburn Exp $
+# $Id: edit.pm,v 1.143 2013/04/25 17:58:32 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -946,7 +946,7 @@
 	    $text=$option;
 	    $value='value="'.$option.'"';
 	}
-	$result.='<span class="LC_nobreak"><label><input type="checkbox" '.$value.' name="'.
+        $result.=' <span class="LC_edit_opt"><label><input type="checkbox" '.$value.' name="'.
 	    &html_element_name($name).'"';
 	foreach my $selected (split(/,/,$allselected)) {
 	    if ( $selected eq $option ) {
@@ -970,7 +970,7 @@
 	$result .= 'class="' . $class . '" ';
     }
     $result .=	&element_change_detection().'/>';
-    return '<span class="LC_nobreak">'.$result.'</span>';
+    return ' <span class="LC_edit_opt">'.$result.'</span>';
 }
 
 sub select_arg {
@@ -996,7 +996,7 @@
 	    }
         }
     }
-    $result.='<span class="LC_nobreak">'.&mt($description).' <select name="'.
+    $result.=' <span class="LC_edit_opt">'.&mt($description).' <select name="'.
 	&html_element_name($name).'" '.&element_change_detection().' >
        '.$optionlist.'
       </select></span>';
@@ -1047,7 +1047,7 @@
     $description=&mt($description);
 #
     return (<<ENDSELECTORTYPE);
-<span class="LC_nobreak">
+ <span class="LC_edit_opt">
 $description
  <select name="$selectelement"
 onChange="if ($selectedvalue!='TYPEDINVALUE') { $hiddenvalue=$selectedvalue; $typedinvalue=''; }" >
Index: loncom/homework/matchresponse.pm
diff -u loncom/homework/matchresponse.pm:1.87 loncom/homework/matchresponse.pm:1.88
--- loncom/homework/matchresponse.pm:1.87	Sat Dec 29 01:21:10 2012
+++ loncom/homework/matchresponse.pm	Thu Apr 25 17:58:32 2013
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Full matching style response
 #
-# $Id: matchresponse.pm,v 1.87 2012/12/29 01:21:10 raeburn Exp $
+# $Id: matchresponse.pm,v 1.88 2013/04/25 17:58:32 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -104,15 +104,15 @@
     if ($target eq 'edit') {
 	$result=&Apache::edit::tag_start($target,$token);
 	$result.=&Apache::edit::select_arg('Randomize Order:','randomize',
-					   ['yes','no'],$token).' 'x 3;
+					   ['yes','no'],$token);
 	$result.=&Apache::edit::select_arg('Items Display Location:',
 					   'location',
 					   ['top','bottom','left','right'],
-					   $token).' 'x 3;
+					   $token);
 	$result.=&Apache::edit::select_arg('Items Display Direction:',
 					   'direction',
 					   ['vertical','horizontal'],
-					   $token).' 'x 3;
+					   $token);
         $result.=&Apache::edit::select_arg('Items Columns:',
                                            'columns',
                                            [['','default'],'1','2','3','4'],
@@ -262,7 +262,7 @@
 	$result=&Apache::edit::tag_start($target,$token,"Item");
 	$result.=&Apache::edit::text_arg('Name:','name',$token);
 	if ($randomize ne 'no') {
-	    $result.=' 'x 3 .
+	    $result.=
                      &Apache::edit::select_arg('Location:','location',
 					       ['random','top','bottom'],
 					       $token);
Index: loncom/homework/radiobuttonresponse.pm
diff -u loncom/homework/radiobuttonresponse.pm:1.155 loncom/homework/radiobuttonresponse.pm:1.156
--- loncom/homework/radiobuttonresponse.pm:1.155	Fri Feb 10 00:26:42 2012
+++ loncom/homework/radiobuttonresponse.pm	Thu Apr 25 17:58:32 2013
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # mutliple choice style responses
 #
-# $Id: radiobuttonresponse.pm,v 1.155 2012/02/10 00:26:42 foxr Exp $
+# $Id: radiobuttonresponse.pm,v 1.156 2013/04/25 17:58:32 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -90,9 +90,9 @@
            .&Apache::edit::start_spanning_row();
 	$result.=
 	    &Apache::edit::text_arg('Max Number Of Shown Foils:','max',
-				    $token,'4').' 'x 3 .
+				    $token,'4').
 	    &Apache::edit::select_arg('Randomize Foil Order:','randomize',
-				      ['yes','no'],$token).' 'x 3 .
+				      ['yes','no'],$token).
 	    &Apache::edit::select_arg('Display Direction:','direction',
 				      ['vertical','horizontal'],$token).
 				      &Apache::edit::end_row().
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1123 loncom/interface/loncommon.pm:1.1124
--- loncom/interface/loncommon.pm:1.1123	Wed Apr 24 02:43:59 2013
+++ loncom/interface/loncommon.pm	Thu Apr 25 17:58:40 2013
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1123 2013/04/24 02:43:59 raeburn Exp $
+# $Id: loncommon.pm,v 1.1124 2013/04/25 17:58:40 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -6480,6 +6480,11 @@
   padding-bottom: 5px;
 }
 
+.LC_edit_opt {
+  padding-left: 1em;
+  white-space: nowrap;
+}
+
 img.stift {
   border-width: 0;
   vertical-align: middle;




More information about the LON-CAPA-cvs mailing list