Files
Umbraco-CMS/src/umbraco.controls/MenuButtonI.cs
Per Ploug d214935ecb Panel, Tabview, Propertie controls converted
Changed the html to output bootstrap html, masterpages load our belle
css + bootstrap.min.js
2013-06-26 11:12:06 +02:00

60 lines
1.7 KiB
C#

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using ClientDependency.Core;
namespace umbraco.uicontrols {
public class MenuImageButton : System.Web.UI.WebControls.ImageButton, MenuIconI {
private string _OnClickCommand = "";
public string AltText {
get { return this.AlternateText; }
set {
this.AlternateText = value;
this.Attributes.Add("title", value);
}
}
public int IconWidth {
get { return (int)this.Width.Value; }
set { this.Width = value; }
}
public int IconHeight {
get { return (int)this.Height.Value; }
set { this.Height = value; }
}
public string ImageURL {
get { return base.ImageUrl; }
set { base.ImageUrl = value; }
}
public string OnClickCommand {
get { return _OnClickCommand; }
set { _OnClickCommand = value; }
}
protected override void CreateChildControls()
{
this.Width = Unit.Pixel(20);
this.Height = Unit.Pixel(20);
this.Style.Clear();
this.Attributes.Add("class", "btn btn-default editorIcon");
if (_OnClickCommand != "")
{
this.Attributes.Add("onClick", OnClickCommand);
}
base.CreateChildControls();
}
}
}