Merge
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="tinymce3/tiny_mce_popup.js" PathNameAlias="UmbracoClient" Priority="100" />
|
||||
<umb:JsInclude ID="JsInclude3" runat="server" FilePath="tinymce3/plugins/umbracolink/js/umbracolink.js" PathNameAlias="UmbracoClient" Priority="101" />
|
||||
<umb:JsInclude ID="JsInclude4" runat="server" FilePath="tinymce3/utils/form_utils.js" PathNameAlias="UmbracoClient" Priority="102" />
|
||||
|
||||
<umb:JsInclude ID="JsInclude5" runat="server" FilePath="tinymce3/utils/validate.js" PathNameAlias="UmbracoClient" Priority="103" />
|
||||
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
|
||||
@@ -3,6 +3,39 @@
|
||||
|
||||
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
|
||||
<%@ Register TagPrefix="uc1" TagName="ContentTypeControlNew" Src="../controls/ContentTypeControlNew.ascx" %>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="head" runat="server">
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function () {
|
||||
|
||||
// Auto selection/de-selection of default template based on allow templates
|
||||
jQuery("#<%= templateList.ClientID %> input[type='checkbox']").on("change", function () {
|
||||
var checkbox = jQuery(this);
|
||||
var ddl = jQuery("#<%= ddlTemplates.ClientID %>");
|
||||
// If default template is not set, and an allowed template is selected, auto-select the default template
|
||||
if (checkbox.is(":checked")) {
|
||||
if (ddl.val() == "0") {
|
||||
ddl.val(checkbox.val());
|
||||
}
|
||||
} else {
|
||||
// If allowed template has been de-selected, and it's selected as the default, then de-select the default template
|
||||
if (ddl.val() == checkbox.val()) {
|
||||
ddl.val("0");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Auto selection allowed template based on default template
|
||||
jQuery("#<%= ddlTemplates.ClientID %>").on("change", function () {
|
||||
var ddl = jQuery(this);
|
||||
if (ddl.val() != "0") {
|
||||
jQuery("#<%= templateList.ClientID %> input[type='checkbox'][value='" + ddl.val() + "']").prop("checked", true);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="body" runat="server">
|
||||
<uc1:ContentTypeControlNew ID="ContentTypeControlNew1" runat="server"></uc1:ContentTypeControlNew>
|
||||
<cc1:Pane ID="tmpPane" runat="server">
|
||||
|
||||
@@ -146,11 +146,8 @@ function init() {
|
||||
}
|
||||
|
||||
function checkPrefix(n) {
|
||||
/* UMBRACO SPECIFIC
|
||||
if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_email')))
|
||||
n.value = 'mailto:' + n.value;
|
||||
* EO UMBRACO SPECIFIC
|
||||
*/
|
||||
|
||||
if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_external')))
|
||||
n.value = 'http://' + n.value;
|
||||
|
||||
@@ -317,7 +317,6 @@ namespace umbraco.cms.presentation
|
||||
ClientTools.ShowSpeechBubble(speechBubbleIcon.save, ui.Text("speechBubbles", "editContentPublishedHeader", null), ui.Text("speechBubbles", "editContentPublishedText", null));
|
||||
library.UpdateDocumentCache(_document.Id);
|
||||
|
||||
BusinessLogic.Log.Add(BusinessLogic.LogTypes.Publish, base.getUser(), _document.Id, "");
|
||||
littPublishStatus.Text = ui.Text("content", "lastPublished", base.getUser()) + ": " + _document.VersionDate.ToString() + "<br/>";
|
||||
|
||||
if (base.getUser().GetPermissions(_document.Path).IndexOf("U") > -1)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<umb:JsInclude ID="JsInclude1" runat="server" FilePath="tinymce3/tiny_mce_popup.js" PathNameAlias="UmbracoClient" Priority="100" />
|
||||
<umb:JsInclude ID="JsInclude3" runat="server" FilePath="tinymce3/plugins/umbracolink/js/umbracolink.js" PathNameAlias="UmbracoClient" Priority="101" />
|
||||
<umb:JsInclude ID="JsInclude4" runat="server" FilePath="tinymce3/utils/form_utils.js" PathNameAlias="UmbracoClient" Priority="102" />
|
||||
|
||||
<umb:JsInclude ID="JsInclude5" runat="server" FilePath="tinymce3/utils/validate.js" PathNameAlias="UmbracoClient" Priority="103" />
|
||||
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
|
||||
@@ -66,6 +66,15 @@ namespace umbraco.presentation.plugins.tinymce3 {
|
||||
/// </remarks>
|
||||
protected global::ClientDependency.Core.Controls.JsInclude JsInclude4;
|
||||
|
||||
/// <summary>
|
||||
/// JsInclude5 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 JsInclude5;
|
||||
|
||||
/// <summary>
|
||||
/// pane_url control.
|
||||
/// </summary>
|
||||
|
||||
@@ -3,6 +3,39 @@
|
||||
|
||||
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
|
||||
<%@ Register TagPrefix="uc1" TagName="ContentTypeControlNew" Src="../controls/ContentTypeControlNew.ascx" %>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="head" runat="server">
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function () {
|
||||
|
||||
// Auto selection/de-selection of default template based on allow templates
|
||||
jQuery("#<%= templateList.ClientID %> input[type='checkbox']").on("change", function () {
|
||||
var checkbox = jQuery(this);
|
||||
var ddl = jQuery("#<%= ddlTemplates.ClientID %>");
|
||||
// If default template is not set, and an allowed template is selected, auto-select the default template
|
||||
if (checkbox.is(":checked")) {
|
||||
if (ddl.val() == "0") {
|
||||
ddl.val(checkbox.val());
|
||||
}
|
||||
} else {
|
||||
// If allowed template has been de-selected, and it's selected as the default, then de-select the default template
|
||||
if (ddl.val() == checkbox.val()) {
|
||||
ddl.val("0");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Auto selection allowed template based on default template
|
||||
jQuery("#<%= ddlTemplates.ClientID %>").on("change", function () {
|
||||
var ddl = jQuery(this);
|
||||
if (ddl.val() != "0") {
|
||||
jQuery("#<%= templateList.ClientID %> input[type='checkbox'][value='" + ddl.val() + "']").prop("checked", true);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="body" runat="server">
|
||||
<uc1:ContentTypeControlNew ID="ContentTypeControlNew1" runat="server"></uc1:ContentTypeControlNew>
|
||||
<cc1:Pane ID="tmpPane" runat="server">
|
||||
|
||||
@@ -316,7 +316,7 @@ namespace umbraco.cms.businesslogic
|
||||
/// </summary>
|
||||
public bool IsContainerContentType
|
||||
{
|
||||
get { return _isContainerContentType; }
|
||||
get { return _isContainerContentType; }
|
||||
set
|
||||
{
|
||||
_isContainerContentType = value;
|
||||
@@ -324,7 +324,7 @@ namespace umbraco.cms.businesslogic
|
||||
"update cmsContentType set isContainerContentType = @isContainerContentType where nodeId = @id",
|
||||
SqlHelper.CreateParameter("@isContainerContentType", value),
|
||||
SqlHelper.CreateParameter("@id", Id));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -962,25 +962,38 @@ namespace umbraco.cms.businesslogic
|
||||
}
|
||||
|
||||
|
||||
|
||||
private readonly object _virtualTabLoadLock = new object();
|
||||
/// <summary>
|
||||
/// Checks if we've loaded the virtual tabs into memory and if not gets them from the databse.
|
||||
/// </summary>
|
||||
private void EnsureVirtualTabs()
|
||||
{
|
||||
//optimize, lazy load the data only one time
|
||||
// This class can be cached and potentially shared between multiple threads.
|
||||
// Two or more threads can attempt to lazyily-load its virtual tabs at the same time.
|
||||
// If that happens, the m_VirtualTabs will contain duplicates.
|
||||
// We must prevent two threads from running InitializeVirtualTabs at the same time.
|
||||
// We must also prevent m_VirtualTabs from being modified while it is being populated.
|
||||
if (m_VirtualTabs == null || m_VirtualTabs.Count == 0)
|
||||
{
|
||||
InitializeVirtualTabs();
|
||||
lock (_virtualTabLoadLock)
|
||||
{
|
||||
//optimize, lazy load the data only one time
|
||||
if (m_VirtualTabs == null || m_VirtualTabs.Count == 0)
|
||||
{
|
||||
InitializeVirtualTabs();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Loads the tabs into memory from the database and stores them in a local list for retreival
|
||||
/// </summary>
|
||||
private void InitializeVirtualTabs()
|
||||
{
|
||||
m_VirtualTabs = new List<TabI>();
|
||||
// While we are initialising, we should not use the class-scoped list, as it may be used by other threads
|
||||
var temporaryList = new List<TabI>();
|
||||
using (IRecordsReader dr = SqlHelper.ExecuteReader(
|
||||
string.Format(
|
||||
"Select Id,text,sortOrder from cmsTab where contenttypeNodeId = {0} order by sortOrder",
|
||||
@@ -988,21 +1001,21 @@ namespace umbraco.cms.businesslogic
|
||||
{
|
||||
while (dr.Read())
|
||||
{
|
||||
m_VirtualTabs.Add(new Tab(dr.GetInt("id"), dr.GetString("text"), dr.GetInt("sortOrder"), this));
|
||||
temporaryList.Add(new Tab(dr.GetInt("id"), dr.GetString("text"), dr.GetInt("sortOrder"), this));
|
||||
}
|
||||
}
|
||||
|
||||
// Master Content Type
|
||||
if (MasterContentType != 0)
|
||||
{
|
||||
foreach (TabI t in ContentType.GetContentType(MasterContentType).getVirtualTabs.ToList())
|
||||
{
|
||||
m_VirtualTabs.Add(t);
|
||||
}
|
||||
temporaryList.AddRange(GetContentType(MasterContentType).getVirtualTabs.ToList());
|
||||
}
|
||||
|
||||
// sort all tabs
|
||||
m_VirtualTabs.Sort((a, b) => a.SortOrder.CompareTo(b.SortOrder));
|
||||
temporaryList.Sort((a, b) => a.SortOrder.CompareTo(b.SortOrder));
|
||||
|
||||
// now that we aren't going to modify the list, we can set it to the class-scoped variable.
|
||||
m_VirtualTabs = temporaryList;
|
||||
}
|
||||
|
||||
private void populateMasterContentTypes(PropertyType pt, int docTypeId)
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace umbraco.cms.businesslogic.web
|
||||
StylesheetProperty[] retVal = new StylesheetProperty[tmp.Length];
|
||||
for (int i = 0; i < tmp.Length; i++)
|
||||
{
|
||||
retVal[i] = StylesheetProperty.GetStyleSheetProperty(this.ChildrenOfAllObjectTypes[i].Id);
|
||||
retVal[i] = StylesheetProperty.GetStyleSheetProperty(tmp[i].Id);
|
||||
}
|
||||
m_properties = retVal;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user