custom_corners theme added

This commit is contained in:
urs_hunkler
2007-05-09 14:26:59 +00:00
parent ce3735d453
commit e82ea0a3d9
62 changed files with 6191 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
<h3>"Custom corners", the Moodle theme with graphics for transparent custom corners and borders.</h3>
<p>Custom corners use the technique from Roger Johansson. He describes how to build the graphices on his page "<a href="http://www.456bereastreet.com/archive/200506/customising_custom_corners_and_borders/">customising_custom_corners_and_borders</a>"</p>
<p>The Moodle implementation does not use JavaScript as describd in Roger Johansson's documentation. Moodle adds all neccessary divs to the pages when the option "$THEME->customcorners = true;" is set in config.php.</p>
<p>A Moodle Theme from <strong>Urs Hunkler, <a href="http://www.unodo.de" target="_blank">unodo</a></strong>.</p>
+190
View File
@@ -0,0 +1,190 @@
<?PHP // $Id$
////////////////////////////////////////////////////////////////////////////////
/// This file contains a few configuration variables that control
/// how Moodle uses this theme.
////////////////////////////////////////////////////////////////////////////////
$THEME->sheets = array('user_styles');
// $THEME->sheets = array('user_styles', 'adminpage_correct');
/// This variable is an array containing the names of all the
/// stylesheet files you want included in this theme, and in what order
////////////////////////////////////////////////////////////////////////////////
$THEME->standardsheets = array('styles_layout');
/// This variable can be set to an array containing
/// filenames from the *STANDARD* theme. If the
/// array exists, it will be used to choose the
/// files to include in the standard style sheet.
/// When false, then no files are used.
/// When true or NON-EXISTENT, then ALL standard files are used.
/// This parameter can be used, for example, to prevent
/// having to override too many classes.
/// Note that the trailing .css should not be included
/// eg $THEME->standardsheets = array('styles_layout','styles_fonts','styles_color');
////////////////////////////////////////////////////////////////////////////////
$THEME->parent = '';
/// This variable can be set to the name of a parent theme
/// which you want to have included before the current theme.
/// This can make it easy to make modifications to another
/// theme without having to actually change the files
/// If this variable is empty or false then a parent theme
/// is not used.
////////////////////////////////////////////////////////////////////////////////
$THEME->parentsheets = false;
/// This variable can be set to an array containing
/// filenames from a chosen *PARENT* theme. If the
/// array exists, it will be used to choose the
/// files to include in the standard style sheet.
/// When false, then no files are used.
/// When true or NON-EXISTENT, then ALL standard files are used.
/// This parameter can be used, for example, to prevent
/// having to override too many classes.
/// Note that the trailing .css should not be included
/// eg $THEME->parentsheets = array('styles_layout','styles_fonts','styles_color');
////////////////////////////////////////////////////////////////////////////////
$THEME->modsheets = true;
/// When this is enabled, then this theme will search for
/// files named "styles.php" inside all Activity modules and
/// include them. This allows modules to provide some basic
/// layouts so they work out of the box.
/// It is HIGHLY recommended to leave this enabled.
$THEME->blocksheets = true;
/// When this is enabled, then this theme will search for
/// files named "styles.php" inside all Block modules and
/// include them. This allows Blocks to provide some basic
/// layouts so they work out of the box.
/// It is HIGHLY recommended to leave this enabled.
$THEME->langsheets = false;
/// By setting this to true, then this theme will search for
/// a file named "styles.php" inside the current language
/// directory. This allows different languages to provide
/// different styles.
$THEME->block_l_min_width = 180;
$THEME->block_l_max_width = 210;
$THEME->block_r_min_width = 180;
$THEME->block_r_max_width = 210;;
/// These values define the min and max width of the left and right
/// sieblocks in the course pages. If not set or false the standard
/// values are taken.
$THEME->courseformatsheets = true;
/// When this is enabled, this theme will search for files
/// named "styles.php" inside all course formats and
/// include them. This allows course formats to provide
/// their own default styles.
$THEME->metainclude = true;
/// When this is enabled (or not set!) then Moodle will try
/// to include a file meta.php from this theme into the
/// <head></head> part of the page.
$THEME->standardmetainclude = true;
/// When this is enabled (or not set!) then Moodle will try
/// to include a file meta.php from the standard theme into the
/// <head></head> part of the page.
$THEME->parentmetainclude = false;
/// When this is enabled (or not set!) then Moodle will try
/// to include a file meta.php from the parent theme into the
/// <head></head> part of the page.
$THEME->navmenuwidth = 50;
/// You can use this to control the cutoff point for strings
/// in the navmenus (list of activities in popup menu etc)
/// Default is 50 characters wide.
$THEME->makenavmenulist = false;
/// By setting this to true, then you will have access to a
/// new variable in your header.html and footer.html called
/// $navmenulist ... this contains a simple XHTML menu of
/// all activities in the current course, mostly useful for
/// creating popup navigation menus and so on.
// $THEME->layouttable = array('middle', 'left', 'right');
$THEME->customcorners = true;
/// By setting this to true, Moodel will generate extra divs in
/// all pages to enable graphical rich custom corners and borders.
/// Please have a look at the README with more details.
$THEME->chameleonenabled = true;
// $THEME->chameleonenabled = false;
/// By setting this to false it disables editing of the stylsheets
/// this saves the overhead of loading chameleon on each page
/// viewed by a user who can edit pages. it is recommended to
/// set this to false once you're satisfied with your theme.
$THEME->chameleonteachereditenabled = false;
/// If you use chameleon as a course theme setting this to true
/// will allow teachers on that course to edit the theme.
$THEME->resource_mp3player_colors =
'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.
'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'.
'font=Arial&fontColour=3333FF&buffer=10&waitForPlay=no&autoPlay=yes';
/// With this you can control the colours of the "big" MP3 player
/// that is used for MP3 resources.
$THEME->filter_mediaplugin_colors =
'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.
'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'.
'waitForPlay=yes';
/// ...And this controls the small embedded player
$THEME->custompix = false;
/// If true, then this theme must have a "pix"
/// subdirectory that contains copies of all
/// files from the moodle/pix directory, plus a
/// "pix/mod" directory containing all the icons
/// for all the activity modules.
////////////////////////////////////////////////////////////////////////////////
?>
Binary file not shown.

After

Width:  |  Height:  |  Size: 894 B

+22
View File
@@ -0,0 +1,22 @@
<?php print_custom_corners_end(); ?>
</div> <!-- end div containerContent -->
<!-- START OF FOOTER -->
<?php global $CFG, $course; ?>
<div id="footer">
<?php print_custom_corners_start(); ?>
<?php
if (function_exists('page_doc_link')) {
echo '<p class="helplink">';
echo page_doc_link(get_string('moodledocslink'));
echo '</p>';
}
?>
<?php echo $loggedinas ?>
<?php echo $homelink;
?>
<?php print_custom_corners_end(); ?>
</div>
</div>
</body>
</html>
+97
View File
@@ -0,0 +1,97 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html<?php echo $direction ?>>
<head>
<?php echo $meta ?>
<meta name="keywords" content="moodle, <?php echo $title ?> " />
<title><?php echo $title ?></title>
<link rel="shortcut icon" href="<?php echo $CFG->themewww .'/'. current_theme() ?>/favicon.ico" />
<?php include('ui/chameleon.php'); ?>
<?php include("$CFG->javascript"); ?>
<?php include('js/jquery.php'); ?>
<?php require_once($CFG->dirroot.'/lib/custom_corners_lib.php'); ?>
<?php
global $PAGE;
// handle pages which get displayed wrong
// either no custom corners or too much
// all admin pages are build with the layout-table: sideblocks and content
if (($PAGE->type == 'admin') && (strstr($bodytags, ' nocoursepage'))) {
$bodytags = str_replace(' nocoursepage', '', $bodytags);
}
// list of pages using the layout-table to be able to view sideblocks
$excludelist = array('mod-chat-view', 'mod-data-view', 'mod-quiz-view');
if ((in_array($PAGE->type, $excludelist)) &&
(strstr($bodytags, ' nocoursepage'))) {
$bodytags = str_replace(' nocoursepage', '', $bodytags);
}
// add 'nocoursepage' to the list of CLASSes on the admin-roles pages
preg_match('/id="([^"]*)"/i', $bodytags, $ids);
if (($ids[1] == 'admin-roles-assign') || ($ids[1] == 'admin-roles-override')) {
// exclude roles called from the admin area (courseid 1)
// include user roles for the Moodle user settings called
// from the start page
if (($COURSE->id > 1) || ($_GET['contextid'] == 30)) {
preg_match('/class="([^"]*)"/i', $bodytags, $classes);
$classlist = explode (' ', $classes[1]);
if (!in_array('nocoursepage', $classlist)) {
array_push($classlist, 'nocoursepage');
$bodytags = str_replace($classes[0],
'class="'.implode(' ', $classlist).'"', $bodytags);
}
}
}
?>
<?php
$infooutput = '<pre>'.'pagetype: '.$PAGE->type.
"\n".$bodytags.
'</pre>';
?>
</head>
<body<?php
echo " $bodytags";
if ($focus) {
echo " onload=\"setfocus()\"";
};
?>>
<?php if(!empty($infooutput)) { ?>
<div id="infowrapper"><div id="infooverlay"><?php echo $infooutput; ?></div></div>
<?php } ?>
<div id="page">
<?php if ($home) { // This is what gets printed on the home page only
?>
<div id="header-home" class="clearfix">
<?php print_custom_corners_start(TRUE); ?>
<h1 class="headermain"><?php echo $heading ?></h1>
<div class="headermenu"><?php echo $menu ?></div>
<?php print_custom_corners_end(); ?>
</div>
<?php } else { // This is what gets printed on any other page with a heading
?>
<div id="header" class="clearfix">
<?php print_custom_corners_start(); ?>
<h1 class="headermain"><?php echo $heading ?></h1>
<div class="headermenu"><?php echo $menu ?></div>
<div class="navbar clearfix">
<?php if ($navigation) { // This is the navigation table with breadcrumbs
?>
<div class="breadcrumb"><?php print_navigation($navigation); ?></div>
<div class="navbutton"><?php echo $button; ?></div>
<?php } ?>
</div>
<?php print_custom_corners_end(); ?>
</div>
<?php } ?>
<!-- END OF HEADER -->
<div id="content">
<?php print_custom_corners_start(); ?>
File diff suppressed because one or more lines are too long
+18
View File
@@ -0,0 +1,18 @@
<script src="<?php echo $CFG->themewww .'/'. current_theme() ?>/js/jquery-latest.pack.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
init();
});
var init = function() {
window.setTimeout(function(){$('#infowrapper').click();}, 4000);
$('#infowrapper').toggle(function() {
$('#infooverlay').animate({height: 'toggle'}, "fast");
$(this).animate({opacity: 0.3}, "fast");
}, function() {
$('#infooverlay').animate({height: 'toggle'}, "fast");
$(this).animate({opacity: 0.9}, "fast");
});
};
</script>
+6
View File
@@ -0,0 +1,6 @@
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="<?php echo $CFG->themewww .'/'. current_theme() ?>/styles_ie7.css" />
<![endif]-->
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="<?php echo $CFG->themewww .'/'. current_theme() ?>/styles_ie6.css" />
<![endif]-->
Binary file not shown.

After

Width:  |  Height:  |  Size: 75 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 731 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 803 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 780 B

