--- loncom/interface/lonhtmlcommon.pm 2009/12/11 17:25:01 1.254
+++ loncom/interface/lonhtmlcommon.pm 2010/01/19 19:00:02 1.261
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.254 2009/12/11 17:25:01 bisitz Exp $
+# $Id: lonhtmlcommon.pm,v 1.261 2010/01/19 19:00:02 droeschl Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -81,8 +81,6 @@ sub raw_href_to_link {
##############################################
##############################################
-=pod
-
=item confirm_success
Successful completion of an operation message
@@ -139,7 +137,6 @@ ENDDRAGMATH
Javascript used to open pop-up window containing dragmath applet which
can be used to paste LaTeX into a textarea.
-
=cut
sub dragmath_js {
@@ -384,7 +381,7 @@ dname_hour, dname_min, and dname_sec.
The current setting for this time parameter. A unix format time
(time in seconds since the beginning of Jan 1st, 1970, GMT.
An undefined value is taken to indicate the value is the current time
-unless it is requested to leave it empty. See $includeempty.
+unless it is requested to leave it empty. See $includeempty.
Also, to be explicit, a value of 'now' also indicates the current time.
=item $special
@@ -418,8 +415,8 @@ sub date_setter {
my $now = time;
my $tzname;
- my ($sec,$min,$hour,$mday,$month,$year) = ('','',undef,'','','');
- # other potentially useful values: wkday,yrday,is_daylight_savings
+ my ($sec,$min,$hour,$mday,$month,$year) = ('', '', undef,''.''.'');
+ #other potentially useful values: wkday,yrday,is_daylight_savings
if (! defined($state) || $state ne 'disabled') {
$state = '';
@@ -427,29 +424,26 @@ sub date_setter {
if (! defined($no_hh_mm_ss)) {
$no_hh_mm_ss = 0;
}
-
if ($currentvalue eq 'now') {
$currentvalue = $now;
}
-
+
# Default value: Set empty date field to current time
# unless empty inclusion is requested
if ((!$includeempty) && (!$currentvalue)) {
- $currentvalue = $now;
+ $currentvalue = $now;
}
# Do we have a date? Split it!
if ($currentvalue) {
- ($tzname,$sec,$min,$hour,$mday,$month,$year) = &get_timedates($currentvalue);
+ ($tzname,$sec,$min,$hour,$mday,$month,$year) = &get_timedates($currentvalue);
- # No values provided for hour, min, sec? Use default 0
+ #No values provided for hour, min, sec? Use default 0
if (($defhour) || ($defmin) || ($defsec)) {
$sec = ($defsec ? $defsec : 0);
$min = ($defmin ? $defmin : 0);
$hour = ($defhour ? $defhour : 0);
}
}
-
- # Create Output
my $result = "\n\n";
$result .= <
@@ -1243,11 +1237,19 @@ ENDLINK
}
sub htmlareaheaders {
- return if (&htmlareablocked());
- return if (!&htmlareabrowser());
- return (<
-ENDHEADERS
+
+ENDEDITOR
+ }
+ $s.=(<
+
+
+ENDJQUERY
+ return $s;
}
# ----------------------------------------------------------------- Preferences
@@ -1282,20 +1284,102 @@ sub htmlarea_lang {
sub htmlareaselectactive {
my @fields=@_;
unless (&htmlareabrowser()) { return ''; }
- if (&htmlareablocked()) { return ' '.&enablelink(@fields); }
+ #if (&htmlareablocked()) { return ' '.&enablelink(@fields); }
my $output='