[LON-CAPA-cvs] cvs: loncom /interface courseprefs.pm loncommon.pm lonconfigsettings.pm

www www@source.lon-capa.org
Sun, 05 Jun 2011 12:59:47 -0000


www		Sun Jun  5 12:59:47 2011 EDT

  Modified files:              
    /loncom/interface	courseprefs.pm loncommon.pm lonconfigsettings.pm 
  Log:
  Cleaning up accordion
  
  
Index: loncom/interface/courseprefs.pm
diff -u loncom/interface/courseprefs.pm:1.44 loncom/interface/courseprefs.pm:1.45
--- loncom/interface/courseprefs.pm:1.44	Sat Jan 15 03:10:54 2011
+++ loncom/interface/courseprefs.pm	Sun Jun  5 12:59:47 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set configuration settings for a course
 #
-# $Id: courseprefs.pm,v 1.44 2011/01/15 03:10:54 www Exp $
+# $Id: courseprefs.pm,v 1.45 2011/06/05 12:59:47 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -544,11 +544,16 @@
     my $itemtext = $item->{'itemtext'};
     my $rowtotal = 0;
     my $output =
-        '<h3><a href="#">'.&mt($item->{text}).'</a></h3>
-        <div>&nbsp;<span style="float:right">'.
-         &Apache::loncommon::help_open_topic($item->{'help'}).'</span>';
+         '<table class="LC_nested_outer">
+          <tr>
+           <th align="left" valign="middle"><span class="LC_nobreak" style="font-size: larger;" >'.
+           &mt($item->{text}).'&nbsp;'.
+           &Apache::loncommon::help_open_topic($item->{'help'}).'</span></th>'."\n".
+          '</tr>';
     if (($action eq 'feedback') || ($action eq 'classlists')) {
         $output .= '
+          <tr>
+           <td>
             <table class="LC_nested">';   
         if (exists $item->{'header'}->[0]->{'col1'} || 
             exists $item->{'header'}->[0]->{'col2'}) {
@@ -566,6 +571,10 @@
         }
         $output .= '
            </table>
+          </td>
+         </tr>
+         <tr>
+          <td>
             <table class="LC_nested">
              <tr class="LC_info_row">
               <td class="LC_left_item">'.&mt($item->{'header'}->[1]->{'col1'}).'</td>';
@@ -576,6 +585,10 @@
             $output .= &print_classlists('middle',$cdom,$settings,$itemtext,\$rowtotal,$crstype).
                        '
             </table>
+           </td>
+          </tr>
+          <tr>
+           <td>
             <table class="LC_nested">';
             if (exists $item->{'header'}->[2]->{'col1'} || 
             	exists $item->{'header'}->[2]->{'col2'}) {
@@ -588,6 +601,8 @@
         }
     } else {
         $output .= '
+          <tr>
+           <td>
             <table class="LC_nested">';
         if (exists $item->{'header'}->[0]->{'col1'} || 
             exists $item->{'header'}->[0]->{'col2'}) {
@@ -624,7 +639,9 @@
     }
     $output .= '
    </table>
-</div>';
+  </td>
+ </tr>
+</table><br />';
     return ($output,$rowtotal);
 }
 
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1008 loncom/interface/loncommon.pm:1.1009
--- loncom/interface/loncommon.pm:1.1008	Fri Jun  3 13:00:39 2011
+++ loncom/interface/loncommon.pm	Sun Jun  5 12:59:47 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1008 2011/06/03 13:00:39 www Exp $
+# $Id: loncommon.pm,v 1.1009 2011/06/05 12:59:47 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -5209,14 +5209,6 @@
   width: 100%;
 }
 
-.ui-accordion,
-.ui-accordion table.LC_data_table,
-.ui-accordion table.LC_nested_outer{
-  border: 0px;
-  border-spacing: 0px;
-  margin: 3px;
-}
-
 table.LC_data_table tr th,
 table.LC_calendar tr th,
 table.LC_prior_tries tr th,
@@ -5332,22 +5324,6 @@
   text-align: right;
 }
 
-.ui-accordion table.LC_nested tr.LC_odd_row td.LC_left_item,
-.ui-accordion table.LC_nested tr.LC_even_row td.LC_left_item {
-  text-align: right;
-  width: 40%;
-  padding-right:10px;
-  vertical-align: top;
-  padding: 5px;
-}
-
-.ui-accordion table.LC_nested tr.LC_odd_row td.LC_right_item,
-.ui-accordion table.LC_nested tr.LC_even_row td.LC_right_item {
-  text-align: left;
-  width: 60%;
-  padding: 2px 4px;
-}
-
 table.LC_nested tr.LC_odd_row td {
   background-color: #EEEEEE;
 }
