From 8062df53f804e7b5b0bb0be20cd5387a9418490f Mon Sep 17 00:00:00 2001 From: Tim Saunders Date: Thu, 6 Jan 2011 19:32:42 +0000 Subject: [PATCH] Renabled paging paging on skinning step in installer as it is now dynamic. --- .../steps/Skinning/loadStarterKitDesigns.ascx | 2 -- .../steps/Skinning/loadStarterKitDesigns.ascx.cs | 14 +++++++++----- .../umbraco_client/Installer/js/jquery.main.js | 11 +++++++++-- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/umbraco/presentation/install/steps/Skinning/loadStarterKitDesigns.ascx b/umbraco/presentation/install/steps/Skinning/loadStarterKitDesigns.ascx index 92086109f5..10957ef2f7 100644 --- a/umbraco/presentation/install/steps/Skinning/loadStarterKitDesigns.ascx +++ b/umbraco/presentation/install/steps/Skinning/loadStarterKitDesigns.ascx @@ -1,14 +1,12 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="loadStarterKitDesigns.ascx.cs" Inherits="umbraco.presentation.install.steps.Skinning.loadStarterKitDesigns" %> <%@ Import Namespace="umbraco.cms.businesslogic.packager.repositories" %> -

Starter kit and skin have been installed

-
diff --git a/umbraco/presentation/install/steps/Skinning/loadStarterKitDesigns.ascx.cs b/umbraco/presentation/install/steps/Skinning/loadStarterKitDesigns.ascx.cs index 16aee49e81..b2c643e759 100644 --- a/umbraco/presentation/install/steps/Skinning/loadStarterKitDesigns.ascx.cs +++ b/umbraco/presentation/install/steps/Skinning/loadStarterKitDesigns.ascx.cs @@ -31,16 +31,20 @@ namespace umbraco.presentation.install.steps.Skinning { base.OnInit(e); - if (repo.HasConnection()) { try { - //clear progress bar cache - Helper.clearProgress(); + //clear progress bar cache + Helper.clearProgress(); - rep_starterKitDesigns.DataSource = repo.Webservice.Skins(StarterKitGuid.ToString()); - rep_starterKitDesigns.DataBind(); + 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) { diff --git a/umbraco/presentation/umbraco_client/Installer/js/jquery.main.js b/umbraco/presentation/umbraco_client/Installer/js/jquery.main.js index c2cd23ff96..53d96df275 100644 --- a/umbraco/presentation/umbraco_client/Installer/js/jquery.main.js +++ b/umbraco/presentation/umbraco_client/Installer/js/jquery.main.js @@ -474,11 +474,18 @@ function initZoomList2() { function initSlide() { jQuery('.gallery').each(function () { var set = jQuery(this); - var btnPrev = set.find('.btn-prev').hide(); - var btnNext = set.find('.btn-next').hide(); + var btnPrev = set.find('.btn-prev'); + var btnNext = set.find('.btn-next'); var slider = set.find('.gal-box'); var swicher = set.find('.swicher'); swicher.empty(); + + //numberOfSkins is a global varibale injected into the page by the loadStarterkitDesigns usercontrol + if (numberOfSkins < 5) { + btnPrev.hide(); + btnNext.hide(); + } + slider.cycle({ fx: 'scrollHorz', timeout: 5000,