From 62cf50ba8d2d92b8f763c327fa39699445b3bf21 Mon Sep 17 00:00:00 2001 From: hartvig Date: Mon, 24 Oct 2011 10:41:41 -0200 Subject: [PATCH] Work items: 30041 --- .../imagecropper/Resources.resx | 4 ++-- .../controls/ContentTypeControlNew.ascx.cs | 23 +++++++++++-------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/components/editorControls/imagecropper/Resources.resx b/components/editorControls/imagecropper/Resources.resx index be341a675f..2d4ad6fb9f 100644 --- a/components/editorControls/imagecropper/Resources.resx +++ b/components/editorControls/imagecropper/Resources.resx @@ -413,8 +413,8 @@ $.Jcrop = function(obj,opt) drawBorders: true, dragEdges: true, - boxWidth: 0, - boxHeight: 0, + boxWidth: (jQuery(window).width()*0.85), + boxHeight: (jQuery(window).height()*0.85), boundary: 8, animationDelay: 20, diff --git a/umbraco/presentation/umbraco/controls/ContentTypeControlNew.ascx.cs b/umbraco/presentation/umbraco/controls/ContentTypeControlNew.ascx.cs index 96518a9272..c263261181 100644 --- a/umbraco/presentation/umbraco/controls/ContentTypeControlNew.ascx.cs +++ b/umbraco/presentation/umbraco/controls/ContentTypeControlNew.ascx.cs @@ -224,14 +224,17 @@ namespace umbraco.controls ddlThumbnails.Items.Add(li); } - Page.ClientScript.RegisterStartupScript(this.GetType(), "thumbnailsDropDown", @" + Page.ClientScript.RegisterStartupScript(this.GetType(), "thumbnailsDropDown", @" function refreshDropDowns() { - jQuery('#" + ddlIcons.ClientID + @"').msDropDown({ showIcon: true, style: 'width:250px;' }); + if (jQuery('#" + ddlIcons.ClientID + @" option').length <= 100) + jQuery('#" + ddlIcons.ClientID + @"').msDropDown({ showIcon: true, style: 'width:250px;' }); + else { + jQuery('#" + ddlIcons.ClientID + @"').before('

For performance reasons, icons will not be displayed when there are more than 100 items in the dropdown.

Tab: " + tabCaption + "

")); - // zb-00036 #29889 : fix property types getter - var propertyTypes = t.GetPropertyTypes(cType.Id, false); + // zb-00036 #29889 : fix property types getter + var propertyTypes = t.GetPropertyTypes(cType.Id, false); - if (propertyTypes.Length > 0) + if (propertyTypes.Length > 0) { HtmlInputHidden propSort = new HtmlInputHidden(); propSort.ID = "propSort_" + t.Id.ToString() + "_Content"; PropertyTypes.Controls.Add(propSort); _sortLists.Add(propSort); - // zb-00036 #29889 : remove filter, not needed anymore + // zb-00036 #29889 : remove filter, not needed anymore - if (propertyTypes.Count() > 0) + if (propertyTypes.Count() > 0) { PropertyTypes.Controls.Add(new LiteralControl("