Jump to content

Front-End Edit Lightbox (FEEL) for ProcessWire


tpr

Recommended Posts

v1.1.9 is out with a few important fixes and one small but handy feature: toggle edit link display using ctrl+shift hotkey.

The module configuration was largely rewritten so please report if something goes weird.

Main changes:

- do not add Magnific Popup assets to admin (suggested by Matjaž)
- fixed missing default values on module install
- fixed default editlink text override issue
- fixed: do not try to open Template editor if not SuperUser
- added ctrl+shift hotkey to toggle editlink display
- sanitize module settings inputs
 
Btw, is template editing only available for SuperUser? I found no info on that so limited this feature only to them.
  • Like 1
Link to comment
Share on other sites

Thanks for the changes! :-)

BTW if you have time, it would be great if you add update information to the module so it would be fetched by PW updates. At the moment FEEL doesnt appear under this section and I have to look manually if an update is available or not.

I hope it is understandable what I mean :)

post-2257-0-65110600-1449044168_thumb.pn

Best regards Jürgen

Link to comment
Share on other sites

The module is not yet in the Modules directory but will be as soon as I FEEL it's stable enough (to be released as Beta :)).

I used it only in smaller projects so far but now I can test it on a multi-user site, so I expect hidden issues will come to surface. Plus I plan to add a few major feature (eg. add new page) so I will add to the directory when everything falls into place.

  • Like 1
Link to comment
Share on other sites

Is there a possibility that the actual admin works like FEEL? Click on the edit in a page in the tree and opens page fields inside a modal?

This could actually probable be done quite easily using CustomAdminFiles to apply the "pw-modal" class to the edit action button. Sorry, no time for an example, but you could probably steal from PageTable's edit trigger.

Otherwise, you could alway use Batch Child Editor - the edit icons trigger a modal for editing:

post-985-0-32465000-1449207760_thumb.png

Link to comment
Share on other sites

In BCE, clicking on edit icon, modal opens, now change the title, save, modal is closed, but title name change is not reflected in BCE.

FEEL also have an option to hide tabs (I know, there is the module for that), among other features. I like elbax's idea.

Link to comment
Share on other sites

In BCE, clicking on edit icon, modal opens, now change the title, save, modal is closed, but title name change is not reflected in BCE.

The title changes immediately for me - as soon as the modal is closed. The name however doesn't change until the parent page is reloaded. This is actually on my list of things to do, although it's been there for quite some time - maybe I need to make it a higher priority.

Link to comment
Share on other sites

Title changes only on the first edit attempt eg. "edit->change title->save" title change is visible in BCE, then again "edit->change title->save" this time the title stays unchanged

I never noticed that - thanks for the head's up - I'll see if I can fix it in the next couple of days.

@tpr - sorry for hijacking your thread!

Link to comment
Share on other sites

Thanks! I will surely try!

EDIT: Oh wow, Soma build a Fancybox based module that does just what I was imagining.

Link to comment
Share on other sites

  • 4 weeks later...

I have downloaded the latest version from Github today but the modal closes and saves after there are errors. In my case I have a field which is mandatory and the modal will be closed after pressing the save button and the field is empty.

The fieldtype in this case is a options field with 4 checkboxes. One must be checked at least (required). In backend I get the error message that this field is required.

Best regards

Link to comment
Share on other sites

  • 4 weeks later...

Hi, just installed, I got this

Notice: Undefined index: fieldHighlightStyle in /var/www/vhosts/httpdocs/site/assets/cache/FileCompiler/site/modules/FrontEndEditLightbox/FrontEndEditLightbox.module on line 167

I'm on PW 3.0.5 devns

Update: sorry, the notice gone after I changed the module configs...

Link to comment
Share on other sites

Yes, because the iframe would navigate away and the lightbox closes. You can set "closeOnSave" to false to prevent this, but on the add children page you will probably get the full admin, not the "modal" version (without sidebars and headers, etc). 

For now, to add children with FEEL you can use PageTables, as Juergen suggested earlier. Not the best solution I know.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

A new version is uploaded to GitHub.

This release fixes JS dependencies as all required JS files are loaded via the main JS file, only if they aren't present. 
Furthermore, CSS files are also loaded by the main JS. 

Main changes:

  • new option: disable autoloading FrontEndEditLightbox.js. This enables loading it manually, for example when using a script loader.
  • new option: custom data-* attributes feature. Can be useful for further JS/CSS processing (eg. ajax reload parts using FEEL callbacks)
  • load jQuery and Magnific Popup by FrontEndEditLightbox.js (only if they aren't loaded)
  • added simple ajax reload implementation exampe to the readme file
  • Like 3
Link to comment
Share on other sites

  • 2 weeks later...
  • 5 months later...

I installed in PW 2.7 and have tried this, before going into stupid alterations that make the module not even worth having, might as well write one fresh:

foreach($pages->get('/services/')->children as $s) { echo $s->feel(); }

which returns

Quote

Warning: Invalid argument supplied for foreach() in/Applications/AMPPS/www/netsec/site/modules/FrontEndEditLightbox-master/FrontEndEditLightbox.moduleon line298

In case you couldn't tell $s is indeed a page object. What's the problem? How do I fix it? 

This is the block starting on l298:

            foreach ($customOptions as $key => $unused) {
                if (strpos($key, 'data-') === 0) {
                    $attributes[$key] = $key . ' = "' . wire('sanitizer')->textarea($customOptions[$key]) . '"';
                }
            }

Commenting it out gets rid of the error but apparently the feel element itself is hidden by default, I tried overwriting the output in the plugin but I do not want to do that, how can I get this to simply work? Please & thanks

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...