[LON-CAPA-cvs] cvs: loncom /xml scripttag.pm

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 10 Dec 2003 22:11:56 -0000


albertel		Wed Dec 10 17:11:56 2003 EDT

  Modified files:              
    /loncom/xml	scripttag.pm 
  Log:
  -<window> needs to advertise it's attributes
  
  
Index: loncom/xml/scripttag.pm
diff -u loncom/xml/scripttag.pm:1.104 loncom/xml/scripttag.pm:1.105
--- loncom/xml/scripttag.pm:1.104	Thu Oct 30 15:57:28 2003
+++ loncom/xml/scripttag.pm	Wed Dec 10 17:11:56 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # <script> definiton
 #
-# $Id: scripttag.pm,v 1.104 2003/10/30 20:57:28 albertel Exp $
+# $Id: scripttag.pm,v 1.105 2003/12/10 22:11:56 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -287,14 +287,25 @@
 }
 
 sub start_window {
-  my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
-  my $result = '';
-  if ($target eq 'web') {
-    &Apache::lonxml::startredirection;
-  }  elsif ($target eq 'tex') {
-       $result = '\unskip\footnote{';
-   }
-  return $result;  
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
+    my $result = '';
+    if ($target eq 'web') {
+	&Apache::lonxml::startredirection;
+    } elsif ($target eq 'tex') {
+	$result = '\unskip\footnote{';
+    } elsif ($target eq 'edit') {
+	$result.=&Apache::edit::tag_start($target,$token);
+	$result.=&Apache::edit::text_arg('Text of Link:','linktext',$token,70);
+	$result.=&Apache::edit::text_arg('Height:','width',$token,5);
+	$result.=&Apache::edit::text_arg('Width:','height',$token,5);
+	$result .=&Apache::edit::end_row().&Apache::edit::start_spanning_row();
+    } elsif ($target eq 'modified') {
+	my $constructtag=&Apache::edit::get_new_args($token,$parstack,
+						     $safeeval,'linttext',
+						     'width','height');
+	if ($constructtag) { $result=&Apache::edit::rebuild_tag($token); }
+    }
+    return $result;  
 }
 
 sub end_window {