mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
(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@60228 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
689c34400b
commit
649ff87aec
@ -376,23 +376,6 @@ class ModelAdmin_CollectionController extends Controller {
|
|||||||
}
|
}
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Action to render results for an autocomplete filter.
|
|
||||||
*
|
|
||||||
* @param unknown_type $request
|
|
||||||
* @return unknown
|
|
||||||
*/
|
|
||||||
function filter($request) {
|
|
||||||
$model = singleton($this->modelClass);
|
|
||||||
$context = $model->getDefaultSearchContext();
|
|
||||||
$value = $request->getVar('q');
|
|
||||||
$results = $context->getResults(array("Name"=>$value));
|
|
||||||
header("Content-Type: text/plain");
|
|
||||||
foreach($results as $result) {
|
|
||||||
echo $result->Name . "\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@ -19,27 +19,27 @@ jQuery(document).ready(function() {
|
|||||||
*/
|
*/
|
||||||
function showRecord(uri) {
|
function showRecord(uri) {
|
||||||
jQuery.get(uri, function(result){
|
jQuery.get(uri, function(result){
|
||||||
jQuery('#right').html(result);
|
jQuery('#right #ModelAdminPanel').html(result);
|
||||||
jQuery('#SearchForm_holder').tabs();
|
jQuery('#SearchForm_holder').tabs();
|
||||||
|
|
||||||
// TODO/SAM: It seems a bit of a hack to have to list all the little updaters here.
|
// TODO/SAM: It seems a bit of a hack to have to list all the little updaters here.
|
||||||
// Is livequery a solution?
|
// Is livequery a solution?
|
||||||
Behaviour.apply(); // refreshes ComplexTableField
|
Behaviour.apply(); // refreshes ComplexTableField
|
||||||
jQuery('#right ul.tabstrip').tabs();
|
jQuery('#right ul.tabstrip').tabs();
|
||||||
|
|
||||||
jQuery('#Form_EditForm_action_goBack').click(function() {
|
|
||||||
if(__lastSearch) __lastSearch.trigger('submit');
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
jQuery('#Form_EditForm_action_goBack').livequery('click', function() {
|
||||||
|
if(__lastSearch) __lastSearch.trigger('submit');
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* POST a hash of form submitted data to the given endpoint
|
* POST a hash of form submitted data to the given endpoint
|
||||||
*/
|
*/
|
||||||
function saveRecord(uri, data) {
|
function saveRecord(uri, data) {
|
||||||
jQuery.post(uri, data, function(result){
|
jQuery.post(uri, data, function(result){
|
||||||
jQuery('#right').html(result);
|
jQuery('#right #ModelAdminPanel').html(result);
|
||||||
|
|
||||||
// TODO/SAM: It seems a bit of a hack to have to list all the little updaters here.
|
// TODO/SAM: It seems a bit of a hack to have to list all the little updaters here.
|
||||||
// Is livequery a solution?
|
// Is livequery a solution?
|
||||||
@ -98,8 +98,8 @@ jQuery(document).ready(function() {
|
|||||||
form = jQuery(this);
|
form = jQuery(this);
|
||||||
data = formData(form);
|
data = formData(form);
|
||||||
jQuery.get(form.attr('action'), data, function(result){
|
jQuery.get(form.attr('action'), data, function(result){
|
||||||
jQuery('#right').html(result);
|
jQuery('#right #ModelAdminPanel').html(result);
|
||||||
jQuery('#right td').click(function(){
|
jQuery('#right #ModelAdminPanel td').click(function(){
|
||||||
td = jQuery(this);
|
td = jQuery(this);
|
||||||
showRecord(td.parent().attr('title'));
|
showRecord(td.parent().attr('title'));
|
||||||
td.parent().parent().find('td').removeClass('active');
|
td.parent().parent().find('td').removeClass('active');
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<% include Editor_toolbar %>
|
|
||||||
|
<div id="ModelAdminPanel">
|
||||||
|
|
||||||
<% if EditForm %>
|
<% if EditForm %>
|
||||||
$EditForm
|
$EditForm
|
||||||
@ -11,4 +12,6 @@
|
|||||||
</form>
|
</form>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<p id="statusMessage" style="visibility:hidden"></p>
|
<p id="statusMessage" style="visibility:hidden"></p>
|
||||||
|
Loading…
Reference in New Issue
Block a user