version 1.349, 2013/07/10 22:07:37
|
version 1.352, 2013/07/22 11:46:23
|
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 2234 sub course_selection {
|
Line 2240 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 2270 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 2942 sub resize_scrollbox_js {
|
Line 2948 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 2984 function resize_scrollbox(scrollboxname,
|
Line 2987 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 3024 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 3036 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 3111 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 3144 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 3175 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; |
} |
} |