version 1.322, 2012/09/10 09:51:06
|
version 1.328, 2012/10/31 12:54:13
|
Line 1101 sub Close_PrgWin {
|
Line 1101 sub Close_PrgWin {
|
undef(%$prog_state); |
undef(%$prog_state); |
} |
} |
|
|
|
|
# ------------------------------------------------------- Puts directory header |
# ------------------------------------------------------- Puts directory header |
|
|
sub crumbs { |
sub crumbs { |
Line 1212 ENDEDITOR
|
Line 1213 ENDEDITOR
|
<script type="text/javascript" src="/adm/countdown/js/jquery.countdown.js"></script> |
<script type="text/javascript" src="/adm/countdown/js/jquery.countdown.js"></script> |
<link rel="stylesheet" type="text/css" href="/adm/countdown/css/jquery.countdown.css" /> |
<link rel="stylesheet" type="text/css" href="/adm/countdown/css/jquery.countdown.css" /> |
|
|
<script type="text/javascript" src="/adm/spellchecker/js/jquery.spellchecker.js"></script> |
<script type="text/javascript" src="/adm/spellchecker/js/jquery.spellchecker.min.js"></script> |
<link rel="stylesheet" type="text/css" href="/adm/spellchecker/css/spellchecker.css" /> |
<link rel="stylesheet" type="text/css" href="/adm/spellchecker/css/spellchecker.css" /> |
|
|
ENDJQUERY |
ENDJQUERY |
Line 1230 sub htmlarea_lang {
|
Line 1231 sub htmlarea_lang {
|
return $lang; |
return $lang; |
} |
} |
|
|
|
# return javacsript to activate elements of .colorchooser with jpicker: |
|
# Caller is responsible for enclosing this in <script> tags: |
|
# |
|
sub color_picker { |
|
return ' |
|
$(document).ready(function(){ |
|
$.fn.jPicker.defaults.images.clientPath="/adm/jpicker/images/"; |
|
$(".colorchooser").jPicker({window: { position: {x: "screenCenter", y: "bottom"}}}); |
|
});'; |
|
} |
|
|
# ----------------------------------------- Script to activate only some fields |
# ----------------------------------------- Script to activate only some fields |
|
|
sub htmlareaselectactive { |
sub htmlareaselectactive { |
Line 1343 sub htmlareaselectactive {
|
Line 1355 sub htmlareaselectactive {
|
$(this).before("<div><a href=\"#\" id=\"LC_rt_"+id+"\" title=\"Enable rich text formatting (bold, italic, etc.)\" class=\"LC_enable_rt\"><b>Rich formatting »</b></a></div>"); |
$(this).before("<div><a href=\"#\" id=\"LC_rt_"+id+"\" title=\"Enable rich text formatting (bold, italic, etc.)\" class=\"LC_enable_rt\"><b>Rich formatting »</b></a></div>"); |
$("#LC_rt_"+id).click(editorHandler); |
$("#LC_rt_"+id).click(editorHandler); |
}); |
}); |
$.fn.jPicker.defaults.images.clientPath="/adm/jpicker/images/"; |
|
$(".colorchooser").jPicker(); |
|
|
|
|
|
}); |
}); |
'; |
'; |
|
$output .= &color_picker; |
|
|
# Code to put a due date countdown in 'duedatecountdown' span. |
# Code to put a due date countdown in 'duedatecountdown' span. |
# This is currently located in the breadcrumb headers. |
# This is currently located in the breadcrumb headers. |
# note that the dueDateLayout is internatinoalized below. |
# note that the dueDateLayout is internatinoalized below. |
Line 1425 sub htmlareaselectactive {
|
Line 1437 sub htmlareaselectactive {
|
|
|
}); |
}); |
|
|
|
/* the muli colored editor can generate spellcheck with language 'none' |
|
to disable spellcheck as well |
|
*/ |
|
function doSpellcheck(element, lang) { |
|
if (lang != 'none') { |
|
\$(element).spellchecker('option', {lang: lang}); |
|
\$(element).spellchecker('check'); |
|
} |
|
} |
|
|
|
|
JAVASCRIPT |
JAVASCRIPT |
if ($dragmath_prefix ne '') { |
if ($dragmath_prefix ne '') { |
Line 2989 FOURTH
|
Line 3011 FOURTH
|
return $output; |
return $output; |
} |
} |
|
|
|
############################################## |
|
############################################## |
|
|
|
sub javascript_jumpto_resource { |
|
my $confirm_switch = &mt("Editing requires switching to the resource's home server.").'\n'. |
|
&mt('Switch server?'); |
|
return (<<ENDUTILITY) |
|
|
|
function go(url) { |
|
if (url!='' && url!= null) { |
|
currentURL = null; |
|
currentSymb= null; |
|
window.location.href=url; |
|
} |
|
} |
|
|
|
function need_switchserver(url) { |
|
if (url!='' && url!= null) { |
|
if (confirm("$confirm_switch")) { |
|
go(url); |
|
} |
|
} |
|
return; |
|
} |
|
|
|
ENDUTILITY |
|
|
|
} |
|
|
|
sub jump_to_editres { |
|
my ($cfile,$home,$switchserver,$uploaded,$symb) = @_; |
|
my $jscall; |
|
if ($switchserver) { |
|
if ($symb && $home) { |
|
$cfile = '/adm/switchserver?otherserver='.$home.'&role='. |
|
&HTML::Entities::encode($env{'request.role'},'"<>&').'&'. |
|
'symb='.&HTML::Entities::encode($env{'request.symb'},'"<>&'); |
|
if ($uploaded) { |
|
$cfile .= '&forceedit=1'; |
|
} |
|
$jscall = "need_switchserver('$cfile');"; |
|
} |
|
} else { |
|
if ($uploaded) { |
|
$cfile .= '?forceedit=1'; |
|
} |
|
$jscall = "go('$cfile')"; |
|
} |
|
return $jscall; |
|
} |
|
|
############################################## |
############################################## |
############################################## |
############################################## |