Converted EditMacro.aspx over to use the correct webforms inheritance.
This commit is contained in:
@@ -145,6 +145,7 @@
|
||||
<Private>True</Private>
|
||||
<HintPath>..\packages\SqlServerCE.4.0.0.0\lib\System.Data.SqlServerCe.Entity.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.EnterpriseServices" />
|
||||
<Reference Include="System.Web">
|
||||
<Name>System.Web</Name>
|
||||
@@ -285,6 +286,13 @@
|
||||
<Compile Include="Umbraco\Developer\Packages\StarterKits.aspx.designer.cs">
|
||||
<DependentUpon>StarterKits.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Umbraco\Dialogs\EditMacro.aspx.cs">
|
||||
<DependentUpon>EditMacro.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Umbraco\Dialogs\EditMacro.aspx.designer.cs">
|
||||
<DependentUpon>EditMacro.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Umbraco\Masterpages\UmbracoDialog.master.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
@@ -418,6 +426,7 @@
|
||||
<Content Include="Umbraco\Developer\RelationTypes\RelationTypesWebService.asmx" />
|
||||
<Content Include="Umbraco\Developer\RelationTypes\TreeMenu\ActionDeleteRelationType.js" />
|
||||
<Content Include="Umbraco\Developer\RelationTypes\TreeMenu\ActionNewRelationType.js" />
|
||||
<Content Include="Umbraco\Dialogs\EditMacro.aspx" />
|
||||
<Content Include="Umbraco\Images\delete.gif" />
|
||||
<Content Include="Umbraco\Images\delete.png" />
|
||||
<Content Include="Umbraco\Images\download.png" />
|
||||
@@ -1678,7 +1687,6 @@
|
||||
<Content Include="Umbraco\Dialogs\AssignDomain.aspx" />
|
||||
<Content Include="Umbraco\Dialogs\create.aspx" />
|
||||
<Content Include="Umbraco\Dialogs\cruds.aspx" />
|
||||
<Content Include="Umbraco\Dialogs\editMacro.aspx" />
|
||||
<Content Include="Umbraco\Dialogs\emptyTrashcan.aspx" />
|
||||
<Content Include="Umbraco\Dialogs\exportDocumenttype.aspx" />
|
||||
<Content Include="Umbraco\Dialogs\imageViewer.aspx" />
|
||||
|
||||
14
src/Umbraco.Web.UI/umbraco/dialogs/EditMacro.aspx.cs
Normal file
14
src/Umbraco.Web.UI/umbraco/dialogs/EditMacro.aspx.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace Umbraco.Web.UI.Umbraco.Dialogs
|
||||
{
|
||||
public partial class EditMacro : global::umbraco.dialogs.editMacro
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
15
src/Umbraco.Web.UI/umbraco/dialogs/EditMacro.aspx.designer.cs
generated
Normal file
15
src/Umbraco.Web.UI/umbraco/dialogs/EditMacro.aspx.designer.cs
generated
Normal file
@@ -0,0 +1,15 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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.Dialogs {
|
||||
|
||||
|
||||
public partial class EditMacro {
|
||||
}
|
||||
}
|
||||
@@ -1,99 +1,97 @@
|
||||
<%@ Page Language="c#" MasterPageFile="../masterpages/umbracoPage.Master" ValidateRequest="false"
|
||||
CodeBehind="editMacro.aspx.cs" AutoEventWireup="True" Inherits="umbraco.dialogs.editMacro"
|
||||
Trace="false" %>
|
||||
<%@ Page Language="C#" MasterPageFile="../MasterPages/UmbracoPage.Master" AutoEventWireup="true" CodeBehind="EditMacro.aspx.cs" Inherits="Umbraco.Web.UI.Umbraco.Dialogs.EditMacro" %>
|
||||
|
||||
<%@ Register TagPrefix="cc2" Namespace="umbraco.uicontrols" Assembly="controls" %>
|
||||
<asp:Content ContentPlaceHolderID="head" runat="server">
|
||||
<script type="text/javascript">
|
||||
function saveTreepickerValue(appAlias, macroAlias) {
|
||||
var treePicker = window.showModalDialog('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();
|
||||
var macroAlias = '<%= _macroAlias %>';
|
||||
function saveTreepickerValue(appAlias, macroAlias) {
|
||||
var treePicker = window.showModalDialog('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();
|
||||
var macroAlias = '<%= _macroAlias %>';
|
||||
|
||||
<%if (umbraco.UmbracoSettings.UseAspNetMasterPages) { %>
|
||||
var macroElement = "umbraco:Macro";
|
||||
var macroElement = "umbraco:Macro";
|
||||
<%}else{ %>
|
||||
var macroElement = "?UMBRACO_MACRO";
|
||||
var macroElement = "?UMBRACO_MACRO";
|
||||
<%}%>
|
||||
|
||||
function registerAlias(alias, pAlias) {
|
||||
var macro = new Array();
|
||||
macro[0] = alias;
|
||||
macro[1] = pAlias;
|
||||
|
||||
macroAliases[macroAliases.length] = macro;
|
||||
}
|
||||
|
||||
function registerAlias(alias, pAlias) {
|
||||
var macro = new Array();
|
||||
macro[0] = alias;
|
||||
macro[1] = pAlias;
|
||||
|
||||
macroAliases[macroAliases.length] = macro;
|
||||
}
|
||||
|
||||
|
||||
function updateMacro() {
|
||||
var macroString = '<' + macroElement + ' ';
|
||||
|
||||
for (i=0; i<macroAliases.length; i++) {
|
||||
var controlId = macroAliases[i][0];
|
||||
var propertyName = macroAliases[i][1];
|
||||
|
||||
|
||||
var control = jQuery("#" + controlId);
|
||||
function updateMacro() {
|
||||
var macroString = '<' + macroElement + ' ';
|
||||
|
||||
for (i = 0; i < macroAliases.length; i++) {
|
||||
var controlId = macroAliases[i][0];
|
||||
var propertyName = macroAliases[i][1];
|
||||
|
||||
|
||||
var control = jQuery("#" + controlId);
|
||||
if (control == null || (!control.is('input') && !control.is('select') && !control.is('textarea'))) {
|
||||
// hack for tree based macro parameter types
|
||||
var picker = Umbraco.Controls.TreePicker.GetPickerById(controlId);
|
||||
if (picker != undefined) {
|
||||
macroString += propertyName + "=\"" + picker.GetValue() + "\" ";
|
||||
macroString += propertyName + "=\"" + picker.GetValue() + "\" ";
|
||||
}
|
||||
} else {
|
||||
if (control.is(':checkbox')) {
|
||||
if (control.is(':checked'))
|
||||
macroString += propertyName + "=\"1\" ";
|
||||
else
|
||||
macroString += propertyName + "=\"0\" ";
|
||||
if (control.is(':checkbox')) {
|
||||
if (control.is(':checked'))
|
||||
macroString += propertyName + "=\"1\" ";
|
||||
else
|
||||
macroString += propertyName + "=\"0\" ";
|
||||
|
||||
} else if (control[0].tagName.toLowerCase() == 'select') {
|
||||
var tempValue = '';
|
||||
control.find(':selected').each(function(i, selected) {
|
||||
tempValue += jQuery(this).attr('value') + ', ';
|
||||
} else if (control[0].tagName.toLowerCase() == 'select') {
|
||||
var tempValue = '';
|
||||
control.find(':selected').each(function (i, selected) {
|
||||
tempValue += jQuery(this).attr('value') + ', ';
|
||||
});
|
||||
/*
|
||||
for (var j=0; j<document.forms[0][controlId].length;j++) {
|
||||
if (document.forms[0][controlId][j].selected)
|
||||
tempValue += document.forms[0][controlId][j].value + ', ';
|
||||
}
|
||||
*/
|
||||
if (tempValue.length > 2)
|
||||
tempValue = tempValue.substring(0, tempValue.length-2)
|
||||
|
||||
macroString += propertyName + "=\"" + tempValue + "\" ";
|
||||
|
||||
}else {
|
||||
macroString += propertyName + "=\"" + pseudoHtmlEncode(document.forms[0][controlId].value) + "\" ";
|
||||
}
|
||||
/*
|
||||
for (var j=0; j<document.forms[0][controlId].length;j++) {
|
||||
if (document.forms[0][controlId][j].selected)
|
||||
tempValue += document.forms[0][controlId][j].value + ', ';
|
||||
}
|
||||
*/
|
||||
if (tempValue.length > 2)
|
||||
tempValue = tempValue.substring(0, tempValue.length - 2)
|
||||
|
||||
macroString += propertyName + "=\"" + tempValue + "\" ";
|
||||
|
||||
} else {
|
||||
macroString += propertyName + "=\"" + pseudoHtmlEncode(document.forms[0][controlId].value) + "\" ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (macroString.length > 1)
|
||||
macroString = macroString.substr(0, macroString.length-1);
|
||||
|
||||
}
|
||||
|
||||
if (macroString.length > 1)
|
||||
macroString = macroString.substr(0, macroString.length - 1);
|
||||
|
||||
<%if (!umbraco.UmbracoSettings.UseAspNetMasterPages){ %>
|
||||
macroString += " macroAlias=\"" + macroAlias + "\"";
|
||||
<%} %>
|
||||
macroString += " macroAlias=\"" + macroAlias + "\"";
|
||||
<%} %>
|
||||
|
||||
<%if (umbraco.UmbracoSettings.UseAspNetMasterPages){ %>
|
||||
macroString += " Alias=\"" + macroAlias + "\" runat=\"server\"></" + macroElement + ">";
|
||||
macroString += " Alias=\"" + macroAlias + "\" runat=\"server\"></" + macroElement + ">";
|
||||
<%} else { %>
|
||||
macroString += "></" + macroElement + ">";
|
||||
macroString += "></" + macroElement + ">";
|
||||
<%} %>
|
||||
|
||||
UmbClientMgr.contentFrame().focus();
|
||||
UmbClientMgr.contentFrame().UmbEditor.Insert(macroString, '', '<%=umbraco.helper.Request("objectId")%>');
|
||||
UmbClientMgr.closeModalWindow();
|
||||
}
|
||||
|
||||
function pseudoHtmlEncode(text) {
|
||||
return text.replace(/\"/gi,"&quot;").replace(/\</gi,"&lt;").replace(/\>/gi,"&gt;");
|
||||
}
|
||||
UmbClientMgr.contentFrame().focus();
|
||||
UmbClientMgr.contentFrame().UmbEditor.Insert(macroString, '', '<%=umbraco.helper.Request("objectId")%>');
|
||||
UmbClientMgr.closeModalWindow();
|
||||
}
|
||||
|
||||
function pseudoHtmlEncode(text) {
|
||||
return text.replace(/\"/gi, "&quot;").replace(/\</gi, "&lt;").replace(/\>/gi, "&gt;");
|
||||
}
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.propertyItemheader
|
||||
@@ -136,4 +134,4 @@
|
||||
<div id="renderContent" style="display: none">
|
||||
<asp:PlaceHolder ID="renderHolder" runat="server"></asp:PlaceHolder>
|
||||
</div>
|
||||
</asp:Content>
|
||||
</asp:Content>
|
||||
Reference in New Issue
Block a user