To participate you must create an account on apostrophenow.org. If you have already done so, click Login.

Changeset 2174

Show
Ignore:
Timestamp:
09/09/10 17:29:42 (17 months ago)
Author:
johnnyoffline
Message:

getting closer and closer to removing aUI

Location:
plugins/apostrophePlugin/trunk/web/js
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • plugins/apostrophePlugin/trunk/web/js/aControls.js

    r2165 r2174  
    916916                        }); 
    917917                }); 
    918         } 
     918        }; 
    919919}(jQuery); 
     920 
     921new function($) 
     922{ 
     923        $.fn.isChildOf = function(b){ 
     924                return (this.parents(b).length > 0); 
     925        };               
     926}(jQuery); 
  • plugins/apostrophePlugin/trunk/web/js/aUI.js

    r2171 r2174  
    1515        } 
    1616 
    17         if (!$.browser.msie) { // I know we're not supposed to use this. 
     17        var aBtns = $(target+' .a-btn, ' + target + ' .a-submit, ' + target + ' .a-cancel'); 
     18        aBtns.each(function() { 
     19                var aBtn = $(this); 
    1820 
    19                 var aBtns = $(target+' .a-btn, ' + target + ' .a-submit, ' + target + ' .a-cancel'); 
    20                 aBtns.each(function() { 
    21                         var aBtn = $(this); 
     21                // Setup Icons 
     22                if (aBtn.is('a') && aBtn.hasClass('icon') && !aBtn.children('.icon').length)  
     23                { 
     24                        aBtn.prepend('<span class="icon"></span>');                                              
     25                }; 
     26                 
     27                // Setup Flagging Buttons 
     28                if(aBtn.hasClass('flag')) 
     29                { 
     30                        if (!aBtn.children('.flag-label').length) 
     31                        { 
     32                                aBtn.attr('title','').wrapInner('<span class="flag-label"></span>');             
     33                        } 
    2234 
    23                         // Setup Icons 
    24                         if (aBtn.is('a') && aBtn.hasClass('icon') && !aBtn.children('.icon').length)  
    25                         { 
    26                                 aBtn.prepend('<span class="icon"></span>');                                              
    27                         }; 
    28                          
    29                         // Setup Flagging Buttons 
    30                         if(aBtn.hasClass('flag')) 
    31                         { 
    32                                 if (!aBtn.children('.flag-label').length) 
    33                                 { 
    34                                         aBtn.attr('title','').wrapInner('<span class="flag-label"></span>');             
    35                                 } 
    36  
    37                                 aBtn.hover(function () { 
    38                                         aBtn.addClass('expanded'); 
    39                                 },function () { 
    40                                         aBtn.removeClass('expanded'); 
    41                                 });      
    42                         } 
    43                  
    44           }); 
    45         } 
     35                        aBtn.hover(function () { 
     36                                aBtn.addClass('expanded'); 
     37                        },function () { 
     38                                aBtn.removeClass('expanded'); 
     39                        });      
     40                } 
     41         
     42  }); 
    4643         
    4744        // Variants 
     
    5956        $('.a-nav .a-archived-page').fadeTo(0,.5); // Archived Page Labels 
    6057 
    61         $('.a-controls li:last-child').addClass('last'); // Add 'last' Class To Last Option 
     58        // Apply clearfix on controls and options 
     59        $('.a-controls, .a-options').addClass('clearfix'); 
     60 
     61        // Add 'last' Class To Last Option 
     62        $('.a-controls li:last-child').addClass('last');  
    6263         
    6364        // You can define this function in your site.js to execute code whenenever apostrophe calls aUI(); 
     
    6768                aOverrides();    
    6869        } 
    69          
    70         // apply clearfix on controls and options 
    71         $('.a-controls, .a-options').addClass('clearfix'); 
    72          
    7370} 
    7471 
    7572$(document).ready(function(){ 
    7673        aUI();   
    77         jQuery.fn.isChildOf = function(b){ 
    78           return (this.parents(b).length > 0); 
    79         };       
    8074});