Add WebCms
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<%@ 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>
|
||||
@@ -0,0 +1,64 @@
|
||||
<%@ 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"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="codeN"> </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"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size: 1px;"> </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"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,202 @@
|
||||
<%@ 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." + ext);
|
||||
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>
|
||||
@@ -0,0 +1,149 @@
|
||||
<%@ 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>
|
||||
@@ -0,0 +1,160 @@
|
||||
<%@ 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, "&quot;").replace(/\</gi, "&lt;").replace(/\>/gi, "&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>
|
||||
@@ -0,0 +1 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="tinymce3tinymceCompress.aspx.cs" Inherits="umbraco.presentation.plugins.tinymce3.tinymce3tinymceCompress" %>
|
||||
Reference in New Issue
Block a user