protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            var  bootstrap      = App.Services.CreateGlobalSettingsRepository(ModuleContext.PortalId).GetEditLayout() != AlpacaLayoutEnum.DNN;
            bool loadBootstrap  = bootstrap && App.Services.CreateGlobalSettingsRepository(ModuleContext.PortalId).GetLoadBootstrap();
            bool loadGlyphicons = bootstrap && App.Services.CreateGlobalSettingsRepository(ModuleContext.PortalId).GetLoadGlyphicons();

            hlCancel.NavigateUrl = Globals.NavigateURL();
            cmdSave.NavigateUrl  = Globals.NavigateURL();
            cmdCopy.NavigateUrl  = Globals.NavigateURL();
            OpenContentSettings settings = this.OpenContentSettings();

            string prefix = (string.IsNullOrEmpty(settings.Template.Collection) || settings.Template.Collection == "Items") ? "" : settings.Template.Collection;

            AlpacaEngine alpaca = new AlpacaEngine(Page, ModuleContext.PortalId, settings.Template.ManifestFolderUri.FolderPath, prefix);

            alpaca.RegisterAll(bootstrap, loadBootstrap, loadGlyphicons);
            string itemId = Request.QueryString["id"];

            AlpacaContext                      = new AlpacaContext(PortalId, ModuleId, itemId, ScopeWrapper.ClientID, hlCancel.ClientID, cmdSave.ClientID, cmdCopy.ClientID, hlDelete.ClientID, ddlVersions.ClientID);
            AlpacaContext.Bootstrap            = bootstrap;
            AlpacaContext.Horizontal           = App.Services.CreateGlobalSettingsRepository(ModuleContext.PortalId).GetEditLayout() == AlpacaLayoutEnum.BootstrapHorizontal;
            AlpacaContext.IsNew                = settings.Template.IsListTemplate && string.IsNullOrEmpty(itemId);
            AlpacaContext.DeleteConfirmMessage = LocalizeSafeJsString("txtDeleteConfirmMessage");
            if (DnnLanguageUtils.IsMultiLingualPortal(PortalId))
            {
                AlpacaContext.DeleteConfirmMessage = LocalizeSafeJsString("txtMLDeleteConfirmMessage");
            }
        }
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            var globalSettingsController = App.Services.CreateGlobalSettingsRepository(ModuleContext.PortalId);

            hlCancel.NavigateUrl = Globals.NavigateURL();
            cmdSave.NavigateUrl  = Globals.NavigateURL();

            var  editLayout     = globalSettingsController.GetEditLayout();
            var  bootstrap      = globalSettingsController.GetEditLayout() != AlpacaLayoutEnum.DNN;
            bool loadBootstrap  = bootstrap && globalSettingsController.GetLoadBootstrap();
            bool loadGlyphicons = bootstrap && App.Services.CreateGlobalSettingsRepository(ModuleContext.PortalId).GetLoadGlyphicons();

            OpenContentSettings settings = this.OpenContentSettings();
            AlpacaEngine        alpaca   = new AlpacaEngine(Page, ModuleContext.PortalId, "" /*settings.Template.Uri().FolderPath*/, "builder");

            alpaca.RegisterAll(bootstrap, loadBootstrap, loadGlyphicons);

            //string ItemId = Request.QueryString["id"];
            //AlpacaContext = new AlpacaContext(PortalId, ModuleId, ItemId, ScopeWrapper.ClientID, null, cmdSave.ClientID, null, null);
            ClientResourceManager.RegisterScript(Page, "~/DesktopModules/OpenContent/js/builder/formbuilder.js", FileOrder.Js.DefaultPriority + 10);
            ClientResourceManager.RegisterStyleSheet(Page, "~/DesktopModules/OpenContent/js/builder/formbuilder.css", FileOrder.Css.DefaultPriority);
            //ClientResourceManager.RegisterScript(Page, "~/DesktopModules/OpenContent/js/bootstrap/js/bootstrap.min.js", FileOrder.Js.DefaultPriority);
            //ClientResourceManager.RegisterStyleSheet(Page, "~/DesktopModules/OpenContent/js/bootstrap/css/bootstrap.min.css", FileOrder.Css.DefaultPriority);

            if (OpenContentUtils.BuilderExist(settings.Template.ManifestFolderUri))
            {
                string title = string.IsNullOrEmpty(settings.Template.Manifest.Title) ? "Data" : settings.Template.Manifest.Title + " ";
                ddlForms.Items.Add(new ListItem(title, ""));
            }
            if (OpenContentUtils.BuilderExist(settings.Template.ManifestFolderUri, settings.Template.Key.ShortKey))
            {
                ddlForms.Items.Add(new ListItem("Settings", settings.Template.Key.ShortKey));
            }
            if (settings.Template.Manifest.AdditionalDataDefined())
            {
                foreach (var addData in settings.Template.Manifest.AdditionalDataDefinition)
                {
                    if (OpenContentUtils.BuilderExist(settings.Template.ManifestFolderUri, addData.Key))
                    {
                        string title = string.IsNullOrEmpty(addData.Value.Title) ? addData.Key : addData.Value.Title;
                        ddlForms.Items.Add(new ListItem(title, addData.Key));
                    }
                }
            }
            if (OpenContentUtils.BuilderExist(settings.Template.ManifestFolderUri, "form"))
            {
                ddlForms.Items.Add(new ListItem("Form", "form"));
            }

            AlpacaContext            = new AlpacaContext(PortalId, ModuleId, null, ScopeWrapper.ClientID, hlCancel.ClientID, cmdSave.ClientID, null, null, null);
            AlpacaContext.Bootstrap  = bootstrap;
            AlpacaContext.Horizontal = globalSettingsController.GetEditLayout() == AlpacaLayoutEnum.BootstrapHorizontal;
        }
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            Key = Request.QueryString["key"];
            hlCancel.NavigateUrl = Globals.NavigateURL();
            cmdSave.NavigateUrl  = Globals.NavigateURL();
            OpenContentSettings settings = this.OpenContentSettings();
            AlpacaEngine        alpaca   = new AlpacaEngine(Page, ModuleContext.PortalId, settings.Template.ManifestFolderUri.FolderPath, Key);

            alpaca.RegisterAll(false, false);
            string itemId = null;//Request.QueryString["id"] == null ? -1 : int.Parse(Request.QueryString["id"]);

            AlpacaContext = new AlpacaContext(PortalId, ModuleId, itemId, ScopeWrapper.ClientID, hlCancel.ClientID, cmdSave.ClientID, null, null, null);
        }
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            hlCancel.NavigateUrl = Globals.NavigateURL();
            cmdSave.NavigateUrl  = Globals.NavigateURL();
            OpenContentSettings settings = this.OpenContentSettings();
            AlpacaEngine        alpaca   = new AlpacaEngine(Page, ModuleContext.PortalId, "~/DeskTopModules/OpenContent", "formsettings");

            //AlpacaEngine alpaca = new AlpacaEngine(Page, ModuleContext, "", "");
            alpaca.RegisterAll();
            string itemId = null;

            AlpacaContext = new AlpacaContext(PortalId, ModuleId, itemId, ScopeWrapper.ClientID, hlCancel.ClientID, cmdSave.ClientID, null, null, null);
        }
