Properly fixes: U4-4893 Inconsistent display of file extensions in the UI
This commit is contained in:
@@ -103,8 +103,7 @@ namespace umbraco.cms.presentation.Trees
|
||||
|
||||
XmlTreeNode xFileNode = XmlTreeNode.Create(this);
|
||||
xFileNode.NodeID = orgPath + file.Name;
|
||||
xFileNode.Text =
|
||||
string.Format("{0}", file.Name.Substring(0, file.Name.IndexOf(file.Extension, StringComparison.Ordinal)));
|
||||
xFileNode.Text = file.Name;
|
||||
if (!((orgPath == "")))
|
||||
xFileNode.Action = "javascript:openFile('" + orgPath + file.Name + "');";
|
||||
else
|
||||
|
||||
@@ -1,28 +1,7 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Xml;
|
||||
using System.Configuration;
|
||||
using umbraco.BasePages;
|
||||
using umbraco.BusinessLogic;
|
||||
using umbraco.cms.businesslogic;
|
||||
using umbraco.cms.businesslogic.cache;
|
||||
using umbraco.cms.businesslogic.contentitem;
|
||||
using umbraco.cms.businesslogic.datatype;
|
||||
using umbraco.cms.businesslogic.language;
|
||||
using umbraco.cms.businesslogic.media;
|
||||
using umbraco.cms.businesslogic.member;
|
||||
using umbraco.cms.businesslogic.property;
|
||||
using umbraco.cms.businesslogic.web;
|
||||
using umbraco.interfaces;
|
||||
using umbraco.DataLayer;
|
||||
using umbraco.BusinessLogic.Utils;
|
||||
using System.Text;
|
||||
using umbraco.cms.presentation.Trees;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Core;
|
||||
|
||||
|
||||
namespace umbraco
|
||||
@@ -92,6 +71,8 @@ namespace umbraco
|
||||
|
||||
xNode.Icon = icon;
|
||||
xNode.OpenIcon = icon;
|
||||
|
||||
xNode.Text = xNode.Text.StripFileExtension();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace umbraco
|
||||
xNode.Action = xNode.Action.Replace("openFile", "openScriptEditor");
|
||||
|
||||
// add special icons for javascript files
|
||||
if (xNode.Action.Contains(".js"))
|
||||
if (xNode.Text.Contains(".js"))
|
||||
{
|
||||
xNode.Icon = "icon-script";
|
||||
xNode.OpenIcon = "icon-script";
|
||||
@@ -89,6 +89,8 @@ namespace umbraco
|
||||
xNode.Icon = "icon-code";
|
||||
xNode.OpenIcon = "icon-code";
|
||||
}
|
||||
|
||||
xNode.Text = xNode.Text.StripFileExtension();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
@@ -63,7 +64,7 @@ namespace umbraco
|
||||
foreach (StyleSheet n in StyleSheet.GetAll())
|
||||
{
|
||||
XmlTreeNode xNode = XmlTreeNode.Create(this);
|
||||
xNode.NodeID = n.Id.ToString();
|
||||
xNode.NodeID = n.Id.ToString(CultureInfo.InvariantCulture);
|
||||
xNode.Text = n.Text;
|
||||
xNode.Action = "javascript:openStylesheet(" + n.Id + ");";
|
||||
loadStylesheetProperty styleSheetPropertyTree = new loadStylesheetProperty(this.app);
|
||||
|
||||
@@ -73,6 +73,8 @@ function openXslt(id) {
|
||||
xNode.Action = xNode.Action.Replace("openFile", "openXslt");
|
||||
xNode.Icon = "icon-code";
|
||||
xNode.OpenIcon = "icon-code";
|
||||
|
||||
xNode.Text = xNode.Text.StripFileExtension();
|
||||
}
|
||||
|
||||
protected override void OnRenderFolderNode(ref XmlTreeNode xNode)
|
||||
|
||||
Reference in New Issue
Block a user