Browse Source

Should fix bug when resizing text see #4524

Julio Montoya 13 years ago
parent
commit
a5cf64e7ab
3 changed files with 38 additions and 28 deletions
  1. 19 24
      main/css/base.css
  2. 1 2
      main/css/base_chamilo.css
  3. 18 2
      main/inc/lib/javascript/fontresize.js

+ 19 - 24
main/css/base.css

@@ -4,12 +4,13 @@
 
 @import url('bootstrap.css');
 
-/* some changes to the bootstrap.min.css */
+/* some changes to the bootstrap.css */
 
+/* when doing a var_dump*/
 pre {
     margin-top:40px;
 }
-
+/* chzn-select fix */
 select {
     width : auto;
 }
@@ -19,13 +20,13 @@ select {
 }
 
 .label {
-  padding: 1px 3px 2px;
-  font-size: 100%;
-  font-weight: normal;
-  color: #ffffff;
-  text-transform: none;
-  background: none;  
-  border-radius: none;
+    padding: 1px 3px 2px;
+    font-size: 100%;
+    font-weight: normal;
+    color: #ffffff;
+    text-transform: none;
+    background: none;  
+    border-radius: none;
 }
 
 .secondary-nav {
@@ -61,25 +62,17 @@ legend {
     height: 15px;
 }
 
-#header2 .nav {
-    float:right;
-}
-
 #header3 li a {
     margin:0px;
 }
 
-/* Fixing old chamilo forms */
-#header4 {
-	height:26px;
-    padding:0px;
-    background:none;                    
-    width: 100%;	
-    /*margin-top:35px;*/
-    margin-bottom:5px;    
-    background-repeat:repeat-x;        
+/* To fix the increase/decrease buttons */
+label, input, button, select, textarea, p {
+    font-size: inherit;
 }
 
+/* Fixing old chamilo forms */
+
 form .label {
     color: #404040;
     float: left;
@@ -104,6 +97,8 @@ form .formw input {
 
 /* end chamilo forms fixes */
 
+
+
 /* New changes Chamilo 1.9 */
 
 .sidebar-nav {
@@ -135,8 +130,8 @@ form .formw input {
 }
 
 html, body {
-  margin: 0;
-  padding: 0;
+    margin: 0;
+    padding: 0;
 }
 
 #topbar {

+ 1 - 2
main/css/base_chamilo.css

@@ -690,8 +690,7 @@ a.nobold:hover {
     margin-top: 8px;    
     border-collapse: collapse;
     border-spacing: 0;  
-    border: 1px solid #DDDDDD;
-    font-size: 12px;
+    border: 1px solid #DDDDDD;    
     margin-bottom: 15px;
     text-align: left;
     width: 100%;    

+ 18 - 2
main/inc/lib/javascript/fontresize.js

@@ -2,8 +2,22 @@ $(document).ready(function(){
     // Reset Font Size
     var originalFontSize = $('body').css('font-size');
     
-    $(".reset_font").click(function(){
+    var original_head1 = $('h1').css('font-size');
+    var original_head2 = $('h2').css('font-size');
+    var original_head3 = $('h3').css('font-size');
+    var original_head4 = $('h4').css('font-size');
+    var original_head5 = $('h5').css('font-size');
+    var original_head6 = $('h9').css('font-size');
+    
+    
+    $(".reset_font").click(function() {
         $('body').css('font-size', originalFontSize);
+        $('h1').css('font-size', original_head1);
+        $('h2').css('font-size', original_head2);
+        $('h3').css('font-size', original_head3);
+        $('h4').css('font-size', original_head4);
+        $('h5').css('font-size', original_head5);
+        $('h6').css('font-size', original_head6);        
     });
     
     // Increase Font Size
@@ -12,6 +26,7 @@ $(document).ready(function(){
         var currentFontSizeNum = parseFloat(currentFontSize, 10);
         var newFontSize = currentFontSizeNum*1.2;
         $('body').css('font-size', newFontSize);
+        $('h1, h2, h3, h4, h5, h6').css('font-size', newFontSize);
         return false;
     });
     
@@ -21,6 +36,7 @@ $(document).ready(function(){
         var currentFontSizeNum = parseFloat(currentFontSize, 10);
         var newFontSize = currentFontSizeNum*0.8;
         $('body').css('font-size', newFontSize);
-    return false;
+        $('h1, h2, h3, h4, h5, h6').css('font-size', newFontSize);
+        return false;
     });
 });