Commit 595457149b2ee1590ddb4ba4e50171b231b986bc

Authored by Leonardo Merlin
1 parent 6841f7f2

fix 'alto contraste' (use .contraste class)

Showing 2 changed files with 12 additions and 13 deletions   Show diff stats
js/main.js
... ... @@ -935,10 +935,10 @@ define(['jquery', 'handlebars', 'fastclick', 'handlebars_helpers', 'piwik'], fun
935 935  
936 936 $( '#display-contrast' ).on('click', function(e){
937 937 e.preventDefault();
938   - $('body').toggleClass('contrast');
  938 + $('body').toggleClass('contraste');
939 939  
940 940 if($.cookie){
941   - var isContrasted = $('body').hasClass('contrast');
  941 + var isContrasted = $('body').hasClass('contraste');
942 942 $.cookie('dialoga_contraste', isContrasted);
943 943 }
944 944 });
... ... @@ -1043,10 +1043,9 @@ define(['jquery', 'handlebars', 'fastclick', 'handlebars_helpers', 'piwik'], fun
1043 1043  
1044 1044 // contrast
1045 1045 var isContrasted = $.cookie('dialoga_contraste');
1046   - console.log('isContrasted', isContrasted);
1047   - if(isContrasted){
1048   - // remove all classes 'contrast' and add only one 'contrast'
1049   - $('body').addClass('contrast');
  1046 + if(isContrasted === 'true'){
  1047 + // remove all classes 'contraste' and add only one 'contraste'
  1048 + $('body').addClass('contraste');
1050 1049 }
1051 1050 }
1052 1051  
... ...
sass/style.sass
... ... @@ -263,7 +263,7 @@ textarea
263 263 #display-contrast
264 264 color: $link-color
265 265 font-weight: normal
266   - .contrast &
  266 + .contraste &
267 267 color: white
268 268 // 5.3 - icones
269 269 .icon
... ... @@ -723,7 +723,7 @@ h1
723 723 .btn
724 724 color: $link-color
725 725 font-weight: normal
726   - .contrast &
  726 + .contraste &
727 727 color: #fff
728 728 .participe
729 729 font-size: 14px
... ... @@ -739,7 +739,7 @@ h1
739 739 vertical-align: middle
740 740 border: 1px solid #ccc !important
741 741 background: url(images/icons/icon-user.png) no-repeat 20px 50%
742   - .contrast &
  742 + .contraste &
743 743 background-image: url(images/icons/icon-user-contrast.png)
744 744 .login
745 745 margin-left: 20px
... ... @@ -755,7 +755,7 @@ h1
755 755 border: 1px solid #ccc
756 756 .loading
757 757 display: none
758   - .contrast &
  758 + .contraste &
759 759 background-color: #262626
760 760  
761 761 .login,
... ... @@ -1086,7 +1086,7 @@ td
1086 1086 border-bottom: 2px solid #fff
1087 1087 border-right: none
1088 1088  
1089   - .contrast &
  1089 + .contraste &
1090 1090 background-color: #333
1091 1091 color: #fff !important
1092 1092  
... ... @@ -1169,7 +1169,7 @@ td
1169 1169 z-index: 1
1170 1170 border-radius: 10px
1171 1171  
1172   - .contrast &
  1172 + .contraste &
1173 1173 background-color: #333
1174 1174 color: #fff !important
1175 1175  
... ... @@ -1318,7 +1318,7 @@ h3.titulo-destaque
1318 1318 // 9 - Alto Contraste
1319 1319 // ------------------------------------
1320 1320  
1321   -.contrast
  1321 +.contraste
1322 1322 background-color: #000
1323 1323 color: #fff
1324 1324 .background
... ...