• New Commercial Services Section

    We have now opened a commercial services section here on the forum. If you have a Fabrik project that you wish to have someone work on for you, post it under Help Wanted. If you are an application developer and wish to earn some money helping others, post your details under Fabrik Application Developers.

    Both of these are unmoderated. It will be up to both parties to work out the details and come to an agreement.

Details View: duplicated title and missing exit button

sgravelle

New Member
Trying to figure out how to fix the duplicated title in the Details View modal window (ajaxify), as well as adding the Exit button.
Example: see attachment
Tks!
 

Attachments

  • details-view-to-fix.png
    details-view-to-fix.png
    53.5 KB · Views: 144
1. "Duplicated title":
The second, smaller "Canada" seems to be the label of the group. So, in the backend, edit the group, empty its "Label" field, save, and it should be gone.

2. "Exit" (a.k.a. "Close") icon:
Check with your browser console if it's in the HTML output and if there's maybe some CSS hiding it.
 
Just seeing the URL of your site in the screenshot and, since it's accessible, I took a look.

Re 2.:
"Close" does exist:
Code:
<a href="#" class="closeFabWin" data-role="close">
    <span class="icon-cancel icon-remove-sign"></span>
</a>
But, as suspected, due to your Joomla template there's no CSS for the icon. I trust you know how to add it, otherwise take a look at how it's done for the neighbouring "expand" icon and replicate.
 
Extract and place in your template this css file in css folder and load it.
 

Attachments

  • icons.zip
    2.4 KB · Views: 333
@startpoint:
Well meant, without a single doubt.
However, I'd dare calling it "overkill" considering the OP needs only this single line added to his template custom CSS or so:
Code:
.icon-cancel:before { content: "\f00d"; }

;)
 
The best way to fix icon issues is with the fabrik-icon.php layout.

As icon names obviously vary wildly from template to template, this is an issue we regularly have to deal with in Fabrik. We can't account for all icon sets in the main code, we have to just pick an icon name and go with it. So we provide an easy way to override icon names, by mapping one name to another in a layout file:

https://github.com/Fabrik/Fabrik-Joomla-alt-layouts/blob/master/generic_icons/fabrik-icon.php

The comments in that file explain it, but the guts of it is around line 68, where you would map the icon name we use, to the one you need from your icon set:

https://github.com/Fabrik/Fabrik-Joomla-alt-layouts/blob/master/generic_icons/fabrik-icon.php#L68

Basically, everywhere in the Fabrik code where we render an icon, we use that layout to do it. So by mapping your icon name in this layout, it'll change it everywhere in Fabrik.

Just upload that file to ...

templates/<your site template>/html/layouts/com_fabrik/fabrik-icon.php

... and add the name mapping to the file as explained in the comments. You can add as many icon name mappings as you want.

-- hugh
 
Thanks everyone for your help.
The "Duplicated Tile" was easily solved, tks loosyfool.
But still having the issue with the Close icon not showing up.

hugh, I used the fabrik-icon.php approach. I tried different versions including these two:
case 'closeFabWin':
$iconParts[$key] = 'icon-close';
break;
case 'close':
$iconParts[$key] = 'icon-close';
break;
Still not showing up, so I assume there's something else I need to do. For example, do I need to upload the "close" icon to the same directory? If so, where do I get it from?
BTW, I did have to create the sub-directory /html/layouts/com_fabrik/ - I assume I needed to do that as it wasn't there before, correct?
Tks!
 
hugh, I used the fabrik-icon.php approach. I tried different versions including these two:
case 'closeFabWin':
$iconParts[$key] = 'icon-close';
break;
case 'close':
$iconParts[$key] = 'icon-close';
break;

The icon names we use for that are icon-cancel and icon-remove-sign. So you need to map one of those, to whatever icon name your template's icon set uses for that symbol. So lets say yours uses 'icon-times' ...

Code:
case 'remove-sign':
$iconParts[$key] = 'icon-times';
break;

I can't tell you what the icon name you need is, you'll have to figure out what your template uses for it.

Also, if you use Font Awesome, you'd need to map it to fa-times, not icon-times.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top