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
This commit is contained in:
Sam Minnee 2010-01-12 23:49:00 +00:00
parent 7551377671
commit 460fe2e5ab
2 changed files with 13 additions and 10 deletions

View File

@ -118,7 +118,7 @@ searchclass.prototype = {
$(_HANDLER_FORMS.search).stopObserving(this.o2); $(_HANDLER_FORMS.search).stopObserving(this.o2);
batchActionGlobals.unfilterSiteTree(); batchActionGlobals.unfilterSiteTree();
} }
} };
var SiteTreeFilter = Class.create(); var SiteTreeFilter = Class.create();
SiteTreeFilter.applyTo('#siteTreeFilterList'); SiteTreeFilter.applyTo('#siteTreeFilterList');
@ -154,7 +154,7 @@ SiteTreeFilter.prototype = {
} }
}); });
} }
} };
/** /**
* Control the site tree filter * Control the site tree filter
*/ */
@ -177,7 +177,7 @@ SiteTreeFilterForm.prototype = {
}); });
document.getElementsBySelector('.SearchCriteriaContainer', this).each(function(el){ document.getElementsBySelector('.SearchCriteriaContainer', this).each(function(el){
Element.hide(el); Element.hide(el);
}) });
} }
else { else {
Form.getElements(this).each(function(el){ Form.getElements(this).each(function(el){
@ -199,7 +199,7 @@ SiteTreeFilterForm.prototype = {
if ($('sitetree').isDraggable) $('sitetree').stopBeingDraggable(); if ($('sitetree').isDraggable) $('sitetree').stopBeingDraggable();
document.getElementsBySelector('.checkboxAboveTree input[type=checkbox]').each(function(el){ document.getElementsBySelector('.checkboxAboveTree input[type=checkbox]').each(function(el){
el.value = false; el.disabled = true; el.value = false; el.disabled = true;
}) });
} }
else { else {
// Reset URL to default // Reset URL to default
@ -208,7 +208,7 @@ SiteTreeFilterForm.prototype = {
// Enable checkbox tree controls // Enable checkbox tree controls
document.getElementsBySelector('.checkboxAboveTree input[type=checkbox]').each(function(el){ document.getElementsBySelector('.checkboxAboveTree input[type=checkbox]').each(function(el){
el.disabled = false; el.disabled = false;
}) });
} }
$('SiteTreeSearchButton').className = $('SiteTreeSearchClearButton').className = 'hidden'; $('SiteTreeSearchButton').className = $('SiteTreeSearchClearButton').className = 'hidden';
@ -227,7 +227,7 @@ SiteTreeFilterForm.prototype = {
return false; return false;
} }
} };
/** /**
* Add Criteria Drop-down onchange action which allows more criteria to be shown * Add Criteria Drop-down onchange action which allows more criteria to be shown
@ -241,7 +241,7 @@ SiteTreeFilterAddCriteria.prototype = {
// Element.show('Input' + this.value); // Element.show('Input' + this.value);
this.selectedIndex = 0; //reset selected criteria to prompt this.selectedIndex = 0; //reset selected criteria to prompt
} }
} };
/** /**
* Batch Actions button click action * Batch Actions button click action
@ -261,7 +261,7 @@ batchactionsclass.prototype = {
}, },
actionChanged: function() { actionChanged: function() {
var urlSegment = $('choose_batch_action').value.split('/').pop() var urlSegment = $('choose_batch_action').value.split('/').pop();
if ($('BatchActionParameters_'+urlSegment)) { if ($('BatchActionParameters_'+urlSegment)) {
jQuery('#actionParams').empty(); jQuery('#actionParams').empty();
jQuery('#BatchActionParameters_'+urlSegment).appendTo('#actionParams'); 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 is needed because calls to observeMethod doesn't seem to preserve instance variables so a Prototype can't be used
batchActionGlobals = { batchActionGlobals = {
@ -401,7 +401,7 @@ batchActionGlobals = {
}); });
} }
} }
} };
Behaviour.register({ Behaviour.register({

View File

@ -45,8 +45,11 @@ end
Given /create a new page using template \"(.*)\"/i do |type| Given /create a new page using template \"(.*)\"/i do |type|
Given 'I load the root node (ajax)' Given 'I load the root node (ajax)'
puts "Clicking the create button"
And 'I click the "Create" button' And 'I click the "Create" button'
puts "Selecting #{type} from PageType"
And "I select \"#{type}\" from \"PageType\"" And "I select \"#{type}\" from \"PageType\""
puts "done selecting"
And 'I click the "Go" button (ajax)' And 'I click the "Go" button (ajax)'
And 'I click the "Create" button' And 'I click the "Create" button'
end end