Does addcssfilefunction work within the plugin setup?
The scenario is a bit complex so please bear with me.
The plugin configuration has a button that invokes an "editform" piece of code through the use of the mini controller:
The button uses the URL parameter:
So far all seems fine and control is indeed given to:
public function Controller_editform($Sender)
That code, in turn displays a form which works fine and to my delight recognizes the CSS from the plugin configuration setup that was declared/added via:
That statement was added in the following hooks:
- public function assetmodel_stylecss_handler($Sender)
- public function Controller_editform($Sender)
As I mentioned, so far it all works just fine and I know from the visual effects as well as web inspector that the CSS is active.
I wanted to affect a small change - to have the form popup on top on the configuration screen so that when the admin clicks the button that routes to the mini controller "editform" code, the additional form is in a popup rather than replace the previous screen. All I did was to add "Popup" to the button class and as expected the form is displayed in a popup, and when the admin submits the form or closes it the underlying configuration screen is displayed.
The only problem is that the visual effects created by the CSS disappeared. I checked with the web inspector and indeed the CSS is not in effect.
I decided to try to add another addcss to the form itself in the view folder - it didn't help. I actually tried both ways:
and just for fun:
So clearly something in the popup process makes this AddCssFile function ineffective.
I welcome all suggestions. Apologies for not being able to share our intranet confidential code.