diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/DotNetNuke.Web.Deprecated.csproj b/DNN Platform/DotNetNuke.Web.Deprecated/DotNetNuke.Web.Deprecated.csproj index 4488395966b..d8b30196380 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/DotNetNuke.Web.Deprecated.csproj +++ b/DNN Platform/DotNetNuke.Web.Deprecated/DotNetNuke.Web.Deprecated.csproj @@ -166,7 +166,7 @@ - + @@ -308,6 +308,7 @@ + diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnAjaxLoadingPanel.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnAjaxLoadingPanel.cs index a9ecec869f4..7b0c14257c0 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnAjaxLoadingPanel.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnAjaxLoadingPanel.cs @@ -1,10 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ + +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnAjaxLoadingPanel : RadAjaxLoadingPanel - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnAjaxLoadingPanel : RadAjaxLoadingPanel + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnAjaxPanel.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnAjaxPanel.cs index 9d3a5ef6f82..ed6d5b389b9 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnAjaxPanel.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnAjaxPanel.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnAjaxPanel : RadAjaxPanel - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnAjaxPanel : RadAjaxPanel + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnAsyncUpload.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnAsyncUpload.cs index 7ed4beff03c..9bdf3a28f11 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnAsyncUpload.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnAsyncUpload.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnAsyncUpload : RadAsyncUpload - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnAsyncUpload : RadAsyncUpload + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnBinaryImage.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnBinaryImage.cs index bdf2c622e75..01181121ef1 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnBinaryImage.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnBinaryImage.cs @@ -2,9 +2,14 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information namespace DotNetNuke.Web.UI.WebControls -{ +{ + using System; + using Telerik.Web.UI; - public class DnnBinaryImage : RadBinaryImage - {} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnBinaryImage : RadBinaryImage + { + + } } diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnCalendar.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnCalendar.cs index 2c6076e270e..05849ebf270 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnCalendar.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnCalendar.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnCalendar : RadCalendar - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnCalendar : RadCalendar + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnCalendarDay.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnCalendarDay.cs index 55a1b6bd6c1..680d5e6c289 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnCalendarDay.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnCalendarDay.cs @@ -1,19 +1,22 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnCalendarDay : RadCalendarDay - { - public DnnCalendarDay() - { - } - - public DnnCalendarDay(RadCalendar calendar) - : base(calendar) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnCalendarDay : RadCalendarDay + { + public DnnCalendarDay() + { + } + + public DnnCalendarDay(RadCalendar calendar) + : base(calendar) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnCaptcha.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnCaptcha.cs index cb6dd8933b7..e7bbcdc079a 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnCaptcha.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnCaptcha.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnCaptcha : RadCaptcha - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnCaptcha : RadCaptcha + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnChart.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnChart.cs index 8fa7ee86331..9472b3fa877 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnChart.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnChart.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnChart : RadChart - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnChart : RadChart + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnChartAxisItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnChartAxisItem.cs index e8b4226a125..fd90c74ce3c 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnChartAxisItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnChartAxisItem.cs @@ -1,41 +1,44 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System.Drawing; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + + using System.Drawing; using Telerik.Charting; - public class DnnChartAxisItem : ChartAxisItem - { - public DnnChartAxisItem() - { - } - - public DnnChartAxisItem(string labelText) - : base(labelText) - { - } - - public DnnChartAxisItem(string labelText, Color color) - : base(labelText, color) - { - } - - public DnnChartAxisItem(string labelText, Color color, bool visible) - : base(labelText, color, visible) - { - } - - public DnnChartAxisItem(string labelText, Color color, bool visible, IContainer container) - : base(labelText, color, visible, container) - { - } - - public DnnChartAxisItem(IContainer container) - : base(container) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnChartAxisItem : ChartAxisItem + { + public DnnChartAxisItem() + { + } + + public DnnChartAxisItem(string labelText) + : base(labelText) + { + } + + public DnnChartAxisItem(string labelText, Color color) + : base(labelText, color) + { + } + + public DnnChartAxisItem(string labelText, Color color, bool visible) + : base(labelText, color, visible) + { + } + + public DnnChartAxisItem(string labelText, Color color, bool visible, IContainer container) + : base(labelText, color, visible, container) + { + } + + public DnnChartAxisItem(IContainer container) + : base(container) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnChartSeries.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnChartSeries.cs index d0b72d46755..b6e7df8ac92 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnChartSeries.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnChartSeries.cs @@ -1,46 +1,49 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using Telerik.Charting; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + + using Telerik.Charting; using Telerik.Charting.Styles; - public class DnnChartSeries : ChartSeries - { - public DnnChartSeries() - { - } - - public DnnChartSeries(string name) - : base(name) - { - } - - public DnnChartSeries(string name, ChartSeriesType type) - : base(name, type) - { - } - - public DnnChartSeries(string name, ChartSeriesType type, ChartSeriesCollection parent) - : base(name, type, parent) - { - } - - public DnnChartSeries(string seriesName, ChartSeriesType chartSeriesType, ChartSeriesCollection parent, ChartYAxisType yAxisType, StyleSeries style) - : base(seriesName, chartSeriesType, parent, yAxisType, style) - { - } - - public DnnChartSeries(string seriesName, ChartSeriesType chartSeriesType, ChartSeriesCollection parent, ChartYAxisType yAxisType, StyleSeries style, string dataYColumn, string dataXColumn, - string dataYColumn2, string dataXColumn2, string dataYColumn3, string dataYColumn4, string dataLabelsColumn) - : base(seriesName, chartSeriesType, parent, yAxisType, style, dataYColumn, dataXColumn, dataYColumn2, dataXColumn2, dataYColumn3, dataYColumn4, dataLabelsColumn) - { - } - - public DnnChartSeries(ChartSeriesCollection parent) - : base(parent) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnChartSeries : ChartSeries + { + public DnnChartSeries() + { + } + + public DnnChartSeries(string name) + : base(name) + { + } + + public DnnChartSeries(string name, ChartSeriesType type) + : base(name, type) + { + } + + public DnnChartSeries(string name, ChartSeriesType type, ChartSeriesCollection parent) + : base(name, type, parent) + { + } + + public DnnChartSeries(string seriesName, ChartSeriesType chartSeriesType, ChartSeriesCollection parent, ChartYAxisType yAxisType, StyleSeries style) + : base(seriesName, chartSeriesType, parent, yAxisType, style) + { + } + + public DnnChartSeries(string seriesName, ChartSeriesType chartSeriesType, ChartSeriesCollection parent, ChartYAxisType yAxisType, StyleSeries style, string dataYColumn, string dataXColumn, + string dataYColumn2, string dataXColumn2, string dataYColumn3, string dataYColumn4, string dataLabelsColumn) + : base(seriesName, chartSeriesType, parent, yAxisType, style, dataYColumn, dataXColumn, dataYColumn2, dataXColumn2, dataYColumn3, dataYColumn4, dataLabelsColumn) + { + } + + public DnnChartSeries(ChartSeriesCollection parent) + : base(parent) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnChartSeriesItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnChartSeriesItem.cs index e5e8d72337d..966f99c0960 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnChartSeriesItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnChartSeriesItem.cs @@ -1,67 +1,69 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System.Drawing; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Drawing; - using Telerik.Charting; + using Telerik.Charting; using Telerik.Charting.Styles; - public class DnnChartSeriesItem : ChartSeriesItem - { - public DnnChartSeriesItem() - { - } - - public DnnChartSeriesItem(bool isEmpty) - : base(isEmpty) - { - } - - public DnnChartSeriesItem(double value) - : base(value) - { - } - - public DnnChartSeriesItem(double x, double y) - : base(x, y) - { - } - - public DnnChartSeriesItem(double x, double y, double x2, double y2) - : base(x, y, x2, y2) - { - } - - public DnnChartSeriesItem(double x, double y, double x2, double y2, double y3, double y4) - : base(x, y, x2, y2, y3, y4) - { - } - - public DnnChartSeriesItem(double x, double y, StyleSeriesItem style) - : base(x, y, style) - { - } - - public DnnChartSeriesItem(double value, string labelText) - : base(value, labelText) - { - } - - public DnnChartSeriesItem(double value, string label, Color color) - : base(value, label, color) - { - } - - public DnnChartSeriesItem(double value, string label, Color color, bool exploded) - : base(value, label, color, exploded) - { - } - - public DnnChartSeriesItem(ChartSeries parent) - : base(parent) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnChartSeriesItem : ChartSeriesItem + { + public DnnChartSeriesItem() + { + } + + public DnnChartSeriesItem(bool isEmpty) + : base(isEmpty) + { + } + + public DnnChartSeriesItem(double value) + : base(value) + { + } + + public DnnChartSeriesItem(double x, double y) + : base(x, y) + { + } + + public DnnChartSeriesItem(double x, double y, double x2, double y2) + : base(x, y, x2, y2) + { + } + + public DnnChartSeriesItem(double x, double y, double x2, double y2, double y3, double y4) + : base(x, y, x2, y2, y3, y4) + { + } + + public DnnChartSeriesItem(double x, double y, StyleSeriesItem style) + : base(x, y, style) + { + } + + public DnnChartSeriesItem(double value, string labelText) + : base(value, labelText) + { + } + + public DnnChartSeriesItem(double value, string label, Color color) + : base(value, label, color) + { + } + + public DnnChartSeriesItem(double value, string label, Color color, bool exploded) + : base(value, label, color, exploded) + { + } + + public DnnChartSeriesItem(ChartSeries parent) + : base(parent) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnCodeBlock.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnCodeBlock.cs index 55bb483c474..ec38e82daf5 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnCodeBlock.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnCodeBlock.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnCodeBlock : RadCodeBlock - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnCodeBlock : RadCodeBlock + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnColorPicker.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnColorPicker.cs index 83907c22ca1..3fb22d6ad1c 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnColorPicker.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnColorPicker.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnColorPicker : RadColorPicker - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnColorPicker : RadColorPicker + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnColorPickerItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnColorPickerItem.cs index f0430b1d841..3d1e8c81c65 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnColorPickerItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnColorPickerItem.cs @@ -1,26 +1,28 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System.Drawing; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Drawing; using Telerik.Web.UI; - public class DnnColorPickerItem : ColorPickerItem - { - public DnnColorPickerItem() - { - } - - public DnnColorPickerItem(Color value) - : base(value) - { - } - - public DnnColorPickerItem(Color value, string title) - : base(value, title) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnColorPickerItem : ColorPickerItem + { + public DnnColorPickerItem() + { + } + + public DnnColorPickerItem(Color value) + : base(value) + { + } + + public DnnColorPickerItem(Color value, string title) + : base(value, title) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnComboBox.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnComboBox.cs index e2870375b53..3f1e64092c4 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnComboBox.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnComboBox.cs @@ -1,78 +1,79 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; - using DotNetNuke.Framework; - using DotNetNuke.Framework.JavaScriptLibraries; + using DotNetNuke.Framework; + using DotNetNuke.Framework.JavaScriptLibraries; using Telerik.Web.UI; - public class DnnComboBox : RadComboBox - { - public void AddItem(string text, string value) - { - this.Items.Add(new DnnComboBoxItem(text, value)); - } - - public void InsertItem(int index, string text, string value) - { - this.Items.Insert(index, new DnnComboBoxItem(text, value)); - } - - public void DataBind(string initialValue) - { - this.DataBind(initialValue, false); - } - - public void DataBind(string initial, bool findByText) - { - this.DataBind(); - - this.Select(initial, findByText); - } - - public void Select(string initial, bool findByText) - { - if (findByText) - { - if (this.FindItemByText(initial, true) != null) - { - this.FindItemByText(initial, true).Selected = true; - } - } - else - { - if (this.FindItemByValue(initial, true) != null) - { - this.FindItemByValue(initial, true).Selected = true; - } - } - } - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - this.EnableEmbeddedBaseStylesheet = false; - this.OnClientLoad = "$.dnnComboBoxLoaded"; - this.OnClientFocus = "$.dnnComboBoxHack"; - this.OnClientDropDownOpened = "$.dnnComboBoxScroll"; - this.OnClientItemsRequested = "$.dnnComboBoxItemRequested"; - this.MaxHeight = 240; - this.ZIndex = 100010; - this.Localization.ItemsCheckedString = Utilities.GetLocalizedString("ItemsCheckedString"); - this.Localization.CheckAllString = Utilities.GetLocalizedString("CheckAllString"); - this.Localization.AllItemsCheckedString = Utilities.GetLocalizedString("AllItemsCheckedString"); - this.Localization.NoMatches = Utilities.GetLocalizedString("NoMatches"); - this.Localization.ShowMoreFormatString = Utilities.GetLocalizedString("ShowMoreFormatString"); - } - - protected override void OnPreRender(EventArgs e) - { - Utilities.ApplySkin(this); - JavaScript.RequestRegistration(CommonJs.DnnPlugins); - base.OnPreRender(e); - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnComboBox : RadComboBox + { + public void AddItem(string text, string value) + { + this.Items.Add(new DnnComboBoxItem(text, value)); + } + + public void InsertItem(int index, string text, string value) + { + this.Items.Insert(index, new DnnComboBoxItem(text, value)); + } + + public void DataBind(string initialValue) + { + this.DataBind(initialValue, false); + } + + public void DataBind(string initial, bool findByText) + { + this.DataBind(); + + this.Select(initial, findByText); + } + + public void Select(string initial, bool findByText) + { + if (findByText) + { + if (this.FindItemByText(initial, true) != null) + { + this.FindItemByText(initial, true).Selected = true; + } + } + else + { + if (this.FindItemByValue(initial, true) != null) + { + this.FindItemByValue(initial, true).Selected = true; + } + } + } + + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + this.EnableEmbeddedBaseStylesheet = false; + this.OnClientLoad = "$.dnnComboBoxLoaded"; + this.OnClientFocus = "$.dnnComboBoxHack"; + this.OnClientDropDownOpened = "$.dnnComboBoxScroll"; + this.OnClientItemsRequested = "$.dnnComboBoxItemRequested"; + this.MaxHeight = 240; + this.ZIndex = 100010; + this.Localization.ItemsCheckedString = Utilities.GetLocalizedString("ItemsCheckedString"); + this.Localization.CheckAllString = Utilities.GetLocalizedString("CheckAllString"); + this.Localization.AllItemsCheckedString = Utilities.GetLocalizedString("AllItemsCheckedString"); + this.Localization.NoMatches = Utilities.GetLocalizedString("NoMatches"); + this.Localization.ShowMoreFormatString = Utilities.GetLocalizedString("ShowMoreFormatString"); + } + + protected override void OnPreRender(EventArgs e) + { + Utilities.ApplySkin(this); + JavaScript.RequestRegistration(CommonJs.DnnPlugins); + base.OnPreRender(e); + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnComboBoxItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnComboBoxItem.cs index 9f8eae0309f..2871e5a9012 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnComboBoxItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnComboBoxItem.cs @@ -1,57 +1,60 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using DotNetNuke.Services.Localization; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnComboBoxItem : RadComboBoxItem - { - public DnnComboBoxItem() - { - } - - public DnnComboBoxItem(string text) - : base(text) - { - } - - public DnnComboBoxItem(string text, string value) - : base(text, value) - { - } - - public string ResourceKey - { - get - { - if (this.ViewState["ResourceKey"] != null) - { - return this.ViewState["ResourceKey"].ToString(); - } - - return string.Empty; - } - - set - { - this.ViewState["ResourceKey"] = value; - } - } - - protected override void OnLoad(System.EventArgs e) - { - base.OnLoad(e); - - if (!string.IsNullOrEmpty(this.ResourceKey)) - { - string resourceFile = Utilities.GetLocalResourceFile(this); - if (!string.IsNullOrEmpty(resourceFile)) - { - this.Text = Localization.GetString(this.ResourceKey, resourceFile); - } - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnComboBoxItem : RadComboBoxItem + { + public DnnComboBoxItem() + { + } + + public DnnComboBoxItem(string text) + : base(text) + { + } + + public DnnComboBoxItem(string text, string value) + : base(text, value) + { + } + + public string ResourceKey + { + get + { + if (this.ViewState["ResourceKey"] != null) + { + return this.ViewState["ResourceKey"].ToString(); + } + + return string.Empty; + } + + set + { + this.ViewState["ResourceKey"] = value; + } + } + + protected override void OnLoad(System.EventArgs e) + { + base.OnLoad(e); + + if (!string.IsNullOrEmpty(this.ResourceKey)) + { + string resourceFile = Utilities.GetLocalResourceFile(this); + if (!string.IsNullOrEmpty(resourceFile)) + { + this.Text = Localization.GetString(this.ResourceKey, resourceFile); + } + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnContextMenu.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnContextMenu.cs index cef8af574f6..a9180a4af81 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnContextMenu.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnContextMenu.cs @@ -1,10 +1,14 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; using Telerik.Web.UI; - public class DnnContextMenu : RadContextMenu - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnContextMenu : RadContextMenu + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnContextMenuElementTarget.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnContextMenuElementTarget.cs index b9290052686..85b7f6a51eb 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnContextMenuElementTarget.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnContextMenuElementTarget.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnContextMenuElementTarget : ContextMenuElementTarget - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnContextMenuElementTarget : ContextMenuElementTarget + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnContextMenuTagNameTarget.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnContextMenuTagNameTarget.cs index ae14ec87da3..3e0b600e47a 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnContextMenuTagNameTarget.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnContextMenuTagNameTarget.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnContextMenuTagNameTarget : ContextMenuTagNameTarget - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnContextMenuTagNameTarget : ContextMenuTagNameTarget + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDataPager.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDataPager.cs index 1a55078d72f..9dabf420fc0 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDataPager.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDataPager.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnDataPager : RadDataPager - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnDataPager : RadDataPager + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDataPagerButtonField.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDataPagerButtonField.cs index 70e457e2926..922d7f9dd17 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDataPagerButtonField.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDataPagerButtonField.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnDataPagerButtonField : RadDataPagerButtonField - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnDataPagerButtonField : RadDataPagerButtonField + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDataPagerGoToPageField.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDataPagerGoToPageField.cs index 001d9908c24..d43781aedca 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDataPagerGoToPageField.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDataPagerGoToPageField.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnDataPagerGoToPageField : RadDataPagerGoToPageField - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnDataPagerGoToPageField : RadDataPagerGoToPageField + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDataPagerPageSizeField.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDataPagerPageSizeField.cs index 0c4beaba500..7daa464adb7 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDataPagerPageSizeField.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDataPagerPageSizeField.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnDataPagerPageSizeField : RadDataPagerPageSizeField - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnDataPagerPageSizeField : RadDataPagerPageSizeField + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDataPagerSliderField.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDataPagerSliderField.cs index a6826412733..bd2208a85a4 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDataPagerSliderField.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDataPagerSliderField.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnDataPagerSliderField : RadDataPagerSliderField - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnDataPagerSliderField : RadDataPagerSliderField + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDataPagerTemplatePageField.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDataPagerTemplatePageField.cs index d6c03348693..891c74c64d0 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDataPagerTemplatePageField.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDataPagerTemplatePageField.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnDataPagerTemplatePageField : RadDataPagerTemplatePageField - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnDataPagerTemplatePageField : RadDataPagerTemplatePageField + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDateInput.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDateInput.cs index 89e61df6fa0..2482bf843c7 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDateInput.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDateInput.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnDateInput : RadDateInput - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnDateInput : RadDateInput + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDatePicker.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDatePicker.cs index 02b0aeb266d..96ff3423bca 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDatePicker.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDatePicker.cs @@ -6,9 +6,10 @@ namespace DotNetNuke.Web.UI.WebControls using System; using System.Data.SqlTypes; using System.Globalization; - - using Telerik.Web.UI; - + + using Telerik.Web.UI; + + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] public class DnnDatePicker : RadDatePicker { protected override void OnInit(EventArgs e) diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDateTimePicker.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDateTimePicker.cs index 29c0e25685c..4aa54723bf7 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDateTimePicker.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDateTimePicker.cs @@ -1,29 +1,30 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Data.SqlTypes; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Data.SqlTypes; using Telerik.Web.UI; - public class DnnDateTimePicker : RadDateTimePicker - { - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - this.EnableEmbeddedBaseStylesheet = true; - Utilities.ApplySkin(this, string.Empty, "DatePicker"); - this.Calendar.ClientEvents.OnLoad = "$.dnnRadPickerHack"; - var specialDay = new RadCalendarDay(); - specialDay.Repeatable = Telerik.Web.UI.Calendar.RecurringEvents.Today; - specialDay.ItemStyle.CssClass = "dnnCalendarToday"; - this.Calendar.SpecialDays.Add(specialDay); - this.Calendar.RangeMinDate = (DateTime)SqlDateTime.MinValue; - this.Calendar.RangeMaxDate = (DateTime)SqlDateTime.MaxValue; - this.MinDate = (DateTime)SqlDateTime.MinValue; - this.MaxDate = (DateTime)SqlDateTime.MaxValue; - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnDateTimePicker : RadDateTimePicker + { + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + this.EnableEmbeddedBaseStylesheet = true; + Utilities.ApplySkin(this, string.Empty, "DatePicker"); + this.Calendar.ClientEvents.OnLoad = "$.dnnRadPickerHack"; + var specialDay = new RadCalendarDay(); + specialDay.Repeatable = Telerik.Web.UI.Calendar.RecurringEvents.Today; + specialDay.ItemStyle.CssClass = "dnnCalendarToday"; + this.Calendar.SpecialDays.Add(specialDay); + this.Calendar.RangeMinDate = (DateTime)SqlDateTime.MinValue; + this.Calendar.RangeMaxDate = (DateTime)SqlDateTime.MaxValue; + this.MinDate = (DateTime)SqlDateTime.MinValue; + this.MaxDate = (DateTime)SqlDateTime.MaxValue; + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDock.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDock.cs index 445e26fd501..748ff76e2b7 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDock.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDock.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnDock : RadDock - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnDock : RadDock + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDockCloseCommand.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDockCloseCommand.cs index ec5d21acda3..8d498a1a0d4 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDockCloseCommand.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDockCloseCommand.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnDockCloseCommand : DockCloseCommand - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnDockCloseCommand : DockCloseCommand + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDockCommand.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDockCommand.cs index 84b6afbc5ca..67f610df00d 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDockCommand.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDockCommand.cs @@ -1,19 +1,22 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnDockCommand : DockCommand - { - public DnnDockCommand() - { - } - - public DnnDockCommand(string clientTypeName, string cssClass, string name, string text, bool autoPostBack) - : base(clientTypeName, cssClass, name, text, autoPostBack) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnDockCommand : DockCommand + { + public DnnDockCommand() + { + } + + public DnnDockCommand(string clientTypeName, string cssClass, string name, string text, bool autoPostBack) + : base(clientTypeName, cssClass, name, text, autoPostBack) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDockLayout.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDockLayout.cs index 7c545a291b1..e19df0657f4 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDockLayout.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDockLayout.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnDockLayout : RadDockLayout - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnDockLayout : RadDockLayout + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDockZone.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDockZone.cs index a2449f8165d..5da73c924cc 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDockZone.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnDockZone.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnDockZone : RadDockZone - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnDockZone : RadDockZone + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnEditor.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnEditor.cs index b81ef1cf5ba..00d3195d56f 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnEditor.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnEditor.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnEditor : RadEditor - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnEditor : RadEditor + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFileExplorer.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFileExplorer.cs index 6d74f5e000f..2a68f756c0b 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFileExplorer.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFileExplorer.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnFileExplorer : RadFileExplorer - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnFileExplorer : RadFileExplorer + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFilter.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFilter.cs index 2be9c7400ba..9f10bc85d5b 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFilter.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFilter.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnFilter : RadFilter - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnFilter : RadFilter + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormComboBoxItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormComboBoxItem.cs index d5ed1502122..7c9ee64ec7c 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormComboBoxItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormComboBoxItem.cs @@ -1,80 +1,78 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Collections; - using System.Collections.Generic; - using System.Web.UI; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Web.UI; + using System.Web.UI.WebControls; - using DotNetNuke.Web.UI.WebControls.Extensions; - using Telerik.Web.UI; + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnFormComboBoxItem : DnnFormListItemBase + { + // public DropDownList ComboBox { get; set; } + public DnnComboBox ComboBox { get; set; } - public class DnnFormComboBoxItem : DnnFormListItemBase - { - // public DropDownList ComboBox { get; set; } - public DnnComboBox ComboBox { get; set; } - - // internal static void BindListInternal(DropDownList comboBox, object value, IEnumerable listSource, string textField, string valueField) - internal static void BindListInternal(DnnComboBox comboBox, object value, IEnumerable listSource, string textField, string valueField) - { - if (comboBox != null) - { - string selectedValue = !comboBox.Page.IsPostBack ? Convert.ToString(value) : comboBox.SelectedValue; - - if (listSource is Dictionary) - { - var items = listSource as Dictionary; - foreach (var item in items) - { - // comboBox.Items.Add(new ListItem(item.Key, item.Value)); - comboBox.AddItem(item.Key, item.Value); - } - } - else - { - comboBox.DataTextField = textField; - comboBox.DataValueField = valueField; - comboBox.DataSource = listSource; - - comboBox.DataBind(); - } - - // Reset SelectedValue - // comboBox.Select(selectedValue); - var selectedItem = comboBox.FindItemByValue(selectedValue); - if (selectedItem != null) - { - selectedItem.Selected = true; - } - } - } - - protected override void BindList() - { - BindListInternal(this.ComboBox, this.Value, this.ListSource, this.ListTextField, this.ListValueField); - } - - protected override WebControl CreateControlInternal(Control container) - { - // ComboBox = new DropDownList { ID = ID + "_ComboBox" }; - this.ComboBox = new DnnComboBox { ID = this.ID + "_ComboBox" }; - this.ComboBox.SelectedIndexChanged += this.IndexChanged; - container.Controls.Add(this.ComboBox); - - if (this.ListSource != null) - { - this.BindList(); - } - - return this.ComboBox; - } - - private void IndexChanged(object sender, EventArgs e) - { - this.UpdateDataSource(this.Value, this.ComboBox.SelectedValue, this.DataField); - } - } -} + // internal static void BindListInternal(DropDownList comboBox, object value, IEnumerable listSource, string textField, string valueField) + internal static void BindListInternal(DnnComboBox comboBox, object value, IEnumerable listSource, string textField, string valueField) + { + if (comboBox != null) + { + string selectedValue = !comboBox.Page.IsPostBack ? Convert.ToString(value) : comboBox.SelectedValue; + + if (listSource is Dictionary) + { + var items = listSource as Dictionary; + foreach (var item in items) + { + // comboBox.Items.Add(new ListItem(item.Key, item.Value)); + comboBox.AddItem(item.Key, item.Value); + } + } + else + { + comboBox.DataTextField = textField; + comboBox.DataValueField = valueField; + comboBox.DataSource = listSource; + + comboBox.DataBind(); + } + + // Reset SelectedValue + // comboBox.Select(selectedValue); + var selectedItem = comboBox.FindItemByValue(selectedValue); + if (selectedItem != null) + { + selectedItem.Selected = true; + } + } + } + + protected override void BindList() + { + BindListInternal(this.ComboBox, this.Value, this.ListSource, this.ListTextField, this.ListValueField); + } + + protected override WebControl CreateControlInternal(Control container) + { + // ComboBox = new DropDownList { ID = ID + "_ComboBox" }; + this.ComboBox = new DnnComboBox { ID = this.ID + "_ComboBox" }; + this.ComboBox.SelectedIndexChanged += this.IndexChanged; + container.Controls.Add(this.ComboBox); + + if (this.ListSource != null) + { + this.BindList(); + } + + return this.ComboBox; + } + + private void IndexChanged(object sender, EventArgs e) + { + this.UpdateDataSource(this.Value, this.ComboBox.SelectedValue, this.DataField); + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormDecorator.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormDecorator.cs index ef30260742c..7082079ecc8 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormDecorator.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormDecorator.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnFormDecorator : RadFormDecorator - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnFormDecorator : RadFormDecorator + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormEnumItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormEnumItem.cs index bbb14b8ac50..458dd12daf7 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormEnumItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormEnumItem.cs @@ -2,43 +2,44 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Linq; - - using DotNetNuke.Services.Localization; - - public class DnnFormEnumItem : DnnFormComboBoxItem - { - private string _enumType; - - public string EnumType - { - get - { - return this._enumType; - } - - set - { - this._enumType = value; - - // ReSharper disable AssignNullToNotNullAttribute - this.ListSource = (from object enumValue in Enum.GetValues(Type.GetType(this._enumType)) - select new { Name = Localization.GetString(Enum.GetName(Type.GetType(this._enumType), enumValue)) ?? Enum.GetName(Type.GetType(this._enumType), enumValue), Value = (int)enumValue }) - .ToList(); - - // ReSharper restore AssignNullToNotNullAttribute - } - } - - protected override void BindList() - { - this.ListTextField = "Name"; - this.ListValueField = "Value"; - - BindListInternal(this.ComboBox, Convert.ToInt32(this.Value), this.ListSource, this.ListTextField, this.ListValueField); - } - } -} +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Linq; + + using DotNetNuke.Services.Localization; + + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnFormEnumItem : DnnFormComboBoxItem + { + private string _enumType; + + public string EnumType + { + get + { + return this._enumType; + } + + set + { + this._enumType = value; + + // ReSharper disable AssignNullToNotNullAttribute + this.ListSource = (from object enumValue in Enum.GetValues(Type.GetType(this._enumType)) + select new { Name = Localization.GetString(Enum.GetName(Type.GetType(this._enumType), enumValue)) ?? Enum.GetName(Type.GetType(this._enumType), enumValue), Value = (int)enumValue }) + .ToList(); + + // ReSharper restore AssignNullToNotNullAttribute + } + } + + protected override void BindList() + { + this.ListTextField = "Name"; + this.ListValueField = "Value"; + + BindListInternal(this.ComboBox, Convert.ToInt32(this.Value), this.ListSource, this.ListTextField, this.ListValueField); + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormNumericTextBoxItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormNumericTextBoxItem.cs index abe1e465968..4aa3d5a7b57 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormNumericTextBoxItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormNumericTextBoxItem.cs @@ -1,72 +1,73 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI; - using System.Web.UI.WebControls; - - using DotNetNuke.Framework; - using DotNetNuke.Framework.JavaScriptLibraries; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI; + using System.Web.UI.WebControls; + + using DotNetNuke.Framework; + using DotNetNuke.Framework.JavaScriptLibraries; using Telerik.Web.UI; - public class DnnFormNumericTextBoxItem : DnnFormItemBase - { - // private DnnNumericTextBox _textBox; - private TextBox _textBox; - - public DnnFormNumericTextBoxItem() - { - this.TextBoxWidth = new Unit(100); - this.ShowSpinButtons = true; - this.Type = NumericType.Number; - this.DecimalDigits = 0; - } - - public int DecimalDigits { get; set; } - - public bool ShowSpinButtons { get; set; } - - public Unit TextBoxWidth { get; set; } - - public NumericType Type { get; set; } - - protected override WebControl CreateControlInternal(Control container) - { - // _textBox = new DnnNumericTextBox {EmptyMessage = LocalizeString(ResourceKey + ".Hint"), ID = ID + "_TextBox", Width = TextBoxWidth }; - this._textBox = new TextBox(); - this._textBox.CssClass = "DnnNumericTextBox"; - - // _textBox.Style.Add("float", "none"); - // _textBox.EmptyMessageStyle.CssClass += "dnnformHint"; - // _textBox.Type = Type; - // _textBox.NumberFormat.DecimalDigits = DecimalDigits; - // _textBox.ShowSpinButtons = ShowSpinButtons; - this._textBox.TextChanged += this.TextChanged; - - // Load from ControlState - this._textBox.Text = Convert.ToString(this.Value); - - container.Controls.Add(this._textBox); - JavaScript.RequestRegistration(CommonJs.DnnPlugins); - - var initalizeScript = ""; - this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "DnnFormNumericTextBoxItem", initalizeScript); - - return this._textBox; - } - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - - this.FormMode = DnnFormMode.Short; - } - - private void TextChanged(object sender, EventArgs e) - { - this.UpdateDataSource(this.Value, this._textBox.Text, this.DataField); - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnFormNumericTextBoxItem : DnnFormItemBase + { + // private DnnNumericTextBox _textBox; + private TextBox _textBox; + + public DnnFormNumericTextBoxItem() + { + this.TextBoxWidth = new Unit(100); + this.ShowSpinButtons = true; + this.Type = NumericType.Number; + this.DecimalDigits = 0; + } + + public int DecimalDigits { get; set; } + + public bool ShowSpinButtons { get; set; } + + public Unit TextBoxWidth { get; set; } + + public NumericType Type { get; set; } + + protected override WebControl CreateControlInternal(Control container) + { + // _textBox = new DnnNumericTextBox {EmptyMessage = LocalizeString(ResourceKey + ".Hint"), ID = ID + "_TextBox", Width = TextBoxWidth }; + this._textBox = new TextBox(); + this._textBox.CssClass = "DnnNumericTextBox"; + + // _textBox.Style.Add("float", "none"); + // _textBox.EmptyMessageStyle.CssClass += "dnnformHint"; + // _textBox.Type = Type; + // _textBox.NumberFormat.DecimalDigits = DecimalDigits; + // _textBox.ShowSpinButtons = ShowSpinButtons; + this._textBox.TextChanged += this.TextChanged; + + // Load from ControlState + this._textBox.Text = Convert.ToString(this.Value); + + container.Controls.Add(this._textBox); + JavaScript.RequestRegistration(CommonJs.DnnPlugins); + + var initalizeScript = ""; + this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "DnnFormNumericTextBoxItem", initalizeScript); + + return this._textBox; + } + + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + + this.FormMode = DnnFormMode.Short; + } + + private void TextChanged(object sender, EventArgs e) + { + this.UpdateDataSource(this.Value, this._textBox.Text, this.DataField); + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormPagesItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormPagesItem.cs index 7f48243edff..a6e49ca7a35 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormPagesItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormPagesItem.cs @@ -2,19 +2,22 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using DotNetNuke.Common.Utilities; - using DotNetNuke.Entities.Tabs; - using DotNetNuke.Services.Localization; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; - public class DnnFormPagesItem : DnnFormComboBoxItem - { - public DnnFormPagesItem() - { - this.ListSource = TabController.GetPortalTabs(this.PortalSettings.PortalId, Null.NullInteger, true, "<" + Localization.GetString("None_Specified") + ">", true, false, true, true, false); - this.ListTextField = "TabName"; - this.ListValueField = "TabID"; - } - } -} + using DotNetNuke.Common.Utilities; + using DotNetNuke.Entities.Tabs; + using DotNetNuke.Services.Localization; + + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnFormPagesItem : DnnFormComboBoxItem + { + public DnnFormPagesItem() + { + this.ListSource = TabController.GetPortalTabs(this.PortalSettings.PortalId, Null.NullInteger, true, "<" + Localization.GetString("None_Specified") + ">", true, false, true, true, false); + this.ListTextField = "TabName"; + this.ListValueField = "TabID"; + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormSkinsItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormSkinsItem.cs index 2e9c5582bda..5493942ad0e 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormSkinsItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormSkinsItem.cs @@ -1,115 +1,116 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Web.UI; - using System.Web.UI.WebControls; - - using DotNetNuke.Entities.Portals; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Collections.Generic; + using System.Linq; + using System.Web.UI; + using System.Web.UI.WebControls; + + using DotNetNuke.Entities.Portals; using DotNetNuke.UI.Skins; - public class DnnFormSkinsItem : DnnFormItemBase - { - // private DropDownList _containerCombo; - private DnnComboBox _containerCombo; - private object _containerValue; - - // private DropDownList _skinCombo; - private DnnComboBox _skinCombo; - private object _skinValue; - - public string ContainerDataField { get; set; } - - public bool IncludePortalSkins { get; set; } - - public int PortalId { get; set; } - - public string SkinDataField { get; set; } - - protected override WebControl CreateControlInternal(Control container) - { - var panel = new Panel(); - - container.Controls.Add(panel); - - var skinLabel = new Label { Text = this.LocalizeString("Skin") }; - skinLabel.CssClass += "dnnFormSkinLabel"; - panel.Controls.Add(skinLabel); - - // _skinCombo = new DropDownList { ID = ID + "_SkinComboBox" }; - this._skinCombo = new DnnComboBox { ID = this.ID + "_SkinComboBox" }; - this._skinCombo.CssClass += "dnnFormSkinInput"; - this._skinCombo.SelectedIndexChanged += this.SkinIndexChanged; - panel.Controls.Add(this._skinCombo); - - DnnFormComboBoxItem.BindListInternal(this._skinCombo, this._skinValue, this.GetSkins(SkinController.RootSkin), "Key", "Value"); - - var containerLabel = new Label { Text = this.LocalizeString("Container") }; - containerLabel.CssClass += "dnnFormSkinLabel"; - panel.Controls.Add(containerLabel); - - // _containerCombo = new DropDownList { ID = ID + "_ContainerComboBox" }; - this._containerCombo = new DnnComboBox { ID = this.ID + "_ContainerComboBox" }; - this._containerCombo.CssClass += "dnnFormSkinInput"; - this._containerCombo.SelectedIndexChanged += this.ContainerIndexChanged; - panel.Controls.Add(this._containerCombo); - - DnnFormComboBoxItem.BindListInternal(this._containerCombo, this._containerValue, this.GetSkins(SkinController.RootContainer), "Key", "Value"); - - return panel; - } - - protected override void DataBindInternal() - { - this.DataBindInternal(this.SkinDataField, ref this._skinValue); - - this.DataBindInternal(this.ContainerDataField, ref this._containerValue); - - this.Value = new Pair { First = this._skinValue, Second = this._containerValue }; - } - - protected override void LoadControlState(object state) - { - base.LoadControlState(state); - var pair = this.Value as Pair; - if (pair != null) - { - this._skinValue = pair.First; - this._containerValue = pair.Second; - } - } - - private void ContainerIndexChanged(object sender, EventArgs e) - { - this.UpdateDataSource(this._containerValue, this._containerCombo.SelectedValue, this.ContainerDataField); - } - - private void SkinIndexChanged(object sender, EventArgs e) - { - this.UpdateDataSource(this._skinValue, this._skinCombo.SelectedValue, this.SkinDataField); - } - - private Dictionary GetSkins(string skinRoot) - { - // load host skins - var skins = SkinController.GetSkins(null, skinRoot, SkinScope.Host).ToDictionary(skin => skin.Key, skin => skin.Value); - - if (this.IncludePortalSkins) - { - // load portal skins - var portal = PortalController.Instance.GetPortal(this.PortalId); - - foreach (var skin in SkinController.GetSkins(portal, skinRoot, SkinScope.Site)) - { - skins.Add(skin.Key, skin.Value); - } - } - - return skins; - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnFormSkinsItem : DnnFormItemBase + { + // private DropDownList _containerCombo; + private DnnComboBox _containerCombo; + private object _containerValue; + + // private DropDownList _skinCombo; + private DnnComboBox _skinCombo; + private object _skinValue; + + public string ContainerDataField { get; set; } + + public bool IncludePortalSkins { get; set; } + + public int PortalId { get; set; } + + public string SkinDataField { get; set; } + + protected override WebControl CreateControlInternal(Control container) + { + var panel = new Panel(); + + container.Controls.Add(panel); + + var skinLabel = new Label { Text = this.LocalizeString("Skin") }; + skinLabel.CssClass += "dnnFormSkinLabel"; + panel.Controls.Add(skinLabel); + + // _skinCombo = new DropDownList { ID = ID + "_SkinComboBox" }; + this._skinCombo = new DnnComboBox { ID = this.ID + "_SkinComboBox" }; + this._skinCombo.CssClass += "dnnFormSkinInput"; + this._skinCombo.SelectedIndexChanged += this.SkinIndexChanged; + panel.Controls.Add(this._skinCombo); + + DnnFormComboBoxItem.BindListInternal(this._skinCombo, this._skinValue, this.GetSkins(SkinController.RootSkin), "Key", "Value"); + + var containerLabel = new Label { Text = this.LocalizeString("Container") }; + containerLabel.CssClass += "dnnFormSkinLabel"; + panel.Controls.Add(containerLabel); + + // _containerCombo = new DropDownList { ID = ID + "_ContainerComboBox" }; + this._containerCombo = new DnnComboBox { ID = this.ID + "_ContainerComboBox" }; + this._containerCombo.CssClass += "dnnFormSkinInput"; + this._containerCombo.SelectedIndexChanged += this.ContainerIndexChanged; + panel.Controls.Add(this._containerCombo); + + DnnFormComboBoxItem.BindListInternal(this._containerCombo, this._containerValue, this.GetSkins(SkinController.RootContainer), "Key", "Value"); + + return panel; + } + + protected override void DataBindInternal() + { + this.DataBindInternal(this.SkinDataField, ref this._skinValue); + + this.DataBindInternal(this.ContainerDataField, ref this._containerValue); + + this.Value = new Pair { First = this._skinValue, Second = this._containerValue }; + } + + protected override void LoadControlState(object state) + { + base.LoadControlState(state); + var pair = this.Value as Pair; + if (pair != null) + { + this._skinValue = pair.First; + this._containerValue = pair.Second; + } + } + + private void ContainerIndexChanged(object sender, EventArgs e) + { + this.UpdateDataSource(this._containerValue, this._containerCombo.SelectedValue, this.ContainerDataField); + } + + private void SkinIndexChanged(object sender, EventArgs e) + { + this.UpdateDataSource(this._skinValue, this._skinCombo.SelectedValue, this.SkinDataField); + } + + private Dictionary GetSkins(string skinRoot) + { + // load host skins + var skins = SkinController.GetSkins(null, skinRoot, SkinScope.Host).ToDictionary(skin => skin.Key, skin => skin.Value); + + if (this.IncludePortalSkins) + { + // load portal skins + var portal = PortalController.Instance.GetPortal(this.PortalId); + + foreach (var skin in SkinController.GetSkins(portal, skinRoot, SkinScope.Site)) + { + skins.Add(skin.Key, skin.Value); + } + } + + return skins; + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormToggleButtonItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormToggleButtonItem.cs index a656e1f869b..290c57b7cd6 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormToggleButtonItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnFormToggleButtonItem.cs @@ -1,89 +1,88 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI; + using System.Web.UI.WebControls; - using Telerik.Web.UI; + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnFormToggleButtonItem : DnnFormItemBase + { + // private DnnRadButton _checkBox; + private CheckBox _checkBox; - public class DnnFormToggleButtonItem : DnnFormItemBase - { - // private DnnRadButton _checkBox; - private CheckBox _checkBox; - - public DnnFormToggleButtonItem() - { - this.Mode = CheckBoxMode.TrueFalse; - } - - public enum CheckBoxMode - { - TrueFalse = 0, - YN = 1, - YesNo = 2, - } - - public CheckBoxMode Mode { get; set; } - - protected override WebControl CreateControlInternal(Control container) - { - // _checkBox = new DnnRadButton {ID = ID + "_CheckBox", ButtonType = RadButtonType.ToggleButton, ToggleType = ButtonToggleType.CheckBox, AutoPostBack = false}; - this._checkBox = new CheckBox { ID = this.ID + "_CheckBox", AutoPostBack = false }; - - this._checkBox.CheckedChanged += this.CheckedChanged; - container.Controls.Add(this._checkBox); - - // Load from ControlState - if (!this._checkBox.Page.IsPostBack) - { - } - - switch (this.Mode) - { - case CheckBoxMode.YN: - case CheckBoxMode.YesNo: - var stringValue = this.Value as string; - if (stringValue != null) - { - this._checkBox.Checked = stringValue.StartsWith("Y", StringComparison.InvariantCultureIgnoreCase); - } - - break; - default: - this._checkBox.Checked = Convert.ToBoolean(this.Value); - break; - } - - return this._checkBox; - } - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - - this.FormMode = DnnFormMode.Short; - } - - private void CheckedChanged(object sender, EventArgs e) - { - string newValue; - switch (this.Mode) - { - case CheckBoxMode.YN: - newValue = this._checkBox.Checked ? "Y" : "N"; - break; - case CheckBoxMode.YesNo: - newValue = this._checkBox.Checked ? "Yes" : "No"; - break; - default: - newValue = this._checkBox.Checked ? "true" : "false"; - break; - } - - this.UpdateDataSource(this.Value, newValue, this.DataField); - } - } -} + public DnnFormToggleButtonItem() + { + this.Mode = CheckBoxMode.TrueFalse; + } + + public enum CheckBoxMode + { + TrueFalse = 0, + YN = 1, + YesNo = 2, + } + + public CheckBoxMode Mode { get; set; } + + protected override WebControl CreateControlInternal(Control container) + { + // _checkBox = new DnnRadButton {ID = ID + "_CheckBox", ButtonType = RadButtonType.ToggleButton, ToggleType = ButtonToggleType.CheckBox, AutoPostBack = false}; + this._checkBox = new CheckBox { ID = this.ID + "_CheckBox", AutoPostBack = false }; + + this._checkBox.CheckedChanged += this.CheckedChanged; + container.Controls.Add(this._checkBox); + + // Load from ControlState + if (!this._checkBox.Page.IsPostBack) + { + } + + switch (this.Mode) + { + case CheckBoxMode.YN: + case CheckBoxMode.YesNo: + var stringValue = this.Value as string; + if (stringValue != null) + { + this._checkBox.Checked = stringValue.StartsWith("Y", StringComparison.InvariantCultureIgnoreCase); + } + + break; + default: + this._checkBox.Checked = Convert.ToBoolean(this.Value); + break; + } + + return this._checkBox; + } + + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + + this.FormMode = DnnFormMode.Short; + } + + private void CheckedChanged(object sender, EventArgs e) + { + string newValue; + switch (this.Mode) + { + case CheckBoxMode.YN: + newValue = this._checkBox.Checked ? "Y" : "N"; + break; + case CheckBoxMode.YesNo: + newValue = this._checkBox.Checked ? "Yes" : "No"; + break; + default: + newValue = this._checkBox.Checked ? "true" : "false"; + break; + } + + this.UpdateDataSource(this.Value, newValue, this.DataField); + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGrid.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGrid.cs index add61de6228..c2a3c2875ea 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGrid.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGrid.cs @@ -1,62 +1,63 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; using DotNetNuke.Framework; - using DotNetNuke.Framework.JavaScriptLibraries; + using DotNetNuke.Framework.JavaScriptLibraries; using DotNetNuke.Services.Localization; - using Telerik.Web.UI; - - public class DnnGrid : RadGrid - { - public int ScreenRowNumber { get; set; } - - public int RowHeight { get; set; } - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - this.EnableEmbeddedBaseStylesheet = false; - Utilities.ApplySkin(this); - JavaScript.RequestRegistration(CommonJs.DnnPlugins); - if (string.IsNullOrEmpty(this.ClientSettings.ClientEvents.OnGridCreated)) - { - this.ClientSettings.ClientEvents.OnGridCreated = "$.dnnGridCreated"; - } - - this.PreRender += new EventHandler(this.DnnGrid_PreRender); - - this.MasterTableView.NoMasterRecordsText = Localization.GetString("NoRecords", Localization.SharedResourceFile); - } - - private void DnnGrid_PreRender(object sender, EventArgs e) - { - var items = this.MasterTableView.Items; - if (this.ScreenRowNumber == 0) - { - this.ScreenRowNumber = 15; - } - - if (items.Count > this.ScreenRowNumber) - { - // need scroll - this.ClientSettings.Scrolling.AllowScroll = true; - this.ClientSettings.Scrolling.UseStaticHeaders = true; - - if (this.RowHeight == 0) - { - this.RowHeight = 25; - } - - this.ClientSettings.Scrolling.ScrollHeight = this.RowHeight * this.ScreenRowNumber; - } - else - { - this.ClientSettings.Scrolling.AllowScroll = false; - } - } - } -} + using Telerik.Web.UI; + + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGrid : RadGrid + { + public int ScreenRowNumber { get; set; } + + public int RowHeight { get; set; } + + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + this.EnableEmbeddedBaseStylesheet = false; + Utilities.ApplySkin(this); + JavaScript.RequestRegistration(CommonJs.DnnPlugins); + if (string.IsNullOrEmpty(this.ClientSettings.ClientEvents.OnGridCreated)) + { + this.ClientSettings.ClientEvents.OnGridCreated = "$.dnnGridCreated"; + } + + this.PreRender += new EventHandler(this.DnnGrid_PreRender); + + this.MasterTableView.NoMasterRecordsText = Localization.GetString("NoRecords", Localization.SharedResourceFile); + } + + private void DnnGrid_PreRender(object sender, EventArgs e) + { + var items = this.MasterTableView.Items; + if (this.ScreenRowNumber == 0) + { + this.ScreenRowNumber = 15; + } + + if (items.Count > this.ScreenRowNumber) + { + // need scroll + this.ClientSettings.Scrolling.AllowScroll = true; + this.ClientSettings.Scrolling.UseStaticHeaders = true; + + if (this.RowHeight == 0) + { + this.RowHeight = 25; + } + + this.ClientSettings.Scrolling.ScrollHeight = this.RowHeight * this.ScreenRowNumber; + } + else + { + this.ClientSettings.Scrolling.AllowScroll = false; + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridAttachmentColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridAttachmentColumn.cs index 7f31c0475e0..36948e98f56 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridAttachmentColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridAttachmentColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridGroupSplitterColumn : GridGroupSplitterColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridGroupSplitterColumn dnnGridColumn = new DnnGridGroupSplitterColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridGroupSplitterColumn : GridGroupSplitterColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridGroupSplitterColumn dnnGridColumn = new DnnGridGroupSplitterColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridBinaryImageColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridBinaryImageColumn.cs index 9dcf81572ba..3b68dcfd40d 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridBinaryImageColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridBinaryImageColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridBinaryImageColumn : GridBinaryImageColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridBinaryImageColumn dnnGridColumn = new DnnGridBinaryImageColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridBinaryImageColumn : GridBinaryImageColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridBinaryImageColumn dnnGridColumn = new DnnGridBinaryImageColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridBoundColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridBoundColumn.cs index 69d7de4aee8..e0dda976097 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridBoundColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridBoundColumn.cs @@ -1,51 +1,52 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridBoundColumn : GridBoundColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridBoundColumn dnnGridColumn = new DnnGridBoundColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - GridHeaderItem headerItem = inItem as GridHeaderItem; - string columnName = this.DataField; - if (!this.Owner.AllowSorting) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - else - { - LinkButton button = (LinkButton)headerItem[columnName].Controls[0]; - button.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridBoundColumn : GridBoundColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridBoundColumn dnnGridColumn = new DnnGridBoundColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + GridHeaderItem headerItem = inItem as GridHeaderItem; + string columnName = this.DataField; + if (!this.Owner.AllowSorting) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + else + { + LinkButton button = (LinkButton)headerItem[columnName].Controls[0]; + button.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridButtonColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridButtonColumn.cs index 93169d67d32..953f97084c3 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridButtonColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridButtonColumn.cs @@ -1,83 +1,84 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridButtonColumn : GridButtonColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - /// ----------------------------------------------------------------------------- - /// - /// Gets or sets the Icon Key to obtain ImageURL. - /// - /// A String. - /// ----------------------------------------------------------------------------- - public string IconKey { get; set; } - - /// ----------------------------------------------------------------------------- - /// - /// Gets or sets the Icon Siz to obtain ImageURL. - /// - /// A String. - /// ----------------------------------------------------------------------------- - public string IconSize { get; set; } - - /// ----------------------------------------------------------------------------- - /// - /// Gets or sets the Icon Style to obtain ImageURL. - /// - /// A String. - /// ----------------------------------------------------------------------------- - public string IconStyle { get; set; } - - public override string ImageUrl - { - get - { - if (string.IsNullOrEmpty(base.ImageUrl)) - { - base.ImageUrl = Entities.Icons.IconController.IconURL(this.IconKey, this.IconSize, this.IconStyle); - } - - return base.ImageUrl; - } - - set - { - base.ImageUrl = value; - } - } - - public override GridColumn Clone() - { - DnnGridButtonColumn dnnGridColumn = new DnnGridButtonColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridButtonColumn : GridButtonColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Gets or sets the Icon Key to obtain ImageURL. + /// + /// A String. + /// ----------------------------------------------------------------------------- + public string IconKey { get; set; } + + /// ----------------------------------------------------------------------------- + /// + /// Gets or sets the Icon Siz to obtain ImageURL. + /// + /// A String. + /// ----------------------------------------------------------------------------- + public string IconSize { get; set; } + + /// ----------------------------------------------------------------------------- + /// + /// Gets or sets the Icon Style to obtain ImageURL. + /// + /// A String. + /// ----------------------------------------------------------------------------- + public string IconStyle { get; set; } + + public override string ImageUrl + { + get + { + if (string.IsNullOrEmpty(base.ImageUrl)) + { + base.ImageUrl = Entities.Icons.IconController.IconURL(this.IconKey, this.IconSize, this.IconStyle); + } + + return base.ImageUrl; + } + + set + { + base.ImageUrl = value; + } + } + + public override GridColumn Clone() + { + DnnGridButtonColumn dnnGridColumn = new DnnGridButtonColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridCalculatedColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridCalculatedColumn.cs index 81353f03d21..1a5abeb8170 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridCalculatedColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridCalculatedColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridCalculatedColumn : GridCalculatedColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridCalculatedColumn dnnGridColumn = new DnnGridCalculatedColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridCalculatedColumn : GridCalculatedColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridCalculatedColumn dnnGridColumn = new DnnGridCalculatedColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridCheckBoxColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridCheckBoxColumn.cs index 6429d70fdbc..12386fb09f1 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridCheckBoxColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridCheckBoxColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridCheckBoxColumn : GridCheckBoxColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridCheckBoxColumn dnnGridColumn = new DnnGridCheckBoxColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridCheckBoxColumn : GridCheckBoxColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridCheckBoxColumn dnnGridColumn = new DnnGridCheckBoxColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridClientSelectColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridClientSelectColumn.cs index 53364b4ca8e..98c430e05cd 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridClientSelectColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridClientSelectColumn.cs @@ -1,44 +1,45 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridClientSelectColumn : GridClientSelectColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - var dnnGridColumn = new DnnGridClientSelectColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - if (!inItem.OwnerTableView.OwnerGrid.AllowMultiRowSelection) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridClientSelectColumn : GridClientSelectColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + var dnnGridColumn = new DnnGridClientSelectColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + if (!inItem.OwnerTableView.OwnerGrid.AllowMultiRowSelection) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridColumn.cs index f18783aab64..c83fa709db8 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridColumn.cs @@ -1,59 +1,60 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridColumn : GridColumn - { - private string _HeaderText; - - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override string HeaderText - { - get - { - if (string.IsNullOrEmpty(base.HeaderText)) - { - base.HeaderText = Localization.GetString(string.Format("{0}.Header", this._HeaderText), DotNetNuke.Web.UI.Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent)); - } - - return base.HeaderText; - } - - set - { - this._HeaderText = value; - base.HeaderText = string.Empty; - } - } - - public string setHeaderText - { - set - { - base.HeaderText = value; - } - } - - public override GridColumn Clone() - { - var dnnGridColumn = new DnnGridColumn(); - dnnGridColumn.CopyBaseProperties(this); - dnnGridColumn.setHeaderText = this.HeaderText; - return dnnGridColumn; - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridColumn : GridColumn + { + private string _HeaderText; + + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override string HeaderText + { + get + { + if (string.IsNullOrEmpty(base.HeaderText)) + { + base.HeaderText = Localization.GetString(string.Format("{0}.Header", this._HeaderText), DotNetNuke.Web.UI.Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent)); + } + + return base.HeaderText; + } + + set + { + this._HeaderText = value; + base.HeaderText = string.Empty; + } + } + + public string setHeaderText + { + set + { + base.HeaderText = value; + } + } + + public override GridColumn Clone() + { + var dnnGridColumn = new DnnGridColumn(); + dnnGridColumn.CopyBaseProperties(this); + dnnGridColumn.setHeaderText = this.HeaderText; + return dnnGridColumn; + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridDataItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridDataItem.cs index 926e853e134..21d631d138f 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridDataItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridDataItem.cs @@ -1,20 +1,24 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ + +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnGridDataItem : GridDataItem - { - public DnnGridDataItem(GridTableView ownerTableView, int itemIndex, int dataSetIndex) - : base(ownerTableView, itemIndex, dataSetIndex) - { - } - - public DnnGridDataItem(GridTableView ownerTableView, int itemIndex, int dataSetIndex, GridItemType itemType) - : base(ownerTableView, itemIndex, dataSetIndex, itemType) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridDataItem : GridDataItem + { + public DnnGridDataItem(GridTableView ownerTableView, int itemIndex, int dataSetIndex) + : base(ownerTableView, itemIndex, dataSetIndex) + { + } + + public DnnGridDataItem(GridTableView ownerTableView, int itemIndex, int dataSetIndex, GridItemType itemType) + : base(ownerTableView, itemIndex, dataSetIndex, itemType) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridDateTimeColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridDateTimeColumn.cs index 1055ec44882..d75905167d3 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridDateTimeColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridDateTimeColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridDateTimeColumn : GridDateTimeColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridDateTimeColumn dnnGridColumn = new DnnGridDateTimeColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridDateTimeColumn : GridDateTimeColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridDateTimeColumn dnnGridColumn = new DnnGridDateTimeColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridDropDownColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridDropDownColumn.cs index 59bd6ac59be..0f27f92a3e0 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridDropDownColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridDropDownColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridDropDownColumn : GridDropDownColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridDropDownColumn dnnGridColumn = new DnnGridDropDownColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridDropDownColumn : GridDropDownColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridDropDownColumn dnnGridColumn = new DnnGridDropDownColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridEditColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridEditColumn.cs index 3f32e90dbec..c7d200d0098 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridEditColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridEditColumn.cs @@ -1,28 +1,31 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnGridEditColumn : GridEditCommandColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridEditColumn dnnGridColumn = new DnnGridEditColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridEditColumn : GridEditCommandColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridEditColumn dnnGridColumn = new DnnGridEditColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridEditFormSettings.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridEditFormSettings.cs index fd2f5868a4f..6a623ae8812 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridEditFormSettings.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridEditFormSettings.cs @@ -1,15 +1,18 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnGridEditFormSettings : GridEditFormSettings - { - public DnnGridEditFormSettings(DnnGridTableView owner) - : base(owner) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridEditFormSettings : GridEditFormSettings + { + public DnnGridEditFormSettings(DnnGridTableView owner) + : base(owner) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridExpandColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridExpandColumn.cs index 8a1ee51e863..3932e372d61 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridExpandColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridExpandColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridExpandColumn : GridColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridExpandColumn dnnGridColumn = new DnnGridExpandColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridExpandColumn : GridColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridExpandColumn dnnGridColumn = new DnnGridExpandColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridFooterItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridFooterItem.cs index 7627b7b80d4..ac62e80b830 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridFooterItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridFooterItem.cs @@ -1,15 +1,18 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnGridFooterItem : GridFooterItem - { - public DnnGridFooterItem(GridTableView ownerTableView, int itemIndex, int dataSetIndex) - : base(ownerTableView, itemIndex, dataSetIndex) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridFooterItem : GridFooterItem + { + public DnnGridFooterItem(GridTableView ownerTableView, int itemIndex, int dataSetIndex) + : base(ownerTableView, itemIndex, dataSetIndex) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridGroupSplitterColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridGroupSplitterColumn.cs index 3bb5725316c..13746509d4e 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridGroupSplitterColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridGroupSplitterColumn.cs @@ -5,10 +5,11 @@ namespace DotNetNuke.Web.UI.WebControls { using System; using System.Web.UI.WebControls; - + using DotNetNuke.Services.Localization; - using Telerik.Web.UI; - + using Telerik.Web.UI; + + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] public class DnnGridAttachmentColumn : GridAttachmentColumn { public string LocalResourceFile diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridHTMLEditorColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridHTMLEditorColumn.cs index ec8e9b392a5..dbd15ca6bde 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridHTMLEditorColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridHTMLEditorColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridHTMLEditorColumn : GridHTMLEditorColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridHTMLEditorColumn dnnGridColumn = new DnnGridHTMLEditorColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridHTMLEditorColumn : GridHTMLEditorColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridHTMLEditorColumn dnnGridColumn = new DnnGridHTMLEditorColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridHeaderItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridHeaderItem.cs index f6a3e590c0f..e3bbfb6368f 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridHeaderItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridHeaderItem.cs @@ -1,15 +1,18 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnGridHeaderItem : GridHeaderItem - { - public DnnGridHeaderItem(GridTableView ownerTableView, int itemIndex, int dataSetIndex) - : base(ownerTableView, itemIndex, dataSetIndex) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridHeaderItem : GridHeaderItem + { + public DnnGridHeaderItem(GridTableView ownerTableView, int itemIndex, int dataSetIndex) + : base(ownerTableView, itemIndex, dataSetIndex) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridHyperlinkColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridHyperlinkColumn.cs index 38fec61d694..3ee33515743 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridHyperlinkColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridHyperlinkColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridHyperLinkColumn : GridHyperLinkColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridHyperLinkColumn dnnGridColumn = new DnnGridHyperLinkColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridHyperLinkColumn : GridHyperLinkColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridHyperLinkColumn dnnGridColumn = new DnnGridHyperLinkColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridImageColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridImageColumn.cs index 4d93a507ac8..cc2f2aef131 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridImageColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridImageColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridImageColumn : GridImageColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridImageColumn dnnGridColumn = new DnnGridImageColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridImageColumn : GridImageColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridImageColumn dnnGridColumn = new DnnGridImageColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridImageCommandColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridImageCommandColumn.cs index d7c772030de..f1fce956949 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridImageCommandColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridImageCommandColumn.cs @@ -2,174 +2,176 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System.Web; - using System.Web.UI.WebControls; - - using DotNetNuke.Entities.Icons; - using DotNetNuke.UI.WebControls; - using Telerik.Web.UI; - - public class DnnGridImageCommandColumn : DnnGridTemplateColumn - { - private ImageCommandColumnEditMode _editMode = ImageCommandColumnEditMode.Command; - private bool _showImage = true; - - private string _imageURL = string.Empty; - - /// - /// Gets or sets the CommandName for the Column. - /// - /// A String. - public string CommandName { get; set; } - - /// - /// Gets or sets editMode for the Column. - /// - /// A String. - public ImageCommandColumnEditMode EditMode - { - get { return this._editMode; } - set { this._editMode = value; } - } - - /// - /// Gets or sets the URL of the Image. - /// - /// A String. - public string ImageURL - { - get - { - if (!string.IsNullOrEmpty(this._imageURL)) - { - return this._imageURL; - } - - return IconController.IconURL(this.IconKey, this.IconSize, this.IconStyle); - } - - set { this._imageURL = value; } - } - - /// - /// Gets or sets the Icon Key to obtain ImageURL. - /// - /// A String. - public string IconKey { get; set; } - - /// - /// Gets or sets the Icon Siz to obtain ImageURL. - /// - /// A String. - public string IconSize { get; set; } - - /// - /// Gets or sets the Icon Style to obtain ImageURL. - /// - /// A String. - public string IconStyle { get; set; } - - /// - /// Gets or sets the Key Field that provides a Unique key to the data Item. - /// - /// A String. - public string KeyField { get; set; } - - /// - /// Gets or sets the URL of the Link (unless DataBinding through KeyField). - /// - /// A String. - public string NavigateURL { get; set; } - - /// - /// Gets or sets the URL Formatting string. - /// - /// A String. - public string NavigateURLFormatString { get; set; } - - /// - /// Gets or sets javascript text to attach to the OnClick Event. - /// - /// A String. - public string OnClickJs { get; set; } - - /// - /// Gets or sets a value indicating whether gets or sets whether an Image is displayed. - /// - /// Defaults to True. - /// A Boolean. - public bool ShowImage - { - get { return this._showImage; } - set { this._showImage = value; } - } - - /// - /// Gets or sets the Text (for Header/Footer Templates). - /// - /// A String. - public string Text { get; set; } - - /// - /// Gets or sets an flag that indicates whether the buttons are visible. - /// - /// A Boolean. - public string VisibleField { get; set; } - - /// - /// Initialises the Column. - /// - public override void Initialize() - { - this.ItemTemplate = this.CreateTemplate(GridItemType.Item); - this.EditItemTemplate = this.CreateTemplate(GridItemType.EditItem); - this.HeaderTemplate = this.CreateTemplate(GridItemType.Header); - - if (HttpContext.Current == null) - { - this.HeaderStyle.Font.Names = new[] { "Tahoma, Verdana, Arial" }; - this.HeaderStyle.Font.Size = new FontUnit("10pt"); - this.HeaderStyle.Font.Bold = true; - } - - this.ItemStyle.HorizontalAlign = HorizontalAlign.Center; - this.HeaderStyle.HorizontalAlign = HorizontalAlign.Center; - } - - /// - /// Creates a ImageCommandColumnTemplate. - /// - /// A ImageCommandColumnTemplate. - private DnnGridImageCommandColumnTemplate CreateTemplate(GridItemType type) - { - bool isDesignMode = HttpContext.Current == null; - var template = new DnnGridImageCommandColumnTemplate(type); - if (type != GridItemType.Header) - { - template.ImageURL = this.ImageURL; - if (!isDesignMode) - { - template.CommandName = this.CommandName; - template.VisibleField = this.VisibleField; - template.KeyField = this.KeyField; - } - } - - template.EditMode = this.EditMode; - template.NavigateURL = this.NavigateURL; - template.NavigateURLFormatString = this.NavigateURLFormatString; - template.OnClickJs = this.OnClickJs; - template.ShowImage = this.ShowImage; - template.Visible = this.Visible; - - template.Text = type == GridItemType.Header ? this.HeaderText : this.Text; - - // Set Design Mode to True - template.DesignMode = isDesignMode; - - return template; - } - } -} +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web; + using System.Web.UI.WebControls; + + using DotNetNuke.Entities.Icons; + using DotNetNuke.UI.WebControls; + using Telerik.Web.UI; + + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridImageCommandColumn : DnnGridTemplateColumn + { + private ImageCommandColumnEditMode _editMode = ImageCommandColumnEditMode.Command; + private bool _showImage = true; + + private string _imageURL = string.Empty; + + /// + /// Gets or sets the CommandName for the Column. + /// + /// A String. + public string CommandName { get; set; } + + /// + /// Gets or sets editMode for the Column. + /// + /// A String. + public ImageCommandColumnEditMode EditMode + { + get { return this._editMode; } + set { this._editMode = value; } + } + + /// + /// Gets or sets the URL of the Image. + /// + /// A String. + public string ImageURL + { + get + { + if (!string.IsNullOrEmpty(this._imageURL)) + { + return this._imageURL; + } + + return IconController.IconURL(this.IconKey, this.IconSize, this.IconStyle); + } + + set { this._imageURL = value; } + } + + /// + /// Gets or sets the Icon Key to obtain ImageURL. + /// + /// A String. + public string IconKey { get; set; } + + /// + /// Gets or sets the Icon Siz to obtain ImageURL. + /// + /// A String. + public string IconSize { get; set; } + + /// + /// Gets or sets the Icon Style to obtain ImageURL. + /// + /// A String. + public string IconStyle { get; set; } + + /// + /// Gets or sets the Key Field that provides a Unique key to the data Item. + /// + /// A String. + public string KeyField { get; set; } + + /// + /// Gets or sets the URL of the Link (unless DataBinding through KeyField). + /// + /// A String. + public string NavigateURL { get; set; } + + /// + /// Gets or sets the URL Formatting string. + /// + /// A String. + public string NavigateURLFormatString { get; set; } + + /// + /// Gets or sets javascript text to attach to the OnClick Event. + /// + /// A String. + public string OnClickJs { get; set; } + + /// + /// Gets or sets a value indicating whether gets or sets whether an Image is displayed. + /// + /// Defaults to True. + /// A Boolean. + public bool ShowImage + { + get { return this._showImage; } + set { this._showImage = value; } + } + + /// + /// Gets or sets the Text (for Header/Footer Templates). + /// + /// A String. + public string Text { get; set; } + + /// + /// Gets or sets an flag that indicates whether the buttons are visible. + /// + /// A Boolean. + public string VisibleField { get; set; } + + /// + /// Initialises the Column. + /// + public override void Initialize() + { + this.ItemTemplate = this.CreateTemplate(GridItemType.Item); + this.EditItemTemplate = this.CreateTemplate(GridItemType.EditItem); + this.HeaderTemplate = this.CreateTemplate(GridItemType.Header); + + if (HttpContext.Current == null) + { + this.HeaderStyle.Font.Names = new[] { "Tahoma, Verdana, Arial" }; + this.HeaderStyle.Font.Size = new FontUnit("10pt"); + this.HeaderStyle.Font.Bold = true; + } + + this.ItemStyle.HorizontalAlign = HorizontalAlign.Center; + this.HeaderStyle.HorizontalAlign = HorizontalAlign.Center; + } + + /// + /// Creates a ImageCommandColumnTemplate. + /// + /// A ImageCommandColumnTemplate. + private DnnGridImageCommandColumnTemplate CreateTemplate(GridItemType type) + { + bool isDesignMode = HttpContext.Current == null; + var template = new DnnGridImageCommandColumnTemplate(type); + if (type != GridItemType.Header) + { + template.ImageURL = this.ImageURL; + if (!isDesignMode) + { + template.CommandName = this.CommandName; + template.VisibleField = this.VisibleField; + template.KeyField = this.KeyField; + } + } + + template.EditMode = this.EditMode; + template.NavigateURL = this.NavigateURL; + template.NavigateURLFormatString = this.NavigateURLFormatString; + template.OnClickJs = this.OnClickJs; + template.ShowImage = this.ShowImage; + template.Visible = this.Visible; + + template.Text = type == GridItemType.Header ? this.HeaderText : this.Text; + + // Set Design Mode to True + template.DesignMode = isDesignMode; + + return template; + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridImageCommandColumnTemplate.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridImageCommandColumnTemplate.cs index 48b4b8abde3..e0ebb27497d 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridImageCommandColumnTemplate.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridImageCommandColumnTemplate.cs @@ -2,286 +2,287 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Collections.Specialized; - using System.Globalization; - using System.Web.UI; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Collections.Specialized; + using System.Globalization; + using System.Web.UI; + using System.Web.UI.WebControls; - using DotNetNuke.Common.Utilities; - using DotNetNuke.UI.Utilities; - using DotNetNuke.UI.WebControls; - using Telerik.Web.UI; + using DotNetNuke.Common.Utilities; + using DotNetNuke.UI.Utilities; + using DotNetNuke.UI.WebControls; + using Telerik.Web.UI; - public class DnnGridImageCommandColumnTemplate : IBindableTemplate - { - private ImageCommandColumnEditMode _editMode = ImageCommandColumnEditMode.Command; - private GridItemType _itemType = GridItemType.Item; - private bool _showImage = true; - private bool _visible = true; - - public DnnGridImageCommandColumnTemplate() - : this(GridItemType.Item) - { - } - - public DnnGridImageCommandColumnTemplate(GridItemType itemType) - { - this.ItemType = itemType; - } - - /// - /// Gets or sets the CommandName for the Column. - /// - /// A String. - public string CommandName { get; set; } - - /// - /// Gets or sets a value indicating whether gets or sets the Design Mode of the Column. - /// - /// A Boolean. - public bool DesignMode { get; set; } - - /// - /// Gets or sets the CommandName for the Column. - /// - /// A String. - public ImageCommandColumnEditMode EditMode - { - get { return this._editMode; } - set { this._editMode = value; } - } - - /// - /// Gets or sets the URL of the Image. - /// - /// A String. - public string ImageURL { get; set; } - - /// - /// Gets or sets the type of Template to Create. - /// - /// A String. - public GridItemType ItemType - { - get { return this._itemType; } - set { this._itemType = value; } - } - - /// - /// Gets or sets the Key Field that provides a Unique key to the data Item. - /// - /// A String. - public string KeyField { get; set; } - - /// - /// Gets or sets the URL of the Link (unless DataBinding through KeyField). - /// - /// A String. - public string NavigateURL { get; set; } - - /// - /// Gets or sets the URL Formatting string. - /// - /// A String. - public string NavigateURLFormatString { get; set; } - - /// - /// Gets or sets javascript text to attach to the OnClick Event. - /// - /// A String. - public string OnClickJs { get; set; } - - /// - /// Gets or sets a value indicating whether gets or sets whether an Image is displayed. - /// - /// Defaults to True. - /// A Boolean. - public bool ShowImage - { - get { return this._showImage; } - set { this._showImage = value; } - } - - /// - /// Gets or sets the Text (for Header/Footer Templates). - /// - /// A String. - public string Text { get; set; } - - /// - /// Gets or sets a value indicating whether an flag that indicates whether the buttons are visible (this is overridden if - /// the VisibleField is set) - /// changed. - /// - /// A Boolean. - public bool Visible - { - get { return this._visible; } - set { this._visible = value; } - } - - /// - /// Gets or sets an flag that indicates whether the buttons are visible. - /// - /// A Boolean. - public string VisibleField { get; set; } - - /// - /// InstantiateIn instantiates the template (implementation of ITemplate). - /// - /// - /// - /// The parent container (DataGridItem). - public void InstantiateIn(Control container) - { - switch (this.ItemType) - { - case GridItemType.Item: - case GridItemType.AlternatingItem: - case GridItemType.SelectedItem: - case GridItemType.EditItem: - if (this.EditMode == ImageCommandColumnEditMode.URL) - { - var hypLink = new HyperLink { ToolTip = this.Text }; - if (!string.IsNullOrEmpty(this.ImageURL) && this.ShowImage) - { - var img = new Image { ImageUrl = this.DesignMode ? this.ImageURL.Replace("~/", "../../") : this.ImageURL }; - hypLink.Controls.Add(img); - img.ToolTip = this.Text; - } - else - { - hypLink.Text = this.Text; - } - - hypLink.DataBinding += this.ItemDataBinding; - container.Controls.Add(hypLink); - } - else - { - if (!string.IsNullOrEmpty(this.ImageURL) && this.ShowImage) - { - var colIcon = new ImageButton - { ImageUrl = this.DesignMode ? this.ImageURL.Replace("~/", "../../") : this.ImageURL, ToolTip = this.Text }; - if (!string.IsNullOrEmpty(this.OnClickJs)) - { - ClientAPI.AddButtonConfirm(colIcon, this.OnClickJs); - } - - colIcon.CommandName = this.CommandName; - colIcon.DataBinding += this.ItemDataBinding; - container.Controls.Add(colIcon); - } - - if (!string.IsNullOrEmpty(this.Text) && !this.ShowImage) - { - var colLink = new LinkButton { ToolTip = this.Text }; - if (!string.IsNullOrEmpty(this.OnClickJs)) - { - ClientAPI.AddButtonConfirm(colLink, this.OnClickJs); - } - - colLink.CommandName = this.CommandName; - colLink.Text = this.Text; - colLink.DataBinding += this.ItemDataBinding; - container.Controls.Add(colLink); - } - } - - break; - case GridItemType.Footer: - case GridItemType.Header: - container.Controls.Add(new LiteralControl(this.Text)); - break; - } - } - - public IOrderedDictionary ExtractValues(Control container) - { - // do nothing we don't really support databinding - // but the telerik grid trys to databind to all template columns regardless - return new OrderedDictionary(); - } - - /// - /// Gets whether theButton is visible. - /// - /// The parent container (DataGridItem). - private bool GetIsVisible(GridItem container) - { - if (!string.IsNullOrEmpty(this.VisibleField)) - { - return Convert.ToBoolean(DataBinder.Eval(container.DataItem, this.VisibleField)); - } - - return this.Visible; - } - - /// - /// Gets the value of the key. - /// - /// The parent container (DataGridItem). - private int GetValue(GridItem container) - { - int keyValue = Null.NullInteger; - if (!string.IsNullOrEmpty(this.KeyField)) - { - keyValue = Convert.ToInt32(DataBinder.Eval(container.DataItem, this.KeyField)); - } - - return keyValue; - } - - /// - /// Item_DataBinding runs when an Item of type GridItemType.Item is being data-bound. - /// - /// - /// - /// The object that triggers the event. - /// An EventArgs object. - private void ItemDataBinding(object sender, EventArgs e) - { - GridItem container; - int keyValue; - if (this.EditMode == ImageCommandColumnEditMode.URL) - { - var hypLink = (HyperLink)sender; - container = (GridItem)hypLink.NamingContainer; - keyValue = this.GetValue(container); - if (!string.IsNullOrEmpty(this.NavigateURLFormatString)) - { - hypLink.NavigateUrl = string.Format(this.NavigateURLFormatString, keyValue); - } - else - { - hypLink.NavigateUrl = keyValue.ToString(CultureInfo.InvariantCulture); - } - } - else - { - // Bind Image Button - if (!string.IsNullOrEmpty(this.ImageURL) && this.ShowImage) - { - var colIcon = (ImageButton)sender; - container = (GridItem)colIcon.NamingContainer; - keyValue = this.GetValue(container); - colIcon.CommandArgument = keyValue.ToString(CultureInfo.InvariantCulture); - colIcon.Visible = this.GetIsVisible(container); - } - - if (!string.IsNullOrEmpty(this.Text) && !this.ShowImage) - { - // Bind Link Button - var colLink = (LinkButton)sender; - container = (GridItem)colLink.NamingContainer; - keyValue = this.GetValue(container); - colLink.CommandArgument = keyValue.ToString(CultureInfo.InvariantCulture); - colLink.Visible = this.GetIsVisible(container); - } - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridImageCommandColumnTemplate : IBindableTemplate + { + private ImageCommandColumnEditMode _editMode = ImageCommandColumnEditMode.Command; + private GridItemType _itemType = GridItemType.Item; + private bool _showImage = true; + private bool _visible = true; + + public DnnGridImageCommandColumnTemplate() + : this(GridItemType.Item) + { + } + + public DnnGridImageCommandColumnTemplate(GridItemType itemType) + { + this.ItemType = itemType; + } + + /// + /// Gets or sets the CommandName for the Column. + /// + /// A String. + public string CommandName { get; set; } + + /// + /// Gets or sets a value indicating whether gets or sets the Design Mode of the Column. + /// + /// A Boolean. + public bool DesignMode { get; set; } + + /// + /// Gets or sets the CommandName for the Column. + /// + /// A String. + public ImageCommandColumnEditMode EditMode + { + get { return this._editMode; } + set { this._editMode = value; } + } + + /// + /// Gets or sets the URL of the Image. + /// + /// A String. + public string ImageURL { get; set; } + + /// + /// Gets or sets the type of Template to Create. + /// + /// A String. + public GridItemType ItemType + { + get { return this._itemType; } + set { this._itemType = value; } + } + + /// + /// Gets or sets the Key Field that provides a Unique key to the data Item. + /// + /// A String. + public string KeyField { get; set; } + + /// + /// Gets or sets the URL of the Link (unless DataBinding through KeyField). + /// + /// A String. + public string NavigateURL { get; set; } + + /// + /// Gets or sets the URL Formatting string. + /// + /// A String. + public string NavigateURLFormatString { get; set; } + + /// + /// Gets or sets javascript text to attach to the OnClick Event. + /// + /// A String. + public string OnClickJs { get; set; } + + /// + /// Gets or sets a value indicating whether gets or sets whether an Image is displayed. + /// + /// Defaults to True. + /// A Boolean. + public bool ShowImage + { + get { return this._showImage; } + set { this._showImage = value; } + } + + /// + /// Gets or sets the Text (for Header/Footer Templates). + /// + /// A String. + public string Text { get; set; } + + /// + /// Gets or sets a value indicating whether an flag that indicates whether the buttons are visible (this is overridden if + /// the VisibleField is set) + /// changed. + /// + /// A Boolean. + public bool Visible + { + get { return this._visible; } + set { this._visible = value; } + } + + /// + /// Gets or sets an flag that indicates whether the buttons are visible. + /// + /// A Boolean. + public string VisibleField { get; set; } + + /// + /// InstantiateIn instantiates the template (implementation of ITemplate). + /// + /// + /// + /// The parent container (DataGridItem). + public void InstantiateIn(Control container) + { + switch (this.ItemType) + { + case GridItemType.Item: + case GridItemType.AlternatingItem: + case GridItemType.SelectedItem: + case GridItemType.EditItem: + if (this.EditMode == ImageCommandColumnEditMode.URL) + { + var hypLink = new HyperLink { ToolTip = this.Text }; + if (!string.IsNullOrEmpty(this.ImageURL) && this.ShowImage) + { + var img = new Image { ImageUrl = this.DesignMode ? this.ImageURL.Replace("~/", "../../") : this.ImageURL }; + hypLink.Controls.Add(img); + img.ToolTip = this.Text; + } + else + { + hypLink.Text = this.Text; + } + + hypLink.DataBinding += this.ItemDataBinding; + container.Controls.Add(hypLink); + } + else + { + if (!string.IsNullOrEmpty(this.ImageURL) && this.ShowImage) + { + var colIcon = new ImageButton + { ImageUrl = this.DesignMode ? this.ImageURL.Replace("~/", "../../") : this.ImageURL, ToolTip = this.Text }; + if (!string.IsNullOrEmpty(this.OnClickJs)) + { + ClientAPI.AddButtonConfirm(colIcon, this.OnClickJs); + } + + colIcon.CommandName = this.CommandName; + colIcon.DataBinding += this.ItemDataBinding; + container.Controls.Add(colIcon); + } + + if (!string.IsNullOrEmpty(this.Text) && !this.ShowImage) + { + var colLink = new LinkButton { ToolTip = this.Text }; + if (!string.IsNullOrEmpty(this.OnClickJs)) + { + ClientAPI.AddButtonConfirm(colLink, this.OnClickJs); + } + + colLink.CommandName = this.CommandName; + colLink.Text = this.Text; + colLink.DataBinding += this.ItemDataBinding; + container.Controls.Add(colLink); + } + } + + break; + case GridItemType.Footer: + case GridItemType.Header: + container.Controls.Add(new LiteralControl(this.Text)); + break; + } + } + + public IOrderedDictionary ExtractValues(Control container) + { + // do nothing we don't really support databinding + // but the telerik grid trys to databind to all template columns regardless + return new OrderedDictionary(); + } + + /// + /// Gets whether theButton is visible. + /// + /// The parent container (DataGridItem). + private bool GetIsVisible(GridItem container) + { + if (!string.IsNullOrEmpty(this.VisibleField)) + { + return Convert.ToBoolean(DataBinder.Eval(container.DataItem, this.VisibleField)); + } + + return this.Visible; + } + + /// + /// Gets the value of the key. + /// + /// The parent container (DataGridItem). + private int GetValue(GridItem container) + { + int keyValue = Null.NullInteger; + if (!string.IsNullOrEmpty(this.KeyField)) + { + keyValue = Convert.ToInt32(DataBinder.Eval(container.DataItem, this.KeyField)); + } + + return keyValue; + } + + /// + /// Item_DataBinding runs when an Item of type GridItemType.Item is being data-bound. + /// + /// + /// + /// The object that triggers the event. + /// An EventArgs object. + private void ItemDataBinding(object sender, EventArgs e) + { + GridItem container; + int keyValue; + if (this.EditMode == ImageCommandColumnEditMode.URL) + { + var hypLink = (HyperLink)sender; + container = (GridItem)hypLink.NamingContainer; + keyValue = this.GetValue(container); + if (!string.IsNullOrEmpty(this.NavigateURLFormatString)) + { + hypLink.NavigateUrl = string.Format(this.NavigateURLFormatString, keyValue); + } + else + { + hypLink.NavigateUrl = keyValue.ToString(CultureInfo.InvariantCulture); + } + } + else + { + // Bind Image Button + if (!string.IsNullOrEmpty(this.ImageURL) && this.ShowImage) + { + var colIcon = (ImageButton)sender; + container = (GridItem)colIcon.NamingContainer; + keyValue = this.GetValue(container); + colIcon.CommandArgument = keyValue.ToString(CultureInfo.InvariantCulture); + colIcon.Visible = this.GetIsVisible(container); + } + + if (!string.IsNullOrEmpty(this.Text) && !this.ShowImage) + { + // Bind Link Button + var colLink = (LinkButton)sender; + container = (GridItem)colLink.NamingContainer; + keyValue = this.GetValue(container); + colLink.CommandArgument = keyValue.ToString(CultureInfo.InvariantCulture); + colLink.Visible = this.GetIsVisible(container); + } + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridItem.cs index 30407cebb4d..26287487705 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridItem.cs @@ -1,15 +1,18 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnGridItem : GridItem - { - public DnnGridItem(GridTableView ownerTableView, int itemIndex, int dataSetIndex, GridItemType itemType) - : base(ownerTableView, itemIndex, dataSetIndex, itemType) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridItem : GridItem + { + public DnnGridItem(GridTableView ownerTableView, int itemIndex, int dataSetIndex, GridItemType itemType) + : base(ownerTableView, itemIndex, dataSetIndex, itemType) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridItemSelectedEventArgs.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridItemSelectedEventArgs.cs index 2a11751fe05..3b9f6ded992 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridItemSelectedEventArgs.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridItemSelectedEventArgs.cs @@ -1,27 +1,28 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; using Telerik.Web.UI; - public class DnnGridItemSelectedEventArgs : EventArgs - { - private readonly GridItemCollection _SelectedItems; - - public DnnGridItemSelectedEventArgs(GridItemCollection selectedItems) - { - this._SelectedItems = selectedItems; - } - - public GridItemCollection SelectedItems - { - get - { - return this._SelectedItems; - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridItemSelectedEventArgs : EventArgs + { + private readonly GridItemCollection _SelectedItems; + + public DnnGridItemSelectedEventArgs(GridItemCollection selectedItems) + { + this._SelectedItems = selectedItems; + } + + public GridItemCollection SelectedItems + { + get + { + return this._SelectedItems; + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridItemSelectedEventHandler.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridItemSelectedEventHandler.cs index bbe84fb9859..9fac43f8a53 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridItemSelectedEventHandler.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridItemSelectedEventHandler.cs @@ -2,7 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - public delegate void DnnGridItemSelectedEventHandler(object sender, DnnGridItemSelectedEventArgs e); -} +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public delegate void DnnGridItemSelectedEventHandler(object sender, DnnGridItemSelectedEventArgs e); +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridMaskedColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridMaskedColumn.cs index 5696b44a7f6..0f6537f0f80 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridMaskedColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridMaskedColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridMaskedColumn : GridMaskedColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridMaskedColumn dnnGridColumn = new DnnGridMaskedColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridMaskedColumn : GridMaskedColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridMaskedColumn dnnGridColumn = new DnnGridMaskedColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridNumericColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridNumericColumn.cs index 1bcb89075e4..d856210057f 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridNumericColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridNumericColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridNumericColumn : GridNumericColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridNumericColumn dnnGridColumn = new DnnGridNumericColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridNumericColumn : GridNumericColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridNumericColumn dnnGridColumn = new DnnGridNumericColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridRatingColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridRatingColumn.cs index df154e8d529..7539fa58362 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridRatingColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridRatingColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridRatingColumn : GridRatingColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridRatingColumn dnnGridColumn = new DnnGridRatingColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridRatingColumn : GridRatingColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridRatingColumn dnnGridColumn = new DnnGridRatingColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridRowIndicatorColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridRowIndicatorColumn.cs index f9b0b1ed25c..5ba536bad89 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridRowIndicatorColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridRowIndicatorColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridRowIndicatorColumn : GridRowIndicatorColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridRowIndicatorColumn dnnGridColumn = new DnnGridRowIndicatorColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridRowIndicatorColumn : GridRowIndicatorColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridRowIndicatorColumn dnnGridColumn = new DnnGridRowIndicatorColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridTableView.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridTableView.cs index dd6a8a1bece..70c8204caa0 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridTableView.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridTableView.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnGridTableView : GridTableView - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridTableView : GridTableView + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridTemplateColumn.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridTemplateColumn.cs index 5d8fbbf33d1..e3abc556a60 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridTemplateColumn.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnGridTemplateColumn.cs @@ -1,41 +1,42 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI.WebControls; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnGridTemplateColumn : GridTemplateColumn - { - public string LocalResourceFile - { - get - { - return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); - } - } - - public override GridColumn Clone() - { - DnnGridTemplateColumn dnnGridColumn = new DnnGridTemplateColumn(); - - // you should override CopyBaseProperties if you have some column specific properties - dnnGridColumn.CopyBaseProperties(this); - - return dnnGridColumn; - } - - public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) - { - base.InitializeCell(cell, columnIndex, inItem); - if (inItem is GridHeaderItem && this.HeaderTemplate == null && !string.IsNullOrEmpty(this.HeaderText)) - { - cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnGridTemplateColumn : GridTemplateColumn + { + public string LocalResourceFile + { + get + { + return Utilities.GetLocalResourceFile(this.Owner.OwnerGrid.Parent); + } + } + + public override GridColumn Clone() + { + DnnGridTemplateColumn dnnGridColumn = new DnnGridTemplateColumn(); + + // you should override CopyBaseProperties if you have some column specific properties + dnnGridColumn.CopyBaseProperties(this); + + return dnnGridColumn; + } + + public override void InitializeCell(TableCell cell, int columnIndex, GridItem inItem) + { + base.InitializeCell(cell, columnIndex, inItem); + if (inItem is GridHeaderItem && this.HeaderTemplate == null && !string.IsNullOrEmpty(this.HeaderText)) + { + cell.Text = Localization.GetString(string.Format("{0}.Header", this.HeaderText), this.LocalResourceFile); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnInputManager.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnInputManager.cs index d46f2889cd4..091a678abfe 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnInputManager.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnInputManager.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnInputManager : RadInputManager - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnInputManager : RadInputManager + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnLanguageComboBox.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnLanguageComboBox.cs index 520fc001e74..e4ed736069e 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnLanguageComboBox.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnLanguageComboBox.cs @@ -1,281 +1,282 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Collections.Generic; - using System.Globalization; - using System.Linq; - using System.Web.UI; - using System.Web.UI.WebControls; - - using DotNetNuke.Common.Utilities; - using DotNetNuke.Services.Localization; - using DotNetNuke.Services.Personalization; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Collections.Generic; + using System.Globalization; + using System.Linq; + using System.Web.UI; + using System.Web.UI.WebControls; + + using DotNetNuke.Common.Utilities; + using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Personalization; using Telerik.Web.UI; - public class DnnLanguageComboBox : WebControl - { - private readonly string _viewTypePersonalizationKey; - private DnnComboBox _englishCombo; - private LanguagesListType _languagesListType = LanguagesListType.Enabled; - private RadioButtonList _modeRadioButtonList; - private DnnComboBox _nativeCombo; - - private string _originalValue; - - public DnnLanguageComboBox() - { - this.AutoPostBack = Null.NullBoolean; - this.CausesValidation = Null.NullBoolean; - this.ShowFlag = true; - this.ShowModeButtons = true; - this.HideLanguagesList = new Dictionary(); - this.FlagImageUrlFormatString = "~/images/Flags/{0}.gif"; - this._viewTypePersonalizationKey = "ViewType" + this.PortalId; - } - - public event EventHandler ItemChanged; - - public event EventHandler ModeChanged; - - public string SelectedValue - { - get - { - string selectedValue = this.DisplayMode.Equals("NATIVE", StringComparison.InvariantCultureIgnoreCase) ? this._nativeCombo.SelectedValue : this._englishCombo.SelectedValue; - if (selectedValue == "None") - { - selectedValue = Null.NullString; - } - - return selectedValue; - } - } - - public string FlagImageUrlFormatString { get; set; } - - public Dictionary HideLanguagesList { get; set; } - - public bool IncludeNoneSpecified { get; set; } - - public LanguagesListType LanguagesListType - { - get - { - return this._languagesListType; - } - - set - { - this._languagesListType = value; - } - } - - public int PortalId { get; set; } - - public bool ShowFlag { get; set; } - - public bool ShowModeButtons { get; set; } - - /// ----------------------------------------------------------------------------- - /// - /// Gets or sets a value indicating whether determines whether the List Auto Posts Back. - /// - /// ----------------------------------------------------------------------------- - public bool AutoPostBack { get; set; } - - public bool CausesValidation { get; set; } - - protected override HtmlTextWriterTag TagKey - { - get - { - return HtmlTextWriterTag.Div; - } - } - - private string DisplayMode - { - get - { - string displayMode = Convert.ToString(Personalization.GetProfile("LanguageDisplayMode", this._viewTypePersonalizationKey)); - if (string.IsNullOrEmpty(displayMode)) - { - displayMode = "NATIVE"; - } - - return displayMode; - } - } - - public void BindData(bool refresh) - { - if (refresh) - { - List cultures; - switch (this.LanguagesListType) - { - case LanguagesListType.Supported: - cultures = LocaleController.Instance.GetCultures(LocaleController.Instance.GetLocales(Null.NullInteger)); - break; - case LanguagesListType.Enabled: - cultures = LocaleController.Instance.GetCultures(LocaleController.Instance.GetLocales(this.PortalId)); - break; - default: - cultures = new List(CultureInfo.GetCultures(CultureTypes.SpecificCultures)); - break; - } - - foreach (KeyValuePair lang in this.HideLanguagesList) - { - string cultureCode = lang.Value.Code; - CultureInfo culture = cultures.Where(c => c.Name == cultureCode).SingleOrDefault(); - if (culture != null) - { - cultures.Remove(culture); - } - } - - this._nativeCombo.DataSource = cultures.OrderBy(c => c.NativeName); - this._englishCombo.DataSource = cultures.OrderBy(c => c.EnglishName); - } - - this._nativeCombo.DataBind(); - this._englishCombo.DataBind(); - - if (this.IncludeNoneSpecified && refresh) - { - this._englishCombo.Items.Insert(0, new RadComboBoxItem(Localization.GetString("System_Default", Localization.SharedResourceFile), "None")); - this._nativeCombo.Items.Insert(0, new RadComboBoxItem(Localization.GetString("System_Default", Localization.SharedResourceFile), "None")); - } - } - - public void SetLanguage(string code) - { - if (string.IsNullOrEmpty(code)) - { - this._nativeCombo.SelectedIndex = this._nativeCombo.FindItemIndexByValue("None"); - this._englishCombo.SelectedIndex = this._englishCombo.FindItemIndexByValue("None"); - } - else - { - this._nativeCombo.SelectedIndex = this._nativeCombo.FindItemIndexByValue(code); - this._englishCombo.SelectedIndex = this._englishCombo.FindItemIndexByValue(code); - } - } - - public override void DataBind() - { - this.BindData(!this.Page.IsPostBack); - } - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - this._nativeCombo = new DnnComboBox(); - this._nativeCombo.DataValueField = "Name"; - this._nativeCombo.DataTextField = "NativeName"; - this._nativeCombo.SelectedIndexChanged += this.ItemChangedInternal; - this.Controls.Add(this._nativeCombo); - - this._englishCombo = new DnnComboBox(); - this._englishCombo.DataValueField = "Name"; - this._englishCombo.DataTextField = "EnglishName"; - this._englishCombo.SelectedIndexChanged += this.ItemChangedInternal; - this.Controls.Add(this._englishCombo); - - this._modeRadioButtonList = new RadioButtonList(); - this._modeRadioButtonList.AutoPostBack = true; - this._modeRadioButtonList.RepeatDirection = RepeatDirection.Horizontal; - this._modeRadioButtonList.Items.Add(new ListItem(Localization.GetString("NativeName", Localization.GlobalResourceFile), "NATIVE")); - this._modeRadioButtonList.Items.Add(new ListItem(Localization.GetString("EnglishName", Localization.GlobalResourceFile), "ENGLISH")); - this._modeRadioButtonList.SelectedIndexChanged += this.ModeChangedInternal; - this.Controls.Add(this._modeRadioButtonList); - } - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - - this._originalValue = this.SelectedValue; - } - - protected virtual void OnItemChanged() - { - if (this.ItemChanged != null) - { - this.ItemChanged(this, new EventArgs()); - } - } - - protected void OnModeChanged(EventArgs e) - { - if (this.ModeChanged != null) - { - this.ModeChanged(this, e); - } - } - - protected override void OnPreRender(EventArgs e) - { - if (this.DisplayMode.Equals("ENGLISH", StringComparison.InvariantCultureIgnoreCase)) - { - if (this._englishCombo.Items.FindItemByValue(this._originalValue) != null) - { - this._englishCombo.Items.FindItemByValue(this._originalValue).Selected = true; - } - } - else - { - if (this._nativeCombo.Items.FindItemByValue(this._originalValue) != null) - { - this._nativeCombo.Items.FindItemByValue(this._originalValue).Selected = true; - } - } - - this._modeRadioButtonList.Items.FindByValue(this.DisplayMode).Selected = true; - - foreach (RadComboBoxItem item in this._englishCombo.Items) - { - item.ImageUrl = string.Format(this.FlagImageUrlFormatString, item.Value); - } - - foreach (RadComboBoxItem item in this._nativeCombo.Items) - { - item.ImageUrl = string.Format(this.FlagImageUrlFormatString, item.Value); - } - - this._englishCombo.AutoPostBack = this.AutoPostBack; - this._englishCombo.CausesValidation = this.CausesValidation; - this._englishCombo.Visible = this.DisplayMode.Equals("ENGLISH", StringComparison.InvariantCultureIgnoreCase); - - this._nativeCombo.AutoPostBack = this.AutoPostBack; - this._nativeCombo.CausesValidation = this.CausesValidation; - this._nativeCombo.Visible = this.DisplayMode.Equals("NATIVE", StringComparison.InvariantCultureIgnoreCase); - - this._modeRadioButtonList.Visible = this.ShowModeButtons; - - this._englishCombo.Width = this.Width; - this._nativeCombo.Width = this.Width; - - base.OnPreRender(e); - } - - private void ModeChangedInternal(object sender, EventArgs e) - { - Personalization.SetProfile("LanguageDisplayMode", this._viewTypePersonalizationKey, this._modeRadioButtonList.SelectedValue); - - // Resort - this.BindData(true); - - this.OnModeChanged(EventArgs.Empty); - } - - private void ItemChangedInternal(object sender, EventArgs e) - { - this.OnItemChanged(); - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnLanguageComboBox : WebControl + { + private readonly string _viewTypePersonalizationKey; + private DnnComboBox _englishCombo; + private LanguagesListType _languagesListType = LanguagesListType.Enabled; + private RadioButtonList _modeRadioButtonList; + private DnnComboBox _nativeCombo; + + private string _originalValue; + + public DnnLanguageComboBox() + { + this.AutoPostBack = Null.NullBoolean; + this.CausesValidation = Null.NullBoolean; + this.ShowFlag = true; + this.ShowModeButtons = true; + this.HideLanguagesList = new Dictionary(); + this.FlagImageUrlFormatString = "~/images/Flags/{0}.gif"; + this._viewTypePersonalizationKey = "ViewType" + this.PortalId; + } + + public event EventHandler ItemChanged; + + public event EventHandler ModeChanged; + + public string SelectedValue + { + get + { + string selectedValue = this.DisplayMode.Equals("NATIVE", StringComparison.InvariantCultureIgnoreCase) ? this._nativeCombo.SelectedValue : this._englishCombo.SelectedValue; + if (selectedValue == "None") + { + selectedValue = Null.NullString; + } + + return selectedValue; + } + } + + public string FlagImageUrlFormatString { get; set; } + + public Dictionary HideLanguagesList { get; set; } + + public bool IncludeNoneSpecified { get; set; } + + public LanguagesListType LanguagesListType + { + get + { + return this._languagesListType; + } + + set + { + this._languagesListType = value; + } + } + + public int PortalId { get; set; } + + public bool ShowFlag { get; set; } + + public bool ShowModeButtons { get; set; } + + /// ----------------------------------------------------------------------------- + /// + /// Gets or sets a value indicating whether determines whether the List Auto Posts Back. + /// + /// ----------------------------------------------------------------------------- + public bool AutoPostBack { get; set; } + + public bool CausesValidation { get; set; } + + protected override HtmlTextWriterTag TagKey + { + get + { + return HtmlTextWriterTag.Div; + } + } + + private string DisplayMode + { + get + { + string displayMode = Convert.ToString(Personalization.GetProfile("LanguageDisplayMode", this._viewTypePersonalizationKey)); + if (string.IsNullOrEmpty(displayMode)) + { + displayMode = "NATIVE"; + } + + return displayMode; + } + } + + public void BindData(bool refresh) + { + if (refresh) + { + List cultures; + switch (this.LanguagesListType) + { + case LanguagesListType.Supported: + cultures = LocaleController.Instance.GetCultures(LocaleController.Instance.GetLocales(Null.NullInteger)); + break; + case LanguagesListType.Enabled: + cultures = LocaleController.Instance.GetCultures(LocaleController.Instance.GetLocales(this.PortalId)); + break; + default: + cultures = new List(CultureInfo.GetCultures(CultureTypes.SpecificCultures)); + break; + } + + foreach (KeyValuePair lang in this.HideLanguagesList) + { + string cultureCode = lang.Value.Code; + CultureInfo culture = cultures.Where(c => c.Name == cultureCode).SingleOrDefault(); + if (culture != null) + { + cultures.Remove(culture); + } + } + + this._nativeCombo.DataSource = cultures.OrderBy(c => c.NativeName); + this._englishCombo.DataSource = cultures.OrderBy(c => c.EnglishName); + } + + this._nativeCombo.DataBind(); + this._englishCombo.DataBind(); + + if (this.IncludeNoneSpecified && refresh) + { + this._englishCombo.Items.Insert(0, new RadComboBoxItem(Localization.GetString("System_Default", Localization.SharedResourceFile), "None")); + this._nativeCombo.Items.Insert(0, new RadComboBoxItem(Localization.GetString("System_Default", Localization.SharedResourceFile), "None")); + } + } + + public void SetLanguage(string code) + { + if (string.IsNullOrEmpty(code)) + { + this._nativeCombo.SelectedIndex = this._nativeCombo.FindItemIndexByValue("None"); + this._englishCombo.SelectedIndex = this._englishCombo.FindItemIndexByValue("None"); + } + else + { + this._nativeCombo.SelectedIndex = this._nativeCombo.FindItemIndexByValue(code); + this._englishCombo.SelectedIndex = this._englishCombo.FindItemIndexByValue(code); + } + } + + public override void DataBind() + { + this.BindData(!this.Page.IsPostBack); + } + + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + this._nativeCombo = new DnnComboBox(); + this._nativeCombo.DataValueField = "Name"; + this._nativeCombo.DataTextField = "NativeName"; + this._nativeCombo.SelectedIndexChanged += this.ItemChangedInternal; + this.Controls.Add(this._nativeCombo); + + this._englishCombo = new DnnComboBox(); + this._englishCombo.DataValueField = "Name"; + this._englishCombo.DataTextField = "EnglishName"; + this._englishCombo.SelectedIndexChanged += this.ItemChangedInternal; + this.Controls.Add(this._englishCombo); + + this._modeRadioButtonList = new RadioButtonList(); + this._modeRadioButtonList.AutoPostBack = true; + this._modeRadioButtonList.RepeatDirection = RepeatDirection.Horizontal; + this._modeRadioButtonList.Items.Add(new ListItem(Localization.GetString("NativeName", Localization.GlobalResourceFile), "NATIVE")); + this._modeRadioButtonList.Items.Add(new ListItem(Localization.GetString("EnglishName", Localization.GlobalResourceFile), "ENGLISH")); + this._modeRadioButtonList.SelectedIndexChanged += this.ModeChangedInternal; + this.Controls.Add(this._modeRadioButtonList); + } + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + + this._originalValue = this.SelectedValue; + } + + protected virtual void OnItemChanged() + { + if (this.ItemChanged != null) + { + this.ItemChanged(this, new EventArgs()); + } + } + + protected void OnModeChanged(EventArgs e) + { + if (this.ModeChanged != null) + { + this.ModeChanged(this, e); + } + } + + protected override void OnPreRender(EventArgs e) + { + if (this.DisplayMode.Equals("ENGLISH", StringComparison.InvariantCultureIgnoreCase)) + { + if (this._englishCombo.Items.FindItemByValue(this._originalValue) != null) + { + this._englishCombo.Items.FindItemByValue(this._originalValue).Selected = true; + } + } + else + { + if (this._nativeCombo.Items.FindItemByValue(this._originalValue) != null) + { + this._nativeCombo.Items.FindItemByValue(this._originalValue).Selected = true; + } + } + + this._modeRadioButtonList.Items.FindByValue(this.DisplayMode).Selected = true; + + foreach (RadComboBoxItem item in this._englishCombo.Items) + { + item.ImageUrl = string.Format(this.FlagImageUrlFormatString, item.Value); + } + + foreach (RadComboBoxItem item in this._nativeCombo.Items) + { + item.ImageUrl = string.Format(this.FlagImageUrlFormatString, item.Value); + } + + this._englishCombo.AutoPostBack = this.AutoPostBack; + this._englishCombo.CausesValidation = this.CausesValidation; + this._englishCombo.Visible = this.DisplayMode.Equals("ENGLISH", StringComparison.InvariantCultureIgnoreCase); + + this._nativeCombo.AutoPostBack = this.AutoPostBack; + this._nativeCombo.CausesValidation = this.CausesValidation; + this._nativeCombo.Visible = this.DisplayMode.Equals("NATIVE", StringComparison.InvariantCultureIgnoreCase); + + this._modeRadioButtonList.Visible = this.ShowModeButtons; + + this._englishCombo.Width = this.Width; + this._nativeCombo.Width = this.Width; + + base.OnPreRender(e); + } + + private void ModeChangedInternal(object sender, EventArgs e) + { + Personalization.SetProfile("LanguageDisplayMode", this._viewTypePersonalizationKey, this._modeRadioButtonList.SelectedValue); + + // Resort + this.BindData(true); + + this.OnModeChanged(EventArgs.Empty); + } + + private void ItemChangedInternal(object sender, EventArgs e) + { + this.OnItemChanged(); + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListBox.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListBox.cs index eedbcb289ba..07ff5cbdf4b 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListBox.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListBox.cs @@ -1,17 +1,18 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; using Telerik.Web.UI; - public class DnnListBox : RadListBox - { - // public DnnListBox() - // { - // Utilities.ApplySkin(this); - // } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnListBox : RadListBox + { + // public DnnListBox() + // { + // Utilities.ApplySkin(this); + // } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListBoxItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListBoxItem.cs index 050e02e916a..b6a7e1ebcb6 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListBoxItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListBoxItem.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnListBoxItem : RadListBoxItem - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnListBoxItem : RadListBoxItem + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListView.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListView.cs index 174aabf9a91..c5b0cf6c577 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListView.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListView.cs @@ -1,10 +1,13 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnListView : RadListView - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnListView : RadListView + {} +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListViewItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListViewItem.cs index 01808baba44..d2c43488f62 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListViewItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListViewItem.cs @@ -1,15 +1,18 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnListViewItem : RadListViewItem - { - public DnnListViewItem(RadListViewItemType itemType, RadListView ownerView) - : base(itemType, ownerView) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnListViewItem : RadListViewItem + { + public DnnListViewItem(RadListViewItemType itemType, RadListView ownerView) + : base(itemType, ownerView) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListViewItemDragHandle.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListViewItemDragHandle.cs index 5056d9f6440..da1ad5d8632 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListViewItemDragHandle.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListViewItemDragHandle.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnListViewItemDragHandle : RadListViewItemDragHandle - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnListViewItemDragHandle : RadListViewItemDragHandle + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMaskedTextBox.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMaskedTextBox.cs index 23abdaa3329..db373ebb3db 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMaskedTextBox.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMaskedTextBox.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnMaskedTextBox : RadMaskedTextBox - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnMaskedTextBox : RadMaskedTextBox + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMenu.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMenu.cs index 49565bc2246..b527e8d12af 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMenu.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMenu.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnMenu : RadMenu - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnMenu : RadMenu + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMenuItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMenuItem.cs index d2f77890228..6d2ed2cbf92 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMenuItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMenuItem.cs @@ -1,24 +1,27 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnMenuItem : RadMenuItem - { - public DnnMenuItem() - { - } - - public DnnMenuItem(string text) - : base(text) - { - } - - public DnnMenuItem(string text, string navigateUrl) - : base(text, navigateUrl) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnMenuItem : RadMenuItem + { + public DnnMenuItem() + { + } + + public DnnMenuItem(string text) + : base(text) + { + } + + public DnnMenuItem(string text, string navigateUrl) + : base(text, navigateUrl) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMenuItemBinding.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMenuItemBinding.cs index b502420a80d..1f24d59b4f7 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMenuItemBinding.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMenuItemBinding.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnMenuItemBinding : RadMenuItemBinding - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnMenuItemBinding : RadMenuItemBinding + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnModuleComboBox.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnModuleComboBox.cs index bd02285bf03..b83ef1eb503 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnModuleComboBox.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnModuleComboBox.cs @@ -1,206 +1,207 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Collections.Generic; - using System.Linq; - using System.Web.UI.WebControls; - - using DotNetNuke.Common; - using DotNetNuke.Common.Utilities; - using DotNetNuke.Entities.Modules; - using DotNetNuke.Entities.Modules.Definitions; - using DotNetNuke.Entities.Portals; - using DotNetNuke.Entities.Tabs; - using DotNetNuke.Security.Permissions; - using DotNetNuke.Services.Installer.Packages; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Collections.Generic; + using System.Linq; + using System.Web.UI.WebControls; + + using DotNetNuke.Common; + using DotNetNuke.Common.Utilities; + using DotNetNuke.Entities.Modules; + using DotNetNuke.Entities.Modules.Definitions; + using DotNetNuke.Entities.Portals; + using DotNetNuke.Entities.Tabs; + using DotNetNuke.Security.Permissions; + using DotNetNuke.Services.Installer.Packages; using Telerik.Web.UI; - public class DnnModuleComboBox : WebControl - { - private const string DefaultExtensionImage = "icon_extensions_32px.png"; - - private DnnComboBox _moduleCombo; - private string _originalValue; - - public event EventHandler ItemChanged; - - public int ItemCount - { - get - { - return this._moduleCombo.Items.Count; - } - } - - public string SelectedValue - { - get - { - return this._moduleCombo.SelectedValue; - } - } - - public string RadComboBoxClientId - { - get - { - return this._moduleCombo.ClientID; - } - } - - public Func, bool> Filter { get; set; } - - public override bool Enabled - { - get - { - return this._moduleCombo.Enabled; - } - - set - { - this._moduleCombo.Enabled = value; - } - } - - public void BindAllPortalDesktopModules() - { - this._moduleCombo.SelectedValue = null; - this._moduleCombo.DataSource = this.GetPortalDesktopModules(); - this._moduleCombo.DataBind(); - this.BindPortalDesktopModuleImages(); - } - - public void BindTabModulesByTabID(int tabID) - { - this._moduleCombo.SelectedValue = null; - this._moduleCombo.DataSource = GetTabModules(tabID); - this._moduleCombo.DataBind(); - this.BindTabModuleImages(tabID); - } - - public void SetModule(string code) - { - this._moduleCombo.SelectedIndex = this._moduleCombo.FindItemIndexByValue(code); - } - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - this._moduleCombo = new DnnComboBox(); - this._moduleCombo.DataValueField = "key"; - this._moduleCombo.DataTextField = "value"; - this.Controls.Add(this._moduleCombo); - } - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - this._originalValue = this.SelectedValue; - } - - protected virtual void OnItemChanged() - { - if (this.ItemChanged != null) - { - this.ItemChanged(this, new EventArgs()); - } - } - - protected override void OnPreRender(EventArgs e) - { - if (this._moduleCombo.Items.FindItemByValue(this._originalValue) != null) - { - this._moduleCombo.Items.FindItemByValue(this._originalValue).Selected = true; - } - - this._moduleCombo.Width = this.Width; - base.OnPreRender(e); - } - - private static Dictionary GetTabModules(int tabID) - { - var tabModules = ModuleController.Instance.GetTabModules(tabID); - - // Is this tab from another site? - var isRemote = TabController.Instance.GetTab(tabID, Null.NullInteger, false).PortalID != PortalSettings.Current.PortalId; - - var pageModules = tabModules.Values.Where(m => !isRemote || ModuleSuportsSharing(m)).Where(m => ModulePermissionController.CanAdminModule(m) && m.IsDeleted == false).ToList(); - - return pageModules.ToDictionary(module => module.ModuleID, module => module.ModuleTitle); - } - - private static bool ModuleSuportsSharing(ModuleInfo moduleInfo) - { - switch (moduleInfo.DesktopModule.Shareable) - { - case ModuleSharing.Supported: - case ModuleSharing.Unknown: - return moduleInfo.IsShareable; - default: - return false; - } - } - - private Dictionary GetPortalDesktopModules() - { - IOrderedEnumerable> portalModulesList; - if (this.Filter == null) - { - portalModulesList = DesktopModuleController.GetPortalDesktopModules(PortalSettings.Current.PortalId) - .Where((kvp) => kvp.Value.DesktopModule.Category == "Uncategorised" || string.IsNullOrEmpty(kvp.Value.DesktopModule.Category)) - .OrderBy(c => c.Key); - } - else - { - portalModulesList = DesktopModuleController.GetPortalDesktopModules(PortalSettings.Current.PortalId) - .Where(this.Filter) - .OrderBy(c => c.Key); - } - - return portalModulesList.ToDictionary( - portalModule => portalModule.Value.DesktopModuleID, - portalModule => portalModule.Key); - } - - private void BindPortalDesktopModuleImages() - { - var portalDesktopModules = DesktopModuleController.GetDesktopModules(PortalSettings.Current.PortalId); - var packages = PackageController.Instance.GetExtensionPackages(PortalSettings.Current.PortalId); - - foreach (RadComboBoxItem item in this._moduleCombo.Items) - { - string imageUrl = - (from pkgs in packages - join portMods in portalDesktopModules on pkgs.PackageID equals portMods.Value.PackageID - where portMods.Value.DesktopModuleID.ToString() == item.Value - select pkgs.IconFile).FirstOrDefault(); - - item.ImageUrl = string.IsNullOrEmpty(imageUrl) ? Globals.ImagePath + DefaultExtensionImage : imageUrl; - } - } - - private void BindTabModuleImages(int tabID) - { - var tabModules = ModuleController.Instance.GetTabModules(tabID); - var portalDesktopModules = DesktopModuleController.GetDesktopModules(PortalSettings.Current.PortalId); - var moduleDefnitions = ModuleDefinitionController.GetModuleDefinitions(); - var packages = PackageController.Instance.GetExtensionPackages(PortalSettings.Current.PortalId); - - foreach (RadComboBoxItem item in this._moduleCombo.Items) - { - string imageUrl = (from pkgs in packages - join portMods in portalDesktopModules on pkgs.PackageID equals portMods.Value.PackageID - join modDefs in moduleDefnitions on portMods.Value.DesktopModuleID equals modDefs.Value.DesktopModuleID - join tabMods in tabModules on modDefs.Value.DesktopModuleID equals tabMods.Value.DesktopModuleID - where tabMods.Value.ModuleID.ToString() == item.Value - select pkgs.IconFile).FirstOrDefault(); - - item.ImageUrl = string.IsNullOrEmpty(imageUrl) ? Globals.ImagePath + DefaultExtensionImage : imageUrl; - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnModuleComboBox : WebControl + { + private const string DefaultExtensionImage = "icon_extensions_32px.png"; + + private DnnComboBox _moduleCombo; + private string _originalValue; + + public event EventHandler ItemChanged; + + public int ItemCount + { + get + { + return this._moduleCombo.Items.Count; + } + } + + public string SelectedValue + { + get + { + return this._moduleCombo.SelectedValue; + } + } + + public string RadComboBoxClientId + { + get + { + return this._moduleCombo.ClientID; + } + } + + public Func, bool> Filter { get; set; } + + public override bool Enabled + { + get + { + return this._moduleCombo.Enabled; + } + + set + { + this._moduleCombo.Enabled = value; + } + } + + public void BindAllPortalDesktopModules() + { + this._moduleCombo.SelectedValue = null; + this._moduleCombo.DataSource = this.GetPortalDesktopModules(); + this._moduleCombo.DataBind(); + this.BindPortalDesktopModuleImages(); + } + + public void BindTabModulesByTabID(int tabID) + { + this._moduleCombo.SelectedValue = null; + this._moduleCombo.DataSource = GetTabModules(tabID); + this._moduleCombo.DataBind(); + this.BindTabModuleImages(tabID); + } + + public void SetModule(string code) + { + this._moduleCombo.SelectedIndex = this._moduleCombo.FindItemIndexByValue(code); + } + + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + this._moduleCombo = new DnnComboBox(); + this._moduleCombo.DataValueField = "key"; + this._moduleCombo.DataTextField = "value"; + this.Controls.Add(this._moduleCombo); + } + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + this._originalValue = this.SelectedValue; + } + + protected virtual void OnItemChanged() + { + if (this.ItemChanged != null) + { + this.ItemChanged(this, new EventArgs()); + } + } + + protected override void OnPreRender(EventArgs e) + { + if (this._moduleCombo.Items.FindItemByValue(this._originalValue) != null) + { + this._moduleCombo.Items.FindItemByValue(this._originalValue).Selected = true; + } + + this._moduleCombo.Width = this.Width; + base.OnPreRender(e); + } + + private static Dictionary GetTabModules(int tabID) + { + var tabModules = ModuleController.Instance.GetTabModules(tabID); + + // Is this tab from another site? + var isRemote = TabController.Instance.GetTab(tabID, Null.NullInteger, false).PortalID != PortalSettings.Current.PortalId; + + var pageModules = tabModules.Values.Where(m => !isRemote || ModuleSuportsSharing(m)).Where(m => ModulePermissionController.CanAdminModule(m) && m.IsDeleted == false).ToList(); + + return pageModules.ToDictionary(module => module.ModuleID, module => module.ModuleTitle); + } + + private static bool ModuleSuportsSharing(ModuleInfo moduleInfo) + { + switch (moduleInfo.DesktopModule.Shareable) + { + case ModuleSharing.Supported: + case ModuleSharing.Unknown: + return moduleInfo.IsShareable; + default: + return false; + } + } + + private Dictionary GetPortalDesktopModules() + { + IOrderedEnumerable> portalModulesList; + if (this.Filter == null) + { + portalModulesList = DesktopModuleController.GetPortalDesktopModules(PortalSettings.Current.PortalId) + .Where((kvp) => kvp.Value.DesktopModule.Category == "Uncategorised" || string.IsNullOrEmpty(kvp.Value.DesktopModule.Category)) + .OrderBy(c => c.Key); + } + else + { + portalModulesList = DesktopModuleController.GetPortalDesktopModules(PortalSettings.Current.PortalId) + .Where(this.Filter) + .OrderBy(c => c.Key); + } + + return portalModulesList.ToDictionary( + portalModule => portalModule.Value.DesktopModuleID, + portalModule => portalModule.Key); + } + + private void BindPortalDesktopModuleImages() + { + var portalDesktopModules = DesktopModuleController.GetDesktopModules(PortalSettings.Current.PortalId); + var packages = PackageController.Instance.GetExtensionPackages(PortalSettings.Current.PortalId); + + foreach (RadComboBoxItem item in this._moduleCombo.Items) + { + string imageUrl = + (from pkgs in packages + join portMods in portalDesktopModules on pkgs.PackageID equals portMods.Value.PackageID + where portMods.Value.DesktopModuleID.ToString() == item.Value + select pkgs.IconFile).FirstOrDefault(); + + item.ImageUrl = string.IsNullOrEmpty(imageUrl) ? Globals.ImagePath + DefaultExtensionImage : imageUrl; + } + } + + private void BindTabModuleImages(int tabID) + { + var tabModules = ModuleController.Instance.GetTabModules(tabID); + var portalDesktopModules = DesktopModuleController.GetDesktopModules(PortalSettings.Current.PortalId); + var moduleDefnitions = ModuleDefinitionController.GetModuleDefinitions(); + var packages = PackageController.Instance.GetExtensionPackages(PortalSettings.Current.PortalId); + + foreach (RadComboBoxItem item in this._moduleCombo.Items) + { + string imageUrl = (from pkgs in packages + join portMods in portalDesktopModules on pkgs.PackageID equals portMods.Value.PackageID + join modDefs in moduleDefnitions on portMods.Value.DesktopModuleID equals modDefs.Value.DesktopModuleID + join tabMods in tabModules on modDefs.Value.DesktopModuleID equals tabMods.Value.DesktopModuleID + where tabMods.Value.ModuleID.ToString() == item.Value + select pkgs.IconFile).FirstOrDefault(); + + item.ImageUrl = string.IsNullOrEmpty(imageUrl) ? Globals.ImagePath + DefaultExtensionImage : imageUrl; + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMonthYearPicker.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMonthYearPicker.cs index 4e308afecdf..bac8c1c8120 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMonthYearPicker.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMonthYearPicker.cs @@ -2,12 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; - using Telerik.Web.UI; + using Telerik.Web.UI; - internal class DnnMonthYearPicker : RadMonthYearPicker - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + internal class DnnMonthYearPicker : RadMonthYearPicker + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMultiPage.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMultiPage.cs index 79045731ef1..99c3d24bc5c 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMultiPage.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnMultiPage.cs @@ -1,12 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnMultiPage : RadMultiPage - { - // TODO: Hide properties that we don't want to expose - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnMultiPage : RadMultiPage + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnNumericTextBox.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnNumericTextBox.cs index 4d0391c6190..d7a1486adb2 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnNumericTextBox.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnNumericTextBox.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnNumericTextBox : RadNumericTextBox - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnNumericTextBox : RadNumericTextBox + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPageView.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPageView.cs index 3a787a9c9b6..d78b9205c80 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPageView.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPageView.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnPageView : RadPageView - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnPageView : RadPageView + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPanelBar.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPanelBar.cs index f4d29186ab6..10ddcd80d5f 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPanelBar.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPanelBar.cs @@ -1,18 +1,19 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; using Telerik.Web.UI; - public class DnnPanelBar : RadPanelBar - { - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - Utilities.ApplySkin(this); - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnPanelBar : RadPanelBar + { + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + Utilities.ApplySkin(this); + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPanelItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPanelItem.cs index 89a63a43b20..de44f1fc967 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPanelItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPanelItem.cs @@ -1,24 +1,27 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnPanelItem : RadPanelItem - { - public DnnPanelItem() - { - } - - public DnnPanelItem(string text) - : base(text) - { - } - - public DnnPanelItem(string text, string navigateUrl) - : base(text, navigateUrl) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnPanelItem : RadPanelItem + { + public DnnPanelItem() + { + } + + public DnnPanelItem(string text) + : base(text) + { + } + + public DnnPanelItem(string text, string navigateUrl) + : base(text, navigateUrl) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPanelItemBinding.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPanelItemBinding.cs index ebbf6742c16..a24904301a9 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPanelItemBinding.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnPanelItemBinding.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnPanelItemBinding : RadPanelItemBinding - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnPanelItemBinding : RadPanelItemBinding + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnProgressArea.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnProgressArea.cs index bde0f6e5c6e..b1ecdaf64a0 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnProgressArea.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnProgressArea.cs @@ -1,17 +1,18 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; using Telerik.Web.UI; - public class DnnProgressArea : RadProgressArea - { - // public DnnProgressArea() - // { - // Utilities.ApplySkin(this); - // } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnProgressArea : RadProgressArea + { + // public DnnProgressArea() + // { + // Utilities.ApplySkin(this); + // } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnProgressManager.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnProgressManager.cs index 8f664c7c1c7..11b65ecd2c8 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnProgressManager.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnProgressManager.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnProgressManager : RadProgressManager - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnProgressManager : RadProgressManager + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRadButton.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRadButton.cs index 67ea398b49c..2072996e4a5 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRadButton.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRadButton.cs @@ -1,69 +1,70 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI; - using DotNetNuke.Services.Localization; + using DotNetNuke.Services.Localization; using Telerik.Web.UI; - public class DnnRadButton : RadButton - { - private bool _Localize = true; - - public bool Localize - { - get - { - if (this.DesignMode) - { - return false; - } - - return this._Localize; - } - - set - { - this._Localize = value; - } - } - - public string LocalResourceFile { get; set; } - - public virtual void LocalizeStrings() - { - if (this.Localize) - { - if (!string.IsNullOrEmpty(this.ToolTip)) - { - this.ToolTip = Localization.GetString(this.ToolTip, this.LocalResourceFile); - } - - if (!string.IsNullOrEmpty(this.Text)) - { - this.Text = Localization.GetString(this.Text, this.LocalResourceFile); - - if (string.IsNullOrEmpty(this.ToolTip)) - { - this.ToolTip = Localization.GetString(string.Format("{0}.ToolTip", this.Text), this.LocalResourceFile); - } - } - } - } - - protected override void OnPreRender(EventArgs e) - { - base.OnPreRender(e); - this.LocalResourceFile = Utilities.GetLocalResourceFile(this); - } - - protected override void Render(HtmlTextWriter writer) - { - this.LocalizeStrings(); - base.Render(writer); - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnRadButton : RadButton + { + private bool _Localize = true; + + public bool Localize + { + get + { + if (this.DesignMode) + { + return false; + } + + return this._Localize; + } + + set + { + this._Localize = value; + } + } + + public string LocalResourceFile { get; set; } + + public virtual void LocalizeStrings() + { + if (this.Localize) + { + if (!string.IsNullOrEmpty(this.ToolTip)) + { + this.ToolTip = Localization.GetString(this.ToolTip, this.LocalResourceFile); + } + + if (!string.IsNullOrEmpty(this.Text)) + { + this.Text = Localization.GetString(this.Text, this.LocalResourceFile); + + if (string.IsNullOrEmpty(this.ToolTip)) + { + this.ToolTip = Localization.GetString(string.Format("{0}.ToolTip", this.Text), this.LocalResourceFile); + } + } + } + } + + protected override void OnPreRender(EventArgs e) + { + base.OnPreRender(e); + this.LocalResourceFile = Utilities.GetLocalResourceFile(this); + } + + protected override void Render(HtmlTextWriter writer) + { + this.LocalizeStrings(); + base.Render(writer); + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRadRibbonBar.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRadRibbonBar.cs index 786eceacb9d..5119444da06 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRadRibbonBar.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRadRibbonBar.cs @@ -2,12 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; - using Telerik.Web.UI; + using Telerik.Web.UI; - public class DnnRadRibbonBar : RadRibbonBar - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnRadRibbonBar : RadRibbonBar + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/Core Wrappers/DnnRadTab.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRadTab.cs similarity index 67% rename from DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/Core Wrappers/DnnRadTab.cs rename to DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRadTab.cs index 1a367e47ebf..c56b7388042 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/Core Wrappers/DnnRadTab.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRadTab.cs @@ -1,10 +1,15 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information namespace DotNetNuke.Web.UI.WebControls { - using Telerik.Web.UI; - + using System; + + using Telerik.Web.UI; + + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] public class DnnRadTab : RadTab - {} + { + + } } diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRating.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRating.cs index 3bcb34b88f5..178df963425 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRating.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRating.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnRating : RadRating - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnRating : RadRating + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRatingItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRatingItem.cs index 6b63156a7e7..633daa806a8 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRatingItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRatingItem.cs @@ -1,34 +1,37 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnRatingItem : RadRatingItem - { - public DnnRatingItem() - { - } - - public DnnRatingItem(string imageUrl) - : base(imageUrl) - { - } - - public DnnRatingItem(string imageUrl, string selectedImageUrl) - : base(imageUrl, selectedImageUrl) - { - } - - public DnnRatingItem(string imageUrl, string selectedImageUrl, string hoveredImageUrl) - : base(imageUrl, selectedImageUrl, hoveredImageUrl) - { - } - - public DnnRatingItem(string imageUrl, string selectedImageUrl, string hoveredImageUrl, string hoveredSelectedImageUrl) - : base(imageUrl, selectedImageUrl, hoveredImageUrl, hoveredSelectedImageUrl) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnRatingItem : RadRatingItem + { + public DnnRatingItem() + { + } + + public DnnRatingItem(string imageUrl) + : base(imageUrl) + { + } + + public DnnRatingItem(string imageUrl, string selectedImageUrl) + : base(imageUrl, selectedImageUrl) + { + } + + public DnnRatingItem(string imageUrl, string selectedImageUrl, string hoveredImageUrl) + : base(imageUrl, selectedImageUrl, hoveredImageUrl) + { + } + + public DnnRatingItem(string imageUrl, string selectedImageUrl, string hoveredImageUrl, string hoveredSelectedImageUrl) + : base(imageUrl, selectedImageUrl, hoveredImageUrl, hoveredSelectedImageUrl) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRotator.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRotator.cs index d852486d132..26256c06830 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRotator.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRotator.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnRotator : RadRotator - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnRotator : RadRotator + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRotatorItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRotatorItem.cs index 8e90b369e17..a6df57849fe 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRotatorItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnRotatorItem.cs @@ -1,19 +1,22 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnRotatorItem : RadRotatorItem - { - public DnnRotatorItem() - { - } - - public DnnRotatorItem(object dataItem) - : base(dataItem) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnRotatorItem : RadRotatorItem + { + public DnnRotatorItem() + { + } + + public DnnRotatorItem(object dataItem) + : base(dataItem) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnScheduler.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnScheduler.cs index 76dfd34390b..31a5b48bd4c 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnScheduler.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnScheduler.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnScheduler : RadScheduler - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnScheduler : RadScheduler + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSchedulerContextMenu.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSchedulerContextMenu.cs index 655843388ea..ec924bb847a 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSchedulerContextMenu.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSchedulerContextMenu.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnSchedulerContextMenu : RadSchedulerContextMenu - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSchedulerContextMenu : RadSchedulerContextMenu + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSchedulerResourceStyleMapping.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSchedulerResourceStyleMapping.cs index c8b2e0fb5aa..c6db11cc5e5 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSchedulerResourceStyleMapping.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSchedulerResourceStyleMapping.cs @@ -1,24 +1,27 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnSchedulerResourceStyleMapping : ResourceStyleMapping - { - public DnnSchedulerResourceStyleMapping() - { - } - - public DnnSchedulerResourceStyleMapping(string type, string key, string applyCssClass) - : base(type, key, applyCssClass) - { - } - - public DnnSchedulerResourceStyleMapping(string type, string key, string text, string applyCssClass) - : base(type, key, text, applyCssClass) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSchedulerResourceStyleMapping : ResourceStyleMapping + { + public DnnSchedulerResourceStyleMapping() + { + } + + public DnnSchedulerResourceStyleMapping(string type, string key, string applyCssClass) + : base(type, key, applyCssClass) + { + } + + public DnnSchedulerResourceStyleMapping(string type, string key, string text, string applyCssClass) + : base(type, key, text, applyCssClass) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSchedulerResourceType.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSchedulerResourceType.cs index 32d87c37b81..b531e740080 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSchedulerResourceType.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSchedulerResourceType.cs @@ -1,24 +1,27 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnSchedulerResourceType : ResourceType - { - public DnnSchedulerResourceType() - { - } - - public DnnSchedulerResourceType(string resourceTypeName) - : base(resourceTypeName) - { - } - - public DnnSchedulerResourceType(string resourceTypeName, bool allowMultipleResourceValues) - : base(resourceTypeName, allowMultipleResourceValues) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSchedulerResourceType : ResourceType + { + public DnnSchedulerResourceType() + { + } + + public DnnSchedulerResourceType(string resourceTypeName) + : base(resourceTypeName) + { + } + + public DnnSchedulerResourceType(string resourceTypeName, bool allowMultipleResourceValues) + : base(resourceTypeName, allowMultipleResourceValues) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnScriptBlock.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnScriptBlock.cs index 6ef688d3ecd..3f34f6c836c 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnScriptBlock.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnScriptBlock.cs @@ -2,12 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; - using Telerik.Web.UI; + using Telerik.Web.UI; - public class DnnScriptBlock : RadScriptBlock - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnScriptBlock : RadScriptBlock + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnScriptManager.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnScriptManager.cs index 8c66b6d5e02..b59baab72a0 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnScriptManager.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnScriptManager.cs @@ -2,12 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; - using Telerik.Web.UI; + using Telerik.Web.UI; - internal class DnnScriptManager : RadScriptManager - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + internal class DnnScriptManager : RadScriptManager + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMap.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMap.cs index cba7a519547..179f6e797b0 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMap.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMap.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnSiteMap : RadSiteMap - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSiteMap : RadSiteMap + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMapLevelSetting.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMapLevelSetting.cs index c89dc2520cf..9fc08552217 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMapLevelSetting.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMapLevelSetting.cs @@ -1,29 +1,32 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnSiteMapLevelSetting : SiteMapLevelSetting - { - public DnnSiteMapLevelSetting() - { - } - - public DnnSiteMapLevelSetting(int level) - : base(level) - { - } - - public DnnSiteMapLevelSetting(int level, SiteMapLayout layout) - : base(level, layout) - { - } - - public DnnSiteMapLevelSetting(SiteMapLayout layout) - : base(layout) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSiteMapLevelSetting : SiteMapLevelSetting + { + public DnnSiteMapLevelSetting() + { + } + + public DnnSiteMapLevelSetting(int level) + : base(level) + { + } + + public DnnSiteMapLevelSetting(int level, SiteMapLayout layout) + : base(level, layout) + { + } + + public DnnSiteMapLevelSetting(SiteMapLayout layout) + : base(layout) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMapNode.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMapNode.cs index 1ee6cf6e75d..16f740c5bd5 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMapNode.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMapNode.cs @@ -1,19 +1,22 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnSiteMapNode : RadSiteMapNode - { - public DnnSiteMapNode() - { - } - - public DnnSiteMapNode(string text, string navigateUrl) - : base(text, navigateUrl) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSiteMapNode : RadSiteMapNode + { + public DnnSiteMapNode() + { + } + + public DnnSiteMapNode(string text, string navigateUrl) + : base(text, navigateUrl) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMapNodeBinding.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMapNodeBinding.cs index 9209e0d7ead..4c258ac2bca 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMapNodeBinding.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSiteMapNodeBinding.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnSiteMapNodeBinding : RadSiteMapNodeBinding - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSiteMapNodeBinding : RadSiteMapNodeBinding + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSkinComboBox.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSkinComboBox.cs index 32eb6103a1b..bc4dcc7c028 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSkinComboBox.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSkinComboBox.cs @@ -2,117 +2,118 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Collections; - using System.Collections.Generic; - using System.ComponentModel; - using System.Linq; - using System.Text; - using System.Web.UI; - - using DotNetNuke.Common; - using DotNetNuke.Common.Utilities; - using DotNetNuke.Entities.Portals; - using DotNetNuke.Entities.Users; - using DotNetNuke.UI.Skins; - using Telerik.Web.UI; - - [ToolboxData("<{0}:DnnSkinComboBox runat='server'>")] - public class DnnSkinComboBox : DnnComboBox - { - public DnnSkinComboBox() - { - this.PortalId = Null.NullInteger; - } - - public int PortalId { get; set; } - - public string RootPath { get; set; } - - public SkinScope Scope { get; set; } - - public bool IncludeNoneSpecificItem { get; set; } - - public string NoneSpecificText { get; set; } - - private PortalInfo Portal - { - get { return this.PortalId == Null.NullInteger ? null : PortalController.Instance.GetPortal(this.PortalId); } - } - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - - this.DataTextField = "Key"; - this.DataValueField = "Value"; - - if (!this.Page.IsPostBack && !string.IsNullOrEmpty(this.RootPath)) - { - this.DataSource = SkinController.GetSkins(this.Portal, this.RootPath, this.Scope) - .ToDictionary(skin => skin.Key, skin => skin.Value); - this.DataBind(this.SelectedValue); - - if (this.IncludeNoneSpecificItem) - { - this.InsertItem(0, this.NoneSpecificText, string.Empty); - } - } - - this.AttachEvents(); - } - - protected override void PerformDataBinding(IEnumerable dataSource) - { - // do not select item during data binding, item will select later - var selectedValue = this.SelectedValue; - this.SelectedValue = string.Empty; - - base.PerformDataBinding(dataSource); - - this.SelectedValue = selectedValue; - } - - private void AttachEvents() - { - if (!UserController.Instance.GetCurrentUserInfo().IsSuperUser) - { - return; - } - - this.Attributes.Add("PortalPath", this.Portal != null ? this.Portal.HomeDirectory : string.Empty); - this.Attributes.Add("HostPath", Globals.HostPath); - - this.OnClientSelectedIndexChanged = "selectedIndexChangedMethod"; - var indexChangedMethod = @"function selectedIndexChangedMethod(sender, eventArgs){ - var value = eventArgs.get_item().get_value(); - value = value.replace('[L]', sender.get_attributes().getAttribute('PortalPath')); - value = value.replace('[G]', sender.get_attributes().getAttribute('HostPath')); - sender.get_inputDomElement().title = value; -}"; - this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "OnClientSelectedIndexChanged", indexChangedMethod, true); - - foreach (RadComboBoxItem item in this.Items) - { - if (string.IsNullOrEmpty(item.Value)) - { - continue; - } - - var tooltip = item.Value.Replace("[G]", Globals.HostPath); - if (this.Portal != null) - { - tooltip = tooltip.Replace("[L]", this.Portal.HomeDirectory); - } - - item.ToolTip = tooltip; - if (item.Value.Equals(this.SelectedValue)) - { - this.ToolTip = tooltip; - } - } - } - } -} +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.ComponentModel; + using System.Linq; + using System.Text; + using System.Web.UI; + + using DotNetNuke.Common; + using DotNetNuke.Common.Utilities; + using DotNetNuke.Entities.Portals; + using DotNetNuke.Entities.Users; + using DotNetNuke.UI.Skins; + using Telerik.Web.UI; + + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + [ToolboxData("<{0}:DnnSkinComboBox runat='server'>")] + public class DnnSkinComboBox : DnnComboBox + { + public DnnSkinComboBox() + { + this.PortalId = Null.NullInteger; + } + + public int PortalId { get; set; } + + public string RootPath { get; set; } + + public SkinScope Scope { get; set; } + + public bool IncludeNoneSpecificItem { get; set; } + + public string NoneSpecificText { get; set; } + + private PortalInfo Portal + { + get { return this.PortalId == Null.NullInteger ? null : PortalController.Instance.GetPortal(this.PortalId); } + } + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + + this.DataTextField = "Key"; + this.DataValueField = "Value"; + + if (!this.Page.IsPostBack && !string.IsNullOrEmpty(this.RootPath)) + { + this.DataSource = SkinController.GetSkins(this.Portal, this.RootPath, this.Scope) + .ToDictionary(skin => skin.Key, skin => skin.Value); + this.DataBind(this.SelectedValue); + + if (this.IncludeNoneSpecificItem) + { + this.InsertItem(0, this.NoneSpecificText, string.Empty); + } + } + + this.AttachEvents(); + } + + protected override void PerformDataBinding(IEnumerable dataSource) + { + // do not select item during data binding, item will select later + var selectedValue = this.SelectedValue; + this.SelectedValue = string.Empty; + + base.PerformDataBinding(dataSource); + + this.SelectedValue = selectedValue; + } + + private void AttachEvents() + { + if (!UserController.Instance.GetCurrentUserInfo().IsSuperUser) + { + return; + } + + this.Attributes.Add("PortalPath", this.Portal != null ? this.Portal.HomeDirectory : string.Empty); + this.Attributes.Add("HostPath", Globals.HostPath); + + this.OnClientSelectedIndexChanged = "selectedIndexChangedMethod"; + var indexChangedMethod = @"function selectedIndexChangedMethod(sender, eventArgs){ + var value = eventArgs.get_item().get_value(); + value = value.replace('[L]', sender.get_attributes().getAttribute('PortalPath')); + value = value.replace('[G]', sender.get_attributes().getAttribute('HostPath')); + sender.get_inputDomElement().title = value; +}"; + this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "OnClientSelectedIndexChanged", indexChangedMethod, true); + + foreach (RadComboBoxItem item in this.Items) + { + if (string.IsNullOrEmpty(item.Value)) + { + continue; + } + + var tooltip = item.Value.Replace("[G]", Globals.HostPath); + if (this.Portal != null) + { + tooltip = tooltip.Replace("[L]", this.Portal.HomeDirectory); + } + + item.ToolTip = tooltip; + if (item.Value.Equals(this.SelectedValue)) + { + this.ToolTip = tooltip; + } + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSlider.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSlider.cs index b6f6e8b50a5..d8dcb4dd0d8 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSlider.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSlider.cs @@ -1,17 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; using Telerik.Web.UI; - public class DnnSlider : RadSlider - { - // public DnnSlider() - // { - // Utilities.ApplySkin(this); - // } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSlider : RadSlider + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSliderItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSliderItem.cs index d971b9b7f6c..cf8422819d9 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSliderItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSliderItem.cs @@ -1,24 +1,27 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnSliderItem : RadSliderItem - { - public DnnSliderItem() - { - } - - public DnnSliderItem(string text) - : base(text) - { - } - - public DnnSliderItem(string text, string value) - : base(text, value) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSliderItem : RadSliderItem + { + public DnnSliderItem() + { + } + + public DnnSliderItem(string text) + : base(text) + { + } + + public DnnSliderItem(string text, string value) + : base(text, value) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSpell.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSpell.cs index bf98d73ee2a..b1dd21faf15 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSpell.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSpell.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnSpell : RadSpell - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSpell : RadSpell + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitBar.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitBar.cs index 1451f65609b..a05b73c7562 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitBar.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitBar.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnSplitBar : RadSplitBar - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSplitBar : RadSplitBar + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitPane.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitPane.cs index e338c263ed3..85b3ddff0f7 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitPane.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitPane.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnSplitPane : RadPane - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSplitPane : RadPane + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitSlidingPane.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitSlidingPane.cs index 2e5b161f045..5d260c41689 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitSlidingPane.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitSlidingPane.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnSplitSlidingPane : RadSlidingPane - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSplitSlidingPane : RadSlidingPane + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitSlidingZone.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitSlidingZone.cs index 4b7da72df31..16a96ea7408 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitSlidingZone.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitSlidingZone.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnSplitSlidingZone : RadSlidingZone - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSplitSlidingZone : RadSlidingZone + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitter.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitter.cs index 9fbd0eb311d..ce5dc524d82 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitter.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnSplitter.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnSplitter : RadSplitter - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnSplitter : RadSplitter + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTabPanel.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTabPanel.cs index 047fd8f225d..03cabdfeda5 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTabPanel.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTabPanel.cs @@ -1,113 +1,114 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI; + using System.Web.UI.WebControls; using Telerik.Web.UI; - [ParseChildrenAttribute(true)] - public class DnnTabPanel : WebControl - { - private DnnTabCollection _Tabs; - private RadMultiPage _TelerikPages; - private RadTabStrip _TelerikTabs; - - public DnnTabCollection Tabs - { - get - { - if (this._Tabs == null) - { - this._Tabs = new DnnTabCollection(this); - } - - return this._Tabs; - } - } - - private RadTabStrip TelerikTabs - { - get - { - if (this._TelerikTabs == null) - { - this._TelerikTabs = new RadTabStrip(); - } - - return this._TelerikTabs; - } - } - - private RadMultiPage TelerikPages - { - get - { - if (this._TelerikPages == null) - { - this._TelerikPages = new RadMultiPage(); - } - - return this._TelerikPages; - } - } - - protected override void OnLoad(EventArgs e) - { - this.EnsureChildControls(); - } - - protected override void CreateChildControls() - { - this.Controls.Clear(); - - this.TelerikTabs.ID = this.ID + "_Tabs"; - this.TelerikTabs.Skin = "Office2007"; - this.TelerikTabs.EnableEmbeddedSkins = true; - - this.TelerikPages.ID = this.ID + "_Pages"; - - this.TelerikTabs.MultiPageID = this.TelerikPages.ID; - - this.Controls.Add(this.TelerikTabs); - this.Controls.Add(this.TelerikPages); - } - - protected override void OnPreRender(EventArgs e) - { - if (!this.Page.IsPostBack) - { - this.TelerikTabs.SelectedIndex = 0; - this.TelerikPages.SelectedIndex = 0; - - int idIndex = 0; - - foreach (DnnTab t in this.Tabs) - { - RadTab tab = new RadTab(); - tab.TabTemplate = t.Header; - RadPageView pageView = new RadPageView(); - pageView.Controls.Add(t); - - tab.PageViewID = "PV_" + idIndex; - pageView.ID = "PV_" + idIndex; - - this.TelerikTabs.Tabs.Add(tab); - this.TelerikPages.PageViews.Add(pageView); - - idIndex = idIndex + 1; - } - } - - base.OnPreRender(e); - } - - protected override void Render(HtmlTextWriter writer) - { - base.Render(writer); - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + [ParseChildrenAttribute(true)] + public class DnnTabPanel : WebControl + { + private DnnTabCollection _Tabs; + private RadMultiPage _TelerikPages; + private RadTabStrip _TelerikTabs; + + public DnnTabCollection Tabs + { + get + { + if (this._Tabs == null) + { + this._Tabs = new DnnTabCollection(this); + } + + return this._Tabs; + } + } + + private RadTabStrip TelerikTabs + { + get + { + if (this._TelerikTabs == null) + { + this._TelerikTabs = new RadTabStrip(); + } + + return this._TelerikTabs; + } + } + + private RadMultiPage TelerikPages + { + get + { + if (this._TelerikPages == null) + { + this._TelerikPages = new RadMultiPage(); + } + + return this._TelerikPages; + } + } + + protected override void OnLoad(EventArgs e) + { + this.EnsureChildControls(); + } + + protected override void CreateChildControls() + { + this.Controls.Clear(); + + this.TelerikTabs.ID = this.ID + "_Tabs"; + this.TelerikTabs.Skin = "Office2007"; + this.TelerikTabs.EnableEmbeddedSkins = true; + + this.TelerikPages.ID = this.ID + "_Pages"; + + this.TelerikTabs.MultiPageID = this.TelerikPages.ID; + + this.Controls.Add(this.TelerikTabs); + this.Controls.Add(this.TelerikPages); + } + + protected override void OnPreRender(EventArgs e) + { + if (!this.Page.IsPostBack) + { + this.TelerikTabs.SelectedIndex = 0; + this.TelerikPages.SelectedIndex = 0; + + int idIndex = 0; + + foreach (DnnTab t in this.Tabs) + { + RadTab tab = new RadTab(); + tab.TabTemplate = t.Header; + RadPageView pageView = new RadPageView(); + pageView.Controls.Add(t); + + tab.PageViewID = "PV_" + idIndex; + pageView.ID = "PV_" + idIndex; + + this.TelerikTabs.Tabs.Add(tab); + this.TelerikPages.PageViews.Add(pageView); + + idIndex = idIndex + 1; + } + } + + base.OnPreRender(e); + } + + protected override void Render(HtmlTextWriter writer) + { + base.Render(writer); + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTabStrip.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTabStrip.cs index 26929df2991..943595d0337 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTabStrip.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTabStrip.cs @@ -1,18 +1,19 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; using Telerik.Web.UI; - public class DnnTabStrip : RadTabStrip - { - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - Utilities.ApplySkin(this); - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnTabStrip : RadTabStrip + { + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + Utilities.ApplySkin(this); + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTagCloud.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTagCloud.cs index a82b812bbdf..9980c4d8d77 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTagCloud.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTagCloud.cs @@ -1,15 +1,18 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnTagCloud : RadTagCloud - { - protected void OnItemDataBound(DnnTagCloudItem item) - { - base.OnItemDataBound(item); - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnTagCloud : RadTagCloud + { + protected void OnItemDataBound(DnnTagCloudItem item) + { + base.OnItemDataBound(item); + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTagCloudItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTagCloudItem.cs index bc4b0c7c9d8..7caa158a977 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTagCloudItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTagCloudItem.cs @@ -1,19 +1,22 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnTagCloudItem : RadTagCloudItem - { - public DnnTagCloudItem() - { - } - - public DnnTagCloudItem(string text) - : base(text) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnTagCloudItem : RadTagCloudItem + { + public DnnTagCloudItem() + { + } + + public DnnTagCloudItem(string text) + : base(text) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTextBox.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTextBox.cs index 8dcb73c8dd3..34ed12b5fe6 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTextBox.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTextBox.cs @@ -1,17 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; using Telerik.Web.UI; - public class DnnTextBox : RadTextBox - { - // public DnnTextBox() - // { - // Utilities.ApplySkin(this); - // } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnTextBox : RadTextBox + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTicker.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTicker.cs index 75e4096cd4b..101ef6e2506 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTicker.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTicker.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnTicker : RadTicker - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnTicker : RadTicker + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTickerItem.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTickerItem.cs index 46d3b343346..f9040fb720a 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTickerItem.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTickerItem.cs @@ -1,24 +1,27 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnTickerItem : RadTickerItem - { - public DnnTickerItem() - { - } - - public DnnTickerItem(string text) - : base(text) - { - } - - public DnnTickerItem(string text, string navigateUrl) - : base(text, navigateUrl) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnTickerItem : RadTickerItem + { + public DnnTickerItem() + { + } + + public DnnTickerItem(string text) + : base(text) + { + } + + public DnnTickerItem(string text, string navigateUrl) + : base(text, navigateUrl) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTimePicker.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTimePicker.cs index dc45cc088b0..3a7d3dfe69a 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTimePicker.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTimePicker.cs @@ -1,19 +1,20 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; using Telerik.Web.UI; - public class DnnTimePicker : RadTimePicker - { - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - this.EnableEmbeddedBaseStylesheet = true; - Utilities.ApplySkin(this, string.Empty, "DatePicker"); - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnTimePicker : RadTimePicker + { + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + this.EnableEmbeddedBaseStylesheet = true; + Utilities.ApplySkin(this, string.Empty, "DatePicker"); + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTimeView.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTimeView.cs index 6088ddd8d79..e96c112f3f6 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTimeView.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTimeView.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnTimeView : RadTimeView - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnTimeView : RadTimeView + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBar.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBar.cs index 639c9b4af95..89a1e68cba7 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBar.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBar.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnToolBar : RadToolBar - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnToolBar : RadToolBar + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBarButton.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBarButton.cs index 543307bedbf..85d41628510 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBarButton.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBarButton.cs @@ -1,24 +1,27 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnToolBarButton : RadToolBarButton - { - public DnnToolBarButton() - { - } - - public DnnToolBarButton(string text) - : base(text) - { - } - - public DnnToolBarButton(string text, bool isChecked, string @group) - : base(text, isChecked, @group) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnToolBarButton : RadToolBarButton + { + public DnnToolBarButton() + { + } + + public DnnToolBarButton(string text) + : base(text) + { + } + + public DnnToolBarButton(string text, bool isChecked, string @group) + : base(text, isChecked, @group) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBarDropDown.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBarDropDown.cs index 5bc6bd7bffb..7602e0b2b48 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBarDropDown.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBarDropDown.cs @@ -1,19 +1,23 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ + +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnToolBarDropDown : RadToolBarDropDown - { - public DnnToolBarDropDown() - { - } - - public DnnToolBarDropDown(string text) - : base(text) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnToolBarDropDown : RadToolBarDropDown + { + public DnnToolBarDropDown() + { + } + + public DnnToolBarDropDown(string text) + : base(text) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBarSplitButton.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBarSplitButton.cs index 5297f958494..fd1e4270614 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBarSplitButton.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolBarSplitButton.cs @@ -1,19 +1,22 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnToolBarSplitButton : RadToolBarSplitButton - { - public DnnToolBarSplitButton() - { - } - - public DnnToolBarSplitButton(string text) - : base(text) - { - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnToolBarSplitButton : RadToolBarSplitButton + { + public DnnToolBarSplitButton() + { + } + + public DnnToolBarSplitButton(string text) + : base(text) + { + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolTip.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolTip.cs index c73f2352935..8e1176b2533 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolTip.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolTip.cs @@ -1,14 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Web.UI; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Web.UI; - using DotNetNuke.Web.UI; + using DotNetNuke.Web.UI; using Telerik.Web.UI; + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] public class DnnToolTip : RadToolTip, ILocalizable { private bool _localize = true; @@ -61,5 +62,5 @@ protected override void Render(HtmlTextWriter writer) this.LocalizeStrings(); base.Render(writer); } - } -} + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolTipManager.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolTipManager.cs index c7e5bec5745..bc0622179cb 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolTipManager.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnToolTipManager.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnToolTipManager : RadToolTipManager - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnToolTipManager : RadToolTipManager + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeList.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeList.cs index 132e3ae5b00..49e6d6fdd61 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeList.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeList.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnTreeList : RadTreeList - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnTreeList : RadTreeList + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeNode.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeNode.cs index 106989776dc..0c0652dc493 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeNode.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeNode.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnTreeNode : RadTreeNode - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnTreeNode : RadTreeNode + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeView.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeView.cs index 676d0ec4e4f..82e2bcb8381 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeView.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeView.cs @@ -1,17 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; using Telerik.Web.UI; - public class DnnTreeView : RadTreeView - { - // public DnnTreeView() - // { - // Utilities.ApplySkin(this); - // } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnTreeView : RadTreeView + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeViewContextMenu.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeViewContextMenu.cs index c06604cdb90..18d2a35d078 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeViewContextMenu.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnTreeViewContextMenu.cs @@ -1,17 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; using Telerik.Web.UI; - public class DnnTreeViewContextMenu : RadTreeViewContextMenu - { - // public DnnTreeViewContextMenu() - // { - // Utilities.ApplySkin(this); - // } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnTreeViewContextMenu : RadTreeViewContextMenu + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnUpload.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnUpload.cs index 4be5ea9c44f..9c1ade96566 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnUpload.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnUpload.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnUpload : RadUpload - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnUpload : RadUpload + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnWindow.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnWindow.cs index afab5c19831..4a286639fb6 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnWindow.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnWindow.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnWindow : RadWindow - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnWindow : RadWindow + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnWindowManager.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnWindowManager.cs index 922e0edfa58..86200738448 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnWindowManager.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnWindowManager.cs @@ -1,10 +1,15 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using Telerik.Web.UI; - public class DnnWindowManager : RadWindowManager - {} -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class DnnWindowManager : RadWindowManager + { + + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/PropertyEditorControls/DateEditControl.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/PropertyEditorControls/DateEditControl.cs index 82ed0d856ba..77bc6cbb772 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/PropertyEditorControls/DateEditControl.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/PropertyEditorControls/DateEditControl.cs @@ -1,282 +1,279 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls.PropertyEditorControls -{ - using System; - using System.Collections.Specialized; - using System.Data.SqlTypes; - using System.Globalization; - using System.Web.UI; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls.PropertyEditorControls +{ + using System; + using System.Collections.Specialized; + using System.Data.SqlTypes; + using System.Globalization; + using System.Web.UI; - using DotNetNuke.Common; - using DotNetNuke.Common.Utilities; - using DotNetNuke.Instrumentation; - using DotNetNuke.Services.Localization; - using DotNetNuke.UI.WebControls; - using Telerik.Web.UI; + using DotNetNuke.Common; + using DotNetNuke.Common.Utilities; + using DotNetNuke.Instrumentation; + using DotNetNuke.UI.WebControls; - using Calendar = DotNetNuke.Common.Utilities.Calendar; - /// ----------------------------------------------------------------------------- - /// - /// The DateEditControl control provides a standard UI component for editing - /// date properties. - /// - /// - /// - /// ----------------------------------------------------------------------------- - [ToolboxData("<{0}:DateEditControl runat=server>")] - public class DateEditControl : EditControl - { - private static readonly ILog Logger = LoggerSource.Instance.GetLogger(typeof(DateEditControl)); - private DnnDatePicker _dateControl; - - public override string EditControlClientId - { - get - { - this.EnsureChildControls(); - return this.DateControl.DateInput.ClientID; - } - } - - public override string ID - { - get - { - return base.ID + "_control"; - } - - set - { - base.ID = value; - } - } - - /// ----------------------------------------------------------------------------- - /// - /// Gets dateValue returns the Date representation of the Value. - /// - /// A Date representing the Value. - /// ----------------------------------------------------------------------------- - protected DateTime DateValue - { - get - { - DateTime dteValue = Null.NullDate; - try - { - var dteString = Convert.ToString(this.Value); - DateTime.TryParse(dteString, CultureInfo.InvariantCulture, DateTimeStyles.None, out dteValue); - } - catch (Exception exc) - { - Logger.Error(exc); - } - - return dteValue; - } - } - - /// ----------------------------------------------------------------------------- - /// - /// Gets defaultDateFormat is a string that will be used to format the date in the absence of a - /// FormatAttribute. - /// - /// A String representing the default format to use to render the date. - /// A Format String. - /// ----------------------------------------------------------------------------- - protected virtual string DefaultFormat - { - get - { - return "d"; - } - } - - /// ----------------------------------------------------------------------------- - /// - /// Gets format is a string that will be used to format the date in View mode. - /// - /// A String representing the format to use to render the date. - /// A Format String. - /// ----------------------------------------------------------------------------- - protected virtual string Format - { - get - { - string _Format = this.DefaultFormat; - if (this.CustomAttributes != null) - { - foreach (Attribute attribute in this.CustomAttributes) - { - if (attribute is FormatAttribute) - { - var formatAtt = (FormatAttribute)attribute; - _Format = formatAtt.Format; - break; - } - } - } - - return _Format; - } - } - - /// ----------------------------------------------------------------------------- - /// - /// Gets oldDateValue returns the Date representation of the OldValue. - /// - /// A Date representing the OldValue. - /// ----------------------------------------------------------------------------- - protected DateTime OldDateValue - { - get - { - DateTime dteValue = Null.NullDate; - try - { - // Try and cast the value to an DateTime - var dteString = this.OldValue as string; - if (!string.IsNullOrEmpty(dteString)) - { - dteValue = DateTime.Parse(dteString, CultureInfo.InvariantCulture); - } - } - catch (Exception exc) - { - Logger.Error(exc); - } - - return dteValue; - } - } - - /// - /// Gets or sets the Value expressed as a String. - /// - protected override string StringValue - { - get - { - string _StringValue = Null.NullString; - if (this.DateValue.ToUniversalTime().Date != (DateTime)SqlDateTime.MinValue && this.DateValue != Null.NullDate) - { - _StringValue = this.DateValue.ToString(this.Format); - } - - return _StringValue; - } - - set - { - this.Value = DateTime.Parse(value); - } - } - - private DnnDatePicker DateControl - { - get - { - if (this._dateControl == null) - { - this._dateControl = new DnnDatePicker(); - } - - return this._dateControl; - } - } - - public override bool LoadPostData(string postDataKey, NameValueCollection postCollection) - { - this.EnsureChildControls(); - bool dataChanged = false; - string presentValue = this.StringValue; - string postedValue = postCollection[postDataKey + "_control"]; - if (!presentValue.Equals(postedValue)) - { - if (string.IsNullOrEmpty(postedValue)) - { - this.Value = Null.NullDate; - dataChanged = true; - } - else - { - this.Value = DateTime.Parse(postedValue).ToString(CultureInfo.InvariantCulture); - dataChanged = true; - } - } - - this.LoadDateControls(); - return dataChanged; - } - - protected override void CreateChildControls() - { - base.CreateChildControls(); - - this.DateControl.ControlStyle.CopyFrom(this.ControlStyle); - this.DateControl.ID = base.ID + "_control"; - - this.Controls.Add(this.DateControl); - } - - protected virtual void LoadDateControls() - { - if (this.DateValue != Null.NullDate) - { - this.DateControl.SelectedDate = this.DateValue.Date; - } - } - - /// - /// OnDataChanged is called by the PostBack Handler when the Data has changed. - /// - /// An EventArgs object. - protected override void OnDataChanged(EventArgs e) - { - var args = new PropertyEditorEventArgs(this.Name); - args.Value = this.DateValue; - args.OldValue = this.OldDateValue; - args.StringValue = this.DateValue.ToString(CultureInfo.InvariantCulture); - this.OnValueChanged(args); - } - - protected override void OnPreRender(EventArgs e) - { - base.OnPreRender(e); - - this.LoadDateControls(); - - if (this.Page != null && this.EditMode == PropertyEditorMode.Edit) - { - this.Page.RegisterRequiresPostBack(this); - } - } - - /// - /// RenderEditMode is called by the base control to render the control in Edit Mode. - /// - /// - protected override void RenderEditMode(HtmlTextWriter writer) - { - this.RenderChildren(writer); - } - - /// ----------------------------------------------------------------------------- - /// - /// RenderViewMode renders the View (readonly) mode of the control. - /// - /// A HtmlTextWriter. - /// ----------------------------------------------------------------------------- - protected override void RenderViewMode(HtmlTextWriter writer) - { - this.ControlStyle.AddAttributesToRender(writer); - writer.RenderBeginTag(HtmlTextWriterTag.Span); - writer.Write(this.StringValue); - writer.RenderEndTag(); - } - } -} + /// ----------------------------------------------------------------------------- + /// + /// The DateEditControl control provides a standard UI component for editing + /// date properties. + /// + /// + /// + /// ----------------------------------------------------------------------------- + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + [ToolboxData("<{0}:DateEditControl runat=server>")] + public class DateEditControl : EditControl + { + private static readonly ILog Logger = LoggerSource.Instance.GetLogger(typeof(DateEditControl)); + private DnnDatePicker _dateControl; + + public override string EditControlClientId + { + get + { + this.EnsureChildControls(); + return this.DateControl.DateInput.ClientID; + } + } + + public override string ID + { + get + { + return base.ID + "_control"; + } + + set + { + base.ID = value; + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Gets dateValue returns the Date representation of the Value. + /// + /// A Date representing the Value. + /// ----------------------------------------------------------------------------- + protected DateTime DateValue + { + get + { + DateTime dteValue = Null.NullDate; + try + { + var dteString = Convert.ToString(this.Value); + DateTime.TryParse(dteString, CultureInfo.InvariantCulture, DateTimeStyles.None, out dteValue); + } + catch (Exception exc) + { + Logger.Error(exc); + } + + return dteValue; + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Gets defaultDateFormat is a string that will be used to format the date in the absence of a + /// FormatAttribute. + /// + /// A String representing the default format to use to render the date. + /// A Format String. + /// ----------------------------------------------------------------------------- + protected virtual string DefaultFormat + { + get + { + return "d"; + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Gets format is a string that will be used to format the date in View mode. + /// + /// A String representing the format to use to render the date. + /// A Format String. + /// ----------------------------------------------------------------------------- + protected virtual string Format + { + get + { + string _Format = this.DefaultFormat; + if (this.CustomAttributes != null) + { + foreach (Attribute attribute in this.CustomAttributes) + { + if (attribute is FormatAttribute) + { + var formatAtt = (FormatAttribute)attribute; + _Format = formatAtt.Format; + break; + } + } + } + + return _Format; + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Gets oldDateValue returns the Date representation of the OldValue. + /// + /// A Date representing the OldValue. + /// ----------------------------------------------------------------------------- + protected DateTime OldDateValue + { + get + { + DateTime dteValue = Null.NullDate; + try + { + // Try and cast the value to an DateTime + var dteString = this.OldValue as string; + if (!string.IsNullOrEmpty(dteString)) + { + dteValue = DateTime.Parse(dteString, CultureInfo.InvariantCulture); + } + } + catch (Exception exc) + { + Logger.Error(exc); + } + + return dteValue; + } + } + + /// + /// Gets or sets the Value expressed as a String. + /// + protected override string StringValue + { + get + { + string _StringValue = Null.NullString; + if (this.DateValue.ToUniversalTime().Date != (DateTime)SqlDateTime.MinValue && this.DateValue != Null.NullDate) + { + _StringValue = this.DateValue.ToString(this.Format); + } + + return _StringValue; + } + + set + { + this.Value = DateTime.Parse(value); + } + } + + private DnnDatePicker DateControl + { + get + { + if (this._dateControl == null) + { + this._dateControl = new DnnDatePicker(); + } + + return this._dateControl; + } + } + + public override bool LoadPostData(string postDataKey, NameValueCollection postCollection) + { + this.EnsureChildControls(); + bool dataChanged = false; + string presentValue = this.StringValue; + string postedValue = postCollection[postDataKey + "_control"]; + if (!presentValue.Equals(postedValue)) + { + if (string.IsNullOrEmpty(postedValue)) + { + this.Value = Null.NullDate; + dataChanged = true; + } + else + { + this.Value = DateTime.Parse(postedValue).ToString(CultureInfo.InvariantCulture); + dataChanged = true; + } + } + + this.LoadDateControls(); + return dataChanged; + } + + protected override void CreateChildControls() + { + base.CreateChildControls(); + + this.DateControl.ControlStyle.CopyFrom(this.ControlStyle); + this.DateControl.ID = base.ID + "_control"; + + this.Controls.Add(this.DateControl); + } + + protected virtual void LoadDateControls() + { + if (this.DateValue != Null.NullDate) + { + this.DateControl.SelectedDate = this.DateValue.Date; + } + } + + /// + /// OnDataChanged is called by the PostBack Handler when the Data has changed. + /// + /// An EventArgs object. + protected override void OnDataChanged(EventArgs e) + { + var args = new PropertyEditorEventArgs(this.Name); + args.Value = this.DateValue; + args.OldValue = this.OldDateValue; + args.StringValue = this.DateValue.ToString(CultureInfo.InvariantCulture); + this.OnValueChanged(args); + } + + protected override void OnPreRender(EventArgs e) + { + base.OnPreRender(e); + + this.LoadDateControls(); + + if (this.Page != null && this.EditMode == PropertyEditorMode.Edit) + { + this.Page.RegisterRequiresPostBack(this); + } + } + + /// + /// RenderEditMode is called by the base control to render the control in Edit Mode. + /// + /// + protected override void RenderEditMode(HtmlTextWriter writer) + { + this.RenderChildren(writer); + } + + /// ----------------------------------------------------------------------------- + /// + /// RenderViewMode renders the View (readonly) mode of the control. + /// + /// A HtmlTextWriter. + /// ----------------------------------------------------------------------------- + protected override void RenderViewMode(HtmlTextWriter writer) + { + this.ControlStyle.AddAttributesToRender(writer); + writer.RenderBeginTag(HtmlTextWriterTag.Span); + writer.Write(this.StringValue); + writer.RenderEndTag(); + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/PropertyEditorControls/DateTimeEditControl.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/PropertyEditorControls/DateTimeEditControl.cs index f519a8d6d04..40784b0be57 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/PropertyEditorControls/DateTimeEditControl.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/PropertyEditorControls/DateTimeEditControl.cs @@ -1,282 +1,282 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls.PropertyEditorControls -{ - using System; - using System.Collections.Specialized; - using System.Data.SqlTypes; - using System.Globalization; - using System.Web.UI; - using System.Web.UI.WebControls; +namespace DotNetNuke.Web.UI.WebControls.PropertyEditorControls +{ + using System; + using System.Collections.Specialized; + using System.Data.SqlTypes; + using System.Globalization; + using System.Web.UI; + using System.Web.UI.WebControls; - using DotNetNuke.Common; - using DotNetNuke.Common.Utilities; - using DotNetNuke.Instrumentation; - using DotNetNuke.Services.Localization; - using DotNetNuke.UI.WebControls; - using Telerik.Web.UI; + using DotNetNuke.Common; + using DotNetNuke.Common.Utilities; + using DotNetNuke.Instrumentation; + using DotNetNuke.Services.Localization; + using DotNetNuke.UI.WebControls; using Calendar = DotNetNuke.Common.Utilities.Calendar; - /// ----------------------------------------------------------------------------- - /// Project: DotNetNuke - /// Namespace: DotNetNuke.UI.WebControls - /// Class: DateEditControl - /// ----------------------------------------------------------------------------- - /// - /// The DateEditControl control provides a standard UI component for editing - /// date properties. - /// - /// - /// - /// ----------------------------------------------------------------------------- - [ToolboxData("<{0}:DateTimeEditControl runat=server>")] - public class DateTimeEditControl : EditControl - { - private static readonly ILog Logger = LoggerSource.Instance.GetLogger(typeof(DateTimeEditControl)); - private DnnDateTimePicker _dateControl; - - public override string ID - { - get - { - return base.ID + "_control"; - } - - set - { - base.ID = value; - } - } - - /// ----------------------------------------------------------------------------- - /// - /// Gets dateValue returns the Date representation of the Value. - /// - /// A Date representing the Value. - /// ----------------------------------------------------------------------------- - protected DateTime DateValue - { - get - { - DateTime dteValue = Null.NullDate; - try - { - var dteString = Convert.ToString(this.Value); - DateTime.TryParse(dteString, CultureInfo.InvariantCulture, DateTimeStyles.None, out dteValue); - } - catch (Exception exc) - { - Logger.Error(exc); - } - - return dteValue; - } - } - - /// ----------------------------------------------------------------------------- - /// - /// Gets defaultDateFormat is a string that will be used to format the date in the absence of a - /// FormatAttribute. - /// - /// A String representing the default format to use to render the date. - /// A Format String. - /// ----------------------------------------------------------------------------- - protected virtual string DefaultFormat - { - get - { - return "g"; - } - } - - /// ----------------------------------------------------------------------------- - /// - /// Gets format is a string that will be used to format the date in View mode. - /// - /// A String representing the format to use to render the date. - /// A Format String. - /// ----------------------------------------------------------------------------- - protected virtual string Format - { - get - { - string _Format = this.DefaultFormat; - if (this.CustomAttributes != null) - { - foreach (Attribute attribute in this.CustomAttributes) - { - if (attribute is FormatAttribute) - { - var formatAtt = (FormatAttribute)attribute; - _Format = formatAtt.Format; - break; - } - } - } - - return _Format; - } - } - - /// ----------------------------------------------------------------------------- - /// - /// Gets oldDateValue returns the Date representation of the OldValue. - /// - /// A Date representing the OldValue. - /// ----------------------------------------------------------------------------- - protected DateTime OldDateValue - { - get - { - DateTime dteValue = Null.NullDate; - try - { - // Try and cast the value to an DateTime - var dteString = this.OldValue as string; - if (!string.IsNullOrEmpty(dteString)) - { - dteValue = DateTime.Parse(dteString, CultureInfo.InvariantCulture); - } - } - catch (Exception exc) - { - Logger.Error(exc); - } - - return dteValue; - } - } - - /// - /// Gets or sets the Value expressed as a String. - /// - protected override string StringValue - { - get - { - string _StringValue = Null.NullString; - if (this.DateValue.ToUniversalTime().Date != (DateTime)SqlDateTime.MinValue && this.DateValue != Null.NullDate) - { - _StringValue = this.DateValue.ToString(this.Format); - } - - return _StringValue; - } - - set - { - this.Value = DateTime.Parse(value); - } - } - - private DnnDateTimePicker DateControl - { - get - { - if (this._dateControl == null) - { - this._dateControl = new DnnDateTimePicker(); - } - - return this._dateControl; - } - } - - public override bool LoadPostData(string postDataKey, NameValueCollection postCollection) - { - this.EnsureChildControls(); - bool dataChanged = false; - string presentValue = this.StringValue; - string postedValue = postCollection[postDataKey + "_control"]; - if (!presentValue.Equals(postedValue)) - { - if (string.IsNullOrEmpty(postedValue)) - { - this.Value = Null.NullDate; - dataChanged = true; - } - else - { - DateTime value; - if (DateTime.TryParseExact(postedValue, "yyyy-MM-dd-HH-mm-ss", CultureInfo.InvariantCulture, - DateTimeStyles.None, out value)) - { - this.Value = value; - dataChanged = true; - } - } - } - - this.LoadDateControls(); - return dataChanged; - } - - protected override void CreateChildControls() - { - base.CreateChildControls(); - - this.DateControl.ControlStyle.CopyFrom(this.ControlStyle); - this.DateControl.ID = base.ID + "_control"; - - this.Controls.Add(this.DateControl); - } - - protected virtual void LoadDateControls() - { - if (this.DateValue != Null.NullDate) - { - this.DateControl.SelectedDate = this.DateValue; - } - } - - /// - /// OnDataChanged is called by the PostBack Handler when the Data has changed. - /// - /// An EventArgs object. - protected override void OnDataChanged(EventArgs e) - { - var args = new PropertyEditorEventArgs(this.Name); - args.Value = this.DateValue; - args.OldValue = this.OldDateValue; - args.StringValue = this.DateValue.ToString(CultureInfo.InvariantCulture); - this.OnValueChanged(args); - } - - protected override void OnPreRender(EventArgs e) - { - base.OnPreRender(e); - - this.LoadDateControls(); - - if (this.Page != null && this.EditMode == PropertyEditorMode.Edit) - { - this.Page.RegisterRequiresPostBack(this); - } - } - - /// - /// RenderEditMode is called by the base control to render the control in Edit Mode. - /// - /// - protected override void RenderEditMode(HtmlTextWriter writer) - { - this.RenderChildren(writer); - } - - /// ----------------------------------------------------------------------------- - /// - /// RenderViewMode renders the View (readonly) mode of the control. - /// - /// A HtmlTextWriter. - /// ----------------------------------------------------------------------------- - protected override void RenderViewMode(HtmlTextWriter writer) - { - this.ControlStyle.AddAttributesToRender(writer); - writer.RenderBeginTag(HtmlTextWriterTag.Span); - writer.Write(this.StringValue); - writer.RenderEndTag(); - } - } -} + /// ----------------------------------------------------------------------------- + /// Project: DotNetNuke + /// Namespace: DotNetNuke.UI.WebControls + /// Class: DateEditControl + /// ----------------------------------------------------------------------------- + /// + /// The DateEditControl control provides a standard UI component for editing + /// date properties. + /// + /// + /// + /// ----------------------------------------------------------------------------- + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + [ToolboxData("<{0}:DateTimeEditControl runat=server>")] + public class DateTimeEditControl : EditControl + { + private static readonly ILog Logger = LoggerSource.Instance.GetLogger(typeof(DateTimeEditControl)); + private DnnDateTimePicker _dateControl; + + public override string ID + { + get + { + return base.ID + "_control"; + } + + set + { + base.ID = value; + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Gets dateValue returns the Date representation of the Value. + /// + /// A Date representing the Value. + /// ----------------------------------------------------------------------------- + protected DateTime DateValue + { + get + { + DateTime dteValue = Null.NullDate; + try + { + var dteString = Convert.ToString(this.Value); + DateTime.TryParse(dteString, CultureInfo.InvariantCulture, DateTimeStyles.None, out dteValue); + } + catch (Exception exc) + { + Logger.Error(exc); + } + + return dteValue; + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Gets defaultDateFormat is a string that will be used to format the date in the absence of a + /// FormatAttribute. + /// + /// A String representing the default format to use to render the date. + /// A Format String. + /// ----------------------------------------------------------------------------- + protected virtual string DefaultFormat + { + get + { + return "g"; + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Gets format is a string that will be used to format the date in View mode. + /// + /// A String representing the format to use to render the date. + /// A Format String. + /// ----------------------------------------------------------------------------- + protected virtual string Format + { + get + { + string _Format = this.DefaultFormat; + if (this.CustomAttributes != null) + { + foreach (Attribute attribute in this.CustomAttributes) + { + if (attribute is FormatAttribute) + { + var formatAtt = (FormatAttribute)attribute; + _Format = formatAtt.Format; + break; + } + } + } + + return _Format; + } + } + + /// ----------------------------------------------------------------------------- + /// + /// Gets oldDateValue returns the Date representation of the OldValue. + /// + /// A Date representing the OldValue. + /// ----------------------------------------------------------------------------- + protected DateTime OldDateValue + { + get + { + DateTime dteValue = Null.NullDate; + try + { + // Try and cast the value to an DateTime + var dteString = this.OldValue as string; + if (!string.IsNullOrEmpty(dteString)) + { + dteValue = DateTime.Parse(dteString, CultureInfo.InvariantCulture); + } + } + catch (Exception exc) + { + Logger.Error(exc); + } + + return dteValue; + } + } + + /// + /// Gets or sets the Value expressed as a String. + /// + protected override string StringValue + { + get + { + string _StringValue = Null.NullString; + if (this.DateValue.ToUniversalTime().Date != (DateTime)SqlDateTime.MinValue && this.DateValue != Null.NullDate) + { + _StringValue = this.DateValue.ToString(this.Format); + } + + return _StringValue; + } + + set + { + this.Value = DateTime.Parse(value); + } + } + + private DnnDateTimePicker DateControl + { + get + { + if (this._dateControl == null) + { + this._dateControl = new DnnDateTimePicker(); + } + + return this._dateControl; + } + } + + public override bool LoadPostData(string postDataKey, NameValueCollection postCollection) + { + this.EnsureChildControls(); + bool dataChanged = false; + string presentValue = this.StringValue; + string postedValue = postCollection[postDataKey + "_control"]; + if (!presentValue.Equals(postedValue)) + { + if (string.IsNullOrEmpty(postedValue)) + { + this.Value = Null.NullDate; + dataChanged = true; + } + else + { + DateTime value; + if (DateTime.TryParseExact(postedValue, "yyyy-MM-dd-HH-mm-ss", CultureInfo.InvariantCulture, + DateTimeStyles.None, out value)) + { + this.Value = value; + dataChanged = true; + } + } + } + + this.LoadDateControls(); + return dataChanged; + } + + protected override void CreateChildControls() + { + base.CreateChildControls(); + + this.DateControl.ControlStyle.CopyFrom(this.ControlStyle); + this.DateControl.ID = base.ID + "_control"; + + this.Controls.Add(this.DateControl); + } + + protected virtual void LoadDateControls() + { + if (this.DateValue != Null.NullDate) + { + this.DateControl.SelectedDate = this.DateValue; + } + } + + /// + /// OnDataChanged is called by the PostBack Handler when the Data has changed. + /// + /// An EventArgs object. + protected override void OnDataChanged(EventArgs e) + { + var args = new PropertyEditorEventArgs(this.Name); + args.Value = this.DateValue; + args.OldValue = this.OldDateValue; + args.StringValue = this.DateValue.ToString(CultureInfo.InvariantCulture); + this.OnValueChanged(args); + } + + protected override void OnPreRender(EventArgs e) + { + base.OnPreRender(e); + + this.LoadDateControls(); + + if (this.Page != null && this.EditMode == PropertyEditorMode.Edit) + { + this.Page.RegisterRequiresPostBack(this); + } + } + + /// + /// RenderEditMode is called by the base control to render the control in Edit Mode. + /// + /// + protected override void RenderEditMode(HtmlTextWriter writer) + { + this.RenderChildren(writer); + } + + /// ----------------------------------------------------------------------------- + /// + /// RenderViewMode renders the View (readonly) mode of the control. + /// + /// A HtmlTextWriter. + /// ----------------------------------------------------------------------------- + protected override void RenderViewMode(HtmlTextWriter writer) + { + this.ControlStyle.AddAttributesToRender(writer); + writer.RenderBeginTag(HtmlTextWriterTag.Span); + writer.Write(this.StringValue); + writer.RenderEndTag(); + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/TermsList.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/TermsList.cs index 11fdf385f23..8cfabe8d000 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/TermsList.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/TermsList.cs @@ -1,173 +1,174 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Collections.Generic; - using System.Web.UI.WebControls; - - using DotNetNuke.Common.Utilities; - using DotNetNuke.Entities.Content.Taxonomy; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Collections.Generic; + using System.Web.UI.WebControls; + + using DotNetNuke.Common.Utilities; + using DotNetNuke.Entities.Content.Taxonomy; using Telerik.Web.UI; - public class TermsList : WebControl - { - private bool _IsHeirarchical; - private DnnListBox _ListBox; - - private DnnTreeView _TreeView; - - public event EventHandler SelectedTermChanged; - - public bool IsHeirarchical - { - get - { - return this._IsHeirarchical; - } - } - - public Term SelectedTerm - { - get - { - Term _SelectedTerm = null; - if (!string.IsNullOrEmpty(this.SelectedValue)) - { - int _TermId = int.Parse(this.SelectedValue); - foreach (Term term in this.Terms) - { - if (term.TermId == _TermId) - { - _SelectedTerm = term; - break; - } - } - } - - return _SelectedTerm; - } - } - - public string SelectedValue - { - get - { - string _SelectedValue = Null.NullString; - if (this.IsHeirarchical) - { - _SelectedValue = this._TreeView.SelectedValue; - } - else - { - _SelectedValue = this._ListBox.SelectedValue; - } - - return _SelectedValue; - } - } - - public List Terms - { - get - { - object _DataSource = null; - if (this.IsHeirarchical) - { - _DataSource = this._TreeView.DataSource; - } - else - { - _DataSource = this._ListBox.DataSource; - } - - return _DataSource as List; - } - } - - public void BindTerms(List terms, bool isHeirarchical, bool dataBind) - { - this._IsHeirarchical = isHeirarchical; - - this._ListBox.DataSource = terms; - this._TreeView.DataSource = terms; - - if (dataBind) - { - this._ListBox.DataBind(); - this._TreeView.DataBind(); - } - } - - public void ClearSelectedTerm() - { - this._ListBox.SelectedIndex = Null.NullInteger; - this._TreeView.UnselectAllNodes(); - } - - protected override void CreateChildControls() - { - this.Controls.Clear(); - - this._ListBox = new DnnListBox(); - this._ListBox.ID = string.Concat(this.ID, "_List"); - this._ListBox.DataTextField = "Name"; - this._ListBox.DataValueField = "TermId"; - this._ListBox.AutoPostBack = true; - this._ListBox.SelectedIndexChanged += this.ListBoxSelectedIndexChanged; - - this._TreeView = new DnnTreeView(); - this._TreeView.ID = string.Concat(this.ID, "_Tree"); - this._TreeView.DataTextField = "Name"; - this._TreeView.DataValueField = "TermId"; - this._TreeView.DataFieldID = "TermId"; - this._TreeView.DataFieldParentID = "ParentTermId"; - this._TreeView.NodeClick += this.TreeViewNodeClick; - - this.Controls.Add(this._ListBox); - this.Controls.Add(this._TreeView); - } - - protected override void OnInit(EventArgs e) - { - this.EnsureChildControls(); - } - - protected override void OnPreRender(EventArgs e) - { - this._ListBox.Visible = !this.IsHeirarchical; - this._TreeView.Visible = this.IsHeirarchical; - - this._ListBox.Height = this.Height; - this._ListBox.Width = this.Width; - this._TreeView.Height = this.Height; - this._TreeView.Width = this.Width; - - this._TreeView.ExpandAllNodes(); - - base.OnPreRender(e); - } - - protected virtual void OnSelectedTermChanged(TermsEventArgs e) - { - // Raise the SelectedTermChanged Event - if (this.SelectedTermChanged != null) - { - this.SelectedTermChanged(this, e); - } - } - - private void ListBoxSelectedIndexChanged(object sender, EventArgs e) - { - // Raise the SelectedTermChanged Event - this.OnSelectedTermChanged(new TermsEventArgs(this.SelectedTerm)); - } - - private void TreeViewNodeClick(object sender, RadTreeNodeEventArgs e) - { - // Raise the SelectedTermChanged Event - this.OnSelectedTermChanged(new TermsEventArgs(this.SelectedTerm)); - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class TermsList : WebControl + { + private bool _IsHeirarchical; + private DnnListBox _ListBox; + + private DnnTreeView _TreeView; + + public event EventHandler SelectedTermChanged; + + public bool IsHeirarchical + { + get + { + return this._IsHeirarchical; + } + } + + public Term SelectedTerm + { + get + { + Term _SelectedTerm = null; + if (!string.IsNullOrEmpty(this.SelectedValue)) + { + int _TermId = int.Parse(this.SelectedValue); + foreach (Term term in this.Terms) + { + if (term.TermId == _TermId) + { + _SelectedTerm = term; + break; + } + } + } + + return _SelectedTerm; + } + } + + public string SelectedValue + { + get + { + string _SelectedValue = Null.NullString; + if (this.IsHeirarchical) + { + _SelectedValue = this._TreeView.SelectedValue; + } + else + { + _SelectedValue = this._ListBox.SelectedValue; + } + + return _SelectedValue; + } + } + + public List Terms + { + get + { + object _DataSource = null; + if (this.IsHeirarchical) + { + _DataSource = this._TreeView.DataSource; + } + else + { + _DataSource = this._ListBox.DataSource; + } + + return _DataSource as List; + } + } + + public void BindTerms(List terms, bool isHeirarchical, bool dataBind) + { + this._IsHeirarchical = isHeirarchical; + + this._ListBox.DataSource = terms; + this._TreeView.DataSource = terms; + + if (dataBind) + { + this._ListBox.DataBind(); + this._TreeView.DataBind(); + } + } + + public void ClearSelectedTerm() + { + this._ListBox.SelectedIndex = Null.NullInteger; + this._TreeView.UnselectAllNodes(); + } + + protected override void CreateChildControls() + { + this.Controls.Clear(); + + this._ListBox = new DnnListBox(); + this._ListBox.ID = string.Concat(this.ID, "_List"); + this._ListBox.DataTextField = "Name"; + this._ListBox.DataValueField = "TermId"; + this._ListBox.AutoPostBack = true; + this._ListBox.SelectedIndexChanged += this.ListBoxSelectedIndexChanged; + + this._TreeView = new DnnTreeView(); + this._TreeView.ID = string.Concat(this.ID, "_Tree"); + this._TreeView.DataTextField = "Name"; + this._TreeView.DataValueField = "TermId"; + this._TreeView.DataFieldID = "TermId"; + this._TreeView.DataFieldParentID = "ParentTermId"; + this._TreeView.NodeClick += this.TreeViewNodeClick; + + this.Controls.Add(this._ListBox); + this.Controls.Add(this._TreeView); + } + + protected override void OnInit(EventArgs e) + { + this.EnsureChildControls(); + } + + protected override void OnPreRender(EventArgs e) + { + this._ListBox.Visible = !this.IsHeirarchical; + this._TreeView.Visible = this.IsHeirarchical; + + this._ListBox.Height = this.Height; + this._ListBox.Width = this.Width; + this._TreeView.Height = this.Height; + this._TreeView.Width = this.Width; + + this._TreeView.ExpandAllNodes(); + + base.OnPreRender(e); + } + + protected virtual void OnSelectedTermChanged(TermsEventArgs e) + { + // Raise the SelectedTermChanged Event + if (this.SelectedTermChanged != null) + { + this.SelectedTermChanged(this, e); + } + } + + private void ListBoxSelectedIndexChanged(object sender, EventArgs e) + { + // Raise the SelectedTermChanged Event + this.OnSelectedTermChanged(new TermsEventArgs(this.SelectedTerm)); + } + + private void TreeViewNodeClick(object sender, RadTreeNodeEventArgs e) + { + // Raise the SelectedTermChanged Event + this.OnSelectedTermChanged(new TermsEventArgs(this.SelectedTerm)); + } + } +} diff --git a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/TermsSelector.cs b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/TermsSelector.cs index 701efa3e5f2..c20658adb30 100644 --- a/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/TermsSelector.cs +++ b/DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/TermsSelector.cs @@ -1,202 +1,203 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI.WebControls -{ - using System; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Web.Script.Serialization; - using System.Web.UI; - using System.Web.UI.WebControls; - - using DotNetNuke.Common.Utilities; - using DotNetNuke.Entities.Content.Common; - using DotNetNuke.Entities.Content.Taxonomy; - using DotNetNuke.Framework; - using DotNetNuke.Framework.JavaScriptLibraries; - using DotNetNuke.UI.Utilities; - using DotNetNuke.Web.Client.ClientResourceManagement; +namespace DotNetNuke.Web.UI.WebControls +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Web.Script.Serialization; + using System.Web.UI; + using System.Web.UI.WebControls; + + using DotNetNuke.Common.Utilities; + using DotNetNuke.Entities.Content.Common; + using DotNetNuke.Entities.Content.Taxonomy; + using DotNetNuke.Framework; + using DotNetNuke.Framework.JavaScriptLibraries; + using DotNetNuke.UI.Utilities; + using DotNetNuke.Web.Client.ClientResourceManagement; using Telerik.Web.UI; - public class TermsSelector : DnnComboBox, IClientAPICallbackEventHandler - { - public TermsSelector() - { - this.IncludeSystemVocabularies = false; - this.IncludeTags = true; - this.EnableViewState = false; - } - - public int PortalId { get; set; } - - public bool IncludeSystemVocabularies { get; set; } - - public bool IncludeTags { get; set; } - - public List Terms { get; set; } - - public string RaiseClientAPICallbackEvent(string eventArgument) - { - var parameters = eventArgument.Split('-'); - this.PortalId = Convert.ToInt32(parameters[1]); - this.IncludeTags = Convert.ToBoolean(parameters[2]); - this.IncludeSystemVocabularies = Convert.ToBoolean(parameters[3]); - var terms = this.GetTerms(); - terms.Insert(0, new { clientId = parameters[0] }); - var serializer = new JavaScriptSerializer(); - return serializer.Serialize(terms); - } - - protected override void OnInit(EventArgs e) - { - this.ItemTemplate = new TreeViewTemplate(); - this.Items.Add(new RadComboBoxItem()); - base.OnInit(e); - - JavaScript.RequestRegistration(CommonJs.jQueryMigrate); - - this.OnClientDropDownOpened = "webcontrols.termsSelector.OnClientDropDownOpened"; - if (!string.IsNullOrEmpty(this.CssClass)) - { - this.CssClass = string.Format("{0} TermsSelector", this.CssClass); - } - else - { - this.CssClass = "TermsSelector"; - } - } - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - - if (this.Page.IsPostBack) - { - if (this.Terms == null) - { - this.Terms = new List(); - } - else - { - this.Terms.Clear(); - } - - if (!string.IsNullOrEmpty(this.SelectedValue)) - { - foreach (var id in this.SelectedValue.Split(',')) - { - var termId = Convert.ToInt32(id.Trim()); - var term = Util.GetTermController().GetTerm(termId); - if (term != null) - { - this.Terms.Add(term); - } - } - - // clear the append item by client side - if (this.Items.Count > 1) - { - this.Items.Remove(1); - } - } - } - - if (!this.Page.IsPostBack) - { - this.Page.ClientScript.RegisterClientScriptResource(this.GetType(), "DotNetNuke.Web.UI.WebControls.Resources.TermsSelector.js"); - - ClientResourceManager.RegisterStyleSheet( - this.Page, - this.Page.ClientScript.GetWebResourceUrl(this.GetType(), "DotNetNuke.Web.UI.WebControls.Resources.TermsSelector.css")); - - ClientAPI.RegisterClientVariable(this.Page, "TermsSelectorCallback", - ClientAPI.GetCallbackEventReference(this, "'[PARAMS]'", "webcontrols.termsSelector.itemDataLoaded", "this", - "webcontrols.termsSelector.itemDataLoadError"), true); - } - } - - protected override void OnPreRender(EventArgs e) - { - base.OnPreRender(e); - if (this.Terms != null) - { - this.Attributes.Add("SelectedTerms", string.Join(",", this.Terms.Select(t => t.TermId.ToString()).ToArray())); - } - - this.Attributes.Add("IncludeSystemVocabularies", this.IncludeSystemVocabularies.ToString().ToLowerInvariant()); - this.Attributes.Add("IncludeTags", this.IncludeTags.ToString().ToLowerInvariant()); - this.Attributes.Add("PortalId", this.PortalId.ToString()); - } - - private ArrayList GetTerms() - { - var vocabRep = Util.GetVocabularyController(); - var terms = new ArrayList(); - var vocabularies = from v in vocabRep.GetVocabularies() where v.ScopeType.ScopeType == "Application" || (v.ScopeType.ScopeType == "Portal" && v.ScopeId == this.PortalId) select v; - - foreach (Vocabulary v in vocabularies) - { - if (v.IsSystem) - { - if (this.IncludeSystemVocabularies || (this.IncludeTags && v.Name == "Tags")) - { - this.AddTerms(v, terms); - } - } - else - { - this.AddTerms(v, terms); - } - } - - return terms; - } - - private void AddTerms(Vocabulary v, ArrayList terms) - { - ITermController termRep = Util.GetTermController(); - - // Add a dummy parent term if simple vocabulary - if (v.Type == VocabularyType.Simple) - { - terms.Add(new { termId = -v.VocabularyId, name = v.Name, parentTermId = Null.NullInteger }); - } - - foreach (Term t in termRep.GetTermsByVocabulary(v.VocabularyId)) - { - if (v.Type == VocabularyType.Simple) - { - t.ParentTermId = -v.VocabularyId; - } - - terms.Add(new { termId = t.TermId, name = t.Name, parentTermId = t.ParentTermId }); - } - } - - public class TreeViewTemplate : ITemplate - { - private RadComboBoxItem _container; - private TermsSelector _termsSelector; - - private DnnTreeView _tree; - - public void InstantiateIn(Control container) - { - this._container = (RadComboBoxItem)container; - this._termsSelector = (TermsSelector)container.Parent; - - this._tree = new DnnTreeView(); - this._tree.ID = string.Format("{0}_TreeView", this._termsSelector.ID); - this._tree.CheckBoxes = true; - this._tree.EnableViewState = false; - - // bind client-side events - this._tree.OnClientNodeChecked = "webcontrols.termsSelector.OnClientNodeChecked"; - - this._container.Controls.Add(this._tree); - } - } - } -} + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. You will need to find an alternative solution")] + public class TermsSelector : DnnComboBox, IClientAPICallbackEventHandler + { + public TermsSelector() + { + this.IncludeSystemVocabularies = false; + this.IncludeTags = true; + this.EnableViewState = false; + } + + public int PortalId { get; set; } + + public bool IncludeSystemVocabularies { get; set; } + + public bool IncludeTags { get; set; } + + public List Terms { get; set; } + + public string RaiseClientAPICallbackEvent(string eventArgument) + { + var parameters = eventArgument.Split('-'); + this.PortalId = Convert.ToInt32(parameters[1]); + this.IncludeTags = Convert.ToBoolean(parameters[2]); + this.IncludeSystemVocabularies = Convert.ToBoolean(parameters[3]); + var terms = this.GetTerms(); + terms.Insert(0, new { clientId = parameters[0] }); + var serializer = new JavaScriptSerializer(); + return serializer.Serialize(terms); + } + + protected override void OnInit(EventArgs e) + { + this.ItemTemplate = new TreeViewTemplate(); + this.Items.Add(new RadComboBoxItem()); + base.OnInit(e); + + JavaScript.RequestRegistration(CommonJs.jQueryMigrate); + + this.OnClientDropDownOpened = "webcontrols.termsSelector.OnClientDropDownOpened"; + if (!string.IsNullOrEmpty(this.CssClass)) + { + this.CssClass = string.Format("{0} TermsSelector", this.CssClass); + } + else + { + this.CssClass = "TermsSelector"; + } + } + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + + if (this.Page.IsPostBack) + { + if (this.Terms == null) + { + this.Terms = new List(); + } + else + { + this.Terms.Clear(); + } + + if (!string.IsNullOrEmpty(this.SelectedValue)) + { + foreach (var id in this.SelectedValue.Split(',')) + { + var termId = Convert.ToInt32(id.Trim()); + var term = Util.GetTermController().GetTerm(termId); + if (term != null) + { + this.Terms.Add(term); + } + } + + // clear the append item by client side + if (this.Items.Count > 1) + { + this.Items.Remove(1); + } + } + } + + if (!this.Page.IsPostBack) + { + this.Page.ClientScript.RegisterClientScriptResource(this.GetType(), "DotNetNuke.Web.UI.WebControls.Resources.TermsSelector.js"); + + ClientResourceManager.RegisterStyleSheet( + this.Page, + this.Page.ClientScript.GetWebResourceUrl(this.GetType(), "DotNetNuke.Web.UI.WebControls.Resources.TermsSelector.css")); + + ClientAPI.RegisterClientVariable(this.Page, "TermsSelectorCallback", + ClientAPI.GetCallbackEventReference(this, "'[PARAMS]'", "webcontrols.termsSelector.itemDataLoaded", "this", + "webcontrols.termsSelector.itemDataLoadError"), true); + } + } + + protected override void OnPreRender(EventArgs e) + { + base.OnPreRender(e); + if (this.Terms != null) + { + this.Attributes.Add("SelectedTerms", string.Join(",", this.Terms.Select(t => t.TermId.ToString()).ToArray())); + } + + this.Attributes.Add("IncludeSystemVocabularies", this.IncludeSystemVocabularies.ToString().ToLowerInvariant()); + this.Attributes.Add("IncludeTags", this.IncludeTags.ToString().ToLowerInvariant()); + this.Attributes.Add("PortalId", this.PortalId.ToString()); + } + + private ArrayList GetTerms() + { + var vocabRep = Util.GetVocabularyController(); + var terms = new ArrayList(); + var vocabularies = from v in vocabRep.GetVocabularies() where v.ScopeType.ScopeType == "Application" || (v.ScopeType.ScopeType == "Portal" && v.ScopeId == this.PortalId) select v; + + foreach (Vocabulary v in vocabularies) + { + if (v.IsSystem) + { + if (this.IncludeSystemVocabularies || (this.IncludeTags && v.Name == "Tags")) + { + this.AddTerms(v, terms); + } + } + else + { + this.AddTerms(v, terms); + } + } + + return terms; + } + + private void AddTerms(Vocabulary v, ArrayList terms) + { + ITermController termRep = Util.GetTermController(); + + // Add a dummy parent term if simple vocabulary + if (v.Type == VocabularyType.Simple) + { + terms.Add(new { termId = -v.VocabularyId, name = v.Name, parentTermId = Null.NullInteger }); + } + + foreach (Term t in termRep.GetTermsByVocabulary(v.VocabularyId)) + { + if (v.Type == VocabularyType.Simple) + { + t.ParentTermId = -v.VocabularyId; + } + + terms.Add(new { termId = t.TermId, name = t.Name, parentTermId = t.ParentTermId }); + } + } + + public class TreeViewTemplate : ITemplate + { + private RadComboBoxItem _container; + private TermsSelector _termsSelector; + + private DnnTreeView _tree; + + public void InstantiateIn(Control container) + { + this._container = (RadComboBoxItem)container; + this._termsSelector = (TermsSelector)container.Parent; + + this._tree = new DnnTreeView(); + this._tree.ID = string.Format("{0}_TreeView", this._termsSelector.ID); + this._tree.CheckBoxes = true; + this._tree.EnableViewState = false; + + // bind client-side events + this._tree.OnClientNodeChecked = "webcontrols.termsSelector.OnClientNodeChecked"; + + this._container.Controls.Add(this._tree); + } + } + } +} diff --git a/DNN Platform/DotNetNuke.Web/UI/Utilities.cs b/DNN Platform/DotNetNuke.Web/UI/Utilities.cs index 74f936ca721..7d7d6c79f6b 100644 --- a/DNN Platform/DotNetNuke.Web/UI/Utilities.cs +++ b/DNN Platform/DotNetNuke.Web/UI/Utilities.cs @@ -1,288 +1,303 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information -namespace DotNetNuke.Web.UI -{ - using System; - using System.IO; - using System.Reflection; - using System.Web; - using System.Web.UI; - using System.Web.UI.WebControls; - - using DotNetNuke.Common.Utilities; - using DotNetNuke.Entities.Portals; - using DotNetNuke.Services.Exceptions; - using DotNetNuke.Services.Localization; - using DotNetNuke.UI; - using DotNetNuke.UI.ControlPanels; - using DotNetNuke.UI.Modules; - using DotNetNuke.Web.Client; - using DotNetNuke.Web.Client.ClientResourceManagement; +namespace DotNetNuke.Web.UI +{ + using System; + using System.IO; + using System.Reflection; + using System.Web; + using System.Web.UI; + using System.Web.UI.WebControls; + + using DotNetNuke.Common.Utilities; + using DotNetNuke.Entities.Portals; + using DotNetNuke.Services.Exceptions; + using DotNetNuke.Services.Localization; + using DotNetNuke.UI; + using DotNetNuke.UI.ControlPanels; + using DotNetNuke.UI.Modules; + using DotNetNuke.Web.Client; + using DotNetNuke.Web.Client.ClientResourceManagement; using FileInfo = DotNetNuke.Services.FileSystem.FileInfo; - public class Utilities - { - public static void ApplySkin(Control telerikControl) - { - ApplySkin(telerikControl, string.Empty, string.Empty, string.Empty); - } - - public static void ApplySkin(Control telerikControl, string fallBackEmbeddedSkinName) - { - ApplySkin(telerikControl, string.Empty, string.Empty, fallBackEmbeddedSkinName); - } - - public static void ApplySkin(Control telerikControl, string fallBackEmbeddedSkinName, string controlName) - { - ApplySkin(telerikControl, string.Empty, controlName, fallBackEmbeddedSkinName); - } - - // Use selected skin's webcontrol skin if one exists - // or use _default skin's webcontrol skin if one exists - // or use embedded skin - public static void ApplySkin(Control telerikControl, string fallBackEmbeddedSkinName, string controlName, string webControlSkinSubFolderName) - { - PropertyInfo skinProperty = null; - PropertyInfo enableEmbeddedSkinsProperty = null; - bool skinApplied = false; - - try - { - skinProperty = telerikControl.GetType().GetProperty("Skin"); - enableEmbeddedSkinsProperty = telerikControl.GetType().GetProperty("EnableEmbeddedSkins"); - - if (string.IsNullOrEmpty(controlName)) - { - controlName = telerikControl.GetType().BaseType.Name; - if (controlName.StartsWith("Rad") || controlName.StartsWith("Dnn")) - { - controlName = controlName.Substring(3); - } - } - - string skinVirtualFolder = string.Empty; - if (PortalSettings.Current != null) - { - skinVirtualFolder = PortalSettings.Current.ActiveTab.SkinPath.Replace('\\', '/').Replace("//", "/"); - } - else - { - skinVirtualFolder = telerikControl.ResolveUrl("~/Portals/_default/skins/_default/Aphelia"); // developer skin Aphelia - } - - string skinName = string.Empty; - string webControlSkinName = string.Empty; - if (skinProperty != null) - { - var v = skinProperty.GetValue(telerikControl, null); - if (v != null) - { - webControlSkinName = v.ToString(); - } - } - - if (string.IsNullOrEmpty(webControlSkinName)) - { - webControlSkinName = "default"; - } - - if (skinVirtualFolder.EndsWith("/")) - { - skinVirtualFolder = skinVirtualFolder.Substring(0, skinVirtualFolder.Length - 1); - } - - int lastIndex = skinVirtualFolder.LastIndexOf("/"); - if (lastIndex > -1 && skinVirtualFolder.Length > lastIndex) - { - skinName = skinVirtualFolder.Substring(skinVirtualFolder.LastIndexOf("/") + 1); - } - - string systemWebControlSkin = string.Empty; - if (!string.IsNullOrEmpty(skinName) && !string.IsNullOrEmpty(skinVirtualFolder)) - { - systemWebControlSkin = HttpContext.Current.Server.MapPath(skinVirtualFolder); - systemWebControlSkin = Path.Combine(systemWebControlSkin, "WebControlSkin"); - systemWebControlSkin = Path.Combine(systemWebControlSkin, skinName); - systemWebControlSkin = Path.Combine(systemWebControlSkin, webControlSkinSubFolderName); - systemWebControlSkin = Path.Combine(systemWebControlSkin, string.Format("{0}.{1}.css", controlName, webControlSkinName)); - - // Check if the selected skin has the webcontrol skin - if (!File.Exists(systemWebControlSkin)) - { - systemWebControlSkin = string.Empty; - } - - // No skin, try default folder - if (string.IsNullOrEmpty(systemWebControlSkin)) - { - skinVirtualFolder = telerikControl.ResolveUrl("~/Portals/_default/Skins/_default"); - skinName = "Default"; - - if (skinVirtualFolder.EndsWith("/")) - { - skinVirtualFolder = skinVirtualFolder.Substring(0, skinVirtualFolder.Length - 1); - } - - if (!string.IsNullOrEmpty(skinName) && !string.IsNullOrEmpty(skinVirtualFolder)) - { - systemWebControlSkin = HttpContext.Current.Server.MapPath(skinVirtualFolder); - systemWebControlSkin = Path.Combine(systemWebControlSkin, "WebControlSkin"); - systemWebControlSkin = Path.Combine(systemWebControlSkin, skinName); - systemWebControlSkin = Path.Combine(systemWebControlSkin, webControlSkinSubFolderName); - systemWebControlSkin = Path.Combine(systemWebControlSkin, string.Format("{0}.{1}.css", controlName, webControlSkinName)); - - if (!File.Exists(systemWebControlSkin)) - { - systemWebControlSkin = string.Empty; - } - } - } - } - - if (!string.IsNullOrEmpty(systemWebControlSkin)) - { - string filePath = Path.Combine(skinVirtualFolder, "WebControlSkin"); - filePath = Path.Combine(filePath, skinName); - filePath = Path.Combine(filePath, webControlSkinSubFolderName); - filePath = Path.Combine(filePath, string.Format("{0}.{1}.css", controlName, webControlSkinName)); - filePath = filePath.Replace('\\', '/').Replace("//", "/").TrimEnd('/'); - - if (HttpContext.Current != null && HttpContext.Current.Handler is Page) - { - ClientResourceManager.RegisterStyleSheet(HttpContext.Current.Handler as Page, filePath, FileOrder.Css.ResourceCss); - } - - if ((skinProperty != null) && (enableEmbeddedSkinsProperty != null)) - { - skinApplied = true; - skinProperty.SetValue(telerikControl, webControlSkinName, null); - enableEmbeddedSkinsProperty.SetValue(telerikControl, false, null); - } - } - } - catch (Exception ex) - { - Exceptions.LogException(ex); - } - - if (skinProperty != null && enableEmbeddedSkinsProperty != null && !skinApplied) - { - if (string.IsNullOrEmpty(fallBackEmbeddedSkinName)) - { - fallBackEmbeddedSkinName = "Simple"; - } - - // Set fall back skin Embedded Skin - skinProperty.SetValue(telerikControl, fallBackEmbeddedSkinName, null); - enableEmbeddedSkinsProperty.SetValue(telerikControl, true, null); - } - } - - public static void CreateThumbnail(FileInfo image, Image img, int maxWidth, int maxHeight) - { - if (image.Width > image.Height) - { - // Landscape - if (image.Width > maxWidth) - { - img.Width = maxWidth; - img.Height = Convert.ToInt32((image.Height * maxWidth) / (float)image.Width); - } - else - { - img.Width = image.Width; - img.Height = image.Height; - } - } - else - { - // Portrait - if (image.Height > maxHeight) - { - img.Width = Convert.ToInt32((image.Width * maxHeight) / (float)image.Height); - img.Height = maxHeight; - } - else - { - img.Width = image.Width; - img.Height = image.Height; - } - } - } - - public static string GetClientAlert(Control ctrl, string message) - { - return GetClientAlert(ctrl, new MessageWindowParameters(message)); - } - - public static string GetClientAlert(Control ctrl, MessageWindowParameters message) - { - return "jQuery(document).ready(function($){$.dnnAlert({ okText: '" + GetLocalizedString("Ok.Text") + "', text: '" + message.Message + "', title: '" + message.Title + "'});});"; - } - - public static string GetLocalizedString(string key) - { - string resourceFile = "/App_GlobalResources/WebControls.resx"; - return Localization.GetString(key, resourceFile); - } - - public static string GetLocalResourceFile(Control ctrl) - { - return UIUtilities.GetLocalResourceFile(ctrl); - } - - public static string GetLocalizedStringFromParent(string key, Control control) - { - string returnValue = key; - string resourceFileName = GetLocalResourceFile(control.Parent); - - if (!string.IsNullOrEmpty(resourceFileName)) - { - returnValue = Localization.GetString(key, resourceFileName); - } - - return returnValue; - } - - public static string GetOnClientClickConfirm(Control ctrl, string message) - { - return GetOnClientClickConfirm(ctrl, new MessageWindowParameters(message)); - } - - public static string GetOnClientClickConfirm(Control ctrl, MessageWindowParameters message) - { - AddMessageWindow(ctrl); - - // function(text, mozEvent, oWidth, oHeight, callerObj, oTitle) - return string.Format("return postBackConfirm('{0}', event, '{1}', '{2}', '', '{3}');", message.Message, message.WindowWidth, message.WindowHeight, message.Title); - } - - public static string GetViewStateAsString(object value, string defaultValue) - { - string _Value = defaultValue; - if (value != null) - { - _Value = Convert.ToString(value); - } - - return _Value; - } - - public static void RegisterAlertOnPageLoad(Control ctrl, string message) - { - RegisterAlertOnPageLoad(ctrl, new MessageWindowParameters(message)); - } - - public static void RegisterAlertOnPageLoad(Control ctrl, MessageWindowParameters message) - { - ctrl.Page.ClientScript.RegisterClientScriptBlock(ctrl.GetType(), ctrl.ID + "_AlertOnPageLoad", GetClientAlert(ctrl, message), true); - } - - private static void AddMessageWindow(Control ctrl) - { - ClientResourceManager.RegisterScript(ctrl.Page, ctrl.ResolveUrl("~/js/dnn.postbackconfirm.js")); - } - } -} + public class Utilities + { + /// + /// Applies a custom CSS file for a control using a consistent naming pattern. + /// + /// The control that should have a skin injected. + /// An optional sub-skin. + /// An optional control name that might differ from the type. + public static void ApplyControlSkin(Control targetControl, string controlSubSkinName = "", string controlName = "") + { + ApplySkin(targetControl, string.Empty, controlName, controlSubSkinName); + } + + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. Please use one of the ApplyControlSkin overloads if applicable to your implementation.")] + public static void ApplySkin(Control targetControl) + { + ApplySkin(targetControl, string.Empty, string.Empty, string.Empty); + } + + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. Please use one of the ApplyControlSkin overloads if applicable to your implementation.")] + public static void ApplySkin(Control targetControl, string fallBackEmbeddedSkinName) + { + ApplySkin(targetControl, string.Empty, string.Empty, fallBackEmbeddedSkinName); + } + + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. Please use one of the ApplyControlSkin overloads if applicable to your implementation.")] + public static void ApplySkin(Control targetControl, string fallBackEmbeddedSkinName, string controlName) + { + ApplySkin(targetControl, string.Empty, controlName, fallBackEmbeddedSkinName); + } + + // Use selected skin's webcontrol skin if one exists + // or use _default skin's webcontrol skin if one exists + // or use embedded skin + [Obsolete("Telerik support will be removed in DNN Platform 10.0.0. Please use one of the ApplyControlSkin overloads if applicable to your implementation.")] + public static void ApplySkin(Control targetControl, string fallBackEmbeddedSkinName, string controlName, string webControlSkinSubFolderName) + { + PropertyInfo skinProperty = null; + PropertyInfo enableEmbeddedSkinsProperty = null; + bool skinApplied = false; + + try + { + skinProperty = targetControl.GetType().GetProperty("Skin"); + enableEmbeddedSkinsProperty = targetControl.GetType().GetProperty("EnableEmbeddedSkins"); + + if (string.IsNullOrEmpty(controlName)) + { + controlName = targetControl.GetType().BaseType.Name; + if (controlName.StartsWith("Rad") || controlName.StartsWith("Dnn")) + { + controlName = controlName.Substring(3); + } + } + + string skinVirtualFolder = string.Empty; + if (PortalSettings.Current != null) + { + skinVirtualFolder = PortalSettings.Current.ActiveTab.SkinPath.Replace('\\', '/').Replace("//", "/"); + } + else + { + skinVirtualFolder = targetControl.ResolveUrl("~/Portals/_default/skins/_default/Aphelia"); // developer skin Aphelia + } + + string skinName = string.Empty; + string webControlSkinName = string.Empty; + if (skinProperty != null) + { + var v = skinProperty.GetValue(targetControl, null); + if (v != null) + { + webControlSkinName = v.ToString(); + } + } + + if (string.IsNullOrEmpty(webControlSkinName)) + { + webControlSkinName = "default"; + } + + if (skinVirtualFolder.EndsWith("/")) + { + skinVirtualFolder = skinVirtualFolder.Substring(0, skinVirtualFolder.Length - 1); + } + + int lastIndex = skinVirtualFolder.LastIndexOf("/"); + if (lastIndex > -1 && skinVirtualFolder.Length > lastIndex) + { + skinName = skinVirtualFolder.Substring(skinVirtualFolder.LastIndexOf("/") + 1); + } + + string systemWebControlSkin = string.Empty; + if (!string.IsNullOrEmpty(skinName) && !string.IsNullOrEmpty(skinVirtualFolder)) + { + systemWebControlSkin = HttpContext.Current.Server.MapPath(skinVirtualFolder); + systemWebControlSkin = Path.Combine(systemWebControlSkin, "WebControlSkin"); + systemWebControlSkin = Path.Combine(systemWebControlSkin, skinName); + systemWebControlSkin = Path.Combine(systemWebControlSkin, webControlSkinSubFolderName); + systemWebControlSkin = Path.Combine(systemWebControlSkin, string.Format("{0}.{1}.css", controlName, webControlSkinName)); + + // Check if the selected skin has the webcontrol skin + if (!File.Exists(systemWebControlSkin)) + { + systemWebControlSkin = string.Empty; + } + + // No skin, try default folder + if (string.IsNullOrEmpty(systemWebControlSkin)) + { + skinVirtualFolder = targetControl.ResolveUrl("~/Portals/_default/Skins/_default"); + skinName = "Default"; + + if (skinVirtualFolder.EndsWith("/")) + { + skinVirtualFolder = skinVirtualFolder.Substring(0, skinVirtualFolder.Length - 1); + } + + if (!string.IsNullOrEmpty(skinName) && !string.IsNullOrEmpty(skinVirtualFolder)) + { + systemWebControlSkin = HttpContext.Current.Server.MapPath(skinVirtualFolder); + systemWebControlSkin = Path.Combine(systemWebControlSkin, "WebControlSkin"); + systemWebControlSkin = Path.Combine(systemWebControlSkin, skinName); + systemWebControlSkin = Path.Combine(systemWebControlSkin, webControlSkinSubFolderName); + systemWebControlSkin = Path.Combine(systemWebControlSkin, string.Format("{0}.{1}.css", controlName, webControlSkinName)); + + if (!File.Exists(systemWebControlSkin)) + { + systemWebControlSkin = string.Empty; + } + } + } + } + + if (!string.IsNullOrEmpty(systemWebControlSkin)) + { + string filePath = Path.Combine(skinVirtualFolder, "WebControlSkin"); + filePath = Path.Combine(filePath, skinName); + filePath = Path.Combine(filePath, webControlSkinSubFolderName); + filePath = Path.Combine(filePath, string.Format("{0}.{1}.css", controlName, webControlSkinName)); + filePath = filePath.Replace('\\', '/').Replace("//", "/").TrimEnd('/'); + + if (HttpContext.Current != null && HttpContext.Current.Handler is Page) + { + ClientResourceManager.RegisterStyleSheet(HttpContext.Current.Handler as Page, filePath, FileOrder.Css.ResourceCss); + } + + if ((skinProperty != null) && (enableEmbeddedSkinsProperty != null)) + { + skinApplied = true; + skinProperty.SetValue(targetControl, webControlSkinName, null); + enableEmbeddedSkinsProperty.SetValue(targetControl, false, null); + } + } + } + catch (Exception ex) + { + Exceptions.LogException(ex); + } + + if (skinProperty != null && enableEmbeddedSkinsProperty != null && !skinApplied) + { + if (string.IsNullOrEmpty(fallBackEmbeddedSkinName)) + { + fallBackEmbeddedSkinName = "Simple"; + } + + // Set fall back skin Embedded Skin + skinProperty.SetValue(targetControl, fallBackEmbeddedSkinName, null); + enableEmbeddedSkinsProperty.SetValue(targetControl, true, null); + } + } + + public static void CreateThumbnail(FileInfo image, Image img, int maxWidth, int maxHeight) + { + if (image.Width > image.Height) + { + // Landscape + if (image.Width > maxWidth) + { + img.Width = maxWidth; + img.Height = Convert.ToInt32((image.Height * maxWidth) / (float)image.Width); + } + else + { + img.Width = image.Width; + img.Height = image.Height; + } + } + else + { + // Portrait + if (image.Height > maxHeight) + { + img.Width = Convert.ToInt32((image.Width * maxHeight) / (float)image.Height); + img.Height = maxHeight; + } + else + { + img.Width = image.Width; + img.Height = image.Height; + } + } + } + + public static string GetClientAlert(Control ctrl, string message) + { + return GetClientAlert(ctrl, new MessageWindowParameters(message)); + } + + public static string GetClientAlert(Control ctrl, MessageWindowParameters message) + { + return "jQuery(document).ready(function($){$.dnnAlert({ okText: '" + GetLocalizedString("Ok.Text") + "', text: '" + message.Message + "', title: '" + message.Title + "'});});"; + } + + public static string GetLocalizedString(string key) + { + string resourceFile = "/App_GlobalResources/WebControls.resx"; + return Localization.GetString(key, resourceFile); + } + + public static string GetLocalResourceFile(Control ctrl) + { + return UIUtilities.GetLocalResourceFile(ctrl); + } + + public static string GetLocalizedStringFromParent(string key, Control control) + { + string returnValue = key; + string resourceFileName = GetLocalResourceFile(control.Parent); + + if (!string.IsNullOrEmpty(resourceFileName)) + { + returnValue = Localization.GetString(key, resourceFileName); + } + + return returnValue; + } + + public static string GetOnClientClickConfirm(Control ctrl, string message) + { + return GetOnClientClickConfirm(ctrl, new MessageWindowParameters(message)); + } + + public static string GetOnClientClickConfirm(Control ctrl, MessageWindowParameters message) + { + AddMessageWindow(ctrl); + + // function(text, mozEvent, oWidth, oHeight, callerObj, oTitle) + return string.Format("return postBackConfirm('{0}', event, '{1}', '{2}', '', '{3}');", message.Message, message.WindowWidth, message.WindowHeight, message.Title); + } + + public static string GetViewStateAsString(object value, string defaultValue) + { + string _Value = defaultValue; + if (value != null) + { + _Value = Convert.ToString(value); + } + + return _Value; + } + + public static void RegisterAlertOnPageLoad(Control ctrl, string message) + { + RegisterAlertOnPageLoad(ctrl, new MessageWindowParameters(message)); + } + + public static void RegisterAlertOnPageLoad(Control ctrl, MessageWindowParameters message) + { + ctrl.Page.ClientScript.RegisterClientScriptBlock(ctrl.GetType(), ctrl.ID + "_AlertOnPageLoad", GetClientAlert(ctrl, message), true); + } + + private static void AddMessageWindow(Control ctrl) + { + ClientResourceManager.RegisterScript(ctrl.Page, ctrl.ResolveUrl("~/js/dnn.postbackconfirm.js")); + } + } +} diff --git a/DNN Platform/Library/Framework/AJAX.cs b/DNN Platform/Library/Framework/AJAX.cs index dc50d95f2c9..1ff205d7cd0 100644 --- a/DNN Platform/Library/Framework/AJAX.cs +++ b/DNN Platform/Library/Framework/AJAX.cs @@ -63,34 +63,6 @@ public static void AddScriptManager(Page page, bool checkCdn) // suppress error adding script manager to support edge-case of module developers custom aspx pages that inherit from basepage and use code blocks } } - - if (page.Form != null) - { - try - { - // DNN-9145 TODO - // using (var stylesheetManager = new RadStyleSheetManager { ID = "StylesheetManager", EnableHandlerDetection = false }) - // { - // if (checkCdn) - // { - // stylesheetManager.CdnSettings.TelerikCdn = Host.EnableTelerikCdn ? TelerikCdnMode.Enabled : TelerikCdnMode.Disabled; - // if (stylesheetManager.CdnSettings.TelerikCdn != TelerikCdnMode.Disabled && !string.IsNullOrEmpty(Host.TelerikCdnBasicUrl)) - // { - // stylesheetManager.CdnSettings.BaseUrl = Host.TelerikCdnBasicUrl; - // } - // if (stylesheetManager.CdnSettings.TelerikCdn != TelerikCdnMode.Disabled && !string.IsNullOrEmpty(Host.TelerikCdnSecureUrl)) - // { - // stylesheetManager.CdnSettings.BaseSecureUrl = Host.TelerikCdnSecureUrl; - // } - // } - // page.Form.Controls.AddAt(0, stylesheetManager); - // } - } - catch - { - // suppress error adding script manager to support edge-case of module developers custom aspx pages that inherit from basepage and use code blocks - } - } } }