Skip to content

Commit

Permalink
Ensure that widgets in prompt/alert are registered as children of pro…
Browse files Browse the repository at this point in the history
…mpt/alert
  • Loading branch information
Marcus McLaughlin authored and bcwalrus committed Jun 30, 2010
1 parent 6475bcb commit 744dc10
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions desktop/core/static/js/Source/CCS/CCS.Desktop.Config.js
Expand Up @@ -132,3 +132,5 @@ window.addEvent('domready', function(){
else if(window.getSelection) window.getSelection().removeAllRanges();
});
});

Selectors.Pseudo.widget = function() { return !! this.get("widget"); };
Expand Up @@ -57,6 +57,9 @@ CCS.JFrame.addGlobalRenderers({
this.getWindow().hide();
} else {
var alert = this.alert(content.title, target);
target.getElements(":widget").each(function(widget) {
widget.get("widget").register(widget.getParent(":widget").get("widget"));
});
if (options) {
if (options.blankWindowWithError) {
alert.addEvent('destroy', function(){
Expand All @@ -82,4 +85,4 @@ CCS.JFrame.addGlobalRenderers({
return !jframe_renders;
}

});
});
Expand Up @@ -33,7 +33,7 @@ CCS.JFrame.addGlobalRenderers({

var target = new Element('div', {'class': 'jframe_prompt'}).hide().inject($(this));
this.fill(target, content);
target.show();
target.show();
var toolbar = target.getElements('.toolbar');
if (toolbar.length) toolbar.hide();

Expand All @@ -44,6 +44,9 @@ CCS.JFrame.addGlobalRenderers({
}, {
resizable: true
});
target.getElements(":widget").each(function(widget) {
widget.get("widget").register(widget.getParent(":widget").get("widget"));
});
if (form) {
form.addEvent('submit', function(){
prompt.hide();
Expand All @@ -63,4 +66,4 @@ CCS.JFrame.addGlobalRenderers({
return true;
}

});
});

0 comments on commit 744dc10

Please sign in to comment.