From 460fe2e5ab7d4b96ac3fdbdb4202d6c2de775e2d Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Tue, 12 Jan 2010 23:49:00 +0000 Subject: [PATCH] MINOR: fix javscript syntax that can confuse ie (from r86395) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@96776 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- javascript/CMSMain_left.js | 20 ++++++++++---------- tests/cuke/step_definitions/content.rb | 3 +++ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/javascript/CMSMain_left.js b/javascript/CMSMain_left.js index 136f75a6..6b03f88e 100755 --- a/javascript/CMSMain_left.js +++ b/javascript/CMSMain_left.js @@ -118,7 +118,7 @@ searchclass.prototype = { $(_HANDLER_FORMS.search).stopObserving(this.o2); batchActionGlobals.unfilterSiteTree(); } -} +}; var SiteTreeFilter = Class.create(); SiteTreeFilter.applyTo('#siteTreeFilterList'); @@ -154,7 +154,7 @@ SiteTreeFilter.prototype = { } }); } -} +}; /** * Control the site tree filter */ @@ -177,7 +177,7 @@ SiteTreeFilterForm.prototype = { }); document.getElementsBySelector('.SearchCriteriaContainer', this).each(function(el){ Element.hide(el); - }) + }); } else { Form.getElements(this).each(function(el){ @@ -199,7 +199,7 @@ SiteTreeFilterForm.prototype = { if ($('sitetree').isDraggable) $('sitetree').stopBeingDraggable(); document.getElementsBySelector('.checkboxAboveTree input[type=checkbox]').each(function(el){ el.value = false; el.disabled = true; - }) + }); } else { // Reset URL to default @@ -208,7 +208,7 @@ SiteTreeFilterForm.prototype = { // Enable checkbox tree controls document.getElementsBySelector('.checkboxAboveTree input[type=checkbox]').each(function(el){ el.disabled = false; - }) + }); } $('SiteTreeSearchButton').className = $('SiteTreeSearchClearButton').className = 'hidden'; @@ -227,7 +227,7 @@ SiteTreeFilterForm.prototype = { return false; } -} +}; /** * Add Criteria Drop-down onchange action which allows more criteria to be shown @@ -241,7 +241,7 @@ SiteTreeFilterAddCriteria.prototype = { // Element.show('Input' + this.value); this.selectedIndex = 0; //reset selected criteria to prompt } -} +}; /** * Batch Actions button click action @@ -261,7 +261,7 @@ batchactionsclass.prototype = { }, actionChanged: function() { - var urlSegment = $('choose_batch_action').value.split('/').pop() + var urlSegment = $('choose_batch_action').value.split('/').pop(); if ($('BatchActionParameters_'+urlSegment)) { jQuery('#actionParams').empty(); jQuery('#BatchActionParameters_'+urlSegment).appendTo('#actionParams'); @@ -297,7 +297,7 @@ batchactionsclass.prototype = { } } } -} +}; // batchActionGlobals is needed because calls to observeMethod doesn't seem to preserve instance variables so a Prototype can't be used batchActionGlobals = { @@ -401,7 +401,7 @@ batchActionGlobals = { }); } } -} +}; Behaviour.register({ diff --git a/tests/cuke/step_definitions/content.rb b/tests/cuke/step_definitions/content.rb index 7bcbad4f..379671dd 100644 --- a/tests/cuke/step_definitions/content.rb +++ b/tests/cuke/step_definitions/content.rb @@ -45,8 +45,11 @@ end Given /create a new page using template \"(.*)\"/i do |type| Given 'I load the root node (ajax)' + puts "Clicking the create button" And 'I click the "Create" button' + puts "Selecting #{type} from PageType" And "I select \"#{type}\" from \"PageType\"" + puts "done selecting" And 'I click the "Go" button (ajax)' And 'I click the "Create" button' end