Assembla home | Assembla project page
 

Changeset 133

Show
Ignore:
Timestamp:
07/21/07 18:59:46 (1 year ago)
Author:
digitalspaghetti
Message:

Improved accessibility plugin, added themes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branch/app_model.php

    r118 r133  
    297297        $this->$this->name->savefield('published', 0); 
    298298    } 
     299         
     300        function usertheme() 
     301        { 
     302                 
     303        } 
    299304} 
    300305?> 
  • branch/models/user.php

    r118 r133  
    2828        var $hasOne = array( 
    2929                        'Profile' => array('className' => 'Profile'), 
     30                        'Theme' =>      array('className' => 'Theme'), 
    3031        ); 
    3132 
  • branch/views/layouts/default.ctp

    r128 r133  
    1010        <link rel="shortcut icon" href="<?php echo $this->webroot;?>favicon.ico" type="image/x-icon" /> 
    1111        <?php echo $html->css('high-contrast');?> 
     12        <?php echo $html->css('aqua');?> 
    1213        <?php echo $html->css('default');?> 
    1314        <?php e($this->element('js_include'));?> 
  • branch/webroot/css/default.css

    r127 r133  
    1010 
    1111/* Layout Code */ 
    12 body, body.m
     12body
    1313        font: 76% "Lucida Grande", Verdana, sans-serif; 
    1414    background: #36393B /*url('../img/bg.png') repeat-x*/; 
     
    1616} 
    1717 
    18 body.l {font-size: 90%; } 
    19 body.xl {font-size: 110%; } 
    20 body.xxl {font-size: 130%; } 
     18.m { font-size: 76%; } 
     19.l {font-size: 90%; } 
     20.xl {font-size: 110%; } 
     21.xxl {font-size: 130%; } 
    2122 
    2223a {color:#EEE6AB; text-decoration:none;} 
  • branch/webroot/css/jquery.ability.css

    r127 r133  
    77        float:left; 
    88        margin-right:10px; 
    9         border: 2px solid #fff; 
    109        padding: 2px; 
    1110        text-align:center; 
    12         background: #000; 
     11        text-decoration: none; 
     12        vertical-align:middle; 
    1313} 
     14 
     15ul.fontsize li:hover, ul.switcher li:hover { 
     16        color:#ccc; 
     17        border-bottom:2px solid #ccc; 
     18} 
     19 
     20ul.fontsize li a, ul.switcher li a { 
     21        font: 80% "Agency FB"; 
     22} 
     23 
     24ul.fontsize li a.selected, ul.switcher li a.selected { 
     25        font-weight:bold; 
     26        text-decoration:underline; 
     27} 
  • branch/webroot/js/jquery.ability.js

    r127 r133  
    1313(function($) { 
    1414         
    15         function switchStyleSheet(stylename, settings) { 
     15        function switchStyleSheet(stylename, settings, button) { 
    1616                $('link[@rel*=stylesheet]').each(function(){ 
    1717                        this.disabled = true; 
    18                         if (jQuery(this).attr('href') == settings.styledir + stylename) this.disabled = false; 
     18                        if (jQuery(this).attr('href') == settings.styledir + stylename) 
     19                        { 
     20                                this.disabled = false; 
     21                                jQuery('ul.switcher li a.selected').removeClass(); 
     22                                jQuery(button).removeClass().addClass("selected"); 
     23                        } 
    1924                         
    2025                        if (settings.savecookie == true){ 
     
    2429        } 
    2530         
    26         function switchTextSize(size, settings) { 
     31        function switchTextSize(size, settings, button) { 
    2732                jQuery('body').removeClass().addClass(size); 
     33                jQuery('ul.fontsize li a.selected').removeClass(); 
     34                jQuery(button).removeClass().addClass("selected"); 
    2835                if (settings.savecookie == true){ 
    2936                        jQuery.cookie('textsize', size, 365); 
     
    3542                if (settings.textsizer == true) { 
    3643                        jQuery('body').removeClass(); 
     44                        jQuery('ul.fontsize li a.selected').removeClass(); 
    3745                        jQuery.cookie('textsize', null, {expires: -1}); 
    3846                } 
     
    4048                if (settings.switcher == true) { 
    4149                        switchStyleSheet(settings.defaultcss, settings); 
     50                        jQuery('ul.switcher li a.selected').removeClass(); 
    4251                        jQuery.cookie('style', null, {expires: -1}); 
    4352                } 
     
    5665                                textsizeclasses: ['m', 'l', 'xl', 'xxl'], 
    5766                                switcher: true, 
    58                                 switcherstyles: ['default.css', 'high-contrast.css'], 
     67                                switcherstyles: ['default.css', 'aqua.css' ,'high-contrast.css'], 
    5968                                styledir: "/css/", 
    6069                                savecookie: true, 
     
    7382                                if (settings.textsizer == true) { 
    7483                                        if (curtextsize) { jQuery('body').removeClass().addClass(curtextsize); } 
    75                                         var textsizer = '<ul class="fontsize">'; 
     84                                        var textsizer = '<ul class="fontsize"><li>Text Size:</li>'; 
    7685                                        for (var i=0, len = settings.textsizeclasses.length; i < len; i++) { 
    77                                                 textsizer += '<li><a href="#" rel="' + settings.textsizeclasses[i] + '">' + settings.textsizeclasses[i].toUpperCase() + '</a></li>' 
     86                                                textsizer += '<li><a href="#" class="btn-' + settings.textsizeclasses[i] + '" rel="' + settings.textsizeclasses[i] + '">' + settings.textsizeclasses[i].toUpperCase() + '</a></li>' 
    7887                                        } 
    7988                                        textsizer += '</ul>'; 
     
    8392                                if (settings.switcher == true) { 
    8493                                        if (curstyle) { switchStyleSheet(curstyle, settings); } 
    85                                         var switcher = '<ul class="switcher">'; 
     94                                        var switcher = '<ul class="switcher"><li>Style Sheet:</li>'; 
    8695                                        for (var i=0, len = settings.switcherstyles.length; i < len; i++) { 
    8796                                                var brokenstring=settings.switcherstyles[i].split("."); 
     
    96105                                 
    97106                                jQuery('ul.fontsize li a').bind('click', function(){ 
    98                                                 switchTextSize(jQuery(this).attr('rel'), settings); 
     107                                                switchTextSize(jQuery(this).attr('rel'), settings, this); 
    99108                                                return false; 
    100109                                }); 
    101110                                jQuery('ul.switcher li a').bind('click', function(){ 
    102                                         switchStyleSheet(jQuery(this).attr('rel'), settings); 
     111                                        switchStyleSheet(jQuery(this).attr('rel'), settings, this); 
    103112                                        return false; 
    104113                                });