[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm loncoursegroups.pm /localize/localize de.pm
bisitz
bisitz@source.lon-capa.org
Thu, 07 May 2009 15:25:44 -0000
This is a MIME encoded message
--bisitz1241709944
Content-Type: text/plain
bisitz Thu May 7 15:25:44 2009 EDT
Modified files:
/loncom/interface loncommon.pm loncoursegroups.pm
/loncom/localize/localize de.pm
Log:
Optimized and corrected group settings step 1:
- Replaced hardcoded table by standard pick_box
- Removed now unused special styles (in progress)
- Added padding to topic_bar
- Script code: Added some comments and line breaks for better readability
- Optimized and corrected collaborative tools table:
- Same amount of columns now
- Repaired row closures
- Optimized no-wrap for each tooltext-checkbox-combination
- Got rid of dummy columns to get proper padding
- Re-use same code for column split instead of two code blocks
- Moved "(un)check all" buttons to standard place at top of table
- Added info style to allocate disk quota message
(work in progress)
--bisitz1241709944
Content-Type: text/plain
Content-Disposition: attachment; filename="bisitz-20090507152544.txt"
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.804 loncom/interface/loncommon.pm:1.805
--- loncom/interface/loncommon.pm:1.804 Wed May 6 16:19:34 2009
+++ loncom/interface/loncommon.pm Thu May 7 15:25:37 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.804 2009/05/06 16:19:34 bisitz Exp $
+# $Id: loncommon.pm,v 1.805 2009/05/07 15:25:37 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -5406,6 +5406,7 @@
background: $tabbg;
vertical-align: middle;
margin: 2ex 0ex 2ex 0ex;
+ padding: 3px;
}
.LC_topic_bar span {
@@ -5426,12 +5427,6 @@
padding: 4px;
}
-table.LC_descriptive_input td.LC_description {
- vertical-align: top;
- text-align: right;
- font-weight: bold;
-}
-
div.LC_feedback_link {
clear: both;
background: white;
Index: loncom/interface/loncoursegroups.pm
diff -u loncom/interface/loncoursegroups.pm:1.96 loncom/interface/loncoursegroups.pm:1.97
--- loncom/interface/loncoursegroups.pm:1.96 Sun Mar 8 21:49:33 2009
+++ loncom/interface/loncoursegroups.pm Thu May 7 15:25:37 2009
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: loncoursegroups.pm,v 1.96 2009/03/08 21:49:33 weissno Exp $
+# $Id: loncoursegroups.pm,v 1.97 2009/05/07 15:25:37 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1612,33 +1612,34 @@
'lett' => 'Letters, numbers and underscore only',
'doyo' => 'Different subsets of the chosen collaborative tools '.
'for different group members?',
+ 'gran' => 'Granularity',
+ 'dquo' => 'Disk quota',
);
my ($crsquota,$freespace,$maxposs) = &get_quota_constraints($action,$stored);
- $r->print(&Apache::lonhtmlcommon::topic_bar($image,$lt{'gnde'}).'
- <table class="LC_descriptive_input">
- <tr>
- <td class="LC_description">'.$lt{'gnam'}.':</td>
- <td colspan="5">
-');
+ $r->print(&Apache::lonhtmlcommon::topic_bar($image,$lt{'gnde'}));
+
+ # Group Name
+ $r->print(&Apache::lonhtmlcommon::start_pick_box()
+ .&Apache::lonhtmlcommon::row_title($lt{'gnam'})
+ );
if ($action eq 'create') {
- $r->print('<input type="text" name="groupname" size="25" /> ('.
- $lt{'lett'}.')');
+ $r->print('<input type="text" name="groupname" size="25" />'
+ .' <span class="LC_nobreak">('
+ .$lt{'lett'}.')</span>'
+ );
} else {
$r->print('<input type="hidden" name="groupname" value="'.
$env{'form.groupname'}.'" />'.$env{'form.groupname'});
}
- $r->print(<<"END");
- </td>
- <tr>
- <tr>
- <td class="LC_description">$lt{'desc'}:</td>
- <td colspan="5"><input type="text" name="description" size="40"
- value="" />
- </td>
- <tr>
- <tr>
- <td class="LC_description">$lt{'func'}:</td>
-END
+ $r->print(&Apache::lonhtmlcommon::row_closure());
+
+ # Group Title
+ $r->print(&Apache::lonhtmlcommon::row_title($lt{'desc'})
+ .'<input type="text" name="description" size="40" value="" />'
+ .&Apache::lonhtmlcommon::row_closure()
+ );
+
+ # Collaborative Tools
my $numitems = keys(%{$functions});
my $halfnum = int($numitems/2);
my $remnum = $numitems%2;
@@ -1646,48 +1647,61 @@
$halfnum ++;
}
my @allfunctions = sort(keys (%{$functions}));
- for (my $i=0; $i<$halfnum; $i++) {
- $r->print('<td><label><input type="checkbox" name="tool" value="'.
- $allfunctions[$i].'" /> '.
- &mt($$functions{$allfunctions[$i]}).'</label></td>
- <td> </td><td> </td>');
- }
- $r->print('<td><input type="button" value="'.&mt('check all').'" '.
- 'onclick="javascript:checkAll(document.'.$formname.'.tool)" />'.
- '</td></tr><tr><td> </td>');
- for (my $j=$halfnum; $j<@allfunctions; $j++) {
- $r->print('<td><label><input type="checkbox" name="tool" value="'.
- $allfunctions[$j].'" /> '.
- &mt($$functions{$allfunctions[$j]}).'</label></td>
- <td> </td><td> </td>');
- }
- if ($remnum) {
- $r->print('<td> </td>');
+
+ $r->print(&Apache::lonhtmlcommon::row_title($lt{'func'})
+ .'<div>'
+ .'<input type="button" value="'.&mt('check all').'"'
+ .' onclick="javascript:checkAll(document.'.$formname.'.tool)" />'
+ .' <input type="button" value="'.&mt('uncheck all').'"'
+ .' onclick="javascript:uncheckAll(document.'.$formname.'.tool)" />'
+ .'</div>'
+ .'<table cellpadding="5px"><tr>' # FIXME Get rid of inflexible table (-> float)
+ );
+ for (my $i=0; $i<@allfunctions; $i++) {
+ $r->print('<td><label><span class="LC_nobreak">'
+ .'<input type="checkbox" name="tool" value="'
+ .$allfunctions[$i].'" /> '
+ .&mt($$functions{$allfunctions[$i]})
+ .'</span></label></td>'
+ );
+ if ($i == $halfnum - 1) {
+ $r->print('</tr><tr>');
+ }
}
- $r->print('
- <td>
- <input type="button" value="'.&mt('uncheck all').'"
- onclick="javascript:uncheckAll(document.'.$formname.'.tool)" />
- </td>
- </tr>
- <tr>
- <td class="LC_description">'.&mt('Granularity:').'</td>
- <td colspan="10">'.$lt{'doyo'}.' <label><input type="radio" name="granularity" value="Yes" />'.&mt('Yes').'</label> <label><input type="radio" name="granularity" value="No" checked="checked" />'.&mt('No').'</label>');
+ $r->print('</tr></table>'
+ .&Apache::lonhtmlcommon::row_closure()
+ );
+
+ # Granularity
+ $r->print(&Apache::lonhtmlcommon::row_title($lt{'gran'})
+ .$lt{'doyo'}.'<br />'
+ .'<label>'
+ .'<input type="radio" name="granularity" value="Yes" />'.&mt('Yes')
+ .'</label> <label>'
+ .'<input type="radio" name="granularity" value="No" checked="checked" />'.&mt('No')
+ .'</label>'
+ );
if ($action eq 'modify') {
- $r->print(' ('.&mt('Currently set to [_1].'
- ,'"'.&mt($$stored{'granularity'}).'"').')');
+ $r->print(' <span class="LC_nobreak">('
+ .&mt('Currently set to [_1].'
+ ,'"'.&mt($$stored{'granularity'}).'"')
+ .')</span>'
+ );
}
- $r->print('
- </td>
- </tr>
- <tr>
- <td class="LC_description">'.&mt('Disk quota: ').'</td><td colspan="10">');
+ $r->print(&Apache::lonhtmlcommon::row_closure());
+
+ # Disk Quota
+ $r->print(&Apache::lonhtmlcommon::row_title($lt{'dquo'}));
if ($action eq 'create') {
- $r->print(&mt('If you enable the group portfolio for the '.$gpterm.', allocate a disk quota.'));
+ $r->print('<span class="LC_info">'
+ .&mt('If you enable the group portfolio for the '.$gpterm
+ .', allocate a disk quota.')
+ .'</span>'
+ );
} else {
$r->print(&mt('Quota allocated to group portfolio:'));
}
- $r->print(' '.&mt('[_1] Mb','<input type="text" name="quota" size="4" />'));
+ $r->print(' '.&mt('[_1] Mb','<input type="text" name="quota" size="4" />'));
if ($action eq 'create') {
$r->print('<br />'
.&mt('A total of [_1] Mb can be divided amongst all '.$gpterm.'s in the '
@@ -1703,11 +1717,10 @@
.'by adding all unallocated space for '.$gpterm.'s in the '.lc($crstype).'.'
,sprintf("%.2f",$maxposs)));
}
- $r->print('
- </td>
- </tr>
- </table>
-');
+ $r->print(&Apache::lonhtmlcommon::row_closure(1));
+
+ $r->print(&Apache::lonhtmlcommon::end_pick_box());
+
return;
}
Index: loncom/localize/localize/de.pm
diff -u loncom/localize/localize/de.pm:1.289 loncom/localize/localize/de.pm:1.290
--- loncom/localize/localize/de.pm:1.289 Thu May 7 12:42:17 2009
+++ loncom/localize/localize/de.pm Thu May 7 15:25:43 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# German Localization Lexicon
#
-# $Id: de.pm,v 1.289 2009/05/07 12:42:17 bisitz Exp $
+# $Id: de.pm,v 1.290 2009/05/07 15:25:43 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -10433,8 +10433,8 @@
'Different subsets of the chosen collaborative tools for different group members?'
=> 'Unterschiedliche Teilbereiche der gewählten kollaborativen Werkzeuge für unterschiedliche Gruppenmitglieder?',
- 'Disk quota: '
-=> 'Speicherplatz: ',
+ 'Disk Quota'
+=> 'Speicherplatz',
'If you enable the group portfolio for the group, allocate a disk quota.'
=> 'Falls Sie das Gruppen-Portfolio für die Gruppe aktivieren, weisen Sie Speicherplatz zu:',
--bisitz1241709944--