public static void IncludeThemesDefaults(this StyleRegister register)
 {
     register.Include("themes/font-awesome.min.css");
     register.Include("fonts/fonts.googleapis.css");
     register.Include("fonts/font-awesome-animation.min.css");
     register.Include("themesdefaults/theme.css");
 }
Exemplo n.º 2
0
        private void RegisterManagers()
        {
            var inputManager = new InputManagerCollection();

            inputManager.RegisterAssembly(typeof(TextInput).Assembly);
            inputManager.RegisterAssembly(typeof(DynamicFormInput).Assembly);

            var outputManager = new OutputManagerCollection();

            outputManager.RegisterAssembly(typeof(TextOutput).Assembly);
            outputManager.RegisterAssembly(typeof(ObjectListOutput).Assembly);

            var eventManager = new EventHandlerManagerCollection();

            eventManager.RegisterAssembly(typeof(BindToOutputEventHandler).Assembly);

            var styleRegister = new StyleRegister();

            styleRegister.RegisterAssembly(typeof(TextViewStyle).Assembly);
            this.ManagersCollection = new ManagersCollection
            {
                InputManagerCollection        = inputManager,
                OutputManagerCollection       = outputManager,
                EventHandlerManagerCollection = eventManager,
                StyleRegister = styleRegister
            };
        }
 public static void IncludeJQueryUI(this StyleRegister register)
 {
     register.Include("jqueryui/jquery-ui-1.10.3.custom.css");
     register.Include("jqueryui/jquery-ui-1.10.3.theme.css");
     register.Include("jqueryui/jquery.ui.1.10.3.ie.css");
     register.Include("jqueryui/jquery-ui-timepicker-addon.css");
 }
Exemplo n.º 4
0
 public override void GetAdditionalResources(ScriptRegister scriptRegister, StyleRegister styleRegister)
 {
     if (Type != RoboTextType.RichText)
     {
         return;
     }
     scriptRegister.IncludeBundle("richtext");
 }
Exemplo n.º 5
0
 public override void GetAdditionalResources(ScriptRegister scriptRegister, StyleRegister styleRegister)
 {
     if (!EnableChosen)
     {
         return;
     }
     scriptRegister.IncludeBundle("jquery-chosen");
     styleRegister.IncludeBundle("jquery-chosen");
 }
 public static void IncludeThemes(this StyleRegister register)
 {
     register.Include("themes/font-awesome.min.css");
     register.Include("fonts/fonts.googleapis.css");
     register.Include("themes/production.css");
     register.Include("themes/smartadmin-skins.css");
     register.Include("themes/common.css");
     register.Include("themes/box.css");
 }
Exemplo n.º 7
0
        protected override ViewEngineResult FindView(ControllerContext controllerContext)
        {
            var result = ViewEngineCollection.FindView(controllerContext, "RoboFormResult_", null);

            var workContext    = EngineContext.Current.Resolve <IWebWorkContext>();
            var scriptRegister = new ScriptRegister(workContext);
            var styleRegister  = new StyleRegister(workContext);

            GetAdditionalResources(scriptRegister, styleRegister);

            return(result);
        }
Exemplo n.º 8
0
        public string ToHtmlString()
        {
            if (setupAction != null)
            {
                setupAction(this);
            }
            var workContext    = EngineContext.Current.Resolve <IWebWorkContext>();
            var scriptRegister = new ScriptRegister(workContext);
            var styleRegister  = new StyleRegister(workContext);

            GetAdditionalResources(scriptRegister, styleRegister);
            return(GenerateView());
        }
Exemplo n.º 9
0
        public override void GetAdditionalResources(ScriptRegister scriptRegister, StyleRegister styleRegister)
        {
            scriptRegister.IncludeBundle("jquery-ui");
            styleRegister.IncludeBundle("jquery-ui");

            scriptRegister.IncludeBundle("jqueryval");

            //scriptRegister.IncludeBundle("fancybox");
            //styleRegister.IncludeBundle("fancybox");

            scriptRegister.IncludeBundle("jqgrid");
            styleRegister.IncludeBundle("jqgrid");
        }
Exemplo n.º 10
0
        public void OnResultExecuting(ResultExecutingContext filterContext)
        {
            // should only run on a full view rendering result
            if (!(filterContext.Result is ViewResult))
            {
                return;
            }

            if (filterContext.HttpContext.Request.IsAjaxRequest())
            {
                return;
            }

            var workContext = workContextAccessor.GetContext(filterContext);

            if (workContext == null || workContext.Layout == null)
            {
                return;
            }

            var widgets = providers.SelectMany(x => x.GetWidgets(workContext)).ToList();
            var zones   = workContext.Layout.Zones;

            var resourceTypes = new List <ResourceType>();

            foreach (var widget in widgets)
            {
                resourceTypes.AddRange(widget.GetAdditionalResources());

                var widgetShape = shapeFactory.Widget();
                widgetShape.Widget = widget;

                var zoneRecord = zoneService.GetById(widget.ZoneId);
                if (zoneRecord != null)
                {
                    var zone = zones[zoneRecord.Name];
                    zone.Add(widgetShape, widget.Order.ToString(CultureInfo.InvariantCulture));
                }
            }

            if (resourceTypes.Count > 0)
            {
                var scriptRegister = new ScriptRegister(workContext);
                var styleRegister  = new StyleRegister(workContext);

                foreach (var resourceType in resourceTypes)
                {
                    ResourcesManager.LookupResources(resourceType, scriptRegister, styleRegister);
                }
            }
        }
