Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
shellscape committed Oct 30, 2012
2 parents 516a85c + 6b31289 commit 63255d1
Show file tree
Hide file tree
Showing 6 changed files with 132 additions and 15 deletions.
8 changes: 8 additions & 0 deletions Juice/Mobile/Listview.cs
Expand Up @@ -32,6 +32,7 @@ public class Listview : ThemeControlBase {

/// <summary>
/// Sets the color scheme (swatch) for list item count bubbles.
/// Reference: http://jquerymobile.com/demos/1.2.0/docs/api/data-attributes.html
/// </summary>
[WidgetOption("count-theme", "c")]
[Category("Appearance")]
Expand All @@ -41,6 +42,7 @@ public class Listview : ThemeControlBase {

/// <summary>
/// Sets the color scheme (swatch) for list dividers.
/// Reference: http://jquerymobile.com/demos/1.2.0/docs/api/data-attributes.html
/// </summary>
[WidgetOption("dividertheme", "b")]
[Category("Appearance")]
Expand All @@ -50,6 +52,7 @@ public class Listview : ThemeControlBase {

/// <summary>
/// Adds a search filter bar to listviews.
/// Reference: http://jquerymobile.com/demos/1.2.0/docs/api/data-attributes.html
/// </summary>
[WidgetOption("filter", false)]
[Category("Behavior")]
Expand All @@ -59,6 +62,7 @@ public class Listview : ThemeControlBase {

/// <summary>
/// The placeholder text used in search filter bars.
/// Reference: http://jquerymobile.com/demos/1.2.0/docs/api/data-attributes.html
/// </summary>
[WidgetOption("filter-placeholder", null)]
[Category("Appearance")]
Expand All @@ -68,6 +72,7 @@ public class Listview : ThemeControlBase {

/// <summary>
/// Sets the color scheme (swatch) for the search filter bar.
/// Reference: http://jquerymobile.com/demos/1.2.0/docs/api/data-attributes.html
/// </summary>
[WidgetOption("filter-theme", "c")]
[Category("Appearance")]
Expand All @@ -77,6 +82,7 @@ public class Listview : ThemeControlBase {

/// <summary>
/// Adds inset list styles.
/// Reference: http://jquerymobile.com/demos/1.2.0/docs/api/data-attributes.html
/// </summary>
[WidgetOption("inset", false)]
[Category("Appearance")]
Expand All @@ -86,6 +92,7 @@ public class Listview : ThemeControlBase {

/// <summary>
/// Applies an icon from the icon set to all split list buttons.
/// Reference: http://jquerymobile.com/demos/1.2.0/docs/api/data-attributes.html
/// </summary>
[WidgetOption("split-icon", null)]
[Category("Appearance")]
Expand All @@ -95,6 +102,7 @@ public class Listview : ThemeControlBase {

/// <summary>
/// Sets the color scheme (swatch) for split list buttons.
/// Reference: http://jquerymobile.com/demos/1.2.0/docs/api/data-attributes.html
/// </summary>
[WidgetOption("split-theme", "b")]
[Category("Appearance")]
Expand Down
2 changes: 2 additions & 0 deletions Juice/Mobile/ListviewItem.cs
Expand Up @@ -26,6 +26,7 @@ public class ListviewItem : ThemeControlBase {

/// <summary>
/// Filter by this value instead of inner text.
/// Reference: http://jquerymobile.com/demos/1.2.0/docs/api/data-attributes.html
/// </summary>
[WidgetOption("filtertext", null)]
[Category("Appearance")]
Expand All @@ -35,6 +36,7 @@ public class ListviewItem : ThemeControlBase {

/// <summary>
/// The icon for this item.
/// Reference: http://jquerymobile.com/demos/1.2.0/docs/api/data-attributes.html
/// </summary>
[WidgetOption("icon", null)]
[Category("Appearance")]
Expand Down
24 changes: 20 additions & 4 deletions Juice/Mobile/Navbar.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Web.UI;
Expand All @@ -8,18 +9,33 @@

namespace Juice.Mobile {

//A number of LIs wrapped in a container with data-role="navbar"
/// <summary>
/// A number of LIs wrapped in a container with data-role="navbar".
/// </summary>
[ParseChildren(typeof(NavbarItem))]
public class Navbar : ThemeControlBase {

public Navbar() : base("navbar") { }

//data-icon home | delete | plus | arrow-u | arrow-d | check | gear | grid | star | custom | arrow-r | arrow-l | minus | refresh | forward | back | alert | info | search
/// <summary>
/// Icon navbar.
/// Reference: http://jquerymobile.com/demos/1.2.0/docs/api/data-attributes.html
/// </summary>
[WidgetOption("icon", null)]
[Category("Appearance")]
[DefaultValue(null)]
[Description("Icon navbar.")]
public MobileIcon? Icon { get; set; }

//data-iconpos left | right | top | bottom | notext


/// <summary>
/// Positions the icon in the button. Possible values: left, right, top, bottom, none, notext. The notext value will display an icon-only button with no text feedback.
/// Reference: http://jquerymobile.com/demos/1.2.0/docs/api/data-attributes.html
/// </summary>
[WidgetOption("iconpos", null)]
[Category("Appearance")]
[DefaultValue(null)]
[Description("Positions the icon in the button. Possible values: left, right, top, bottom, none, notext. The notext value will display an icon-only button with no text feedback.")]
public MobileIconPosition? IconPosition { get; set; }

protected override void Render(HtmlTextWriter writer) {
Expand Down
4 changes: 3 additions & 1 deletion Juice/Mobile/NavbarItem.cs
Expand Up @@ -8,7 +8,9 @@

namespace Juice.Mobile {

//LI within a navbar
/// <summary>
/// LI within a navbar.
/// </summary>
[ParseChildren(false)]
public class NavbarItem : System.Web.UI.WebControls.WebControl {

Expand Down
68 changes: 60 additions & 8 deletions Juice/Mobile/Page.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Web.UI;
Expand All @@ -8,43 +9,94 @@

namespace Juice.Mobile {

//Container with data-role="page"
/// <summary>
/// Container with data-role="page".
/// </summary>
[ParseChildren(false)]
public class Page : ThemeControlBase {

public Page() : base("page") { }

//data-add-back-btn true | false (auto add back button, header only)
/// <summary>
/// Add a back button to the page.
/// Reference: http://jquerymobile.com/demos/1.2.0/docs/api/data-attributes.html
/// </summary>
[WidgetOption("add-back-btn", false)]
[Category("Behavior")]
[DefaultValue(false)]
[Description("Add a back button to the page.")]
public Boolean AddBackButton { get; set; }

//data-back-btn-text string
/// <summary>
/// Text of the back button.
/// Reference: http://jquerymobile.com/demos/1.2.0/docs/api/data-attributes.html
/// </summary>
[WidgetOption("back-btn-text", "Back")]
[Category("Behavior")]
[DefaultValue("Back")]
[Description("Text of the back button.")]
public String BackButtonText { get; set; }

//data-back-btn-theme swatch letter (a-z)
/// <summary>
/// Sets the color scheme (swatch) for the back button.
/// Reference: http://jquerymobile.com/demos/1.2.0/docs/api/data-attributes.html
/// </summary>
[WidgetOption("back-btn-theme", null)]
[Category("Appearance")]
[DefaultValue(null)]
[Description("Sets the color scheme (swatch) for the back button.")]
public String BackButtonTheme { get; set; }

//data-close-btn-text string (text for the close button, dialog only)
/// <summary>
/// Text for the close button, dialog only
/// Reference: http://jquerymobile.com/demos/1.2.0/docs/api/data-attributes.html
/// </summary>
[WidgetOption("close-btn-text", "Close")]
[Category("Appearance")]
[DefaultValue("Close")]
[Description("text for the close button, dialog only.")]
public String CloseButtonText { get; set; }

//data-dom-cache true | false
/// <summary>
/// Apply dom-cache.
/// Reference: http://jquerymobile.com/demos/1.2.0/docs/api/data-attributes.html
/// </summary>
[WidgetOption("dom-cache", false)]
[Category("Behavior")]
[DefaultValue(false)]
[Description("Apply dom-cache.")]
public Boolean DomCache { get; set; }

//data-fullscreen true | false (used in conjunction with fixed toolbars)
/// <summary>
/// Used in conjunction with fixed toolbars.
/// Reference: http://jquerymobile.com/demos/1.2.0/docs/api/data-attributes.html
/// </summary>
[WidgetOption("fullscreen", false)]
[Category("Behavior")]
[DefaultValue(false)]
[Description("Used in conjunction with fixed toolbars.")]
public Boolean Fullscreen { get; set; }

//data-overlay-theme swatch letter (a-z) - overlay theme when the page is opened in a dialog
/// <summary>
/// Overlay theme when the page is opened in a dialog.
/// Reference: http://jquerymobile.com/demos/1.2.0/docs/api/data-attributes.html
/// </summary>
[WidgetOption("overlay-theme", null)]
[Category("Appearance")]
[DefaultValue(null)]
[Description("overlay theme when the page is opened in a dialog.")]
public String OverlayTheme { get; set; }

//data-title string (title used when page is shown)
/// <summary>
/// Title used when page is shown.
/// Reference: http://jquerymobile.com/demos/1.2.0/docs/api/data-attributes.html
/// </summary>
[WidgetOption("title", "Juice UI Mobile Dialog")]
[Category("Appearance")]
[DefaultValue("Juice UI Mobile Dialog")]
[Description("Title used when page is shown.")]
public String Title { get; set; }

}
}
41 changes: 39 additions & 2 deletions Juice/Mobile/Popup.cs
Expand Up @@ -10,27 +10,64 @@

namespace Juice.Mobile {

//Container with data-role="header"
/// <summary>
/// Container with data-role="header".
/// </summary>
[ParseChildren(false)]
public class Popup : ThemeControlBase {

public Popup() : base("popup") { }

//data-corners true | false
/// <summary>
/// Sets whether to draw the popup with rounded corners.
/// Reference: http://jquerymobile.com/demos/1.2.0/docs/api/data-attributes.html
/// </summary>
[WidgetOption("corners", true)]
[Category("Appearance")]
[DefaultValue(true)]
[Description("Sets whether to draw the popup with rounded corners.")]
public Boolean Corners { get; set; }

/// <summary>
/// Allow popup to be closed.
/// Reference: http://jquerymobile.com/demos/1.2.0/docs/api/data-attributes.html
/// </summary>
[WidgetOption("dismissable", true)]
[Category("Appearance")]
[DefaultValue(true)]
[Description("Allow popup to be closed.")]
public Boolean Dismissable { get; set; }

//data-overlay-theme swatch letter (a-z) - overlay theme when the page is opened in a dialog
/// <summary>
/// Sets the color scheme (swatch) for the popup background, which covers the entire window.
/// Reference: http://jquerymobile.com/demos/1.2.0/docs/api/data-attributes.html
/// </summary>
[WidgetOption("overlay-theme", null)]
[Category("Appearance")]
[DefaultValue(null)]
[Description("Sets the color scheme (swatch) for the popup background, which covers the entire window.")]
public String OverlayTheme { get; set; }

/// <summary>
/// Sets whether to draw a shadow around the popup.
/// Reference: http://jquerymobile.com/demos/1.2.0/docs/api/data-attributes.html
/// </summary>
[WidgetOption("shadow", true)]
[Category("Appearance")]
[DefaultValue(true)]
[Description("Sets whether to draw a shadow around the popup.")]
public Boolean Shadow { get; set; }

/// <summary>
/// Sets the minimum distance from the edge of the window for the corresponding edge of the popup. By default, the values above will be used for the distance from the top, right, bottom, and left edge of the window, respectively.
/// Reference: http://jquerymobile.com/demos/1.2.0/docs/api/data-attributes.html
/// </summary>
[WidgetOption("tolerance", null)]
[Category("Appearance")]
[DefaultValue(null)]
[Description("Sets the minimum distance from the edge of the window for the corresponding edge of the popup. By default, the values above will be used for the distance from the top, right, bottom, and left edge of the window, respectively.")]
[TypeConverter(typeof(Juice.Mobile.Framework.TypeConverters.MobileToleranceConverter))]
public Juice.Mobile.Framework.MobileTolerance Tolerance { get; set; }
}
Expand Down

0 comments on commit 63255d1

Please sign in to comment.