[LON-CAPA-cvs] cvs: loncom /homework lonhomework.pm structuretags.pm /interface loncommon.pm
albertel
lon-capa-cvs-allow@mail.lon-capa.org
Wed, 31 Oct 2007 01:37:53 -0000
This is a MIME encoded message
--albertel1193794673
Content-Type: text/plain
albertel Tue Oct 30 21:37:53 2007 EDT
Modified files:
/loncom/interface loncommon.pm
/loncom/homework lonhomework.pm structuretags.pm
Log:
- try ot clean and compact up the edit editxml interfaces
--albertel1193794673
Content-Type: text/plain
Content-Disposition: attachment; filename="albertel-20071030213753.txt"
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.601 loncom/interface/loncommon.pm:1.602
--- loncom/interface/loncommon.pm:1.601 Mon Oct 29 21:04:21 2007
+++ loncom/interface/loncommon.pm Tue Oct 30 21:37:29 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.601 2007/10/30 01:04:21 albertel Exp $
+# $Id: loncommon.pm,v 1.602 2007/10/31 01:37:29 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -4099,7 +4099,7 @@
my $vlink = &designparm($function.'.vlink', $domain);
my $link = &designparm($function.'.link', $domain);
- my $sans = 'Arial,Helvetica,sans-serif';
+ my $sans = 'Verdana,Arial,Helvetica,sans-serif';
my $mono = 'monospace';
my $data_table_head = $tabbg;
my $data_table_light = '#EEEEEE';
@@ -5085,16 +5085,50 @@
div.LC_edit_problem_header {
font: normal medium $sans;
+ margin: 2px;
}
div.LC_edit_problem_header,
-div.LC_edit_problem_header div {
+div.LC_edit_problem_header div,
+div.LC_edit_problem_editxml_header,
+div.LC_edit_problem_editxml_header div {
margin-top: 5px;
}
+div.LC_edit_problem_header_edit_row {
+ background: $tabbg;
+ padding: 3px;
+ margin-bottom: 5px;
+}
div.LC_edit_problem_header_title {
- font: larger medium $sans;
+ font: larger bold $sans;
+ background: $tabbg;
+ padding: 3px;
+}
+table.LC_edit_problem_header_title {
+ font: larger bold $sans;
+ width: 100%;
+ border-color: $pgbg;
+ border-style: solid;
+ border-width: $border;
+
background: $tabbg;
+ border-collapse: collapse;
+ padding: 0px
+ margin: -2px;
+}
+td.LC_edit_problem_header_help {
+ text-align: right;
+}
+
+div.LC_edit_problem_discards {
+ float: left;
+ padding-bottom: 5px;
+}
+div.LC_edit_problem_saves {
+ float: right;
+ padding-bottom: 5px;
}
hr.LC_edit_problem_divide {
+ clear: both;
color: $tabbg;
background-color: $tabbg;
height: 3px;
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.279 loncom/homework/lonhomework.pm:1.280
--- loncom/homework/lonhomework.pm:1.279 Mon Oct 29 20:24:40 2007
+++ loncom/homework/lonhomework.pm Tue Oct 30 21:37:52 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Homework handler
#
-# $Id: lonhomework.pm,v 1.279 2007/10/30 00:24:40 albertel Exp $
+# $Id: lonhomework.pm,v 1.280 2007/10/31 01:37:52 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -944,16 +944,25 @@
&HTML::Entities::encode($env{'request.uri'},'<>&"').'">'.
&Apache::structuretags::remember_problem_state().'
<div class="LC_edit_problem_editxml_header">
- <input type="hidden" name="problemmode" value="'.&mt('EditXML').'" />
- <input type="submit" name="problemmode" accesskey="d" value="'.&mt('Discard Edits and View').'" />
- <input type="submit" '.&Apache::edit::submit_ask_anyway().'name="problemmode" accesskey="e" value="'.&mt('Edit').'" />
- <input type="submit" name="Undo" accesskey="u" value="'.&mt('undo').'" />
- <hr class="LC_edit_problem_divide" />
- <input type="submit" name="submit" accesskey="s" value="'.&mt('Submit Changes').'" />
- <input type="submit" name="submit" accesskey="v" value="'.&mt('Submit Changes and View').'" />
- <hr class="LC_edit_problem_divide" />
+ <table class="LC_edit_problem_header_title"><tr><td>
+ '.&mt('Problem Editing').&Apache::loncommon::help_open_topic('Problem_Editor_XML_Index').'
+ </td><td align="right">
+ '.&Apache::loncommon::helpLatexCheatsheet().'
+ </td></tr>
+ </table>
+ <div class="LC_edit_problem_discards">
+ <input type="hidden" name="problemmode" value="'.&mt('EditXML').'" />
+ <input type="submit" name="problemmode" accesskey="d" value="'.&mt('Discard Edits and View').'" />
+ <input type="submit" '.&Apache::edit::submit_ask_anyway().'name="problemmode" accesskey="e" value="'.&mt('Edit').'" />
+ <input type="submit" name="Undo" accesskey="u" value="'.&mt('undo').'" />
+ </div>
+ <div class="LC_edit_problem_saves">
+ <input type="submit" name="submit" accesskey="s" value="'.&mt('Save').'" />
+ <input type="submit" name="submit" accesskey="v" value="'.&mt('Save and View').'" />
+ </div>
+ <hr class="LC_edit_problem_divide" />
</div>
- ' . $xml_help . '
+ ' . '
<textarea '.&Apache::edit::element_change_detection().
' rows="'.$rows.'" cols="'.$cols.'" style="width:100%" '.
' name="editxmltext" id="LC_editxmltext">'.
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.407 loncom/homework/structuretags.pm:1.408
--- loncom/homework/structuretags.pm:1.407 Mon Oct 29 20:17:09 2007
+++ loncom/homework/structuretags.pm Tue Oct 30 21:37:52 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.407 2007/10/30 00:17:09 albertel Exp $
+# $Id: structuretags.pm,v 1.408 2007/10/31 01:37:52 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -302,16 +302,23 @@
sub problem_edit_header {
return '<input type="hidden" name="submitted" value="edit" />'.
&Apache::structuretags::remember_problem_state().'
+<div class="LC_edit_problem_header">
+<div class="LC_edit_problem_header_title">
+'.&mt('Problem Editing').&Apache::loncommon::help_open_menu('Problem Editing','Problem_Editor_XML_Index',5,'Authoring').'
+</div>
+<div class="LC_edit_problem_discards">
<input type="hidden" name="problemmode" value="'.&mt('Edit').'" />
<input type="submit" name="problemmode" accesskey="d" value="'.&mt('Discard Edits and View').'" />
<input '.&Apache::edit::submit_ask_anyway().' type="submit" name="problemmode" accesskey="x" value="'.&mt('EditXML').'" />
<input type="submit" name="Undo" accesskey="u" value="'.&mt('undo').'" />
- <hr class="LC_edit_problem_divide" />
- <input type="submit" name="submit" accesskey="s" value="'.&mt('Submit Changes and Edit').'" />
- <input type="submit" name="submit" accesskey="v" value="'.&mt('Submit Changes and View').'" />
- <div>'.
- &Apache::loncommon::help_open_menu('Problem Editing Help','Problem_Editor_XML_Index',5,'Authoring',undef,undef,undef,'Problem Editing Help')
- .'</div>'.
+</div>
+<div class="LC_edit_problem_saves">
+ <input type="submit" name="submit" accesskey="s" value="'.&mt('Save and Edit').'" />
+ <input type="submit" name="submit" accesskey="v" value="'.&mt('Save and View').'" />
+ </div>
+<hr class="LC_edit_problem_divide" />
+</div>
+'.
'<table border="0" width="100%"><tr><td bgcolor="#DDDDDD">';
}
@@ -336,12 +343,6 @@
my ($rndseed)=@_;
my $result .= '<div class="LC_edit_problem_header">';
- $result.='<div class="LC_edit_problem_header_edit_row">';
- $result.='<input type="hidden" name="problemmode" value="'.&mt('View').'" />';
- $result .= '<input type="submit" name="problemmode" accesskey="e" value="'.&mt('Edit').'" />';
- $result .= '<input type="submit" name="problemmode" accesskey="x" value="'.&mt('EditXML').'" />';
- $result.='</div>';
-
if (!$Apache::lonhomework::parsing_a_task) {
$result .=
'<div class="LC_edit_problem_header_title">'.
@@ -443,17 +444,25 @@
if (!$Apache::lonhomework::parsing_a_task) {
my $numtoanalyze=$env{'form.numtoanalyze'};
if (!$numtoanalyze) { $numtoanalyze=20; }
- $result .= &mt('[_1] for [_2] versions of this problem.',
- '<input type="submit" name="problemmode" value='.&mt('"Calculate answers').'" />',
- '<input type="text" name="numtoanalyze" value="'.
- $numtoanalyze.'" size="5" />').
- &Apache::loncommon::help_open_topic("Analyze_Problem",
- '',undef,undef,300);
+ $result .= '<span class="LC_nobreak">'.
+ &mt('[_1] for [_2] versions.',
+ '<input type="submit" name="problemmode" value='.&mt('"Calculate answers').'" />',
+ '<input type="text" name="numtoanalyze" value="'.
+ $numtoanalyze.'" size="5" />').
+ &Apache::loncommon::help_open_topic("Analyze_Problem",'',undef,undef,300).
+ '</span>';
+
}
$result.='
</div>
- <hr class="LC_edit_problem_divide" />
+ <div class="LC_edit_problem_header_edit_row">';
+ $result.='<input type="hidden" name="problemmode" value="'.&mt('View').'" />';
+ $result .= '<input type="submit" name="problemmode" accesskey="e" value="'.&mt('Edit').'" />';
+ $result .= '<input type="submit" name="problemmode" accesskey="x" value="'.&mt('EditXML').'" />';
+
+ $result.='
+ </div>
</div>';
return $result;
}
--albertel1193794673--