Exemple #5
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            bIndexAll.Visible    = UserInfo.IsSuperUser;
            hlCancel.NavigateUrl = Globals.NavigateURL();
            cmdSave.NavigateUrl  = Globals.NavigateURL();
            //OpenContentSettings settings = this.OpenContentSettings();
            //AlpacaEngine alpaca = new AlpacaEngine(Page, ModuleContext, settings.Template.Uri().FolderPath, "query");
            AlpacaEngine alpaca = new AlpacaEngine(Page, ModuleContext.PortalId, "", "");

            alpaca.RegisterAll(false, false);
            string itemId = null;//Request.QueryString["id"] == null ? -1 : int.Parse(Request.QueryString["id"]);

            AlpacaContext = new AlpacaContext(PortalId, ModuleId, itemId, ScopeWrapper.ClientID, hlCancel.ClientID, cmdSave.ClientID, null, null, null);
        }
Exemple #6
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            hlCancel.NavigateUrl = Globals.NavigateURL();
            cmdSave.NavigateUrl  = Globals.NavigateURL();
            bool bootstrap               = App.Services.CreateGlobalSettingsRepository(ModuleContext.PortalId).GetEditLayout() != AlpacaLayoutEnum.DNN;
            bool loadBootstrap           = bootstrap && App.Services.CreateGlobalSettingsRepository(ModuleContext.PortalId).GetLoadBootstrap();
            bool loadGlyphicons          = bootstrap && App.Services.CreateGlobalSettingsRepository(ModuleContext.PortalId).GetLoadGlyphicons();
            OpenContentSettings settings = this.OpenContentSettings();
            AlpacaEngine        alpaca   = new AlpacaEngine(Page, ModuleContext.PortalId, "DeskTopModules/OpenContent", "formsettings");

            //AlpacaEngine alpaca = new AlpacaEngine(Page, ModuleContext, "", "");
            alpaca.RegisterAll(bootstrap, loadBootstrap, loadGlyphicons);
            string itemId = null;

            AlpacaContext           = new AlpacaContext(PortalId, ModuleId, itemId, ScopeWrapper.ClientID, hlCancel.ClientID, cmdSave.ClientID, null, null, null);
            AlpacaContext.Bootstrap = true;
        }
