--- loncom/interface/lonhtmlcommon.pm 2012/05/29 01:11:30 1.317
+++ loncom/interface/lonhtmlcommon.pm 2012/12/03 14:47:30 1.336
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.317 2012/05/29 01:11:30 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.336 2012/12/03 14:47:30 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -61,7 +61,7 @@ use Time::HiRes;
use Apache::lonlocal;
use Apache::lonnet;
use HTML::Entities();
-use LONCAPA;
+use LONCAPA qw(:DEFAULT :match);
sub java_not_enabled {
return "\n".''.
@@ -209,9 +209,19 @@ dependencies for a web page uploaded dir
=cut
sub dependencycheck_js {
- my ($symb,$title) = @_;
- my $link = '/adm/dependencies?symb='.&HTML::Entities::encode($symb,'<>&"').
- '&title='.&HTML::Entities::encode($title,'<>&"');
+ my ($symb,$title,$url,$folderpath,$uri) = @_;
+ my $link;
+ if ($symb) {
+ $link = '/adm/dependencies?symb='.&HTML::Entities::encode($symb,'<>&"');
+ } elsif ($folderpath) {
+ $link = '/adm/dependencies?folderpath='.&HTML::Entities::encode($folderpath,'<>&"');
+ $url = $uri;
+ }
+ $link .= (($link=~/\?/)?'&':'?').'title='.
+ &HTML::Entities::encode($title,'<>&"');
+ if ($url) {
+ $link .= '&url='.&HTML::Entities::encode($url,'<>&"');
+ }
return <
//
+
+
+
+
ENDJQUERY
return $s;
}
@@ -1225,6 +1240,17 @@ sub htmlarea_lang {
return $lang;
}
+# return javacsript to activate elements of .colorchooser with jpicker:
+# Caller is responsible for enclosing this in