protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            if (repo.HasConnection())
            {
                try
                {
                    //clear progress bar cache
                    Helper.clearProgress();

                    var skinsCollection = repo.Webservice.Skins(StarterKitGuid.ToString());

                    var numberOfSkins = skinsCollection.Length;
                    this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "skinCounter", "var numberOfSkins = " + numberOfSkins, true);

                    rep_starterKitDesigns.DataSource = skinsCollection;
                    rep_starterKitDesigns.DataBind();
                }
                catch (Exception ex)
                {
                    Log.Add(LogTypes.Debug, -1, ex.ToString());

                    ShowConnectionError();
                }
            }
            else
            {
                ShowConnectionError();
            }
        }
示例#2
0
        protected void openRepo(object sender, EventArgs e)
        {
            Guid?g = Skinning.StarterKitGuid(templateID);


            if (g == null || !Skinning.HasAvailableSkins(templateID))
            {
                bt_repo.Visible = false;
            }
            else
            {
                if (repo.HasConnection())
                {
                    try
                    {
                        rep_starterKitDesigns.DataSource = repo.Webservice.Skins(g.ToString());
                        rep_starterKitDesigns.DataBind();
                    }
                    catch (Exception ex)
                    {
                        BusinessLogic.Log.Add(BusinessLogic.LogTypes.Debug, -1, ex.ToString());

                        //ShowConnectionError();
                    }
                }
                else
                {
                    //ShowConnectionError();
                }
            }

            p_apply.Visible    = false;
            p_download.Visible = true;
        }
示例#3
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            //clear progressbar cache
            Helper.clearProgress();

            if (repo.HasConnection())
            {
                try
                {
                    rep_starterKits.DataSource = repo.Webservice.StarterKits();
                    rep_starterKits.DataBind();
                }
                catch (Exception ex)
                {
                    Log.Add(LogTypes.Debug, -1, ex.ToString());
                    ShowConnectionError();
                }
            }
            else
            {
                ShowConnectionError();
            }
        }
示例#4
0
        protected void openRepo(object sender, EventArgs e)
        {
            var g = Skinning.StarterKitGuid(_templateId);


            if (g == null || !Skinning.HasAvailableSkins(_templateId))
            {
                bt_repo.Visible = false;
            }
            else
            {
                if (_repo.HasConnection())
                {
                    try
                    {
                        rep_starterKitDesigns.DataSource = _repo.Webservice.Skins(g.ToString());
                        rep_starterKitDesigns.DataBind();
                    }
                    catch (Exception ex)
                    {
                        LogHelper.Error <TemplateSkinning>("An error occurred", ex);

                        //ShowConnectionError();
                    }
                }
            }

            p_apply.Visible    = false;
            p_download.Visible = true;
        }
示例#5
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            //clear progressbar cache
            Helper.clearProgress();

            if (repo.HasConnection())
            {
                try
                {
                    rep_starterKits.DataSource = repo.Webservice.StarterKits();
                    rep_starterKits.DataBind();
                }
                catch (Exception ex)
                {
                    LogHelper.Error <loadStarterKits>("Cannot connect to package repository", ex);
                    CannotConnect = true;
                    //ShowConnectionError();
                }
            }
            else
            {
                CannotConnect = true;
                //ShowConnectionError();
            }
        }
示例#6
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            Exception ex = new Exception();
            if (!cms.businesslogic.packager.Settings.HasFileAccess(ref ex))
            {
                fb.Style.Add("margin-top", "7px");
                fb.type = uicontrols.Feedback.feedbacktype.error;
                fb.Text = "<strong>" + ui.Text("errors", "filePermissionsError") + ":</strong><br/>" + ex.Message;
            }

            if (!IsPostBack)
            {
                ButtonInstall.Attributes.Add("onClick", "jQuery(this).hide(); jQuery('#installingMessage').show();; return true;");
                ButtonLoadPackage.Attributes.Add("onClick", "jQuery(this).hide(); jQuery('#loadingbar').show();; return true;");
            }

            //if we are actually in the middle of installing something... 
            if (!String.IsNullOrEmpty(helper.Request("installing")))
            {
                HideAllPanes();
                pane_installing.Visible = true;
                ProcessInstall(helper.Request("installing"));

            }
            else if (!String.IsNullOrEmpty(helper.Request("guid")) && !String.IsNullOrEmpty(helper.Request("repoGuid")))
            {
                //we'll fetch the local information we have about our repo, to find out what webservice to query.
                _repo = cms.businesslogic.packager.repositories.Repository.getByGuid(helper.Request("repoGuid"));

                if (_repo.HasConnection())
                {
                    //from the webservice we'll fetch some info about the package.
                    cms.businesslogic.packager.repositories.Package pack = _repo.Webservice.PackageByGuid(helper.Request("guid"));

                    //if the package is protected we will ask for the users credentials. (this happens every time they try to fetch anything)
                    if (!pack.Protected)
                    {
                        //if it isn't then go straigt to the accept licens screen
                        tempFile.Value = _installer.Import(_repo.fetch(helper.Request("guid")));
                        UpdateSettings();

                    }
                    else if (!IsPostBack)
                    {

                        //Authenticate against the repo
                        HideAllPanes();
                        pane_authenticate.Visible = true;

                    }
                }
                else
                {
                    fb.Style.Add("margin-top", "7px");
                    fb.type = global::umbraco.uicontrols.Feedback.feedbacktype.error;
                    fb.Text = "<strong>No connection to repository.</strong> Runway could not be installed as there was no connection to: '" + _repo.RepositoryUrl + "'";
                    pane_upload.Visible = false;
                }
            }
        }
