Removes more old tinymce files, removes unused js files, removes unused search controls

This commit is contained in:
Shannon
2014-11-14 18:39:13 +11:00
parent ae79a7cd7a
commit c839264ad8
44 changed files with 0 additions and 1734 deletions
-42
View File
@@ -465,13 +465,6 @@
<Compile Include="Umbraco\Masterpages\UmbracoPage.master.designer.cs">
<DependentUpon>umbracoPage.Master</DependentUpon>
</Compile>
<Compile Include="Umbraco\Search\QuickSearch.ascx.cs">
<DependentUpon>QuickSearch.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Umbraco\Search\QuickSearch.ascx.designer.cs">
<DependentUpon>QuickSearch.ascx</DependentUpon>
</Compile>
<Compile Include="Umbraco\Settings\EditNodeTypeNew.aspx.cs">
<DependentUpon>EditNodeTypeNew.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -1739,7 +1732,6 @@
<Content Include="Umbraco\Controls\Tree\TreeControl.ascx" />
<Content Include="Umbraco\Images\throbber.gif" />
<Content Include="Umbraco\Js\UmbracoSpeechBubbleInit.js" />
<Content Include="Umbraco\Search\QuickSearch.ascx" />
<Content Include="Umbraco\Images\Umbraco\bin.png" />
<Content Include="Umbraco\Images\Umbraco\bin_closed.png" />
<Content Include="Umbraco\Images\Umbraco\bin_empty.png" />
@@ -1836,13 +1828,10 @@
<Content Include="Umbraco_Client\Tree\NodeDefinition.js" />
<Content Include="Umbraco_Client\Tree\UmbracoTree.js" />
<Content Include="Umbraco_Client\Application\UmbracoClientManager.js" />
<Content Include="Umbraco\Plugins\Tinymce3\InsertAnchor.aspx" />
<Content Include="Umbraco\Plugins\Tinymce3\insertChar.aspx" />
<Content Include="Umbraco\Webservices\TreeClientService.asmx" />
<Content Include="Umbraco_Client\Application\NamespaceManager.js" />
<Content Include="Umbraco_Client\PasswordStrength\passwordstrength.js" />
<Content Include="Umbraco_Client\Ui\jQueryWresize.js" />
<Content Include="Umbraco\Search\quickSearch.js" />
<Content Include="Umbraco\Members\search.aspx" />
<Content Include="Umbraco\Translation\details.aspx" />
<Content Include="Umbraco_Client\Modal\modalBackground.gif" />
@@ -1967,10 +1956,6 @@
<Content Include="Umbraco\Js\UmbracoSpeechBubbleBackEnd.js" />
<Content Include="Umbraco\Js\umbracoUpgradeChecker.js" />
<Content Include="Umbraco\Members\ViewMembers.aspx" />
<Content Include="Umbraco\Plugins\Tinymce3\insertImage.aspx" />
<Content Include="Umbraco\Plugins\Tinymce3\insertLink.aspx" />
<Content Include="Umbraco\Plugins\Tinymce3\insertMacro.aspx" />
<Content Include="Umbraco\Plugins\Tinymce3\tinymce3tinymceCompress.aspx" />
<Content Include="Config\ClientDependency.config">
<SubType>Designer</SubType>
</Content>
@@ -1989,22 +1974,6 @@
<DependentUpon>applications.config</DependentUpon>
<SubType>Designer</SubType>
</None>
<Content Include="Umbraco\Scripting\templates\cshtml\EmptyTemplate.cshtml">
<SubType>Code</SubType>
</Content>
<Content Include="Umbraco\Scripting\templates\cshtml\Gallery.cshtml" />
<Content Include="Umbraco\Scripting\templates\cshtml\ListAncestorsFromCurrentPage.cshtml" />
<Content Include="Umbraco\Scripting\templates\cshtml\ListChildPagesFromChangeableSource.cshtml" />
<Content Include="Umbraco\Scripting\templates\cshtml\ListChildPagesFromCurrentPage.cshtml" />
<Content Include="Umbraco\Scripting\templates\cshtml\ListChildPagesOrderedByDate.cshtml" />
<Content Include="Umbraco\Scripting\templates\cshtml\ListChildPagesOrderedByName.cshtml" />
<Content Include="Umbraco\Scripting\templates\cshtml\ListChildPagesOrderedByProperty.cshtml" />
<Content Include="Umbraco\Scripting\templates\cshtml\ListChildPagesWithDoctype.cshtml" />
<Content Include="Umbraco\Scripting\templates\cshtml\ListDescendantsFromCurrentPage.cshtml" />
<Content Include="Umbraco\Scripting\templates\cshtml\ListImagesFromMediaFolder.cshtml">
<SubType>Code</SubType>
</Content>
<Content Include="Umbraco\Scripting\templates\cshtml\MultinodeTree-picker.cshtml" />
<Content Include="Umbraco\Views\Default.cshtml" />
<Content Include="Umbraco\PartialViewMacros\Templates\EditProfile.cshtml" />
<Content Include="Umbraco\PartialViewMacros\Templates\Empty.cshtml" />
@@ -2061,16 +2030,6 @@
</None>
<Content Include="Umbraco\Masterpages\umbracoPage.Master" />
<Content Include="Umbraco\Masterpages\umbracoDialog.Master" />
<Content Include="Umbraco\Search\QuickSearchHandler.ashx" />
<Content Include="Umbraco\Scripting\Templates\Cshtml\Breadcrumb.cshtml" />
<Content Include="Umbraco\Scripting\Templates\Cshtml\Navigation.cshtml" />
<Content Include="Umbraco\Scripting\Templates\Cshtml\SiteMap.cshtml" />
<None Include="Umbraco\Scripting\Templates\Py\SubpagesAsThumnbnails.py" />
<None Include="Umbraco\Scripting\Templates\Py\SubpagesFromAChangeableSource.py" />
<None Include="Umbraco\Scripting\Templates\Py\SubpagesFromCurrentPage.py" />
<None Include="Umbraco\Scripting\Templates\Rb\SubpagesAsThumnbnails.rb" />
<None Include="Umbraco\Scripting\Templates\Rb\SubpagesFromAChangeableSource.rb" />
<None Include="Umbraco\Scripting\Templates\Rb\SubpagesFromCurrentPage.rb" />
<Content Include="Umbraco\Users\NodePermissions.ascx" />
<Content Include="Umbraco\Users\PermissionEditor.aspx" />
<Content Include="Umbraco\Users\PermissionsEditor.js" />
@@ -2478,7 +2437,6 @@
<Folder Include="MasterPages\" />
<Folder Include="Media\" />
<Folder Include="Scripts\" />
<Folder Include="Umbraco\preview\" />
<Folder Include="Umbraco_Client\FolderBrowser\Images\" />
<Folder Include="Umbraco_Client\Tags\images\" />
<Folder Include="UserControls\" />
@@ -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" %>
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="Search/quickSearch.js" PathNameAlias="UmbracoRoot" />
<umb:JsInclude ID="JsInclude3" runat="server" FilePath="Application/JQuery/jquery.autocomplete.js" PathNameAlias="UmbracoClient" />
<script type="text/javascript">
jQuery(document).ready(function () {
jQuery("#umbSearchField").UmbQuickSearch('<%= Umbraco.Core.IO.IOHelper.ResolveUrl( Umbraco.Core.IO.SystemDirectories.Umbraco ) + "/Search/QuickSearchHandler.ashx" %>');
UmbClientMgr.historyManager().addEventHandler("navigating", function (e, app) {
jQuery("#umbSearchField").flushCache();
});
});
</script>
<div class="umbracoSearchHolder">
<input type="text" id="umbSearchField" accesskey="s" name="umbSearch" value="<%=umbraco.ui.Text("general", "typeToSearch")%>" />
</div>
@@ -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()
{
}
}
}
@@ -1,15 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Umbraco.Web.UI.Umbraco.Search {
public partial class QuickSearch {
}
}
@@ -1 +0,0 @@
<%@ WebHandler Language="C#" CodeBehind="QuickSearchHandler.ashx.cs" Class="umbraco.presentation.umbraco.Search.QuickSearchHandler" %>
@@ -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 + " <span class='nodeId'>(" + item.Id + ") </span>";
},
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);
@@ -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 = '' +
'<div id="' + this.id + '" style="z-index: 10; filter: Alpha(Opacity=0); background-image: url(/umbraco/images/speechbubble/speechbubble.gif); visibility: hidden; width: 231px; position: absolute; height: 84px">' +
'<div id="' + this.id + 'Icon" style="left: 10px; position: absolute; top: 16px">' +
'<img src="/umbraco/images/speechBubble/info.gif" alt="Info" width="30" height="30" id="' + this.id + 'IconSrc"></div>' +
' <div id="speechClose" style="left: 208px; position: absolute; top: 6px">' +
' <a href="javascript:UmbSpeechBubble.Hide(100)">' +
' <img src="/umbraco/images/speechbubble/speechBubble_close.gif" width="18" height="18" border="0" alt="Close"' +
' onmouseover="this.src = \'/umbraco/images/speechbubble/speechBubble_close_over.gif\';" onmouseout="this.src=\'images/speechbubble/speechBubble_close.gif\';"></a></div>' +
' <div id="' + this.id + 'Header" style="font-family: Segoe UI; lucida sans; sans serif; font-size: 16px; font-weight: 100; color: #0033aa; left: 50px;' +
' position: absolute; top: 6px">' +
' Data gemt!</div>' +
' <div id="' + this.id + 'Message" style="font-size: 11px; font-weight: normal; color: #000; text-align: left; left: 50px; width: 180px; position: absolute;' +
' top: 28px">' +
' Default Text Container!</div>' +
' </div>';
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);
//}
@@ -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();
@@ -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!', '<a style="text-decoration:none" target="_blank" href="' + result.UpgradeUrl + '">' + result.UpgradeComment + '</a>', true);
}
}
}
@@ -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
}
-151
View File
@@ -1,151 +0,0 @@
//<script>
//////////////////
// Helper Stuff //
//////////////////
function HTMLEncode(t) {
return t.toString().replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
}
// used to find the Automation server name
function getDomDocumentPrefix() {
if (getDomDocumentPrefix.prefix)
return getDomDocumentPrefix.prefix;
var prefixes = ["MSXML2", "Microsoft", "MSXML", "MSXML3"];
var o;
for (var i = 0; i < prefixes.length; i++) {
try {
// try to create the objects
o = new ActiveXObject(prefixes[i] + ".DomDocument");
return getDomDocumentPrefix.prefix = prefixes[i];
}
catch (ex) {};
}
throw new Error("Could not find an installed XML parser");
}
function getXmlHttpPrefix() {
if (getXmlHttpPrefix.prefix)
return getXmlHttpPrefix.prefix;
var prefixes = ["MSXML2", "Microsoft", "MSXML", "MSXML3"];
var o;
for (var i = 0; i < prefixes.length; i++) {
try {
// try to create the objects
o = new ActiveXObject(prefixes[i] + ".XmlHttp");
return getXmlHttpPrefix.prefix = prefixes[i];
}
catch (ex) {};
}
throw new Error("Could not find an installed XML parser");
}
//////////////////////////
// Start the Real stuff //
//////////////////////////
// XmlHttp factory
function XmlHttp() {}
XmlHttp.create = function () {
try {
if (window.XMLHttpRequest) {
var req = new XMLHttpRequest();
// some versions of Moz do not support the readyState property
// and the onreadystate event so we patch it!
if (req.readyState == null) {
req.readyState = 1;
req.addEventListener("load", function () {
req.readyState = 4;
if (typeof req.onreadystatechange == "function")
req.onreadystatechange();
}, false);
}
return req;
}
if (window.ActiveXObject) {
return new ActiveXObject(getXmlHttpPrefix() + ".XmlHttp");
}
}
catch (ex) {}
// fell through
throw new Error("Your browser does not support XmlHttp objects");
};
// XmlDocument factory
function XmlDocument() {}
XmlDocument.create = function () {
try {
// DOM2
if (document.implementation && document.implementation.createDocument) {
var doc = document.implementation.createDocument("", "", null);
// some versions of Moz do not support the readyState property
// and the onreadystate event so we patch it!
if (doc.readyState == null) {
doc.readyState = 1;
doc.addEventListener("load", function () {
doc.readyState = 4;
if (typeof doc.onreadystatechange == "function")
doc.onreadystatechange();
}, false);
}
return doc;
}
if (window.ActiveXObject)
return new ActiveXObject(getDomDocumentPrefix() + ".DomDocument");
}
catch (ex) {}
throw new Error("Your browser does not support XmlDocument objects");
};
// Create the loadXML method and xml getter for Mozilla
if (window.DOMParser &&
window.XMLSerializer &&
window.Node && Node.prototype && Node.prototype.__defineGetter__) {
// XMLDocument did not extend the Document interface in some versions
// of Mozilla. Extend both!
XMLDocument.prototype.loadXML =
Document.prototype.loadXML = function (s) {
// parse the string to a new doc
var doc2 = (new DOMParser()).parseFromString(s, "text/xml");
// remove all initial children
while (this.hasChildNodes())
this.removeChild(this.lastChild);
// insert and import nodes
for (var i = 0; i < doc2.childNodes.length; i++) {
this.appendChild(this.importNode(doc2.childNodes[i], true));
}
};
/*
* xml getter
*
* This serializes the DOM tree to an XML String
*
* Usage: var sXml = oNode.xml
*
*/
// XMLDocument did not extend the Document interface in some versions
// of Mozilla. Extend both!
XMLDocument.prototype.__defineGetter__("xml", function () {
return (new XMLSerializer()).serializeToString(this);
});
Document.prototype.__defineGetter__("xml", function () {
return (new XMLSerializer()).serializeToString(this);
});
}
@@ -1 +0,0 @@
<%@ WebHandler Language="C#" CodeBehind="MediaUploader.ashx.cs" Class="umbraco.presentation.umbraco.webservices.MediaUploader" %>
@@ -1,41 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InsertAnchor.aspx.cs" Inherits="umbraco.presentation.umbraco.plugins.tinymce3.InsertAnchor" %>
<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title><%= umbraco.ui.Text("insertAnchor") %></title>
<base target="_self" />
<cc1:UmbracoClientDependencyLoader runat="server" id="ClientLoader" />
<umb:JsInclude ID="JsInclude4" runat="server" FilePath="tinymce3/tiny_mce_popup.js" PathNameAlias="UmbracoClient" Priority="100" />
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="tinymce3/themes/umbraco/js/anchor.js" PathNameAlias="UmbracoClient" Priority="101" />
</head>
<body style="display: none">
<form onsubmit="AnchorDialog.update();return false;" action="#">
<table border="0" cellpadding="4" cellspacing="0">
<tr>
<td nowrap="nowrap"><%= umbraco.ui.Text("name") %>:</td>
<td><input name="anchorName" type="text" class="mceFocus" id="anchorName" value="" style="width: 200px" /></td>
</tr>
</table>
<div class="mceActionPanel">
<div style="float: left">
<input type="submit" id="insert" name="insert" value="<%= umbraco.ui.Text("update") %>" />
</div>
<div style="float: right">
<input type="button" id="cancel" name="cancel" value="<%= umbraco.ui.Text("cancel") %>" onclick="tinyMCEPopup.close();" />
</div>
</div>
</form>
</body>
</html>
@@ -1,64 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="insertChar.aspx.cs" Inherits="umbraco.presentation.umbraco.plugins.tinymce3.insertChar" %>
<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title><%= umbraco.ui.Text("insertCharacter")%></title>
<base target="_self" />
<cc1:UmbracoClientDependencyLoader runat="server" id="ClientLoader" />
<umb:JsInclude ID="JsInclude4" runat="server" FilePath="tinymce3/tiny_mce_popup.js" PathNameAlias="UmbracoClient" Priority="100" />
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="tinymce3/themes/umbraco/js/charmap.js" PathNameAlias="UmbracoClient" Priority="101" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
</head>
<body id="charmap" style="display:none">
<table align="center" border="0" cellspacing="0" cellpadding="2">
<tr>
<td id="charmapView" rowspan="2" align="left" valign="top">
<!-- Chars will be rendered here -->
</td>
<td width="100" align="center" valign="top">
<table border="0" cellpadding="0" cellspacing="0" width="100" style="height:100px">
<tr>
<td id="codeV">&nbsp;</td>
</tr>
<tr>
<td id="codeN">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="bottom" style="padding-bottom: 3px;">
<table width="100" align="center" border="0" cellpadding="2" cellspacing="0">
<tr>
<td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;">HTML-Code</td>
</tr>
<tr>
<td style="font-size: 16px; font-weight: bold; border-left: 1px solid #666699; border-bottom: 1px solid #666699; border-right: 1px solid #666699;" id="codeA" align="center">&nbsp;</td>
</tr>
<tr>
<td style="font-size: 1px;">&nbsp;</td>
</tr>
<tr>
<td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;">NUM-Code</td>
</tr>
<tr>
<td style="font-size: 16px; font-weight: bold; border-left: 1px solid #666699; border-bottom: 1px solid #666699; border-right: 1px solid #666699;" id="codeB" align="center">&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
@@ -1,202 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="insertImage.aspx.cs" Inherits="umbraco.presentation.plugins.tinymce3.insertImage" %>
<%@ Register TagPrefix="ui" Namespace="umbraco.uicontrols" Assembly="controls" %>
<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>
<%@ Register TagPrefix="umb2" TagName="Tree" Src="../../controls/Tree/TreeControl.ascx" %>
<%@ Register TagPrefix="umb3" TagName="Image" Src="../../controls/Images/ImageViewer.ascx" %>
<%@ Register TagName="MediaUpload" TagPrefix="umb4" Src="../../controls/Images/UploadMediaImage.ascx" %>
<%@ Register TagPrefix="umbClient" Namespace="Umbraco.Web.UI.Bundles" Assembly="umbraco" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>{#advimage_dlg.dialog_title}</title>
<base target="_self" />
<ui:UmbracoClientDependencyLoader runat="server" id="ClientLoader" />
<umbClient:JsApplicationLib runat="server" />
<umbClient:JsJQueryCore runat="server" />
<umbClient:JsUmbracoApplicationCore runat="server" />
<umb:JsInclude ID="JsInclude9" runat="server" FilePath="Application/jQuery/jquery.noconflict-invoke.js" PathNameAlias="UmbracoClient" Priority="1" />
<umb:JsInclude ID="JsInclude8" runat="server" FilePath="ui/default.js" PathNameAlias="UmbracoClient" Priority="4" />
<umb:JsInclude ID="JsInclude4" runat="server" FilePath="tinymce3/tiny_mce_popup.js" PathNameAlias="UmbracoClient" Priority="100" />
<umb:JsInclude ID="JsInclude5" runat="server" FilePath="tinymce3/utils/mctabs.js" PathNameAlias="UmbracoClient" Priority="101" />
<umb:JsInclude ID="JsInclude6" runat="server" FilePath="tinymce3/utils/form_utils.js" PathNameAlias="UmbracoClient" Priority="102" />
<umb:JsInclude ID="JsInclude7" runat="server" FilePath="tinymce3/utils/validate.js" PathNameAlias="UmbracoClient" Priority="103" />
<umb:JsInclude ID="JsInclude2" runat="server" FilePath="tinymce3/utils/editable_selects.js" PathNameAlias="UmbracoClient" Priority="110" />
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="tinymce3/plugins/umbracoimg/js/image.js" PathNameAlias="UmbracoClient" Priority="111" />
<style type="text/css">
.imageViewer .bgImage {position: absolute; top: 3px; right: 3px; }
</style>
</head>
<body id="advimage" style="display: none">
<script type="text/javascript" language="javascript">
function dialogHandler(id) {
if (id != -1) {
jQuery("#<%=ImageViewer.ClientID%>").UmbracoImageViewerAPI().updateImage(id, function(p) {
//when the image is loaded, this callback method fires
if (p.hasImage) {
updateImageSource(p.url, p.alt, p.width, p.height);
return;
}
else {
alert("An error occured: Image selected could not be found");
}
});
}
}
function uploadHandler(e) {
dialogHandler(e.id);
//get the tree object for the chooser and refresh
var tree = jQuery("#<%=DialogTree.ClientID%>").UmbracoTreeAPI();
tree.refreshTree();
}
function updateImageSource(src, alt, width, height) {
// maybe we'll need to remove the umbraco path from the src
var umbracoPath = tinyMCE.activeEditor.getParam('umbraco_path');
if (src.substring(0, umbracoPath.length) == umbracoPath) {
// if the path contains a reference to the umbraco path, it also contains a reference to go up one level (../)
src = src.substring(umbracoPath.length + 3, src.length);
}
var formObj = document.forms[0];
formObj.src.value = src;
formObj.alt.value = alt;
var imageWidth = width;
var imageHeight = height;
var orgHeight = height;
var orgWidth = width;
var maxWidth = parseInt(tinyMCE.activeEditor.getParam('umbraco_maximumDefaultImageWidth'));
if (imageWidth != '' && imageWidth > maxWidth) {
if (imageWidth > imageHeight)
orgRatio = parseFloat(imageHeight / imageWidth).toFixed(2)
else
orgRatio = parseFloat(imageWidth / imageHeight).toFixed(2)
imageHeight = Math.round(maxWidth * parseFloat(imageHeight / imageWidth).toFixed(2));
imageWidth = maxWidth;
}
if (imageWidth > 0)
formObj.width.value = imageWidth;
if (orgWidth > 0)
formObj.orgWidth.value = orgWidth;
if (imageHeight > 0)
formObj.height.value = imageHeight;
if (orgHeight > 0)
formObj.orgHeight.value = orgHeight;
}
function changeDimensions(mode) {
var f = document.forms[0], tp, t = this;
var bTop = f.orgHeight;
var bBot = f.orgWidth;
var rTop = f.height;
var rBot = f.width;
if (mode == "width") {
rTop.value = ((bTop.value * rBot.value) / bBot.value).toFixed(0);
rBot.value = Number(rBot.value).toFixed(0);
} else if (mode == "height") {
rBot.value = ((bBot.value * rTop.value) / bTop.value).toFixed(0);
rTop.value = Number(rTop.value).toFixed(0);
}
}
var functionsFrame = this;
var tabFrame = this;
var isDialog = true;
var submitOnEnter = true;
var preloadImg = true;
jQuery(document).ready(function() {
//show the image if one is selected
setTimeout(function() {
if (document.forms[0].src.value != "") {
//get the thumb of the image
var src = document.forms[0].src.value;
var ext = src.split('.').pop();
var thumb = src.replace("." + ext, "_thumb.jpg");
if (src != "") jQuery("#<%=ImageViewer.ClientID%>").UmbracoImageViewerAPI().showImage(thumb);
}
}, 500);
});
jQuery(window).load(function() {
//for some very silly reason, we need to manually initialize the tree on window load as firefox and chrome won't load
//the tree properly when in the TinyMCE window. This is why we need to specify ManualInitialization="true" on the tree
//control.
var tree = jQuery("#<%=DialogTree.ClientID%>").UmbracoTreeAPI();
tree.rebuildTree("media");
});
</script>
<form id="Form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<input type="hidden" name="orgWidth" id="orgWidth" /><input type="hidden" name="orgHeight" id="orgHeight" />
<ui:Pane ID="pane_src" runat="server">
<umb3:Image runat="server" ID="ImageViewer" ViewerStyle="ThumbnailPreview" />
<ui:PropertyPanel id="pp_src" runat="server" Text="Url">
<input type="text" id="src" style="width: 300px"/>
</ui:PropertyPanel>
<ui:PropertyPanel id="pp_title" runat="server" Text="Title">
<input type="text" id="alt" style="width: 300px"/>
</ui:PropertyPanel>
<ui:PropertyPanel id="pp_dimensions" runat="server" Text="Dimensions">
<asp:Literal ID="lt_widthLabel" runat="server" />: <input name="width" type="text" id="width" value="" size="5" maxlength="5" class="size" onchange="changeDimensions('width');" />
<asp:Literal ID="lt_heightLabel" runat="server" />: <input name="height" type="text" id="height" value="" size="5" maxlength="5" class="size" onchange="changeDimensions('height');" />
</ui:PropertyPanel>
</ui:Pane>
<br />
<ui:TabView AutoResize="false" Width="555px" Height="305px" runat="server" ID="tv_options" />
<ui:Pane ID="pane_select" runat="server">
<div style="padding: 5px; background: #fff; height: 250px;">
<%--Manual initialization is set to true because the tree doesn't load properly in some browsers in this TinyMCE window--%>
<umb2:Tree runat="server" ID="DialogTree" ManualInitialization="true"
App="media" TreeType="media" IsDialog="true"
ShowContextMenu="false"
DialogMode="id" FunctionToCall="dialogHandler" />
</div>
</ui:Pane>
<asp:Panel ID="pane_upload" runat="server">
<umb4:MediaUpload runat="server" ID="MediaUploader" OnClientUpload="uploadHandler" />
</asp:Panel>
<br />
<p>
<input id="SubmitInsertImage" type="submit" value="{#insert}" style="width: 60px;" onclick="ImageDialog.insert();return false;" /> <em>or</em> <a href="#" onclick="tinyMCEPopup.close();">{#cancel}</a>
</p>
</form>
</body>
</html>
@@ -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" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>{#advlink_dlg.title}</title>
<base target="_self" />
<ui:UmbracoClientDependencyLoader runat="server" id="ClientLoader" />
<umbClient:JsApplicationLib runat="server" />
<umbClient:JsJQueryCore runat="server" />
<umbClient:JsUmbracoApplicationCore runat="server" />
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="tinymce3/tiny_mce_popup.js" PathNameAlias="UmbracoClient" Priority="100" />
<umb:JsInclude ID="JsInclude3" runat="server" FilePath="tinymce3/plugins/umbracolink/js/umbracolink.js" PathNameAlias="UmbracoClient" Priority="101" />
<umb:JsInclude ID="JsInclude4" runat="server" FilePath="tinymce3/utils/form_utils.js" PathNameAlias="UmbracoClient" Priority="102" />
<umb:JsInclude ID="JsInclude5" runat="server" FilePath="tinymce3/utils/validate.js" PathNameAlias="UmbracoClient" Priority="103" />
<script type="text/javascript">
var currentLink = "";
function dialogHandler(id) {
id = id.toString();
if (id == "-1") return;
var returnValues = id.split("|");
if (returnValues.length > 1) {
if (returnValues[1] != '')
setFormValue('href', returnValues[1]);
else
setFormValue('href', returnValues[0]);
setFormValue('localUrl', returnValues[0]);
setFormValue('title', returnValues[2]);
} else {
if (id.substring(id.length - 1, id.length) == "|")
id = id.substring(0, id.length - 1);
setFormValue('href', id);
setFormValue('localUrl', id);
//umbraco.presentation.webservices.legacyAjaxCalls.NiceUrl(id, updateInternalLink, updateInternalLinkError);
}
}
function validateUmbracoLink(link) {
if (link.indexOf('{localLink') > -1) {
// check for / prefix
if (link.substring(0, 1) == "/") {
link = link.substring(1, link.length);
}
// update internal link ref
setFormValue('localUrl', link);
currentLink = link;
// show friendly url
umbraco.presentation.webservices.legacyAjaxCalls.NiceUrl(link.substring(11, link.length - 1), updateInternalLink, updateInternalLinkError);
return "Updating internal link...";
} else {
return link;
}
}
function updateInternalLink(result) {
if (result != "")
setFormValue('href', result);
else
setFormValue('href', currentLink);
}
function updateInternalLinkError(error) {
// don't show the error, but just revert to the old link...
setFormValue('href', currentLink);
}
</script>
</head>
<body id="advlink" style="display: none">
<form runat="server" action="#">
<asp:ScriptManager EnablePartialRendering="false" runat="server">
<Services>
<asp:ServiceReference Path="../../webservices/legacyAjaxCalls.asmx" />
</Services>
</asp:ScriptManager>
<ui:Pane runat="server" ID="pane_url">
<ui:PropertyPanel runat="server" Text="Url">
<input type="hidden" id="localUrl" name="localUrl" onchange="" />
<input id="href" name="href" type="text" style="width: 220px;" value="" onchange="document.getElementById('localUrl').value = ''; selectByValue(this.form,'linklisthref',this.value);" />
</ui:PropertyPanel>
<ui:PropertyPanel ID="PropertyPanel1" runat="server" Text="Title">
<input id="title" name="title" type="text" value="" style="width: 220px;" />
</ui:PropertyPanel>
<ui:PropertyPanel ID="PropertyPanel2" runat="server" Text="Target">
<div id="targetlistcontainer"></div>
</ui:PropertyPanel>
<div id="anchorlistrow">
<ui:PropertyPanel ID="PropertyPanel3" runat="server" Text="Anchor">
<div id="anchorlistcontainer"></div>
</ui:PropertyPanel>
</div>
</ui:Pane>
<br />
<ui:TabView AutoResize="false" Width="460px" Height="305px" runat="server" ID="tv_options" />
<ui:Pane ID="pane_content" runat="server">
<div style="padding: 5px; background: #fff; height: 250px;">
<umbraco:TreeControl runat="server" ID="TreeControl2" App="content"
IsDialog="true" DialogMode="locallink" ShowContextMenu="false" FunctionToCall="dialogHandler"
Height="250"></umbraco:TreeControl>
</div>
</ui:Pane>
<ui:Pane ID="pane_media" runat="server">
<div style="padding: 5px; background: #fff; height: 250px;">
<umbraco:TreeControl runat="server" ID="TreeControl1" App="media"
IsDialog="true" DialogMode="fulllink" ShowContextMenu="false" FunctionToCall="dialogHandler"
Height="250"></umbraco:TreeControl>
</div>
</ui:Pane>
<br />
<p>
<input type="submit" name="insert" value="{#insert}" /> <em>or</em> <a href="#" onclick="tinyMCEPopup.close();">cancel</a>
</p>
</form>
</body>
</html>
@@ -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" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>{#advlink_dlg.title}</title>
<base target="_self" />
<ui:UmbracoClientDependencyLoader runat="server" ID="ClientLoader" />
<umbClient:JsApplicationLib runat="server" />
<umbClient:JsJQueryCore runat="server" />
<umbClient:JsUmbracoApplicationCore runat="server" />
<umb:JsInclude ID="JsInclude8" runat="server" FilePath="ui/default.js" PathNameAlias="UmbracoClient"
Priority="4" />
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="tinymce3/tiny_mce_popup.js"
PathNameAlias="UmbracoClient" Priority="100" />
<umb:JsInclude ID="JsInclude3" runat="server" FilePath="tinymce3/utils/mctabs.js"
PathNameAlias="UmbracoClient" Priority="101" />
<umb:JsInclude ID="JsInclude4" runat="server" FilePath="tinymce3/utils/form_utils.js"
PathNameAlias="UmbracoClient" Priority="102" />
<umb:JsInclude ID="JsInclude5" runat="server" FilePath="tinymce3/utils/validate.js"
PathNameAlias="UmbracoClient" Priority="103" />
<style type="text/css">
.propertyItemheader
{
width: 140px !important;
}
select, textarea, input.guiInputTextStandard
{
width: 200px;
}
.macroPane
{
height: 360px;
overflow: auto;
}
</style>
<script type="text/javascript">
function umbracoEditMacroDo(fieldTag, macroName, renderedContent) {
// is it edit macro?
if (!tinyMCE.activeEditor.dom.hasClass(elm, 'umbMacroHolder')) {
while (!tinyMCE.activeEditor.dom.hasClass(elm, 'umbMacroHolder') && elm.parentNode) {
elm = elm.parentNode;
}
}
if (elm.nodeName == "DIV" && tinyMCE.activeEditor.dom.getAttrib(elm, 'class').indexOf('umbMacroHolder') >= 0) {
tinyMCE.activeEditor.dom.setOuterHTML(elm, renderedContent);
}
else {
tinyMCEPopup.restoreSelection();
tinyMCEPopup.editor.execCommand("mceInsertContent", false, renderedContent);
}
//workaround for the chrome issue, seems to work if there is a small delay before the close function call
id = window.setTimeout("tinyMCEPopup.close()", 10);
//tinyMCEPopup.close();
}
function saveTreepickerValue(appAlias, macroAlias) {
var treePicker = window.showModalDialog('../../dialogs/treePicker.aspx?app=' + appAlias + '&treeType=' + appAlias, 'treePicker', 'dialogWidth=350px;dialogHeight=300px;scrollbars=no;center=yes;border=thin;help=no;status=no')
document.forms[0][macroAlias].value = treePicker;
document.getElementById("label" + macroAlias).innerHTML = "</b><i>updated with id: " + treePicker + "</i><b><br/>";
}
var macroAliases = new Array();
function registerAlias(alias) {
macroAliases[macroAliases.length] = alias;
}
function pseudoHtmlEncode(text) {
return text.replace(/\"/gi, "&amp;quot;").replace(/\</gi, "&amp;lt;").replace(/\>/gi, "&amp;gt;");
}
/*
function init() {
var inst = tinyMCEPopup.editor;
var elm = inst.selection.getNode();
}
*/
function insertSomething() {
tinyMCEPopup.close();
}
</script>
</head>
<body>
<form id="Form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<input type="hidden" name="macroMode" value="<%=Request["mode"]%>" />
<%if (Request["umb_macroID"] != null || Request["umb_macroAlias"] != null)
{%>
<input type="hidden" name="umb_macroID" value="<%=Request.CleanForXss("umb_macroID")%>" />
<input type="hidden" name="umb_macroAlias" value="<%=Request.CleanForXss("umb_macroAlias")%>" />
<% }%>
<ui:Pane ID="pane_edit" runat="server" Visible="false">
<div class="macroPane">
<asp:PlaceHolder ID="macroProperties" runat="server" />
</div>
</ui:Pane>
<asp:Panel ID="edit_buttons" runat="server" Visible="false">
<p>
<asp:Button ID="bt_renderMacro" OnClick="renderMacro_Click" runat="server" Text="ok">
</asp:Button>
<em>or </em><a id="cancelbtn" href="#" style="color: blue" onclick="tinyMCEPopup.close();">
<%=umbraco.ui.Text("general", "cancel", UmbracoUser)%></a>
</p>
</asp:Panel>
<ui:Pane ID="pane_insert" runat="server">
<ui:PropertyPanel ID="pp_selectMacro" runat="server" Text="Select macro">
<asp:DropDownList ID="umb_macroAlias" Width="150px" runat="server" />
</ui:PropertyPanel>
</ui:Pane>
<asp:Panel ID="insert_buttons" runat="server">
<p>
<input type="submit" value="<%=umbraco.ui.Text("general", "ok", UmbracoUser)%>" />
<em>or </em><a href="#" style="color: blue" onclick="tinyMCEPopup.close();">
<%=umbraco.ui.Text("general", "cancel", UmbracoUser)%></a>
</p>
</asp:Panel>
<div id="renderContent" style="display: none">
<asp:PlaceHolder ID="renderHolder" runat="server"></asp:PlaceHolder>
</div>
</form>
<script type="text/javascript" >
var inst; // = tinyMCEPopup.editor;
var elm; // = inst.selection.getNode();
jQuery(document).ready(function () {
// tinyMCEPopup.onInit.add(init);
inst = tinyMCEPopup.editor;
elm = inst.selection.getNode();
<asp:Literal ID="jQueryReady" runat="server"></asp:Literal>
});
</script>
</body>
</html>
@@ -1 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="tinymce3tinymceCompress.aspx.cs" Inherits="umbraco.presentation.plugins.tinymce3.tinymce3tinymceCompress" %>
@@ -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())
{
<ul class="breadcrumb">
@* 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"))
{
<li><a href="@page.Url">@page.Name</a> <span class="divider">/</span></li>
}
@* Display the current page as the last item in the list *@
<li class="active">@Model.Name</li>
</ul>
}
@@ -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 *@
@@ -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())
{
<ul class="thumbnails">
@* for each item in children of the selected media folder *@
@foreach (var mediaItem in mediaFolder.Children)
{
<li class="span2">
<a href="@mediaItem.umbracoFile" class="thumbnail">
<img src="@mediaItem.umbracoFile" alt="@mediaItem.Name" />
</a>
</li>
}
</ul>
}
}
@@ -1,16 +0,0 @@
@inherits umbraco.MacroEngines.DynamicNodeContext
@* Check the current page has ancestors *@
@if (Model.Ancestors().Any())
{
<ul>
@* 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"))
{
<li><a href="@page.Url">@page.Name</a> &raquo;</li>
}
@* Display the current page as the last item in the list *@
<li>@Model.Name</li>
</ul>
}
@@ -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())
{
<ul>
@foreach (var page in startNode.Children.Where("Visible"))
{
<li><a href="@page.Url">@page.Name</a></li>
}
</ul>
}
}
@@ -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())
{
<ul>
@* For each child page under the root node, where the property umbracoNaviHide is not True *@
@foreach (var childPage in Model.Children.Where("Visible"))
{
<li>
<a href="@childPage.Url">@childPage.Name</a>
</li>
}
</ul>
}
@@ -1,10 +0,0 @@
@inherits umbraco.MacroEngines.DynamicNodeContext
<ul>
@* OrderBy() takes the property to sort by and optionally order desc/asc *@
@foreach (var page in Model.Children.Where("Visible").OrderBy("CreateDate desc"))
{
<li><a href="@page.Url">@page.Name</a></li>
}
</ul>
@@ -1,9 +0,0 @@
@inherits umbraco.MacroEngines.DynamicNodeContext
<ul>
@* OrderBy() takes the property to sort by *@
@foreach (var page in Model.Children.Where("Visible").OrderBy("Name"))
{
<li><a href="@page.Url">@page.Name</a></li>
}
</ul>
@@ -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);
}
<ul>
@foreach (var page in selection)
{
<li><a href="@page.Url">@page.Name</a></li>
}
</ul>
@@ -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()){
<ul>
@foreach(var page in selection){
<li><a href="@page.Url">@page.Name</a></li>
}
</ul>
}
@@ -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 *@
<ul class="level-@naviLevel">
@* For each child page under the root node, where the property umbracoNaviHide is not True *@
@foreach (var childPage in Model.Children.Where("Visible"))
{
<li>
<a href="@childPage.Url">@childPage.Name</a>
@* 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)
}
</li>
}
</ul>
}
@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 *@
<ul class="level-@(naviLevel)">
@foreach (var page in pages.Where("Visible"))
{
<li>
<a href="@page.Url">@page.Name</a>
@* 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)
}
</li>
}
</ul>
}
}
@@ -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())
{
<ul>
@* for each item in children of the selected media folder *@
@foreach (var mediaItem in mediaFolder.Children)
{
<li><img src="@mediaItem.umbracoFile" alt="@mediaItem.Name" /></li>
}
</ul>
}
}
@@ -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 *@
<ul>
@foreach(var id in selection.Split(',')){
@*For each link, get the node, and display its name and url*@
var node = Library.NodeById(id);
<li><a href="@node.Url">@node.Name</a></li>
}
</ul>
@@ -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);
}
<ul>
@foreach (var page in root.Children.Where("Visible"))
{
<li class="@page.IsAncestorOrSelf(Model, "current", "")">
<a href="@page.Url">@page.Name</a>
</li>
}
</ul>
@@ -1,34 +0,0 @@
@inherits umbraco.MacroEngines.DynamicNodeContext
@* Render the sitemap by passing the root node to the traverse helper *@
<div class="sitemap">
@traverse(@Model.AncestorOrSelf())
</div>
@* 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())
{
<ul>
@foreach (var item in items)
{
<li class="level-@item.Level">
<a href="@item.Url">@item.Name</a>
@*Run the traverse helper again *@
@traverse(item)
</li>
}
</ul>
}
}
@@ -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 = "<ul>"
for childNode in Node(rootNodeId).Children:
result += "<li><a href='" + library.NiceUrl(childNode.Id) + "'>" + childNode.Name + "</a></li>"
result += "</ul>"
print result
@@ -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 = "<ul>"
for childNode in currentPage.Children:
result += "<li><a href='" + library.NiceUrl(childNode.Id) + "'>" + childNode.Name + "</a></li>"
result += "</ul>"
print result
@@ -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 = "<ul>"
parent.Children.each do |child|
result += "<li><a href='" + Library.NiceUrl(child.Id) + "'>" + child.Name + "</a></li>"
end
result += "</ul>"
puts result
@@ -1,9 +0,0 @@
result = "<ul>";
currentPage.Children.each do |this_item|
result += "<li><a href='" + this_item.NiceUrl + "'>" + this_item.Name + "</a></li>"
end
result += "</ul>"
puts result
-8
View File
@@ -967,9 +967,6 @@
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\umbraco\nodeFactory\UmbracoSiteMapProviderAccessUpdate.cs" />
<Compile Include="umbraco.presentation\umbraco\Search\QuickSearch.ascx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\umbraco\settings\EditNodeTypeNew.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
@@ -1231,7 +1228,6 @@
</Compile>
<Compile Include="umbraco.presentation\umbraco\nodeFactory\Page_Legacy.cs" />
<Compile Include="umbraco.presentation\umbraco\preview\PreviewContent.cs" />
<Compile Include="umbraco.presentation\umbraco\Search\ExamineEvents.cs" />
<Compile Include="umbraco.presentation\umbraco\developer\Xslt\xsltVisualize.aspx.cs">
<DependentUpon>xsltVisualize.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -1506,9 +1502,6 @@
<SubType>Code</SubType>
</Compile>
<Compile Include="umbraco.presentation\umbraco\nodeFactory\UmbracoSiteMapProvider.cs" />
<Compile Include="umbraco.presentation\umbraco\Search\QuickSearchHandler.ashx.cs">
<DependentUpon>QuickSearchHandler.ashx</DependentUpon>
</Compile>
<Compile Include="umbraco.presentation\umbraco\settings\DictionaryItemList.aspx.cs">
<DependentUpon>DictionaryItemList.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -1901,7 +1894,6 @@
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings1.Designer.cs</LastGenOutput>
</None>
<Content Include="umbraco.presentation\umbraco\Search\QuickSearchHandler.ashx" />
<None Include="umbraco.presentation\umbraco\templateControls\InlineXslt.xsltTemplate" />
<Content Include="umbraco.presentation\umbraco\users\NodePermissions.ascx">
<SubType>ASPXCodeBehind</SubType>
@@ -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
{
/// <summary>
/// Used to wire up events for Examine
/// </summary>
[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
{
}
}
@@ -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>
/// Summary description for quickEdit.
/// </summary>
[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)
{
}
/// <summary>
/// JsInclude1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::ClientDependency.Core.Controls.JsInclude JsInclude1;
/// <summary>
/// JsInclude3 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::ClientDependency.Core.Controls.JsInclude JsInclude3;
}
}
@@ -1 +0,0 @@
<%@ WebHandler Language="C#" CodeBehind="QuickSearchHandler.ashx.cs" Class="umbraco.presentation.umbraco.Search.QuickSearchHandler" %>
@@ -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>
/// Summary description for $codebehindclassname$
/// </summary>
[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<SearchResult> 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;
}
}
}
}