# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
Index: moodle/blocks/dock.js
--- moodle/blocks/dock.js Base (1.27)
+++ moodle/blocks/dock.js Locally Modified (Based On 1.27)
@@ -91,24 +91,32 @@
         }
     }
 
+    var dock = Y.one('#dock');
+    if (!dock) {
     // Start the construction of the dock
-    dock = Y.Node.create('<div id="dock" class="'+css.dock+' '+css.dock+'_'+this.cfg.position+'_'+this.cfg.orientation+'"></div>');
-    this.nodes.container = Y.Node.create('<div class="'+css.dockeditemcontainer+'"></div>');
-    dock.append(this.nodes.container);
+        dock = Y.Node.create('<div id="dock" class="'+css.dock+' '+css.dock+'_'+this.cfg.position+'_'+this.cfg.orientation+'"></div>')
+                    .append(Y.Node.create('<div class="'+css.dockeditemcontainer+'"></div>'));
+        this.nodes.body.append(dock);
+    } else {
+        dock.addClass(css.dock+'_'+this.cfg.position+'_'+this.cfg.orientation);
+    }
+    if (Y.UA.ie > 0 && Y.UA.ie < 7) {
+        // Adjust for IE 6 (can't handle fixed pos)
+        dock.setStyle('height', dock.get('winHeight')+'px');
+    }
+    // Store the dock
+    this.nodes.dock = dock;
+    this.nodes.container = dock.one('.'+css.dockeditemcontainer);
+
     if (Y.all('.block.dock_on_load').size() == 0) {
         // Nothing on the dock... hide it using CSS
         dock.addClass('nothingdocked');
     } else {
         this.nodes.body.addClass(this.css.body);
     }
-    // Store the dock
-    this.nodes.dock = dock;
+
     this.fire('dock:beforedraw');
-    this.nodes.body.append(dock);
-    if (Y.UA.ie > 0 && Y.UA.ie < 7) {
-        // Adjust for IE 6 (can't handle fixed pos)
-        dock.setStyle('height', dock.get('winHeight')+'px');
-    }
\ No newline at end of file
+
\ No newline at end of file
     // Add a removeall button
     // Must set the image src seperatly of we get an error with XML strict headers
     var removeall = Y.Node.create('<img alt="'+M.str.block.undockall+'" title="'+M.str.block.undockall+'" />');
Index: moodle/blocks/navigation/navigation.js
--- moodle/blocks/navigation/navigation.js Base (1.11)
+++ moodle/blocks/navigation/navigation.js Locally Modified (Based On 1.11)
Index: moodle/blocks/navigation/styles.css
--- moodle/blocks/navigation/styles.css Base (1.3)
+++ moodle/blocks/navigation/styles.css Locally Modified (Based On 1.3)
@@ -1,12 +1,6 @@
-/** JavaScript state rules **/
-.jsenabled .block_navigation.dock_on_load,
-.block_navigation .block_tree_box .requiresjs {display:none;}
-.jsenabled .block_navigation .block_tree_box .requiresjs {display:inline;}
-
 /** General display rules **/
 .block_navigation .block_tree {margin:5px;padding-left:0px;overflow:visible;}
-.block_navigation .block_tree li {margin:0;list-style: none;}
-
+.block_navigation .block_tree li {margin:3px;list-style: none;padding:0;}
 .block_navigation .block_tree li.item_with_icon > p {position:relative;}
 .block_navigation .block_tree li.item_with_icon > p img {vertical-align:middle;position:absolute;left:0;top:3px}
 
@@ -19,10 +13,16 @@
 .block_navigation .block_tree .root_node.leaf {padding-left:0px;}
 .block_navigation .block_tree .current_branch {font-weight:bold;}
 .block_navigation .block_tree .depth_1.current_branch ul {font-weight:normal;}
+
 .jsenabled .block_navigation .block_tree .tree_item.branch {cursor:pointer;}
 .jsenabled .block_navigation .block_tree .tree_item.emptybranch {background-image: url([[pix:t/collapsed_empty]]);background-position: center left;background-repeat: no-repeat;}
 .jsenabled .block_navigation .block_tree .collapsed ul {display: none;}
 .jsenabled .block_navigation .block_tree .collapsed .tree_item.branch {background-image: url([[pix:t/collapsed]]);}
 
+/** JavaScript state rules **/
+.jsenabled .block_navigation.dock_on_load,
+.block_navigation .block_tree_box .requiresjs {display:none;}
+.jsenabled .block_navigation .block_tree_box .requiresjs {display:inline;}
+
\ No newline at end of file
 /** Internet explorer specific rules **/
 .ie6 .block_navigation .block_tree .tree_item {width:100%;}
