version 1.1136, 2013/07/09 00:17:22
|
version 1.1137, 2013/07/10 22:07:37
|
Line 2349 Outputs:
|
Line 2349 Outputs:
|
|
|
=item * $clientos |
=item * $clientos |
|
|
|
=item * $clientmobile |
|
|
=back |
=back |
|
|
=back |
=back |
Line 2367 sub decode_user_agent {
|
Line 2369 sub decode_user_agent {
|
my $clientversion='0'; |
my $clientversion='0'; |
my $clientmathml=''; |
my $clientmathml=''; |
my $clientunicode='0'; |
my $clientunicode='0'; |
|
my $clientmobile=0; |
for (my $i=0;$i<=$#browsertype;$i++) { |
for (my $i=0;$i<=$#browsertype;$i++) { |
my ($bname,$match,$notmatch,$vreg,$minv,$univ)=split(/\:/,$browsertype[$i]); |
my ($bname,$match,$notmatch,$vreg,$minv,$univ)=split(/\:/,$browsertype[$i]); |
if (($httpbrowser=~/$match/i) && ($httpbrowser!~/$notmatch/i)) { |
if (($httpbrowser=~/$match/i) && ($httpbrowser!~/$notmatch/i)) { |
Line 2389 sub decode_user_agent {
|
Line 2392 sub decode_user_agent {
|
($httpbrowser=~/powerpc/i)) { $clientos='mac'; } |
($httpbrowser=~/powerpc/i)) { $clientos='mac'; } |
if ($httpbrowser=~/win/i) { $clientos='win'; } |
if ($httpbrowser=~/win/i) { $clientos='win'; } |
if ($httpbrowser=~/embed/i) { $clientos='pda'; } |
if ($httpbrowser=~/embed/i) { $clientos='pda'; } |
|
if ($httpbrowser=~/(Android|iPod|iPad|iPhone|webOS|Blackberry|Windows Phone|Opera m(?:ob|in)|Fennec)/i) { |
|
$clientmobile=lc($1); |
|
} |
return ($httpbrowser,$clientbrowser,$clientversion,$clientmathml, |
return ($httpbrowser,$clientbrowser,$clientversion,$clientmathml, |
$clientunicode,$clientos,); |
$clientunicode,$clientos,$clientmobile); |
} |
} |
|
|
############################################################### |
############################################################### |
Line 7312 ADDMETA
|
Line 7318 ADDMETA
|
.'<link rel="stylesheet" type="text/css" href="'.$url.'" />' |
.'<link rel="stylesheet" type="text/css" href="'.$url.'" />' |
.$inhibitprint |
.$inhibitprint |
.$head_extra; |
.$head_extra; |
|
if ($env{'browser.mobile'}) { |
|
$result .= ' |
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0"> |
|
<meta name="apple-mobile-web-app-capable" content="yes" />'; |
|
} |
return $result.'</head>'; |
return $result.'</head>'; |
} |
} |
|
|
Line 7697 sub modal_adhoc_inner {
|
Line 7708 sub modal_adhoc_inner {
|
my $innerwidth=$width-20; |
my $innerwidth=$width-20; |
$content=&js_ready( |
$content=&js_ready( |
&start_page('Dialog',undef,{'only_body'=>1,'bgcolor'=>'#FFFFFF'}). |
&start_page('Dialog',undef,{'only_body'=>1,'bgcolor'=>'#FFFFFF'}). |
&start_scrollbox($width.'px',$innerwidth.'px',$height.'px'). |
&start_scrollbox($width.'px',$innerwidth.'px',$height.'px','modal'). |
$content. |
$content. |
&end_scrollbox(). |
&end_scrollbox(). |
&end_page() |
&end_page() |
Line 7924 sub start_scrollbox {
|
Line 7935 sub start_scrollbox {
|
my ($table_id,$div_id,$tdcol); |
my ($table_id,$div_id,$tdcol); |
if ($id ne '') { |
if ($id ne '') { |
$table_id = " id='table_$id'"; |
$table_id = " id='table_$id'"; |
$div_id = " id='div_$id'"; |
$div_id = ' id="div_'.$id.'"'; |
} |
} |
if ($bgcolor ne '') { |
if ($bgcolor ne '') { |
$tdcol = "background-color: $bgcolor;"; |
$tdcol = "background-color: $bgcolor;"; |
} |
} |
|
my $nicescroll_js; |
|
if ($env{'browser.mobile'}) { |
|
$nicescroll_js = ' |
|
<script type="text/javascript"> |
|
// <![CDATA[ |
|
$(document).ready( |
|
function() { |
|
$("#div_'.$id.'").niceScroll({cursorcolor:"#00F"}); |
|
} |
|
); |
|
|
|
// ]]> |
|
</script> |
|
'; |
|
} |
|
|
return <<"END"; |
return <<"END"; |
<table style="width: $outerwidth; border: 1px solid none;"$table_id><tr><td style="width: $width;$tdcol"><div style="overflow:auto; width:$width; height: $height;"$div_id> |
$nicescroll_js |
|
|
|
<table style="width: $outerwidth; border: 1px solid none;"$table_id><tr><td style="width: $width;$tdcol"> |
|
<div style="overflow:auto; width:$width; height:$height;"$div_id> |
END |
END |
} |
} |
|
|
Line 8777 of existing file within authoring space
|
Line 8807 of existing file within authoring space
|
space to be exceeded, |
space to be exceeded, |
|
|
Same, if upload of a file directly to a course/community via Course Editor |
Same, if upload of a file directly to a course/community via Course Editor |
will cause quota for uploaded content for the course to be exceeded. |
will cause quota for uploaded content for the course to be exceeded. |
|
|
Inputs: 6 |
Inputs: 6 |
1. username or coursenum |
1. username or coursenum |
Line 14179 sub init_user_environment {
|
Line 14209 sub init_user_environment {
|
# ------------------------------------ Check browser type and MathML capability |
# ------------------------------------ Check browser type and MathML capability |
|
|
my ($httpbrowser,$clientbrowser,$clientversion,$clientmathml, |
my ($httpbrowser,$clientbrowser,$clientversion,$clientmathml, |
$clientunicode,$clientos) = &decode_user_agent($r); |
$clientunicode,$clientos,$clientmobile) = &decode_user_agent($r); |
|
|
# ------------------------------------------------------------- Get environment |
# ------------------------------------------------------------- Get environment |
|
|
Line 14210 sub init_user_environment {
|
Line 14240 sub init_user_environment {
|
"browser.mathml" => $clientmathml, |
"browser.mathml" => $clientmathml, |
"browser.unicode" => $clientunicode, |
"browser.unicode" => $clientunicode, |
"browser.os" => $clientos, |
"browser.os" => $clientos, |
|
"browser.mobile" => $clientmobile, |
"server.domain" => $Apache::lonnet::perlvar{'lonDefDomain'}, |
"server.domain" => $Apache::lonnet::perlvar{'lonDefDomain'}, |
"request.course.fn" => '', |
"request.course.fn" => '', |
"request.course.uri" => '', |
"request.course.uri" => '', |