mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-07 16:10:58 +00:00
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:
parent
00c28aff4d
commit
5dbda8eb25
1 changed files with 2 additions and 2 deletions
|
|
@ -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';
|
||||
|
|
|
|||
Loading…
Reference in a new issue