How to change behavior of items in Firefox context menu - firefox

I'm trying to change the behavior of <popup id="placesContext"> in placesOverlay.xul. My goal is to disable the Properties entry upon conditions that I need to figure out using Javascript.
I am new to XBL bindings and handlers and don't know how to register such a handler for an existing/browser-defined XUL element. Or is there a simpler way?
Thanks.

The best way is to add a event listener for "popupshowing" events on the popup that contains the option you want to disable. It will be called just before the pop up shows and at that point you can do whatever checks you want to do and disable or enable to menuitem.
There is more information here: https://developer-stage.mozilla.org/en/XUL/PopupGuide/ContextMenus#Hiding_and_Showing_Menu_Items_based_on_Context

Related

Handsontable Dropdown Filter

I am having a bit of problem with Handsontable.
Is there a way to check if the small window for the dropdown Filter is opened?
For example, if someone clicks the head of the column you get a log in your console that the dropdown-filter is opened and if the settings for the filter are done you get another log "filter window closed"
example of dropdown filter
Handsontable provides some hooks you can use in your case.
You can hook the dropdown menu opening with beforeDropdownMenuShow (documentation) and you can hook the event when filters are applied with beforeFilter (documentation).
I hope it helps you. If you want more details on how to use them please provide StackBlitz.

Add element to share dialog

It it possible to add custom element to Share data dialog?
When I sent a text to it I want to add custom actions inside my app.
No it's not possible to add anything to the dialog.
you have to add the custom actions before you do the actual sharing then inside your own app.

How to make parent component to listen, events fired by child components using eventbus in gwt

I have a custom panel with a couple of components, eg. a button and a text box.
Once the button is clicked I would like custom panel that is also the parent panel receives the event and decides what to do, like call setText on the textbox.
Is it possible to achieve this using an eventbus ?
This means that the child components need not handle their event and then relay it.
I don't know the exact classes and how they work together. But sure you could use the GWT EventBus to achieve this. Fire an event in your button class and handle this event in your custom panel. You can google or find related answers here on stackoverflow.
I think this answer will help you: How to use the GWT EventBus
It's pretty simple to fire events and handle this events in other classes in your application.

Lotus Web Form Scroll and Popup issue

I am trying to create a web form in Lotus Notes that is web enabled. So far this has all worked fine, however there are 2 issues.
When Creating a Java Script Alert in the OnLoad Event, it Pops up everytime a user selects a radio button or dropdown option since this reloads the page. Is there any way to make this only for the initial opening of the form?
When a user selects an option, the form reloads and puts that form field on the top which is proving to be very disorrienting for users. Is there a way to have it not scroll on reload?
Thanks in advance!
The best advice would be: use XPages for web development that is "state of the art". If you can't, you have to code a lot of JavaScript to make the form not behave like "havoc".
First of all: the field property "refresh fields on keyword change" is the reason for the jumping / reload.
What does domino do?
All events / formulas that occur when you normally press F9 or use the Option above (that can be field values, input translations, hide whens, etc.) are not "converted" to HTML and javascript but are executed by the server. Therefor each change in a field with the option set submits the form and adds an &Seq=x to the url to keep track of the state. X increments on every reload. Of course this reload causes all events to be triggered again.
For you this means:
Option
disable the option to reload the form after keyword change.
Unfortunately you have to recode every dependency / calculation / hide when with javascript. Using a framework like jquery or dojo this is possible, but a lot of work.
If there IS no dependency then just disable the option...
Option
Live with the "jumping" and let your onload event check for the existance of an URL- parameter called seq... And only if it does not exist, then it is a "real" OnLoad...
Both options are not quite nice and not very easy to code...
That's one reason why IBM started XPages... There all this stuff is already handled by default...

Suggestion for FullCalendar event removal UI

I have my fullCalendar functioning well, however, I need to allow the users to remove events from the calendar. I can use the clickEvent method to bring up a confirmation window with a "do you want to remove" message. But this seems kind of clunky. Is there a better UI way of removing events?
Google calendar uses a qTip on click that offers "edit event details" and "delete". At first I didn't like sending users to a different "event details page" but after thinking about this for awhile it is a really good way to go.
It is always safer to ask for a confirm before removing something.
Anyway you can customize the rendering of the event using the eventRender callback
In particular you can:
attach custom markup to render an X image that when clicked will ajax call a delete function
you can attach other jQuery plugins to reproduce exactly the qTip effect
Have a look at the link for more details. Hope it helps

Resources