version 1.349, 2013/07/10 22:07:37
|
version 1.355, 2013/12/31 01:17:34
|
Line 64 use HTML::Entities();
|
Line 64 use HTML::Entities();
|
use LONCAPA qw(:DEFAULT :match); |
use LONCAPA qw(:DEFAULT :match); |
|
|
sub java_not_enabled { |
sub java_not_enabled { |
return "\n".'<span class="LC_error">'. |
if (($env{'browser.mobile'}) && ($env{'browser.mobile'} =~ /^ipad|ipod|iphone$/i)) { |
&mt('The required Java applet could not be started. Please make sure to have Java installed and active in your browser.'). |
return "\n".'<span class="LC_error">'. |
"</span>\n"; |
&mt('The required Java applet could not be started, because Java is not supported by your mobile device.'). |
|
"</span>\n"; |
|
} else { |
|
return "\n".'<span class="LC_error">'. |
|
&mt('The required Java applet could not be started. Please make sure to have Java installed and active in your browser.'). |
|
"</span>\n"; |
|
} |
} |
} |
|
|
sub coursepreflink { |
sub coursepreflink { |
Line 170 sub dragmath_js {
|
Line 176 sub dragmath_js {
|
function mathedit(textarea, doc) { |
function mathedit(textarea, doc) { |
targetEntry = textarea; |
targetEntry = textarea; |
targetDoc = doc; |
targetDoc = doc; |
newwin = window.open("/adm/dragmath/applet/$popup.html","","width=565,height=500,resizable"); |
newwin = window.open("/adm/dragmath/$popup.html","","width=565,height=500,resizable"); |
} |
} |
// ]]> |
// ]]> |
</script> |
</script> |
Line 1700 returns: nothing
|
Line 1706 returns: nothing
|
my $links; |
my $links; |
if ((&show_return_link) && (!$CourseBreadcrumbs) && (ref($last) eq 'HASH')) { |
if ((&show_return_link) && (!$CourseBreadcrumbs) && (ref($last) eq 'HASH')) { |
my $alttext = &mt('Go Back'); |
my $alttext = &mt('Go Back'); |
|
my $hashref = { href => '/adm/flip?postdata=return:', |
|
title => &mt('Back to most recent content resource'), |
|
class => 'LC_menubuttons_link', |
|
}; |
|
if ($env{'request.noversionuri'} eq '/adm/searchcat') { |
|
$hashref->{'target'} = '_top'; |
|
} |
$links=&htmltag( 'a','<img src="/res/adm/pages/tolastloc.png" alt="'.$alttext.'" class="LC_icon" />', |
$links=&htmltag( 'a','<img src="/res/adm/pages/tolastloc.png" alt="'.$alttext.'" class="LC_icon" />', |
{ href => '/adm/flip?postdata=return:', |
$hashref); |
title => &mt('Back to most recent content resource'), |
|
class => 'LC_menubuttons_link', |
|
}); |
|
$links=&htmltag('li',$links); |
$links=&htmltag('li',$links); |
} |
} |
$links.= join "", |
$links.= join "", |
Line 2234 sub course_selection {
|
Line 2244 sub course_selection {
|
$output .= '<label><input type="radio" name="coursepick" value="category" onclick="coursePick(this.form);alert('."'".&mt('Choose categories, from left to right')."'".')" />'.&mt('Pick courses by category:').'</label><br />'; |
$output .= '<label><input type="radio" name="coursepick" value="category" onclick="coursePick(this.form);alert('."'".&mt('Choose categories, from left to right')."'".')" />'.&mt('Pick courses by category:').'</label><br />'; |
$output .= '<table><tr><td>'.$$codetitles[0].'<br />'."\n". |
$output .= '<table><tr><td>'.$$codetitles[0].'<br />'."\n". |
'<select name="'.$standardnames->[0]. |
'<select name="'.$standardnames->[0]. |
'" onChange="setPick(this.form);courseSet('."'$$codetitles[0]'".')">'."\n". |
'" onchange="setPick(this.form);courseSet('."'$$codetitles[0]'".')">'."\n". |
' <option value="-1" />Select'."\n"; |
' <option value="-1" />Select'."\n"; |
my @items = (); |
my @items = (); |
my @longitems = (); |
my @longitems = (); |
Line 2264 sub course_selection {
|
Line 2274 sub course_selection {
|
for (my $i=1; $i<$numtitles; $i++) { |
for (my $i=1; $i<$numtitles; $i++) { |
$output .= '<td>'.$$codetitles[$i].'<br />'."\n". |
$output .= '<td>'.$$codetitles[$i].'<br />'."\n". |
'<select name="'.$standardnames->[$i]. |
'<select name="'.$standardnames->[$i]. |
'" onChange="courseSet('."'$$codetitles[$i]'".')">'."\n". |
'" onchange="courseSet('."'$$codetitles[$i]'".')">'."\n". |
'<option value="-1"><-Pick '.$$codetitles[$i-1].'</option>'."\n". |
'<option value="-1"><-Pick '.$$codetitles[$i-1].'</option>'."\n". |
'</select>'."\n". |
'</select>'."\n". |
'</td>'; |
'</td>'; |
Line 2932 ENDSCRIPT
|
Line 2942 ENDSCRIPT
|
############################################## |
############################################## |
|
|
sub resize_scrollbox_js { |
sub resize_scrollbox_js { |
my ($context,$tabidstr) = @_; |
my ($context,$tabidstr,$tid) = @_; |
my (%names,$paddingwfrac,$offsetwfrac,$offsetv,$minw,$minv); |
my (%names,$paddingwfrac,$offsetwfrac,$offsetv,$minw,$minv); |
if ($context eq 'docs') { |
if ($context eq 'docs') { |
%names = ( |
%names = ( |
Line 2942 sub resize_scrollbox_js {
|
Line 2952 sub resize_scrollbox_js {
|
scroll => 'contentscroll', |
scroll => 'contentscroll', |
boxh => 'contenteditor', |
boxh => 'contenteditor', |
); |
); |
$paddingwfrac = 0; |
$paddingwfrac = 0.09; |
unless ($env{'browser.mobile'}) { |
|
$paddingwfrac = 0.09; |
|
} |
|
$offsetwfrac = 0.015; |
$offsetwfrac = 0.015; |
$offsetv = 20; |
$offsetv = 20; |
$minw = 250; |
$minw = 250; |
Line 2971 window.onresize=callResize;
|
Line 2978 window.onresize=callResize;
|
|
|
'; |
'; |
if ($context eq 'docs') { |
if ($context eq 'docs') { |
$output .= ' |
if ($env{'form.active'}) { |
var activeTab; |
$output .= "\nvar activeTab = '$env{'form.active'}$tid';\n"; |
'; |
} else { |
|
$output .= "\nvar activeTab = '';\n"; |
|
} |
} |
} |
$output .= <<"FIRST"; |
$output .= <<"FIRST"; |
|
|
Line 2984 function resize_scrollbox(scrollboxname,
|
Line 2993 function resize_scrollbox(scrollboxname,
|
var scrolltableid = 'table_'+scrollboxname; |
var scrolltableid = 'table_'+scrollboxname; |
var scrollbox; |
var scrollbox; |
var scrolltable; |
var scrolltable; |
|
var ismobile = '$env{'browser.mobile'}'; |
|
|
if (document.getElementById("$names{'boxw'}") == null) { |
if (document.getElementById("$names{'boxw'}") == null) { |
return; |
return; |
Line 3020 FIRST
|
Line 3030 FIRST
|
} |
} |
$output .= <<"SECOND"; |
$output .= <<"SECOND"; |
var listwchange; |
var listwchange; |
|
var scrollchange; |
if (chkw == 1) { |
if (chkw == 1) { |
var boxw = document.getElementById("$names{'boxw'}").offsetWidth; |
var boxw = document.getElementById("$names{'boxw'}").offsetWidth; |
var itemw; |
var itemw; |
Line 3031 FIRST
|
Line 3042 FIRST
|
|
|
var scrollboxw = scrollbox.offsetWidth; |
var scrollboxw = scrollbox.offsetWidth; |
var scrollboxscrollw = scrollbox.scrollWidth; |
var scrollboxscrollw = scrollbox.scrollWidth; |
|
var scrollstart = scrollboxw; |
|
|
var offsetw = parseInt(vpw * $offsetwfrac); |
var offsetw = parseInt(vpw * $offsetwfrac); |
var paddingw = parseInt(vpw * $paddingwfrac); |
var paddingw = parseInt(vpw * $paddingwfrac); |
Line 3105 PARAMSONE
|
Line 3117 PARAMSONE
|
} |
} |
} |
} |
|
|
|
if (newscrollboxw != scrollboxw) { |
|
scrollchange = 1; |
|
} |
|
|
if (itemid.offsetWidth != itemwstart) { |
if (itemid.offsetWidth != itemwstart) { |
listwchange = 1; |
listwchange = 1; |
} |
} |
} |
} |
if ((chkh == 1) || (listwchange)) { |
if ((chkh == 1) || (listwchange)) { |
|
var itemid = document.getElementById("$names{'item'}"); |
|
if (itemid != null) { |
|
itemh = itemid.offsetHeight; |
|
} |
var primaryheight = document.getElementById('LC_nav_bar').offsetHeight; |
var primaryheight = document.getElementById('LC_nav_bar').offsetHeight; |
var secondaryheight; |
var secondaryheight; |
if (document.getElementById('LC_secondary_menu') != null) { |
if (document.getElementById('LC_secondary_menu') != null) { |
Line 3130 PARAMSONE
|
Line 3150 PARAMSONE
|
|
|
var scrollboxheight = scrollbox.offsetHeight; |
var scrollboxheight = scrollbox.offsetHeight; |
var scrollboxscrollheight = scrollbox.scrollHeight; |
var scrollboxscrollheight = scrollbox.scrollHeight; |
|
var scrollboxh = scrollboxheight; |
|
|
var minvscrollbox = $minv; |
var minvscrollbox = $minv; |
var offsetv = $offsetv; |
var offsetv = $offsetv; |
Line 3160 PARAMSONE
|
Line 3181 PARAMSONE
|
scrollbox.style.height = newscrollheight+"px"; |
scrollbox.style.height = newscrollheight+"px"; |
} |
} |
} |
} |
|
var newscrollboxh = scrollbox.offsetHeight; |
|
if (scrollboxh != newscrollboxh) { |
|
scrollchange = 1; |
|
} |
|
} |
|
if (ismobile && scrollchange) { |
|
\$("#div_$names{'scroll'}").getNiceScroll().onResize(); |
} |
} |
return; |
return; |
} |
} |