Index: moodle/lib/outputlib.php
--- moodle/lib/outputlib.php Base (1.144)
+++ moodle/lib/outputlib.php Locally Modified (Based On 1.144)
@@ -606,7 +606,7 @@
         $urls = array();
 
         if ($rev > -1) {
-            if (check_browser_version('MSIE', 5) and !check_browser_version('MSIE', 8)) {
+            if (check_browser_version('MSIE', 5)) {
                 // We need to split the CSS files for IE
                 $urls[] = new moodle_url($CFG->httpswwwroot.'/theme/styles.php', array('theme'=>$this->name,'rev'=>$rev, 'type'=>'plugins'));
                 $urls[] = new moodle_url($CFG->httpswwwroot.'/theme/styles.php', array('theme'=>$this->name,'rev'=>$rev, 'type'=>'parents'));
@@ -646,7 +646,10 @@
             if (check_browser_version('MSIE', 5)) {
                 // lalala, IE does not allow more than 31 linked CSS files from main document
                 $urls[] = new moodle_url($CFG->httpswwwroot.'/theme/styles_debug.php', array('theme'=>$this->name, 'type'=>'ie', 'subtype'=>'plugins'));
-                $urls[] = new moodle_url($CFG->httpswwwroot.'/theme/styles_debug.php', array('theme'=>$this->name, 'type'=>'ie', 'subtype'=>'parents'));
+                foreach ($css['parents'] as $parent=>$sheets) {
+                    // We need to serve parents individually otherwise we may easily exceed the style limit IE imposes (4096)
+                    $urls[] = new moodle_url($CFG->httpswwwroot.'/theme/styles_debug.php', array('theme'=>$this->name,'type'=>'ie', 'subtype'=>'parents', 'sheet'=>$parent));
+                }
                 $urls[] = new moodle_url($CFG->httpswwwroot.'/theme/styles_debug.php', array('theme'=>$this->name, 'type'=>'ie', 'subtype'=>'theme'));
 
             } else {
Index: moodle/lib/outputrequirementslib.php
--- moodle/lib/outputrequirementslib.php Base (1.42)
+++ moodle/lib/outputrequirementslib.php Locally Modified (Based On 1.42)
@@ -860,7 +860,7 @@
      * @return string
      */
     protected function get_yui3lib_headcode() {
-        $code = $this->yui3loader->css() . $this->yui3loader->script();
+        $code = $this->yui3loader->tags();
         // unfortunately yui loader does not produce xhtml strict code, so let's fix it for now
         $code = str_replace('&amp;', '&', $code);
         $code = str_replace('&', '&amp;', $code);
Index: moodle/theme/base/style/pagelayout.css
--- moodle/theme/base/style/pagelayout.css Base (1.5)
+++ moodle/theme/base/style/pagelayout.css Locally Modified (Based On 1.5)
@@ -6,9 +6,9 @@
  * #page
  *   #page-header
  *   #page-content
- *   |  #regions
+ *   |  #region-main-box
  *   |    #region-post-box
- *   |      #region-main
+ *   |      #region-main-wrap
  *   |      |  #region-main
  *   |      |    .region-content
  *   |      #region-pre
@@ -28,14 +28,14 @@
  ****/
 
 body {margin:auto 0px;width:auto;}
-#page {width:100%;}
+#page {width:100%;position:relative;}
 #page-header {float:left;width:100%;}
 #page-content {clear:both;float:left;overflow:hidden;position:relative;width:100%;min-width:900px;}
 #page-content #region-main-box {float:left;left:200px;position:relative;width:200%;}
 #page-content #region-main-box #region-post-box {float:left;left:50%;margin-left:-400px;position:relative;width:100%;}
 #page-content #region-main-box #region-post-box #region-main-wrap {float:right;position:relative;right:100%;width:50%;}
 #page-content #region-main-box #region-post-box #region-main-wrap #region-main {margin-right:0px;margin-left:400px;overflow:hidden;}
-#page-content #region-main-box #region-post-box #region-pre {float:left;left:200px;margin-left:-50%;overflow:hidden;position:relative;width:200px;}
\ No newline at end of file
+#page-content #region-main-box #region-post-box #region-pre {float:left;left:200px;overflow:hidden;position:relative;width:200px;margin-left:-50%;}
\ No newline at end of file
 #page-content #region-main-box #region-post-box #region-post {float:left;left:0px;overflow:hidden;position:relative;width:200px;}
 #page-content #region-main-box .region-content {overflow:hidden;padding:10px;}
 #page-footer {clear:both;float:left;width:100%;}
Index: moodle/theme/javascript.php
--- moodle/theme/javascript.php Base (1.2)
+++ moodle/theme/javascript.php Locally Modified (Based On 1.2)
@@ -95,7 +95,7 @@
     header('Expires: '. gmdate('D, d M Y H:i:s', time() + $lifetime) .' GMT');
     header('Pragma: ');
     header('Accept-Ranges: none');
-    header('Content-Type: application/x-javascript');
+    header('Content-Type: application/javascript');
     if (!min_enable_zlib_compression()) {
         header('Content-Length: '.filesize($jspath));
     }
@@ -110,7 +110,7 @@
     header('Expires: '. gmdate('D, d M Y H:i:s', time() + 2) .' GMT');
     header('Pragma: ');
     header('Accept-Ranges: none');
-    header('Content-Type: application/x-javascript');
+    header('Content-Type: application/javascript');
     header('Content-Length: '.strlen($js));
 
     echo $js;
Index: moodle/theme/standard/style/blocks.css
--- moodle/theme/standard/style/blocks.css Base (1.5)
+++ moodle/theme/standard/style/blocks.css Locally Modified (Based On 1.5)
@@ -3,7 +3,8 @@
 .block .header {border-bottom:1px solid #DDD;border-color: #dddddd;}
 .block .header h2 {margin-top:2px;font-size:1em;}
 .block .header .block_action {margin:0 4px;}
-.block .header .block_action img {width:11px; height:11px;}
+.block .header .block_action img,
+.block .header .block_action input {width:11px; height:11px;}
 .block .content {border-color: #dddddd;background-color:#FCFCFC;}
 .block .content hr {border-top-color:#999999;}
 .block .header .commands {font-size:0.9em;clear:both;}
@@ -14,7 +15,7 @@
 .block h2.header {text-align: left;margin:0;padding:4px;padding-top:0;border-bottom-width: 0;}
 .block .content h2 {text-align: left;margin:1.5em 0 0;padding:0;}
 .block .content h3 {text-align: left;}
-.block .content hr {height:1px;margin-top:4px;margin-bottom:4px;border:none;border-top:1px solid;}
+.block .content hr {height:1px;margin-top:4px;margin-bottom:4px;border:none;border-top:1px solid;padding:0;}
 .block .content .head {margin-top: 10px;}
 .block .header .icon.hide,
 .block .header .icon.edit {margin-right: 6px;}
Index: moodle/theme/styles_debug.php
--- moodle/theme/styles_debug.php Base (1.9)
+++ moodle/theme/styles_debug.php Locally Modified (Based On 1.9)
@@ -67,9 +67,22 @@
 
     } else if ($subtype === 'parents') {
         $sendcss = array();
-        foreach ($css['parents'] as $parent=>$sheets) {
-            $sendcss = array_merge($sendcss, $sheets);
+        if (empty($sheet)) {
+            // If not specific parent has been specified as $sheet then build a
+            // collection of @import statements into this one sheet.
+            // We shouldn't ever actually get here, but none the less we'll deal
+            // with it incase we ever do.
+            // @import statements arn't processed until after concurrent CSS requests
+            // making them slightly evil.
+            foreach (array_keys($css['parents']) as $sheet) {
+                $sendcss[] = "@import url(styles_debug.php?theme=$themename&type=$type&subtype=$subtype&sheet=$sheet);";
         }
+        } else {
+            // Build up the CSS for that parent so we can serve it as one file.
+            foreach ($css[$subtype][$sheet] as $parent=>$css) {
+                $sendcss[] = $css;
+            }
+        }
         $sendcss = implode("\n\n", $sendcss);
         $sendcss = str_replace("\n", "\r\n", $sendcss);
         send_uncached_css($sendcss);
Index: moodle/theme/yui_combo.php
--- moodle/theme/yui_combo.php Base (1.10)
+++ moodle/theme/yui_combo.php Locally Modified (Based On 1.10)
@@ -38,7 +38,7 @@
 // find out what we are serving - only one type per request
 $content = '';
 if (substr($parts, -3) === '.js') {
-    $mimetype = 'application/x-javascript';
+    $mimetype = 'application/javascript';
 } else if (substr($parts, -4) === '.css') {
     $mimetype = 'text/css';
 } else {
