Added CSS fieldset for node/edit

Dustin Currie - April 17, 2009 - 18:59
Project:CSS Injector
Version:6.x-1.3
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:needs review
Description

I needed a way to allow per-node CSS editing in the admin screen and have modified this module to meet that need.

I have modified this module to include the following features:

A fieldset and checkbox is added to admin/content/node-type/*

Content types with this checkbox marked will get a CSS editing fieldset in node/add/[content-type] and node/[nid]/edit

The css fieldset includes a textarea to edit CSS and the media dropdown and preprocessing checkbox. When submitted, if there is CSS code, a new CSS rule is created with an assumed name of node-[nid] and an assumed rule of "Add on only the listed pages" and "node/[nid]"

Will probably do a bit of refactoring later, but right now it works and is ready for feedback

Also attached is a screenshot of the node/edit screen with this in action

AttachmentSize
css_injector.install.patch1.44 KB
css_injector.module.patch7.13 KB
node-edit-css-injector.png7.39 KB
 
 

Drupal is a registered trademark of Dries Buytaert.