version 1.1003, 2011/05/03 21:38:40
|
version 1.1008, 2011/06/03 13:00:39
|
Line 438 ENDSTDBRW
|
Line 438 ENDSTDBRW
|
|
|
sub resourcebrowser_javascript { |
sub resourcebrowser_javascript { |
unless ($env{'request.course.id'}) { return ''; } |
unless ($env{'request.course.id'}) { return ''; } |
return (<<'ENDSTDBRW'); |
return (<<'ENDRESBRW'); |
<script type="text/javascript" language="Javascript"> |
<script type="text/javascript" language="Javascript"> |
// <![CDATA[ |
// <![CDATA[ |
var reseditbrowser; |
var reseditbrowser; |
function openresbrowser(formname,uname,udom,clicker,roleflag,ignorefilter,courseadvonly) { |
function openresbrowser(formname,reslink) { |
var url = '/adm/pickresource?'; |
var url = '/adm/pickresource?form='+formname+'&reslink='+reslink; |
var title = 'Resource_Browser'; |
var title = 'Resource_Browser'; |
var options = 'scrollbars=1,resizable=1,menubar=0'; |
var options = 'scrollbars=1,resizable=1,menubar=0'; |
options += ',width=700,height=600'; |
options += ',width=700,height=500'; |
stdeditbrowser = open(url,title,options,'1'); |
reseditbrowser = open(url,title,options,'1'); |
stdeditbrowser.focus(); |
reseditbrowser.focus(); |
} |
} |
// ]]> |
// ]]> |
</script> |
</script> |
ENDSTDBRW |
ENDRESBRW |
} |
} |
|
|
sub selectstudent_link { |
sub selectstudent_link { |
Line 483 sub selectstudent_link {
|
Line 483 sub selectstudent_link {
|
return ''; |
return ''; |
} |
} |
|
|
|
sub selectresource_link { |
|
my ($form,$reslink,$arg)=@_; |
|
|
|
my $callargs = "'".&Apache::lonhtmlcommon::entity_encode($form)."','". |
|
&Apache::lonhtmlcommon::entity_encode($reslink)."'"; |
|
unless ($env{'request.course.id'}) { return $arg; } |
|
return '<span class="LC_nobreak">'. |
|
'<a href="javascript:openresbrowser('.$callargs.');">'. |
|
$arg.'</a></span>'; |
|
} |
|
|
|
|
|
|
sub authorbrowser_javascript { |
sub authorbrowser_javascript { |
return <<"ENDAUTHORBRW"; |
return <<"ENDAUTHORBRW"; |
<script type="text/javascript" language="JavaScript"> |
<script type="text/javascript" language="JavaScript"> |
Line 4948 form, .inline {
|
Line 4961 form, .inline {
|
text-decoration:none; |
text-decoration:none; |
} |
} |
|
|
|
.LC_setting { |
|
text-decoration:underline; |
|
} |
|
|
.LC_error { |
.LC_error { |
color: red; |
color: red; |
font-size: larger; |
font-size: larger; |
Line 8916 sub modify_html_refs {
|
Line 8933 sub modify_html_refs {
|
if ($allfiles{$ref}) { |
if ($allfiles{$ref}) { |
my $newname = $orig; |
my $newname = $orig; |
my ($attrib_regexp,$codebase); |
my ($attrib_regexp,$codebase); |
my $attrib_regexp = &unescape($env{'form.embedded_attrib_'.$i}); |
$attrib_regexp = &unescape($env{'form.embedded_attrib_'.$i}); |
if ($attrib_regexp =~ /:/) { |
if ($attrib_regexp =~ /:/) { |
$attrib_regexp =~ s/\:/|/g; |
$attrib_regexp =~ s/\:/|/g; |
} |
} |
Line 8925 sub modify_html_refs {
|
Line 8942 sub modify_html_refs {
|
$count += $numchg; |
$count += $numchg; |
} |
} |
if ($env{'form.embedded_codebase_'.$i} ne '') { |
if ($env{'form.embedded_codebase_'.$i} ne '') { |
my $codebase = &unescape($env{'form.embedded_codebase_'.$i}); |
$codebase = &unescape($env{'form.embedded_codebase_'.$i}); |
my $numchg = ($content =~ s/(codebase\s*=\s*["']?)\Q$codebase\E(["']?)/$1.$2/i); #' stupid emacs |
my $numchg = ($content =~ s/(codebase\s*=\s*["']?)\Q$codebase\E(["']?)/$1.$2/i); #' stupid emacs |
$codebasecount ++; |
$codebasecount ++; |
} |
} |
Line 8994 sub check_for_upload {
|
Line 9011 sub check_for_upload {
|
&mt('Unable to upload [_1]. (size = [_2] bytes)', |
&mt('Unable to upload [_1]. (size = [_2] bytes)', |
'<span class="LC_filename">'.$fname.'</span>', |
'<span class="LC_filename">'.$fname.'</span>', |
$filesize).'<br />'. |
$filesize).'<br />'. |
&mt('Either the file you attempted to upload was empty, or your web browser was unable to read its contents.').'<br />'; |
&mt('Either the file you attempted to upload was empty, or your web browser was unable to read its contents.').'<br />'. |
'</span>'; |
'</span>'; |
return ('zero_bytes',$msg); |
return ('zero_bytes',$msg); |
} |
} |