← Back to Backend Popup Support
As soon as I define a controller with list behaviour with multiple list definitions the plugin breaks. https://octobercms.com/docs/backend/lists#multiple-list-definitions
The plugins adds recordOnClick
to the $listConfig
array.
Thanks. Accepted for v1.0.2.
Information for all users: for such cases, the plugin provides flexible configuration for each individual CMS plugin using the "Apply only to selected plugin controllers" button.
Last updated
Linkonoid said:
Thanks. Accepted for v1.0.2.
Information for all users: for such cases, the plugin provides flexible configuration for each individual CMS plugin using the "Apply only to selected plugin controllers" button.
Thank you, but unfortunately that's what I did and the selected controller defines multiple lists. So the workaround does not solve my problem.
I was able to fix the problem by patching the file Plugin.php on line 121:
if (is_array($controller->listConfig)) {
$addListConfig = '$/linkonoid/backendpopup/behaviors/add_config_list.yaml';
foreach($controller->listConfig as $key => $listConfig) {
$controller->listConfig[$key] = $controller->mergeConfig(
$listConfig,
$addListConfig
);
}
} else {
$addListConfig = '$/linkonoid/backendpopup/behaviors/add_config_list.yaml';
$controller->listConfig = $controller->mergeConfig(
$controller->listConfig,
$addListConfig
);
}
Unfortunately, I did not see your message 2 weeks ago. But in any case, thank you very much! I came to the same solution + added more functionality. Along with this approach (I use it only to initialize $controller->listConfig from the file to the array for extract the list of passed variables from recordUrl for use in BackendPopupBehavior __construct), it is more convenient to use the Event::listen('backend.list.extendColumns', function ($list) {...}) which explicitly passes the current list. And used $list->recordOnClick for manipulation and write js.
Added on v1.1.0:
- Added support change modal popup size for all buttons (exclusion "Create" button on topbar - default 'giant', no change size... in other relises..)
- Added support for the transfer of multiple parameters for controller ( /:id/:secondArg/:thirdArg, tested on "janvince/smallrecords" plugin)
- Added multiple controller config lists supports (tested on "janvince/smallrecords" plugin)
- Added support onCreate event button on form
- New extended configutation settings for default and individual settings for controllers
- Added backend, cms, system controllers lists support ("Administrators", "Event log" controllers - correct works only on BackendPopup partials)
- Added BackendPopup "update" and "create" partials
- Added settings for "create" partial in individual settings
- Added the ability to disable the functionality of BackendPopup for the selected controller in the individual settings.
Last updated
1-5 of 5