Hyperlink disappearing from Google calendar when closing editing, reappears when in edit mode - flutter

I am trying to add a deep link to my calendar with flutter. As deep links don't work on calendar, i hyperlinked them.
When i am in edit mode (of the event, not the text field) i can see it (pic 2), when i am just looking at it, it's gone. It's important to note that if I go back into edit mode, it re-appears! So it has to be stored, just not displayed
Any ideas why? Is this an android bug maybe?
update!
_url = "\n\n\n" + url +" <--- click here \n\n\n test_line";
If I do this here, the "test_line" is invisible, the link is visible, so it appears to be a Calendar issue.
Not an ideal solution so I won't give it as answer.

Related

Add to Accessibility

Alright, my app uses features which require Accessibility, and so I have to bring up the System preferences menu so the user can add our app.
First, I check if Accessibility is enabled. I can do that easily, but I'm having trouble bringing up the systems pane with the Application added to the side panel.
First, I tried using a dictionary along with AXIsProcessTrusted, but to no avail; no dialog showed.
Second, I tried using a trick:
let event = CGEvent(keyboardEventSource: nil, virtualKey: 0, keyDown: true)
event.post(.cghidEventTap)
If our app is not added to Accessibility, then a dialog will pop up, and everything that goes along with it.
Now the important part is that when you press Deny on the dialog, it will still add our app to the Accessibility, but it will NOT be checked.
The issue is that when you do the trick again, and the app is added to Accessibility but is NOT checked, then nothing will happen. No indicators, nothing. That means you don't know if it showed up or not.
Now the third thing i tried is using
NSWorkspace.shared.open(URL(string: "x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility")!)
, which brings up the Accessibility menu.
However, it does not add our app to the side panel.
I've also tried using https://stackoverflow.com/a/18121292/14834900, however, all that does is just bring up the menu, like #3.
Recap
The first method does not work.
The second method brings up the dialog only when our app is not present in Accessibility, but gives no indicator of whether it brought the dialog up or not, which is required because if it did not bring up the dialog, then I would just use method #3, else, I would just continue.
The third method works but does not add our app to the side panel, so the user has to do it himself.
Is there anyway to make the third method add our app to Accessibility, but with it not checked, just like method #2?
The biggest issue I'm facing right now is how to add our app to the Accessbility side panel programmatically, just like the Trick #2
Thanks, I really appreciate it if anybody can lend a hand.

Hiding workflow re-assign button in Maximo

Is it possible to hide the re-assign button in the workflow dialog box for the users? and if so how?
Thanks
my solution may not be the best one, but it works for me. I hid the button using CSS.
Just go to the Application Designer app and use Export system XML action from Select Action dropdown. Then pick LIBRARY XML and save it somewhere on your disk. Open it (using WordPad preferably, Notepad is causing some issues when importing back to Maximo) and CTRL+F find Complete workflow assignment dialog. Go down a bit and you'll see <pushbutton> with label Reassignment:
<pushbutton id="completewf_b_4" label="Reassign" mxevent="directorinput" value="reassign"/>
Add textcss="reassign_btn" (the name is up to you of course)
<pushbutton id="completewf_b_4" label="Reassign" mxevent="directorinput" textcss="reassign_btn" value="reassign"/>
Then save the file and import LIBRARY.xml back to the Maximo using Application Designer app again. Then just edit your maximo.css file (located somewhere in \applications\maximo\maximouiweb\webmodule\webclient\ depending on which skin you are using) and add:
.reassign_btn { visibility: hidden; }
Hope this helps :-)

Addon SDK way to make a dialog

