- This page doesn't contain a MediaPicker property with the alias of 'RelatedMedia'
- or No image is selected on this page
-
-}
diff --git a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/MultinodeTree-picker.cshtml b/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/MultinodeTree-picker.cshtml
new file mode 100644
index 0000000000..7e2d252473
--- /dev/null
+++ b/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/MultinodeTree-picker.cshtml
@@ -0,0 +1,25 @@
+@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 *@
+>)
-
- NOTE: It is safe to remove this comment (anything between @ * * @), the code that generates the list is only the below!
-*@
-
-@inherits umbraco.MacroEngines.DynamicNodeContext
-@{
- var pagesToList = @Model.Children;
-
- // configuration
- var itemsPerPage = String.IsNullOrEmpty(Parameter.ItemsPerPage) ? 3 : int.Parse(Parameter.ItemsPerPage);
- var previousLabel = String.IsNullOrEmpty(Parameter.PreviousLabel) ? "Previous" : Parameter.PreviousLabel;
- var nextLabel = String.IsNullOrEmpty(Parameter.NextLabel) ? "Next" : Parameter.NextLabel;
-
- // paging calculations
- var numberOfItems = pagesToList.Count();
- int currentPage = 1;
- if (!int.TryParse(HttpContext.Current.Request.QueryString["Page"], out currentPage)) {
- currentPage = 1;
- }
- currentPage--;
- var numberOfPages = numberOfItems % itemsPerPage == 0 ? Math.Ceiling((decimal)(numberOfItems / itemsPerPage)) : Math.Ceiling((decimal)(numberOfItems / itemsPerPage))+1;
-
-
- Total Items: @numberOfItems
- Items per Page: @itemsPerPage
- Pages: @numberOfPages;
- Current Page: @(currentPage)
-
-
-
- @foreach(var item in pagesToList.Skip(currentPage*itemsPerPage).Take(itemsPerPage))
- {
- - @item.Name
- }
-
-
-
- @{
- // Google style paging links
- if (currentPage > 0) {
- « @previousLabel
- } else {
- « @previousLabel
- }
-
- var Pages = Enumerable.Range(1, (int)numberOfPages);
- foreach(var number in Pages) {
- if (number-1 != currentPage) {
- @number
- } else {
- @number
- }
- @Html.Raw("  ");
- }
-
- if (currentPage < Pages.Count()-1) {
- @nextLabel »
- } else {
- @nextLabel »
- }
- }
-
-}
diff --git a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/SelectChildrenByDocumentType.cshtml b/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/SelectChildrenByDocumentType.cshtml
deleted file mode 100644
index c7d2652526..0000000000
--- a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/SelectChildrenByDocumentType.cshtml
+++ /dev/null
@@ -1,16 +0,0 @@
-@*
-LIST CHILDREN BY TYPE
-=================================
-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 (even works in plural for readability)!
-For instance .Textpage or .Textpages (you can find the alias of your Document Type by editing it in the
-Settings section).
-
-NOTE: It is safe to remove this comment (anything between @ * * @), the code that generates the list is only the below!
-*@
-
- @foreach (var item in @Model.Textpages.Where("Visible"))
- {
- - @item.Name
-}
-
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/SiteMap.cshtml b/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/SiteMap.cshtml
index e25ac0e108..d9d2ec35df 100644
--- a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/SiteMap.cshtml
+++ b/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/SiteMap.cshtml
@@ -1,44 +1,38 @@
-@*
-SITEMAP
-=================================
-This snippet generates a complete sitemap of all pages that are published and visible (it'll filter out any
-pages with a property named "umbracoNaviHide" that's set to 'true'). It's also a great example on how to make
-helper methods in Razor and how to pass values to your '.Where' filters.
-
-How to Customize for re-use (only applies to Macros, not if you insert this snippet directly in a template):
-- If you add a Macro Parameter with the alias of "MaxLevelForSitemap" which specifies how deep in the hierarchy to traverse
-
-How it works:
-- The first line (var maxLevelForSitemap) assigns default values if none is specified via Macro Parameters
-- Next is a helper method 'traverse' which uses recursion to keep making new lists for each level in the sitemap
-- Inside the the 'traverse' method there's an example of using a 'Dictionary' to pass the 'maxLevelForSitemap' to
- the .Where filter
-- Finally the 'traverse' method is called taking the very top node of the website by calling AncesterOrSelf()
-
-NOTE: It is safe to remove this comment (anything between @ * * @), the code that generates the list is only the below!
-*@
-
@inherits umbraco.MacroEngines.DynamicNodeContext
+@{
+ @* Walk up the tree from the current page to get the root node *@
+ var rootNode = Model.AncestorOrself(1);
+}
+
+@*Render the sitemap by passing the root node to the traverse helper*@
+
+ @traverse(@Model.AncestorOrSelf())
+
+
+
+
+@*Helper method to travers through all descendants*@
@helper traverse(dynamic node){
+
+@*If a MaxLevelForSitemap parameter is passed to the macro, otherwise default to 4 levels*@
var maxLevelForSitemap = String.IsNullOrEmpty(Parameter.MaxLevelForSitemap) ? 4 : int.Parse(Parameter.MaxLevelForSitemap);
-var values = new Dictionary();
-values.Add("maxLevelForSitemap", maxLevelForSitemap) ;
+@*Select visible children *@
+var items = node.Children.Where("Visible").Where("Level <= " + maxLevelForSitemap);
- var items = node.Children.Where("Visible").Where("Level <= maxLevelForSitemap", values);
- if (items.Count() > 0) {
+
+@*If any items are returned, render a list *@
+if (items.Any()) {
@foreach (var item in items) {
- -
+
-
@item.Name
+
+ @*Run the traverse helper again *@
@traverse(item)
}
}
-}
-
- @traverse(@Model.AncestorOrSelf())
-
-
+}
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/TwitterFeed.cshtml b/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/TwitterFeed.cshtml
new file mode 100644
index 0000000000..86cbe66514
--- /dev/null
+++ b/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/TwitterFeed.cshtml
@@ -0,0 +1,217 @@
+@inherits umbraco.MacroEngines.DynamicNodeContext
+
+
+@{
+ @*
+ Macro Parameters To Create
+ Show:True Alias:twitterUsername Name:Twitter Username Type:Textstring Defaults to: umbraco
+ Show:True Alias:includeRTs Name:Include Retweets Type:Textstring Defaults to: false
+ Show:True Alias:excludeReplies Name:Exclude Replies Type:Textstring Defaults to: false
+ Show:True Alias:noTweets Name:Number of Tweets Type:Integer Defaults to: 1
+ *@
+
+ var twitterUsername = String.IsNullOrEmpty(Parameter.twitterUsername) ? "umbraco" : Parameter.twitterUsername;
+ var includeRTs = String.IsNullOrEmpty(Parameter.includeRTs) ? false : Parameter.includeRTs;
+ var excludeReplies = String.IsNullOrEmpty(Parameter.excludeReplies) ? false : Parameter.excludeReplies;
+ var noTweets = String.IsNullOrEmpty(Parameter.noTweets) ? 1 : Parameter.noTweets;
+
+
+ @* Twitter JSON URL *@
+ var twitterURL = string.Format(
+ "https://api.twitter.com/1/statuses/user_timeline.json?screen_name={0}&include_rts={1}&exclude_replies={2}&include_entities=1&count={3}",
+ twitterUsername,
+ includeRTs,
+ excludeReplies,
+ noTweets);
+}
+
+
+@* Fetch the JSON from Twitters API *@
+@using (var client = new System.Net.WebClient())
+{
+ @* Fetch the JSON from Twitter *@
+ var response = client.DownloadString(new Uri(twitterURL));
+
+ @* Decode the JSON so we can interate over it *@
+ var tweets = Json.Decode(response);
+
+
+ @foreach (var tweet in tweets)
+ {
+ -
+ @* Tweet with formatted links *@
+
@formatLinks(tweet.text, tweet.entities)
+
+
+ @* Format Tweet Date and ouput as 24/03/12 @14:05 *@
+ @formatDate(tweet.created_at).ToString("dd/MM/yy @ HH:mm")
+
+
+
+ @* Profile Image *@
+
+
+ @* Your real name (not profile name) *@
+ @tweet.user.name
+
+
+ @* Google Map (if tweet has geo info) *@
+ @if (tweet.geo != null)
+ {
+ @Html.Raw(displayMap(tweet.geo));
+ }
+
+ @* Dislay Image (if tweet has image attached *@
+ @if (tweet.entities.media != null)
+ {
+
+
+
+ }
+
+ }
+
+}
+
+@functions
+{
+ DateTime formatDate(string twitterDate)
+ {
+ //Example tweet date
+ //Fri Mar 02 16:09:35 +0000 2012
+ //ddd MMM dd HH:mm:ss zz00 yyyy
+ DateTime tweetDate = DateTime.ParseExact(twitterDate, "ddd MMM dd HH:mm:ss zz00 yyyy", null);
+
+ return tweetDate;
+ }
+
+ String displayMap(dynamic geo)
+ {
+ //Get the lat & long values
+ var tweetLat = geo.coordinates[0];
+ var tweetLong = geo.coordinates[1];
+
+ //Format the string to return the image
+ var googleMap = string.Format("http://maps.googleapis.com/maps/api/staticmap?center={0},{1}&zoom=14&size=250x250&maptype=roadmap&sensor=false&markers={0}, {1}", tweetLat, tweetLong);
+ var mapImage = string.Format("
", googleMap);
+
+ return mapImage;
+ }
+
+ IHtmlString formatLinks(string tweet, dynamic entities)
+ {
+ //A List of tweet entities so we can sort all of them
+ IList tweetEntities = new List();
+
+ //Get URLs
+ var links = entities.urls;
+
+ //Check we have links to loop over
+ if (links != null)
+ {
+ //For each link in the collection of links
+ foreach (var link in links)
+ {
+ var startPosition = link.indices[0];
+ var endPosition = link.indices[1];
+ var length = endPosition - startPosition;
+
+ var url = link.url; //The short t.co link
+ var displayURL = link.display_url; //A friendly version of the full link (may be truncated)
+
+ var newText = string.Format("{1}", url, displayURL);
+ var oldText = tweet.Substring(startPosition, length);
+
+
+ //Create a new entity
+ tweetEntity entity = new tweetEntity();
+ entity.startPosition = startPosition;
+ entity.endPosition = endPosition;
+ entity.newText = newText;
+ entity.oldText = oldText;
+
+ //Add it to the collection
+ tweetEntities.Add(entity);
+ }
+ }
+
+
+ //Get user mentions (@umbraco)
+ var mentions = entities.user_mentions;
+
+ //Check we have mentions to loop over
+ if (mentions != null)
+ {
+ //For each mention in the collection of mentions
+ foreach (var mention in mentions)
+ {
+ var startPosition = mention.indices[0];
+ var endPosition = mention.indices[1];
+ var length = endPosition - startPosition;
+
+ var username = mention.screen_name;
+
+ var newText = string.Format("@{0}", username);
+ var oldText = tweet.Substring(startPosition, length);
+
+ //Create a new entity
+ tweetEntity entity = new tweetEntity();
+ entity.startPosition = startPosition;
+ entity.endPosition = endPosition;
+ entity.newText = newText;
+ entity.oldText = oldText;
+
+ //Add to collection
+ tweetEntities.Add(entity);
+ }
+ }
+
+ //Get hashtags
+ var hashtags = entities.hashtags;
+
+ //Check we have hash to loop over
+ if (hashtags != null)
+ {
+ foreach (var hash in hashtags)
+ {
+ var startPosition = hash.indices[0];
+ var endPosition = hash.indices[1];
+ var length = endPosition - startPosition;
+ var hashtag = hash.text;
+
+ var newText = string.Format("#{0}", hashtag);
+ var oldText = tweet.Substring(startPosition, length);
+
+ //Create a new entity
+ tweetEntity entity = new tweetEntity();
+ entity.startPosition = startPosition;
+ entity.endPosition = endPosition;
+ entity.newText = newText;
+ entity.oldText = oldText;
+
+ //Add to collection
+ tweetEntities.Add(entity);
+ }
+ }
+
+ //For each item in the tweet entities in reverse order
+ //If we update the string in reverse order the remaining start/end indexs will still be correct
+ foreach (var item in tweetEntities.OrderByDescending(x => x.startPosition))
+ {
+ //Lets update the tweet text
+ tweet = tweet.Replace(item.oldText, item.newText);
+ }
+
+
+ //Return the new tweet with all the links added in
+ return Html.Raw(tweet);
+ }
+
+ public class tweetEntity
+ {
+ public int startPosition { get; set; }
+ public int endPosition { get; set; }
+ public string oldText { get; set; }
+ public string newText { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/UsingRelatedLinks.cshtml b/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/UsingRelatedLinks.cshtml
deleted file mode 100644
index 628dcfb51b..0000000000
--- a/src/Umbraco.Web.UI/umbraco/scripting/templates/cshtml/UsingRelatedLinks.cshtml
+++ /dev/null
@@ -1,37 +0,0 @@
-@*
-USING RELATED LINKS (AND OTHER XML BASED TYPES
-==============================================
-This snippet shows how to work with properties that stores multiple values in XML such as the "Related Links" data type.
-When the Razor (or in fact the 'DynamicNode') detected XML, it automatically makes it possible to navigate the xml by
-using the name of the XML elements as properties. Be aware that the first xml element (the container) is always skipped
-and that the properties are case sensitive!
-
-How it works:
-- First we check if there's a property on the current page (Model) named 'relatedLinks'
-- Then we loop through the XML elements of the property 'RelatedLinks' (ie. all the links)
-- For each link we check if it should be opened in a new window (stored in an XML attribute called 'newwindow' which is
- automatically translated into a property '.newwindow' by DynamicNode
-- Then we test if the link type is a internal or external link, and if it's an internal link we use the NiceUrl helper
- method to convert the id of the page to a SEO friendly url
-
-NOTE: It is safe to remove this comment (anything between @ * * @), the code that generates the list is only the below!
-*@
-
-@inherits umbraco.MacroEngines.DynamicNodeContext
-
-@{
- if (Model.HasProperty("relatedLinks")) {
-
- @foreach (var link in @Model.RelatedLinks) {
- string target = link.newwindow == "1" ? " target=\"_blank\"" : "";
- -
- @if (link.type == "internal") {
- @link.title
- } else {
- @link.title
- }
-
- }
-
- }
-}
diff --git a/src/Umbraco.Web.UI/umbraco/settings/editTemplate.aspx b/src/Umbraco.Web.UI/umbraco/settings/editTemplate.aspx
index 1d37205240..be119d814f 100644
--- a/src/Umbraco.Web.UI/umbraco/settings/editTemplate.aspx
+++ b/src/Umbraco.Web.UI/umbraco/settings/editTemplate.aspx
@@ -1,22 +1,30 @@
<%@ Page MasterPageFile="../masterpages/umbracoPage.Master" Language="c#" CodeBehind="EditTemplate.aspx.cs"
- ValidateRequest="false" AutoEventWireup="True" Inherits="Umbraco.Web.UI.Umbraco.Settings.EditTemplate" %>
-
+ ValidateRequest="false" AutoEventWireup="True" Inherits="Umbraco.Web.UI.Umbraco.Settings.EditTemplate" %>
<%@ Import Namespace="Umbraco.Core.IO" %>
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>
-
-
-
-
-
+
diff --git a/src/Umbraco.Web.UI/umbraco/settings/scripts/editScript.aspx b/src/Umbraco.Web.UI/umbraco/settings/scripts/editScript.aspx
index abc9bdb271..14d049c27d 100644
--- a/src/Umbraco.Web.UI/umbraco/settings/scripts/editScript.aspx
+++ b/src/Umbraco.Web.UI/umbraco/settings/scripts/editScript.aspx
@@ -1,8 +1,13 @@
<%@ Page Language="C#" MasterPageFile="../../masterpages/umbracoPage.Master" AutoEventWireup="true"
CodeBehind="editScript.aspx.cs" Inherits="umbraco.cms.presentation.settings.scripts.editScript"
- ValidateRequest="False" %>
+ ValidateRequest="False" %>
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
+
+
+
+
+
";
- macroProperties.Controls.Add(noProps);
+ //var noProps = new Literal();
+ //noProps.Text = "";
+ //macroProperties.Controls.Add(noProps);
}
else
{
//if we have properties, we'll render the controls for them...
- foreach (cms.businesslogic.macro.MacroProperty mp in _m.Properties)
+ foreach (cms.businesslogic.macro.MacroProperty mp in MacroObject.Properties)
{
var macroAssembly = mp.Type.Assembly;
var macroType = mp.Type.Type;
@@ -126,7 +126,7 @@ namespace umbraco.dialogs
else
{
IRecordsReader macroRenderings;
- if (helper.Request("editor") != "")
+ if (Request.GetItemAsString("editor") != "")
macroRenderings = SqlHelper.ExecuteReader("select macroAlias, macroName from cmsMacro where macroUseInEditor = 1 order by macroName");
else
macroRenderings = SqlHelper.ExecuteReader("select macroAlias, macroName from cmsMacro order by macroName");
@@ -138,32 +138,8 @@ namespace umbraco.dialogs
macroRenderings.Close();
}
}
- else
- {
- ScriptManager.RegisterOnSubmitStatement(Page, Page.GetType(), "myHandlerKey", "Umbraco.Dialogs.EditMacro.getInstance().updateMacro()");
- }
- }
-
- #region Web Form Designer generated code
- override protected void OnInit(EventArgs e)
- {
- //
- // CODEGEN: This call is required by the ASP.NET Web Form Designer.
- //
- InitializeComponent();
- base.OnInit(e);
- }
-
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent()
- {
-
- }
- #endregion
+ }
///
/// pl_edit control.
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/moveOrCopy.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/moveOrCopy.aspx.cs
index afbd497d4d..aeab148ef7 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/moveOrCopy.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/moveOrCopy.aspx.cs
@@ -261,26 +261,7 @@ namespace umbraco.dialogs
var documentId = int.Parse(helper.Request("id"));
var document = new Document(documentId);
document.Move(int.Parse(helper.Request("copyTo")));
- if (document.Published)
- {
- //TODO HACK - Have to get the Document again, to get the new path from the database..
- document = new Document(documentId);
-
- document.Publish(new umbraco.BusinessLogic.User(0));
- //using library.publish to support load balancing.
- //umbraco.library.PublishSingleNode(d.Id);
- umbraco.library.UpdateDocumentCache(document.Id);
-
- //PPH added handling of load balanced moving of multiple nodes...
- if (document.HasChildren)
- handleChildNodes(document);
-
- //Using the general Refresh content method instead as it supports load balancing.
- //we only need to do this if the node is actually published.
- library.RefreshContent();
- }
-
- document.Save(); //stub to save stuff to the db.
+ library.RefreshContent();
}
else
{
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/editContent.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/editContent.aspx.cs
index 5c892ea101..08fa0f6ed8 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/editContent.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/editContent.aspx.cs
@@ -1,6 +1,8 @@
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
+using Umbraco.Core;
+using Umbraco.Core.Models;
using Umbraco.Core.Persistence.Caching;
using umbraco.BusinessLogic.Actions;
using umbraco.IO;
@@ -321,15 +323,23 @@ namespace umbraco.cms.presentation
library.UpdateDocumentCache(_document.Id);
ClientTools.ShowSpeechBubble(speechBubbleIcon.save, ui.Text("speechBubbles", "editContentPublishedHeader", null), ui.Text("speechBubbles", "editContentPublishedText", null));
- littPublishStatus.Text = ui.Text("content", "lastPublished", base.getUser()) + ": " + _document.VersionDate.ToString() + "
";
+ littPublishStatus.Text = string.Format("{0}: {1}
", ui.Text("content", "lastPublished", base.getUser()), _document.VersionDate.ToString());
if (base.getUser().GetPermissions(_document.Path).IndexOf("U") > -1)
UnPublish.Visible = true;
_documentHasPublishedVersion = _document.HasPublishedVersion();
- foreach (var descendant in _document.GetDescendants().Cast().Where(descendant => descendant.HasPublishedVersion()))
- library.UpdateDocumentCache(descendant.Id);
+ var descendants = ApplicationContext.Current.Services.ContentService.GetDescendants(_document.Id);
+ var publishableDescendants = descendants.Where(descendant => descendant.HasPublishedVersion()).ToList();
+ if(publishableDescendants.Any())
+ {
+ foreach (var descendant in publishableDescendants)
+ {
+ library.UpdateDocumentCache(descendant.Id);
+ }
+ library.RefreshContent();
+ }
}
else
{
@@ -337,13 +347,10 @@ namespace umbraco.cms.presentation
}
}
else
+ {
ClientTools.ShowSpeechBubble(speechBubbleIcon.warning, ui.Text("publish"), ui.Text("speechBubbles", "editContentPublishedFailedByParent"));
-
- // page cache disabled...
- // cms.businesslogic.cache.Cache.ClearCacheObjectTypes("umbraco.page");
-
-
- // Update links
+
+ }
}
}
@@ -382,7 +389,7 @@ namespace umbraco.cms.presentation
void UpdateNiceUrls()
{
- if (!_documentHasPublishedVersion || _document.Published == false)
+ if (_documentHasPublishedVersion == false)
{
UpdateNiceUrlProperties("" + ui.Text("content", "itemNotPublished", base.getUser()) + "", null);
return;
@@ -405,7 +412,7 @@ namespace umbraco.cms.presentation
while (parent != null && parent.Published);
if (parent == null) // oops - internal error
- niceUrlText = "" + ui.Text("content", "parentNotPublished", "???", base.getUser()) + "";
+ niceUrlText = "" + ui.Text("content", "parentNotPublishedAnomaly", base.getUser()) + "";
else
niceUrlText = "" + ui.Text("content", "parentNotPublished", parent.Text, base.getUser()) + "";
}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditNodeTypeNew.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditNodeTypeNew.aspx.cs
index 0c3be42e00..170d2324c5 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditNodeTypeNew.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditNodeTypeNew.aspx.cs
@@ -128,6 +128,8 @@ namespace umbraco.settings
else
dt.RemoveDefaultTemplate();
+ dt.Save();
+
bindTemplates();
}
else
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/scripts/editScript.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/scripts/editScript.aspx
index abc9bdb271..14d049c27d 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/scripts/editScript.aspx
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/scripts/editScript.aspx
@@ -1,8 +1,13 @@
<%@ Page Language="C#" MasterPageFile="../../masterpages/umbracoPage.Master" AutoEventWireup="true"
CodeBehind="editScript.aspx.cs" Inherits="umbraco.cms.presentation.settings.scripts.editScript"
- ValidateRequest="False" %>
+ ValidateRequest="False" %>
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
+
+
+
+
+