Merged from 1.9 ::

MDL-13444 :: removed the jQuery library and use direct JavaScript instead. That's much faster.
MDL-12078 :: Changed them calles from themewww to httpsthemwww (MDL-12078). MDL-13421 :: corrected left padding in admin block
This commit is contained in:
urs_hunkler 2008-02-12 21:29:16 +00:00
parent f3f2468cf5
commit 6b4f1f73e9
8 changed files with 109 additions and 33 deletions

View file

@ -34,9 +34,7 @@ if (!$inpopup) {
</div> <!-- end page div -->
<script type="text/javascript">
/* <![CDATA[ */
$(document).ready(function() {
script.init();
});
script.init();
/* ]]> */
</script>
</body>

View file

@ -4,13 +4,12 @@
<?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" />
<link rel="shortcut icon" href="<?php echo $CFG->httpsthemewww .'/'. current_theme() ?>/favicon.ico" />
<?php include($CFG->themedir.'/custom_corners/ui/chameleon.php'); ?>
<?php include("$CFG->javascript"); ?>
<?php include($CFG->themedir.'/custom_corners/js/jquery.php'); ?>
<?php
<?php
include($CFG->themedir.'/custom_corners/ui/chameleon.php');
include("$CFG->javascript");
include($CFG->themedir.'/custom_corners/js/js.php');
// check if page is opened within a popup window
if (function_exists('is_in_popup')) {
@ -33,10 +32,6 @@
//replace classlist with new one
$bodytags = str_replace($classes[0], 'class="'.implode(' ', $classlist).'"', $bodytags);
// $infooutput = '<div id="infocontent">&nbsp;</div>';
?>
</head>

View file

@ -0,0 +1,42 @@
/**
* CSSClass.js: utilities for manipulating the CSS class of an HTML element.
*
* This module defines a single global symbol named CSSClass. This object
* contains utility functions for working with the class attribute (className
* property) of HTML elements. All functions take two arguments: the element
* e being tested or manipulated and the CSS class c that is to be tested,
* added, or removed. If element e is a string, it is taken as an element
* id and passed to document.getElementById().
*/
var CSSClass = {}; // Create our namespace object
// Return true if element e is a member of the class c; false otherwise
CSSClass.is = function(e, c) {
if (typeof e == "string") e = document.getElementById(e); // element id
// Before doing a regexp search, optimize for a couple of common cases.
var classes = e.className;
if (!classes) return false; // Not a member of any classes
if (classes == c) return true; // Member of just this one class
// Otherwise, use a regular expression to search for c as a word by itself
// \b in a regular expression requires a match at a word boundary.
return e.className.search("\\b" + c + "\\b") != -1;
};
// Add class c to the className of element e if it is not already there.
CSSClass.add = function(e, c) {
if (typeof e == "string") e = document.getElementById(e); // element id
if (CSSClass.is(e, c)) return; // If already a member, do nothing
if (e.className) c = " " + c; // Whitespace separator, if needed
e.className += c; // Append the new class to the end
};
// Remove all occurrences (if any) of class c from the className of element e
CSSClass.remove = function(e, c) {
if (typeof e == "string") e = document.getElementById(e); // element id
// Search the className for all occurrences of c and replace with "".
// \s* matches any number of whitespace characters.
// "g" makes the regular expression match any number of occurrences
e.className = e.className.replace(new RegExp("\\b"+ c+"\\b\\s*", "g"), "");
};

View file

@ -0,0 +1,2 @@
var CSSClass={};CSSClass.is=function(e,c){if(typeof e=="string")e=document.getElementById(e);var classes=e.className;if(!classes)return false;if(classes==c)return true;return e.className.search("\\b"+c+"\\b")!=-1;};CSSClass.add=function(e,c){if(typeof e=="string")e=document.getElementById(e);if(CSSClass.is(e,c))return;if(e.className)c=" "+c;e.className+=c;};CSSClass.remove=function(e,c){if(typeof e=="string")e=document.getElementById(e);e.className=e.className.replace(new RegExp("\\b"+c+"\\b\\s*","g"),"");};

View file

@ -0,0 +1,45 @@
<script src="<?php echo $CFG->httpsthemewww ?>/custom_corners/js/CSSClass_min.js" type="text/javascript"></script>
<script type="text/javascript" charset="utf-8">
/* <![CDATA[ */
var script = {
corrections: function () {
if (top.user) {
top.document.getElementsByTagName('frameset')[0].rows = "117,30%,0,200";
}
// check for layouttabel and add haslayouttable class to body
var tagname = 'nolayouttable';
if (document.getElementById('middle-column')) {
var lc = document.getElementById('left-column');
var rc = document.getElementById('right-column');
if ( lc && rc ) {
tagname = 'haslayouttable rightandleftcolumn';
} else if (lc) {
tagname = 'haslayouttable onlyleftcolumn';
} else if (rc) {
tagname = 'haslayouttable onlyrightcolumn';
} else {
tagname = 'haslayouttable onlymiddlecolumn';
}
}
function setbodytag (tagname) {
var bd = document.getElementsByTagName('body')[0];
if (bd) {
CSSClass.add(bd, tagname);
} else {
setTimeout(function() { setbodytag(tagname) }, 30);
}
}
setTimeout(function() { setbodytag(tagname) }, 30);
},
init: function() {
script.corrections();
}
};
/* ]]> */
</script>

View file

@ -1,5 +1,5 @@
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="<?php echo $CFG->themewww ?>/custom_corners/styles_ie7.css" />
<link rel="stylesheet" type="text/css" href="<?php echo $CFG->httpsthemewww ?>/custom_corners/styles_ie7.css" />
<script type="text/javascript">
/* <![CDATA[ */
@ -8,7 +8,7 @@
</script>
<![endif]-->
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="<?php echo $CFG->themewww ?>/custom_corners/styles_ie6.css" />
<link rel="stylesheet" type="text/css" href="<?php echo $CFG->httpsthemewww ?>/custom_corners/styles_ie6.css" />
<script type="text/javascript">
/* <![CDATA[ */

View file

@ -50,6 +50,9 @@ div.sideblock ul.list li {
padding-left: 18px;
margin-left: 19px;
}
div.block_admin div.column.c0 {
margin-left: -18px;
}
#notes-index #content-i3,
#mod-chat-view #content-i3 {
padding-bottom: 15px;

View file

@ -1,18 +1,3 @@
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;
}
body {
font-size: 100%;
color: #333333;
@ -429,9 +414,15 @@ body#admin-roles-manage td.generalboxcontent table td {
padding-left: 0.5em;
padding-right: 0.5em;
}
body#admin-roles-override td.cell.c1 { padding-top: 0.5em; }
body#admin-roles-assign td.cell.c3 { padding-top: 0.5em; }
body#admin-roles-assign td.cell.c1 { padding-top: 0.5em; }
body#admin-roles-override td.cell.c1 {
padding-top: 0.5em;
}
body#admin-roles-assign td.cell.c3 {
padding-top: 0.5em;
}
body#admin-roles-assign td.cell.c1 {
padding-top: 0.5em;
}
body#admin-roles-override td.capcurrent {
background-color: #eeeeee;
border: 1px solid #cccccc;