Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2008-01-14 01:30:34

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Collapse section options

Steve, I think Peter meant that the “Type” column still remains then simply distinguish the “blocks” with alternating backgrounds.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#26 2008-01-14 01:38:41

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,190
Website

Re: Collapse section options

The use of headings and grouping would be good improvement. The ‘too much space’ argument is not real. Too the contrary. Having all those forms grouped would allow for a simple show/hide toggle to keep the overall list visually short (similar to the left column on the ‘write’ pane).

@ Steve Lam; your sections pane plugin is fun, but I soon got tired of the slide-in effect; I changed it to a simple toggle(). ;-)


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#27 2008-01-14 02:05:32

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: Collapse section options

phiw13 wrote:

The use of headings and grouping would be good improvement. The ‘too much space’ argument is not real. Too the contrary. Having all those forms grouped would allow for a simple show/hide toggle to keep the overall list visually short (similar to the left column on the ‘write’ pane).

agreed. i don’t see any point in changing the background for only comment and link forms. that doesn’t help organization nor consistent in any way. the entire ‘type’ column is really quite useless and just single headings for each is much more clean. plus, this leads the way to fun little collapsible plugins :P

i’ve already hacked my core to get that layout, and guiguibonbon has submitted a patch to the devs for possible inclusion. if for some reason it doesn’t make it through, its quite a simple change to the form_list() function in txp_form.php that shouldn’t affect anything else at all.

@ Steve Lam; your sections pane plugin is fun, but I soon got tired of the slide-in effect; I changed it to a simple toggle(). ;-)

good good! i use it myself without the animation as well. i also have it so expanding one section doesn’t close all the others as i’m sure viewing more than one section at a time comes in handy as well.

Last edited by iblastoff (2008-01-14 02:11:24)

Offline

#28 2008-01-14 02:26:43

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Collapse section options

So can we see the hack please Steve? :)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#29 2008-01-14 03:38:04

guiguibonbon
Member
Registered: 2006-02-20
Posts: 296

Re: Collapse section options

Change form_list() to this (in the /textpattern/include/txp_form.php file):

function form_list($curname)
{
	global $step,$essential_forms;
	$out[] = startTable('list');
	$out[] = tr(tda(sLink('form','form_create',gTxt('create_new_form')),' colspan="3" style="height:30px"'));

	$methods = array('delete'=>gTxt('delete'));


	$rs = safe_rows_start("*", "txp_form", "1 order by type asc, name asc");
	$oldtype = '';
	if ($rs) {
		while ($a = nextRow($rs)){
			extract($a);
			if ($type != $oldtype)
				$out[] = assHead($type,'');
				$editlink = ($curname!=$name) 
				?	eLink('form','form_edit','name',$name,$name)
				:	htmlspecialchars($name);
				$modbox = (!in_array($name, $essential_forms))
				?	'<input type="checkbox" name="selected_forms[]" value="'.$name.'" />'
				: '<input type="checkbox" disabled="disabled" />';
			$out[] = tr(td($editlink).td($modbox));
			$oldtype = $type;
		}

		$out[] = endTable();
		$out[] = eInput('form').sInput('form_multi_edit');
		$out[] = graf(selectInput('edit_method',$methods,'',1).sp.gTxt('selected').sp.
			fInput('submit','form_multi_edit',gTxt('go'),'smallerbox')
			, ' align="right"');

		return form( join('',$out),'',"verify('".gTxt('are_you_sure')."')" );
	}
}

and add this at the end of textpattern.css (or replace the existing rules) :

table#list th, table#list td {
padding: 1px 5px;
text-align: left;
border-bottom: 1px solid #ddd;
line-height:2;
}

table#list th {
vertical-align: bottom;
background:#eee;
}

Last edited by guiguibonbon (2008-01-14 03:58:14)

Offline

#30 2008-01-14 06:04:53

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,190
Website

Re: Collapse section options

iblastoff wrote:

@ Steve Lam; your sections pane plugin is fun, but I soon got tired of the slide-in effect; I changed it to a simple toggle(). ;-)

good good! i use it myself without the animation as well. i also have it so expanding one section doesn’t close all the others as i’m sure viewing more than one section at a time comes in handy as well.

Care to share this with us ?
(I’ve started studying Jquery, but I’m a lazy student…)


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#31 2008-01-14 12:06:52

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Collapse section options

Thanks guiguibonbon. :)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#32 2008-01-14 15:20:48

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: Collapse section options

phiw13 wrote:

iblastoff wrote:

@ Steve Lam; your sections pane plugin is fun, but I soon got tired of the slide-in effect; I changed it to a simple toggle(). ;-)

good good! i use it myself without the animation as well. i also have it so expanding one section doesn’t close all the others as i’m sure viewing more than one section at a time comes in handy as well.

Care to share this with us ?
(I’ve started studying Jquery, but I’m a lazy student…)

sure. i tacked it on to the ‘modifications’ area of the first post

Offline

#33 2008-01-16 18:15:34

maverick
Member
From: Southeastern Michigan, USA
Registered: 2005-01-14
Posts: 976
Website

Re: Collapse section options

thebombsite wrote:

I agree about changing multiple sections Mike though now that they’ve stopped the page jumping to the top when you save it is a little easier.

Agreed – That was a much appreciated improvement.

Mike

Offline

Board footer

Powered by FluxBB