[LON-CAPA-cvs] cvs: loncom /interface londocs.pm

raeburn raeburn at source.lon-capa.org
Tue Nov 13 20:09:32 EST 2012


raeburn		Wed Nov 14 01:09:32 2012 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  - Location of Remove Rename Cut Copy links consistent for each line in
    Course Editor.
  - Set visibility to hidden if Cut or Copy not supported for a particular
    resource.
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.506 loncom/interface/londocs.pm:1.507
--- loncom/interface/londocs.pm:1.506	Wed Nov 14 00:18:53 2012
+++ loncom/interface/londocs.pm	Wed Nov 14 01:09:32 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.506 2012/11/14 00:18:53 raeburn Exp $
+# $Id: londocs.pm,v 1.507 2012/11/14 01:09:32 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2274,10 +2274,7 @@
                 $nocopy=1;
             }
         }
-        my $copylink=' ';
-        my $cutlink=' ';
-        my $removelink=' ';
-
+        my ($copylink,$cutlink,$removelink,$renamelink);
 	my $skip_confirm = 0;
 	if ( $folder =~ /^supplemental/
 	     || ($url =~ m{( /smppg$
@@ -2290,21 +2287,36 @@
 	    $skip_confirm = 1;
 	}
 
-	if (!$nocopy) {
+        if ($nocopy) {
+            $copylink=(<<ENDCOPY);
+<span style="visibility: hidden;">$lt{'cp'}</span>
+ENDCOPY
+        } else {
 	    $copylink=(<<ENDCOPY);
 <a href="javascript:markcopy('$esc_path','$index','$renametitle','$container','$symb','$folder');" class="LC_docs_copy">$lt{'cp'}</a>
 ENDCOPY
         }
-	if (!$nocut) {
+        if ($nocut) {
+            $cutlink=(<<ENDCUT);
+<span style="visibility: hidden;">$lt{'ct'}</span>
+ENDCUT
+        } else {
 	    $cutlink=(<<ENDCUT);
 <a href="javascript:cutres('$esc_path','$index','$renametitle','$container','$symb','$folder',$skip_confirm);" class="LC_docs_cut">$lt{'ct'}</a>
 ENDCUT
         }
-        if (!$noremove) {
+        if ($noremove) {
+            $removelink=(<<ENDREM);
+<span style="visibility: hidden;">$lt{'rm'}</a>
+ENDREM
+        } else {
             $removelink=(<<ENDREM);
 <a href='javascript:removeres("$esc_path","$index","$renametitle","$container","$symb",$skip_confirm);' class="LC_docs_remove">$lt{'rm'}</a>
 ENDREM
         }
+        $renamelink=(<<ENDREN);
+<a href='javascript:changename("$esc_path","$index","$renametitle","$container","$symb");' class="LC_docs_rename">$lt{'rn'}</a>
+ENDREN
 	$form_start = '
    <form action="/adm/coursedocs" method="post">
 ';
@@ -2334,11 +2346,12 @@
    $selectbox
    $form_end
 </td>
-<td class="LC_docs_entry_commands">
+<td class="LC_docs_entry_commands"><span class="LC_nobreak">
 $removelink
+$renamelink
 $cutlink
-   <a href='javascript:changename("$esc_path","$index","$renametitle","$container","$symb");' class="LC_docs_rename">$lt{'rn'}</a>
 $copylink
+</span>
 </td>
 END
 




More information about the LON-CAPA-cvs mailing list