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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 07 Nov 2002 19:24:53 -0000


albertel		Thu Nov  7 14:24:53 2002 EDT

  Modified files:              
    /loncom/xml	londefdef.pm 
  Log:
  - Fixes Bug#720
  - <allow> can be eidted throught the funky color edit mode
  
  
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.97 loncom/xml/londefdef.pm:1.98
--- loncom/xml/londefdef.pm:1.97	Wed Nov  6 11:50:11 2002
+++ loncom/xml/londefdef.pm	Thu Nov  7 14:24:53 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.97 2002/11/06 16:50:11 sakharuk Exp $
+# $Id: londefdef.pm,v 1.98 2002/11/07 19:24:53 albertel Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -1715,17 +1715,30 @@
 	   return $currentstring;
 	}
 #-- <allow> tag
-        sub start_allow {
-	    my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;	  
-            $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=   
-                                        $token->[2]->{'src'};
-	    my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval);
-	    &image_replication($src);
-	    return '';
-	}
-        sub end_allow {
-	   return '';
-	}
+sub start_allow {
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
+    $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=
+	$token->[2]->{'src'};
+    my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval);
+    &image_replication($src);
+    my $result;
+    if ($target eq 'edit') {
+	$result .=&Apache::edit::tag_start($target,$token);
+	$result .=&Apache::edit::text_arg('File Spec:','src',$token,70);
+	$result .=&Apache::edit::end_row();#.&Apache::edit::start_spanning_row();
+    } elsif ($target eq 'modified') {
+	my $constructtag=&Apache::edit::get_new_args($token,$parstack,
+						     $safeeval,'src');
+	if ($constructtag) { $result = &Apache::edit::rebuild_tag($token); }
+    }
+    return $result;
+}
+
+sub end_allow {
+    my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
+    if ( $target eq 'edit') { return (&Apache::edit::end_table()); }
+    return '';
+}
 #-- Frames
 	sub start_frameset {
 	  my ($target,$token) = @_;