tpr

Front-End Edit Lightbox (FEEL) for ProcessWire

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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Oh, I have installed it a longer time ago, so I have forgotten that it is not in the Modules directory right now. Adding a "add new page" feature would be awesome!!!!

Share this post


Link to post
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?

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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!

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Thanks, I will check when my computer comes to life again :(

Share this post


Link to post
Share on other sites

I have version 1.2.0 and I couldn't reproduce:

post-3156-0-49725400-1453753074_thumb.gi

Share this post


Link to post
Share on other sites

Hello tpr,

I have updated to PW 3.05 and the behaviour is gone. So the module works as expected  :) !

Thanks for your efforts!

Share this post


Link to post
Share on other sites

That's good news - I tried to replicate the bug you mentioned in PW 2.7, so I guess that's not the PW version that solved it.

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

That's still an error even if it's gone. I'm in a pw 305 project but haven't notice this, will check later again. Thanks for the info.

  • Like 1

Share this post


Link to post
Share on other sites

Got rid of the PHP notice on module install (1.2.1).

  • Like 1

Share this post


Link to post
Share on other sites

I noticed a "bug" maybe..
I removed "#_ProcessPageEditChildren" for the "selector to hide" option because I want to add childrens
but inside the popup when I click to "add new page" button I can see the new page form for just one sec and then the popup closes

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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.