Permalink
Browse files

BUGFIX WidgetAreaEditor shouldn't ever call editable segment "NoWidge…

…ts" - this is just a placeholder

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@78496 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent 44e5b0a commit a82a320da4ab189a394a9e1bb58cd3437b401adf @halkyon halkyon committed with sminnee Jun 5, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 javascript/WidgetAreaEditor.js
@@ -60,7 +60,7 @@ WidgetAreaEditorClass.prototype = {
var usedWidgets = $('WidgetAreaEditor_usedWidgets').childNodes;
for(var i = 0; i < usedWidgets.length; i++) {
var widget = usedWidgets[i];
- if(widget.id && (widget.id.indexOf("Widget[") != 0)) {
+ if(widget.id && (widget.id.indexOf("Widget[") != 0) && (widget.id != 'NoWidgets')) {
new Ajax.Request('Widget_Controller/EditableSegment/' + widget.id, {onSuccess : $('WidgetAreaEditor_usedWidgets').parentNode.parentNode.insertWidgetEditor.bind(this)});
}
}

0 comments on commit a82a320

Please sign in to comment.