Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

ModelAdmin search results limit


Go to End


6 Posts   2394 Views

Avatar
micahsheets

Community Member, 165 Posts

13 October 2009 at 10:42am

When I do a search in ModelAdmin, the results are limited to 30 by default which is ok. The problem is that I cannot see all of the results because of a bug in the CSS. The outer div does not surround all of the results but seems to cover up the lower ones. I am using SS 2.3.3.

Avatar
dalesaurus

Community Member, 283 Posts

13 October 2009 at 1:10pm

Have you tried different browsers? How about tweaking it with Firebug and/or greasemonkey until the fix is applied? You did log/search the open tickets on this, correct?

http://open.silverstripe.org

Avatar
BLU42 Media

Community Member, 71 Posts

3 November 2009 at 9:35am

I ran into the same issue. Apparently this is being changed in 2.4, so you can regard this as a temp patch.

There is a fitToParent javascript call that helps keep everything looking nice but applying overflow:hidden to holder objects. It doesn't apply this if overflow:auto is specifically set, though.... In the case of ModelAdminPanel, this is not set which is keeping the scrollbar from appearing. This fix worked for me and my clients:

First, apply the following code to your init() function in your ModelAdmin class:

function init() {
	parent::init();
	Requirements::customCSS("
		#right #ModelAdminPanel{overflow:auto !important;}
		body.ModelAdmin #right{overflow: auto !important;}
	");

Next, you'll need to mod the LeftAndMain.js file. At line 160, comment out the fitToParent function:

//	fitToParent('ModelAdminPanel',-60);

Let us know how it works out for you!

-John

Avatar
potion_maker

Community Member, 36 Posts

5 December 2009 at 5:13pm

Thanks SmartPlugs. Good fix.

Avatar
CodeGuerrilla

Community Member, 105 Posts

2 February 2010 at 5:29pm

Edited: 02/02/2010 7:23pm

An easier fix is to just add the following to one of your custom css files or as above:

ProductAdmin.js

$('#ModelAdminPanel').css('overflow', 'auto');

Personally if I am hacking I like to still leave the core files alone.

Avatar
swaiba

Forum Moderator, 1899 Posts

10 March 2010 at 7:05am

Hi guys,

Place this in your extended ModelAdmin class...

static $page_length = 10;

...it will limit the results :)