MDL-10075 - changes done following Petr's patch and optional_param with default ltr

This commit is contained in:
urs_hunkler
2007-07-29 20:46:05 +00:00
parent cb5105a872
commit 70244cc2cd
4 changed files with 25 additions and 24 deletions
-2
View File
@@ -588,8 +588,6 @@ global $HTTPSPAGEREQUIRED;
}
}
$CFG->langdirection = (get_string('thisdirection') == 'rtl') ? 'rtl' : 'ltr';
// set default locale and themes - might be changed again later from require_login()
course_setup();
+6 -5
View File
@@ -2456,9 +2456,7 @@ function print_header ($title='', $heading='', $navigation='', $focus='',
$pageclass .= ' drag';
}
if (!empty($CFG->langdirection)) {
$pageclass .= ' ' . $CFG->langdirection;
}
$pageclass .= ' dir-'.get_string('thisdirection');
$pageclass .= ' lang-'.$currentlanguage;
@@ -2790,7 +2788,7 @@ function current_category_theme($categoryid=0) {
* @param int $lifetime ?
* @param string $thename ?
*/
function style_sheet_setup($lastmodified=0, $lifetime=300, $themename='', $forceconfig='', $lang='', $langdir='') {
function style_sheet_setup($lastmodified=0, $lifetime=300, $themename='', $forceconfig='', $lang='', $langdir='ltr') {
global $CFG, $THEME;
@@ -2977,7 +2975,10 @@ function theme_setup($theme = '', $params=NULL) {
}
/// Add parameter for the language direction
$params[] = 'langdir='.get_string('thisdirection');
$langdir = get_string('thisdirection');
if ($langdir == 'rtl') {
$params[] = 'langdir='.get_string('thisdirection');
}
if ($theme != $CFG->theme) {
$params[] = 'forceconfig='.$theme;
+10 -17
View File
@@ -4,21 +4,7 @@
/// how Moodle uses this theme.
////////////////////////////////////////////////////////////////////////////////
//trigger_error('custom_corners/config.php - $CFG->langdirection: '.$CFG->langdirection, E_USER_NOTICE);
if ($CFG->langdirection == 'rtl') {
$THEME->sheets = array('user_styles', 'styles_rtl');
//trigger_error('custom_corners/config.php - is rtl ::: ', E_USER_NOTICE);
} else {
$THEME->sheets = array('user_styles');
//trigger_error('custom_corners/config.php - is not rtl ::: ', E_USER_NOTICE);
}
//trigger_error('custom_corners/config.php - $THEME->sheets: '.$THEME->sheets[0].', '.$THEME->sheets[1], E_USER_NOTICE);
// $THEME->sheets = array('user_styles');
// $THEME->sheets = array('user_styles', 'adminpage_correct');
$THEME->sheets = array('user_styles', 'styles_rtl');
/// This variable is an array containing the names of all the
/// stylesheet files you want included in this theme, and in what order
@@ -84,7 +70,7 @@ $THEME->blocksheets = true;
/// It is HIGHLY recommended to leave this enabled.
$THEME->langsheets = false;
$THEME->langsheets = false;
/// By setting this to true, then this theme will search for
/// a file named "styles.php" inside the current language
@@ -95,7 +81,7 @@ $THEME->langsheets = false;
$THEME->block_l_min_width = 180;
$THEME->block_l_max_width = 210;
$THEME->block_r_min_width = 180;
$THEME->block_r_max_width = 210;;
$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
@@ -171,6 +157,13 @@ $THEME->chameleonteachereditenabled = false;
/// will allow teachers on that course to edit the theme.
// $CFG->CSSEdit = true;
/// When this is enabled then Moodle will include all CSS files
/// seperately instead of writing all CSS code into one single
/// CSS file per theme. The single CSS files can then be edited
/// and saved with interactive CSS editors like CSSEdit.
$THEME->resource_mp3player_colors =
'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.
+9
View File
@@ -7,6 +7,15 @@ div.sideblock div.header div.bt {
left: -13px;
margin: 0 13px 0 0;
}
div.sideblock div.bt div {
background-position: 100% 0;
right: -13px;
}
div.sideblock div.bt {
background-position: 0 0;
left: -13px;
margin: 0 13px 0 0;
}
div.sideblock div.bb div {
background-position: 100% 100%;
right: -13px;