fuel9 / DisplayMonkey

Display Monkey digital signage solution
Other
127 stars 51 forks source link

Unique CSS for new Outlook Frame Template #29

Closed jaschrock closed 6 years ago

jaschrock commented 7 years ago

We are wanting to have a set of outlook calendars all displayed on one panel. This will change the CSS from the existing (which I want to stay as is for our individual room layouts). I created a new frame template and copied in the simplified version as a base. I then copied all of the .outlook class into my custom.css file renaming the class to calmult. I then changed the Div in the template to use the calmult class. When I do this, the display on the canvas shows:

Error: Cannot set property 'id' of undefined
Where: _initFrame
When: 2017-11-02T12:30:56-05:00
Info: {frameId:25,panel:8}

Is this not possible to do or am I just missing something somewhere.

Thanks

Alan

DisplayMonkey commented 7 years ago

Hi, it is a bit unclear what you are trying to do. Are you wanting a number of calendars shown in one panel all at the same time, or cycling one at a time?

The former is not possible in the current design, because any DM panel can only host a single frame at any given point in time. So you would have to create one panel per calendar. The latter is possible and should work out of the box. In either case, no CSS changes or custom templates are necessary. Custom CSS and template may be handy when you want just slightly tweak the layout or appearance of a frame without drastically changing main elements and CSS classes.

Perhaps, if you copy here your CSS and frame template we can see better what's going on.

Thanks for trying the Display Monkey!

jaschrock commented 7 years ago

I was going to have several panels within the canvas with separate calendars. The problem is that my other door entry displays are wider and so my css is built to make them look nice. These would have less columns and I would want to display in a more compact way (with several on the canvas at once) so I need a separate CSS to work with them. So, what I was trying to do is define a new set of .outlook css classes and then change the divs in the outlook template to point to them. I just copied and renamed the current .outlook class to .multcal and then had class="multcal" in the outlook template. But, as I talked more with my boss, he was wanting something totally different so this isn't a concern right now. But may be interesting for someone else to know if you want to still answer. Thanks Alan

DisplayMonkey commented 7 years ago

Hi, you should be careful renaming classes in the template, as some of them are used to drive rendering logic by the outlook.js module. Consider extending/modifying styles on the existing classes instead, or add extra classes to the elements. Something like <div class="outlook myClass" ...>

jaschrock commented 6 years ago

Hi, Yes, as I looked more at the classes earlier I realized this should work. Thanks Alan