Skip to content
This repository
Browse code

updates for mobile mvc collapsibles tests

  • Loading branch information...
commit b0e16f9f4b1a5e3750316729bf61673bf517bd32 1 parent 25555a2
Andrew Powell shellscape authored
16 Juice/Mvc/Mobile/Collapsible.cs
@@ -19,11 +19,11 @@ public partial class MobileHelpers {
19 19 /// <param name="mini">Sets the size of the element to a more compact, mini version.</param>,
20 20 /// <param name="theme">Defines the theme swatch letter (a-z)</param>
21 21 /// <returns>CollapsibleWidget</returns>
22   - public CollapsibleWidget BeginCollapsible(String elementId = "", Boolean collapsed = true, String contentTheme = null, Boolean mini = false, String theme = null) {
  22 + public CollapsibleWidget BeginCollapsible(String elementId = "", Boolean collapsed = true, MobileIcon? collapsedIcon = null, String contentTheme = null, MobileIcon? expandedIcon = null, MobileIconPosition? iconpos = null, Boolean inset = true, Boolean mini = false, String theme = null) {
23 23 var widget = new CollapsibleWidget(_helper);
24 24
25 25 widget.SetCoreOptions(elementId, null);
26   - widget.Options(collapsed, contentTheme, mini, theme);
  26 + widget.Options(collapsed, collapsedIcon, contentTheme, expandedIcon, iconpos, inset, mini, theme);
27 27
28 28 return widget;
29 29 }
@@ -38,19 +38,27 @@ public partial class MobileHelpers {
38 38
39 39 public class CollapsibleWidget : JuiceMobileWidget<CollapsibleWidget>, IDisposable {
40 40
41   - public CollapsibleWidget(HtmlHelper helper) : base(helper, "collapsable") {
  41 + public CollapsibleWidget(HtmlHelper helper) : base(helper, "collapsible") {
42 42 _optionsMap = new Dictionary<String, String> {
43 43 { "collapsed", "collapsed" },
  44 + { "collapsedIcon", "collapsed-icon" },
44 45 { "contentTheme", "content-theme" },
  46 + { "expandedIcon", "expanded-icon" },
  47 + { "iconpos", "iconpos" },
  48 + { "inset", "inset" },
45 49 { "mini", "mini" },
46 50 { "theme", "theme" }
47 51 };
48 52 }
49 53
50   - public CollapsibleWidget Options(Boolean collapsed = true, String contentTheme = null, Boolean mini = false, String theme = null) {
  54 + public CollapsibleWidget Options(Boolean collapsed = true, MobileIcon? collapsedIcon = null, String contentTheme = null, MobileIcon? expandedIcon = null, MobileIconPosition? iconpos = null, Boolean inset = true, Boolean mini = false, String theme = null) {
51 55 base.SetOptions(
52 56 JuiceHelpers.GetMemberInfo(() => collapsed),
  57 + JuiceHelpers.GetMemberInfo(() => collapsedIcon),
53 58 JuiceHelpers.GetMemberInfo(() => contentTheme),
  59 + JuiceHelpers.GetMemberInfo(() => expandedIcon),
  60 + JuiceHelpers.GetMemberInfo(() => iconpos),
  61 + JuiceHelpers.GetMemberInfo(() => inset),
54 62 JuiceHelpers.GetMemberInfo(() => mini),
55 63 JuiceHelpers.GetMemberInfo(() => theme)
56 64 );
193 Tests/Mvc/Areas/Mobile/Views/Collapsibles/Index.cshtml
@@ -14,6 +14,199 @@
14 14 @Html.Juice().Mobile.BeginContent()
15 15
16 16
  17 + <h2>Inset, individual collapsible</h2>
  18 +
  19 + @Html.Juice().Mobile.BeginCollapsible(theme: "b", contentTheme: "c")
  20 + <h2>Choose a car model...</h2>
  21 + <ul data-role="listview">
  22 + <li><a href="index.html">Acura</a></li>
  23 + <li><a href="index.html">Audi</a></li>
  24 + <li><a href="index.html">BMW</a></li>
  25 + <li><a href="index.html">Cadillac</a></li>
  26 + <li><a href="index.html">Chrysler</a></li>
  27 + <li><a href="index.html">Dodge</a></li>
  28 + <li><a href="index.html">Ferrari</a></li>
  29 + <li><a href="index.html">Ford</a></li>
  30 + <li><a href="index.html">GMC</a></li>
  31 + <li><a href="index.html">Honda</a></li>
  32 + <li><a href="index.html">Hyundai</a></li>
  33 + <li><a href="index.html">Infiniti</a></li>
  34 + <li><a href="index.html">Jeep</a></li>
  35 + <li><a href="index.html">Kia</a></li>
  36 + <li><a href="index.html">Lexus</a></li>
  37 + <li><a href="index.html">Mini</a></li>
  38 + <li><a href="index.html">Nissan</a></li>
  39 + <li><a href="index.html">Porsche</a></li>
  40 + <li><a href="index.html">Subaru</a></li>
  41 + <li><a href="index.html">Toyota</a></li>
  42 + <li><a href="index.html">Volkswagon</a></li>
  43 + <li><a href="index.html">Volvo</a></li>
  44 + </ul>
  45 + @Html.Juice().Mobile.EndCollapsible()
  46 +
  47 + <h2>Inset, collapsible set</h2>
  48 +
  49 + @Html.Juice().Mobile.BeginCollapsibleSet(theme: "b", contentTheme: "d")
  50 +
  51 + @Html.Juice().Mobile.BeginCollapsible()
  52 + <h2>Filtered list</h2>
  53 + <ul data-role="listview" data-filter="true" data-filter-theme="c" data-divider-theme="d">
  54 + <li><a href="index.html">Adam Kinkaid</a></li>
  55 + <li><a href="index.html">Alex Wickerham</a></li>
  56 + <li><a href="index.html">Avery Johnson</a></li>
  57 + <li><a href="index.html">Bob Cabot</a></li>
  58 + <li><a href="index.html">Caleb Booth</a></li>
  59 + </ul>
  60 + @Html.Juice().Mobile.EndCollapsible()
  61 +
  62 + @Html.Juice().Mobile.BeginCollapsible()
  63 + <h2>Formatted text</h2>
  64 + <ul data-role="listview" data-theme="d" data-divider-theme="d">
  65 + <li data-role="list-divider">Friday, October 8, 2010 <span class="ui-li-count">2</span></li>
  66 + <li><a href="index.html">
  67 + <h3>Stephen Weber</h3>
  68 + <p><strong>You've been invited to a meeting at Filament Group in Boston, MA</strong></p>
  69 + <p>Hey Stephen, if you're available at 10am tomorrow, we've got a meeting with the jQuery team.</p>
  70 + <p class="ui-li-aside"><strong>6:24</strong>PM</p>
  71 + </a></li>
  72 + <li><a href="index.html">
  73 + <h3>jQuery Team</h3>
  74 + <p><strong>Boston Conference Planning</strong></p>
  75 + <p>In preparation for the upcoming conference in Boston, we need to start gathering a list of sponsors and speakers.</p>
  76 + <p class="ui-li-aside"><strong>9:18</strong>AM</p>
  77 + </a></li>
  78 + </ul>
  79 + @Html.Juice().Mobile.EndCollapsible()
  80 +
  81 + @Html.Juice().Mobile.BeginCollapsible()
  82 + <h2>Thumbnails and split button</h2>
  83 + <ul data-role="listview" data-split-icon="gear" data-split-theme="d">
  84 + <li><a href="index.html">
  85 + <img src="images/album-bb.jpg" />
  86 + <h3>Broken Bells</h3>
  87 + <p>Broken Bells</p>
  88 + </a><a href="lists-split-purchase.html" data-rel="dialog" data-transition="slideup">Purchase album
  89 + </a></li>
  90 + <li><a href="index.html">
  91 + <img src="images/album-hc.jpg" />
  92 + <h3>Warning</h3>
  93 + <p>Hot Chip</p>
  94 + </a><a href="lists-split-purchase.html" data-rel="dialog" data-transition="slideup">Purchase album
  95 + </a></li>
  96 + <li><a href="index.html">
  97 + <img src="images/album-p.jpg" />
  98 + <h3>Wolfgang Amadeus Phoenix</h3>
  99 + <p>Phoenix</p>
  100 + </a><a href="lists-split-purchase.html" data-rel="dialog" data-transition="slideup">Purchase album
  101 + </a></li>
  102 + </ul>
  103 + @Html.Juice().Mobile.EndCollapsible()
  104 +
  105 + @Html.Juice().Mobile.EndCollapsibleSet()
  106 +
  107 + <h2>Non-inset, collapsible set</h2>
  108 +
  109 + @Html.Juice().Mobile.BeginCollapsibleSet(theme: "b", contentTheme: "d", inset: false)
  110 +
  111 + @Html.Juice().Mobile.BeginCollapsible()
  112 + <h2>Mailbox</h2>
  113 + <ul data-role="listview">
  114 + <li><a href="index.html">Inbox <span class="ui-li-count">12</span></a></li>
  115 + <li><a href="index.html">Outbox <span class="ui-li-count">0</span></a></li>
  116 + <li><a href="index.html">Drafts <span class="ui-li-count">4</span></a></li>
  117 + <li><a href="index.html">Sent <span class="ui-li-count">328</span></a></li>
  118 + <li><a href="index.html">Trash <span class="ui-li-count">62</span></a></li>
  119 + </ul>
  120 + @Html.Juice().Mobile.EndCollapsible()
  121 +
  122 + @Html.Juice().Mobile.BeginCollapsible()
  123 + <h2>Calendar</h2>
  124 + <ul data-role="listview" data-theme="d" data-divider-theme="d">
  125 + <li data-role="list-divider">Friday, October 8, 2010 <span class="ui-li-count">2</span></li>
  126 + <li><a href="index.html">
  127 + <h3>Stephen Weber</h3>
  128 + <p><strong>You've been invited to a meeting at Filament Group in Boston, MA</strong></p>
  129 + <p>Hey Stephen, if you're available at 10am tomorrow, we've got a meeting with the jQuery team.</p>
  130 + <p class="ui-li-aside"><strong>6:24</strong>PM</p>
  131 + </a></li>
  132 + <li><a href="index.html">
  133 + <h3>jQuery Team</h3>
  134 + <p><strong>Boston Conference Planning</strong></p>
  135 + <p>In preparation for the upcoming conference in Boston, we need to start gathering a list of sponsors and speakers.</p>
  136 + <p class="ui-li-aside"><strong>9:18</strong>AM</p>
  137 + </a></li>
  138 + <li data-role="list-divider">Thursday, October 7, 2010 <span class="ui-li-count">1</span></li>
  139 + <li><a href="index.html">
  140 + <h3>Avery Walker</h3>
  141 + <p><strong>Re: Dinner Tonight</strong></p>
  142 + <p>Sure, let's plan on meeting at Highland Kitchen at 8:00 tonight. Can't wait! </p>
  143 + <p class="ui-li-aside"><strong>4:48</strong>PM</p>
  144 + </a></li>
  145 + <li data-role="list-divider">Wednesday, October 6, 2010 <span class="ui-li-count">3</span></li>
  146 + <li><a href="index.html">
  147 + <h3>Amazon.com</h3>
  148 + <p><strong>4-for-3 Books for Kids</strong></p>
  149 + <p>As someone who has purchased children's books from our 4-for-3 Store, you may be interested in these featured books.</p>
  150 + <p class="ui-li-aside"><strong>12:47</strong>PM</p>
  151 + </a></li>
  152 + </ul>
  153 + @Html.Juice().Mobile.EndCollapsible()
  154 +
  155 + @Html.Juice().Mobile.BeginCollapsible()
  156 + <h2>Contacts</h2>
  157 + <ul data-role="listview" data-autodividers="true" data-theme="d" data-divider-theme="d">
  158 + <li><a href="index.html">Adam Kinkaid</a></li>
  159 + <li><a href="index.html">Alex Wickerham</a></li>
  160 + <li><a href="index.html">Avery Johnson</a></li>
  161 + <li><a href="index.html">Bob Cabot</a></li>
  162 + <li><a href="index.html">Caleb Booth</a></li>
  163 + <li><a href="index.html">Christopher Adams</a></li>
  164 + <li><a href="index.html">Culver James</a></li>
  165 + </ul>
  166 + @Html.Juice().Mobile.EndCollapsible()
  167 +
  168 + @Html.Juice().Mobile.EndCollapsibleSet()
  169 +
  170 + <h2>Non-inset, individual collapsibles</h2>
  171 +
  172 + @Html.Juice().Mobile.BeginCollapsible(theme: "b", contentTheme: "d", collapsedIcon: MobileIcon.Gear, expandedIcon: MobileIcon.Check, inset: false)
  173 + <h2>Pets</h2>
  174 + <ul data-role="listview">
  175 + <li><a href="index.html">Canary</a></li>
  176 + <li><a href="index.html">Cat</a></li>
  177 + <li><a href="index.html">Dog</a></li>
  178 + <li><a href="index.html">Gerbil</a></li>
  179 + <li><a href="index.html">Iguana</a></li>
  180 + <li><a href="index.html">Mouse</a></li>
  181 + </ul>
  182 + @Html.Juice().Mobile.EndCollapsible()
  183 +
  184 + @Html.Juice().Mobile.BeginCollapsible(theme: "b", contentTheme: "d", collapsedIcon: MobileIcon.Gear, expandedIcon: MobileIcon.Check, inset: false)
  185 + <h2>Farm animals</h2>
  186 + <ul data-role="listview">
  187 + <li><a href="index.html">Chicken</a></li>
  188 + <li><a href="index.html">Cow</a></li>
  189 + <li><a href="index.html">Duck</a></li>
  190 + <li><a href="index.html">Horse</a></li>
  191 + <li><a href="index.html">Pig</a></li>
  192 + <li><a href="index.html">Sheep</a></li>
  193 + </ul>
  194 + @Html.Juice().Mobile.EndCollapsible()
  195 +
  196 + @Html.Juice().Mobile.BeginCollapsible(theme: "b", contentTheme: "d", collapsedIcon: MobileIcon.Gear, expandedIcon: MobileIcon.Check, inset: false)
  197 + <h2>Wild Animals</h2>
  198 + <ul data-role="listview">
  199 + <li><a href="index.html">Aardvark</a></li>
  200 + <li><a href="index.html">Alligator</a></li>
  201 + <li><a href="index.html">Ant</a></li>
  202 + <li><a href="index.html">Bear</a></li>
  203 + <li><a href="index.html">Beaver</a></li>
  204 + <li><a href="index.html">Cougar</a></li>
  205 + <li><a href="index.html">Dingo</a></li>
  206 + </ul>
  207 + @Html.Juice().Mobile.EndCollapsible()
  208 +
  209 +
17 210 @Html.Juice().Mobile.EndContent()
18 211
19 212

0 comments on commit b0e16f9

Please sign in to comment.
Something went wrong with that request. Please try again.