Load/change themes based on different login.

Notes on our latest calendar for FileMaker 13,: DayBack
Posts: 4
Joined: Sat Sep 01, 2018 3:20 am
PostPosted: Fri Sep 21, 2018 5:11 am
Hi,

Is it possible to load different theme based on login at startup or is it possilbe to do it in the ccs file.

The reason for this is I need to have different look between users.

Few things I want to have different for one user but others can be standard.
1. Remove the green + sign.
2. Remove the yellow background when you look at the current date.
3. Remove the refresh and date selection arrows.

Best regards,
Kolbeinn.
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Fri Sep 21, 2018 6:11 am
Hi Kolbeinn,

I believe we've got a way to change the CSS on startup for each user. I'll ask around and get back to you.

Thanks!

- John
John Sindelar
SeedCode
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Fri Sep 21, 2018 6:57 am
Here's how you can change the CSS for each user. This only runs at startup, so if you are having users log in and out of your solution after startup, you'll want to run DayBack's "Upon Opening" script after each login change.

Edit the script "Export Theme ({Preview})" and in the Else branch, replace the single ExportFieldContents line with lines 22 through 31 in the attached screenshot. You'll see just a single branch here for the user "Bob", but change that to "=" and you can create a separate branch for each user who needs special CSS. (Click on the image for a larger version.)

Image

Line 25, which you can't really read in the screenshot, is where you actually add new CSS. Here is the second part of the SetField dialog and the example here just turns off the green plus button:

Code: Select all
// Hide the plus button for new events

".add-event-container {
display: none !important;
}"

& ¶ &

// Hide the "new event" popover button

"div[content=newEvent]{
display: none !important;
}"

& ¶ &

CalendarInterface::ExportGlob


Don't forget to include the regular CSS at the end in the last two line which reference the CalendarInterface::ExportGlob.

If you want to make more customizations, you'll find lots of CSS examples here: http://www.seedcode.com/pmwiki/pmwiki.p ... eMaker.CSS

Hope that helps!

- John
John Sindelar
SeedCode
Posts: 4
Joined: Sat Sep 01, 2018 3:20 am
PostPosted: Mon Sep 24, 2018 1:38 am
Brilliant, thank you I will try this.

Best regards,
Kolbeinn.
Posts: 4
Joined: Sat Sep 01, 2018 3:20 am
PostPosted: Mon Sep 24, 2018 2:23 am
Tested and it worked!

Best regards,
Kolbeinn.
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Mon Sep 24, 2018 6:41 am
That's great, Kolbeinn! Well done! And thanks for letting us know.

- John
John Sindelar
SeedCode

Return to DayBack Calendar for FileMaker

Who is online

Users browsing this forum: No registered users and 3 guests

cron
(855) SEEDCODE
[email protected]
Follow us: