From 18ab1e09e64eebf3cf841c6b5c5712f0924efd3d Mon Sep 17 00:00:00 2001 From: Kev Zettler Date: Tue, 26 Jul 2011 13:27:21 -0700 Subject: [PATCH] added guard for missing subdomain tutorial --- public/javascripts/admin/tutorial.js | 38 +++++++++++++++++----------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/public/javascripts/admin/tutorial.js b/public/javascripts/admin/tutorial.js index 6c7ab30d..a712f64a 100644 --- a/public/javascripts/admin/tutorial.js +++ b/public/javascripts/admin/tutorial.js @@ -480,25 +480,33 @@ $(document).ready(function(){ buttons: [{name: "Quit", onclick: guiders.hideAll}, {name: "Next"}], id: "settingseditwelcome", - next: "editsubdomain", + next: (function(){ + if($('#site_subdomain').length > 0){ + return "editsubdomain"; + }else{ + return "settingssave"; + } + }()), overlay: true, title: "The Settings Page" }); - guiders.createGuider({ - attachTo: "#site_subdomain", - description: "Edit this field to change the subdomain of your site", - buttons: [], - id: "editsubdomain", - next: "settingssave", - title: '', - position: 12, - onShow: function(){ - $('#site_subdomain').bind('change', function(){ - guiders.next(); - }); - } - }); + if($('#site_subdomain').length > 0){ + guiders.createGuider({ + attachTo: "#site_subdomain", + description: "Edit this field to change the subdomain of your site", + buttons: [], + id: "editsubdomain", + next: "settingssave", + title: '', + position: 12, + onShow: function(){ + $('#site_subdomain').bind('change', function(){ + guiders.next(); + }); + } + }); + } guiders.createGuider({ buttons: [],