What is the proper way to use the SDK to make a dialog (which is not anchored to the add-on bar, etc. but shows centered on screen)? It doesn't seem like there is any API for this important capability. I do see windows/utils has open but I have two problems with that:
The dialog opening seems to require "chrome" privs to get it to be centered on the screen (and I'd be expectant of add-on reviewers complaining of chrome privs, and even if not, I'd like to try to stick to the SDK way).
While I can get the DOM window reference of the new window/utils' open() dialog, I'm not sure how to attach a content script so I can respond to user interaction in a way that prompts (and can respond to) privileged behavior ala postMessage or port.emit (without again, directly working with chrome privs).
Ok, this answer should have been pretty obvious for anyone with a little experience with the SDK. I realized I can just use a panel. In my defense, the name "panel" is not as clear as "dialog" in conjuring up this idea, and I am so used to using panels with widgets, that it hadn't occurred to me that I could use it independently!
Edit
Unfortunately, as per Bug 595040, these dialogs are not persistent, meaning if the panel loses focus, the "dialog" is gone... So panel looks like it is not a suitable candidate after all... :(
Edit 2
I've since moved on and have gotten things working mostly to my satisfaction with sdk/window/utils and openDialog on whose returned window I add a load listener and then call tabs.activeTab.on('ready', and then set tabs.activeTab.url to my add-on local HTML file so the ready event will get a tab to which I can attach a worker. There is still the problem with chrome privs I suppose, but at least the main communications are using SDK processes.
Update to Edit 2:
Code sample provided by request:
var data = require('sdk/self').data,
tabs = require('sdk/tabs');
var win = require('sdk/window/utils').openDialog({
// No "url" supplied here in this case as we add it below (in order to have a ready listener in place before load which can give us access to the tab worker)
// For more, see https://developer.mozilla.org/en-US/docs/Web/API/window.open#Position_and_size_features
features: Object.keys({
chrome: true, // Needed for centerscreen per docs
centerscreen: true, // Doesn't seem to be working for some reason (even though it does work when calling via XPCOM)
resizable: true,
scrollbars: true
}).join() + ',width=850,height=650',
name: "My window name"
// parent:
// args:
});
win.addEventListener('load', function () {
tabs.activeTab.on('ready', function (tab) {
var worker = tab.attach({
contentScriptFile: ....
// ...
});
// Use worker.port.on, worker.port.emit, etc...
});
tabs.activeTab.url = data.url('myHTMLFile.html');
});
if the panel loses focus, the "dialog" is gone...
It doesn't get destroyed, just hides, right? If so, depending on why it's getting hidden, you can just call show() on it again.
You'd want to make sure it's not being hidden for a good reason before calling show again. If there's a specific situation in which it's losing focus where you don't want it to, create a listener for that situation, then call if (!panel.isShown) panel.show();
For example, if it's losing focus because a user clicks outside the box, then that's probably the expected behaviour and nothing should be done. If it's losing focus when the browser/tab loses focus, just register a tab.on('activate', aboveFunction)
Simply adding ",screenX=0,screenY=0" (or any values, the zeroes seem to be meaningless) to the features screen seems to fix centerscreen.

Images disappear when clicked on iPhone Safari

Ok, weird issue:
1) Go here on an iPhone (Safari browser): http://powellcreative.com/our-team/
2) Click any of the team images to get to the team member page
3) Click the back button on the browser
4) The image is disappeared on the Team page now
I know this question is kind of old, but I was looking for a solution to a similar problem and after searching, I found a solution. Hopefully this helps other people with the same problem. The problem is when you give iOS a javascript event like onmouseover or onmouseout it doesn't like it, mainly because when your finger is "mousing over" an element in iOS, you are actually clicking on it, so this is the solution I came up with that seems to reload images after hitting the back button in iOS.
Here it is:
Make sure all images are in their own separate div with a distinctive name.
Example:
<div name="div1"><img src="yourimage" onmouseover="javascript:this.src='yourimage2';" onmouseout="javascript:this.src='yourimage';"></div>
In the javascript head part of your page you want to insert this:
window.onpageshow =
function(event){
if (event.persisted){
//for every div and image you want changed back you can add a loop here to change all at once or just one div by name//
document.getElementById('div1').innerHTML = '<img src="yourimage" onmouseover="this.src="yourimage2";" onmouseout="this.src="yourimage";">';
}
}
This will check for page back since Mobile Safari uses bfcache and reload your image into the div. Hopefully this helps OP or someone else.

disable back button on in ltk wizardinputpage

I'm doing a plugin in Eclipse IDE in order to do a refactoring. I'm using LTK, the point is: I don't know how I can disabled the back button after the preview. I've tried to create the RefactoringWizard using some flags like 'NO_BACK_BUTTON_ON_STATUS_DIALOG', but I think it is not the rigth way to do it.
The poblem I have in the background is that when I push preview and then push back, and preview again, the preview box shows the change related with the refactoring twice!.
I think the best solution is disabling the back button after the preview because this is the solution I have seen in others plugins.
Sorry because of my English and thanks beforehand.
The method org.eclipse.jface.wizard.WizardDialog#updateButtons disables the back button when currentPage.getPreviousPage() returns null. So, I suggest you to override the method org.eclipse.ltk.ui.refactoring.RefactoringWizard#getPreviousPage to return null.