Sha256: 42d531555c95c690233e431504587624eae812ea5435efa1055cd31e6d87a04c
Contents?: true
Size: 1.5 KB
Versions: 6
Compression:
Stored size: 1.5 KB
Contents
// ========================================================================== // Project: SproutCore - JavaScript Application Framework // Copyright: ©2006-2011 Strobe Inc. and contributors. // Portions ©2008-2011 Apple Inc. All rights reserved. // License: Licensed under MIT license (see license.js) // ========================================================================== SC.BaseTheme.panelRenderDelegate = SC.RenderDelegate.create({ className: 'panel', render: function(dataSource, context) { context = context.begin('div').addClass('panel-background'); this.includeSlices(dataSource, context, SC.NINE_SLICE); context = context.end(); var ariaLabel = dataSource.get('ariaLabel'), ariaLabelledBy = dataSource.get('ariaLabelledBy'), ariaDescribedBy = dataSource.get('ariaDescribedBy'); if(ariaLabel) context.attr('aria-label', ariaLabel); if (ariaLabelledBy) context.attr('aria-labelledby', ariaLabelledBy); if (ariaDescribedBy) context.attr('aria-describedby', ariaDescribedBy); }, update: function(dataSource, jQuery) { // the label for the panel could change... var ariaLabel = dataSource.get('ariaLabel'), ariaLabelledBy = dataSource.get('ariaLabelledBy'), ariaDescribedBy = dataSource.get('ariaDescribedBy'); if(ariaLabel) jQuery.attr('aria-label', ariaLabel); if(ariaLabelledBy) jQuery.attr('aria-labelledby', ariaLabelledBy); if(ariaDescribedBy) jQuery.attr('aria-describedby', ariaDescribedBy); } });
Version data entries
6 entries across 6 versions & 1 rubygems