Changeset 29


Ignore:
Timestamp:
Oct 26, 2009, 2:00:46 PM (9 years ago)
Author:
duh
Message:
  • created configurable styles (handled in conf/BaseFilters.groovy)
  • moved all styles into a default style (css/default_style images/default_style)
Location:
trunk
Files:
25 added
1 deleted
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/conf/BootStrap.groovy

    r16 r29  
    1313 */
    1414class BootStrap {
    15      def init = { servletContext ->
     15     def init = { servletContext ->     
    1616         // check if we're in development
    1717         if (GrailsUtil.environment == GrailsApplication.ENV_DEVELOPMENT) {
  • trunk/grails-app/controllers/BaseController.groovy

    r15 r29  
    3535     * @void
    3636     */
    37     protected BaseController() {
     37    BaseController() {
    3838        // debug line for now
    3939        printf("instantiated %s\n",this.class.name);
     
    4545        this.scaffold = (GrailsUtil.environment == GrailsApplication.ENV_DEVELOPMENT && this.class.name != 'BaseController');
    4646    }
     47
    4748
    4849    /**
  • trunk/grails-app/views/layouts/main.gsp

    r26 r29  
    44 <head>
    55  <title><g:layoutTitle default="Grails" /></title>
    6   <link rel="stylesheet" href="${resource(dir:'css',file:'style.css')}" />
     6  <link rel="stylesheet" href="${resource(dir:'css',file:session.style+'.css')}" />
    77  <link rel="stylesheet" href="${resource(dir:'css',file:'login_panel.css')}" />
    88  <link rel="shortcut icon" href="${resource(dir:'images',file:'favicon.ico')}" type="image/x-icon" />
     
    2121   <div id="footer">
    2222     Copyright © 2008 - <g:formatDate format="yyyy" date="${new Date()}"/> NMC & NuGO. All rights reserved.
    23      <a href="?showSource=true">show page source</a></div>
     23     ( style: <%=session.style%>,
     24     <a href="?showSource=true">show page source</a>)</div>
    2425  </div>
    2526 </body>
  • trunk/web-app/css/default_style.css

    r28 r29  
    22        margin: 0; padding: 0;
    33        font: 10px normal Arial, Helvetica, sans-serif;
    4         background: #ddd url(../images/skin/body_bg.gif) repeat-x;
     4        background: #ddd url(../images/default_style/body_bg.gif) repeat-x;
    55}
    66/*a:link, a:visited, a:hover {
     
    2424/** START :: header **/
    2525#header {
    26         background: url(../images/skin/header.png) no-repeat center top;
     26        background: url(../images/default_style/header.png) no-repeat center top;
    2727        padding-top: 120px;
    2828}
     
    4040        background: #222;
    4141        font-size: 1.2em;
    42         background: url(../images/skin/topnav/topnav_bg.gif) repeat-x;
     42        background: url(../images/default_style/topnav/topnav_bg.gif) repeat-x;
    4343}
    4444ul.topnav li {
     
    5656}
    5757ul.topnav li a:hover{
    58         background: url(../images/skin/topnav/topnav_hover.gif) no-repeat center top;
     58        background: url(../images/default_style/topnav/topnav_hover.gif) no-repeat center top;
    5959}
    6060ul.topnav li span { /*--Drop down trigger styles--*/
     
    6262        height: 35px;
    6363        float: left;
    64         background: url(../images/skin/topnav/subnav_btn.gif) no-repeat center top;
     64        background: url(../images/default_style/topnav/subnav_btn.gif) no-repeat center top;
    6565}
    6666ul.topnav li span.subhover {background-position: center bottom; cursor: pointer;} /*--Hover effect for trigger--*/
     
    9090        float: left;
    9191        width: 145px;
    92         background: #333 url(../images/skin/topnav/dropdown_linkbg.gif) no-repeat 10px center;
     92        background: #333 url(../images/default_style/topnav/dropdown_linkbg.gif) no-repeat 10px center;
    9393        padding-left: 20px;
    9494}
    9595html ul.topnav li ul.subnav li a:hover { /*--Hover effect for subnav links--*/
    96         background: #222 url(../images/skin/topnav/dropdown_linkbg.gif) no-repeat 10px center;
     96        background: #222 url(../images/default_style/topnav/dropdown_linkbg.gif) no-repeat 10px center;
    9797}
    9898/** END :: topnav **/
     
    153153}
    154154th {
    155     background: #fff url(../images/skin/tables/shadow.jpg);
     155    background: #fff url(../images/default_style/tables/shadow.jpg);
    156156    color: #666;
    157157    font-size: 11px;
     
    172172}
    173173th.asc a {
    174     background-image: url(../images/skin/tables/sorted_asc.gif);
     174    background-image: url(../images/default_style/tables/sorted_asc.gif);
    175175}
    176176th.desc a {
    177     background-image: url(../images/skin/tables/sorted_desc.gif);
     177    background-image: url(../images/default_style/tables/sorted_desc.gif);
    178178}
    179179
     
    211211}
    212212.buttons input.delete {
    213     background: transparent url(../images/obsolete/skin/database_delete.png) 5px 50% no-repeat;
     213    background: transparent url(../images/obsolete/default_style/database_delete.png) 5px 50% no-repeat;
    214214    padding-left: 28px;
    215215}
    216216.buttons input.edit {
    217     background: transparent url(../images/obsolete/skin/database_edit.png) 5px 50% no-repeat;
     217    background: transparent url(../images/obsolete/default_style/database_edit.png) 5px 50% no-repeat;
    218218    padding-left: 28px;
    219219}
    220220.buttons input.save {
    221     background: transparent url(../images/obsolete/skin/database_save.png) 5px 50% no-repeat;
     221    background: transparent url(../images/obsolete/default_style/database_save.png) 5px 50% no-repeat;
    222222    padding-left: 28px;
    223223}
  • trunk/web-app/css/login_panel.css

    r23 r29  
    2727/* Panel Tab/button */
    2828.tab {
    29         background: url(../images/skin/login_panel/tab_b.png) repeat-x 0 0;
     29        background: url(../images/default_style/login_panel/tab_b.png) repeat-x 0 0;
    3030        height: 42px;
    3131        position: relative;
     
    5151
    5252.tab ul.login li.left {
    53         background: url(../images/skin/login_panel/tab_l.png) no-repeat left 0;
     53        background: url(../images/default_style/login_panel/tab_l.png) no-repeat left 0;
    5454        height: 42px;
    5555        width: 30px;
     
    6161
    6262.tab ul.login li.right {
    63         background: url(../images/skin/login_panel/tab_r.png) no-repeat left 0;
     63        background: url(../images/default_style/login_panel/tab_r.png) no-repeat left 0;
    6464        height: 42px;
    6565        width: 30px;
     
    7676        float: left;
    7777        height: 42px;
    78         background: url(../images/skin/login_panel/tab_m.png) repeat-x 0 0;
     78        background: url(../images/default_style/login_panel/tab_m.png) repeat-x 0 0;
    7979}
    8080
     
    100100}
    101101
    102 .tab a.open {background: url(../images/skin/login_panel/bt_open.png) no-repeat left 0;}
    103 .tab a.close {background: url(../images/skin/login_panel/bt_close.png) no-repeat left 0;}
    104 .tab a:hover.open {background: url(../images/skin/login_panel/bt_open.png) no-repeat left -19px;}
    105 .tab a:hover.close {background: url(../images/skin/login_panel/bt_close.png) no-repeat left -19px;}
     102.tab a.open {background: url(../images/default_style/login_panel/bt_open.png) no-repeat left 0;}
     103.tab a.close {background: url(../images/default_style/login_panel/bt_close.png) no-repeat left 0;}
     104.tab a:hover.open {background: url(../images/default_style/login_panel/bt_open.png) no-repeat left -19px;}
     105.tab a:hover.close {background: url(../images/default_style/login_panel/bt_close.png) no-repeat left -19px;}
    106106
    107107/* sliding panel */
     
    223223#panel .content input.bt_login {
    224224        width: 74px;
    225         background: transparent url(../images/skin/login_panel/bt_login.png) no-repeat 0 0;
     225        background: transparent url(../images/default_style/login_panel/bt_login.png) no-repeat 0 0;
    226226}
    227227
     
    229229        width: 94px;
    230230        color: white;
    231         background: transparent url(../images/skin/login_panel/bt_register.png) no-repeat 0 0;
     231        background: transparent url(../images/default_style/login_panel/bt_register.png) no-repeat 0 0;
    232232}
    233233
Note: See TracChangeset for help on using the changeset viewer.