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

droeschl droeschl@source.lon-capa.org
Sat, 30 Jan 2010 13:06:43 -0000


This is a MIME encoded message

--droeschl1264856803
Content-Type: text/plain

droeschl		Sat Jan 30 13:06:43 2010 EDT

  Modified files:              
    /loncom/interface	loncommon.pm londocs.pm 
  Log:
  - Alignment of top most line improved.
  
  Course Editor:
  - Bug #6178: icons are now clickable 
  - slight visual improvements
  - Renamed Upload Document to Import Documents
  - moved:
      o External Resource from Tools to Import Documents (on both tabs)
      o IMS Import from Tools to Import Documents
  
  
--droeschl1264856803
Content-Type: text/plain
Content-Disposition: attachment; filename="droeschl-20100130130643.txt"

Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.933 loncom/interface/loncommon.pm:1.934
--- loncom/interface/loncommon.pm:1.933	Tue Jan 19 19:00:02 2010
+++ loncom/interface/loncommon.pm	Sat Jan 30 13:06:42 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.933 2010/01/19 19:00:02 droeschl Exp $
+# $Id: loncommon.pm,v 1.934 2010/01/30 13:06:42 droeschl Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1127,7 +1127,7 @@
     $template.=' <a target="_top" href="'.$link.'" title="'.$title.'">'
               .'<img src="'.$helpicon.'" border="0"'
               .' alt="'.&mt('Help: [_1]',$topic).'"'
-              .' title="'.$title.'"' 
+              .' title="'.$title.'" style="vertical-align:middle;"' 
               .' /></a>';
     if ($text ne "") {	
         $template.='</span>';
@@ -5004,6 +5004,10 @@
   padding-left:3px;
 }
 
+.LC_menubuttons_inline_text img{
+  vertical-align: middle;
+}
+
 .LC_menubuttons_link {
   text-decoration: none;
 }
@@ -5967,7 +5971,7 @@
 
 #LC_nav_bar {
   float: left;
-  margin: 0.2em 0 0 0;
+  margin: 0;
 }
 
 #LC_realm {
@@ -5984,7 +5988,7 @@
 
 ol.LC_primary_menu {
   float: right;
-  margin: 0.2em 0 0 0;
+  margin: 0;
 }
 
 span.LC_new_message{
@@ -6004,10 +6008,10 @@
 
 ol.LC_primary_menu li img {
   vertical-align: bottom;
+  height: 1.1em;
 }
 
 ol.LC_primary_menu a {
-  font-size: 90%;
   color: RGB(80, 80, 80);
   text-decoration: none;
 }
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.416 loncom/interface/londocs.pm:1.417
--- loncom/interface/londocs.pm:1.416	Thu Jan 21 23:19:17 2010
+++ loncom/interface/londocs.pm	Sat Jan 30 13:06:43 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.416 2010/01/21 23:19:17 raeburn Exp $
+# $Id: londocs.pm,v 1.417 2010/01/30 13:06:43 droeschl Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -124,10 +124,8 @@
 	return $link.' '.
 	    &Apache::loncommon::help_open_topic('Docs_Dump_Course_Docs').'<br />';
     } else {
-	return '<div>'.
-     &mt('Dump '.$crstype.
-	 ' DOCS to Construction Space: available on other servers').
-	 '</div>';
+	return &mt('Dump '.$crstype.
+	 ' DOCS to Construction Space: available on other servers');
     }
 }
 
@@ -2892,7 +2890,7 @@
                 'upls' => 'Upload a new supplemental '.lc($crstype).' document',
                 'impp' => 'Import a document',
 		'copm' => 'All documents out of a published map into this folder',
-                'upld' => 'Upload Document',
+                'upld' => 'Import Document',
                 'srch' => 'Search',
                 'impo' => 'Import',
 		'book' => 'Import Bookmarks',