@@ -6576,12 +6552,6 @@
   line-height: 150%;
 }
 
-.ui-accordion .LC_advanced_toggle {
-  float: right;
-  font-size: 90%;
-  padding: 0px 4px
-}
-
 .LC_hidden {
   display: none;
 }
Index: loncom/interface/lonconfigsettings.pm
diff -u loncom/interface/lonconfigsettings.pm:1.18 loncom/interface/lonconfigsettings.pm:1.19
--- loncom/interface/lonconfigsettings.pm:1.18	Thu Mar 31 15:35:54 2011
+++ loncom/interface/lonconfigsettings.pm	Sun Jun  5 12:59:47 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set domain-wide configuration settings
 #
-# $Id: lonconfigsettings.pm,v 1.18 2011/03/31 15:35:54 raeburn Exp $
+# $Id: lonconfigsettings.pm,v 1.19 2011/06/05 12:59:47 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -35,7 +35,6 @@
 use Apache::loncommon();
 use Apache::lonhtmlcommon();
 use Apache::lonlocal;
-use Apache::lonparmset();
 
 sub print_header {
     my ($r,$phase,$context,$jscript) = @_;
@@ -120,9 +119,6 @@
     }
     $r->print(&Apache::loncommon::start_page($pagetitle,$js,$additem));
     $r->print(&Apache::lonhtmlcommon::breadcrumbs($brcrumtitle));
-    if ($context eq 'course') {
-        &Apache::lonparmset::startSettingsScreen($r,'coursepref');
-    }
     $r->print('
 <form name="parmform" action="">
 <input type="hidden" name="pres_marker" />
@@ -136,7 +132,7 @@
 }
 
 sub print_footer {
-    my ($r,$context,$phase,$newphase,$button_text,$actions) = @_;
+    my ($r,$phase,$newphase,$button_text,$actions) = @_;
     $button_text = &mt($button_text);
     $r->print('<input type="hidden" name="phase" value="" />');
     if (defined($env{'form.origin'})) {
@@ -163,11 +159,7 @@
                   $button_text.'" onclick='.$onclick.' /></p>');
     }
     if ($phase eq 'process') {
-        $r->print('</form>');
-        if ($context eq 'course') {
-            &Apache::lonparmset::endSettingsScreen($r);
-        }
-        $r->print(&Apache::loncommon::end_page());
+        $r->print('</form>'.&Apache::loncommon::end_page());
     }
     return;
 }
@@ -237,7 +229,7 @@
     if ($context eq 'course') {
         $footer_text = 'Back to display/edit settings'; 
     }
-    &print_footer($r,$context,$phase,'display',$footer_text,\@actions);
+    &print_footer($r,$phase,'display',$footer_text,\@actions);
     $r->print('</p>');
 }
 
@@ -282,7 +274,7 @@
                 $r->print($output{$items[$i]});
             }
             $r->print('</div>');
-            $r->print(&print_footer($r,$context,$phase,'process','Save Changes',\@actions));
+            $r->print(&print_footer($r,$phase,'process','Save Changes',\@actions));
         } else {
             $r->print('<input type="hidden" name="phase" value="" />'.
                       '<span class="LC_error">'.&mt('No settings chosen').
@@ -290,34 +282,6 @@
         }
         $r->print('</form>');
     }
-    if ($context eq 'course') {
-    	$r->print('
-<script type="text/javascript">
-	$(document).ready(function(){
-		$("#prefs").accordion({
-			autoHeight: false
-		});
-		if ($(".LC_nested tr.advanced").get(0)) {
-			$(".LC_nested tr.advanced").each(function() {
-				$(this).hide();
-				p = $(this).parents("div.ui-accordion-content")
-				if (p.find(".LC_advanced_toggle").length) {
-					return;
-				}
-				p.prepend("<span class=\'LC_advanced_toggle\'><input type=\"checkbox\"/>Show advanced options</span>");
-			});
-			$(".LC_advanced_toggle input").change(function() {
-				if($(this).is(":checked")) {
-					$(this).parents("div.ui-accordion-content").find("tr.advanced").fadeIn("normal");
-				} else {
-					$(this).parents("div.ui-accordion-content").find("tr.advanced").fadeOut("normal");		
-				}
-			});
-		}
-	});
-</script>
-');
-    }
     $r->print(&Apache::loncommon::end_page());
     return;
 }
@@ -372,7 +336,7 @@
         }
         $r->print('</div><br clear="all" />');
     }
-    $r->print(&print_footer($r,$context,$phase,'display','Display'));
+    $r->print(&print_footer($r,$phase,'display','Display'));
     $r->print('</form>');
     $r->print(&Apache::loncommon::end_page());
     return;