(merged from branches/roa. use "svn log -c <changeset> -g <module-svn-path>" for detailed commit message)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@60208 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2008-08-09 04:06:52 +00:00
parent 2b87d00c13
commit 08beafbcdb
4 changed files with 6 additions and 16 deletions

View File

@ -151,7 +151,7 @@ class MemberTableField extends ComplexTableField {
}
function AddLink() {
return "{$this->PopupBaseLink()}&methodName=add";
return "{$this->Link()}&methodName=add";
}
function SearchForm() {

View File

@ -211,18 +211,7 @@ class ModelAdmin_CollectionController extends Controller {
function getModelClass() {
return $this->modelClass;
}
/**
* Smashes a massive whole in the Law of Demeter.
*
* http://en.wikipedia.org/wiki/Law_of_Demeter
*/
/* I've commented this out because it's not actually used anymore
function getParentController() {
return $this->parentController;
}
*/
/**
* Delegate to different control flow, depending on whether the
* URL parameter is a numeric type (record id) or string (action).
@ -279,7 +268,7 @@ class ModelAdmin_CollectionController extends Controller {
*/
function search($request) {
$model = singleton($this->modelClass);
$searchKeys = array_intersect_key($request->getVars(), $model->searchableFields());
$searchKeys = array_intersect_key($request->getVars(), $model->searchable_fields());
$context = $model->getDefaultSearchContext();
$results = $context->getResultSet($searchKeys);
$output = "";
@ -288,7 +277,7 @@ class ModelAdmin_CollectionController extends Controller {
foreach($results as $row) {
$uri = Director::absoluteBaseUrl();
$output .= "<tr title=\"{$uri}admin/crm/{$this->modelClass}/{$row->ID}/edit\">";
foreach($model->searchableFields() as $key=>$val) {
foreach($model->searchable_fields() as $key=>$val) {
$output .= "<td>";
$output .= $row->getField($key);
$output .= "</td>";

View File

@ -75,7 +75,7 @@ class StaticExporter extends Controller {
$controllerClass = "{$page->class}_Controller";
if(class_exists($controllerClass)) {
$controller = new $controllerClass($page);
$pageContent = $controller->run( array() );
$pageContent = $controller->handleRequest(new HTTPRequest('GET',''))->getBody();
// Write to file
if($fh = fopen($contentfile, 'w')) {

View File

@ -26,6 +26,7 @@ jQuery(document).ready(function() {
function saveRecord(uri, data) {
jQuery.post(uri, data, function(result){
jQuery('#right').html(result);
Behaviour.apply(); // refreshes ComplexTableField
});
}