How can I change the options offered in the widget settings tag named

  • 1
  • Question
  • Updated 4 years ago
  • Answered
I'm fiddling around with the new Calendar widget to try to get a similar display to the old Gadget. I'd like to be able to choose from more font sizes for parts of the display.

In the settings.html file the <pre><font-setting ... /> tag appears to call for the display of the user interface for choosing size and other font stuff.

Can I add some font-size choices? If so, where would I find the implementation of that tag?

Thanks.
Photo of Oliver Jones

Oliver Jones

  • 692 Points 500 badge 2x thumb

Posted 4 years ago

  • 1
Photo of Neal

Neal

  • 61,252 Points 50k badge 2x thumb
Hi Oliver,

When configuring the Widget, there are several font options available.  You can choose custom fonts similarly to the old Gadget. If selecting on the font dropdown menu, you can choose Use Custom Font to utilize a URL for that font. You can also choose More Fonts... to view additional fonts that are available.

Thanks
Photo of Donna Peplinskie

Donna Peplinskie

  • 7,142 Points 5k badge 2x thumb
Hi Oliver,

If you're looking to add custom font sizes, then the file you'll want to change is this one in the BootstrapFormHelpers repo.

I have to warn you though, it's quite the rabbit hole to go down. The hierarchy of dependencies looks something like this:

Calendar Widget > font-setting component > font-size-picker Angular component > font size picker jQuery plugin > BootstrapFormHelpers.

Thx.
Photo of Oliver Jones

Oliver Jones

  • 692 Points 500 badge 2x thumb
Thanks Donna.

I guess I have a red pill / blue pill decision to make here. :-)

I catch myself wondering if there's any way to rehab the old calendar code to work with the new Google API.
Photo of Donna Peplinskie

Donna Peplinskie

  • 7,142 Points 5k badge 2x thumb
Sure, you could do that if you like. You can find the code for the Gadget here. It will be a bit harder to work with since Gadgets are XML-based and Widgets are HTML-based, but since you'd be working in the Javascript, maybe that's not such a big deal. You'd want to look at the getCalendar function of Events.js.

Thx.
Photo of Oliver Jones

Oliver Jones

  • 692 Points 500 badge 2x thumb
OK, I'll try fiddling with the Gadget. You may recall that I customized the Gadget a while ago to handle my application-specific needs and deployed it here:  http://plumislandmedia.net/Rise/Gadget-Events/Events.xml

Time for a version 1.1 I guess.

Thanks again.