A z3c.form calendar widget that works on overlays? - plone

I need a calendar widget for a z3c.form's Date field that works with overlays.
I've tested collective.z3cform.datetimewidget. It works in normal forms, but the calendar widget doesn't appear inside overlays. Same thing with jyu.z3cform.datepicker; it doesn't work with overlays. collective.z3cform.datepicker has problems with the date format and it seems it's in early stages of development.
Does Plone has any calendar widget for Date fields that works in overlays?

The problem is that the JavaScript support for the widget is not being loaded. On standalone pages that use the widget, this is handled semi-automatically — but not when the widget is loaded in an overlay.
Just visit the portal_javascripts tool in the Zope Management Interface, and enable the plone.app.jquerytools.dateinput.js support globally. You'll need to also enable its css in portal_css.

Related

Changing the cursor in fullCalendar on duplicating an event

I'm trying to change the cursor in our calendar component to cursor: copy while it's being dragged around for duplication, so that there is some user feedback and a visual difference between moving an event and duplicating it.
Currently the cursor is in pointer style for hovering and dragging the ghost.
I already added a placeholder to make it more distinguishable and wanted to round it out with the cursor change.
For that the suggested manual edit from this fullCalendar github issue was adapted:
https://github.com/fullcalendar/fullcalendar/issues/5250#issuecomment-749146976
because the fullCalendar 'selectMirror' flag didn't seem to change anything.
https://fullcalendar.io/docs/selectMirror
I'm using fullCalendar version 5.10.1 and angular 12.2.9.
The calendar is part of an angular project and resides in a wrapper component with some additional stuff around.
So far I tried these things:
add conditional styling to the calendar component via ngClass (works for the calendar itself, not events)
Trying the same thing on the wrapper (the fullCalendar event styling just overwrites everything)
try adding the css class via eventClassNames, 'globally' in the calendar options, more specific in the views option and even more specific on each created event (in v4 this would have probably been done via eventRender)
More to that here: https://fullcalendar.io/docs/classname-input
manipulate styling directly on the HTML element
looked into custom css pseudo-classes and decided it's too convoluted (as distinguishing between moving drag&drop and duplicate drag&drop is difficult in css)
I want to refrain from editing fullCalendar styles as this would easily break on a new npm install or version bump and also don't want to use the deprecated ::ng-deep.
FullCalendar itself offers some customization utilities like color or display style, but none for precise customization
https://fullcalendar.io/docs/event-display
Any further suggestions?

Google Earth Engine, hide widgets in Map.ui

Can I hide all widgets in https://code.earthengine.google.com/ when loading a map?
(all standard widgets including +-(zoom), map/satellite, drawing tools...)
I would like to create an app and embed it into a website without the widgets,
just displaying the loaded dataset.
Yes, you can hide all of the controls.
Map.setControlVisibility({all: false});
Depending on your application, you might also want to prevent it from being panned or zoomed:
Map.setLocked(true);
These examples are for the default map, but the same methods are also applicable to any ui.Map objects you create in your app if you are setting up a custom UI from scratch.

Prism detecting if page is modal programmatically and go back

I am implementing a feature using "connectivity" from essentials that when the app goes "offline" no wifi etc.. it navigates to a specific page.
It works in most cases however if I set the phone on "Airplane Mode" when I am on a modal page it does not navigate to my page.
In Prism is there a way to detect if the current page "IsModal" and either goback or kill it so that I can navigate to my specific Page?
THanks
You'd have to write some crazy lookup logic to figure it out. Unfortunately the helper for that doesn't currently exist. However the latest Prism 7.2 preview has some enhancements that specifically attempt to eliminate the need to figure out whether you require Modal Navigation and automatically use the proper type of Navigation. I would encourage you to try the preview. If you come up with a scenario where GoBack isn't working correctly please open an issue.

How to display "Working" toast from Google Docs add-on

When starting Spreadsheet or Doc add-ons I've obtained from the add-on stores, I see an animated progress toast at the bottom of the window:
That doesn't show up for my own add-ons, so I'm guessing that it's not placed by the add-on framework, but is something under the control of the add-on itself. The Preview Guide doesn't mention it, it's not in the Quick Start, nor does it appear in the UI Style guide. Then again, there's no elements in the CSS that would apply, either.
How can my add-on trigger this toast during initialization?
That progress indicator actually is placed by the add-on framework, for true add-ons. (As opposed to contained scripts using the add-on menus.)
It is not under control of your script.

Xpages Mobile CSS: iOS7

I have an Xpages app and I want to surface some pages from that app into my iPhone App. I want the Xpages pages to look like iOS7 so the users have the same experience in the app and don't know they are not in a native app.
IBM has not updated their mobile CSS yet.
But there is some CSS that goes a long way to fixing this:
http://redpilldevelopment.com/xpages-mobile-controls-ios7-theme/
I was able to make script library in my app and then I was able to get the CSS into a page, all using the instructions on the site.
What I don't get is how to make my app use the css theme? When I view the page on my iPhone some of the page is rendered like ios7, but much is not. Do I have to match up each individual element on the page to the class in the custom css?
It depends on your page I guess. Not every control has a "mobile renderer". DataView does for instance but viewPanel does not. So that could be why you're seeing it fine for some things but not others.
I believe in 9.01 with the latest extension pack it's easier to override the mobile them. It had been pretty difficult before. I think that's why your linked article mentions that the iOS7 theme can't be in the Head tag.
You might need to override styles for anything that doesn't look like iOS7.

Resources