Rob Posted May 1, 2013 Share Posted May 1, 2013 Hi fellow forum friends. I've released (on github at least) my new module - Page Edit Fold Status. May not yet be live in modules section of the site. https://github.com/robphilp/PageEditFoldStatus What this does is use a combo of JQuery, Ajax and the session to remember the state of each field when you edit and then save a page, so that when you return to the page after the save (or later) it will recall that state and fold/unfold all the fields so the edit page is how you last left it. We have pages with a LOT of fields on, and we found it irritating to have them all default to open. That said, if they default to closed and you have to drill down to edit some specific bit of data, it's annoying to have to drill-down again each time when you are making many incremental edits, so I made this module to store the state on a per-page and per-user basis. e.g. some users will need to focus on certain fields, so if they have these open and all others closed, it will retain this state each time they edit a page. No need to open/close these fields each time so you can focus on what's important to you. Because of the use of the session, this behaviour SHOULD last for the lifetime of your login. I hope it is helpful! Just realised I've put this in the wrong forum, can someone move it for me?! Thanks! 7 Link to comment Share on other sites More sharing options...
teppo Posted May 1, 2013 Share Posted May 1, 2013 Great idea, will definitely try it out! One minor thing I noticed after taking a quick look at your code: you should make sure that $_SERVER['REQUEST_URI'] actually exists before doing that strpos() at init. When bootstrapping ProcessWire for local use (shell scripts etc.) it won't be there and you'll get a PHP notice for that. Not fatal, but annoying in the long run 1 Link to comment Share on other sites More sharing options...
diogo Posted May 1, 2013 Share Posted May 1, 2013 Moved to "Modules/Plugins" Link to comment Share on other sites More sharing options...
Rob Posted May 1, 2013 Author Share Posted May 1, 2013 Moved to "Modules/Plugins" Thanks! Link to comment Share on other sites More sharing options...
Rob Posted May 1, 2013 Author Share Posted May 1, 2013 Before I forget - Thanks to Soma for help with a module issue I was having. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now