Add WebCms
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" Codebehind="DictionaryItemList.aspx.cs"
|
||||
Inherits="umbraco.presentation.settings.DictionaryItemList" MasterPageFile="../masterpages/umbracoPage.Master" %>
|
||||
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
|
||||
|
||||
|
||||
<asp:Content ContentPlaceHolderID="body" runat="server">
|
||||
|
||||
<cc1:UmbracoPanel ID="Panel1" runat="server" Text="Dictionary overview" Width="408px" Height="264px">
|
||||
<cc1:Pane ID="pane1" runat="server">
|
||||
<table id="dictionaryItems" style="width: 100%;">
|
||||
<asp:Literal ID="lt_table" runat="server" />
|
||||
</table>
|
||||
</cc1:Pane>
|
||||
</cc1:UmbracoPanel>
|
||||
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,15 @@
|
||||
<%@ Register Namespace="umbraco" TagPrefix="umb" Assembly="umbraco" %>
|
||||
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
|
||||
|
||||
<%@ Page Language="c#" MasterPageFile="../masterpages/umbracoPage.Master" ValidateRequest="false"
|
||||
CodeBehind="EditDictionaryItem.aspx.cs" AutoEventWireup="True" Inherits="umbraco.settings.EditDictionaryItem" %>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="body" runat="server">
|
||||
<cc1:UmbracoPanel ID="Panel1" runat="server" Width="408px" Height="264px">
|
||||
</cc1:UmbracoPanel>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function () {
|
||||
UmbClientMgr.appActions().bindSaveShortCut();
|
||||
});
|
||||
</script>
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,60 @@
|
||||
<%@ Page Language="c#" MasterPageFile="../../masterpages/umbracoPage.Master" Title="ShowUmbracoTags"
|
||||
Codebehind="ShowUmbracoTags.aspx.cs" AutoEventWireup="True"
|
||||
Inherits="umbraco.cms.presentation.settings.modal.ShowUmbracoTags" %>
|
||||
<%@ Import Namespace="Umbraco.Core.IO" %>
|
||||
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
|
||||
<style type="text/css">
|
||||
code{display: block; background: #999; color: #fff; padding: 5px; margin-bottom: 10px;white-space:normal;text-wrap:normal;}
|
||||
small{color: #000 !Important; margin-bottom: 10px; display: block;}
|
||||
</style>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="body" runat="server">
|
||||
<cc1:Pane ID="Pane7" Style="padding-right: 10px; padding-left: 10px; padding-bottom: 10px;
|
||||
padding-top: 10px; text-align: left" runat="server">
|
||||
<table id="Table1" width="100%">
|
||||
<tr><th width="120">Insert field</th><td>
|
||||
<code>
|
||||
<umbraco:Item field="bodyText" runat="server"/>
|
||||
</code>
|
||||
<small>
|
||||
Fetches a value from the current page.
|
||||
</small>
|
||||
</td></tr>
|
||||
<tr><th width="120">Insert macro</th><td>
|
||||
<code>
|
||||
<umbraco:Macro macroAlias="MacroAlias" Alias="MacroAlias" runat="server"/>
|
||||
</code>
|
||||
<small>Inserts a macro into the template</small>
|
||||
</td></tr>
|
||||
<tr><th width="120">Load child template</th><td>
|
||||
<code>
|
||||
<asp:ContentPlaceHolder runat="server" id="<%= alias %>ContentPlaceHolder" />
|
||||
</code>
|
||||
<small>
|
||||
This is the default placeholder for content stored in a child template using this exact template as it's master template.
|
||||
</small>
|
||||
</td></tr>
|
||||
<tr><th width="120">Disable Request Validation</th><td>
|
||||
<code>
|
||||
<umbraco:DisableRequestValidation runat="server"/>
|
||||
</code>
|
||||
<small>Disable ASP.NET request validation. It's the same as adding a enableEventValidation="false" to a page directive (but this is not possible in Umbraco as all pages use the same ASPX page for all pages)</small>
|
||||
</td></tr>
|
||||
<tr><th width="120">MetaBlogApi / Content Channels</th><td>
|
||||
<code>
|
||||
<link rel="EditURI" type="application/rsd+xml" href="http://<%=Request.ServerVariables["SERVER_NAME"] %><%= IOHelper.ResolveUrl(SystemDirectories.Umbraco)%>/channels/rsd.aspx" />
|
||||
<br /><br />
|
||||
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://<%=Request.ServerVariables["SERVER_NAME"] %><%= IOHelper.ResolveUrl(SystemDirectories.Umbraco)%>/channels/wlwmanifest.aspx" />
|
||||
</code>
|
||||
<small>
|
||||
Insert the above two elements to the head element to gain optimal support for
|
||||
using the MetaBlog Apis with 3rd party clients and to enable autodiscovery for Windows
|
||||
Live Writer.
|
||||
</small>
|
||||
</td></tr>
|
||||
</table>
|
||||
</cc1:Pane>
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,59 @@
|
||||
<%@ Page Language="C#" MasterPageFile="../../masterpages/umbracoPage.Master" AutoEventWireup="true"
|
||||
CodeBehind="editScript.aspx.cs" Inherits="umbraco.cms.presentation.settings.scripts.editScript"
|
||||
ValidateRequest="False" %>
|
||||
<%@ Import Namespace="Umbraco.Core" %>
|
||||
|
||||
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
|
||||
<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>
|
||||
|
||||
<asp:Content ID="DocTypeContent" ContentPlaceHolderID="DocType" runat="server">
|
||||
<!DOCTYPE html>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="head" runat="server">
|
||||
|
||||
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="Editors/EditScript.js" PathNameAlias="UmbracoClient" />
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
(function ($) {
|
||||
$(document).ready(function () {
|
||||
var editor = new Umbraco.Editors.EditScript({
|
||||
nameTxtBox: $('#<%= NameTxt.ClientID %>'),
|
||||
originalFileName: '<%= NameTxt.Text %>',
|
||||
saveButton: $("#<%= ((Control)SaveButton).ClientID %>"),
|
||||
restServiceLocation: "<%= Url.GetSaveFileServicePath() %>",
|
||||
editorSourceElement: $('#<%= editorSource.ClientID %>'),
|
||||
treeSyncPath: "<%= ScriptTreeSyncPath %>",
|
||||
lttPathElement: $('#<%= lttPath.ClientID %>')
|
||||
});
|
||||
editor.init();
|
||||
|
||||
//bind save shortcut
|
||||
UmbClientMgr.appActions().bindSaveShortCut();
|
||||
});
|
||||
})(jQuery);
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
<asp:Content ContentPlaceHolderID="body" runat="server">
|
||||
<cc1:TabView ID="Panel1" runat="server" hasMenu="true">
|
||||
<cc1:Pane ID="Pane7" runat="server" >
|
||||
<cc1:PropertyPanel ID="pp_source" runat="server">
|
||||
<cc1:CodeArea ID="editorSource" CodeBase="JavaScript" ClientSaveMethod="doSubmit"
|
||||
runat="server" AutoResize="false" />
|
||||
</cc1:PropertyPanel>
|
||||
</cc1:Pane>
|
||||
|
||||
<cc1:Pane ID="Pane8" runat="server" >
|
||||
<cc1:PropertyPanel runat="server" ID="pp_name">
|
||||
<asp:TextBox ID="NameTxt" runat="server"></asp:TextBox>
|
||||
</cc1:PropertyPanel>
|
||||
<cc1:PropertyPanel runat="server" ID="pp_path">
|
||||
<asp:Literal ID="lttPath" runat="server" />
|
||||
</cc1:PropertyPanel>
|
||||
|
||||
</cc1:Pane>
|
||||
</cc1:TabView>
|
||||
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,68 @@
|
||||
<%@ Page Language="c#" MasterPageFile="../../../masterpages/umbracoPage.Master" CodeBehind="EditStyleSheetProperty.aspx.cs"
|
||||
AutoEventWireup="True" Inherits="Umbraco.Web.UI.Umbraco.Settings.Stylesheet.Property.EditStyleSheetProperty"
|
||||
ValidateRequest="False" %>
|
||||
|
||||
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="body" runat="server">
|
||||
<cc1:UmbracoPanel ID="Panel1" runat="server" Text="Edit stylesheet property" Width="432px" Height="176px" hasMenu="true">
|
||||
<cc1:Pane ID="Pane7" CssClass="pane" runat="server">
|
||||
<table cellspacing="0" cellpadding="4" border="0">
|
||||
<tr>
|
||||
<th width="30%">
|
||||
<%=umbraco.ui.Text("name", UmbracoUser)%>:
|
||||
</th>
|
||||
<td class="propertyContent">
|
||||
<asp:HiddenField runat="server" ID="OriginalName"/>
|
||||
<asp:TextBox ID="NameTxt" Width="350px" runat="server" /><br />
|
||||
<small><%=umbraco.ui.Text("stylesheet", "nameHelp", UmbracoUser)%></small>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="30%">
|
||||
<%=umbraco.ui.Text("alias", UmbracoUser)%>:
|
||||
</th>
|
||||
<td class="propertyContent">
|
||||
<asp:TextBox ID="AliasTxt" Width="350px" runat="server" /><br />
|
||||
<small><%=umbraco.ui.Text("stylesheet", "aliasHelp", UmbracoUser)%></small>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="30%">
|
||||
<%=umbraco.ui.Text("styles", UmbracoUser)%>:
|
||||
</th>
|
||||
<td class="propertyContent">
|
||||
<asp:TextBox ID="Content" Style="width: 350px" TextMode="MultiLine" runat="server" />
|
||||
<br />
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="30%">
|
||||
<%=umbraco.ui.Text("preview", UmbracoUser)%>:
|
||||
</th>
|
||||
<td class="propertyContent">
|
||||
<div id="preview" style="padding: 10px; border: 1px solid #ccc; width: 330px;">
|
||||
<div runat="server" id="prStyles">
|
||||
a b c d e f g h i j k l m n o p q r s t u v w x t z
|
||||
<br />
|
||||
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z<br />
|
||||
1 2 3 4 5 6 7 8 9 0 € £ $ % & (.,;:'\"!?)
|
||||
<br />
|
||||
<br />
|
||||
Just keep examining every bid quoted for zinc etchings.
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</cc1:Pane>
|
||||
</cc1:UmbracoPanel>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function () {
|
||||
UmbClientMgr.appActions().bindSaveShortCut();
|
||||
});
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,53 @@
|
||||
<%@ Page Language="c#" MasterPageFile="../../masterpages/umbracoPage.Master" CodeBehind="editstylesheet.aspx.cs" AutoEventWireup="True"
|
||||
Inherits="Umbraco.Web.UI.Umbraco.Settings.Stylesheet.EditStyleSheet" ValidateRequest="False" %>
|
||||
<%@ Import Namespace="Umbraco.Core" %>
|
||||
|
||||
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
|
||||
<%@ Register TagPrefix="cdf" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="head" runat="server">
|
||||
<cdf:JsInclude runat="server" FilePath="Editors/EditStyleSheet.js" PathNameAlias="UmbracoClient"></cdf:JsInclude>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
(function ($) {
|
||||
$(document).ready(function () {
|
||||
var editor = new Umbraco.Editors.EditStyleSheet({
|
||||
nameTxtBox: $('#<%= NameTxt.ClientID %>'),
|
||||
originalFileName: '<%= NameTxt.Text %>',
|
||||
saveButton: $("#<%= ((Control)SaveButton).ClientID %>"),
|
||||
editorSourceElement: $('#<%= editorSource.ClientID %>'),
|
||||
restServiceLocation: "<%= Url.GetSaveFileServicePath() %>",
|
||||
treeSyncPath: "<%= TreeSyncPath %>",
|
||||
lttPathElement: $('#<%= lttPath.ClientID %>')
|
||||
});
|
||||
editor.init();
|
||||
|
||||
//bind save shortcut
|
||||
UmbClientMgr.appActions().bindSaveShortCut();
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="body" runat="server">
|
||||
<cc1:TabView ID="Panel1" runat="server" CssClass="panel" hasMenu="true">
|
||||
|
||||
<cc1:Pane ID="Pane7" CssClass="pane" runat="server">
|
||||
<cc1:PropertyPanel ID="pp_source" runat="server">
|
||||
<cc1:CodeArea ID="editorSource" CodeBase="Css" AutoResize="false" runat="server" />
|
||||
</cc1:PropertyPanel>
|
||||
</cc1:Pane>
|
||||
|
||||
<cc1:Pane ID="Pane8" CssClass="pane" runat="server">
|
||||
<cc1:PropertyPanel ID="pp_name" runat="server">
|
||||
<asp:TextBox ID="NameTxt" Width="350px" runat="server"></asp:TextBox>
|
||||
</cc1:PropertyPanel>
|
||||
<cc1:PropertyPanel ID="pp_path" runat="server">
|
||||
<asp:Literal ID="lttPath" runat="server"></asp:Literal>
|
||||
</cc1:PropertyPanel>
|
||||
</cc1:Pane>
|
||||
</cc1:TabView>
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,88 @@
|
||||
<%@ Page Language="C#" MasterPageFile="../../masterpages/umbracoPage.Master" AutoEventWireup="True"
|
||||
CodeBehind="EditView.aspx.cs" Inherits="Umbraco.Web.UI.Umbraco.Settings.Views.EditView"
|
||||
ValidateRequest="False" %>
|
||||
|
||||
<%@ OutputCache Location="None" %>
|
||||
|
||||
<%@ Import Namespace="Umbraco.Core" %>
|
||||
<%@ Import Namespace="Umbraco.Core.IO" %>
|
||||
<%@ Import Namespace="Umbraco.Web" %>
|
||||
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
|
||||
<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>
|
||||
|
||||
<asp:Content ID="DocTypeContent" ContentPlaceHolderID="DocType" runat="server">
|
||||
<!DOCTYPE html>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="head" runat="server">
|
||||
|
||||
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="Editors/EditView.js" PathNameAlias="UmbracoClient" />
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
//we need to have this as a global object since we reference this object with callbacks.
|
||||
var editViewEditor;
|
||||
|
||||
(function ($) {
|
||||
$(document).ready(function () {
|
||||
//create and assign a new EditView object
|
||||
editViewEditor = new Umbraco.Editors.EditView({
|
||||
treeSyncPath: "<%=TemplateTreeSyncPath%>",
|
||||
currentTreeType: "<%=CurrentTreeType%>",
|
||||
editorType: "<%= EditorType.ToString() %>",
|
||||
originalFileName: "<%=OriginalFileName %>",
|
||||
restServiceLocation: "<%= Url.GetSaveFileServicePath() %>",
|
||||
masterPageDropDown: $("#<%= MasterTemplate.ClientID %>"),
|
||||
nameTxtBox: $("#<%= NameTxt.ClientID %>"),
|
||||
aliasTxtBox: $("#<%= AliasTxt.ClientID %>"),
|
||||
saveButton: $("#<%= ((Control)SaveButton).ClientID %>"),
|
||||
templateId: '<%= Request.CleanForXss("templateID") %>',
|
||||
codeEditorElementId: '<%= editorSource.ClientID %>',
|
||||
modalUrl: "<%= IOHelper.ResolveUrl(SystemDirectories.Umbraco) %>/dialogs/editMacro.aspx"
|
||||
});
|
||||
|
||||
//initialize it.
|
||||
editViewEditor.init();
|
||||
|
||||
//bind save shortcut
|
||||
UmbClientMgr.appActions().bindSaveShortCut();
|
||||
});
|
||||
})(jQuery);
|
||||
|
||||
</script>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
|
||||
<asp:Content ContentPlaceHolderID="body" runat="server">
|
||||
|
||||
<cc1:TabView ID="Panel1" runat="server" hasMenu="true">
|
||||
|
||||
<cc1:Pane ID="Pane8" runat="server" >
|
||||
<cc1:PropertyPanel ID="pp_source" runat="server">
|
||||
<cc1:CodeArea ID="editorSource" runat="server" CodeBase="Razor" ClientSaveMethod="doSubmit" AutoResize="false" />
|
||||
</cc1:PropertyPanel>
|
||||
</cc1:Pane>
|
||||
|
||||
<cc1:Pane ID="Pane7" runat="server" >
|
||||
|
||||
<cc1:PropertyPanel ID="pp_name" runat="server">
|
||||
<asp:Literal runat="server" ID="PathPrefix"></asp:Literal>
|
||||
<asp:TextBox ID="NameTxt" runat="server"></asp:TextBox>
|
||||
</cc1:PropertyPanel>
|
||||
|
||||
<cc1:PropertyPanel ID="pp_alias" runat="server">
|
||||
<asp:TextBox ID="AliasTxt" runat="server"></asp:TextBox>
|
||||
</cc1:PropertyPanel>
|
||||
|
||||
<cc1:PropertyPanel ID="pp_masterTemplate" runat="server">
|
||||
<asp:DropDownList ID="MasterTemplate" runat="server" />
|
||||
</cc1:PropertyPanel>
|
||||
|
||||
|
||||
</cc1:Pane>
|
||||
|
||||
|
||||
</cc1:TabView>
|
||||
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,19 @@
|
||||
<%@ Page Language="c#" CodeBehind="editLanguage.aspx.cs" AutoEventWireup="True" MasterPageFile="../masterpages/umbracoPage.Master"
|
||||
Inherits="umbraco.settings.editLanguage" %>
|
||||
|
||||
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
|
||||
<asp:Content ContentPlaceHolderID="body" runat="server">
|
||||
<cc1:UmbracoPanel ID="Panel1" runat="server" Width="608px" Height="336px" hasMenu="true">
|
||||
<cc1:Pane ID="Pane7" runat="server">
|
||||
<cc1:PropertyPanel runat="server" ID="pp_language">
|
||||
<asp:DropDownList ID="Cultures" runat="server">
|
||||
</asp:DropDownList>
|
||||
</cc1:PropertyPanel>
|
||||
</cc1:Pane>
|
||||
</cc1:UmbracoPanel>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function () {
|
||||
UmbClientMgr.appActions().bindSaveShortCut();
|
||||
});
|
||||
</script>
|
||||
</asp:Content>
|
||||
@@ -0,0 +1,166 @@
|
||||
<%@ Page MasterPageFile="../masterpages/umbracoPage.Master" Language="c#" CodeBehind="EditTemplate.aspx.cs"
|
||||
ValidateRequest="false" AutoEventWireup="True" Inherits="Umbraco.Web.UI.Umbraco.Settings.EditTemplate" %>
|
||||
|
||||
<%@ OutputCache Location="None" %>
|
||||
|
||||
<%@ Import Namespace="Umbraco.Core" %>
|
||||
<%@ Import Namespace="Umbraco.Core.Configuration" %>
|
||||
<%@ Import Namespace="Umbraco.Core.IO" %>
|
||||
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
|
||||
<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>
|
||||
|
||||
<asp:Content ID="DocTypeContent" ContentPlaceHolderID="DocType" runat="server">
|
||||
<!DOCTYPE html>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
|
||||
<umb:CssInclude ID="CssInclude1" runat="server" FilePath="splitbutton/splitbutton.css" PathNameAlias="UmbracoClient" />
|
||||
<umb:JsInclude ID="JsInclude" runat="server" FilePath="splitbutton/jquery.splitbutton.js" PathNameAlias="UmbracoClient" />
|
||||
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="Editors/EditTemplate.js" PathNameAlias="UmbracoClient" />
|
||||
<script type="text/javascript">
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
//create the editor
|
||||
var editor = new Umbraco.Editors.EditTemplate({
|
||||
templateAliasClientId: '<%= AliasTxt.ClientID %>',
|
||||
templateNameClientId: '<%= NameTxt.ClientID %>',
|
||||
saveButton: $("#<%= ((Control)SaveButton).ClientID %>"),
|
||||
restServiceLocation: "<%= Url.GetSaveFileServicePath() %>",
|
||||
umbracoPath: '<%= IOHelper.ResolveUrl(SystemDirectories.Umbraco) %>',
|
||||
editorClientId: '<%= editorSource.ClientID %>',
|
||||
useMasterPages: <%=UmbracoConfig.For.UmbracoSettings().Templates.UseAspNetMasterPages.ToString().ToLower()%>,
|
||||
templateId: <%= Request.QueryString["templateID"] %>,
|
||||
masterTemplateId: jQuery('#<%= MasterTemplate.ClientID %>').val(),
|
||||
masterPageDropDown: $("#<%= MasterTemplate.ClientID %>"),
|
||||
treeSyncPath: '<%=TemplateTreeSyncPath%>',
|
||||
text: {
|
||||
templateErrorHeader: "<%= HttpUtility.JavaScriptStringEncode(umbraco.ui.Text("speechBubbles", "templateErrorHeader")) %>",
|
||||
templateSavedHeader: "<%= HttpUtility.JavaScriptStringEncode(umbraco.ui.Text("speechBubbles", "templateSavedHeader")) %>",
|
||||
templateErrorText: "<%= HttpUtility.JavaScriptStringEncode(umbraco.ui.Text("speechBubbles", "templateErrorText")) %>",
|
||||
templateSavedText: "<%= HttpUtility.JavaScriptStringEncode(umbraco.ui.Text("speechBubbles", "templateSavedText")) %>"
|
||||
}
|
||||
});
|
||||
|
||||
editor.init();
|
||||
});
|
||||
|
||||
//TODO: the below should be refactored into being part of the EditTemplate.js class but have left it here for now since i don't have time.
|
||||
|
||||
function umbracoTemplateInsertMasterPageContentContainer() {
|
||||
var master = document.getElementById('<%= MasterTemplate.ClientID %>')[document.getElementById('<%= MasterTemplate.ClientID %>').selectedIndex].value;
|
||||
if (master == "") master = 0;
|
||||
umbraco.presentation.webservices.legacyAjaxCalls.TemplateMasterPageContentContainer(<%=Request["templateID"] %>, master, umbracoTemplateInsertMasterPageContentContainerDo);
|
||||
}
|
||||
|
||||
function umbracoTemplateInsertMasterPageContentContainerDo(result) {
|
||||
UmbEditor.Insert(result + '\n', '\n</asp\:Content>\n', '<%= editorSource.ClientID%>');
|
||||
}
|
||||
|
||||
function changeMasterPageFile() {
|
||||
var editor = document.getElementById("<%= editorSource.ClientID %>");
|
||||
var templateDropDown = document.getElementById("<%= MasterTemplate.ClientID %>");
|
||||
|
||||
var templateCode = UmbEditor.GetCode();
|
||||
var selectedTemplate = templateDropDown.options[templateDropDown.selectedIndex].id;
|
||||
var masterTemplate = "<%= Umbraco.Core.IO.SystemDirectories.Masterpages%>/" + selectedTemplate + ".master";
|
||||
|
||||
if (selectedTemplate == "")
|
||||
masterTemplate = "<%= Umbraco.Core.IO.SystemDirectories.Umbraco%>/masterpages/default.master";
|
||||
|
||||
var regex = /MasterPageFile=[~a-z0-9/._"-]+/im;
|
||||
|
||||
if (templateCode.match(regex)) {
|
||||
templateCode = templateCode.replace(regex, 'MasterPageFile="' + masterTemplate + '"');
|
||||
|
||||
UmbEditor.SetCode(templateCode);
|
||||
|
||||
}
|
||||
else {
|
||||
//todo, spot if a directive is there, and if not suggest that the user inserts it..
|
||||
alert("Master directive not found...");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function insertContentElement(id) {
|
||||
|
||||
//nasty hack to avoid asp.net freaking out because of the markup...
|
||||
var cp = 'asp:Content ContentPlaceHolderId="' + id + '"';
|
||||
cp += ' runat="server"';
|
||||
cp += '>\n\t<!-- Insert "' + id + '" markup here -->';
|
||||
|
||||
UmbEditor.Insert('\n<' + cp, '\n</asp:Content' + '>\n', '<%= editorSource.ClientID %>');
|
||||
}
|
||||
|
||||
function insertPlaceHolderElement(id) {
|
||||
|
||||
var cp = 'asp:ContentPlaceHolder Id="' + id + '"';
|
||||
cp += ' runat="server"';
|
||||
cp += '>\n\t<!-- Insert default "' + id + '" markup here -->';
|
||||
|
||||
UmbEditor.Insert('\n<' + cp, '\n</asp:ContentPlaceHolder' + '>\n', '<%= editorSource.ClientID %>');
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="body" runat="server">
|
||||
<cc1:TabView ID="Panel1" runat="server" hasMenu="true">
|
||||
|
||||
<cc1:Pane ID="Pane7" runat="server">
|
||||
<cc1:PropertyPanel ID="pp_name" runat="server">
|
||||
<asp:TextBox ID="NameTxt" runat="server"></asp:TextBox>
|
||||
</cc1:PropertyPanel>
|
||||
<cc1:PropertyPanel ID="pp_alias" runat="server">
|
||||
<asp:TextBox ID="AliasTxt" runat="server"></asp:TextBox>
|
||||
</cc1:PropertyPanel>
|
||||
<cc1:PropertyPanel ID="pp_masterTemplate" runat="server">
|
||||
<asp:DropDownList ID="MasterTemplate" runat="server" />
|
||||
</cc1:PropertyPanel>
|
||||
</cc1:Pane>
|
||||
|
||||
<cc1:Pane ID="Pane8" runat="server">
|
||||
<cc1:PropertyPanel ID="pp_source" runat="server">
|
||||
<cc1:CodeArea ID="editorSource" runat="server" CodeBase="HtmlMixed" EditorMimeType="text/html" ClientSaveMethod="doSubmit"
|
||||
AutoResize="false" />
|
||||
</cc1:PropertyPanel>
|
||||
</cc1:Pane>
|
||||
|
||||
</cc1:TabView>
|
||||
<div id="splitButton" style="display: inline; height: 23px; vertical-align: top;">
|
||||
<a href="#" id="sb" class="sbLink">
|
||||
<img alt="Insert Inline Razor Macro" src="../images/editor/insRazorMacro.png" title="Insert Inline Razor Macro"
|
||||
style="vertical-align: top;">
|
||||
</a>
|
||||
</div>
|
||||
<div id="codeTemplateMenu" style="width: 285px;">
|
||||
<asp:Repeater ID="rpt_codeTemplates" runat="server">
|
||||
<ItemTemplate>
|
||||
<div class="codeTemplate" rel="<%# DataBinder.Eval(Container, "DataItem.Key") %>">
|
||||
<%# DataBinder.Eval(Container, "DataItem.Value") %>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</div>
|
||||
<div id="splitButtonMacro" style="display: inline; height: 23px; vertical-align: top;">
|
||||
<a href="#" id="sbMacro" class="sbLink">
|
||||
<img alt="Insert Macro" src="../images/editor/insMacroSB.png" title="Insert Macro"
|
||||
style="vertical-align: top;">
|
||||
</a>
|
||||
</div>
|
||||
<div id="macroMenu" style="width: 285px">
|
||||
<asp:Repeater ID="rpt_macros" runat="server">
|
||||
<ItemTemplate>
|
||||
<div class="macro" rel="<%# DataBinder.Eval(Container, "DataItem.macroAlias")%>"
|
||||
params="<%# DoesMacroHaveSettings(DataBinder.Eval(Container, "DataItem.id").ToString()) %>">
|
||||
<%# DataBinder.Eval(Container, "DataItem.macroName")%>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function () {
|
||||
UmbClientMgr.appActions().bindSaveShortCut();
|
||||
});
|
||||
</script>
|
||||
</asp:Content>
|
||||
Reference in New Issue
Block a user