Not sure if there's already something similar planed already for the Modules page in the core.
But none the less, it was fun to try out captain Hook
Just cleaned and checked this baby in: https://github.com/s...SectionCollapse
Posted 26 August 2011 - 07:31 PM
@somartist | modules created | support me, flattr my work flattr.com
Posted 27 August 2011 - 04:10 AM
Posted 27 August 2011 - 06:41 AM
@somartist | modules created | support me, flattr my work flattr.com
Posted 27 August 2011 - 09:35 AM
$this->scripts->add($this->config->urls->ModulesTOC . "ModulesTOC.js");
Posted 27 August 2011 - 01:44 PM
Also wanted to mention another way you can get the JS into the document without having to modify the HTML. Instead of an str_replace, you can do this in your loadJS function:
$this->scripts->add($this->config->urls->ModulesTOC . "ModulesTOC.js");
@somartist | modules created | support me, flattr my work flattr.com
Posted 27 August 2011 - 02:08 PM
<?php
public function init() {
$this->addHookAfter('Page::render', $this, 'loadJS');
}
public function loadJS($event) {
if($this->process == 'ProcessModule')
$this->config->scripts->add($this->config->urls->ModulesSectionCollapse . "ModulesSectionCollapse.js");
}
@somartist | modules created | support me, flattr my work flattr.com
Posted 27 August 2011 - 02:16 PM
Posted 27 August 2011 - 02:21 PM
@somartist | modules created | support me, flattr my work flattr.com
Posted 27 August 2011 - 02:29 PM
@somartist | modules created | support me, flattr my work flattr.com
Posted 27 August 2011 - 03:31 PM
@somartist | modules created | support me, flattr my work flattr.com
Posted 27 August 2011 - 03:57 PM
$this->addHookAfter('Process::execute', $this, 'loadJS');
Posted 27 August 2011 - 03:59 PM
$this->addHookAfter('Process::execute', $this, 'loadJS');
@somartist | modules created | support me, flattr my work flattr.com
Posted 27 August 2011 - 04:04 PM
Posted 27 August 2011 - 05:01 PM
@somartist | modules created | support me, flattr my work flattr.com
Posted 27 August 2011 - 05:08 PM
That is nice little module and got me thinking. Modules page is not only place where lists get very long and would benefit from some more js love. I have used Datatables a lot and I think it would be perfect on many lists that pw has. It has nice filter search, pagination, sorting, it is fast and easy to use. As a little bonus it supports themeroller. Also possible to use with huge datasets with ajax.
@somartist | modules created | support me, flattr my work flattr.com
Posted 27 August 2011 - 05:18 PM
Wasn't this already discussed somewhere?
Here's a new version of the modules section collapse module. Added count and +-
Posted 20 September 2011 - 02:46 PM
@somartist | modules created | support me, flattr my work flattr.com
0 members, 0 guests, 0 anonymous users