Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-08-29 14:29:25

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355
Website

Txp 4.5 - expand code area in admin interface

To see the entire code wants to with one click open the code area on the screen. This is useful for development.

To demonstrate this idea was to write a small plugin (Txp 4.5 only)

1. Install plugin
2. Go to Pages/Forms tab
3. Click to title “Pages” or “Forms” – code area will be expanded to 75% width, if uncomment one line then will be 100% width

Tested on Classic/Remora/Hive themes.

Click to title – only for example, it is advisable to make a separate html entry for this.
Perhaps for articles and css is also useful. Status code area can not keep.

Raw js code from plugin:

$(document).ready(function() {
	if ($("#tagbuild_links").is('*') ) {
		$('.txp-heading').css( 'cursor', 'pointer' );
	        $('.txp-heading').click(function(){
	                $(".txp-columntable td.column:first-child").toggleClass("empty");
//	                $(".txp-columntable td.column:last-child").toggleClass("empty");	 // extra expand, uncomment this line
	        });
	}
})

aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#2 2012-08-29 14:42:59

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: Txp 4.5 - expand code area in admin interface

Hi makss.

There is already rah_expanding, that provides a similar (if not equal) functionality:

Rah_expanding brings dynamically expanding textareas to Textpattern CMS’ admin-side interfaces near you. With the plugin textarea elements will grow with a user’s input. While the user types, the field’s height will increase to fit the content


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#3 2012-08-29 15:59:17

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Txp 4.5 - expand code area in admin interface

@maniqui

It’s not quite the same, rah_expanding adds height whereas this expands width (by hiding left and right columns).

However, that can be achieved (without a plugin) in Hive on 4.5 already by simply adding a line to your config.php file, see here for more details

Offline

#4 2012-08-29 17:21:20

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355
Website

Re: Txp 4.5 - expand code area in admin interface

philwareham wrote:

However, that can be achieved (without a plugin) in Hive on 4.5 already by simply adding a line to your config.php file, see here for more details

Thanks for link

Hide tag builder column (pages and forms pages):
define('hive_theme_hide_tag_builder_column', true);

This will always hide the panel, but want more interactive (hide/show) per click, the more that Javascript can do this in just a few lines.


aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

Board footer

Powered by FluxBB