Hello,
What you describe is done already (but...), please below:
... we have 2 parameters:
usepopup and
popupinview
the '
popupinview' is checkboxes and is used to
turn off popup in
non-selected views:
$popupinview = $field->parameters->get('popupinview', array(FLEXI_ITEMVIEW,'category','backend'));
Code:
$popupinview = FLEXIUtilities::paramToArray($popupinview);
if ($view==FLEXI_ITEMVIEW && !in_array(FLEXI_ITEMVIEW,$popupinview)) $usepopup = 0;
if ($view=='category' && !in_array('category',$popupinview)) $usepopup = 0;
if ($isItemsManager && !in_array('backend',$popupinview)) $usepopup = 0;
(but i see the check for view == 'module to be missing:)
Code:
if ($view=='module' && !in_array('module',$popupinview)) $usepopup = 0;
Please check these 2 cases:
a. 'popupinview' does have option for 'module' but in the code it is missing (bug i will add) ... so maybe the problem comes from there? e.g. if you add the image field in custom fields of module then
JS code for popup will be added
b. the parameter 'linkto_url' forces the adding of
JS code for popup
is a or b your case ?
FOR a, i ll add option for '
module'
(the fields are called with view that can have 3 values: item, category = 'all content lists views', module)
... but image field also uses backend (not the view variable, it calculates variable $isItemsManager inside the code)
FOR b, you think to use parameter 'popupinview' to also turn off 'linkto_url' or add 'linkto_inview'?