minor improvement contrib

lcollong

FabriKant d'applications web
Hi,

Developing significant app using Fabrik often drive your form to run several plugins on several events. It makes life easier to see which plugin is published or not and, for the php ones, on which event they are hooked without having to open each detailed pane.

See the before/after snapshot here in.

I did some minor changes to the pluginmanager.js file under pull request #1978
I've catched only the watchdescription function and the onSuccess load of plugins funcs.
Ideally it should set the right text on change of the publish/unpublish radio button event as well as on the php event dropdown selection change. No js skills enough.

May be you'll be ok to include these change as they are ?

Also it needs to add the .unpublished {text: gray; } line in your admin template to achieve the complete view.
 

Attachments

  • before.PNG
    before.PNG
    33 KB · Views: 27
  • after.PNG
    after.PNG
    37.4 KB · Views: 28
As per @Sophist 's comments on the PR, can you document it a little there, and fix the indentation?

What IDE / code editor do you use?

The current Fabrik standard is tabs, rather than spaces for indentation.

-- hugh
 
I use NotePad++ for my devs. I did a copy/paste from it to the github embedded editor. It has probably lost the tabs there.
 
1. I use notepad++ and you can configure it to use tabs or spaces and to set the tab-width to 2 or 4 spaces for each type of file individually.

2. I agree entirely with the concept of this PR - it is similar in concept to my PR#1948 which does something similar for JS elements.

3. Am I write in thinking that you are trying to improve the "PHP" form plugin (which processes events) as opposed to the "PHP Event" list plugin which also processes events or the "PHP" list plugin which is also called "PHP"?

Whilst this approach is a simple and direct one, I think that it is wrong because the js file you are changing is used for all sorts of plugins, including form php, list php, element validations, and visualisations, several of which may be called "php".

Instead I think you need to look at other places like element validations that plugins are used in an accordion, and use these as a basis for doing something similar for form plugins that allows you to do this just for the php form plugin and not other "php" plugins elsewhere.

However @cheesegrits might feel differently, and he is the ultimate arbiter of such things.
 
Thanks for your input.
My idea was to try and see if it could be done in order to propose a way to do it rather than contribute effectively to the code. I'm not familiar enough with the Fabrik's internals to do so. Specifically on js where my skill are limited.

1/ I've just checked and Notepad is set to code "tabs" for indentation (see capture).
3/ Yes, I was only concerned by the form's plugin. I'm sure you're right for the better way to deal with. But I won't be able to do it the way you suggest... :-(
However one of my mods is related to the possibility to differentiate between published and unpublished plugins using a class on the last ones. It's very comfortable indeed to check this at a glance without opening each ones. And I think this mod should work for all kind of situations you describe.
 

Attachments

  • Capture.PNG
    Capture.PNG
    89.4 KB · Views: 16
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top