Quantcast
Channel: Optimizely Search & Navigation
Viewing all articles
Browse latest Browse all 6894

Add a CSS class to Collection Editor

$
0
0

We are using 'IList<propertyTypeInHere>' for page properties in a few places, and one of those instances we wish to extend the size of the 'UiWrapperType.Floating' window. We've managed to change the size with some simple css :

.Sleek .epi-dialog-landscape .dijitDialogPaneContentArea {
    height: 450px !important;
}
.Sleek .epi-dialog-landscape, .Sleek .epi-dialog-portrait, .Sleek .epi-dialog--auto-height {
    width: 700px !important;
}
.dijitDialogPaneContentArea .epi-collection-editor {
    min-width: 960px;
    height: 800px;
}
.Sleek .epi-collection-editor .epi-plain-grid {
    min-height: 800px !important;
    width: 960px !important;
}

but unfortunately this applies the css to ALL IList<> properties. We'd like to us an CollectionEditorDescriptor or Dojo Javascript to add a class to the HTML so that the above CSS can be targetted to only that instance. Anyone done anything similar? 

Our current basic collection editor definition:

[EditorDescriptorRegistration(TargetType = typeof(IList<ourPropertyType>))]
    public class OnPageCollectionEditorDescriptor : CollectionEditorDescriptor<ourPropertyType>
    {
        public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable<Attribute> attributes)
        {
            base.ModifyMetadata(metadata, attributes);
            metadata.CustomEditorSettings["uiType"] = metadata.ClientEditingClass;
            metadata.CustomEditorSettings["uiWrapperType"] = UiWrapperType.Floating;
        }
    }

Viewing all articles
Browse latest Browse all 6894

Trending Articles