示例#7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(Request["guid"]))
            {
                var guid = new Guid(Request["guid"]);

                if (_repo.HasConnection())
                {
                    var installer = new Installer();
                    var tempDir   = installer.Import(_repo.fetch(guid.ToString()));
                    installer.LoadConfig(tempDir);
                    var packageId = installer.CreateManifest(tempDir, guid.ToString(), RepoGuid);
                    installer.InstallFiles(packageId, tempDir);
                    installer.InstallBusinessLogic(packageId, tempDir);
                    installer.InstallCleanUp(packageId, tempDir);
                    library.RefreshContent();

                    if (cms.businesslogic.skinning.Skinning.IsPackageInstalled(new Guid(Request["guid"])) ||
                        cms.businesslogic.skinning.Skinning.IsPackageInstalled(Request["name"]))
                    {
                        Response.Write(cms.businesslogic.skinning.Skinning.GetModuleAlias(Request["name"]));
                    }
                    else
                    {
                        Response.Write("error");
                    }
                }
                else
                {
                    Response.Write("error");
                }
            }
        }
示例#8
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            Exception ex = new Exception();

            if (!cms.businesslogic.packager.Settings.HasFileAccess(ref ex))
            {
                fb.Style.Add("margin-top", "7px");
                fb.type = uicontrols.Feedback.feedbacktype.error;
                fb.Text = "<strong>" + ui.Text("errors", "filePermissionsError") + ":</strong><br/>" + ex.Message;
            }

            if (!IsPostBack)
            {
                ButtonInstall.Attributes.Add("onClick", "jQuery(this).hide(); jQuery('#installingMessage').show();; return true;");
                ButtonLoadPackage.Attributes.Add("onClick", "jQuery(this).hide(); jQuery('#loadingbar').show();; return true;");
            }

            //if we are actually in the middle of installing something...
            if (!String.IsNullOrEmpty(helper.Request("installing")))
            {
                hideAllPanes();
                pane_installing.Visible = true;
                processInstall(helper.Request("installing"));
            }
            else if (!String.IsNullOrEmpty(helper.Request("guid")) && !String.IsNullOrEmpty(helper.Request("repoGuid")))
            {
                //we'll fetch the local information we have about our repo, to find out what webservice to query.
                repo = cms.businesslogic.packager.repositories.Repository.getByGuid(helper.Request("repoGuid"));

                if (repo.HasConnection())
                {
                    //from the webservice we'll fetch some info about the package.
                    cms.businesslogic.packager.repositories.Package pack = repo.Webservice.PackageByGuid(helper.Request("guid"));

                    //if the package is protected we will ask for the users credentials. (this happens every time they try to fetch anything)
                    if (!pack.Protected)
                    {
                        //if it isn't then go straigt to the accept licens screen
                        tempFile.Value = p.Import(repo.fetch(helper.Request("guid")));
                        updateSettings();
                    }
                    else if (!IsPostBack)
                    {
                        //Authenticate against the repo
                        hideAllPanes();
                        pane_authenticate.Visible = true;
                    }
                }
                else
                {
                    fb.Style.Add("margin-top", "7px");
                    fb.type             = global::umbraco.uicontrols.Feedback.feedbacktype.error;
                    fb.Text             = "<strong>No connection to repository.</strong> Runway could not be installed as there was no connection to: '" + repo.RepositoryUrl + "'";
                    pane_upload.Visible = false;
                }
            }
        }