@@ -2966,9 +2964,9 @@
 	<input type="hidden" name="active" value="bb" />
 SEDFFORM
 	my @simpleeditdefaultforma = ( 
-	{ '<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/src.png" alt="'.$lt{srch}.'" />' => "$uploadtag<a onclick='javascript:groupsearch()'>$lt{'srch'}</a>" },
-	{ '<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/res.png" alt="'.$lt{impo}.'" />' => "<a onclick='javascript:groupimport();'>$lt{'impo'}</a>$help{'Importing_LON-CAPA_Resource'}" },
-	{ '<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/vbkm.png" alt="'.$lt{book}.'" />' => "<a onclick='javascript:groupopen(0,1,1);'>$lt{'book'}</a>" },
+	{ '<img class="LC_noBorder LC_middle" src="/res/adm/pages/src.png" alt="'.$lt{srch}.'"  onclick="javascript:groupsearch()" />' => "$uploadtag<a onclick='javascript:groupsearch()'>$lt{'srch'}</a>" },
+	{ '<img class="LC_noBorder LC_middle" src="/res/adm/pages/res.png" alt="'.$lt{impo}.'"  onclick="javascript:groupimport();"/>' => "<a onclick='javascript:groupimport();'>$lt{'impo'}</a>$help{'Importing_LON-CAPA_Resource'}" },
+	{ '<img class="LC_noBorder LC_middle" src="/res/adm/pages/vbkm.png" alt="'.$lt{book}.'" onclick="javascript:groupopen(0,1,1);" />' => "<a onclick='javascript:groupopen(0,1,1);'>$lt{'book'}</a>" },
 	);
 	$simpleeditdefaultform .= create_form_ul(create_list_elements(@simpleeditdefaultforma));
 	$simpleeditdefaultform .=(<<SEDFFORM);
