From 554bb1e7e3d434487f5b65a9ef44ad5a961089d1 Mon Sep 17 00:00:00 2001 From: Michael O'Hearn Date: Mon, 7 Feb 2011 11:25:26 -0500 Subject: [PATCH 1/3] fixed a typo --- docs/lists/docs-lists.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/lists/docs-lists.html b/docs/lists/docs-lists.html index 8dd0a639..53513c48 100755 --- a/docs/lists/docs-lists.html +++ b/docs/lists/docs-lists.html @@ -33,7 +33,7 @@ Basic list example

Nested lists

-

By nesting child ul of ol inside list items, you can create nested lists. When a list item with a child list is clicked, the framework will generate a new ui-page populated with the title of the parent in the header and the list of child elements. These dynamic nested lists are styled with the "b" theme swatch (blue in the default theme) to indicate that you are in a secondary level of navigation. Lists can be nested multiple level deep and all pages and linking will be automatically handled by the framework.

+

By nesting child ul or ol inside list items, you can create nested lists. When a list item with a child list is clicked, the framework will generate a new ui-page populated with the title of the parent in the header and the list of child elements. These dynamic nested lists are styled with the "b" theme swatch (blue in the default theme) to indicate that you are in a secondary level of navigation. Lists can be nested multiple level deep and all pages and linking will be automatically handled by the framework.

To set the swatch color of the child list views, data-theme attribute on each list inside.

Nested list example From 743c6c9d9c99a02c7a87fe87542fe43a9ef153f8 Mon Sep 17 00:00:00 2001 From: John Bender Date: Thu, 10 Feb 2011 23:01:30 -0800 Subject: [PATCH 2/3] fixed broken listview test and added a bunch of semicolons --- tests/unit/listview/listview_core.js | 35 +++++++++++++++------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/tests/unit/listview/listview_core.js b/tests/unit/listview/listview_core.js index 17581acc..c4b48766 100644 --- a/tests/unit/listview/listview_core.js +++ b/tests/unit/listview/listview_core.js @@ -41,8 +41,8 @@ ok($('body > [data-url="nested-list-test&ui-page=More-animals-0"]').length == 1, "Adds first UL to the page"); ok($('body > [data-url="nested-list-test&ui-page=Groups-of-animals-1"]').length == 1, "Adds second nested UL to the page"); start(); - }, 1000) - }) + }, 1000); + }); asyncTest( "change to nested page when the li is clicked", function() { $('.ui-page-active li:eq(1)').click(); @@ -53,7 +53,7 @@ ok($('.ui-listview', $new_page).find(":contains('Shoal of Bass')").length == 1, "The current page should have the proper text in the list."); start(); }, 1000); - }) + }); asyncTest( "should go back to top level when the back button is clicked", function() { $('body > [data-url="nested-list-test&ui-page=More-animals-0"]').find('a:contains("Back")').click(); @@ -61,13 +61,13 @@ ok($('#nested-list-test').hasClass('ui-page-active'), 'Transitions back to the parent nested page'); start(); }, 1000); - }) - + }); + test( "nested list title should use first text node, regardless of line breaks", function(){ ok($('#nested-list-test .linebreaknode').text() === "More animals", 'Text should be "More animals"'); }); - module('Ordered Lists') + module('Ordered Lists'); asyncTest( "changes to the numbered list page and enhances it", function() { location.href = location.href.split('#')[0] + "#numbered-list-test"; @@ -83,7 +83,7 @@ asyncTest( "changes to number 1 page when the li is clicked", function() { $('.ui-page-active li').first().click(); setTimeout(function() { - ok($('#numbered-list-results').hasClass('ui-page-active'), "The new numbered page was transitioned correctly.") + ok($('#numbered-list-results').hasClass('ui-page-active'), "The new numbered page was transitioned correctly."); start(); }, 1000); }); @@ -94,9 +94,9 @@ ok($('#numbered-list-test').hasClass('ui-page-active')); start(); }, 1000); - }) + }); - module('Read only list') + module('Read only list'); asyncTest( "changes to the read only page when hash is changed", function() { location.href = location.href.split('#')[0] + "#read-only-list-test"; @@ -110,14 +110,14 @@ }); asyncTest( "Does not go to new page when an item is clicked", function() { - $('li', $('#read-only-list-test').first().click()) + $('li', $('#read-only-list-test').first().click()); setTimeout(function() { - ok($('.ui-page-active').attr('id') == "read-only-list-test", "Page does not change for read only lists") + ok($('.ui-page-active').attr('id') == "read-only-list-test", "Page does not change for read only lists"); start(); }, 1000); }); - module('Split view list') + module('Split view list'); asyncTest( "changes the page to the split view list and enhances it correctly.", function() { location.href = location.href.split('#')[0] + "#split-list-test"; @@ -174,10 +174,13 @@ }, 1000); }); - module( "Search Filter" ); + module( "Search Filter", { + setup: function(){ + location.href = location.href.split('#')[0] + "#search-filter-test"; + } + }); asyncTest( "Make the search filter page the actie page and enhance it correctly.", function() { - location.href = location.href.split('#')[0] + "#search-filter-test"; setTimeout(function() { var $new_page = $('#search-filter-test'); ok($new_page.find('input').length == 1); @@ -191,7 +194,7 @@ $('.ui-page-active input').trigger('change'); setTimeout(function() { - ok($('.ui-page-active li[style="display: none; "]').length == 2); + ok($('.ui-page-active li[style="display: none;"]').length == 2); start(); }, 1000); }); @@ -200,7 +203,7 @@ $('.ui-page-active input').val('a'); $('.ui-page-active input').trigger('change'); setTimeout(function() { - ok($('.ui-page-active li[style="display: none; "]').length == 0); + ok($('.ui-page-active li[style="display: none;"]').length == 0); start(); }, 1000); }); From 265f6d9ca8a293cd44986c38624d657e7cbf0f92 Mon Sep 17 00:00:00 2001 From: John Bender Date: Thu, 10 Feb 2011 23:24:49 -0800 Subject: [PATCH 3/3] switch instances of ok to same for test failure clarity --- tests/unit/listview/listview_core.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/listview/listview_core.js b/tests/unit/listview/listview_core.js index c4b48766..0ac969f8 100644 --- a/tests/unit/listview/listview_core.js +++ b/tests/unit/listview/listview_core.js @@ -194,7 +194,7 @@ $('.ui-page-active input').trigger('change'); setTimeout(function() { - ok($('.ui-page-active li[style="display: none;"]').length == 2); + same($('.ui-page-active li[style="display: none;"]').length, 2); start(); }, 1000); }); @@ -203,7 +203,7 @@ $('.ui-page-active input').val('a'); $('.ui-page-active input').trigger('change'); setTimeout(function() { - ok($('.ui-page-active li[style="display: none;"]').length == 0); + same($('.ui-page-active li[style="display: none;"]').length, 0); start(); }, 1000); });