Exemple #7
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            var  editLayout    = OpenContentControllerFactory.Instance.OpenContentGlobalSettingsController.GetEditLayout();
            var  bootstrap     = OpenContentControllerFactory.Instance.OpenContentGlobalSettingsController.GetEditLayout() != AlpacaLayoutEnum.DNN;
            bool loadBootstrap = bootstrap && OpenContentControllerFactory.Instance.OpenContentGlobalSettingsController.GetLoadBootstrap();

            hlCancel.NavigateUrl = Globals.NavigateURL();
            cmdSave.NavigateUrl  = Globals.NavigateURL();
            OpenContentSettings settings = this.OpenContentSettings();
            AlpacaEngine        alpaca   = new AlpacaEngine(Page, ModuleContext, settings.Template.ManifestFolderUri.FolderPath, "");

            alpaca.RegisterAll(bootstrap, loadBootstrap);
            string itemId = Request.QueryString["id"];

            AlpacaContext            = new AlpacaContext(PortalId, ModuleId, itemId, ScopeWrapper.ClientID, hlCancel.ClientID, cmdSave.ClientID, hlDelete.ClientID, ddlVersions.ClientID);
            AlpacaContext.Bootstrap  = bootstrap;
            AlpacaContext.Horizontal = OpenContentControllerFactory.Instance.OpenContentGlobalSettingsController.GetEditLayout() == AlpacaLayoutEnum.BootstrapHorizontal;
        }
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            var  globalSettingsController = OpenContentControllerFactory.Instance.OpenContentGlobalSettingsController(ModuleContext.PortalId);
            var  bootstrap     = globalSettingsController.GetEditLayout() != AlpacaLayoutEnum.DNN;
            bool loadBootstrap = bootstrap && globalSettingsController.GetLoadBootstrap();

            Key = Request.QueryString["key"];
            hlCancel.NavigateUrl = Globals.NavigateURL();
            cmdSave.NavigateUrl  = Globals.NavigateURL();
            OpenContentSettings settings = this.OpenContentSettings();
            AlpacaEngine        alpaca   = new AlpacaEngine(Page, ModuleContext.PortalId, settings.Template.ManifestFolderUri.FolderPath, Key);

            alpaca.RegisterAll(bootstrap, loadBootstrap);
            string itemId = null;//Request.QueryString["id"] == null ? -1 : int.Parse(Request.QueryString["id"]);

            AlpacaContext            = new AlpacaContext(PortalId, ModuleId, itemId, ScopeWrapper.ClientID, hlCancel.ClientID, cmdSave.ClientID, null, null, null);
            AlpacaContext.Bootstrap  = bootstrap;
            AlpacaContext.Horizontal = globalSettingsController.GetEditLayout() == AlpacaLayoutEnum.BootstrapHorizontal;
        }
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            var  editLayout    = OpenContentControllerFactory.Instance.OpenContentGlobalSettingsController.GetEditLayout();
            var  bootstrap     = OpenContentControllerFactory.Instance.OpenContentGlobalSettingsController.GetEditLayout() != AlpacaLayoutEnum.DNN;
            bool loadBootstrap = bootstrap && OpenContentControllerFactory.Instance.OpenContentGlobalSettingsController.GetLoadBootstrap();

            hlCancel.NavigateUrl = Globals.NavigateURL();
            cmdSave.NavigateUrl  = Globals.NavigateURL();
            OpenContentSettings settings = ModuleContext.Configuration.OpenContentSettings();
            AlpacaEngine        alpaca   = new AlpacaEngine(Page, ModuleContext.PortalId, settings.Template.ManifestFolderUri.FolderPath, "");

            alpaca.RegisterAll(bootstrap, loadBootstrap);
            string itemId = Request.QueryString["id"];

            AlpacaContext            = new AlpacaContext(ModuleContext.PortalId, ModuleContext.ModuleId, itemId, ScopeWrapper.ClientID, hlCancel.ClientID, cmdSave.ClientID, null, hlDelete.ClientID, ddlVersions.ClientID);
            AlpacaContext.Bootstrap  = bootstrap;
            AlpacaContext.Horizontal = OpenContentControllerFactory.Instance.OpenContentGlobalSettingsController.GetEditLayout() == AlpacaLayoutEnum.BootstrapHorizontal;

            ModuleInfo  module         = ModuleContext.Configuration;
            IDictionary moduleSettings = new Hashtable(module.ModuleSettings);

            moduleSettings["template"] = settings.TemplateKey.Folder + "/" + "formsubmissions";
            moduleSettings["data"]     = "";
            moduleSettings["query"]    = "";

            /*
             * var moduleClone = new ModuleInfo();
             * foreach (System.Collections.DictionaryEntry item in module.ModuleSettings)
             * {
             *  moduleClone.ModuleSettings.Add(item.Key, item.Value);
             * }
             * moduleClone.ModuleID = module.ModuleID;
             * moduleClone.TabID = module.TabID;
             * moduleClone.TabModuleID = module.TabModuleID;
             * moduleClone.PortalID = module.PortalID;
             * moduleClone.ModuleSettings["template"] = settings.TemplateKey.ToString();
             * module = moduleClone;
             */
            engine = new RenderEngine(module, moduleSettings);
        }
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            var  globalSettingsController = OpenContentControllerFactory.Instance.OpenContentGlobalSettingsController(ModuleContext.PortalId);
            var  bootstrap     = globalSettingsController.GetEditLayout() != AlpacaLayoutEnum.DNN;
            bool loadBootstrap = bootstrap && globalSettingsController.GetLoadBootstrap();

            hlCancel.NavigateUrl = Globals.NavigateURL();
            cmdSave.NavigateUrl  = Globals.NavigateURL();
            cmdCopy.NavigateUrl  = Globals.NavigateURL();
            OpenContentSettings settings = this.OpenContentSettings();

            string prefix = (string.IsNullOrEmpty(settings.Template.Collection) || settings.Template.Collection == "Items") ? "" : settings.Template.Collection;

            AlpacaEngine alpaca = new AlpacaEngine(Page, ModuleContext.PortalId, settings.Template.ManifestFolderUri.FolderPath, prefix);

            alpaca.RegisterAll(bootstrap, loadBootstrap);
            string itemId = Request.QueryString["id"];

            AlpacaContext            = new AlpacaContext(PortalId, ModuleId, itemId, ScopeWrapper.ClientID, hlCancel.ClientID, cmdSave.ClientID, cmdCopy.ClientID, hlDelete.ClientID, ddlVersions.ClientID);
            AlpacaContext.Bootstrap  = bootstrap;
            AlpacaContext.Horizontal = globalSettingsController.GetEditLayout() == AlpacaLayoutEnum.BootstrapHorizontal;
            AlpacaContext.IsNew      = settings.Template.IsListTemplate && string.IsNullOrEmpty(itemId);
        }