private void setupStructurePane() { dualAllowedContentTypes.ID = "allowedContentTypes"; dualAllowedContentTypes.Width = 175; uicontrols.TabPage tp = TabView1.NewTabPage("Structure"); tp.Controls.Add(pnlStructure); tp.Style.Add("text-align", "center"); ImageButton Save = tp.Menu.NewImageButton(); Save.Click += new System.Web.UI.ImageClickEventHandler(save_click); Save.ImageUrl = UmbracoPath + "/images/editor/save.gif"; int[] allowedIds = cType.AllowedChildContentTypeIDs; if (!Page.IsPostBack) { string chosenContentTypeIDs = ""; ContentType[] contentTypes = cType.GetAll(); foreach (cms.businesslogic.ContentType ct in contentTypes.OrderBy(x => x.Text)) { ListItem li = new ListItem(ct.Text, ct.Id.ToString()); dualAllowedContentTypes.Items.Add(li); lstAllowedContentTypes.Items.Add(li); foreach (int i in allowedIds) { if (i == ct.Id) { li.Selected = true; chosenContentTypeIDs += ct.Id + ","; } } } dualAllowedContentTypes.Value = chosenContentTypeIDs; } }
protected override void OnInit(EventArgs e) { // // CODEGEN: This call is required by the ASP.NET Web Form Designer. // InitializeComponent(); // Tab setup InfoTabPage = TabView1.NewTabPage("Macro Properties"); InfoTabPage.Controls.Add(Pane1); InfoTabPage.Controls.Add(Pane1_2); InfoTabPage.Controls.Add(Pane1_3); InfoTabPage.Controls.Add(Pane1_4); Parameters = TabView1.NewTabPage("Parameters"); Parameters.Controls.Add(Panel2); ImageButton save = InfoTabPage.Menu.NewImageButton(); save.ImageUrl = SystemDirectories.Umbraco + "/images/editor/save.gif"; save.ID = "save"; ImageButton save2 = Parameters.Menu.NewImageButton(); save2.ImageUrl = SystemDirectories.Umbraco + "/images/editor/save.gif"; base.OnInit(e); }
protected void Page_Load(object sender, EventArgs e) { var sourcePage = HttpContext.Current.Request.QueryString["sourcePage"]; var sourceId = int.Parse(HttpContext.Current.Request.QueryString["sourceId"]); var umbracoObjectsForPage = Configuration.GetUmbracoObjectsByPagePath(sourcePage); var relationTypesForPage = Configuration.RelationDefinitions.Where(x => umbracoObjectsForPage.Select(uo => uo.GetType()).Contains(x.From)); foreach (var relationType in relationTypesForPage) { var relations = relationType.GetRelations(sourceId); var tabCaption = Configuration.ResolveUmbracoObject(relationType.To).Name; var tabPage = TabView1.NewTabPage(tabCaption + " (" + relations.Rows.Count + ")"); tabPage.HasMenu = false; if (Configuration.ShowDescriptions) { tabPage.Controls.Add(new LiteralControl("<span class='description'>" + relationType.Description + "</span>")); } var pane = new Pane(); pane.Controls.Add(DataTableToHtml(relations)); tabPage.Controls.Add(pane); } }
protected override void OnInit(EventArgs e) { // Tab setup packageInfo = TabView1.NewTabPage("Package Properties"); packageInfo.Controls.Add(Pane1); packageInfo.Controls.Add(Pane1_1); packageInfo.Controls.Add(Pane1_2); packageInfo.Controls.Add(Pane1_3); packageContents = TabView1.NewTabPage("Package Contents"); packageContents.Controls.Add(Pane2); packageContents.Controls.Add(Pane2_1); packageContents.Controls.Add(Pane2_2); packageContents.Controls.Add(Pane2_3); packageContents.Controls.Add(Pane2_4); packageContents.Controls.Add(Pane2_5); packageContents.Controls.Add(Pane2_6); packageContents.Controls.Add(Pane2_7); packageFiles = TabView1.NewTabPage("Package Files"); packageFiles.Controls.Add(Pane3); packageFiles.Controls.Add(Pane3_1); packageFiles.Controls.Add(Pane3_2); packageActions = TabView1.NewTabPage("Package Actions"); packageActions.Controls.Add(Pane4); int count = 1; foreach (uicontrols.TabPage tp in TabView1.GetPanels()) { ImageButton saves = tp.Menu.NewImageButton(); saves.ImageUrl = SystemDirectories.Umbraco + "/images/editor/save.gif"; saves.CommandName = "save"; saves.AlternateText = "Save package"; saves.Command += new CommandEventHandler(saveOrPublish); saves.ID = "save_" + count; tp.BorderStyle = BorderStyle.None; tp.Style["background"] = "none !Important"; ImageButton publishes = tp.Menu.NewImageButton(); publishes.ImageUrl = SystemDirectories.Umbraco + "/images/editor/saveAndPublish.gif"; publishes.CommandName = "publish"; publishes.Command += new CommandEventHandler(saveOrPublish); publishes.AlternateText = "Save and publish the package as a .umb file"; count++; } base.OnInit(e); }
private void setupTabPane() { uicontrols.TabPage tp = TabView1.NewTabPage("Tabs"); pnlTab.Style.Add("text-align", "center"); tp.Controls.Add(pnlTab); ImageButton Save = tp.Menu.NewImageButton(); Save.Click += new System.Web.UI.ImageClickEventHandler(save_click); Save.ID = "SaveButton"; Save.ImageUrl = UmbracoPath + "/images/editor/save.gif"; bindTabs(); }
private void setupGenericPropertiesPane() { GenericPropertiesTabPage = TabView1.NewTabPage("Generic properties"); GenericPropertiesTabPage.Style.Add("text-align", "center"); GenericPropertiesTabPage.Controls.Add(pnlProperties); ImageButton Save = GenericPropertiesTabPage.Menu.NewImageButton(); Save.Click += new System.Web.UI.ImageClickEventHandler(save_click); Save.ImageUrl = UmbracoPath + "/images/editor/save.gif"; //dlTabs.ItemCommand += new DataListCommandEventHandler(dlTabs_ItemCommand); bindDataGenericProperties(false); }
protected override void OnInit(EventArgs e) { this._db = ApplicationContext.Current.DatabaseContext.Database; // Tab setup FirstTab = TabView1.NewTabPage("Settings"); FirstTab.Controls.Add(SettingsPane); //save button ImageButton save = FirstTab.Menu.NewImageButton(); save.Click += new ImageClickEventHandler(this.save_click); save.AlternateText = "Save"; save.ImageUrl = GlobalSettings.Path + "/images/editor/save.gif"; }
protected override void OnInit(EventArgs e) { // Tab setup packageInfo = TabView1.NewTabPage("Package Properties"); packageInfo.Controls.Add(Pane1); packageInfo.Controls.Add(Pane5); packageInfo.Controls.Add(Pane1_1); packageInfo.Controls.Add(Pane1_2); packageInfo.Controls.Add(Pane1_3); packageContents = TabView1.NewTabPage("Package Contents"); packageContents.Controls.Add(Pane2); packageContents.Controls.Add(Pane2_1); packageContents.Controls.Add(Pane2_2); packageContents.Controls.Add(Pane2_3); packageContents.Controls.Add(Pane2_4); packageContents.Controls.Add(Pane2_5); packageContents.Controls.Add(Pane2_6); packageContents.Controls.Add(Pane2_7); packageFiles = TabView1.NewTabPage("Package Files"); packageFiles.Controls.Add(Pane3); packageFiles.Controls.Add(Pane3_1); packageFiles.Controls.Add(Pane3_2); packageActions = TabView1.NewTabPage("Package Actions"); packageActions.Controls.Add(Pane4); var pubs = TabView1.Menu.NewButton(); pubs.Text = ui.Text("publish"); pubs.CommandName = "publish"; pubs.Command += new CommandEventHandler(saveOrPublish); pubs.ID = "saveAndPublish"; var saves = TabView1.Menu.NewButton(); saves.Text = ui.Text("save"); saves.CommandName = "save"; saves.Command += new CommandEventHandler(saveOrPublish); saves.ButtonType = uicontrols.MenuButtonType.Primary; saves.ID = "save"; base.OnInit(e); }
protected override void CreateChildControls() { base.CreateChildControls(); // Tab setup InfoTabPage = TabView1.NewTabPage("Macro Properties"); InfoTabPage.Controls.Add(Pane1); InfoTabPage.Controls.Add(Pane1_2); InfoTabPage.Controls.Add(Pane1_3); InfoTabPage.Controls.Add(Pane1_4); Parameters = TabView1.NewTabPage("Parameters"); Parameters.Controls.Add(Panel2); //var save = TabView1.Menu.NewButton(); //save.ButtonType = MenuButtonType.Primary; //save.Text = Services.TextService.Localize("save"); //save.ID = "save"; //save.Click += Save_Click; }
private void setupInfoPane() { InfoTabPage = TabView1.NewTabPage("Info"); InfoTabPage.Controls.Add(pnlInfo); InfoTabPage.Style.Add("text-align", "center"); ImageButton Save = InfoTabPage.Menu.NewImageButton(); Save.Click += new System.Web.UI.ImageClickEventHandler(save_click); Save.ImageUrl = UmbracoPath + "/images/editor/save.gif"; Save.AlternateText = ui.Text("save"); var listOfIcons = new List <ListItem>(); // Get icons // nh css file update, add support for css sprites foreach (string iconClass in cms.businesslogic.CMSNode.DefaultIconClasses) { ListItem li = new ListItem(helper.SpaceCamelCasing((iconClass.Substring(1, iconClass.Length - 1))).Replace("Spr Tree", "").Trim(), iconClass); li.Attributes.Add("class", "spriteBackground sprTree " + iconClass.Trim('.')); li.Attributes.Add("style", "padding-left:20px !important; background-repeat:no-repeat;"); if (!this.Page.IsPostBack && li.Value == cType.IconUrl) { li.Selected = true; } listOfIcons.Add(li); } DirectoryInfo dirInfo = new DirectoryInfo(UmbracoContext.Current.Server.MapPath(SystemDirectories.Umbraco + "/images/umbraco")); FileInfo[] fileInfo = dirInfo.GetFiles(); for (int i = 0; i < fileInfo.Length; i++) { // NH: don't show the sprite file if (fileInfo[i].Name != "sprites.png" && fileInfo[i].Name != "sprites_ie6.gif") { ListItem li = new ListItem(fileInfo[i].Name + " (deprecated)", fileInfo[i].Name); li.Attributes.Add("title", this.ResolveClientUrl(SystemDirectories.Umbraco + "/images/umbraco/" + fileInfo[i].Name)); if (li.Value == cType.IconUrl) { li.Selected = true; } listOfIcons.Add(li); } } ddlIcons.Items.AddRange(listOfIcons.OrderBy(o => o.Text).ToArray()); // Get thumbnails dirInfo = new DirectoryInfo(IOHelper.MapPath(SystemDirectories.Umbraco + "/images/thumbnails")); fileInfo = dirInfo.GetFiles(); for (int i = 0; i < fileInfo.Length; i++) { ListItem li = new ListItem(fileInfo[i].Name); li.Attributes.Add("title", this.ResolveClientUrl(SystemDirectories.Umbraco + "/images/thumbnails/" + fileInfo[i].Name)); if (!this.Page.IsPostBack && li.Value == cType.Thumbnail) { li.Selected = true; } ddlThumbnails.Items.Add(li); } Page.ClientScript.RegisterStartupScript(this.GetType(), "thumbnailsDropDown", @" function refreshDropDowns() { jQuery('#" + ddlIcons.ClientID + @"').msDropDown({ showIcon: true, style: 'width:250px;' }); jQuery('#" + ddlThumbnails.ClientID + @"').msDropDown({ showIcon: false, rowHeight: '130', visibleRows: '2', style: 'width:250px;' }); } jQuery(function() { refreshDropDowns(); }); ", true); txtName.Text = cType.GetRawText(); txtAlias.Text = cType.Alias; description.Text = cType.GetRawDescription(); }