mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-16 22:10:25 +00:00
Merge branch 'master' of https://github.com/BradBroulik/jquery-mobile into BradBroulik-master
This commit is contained in:
commit
cdae2c2fdf
2 changed files with 23 additions and 5 deletions
|
|
@ -5,13 +5,20 @@
|
|||
module('jquery.mobile.dialog.js');
|
||||
|
||||
asyncTest( "dialog hash is added when the dialog is opened and removed when closed", function(){
|
||||
expect( 2 );
|
||||
expect( 6 );
|
||||
|
||||
//bring up the dialog
|
||||
$("a[href='#foo-dialog']").click();
|
||||
|
||||
setTimeout(function(){
|
||||
ok(/&ui-state=dialog/.test(location.hash), "ui-state=dialog =~ location.hash");
|
||||
|
||||
// Assert dialog theme inheritance (issue 1375):
|
||||
ok($('#foo-dialog').hasClass('ui-body-b'), 'Expected explicit theme ui-body-b');
|
||||
ok($('#foo-dialog').find( ":jqmData(role=header)" ).hasClass('ui-bar-a'), 'Expected header to inherit from $.mobile.page.prototype.options.headerTheme');
|
||||
ok($('#foo-dialog').find( ":jqmData(role=content)" ).hasClass('ui-body-d'), 'Expect content to inherit from $.mobile.page.prototype.options.contentTheme');
|
||||
ok($('#foo-dialog').find( ":jqmData(role=footer)" ).hasClass('ui-bar-a'), 'Expected footer to inherit from $.mobile.page.prototype.options.footerTheme');
|
||||
|
||||
// close the dialog
|
||||
$(".ui-dialog").dialog("close");
|
||||
}, 500);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,12 @@
|
|||
<title>jQuery Mobile Dialog Test Suite</title>
|
||||
|
||||
<script src="../../../js/jquery.js"></script>
|
||||
<script>
|
||||
$(document).bind('mobileinit',function(){
|
||||
// Expect content to inherit this theme when not explicitly set
|
||||
$.mobile.page.prototype.options.contentTheme = "d";
|
||||
});
|
||||
</script>
|
||||
<script src="../jquery.setNameSpace.js"></script>
|
||||
<script src="../../../js/"></script>
|
||||
<script src="../../../tests/jquery.testHelper.js"></script>
|
||||
|
|
@ -25,15 +31,20 @@
|
|||
<ol id="qunit-tests">
|
||||
</ol>
|
||||
|
||||
<div id="bar" data-nstest-role="page">
|
||||
<div id="bar" data-nstest-role="page" data-nstest-theme="a">
|
||||
<a href="#foo-dialog" data-nstest-role="button" data-nstest-inline="true" data-nstest-rel="dialog"></a>
|
||||
</div>
|
||||
|
||||
<div id="foo-dialog" data-nstest-role="dialog">
|
||||
<div data-nstest-role="header" data-nstest-theme="d" data-nstest-position="inline">
|
||||
<div id="foo-dialog" data-nstest-role="dialog" data-nstest-theme="b">
|
||||
<div data-nstest-role="header" data-nstest-position="inline">
|
||||
<h1>Dialog</h1>
|
||||
</div>
|
||||
<a href="#" id="internal-link">foo</a>
|
||||
<div data-nstest-role="content" >
|
||||
<a href="#" id="internal-link">foo</a>
|
||||
</div>
|
||||
<div data-nstest-role="footer">
|
||||
footer
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
|
|
|||
Loading…
Reference in a new issue