Ejemplo n.º 1
0
        /// <summary>
        /// Upgrades the specified upgrade from.
        /// </summary>
        /// <param name="upgradeFrom">The upgrade from.</param>
        public static void Upgrade(Version upgradeFrom)
        {
            if (upgradeFrom < new Version(1, 2, 140, 0))
            {
                FrontendModuleUpgrader.DeleteOldGridSection();
                FrontendModuleUpgrader.UpdateContentBlockTitle();
            }

            if (upgradeFrom <= new Version(1, 2, 180, 1))
            {
                FrontendModuleUpgrader.RemoveMvcWidgetToolboxItems();
                FrontendModuleUpgrader.RenameDynamicContentMvcToolboxItems();
            }

            if (upgradeFrom <= new Version(1, 2, 260, 1))
            {
                FrontendModuleUpgrader.RecategorizePageTemplates();
            }

            if (upgradeFrom <= new Version(1, 2, 270, 1))
            {
                FrontendModuleUpgrader.UpdatePageTemplates();
            }

            if (upgradeFrom <= new Version(1, 2, 280, 2))
            {
                FrontendModuleUpgrader.CreateDefaultTemplates();
            }

            if (upgradeFrom <= new Version(1, 3, 320, 0))
            {
                FrontendModuleUpgrader.UpdateGridWidgetsToolbox();
                FrontendModuleUpgrader.UpdateGridWidgetPaths();
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Upgrades the specified upgrade from.
        /// </summary>
        /// <param name="upgradeFrom">The upgrade from.</param>
        /// <param name="initializer">The site initializer.</param>
        public static void Upgrade(Version upgradeFrom, SiteInitializer initializer)
        {
            if (upgradeFrom < new Version(1, 2, 140, 0))
            {
                FrontendModuleUpgrader.DeleteOldGridSection();
                FrontendModuleUpgrader.UpdateContentBlockTitle();
            }

            if (upgradeFrom <= new Version(1, 2, 180, 1))
            {
                FrontendModuleUpgrader.RemoveMvcWidgetToolboxItems();
                FrontendModuleUpgrader.RenameDynamicContentMvcToolboxItems();
            }

            if (upgradeFrom <= new Version(1, 2, 260, 1))
            {
                FrontendModuleUpgrader.RecategorizePageTemplates();
            }

            if (upgradeFrom <= new Version(1, 2, 270, 1))
            {
                FrontendModuleUpgrader.UpdatePageTemplates();
            }

            if (upgradeFrom <= new Version(1, 2, 280, 2))
            {
                FrontendModuleUpgrader.CreateDefaultTemplates();
            }

            if (upgradeFrom <= new Version(1, 3, 320, 0))
            {
                FrontendModuleUpgrader.UpdateGridWidgetsToolbox();
                FrontendModuleUpgrader.UpdateGridWidgetPaths();
            }

            if (upgradeFrom <= new Version(1, 7, 600, 0))
            {
                FrontendModuleUpgrader.UpgradeLimitCountProperty(initializer);
            }

            if (upgradeFrom < new Version(12, 0))
            {
                FrontendModuleUpgrader.CreateBootstrap4Templates();
                FrontendModuleUpgrader.UpdateDefaultTemplateImages();
            }

            if (upgradeFrom < new Version(14, 1))
            {
                FrontendModuleUpgrader.CreateBootstrap5Templates();
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Upgrades this module from the specified version.
 /// </summary>
 /// <param name="initializer">The Site Initializer. A helper class for installing Sitefinity modules.</param>
 /// <param name="upgradeFrom">The version this module us upgrading from.</param>
 public override void Upgrade(SiteInitializer initializer, Version upgradeFrom)
 {
     base.Upgrade(initializer, upgradeFrom);
     FrontendModuleUpgrader.Upgrade(upgradeFrom);
 }
Ejemplo n.º 4
0
 // 1, 3, 320, 0
 private static void UpdateGridWidgetsToolbox()
 {
     FrontendModuleUpgrader.TransferGridWidgetSectionToDefault("BootstrapGrids");
     FrontendModuleUpgrader.TransferGridWidgetSectionToDefault("FoundationGrids");
     FrontendModuleUpgrader.TransferGridWidgetSectionToDefault("SemanticUIGrids");
 }