Browse files

Comments from Andy:

config.php contains a new option,  $THEME->chameleonteachereditenabled  by default this is false, preventing teachers from editing chameleon course themes.  css.php has been changed a little to make use of this new property, it now also checks $CFG->allowcoursethemes before letting a teacher edit anything.

There have been some bug fixes in the handling of border shorthands.

Some workarounds to avoid a pretty big IE bug - the addRule method in IE's version of DOM 2 CSS  (which I use to create the live preview of changes), can crash the browser if the selector being added contains certain characters. Now as chameleon generates the preview it checks the selectors against a list of allowed characters - if the selector contains any character not on the list it will be ignored.

I don't think I'm quite there yet, but I made a bit of a change in some of the event handling code which means support for IE 5.5 seems to be getting closer :-)
  • Loading branch information...
1 parent c19c05c commit 5452c7255cd14d6b42919e8e83c81c4b0419c7c1 urs_hunkler committed Feb 21, 2006
View
273 theme/chameleon/config.php
@@ -1,134 +1,139 @@
-<?PHP // $Id$
-
-////////////////////////////////////////////////////////////////////////////////
-/// This file contains a few configuration variables that control
-/// how Moodle uses this theme.
-////////////////////////////////////////////////////////////////////////////////
-
-
-$THEME->sheets = array('styles_layout', 'user_styles');
-
-/// 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->navmenuwidth = 5;
-
-/// 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->chameleonenabled = true;
-
-/// 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->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 = true;
-
-/// 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.
-////////////////////////////////////////////////////////////////////////////////
-
-?>
+<?PHP // $Id$
+
+////////////////////////////////////////////////////////////////////////////////
+/// This file contains a few configuration variables that control
+/// how Moodle uses this theme.
+////////////////////////////////////////////////////////////////////////////////
+
+
+$THEME->sheets = array('styles_layout', 'user_styles');
+
+/// 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->navmenuwidth = 5;
+
+/// 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->chameleonenabled = true;
+
+/// 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 = true;
+
+/// 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.
+////////////////////////////////////////////////////////////////////////////////
+
+?>
View
161 theme/chameleon/header.html
@@ -1,85 +1,76 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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->wwwroot/theme/$CFG->theme" ?>/favicon.ico" />
-
- <?php
-
-
- if (isset($THEME->chameleonenabled) && $THEME->chameleonenabled) {
- $chameleon_isadmin = isadmin();
- $chameleon_isteacher = false;
- if (isset($course->id)) {
- $chameleon_courseparam = '?id=' . $course->id;
- if (!$chameleon_isadmin) {
- $chameleon_isteacher = (isteacher($course->id) && isset($CFG->coursetheme));
- }
- } else {
- $chameleon_courseparam = '';
- }
-
- if ($chameleon_isadmin || $chameleon_isteacher) {
- // 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;
-
-
- ?>
-
- <style type="text/css"> @import '<?php echo "$CFG->wwwroot/theme/$chameleon_theme" ?>/ui/chameleon_ui.css'; </style>
-
- <script type="text/javascript" src="<?php echo "$CFG->wwwroot/theme/$chameleon_theme/ui/css_query.js" ?>"> </script>
- <script type="text/javascript" src="<?php echo "$CFG->wwwroot/theme/$chameleon_theme/ui/sarissa.js" ?>"> </script>
- <script type="text/javascript" src="<?php echo "$CFG->wwwroot/theme/$chameleon_theme/ui/chameleon_js.php$chameleon_courseparam" ?>"> </script>
-
- <?php
-
- }
- }
-
- ?>
-
-
- <?php include("$CFG->javascript"); ?>
-
-
-
-
-</head>
-
-<body<?php
- echo " $bodytags";
- if ($focus) {
- echo " onload=\"setfocus()\"";
- };
- ?>>
-
-<div id="page">
-
-<?php if ($home) { // This is what gets printed on the home page only
-?>
- <div id="header-home">
- <div class="headermain"><?php echo $heading ?></div>
- <div class="headermenu"><?php echo $menu ?></div>
- </div>
- <div class="navbar">
- </div>
-<?php } else if ($heading) { // This is what gets printed on any other page with a heading
-?>
- <div id="header">
- <div class="headermain"><?php echo $heading ?></div>
- <div class="headermenu"><?php echo $menu ?></div>
- <!-- <div class="headermenu"><div id="new-menu"><?php echo $navmenulist ?></div></div> -->
- </div>
-<?php } ?>
-<?php if ($navigation) { // This is the navigation table with breadcrumbs ?>
- <div class="navbar">
- <div class="breadcrumb"><?php print_navigation("$navigation"); ?></div>
- <div class="navbutton"><?php echo $button; ?></div>
- </div>
-<?php } ?>
- <!-- END OF HEADER -->
-<div id="content">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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->wwwroot/theme/$CFG->theme" ?>/favicon.ico" />
+
+ <?php
+
+
+ if (isset($THEME->chameleonenabled) && $THEME->chameleonenabled) {
+ $chameleon_isadmin = isadmin();
+ $chameleon_isteacher = false;
+ if (isset($course->id)) {
+ $chameleon_courseparam = '?id=' . $course->id;
+ if (!$chameleon_isadmin) {
+ $chameleon_isteacher = (isteacher($course->id) && isset($CFG->coursetheme));
+ }
+ } else {
+ $chameleon_courseparam = '';
+ }
+
+ if ($chameleon_isadmin || $chameleon_isteacher) {
+ // 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;
+ ?>
+
+ <style type="text/css"> @import '<?php echo "$CFG->wwwroot/theme/$chameleon_theme" ?>/ui/chameleon_ui.css'; </style>
+
+ <script type="text/javascript" src="<?php echo "$CFG->wwwroot/theme/$chameleon_theme/ui/css_query.js" ?>"> </script>
+ <script type="text/javascript" src="<?php echo "$CFG->wwwroot/theme/$chameleon_theme/ui/sarissa.js" ?>"> </script>
+ <script type="text/javascript" src="<?php echo "$CFG->wwwroot/theme/$chameleon_theme/ui/chameleon_js.php$chameleon_courseparam" ?>"> </script>
+
+ <?php
+ }
+ }
+ ?>
+
+ <?php include("$CFG->javascript"); ?>
+</head>
+
+<body<?php
+ echo " $bodytags";
+ if ($focus) {
+ echo " onload=\"setfocus()\"";
+ };
+ ?>>
+
+<div id="page">
+
+<?php if ($home) { // This is what gets printed on the home page only
+?>
+ <div id="header-home">
+ <div class="headermain"><?php echo $heading ?></div>
+ <div class="headermenu"><?php echo $menu ?></div>
+ </div>
+ <table class="navbar"><tr><td>
+ &nbsp;
+ </td></tr></table>
+<?php } else { // This is what gets printed on any other page with a heading
+?>
+ <div id="header">
+ <div class="headermain"><?php echo $heading ?></div>
+ <div class="headermenu"><?php echo $menu ?></div>
+ </div>
+ <table class="navbar"><tr><td>
+<?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 } ?>
+ </td></tr></table>
+<?php } ?>
+ <!-- END OF HEADER -->
+<div id="content">
View
700 theme/chameleon/styles_layout.css
@@ -1,350 +1,350 @@
-/*******************************************************************
- styles_layout.css
-
- This CSS file contains all layout definitions like positioning,
- floats, margins, padding, borders etc.
-
- Styles are organised into the following sections:
- core
- header
- footer
-
- admin
- blocks
- calendar
- course
- doc
- login
- message
- user
-
- various modules
-
-*******************************************************************/
-
-
-/***
- *** Core
- ***/
-
-body {
- margin:0.5em;
- padding:0
-}
-h1.main,
-h2.main,
-h3.main,
-h4.main,
-h5.main,
-h6.main {
- margin-left:1em;
- text-align:left
-}
-#content {
- clear:both
-}
-.generalboxcontent {
- text-align:left
-}
-#layout-table {
- margin-top:0
-}
-#layout-table #left-column {
- width:22%;
- padding:5px
-}
-#layout-table #middle-column {
- width:auto;
- padding:5px
-}
-#layout-table #middle-column .topics {
- width:95%
-}
-#layout-table #right-column {
- width:22%;
- padding:5px
-}
-#middle-column .section .content,
-#middle-column .section .side {
- border:0 none
-}
-.generalbox {
- width:90%
-}
-.generaltable th.header {
- border-left:1px solid;
- border-right:1px solid;
-}
-.generaltable .smallinfo p {
- margin-top:0
-}
-.sitetopiccontent {
- border:0 none
-}
-
-/***
- *** Header
- ***/
-
-#header-home {
- padding:0.7em 0;
- height:2em
-}
-#header,
-#header-main,
-.navbar {
- margin:0
-}
-#header {
- padding:0.1em 0;
- height:50px
-}
-#header .headermain {
- float:left;
- margin:0.2em 0 0 12px
-}
-.headermenu {
- float:right;
- text-align:right
-}
-.headermenu .logininfo {
- margin:0 12px 4px 0
-}
-.navbar {
- width:100%;
- margin:0;
- padding:0;
- background:url(pix/colorstrip.gif) left no-repeat;
- height:3em;
- border:0 none
-}
-.navbar .breadcrumb {
- float:left;
- margin:23px 0.2em 0 12px
-}
-.navbutton {
- float:right;
- padding-top:18px;
- margin:0.2em 1em 0.2em 0
-}
-.navbar hr {
- height:1px
-}
-
-/***
- *** Footer
- ***/
-
-#footer {
- margin-top:1em
-}
-#footer br {
- display:none
-}
-#footer hr {
- display:none
-}
-#footer .sitelink {
- margin:0.5em 0
-}
-#footer .homelink {
- margin:0.5em
-}
-#footer .homelink a {
- border-width:1px
-}
-
-/***
- *** Content
- ***/
-
-#content {
- clear:both;
- margin:0 12px
-}
-#course-view #content,
-#site-index #content {
- margin:0
-}
-#user-edit .userpicture,
-#user-view .userpicture {
- margin-top:10px
-}
-
-/***
- *** Admin
- ***/
-
-.logtable th.header {
- border-left:1px solid;
- border-right:1px solid;
-}
-#user-edit #content .generalbox,
-#user-view .userinfobox tr {
- border-top:0 none
-}
-
-/***
- *** Blocks
- ***/
-
-.sideblock,
-.sideblock .searchform {
- text-align:left
-}
-.sideblock .header .hide-show img.hide-show-image {
- margin-top:0.1em;
-}
-.sideblock .searchform a {
- line-height:1.5em
-}
-#left-column .sideblock {
- margin:0
-}
-#left-column .sideblock .header,
-#left-column .sideblock .content,
-#right-column .sideblock .header,
-#right-column .sideblock .content {
- border:0 none
-}
-#right-column .sideblock .content {
- padding:0.2em 0.7em
-}
-#left-column .sideblock .header {
- border-bottom:1px solid
-}
-#left-column .sideblock .list .r0,
-#left-column .sideblock .list .r1 {
- height:2em
-}
-#left-column .sideblock .list td {
- vertical-align:middle;
- border-bottom:1px solid
-}
-#right-column .sideblock {
- margin-bottom:28px
-}
-.sideblock .head {
- margin-top:0.5em
-}
-.sideblock .link {
- margin:0.3em 0;
- border-bottom:1px solid
-}
-.sideblock .post {
- margin-top:0.5em;
- padding-bottom:0.2em;
- border-bottom:1px solid
-}
-.block_rss_client .link {
- border-top:0 none
-}
-
-/***
- *** Calendar
- ***/
-
-#calendar .today,
-.minicalendar .today {
- padding-top:0;
- padding-bottom:0;
- border:1px solid !important
-}
-#calendar .maincalendar .calendarmonth {
- width:75%
-}
-
-/***
- *** Course
- ***/
-
-#site-index .headingblock {
- border:0 none
-}
-#course-view .headingblock {
- margin-left:1em;
- padding-left:0.7em;
- border:0 none;
- border-left:1.2em solid
-}
-#course-view .topics {
- margin:0 0.5em 0 1em
-}
-#course-view .section .left {
- width:0.8em
-}
-#course-view .section .right {
- width:30px
-}
-#course-view .section .left a {
- display:none
-}
-#course-view .section .spacer {
- height:2em
-}
-#course-view .section .activity .spacer {
- height:12px
-}
-#course-view .section .content .section {
- margin-top:0;
- margin-left:0.7em
-}
-#course-view .section .content .section .activity {
- padding:0.3em 0.2em 0.2em;
- border-bottom:1px solid
-}
-.course .section .content .summary {
- margin:0 0 0 0.7em
-}
-#course-view .section .content .section .label img {
- margin-right:1em;
- margin-bottom:1em
-}
-#course-user #content,
-#mod-forum-user #content {
- padding-bottom:0.2em
-}
-
-/***
- *** Login
- ***/
-
-.loginbox {
- margin-top:12px
-}
-
-/***
- *** Modules:Forum
- ***/
-
-.forumheaderlist {
- width:90%;
- margin-left:auto;
- margin-right:auto
-}
-.forumheaderlist .header {
- border-left:1px solid;
- border-right:1px solid
-}
-#mod-forum-index .generalbox {
- width:100%
-}
-
-/***
- *** Modules:Glossary
- ***/
-
-.glossarydisplay {
- border-bottom:5px solid
-}
-.glossarypopup {
- margin-top:0.5em
-}
-
-/***
- *** Modules:Resource
- ***/
-
-.mod-resource #content {
- margin-top:1px
-}
+/*******************************************************************
+ styles_layout.css
+
+ This CSS file contains all layout definitions like positioning,
+ floats, margins, padding, borders etc.
+
+ Styles are organised into the following sections:
+ core
+ header
+ footer
+
+ admin
+ blocks
+ calendar
+ course
+ doc
+ login
+ message
+ user
+
+ various modules
+
+*******************************************************************/
+
+
+/***
+ *** Core
+ ***/
+
+body {
+ margin: 0.5em;
+ padding: 0;
+}
+h1.main,
+h2.main,
+h3.main,
+h4.main,
+h5.main,
+h6.main {
+ margin-left: 1em;
+ text-align: left;
+}
+#content {
+ clear: both;
+}
+.generalboxcontent {
+ text-align: left;
+}
+#layout-table {
+ margin-top: 0;
+}
+#layout-table #left-column {
+ width: 22%;
+ padding: 5px;
+}
+#layout-table #middle-column {
+ width: auto;
+ padding: 5px;
+}
+#layout-table #middle-column .topics {
+ width: 95%;
+}
+#layout-table #right-column {
+ width: 22%;
+ padding: 5px;
+}
+#middle-column .section .content,
+#middle-column .section .side {
+ border: 0 none;
+}
+.generalbox {
+ width: 90%;
+}
+.generaltable th.header {
+ border-left: 1px solid;
+ border-right: 1px solid;;
+}
+.generaltable .smallinfo p {
+ margin-top: 0;
+}
+.sitetopiccontent {
+ border: 0 none;
+}
+
+/***
+ *** Header
+ ***/
+
+#header-home {
+ padding: 0.7em 0;
+ height: 2em;
+}
+#header,
+#header-main,
+.navbar {
+ margin: 0;
+}
+#header {
+ padding: 0.1em 0;
+ height: 50px;
+}
+#header .headermain {
+ float: left;
+ margin: 0.2em 0 0 12px;
+}
+.headermenu {
+ float: right;
+ text-align: right;
+}
+.headermenu .logininfo {
+ margin: 0 12px 4px 0;
+}
+.navbar {
+ width: 100%;
+ margin: 0;
+ padding: 0;
+ background: url(pix/colorstrip.gif) left no-repeat;
+ height: 3em;
+ border: 0 none;
+}
+.navbar .breadcrumb {
+ float: left;
+ margin: 23px 0.2em 0 12px;
+}
+.navbutton {
+ float: right;
+ padding-top: 18px;
+ margin: 0.2em 1em 0.2em 0;
+}
+.navbar hr {
+ height: 1px;
+}
+
+/***
+ *** Footer
+ ***/
+
+#footer {
+ margin-top: 1em;
+}
+#footer br {
+ display: none;
+}
+#footer hr {
+ display: none;
+}
+#footer .sitelink {
+ margin: 0.5em 0;
+}
+#footer .homelink {
+ margin: 0.5em;
+}
+#footer .homelink a {
+ border-width: 1px;
+}
+
+/***
+ *** Content
+ ***/
+
+#content {
+ clear: both;
+ margin: 0 12px;
+}
+#course-view #content,
+#site-index #content {
+ margin: 0;
+}
+#user-edit .userpicture,
+#user-view .userpicture {
+ margin-top: 10px;
+}
+
+/***
+ *** Admin
+ ***/
+
+.logtable th.header {
+ border-left: 1px solid;
+ border-right: 1px solid;;
+}
+#user-edit #content .generalbox,
+#user-view .userinfobox tr {
+ border-top: 0 none;
+}
+
+/***
+ *** Blocks
+ ***/
+
+.sideblock,
+.sideblock .searchform {
+ text-align: left;
+}
+.sideblock .header .hide-show img.hide-show-image {
+ margin-top: 0.1em;;
+}
+.sideblock .searchform a {
+ line-height: 1.5em;
+}
+#left-column .sideblock {
+ margin: 0;
+}
+#left-column .sideblock .header,
+#left-column .sideblock .content,
+#right-column .sideblock .header,
+#right-column .sideblock .content {
+ border: 0 none;
+}
+#right-column .sideblock .content {
+ padding: 0.2em 0.7em;
+}
+#left-column .sideblock .header {
+ border-bottom: 1px solid;
+}
+#left-column .sideblock .list .r0,
+#left-column .sideblock .list .r1 {
+ height: 2em;
+}
+#left-column .sideblock .list td {
+ vertical-align: middle;
+ border-bottom: 1px solid;
+}
+#right-column .sideblock {
+ margin-bottom: 28px;
+}
+.sideblock .head {
+ margin-top: 0.5em;
+}
+.sideblock .link {
+ margin: 0.3em 0;
+ border-bottom: 1px solid;
+}
+.sideblock .post {
+ margin-top: 0.5em;
+ padding-bottom: 0.2em;
+ border-bottom: 1px solid;
+}
+.block_rss_client .link {
+ border-top: 0 none;
+}
+
+/***
+ *** Calendar
+ ***/
+
+#calendar .today,
+.minicalendar .today {
+ padding-top: 0;
+ padding-bottom: 0;
+ border: 1px solid !important;
+}
+#calendar .maincalendar .calendarmonth {
+ width: 75%;
+}
+
+/***
+ *** Course
+ ***/
+
+#site-index .headingblock {
+ border: 0 none;
+}
+#course-view .headingblock {
+ margin-left: 1em;
+ padding-left: 0.7em;
+ border: 0 none;
+ border-left: 1.2em solid;
+}
+#course-view .topics {
+ margin: 0 0.5em 0 1em;
+}
+#course-view .section .left {
+ width: 0.8em;
+}
+#course-view .section .right {
+ width: 30px;
+}
+#course-view .section .left a {
+ display: none;
+}
+#course-view .section .spacer {
+ height: 2em;
+}
+#course-view .section .activity .spacer {
+ height: 12px;
+}
+#course-view .section .content .section {
+ margin-top: 0;
+ margin-left: 0.7em;
+}
+#course-view .section .content .section .activity {
+ padding: 0.3em 0.2em 0.2em;
+ border-bottom: 1px solid;
+}
+.course .section .content .summary {
+ margin: 0 0 0 0.7em;
+}
+#course-view .section .content .section .label img {
+ margin-right: 1em;
+ margin-bottom: 1em;
+}
+#course-user #content,
+#mod-forum-user #content {
+ padding-bottom: 0.2em;
+}
+
+/***
+ *** Login
+ ***/
+
+.loginbox {
+ margin-top: 12px;
+}
+
+/***
+ *** Modules: Forum
+ ***/
+
+.forumheaderlist {
+ width: 90%;
+ margin-left: auto;
+ margin-right: auto;
+}
+.forumheaderlist .header {
+ border-left: 1px solid;
+ border-right: 1px solid;
+}
+#mod-forum-index .generalbox {
+ width: 100%;
+}
+
+/***
+ *** Modules: Glossary
+ ***/
+
+.glossarydisplay {
+ border-bottom: 5px solid;
+}
+.glossarypopup {
+ margin-top: 0.5em;
+}
+
+/***
+ *** Modules: Resource
+ ***/
+
+.mod-resource #content {
+ margin-top: 1px;
+}
View
252 theme/chameleon/ui/ChameleonCSS.class.php
@@ -1,127 +1,127 @@
-<?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 (!$fp = fopen($this->base . $this->$file, 'w')) {
- $this->error = 'Couldn\'t open file';
- return false;
- }
- fwrite($fp, stripslashes($content));
- fclose($fp);
- return true;
- }
-
- function read() {
- $permCSS = trim(file_get_contents($this->base . $this->perm));
- $tempCSS = trim(file_get_contents($this->base . $this->temp));
-
- if ($permCSS === false || $tempCSS === false) {
- $this->error = 'Couldn\'t read file';
- return false;
- }
-
- 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;
- }
-}
-
-
+<?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 (!$fp = fopen($this->base . $this->$file, 'w')) {
+ $this->error = 'couldn\'t open file';
+ return false;
+ }
+ fwrite($fp, stripslashes($content));
+ fclose($fp);
+ return true;
+ }
+
+ function read() {
+ $permcss = trim(file_get_contents($this->base . $this->perm));
+ $tempcss = trim(file_get_contents($this->base . $this->temp));
+
+ if ($permcss === false || $tempcss === false) {
+ $this->error = 'couldn\'t read file';
+ return false;
+ }
+
+ 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;
+ }
+}
+
+
?>
View
168 theme/chameleon/ui/ChameleonFileBrowser.class.php
@@ -1,85 +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);
- }
-}
-
+<?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);
+ }
+}
+
?>
View
5,881 theme/chameleon/ui/chameleon_js.php
3,016 additions, 2,865 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
726 theme/chameleon/ui/chameleon_ui.css
@@ -1,363 +1,363 @@
-/* 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, #chameleon-status-msg {
- 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,
-#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;
-}
-
-#chameleon-selector-box a, #chameleon-style-box a, #chameleon-color-box a, #chameleon-file-box a {
- cursor: pointer !important;
-}
-
-#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;
-}
-
-#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;
- cursor: pointer !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;
-}
-
-#chameleon-style-box input.chameleon-input-text:focus {
- border: 1px solid #000 !important;
-}
-
-#chameleon-selector-box input.chameleon-btn,
-#chameleon-style-box input.chameleon-btn {
- border: 1px solid #000 !important;
- background: #aaa !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 !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 {
- position: absolute !important;
- top: 0 !important; left: 0 !important;
- z-index: 2 !important;
- background: #f6f6f6 !important;
- border: 1px solid #999 !important;
- padding: 2px 10px !important;
- cursor: pointer !important;
-}
-
-body > div#chameleon-launch-hotspots {
- position: fixed !important;
-}
-
-#chameleon-selector-box ul {
- list-style-type: none !important;
-}
-
+/* 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, #chameleon-status-msg {
+ 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,
+#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;
+}
+
+#chameleon-selector-box a, #chameleon-style-box a, #chameleon-color-box a, #chameleon-file-box a {
+ cursor: pointer !important;
+}
+
+#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;
+}
+
+#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;
+ cursor: pointer !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;
+}
+
+#chameleon-style-box input.chameleon-input-text:focus {
+ border: 1px solid #000 !important;
+}
+
+#chameleon-selector-box input.chameleon-btn,
+#chameleon-style-box input.chameleon-btn {
+ border: 1px solid #000 !important;
+ background: #aaa !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 !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 {
+ position: absolute !important;
+ top: 0 !important; left: 0 !important;
+ z-index: 2 !important;
+ background: #f6f6f6 !important;
+ border: 1px solid #999 !important;
+ padding: 2px 10px !important;
+ cursor: pointer !important;
+}
+
+body > div#chameleon-launch-hotspots {
+ position: fixed !important;
+}
+
+#chameleon-selector-box ul {
+ list-style-type: none !important;
+}
+
View
102 theme/chameleon/ui/css.php
@@ -1,52 +1,52 @@
-<?php
-
-require_once('../../../config.php');
-require_once('../config.php');
-
-
-if (!isset($THEME->chameleonenabled) || !$THEME->chameleonenabled) {
- die('CHAMELEON_ERROR Editing this theme has been disabled');