示例#9
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            string repoGuid = "65194810-1f85-11dd-bd0b-0800200c9a66";

            cms.businesslogic.packager.repositories.Repository repo = cms.businesslogic.packager.repositories.Repository.getByGuid(repoGuid);

            uicontrols.Feedback fb = new global::umbraco.uicontrols.Feedback();
            fb.type = global::umbraco.uicontrols.Feedback.feedbacktype.error;
            fb.Text = "<strong>No connection to repository.</strong> Modules could not be fetched from the repository as there was no connection to: '" + repo.RepositoryUrl + "'";


            if (repo.HasConnection())
            {
                try
                {
                    if (UmbracoSettings.UseLegacyXmlSchema)
                    {
                        rep_nitros.DataSource = repo.Webservice.NitrosCategorizedByVersion(cms.businesslogic.packager.repositories.Version.Version4);
                    }
                    else
                    {
                        rep_nitros.DataSource = repo.Webservice.NitrosCategorizedByVersion(cms.businesslogic.packager.repositories.Version.Version41);
                    }

                    rep_nitros.DataBind();
                }
                catch (Exception ex)
                {
                    LogHelper.Error <LoadNitros>("An error occurred", ex);

                    loadNitros.Controls.Clear();
                    loadNitros.Controls.Add(fb);
                    //nitroList.Visible = false;
                    //lt_status.Text = "<div class='error'><p>Nitros could not be fetched from the repository. Please check your internet connection</p><p>You can always install Nitros later in the packages section</p><p>" + ex.ToString() + "</p></div>";
                }
            }
            else
            {
                loadNitros.Controls.Clear();
                loadNitros.Controls.Add(fb);
            }
        }
示例#10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var ex = new Exception();

            if (!cms.businesslogic.packager.Settings.HasFileAccess(ref ex))
            {
                fb.Style.Add("margin-top", "7px");
                fb.type = uicontrols.Feedback.feedbacktype.error;
                fb.Text = "<strong>" + ui.Text("errors", "filePermissionsError") + ":</strong><br/>" + ex.Message;
            }

            if (!IsPostBack)
            {
                ButtonInstall.Attributes.Add("onClick", "jQuery(this).hide(); jQuery('#installingMessage').show();; return true;");
                ButtonLoadPackage.Attributes.Add("onClick", "jQuery(this).hide(); jQuery('#loadingbar').show();; return true;");
            }

            //if we are actually in the middle of installing something... meaning we keep redirecting back to this page with
            // custom query strings
            // TODO: SD: This process needs to be fixed/changed/etc... to use the InstallPackageController
            //	http://issues.umbraco.org/issue/U4-1047
            if (!string.IsNullOrEmpty(Request.GetItemAsString("installing")))
            {
                HideAllPanes();
                pane_installing.Visible = true;
                ProcessInstall(Request.GetItemAsString("installing")); //process the current step
            }
            else if (tempFile.Value.IsNullOrWhiteSpace() &&          //if we haven't downloaded the .umb temp file yet
                     (!Request.GetItemAsString("guid").IsNullOrWhiteSpace() && !Request.GetItemAsString("repoGuid").IsNullOrWhiteSpace()))
            {
                //we'll fetch the local information we have about our repo, to find out what webservice to query.
                _repo = cms.businesslogic.packager.repositories.Repository.getByGuid(Request.GetItemAsString("repoGuid"));

                if (_repo.HasConnection())
                {
                    //from the webservice we'll fetch some info about the package.
                    cms.businesslogic.packager.repositories.Package pack = _repo.Webservice.PackageByGuid(Request.GetItemAsString("guid"));

                    //if the package is protected we will ask for the users credentials. (this happens every time they try to fetch anything)
                    if (!pack.Protected)
                    {
                        //if it isn't then go straigt to the accept licens screen
                        tempFile.Value = _installer.Import(_repo.fetch(Request.GetItemAsString("guid")));
                        UpdateSettings();
                    }
                    else if (!IsPostBack)
                    {
                        //Authenticate against the repo
                        HideAllPanes();
                        pane_authenticate.Visible = true;
                    }
                }
                else
                {
                    fb.Style.Add("margin-top", "7px");
                    fb.type             = global::umbraco.uicontrols.Feedback.feedbacktype.error;
                    fb.Text             = "<strong>No connection to repository.</strong> Runway could not be installed as there was no connection to: '" + _repo.RepositoryUrl + "'";
                    pane_upload.Visible = false;
                }
            }
        }