Merge
This commit is contained in:
@@ -718,6 +718,11 @@ namespace umbraco
|
||||
get { return GetKey("/settings/content/imaging/allowedAttributes"); }
|
||||
}
|
||||
|
||||
public static XmlNode ImageAutoFillImageProperties
|
||||
{
|
||||
get { return GetKeyAsNode("/settings/content/imaging/autoFillImageProperties"); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the scheduled tasks as XML
|
||||
/// </summary>
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Threading;
|
||||
using System.Web;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Linq;
|
||||
using umbraco.cms.businesslogic.cache;
|
||||
@@ -12,9 +9,7 @@ using umbraco.cms.businesslogic.language;
|
||||
using umbraco.cms.businesslogic.propertytype;
|
||||
using umbraco.cms.businesslogic.web;
|
||||
using umbraco.DataLayer;
|
||||
using Tuple = System.Tuple;
|
||||
using umbraco.BusinessLogic;
|
||||
using umbraco.DataLayer.SqlHelpers.MySql;
|
||||
|
||||
[assembly: InternalsVisibleTo("Umbraco.Test")]
|
||||
|
||||
@@ -853,30 +848,6 @@ namespace umbraco.cms.businesslogic
|
||||
base.delete();
|
||||
}
|
||||
|
||||
public IEnumerable<System.Tuple<int, string>> GetContent()
|
||||
{
|
||||
List<System.Tuple<int, string>> list = new List<System.Tuple<int, string>>();
|
||||
bool mySQL = (SqlHelper.GetType() == typeof(MySqlHelper));
|
||||
string sql = string.Empty;
|
||||
if (!mySQL)
|
||||
{
|
||||
sql = "Select top (100) cmsContent.nodeid, cmsDocument.text from cmsContent join cmsDocument on cmsDocument.nodeId = cmsContent.nodeid where cmsdocument.published = 1 and cmscontent.contentType = " + this.Id;
|
||||
}
|
||||
else
|
||||
{
|
||||
sql = "Select cmsContent.nodeid, cmsDocument.text from cmsContent join cmsDocument on cmsDocument.nodeId = cmsContent.nodeid where cmsdocument.published = 1 and cmscontent.contentType = " + this.Id + " limit 0,100";
|
||||
}
|
||||
using (IRecordsReader dr = SqlHelper.ExecuteReader(sql))
|
||||
{
|
||||
while (dr.Read())
|
||||
{
|
||||
list.Add(new System.Tuple<int, string>(dr.GetInt("nodeid"), dr.GetString("text")));
|
||||
}
|
||||
dr.Close();
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace umbraco.cms.businesslogic.Files
|
||||
_fileName = fi.Name;
|
||||
_length = fi.Length;
|
||||
_directoryName = fi.DirectoryName;
|
||||
_extension = fi.Extension.Substring(1);
|
||||
_extension = fi.Extension.Substring(1).ToLowerInvariant();
|
||||
_localName =
|
||||
"/" + fi.FullName.Substring(IO.IOHelper.MapPath(IO.SystemDirectories.Root).Length).Replace(
|
||||
Path.DirectorySeparatorChar.ToString(), "/");
|
||||
@@ -156,8 +156,8 @@ namespace umbraco.cms.businesslogic.Files
|
||||
fs.Close();
|
||||
|
||||
string fileNameThumb = String.IsNullOrEmpty(fileNameAddition) ?
|
||||
string.Format("{0}_UMBRACOSYSTHUMBNAIL.{1}", _fullFilePath.Substring(0, _fullFilePath.LastIndexOf(".")), _extension) :
|
||||
string.Format("{0}_{1}.{2}", _fullFilePath.Substring(0, _fullFilePath.LastIndexOf(".")), fileNameAddition, _extension);
|
||||
string.Format("{0}_UMBRACOSYSTHUMBNAIL.jpg", _fullFilePath.Substring(0, _fullFilePath.LastIndexOf("."))) :
|
||||
string.Format("{0}_{1}.jpg", _fullFilePath.Substring(0, _fullFilePath.LastIndexOf(".")), fileNameAddition);
|
||||
generateThumbnail(
|
||||
image,
|
||||
maxWidthHeight,
|
||||
@@ -215,13 +215,13 @@ namespace umbraco.cms.businesslogic.Files
|
||||
g.DrawImage(image, rect, 0, 0, image.Width, image.Height, GraphicsUnit.Pixel);
|
||||
|
||||
// Copy metadata
|
||||
ImageCodecInfo[] codecs = ImageCodecInfo.GetImageEncoders();
|
||||
var imageEncoders = ImageCodecInfo.GetImageEncoders();
|
||||
ImageCodecInfo codec = null;
|
||||
for (int i = 0; i < codecs.Length; i++)
|
||||
{
|
||||
if (codecs[i].MimeType.Equals("image/jpeg"))
|
||||
codec = codecs[i];
|
||||
}
|
||||
if (Extension == "png" || Extension == ".gif")
|
||||
codec = imageEncoders.Single(t => t.MimeType.Equals("image/png"));
|
||||
else
|
||||
codec = imageEncoders.Single(t => t.MimeType.Equals("image/jpeg"));
|
||||
|
||||
|
||||
// Set compresion ratio to 90%
|
||||
var ep = new EncoderParameters();
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Web;
|
||||
using System.Xml;
|
||||
using umbraco.cms.businesslogic.Files;
|
||||
using umbraco.cms.businesslogic.property;
|
||||
using umbraco.IO;
|
||||
|
||||
namespace umbraco.cms.businesslogic.datatype
|
||||
@@ -28,9 +30,9 @@ namespace umbraco.cms.businesslogic.datatype
|
||||
var file = value as HttpPostedFile;
|
||||
if (file.FileName != String.Empty)
|
||||
{
|
||||
var fileName = UmbracoSettings.UploadAllowDirectories ?
|
||||
Path.Combine(PropertyId.ToString(), file.FileName) :
|
||||
PropertyId + "-" + file.FileName;
|
||||
string fileName = UmbracoSettings.UploadAllowDirectories
|
||||
? Path.Combine(PropertyId.ToString(), file.FileName)
|
||||
: PropertyId + "-" + file.FileName;
|
||||
|
||||
fileName = Path.Combine(SystemDirectories.Media, fileName);
|
||||
um = UmbracoFile.Save(file, fileName);
|
||||
@@ -56,6 +58,32 @@ namespace umbraco.cms.businesslogic.datatype
|
||||
}
|
||||
}
|
||||
|
||||
// check for auto fill of other properties (width, height, extension and filesize)
|
||||
string propertyTypeAlias = new Property(PropertyId).PropertyType.Alias;
|
||||
XmlNode uploadFieldConfigNode =
|
||||
UmbracoSettings.ImageAutoFillImageProperties.SelectSingleNode(
|
||||
string.Format("uploadField [@alias = \"{0}\"]", propertyTypeAlias));
|
||||
if (uploadFieldConfigNode != null)
|
||||
{
|
||||
// get the current document
|
||||
Content content = Content.GetContentFromVersion(Version);
|
||||
// only add dimensions to web images
|
||||
if (um.SupportsResizing)
|
||||
{
|
||||
updateContentProperty(uploadFieldConfigNode, content, "widthFieldAlias",
|
||||
um.GetDimensions().Item1);
|
||||
updateContentProperty(uploadFieldConfigNode, content, "heightFieldAlias",
|
||||
um.GetDimensions().Item2);
|
||||
}
|
||||
else
|
||||
{
|
||||
updateContentProperty(uploadFieldConfigNode, content, "widthFieldAlias", String.Empty);
|
||||
updateContentProperty(uploadFieldConfigNode, content, "heightFieldAlias", String.Empty);
|
||||
}
|
||||
updateContentProperty(uploadFieldConfigNode, content, "lengthFieldAlias", um.Length);
|
||||
updateContentProperty(uploadFieldConfigNode, content, "extensionFieldAlias", um.Extension);
|
||||
}
|
||||
|
||||
base.Value = um.LocalName;
|
||||
}
|
||||
else
|
||||
@@ -70,5 +98,19 @@ namespace umbraco.cms.businesslogic.datatype
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void updateContentProperty(XmlNode uploadFieldConfigNode, Content content, string propertyAlias,
|
||||
object propertyValue)
|
||||
{
|
||||
XmlNode propertyNode = uploadFieldConfigNode.SelectSingleNode(propertyAlias);
|
||||
if (propertyNode != null && !String.IsNullOrEmpty(propertyNode.FirstChild.Value))
|
||||
{
|
||||
if (content.getProperty(propertyNode.FirstChild.Value) != null)
|
||||
{
|
||||
content.getProperty(propertyNode.FirstChild.Value)
|
||||
.Value = propertyValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Collections;
|
||||
using System.Xml;
|
||||
@@ -10,10 +9,7 @@ using System.Collections.Generic;
|
||||
using umbraco.cms.businesslogic.cache;
|
||||
using umbraco.BusinessLogic;
|
||||
using umbraco.IO;
|
||||
using System.Web;
|
||||
using umbraco.cms.businesslogic.web;
|
||||
using Tuple = System.Tuple;
|
||||
using umbraco.DataLayer.SqlHelpers.MySql;
|
||||
|
||||
namespace umbraco.cms.businesslogic.template
|
||||
{
|
||||
@@ -332,35 +328,7 @@ namespace umbraco.cms.businesslogic.template
|
||||
{
|
||||
return DocumentType.GetAllAsList().Where(x => x.allowedTemplates.Select(t => t.Id).Contains(this.Id));
|
||||
}
|
||||
public IEnumerable<System.Tuple<int, string>> GetContent()
|
||||
{
|
||||
List<System.Tuple<int, string>> list = new List<System.Tuple<int, string>>();
|
||||
bool mySQL = (SqlHelper.GetType() == typeof(MySqlHelper));
|
||||
string sql = string.Empty;
|
||||
if (!mySQL)
|
||||
{
|
||||
sql = "Select top (100) nodeid, text from cmsDocument where published = 1 and templateId = " + this.Id;
|
||||
}
|
||||
else
|
||||
{
|
||||
sql = "Select nodeid, text from cmsDocument where published = 1 and templateId = " + this.Id + " limit 0,100";
|
||||
}
|
||||
using (IRecordsReader dr = SqlHelper.ExecuteReader(sql))
|
||||
{
|
||||
int i = 0;
|
||||
while (dr.Read())
|
||||
{
|
||||
list.Add(new System.Tuple<int, string>(dr.GetInt("nodeid"), dr.GetString("text")));
|
||||
i++;
|
||||
if (i >= 100)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
dr.Close();
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public static Template MakeNew(string Name, BusinessLogic.User u, Template master)
|
||||
{
|
||||
|
||||
|
||||
@@ -124,16 +124,12 @@ namespace umbraco.editorControls
|
||||
if (_data.Value != DBNull.Value && !string.IsNullOrEmpty(_data.Value.ToString()))
|
||||
{
|
||||
var fullFilePath = IO.IOHelper.MapPath(_data.Value.ToString());
|
||||
UmbracoFile uf = new UmbracoFile(fullFilePath);
|
||||
|
||||
cms.businesslogic.Content content = cms.businesslogic.Content.GetContentFromVersion(this._data.Version);
|
||||
|
||||
// Save extension
|
||||
string orgExt = uf.Extension.ToLower();
|
||||
// update extension in UI
|
||||
try
|
||||
{
|
||||
//cms.businesslogic.Content.GetContentFromVersion(_data.Version).getProperty("umbracoExtension").Value = ext;
|
||||
content.getProperty("umbracoExtension").Value = orgExt;
|
||||
noEdit extensionControl = uploadField.FindControlRecursive<noEdit>(this.Page, "prop_umbracoExtension");
|
||||
if (extensionControl != null)
|
||||
{
|
||||
@@ -144,11 +140,9 @@ namespace umbraco.editorControls
|
||||
|
||||
|
||||
|
||||
// Save file size
|
||||
// update file size in UI
|
||||
try
|
||||
{
|
||||
//cms.businesslogic.Content.GetContentFromVersion(_data.Version).getProperty("umbracoBytes").Value = fi.Length.ToString();
|
||||
content.getProperty("umbracoBytes").Value = uf.Length.ToString();
|
||||
noEdit bytesControl = uploadField.FindControlRecursive<noEdit>(this.Page, "prop_umbracoBytes");
|
||||
if (bytesControl != null)
|
||||
{
|
||||
@@ -157,35 +151,21 @@ namespace umbraco.editorControls
|
||||
}
|
||||
catch { }
|
||||
|
||||
// Check if image and then get sizes, make thumb and update database
|
||||
if (uf.SupportsResizing)
|
||||
try
|
||||
{
|
||||
System.Tuple<int, int> dimensions = uf.GetDimensions();
|
||||
int fileWidth = dimensions.Item1;
|
||||
int fileHeight = dimensions.Item2;
|
||||
|
||||
|
||||
try
|
||||
noEdit widthControl = uploadField.FindControlRecursive<noEdit>(this.Page, "prop_umbracoWidth");
|
||||
if (widthControl != null)
|
||||
{
|
||||
//cms.businesslogic.Content.GetContentFromVersion(_data.Version).getProperty("umbracoWidth").Value = fileWidth.ToString();
|
||||
//cms.businesslogic.Content.GetContentFromVersion(_data.Version).getProperty("umbracoHeight").Value = fileHeight.ToString();
|
||||
content.getProperty("umbracoWidth").Value = fileWidth.ToString();
|
||||
noEdit widthControl = uploadField.FindControlRecursive<noEdit>(this.Page, "prop_umbracoWidth");
|
||||
if (widthControl != null)
|
||||
{
|
||||
widthControl.RefreshLabel(content.getProperty("umbracoWidth").Value.ToString());
|
||||
}
|
||||
content.getProperty("umbracoHeight").Value = fileHeight.ToString();
|
||||
noEdit heightControl = uploadField.FindControlRecursive<noEdit>(this.Page, "prop_umbracoHeight");
|
||||
if (heightControl != null)
|
||||
{
|
||||
heightControl.RefreshLabel(content.getProperty("umbracoHeight").Value.ToString());
|
||||
}
|
||||
widthControl.RefreshLabel(content.getProperty("umbracoWidth").Value.ToString());
|
||||
}
|
||||
noEdit heightControl = uploadField.FindControlRecursive<noEdit>(this.Page, "prop_umbracoHeight");
|
||||
if (heightControl != null)
|
||||
{
|
||||
heightControl.RefreshLabel(content.getProperty("umbracoHeight").Value.ToString());
|
||||
}
|
||||
catch { }
|
||||
|
||||
|
||||
}
|
||||
catch { }
|
||||
|
||||
}
|
||||
this.Text = _data.Value.ToString();
|
||||
}
|
||||
@@ -240,52 +220,6 @@ namespace umbraco.editorControls
|
||||
}
|
||||
}
|
||||
|
||||
private void generateThumbnail(System.Drawing.Image image, int maxWidthHeight, int fileWidth, int fileHeight, string fullFilePath, string ext, string thumbnailFileName)
|
||||
{
|
||||
// Generate thumbnail
|
||||
float fx = (float)fileWidth / (float)maxWidthHeight;
|
||||
float fy = (float)fileHeight / (float)maxWidthHeight;
|
||||
// must fit in thumbnail size
|
||||
float f = Math.Max(fx, fy); //if (f < 1) f = 1;
|
||||
int widthTh = (int)Math.Round((float)fileWidth / f); int heightTh = (int)Math.Round((float)fileHeight / f);
|
||||
|
||||
// fixes for empty width or height
|
||||
if (widthTh == 0)
|
||||
widthTh = 1;
|
||||
if (heightTh == 0)
|
||||
heightTh = 1;
|
||||
|
||||
// Create new image with best quality settings
|
||||
Bitmap bp = new Bitmap(widthTh, heightTh);
|
||||
Graphics g = Graphics.FromImage(bp);
|
||||
g.SmoothingMode = SmoothingMode.HighQuality;
|
||||
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
||||
g.PixelOffsetMode = PixelOffsetMode.HighQuality;
|
||||
|
||||
// Copy the old image to the new and resized
|
||||
Rectangle rect = new Rectangle(0, 0, widthTh, heightTh);
|
||||
g.DrawImage(image, rect, 0, 0, image.Width, image.Height, GraphicsUnit.Pixel);
|
||||
|
||||
// Copy metadata
|
||||
ImageCodecInfo[] codecs = ImageCodecInfo.GetImageEncoders();
|
||||
ImageCodecInfo codec = null;
|
||||
for (int i = 0; i < codecs.Length; i++)
|
||||
{
|
||||
if (codecs[i].MimeType.Equals("image/jpeg"))
|
||||
codec = codecs[i];
|
||||
}
|
||||
|
||||
// Set compresion ratio to 90%
|
||||
EncoderParameters ep = new EncoderParameters();
|
||||
ep.Param[0] = new EncoderParameter(Encoder.Quality, 90L);
|
||||
|
||||
// Save the new image
|
||||
bp.Save(thumbnailFileName, codec, ep);
|
||||
bp.Dispose();
|
||||
g.Dispose();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recursively finds a control with the specified identifier.
|
||||
/// </summary>
|
||||
@@ -326,7 +260,7 @@ namespace umbraco.editorControls
|
||||
/// <param name="output"> The HTML writer to write out to </param>
|
||||
protected override void Render(HtmlTextWriter output)
|
||||
{
|
||||
if (this.Text != null && this.Text != "")
|
||||
if (!string.IsNullOrEmpty(this.Text))
|
||||
{
|
||||
string ext = _text.Substring(_text.LastIndexOf(".") + 1, _text.Length - _text.LastIndexOf(".") - 1);
|
||||
string fileNameThumb = _text.Replace("." + ext, "_thumb.jpg");
|
||||
@@ -334,6 +268,12 @@ namespace umbraco.editorControls
|
||||
try
|
||||
{
|
||||
hasThumb = File.Exists(IOHelper.MapPath(IOHelper.FindFile(fileNameThumb)));
|
||||
// 4.8.0 added support for png thumbnails
|
||||
if (!hasThumb && (ext == "gif" || ext == "png"))
|
||||
{
|
||||
fileNameThumb = _text.Replace("." + ext, "_thumb.png");
|
||||
hasThumb = File.Exists(IOHelper.MapPath(IOHelper.FindFile(fileNameThumb)));
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
if (hasThumb)
|
||||
|
||||
@@ -1,148 +1,157 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<settings>
|
||||
<content>
|
||||
<imaging>
|
||||
<!-- what file extension that should cause umbraco to create thumbnails -->
|
||||
<imageFileTypes>jpeg,jpg,gif,bmp,png,tiff,tif</imageFileTypes>
|
||||
<!-- what attributes that are allowed in the editor on an img tag -->
|
||||
<allowedAttributes>alt,border,class,style,align,id,name,onclick,usemap</allowedAttributes>
|
||||
</imaging>
|
||||
<scripteditor>
|
||||
<!-- Path to script folder - no ending "/" -->
|
||||
<scriptFolderPath>/scripts</scriptFolderPath>
|
||||
<!-- what files can be opened/created in the script editor -->
|
||||
<scriptFileTypes>js,xml</scriptFileTypes>
|
||||
<!-- disable the codepress editor and use a simple textarea instead -->
|
||||
<!-- note! codepress editor always disabled in IE due to automatic hyperlinking "feature" in contenteditable areas -->
|
||||
<scriptDisableEditor>false</scriptDisableEditor>
|
||||
</scripteditor>
|
||||
<content>
|
||||
<imaging>
|
||||
<!-- what file extension that should cause umbraco to create thumbnails -->
|
||||
<imageFileTypes>jpeg,jpg,gif,bmp,png,tiff,tif</imageFileTypes>
|
||||
<!-- what attributes that are allowed in the editor on an img tag -->
|
||||
<allowedAttributes>alt,border,class,style,align,id,name,onclick,usemap</allowedAttributes>
|
||||
<!-- automatically updates dimension, filesize and extension attributes on upload -->
|
||||
<autoFillImageProperties>
|
||||
<uploadField alias="umbracoFile">
|
||||
<widthFieldAlias>umbracoWidth</widthFieldAlias>
|
||||
<heightFieldAlias>umbracoHeight</heightFieldAlias>
|
||||
<lengthFieldAlias>umbracoBytes</lengthFieldAlias>
|
||||
<extensionFieldAlias>umbracoExtension</extensionFieldAlias>
|
||||
</uploadField>
|
||||
</autoFillImageProperties>
|
||||
</imaging>
|
||||
<scripteditor>
|
||||
<!-- Path to script folder - no ending "/" -->
|
||||
<scriptFolderPath>/scripts</scriptFolderPath>
|
||||
<!-- what files can be opened/created in the script editor -->
|
||||
<scriptFileTypes>js,xml</scriptFileTypes>
|
||||
<!-- disable the codepress editor and use a simple textarea instead -->
|
||||
<!-- note! codepress editor always disabled in IE due to automatic hyperlinking "feature" in contenteditable areas -->
|
||||
<scriptDisableEditor>false</scriptDisableEditor>
|
||||
</scripteditor>
|
||||
|
||||
<!-- should umbraco store the uploaded files like /media/xxx/filename.ext or like /media/xxx-filename.ext
|
||||
<!-- should umbraco store the uploaded files like /media/xxx/filename.ext or like /media/xxx-filename.ext
|
||||
should be set to false if the aspnet account hasn't got readrights of the driveroot up to the /media directory -->
|
||||
<UploadAllowDirectories>True</UploadAllowDirectories>
|
||||
<errors>
|
||||
<!-- the id of the page that should be shown if the page is not found -->
|
||||
<!-- <errorPage culture="default">1</errorPage>-->
|
||||
<!-- <errorPage culture="en-US">200</errorPage>-->
|
||||
<error404>1</error404>
|
||||
</errors>
|
||||
<notifications>
|
||||
<!-- the email that should be used as from mail when umbraco sends a notification -->
|
||||
<email>your@email.here</email>
|
||||
</notifications>
|
||||
<UploadAllowDirectories>True</UploadAllowDirectories>
|
||||
<errors>
|
||||
<!-- the id of the page that should be shown if the page is not found -->
|
||||
<!-- <errorPage culture="default">1</errorPage>-->
|
||||
<!-- <errorPage culture="en-US">200</errorPage>-->
|
||||
<error404>1</error404>
|
||||
</errors>
|
||||
<notifications>
|
||||
<!-- the email that should be used as from mail when umbraco sends a notification -->
|
||||
<email>your@email.here</email>
|
||||
</notifications>
|
||||
|
||||
<!-- if true umbraco will ensure that no page under the same parent has an identical name -->
|
||||
<ensureUniqueNaming>True</ensureUniqueNaming>
|
||||
<!-- if true umbraco will ensure that no page under the same parent has an identical name -->
|
||||
<ensureUniqueNaming>True</ensureUniqueNaming>
|
||||
|
||||
<!-- lowercase, either 'gif' or 'png' -->
|
||||
<graphicHeadlineFormat>gif</graphicHeadlineFormat>
|
||||
<!-- lowercase, either 'gif' or 'png' -->
|
||||
<graphicHeadlineFormat>gif</graphicHeadlineFormat>
|
||||
|
||||
<!-- clean editor content with use of tidy -->
|
||||
<TidyEditorContent>True</TidyEditorContent>
|
||||
<!-- clean editor content with use of tidy -->
|
||||
<TidyEditorContent>True</TidyEditorContent>
|
||||
|
||||
<!-- the encoding type for tidy. Default is UTF8, options are ASCII, Raw, Latin1, UTF8, ISO2022, MacroMan-->
|
||||
<TidyCharEncoding>UTF8</TidyCharEncoding>
|
||||
<!-- the encoding type for tidy. Default is UTF8, options are ASCII, Raw, Latin1, UTF8, ISO2022, MacroMan-->
|
||||
<TidyCharEncoding>UTF8</TidyCharEncoding>
|
||||
|
||||
<!-- to enable new content schema, this needs to be false -->
|
||||
<UseLegacyXmlSchema>false</UseLegacyXmlSchema>
|
||||
<!-- to enable new content schema, this needs to be false -->
|
||||
<UseLegacyXmlSchema>false</UseLegacyXmlSchema>
|
||||
|
||||
<!-- Whether to force safe aliases (no spaces, no special characters) at businesslogic level on contenttypes and propertytypes -->
|
||||
<!-- HIGHLY recommend to keep this to true to ensure valid and beautiful XML Schemas -->
|
||||
<ForceSafeAliases>true</ForceSafeAliases>
|
||||
<!-- Whether to force safe aliases (no spaces, no special characters) at businesslogic level on contenttypes and propertytypes -->
|
||||
<!-- HIGHLY recommend to keep this to true to ensure valid and beautiful XML Schemas -->
|
||||
<ForceSafeAliases>true</ForceSafeAliases>
|
||||
|
||||
<!-- Enable / disable xml content cache -->
|
||||
<XmlCacheEnabled>True</XmlCacheEnabled>
|
||||
<!-- Enable / disable xml content cache -->
|
||||
<XmlCacheEnabled>True</XmlCacheEnabled>
|
||||
|
||||
<!-- Update disk cache every time content has changed -->
|
||||
<ContinouslyUpdateXmlDiskCache>True</ContinouslyUpdateXmlDiskCache>
|
||||
<!-- Update disk cache every time content has changed -->
|
||||
<ContinouslyUpdateXmlDiskCache>True</ContinouslyUpdateXmlDiskCache>
|
||||
|
||||
<!-- Update in-memory cache if xml file is changed -->
|
||||
<XmlContentCheckForDiskChanges>False</XmlContentCheckForDiskChanges>
|
||||
<!-- Update in-memory cache if xml file is changed -->
|
||||
<XmlContentCheckForDiskChanges>False</XmlContentCheckForDiskChanges>
|
||||
|
||||
<!-- Show the /config/splashes/booting.aspx page while initializing content -->
|
||||
<EnableSplashWhileLoading>False</EnableSplashWhileLoading>
|
||||
<!-- Show the /config/splashes/booting.aspx page while initializing content -->
|
||||
<EnableSplashWhileLoading>False</EnableSplashWhileLoading>
|
||||
|
||||
<!-- Show property descriptions in editing view "icon|text|none" -->
|
||||
<PropertyContextHelpOption>text</PropertyContextHelpOption>
|
||||
<!-- Show property descriptions in editing view "icon|text|none" -->
|
||||
<PropertyContextHelpOption>text</PropertyContextHelpOption>
|
||||
|
||||
<!-- The html injected into a (x)html page if Umbraco is running in preview mode -->
|
||||
<PreviewBadge><![CDATA[<a id="umbracoPreviewBadge" style="position: absolute; top: 0; right: 0; border: 0; width: 149px; height: 149px; background: url('{1}/preview/previewModeBadge.png') no-repeat;" href="{0}/endPreview.aspx?redir={2}"><span style="display:none;">In Preview Mode - click to end</span></a>]]></PreviewBadge>
|
||||
<!-- The html injected into a (x)html page if Umbraco is running in preview mode -->
|
||||
<PreviewBadge><![CDATA[<a id="umbracoPreviewBadge" style="position: absolute; top: 0; right: 0; border: 0; width: 149px; height: 149px; background: url('{1}/preview/previewModeBadge.png') no-repeat;" href="{0}/endPreview.aspx?redir={2}"><span style="display:none;">In Preview Mode - click to end</span></a>]]></PreviewBadge>
|
||||
|
||||
<!-- Cache cycle of Media and Member data fetched from the umbraco.library methods -->
|
||||
<!-- In seconds. 0 will disable cache -->
|
||||
<UmbracoLibraryCacheDuration>1800</UmbracoLibraryCacheDuration>
|
||||
<!-- Cache cycle of Media and Member data fetched from the umbraco.library methods -->
|
||||
<!-- In seconds. 0 will disable cache -->
|
||||
<UmbracoLibraryCacheDuration>1800</UmbracoLibraryCacheDuration>
|
||||
|
||||
<!-- Url Resolving ensures that all links works if you run Umbraco in virtual directories -->
|
||||
<!-- Setting this to true can increase render time for pages with a large number of links -->
|
||||
<!-- If running Umbraco in virtual directory this *must* be set to true! -->
|
||||
<ResolveUrlsFromTextString>false</ResolveUrlsFromTextString>
|
||||
</content>
|
||||
<!-- Url Resolving ensures that all links works if you run Umbraco in virtual directories -->
|
||||
<!-- Setting this to true can increase render time for pages with a large number of links -->
|
||||
<!-- If running Umbraco in virtual directory this *must* be set to true! -->
|
||||
<ResolveUrlsFromTextString>false</ResolveUrlsFromTextString>
|
||||
</content>
|
||||
|
||||
<security>
|
||||
<!-- set to true to auto update login interval (and there by disabling the lock screen -->
|
||||
<keepUserLoggedIn>true</keepUserLoggedIn>
|
||||
<security>
|
||||
<!-- set to true to auto update login interval (and there by disabling the lock screen -->
|
||||
<keepUserLoggedIn>true</keepUserLoggedIn>
|
||||
|
||||
<!-- change in 4.8: Disabled users are now showed dimmed and last in the tree. If you prefer not to display them set this to true -->
|
||||
<hideDisabledUsersInBackoffice>false</hideDisabledUsersInBackoffice>
|
||||
</security>
|
||||
<!-- change in 4.8: Disabled users are now showed dimmed and last in the tree. If you prefer not to display them set this to true -->
|
||||
<hideDisabledUsersInBackoffice>false</hideDisabledUsersInBackoffice>
|
||||
</security>
|
||||
|
||||
<requestHandler>
|
||||
<!-- this will ensure that urls are unique when running with multiple root nodes -->
|
||||
<useDomainPrefixes>false</useDomainPrefixes>
|
||||
<!-- this will add a trailing slash (/) to urls when in directory url mode -->
|
||||
<addTrailingSlash>true</addTrailingSlash>
|
||||
<urlReplacing removeDoubleDashes="true">
|
||||
<char org=" ">-</char>
|
||||
<char org="""></char>
|
||||
<char org="'"></char>
|
||||
<char org="%"></char>
|
||||
<char org="."></char>
|
||||
<char org=";"></char>
|
||||
<char org="/"></char>
|
||||
<char org=":"></char>
|
||||
<char org="#"></char>
|
||||
<char org="+">plus</char>
|
||||
<char org="*">star</char>
|
||||
<char org="&"></char>
|
||||
<char org="?"></char>
|
||||
<char org="æ">ae</char>
|
||||
<char org="ø">oe</char>
|
||||
<char org="å">aa</char>
|
||||
<char org="ä">ae</char>
|
||||
<char org="ö">oe</char>
|
||||
<char org="ü">ue</char>
|
||||
<char org="ß">ss</char>
|
||||
<char org="Ä">ae</char>
|
||||
<char org="Ö">oe</char>
|
||||
</urlReplacing>
|
||||
<requestHandler>
|
||||
<!-- this will ensure that urls are unique when running with multiple root nodes -->
|
||||
<useDomainPrefixes>false</useDomainPrefixes>
|
||||
<!-- this will add a trailing slash (/) to urls when in directory url mode -->
|
||||
<addTrailingSlash>true</addTrailingSlash>
|
||||
<urlReplacing removeDoubleDashes="true">
|
||||
<char org=" ">-</char>
|
||||
<char org="""></char>
|
||||
<char org="'"></char>
|
||||
<char org="%"></char>
|
||||
<char org="."></char>
|
||||
<char org=";"></char>
|
||||
<char org="/"></char>
|
||||
<char org=":"></char>
|
||||
<char org="#"></char>
|
||||
<char org="+">plus</char>
|
||||
<char org="*">star</char>
|
||||
<char org="&"></char>
|
||||
<char org="?"></char>
|
||||
<char org="æ">ae</char>
|
||||
<char org="ø">oe</char>
|
||||
<char org="å">aa</char>
|
||||
<char org="ä">ae</char>
|
||||
<char org="ö">oe</char>
|
||||
<char org="ü">ue</char>
|
||||
<char org="ß">ss</char>
|
||||
<char org="Ä">ae</char>
|
||||
<char org="Ö">oe</char>
|
||||
</urlReplacing>
|
||||
|
||||
<removeUmbracoVersionHeader>false</removeUmbracoVersionHeader>
|
||||
</requestHandler>
|
||||
<removeUmbracoVersionHeader>false</removeUmbracoVersionHeader>
|
||||
</requestHandler>
|
||||
|
||||
<templates>
|
||||
<useAspNetMasterPages>true</useAspNetMasterPages>
|
||||
</templates>
|
||||
<templates>
|
||||
<useAspNetMasterPages>true</useAspNetMasterPages>
|
||||
</templates>
|
||||
|
||||
|
||||
<!-- this is used by Umbraco to determine if there's valid classes in the /App_Code folder to be used for Rest/XSLT extensions -->
|
||||
<developer>
|
||||
<appCodeFileExtensions>
|
||||
<ext>cs</ext>
|
||||
<ext>vb</ext>
|
||||
</appCodeFileExtensions>
|
||||
</developer>
|
||||
<!-- this is used by Umbraco to determine if there's valid classes in the /App_Code folder to be used for Rest/XSLT extensions -->
|
||||
<developer>
|
||||
<appCodeFileExtensions>
|
||||
<ext>cs</ext>
|
||||
<ext>vb</ext>
|
||||
</appCodeFileExtensions>
|
||||
</developer>
|
||||
|
||||
<scripting>
|
||||
<razor>
|
||||
<!-- razor DynamicNode typecasting detects XML and returns DynamicXml - Root elements that won't convert to DynamicXml -->
|
||||
<notDynamicXmlDocumentElements>
|
||||
<element>p</element>
|
||||
<element>div</element>
|
||||
<element>ul</element>
|
||||
<element>span</element>
|
||||
</notDynamicXmlDocumentElements>
|
||||
<dataTypeModelStaticMappings>
|
||||
<!--
|
||||
<scripting>
|
||||
<razor>
|
||||
<!-- razor DynamicNode typecasting detects XML and returns DynamicXml - Root elements that won't convert to DynamicXml -->
|
||||
<notDynamicXmlDocumentElements>
|
||||
<element>p</element>
|
||||
<element>div</element>
|
||||
<element>ul</element>
|
||||
<element>span</element>
|
||||
</notDynamicXmlDocumentElements>
|
||||
<dataTypeModelStaticMappings>
|
||||
<!--
|
||||
<mapping dataTypeGuid="00000000-0000-0000-0000-000000000000">Fully.Qualified.Type.Name.For.ModelBinder,Assembly.Name.Excluding.Dot.Dll</mapping>
|
||||
<mapping documentTypeAlias="textPage" nodeTypeAlias="propertyAlias">Fully.Qualified.Type.Name.For.ModelBinder,Assembly.Name.Excluding.Dot.Dll</mapping>
|
||||
<mapping dataTypeGuid="00000000-0000-0000-0000-000000000000" documentTypeAlias="textPage" nodeTypeAlias="propertyAlias">Fully.Qualified.Type.Name.For.ModelBinder,Assembly.Name.Excluding.Dot.Dll</mapping>
|
||||
@@ -150,73 +159,73 @@
|
||||
<mapping dataTypeGuid="00000000-0000-0000-0000-000000000000" nodeTypeAlias="propertyAlias">Fully.Qualified.Type.Name.For.ModelBinder,Assembly.Name.Excluding.Dot.Dll</mapping>
|
||||
<mapping nodeTypeAlias="propertyAlias">Fully.Qualified.Type.Name.For.ModelBinder,Assembly.Name.Excluding.Dot.Dll</mapping>
|
||||
-->
|
||||
</dataTypeModelStaticMappings>
|
||||
</razor>
|
||||
</scripting>
|
||||
</dataTypeModelStaticMappings>
|
||||
</razor>
|
||||
</scripting>
|
||||
|
||||
<!-- This moves the asp.net viewstate data to the end of the html document instead of having it in the beginning-->
|
||||
<viewstateMoverModule enable="false" />
|
||||
<!-- This moves the asp.net viewstate data to the end of the html document instead of having it in the beginning-->
|
||||
<viewstateMoverModule enable="false" />
|
||||
|
||||
<logging>
|
||||
<enableLogging>true</enableLogging>
|
||||
<enableAsyncLogging>true</enableAsyncLogging>
|
||||
<disabledLogTypes>
|
||||
<!-- <logTypeAlias>[alias-of-log-type-in-lowercase]</logTypeAlias> -->
|
||||
</disabledLogTypes>
|
||||
<!-- You can add your own logging tool by implementing the umbraco.BusinessLogic.Interfaces.ILog interface and add the reference here -->
|
||||
<!-- The external logger can also act as the audit trail storage by setting the logAuditTrail attribute to true -->
|
||||
<!--<externalLogger assembly="~/bin/assemblyFileName.dll" type="fully.qualified.namespace.and.type" logAuditTrail="false" /> -->
|
||||
</logging>
|
||||
<logging>
|
||||
<enableLogging>true</enableLogging>
|
||||
<enableAsyncLogging>true</enableAsyncLogging>
|
||||
<disabledLogTypes>
|
||||
<!-- <logTypeAlias>[alias-of-log-type-in-lowercase]</logTypeAlias> -->
|
||||
</disabledLogTypes>
|
||||
<!-- You can add your own logging tool by implementing the umbraco.BusinessLogic.Interfaces.ILog interface and add the reference here -->
|
||||
<!-- The external logger can also act as the audit trail storage by setting the logAuditTrail attribute to true -->
|
||||
<!--<externalLogger assembly="~/bin/assemblyFileName.dll" type="fully.qualified.namespace.and.type" logAuditTrail="false" /> -->
|
||||
</logging>
|
||||
|
||||
<scheduledTasks>
|
||||
<!-- add tasks that should be called with an interval (seconds) -->
|
||||
<!-- <task log="true" alias="test60" interval="60" url="http://localhost/umbraco/test.aspx"/>-->
|
||||
</scheduledTasks>
|
||||
<scheduledTasks>
|
||||
<!-- add tasks that should be called with an interval (seconds) -->
|
||||
<!-- <task log="true" alias="test60" interval="60" url="http://localhost/umbraco/test.aspx"/>-->
|
||||
</scheduledTasks>
|
||||
|
||||
<!-- distributed calls make umbraco use webservices to handle cache refreshing -->
|
||||
<distributedCall enable="false">
|
||||
<!-- the id of the user who's making the calls -->
|
||||
<!-- needed for security, umbraco will automatically look up correct login and passwords -->
|
||||
<user>0</user>
|
||||
<servers>
|
||||
<!-- add ip number or hostname, make sure that it can be reached from all servers -->
|
||||
<!-- you can also add optional attributes to force a protocol or port number (see #2) -->
|
||||
<!-- <server>127.0.0.1</server>-->
|
||||
<!-- <server forceProtocol="http|https" forcePortnumber="80|443">127.0.0.1</server>-->
|
||||
</servers>
|
||||
</distributedCall>
|
||||
<!-- distributed calls make umbraco use webservices to handle cache refreshing -->
|
||||
<distributedCall enable="false">
|
||||
<!-- the id of the user who's making the calls -->
|
||||
<!-- needed for security, umbraco will automatically look up correct login and passwords -->
|
||||
<user>0</user>
|
||||
<servers>
|
||||
<!-- add ip number or hostname, make sure that it can be reached from all servers -->
|
||||
<!-- you can also add optional attributes to force a protocol or port number (see #2) -->
|
||||
<!-- <server>127.0.0.1</server>-->
|
||||
<!-- <server forceProtocol="http|https" forcePortnumber="80|443">127.0.0.1</server>-->
|
||||
</servers>
|
||||
</distributedCall>
|
||||
|
||||
<!-- configuration for webservices -->
|
||||
<!-- webservices are disabled by default. Set enable="True" to enable them -->
|
||||
<webservices enabled="False">
|
||||
<!-- You must set user-rights for each service. Enter the usernames seperated with comma (,) -->
|
||||
<documentServiceUsers>your-username</documentServiceUsers>
|
||||
<fileServiceUsers>your-username</fileServiceUsers>
|
||||
<stylesheetServiceUsers>your-username</stylesheetServiceUsers>
|
||||
<memberServiceUsers>your-username</memberServiceUsers>
|
||||
<templateServiceUsers>your-username</templateServiceUsers>
|
||||
<!-- type of files (extensions) that are allowed for the file service -->
|
||||
<fileServiceFolders>css,xslt</fileServiceFolders>
|
||||
</webservices>
|
||||
<!-- configuration for webservices -->
|
||||
<!-- webservices are disabled by default. Set enable="True" to enable them -->
|
||||
<webservices enabled="False">
|
||||
<!-- You must set user-rights for each service. Enter the usernames seperated with comma (,) -->
|
||||
<documentServiceUsers>your-username</documentServiceUsers>
|
||||
<fileServiceUsers>your-username</fileServiceUsers>
|
||||
<stylesheetServiceUsers>your-username</stylesheetServiceUsers>
|
||||
<memberServiceUsers>your-username</memberServiceUsers>
|
||||
<templateServiceUsers>your-username</templateServiceUsers>
|
||||
<!-- type of files (extensions) that are allowed for the file service -->
|
||||
<fileServiceFolders>css,xslt</fileServiceFolders>
|
||||
</webservices>
|
||||
|
||||
<!-- Configuration for repositories -->
|
||||
<!-- Add or remove repositories here. You will need the repository's unique key to be able to connect to it.-->
|
||||
<repositories>
|
||||
<repository name="Umbraco package Repository" guid="65194810-1f85-11dd-bd0b-0800200c9a66" />
|
||||
</repositories>
|
||||
<!-- Configuration for repositories -->
|
||||
<!-- Add or remove repositories here. You will need the repository's unique key to be able to connect to it.-->
|
||||
<repositories>
|
||||
<repository name="Umbraco package Repository" guid="65194810-1f85-11dd-bd0b-0800200c9a66" />
|
||||
</repositories>
|
||||
|
||||
<providers>
|
||||
<users>
|
||||
<!-- if you wish to use your own membershipprovider for authenticating to the umbraco back office -->
|
||||
<!-- specify it here (remember to add it to the web.config as well) -->
|
||||
<DefaultBackofficeProvider>UsersMembershipProvider</DefaultBackofficeProvider>
|
||||
</users>
|
||||
</providers>
|
||||
<providers>
|
||||
<users>
|
||||
<!-- if you wish to use your own membershipprovider for authenticating to the umbraco back office -->
|
||||
<!-- specify it here (remember to add it to the web.config as well) -->
|
||||
<DefaultBackofficeProvider>UsersMembershipProvider</DefaultBackofficeProvider>
|
||||
</users>
|
||||
</providers>
|
||||
|
||||
<!-- Maps language, usertype, application and application_url to help pages -->
|
||||
<help defaultUrl="http://our.umbraco.org/wiki/umbraco-help/{0}/{1}">
|
||||
<!-- Add links that should open custom help pages -->
|
||||
<!--<link application="content" applicationUrl="dashboard.aspx" language="en" userType="Administrators" helpUrl="http://www.xyz.no?{0}/{1}/{2}/{3}" /> -->
|
||||
</help>
|
||||
<!-- Maps language, usertype, application and application_url to help pages -->
|
||||
<help defaultUrl="http://our.umbraco.org/wiki/umbraco-help/{0}/{1}">
|
||||
<!-- Add links that should open custom help pages -->
|
||||
<!--<link application="content" applicationUrl="dashboard.aspx" language="en" userType="Administrators" helpUrl="http://www.xyz.no?{0}/{1}/{2}/{3}" /> -->
|
||||
</help>
|
||||
|
||||
</settings>
|
||||
|
||||
@@ -6,6 +6,15 @@
|
||||
<imageFileTypes>jpeg,jpg,gif,bmp,png,tiff,tif</imageFileTypes>
|
||||
<!-- what attributes that are allowed in the editor on an img tag -->
|
||||
<allowedAttributes>alt,border,class,style,align,id,name,onclick,usemap</allowedAttributes>
|
||||
<!-- automatically updates dimension, filesize and extension attributes on upload -->
|
||||
<autoFillImageProperties>
|
||||
<uploadField alias="umbracoFile">
|
||||
<widthFieldAlias>umbracoWidth</widthFieldAlias>
|
||||
<heightFieldAlias>umbracoHeight</heightFieldAlias>
|
||||
<lengthFieldAlias>umbracoBytes</lengthFieldAlias>
|
||||
<extensionFieldAlias>umbracoExtension</extensionFieldAlias>
|
||||
</uploadField>
|
||||
</autoFillImageProperties>
|
||||
</imaging>
|
||||
<scripteditor>
|
||||
<!-- Path to script folder - no ending "/" -->
|
||||
|
||||
@@ -92,31 +92,7 @@
|
||||
<asp:PlaceHolder ID="PropertyTypes" runat="server"></asp:PlaceHolder>
|
||||
</div>
|
||||
</cc2:Pane>
|
||||
|
||||
</asp:Panel>
|
||||
<div id="splitButtonContent" style="display: inline; height: 23px; vertical-align: top;">
|
||||
<a href="#" onclick="return false;" id="sbContent" class="sbLink">
|
||||
<img alt="Content that Uses this Template" src="../images/editor/doc.gif" title="Content that Uses this Template"
|
||||
style="vertical-align: top;">
|
||||
</a>
|
||||
</div>
|
||||
<div id="contentMenu" style="width: 285px">
|
||||
<div class="contentitem">
|
||||
<strong>Content that Uses this Document Type</strong>
|
||||
</div>
|
||||
<div class="contentitem" runat="server" id="uxNoContent">
|
||||
None
|
||||
</div>
|
||||
<asp:Repeater ID="splitButtonContentRepeater" runat="server" OnItemDataBound="splitButtonContentRepeater_ItemDataBound">
|
||||
<ItemTemplate>
|
||||
<div class="contentitem">
|
||||
<asp:Literal runat="server" ID="uxName"></asp:Literal>
|
||||
|
||||
<asp:PlaceHolder runat="server" ID="uxLink"></asp:PlaceHolder>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var mailControlId = '<asp:Literal id="theClientId" runat="server"/>';
|
||||
|
||||
@@ -101,16 +101,8 @@ namespace umbraco.controls
|
||||
}
|
||||
|
||||
theClientId.Text = this.ClientID;
|
||||
}
|
||||
|
||||
LoadContent();
|
||||
}
|
||||
private void LoadContent()
|
||||
{
|
||||
var data = cType.GetContent();
|
||||
splitButtonContentRepeater.DataSource = data;
|
||||
splitButtonContentRepeater.DataBind();
|
||||
uxNoContent.Visible = !data.Any();
|
||||
}
|
||||
protected void save_click(object sender, System.Web.UI.ImageClickEventArgs e)
|
||||
{
|
||||
// 2011 01 06 - APN - Modified method to update Xml caches if a doctype alias changed,
|
||||
@@ -248,9 +240,6 @@ jQuery(function() { refreshDropDowns(); });
|
||||
txtAlias.Text = cType.Alias;
|
||||
description.Text = cType.GetRawDescription();
|
||||
|
||||
InfoTabPage.Menu.InsertSplitter();
|
||||
InfoTabPage.Menu.NewElement("div", "splitButtonContentPlaceHolder", "sbPlaceHolder", 40);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -275,8 +264,7 @@ jQuery(function() { refreshDropDowns(); });
|
||||
ContentType[] contentTypes = cType.GetAll();
|
||||
foreach (cms.businesslogic.ContentType ct in contentTypes.OrderBy(x => x.Text))
|
||||
{
|
||||
string text = string.Format("{0} {1}", ct.Text, umbraco.cms.helpers.DeepLink.GetAnchor(DeepLinkType.DocumentType, ct.Id.ToString(), true));
|
||||
ListItem li = new ListItem(text, ct.Id.ToString());
|
||||
ListItem li = new ListItem(ct.Text, ct.Id.ToString());
|
||||
dualAllowedContentTypes.Items.Add(li);
|
||||
lstAllowedContentTypes.Items.Add(li);
|
||||
foreach (int i in allowedIds)
|
||||
@@ -920,21 +908,5 @@ Umbraco.Controls.TabView.onActiveTabChange(function(tabviewid, tabid, tabs) {
|
||||
|
||||
#endregion
|
||||
|
||||
protected void splitButtonContentRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
|
||||
{
|
||||
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
|
||||
{
|
||||
System.Tuple<int, string> item = e.Item.DataItem as System.Tuple<int, string>;
|
||||
if (item != null)
|
||||
{
|
||||
Literal uxName = e.Item.FindControl("uxName") as Literal;
|
||||
PlaceHolder uxLink = e.Item.FindControl("uxLink") as PlaceHolder;
|
||||
uxName.Text = item.Item2;
|
||||
uxLink.Controls.Add(new LiteralControl(umbraco.cms.helpers.DeepLink.GetAnchor(umbraco.cms.helpers.DeepLinkType.Content, item.Item1.ToString(), true)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -336,24 +336,6 @@ namespace umbraco.controls {
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.PlaceHolder PropertyTypes;
|
||||
|
||||
/// <summary>
|
||||
/// uxNoContent control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl uxNoContent;
|
||||
|
||||
/// <summary>
|
||||
/// splitButtonContentRepeater control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Repeater splitButtonContentRepeater;
|
||||
|
||||
/// <summary>
|
||||
/// theClientId control.
|
||||
/// </summary>
|
||||
|
||||
@@ -36,8 +36,7 @@ namespace umbraco.cms.presentation
|
||||
|
||||
controls.ContentControl cControl;
|
||||
|
||||
RadioButtonList rblDefaultTemplate = new RadioButtonList();
|
||||
HtmlGenericControl rblDefaultTemplateScrollingPanel = new HtmlGenericControl("div");
|
||||
DropDownList ddlDefaultTemplate = new DropDownList();
|
||||
|
||||
uicontrols.Pane publishProps = new uicontrols.Pane();
|
||||
uicontrols.Pane linkProps = new uicontrols.Pane();
|
||||
@@ -132,9 +131,7 @@ namespace umbraco.cms.presentation
|
||||
// Template
|
||||
PlaceHolder template = new PlaceHolder();
|
||||
cms.businesslogic.web.DocumentType DocumentType = new cms.businesslogic.web.DocumentType(_document.ContentType.Id);
|
||||
cControl.PropertiesPane.addProperty(ui.Text("documentType"), new LiteralControl(string.Format("{0} {1}", DocumentType.Text, umbraco.cms.helpers.DeepLink.GetAnchor(DeepLinkType.DocumentType, _document.ContentType.Id.ToString(), true))));
|
||||
|
||||
|
||||
cControl.PropertiesPane.addProperty(ui.Text("documentType"), new LiteralControl(DocumentType.Text));
|
||||
|
||||
|
||||
//template picker
|
||||
@@ -154,7 +151,16 @@ namespace umbraco.cms.presentation
|
||||
}
|
||||
else
|
||||
{
|
||||
AddDefaultTemplateControl(defaultTemplate, ref template, ref DocumentType);
|
||||
ddlDefaultTemplate.Items.Add(new ListItem(ui.Text("choose") + "...", ""));
|
||||
foreach (cms.businesslogic.template.Template t in DocumentType.allowedTemplates)
|
||||
{
|
||||
|
||||
ListItem tTemp = new ListItem(t.Text, t.Id.ToString());
|
||||
if (t.Id == defaultTemplate)
|
||||
tTemp.Selected = true;
|
||||
ddlDefaultTemplate.Items.Add(tTemp);
|
||||
}
|
||||
template.Controls.Add(ddlDefaultTemplate);
|
||||
}
|
||||
|
||||
|
||||
@@ -260,9 +266,9 @@ namespace umbraco.cms.presentation
|
||||
_document.ExpireDate = new DateTime(1, 1, 1, 0, 0, 0);
|
||||
|
||||
// Update default template
|
||||
if (rblDefaultTemplate.SelectedIndex > 0)
|
||||
if (ddlDefaultTemplate.SelectedIndex > 0)
|
||||
{
|
||||
_document.Template = int.Parse(rblDefaultTemplate.SelectedValue);
|
||||
_document.Template = int.Parse(ddlDefaultTemplate.SelectedValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -436,60 +442,6 @@ namespace umbraco.cms.presentation
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// If the user has permissions to update, then add the template drop down list, otherwise just write out the template that is currently used.
|
||||
/// </summary>
|
||||
/// <param name="defaultTemplate"></param>
|
||||
/// <param name="template"></param>
|
||||
/// <param name="DocumentType"></param>
|
||||
private void AddDefaultTemplateControl(int defaultTemplate, ref PlaceHolder template, ref cms.businesslogic.web.DocumentType documentType)
|
||||
{
|
||||
string permissions = this.getUser().GetPermissions(_document.Path);
|
||||
|
||||
if (permissions.IndexOf(ActionUpdate.Instance.Letter) >= 0)
|
||||
{
|
||||
rblDefaultTemplateScrollingPanel = new HtmlGenericControl("div");
|
||||
rblDefaultTemplateScrollingPanel.Style.Add(HtmlTextWriterStyle.Overflow, "auto");
|
||||
rblDefaultTemplateScrollingPanel.Style.Add("min-height", "15px");
|
||||
rblDefaultTemplateScrollingPanel.Style.Add("max-height", "50px");
|
||||
rblDefaultTemplateScrollingPanel.Style.Add("width", "300px");
|
||||
rblDefaultTemplateScrollingPanel.Style.Add("display", "inline-block");
|
||||
rblDefaultTemplate.RepeatDirection = RepeatDirection.Horizontal;
|
||||
rblDefaultTemplate.RepeatColumns = 3;
|
||||
rblDefaultTemplateScrollingPanel.Controls.Add(rblDefaultTemplate);
|
||||
template.Controls.Add(rblDefaultTemplateScrollingPanel);
|
||||
|
||||
BindTemplateControl(defaultTemplate, ref documentType);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (defaultTemplate != 0)
|
||||
template.Controls.Add(new LiteralControl(new cms.businesslogic.template.Template(defaultTemplate).Text));
|
||||
else
|
||||
template.Controls.Add(new LiteralControl(ui.Text("content", "noDefaultTemplate")));
|
||||
}
|
||||
}
|
||||
|
||||
private void BindTemplateControl(int defaultTemplate, ref cms.businesslogic.web.DocumentType documentType)
|
||||
{
|
||||
rblDefaultTemplate.Items.Add(new ListItem("None", ""));
|
||||
bool selected = false;
|
||||
foreach (cms.businesslogic.template.Template t in documentType.allowedTemplates)
|
||||
{
|
||||
ListItem tTemp = new ListItem(string.Format("{0} {1}", t.Text, umbraco.cms.helpers.DeepLink.GetAnchor(DeepLinkType.Template, t.Id.ToString(), true)), t.Id.ToString());
|
||||
if (t.Id == defaultTemplate)
|
||||
{
|
||||
tTemp.Selected = true;
|
||||
selected = true;
|
||||
}
|
||||
rblDefaultTemplate.Items.Add(tTemp);
|
||||
}
|
||||
if (!selected)
|
||||
{
|
||||
rblDefaultTemplate.SelectedIndex = 0;
|
||||
}
|
||||
}
|
||||
private void addPreviewButton(uicontrols.ScrollingMenu menu, int id)
|
||||
{
|
||||
menu.InsertSplitter(2);
|
||||
|
||||
@@ -3,21 +3,6 @@
|
||||
|
||||
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
|
||||
<%@ Register TagPrefix="uc1" TagName="ContentTypeControlNew" Src="../controls/ContentTypeControlNew.ascx" %>
|
||||
<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>
|
||||
<asp:Content 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" Priority="1" />
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function () {
|
||||
//content split button
|
||||
jQuery('#sbContent').splitbutton({ menu: '#contentMenu' });
|
||||
jQuery("#splitButtonContent").appendTo("#splitButtonContentPlaceHolder");
|
||||
applySplitButtonOverflow('contentUsedContainer', 'innerContentUsedContainer', 'contentMenu', '.contentitem', 'showMoreContent');
|
||||
});
|
||||
</script>
|
||||
</asp:Content>
|
||||
<asp:Content ContentPlaceHolderID="body" runat="server">
|
||||
<uc1:ContentTypeControlNew ID="ContentTypeControlNew1" runat="server"></uc1:ContentTypeControlNew>
|
||||
<cc1:Pane ID="tmpPane" runat="server">
|
||||
|
||||
@@ -67,16 +67,8 @@ namespace umbraco.settings
|
||||
templateList.Items.Clear();
|
||||
templateList.Items.AddRange(templates.ConvertAll(item =>
|
||||
{
|
||||
string anchor = DeepLink.GetAnchor(DeepLinkType.Template, item.Id.ToString(), true);
|
||||
ListItem li = new ListItem();
|
||||
if (!string.IsNullOrEmpty(anchor))
|
||||
{
|
||||
li.Text = string.Format("{0} {1}", item.Name, anchor);
|
||||
}
|
||||
else
|
||||
{
|
||||
li.Text = item.Name;
|
||||
}
|
||||
li.Text = item.Name;
|
||||
li.Value = item.Id.ToString();
|
||||
li.Selected = item.Selected;
|
||||
return li;
|
||||
|
||||
@@ -12,24 +12,6 @@ namespace umbraco.settings {
|
||||
|
||||
public partial class EditContentTypeNew {
|
||||
|
||||
/// <summary>
|
||||
/// CssInclude1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::ClientDependency.Core.Controls.CssInclude CssInclude1;
|
||||
|
||||
/// <summary>
|
||||
/// JsInclude control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::ClientDependency.Core.Controls.JsInclude JsInclude;
|
||||
|
||||
/// <summary>
|
||||
/// tmpPane control.
|
||||
/// </summary>
|
||||
|
||||
@@ -26,16 +26,6 @@
|
||||
});
|
||||
applySplitButtonOverflow('mcontainer','innerc','macroMenu','.macro', 'showMoreMacros');
|
||||
|
||||
//document types split button
|
||||
jQuery('#sbDocType').splitbutton({menu:'#docTypeMenu'});
|
||||
jQuery("#splitButtonDocType").appendTo("#splitButtonDocTypePlaceHolder");
|
||||
applySplitButtonOverflow('docTypesReferencingContainer','innerdocTypesReferencingContainer','docTypeMenu','.documenttype', 'showMoreDocTypes');
|
||||
|
||||
//content split button
|
||||
jQuery('#sbContent').splitbutton({menu:'#contentMenu'});
|
||||
jQuery("#splitButtonContent").appendTo("#splitButtonContentPlaceHolder");
|
||||
applySplitButtonOverflow('contentUsedContainer','innerContentUsedContainer','contentMenu','.contentitem', 'showMoreContent');
|
||||
|
||||
//razor macro split button
|
||||
jQuery('#sb').splitbutton({menu:'#codeTemplateMenu'});
|
||||
jQuery("#splitButton").appendTo("#splitButtonPlaceHolder");
|
||||
@@ -226,53 +216,6 @@
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</div>
|
||||
<div id="splitButtonDocType" style="display: inline; height: 23px; vertical-align: top;">
|
||||
<a href="#" onclick="return false;" id="sbDocType" class="sbLink">
|
||||
<img alt="Document Types that Use this Template" src="../images/editor/documentType.gif" title="Document Types that Use this Template"
|
||||
style="vertical-align: top;">
|
||||
</a>
|
||||
</div>
|
||||
<div id="docTypeMenu" style="width: 285px">
|
||||
<div class="documenttype">
|
||||
<strong>Document Types that Use this Template</strong>
|
||||
</div>
|
||||
<div class="documenttype" runat="server" id="uxNoDocumentTypes">
|
||||
None
|
||||
</div>
|
||||
<asp:Repeater ID="splitButtonDocumentTypesRepeater" runat="server">
|
||||
<ItemTemplate>
|
||||
<div class="documenttype">
|
||||
<%# DataBinder.Eval(Container, "DataItem.Text")%>
|
||||
|
||||
<%#umbraco.cms.helpers.DeepLink.GetAnchor(umbraco.cms.helpers.DeepLinkType.DocumentType, string.Format("{0}",DataBinder.Eval(Container,"DataItem.Id")), true)%>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</div>
|
||||
|
||||
<div id="splitButtonContent" style="display: inline; height: 23px; vertical-align: top;">
|
||||
<a href="#" onclick="return false;" id="sbContent" class="sbLink">
|
||||
<img alt="Content that Uses this Template" src="../images/editor/doc.gif" title="Content that Uses this Template"
|
||||
style="vertical-align: top;">
|
||||
</a>
|
||||
</div>
|
||||
<div id="contentMenu" style="width: 285px">
|
||||
<div class="contentitem">
|
||||
<strong>Content that Uses this Template</strong>
|
||||
</div>
|
||||
<div class="contentitem" runat="server" id="uxNoContent">
|
||||
None
|
||||
</div>
|
||||
<asp:Repeater ID="splitButtonContentRepeater" runat="server" OnItemDataBound="splitButtonContentRepeater_ItemDataBound">
|
||||
<ItemTemplate>
|
||||
<div class="contentitem">
|
||||
<asp:Literal runat="server" ID="uxName"></asp:Literal>
|
||||
|
||||
<asp:PlaceHolder runat="server" ID="uxLink"></asp:PlaceHolder>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:Repeater>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function () {
|
||||
UmbClientMgr.appActions().bindSaveShortCut();
|
||||
|
||||
@@ -78,37 +78,6 @@ namespace umbraco.cms.presentation.settings
|
||||
|
||||
LoadScriptingTemplates();
|
||||
LoadMacros();
|
||||
LoadDocTypes();
|
||||
LoadContent();
|
||||
}
|
||||
}
|
||||
|
||||
protected void splitButtonDocumentTypesRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
|
||||
{
|
||||
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
|
||||
{
|
||||
Tuple<int, string> item = e.Item.DataItem as Tuple<int, string>;
|
||||
if (item != null)
|
||||
{
|
||||
Literal uxName = e.Item.FindControl("uxName") as Literal;
|
||||
PlaceHolder uxLink = e.Item.FindControl("uxLink") as PlaceHolder;
|
||||
uxName.Text = item.Item2;
|
||||
uxLink.Controls.Add(new LiteralControl(umbraco.cms.helpers.DeepLink.GetAnchor(helpers.DeepLinkType.DocumentType, item.Item1.ToString(), true)));
|
||||
}
|
||||
}
|
||||
}
|
||||
protected void splitButtonContentRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
|
||||
{
|
||||
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
|
||||
{
|
||||
Tuple<int, string> item = e.Item.DataItem as Tuple<int, string>;
|
||||
if (item != null)
|
||||
{
|
||||
Literal uxName = e.Item.FindControl("uxName") as Literal;
|
||||
PlaceHolder uxLink = e.Item.FindControl("uxLink") as PlaceHolder;
|
||||
uxName.Text = item.Item2;
|
||||
uxLink.Controls.Add(new LiteralControl(umbraco.cms.helpers.DeepLink.GetAnchor(helpers.DeepLinkType.Content, item.Item1.ToString(), true)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,12 +168,6 @@ namespace umbraco.cms.presentation.settings
|
||||
"','canvas')";
|
||||
}
|
||||
|
||||
Panel1.Menu.InsertSplitter();
|
||||
Panel1.Menu.NewElement("div", "splitButtonDocTypePlaceHolder", "sbPlaceHolder", 40);
|
||||
|
||||
Panel1.Menu.InsertSplitter();
|
||||
Panel1.Menu.NewElement("div", "splitButtonContentPlaceHolder", "sbPlaceHolder", 40);
|
||||
|
||||
// Help
|
||||
Panel1.Menu.InsertSplitter();
|
||||
|
||||
@@ -255,20 +218,6 @@ namespace umbraco.cms.presentation.settings
|
||||
macroRenderings.Close();
|
||||
}
|
||||
|
||||
private void LoadDocTypes()
|
||||
{
|
||||
var data = _template.GetDocumentTypes();
|
||||
splitButtonDocumentTypesRepeater.DataSource = data;
|
||||
splitButtonDocumentTypesRepeater.DataBind();
|
||||
uxNoDocumentTypes.Visible = !data.Any();
|
||||
}
|
||||
private void LoadContent()
|
||||
{
|
||||
var data = _template.GetContent();
|
||||
splitButtonContentRepeater.DataSource = data;
|
||||
splitButtonContentRepeater.DataBind();
|
||||
uxNoContent.Visible = !data.Any();
|
||||
}
|
||||
public string DoesMacroHaveSettings(string macroId)
|
||||
{
|
||||
if (
|
||||
|
||||
@@ -137,41 +137,5 @@ namespace umbraco.cms.presentation.settings {
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Repeater rpt_macros;
|
||||
|
||||
/// <summary>
|
||||
/// uxNoDocumentTypes control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl uxNoDocumentTypes;
|
||||
|
||||
/// <summary>
|
||||
/// splitButtonDocumentTypesRepeater control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Repeater splitButtonDocumentTypesRepeater;
|
||||
|
||||
/// <summary>
|
||||
/// uxNoContent control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl uxNoContent;
|
||||
|
||||
/// <summary>
|
||||
/// splitButtonContentRepeater control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Repeater splitButtonContentRepeater;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<add xdt:Transform="Replace" xdt:Locator="Match(key)" key="umbracoDbDSN"
|
||||
value="server=.\mojosqlserver;database=v472;integrated security=false;user id=DBUSER;password=DBPASSWORD"/>
|
||||
<add xdt:Transform="Replace" xdt:Locator="Match(key)" key="umbracoConfigurationStatus"
|
||||
value="4.7.2"/>
|
||||
value="4.8.0"/>
|
||||
</appSettings>
|
||||
|
||||
<system.web>
|
||||
|
||||
Reference in New Issue
Block a user