]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-10075 - changes done following Petr's patch and optional_param with default ltr
authorurs_hunkler <urs_hunkler>
Sun, 29 Jul 2007 20:46:05 +0000 (20:46 +0000)
committerurs_hunkler <urs_hunkler>
Sun, 29 Jul 2007 20:46:05 +0000 (20:46 +0000)
lib/setup.php
lib/weblib.php
theme/custom_corners/config.php
theme/custom_corners/styles_rtl.css

index 6d7b75ea66339dd35fbb83fc16aca2a4e3e83a5e..0fc392f499364f2910e9e974d131d9abe2b4a261 100644 (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();
 
index 2d2bad076072757d95fd6198d74940dc079e9ace..9ce7bb8a83f3d19bd8c5bbbde975639f36f0050b 100644 (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;
index 8855ea625cf6e66ce246c5ca0501bbabb3212b34..6c3eeed356e2251df8002d86448287db83e1d916 100644 (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&'.
index 361e26090885025eb695949ae344cba4f23d19f7..f6b19980eb8ab25e80b93f23c2f6f36a99bbbfef 100644 (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;