@@ -3258,42 +3256,47 @@
 	</form>
 NGFFORM
 	@specialdocumentsforma=(
-	{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/page.png" alt="'.$lt{newp}.'" />'=>$newpageform},
-	{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/syllabus.png" alt="'.$lt{syll}.'" />'=>$newsylform},
-	{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/groupportfolio.png" alt="'.$lt{grpo}.'" />'=>$newgroupfileform},
+	{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/page.png" alt="'.$lt{newp}.'"  onclick="javascript:makenewpage(document.newpage,"'.$pageseq.'");" />'=>$newpageform},
+	{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/syllabus.png" alt="'.$lt{syll}.'" onclick="document.newsyl.submit()" />'=>$newsylform},
+	{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/groupportfolio.png" alt="'.$lt{grpo}.'" onclick="document.newgroupfiles.submit()" />'=>$newgroupfileform},
 	); 
 	
       }
-	push @specialdocumentsforma, ({'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/navigation.png" alt="'.$lt{navc}.'" />'=>$newnavform},
-	{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/simple.png" alt="'.$lt{sipa}.'" />'=>$newsmppageform},
-	{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/simpprob.png" alt="'.$lt{sipr}.'" />'=>$newsmpproblemform},
-	{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/dropbox.png" alt="'.$lt{drbx}.'" />'=>$newdropboxform},
-	{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/scoreupfrm.png" alt="'.$lt{scuf}.'" />'=>$newexuploadform},
-	{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/bchat.png" alt="'.$lt{bull}.'" />'=>$newbulform},
-	{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/myaboutme.png" alt="'.$lt{mypi}.'" />'=>$newaboutmeform},
-	{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/aboutme.png" alt="'.$lt{abou}.'" />'=>$newaboutsomeoneform},
-	{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/chrt.png" alt="'.$lt{rost}.'" />'=>$newrosterform},);
+	push @specialdocumentsforma, ({'<img class="LC_noBorder LC_middle" src="/res/adm/pages/navigation.png" alt="'.$lt{navc}.'" onclick="document.newnav.submit()" />'=>$newnavform},
+	{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/simple.png" alt="'.$lt{sipa}.'" onclick="javascript:makesmppage();" />'=>$newsmppageform},
+	{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/simpprob.png" alt="'.$lt{sipr}.'" onclick="javascript:makesmpproblem();" />'=>$newsmpproblemform},
+	{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/dropbox.png" alt="'.$lt{drbx}.'" onclick="javascript:makedropbox();" />'=>$newdropboxform},
+	{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/scoreupfrm.png" alt="'.$lt{scuf}.'" onclick="javascript:makeexamupload();" />'=>$newexuploadform},
+	{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/bchat.png" alt="'.$lt{bull}.'" onclick="javascript:makebulboard();" />'=>$newbulform},
+	{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/myaboutme.png" alt="'.$lt{mypi}.'" onclick="javascript:makebulboard();" />'=>$newaboutmeform},
+	{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/aboutme.png" alt="'.$lt{abou}.'" onclick="javascript:makeabout();" />'=>$newaboutsomeoneform},
+	{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/chrt.png" alt="'.$lt{rost}.'" onclick="document.newroster.submit()" />'=>$newrosterform},);
 
 	$specialdocumentsform = create_form_ul(create_list_elements(@specialdocumentsforma));
 
 if($env{'form.pagepath'}) {
 	
 	@specialdocumentsforma=(
-	{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/simpprob.png" alt="'.&mt('Simple Problem').'" />'=>$newsmpproblemform},
-	{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/scoreupfrm.png" alt="'.&mt('Score Upload Form').'" />'=>$newexuploadform}
+	{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/simpprob.png" alt="'.&mt('Simple Problem').'" onclick="javascript:makesmpproblem();" />'=>$newsmpproblemform},
+	{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/scoreupfrm.png" alt="'.&mt('Score Upload Form').'" onclick="javascript:makeexamupload();" />'=>$newexuploadform}
 	);
 	$specialdocumentsform= create_form_ul(create_list_elements(@specialdocumentsforma));
 }
 
 my @tools = (
-	{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/extres.png" alt="'.$lt{extr}.'" />'=>$extresourcesform},
-	{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/ims.png" alt="'.$lt{imsf}.'" />'=>$imspform},
-	{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/recover.png" alt="'.$lt{reco}.'" />'=>$recoverform},
+#	{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/extres.png" alt="'.$lt{extr}.'" />'=>$extresourcesform},
+#	{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/ims.png" alt="'.$lt{imsf}.'" />'=>$imspform},
+	{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/recover.png" alt="'.$lt{reco}.'" onclick="javascript:groupopen(\''.$readfile.'\',1,0)" />'=>$recoverform},
 	);
 
+my @importdoc = (
+    {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/extres.png" alt="'.$lt{extr}.'" onclick="javascript:makenewext(\'newext\');" />'=>$extresourcesform},
+    {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/ims.png" alt="'.$lt{imsf}.'" onclick="javascript:makeims();" />'=>$imspform}, 
+);
+$fileuploadform =  create_form_ul(create_list_elements(@importdoc)) . '<hr/>' . $fileuploadform;
 my %orderhash = (
 		'00' => ['Newfolder',$newfolderform],
-                'aa' => ['Upload Document',$fileuploadform],
+                'aa' => ['Import Documents',$fileuploadform],
                 'bb' => ['Published Resources',$simpleeditdefaultform],
                 'cc' => ['Special Documents',$specialdocumentsform],
 		'dd' => ['Tools', create_form_ul(create_list_elements(@tools)).&generate_admin_options($containertag,$uploadtag,\%help,\%env)],
@@ -3403,13 +3406,19 @@
 
 
 my @specialdocs = (
-		{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/extres.png" alt="'.$lt{extr}.'" />'=>$supnewextform},
-		{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/syllabus.png" alt="'.$lt{syll}.'" />'=>$supnewsylform},
-		{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/myaboutme.png" alt="'.$lt{mypi}.'" />'=>$supnewaboutmeform},
+		{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/syllabus.png" alt="'.$lt{syll}.'" onclick="document.supnewsyl.submit()" />'
+            =>$supnewsylform},
+		{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/myaboutme.png" alt="'.$lt{mypi}.'" onclick="document.supnewaboutme.submit()" />'
+            =>$supnewaboutmeform},
 		);
+my @supimportdoc = (
+		{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/extres.png" alt="'.$lt{extr}.'" onclick="javascript:makenewext(\'supnewext\');" />'
+            =>$supnewextform},
+        );
+$supupdocform =  create_form_ul(create_list_elements(@supimportdoc)) . '<hr/>' . $supupdocform;
 my %suporderhash = (
 		'00' => ['Supnewfolder', $supnewfolderform],
-                'ee' => ['Upload Document',$supupdocform],
+                'ee' => ['Import Documents',$supupdocform],
                 'ff' => ['Special Documents',create_form_ul(create_list_elements(@specialdocs))]
                 );
 
@@ -3469,15 +3478,20 @@
   my $dumpbut=&dumpbutton();
   my $exportbut=&exportbutton();
   my @list = (
-	{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/verify.png" alt="'.$lt{vc}.'" />'=>"<a onclick='javascript:injectData(document.courseverify, \"dummy\", \"verify\", \"$lt{'vc'}\")'>$lt{'vc'}</a>$help{'Verify_Content'}"},
-	{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/resversion.png" alt="'.$lt{cv}.'" />'=>"<a onclick='javascript:injectData(document.courseverify, \"dummy\", \"versions\", \"$lt{'cv'}\")'>$lt{'cv'}</a>$help{'Check_Resource_Versions'}"},
+	{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/verify.png" alt="'.$lt{vc}.'"  onclick=\'javascript:injectData(document.courseverify, "dummy", "verify", "'.$lt{'vc'}.'")\' />' 
+        => "<a onclick='javascript:injectData(document.courseverify, \"dummy\", \"verify\", \"$lt{'vc'}\")'>$lt{'vc'}</a>$help{'Verify_Content'}"},
+	{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/resversion.png" alt="'.$lt{cv}.'"  onclick=\'javascript:injectData(document.courseverify, "dummy", "versions", "'.$lt{'cv'}.'")\' />'
+        =>"<a onclick='javascript:injectData(document.courseverify, \"dummy\", \"versions\", \"$lt{'cv'}\")'>$lt{'cv'}</a>$help{'Check_Resource_Versions'}"},
 	);
   if($dumpbut ne ''){
-  push @list, {'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/dump.png" alt="'.$lt{dcd}.'" />'=>$dumpbut};
+  push @list, {'<img class="LC_noBorder LC_middle" src="/res/adm/pages/dump.png" alt="'.$lt{dcd}.'" />'=>$dumpbut};
   }
-  push @list, ({'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/imsexport.png" alt="'.$lt{imse}.'" />'=>$exportbut},
-	{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/symbs.png" alt="'.$lt{ls}.'" />'=>"<a onclick='javascript:injectData(document.courseverify, \"dummy\", \"listsymbs\", \"$lt{'ls'}\")'>$lt{'ls'}</a><input type='hidden' name='folder' value='$env{'form.folder'}' />"},
-	{'<img class="LC_noBorder LC_middle" align="left" src="/res/adm/pages/log.png" alt="'.$lt{sl}.'" />'=>"<a onclick='javascript:injectData(document.courseverify, \"dummy\", \"docslog\", \"$lt{'sl'}\")'>$lt{'sl'}</a>"},
+  push @list, ({'<img class="LC_noBorder LC_middle" src="/res/adm/pages/imsexport.png" alt="'.$lt{imse}.'" onclick=\'javascript:injectData(document.courseverify, "dummy", "exportcourse", "'.&mt('IMS Export').'")\' />'
+          =>$exportbut},
+	{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/symbs.png" alt="'.$lt{ls}.'"  onclick=\'javascript:injectData(document.courseverify, "dummy", "listsymbs", "'.$lt{'ls'}.'")\'  />'
+        =>"<a onclick='javascript:injectData(document.courseverify, \"dummy\", \"listsymbs\", \"$lt{'ls'}\")'>$lt{'ls'}</a><input type='hidden' name='folder' value='$env{'form.folder'}' />"},
+	{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/log.png" alt="'.$lt{sl}.'"  onclick=\'javascript:injectData(document.courseverify, "dummy", "docslog", "'.$lt{'sl'}.'")\'  />'
+        =>"<a onclick='javascript:injectData(document.courseverify, \"dummy\", \"docslog\", \"$lt{'sl'}\")'>$lt{'sl'}</a>"},
 	);
   return '<form action="/adm/coursedocs" method="post" name="courseverify"><input type="hidden" id="dummy" />'.create_form_ul(create_list_elements(@list)).'</form>';
 
@@ -3494,7 +3508,7 @@
     if($env{'form.active'} ne ''){
         $activetab = $env{'form.active'};
     }
-    $form = '<div class="LC_Box">';
+    $form = '<div class="LC_Box" style="margin-right:0">';
     $form .= '<ul id="navigation'.$tid.'" class="LC_TabContent">';
     foreach my $name (sort(keys(%orderhash))){
         if($name ne '00'){

--droeschl1264856803--