buttons now inherit theming from bar,body,and list (TBD) containers.

Consequently, when designing themes, button-A should be designed to pair well with bar,body,and list A.

This page shows a nice example of it in action:
http://jquerymobile.com/test/#_containers-states.html

Fixes #44
This commit is contained in:
scottjehl 2010-10-09 09:22:27 -04:00
parent 00c28aff4d
commit 5dbda8eb25

View file

@ -17,8 +17,8 @@ $.fn.buttonMarkup = function( options ){
}
//if not, find closest theme container
if(el.parents('body').length){
var themedParent = el.closest('[class*=ui-bar-]'); //this still catches ui-bar-blah...
return themedParent.length ? themedParent.attr('class').match(/ui-bar-([a-z])/)[1] : 'c';
var themedParent = el.closest('[class*=ui-bar-],[class*=ui-body-],[class*=ui-list-]');
return themedParent.length ? themedParent.attr('class').match(/ui-(bar|body|list)-([a-z])/)[2] : 'c';
}
else {
return 'c';