Exemplo n.º 11
0
        public override void GetAdditionalResources(ScriptRegister scriptRegister, StyleRegister styleRegister)
        {
            if (EnableFineUploader)
            {
                scriptRegister.IncludeBundle("fine-uploader");
                styleRegister.IncludeBundle("fine-uploader");
            }

            if (EnableBrowse)
            {
                scriptRegister.IncludeBundle("fancybox");
                styleRegister.IncludeBundle("fancybox");
            }
        }
Exemplo n.º 12
0
        public override void InitHelpers()
        {
            base.InitHelpers();

            if (initializationCompleted)
            {
                return;
            }

            if (!DataSettingsHelper.IsDatabaseInstalled)
            {
                return;
            }

            WorkContext             = EngineContext.Current.Resolve <IWebWorkContext>();
            resourcesManager        = EngineContext.Current.Resolve <IResourcesManager>();
            Script                  = new ScriptRegister(WorkContext, this);
            Style                   = new StyleRegister(WorkContext);
            initializationCompleted = true;
        }
Exemplo n.º 13
0
        public override void InitHelpers()
        {
            base.InitHelpers();

            if (initHelpers)
            {
                return;
            }

            WorkContext = ViewContext.GetWorkContext();

            resourcesManager = WorkContext.Resolve <IResourcesManager>();

            Script = new ScriptRegister(WorkContext, this);

            Style = new StyleRegister(WorkContext);

            Display = DisplayHelperFactory.CreateHelper(ViewContext, this);

            Layout = WorkContext.Layout;

            initHelpers = true;
        }
Exemplo n.º 14
0
        protected override ViewEngineResult FindView(ControllerContext context)
        {
            var result = ViewEngineCollection.FindView(context, "ControlFormResult_", null);

            var controller = context.Controller as BaseController;

            if (controller != null)
            {
                var additionalResources = GetAdditionalResources(context).ToList();
                if (additionalResources.Any())
                {
                    var workContext    = controller.WorkContext;
                    var scriptRegister = new ScriptRegister(workContext);
                    var styleRegister  = new StyleRegister(workContext);

                    foreach (var resource in additionalResources)
                    {
                        ResourcesManager.LookupResources(resource, scriptRegister, styleRegister);
                    }
                }
            }

            return(result);
        }
 public static void IncludeTrirandGrid(this StyleRegister register)
 {
     register.Include("jqgrid/ui.jqgrid.css");
 }
 public static void IncludeElfinder(this StyleRegister register)
 {
     register.Include("elfinder/elfinder.min.css");
     register.Include("elfinder/elfinder.MacOS.css");
 }
 public static void IncludePaging(this StyleRegister register)
 {
     register.Include("paging/page.css");
 }
 public static void IncludeMetro(this StyleRegister register)
 {
     register.Include("metro/metro.css");
 }
 public static void IncludeJQueryvalidationEngine(this StyleRegister register)
 {
     register.Include("jqueryvalidationEngine/validationEngine.jquery.css");
 }
 public static void IncludeBootstrap(this StyleRegister register)
 {
     register.Include("bootstrap/bootstrap.min.css");
     register.Include("bootstrap/bootstrap-theme.min.css");
 }
 public static void IncludeFineUploader(this StyleRegister register)
 {
     register.Include("fineuploader/fineuploader-3.4.1.css");
 }
 public static void IncludeIcontFontPicker(this StyleRegister register)
 {
     register.Include("bootstrap/bootstrap-iconpicker.min.css");
 }
 public static void IncludeColorPicker(this StyleRegister register)
 {
     register.Include("colorpicker/jquery.simplecolorpicker.css");
 }
 public static void IncludeSmoothness(this StyleRegister register)
 {
     register.Include("smoothness/jquery-ui-1.10.3.custom.css");
 }
 public static void IncludeTooltip(this StyleRegister register)
 {
     register.Include("tooltip/jquery.tooltip.css");
 }
 public static void IncludeFancyBox(this StyleRegister register)
 {
     register.Include("fancybox/jquery.fancybox.css");
 }
 public static void IncludeNivoSlider(this StyleRegister register)
 {
     register.Include("nivoslider/nivo-slider.css");
     register.Include("nivoslider/default.css");
 }
 public static void IncludeChosen(this StyleRegister register)
 {
     register.Include("chosen/chosen.css");
 }
Exemplo n.º 29
0
        public static void IncludePluginStyle(this StyleRegister register, string style, int?order = null)
        {
            string path = string.Format("/Plugins/Widgets.Google/Content/{0}", style);

            register.IncludeExternal(path, order);
        }
 public static void IncludeFullCalendar(this StyleRegister register)
 {
     register.Include("fullcalendar/fullcalendar.css");
     register.Include("fullcalendar/fullcalendar.print.css");
     register.Include("smoothness/jquery-ui-1.10.3.custom.css");
 }