How do I add behavior to a featherlight.js iframe "close" button - featherlight.js

I'm using featherlight.js and I want to add behavior to the "close" button when making a popup. When a user hits the "x" button I want it to redirect the page.

Use the afterClose callback...

Related

How to redirected to the main page using an elevated button on alert dialog without clicking on the button?

How to redirected to the main page using an elevated button on alert dialog without clicking on the button?
I just want to hover the mouse on the button and it will do the specific action and also redirected to the main page without clicking on the button that will appear on alert dialog box.
How to redirected to the main page using an elevated button on alert dialog without clicking on the button?
I just want to hover the mouse on the button and it will do the specific action and also redirected to the main page without clicking on the button that will appear on alert dialog box.
You can use onHover method of your Button class.
Check documentation example of ElevatedButton page
onHover → ValueChanged<bool>?
Called when a pointer enters or exits the button response area.
final, inherited

How to remove submit button from a dialog opened for a web-item?

The dialog opened for the web-item has a submit button and a cancel link in it.
I don't want the submit button to be present in the dialog.
How to do that?
The api provided by connect i.e.
AP.require('dialog', function(dialog){
var submitButton = dialog.getButton("submit");
submitButton.disable();
});
has methods only to enable/disable it.
You can turn the chrome of the dialog off when it's created via dialog options. You would need to add your own buttons in once this has been done.

How to make the facebook like button "post to page" popup appear above the button?

I looked around the web and found some vague answers that this cannot be done, I just want to make sure before I trash this whole idea.
So after I click on the facebook like button a "popup" appears below the like button asking me to post to my page. How can I make this appear above the like button since my button is at the bottom of the page.
Thanks!

Facebook-like button as an overlay to have cross-network liking?

I have a page that allows users to "like" certain elements. The liking is similar to a facebook-like, but for various reasons (such as being able to easily manipulate the data), the liking is for users of my site, and not necessarily for facebook users, and the data remains on my site. So there is a "mysite-like" button. However, I'd like it if this mysite-like button also functioned as a facebook-like button, and if a person is logged onto facebook, it would post it on their wall.
Is there a way to make a button which performs both functions? E.g. perhaps by having an invisible facebook-like button, overlayed on top of the mysite-like button? Perhaps through some opacity=0 iframe? In an ideal world, clicking on one button would function as a mysite-like, and also a facebook-like, and a google+1. One button to rule them all...
The clean way to do this kind of implementation, where user interaction on a social button triggers changes on your site, is to use the callback methods.
Limitation
These callbacks work in one direction. For example:
Facebook Like button -> your custom 'like' button
OR
Google +1 button -> your custom 'like' button
As a result you will not be able to
trigger either of them from your custom 'like' button
trigger one third party button from the other
And now that you know what you can do with them, here's how to do it.
Facebook Like button callback (from another StackOverflow post)
<script>
FB.Event.subscribe('edge.create', function(href, widget) {
alert('You just liked the page!');
// this is where you would trigger your site specific logic
});
</script>
Google +1 button callback (from the official docs)
<g:plusone callback="myCallback"></g:plusone>
<script>
function myCallback(result) {
alert('button was just changed to state ' + result['state']);
// this is where you would trigger your site specific logic
}
</script>
One way is to have the facebook-like button also trigger a "mysite-like" action e.g. via http://www.saschakimmel.com/2010/05/how-to-capture-clicks-on-the-facebook-like-button/
Is there a way to do this also with google+? You can use the callback option https://developers.google.com/+/plugins/+1button/#plusonetag-parameters but not sure how to get the userid of the user.

Like / Send popup "flyout" hidden in FB tab

I'm trying to implement a send button on my custom FB tab app.
Using the XFBML share button works, but when you click on it, the pop-up (aka "flyout") gets hidden due to the overflow: hidden; css.
Changing the overflow attribute to visible, for example, doesn't have a effect (probably cause I'm telling FB to resize the tab:
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.Canvas.setSize();
}
</script>
Screenshot of the problem:
http://i.stack.imgur.com/sHH1a.png (I'm a new user, not allowed inline images)
Is there a way of telling the box to display on top of the right FB sidebar or on the left of the button instead of the right?
Do I need to create a dialogue box with share & like buttons? (this might become problematic as I intend to display a send button next to each row).
Link to raw tab index.php : http://openair.co.nz/facebook/events/
You may consider positioning the Send button to the left side of the tab iframe, and make sure that the bottom send button has enough space below itself to open a popup without losing it again. No other known solutions (my opinion)