From c839264ad8427bde7cb27dab3f95ad673fd7eef5 Mon Sep 17 00:00:00 2001 From: Shannon Date: Fri, 14 Nov 2014 18:39:13 +1100 Subject: [PATCH] Removes more old tinymce files, removes unused js files, removes unused search controls --- src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 42 ---- .../umbraco/Search/QuickSearch.ascx | 19 -- .../umbraco/Search/QuickSearch.ascx.cs | 17 -- .../Search/QuickSearch.ascx.designer.cs | 15 -- .../umbraco/Search/QuickSearchHandler.ashx | 1 - .../umbraco/Search/quickSearch.js | 107 ---------- .../umbraco/js/UmbracoSpeechBubble.js | 83 ------- .../umbraco/js/UmbracoSpeechBubbleInit.js | 3 - .../umbraco/js/umbracoUpgradeChecker.js | 15 -- src/Umbraco.Web.UI/umbraco/js/xmlRequest.js | 77 ------- src/Umbraco.Web.UI/umbraco/js/xmlextras.js | 151 ------------- .../TheOutfield/DesktopMediaUploader/dmu.ashx | 1 - .../plugins/tinymce3/InsertAnchor.aspx | 41 ---- .../umbraco/plugins/tinymce3/insertChar.aspx | 64 ------ .../umbraco/plugins/tinymce3/insertImage.aspx | 202 ------------------ .../umbraco/plugins/tinymce3/insertLink.aspx | 149 ------------- .../umbraco/plugins/tinymce3/insertMacro.aspx | 160 -------------- .../tinymce3/tinymce3tinymceCompress.aspx | 1 - .../templates/cshtml/Breadcrumb.cshtml | 24 --- .../templates/cshtml/EmptyTemplate.cshtml | 15 -- .../scripting/templates/cshtml/Gallery.cshtml | 32 --- .../ListAncestorsFromCurrentPage.cshtml | 16 -- .../ListChildPagesFromChangeableSource.cshtml | 26 --- .../ListChildPagesFromCurrentPage.cshtml | 16 -- .../cshtml/ListChildPagesOrderedByDate.cshtml | 10 - .../cshtml/ListChildPagesOrderedByName.cshtml | 9 - .../ListChildPagesOrderedByProperty.cshtml | 20 -- .../cshtml/ListChildPagesWithDoctype.cshtml | 30 --- .../ListDescendantsFromCurrentPage.cshtml | 54 ----- .../cshtml/ListImagesFromMediaFolder.cshtml | 23 -- .../cshtml/MultinodeTree-picker.cshtml | 24 --- .../templates/cshtml/Navigation.cshtml | 21 -- .../scripting/templates/cshtml/SiteMap.cshtml | 34 --- .../templates/py/SubpagesAsThumnbnails.py | 1 - .../py/SubpagesFromAChangeableSource.py | 17 -- .../templates/py/SubpagesFromCurrentPage.py | 15 -- .../templates/rb/SubpagesAsThumnbnails.rb | 1 - .../rb/SubpagesFromAChangeableSource.rb | 20 -- .../templates/rb/SubpagesFromCurrentPage.rb | 9 - src/Umbraco.Web/Umbraco.Web.csproj | 8 - .../umbraco/Search/ExamineEvents.cs | 20 -- .../umbraco/Search/QuickSearch.ascx.cs | 42 ---- .../umbraco/Search/QuickSearchHandler.ashx | 1 - .../umbraco/Search/QuickSearchHandler.ashx.cs | 98 --------- 44 files changed, 1734 deletions(-) delete mode 100644 src/Umbraco.Web.UI/umbraco/Search/QuickSearch.ascx delete mode 100644 src/Umbraco.Web.UI/umbraco/Search/QuickSearch.ascx.cs delete mode 100644 src/Umbraco.Web.UI/umbraco/Search/QuickSearch.ascx.designer.cs delete mode 100644 src/Umbraco.Web.UI/umbraco/Search/QuickSearchHandler.ashx delete mode 100644 src/Umbraco.Web.UI/umbraco/Search/quickSearch.js delete mode 100644 src/Umbraco.Web.UI/umbraco/js/UmbracoSpeechBubble.js delete mode 100644 src/Umbraco.Web.UI/umbraco/js/UmbracoSpeechBubbleInit.js delete mode 100644 src/Umbraco.Web.UI/umbraco/js/umbracoUpgradeChecker.js delete mode 100644 src/Umbraco.Web.UI/umbraco/js/xmlRequest.js delete mode 100644 src/Umbraco.Web.UI/umbraco/js/xmlextras.js delete mode 100644 src/Umbraco.Web.UI/umbraco/plugins/TheOutfield/DesktopMediaUploader/dmu.ashx delete mode 100644 src/Umbraco.Web.UI/umbraco/plugins/tinymce3/InsertAnchor.aspx delete mode 100644 src/Umbraco.Web.UI/umbraco/plugins/tinymce3/insertChar.aspx delete mode 100644 src/Umbraco.Web.UI/umbraco/plugins/tinymce3/insertImage.aspx delete mode 100644 src/Umbraco.Web.UI/umbraco/plugins/tinymce3/insertLink.aspx delete mode 100644 src/Umbraco.Web.UI/umbraco/plugins/tinymce3/insertMacro.aspx delete mode 100644 src/Umbraco.Web.UI/umbraco/plugins/tinymce3/tinymce3tinymceCompress.aspx delete mode 100644 src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/Breadcrumb.cshtml delete mode 100644 src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/EmptyTemplate.cshtml delete mode 100644 src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/Gallery.cshtml delete mode 100644 src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListAncestorsFromCurrentPage.cshtml delete mode 100644 src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListChildPagesFromChangeableSource.cshtml delete mode 100644 src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListChildPagesFromCurrentPage.cshtml delete mode 100644 src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListChildPagesOrderedByDate.cshtml delete mode 100644 src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListChildPagesOrderedByName.cshtml delete mode 100644 src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListChildPagesOrderedByProperty.cshtml delete mode 100644 src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListChildPagesWithDoctype.cshtml delete mode 100644 src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListDescendantsFromCurrentPage.cshtml delete mode 100644 src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListImagesFromMediaFolder.cshtml delete mode 100644 src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/MultinodeTree-picker.cshtml delete mode 100644 src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/Navigation.cshtml delete mode 100644 src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/SiteMap.cshtml delete mode 100644 src/Umbraco.Web.UI/umbraco/scripting/templates/py/SubpagesAsThumnbnails.py delete mode 100644 src/Umbraco.Web.UI/umbraco/scripting/templates/py/SubpagesFromAChangeableSource.py delete mode 100644 src/Umbraco.Web.UI/umbraco/scripting/templates/py/SubpagesFromCurrentPage.py delete mode 100644 src/Umbraco.Web.UI/umbraco/scripting/templates/rb/SubpagesAsThumnbnails.rb delete mode 100644 src/Umbraco.Web.UI/umbraco/scripting/templates/rb/SubpagesFromAChangeableSource.rb delete mode 100644 src/Umbraco.Web.UI/umbraco/scripting/templates/rb/SubpagesFromCurrentPage.rb delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/Search/ExamineEvents.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/Search/QuickSearch.ascx.cs delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/Search/QuickSearchHandler.ashx delete mode 100644 src/Umbraco.Web/umbraco.presentation/umbraco/Search/QuickSearchHandler.ashx.cs diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index 7778fd1d33..d6ca8aaf7c 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -465,13 +465,6 @@ umbracoPage.Master - - QuickSearch.ascx - ASPXCodeBehind - - - QuickSearch.ascx - EditNodeTypeNew.aspx ASPXCodeBehind @@ -1739,7 +1732,6 @@ - @@ -1836,13 +1828,10 @@ - - - @@ -1967,10 +1956,6 @@ - - - - Designer @@ -1989,22 +1974,6 @@ applications.config Designer - - Code - - - - - - - - - - - - Code - - @@ -2061,16 +2030,6 @@ - - - - - - - - - - @@ -2478,7 +2437,6 @@ - diff --git a/src/Umbraco.Web.UI/umbraco/Search/QuickSearch.ascx b/src/Umbraco.Web.UI/umbraco/Search/QuickSearch.ascx deleted file mode 100644 index e6dc8ebb85..0000000000 --- a/src/Umbraco.Web.UI/umbraco/Search/QuickSearch.ascx +++ /dev/null @@ -1,19 +0,0 @@ -<%@ Control Language="c#" AutoEventWireup="True" Codebehind="QuickSearch.ascx.cs" Inherits="Umbraco.Web.UI.Umbraco.Search.QuickSearch" %> -<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> - - - - - - -
- " /> -
\ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/Search/QuickSearch.ascx.cs b/src/Umbraco.Web.UI/umbraco/Search/QuickSearch.ascx.cs deleted file mode 100644 index bbf3acca6e..0000000000 --- a/src/Umbraco.Web.UI/umbraco/Search/QuickSearch.ascx.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using Umbraco.Web; - -namespace Umbraco.Web.UI.Umbraco.Search -{ - public partial class QuickSearch : global::umbraco.presentation.Search.QuickSearch - { - - public QuickSearch() - { - - } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/Search/QuickSearch.ascx.designer.cs b/src/Umbraco.Web.UI/umbraco/Search/QuickSearch.ascx.designer.cs deleted file mode 100644 index 7d0b6ab62f..0000000000 --- a/src/Umbraco.Web.UI/umbraco/Search/QuickSearch.ascx.designer.cs +++ /dev/null @@ -1,15 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Umbraco.Web.UI.Umbraco.Search { - - - public partial class QuickSearch { - } -} diff --git a/src/Umbraco.Web.UI/umbraco/Search/QuickSearchHandler.ashx b/src/Umbraco.Web.UI/umbraco/Search/QuickSearchHandler.ashx deleted file mode 100644 index abbf9368cd..0000000000 --- a/src/Umbraco.Web.UI/umbraco/Search/QuickSearchHandler.ashx +++ /dev/null @@ -1 +0,0 @@ -<%@ WebHandler Language="C#" CodeBehind="QuickSearchHandler.ashx.cs" Class="umbraco.presentation.umbraco.Search.QuickSearchHandler" %> diff --git a/src/Umbraco.Web.UI/umbraco/Search/quickSearch.js b/src/Umbraco.Web.UI/umbraco/Search/quickSearch.js deleted file mode 100644 index 9d7bd4467b..0000000000 --- a/src/Umbraco.Web.UI/umbraco/Search/quickSearch.js +++ /dev/null @@ -1,107 +0,0 @@ -(function ($) { - - $.fn.UmbQuickSearch = function (url) { - - var getSearchApp = function () { - - if (UmbClientMgr.mainWindow().location.hash != "") { - switch (UmbClientMgr.mainWindow().location.hash.toLowerCase().substring(1).toLowerCase()) { - case "media": - return "Media"; - break; - case "content": - return "Content"; - break; - case "member": - return "Member"; - break; - default: - return "Content"; - } - } - return "Content"; - - /* return (UmbClientMgr.mainWindow().location.hash != "" - && UmbClientMgr.mainWindow().location.hash.toLowerCase().substring(1)) == "media".toLowerCase() - ? "Media" - : "Content"; */ - }; - - var acOptions = { - minChars: 2, - max: 100, - cacheLength: 1, - dataType: 'json', - matchCase: true, - matchContains: false, - selectFirst: false, // FR: This enabled the search popup to show, otherwise it selects the first item - extraParams: { - //return the current app, if it's not media, then it's Content as this is the only searches that are supported. - app: function () { - return getSearchApp(); - }, - rnd: function () { - return Umbraco.Utils.generateRandom(); - } - }, - parse: function (data) { - var parsed = []; - for (var i = 0; i < data.length; i++) { - parsed[parsed.length] = { - data: data[i], - value: data[i].Id, - result: data[i].Fields.nodeName - }; - } - return parsed; - }, - formatItem: function (item) { - return item.Fields.nodeName + " (" + item.Id + ") "; - }, - focus: function (event, ui) { - $(ui).attr("title", $(ui).find("span[title]").attr("title")); - } - }; - - $(this) - .autocomplete(url, acOptions) - .result(function (e, data) { - - var url = ""; - switch (getSearchApp()) { - case "Media": - url = "editMedia.aspx"; - break; - case "Content": - url = "editContent.aspx"; - break; - case "Member": - url = "members/editMember.aspx"; - break; - default: - url = "editContent.aspx"; - } - UmbClientMgr.contentFrame().location.href = url + "?id=" + data.Id; - $("#umbSearchField").val(UmbClientMgr.uiKeys()["general_typeToSearch"]); - right.focus(); - }); - - - $(this).focus(function () { - $(this).val(''); - }); - - $(this).blur(function () { - $(this).val(UmbClientMgr.uiKeys()["general_typeToSearch"]); - }); - - $(this).keyup(function (e) { - if (e.keyCode == 13) { - - UmbClientMgr.openModalWindow('dialogs/search.aspx?rndo=' + Umbraco.Utils.generateRandom() + '&search=' + jQuery(this).val() + '&app=' + getSearchApp(), 'Search', true, 620, 470); - return false; - } - }); - } - -})(jQuery); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/js/UmbracoSpeechBubble.js b/src/Umbraco.Web.UI/umbraco/js/UmbracoSpeechBubble.js deleted file mode 100644 index 8e9d7c47bd..0000000000 --- a/src/Umbraco.Web.UI/umbraco/js/UmbracoSpeechBubble.js +++ /dev/null @@ -1,83 +0,0 @@ -// Umbraco SpeechBubble Javascript - -// Dependency Loader Constructor -function UmbracoSpeechBubble(id) { - this.id = id; - this.ie = document.all ? true : false; - - this.GenerateSpeechBubble(); -} - -UmbracoSpeechBubble.prototype.GenerateSpeechBubble = function() { - - theBody = document.getElementsByTagName('BODY')[0]; - sbHtml = document.createElement('div'); - sbHtml.id = this.id + 'Container'; - sbHtml.innerHTML = '' + - ''; - theBody.appendChild(sbHtml); -} - -UmbracoSpeechBubble.prototype.ShowMessage = function(icon, header, message) { - var speechBubble = document.getElementById(this.id); - - document.getElementById(this.id + "Header").innerHTML = header; - document.getElementById(this.id + "Message").innerHTML = message; - document.getElementById(this.id + "IconSrc").src = '/umbraco/images/speechBubble/' + icon + '.png'; - - speechBubble.style.right = "20px"; - speechBubble.style.bottom = "20px"; - speechBubble.style.visibility = 'visible'; - this.Show(0); -} - -UmbracoSpeechBubble.prototype.Show = function(opacity) { - document.getElementById(this.id).style.filter = 'Alpha(Opacity=' + opacity + ')'; - - opacity = parseInt(opacity) + 10; - - var _self = this; - if (opacity < 101) { - setTimeout(function() {_self.Show(opacity+10);}, 50); - } else { - setTimeout(function() {_self.Hide(100);}, 5000); - } -} - -UmbracoSpeechBubble.prototype.Hide = function(opacity) { - document.getElementById(this.id).style.filter = 'Alpha(Opacity=' + opacity + ')'; - - var _self = this; - opacity = parseInt(opacity) - 10; - if (opacity > 1) - setTimeout(function() {_self.Hide(opacity-10);}, 50); - else { - document.getElementById(this.id).style.visibility = 'hidden'; - } -} - -// Initialize -var UmbSpeechBubble = null -function InitUmbracoSpeechBubble() { - if (UmbSpeechBubble == null) - UmbSpeechBubble = new UmbracoSpeechBubble("defaultSpeechbubble"); -} - -//if (typeof(addEvent) !== 'undefined') { -// addEvent(window, "load", InitUmbracoSpeechBubble); -//}else if (Sys != undefined) { -// Sys.Application.add_load(InitUmbracoSpeechBubble); -//} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/js/UmbracoSpeechBubbleInit.js b/src/Umbraco.Web.UI/umbraco/js/UmbracoSpeechBubbleInit.js deleted file mode 100644 index ac6bf11c85..0000000000 --- a/src/Umbraco.Web.UI/umbraco/js/UmbracoSpeechBubbleInit.js +++ /dev/null @@ -1,3 +0,0 @@ -//used by live editing to ensure the speech bubble is initialized after the main js file has been lazy loaded. -//alert("Speech Bubble init: " + InitUmbracoSpeechBubble); -InitUmbracoSpeechBubble(); \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/js/umbracoUpgradeChecker.js b/src/Umbraco.Web.UI/umbraco/js/umbracoUpgradeChecker.js deleted file mode 100644 index 687cdd20c1..0000000000 --- a/src/Umbraco.Web.UI/umbraco/js/umbracoUpgradeChecker.js +++ /dev/null @@ -1,15 +0,0 @@ -function umbracoCheckUpgrade(result) { - if (result) { - if (result.UpgradeType.toLowerCase() != 'none') { - if (UmbSpeechBubble == null) { - InitUmbracoSpeechBubble(); - } - var icon = 'info'; - if (result.UpgradeType.toLowerCase() == 'critical') { - icon = 'error'; - } - - UmbSpeechBubble.ShowMessage(icon, 'Upgrade Available!', '' + result.UpgradeComment + '', true); - } - } -} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/js/xmlRequest.js b/src/Umbraco.Web.UI/umbraco/js/xmlRequest.js deleted file mode 100644 index 5b78df3b37..0000000000 --- a/src/Umbraco.Web.UI/umbraco/js/xmlRequest.js +++ /dev/null @@ -1,77 +0,0 @@ -var requestRunning = false; -var xmlHttp = null; -var xmlHttpDebug = false; - -// Inspired by great work of Webfx in xloadtree -function umbracoStartXmlRequest(scriptUrl, postData, eventFunction) { - - // random hack for ie7 - day = new Date(); - z = day.getTime(); - y = (z - (parseInt(z/1000,10) * 1000))/10; - scriptUrl += "&xmlRnd=" + y; - - if (xmlHttpDebug) - alert(scriptUrl) - - this.requestRunning = true; - this.xmlHttpObject = XmlHttp.create(); - if (postData != "") { - if (document.all) { - this.xmlHttpObject.open("POST", scriptUrl, false); - this.xmlHttpObject.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); - } - else { - eval(eventFunction); - } - } else - this.xmlHttpObject.open("GET", scriptUrl, true); - - - this.xmlHttpObject.onreadystatechange = function () { - if (xmlHttp.readyState == 4) { - // Removed the this from this.requestRunning = false; this was causing a bug in the find search box in cms backend. - requestRunning = false; - // debug - if (xmlHttpDebug) - alert(xmlHttp.responseText) - eval(eventFunction); - xmlHttp = null; - } - }; - - // call in new thread to allow ui to update - window.setTimeout(function () { - this.xmlHttpObject.send(postData); - }, 10); - - xmlHttp = this.xmlHttpObject; - return this; -} - -umbracoStartXmlRequest.prototype.ResultText = -umbracoStartXmlRequest.prototype.ResultText = function () { - return this.xmlHttpObject.responseText; -} - -umbracoStartXmlRequest.prototype.ResultXml = -umbracoStartXmlRequest.prototype.ResultXml = function () { - return this.xmlHttpObject.responseXML; -} - -function umbracoXmlRequestResult() { - if (!requestRunning) - return xmlHttp.responseXML -} - -function umbracoXmlRequestResultTxt() { - if (!requestRunning) - return xmlHttp.responseText -} - -function xmlReturnRandom() { - day = new Date() - z = day.getTime() - y = (z - (parseInt(z/1000,10) * 1000))/10 - return y -} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/js/xmlextras.js b/src/Umbraco.Web.UI/umbraco/js/xmlextras.js deleted file mode 100644 index 1d43da551e..0000000000 --- a/src/Umbraco.Web.UI/umbraco/js/xmlextras.js +++ /dev/null @@ -1,151 +0,0 @@ -// - - - -
- - - - - - - - - - - - - - - : - : - - - - -
- - - - -
- - <%--Manual initialization is set to true because the tree doesn't load properly in some browsers in this TinyMCE window--%> - - -
-
- - - -
- -

- or {#cancel} -

- - - - - diff --git a/src/Umbraco.Web.UI/umbraco/plugins/tinymce3/insertLink.aspx b/src/Umbraco.Web.UI/umbraco/plugins/tinymce3/insertLink.aspx deleted file mode 100644 index a55780b7c3..0000000000 --- a/src/Umbraco.Web.UI/umbraco/plugins/tinymce3/insertLink.aspx +++ /dev/null @@ -1,149 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="insertLink.aspx.cs" Inherits="umbraco.presentation.plugins.tinymce3.insertLink" %> -<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> -<%@ Register TagPrefix="ui" Namespace="umbraco.uicontrols" Assembly="controls" %> -<%@ Register Src="../../controls/Tree/TreeControl.ascx" TagName="TreeControl" TagPrefix="umbraco" %> -<%@ Register TagPrefix="umbClient" Namespace="Umbraco.Web.UI.Bundles" Assembly="umbraco" %> - - - - - - - {#advlink_dlg.title} - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - -
-
- -
- -
-
-
-
- -
- - - -
- -
-
- -
- -
-
- -
-

- or cancel -

- - - - - - diff --git a/src/Umbraco.Web.UI/umbraco/plugins/tinymce3/insertMacro.aspx b/src/Umbraco.Web.UI/umbraco/plugins/tinymce3/insertMacro.aspx deleted file mode 100644 index 042aa7ce1d..0000000000 --- a/src/Umbraco.Web.UI/umbraco/plugins/tinymce3/insertMacro.aspx +++ /dev/null @@ -1,160 +0,0 @@ -<%@ Page Language="c#" ValidateRequest="false" CodeBehind="insertMacro.aspx.cs" AutoEventWireup="True" - Inherits="umbraco.presentation.tinymce3.insertMacro" Trace="false" %> - -<%@ Import Namespace="Umbraco.Web" %> -<%@ Register TagPrefix="ui" Namespace="umbraco.uicontrols" Assembly="controls" %> -<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> -<%@ Register TagPrefix="asp" Namespace="System.Web.UI" Assembly="System.Web" %> -<%@ Register TagPrefix="umbClient" Namespace="Umbraco.Web.UI.Bundles" Assembly="umbraco" %> - - - - {#advlink_dlg.title} - - - - - - - - - - - - - - - - - - - -
- - - - " /> - <%if (Request["umb_macroID"] != null || Request["umb_macroAlias"] != null) - {%> - " /> - " /> - <% }%> - -
- -
-
- -

- - - or - <%=umbraco.ui.Text("general", "cancel", UmbracoUser)%> -

-
- - - - - - -

- " /> - or - <%=umbraco.ui.Text("general", "cancel", UmbracoUser)%> -

-
- -
- - - diff --git a/src/Umbraco.Web.UI/umbraco/plugins/tinymce3/tinymce3tinymceCompress.aspx b/src/Umbraco.Web.UI/umbraco/plugins/tinymce3/tinymce3tinymceCompress.aspx deleted file mode 100644 index 2a0b2c49ba..0000000000 --- a/src/Umbraco.Web.UI/umbraco/plugins/tinymce3/tinymce3tinymceCompress.aspx +++ /dev/null @@ -1 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="tinymce3tinymceCompress.aspx.cs" Inherits="umbraco.presentation.plugins.tinymce3.tinymce3tinymceCompress" %> diff --git a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/Breadcrumb.cshtml b/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/Breadcrumb.cshtml deleted file mode 100644 index 43d36c4313..0000000000 --- a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/Breadcrumb.cshtml +++ /dev/null @@ -1,24 +0,0 @@ -@inherits umbraco.MacroEngines.DynamicNodeContext - -@* -This snippet makes a breadcrumb of parents using an unordred html list. - -How it works: -- It uses the Ancestors() method to get all parents and then generates links so the visitor get go back -- Finally it outputs the name of the current page (without a link) -*@ - - -@if (Model.Ancestors().Any()) - { - -} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/EmptyTemplate.cshtml b/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/EmptyTemplate.cshtml deleted file mode 100644 index f45160420d..0000000000 --- a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/EmptyTemplate.cshtml +++ /dev/null @@ -1,15 +0,0 @@ -@inherits umbraco.MacroEngines.DynamicNodeContext - -@* - Model = The current page the macro is executed on - @Model.bodyText - - Parameter = collection of parameter values passed from the macro - @Paramter.myParam - - Library = utillity library with common methods - @Library.NodeById(1233) -*@ - -@* The fun starts here *@ - diff --git a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/Gallery.cshtml b/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/Gallery.cshtml deleted file mode 100644 index 1124ada95b..0000000000 --- a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/Gallery.cshtml +++ /dev/null @@ -1,32 +0,0 @@ -@inherits umbraco.MacroEngines.DynamicNodeContext - -@* - Macro to display a gallery from a media folder. Add the below parameter to the macro - and use it to point the macro at a specific media folder to display it's content as - a simple list. - - Macro Parameters To Create, for this macro to work: - Alias:mediaId Name:Media Folder ID Type:Single Media Picker -*@ - - -@if (Parameter.mediaId != null) -{ - @* Get the media folder as a dynamic node *@ - var mediaFolder = Library.MediaById(Parameter.mediaId); - - if (mediaFolder.Children.Any()) - { -
    - @* for each item in children of the selected media folder *@ - @foreach (var mediaItem in mediaFolder.Children) - { -
  • - - @mediaItem.Name - -
  • - } -
- } -} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListAncestorsFromCurrentPage.cshtml b/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListAncestorsFromCurrentPage.cshtml deleted file mode 100644 index 457a47d606..0000000000 --- a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListAncestorsFromCurrentPage.cshtml +++ /dev/null @@ -1,16 +0,0 @@ -@inherits umbraco.MacroEngines.DynamicNodeContext - -@* Check the current page has ancestors *@ -@if (Model.Ancestors().Any()) -{ -
    - @* For each page in the ancestors collection which have been ordered by Level (so we start with the highest top node first) *@ - @foreach (var page in Model.Ancestors().OrderBy("Level")) - { -
  • @page.Name »
  • - } - - @* Display the current page as the last item in the list *@ -
  • @Model.Name
  • -
-} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListChildPagesFromChangeableSource.cshtml b/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListChildPagesFromChangeableSource.cshtml deleted file mode 100644 index 8b682d9090..0000000000 --- a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListChildPagesFromChangeableSource.cshtml +++ /dev/null @@ -1,26 +0,0 @@ -@inherits umbraco.MacroEngines.DynamicNodeContext -@* - === Macro Parameters To Create === - Alias:nodeId Name:Node ID Type:Content Picker -*@ - - -@{ - var startNodeID = Parameter.nodeId; -} - -@if (startNodeID != null) -{ - @* Get the start node as a dynamic node *@ - var startNode = Library.NodeById(startNodeID); - - if (startNode.Children.Where("Visible").Any()) - { -
    - @foreach (var page in startNode.Children.Where("Visible")) - { -
  • @page.Name
  • - } -
- } -} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListChildPagesFromCurrentPage.cshtml b/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListChildPagesFromCurrentPage.cshtml deleted file mode 100644 index 441b35ef70..0000000000 --- a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListChildPagesFromCurrentPage.cshtml +++ /dev/null @@ -1,16 +0,0 @@ -@inherits umbraco.MacroEngines.DynamicNodeContext - - -@* Ensure that the Current Page has children, where the property umbracoNaviHide is not True *@ -@if (Model.Children.Where("Visible").Any()) -{ -
    - @* For each child page under the root node, where the property umbracoNaviHide is not True *@ - @foreach (var childPage in Model.Children.Where("Visible")) - { -
  • - @childPage.Name -
  • - } -
-} diff --git a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListChildPagesOrderedByDate.cshtml b/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListChildPagesOrderedByDate.cshtml deleted file mode 100644 index db32eed518..0000000000 --- a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListChildPagesOrderedByDate.cshtml +++ /dev/null @@ -1,10 +0,0 @@ -@inherits umbraco.MacroEngines.DynamicNodeContext - - -
    - @* OrderBy() takes the property to sort by and optionally order desc/asc *@ - @foreach (var page in Model.Children.Where("Visible").OrderBy("CreateDate desc")) - { -
  • @page.Name
  • - } -
diff --git a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListChildPagesOrderedByName.cshtml b/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListChildPagesOrderedByName.cshtml deleted file mode 100644 index c565234b4a..0000000000 --- a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListChildPagesOrderedByName.cshtml +++ /dev/null @@ -1,9 +0,0 @@ -@inherits umbraco.MacroEngines.DynamicNodeContext - -
    - @* OrderBy() takes the property to sort by *@ - @foreach (var page in Model.Children.Where("Visible").OrderBy("Name")) - { -
  • @page.Name
  • - } -
diff --git a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListChildPagesOrderedByProperty.cshtml b/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListChildPagesOrderedByProperty.cshtml deleted file mode 100644 index 6befd750d9..0000000000 --- a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListChildPagesOrderedByProperty.cshtml +++ /dev/null @@ -1,20 +0,0 @@ -@inherits umbraco.MacroEngines.DynamicNodeContext - -@* - Macro parameter to be set on the macro - Alias:propertyAlias Name:Property Alias Type:Textbox -*@ - -@{ - - @* Get the property alias we want to filter on from the macro parameter *@ - var propertyAlias = Parameter.propertyAlias; - var selection = Model.Children.Where("Visible").OrderBy(propertyAlias); -} - -
    - @foreach (var page in selection) - { -
  • @page.Name
  • - } -
diff --git a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListChildPagesWithDoctype.cshtml b/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListChildPagesWithDoctype.cshtml deleted file mode 100644 index d82a0823e0..0000000000 --- a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListChildPagesWithDoctype.cshtml +++ /dev/null @@ -1,30 +0,0 @@ -@inherits umbraco.MacroEngines.DynamicNodeContext - -@* - This snippet shows how simple it is to fetch only children of a certain Document Type using Razor. Instead of - calling .Children, simply call .AliasOfDocumentType in plural. - For instance .Textpages or .NewsArticles (you can find the alias of your Document Type by editing it in the - Settings section). -*@ - -@{ - @* Build a query and return the visible items *@ - var selection= Model.Textpages.Where("Visible"); - - @* - Example of more querying, if you have a true/false property with the alias of shouldBeFeatured: - var selection= Model.Textpages.Where("shouldBeFeatured == true").Where("Visible"); - *@ -} - -@* Determine if there are any nodes in the selection, then render list *@ -@if(selection.Any()){ - -
    - @foreach(var page in selection){ -
  • @page.Name
  • - } -
- -} - diff --git a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListDescendantsFromCurrentPage.cshtml b/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListDescendantsFromCurrentPage.cshtml deleted file mode 100644 index 7d287523ac..0000000000 --- a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListDescendantsFromCurrentPage.cshtml +++ /dev/null @@ -1,54 +0,0 @@ -@inherits umbraco.MacroEngines.DynamicNodeContext - -@* Ensure that the Current Page has children, where the property umbracoNaviHide is not True *@ -@if (Model.Children.Where("Visible").Any()) -{ - @* Get the first page in the children, where the property umbracoNaviHide is not True *@ - var naviLevel = Model.Children.Where("Visible").First().Level; - - @* Add in level for a CSS hook *@ -
    - @* For each child page under the root node, where the property umbracoNaviHide is not True *@ - @foreach (var childPage in Model.Children.Where("Visible")) - { -
  • - @childPage.Name - - @* if the current page has any children, where the property umbracoNaviHide is not True *@ - @if (childPage.Children.Where("Visible").Any()) - { - @* Call our helper to display the children *@ - @childPages(childPage.Children) - } -
  • - } -
-} - - -@helper childPages(dynamic pages) - { - @* Ensure that we have a collection of pages *@ - if (pages.Any()) - { - @* Get the first page in pages and get the level *@ - var naviLevel = pages.First().Level; - - @* Add in level for a CSS hook *@ -
    - @foreach (var page in pages.Where("Visible")) - { -
  • - @page.Name - - @* if the current page has any children, where the property umbracoNaviHide is not True *@ - @if (page.Children.Where("Visible").Any()) - { - @* Call our helper to display the children *@ - @childPages(page.Children) - } -
  • - } -
- } -} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListImagesFromMediaFolder.cshtml b/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListImagesFromMediaFolder.cshtml deleted file mode 100644 index a400effae3..0000000000 --- a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/ListImagesFromMediaFolder.cshtml +++ /dev/null @@ -1,23 +0,0 @@ -@inherits umbraco.MacroEngines.DynamicNodeContext - -@* - Macro Parameters To Create, for this macro to work: - Alias:mediaId Name:Media Folder ID Type:Single Media Picker -*@ - -@if (Parameter.mediaId != null) -{ - @* Get the media folder as a dynamic node *@ - var mediaFolder = Library.MediaById(Parameter.mediaId); - - if (mediaFolder.Children.Any()) - { -
    - @* for each item in children of the selected media folder *@ - @foreach (var mediaItem in mediaFolder.Children) - { -
  • @mediaItem.Name
  • - } -
- } -} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/MultinodeTree-picker.cshtml b/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/MultinodeTree-picker.cshtml deleted file mode 100644 index a14f6f2332..0000000000 --- a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/MultinodeTree-picker.cshtml +++ /dev/null @@ -1,24 +0,0 @@ -@inherits umbraco.MacroEngines.DynamicNodeContext - -@* - Macro to list nodes from a Multinode tree picker, using the pickers default settings. - Content Values stored as xml. - - To get it working with any site's data structure, simply set the selection equal to the property which has the - multinode treepicker. -*@ - -@{ - var selection = Model.PropertyWithPicker; -} - -@* Lists each selected value from the picker as a link *@ -
    - @foreach(var id in selection.Split(',')){ - - @*For each link, get the node, and display its name and url*@ - var node = Library.NodeById(id); - -
  • @node.Name
  • - } -
\ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/Navigation.cshtml b/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/Navigation.cshtml deleted file mode 100644 index 5189b265d3..0000000000 --- a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/Navigation.cshtml +++ /dev/null @@ -1,21 +0,0 @@ -@inherits umbraco.MacroEngines.DynamicNodeContext - -@* - Macro to display child pages below the root page of a standard website. - Also highlights the current active page/section in the navigation with - the css class "current". -*@ - -@{ - @* Get the root of the website *@ - var root = Model.AncestorOrSelf(1); -} - -
    - @foreach (var page in root.Children.Where("Visible")) - { -
  • - @page.Name -
  • - } -
diff --git a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/SiteMap.cshtml b/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/SiteMap.cshtml deleted file mode 100644 index b25b439742..0000000000 --- a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/SiteMap.cshtml +++ /dev/null @@ -1,34 +0,0 @@ -@inherits umbraco.MacroEngines.DynamicNodeContext - -@* Render the sitemap by passing the root node to the traverse helper *@ -
- @traverse(@Model.AncestorOrSelf()) -
- -@* Helper method to travers through all descendants *@ -@helper traverse(dynamic node) -{ - - @* If a MaxLevelForSitemap parameter is passed to the macro, otherwise default to 4 levels *@ - var maxLevelForSitemap = String.IsNullOrEmpty(Parameter.MaxLevelForSitemap) ? 4 : int.Parse(Parameter.MaxLevelForSitemap); - - @* Select visible children *@ - var items = node.Children.Where("Visible").Where("Level <= " + maxLevelForSitemap); - - - @* If any items are returned, render a list *@ - if (items.Any()) - { -
    - @foreach (var item in items) - { -
  • - @item.Name - - @*Run the traverse helper again *@ - @traverse(item) -
  • - } -
- } -} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/scripting/templates/py/SubpagesAsThumnbnails.py b/src/Umbraco.Web.UI/umbraco/scripting/templates/py/SubpagesAsThumnbnails.py deleted file mode 100644 index 5f282702bb..0000000000 --- a/src/Umbraco.Web.UI/umbraco/scripting/templates/py/SubpagesAsThumnbnails.py +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/scripting/templates/py/SubpagesFromAChangeableSource.py b/src/Umbraco.Web.UI/umbraco/scripting/templates/py/SubpagesFromAChangeableSource.py deleted file mode 100644 index d5ac5186f4..0000000000 --- a/src/Umbraco.Web.UI/umbraco/scripting/templates/py/SubpagesFromAChangeableSource.py +++ /dev/null @@ -1,17 +0,0 @@ -from umbraco.presentation.nodeFactory import Node -from umbraco import library - -#set the node id you would like to fetch pages from here -#you can also set it as a macro property with the alias 'nodeId' instead - -rootNodeId = int(nodeId) - - -result = "" - -print result \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/scripting/templates/py/SubpagesFromCurrentPage.py b/src/Umbraco.Web.UI/umbraco/scripting/templates/py/SubpagesFromCurrentPage.py deleted file mode 100644 index 36acb751cf..0000000000 --- a/src/Umbraco.Web.UI/umbraco/scripting/templates/py/SubpagesFromCurrentPage.py +++ /dev/null @@ -1,15 +0,0 @@ -from umbraco.presentation.nodeFactory import Node -from umbraco import library - -#set the node id you would like to fetch pages from here -#you can also set it as a macro property with the alias 'nodeId' instead - - -result = "" - -print result diff --git a/src/Umbraco.Web.UI/umbraco/scripting/templates/rb/SubpagesAsThumnbnails.rb b/src/Umbraco.Web.UI/umbraco/scripting/templates/rb/SubpagesAsThumnbnails.rb deleted file mode 100644 index 5f282702bb..0000000000 --- a/src/Umbraco.Web.UI/umbraco/scripting/templates/rb/SubpagesAsThumnbnails.rb +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/scripting/templates/rb/SubpagesFromAChangeableSource.rb b/src/Umbraco.Web.UI/umbraco/scripting/templates/rb/SubpagesFromAChangeableSource.rb deleted file mode 100644 index 4b0c5b494a..0000000000 --- a/src/Umbraco.Web.UI/umbraco/scripting/templates/rb/SubpagesFromAChangeableSource.rb +++ /dev/null @@ -1,20 +0,0 @@ -Umbraco = Object.const_get("umbraco") -Library = Umbraco.const_get("library") -NodeFactory = Umbraco.const_get("presentation").const_get("nodeFactory") - -# Set the node id you would like to fetch pages from here -# You can also set it as a macro property with the alias 'nodeId' instead - -parent = NodeFactory::Node.new(System::Int32.Parse(nodeId)) - - -# Start writing out the list -result = "" - -puts result \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/scripting/templates/rb/SubpagesFromCurrentPage.rb b/src/Umbraco.Web.UI/umbraco/scripting/templates/rb/SubpagesFromCurrentPage.rb deleted file mode 100644 index e6d0279855..0000000000 --- a/src/Umbraco.Web.UI/umbraco/scripting/templates/rb/SubpagesFromCurrentPage.rb +++ /dev/null @@ -1,9 +0,0 @@ -result = "" - -puts result \ No newline at end of file diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 8ec870be6e..5716933b6c 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -967,9 +967,6 @@ ASPXCodeBehind
- - ASPXCodeBehind - ASPXCodeBehind @@ -1231,7 +1228,6 @@ - xsltVisualize.aspx ASPXCodeBehind @@ -1506,9 +1502,6 @@ Code - - QuickSearchHandler.ashx - DictionaryItemList.aspx ASPXCodeBehind @@ -1901,7 +1894,6 @@ SettingsSingleFileGenerator Settings1.Designer.cs - ASPXCodeBehind diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Search/ExamineEvents.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Search/ExamineEvents.cs deleted file mode 100644 index 0e08211f1f..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Search/ExamineEvents.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using umbraco.BusinessLogic; -using Examine; -using Lucene.Net.Documents; -using umbraco.businesslogic; -using umbraco.interfaces; - -namespace umbraco.presentation.umbraco.Search -{ - /// - /// Used to wire up events for Examine - /// - [Obsolete("This class has been superceded by Umbraco.Web.Search.ExamineEvents. This class is no longer used and will be removed from the codebase.")] - public class ExamineEvents : IApplicationStartupHandler - { - } -} \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Search/QuickSearch.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Search/QuickSearch.ascx.cs deleted file mode 100644 index bcc051d562..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Search/QuickSearch.ascx.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Data; -using System.Drawing; -using System.Web; -using System.Web.UI.WebControls; -using System.Web.UI.HtmlControls; - -namespace umbraco.presentation.Search -{ - - - /// - /// Summary description for quickEdit. - /// - [Obsolete("This is not used and will be removed in the future")] - public partial class QuickSearch : System.Web.UI.UserControl - { - - protected void Page_Load(object sender, System.EventArgs e) - { - - } - - /// - /// JsInclude1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude1; - - /// - /// JsInclude3 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::ClientDependency.Core.Controls.JsInclude JsInclude3; - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Search/QuickSearchHandler.ashx b/src/Umbraco.Web/umbraco.presentation/umbraco/Search/QuickSearchHandler.ashx deleted file mode 100644 index abbf9368cd..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Search/QuickSearchHandler.ashx +++ /dev/null @@ -1 +0,0 @@ -<%@ WebHandler Language="C#" CodeBehind="QuickSearchHandler.ashx.cs" Class="umbraco.presentation.umbraco.Search.QuickSearchHandler" %> diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Search/QuickSearchHandler.ashx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Search/QuickSearchHandler.ashx.cs deleted file mode 100644 index 6e834b13a5..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Search/QuickSearchHandler.ashx.cs +++ /dev/null @@ -1,98 +0,0 @@ -using System; -using System.Collections; -using System.Data; -using System.Linq; -using System.Web; -using System.Web.Services; -using System.Web.Services.Protocols; -using System.Xml.Linq; -using System.Collections.Generic; -using UmbracoExamine; -using System.Web.Script.Serialization; -using Examine; -using Examine.LuceneEngine.SearchCriteria; -using Umbraco.Core; - -namespace umbraco.presentation.umbraco.Search -{ - /// - /// Summary description for $codebehindclassname$ - /// - [WebService(Namespace = "http://tempuri.org/")] - [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] - [Obsolete("This is not used and will be removed in the future")] - public class QuickSearchHandler : IHttpHandler - { - - public void ProcessRequest(HttpContext context) - { - Authorize(); - - context.Response.ContentType = "application/json"; - - var txt = UmbracoContext.Current.Request["q"].ToLower(); - - //the app can be Content or Media only, otherwise an exception will be thrown - var app = UmbracoExamine.IndexTypes.Content; - if (!string.IsNullOrEmpty(UmbracoContext.Current.Request["app"])) - { - app = UmbracoContext.Current.Request["app"].ToLower(); - } - - int limit; - if (!int.TryParse(UmbracoContext.Current.Request["limit"], out limit)) - { - limit = 100; - } - - //if it doesn't start with "*", then search only nodeName and nodeId - var internalSearcher = (app == Constants.Applications.Members) - ? UmbracoContext.Current.InternalMemberSearchProvider - : UmbracoContext.Current.InternalSearchProvider; - - //create some search criteria, make everything combined to be 'And' and only search the current app - var criteria = internalSearcher.CreateSearchCriteria(app, Examine.SearchCriteria.BooleanOperation.And); - - IEnumerable results; - if (txt.StartsWith("*")) - { - //if it starts with * then search all fields - results = internalSearcher.Search(txt.Substring(1), true); - } - else - { - var words = txt.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).Select(w => w.ToLower().MultipleCharacterWildcard()).ToList(); - var operation = criteria.GroupedOr(new[] { "__nodeName", "__NodeId", "id" }, new[] { words[0] }); - words.RemoveAt(0); - foreach (var word in words) - operation = operation.And().GroupedOr(new[] { "__nodeName" }, new[] { word }); - - // ensure the user can only find nodes they are allowed to see - if (UmbracoContext.Current.UmbracoUser.StartNodeId > 0) - { - operation = operation.And().Id(UmbracoContext.Current.UmbracoUser.StartNodeId); - } - - results = internalSearcher.Search(operation.Compile()); - } - - JavaScriptSerializer js = new JavaScriptSerializer(); - context.Response.Write(js.Serialize(results.Take(limit))); - } - - public static void Authorize() - { - if (!BasePages.BasePage.ValidateUserContextID(BasePages.BasePage.umbracoUserContextID)) - throw new Exception("Client authorization failed. User is not logged in"); - - } - - public bool IsReusable - { - get - { - return false; - } - } - } -}