コード例 #1
0
        public FooterMenuDescriptor()
        {
            AllowedTypes = new Type[] { typeof(FooterMenuBlock) };

            ClientEditingClass = "epi-cms.contentediting.editors.ContentAreaEditor";
            OverlayConfiguration.Add("customType", "epi-cms.widget.overlay.ContentArea");
        }
        public ImageGalleryEditorDescriptor()
        {           // Setup the types that are allowed to be dragged and dropped into the content
            // area; in this case only images are allowed to be added.
            AllowedTypes = new Type[] { typeof(IContentImage) };

            // Unfortunetly the ContentAreaEditorDescriptor is located in the CMS module
            // and thus can not be inherited from; these settings are copied from that
            // descriptor. These settings determine which editor and overlay should be
            // used by this property in edit mode.
            ClientEditingClass = "epi-cms/contentediting/editors/ContentAreaEditor";
            OverlayConfiguration.Add("customType", "epi-cms/widget/overlay/ContentArea");
        }
コード例 #3
0
        private void LoadConfiguration(bool reset = false)
        {
            var rawConfig = _settings.Get <string>(WebOverlayConfig);

            if (reset)
            {
                OverlayConfiguration.PropertyChanged -= OverlayConfigurationPropertyChanged;

                var newConfiguration = new OverlayConfiguration();
                OverlayConfiguration = newConfiguration;
                OverlayConfiguration.PropertyChanged += OverlayConfigurationPropertyChanged;
                OverlayConfigurationPropertyChanged(this, new PropertyChangedEventArgs("dummy"));
            }

            if (reset || rawConfig == WebOverlayConfig.Default <string>())
            {
                return;
            }

            var config = JsonConvert.DeserializeObject <OverlayConfiguration>(rawConfig, colorConverter);

            OverlayConfiguration = config;
        }