+19
View File
@@ -0,0 +1,19 @@
<?PHP /* $Id$ */
/// Every theme should contain a copy of this script. It lets us
/// set up variables and so on before we include the raw CSS files.
/// The output of this script should be a completely standard CSS file.
/// THERE SHOULD BE NO NEED TO MODIFY THIS FILE!! USE CONFIG.PHP INSTEAD.
$lifetime = 600; // Seconds to cache this stylesheet
$nomoodlecookie = true; // Cookies prevent caching, so don't use them
require_once("../../config.php"); // Load up the Moodle libraries
$themename = basename(dirname(__FILE__)); // Name of the folder we are in
$forceconfig = optional_param('forceconfig', '', PARAM_FILE); // Get config from this theme
$lang = optional_param('lang', '', PARAM_FILE); // Look for styles in this language
style_sheet_setup(time(), $lifetime, $themename, $forceconfig, $lang);
?>
+16
View File
@@ -0,0 +1,16 @@
/*
* These styles are ONLY included for IE 6 (via meta.php)
*/
div.navbar {
height: 2em;
}
div.sideblock ul.list li {
margin: 0.4em 0;
}
div.i1 {
min-width: 0;
}
div#header div.i3 {
min-width: 0;
}
+16
View File
@@ -0,0 +1,16 @@
/*
* These styles are ONLY included for IE 7 (via meta.php)
*/
div.navbar {
height: 2em;
}
div.sideblock ul.list li {
margin: 0.4em 0;
}
div.i1 {
min-width: 0;
}
div#header div.i3 {
min-width: 0;
}
@@ -0,0 +1,139 @@
<?php
class ChameleonCSS {
var $error;
var $base;
var $perm;
var $temp;
function ChameleonCSS($base, $perm, $temp) {
$this->base = $base;
$this->perm = $perm;
$this->temp = $temp;
}
function update($file, $content = '') {
if (!is_writable($this->base . $this->$file)) {
$this->error = $this->$file . ' is not writeable, the file permissions are currently ' . $this->getfilepermissions($this->$file);
return false;
}
if (!$fp = fopen($this->base . $this->$file, 'w')) {
$this->error = 'couldn\'t open file';
return false;
}
fwrite($fp, stripslashes($content));
fclose($fp);
return true;
}
function getfilepermissions($file) {
return substr(sprintf('%o', fileperms($this->base . $file)), -4);
}
function read() {
$permcss = file_get_contents($this->base . $this->perm);
$tempcss = file_get_contents($this->base . $this->temp);
if ($permcss === false || $tempcss === false) {
$this->error = 'Couldn\'t read file';
return false;
}
$permcss = trim($permcss);
$tempcss = trim($tempcss);
if ($tempcss == '') {
return $permcss;
}
return $this->_merge($permcss, $tempcss);
}
function _merge($permcss, $tempcss) {
$csssrcs = array($this->_toobj($permcss), $this->_toobj($tempcss));
$merged = array();
for ($i = 0; $i < 2; ++$i) {
foreach ($csssrcs[$i] as $sel => $rule) {
$newsel = false;
if (!isset($merged[$sel])) {
$merged[$sel] = array();
$newsel = true;
}
foreach ($rule as $prop => $value) {
$merged[$sel][$prop] = $value;
}
if ($i > 0 && !$newsel) {
foreach ($merged[$sel] as $prop => $value) {
if (!isset($csssrcs[$i][$sel][$prop])) {
unset($merged[$sel][$prop]);
}
}
}
}
if ($i > 0) {
foreach ($merged as $sel => $value) {
if (!isset($csssrcs[$i][$sel])) {
unset($merged[$sel]);
}
}
}
}
return $this->_tostr($merged);
}
function _toobj($cssstr) {
$cssobj = array();
$end = strpos($cssstr, '}');
while ($end !== false) {
$currule = substr($cssstr, 0, $end);
$parts = explode('{', $currule);
$selector = trim($parts[0]);
$rules = trim($parts[1]);
$rulesarr = explode(';', $rules);
$num = count($rulesarr);
for ($i = 0; $i < $num; ++$i) {
if (strpos($rulesarr[$i], ':') === false) {
break;
}
$rule = explode(':', $rulesarr[$i]);
$prop = trim($rule[0]);
$value = trim($rule[1]);
if (!isset($cssobj[$selector])) {
$cssobj[$selector] = array();
}
$cssobj[$selector][$prop] = $value;
}
$cssstr = substr($cssstr, $end + 1);
$end = strpos($cssstr, '}');
}
return $cssobj;
}
function _tostr($cssobj) {
$cssstr = '';
foreach ($cssobj as $sel => $rule) {
$cssstr .= "$sel {\n";
foreach ($rule as $prop => $value) {
$cssstr .= " $prop: $value;\n";
}
$cssstr .= "}\n";
}
return $cssstr;
}
}
?>
@@ -0,0 +1,85 @@
<?php
class ChameleonFileBrowser {
var $root;
var $path;
var $dir;
var $IMAGE_TYPES;
var $founddirs = array();
var $foundfiles = array();
function ChameleonFileBrowser() {
$this->IMAGE_TYPES = array('jpeg', 'jpg', 'gif', 'png');
$tmp = explode('/', str_replace('\\', '/', __FILE__));
array_pop($tmp);
array_pop($tmp);
$this->root = implode('/', $tmp);
$this->path = $this->sanitisepath($_GET['path']);
$this->dir = $this->root . '/' . $this->path;
}
function sanitisepath($path) {
if ($path == 'root') {
return 'pix';
}
if (substr($path, 0, 3) != 'pix') {
$this->send('<chameleon_error>Not a valid directory</chameleon_error>');
}
return preg_replace('/[.]+/', '', $path);
}
function isimage($file) {
if (strpos($file, '.') === false) {
return false;
}
return in_array(array_pop(explode('.', $file)), $this->IMAGE_TYPES);
}
function readfiles() {
if (!is_dir($this->dir)) {
$this->send('<chameleon_error>Not a valid directory</chameleon_error>');
}
$handle = opendir($this->dir);
while (false !== ($file = readdir($handle))) {
if ($file == '.' || $file == '..') {
continue;
}
if (is_dir($this->dir . '/' . $file)) {
$this->founddirs[] = $file;
} else if ($this->isimage($file)) {
$this->foundfiles[] = $file;
}
}
closedir($handle);
sort($this->founddirs, SORT_STRING);
sort($this->foundfiles, SORT_STRING);
$this->sendfiles();
}
function sendfiles() {
$out = "<files path=\"$this->path\">\n";
foreach ($this->founddirs as $file) {
$out .= " <file type=\"dir\">$this->path/$file</file>\n";
}
foreach ($this->foundfiles as $file) {
$out .= " <file type=\"img\">$this->path/$file</file>\n";
}
$out .= "</files>";
$this->send($out);
}
function send($out) {
header("Content-type: application/xml; charset=utf-8");
die($out);
}
}
?>
+32
View File
@@ -0,0 +1,32 @@
<?php
if (!empty($THEME->chameleonenabled)) {
$chameleon_isadmin = has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID));
$chameleon_isteacher = false;
if ($COURSE->id == SITEID) {
$chameleon_courseparam = '';
} else {
$chameleon_courseparam = '?id=' . $COURSE->id;
$chameleon_isteacher = !empty($COURSE->theme) and has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $COURSE->id));
}
if ($chameleon_isadmin or ($chameleon_isteacher and !empty($CFG->allowcoursethemes) and !empty($THEME->chameleonteachereditenabled))) {
// either we're an admin or we're a teacher and this is being used as the course theme
// if we're on a page using a course theme edit that, otherwise edit the main chameleon theme
// $chameleon_theme = (isset($CFG->coursetheme)) ? $CFG->coursetheme : $CFG->theme;
$chameleon_theme = current_theme();
?>
<style type="text/css"> @import '<?php echo "$CFG->themewww/$chameleon_theme" ?>/ui/chameleon_ui.css'; </style>
<script type="text/javascript" src="<?php echo "$CFG->themewww/$chameleon_theme/ui/css_query.js" ?>"> </script>
<script type="text/javascript" src="<?php echo "$CFG->themewww/$chameleon_theme/ui/sarissa.js" ?>"> </script>
<script type="text/javascript" src="<?php echo "$CFG->themewww/$chameleon_theme/ui/chameleon_js.php$chameleon_courseparam" ?>"> </script>
<?php
}
}
?>
File diff suppressed because it is too large Load Diff
+400
View File
@@ -0,0 +1,400 @@
/* sorry about the massive abuse of !important ;-) this tries to prevent user changes in CSS being
inherited by the user interface */
/* general box styles */
#chameleon-selector-box, #chameleon-style-box,
#chameleon-color-box, #chameleon-file-box,
#chameleon-export-box {
position: absolute !important;
left: 0; top: 0;
margin: 0 !important; padding: 0 !important;
width: 400px !important;
background: #eee !important;
border: 1px solid #ccc !important;
font: 9pt/1.4 arial,helvetica,sans-serif !important;
color: #000 !important;
}
/* reset */
#chameleon-selector-box div, #chameleon-style-box div, #chameleon-color-box div, #chameleon-file-box div {
margin: 0 !important; padding: 0 !important;
color: #000 !important;
font: 9pt/1.4 arial,helvetica,sans-serif !important;
border: 0 !important;
}
#chameleon-selector-box a, #chameleon-style-box a, #chameleon-color-box a, #chameleon-file-box a {
margin: 0 !important; padding: 0 !important;
color: #000 !important;
font: 9pt/1.4 arial,helvetica,sans-serif !important;
border: 0 !important;
background: none !important;
}
#chameleon-selector-box a, #chameleon-style-box a, #chameleon-color-box a, #chameleon-file-box a {
cursor: pointer !important;
}
#chameleon-selector-box table, #chameleon-style-box table, #chameleon-color-box table, #chameleon-file-box table,
#chameleon-selector-box tr, #chameleon-style-box tr, #chameleon-color-box tr, #chameleon-file-box tr,
#chameleon-selector-box td, #chameleon-style-box td, #chameleon-color-box td, #chameleon-file-box td,
#chameleon-selector-box th, #chameleon-style-box th, #chameleon-color-box th, #chameleon-file-box th {
padding: 0 !important;
color: #000 !important;
font: 9pt/1.4 arial,helvetica,sans-serif !important;
border: 0 !important;
background: none !important;
}
#chameleon-selector-box p, #chameleon-style-box p, #chameleon-color-box p, #chameleon-file-box p {
margin: 0 !important; padding: 5px 10px 0 10px !important;
color: #000 !important;
font: 9pt/1.4 arial,helvetica,sans-serif !important;
border: 0 !important;
background: none !important;
}
/* drag handles */
#chameleon-selector-box #chameleon-selector-box-handle,
#chameleon-style-box #chameleon-style-box-handle,
#chameleon-color-box #chameleon-color-box-handle,
#chameleon-file-box #chameleon-file-box-handle,
#chameleon-export-box #chameleon-export-box-handle {
width: 100% !important; min-height: 20px !important; _height: 20px !important;
background: #ddd !important;
}
#chameleon-selector-box #chameleon-selector-box-close,
#chameleon-style-box #chameleon-style-box-close,
#chameleon-color-box #chameleon-color-box-close,
#chameleon-file-box #chameleon-file-box-close {
padding: 1px 5px !important;
float: right !important;
cursor: pointer !important;
}
/* selector box specific stuff */
#chameleon-selector-box ol {
list-style-type: none !important;
margin: 0 !important; padding: 10px 20px 10px 10px !important;
}
#chameleon-selector-box li {
margin: 0 0 2px 0 !important; padding: 0 0 0 20px !important;
color: #000 !important;
font: 9pt/1.4 arial,helvetica,sans-serif !important;
background: url(images/tag.gif) no-repeat 0 0 !important;
position: relative !important;
}
#chameleon-selector-box li.row1 {
background-color: #eee !important;
}
#chameleon-selector-box #chameleon-selector-list li {
background-image: none !important;
}
#chameleon-selector-box #chameleon-selector-list {
border: 1px solid #ccc !important;
background: #f6f6f6 !important;
margin: 2px !important;
}
#chameleon-selector-box #chameleon-selector-list li {
margin: 2px !important; padding: 0 !important;
}
#chameleon-selector-box span {
padding: 1px 3px !important;
font: 9pt/1.4 arial,helvetica,sans-serif !important;
color: #000 !important;
cursor: pointer !important;
}
#chameleon-selector-box span.prop-value {
padding-right: 0 !important;
cursor: default !important;
position: absolute !important;
top: 0 !important; right: 0 !important;
}
* html #chameleon-selector-box span.prop-value {
padding-right: 15px !important;
}
#chameleon-selector-box span.active-selector {
background: #fff !important;
font-weight: bold !important;
}
#chameleon-selector-box #chameleon-style-overview-container {
background: #f6f6f6 url(images/grad.gif) repeat-x 0 100% !important;
}
#chameleon-selector-box #chameleon-style-overview {
margin: 0 !important; padding: 0 !important;
width: 100% !important;
border-collapse: collapse !important;
}
#chameleon-selector-box #chameleon-style-overview th.selector,
#chameleon-selector-box #chameleon-style-overview th.current-selector {
padding: 1px 5px !important;
background: #000 !important;
color: #fff !important;
font-weight: bold !important;
text-align: left !important;
}
#chameleon-selector-box #chameleon-style-overview th.current-selector,
#chameleon-selector-box #chameleon-style-overview td.current-selector {
border-top: 2px solid #f90 !important;
border-bottom: 2px solid #f90 !important;
}
#chameleon-selector-box #chameleon-style-overview td.selector,
#chameleon-selector-box #chameleon-style-overview td.current-selector {
padding: 1px 5px !important;
background: #000 !important;
color: #fff !important;
font-weight: normal !important;
text-align: left !important;
}
#chameleon-selector-box #chameleon-style-overview td.selector a,
#chameleon-selector-box #chameleon-style-overview td.current-selector a {
color: #f90 !important;
font-weight: bold !important;
}
#chameleon-selector-box #chameleon-style-overview td.prop {
padding: 1px 0 1px 5px !important;
width: 150px !important;
}
#chameleon-selector-box #chameleon-style-overview td.value {
padding: 1px 5px 1px 0 !important;
}
/* style box specific stuff */
#chameleon-style-box input.chameleon-input-text {
border: 1px solid #999 !important;
color: #000 !important;
background: #fff none !important;
}
#chameleon-style-box option, #chameleon-style-box select {
color: #000 !important;
background: #fff none !important;
}
#chameleon-style-box input.chameleon-input-text:focus {
border: 1px solid #000 !important;
background: #fff none !important;
}
#chameleon-selector-box input.chameleon-btn,
#chameleon-style-box input.chameleon-btn {
border: 1px solid #000 !important;
background: #aaa none !important;
color: #000 !important;
font-size: 9pt !important;
padding: 2px 5px !important; margin: 0 2px;
}
#chameleon-selector-box input.chameleon-btn:hover,
#chameleon-style-box input.chameleon-btn:hover {
background: #000 none !important;
color: #fff !important;
}
#chameleon-style-box table {
margin: 3px 3px 0 1px !important;
position: relative !important;
z-index: 2 !important;
}
#chameleon-style-box #chameleon-style-controls, #chameleon-selector-box #chameleon-selector-controls {
position: relative !important;
border: 1px solid #999 !important;
background: #f6f6f6 !important;
margin: -1px 3px 3px 2px !important;
z-index: 1 !important;
}
#chameleon-style-box #chameleon-style-tabs, #chameleon-selector-box #chameleon-selector-tabs {
position: relative !important;
margin: 3px 3px 0 3px !important;
z-index: 2 !important;
}
#chameleon-style-box td.chameleon-style-tab, #chameleon-selector-box td.chameleon-selector-tab {
border: 1px solid #999 !important;
border-bottom: 0 !important;
background: transparent url(images/inactive_tab.gif) 0 100% repeat-x !important;
padding: 2px 5px 1px 5px !important;
cursor: pointer !important;
}
#chameleon-style-box td.chameleon-style-tab-active, #chameleon-selector-box td.chameleon-selector-tab-active {
border: 1px solid #999 !important;
border-bottom: 0 !important;
background: transparent url(images/active_tab.gif) 0 100% repeat-x !important;
padding: 2px 5px 1px 5px !important;
}
#chameleon-style-controls td {
text-align: left !important;
padding: 2px !important;
}
#chameleon-style-controls td.label {
width: 120px !important;
text-align: right !important;
}
/* the open color picker/image browser icons */
#chameleon-style-controls #chameleon-style-controls-color-picker-color,
#chameleon-style-controls #chameleon-style-controls-color-picker-background-color,
#chameleon-style-controls #chameleon-style-controls-color-picker-border-color,
#chameleon-style-controls #chameleon-style-controls-color-picker-border-left-color,
#chameleon-style-controls #chameleon-style-controls-color-picker-border-right-color,
#chameleon-style-controls #chameleon-style-controls-color-picker-border-top-color,
#chameleon-style-controls #chameleon-style-controls-color-picker-border-bottom-color,
#chameleon-style-controls #chameleon-style-controls-background-image-picker {
width: 20px !important; height: 20px !important;
border: 1px solid #000 !important;
margin: 0 0 0 2px !important;
cursor: pointer !important;
}
/* color picker */
#chameleon-color-box #chameleon-color-palette {
position: relative !important;
margin: 10px 12px !important;
}
body #chameleon-color-box {
width: 312px !important;
}
#chameleon-color-box #chameleon-color-palette div {
cursor: pointer !important;
}
#chameleon-file-box table {
margin: 2px 0 !important;
}
#chameleon-file-box #chameleon-files-parent {
width: 100px !important;
cursor: pointer !important;
}
#chameleon-file-box #chameleon-files-location p {
font-weight: bold !important;
}
#chameleon-file-box #chameleon-files-location p span {
font-weight: normal !important;
}
#chameleon-file-box div p, #chameleon-file-box table p {
padding: 0 0 0 20px !important; margin: 5px 10px !important;
}
#chameleon-file-box div p {
background: url(images/image.gif) no-repeat 0 0 !important;
}
#chameleon-file-box div p.chameleon-image-folder {
background: url(images/folder.gif) no-repeat 0 0 !important;
}
#chameleon-file-box table p.chameleon-image-folder {
background: url(images/parent.gif) no-repeat 0 0 !important;
}
#chameleon-file-box div p span {
cursor: pointer !important;
}
/* the buttons */
#chameleon-selector-box input.chameleon-btn,
#chameleon-style-box input.chameleon-btn,
#chameleon-color-box input.chameleon-btn,
#chameleon-file-box input.chameleon-btn {
cursor: pointer !important;
margin-bottom: 3px !important;
}
#chameleon-selector-box p.chameleon-instructions, #chameleon-style-box p.chameleon-instructions {
font-size: 9pt !important;
padding: 10px !important;
}
#chameleon-status-msg {
text-align: center !important;
}
#chameleon-status-msg input {
margin-top: 2px !important;
}
div table#chameleon-status-msg {
position: relative !important;
background: #f6f6f6 !important;
width: 390px !important;
margin: 5px auto !important;
border: 1px solid #999 !important;
}
div table#chameleon-status-msg td.chameleon-ok {
background: #f6f6f6 url(images/ok.gif) no-repeat 50% 50% !important;
width: 25px !important; height: 25px !important;
}
div table#chameleon-status-msg td.chameleon-working {
background: #f6f6f6 url(images/working.gif) no-repeat 50% 50% !important;
width: 25px !important; height: 25px !important;
}
div table#chameleon-status-msg td.chameleon-notice {
background: #f6f6f6 url(images/notice.gif) no-repeat 50% 50% !important;
width: 25px !important; height: 25px !important;
}
div table#chameleon-status-msg td.chameleon-error {
background: #f6f6f6 url(images/error.gif) no-repeat 50% 50% !important;
width: 25px !important; height: 25px !important;
}
div#chameleon-launch-hotspots, div#chameleon-status-msg {
position: absolute !important;
top: 0 !important; left: 50% !important;
z-index: 2 !important;
background: #f6f6f6 !important;
border: 1px solid #999 !important;
padding: 2px 10px !important;
margin: 0 0 0 -200px !important;
cursor: pointer !important;
color: #000 !important;
width: 400px !important;
font: 9pt/1.4 arial,helvetica,sans-serif !important;
text-align: center !important;
}
body div#chameleon-launch-hotspots {
width: 200px !important;
margin: 0 0 0 -100px !important;
}
#chameleon-selector-box ul {
list-style-type: none !important;
}
+64
View File
@@ -0,0 +1,64 @@
<?php
require_once('../../../config.php');
require_once('../config.php');
if (empty($THEME->chameleonenabled)) {
die('CHAMELEON_ERROR Editing this theme has been disabled');
}
$id = optional_param('id', SITEID, PARAM_INT);
if (!$course = get_record('course', 'id', $id)) {
error('Incorrect course id');
}
course_setup($course); // we should not require login here
if ($id != SITEID and !empty($CFG->allowcoursethemes) and !empty($course->theme) and !empty($THEME->chameleonteachereditenabled)) {
if (!has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $id))) {
die('CHAMELEON_ERROR Either you are not logged in or you are not allowed to edit this theme');
}
} else if (!has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
die('CHAMELEON_ERROR Either you are not logged in or you are not allowed to edit this theme');
}
require_once('ChameleonCSS.class.php');
require_once('ChameleonFileBrowser.class.php');
if (isset($_GET['path'])) {
$fm = new ChameleonFileBrowser;
die($fm->readfiles());
}
$chameleon = new ChameleonCSS('../', 'user_styles.css', 'temp_user_styles.css');
if (isset($_POST['css'])) {
if (!isset($_GET['temp'])) {
if (!$chameleon->update('perm', $_POST['css'])) {
die('CHAMELEON_ERROR ' . $chameleon->error);
}
if (!$chameleon->update('temp')) {
die('CHAMELEON_ERROR ' . $chameleon->error);
}
} else {
if (!$chameleon->update('temp', $_POST['css'])) {
die('CHAMELEON_ERROR ' . $chameleon->error);
}
}
} else {
$css = $chameleon->read();
if ($css === false) {
echo 'CHAMELEON_ERROR ' . $chameleon->error;
} else {
echo $css;
}
}
?>
+356
View File
@@ -0,0 +1,356 @@
/*
cssQuery, version 2.0.2 (2005-08-19)
Copyright: 2004-2005, Dean Edwards (http://dean.edwards.name/)
License: http://creativecommons.org/licenses/LGPL/2.1/
*/
// the following functions allow querying of the DOM using CSS selectors
var cssQuery = function() {
var version = "2.0.2";
// -----------------------------------------------------------------------
// main query function
// -----------------------------------------------------------------------
var $COMMA = /\s*,\s*/;
var cssQuery = function($selector, $$from) {
try {
var $match = [];
var $useCache = arguments.callee.caching && !$$from;
var $base = ($$from) ? ($$from.constructor == Array) ? $$from : [$$from] : [document];
// process comma separated selectors
var $$selectors = parseSelector($selector).split($COMMA), i;
for (i = 0; i < $$selectors.length; i++) {
// convert the selector to a stream
$selector = _toStream($$selectors[i]);
// faster chop if it starts with id (MSIE only)
if (isMSIE && $selector.slice(0, 3).join("") == " *#") {
$selector = $selector.slice(2);
$$from = _msie_selectById([], $base, $selector[1]);
} else $$from = $base;
// process the stream
var j = 0, $token, $filter, $arguments, $cacheSelector = "";
while (j < $selector.length) {
$token = $selector[j++];
$filter = $selector[j++];
$cacheSelector += $token + $filter;
// some pseudo-classes allow arguments to be passed
// e.g. nth-child(even)
$arguments = "";
if ($selector[j] == "(") {
while ($selector[j++] != ")" && j < $selector.length) {
$arguments += $selector[j];
}
$arguments = $arguments.slice(0, -1);
$cacheSelector += "(" + $arguments + ")";
}
// process a token/filter pair use cached results if possible
$$from = ($useCache && cache[$cacheSelector]) ?
cache[$cacheSelector] : select($$from, $token, $filter, $arguments);
if ($useCache) cache[$cacheSelector] = $$from;
}
$match = $match.concat($$from);
}
delete cssQuery.error;
return $match;
} catch ($error) {
cssQuery.error = $error;
return [];
}};
// -----------------------------------------------------------------------
// public interface
// -----------------------------------------------------------------------
cssQuery.toString = function() {
return "function cssQuery() {\n [version " + version + "]\n}";
};
// caching
var cache = {};
cssQuery.caching = false;
cssQuery.clearCache = function($selector) {
if ($selector) {
$selector = _toStream($selector).join("");
delete cache[$selector];
} else cache = {};
};
// allow extensions
var modules = {};
var loaded = false;
cssQuery.addModule = function($name, $script) {
if (loaded) eval("$script=" + String($script));
modules[$name] = new $script();;
};
// hackery
cssQuery.valueOf = function($code) {
return $code ? eval($code) : this;
};
// -----------------------------------------------------------------------
// declarations
// -----------------------------------------------------------------------
var selectors = {};
var pseudoClasses = {};
// a safari bug means that these have to be declared here
var AttributeSelector = {match: /\[([\w-]+(\|[\w-]+)?)\s*(\W?=)?\s*([^\]]*)\]/};
var attributeSelectors = [];
// -----------------------------------------------------------------------
// selectors
// -----------------------------------------------------------------------
// descendant selector
selectors[" "] = function($results, $from, $tagName, $namespace) {
// loop through current selection
var $element, i, j;
for (i = 0; i < $from.length; i++) {
// get descendants
var $subset = getElementsByTagName($from[i], $tagName, $namespace);
// loop through descendants and add to results selection
for (j = 0; ($element = $subset[j]); j++) {
if (thisElement($element) && compareNamespace($element, $namespace))
$results.push($element);
}
}
};
// ID selector
selectors["#"] = function($results, $from, $id) {
// loop through current selection and check ID
var $element, j;
for (j = 0; ($element = $from[j]); j++) if ($element.id == $id) $results.push($element);
};
// class selector
selectors["."] = function($results, $from, $className) {
// create a RegExp version of the class
$className = new RegExp("(^|\\s)" + $className + "(\\s|$)");
// loop through current selection and check class
var $element, i;
for (i = 0; ($element = $from[i]); i++)
if ($className.test($element.className)) $results.push($element);
};
// pseudo-class selector
selectors[":"] = function($results, $from, $pseudoClass, $arguments) {
// retrieve the cssQuery pseudo-class function
var $test = pseudoClasses[$pseudoClass], $element, i;
// loop through current selection and apply pseudo-class filter
if ($test) for (i = 0; ($element = $from[i]); i++)
// if the cssQuery pseudo-class function returns "true" add the element
if ($test($element, $arguments)) $results.push($element);
};
// -----------------------------------------------------------------------
// pseudo-classes
// -----------------------------------------------------------------------
pseudoClasses["link"] = function($element) {
var $document = getDocument($element);
if ($document.links) for (var i = 0; i < $document.links.length; i++) {
if ($document.links[i] == $element) return true;
}
};
pseudoClasses["visited"] = function($element) {
// can't do this without jiggery-pokery
};
// -----------------------------------------------------------------------
// DOM traversal
// -----------------------------------------------------------------------
// IE5/6 includes comments (LOL) in it's elements collections.
// so we have to check for this. the test is tagName != "!". LOL (again).
var thisElement = function($element) {
return ($element && $element.nodeType == 1 && $element.tagName != "!") ? $element : null;
};
// return the previous element to the supplied element
// previousSibling is not good enough as it might return a text or comment node
var previousElementSibling = function($element) {
while ($element && ($element = $element.previousSibling) && !thisElement($element)) continue;
return $element;
};
// return the next element to the supplied element
var nextElementSibling = function($element) {
while ($element && ($element = $element.nextSibling) && !thisElement($element)) continue;
return $element;
};
// return the first child ELEMENT of an element
// NOT the first child node (though they may be the same thing)
var firstElementChild = function($element) {
return thisElement($element.firstChild) || nextElementSibling($element.firstChild);
};
var lastElementChild = function($element) {
return thisElement($element.lastChild) || previousElementSibling($element.lastChild);
};
// return child elements of an element (not child nodes)
var childElements = function($element) {
var $childElements = [];
$element = firstElementChild($element);
while ($element) {
$childElements.push($element);
$element = nextElementSibling($element);
}
return $childElements;
};
// -----------------------------------------------------------------------
// browser compatibility
// -----------------------------------------------------------------------
// all of the functions in this section can be overwritten. the default
// configuration is for IE. The functions below reflect this. standard
// methods are included in a separate module. It would probably be better
// the other way round of course but this makes it easier to keep IE7 trim.
var isMSIE = true;
var isXML = function($element) {
var $document = getDocument($element);
return (typeof $document.mimeType == "unknown") ?
/\.xml$/i.test($document.URL) :
Boolean($document.mimeType == "XML Document");
};
// return the element's containing document
var getDocument = function($element) {
return $element.ownerDocument || $element.document;
};
var getElementsByTagName = function($element, $tagName) {
return ($tagName == "*" && $element.all) ? $element.all : $element.getElementsByTagName($tagName);
};
var compareTagName = function($element, $tagName, $namespace) {
if ($tagName == "*") return thisElement($element);
if (!compareNamespace($element, $namespace)) return false;
if (!isXML($element)) $tagName = $tagName.toUpperCase();
return $element.tagName == $tagName;
};
var compareNamespace = function($element, $namespace) {
return !$namespace || ($namespace == "*") || ($element.scopeName == $namespace);
};
var getTextContent = function($element) {
return $element.innerText;
};
function _msie_selectById($results, $from, id) {
var $match, i, j;
for (i = 0; i < $from.length; i++) {
if ($match = $from[i].all.item(id)) {
if ($match.id == id) $results.push($match);
else if ($match.length != null) {
for (j = 0; j < $match.length; j++) {
if ($match[j].id == id) $results.push($match[j]);
}
}
}
}
return $results;
};
// for IE5.0
if (![].push) Array.prototype.push = function() {
for (var i = 0; i < arguments.length; i++) {
this[this.length] = arguments[i];
}
return this.length;
};
// -----------------------------------------------------------------------
// query support
// -----------------------------------------------------------------------
// select a set of matching elements.
// "from" is an array of elements.
// "token" is a character representing the type of filter
// e.g. ">" means child selector
// "filter" represents the tag name, id or class name that is being selected
// the function returns an array of matching elements
var $NAMESPACE = /\|/;
function select($$from, $token, $filter, $arguments) {
if ($NAMESPACE.test($filter)) {
$filter = $filter.split($NAMESPACE);
$arguments = $filter[0];
$filter = $filter[1];
}
var $results = [];
if (selectors[$token]) {
selectors[$token]($results, $$from, $filter, $arguments);
}
return $results;
};
// -----------------------------------------------------------------------
// parsing
// -----------------------------------------------------------------------
// convert css selectors to a stream of tokens and filters
// it's not a real stream. it's just an array of strings.
var $STANDARD_SELECT = /^[^\s>+~]/;
var $$STREAM = /[\s#.:>+~()@]|[^\s#.:>+~()@]+/g;
function _toStream($selector) {
if ($STANDARD_SELECT.test($selector)) $selector = " " + $selector;
return $selector.match($$STREAM) || [];
};
var $WHITESPACE = /\s*([\s>+~(),]|^|$)\s*/g;
var $IMPLIED_ALL = /([\s>+~,]|[^(]\+|^)([#.:@])/g;
var parseSelector = function($selector) {
return $selector
// trim whitespace
.replace($WHITESPACE, "$1")
// e.g. ".class1" --> "*.class1"
.replace($IMPLIED_ALL, "$1*$2");
};
var Quote = {
toString: function() {return "'"},
match: /^('[^']*')|("[^"]*")$/,
test: function($string) {
return this.match.test($string);
},
add: function($string) {
return this.test($string) ? $string : this + $string + this;
},
remove: function($string) {
return this.test($string) ? $string.slice(1, -1) : $string;
}
};
var getText = function($text) {
return Quote.remove($text);
};
var $ESCAPE = /([\/()[\]?{}|*+-])/g;
function regEscape($string) {
return $string.replace($ESCAPE, "\\$1");
};
// -----------------------------------------------------------------------
// modules
// -----------------------------------------------------------------------
// -------- >> insert modules here for packaging << -------- \\
loaded = true;
// -----------------------------------------------------------------------
// return the query function
// -----------------------------------------------------------------------
return cssQuery;
}(); // cssQuery
Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 463 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

+648
View File
@@ -0,0 +1,648 @@
/**
* ====================================================================
* About
* ====================================================================
* Sarissa is an ECMAScript library acting as a cross-browser wrapper for native XML APIs.
* The library supports Gecko based browsers like Mozilla and Firefox,
* Internet Explorer (5.5+ with MSXML3.0+), Konqueror, Safari and a little of Opera
* @version 0.9.6.1
* @author: Manos Batsis, mailto: mbatsis at users full stop sourceforge full stop net
* ====================================================================
* Licence
* ====================================================================
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 or
* the GNU Lesser General Public License version 2.1 as published by
* the Free Software Foundation (your choice between the two).
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License or GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* or GNU Lesser General Public License along with this program; if not,
* write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* or visit http://www.gnu.org
*
*/
/**
* <p>Sarissa is a utility class. Provides "static" methods for DOMDocument and
* XMLHTTP objects, DOM Node serializatrion to XML strings and other goodies.</p>
* @constructor
*/
function Sarissa(){};
/** @private */
Sarissa.PARSED_OK = "Document contains no parsing errors";
/**
* Tells you whether transformNode and transformNodeToObject are available. This functionality
* is contained in sarissa_ieemu_xslt.js and is deprecated. If you want to control XSLT transformations
* use the XSLTProcessor
* @deprecated
* @type boolean
*/
Sarissa.IS_ENABLED_TRANSFORM_NODE = false;
/**
* tells you whether XMLHttpRequest (or equivalent) is available
* @type boolean
*/
Sarissa.IS_ENABLED_XMLHTTP = false;
/**
* tells you whether selectNodes/selectSingleNode is available
* @type boolean
*/
Sarissa.IS_ENABLED_SELECT_NODES = false;
var _sarissa_iNsCounter = 0;
var _SARISSA_IEPREFIX4XSLPARAM = "";
var _SARISSA_HAS_DOM_IMPLEMENTATION = document.implementation && true;
var _SARISSA_HAS_DOM_CREATE_DOCUMENT = _SARISSA_HAS_DOM_IMPLEMENTATION && document.implementation.createDocument;
var _SARISSA_HAS_DOM_FEATURE = _SARISSA_HAS_DOM_IMPLEMENTATION && document.implementation.hasFeature;
var _SARISSA_IS_MOZ = _SARISSA_HAS_DOM_CREATE_DOCUMENT && _SARISSA_HAS_DOM_FEATURE;
var _SARISSA_IS_SAFARI = (navigator.userAgent && navigator.vendor && (navigator.userAgent.toLowerCase().indexOf("applewebkit") != -1 || navigator.vendor.indexOf("Apple") != -1));
var _SARISSA_IS_IE = document.all && window.ActiveXObject && navigator.userAgent.toLowerCase().indexOf("msie") > -1 && navigator.userAgent.toLowerCase().indexOf("opera") == -1;
if(!window.Node || !window.Node.ELEMENT_NODE){
var Node = {ELEMENT_NODE: 1, ATTRIBUTE_NODE: 2, TEXT_NODE: 3, CDATA_SECTION_NODE: 4, ENTITY_REFERENCE_NODE: 5, ENTITY_NODE: 6, PROCESSING_INSTRUCTION_NODE: 7, COMMENT_NODE: 8, DOCUMENT_NODE: 9, DOCUMENT_TYPE_NODE: 10, DOCUMENT_FRAGMENT_NODE: 11, NOTATION_NODE: 12};
};
// IE initialization
if(_SARISSA_IS_IE){
// for XSLT parameter names, prefix needed by IE
_SARISSA_IEPREFIX4XSLPARAM = "xsl:";
// used to store the most recent ProgID available out of the above
var _SARISSA_DOM_PROGID = "";
var _SARISSA_XMLHTTP_PROGID = "";
/**
* Called when the Sarissa_xx.js file is parsed, to pick most recent
* ProgIDs for IE, then gets destroyed.
* @param idList an array of MSXML PROGIDs from which the most recent will be picked for a given object
* @param enabledList an array of arrays where each array has two items; the index of the PROGID for which a certain feature is enabled
*/
pickRecentProgID = function (idList, enabledList){
// found progID flag
var bFound = false;
for(var i=0; i < idList.length && !bFound; i++){
try{
var oDoc = new ActiveXObject(idList[i]);
o2Store = idList[i];
bFound = true;
for(var j=0;j<enabledList.length;j++)
if(i <= enabledList[j][1])
Sarissa["IS_ENABLED_"+enabledList[j][0]] = true;
}catch (objException){
// trap; try next progID
};
};
if (!bFound)
throw "Could not retreive a valid progID of Class: " + idList[idList.length-1]+". (original exception: "+e+")";
idList = null;
return o2Store;
};
// pick best available MSXML progIDs
_SARISSA_DOM_PROGID = pickRecentProgID(["Msxml2.DOMDocument.5.0", "Msxml2.DOMDocument.4.0", "Msxml2.DOMDocument.3.0", "MSXML2.DOMDocument", "MSXML.DOMDocument", "Microsoft.XMLDOM"], [["SELECT_NODES", 2],["TRANSFORM_NODE", 2]]);
_SARISSA_XMLHTTP_PROGID = pickRecentProgID(["Msxml2.XMLHTTP.5.0", "Msxml2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"], [["XMLHTTP", 4]]);
_SARISSA_THREADEDDOM_PROGID = pickRecentProgID(["Msxml2.FreeThreadedDOMDocument.5.0", "MSXML2.FreeThreadedDOMDocument.4.0", "MSXML2.FreeThreadedDOMDocument.3.0"]);
_SARISSA_XSLTEMPLATE_PROGID = pickRecentProgID(["Msxml2.XSLTemplate.5.0", "Msxml2.XSLTemplate.4.0", "MSXML2.XSLTemplate.3.0"], [["XSLTPROC", 2]]);
// we dont need this anymore
pickRecentProgID = null;
//============================================
// Factory methods (IE)
//============================================
// see non-IE version
Sarissa.getDomDocument = function(sUri, sName){
var oDoc = new ActiveXObject(_SARISSA_DOM_PROGID);
// if a root tag name was provided, we need to load it in the DOM
// object
if (sName){
// if needed, create an artifical namespace prefix the way Moz
// does
if (sUri){
oDoc.loadXML("<a" + _sarissa_iNsCounter + ":" + sName + " xmlns:a" + _sarissa_iNsCounter + "=\"" + sUri + "\" />");
// don't use the same prefix again
++_sarissa_iNsCounter;
}
else
oDoc.loadXML("<" + sName + "/>");
};
return oDoc;
};
// see non-IE version
Sarissa.getParseErrorText = function (oDoc) {
var parseErrorText = Sarissa.PARSED_OK;
if(oDoc.parseError != 0){
parseErrorText = "XML Parsing Error: " + oDoc.parseError.reason +
"\nLocation: " + oDoc.parseError.url +
"\nLine Number " + oDoc.parseError.line + ", Column " +
oDoc.parseError.linepos +
":\n" + oDoc.parseError.srcText +
"\n";
for(var i = 0; i < oDoc.parseError.linepos;i++){
parseErrorText += "-";
};
parseErrorText += "^\n";
};
return parseErrorText;
};
// see non-IE version
Sarissa.setXpathNamespaces = function(oDoc, sNsSet) {
oDoc.setProperty("SelectionLanguage", "XPath");
oDoc.setProperty("SelectionNamespaces", sNsSet);
};
/**
* Basic implementation of Mozilla's XSLTProcessor for IE.
* Reuses the same XSLT stylesheet for multiple transforms
* @constructor
*/
XSLTProcessor = function(){
this.template = new ActiveXObject(_SARISSA_XSLTEMPLATE_PROGID);
this.processor = null;
};
/**
* Impoprts the given XSLT DOM and compiles it to a reusable transform
* @argument xslDoc The XSLT DOMDocument to import
*/
XSLTProcessor.prototype.importStylesheet = function(xslDoc){
// convert stylesheet to free threaded
var converted = new ActiveXObject(_SARISSA_THREADEDDOM_PROGID);
converted.loadXML(xslDoc.xml);
this.template.stylesheet = converted;
this.processor = this.template.createProcessor();
// (re)set default param values
this.paramsSet = new Array();
};
/**
* Transform the given XML DOM
* @argument sourceDoc The XML DOMDocument to transform
* @return The transformation result as a DOM Document
*/
XSLTProcessor.prototype.transformToDocument = function(sourceDoc){
this.processor.input = sourceDoc;
var outDoc = new ActiveXObject(_SARISSA_DOM_PROGID);
this.processor.output = outDoc;
this.processor.transform();
return outDoc;
};
/**
* Set global XSLT parameter of the imported stylesheet
* @argument nsURI The parameter namespace URI
* @argument name The parameter base name
* @argument value The new parameter value
*/
XSLTProcessor.prototype.setParameter = function(nsURI, name, value){
/* nsURI is optional but cannot be null */
if(nsURI){
this.processor.addParameter(name, value, nsURI);
}else{
this.processor.addParameter(name, value);
};
/* update updated params for getParameter */
if(!this.paramsSet[""+nsURI]){
this.paramsSet[""+nsURI] = new Array();
};
this.paramsSet[""+nsURI][name] = value;
};
/**
* Gets a parameter if previously set by setParameter. Returns null
* otherwise
* @argument name The parameter base name
* @argument value The new parameter value
* @return The parameter value if reviously set by setParameter, null otherwise
*/
XSLTProcessor.prototype.getParameter = function(nsURI, name){
nsURI = nsURI || "";
if(nsURI in this.paramsSet && name in this.paramsSet[nsURI]){
return this.paramsSet[nsURI][name];
}else{
return null;
};
};
}
else{ /* end IE initialization, try to deal with real browsers now ;-) */
if(_SARISSA_HAS_DOM_CREATE_DOCUMENT){
/**
* <p>Ensures the document was loaded correctly, otherwise sets the
* parseError to -1 to indicate something went wrong. Internal use</p>
* @private
*/
Sarissa.__handleLoad__ = function(oDoc){
if (!oDoc.documentElement || oDoc.documentElement.tagName == "parsererror")
oDoc.parseError = -1;
Sarissa.__setReadyState__(oDoc, 4);
};
/**
* <p>Attached by an event handler to the load event. Internal use.</p>
* @private
*/
_sarissa_XMLDocument_onload = function(){
Sarissa.__handleLoad__(this);
};
/**
* <p>Sets the readyState property of the given DOM Document object.
* Internal use.</p>
* @private
* @argument oDoc the DOM Document object to fire the
* readystatechange event
* @argument iReadyState the number to change the readystate property to
*/
Sarissa.__setReadyState__ = function(oDoc, iReadyState){
oDoc.readyState = iReadyState;
if (oDoc.onreadystatechange != null && typeof oDoc.onreadystatechange == "function")
oDoc.onreadystatechange();
};
Sarissa.getDomDocument = function(sUri, sName){
var oDoc = document.implementation.createDocument(sUri?sUri:"", sName?sName:"", null);
oDoc.addEventListener("load", _sarissa_XMLDocument_onload, false);
return oDoc;
};
if(window.XMLDocument){
/**
* <p>Emulate IE's onreadystatechange attribute</p>
*/
XMLDocument.prototype.onreadystatechange = null;
/**
* <p>Emulates IE's readyState property, which always gives an integer from 0 to 4:</p>
* <ul><li>1 == LOADING,</li>
* <li>2 == LOADED,</li>
* <li>3 == INTERACTIVE,</li>
* <li>4 == COMPLETED</li></ul>
*/
XMLDocument.prototype.readyState = 0;
/**
* <p>Emulate IE's parseError attribute</p>
*/
XMLDocument.prototype.parseError = 0;
// NOTE: setting async to false will only work with documents
// called over HTTP (meaning a server), not the local file system,
// unless you are using Moz 1.4+.
// BTW the try>catch block is for 1.4; I haven't found a way to check if
// the property is implemented without
// causing an error and I dont want to use user agent stuff for that...
var _SARISSA_SYNC_NON_IMPLEMENTED = false;// ("async" in XMLDocument.prototype) ? false: true;
/**
* <p>Keeps a handle to the original load() method. Internal use and only
* if Mozilla version is lower than 1.4</p>
* @private
*/
XMLDocument.prototype._sarissa_load = XMLDocument.prototype.load;
/**
* <p>Overrides the original load method to provide synchronous loading for
* Mozilla versions prior to 1.4, using an XMLHttpRequest object (if
* async is set to false)</p>
* @returns the DOM Object as it was before the load() call (may be empty)
*/
XMLDocument.prototype.load = function(sURI) {
var oDoc = document.implementation.createDocument("", "", null);
Sarissa.copyChildNodes(this, oDoc);
this.parseError = 0;
Sarissa.__setReadyState__(this, 1);
try {
if(this.async == false && _SARISSA_SYNC_NON_IMPLEMENTED) {
var tmp = new XMLHttpRequest();
tmp.open("GET", sURI, false);
tmp.send(null);
Sarissa.__setReadyState__(this, 2);
Sarissa.copyChildNodes(tmp.responseXML, this);
Sarissa.__setReadyState__(this, 3);
}
else {
this._sarissa_load(sURI);
};
}
catch (objException) {
this.parseError = -1;
}
finally {
if(this.async == false){
Sarissa.__handleLoad__(this);
};
};
return oDoc;
};
}//if(window.XMLDocument)
else if(document.implementation && document.implementation.hasFeature && document.implementation.hasFeature('LS', '3.0')){
Document.prototype.async = true;
Document.prototype.onreadystatechange = null;
Document.prototype.parseError = 0;
Document.prototype.load = function(sURI) {
var parser = document.implementation.createLSParser(this.async ? document.implementation.MODE_ASYNCHRONOUS : document.implementation.MODE_SYNCHRONOUS, null);
if(this.async){
var self = this;
parser.addEventListener("load",
function(e) {
self.readyState = 4;
Sarissa.copyChildNodes(e.newDocument, self.documentElement, false);
self.onreadystatechange.call();
},
false);
};
try {
var oDoc = parser.parseURI(sURI);
}
catch(e){
this.parseError = -1;
};
if(!this.async)
Sarissa.copyChildNodes(oDoc, this.documentElement, false);
return oDoc;
};
/**
* <p>Factory method to obtain a new DOM Document object</p>
* @argument sUri the namespace of the root node (if any)
* @argument sUri the local name of the root node (if any)
* @returns a new DOM Document
*/
Sarissa.getDomDocument = function(sUri, sName){
return document.implementation.createDocument(sUri?sUri:"", sName?sName:"", null);
};
};
};//if(_SARISSA_HAS_DOM_CREATE_DOCUMENT)
};
//==========================================
// Common stuff
//==========================================
if(!window.DOMParser){
/*
* DOMParser is a utility class, used to construct DOMDocuments from XML strings
* @constructor
*/
DOMParser = function() {
};
if(_SARISSA_IS_SAFARI){
/**
* Construct a new DOM Document from the given XMLstring
* @param sXml the given XML string
* @param contentType the content type of the document the given string represents (one of text/xml, application/xml, application/xhtml+xml).
* @return a new DOM Document from the given XML string
*/
DOMParser.prototype.parseFromString = function(sXml, contentType){
if(contentType.toLowerCase() != "application/xml"){
throw "Cannot handle content type: \"" + contentType + "\"";
};
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET", "data:text/xml;charset=utf-8," + encodeURIComponent(str), false);
xmlhttp.send(null);
return xmlhttp.responseXML;
};
}else if(Sarissa.getDomDocument && Sarissa.getDomDocument() && "loadXML" in Sarissa.getDomDocument()){
DOMParser.prototype.parseFromString = function(sXml, contentType){
var doc = Sarissa.getDomDocument();
doc.loadXML(sXml);
return doc;
};
};
};
if(window.XMLHttpRequest){
Sarissa.IS_ENABLED_XMLHTTP = true;
}
else if(_SARISSA_IS_IE){
/**
* Emulate XMLHttpRequest
* @constructor
*/
XMLHttpRequest = function() {
return new ActiveXObject(_SARISSA_XMLHTTP_PROGID);
};
Sarissa.IS_ENABLED_XMLHTTP = true;
};
if(!window.document.importNode && _SARISSA_IS_IE){
try{
/**
* Implements importNode for the current window document in IE using innerHTML.
* Testing showed that DOM was multiple times slower than innerHTML for this,
* sorry folks. If you encounter trouble (who knows what IE does behind innerHTML)
* please gimme a call.
* @param oNode the Node to import
* @param bChildren whether to include the children of oNode
* @returns the imported node for further use
*/
window.document.importNode = function(oNode, bChildren){
var importNode = document.createElement("div");
if(bChildren)
importNode.innerHTML = Sarissa.serialize(oNode);
else
importNode.innerHTML = Sarissa.serialize(oNode.cloneNode(false));
return importNode.firstChild;
};
}catch(e){};
};
if(!Sarissa.getParseErrorText){
/**
* <p>Returns a human readable description of the parsing error. Usefull
* for debugging. Tip: append the returned error string in a &lt;pre&gt;
* element if you want to render it.</p>
* <p>Many thanks to Christian Stocker for the initial patch.</p>
* @argument oDoc The target DOM document
* @returns The parsing error description of the target Document in
* human readable form (preformated text)
*/
Sarissa.getParseErrorText = function (oDoc){
var parseErrorText = Sarissa.PARSED_OK;
if(oDoc && oDoc.parseError && oDoc.parseError != 0){
/*moz*/
if(oDoc.documentElement.tagName == "parsererror"){
parseErrorText = oDoc.documentElement.firstChild.data;
parseErrorText += "\n" + oDoc.documentElement.firstChild.nextSibling.firstChild.data;
}/*konq*/
else{
parseErrorText = Sarissa.getText(oDoc.documentElement);/*.getElementsByTagName("h1")[0], false) + "\n";
parseErrorText += Sarissa.getText(oDoc.documentElement.getElementsByTagName("body")[0], false) + "\n";
parseErrorText += Sarissa.getText(oDoc.documentElement.getElementsByTagName("pre")[0], false);*/
};
};
return parseErrorText;
};
};
Sarissa.getText = function(oNode, deep){
var s = "";
var nodes = oNode.childNodes;
for(var i=0; i < nodes.length; i++){
var node = nodes[i];
var nodeType = node.nodeType;
if(nodeType == Node.TEXT_NODE || nodeType == Node.CDATA_SECTION_NODE){
s += node.data;
}else if(deep == true
&& (nodeType == Node.ELEMENT_NODE
|| nodeType == Node.DOCUMENT_NODE
|| nodeType == Node.DOCUMENT_FRAGMENT_NODE)){
s += Sarissa.getText(node, true);
};
};
return s;
};
if(window.XMLSerializer){
/**
* <p>Factory method to obtain the serialization of a DOM Node</p>
* @returns the serialized Node as an XML string
*/
Sarissa.serialize = function(oDoc){
var s = null;
if(oDoc){
s = oDoc.innerHTML?oDoc.innerHTML:(new XMLSerializer()).serializeToString(oDoc);
};
return s;
};
}else{
if(Sarissa.getDomDocument && (Sarissa.getDomDocument("","foo", null)).xml){
// see non-IE version
Sarissa.serialize = function(oDoc) {
var s = null;
if(oDoc){
s = oDoc.innerHTML?oDoc.innerHTML:oDoc.xml;
};
return s;
};
/**
* Utility class to serialize DOM Node objects to XML strings
* @constructor
*/
XMLSerializer = function(){};
/**
* Serialize the given DOM Node to an XML string
* @param oNode the DOM Node to serialize
*/
XMLSerializer.prototype.serializeToString = function(oNode) {
return oNode.xml;
};
};
};
/**
* strips tags from a markup string
*/
Sarissa.stripTags = function (s) {
return s.replace(/<[^>]+>/g,"");
};
/**
* <p>Deletes all child nodes of the given node</p>
* @argument oNode the Node to empty
*/
Sarissa.clearChildNodes = function(oNode) {
// need to check for firstChild due to opera 8 bug with hasChildNodes
while(oNode.firstChild){
oNode.removeChild(oNode.firstChild);
};
};
/**
* <p> Copies the childNodes of nodeFrom to nodeTo</p>
* <p> <b>Note:</b> The second object's original content is deleted before
* the copy operation, unless you supply a true third parameter</p>
* @argument nodeFrom the Node to copy the childNodes from
* @argument nodeTo the Node to copy the childNodes to
* @argument bPreserveExisting whether to preserve the original content of nodeTo, default is false
*/
Sarissa.copyChildNodes = function(nodeFrom, nodeTo, bPreserveExisting) {
if((!nodeFrom) || (!nodeTo)){
throw "Both source and destination nodes must be provided";
};
if(!bPreserveExisting){
Sarissa.clearChildNodes(nodeTo);
};
var ownerDoc = nodeTo.nodeType == Node.DOCUMENT_NODE ? nodeTo : nodeTo.ownerDocument;
var nodes = nodeFrom.childNodes;
if(ownerDoc.importNode && (!_SARISSA_IS_IE)) {
for(var i=0;i < nodes.length;i++) {
nodeTo.appendChild(ownerDoc.importNode(nodes[i], true));
};
}
else{
for(var i=0;i < nodes.length;i++) {
nodeTo.appendChild(nodes[i].cloneNode(true));
};
};
};
/**
* <p> Moves the childNodes of nodeFrom to nodeTo</p>
* <p> <b>Note:</b> The second object's original content is deleted before
* the move operation, unless you supply a true third parameter</p>
* @argument nodeFrom the Node to copy the childNodes from
* @argument nodeTo the Node to copy the childNodes to
* @argument bPreserveExisting whether to preserve the original content of nodeTo, default is
*/
Sarissa.moveChildNodes = function(nodeFrom, nodeTo, bPreserveExisting) {
if((!nodeFrom) || (!nodeTo)){
throw "Both source and destination nodes must be provided";
};
if(!bPreserveExisting){
Sarissa.clearChildNodes(nodeTo);
};
var nodes = nodeFrom.childNodes;
// if within the same doc, just move, else copy and delete
if(nodeFrom.ownerDocument == nodeTo.ownerDocument){
while(nodeFrom.firstChild){
nodeTo.appendChild(nodeFrom.firstChild);
};
}else{
var ownerDoc = nodeTo.nodeType == Node.DOCUMENT_NODE ? nodeTo : nodeTo.ownerDocument;
if(ownerDoc.importNode && (!_SARISSA_IS_IE)) {
for(var i=0;i < nodes.length;i++) {
nodeTo.appendChild(ownerDoc.importNode(nodes[i], true));
};
}else{
for(var i=0;i < nodes.length;i++) {
nodeTo.appendChild(nodes[i].cloneNode(true));
};
};
Sarissa.clearChildNodes(nodeFrom);
};
};
/**
* <p>Serialize any object to an XML string. All properties are serialized using the property name
* as the XML element name. Array elements are rendered as <code>array-item</code> elements,
* using their index/key as the value of the <code>key</code> attribute.</p>
* @argument anyObject the object to serialize
* @argument objectName a name for that object
* @return the XML serializationj of the given object as a string
*/
Sarissa.xmlize = function(anyObject, objectName, indentSpace){
indentSpace = indentSpace?indentSpace:'';
var s = indentSpace + '<' + objectName + '>';
var isLeaf = false;
if(!(anyObject instanceof Object) || anyObject instanceof Number || anyObject instanceof String
|| anyObject instanceof Boolean || anyObject instanceof Date){
s += Sarissa.escape(""+anyObject);
isLeaf = true;
}else{
s += "\n";
var itemKey = '';
var isArrayItem = anyObject instanceof Array;
for(var name in anyObject){
s += Sarissa.xmlize(anyObject[name], (isArrayItem?"array-item key=\""+name+"\"":name), indentSpace + " ");
};
s += indentSpace;
};
return s += (objectName.indexOf(' ')!=-1?"</array-item>\n":"</" + objectName + ">\n");
};
/**
* Escape the given string chacters that correspond to the five predefined XML entities
* @param sXml the string to escape
*/
Sarissa.escape = function(sXml){
return sXml.replace(/&/g, "&amp;")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;")
.replace(/"/g, "&quot;")
.replace(/'/g, "&apos;");
};
/**
* Unescape the given string. This turns the occurences of the predefined XML
* entities to become the characters they represent correspond to the five predefined XML entities
* @param sXml the string to unescape
*/
Sarissa.unescape = function(sXml){
return sXml.replace(/&apos;/g,"'")
.replace(/&quot;/g,"\"")
.replace(/&gt;/g,">")
.replace(/&lt;/g,"<")
.replace(/&amp;/g,"&");
};
//
+941
View File
@@ -0,0 +1,941 @@
div#infowrapper {
position: fixed;
overflow: auto;
top: 1px;
left: 25%;
right: 25%;
width: 450px;
padding: 3px;
opacity: 0.9;
color: #000;
background-color: #ffffcc;
z-index: 200;
border: 2px solid #FF0;
min-height: 2px;
}
/*div#infooverlay {
height: 0;
}*/
body {
font-size: 100%;
color: #333333;
font-family: verdana, arial, helvetica, sans-serif;
margin: 0;
padding: 0;
background-image: url(pix/bg.jpg);
}
div#page {
margin: 0 4%;
padding-top: 2px;
width: auto;
}
div.clearer {
clear: both;
}
a:link {
color: #116699;
}
a:visited {
color: #AA2200;
}
a:hover {
color: #0066FF;
}
table.generaltable {
background-color: #EEEEEE;
}
img.resize {
width: 1em;
height: 1em;
}
p.helplink {
margin: 0.5em 0;
}
h1.headermain {
color: #0066ff;
margin: 10px 0 10px 5px;
font-size: 180%;
}
h2.main {
background-image: url(pix/header.png);
background-repeat: repeat-x;
background-position: center top;
padding: 5px 5px 6px;
color: #444;
font-size: 120%;
border-right-width: 1px;
border-left-width: 1px;
border-right-style: solid;
border-left-style: solid;
border-right-color: #F1ECE6;
border-left-color: #F1ECE6;
}
h2.headingblock {
background-image: url(pix/header.png);
background-repeat: repeat-x;
background-position: center top;
padding: 5px 5px 6px;
color: #444;
font-size: 100%;
border-right-width: 1px;
border-left-width: 1px;
border-style: none solid;
border-right-color: #F1ECE6;
border-left-color: #F1ECE6;
}
.loginbox {
border: 1px solid #F1ECE6;
}
div.block_login form.loginform div.c1 {
margin: 0.3em 0;
}
div.noticebox {
background-color: #EEEEEE;
border-width: 1px;
border-style: solid;
border-color: #FFFFFF #DDDDDD #DDDDDD #FFFFFF;
}
div.generalbox {
border: 1px solid #F1ECE6;
}
table.generalbox {
border-top-width: 1px;
border-style: solid none none;
border-top-color: #DDDDDD;
}
table.generaltable th.header {
padding-bottom: 10px;
border-width: 1px;
border-style: solid;
border-color: #EEEEEE #CCCCCC #CCCCCC #EEEEEE;
}
table.generaltable td.cell {
white-space: normal;
border-color: #DDDDDD;
}
div.informationbox {
background-color: #EEEEEE;
border-width: 1px;
border-style: solid;
border-color: #FFFFFF #DDDDDD #DDDDDD #FFFFFF;
}
table.userinfobox {
border: 1px solid #DDDDDD;
}
div.errorbox {
background-color: #E88;
border-color: #660000;
}
p.copyright {
text-align: center;
}
div.headermenu {
font-size: 0.75em;
position: absolute;
top: 12px;
right: 12px;
/* background-color: #cccccc;
*/
padding: 3px;
}
div.headermenu div.logininfo {
margin-bottom: 0.2em;
}
div.breadcrumb {
font-size: 0.8em;
padding-left: 0.3em;
}
div.navbar div.navbutton form {
float: left;
}
div.navbar div.navbutton {
margin-top: 3px;
}
div.navbar {
padding: 3px 3px 6px 0;
margin-top: 5px;
clear: both;
background-image: url(pix/header.png);
background-repeat: repeat-x;
background-position: center bottom;
border-right-width: 1px;
border-left-width: 1px;
border-style: none solid;
border-right-color: #cccccc;
border-left-color: #cccccc;
}
div#footer {
font-size: 0.75em;
padding: 0;
margin: 5px auto;
border-style: none;
}
div#content {
padding: 0;
font-size: 0.75em;
line-height: 1.6em;
clear: both;
border-top-style: none;
border-bottom-style: none;
}
ul.section li {
margin: 0.2em 0;
}
div.sideblock div.content * {
text-align: left;
}
div.sideblock ul.list span.c1 {
padding-left: 0;
}
div.sideblock div.title h2 {
font-size: 1em;
line-height: 1.1em;
}
div.sideblock div.header {
padding: 0;
border-style: none;
border-color: #DDDDDD #CCCCCC #88DD55 #DDDDDD;
}
div.sideblock div.content {
padding: 0.3em 0.3em 0.5em;
border-style: none;
border-right-color: #DDDDDD;
border-bottom-color: #DDDDDD;
border-left-color: #FFFFFF;
}
div.sideblock table.minicalendar td.day {
text-align: center;
font-size: 0.9em;
}
div.sideblock table.minicalendar {
border-style: none;
}
body#admin-lang h2.main {
font-size: 1em;
text-align: left;
}
body#course-index table.generalbox {
background-color: #EEEEEE;
border-width: 1px;
border-style: solid;
border-color: #FFFFFF #DDDDDD #DDDDDD #FFFFFF;
}
table.minicalendar td.today {
line-height: 1.4em;
border: 2px solid #0066FF;
}
div.sideblock table.minicalendar tr.weekdays {
font-size: 0.8em;
}
div.coursebox {
border-style: solid;
border-color: #F1ECE6;
}
div.courseboxcontent {
background-color: #EEEEEE;
border-width: 1px;
border-style: solid;
border-color: #FFFFFF #DDDDDD #DDDDDD #FFFFFF;
}
td.courseboxcontent {
background-color: #EEEEEE;
border-width: 1px;
border-style: solid;
border-color: #FFFFFF #DDDDDD #DDDDDD #FFFFFF;
}
.tabrow td {
border: 1px solid #88DD55;
}
.tabrow td.selected {
border-top-width: 1px;
border-right-width: 1px;
border-left-width: 1px;
border-style: solid solid none;
border-top-color: #88DD55;
border-right-color: #88DD55;
border-left-color: #88DD55;
}
.sideblock .content .message {
text-align: left;
}
.sideblock .header .hide-show img.hide-show-image {
background-image: url(../../pix/t/switch_minus.gif);
background-repeat: no-repeat;
margin-top: 0;
}
.sideblock.hidden .header .hide-show img.hide-show-image {
background-image: url(../../pix/t/switch_plus.gif);
background-repeat: no-repeat;
margin-top: 0;
}
#calendar .event_global {
background-color: #D6F8CD;
border-color: #D6F8CD;
}
.minicalendar .event_global {
background-color: #D6F8CD;
border-color: #D6F8CD;
}
.block_calendar_month .event_global {
background-color: #D6F8CD;
border-color: #D6F8CD;
}
#calendar .event_course {
background-color: #FFD3BD;
border-color: #FFD3BD;
}
.minicalendar .event_course {
background-color: #FFD3BD;
border-color: #FFD3BD;
}
.block_calendar_month .event_course {
background-color: #FFD3BD;
border-color: #FFD3BD;
}
#calendar .event_group {
background-color: #FEE7AE;
border-color: #FEE7AE;
}
.minicalendar .event_group {
background-color: #FEE7AE;
border-color: #FEE7AE;
}
.block_calendar_month .event_group {
background-color: #FEE7AE;
border-color: #FEE7AE;
}
#calendar .event_user {
background-color: #DCE7EC;
border-color: #DCE7EC;
}
.minicalendar .event_user {
background-color: #DCE7EC;
border-color: #DCE7EC;
}
.block_calendar_month .event_user {
background-color: #DCE7EC;
border-color: #DCE7EC;
}
div.sideblock div.calendar-controls span.current {
text-align: center;
}
body.admin table.generaltable {
width: 100%;
}
body#course-view tr.section td.side {
border-style: none;
}
body#course-view tr.section td.content {
padding-bottom: 1.5em;
border-style: none;
}
div.que {
border: 1px solid #F1ECE6;
}
td.sitetopiccontent {
border-style: none;
}
body#site-index td.categoryboxcontent {
border-style: none;
}
div.sideblock span.icon {
display: block;
float: left;
margin-right: 0.3em;
}
div.sideblock ul.list li {
clear: left;
}
td.categoryboxcontent {
background-color: #EEEEEE;
border-width: 1px;
border-style: solid;
border-color: #FFFFFF #DDDDDD #DDDDDD #FFFFFF;
}
body#admin-roles-manage td.generalboxcontent table td {
padding-left: 0.5em;
padding-right: 0.5em;
}
div.breadcrumb span.sep {
font-family: arial, sans-serif;
color: #0066FF;
}
div.calendar-controls span.previous {
font-family: arial, sans-serif;
}
div.calendar-controls span.next {
font-family: arial, sans-serif;
text-align: right;
}
div.sideblock div.header div.commands {
height: 16px;
background-color: #ffffff;
}
fieldset.adminsettings span.form-shortname {
color: #cccccc;
font-size: 90%;
}
fieldset.adminsettings {
background-color: #EEEEEE;
border-width: 1px;
border-style: solid;
border-color: #FFFFFF #DDDDDD #DDDDDD #FFFFFF;
}
form.mform div.textarea textarea {
width: 35em;
}
div#header-home {
position: relative;
margin: 0;
padding: 5px 5px 0 0;
background-color: #F1ECE6;
}
div#header {
position: relative;
}
td#left-column {
padding-top: 10px;
padding-right: 5px;
}
td#right-column {
padding-top: 10px;
padding-left: 5px;
}
table#layout-table {
margin-top: 0;
border-collapse: collapse;
border-spacing: 0;
}
table#layout-table td#middle-column {
padding: 10px 0 0;
}
div.sitetopic {
border-style: none;
}
div.categorybox {
border-style: solid;
}
div.mdescr div.images {
text-align: center;
}
fieldset {
border-style: none;
}
body#admin-auth td#middle-column {
padding-bottom: 10px;
}
div.sideblock h2 {
color: #666666;
}
table.cal_popup_bg {
background-color: #ffffff;
border-color: #F1ECE6;
}
div.homelink {
margin: 2px 0 0;
padding: 0;
}
div.logininfo {
white-space: nowrap;
}
div.sideblock div.header div.bt div {
background-image: url(pix/box.png);
background-repeat: no-repeat;
background-position: 0 0;
background-color: transparent;
height: 12px;
left: -13px;
position: relative;
width: 13px;
}
div.sideblock div.header div.bt {
background-image: url(pix/box.png);
background-repeat: no-repeat;
background-position: 100% 0;
margin: 0 0 0 13px;
height: 12px;
background-color: transparent;
}
div.sideblock div.header div.i1 {
background-image: url(pix/borders.png);
background-repeat: repeat-y;
background-position: 0 0;
background-color: transparent;
padding: 0 0 0 12px;
}
div.sideblock div.header div.i2 {
background-image: url(pix/borders.png);
background-repeat: repeat-y;
background-attachment: scroll;
background-position: 100% 0;
background-color: transparent;
padding: 0 12px 0 0;
}
div.sideblock div.header div.i3 {
padding: 0 0 5px;
background-color: #ffffff;
border-top-width: 1px;
border-right-width: 0;
border-bottom-width: 1px;
border-style: solid none;
border-top-color: #ffffff;
border-bottom-color: #ffffff;
}
div.sideblock div.i1 {
background-image: url(pix/beige_borders.png);
background-repeat: repeat-y;
background-position: 0 0;
background-color: transparent;
padding: 0 0 0 12px;
}
div.sideblock div.i2 {
background-image: url(pix/beige_borders.png);
background-repeat: repeat-y;
background-attachment: scroll;
background-position: 100% 0;
background-color: transparent;
padding: 0 12px 0 0;
}
div.sideblock div.i3 {
background-color: #f1ece6;
padding: 0;
border-style: none;
}
div.sideblock div.bb div {
background-image: url(pix/beige_box.png);
background-repeat: no-repeat;
background-position: 0 100%;
background-color: transparent;
height: 12px;
left: -13px;
position: relative;
width: 13px;
}
div.sideblock div.bb {
background-image: url(pix/beige_box.png);
background-repeat: no-repeat;
background-position: 100% 100%;
margin: 0 0 0 13px;
height: 12px;
background-color: transparent;
}
td#left-column div.hidden div.header {
border-bottom-style: none;
}
td#right-column div.hidden div.header {
border-bottom-style: none;
}
td#middle-column div.bt div {
background-image: url(pix/box.png);
background-repeat: no-repeat;
background-position: 0 0;
background-color: transparent;
height: 12px;
left: -13px;
position: relative;
width: 13px;
}
td#middle-column div.bt {
background-image: url(pix/box.png);
background-repeat: no-repeat;
background-position: 100% 0;
margin: 0 0 0 13px;
height: 12px;
background-color: transparent;
}
td#middle-column div.i1 {
background-image: url(pix/borders.png);
background-repeat: repeat-y;
background-position: 0 0;
background-color: transparent;
padding: 0 0 0 12px;
}
td#middle-column div.i2 {
background-image: url(pix/borders.png);
background-repeat: repeat-y;
background-attachment: scroll;
background-position: 100% 0;
background-color: transparent;
padding: 0 12px 0 0;
}
td#middle-column div.i3 {
background-color: #FFFFFF;
padding: 0 10px;
border-width: 1px 0;
border-style: solid;
border-color: #FFFFFF;
}
td#middle-column div.bb div {
background-image: url(pix/box.png);
background-repeat: no-repeat;
background-position: 0 100%;
background-color: transparent;
height: 12px;
left: -13px;
position: relative;
width: 13px;
}
td#middle-column div.bb {
background-image: url(pix/box.png);
background-repeat: no-repeat;
background-position: 100% 100%;
margin: 0 0 0 13px;
height: 12px;
background-color: transparent;
}
td#middle-column div.bt div {
z-index: 10;
}
div#footer div.bt div {
background-image: url(pix/beige_box.png);
background-repeat: no-repeat;
background-position: 0 0;
background-color: transparent;
height: 12px;
left: -13px;
position: relative;
width: 13px;
}
div#footer div.bt {
background-image: url(pix/beige_box.png);
background-repeat: no-repeat;
background-position: 100% 0;
margin: 0 0 0 13px;
height: 12px;
background-color: transparent;
text-align: left;
}
div#footer div.i1 {
background-image: url(pix/beige_borders.png);
background-repeat: repeat-y;
background-position: 0 0;
background-color: transparent;
padding: 0 0 0 12px;
}
div#footer div.i2 {
background-image: url(pix/beige_borders.png);
background-repeat: repeat-y;
background-attachment: scroll;
background-position: 100% 0;
background-color: transparent;
padding: 0 12px 0 0;
}
div#footer div.i3 {
background-color: #f1ece6;
padding: 0 10px;
border-width: 1px 0;
border-style: solid;
border-color: #f1ece6;
}
div#footer div.bb div {
background-image: url(pix/beige_box.png);
background-repeat: no-repeat;
background-position: 0 100%;
background-color: transparent;
height: 12px;
left: -13px;
position: relative;
width: 13px;
}
div#footer div.bb {
background-image: url(pix/beige_box.png);
background-repeat: no-repeat;
background-position: 100% 100%;
margin: 0 0 0 13px;
height: 12px;
background-color: transparent;
text-align: left;
}
div#header div.bt div {
background-image: url(pix/beige_box.png);
background-repeat: no-repeat;
background-position: 0 0;
background-color: transparent;
height: 12px;
left: -13px;
position: relative;
width: 13px;
}
div#header div.bt {
background-image: url(pix/beige_box.png);
background-repeat: no-repeat;
background-position: 100% 0;
margin: 0 0 0 13px;
height: 12px;
background-color: transparent;
}
div#header div.i1 {
background-image: url(pix/beige_borders.png);
background-repeat: repeat-y;
background-position: 0 0;
background-color: transparent;
padding: 0 0 0 12px;
}
div#header div.i2 {
background-image: url(pix/beige_borders.png);
background-repeat: repeat-y;
background-attachment: scroll;
background-position: 100% 0;
background-color: transparent;
padding: 0 12px 0 0;
}
div#header div.i3 {
background-color: #F1ECE6;
padding: 0 10px;
border-top-width: 1px;
border-bottom-width: 1px;
border-style: solid none;
border-top-color: #F1ECE6;
border-bottom-color: #F1ECE6;
}
div#header div.bb div {
background-image: url(pix/beige_box.png);
background-repeat: no-repeat;
background-position: 0 100%;
background-color: transparent;
height: 12px;
left: -13px;
position: relative;
width: 13px;
}
div#header div.bb {
background-image: url(pix/beige_box.png);
background-repeat: no-repeat;
background-position: 100% 100%;
margin: 0 0 0 13px;
height: 12px;
background-color: transparent;
}
div#header-home div.bt div {
background-image: url(pix/beige_box.png);
background-repeat: no-repeat;
background-position: 0 0;
background-color: transparent;
height: 12px;
left: -13px;
position: relative;
width: 13px;
}
div#header-home div.bt {
background-image: url(pix/beige_box.png);
background-repeat: no-repeat;
background-position: 100% 0;
margin: 0 0 0 13px;
height: 12px;
background-color: transparent;
}
div#header-home div.i1 {
background-image: url(pix/beige_borders.png);
background-repeat: repeat-y;
background-position: 0 0;
background-color: transparent;
padding: 0 0 0 12px;
}
div#header-home div.i2 {
background-image: url(pix/beige_borders.png);
background-repeat: repeat-y;
background-attachment: scroll;
background-position: 100% 0;
background-color: transparent;
padding: 0 12px 0 0;
}
div#header-home div.i3 {
background-color: #F1ECE6;
padding: 0 10px;
border-top-width: 1px;
border-bottom-width: 1px;
border-style: solid none;
border-top-color: #F1ECE6;
border-bottom-color: #F1ECE6;
}
div#header-home div.bb div {
background-image: url(pix/beige_box.png);
background-repeat: no-repeat;
background-position: 0 100%;
background-color: transparent;
height: 12px;
left: -13px;
position: relative;
width: 13px;
}
div#header-home div.bb {
background-image: url(pix/beige_box.png);
background-repeat: no-repeat;
background-position: 100% 100%;
margin: 0 0 0 13px;
height: 12px;
background-color: transparent;
}
body.nocoursepage div#content div.bt div {
background-image: url(pix/box.png);
background-repeat: no-repeat;
background-position: 0 0;
background-color: transparent;
height: 12px;
left: -13px;
position: relative;
width: 13px;
}
body.nocoursepage div#content div.bt {
background-image: url(pix/box.png);
background-repeat: no-repeat;
background-position: 100% 0;
margin: 0 0 0 13px;
height: 12px;
background-color: transparent;
}
body.nocoursepage div#content div.i1 {
background-image: url(pix/borders.png);
background-repeat: repeat-y;
background-position: 0 0;
background-color: transparent;
padding: 0 0 0 12px;
}
body.nocoursepage div#content div.i2 {
background-image: url(pix/borders.png);
background-repeat: repeat-y;
background-attachment: scroll;
background-position: 100% 0;
background-color: transparent;
padding: 0 12px 0 0;
}
body.nocoursepage div#content div.i3 {
background-color: #FFFFFF;
padding: 0 10px;
border-width: 1px 0;
border-style: solid;
border-color: #FFFFFF;
}
body.nocoursepage div#content div.bb div {
background-image: url(pix/box.png);
background-repeat: no-repeat;
background-position: 0 100%;
background-color: transparent;
height: 12px;
left: -13px;
position: relative;
width: 13px;
}
body.nocoursepage div#content div.bb {
background-image: url(pix/box.png);
background-repeat: no-repeat;
background-position: 100% 100%;
margin: 0 0 0 13px;
height: 12px;
background-color: transparent;
}
td#middle-column tr.section {
background-image: url(pix/bottom_shadow_to_top.png);
background-repeat: repeat-x;
background-position: center bottom;
border: 1px solid #F1ECE6;
}
td#middle-column tr.separator {
background-image: none;
height: 1.5em;
border-style: none;
}
fieldset.clearfix {
background-image: url(pix/bottom_shadow_to_top.png);
background-repeat: repeat-x;
background-position: center bottom;
}
th.header {
background-image: url(pix/header.png);
background-repeat: repeat-x;
background-position: center bottom;
background-color: #FFFFFF;
padding-bottom: 5px;
}
form.mform legend {
color: #0066ff;
font-size: 120%;
}
div.coursebox div.summary {
width: 45%;
}
table.forumpost tr.header {
background-image: url(pix/header.png);
background-repeat: repeat-x;
background-position: left bottom;
}
table.forumpost {
margin-top: 20px;
border-style: none;
}
table.forumpost tr.header td.topic {
padding-bottom: 10px;
border-style: none;
}
table.forumpost div.commands {
background-image: url(pix/bottom_shadow_to_top.png);
background-repeat: repeat-x;
background-position: center bottom;
padding-bottom: 7px;
border-top-width: 1px;
border-bottom-width: 1px;
border-style: solid none;
border-top-color: #0066FF;
border-bottom-color: #F1ECE6;
}
table.forumheaderlist {
border-color: #F1ECE6;
}
table.forumheaderlist tr.discussion td {
border-color: #F1ECE6;
}
td.content {
border-right-width: 1px;
border-right-style: solid;
border-right-color: #F1ECE6;
}
div.glossarydisplay table.glossarypost {
border-color: #F1ECE6;
}
div.glossarydisplay div.entrybox {
border-color: #F1ECE6;
}
div.glossarydisplay hr {
color: #F1ECE6;
background-image: url(pix/bottom_shadow.png);
background-repeat: repeat-x;
background-position: left top;
height: 10px;
border-style: none;
}
div.mwiki div.tabtree {
margin-top: 10px;
}
table#categoryquestions {
margin-top: 10px;
}
div.que div.info {
padding-bottom: 7px;
}
div.que div.ablock {
padding-bottom: 5px;
border-bottom-width: 1px;
border-bottom-style: solid;
border-top-style: none;
border-bottom-color: #0066FF;
}
div.que div.qtext {
background-image: url(pix/bottom_shadow_to_top.png);
background-repeat: repeat-x;
background-position: center bottom;
padding-bottom: 7px;
margin-bottom: 10px;
padding-left: 5px;
border-left-width: 1px;
border-left-style: solid;
border-left-color: #F1ECE6;
}
div.que div.content {
margin: 5px 0 0;
}
body#course-user div.section {
border: 1px solid #F1ECE6;
}
body#course-user div.tabtree {
margin-bottom: 10px;
}