A set of properties to apply to a set of jQuery UI Tab.
Beispiel #1
0
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="parent">MenuItem object _this_ item belongs to</param>
		public MenuItem(MenuItem parent) {
			this.Parent = parent;
			this.Menu = parent.Menu;
			this.Tag = DEFAULT_SINGLE_TAG;
			this.Children = new MenuItems(this);
			this.IsDisabled = false;
		}
Beispiel #2
0
		/// <summary>
		/// Adds a new item to the menu.
		/// </summary>
		/// <param name="title">Text to appear in the hyperlink</param>
		/// <param name="url">URL to navigate to upon selecting the menu item.</param>
		/// <param name="icon">Icon to display next to the menu item</param>
		/// <returns>Sub-menu list for chainability</returns>
		public MenuItems Add(string title, string url, Core.Icons.eIconClass icon) {
			MenuItem i = new MenuItem(this.Parent)
				.SetTitle(title)
				.SetTargetURL(url)
				.SetIcon(icon)
			;
			_MenuItems.Add(i);
			return this;
		}
Beispiel #3
0
		/// <summary>
		/// Adds a new item to the menu.
		/// </summary>
		/// <param name="title">Text to appear in the hyperlink</param>
		/// <param name="url">URL to navigate to upon selecting the menu item.</param>
		/// <returns>Sub-menu list for chainability</returns>
		public MenuItems Add(string title, string url) {
			MenuItem i = new MenuItem(this.Parent)
				.SetTitle(title)
				.SetTargetURL(url)
			;
			_MenuItems.Add(i);
			return this;
		}
Beispiel #4
0
		public MenuItems(MenuItem owner, string id) {
			this.Parent = owner;
			this._MenuItems = new List<MenuItem>();	
			base.WithID(id);		
		}
Beispiel #5
0
		public MenuItems(MenuItem owner)
		: this(owner, "")
		{
		}	
Beispiel #6
0
		/// <summary>
		/// Adds a new item to the menu, this replaces the hyperlink, but not the LI (or defined separator).
		/// </summary>
		/// <param name="markup">HTML to use</param>
		/// <returns>Sub-menu list for chainability</returns>
		public MenuItems AddHtml(string markup) {
			MenuItem i = new MenuItem(this.Parent) {
				Html = markup
			};
			_MenuItems.Add(i);
			return this;
		} 
Beispiel #7
0
		/// <summary>
		/// Adds a divider into the menu.  Useful if you want to group certain items
		/// </summary>
		/// <returns>Sub-menu list for chainability</returns>
		public MenuItems AddDivider() {
			MenuItem i = new MenuItem(this.Parent)
				.SetAsDivider()
			;
			_MenuItems.Add(i);	
			return this;
		}
Beispiel #8
0
		/// <summary>
		/// Adds a new item to the menu.
		/// </summary>
		/// <param name="title">Text to appear in the hyperlink</param>
		/// <param name="url">URL to navigate to upon selecting the menu item.</param>
		/// <returns>Sub-menu list for chainability</returns>
		public MenuItems Add(string title, string url) {
			//return this.Add(title, url, Core.Icons.eIconClass.none);
			MenuItem i = new MenuItem(this.Parent)
				.SetTitle(title)
				.SetTargetURL(url)
			;
			_MenuItems.Add(i);
			return this;
		}