mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
ENHANCEMENT Setting proper text/javascript content-type in FormResponse so clientside ajax-handling knows how to deal with it.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92530 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
b930fbfe20
commit
9ecd35928c
@ -77,8 +77,8 @@ class FormResponse {
|
||||
return self::$non_ajax_content;
|
||||
} else if(isset($_REQUEST['forceajax']) || Director::is_ajax()) {
|
||||
ContentNegotiator::disable();
|
||||
// TODO figure out a way to stay backwards-compatible with Ajax.Evaluator and still use the automatic evaluating of Prototype
|
||||
//header("Content-type: text/javascript");
|
||||
$response = Controller::curr()->getResponse();
|
||||
$response->addHeader('Content-Type', 'text/javascript');
|
||||
return self::get_javascript();
|
||||
} elseif(!empty(self::$non_ajax_content)) {
|
||||
return self::$non_ajax_content;
|
||||
|
Loading…
x
Reference in New Issue
Block a user