Commit 81c5f0e3e3591d0b86e12f54f2bc8a0e40c183ca

Authored by Antonio Terceiro
1 parent 520d38cd

Giving a fixed width layout to the default theme

(ActionItem1449)
app/views/layouts/application-ng.rhtml
... ... @@ -26,7 +26,7 @@
26 26 " controller-"+ @controller.controller_name() +
27 27 " action-"+ @controller.controller_name() +"-"+ @controller.action_name() +
28 28 " template-"+ ( profile.nil? ? "default" : profile.layout_template )
29   - %>" onresize="registerDocumentSize()">
  29 + %>" >
30 30 <script type="text/javascript">
31 31 /* Adds a class to "msie" to the body element if a Microsoft browser is
32 32 * detected. This is needed to workaround several of their limitations.
... ... @@ -35,18 +35,6 @@
35 35 document.body.className += " msie msie" +
36 36 navigator.appVersion.replace(/^.*MSIE\s+([0-9]+).*$/, "$1");
37 37 }
38   - function registerDocumentSize() {
39   - document.body.className = document.body.className
40   - .replace(/(^| )docSize.+( |$)/g, " ");
41   - for ( var x=100; x<=1500; x+=100 ) {
42   - if ( document.body.clientWidth > x ) {
43   - document.body.className += " docSize-GT-" + x;
44   - } else {
45   - document.body.className += " docSize-LT-" + x;
46   - }
47   - }
48   - }
49   - registerDocumentSize();
50 38 </script>
51 39  
52 40 <a href="#content" id="link-go-content"><span>Ir para o conteúdo</span></a>
... ...
public/designs/themes/base/layout.css
1 1 body {
2 2 background: #EEE;
3 3 font-family: Liberation Sans, Arial, sans-serif;
4   - min-width: 780px;
  4 + width: 960px;
  5 + margin: auto;
5 6 }
6 7  
7 8 body, th, td, input {
... ... @@ -13,12 +14,6 @@ body, th, td, input {
13 14 top: -100px;
14 15 }
15 16  
16   -.docSize-GT-900 #wrap-1 { margin: 0px 1%; }
17   -.docSize-GT-1000 #wrap-1 { margin: 0px 2%; }
18   -.docSize-GT-1100 #wrap-1 { margin: 0px 3%; }
19   -.docSize-GT-1200 #wrap-1 { margin: 0px 4%; }
20   -.docSize-GT-1300 #wrap-1 { margin: 0px 5%; }
21   -
22 17 #wrap-2 {
23 18 padding: 10px;
24 19 position: relative;
... ... @@ -201,9 +196,6 @@ body, th, td, input {
201 196 .msie6.template-default .box-1 {
202 197 width: expression( $("wrap-2").offsetWidth - 430 ); 640
203 198 }
204   -/*.docSize-GT-900.msie6.template-default .box-1 {
205   - width: 350px;
206   -}*/
207 199  
208 200 .template-default .box-2 { /* Left */
209 201 position: relative;
... ... @@ -262,11 +254,6 @@ body, th, td, input {
262 254 font-size: 11px;
263 255 color: #555;
264 256 }
265   -.docSize-GT-900 #theme-footer { margin: 0px 1%; }
266   -.docSize-GT-1000 #theme-footer { margin: 0px 2%; }
267   -.docSize-GT-1100 #theme-footer { margin: 0px 3%; }
268   -.docSize-GT-1200 #theme-footer { margin: 0px 4%; }
269   -.docSize-GT-1300 #theme-footer { margin: 0px 5%; }
270 257  
271 258 #theme-footer a {
272 259 color: #333;
... ... @@ -314,8 +301,3 @@ div#notice {
314 301 padding: 5px;
315 302 }
316 303  
317   -.docSize-GT-900 div#notice { top: 33px; left: 1%; margin-left: 10px; }
318   -.docSize-GT-1000 div#notice { top: 33px; left: 2%; margin-left: 10px; }
319   -.docSize-GT-1100 div#notice { top: 33px; left: 3%; margin-left: 10px; }
320   -.docSize-GT-1200 div#notice { top: 33px; left: 4%; margin-left: 10px; }
321   -.docSize-GT-1300 div#notice { top: 33px; left: 5%; margin-left: 10px; }
... ...