Changeset 2174
- Timestamp:
- 09/09/10 17:29:42 (17 months ago)
- Location:
- plugins/apostrophePlugin/trunk/web/js
- Files:
-
- 2 modified
-
aControls.js (modified) (1 diff)
-
aUI.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
plugins/apostrophePlugin/trunk/web/js/aControls.js
r2165 r2174 916 916 }); 917 917 }); 918 } 918 }; 919 919 }(jQuery); 920 921 new 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 15 15 } 16 16 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); 18 20 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 } 22 34 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 }); 46 43 47 44 // Variants … … 59 56 $('.a-nav .a-archived-page').fadeTo(0,.5); // Archived Page Labels 60 57 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'); 62 63 63 64 // You can define this function in your site.js to execute code whenenever apostrophe calls aUI(); … … 67 68 aOverrides(); 68 69 } 69 70 // apply clearfix on controls and options71 $('.a-controls, .a-options').addClass('clearfix');72 73 70 } 74 71 75 72 $(document).ready(function(){ 76 73 aUI(); 77 jQuery.fn.isChildOf = function(b){78 return (this.parents(b).length > 0);79 };80 74 });

