From 37444a500d3fee2dabcb7ddf9c38a30f183722a4 Mon Sep 17 00:00:00 2001 From: Warren Date: Wed, 1 Aug 2018 13:53:24 +0100 Subject: [PATCH] ScrollingMenu - now that is vintage V3 & V4 UI days ! --- .../Configurations/GlobalSettingsTests.cs | 1 - .../Routing/UmbracoModuleTests.cs | 2 - src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 2 - .../scrollingmenu/javascript.js | 105 ------------ .../umbraco_client/scrollingmenu/style.css | 20 --- src/Umbraco.Web/Umbraco.Web.csproj | 1 - src/Umbraco.Web/_Legacy/Controls/Panel.cs | 6 - .../_Legacy/Controls/ScrollingMenu.cs | 154 ------------------ src/Umbraco.Web/_Legacy/Controls/TabPage.cs | 4 - 9 files changed, 295 deletions(-) delete mode 100644 src/Umbraco.Web.UI/umbraco_client/scrollingmenu/javascript.js delete mode 100644 src/Umbraco.Web.UI/umbraco_client/scrollingmenu/style.css delete mode 100644 src/Umbraco.Web/_Legacy/Controls/ScrollingMenu.cs diff --git a/src/Umbraco.Tests/Configurations/GlobalSettingsTests.cs b/src/Umbraco.Tests/Configurations/GlobalSettingsTests.cs index d50e940b1a..aea6632130 100644 --- a/src/Umbraco.Tests/Configurations/GlobalSettingsTests.cs +++ b/src/Umbraco.Tests/Configurations/GlobalSettingsTests.cs @@ -69,7 +69,6 @@ namespace Umbraco.Tests.Configurations [TestCase("/umbraco_client/Tree/treeIcons.css")] [TestCase("/umbraco_client/Tree/Themes/umbraco/style.css")] - [TestCase("/umbraco_client/scrollingmenu/style.css")] [TestCase("/base/somebasehandler")] [TestCase("/")] [TestCase("/home.aspx")] diff --git a/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs b/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs index 9fb908acf5..5f42c8d3ae 100644 --- a/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs +++ b/src/Umbraco.Tests/Routing/UmbracoModuleTests.cs @@ -63,7 +63,6 @@ namespace Umbraco.Tests.Routing // do not test for /base here as it's handled before EnsureUmbracoRoutablePage is called [TestCase("/umbraco_client/Tree/treeIcons.css", false)] [TestCase("/umbraco_client/Tree/Themes/umbraco/style.css?cdv=37", false)] - [TestCase("/umbraco_client/scrollingmenu/style.css?cdv=37", false)] [TestCase("/umbraco/umbraco.aspx", false)] [TestCase("/umbraco/editContent.aspx", false)] [TestCase("/install/default.aspx", false)] @@ -89,7 +88,6 @@ namespace Umbraco.Tests.Routing [TestCase("/favicon.ico", true)] [TestCase("/umbraco_client/Tree/treeIcons.css", true)] [TestCase("/umbraco_client/Tree/Themes/umbraco/style.css?cdv=37", true)] - [TestCase("/umbraco_client/scrollingmenu/style.css?cdv=37", true)] [TestCase("/base/somebasehandler", false)] [TestCase("/", false)] [TestCase("/home.aspx", false)] diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index a69784c066..916606aaed 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -517,8 +517,6 @@ - - diff --git a/src/Umbraco.Web.UI/umbraco_client/scrollingmenu/javascript.js b/src/Umbraco.Web.UI/umbraco_client/scrollingmenu/javascript.js deleted file mode 100644 index bc00f97ac2..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/scrollingmenu/javascript.js +++ /dev/null @@ -1,105 +0,0 @@ - var doScroll = false; - - var el = null; - var FromLeftMax = 0; - - // Added NH 2.1 - var scrollIcons = new Array(0); - - function RegisterScrollingMenuButtons(elId, Buttons) { - var icons = Buttons.split(","); - - scrollIcons.push(new scrollingContent(elId, icons)); - } - - function scrollingContent(Name, Buttons) { - this.name = Name; - this.buttons = new Array(Buttons.length); - for(var i=0;i FromLeftMax) && doScroll) { - el.style.left = slFromLeft +"px"; - window.setTimeout("scrollHorisontal(" + direction + ");", 4); - } - } \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco_client/scrollingmenu/style.css b/src/Umbraco.Web.UI/umbraco_client/scrollingmenu/style.css deleted file mode 100644 index f5ab5fd269..0000000000 --- a/src/Umbraco.Web.UI/umbraco_client/scrollingmenu/style.css +++ /dev/null @@ -1,20 +0,0 @@ -.slh { - position:relative; - z-index:105; - overflow:hidden; - } - -.sl { - position:absolute; - left:0px; top:0px; - z-index:1; - } - -.editorArrowOver { - cursor: pointer; - _cursor: hand; - background-color: #DEDFFD; -} - -.editorArrow { - } \ No newline at end of file diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 3591512ee7..4597651d2b 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -1094,7 +1094,6 @@ - diff --git a/src/Umbraco.Web/_Legacy/Controls/Panel.cs b/src/Umbraco.Web/_Legacy/Controls/Panel.cs index 00dc679b31..bb14d93482 100644 --- a/src/Umbraco.Web/_Legacy/Controls/Panel.cs +++ b/src/Umbraco.Web/_Legacy/Controls/Panel.cs @@ -6,7 +6,6 @@ namespace Umbraco.Web._Legacy.Controls { public class UmbracoPanel : Panel { - private ScrollingMenu _menu = new ScrollingMenu(); private bool _hasMenu = false; private string _StatusBarText = ""; @@ -43,10 +42,6 @@ namespace Umbraco.Web._Legacy.Controls set { _StatusBarText = value; } } - public ScrollingMenu Menu - { - get { return _menu; } - } protected override void OnInit(EventArgs e) { @@ -88,7 +83,6 @@ namespace Umbraco.Web._Legacy.Controls rightcol.TagName = "span"; rightcol.Attributes.Add("class", "span4"); - rightcol.Controls.Add(Menu); row.Controls.Add(rightcol); body.TagName = "div"; diff --git a/src/Umbraco.Web/_Legacy/Controls/ScrollingMenu.cs b/src/Umbraco.Web/_Legacy/Controls/ScrollingMenu.cs deleted file mode 100644 index 0db40c484f..0000000000 --- a/src/Umbraco.Web/_Legacy/Controls/ScrollingMenu.cs +++ /dev/null @@ -1,154 +0,0 @@ -using System; -using System.Collections; -using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.HtmlControls; - - -namespace Umbraco.Web._Legacy.Controls -{ - - [ToolboxData("<{0}:ScrollingMenu runat=server>")] - public class ScrollingMenu : System.Web.UI.WebControls.PlaceHolder - { - public ArrayList Icons = new ArrayList(); - private string iconIds; - private int extraMenuWidth = 0; - - public MenuIconI NewIcon(int Index) - { - MenuIcon Icon = new MenuIcon(); - Icons.Insert(Index, Icon); - return Icon; - } - - public MenuIconI NewIcon() - { - MenuIcon icon = new MenuIcon(); - Icons.Add(icon); - return icon; - } - - public MenuButton NewButton(int index = -1) - { - MenuButton btn = new MenuButton(); - - if (index > -1) - Icons.Insert(index, btn); - else - Icons.Add(btn); - - return btn; - } - - public MenuImageButton NewImageButton() - { - MenuImageButton icon = new MenuImageButton(); - Icons.Add(icon); - return icon; - } - - public MenuImageButton NewImageButton(int Index) - { - MenuImageButton icon = new MenuImageButton(); - Icons.Insert(Index, icon); - return icon; - } - - - public System.Web.UI.WebControls.DropDownList NewDropDownList() - { - DropDownList Icon = new DropDownList(); - Icons.Add(Icon); - return Icon; - } - - public void NewElement(string ElementName, string ElementId, string ElementClass, int ExtraWidth) - { - Icons.Add(new LiteralControl("<" + ElementName + " class=\"" + ElementClass + "\" id=\"" + ElementId + "\">")); - extraMenuWidth = extraMenuWidth + ExtraWidth; - } - - public void InsertSplitter() - { - Splitter icon = new Splitter(); - Icons.Add(icon); - } - public void InsertSplitter(int Index) - { - Splitter icon = new Splitter(); - Icons.Insert(Index, icon); - } - - /// - /// Inserts a new web control into the scrolling menu - /// - /// - /// The additional width to extend the scrolling menu by if the control being inserted is wider than the standard - public void InsertNewControl(Control control, int extraWidth = 0) - { - Icons.Add(control); - // _extraMenuWidth = _extraMenuWidth + extraWidth; - } - - - /// - /// Finds the index of the n-th Splitter in this Menu - /// - /// - /// The index of the n-th Splitter, or -1 if the number of Splitters is smaller than n - public int FindSplitter(int n) - { - var count = 0; - for (var i = 0; i < Icons.Count; i++) - { - if (Icons[i].GetType() == typeof(Splitter)) - { - count++; - - if (count == n) - return i; - } - } - - return -1; - } - - - private HtmlGenericControl toolbar; - private HtmlGenericControl wrap; - private HtmlGenericControl group; - - protected override void CreateChildControls() - { - toolbar = new HtmlGenericControl { TagName = "div" }; - toolbar.Attributes.Add("class", "btn-toolbar umb-btn-toolbar"); - this.Controls.Add(toolbar); - - group = new HtmlGenericControl { TagName = "div", ID = this.ClientID + "_group" }; - group.Attributes.Add("class", "btn-group"); - toolbar.Controls.Add(group); - } - - protected override void OnLoad(EventArgs e) - { - foreach (Control item in Icons) - { - group.Controls.Add(item); - if (item.ID != "") - iconIds = iconIds + item.ID + ","; - } - base.OnLoad(e); - } - - - - protected override void OnInit(EventArgs e) - { - - EnsureChildControls(); - base.OnInit(e); - } - - } -} diff --git a/src/Umbraco.Web/_Legacy/Controls/TabPage.cs b/src/Umbraco.Web/_Legacy/Controls/TabPage.cs index 282cec36e5..4a5be34d7c 100644 --- a/src/Umbraco.Web/_Legacy/Controls/TabPage.cs +++ b/src/Umbraco.Web/_Legacy/Controls/TabPage.cs @@ -67,10 +67,6 @@ namespace Umbraco.Web._Legacy.Controls this.Controls.Add(_tempErr); } - public ScrollingMenu Menu - { - get { return parent.Menu; } - } public bool HasMenu {