I have replaced the "Send" button in the compose dialog with my "Send" button and using "Gmail API" to send the email.
I am able to send the email and get the response.
Now to make it more user-friendly, I want to close the compose dialog after my email is sent (similarly when the Gmail closes the dialog when email is sent). But I am unable to do so.
NOTE: When the email is sent successfully using "Gmail API", I am deleting the draft for that email also.
UPDATE:
Using JQuery, I get the "X" (Close) element in the dialog which is an image-
<img class="Ha" id=":2i" src="images/cleardot.gif" alt="Close" aria-label="Save & Close" data-tooltip-delay="800" data-tooltip="Save & Close">
I want to trigger a click event on it but it is not triggering.
When I tried triggering the click event on the "Discard" button of the same dialog, it worked successfully. Here is the discard button-
<div id=":68" class="oh J-Z-I J-J5-Ji T-I-ax7" tabindex="1" role="button" data-tooltip="Discard draft" aria-label="Discard draft" style="user-select: none;">
How do I click on the img tag?
You can take help of inbox sdk. It works perfectly.
sdk.Compose.registerComposeViewHandler( (composeView) => {
composeView.on('presending', function (event) {
//do anything you want to
composeView.close(); // this will close the compose window
})
Before gmail sends mail itself, you can send the mail using gmail api as you are doing and then this will close the compose window and save the draft.
As you have integrated your own send button, you will need to use the library accordingly.
Related
Azure logic apps 'o365 connector' action 'send approval email' returning null for property 'useremailaddress'. Why?
The Azure logic apps documentation for the 'office 365 outlook connector' shows that the 'ApprovalEmailResponse' object returns 'SelectedOption' and 'UserEmailAddress'. I get the correct value back for 'SelectedOption' but 'UserEmailAddress' always returns 'null'.
https://learn.microsoft.com/en-us/connectors/office365/#approvalemailresponse
How do I get the --> email address <-- of the user that selects 'Approve' or 'Reject' buttons in the email? If an email is forwarded to another person I would like to know who (email address) clicked approve or reject.
***This is what I get if I use the recommended settings mentioned in the replies below. For production we want to set "Use only HTML message" and "Show confirmation dialog" both set to "yes".
After reproducing from our end, we understood that the messages which are recorded as HTML messages aren't capturing all the responses. For this, Make sure you have the below parameters set Hide HTML message to 'yes'.
RESPONSE REQUEST IN OUTLOOK
AFTER RESPONSE HAS BEEN RECORDED
UPDATED ANSWER
Logic App outlook connector:
result:
So... It looks like (in this particular action) the only way to get the email address of the person that clicks approve or reject is to not use HTML and to instead rely on using the action card, that is provided by the logic app action, in the email. With 'Hide HTML message' set to 'yes'. However... I was not able to find a way to render my custom card from the one provided in the email. As a workaround, I use markdown in the body of the action. Not great but looks the same as the HTML version I was going-for. If anyone can figure out how to edit/customize the card that is provided in the email by this specific logic app action. Please... let me and Microsoft (sarcasm) know.
I have a chat, it is done in REACTJS + nodejs, everything works perfectly, but I want to implement a media library type function, where the person will be able to choose the photos that are available in the system, for example:
I have a page where I upload files, and list them in a table.
On the chat page, where I send messages, when I click the attach file button, the windows window opens normally so that the image can be uploaded and sent.
I would like that when I clicked on this button, a modal would be opened and these images that are available in the system would be listed and that could be selected and sent in the chat.
The modal listing the images in the chat I was able to open it, I just can't get past it, make the selected image sent, I don't know if I would need a callback function or something.
Page where the files are listed:
Chat page with modal open:
I would like that when you click on any image of the modal, it would be sent to the chat.
Part of the code responsible for uploading and sending the file:
const handleChangeMedias = (e) => {
if (!e.target.files) {
return;
}
const selectedMedias = Array.from(e.target.files);
setMedias(selectedMedias); };
<input
multiple
type="file"
id="upload-button"
disabled={loading || recording || ticketStatus !== "open"}
className={classes.uploadInput}
onChange={handleChangeMedias}
/>
<label htmlFor="upload-button">
<IconButton
aria-label="upload"
component="span"
onClick={handleOpenContactModal}
disabled={loading || recording || ticketStatus !== "open"}
>
<AttachFileIcon className={classes.sendMessageIcons} />
</IconButton>
</label>
Thanks id advanced !
I can create the page to upload the files and I can display these files in a modal on the chat page, now I am not able to select and send any of these files to the chat.
Obs: The functionality of uploading and sending files from the computer to the chat works correctly, I can select the file and send.
I am developing a chrome extension to suppress a prompt box.
The access is protected in server side and user is triggered with prompt box for username/password as shown below,
I am injecting a content_script in the url at document_start and trying to detect the presence of this prompt, if present "cancel" button need to be clicked.
Here is a test link to get the login prompt,
http://128.199.223.179/testing/test.php
You technically can't close the prompt only using the javascript api... You might need to use an NPAPI plugin or other external software such as Selenium to emulate a click on the close button.
But, what you can do is prevent that dialog from popping up in the first place by intercepting an authentication request.
First add "webRequest" permission in your manifest. Then try this code:
// to listen to all urls use { urls: ["<all_urls>"] }
chrome.webRequest.onAuthRequired.addListener(function(details) {
return {cancel: true};
}, {urls: ["http://128.199.223.179/testing/test.php"]}, ["blocking"]);
For better documentation, visit https://developer.chrome.com/extensions/webRequest#event-onAuthRequired
In my application , I have to provide a download button, so that when user clicks on it he/she can download file.
Right now in my application i have a feature that when user clicks on download button , I disable my download button until download pop-up is opened.
Now, I want that when download completes on client side , then download button should be enable to the client.
I want to know that is it possible ? If yes , then please tell me how can i achieve that.
From the [link][1] i Pasted , you can do this using jQuery :
Suppose you have an
<input id="FileDownload" type="button" name="FileDownload">Download</input>
You can define a jQuery event on the Click of this button
$("#FileDownlaod").click(function(){
this.disabled=true; //Disables the input button
/Call the plugin as described in the link
//On Success this.disabled=false
});
I have created one extension to test my website, which will open page and do some activity like set text, get text etc etc.
I have created one C# application and via websocket I will communicate with extension.
In my extension I have added listener as below,
document.addEventListener('DOMContentLoaded', function() {
websocket.send(""); // Send signal to C# to execute next command
});
so when I will open any website e.g www.google.com, it will fire above event and my next action will come to execute, but issue is while I open any website which will have alert box at the first stage of loading page, will never execute above listener e.g If I will open http://www.crowderassoc.com/javascript/alertbox.html, it will give you an alert message, till your click on OK, the page will be busy and so It will get stuck.
I am created automated script, in which I will place one MSAA command to click on that "OK" button, but my it just got hanged.
Is there any option that I can make it work in this situation?
Move code of DOMContentLoaded Listener
document.addEventListener('DOMContentLoaded', function() {
websocket.send(""); // Send signal to C# to execute next command
});
in Content Scripts to listener of tabs.onUpdated or any of webRequest, webNavigation Appropriate Listeners in Background Page.