Hello Couchies,

As everybody knows now Couch 1.4 allows to make custom AdminEdit pages. Here is my recipe how to make beautiful fully CSS-customizable DatetimePicker and FoldersPicker using rawJS.

First of all please look inside the attached file to see the screenshots about what I mean.

If it's what you need, follow these steps:

1) Edit couch/addons/kfunctions.php:
Code: Select all
Uncomment
require_once( K_COUCH_DIR.'addons/data-bound-form/data-bound-form.php' );
Add
$FUNCS->register_admin_pageview( 'index.php', 'custom_admin_edit.html', 0 );

Instead of "index.php" write your Blog template.

2) Make a backup of the original file couch/addons/data-bound-form/datetime.php and then copy the files from attached custom_admin_edit.zip to your site's folder.

That's it. My custom_admin_edit.html has only two inputs - for date and for folders, add your DataBound inputs for the title, name, content etc. everything you need, and add own CSS styles.

My solution use rawJS, so it will work even if you don't use any JS libraries. The code is clear and can be simply transformed for the libraries. As soon as Couch 1.4.5 is ready I will add Zepto or ExtJS library and simplify the code for them.

About months' names use standard 'months' variable for datetime input to assign your names. Note that I've deleted separators option from datetime.php for clear HTML code, so 'fields_separator' will not work.

So, one more step towards customizable AdminEdit page! Hope it will be useful for somebody!

Thanks

Attachments